Skip to content

Commit 357ce24

Browse files
author
github-actions[bot]
committed
chore: generated vimdoc
1 parent e9cf5dc commit 357ce24

1 file changed

Lines changed: 19 additions & 21 deletions

File tree

doc/smart-splits.txt

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*smart-splits.txt* Last change: 2024 March 11
1+
*smart-splits.txt* Last change: 2024 April 27
22

33
==============================================================================
44
Table of Contents *smart-splits-table-of-contents*
@@ -484,39 +484,37 @@ KITTY *smart-splits-kitty*
484484
[!NOTE] The `config.at_edge = 'wrap'` option is not supoprted in Kitty
485485
terminal multiplexer due to inability to determine pane layout from CLI.
486486

487+
By default the plugin sets a kitty user-var `IS_NVIM` when it loads. You can
488+
take advantage of this together with kittys conditional mappings feature
489+
<https://sw.kovidgoyal.net/kitty/mapping/#conditional-mappings-depending-on-the-state-of-the-focused-window>
490+
to use the same keybind for both kitty and neovim.
491+
487492
Add the following snippet to `~/.config/kitty/kitty.conf`, adjusting the
488493
keymaps and resize amount as desired.
489494

490495
>
491-
map ctrl+j kitten pass_keys.py neighboring_window bottom ctrl+j
492-
map ctrl+k kitten pass_keys.py neighboring_window top ctrl+k
493-
map ctrl+h kitten pass_keys.py neighboring_window left ctrl+h
494-
map ctrl+l kitten pass_keys.py neighboring_window right ctrl+l
495496
496-
# the 3 here is the resize amount, adjust as needed
497-
map alt+j kitten pass_keys.py relative_resize down 3 alt+j
498-
map alt+k kitten pass_keys.py relative_resize up 3 alt+k
499-
map alt+h kitten pass_keys.py relative_resize left 3 alt+h
500-
map alt+l kitten pass_keys.py relative_resize right 3 alt+l
501-
<
502-
By default the plugin sets a kitty user-var `IS_NVIM` when it loads. You can take advantage of this together with kittys
503-
[conditional mappings feature](https://sw.kovidgoyal.net/kitty/mapping/#conditional-mappings-depending-on-the-state-of-the-focused-window)
504-
505497
map ctrl+j neighboring_window down
506498
map ctrl+k neighboring_window up
507499
map ctrl+h neighboring_window left
508500
map ctrl+l neighboring_window right
509-
501+
502+
# Unset the mapping to pass the keys to neovim
510503
map --when-focus-on var:IS_NVIM ctrl+j
511504
map --when-focus-on var:IS_NVIM ctrl+k
512505
map --when-focus-on var:IS_NVIM ctrl+h
513506
map --when-focus-on var:IS_NVIM ctrl+l
514-
507+
515508
# the 3 here is the resize amount, adjust as needed
516-
map alt+j kitten pass_keys.py relative_resize down 3 alt+j "^.* - nvim$"
517-
map alt+k kitten pass_keys.py relative_resize up 3 alt+k "^.* - nvim$"
518-
map alt+h kitten pass_keys.py relative_resize left 3 alt+h "^.* - nvim$"
519-
map alt+l kitten pass_keys.py relative_resize right 3 alt+l "^.* - nvim$"
509+
map alt+j kitten relative_resize down 3
510+
map alt+k kitten relative_resize up 3
511+
map alt+h kitten relative_resize left 3
512+
map alt+l kitten relative_resize right 3
513+
514+
map --when-focus-on var:IS_NVIM alt+j
515+
map --when-focus-on var:IS_NVIM alt+k
516+
map --when-focus-on var:IS_NVIM alt+h
517+
map --when-focus-on var:IS_NVIM alt+l
520518
<
521519
Then, you must allow Kitty to listen for remote commands on a socket. You can
522520
do this either by running Kitty with the following command:
@@ -575,4 +573,4 @@ currently in use. The API offers the following methods:
575573
---@field type 'tmux'|'wezterm'|'kitty'
576574
<
577575

578-
vim:tw=78:ts=8:ft=help:norl:
576+
vim:tw=78:ts=8:ft=help:norl:

0 commit comments

Comments
 (0)