Skip to content

Commit

Permalink
chore: generated vimdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Apr 25, 2024
1 parent ebaab05 commit 33366d4
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions doc/smart-splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,9 @@ KITTY *smart-splits-kitty*
[!NOTE] The `config.at_edge = 'wrap'` option is not supoprted in Kitty
terminal multiplexer due to inability to determine pane layout from CLI.

[!NOTE] This won't work if the pane is connected over SSH, as the pane will
not properly report the foreground process name.

Add the following snippet to `~/.config/kitty/kitty.conf`, adjusting the
keymaps and resize amount as desired.

Expand All @@ -499,19 +502,17 @@ keymaps and resize amount as desired.
map alt+h kitten pass_keys.py relative_resize left 3 alt+h
map alt+l kitten pass_keys.py relative_resize right 3 alt+l
<
By default the plugin sets a kitty user-var `IS_NVIM` when it loads. You can take advantage of this together with kittys
[conditional mappings feature](https://sw.kovidgoyal.net/kitty/mapping/#conditional-mappings-depending-on-the-state-of-the-focused-window)

map ctrl+j neighboring_window down
map ctrl+k neighboring_window up
map ctrl+h neighboring_window left
map ctrl+l neighboring_window right

map --when-focus-on var:IS_NVIM ctrl+j
map --when-focus-on var:IS_NVIM ctrl+k
map --when-focus-on var:IS_NVIM ctrl+h
map --when-focus-on var:IS_NVIM ctrl+l
By default, it matches against the name of the current foreground process to
detect if `vim`/`nvim` is running. If that doesn't work for you, or you want
to include other CLI/TUI programs in the exclusion, you can provide an
additional regex argument:

>
map ctrl+j kitten pass_keys.py neighboring_window bottom ctrl+j "^.* - nvim$"
map ctrl+k kitten pass_keys.py neighboring_window top ctrl+k "^.* - nvim$"
map ctrl+h kitten pass_keys.py neighboring_window left ctrl+h "^.* - nvim$"
map ctrl+l kitten pass_keys.py neighboring_window right ctrl+l "^.* - nvim$"
# the 3 here is the resize amount, adjust as needed
map alt+j kitten pass_keys.py relative_resize down 3 alt+j "^.* - nvim$"
map alt+k kitten pass_keys.py relative_resize up 3 alt+k "^.* - nvim$"
Expand Down Expand Up @@ -575,4 +576,4 @@ currently in use. The API offers the following methods:
---@field type 'tmux'|'wezterm'|'kitty'
<

vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:ft=help:norl:

0 comments on commit 33366d4

Please sign in to comment.