diff --git a/doc/smart-splits.txt b/doc/smart-splits.txt index 106738d..e90e442 100644 --- a/doc/smart-splits.txt +++ b/doc/smart-splits.txt @@ -1,4 +1,4 @@ -*smart-splits.txt* Last change: 2023 April 12 +*smart-splits.txt* Last change: 2023 April 14 ============================================================================== Table of Contents *smart-splits-table-of-contents* @@ -8,7 +8,7 @@ Configuration ................................... |smart-splits-configuration| Hooks ................................................... |smart-splits-hooks| Usage ................................................... |smart-splits-usage| Key Mappings ..................................... |smart-splits-key-mappings| -Lua API: ............................................. |smart-splits-lua-api:| +Lua API ............................................... |smart-splits-lua-api| Multiplexer Integrations ............. |smart-splits-multiplexer-integrations| Tmux ..................................................... |smart-splits-tmux| Wezterm ............................................... |smart-splits-wezterm| @@ -86,12 +86,14 @@ Defaults are shown below: ignored_buftypes = { 'NvimTree' }, -- the default number of lines/columns to resize by at a time default_amount = 3, - -- whether to wrap to opposite side when cursor is at an edge - -- e.g. by default, moving left at the left edge will jump - -- to the rightmost window, and vice versa, same for up/down. - -- NOTE: `wrap_at_edge = false` is not supported on Kitty terminal + -- Desired behavior when your cursor is at an edge and you + -- are moving towards that same edge: + -- 'wrap' => Wrap to opposite side + -- 'split' => Create a new split in the desired direction + -- 'stop' => Do nothing + -- NOTE: `at_edge = 'wrap'` is not supported on Kitty terminal -- multiplexer, as there is no way to determine layout via the CLI - wrap_at_edge = true, + at_edge = 'wrap', -- when moving cursor between splits left or right, -- place the cursor on the same row of the *screen* -- regardless of line numbers. False by default. @@ -137,6 +139,10 @@ Defaults are shown below: -- this functionality is only supported on tmux and Wezterm due to kitty -- not having a way to check if a pane is zoomed disable_multiplexer_nav_when_zoomed = true, + -- Supply a Kitty remote control password if needed, + -- or you can also set vim.g.smart_splits_kitty_password + -- see https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.remote_control_password + kitty_password = nil, }) < @@ -148,7 +154,7 @@ The hook table allows you to define callbacks for the `on_enter` and ============================================================================== -EXAMPLES: *smart-splits-examples:* +EXAMPLES *smart-splits-examples* Integration with bufresize.nvim @@ -254,7 +260,7 @@ Otherwise, here are some recommended mappings. < -LUA API: *smart-splits-lua-api:* +LUA API *smart-splits-lua-api* >lua -- resizing splits @@ -268,13 +274,13 @@ LUA API: *smart-splits-lua-api:* require('smart-splits').resize_left(amount) require('smart-splits').resize_right(amount) -- moving between splits - -- pass same_row as a boolean to override the default - -- for the move_cursor_same_row config option. + -- You can override config.at_edge and + -- config.move_cursor_same_row via opts -- See Configuration. - require('smart-splits').move_cursor_up() + require('smart-splits').move_cursor_up({ same_row = boolean, at_edge = 'wrap' | 'split' | 'stop' }) require('smart-splits').move_cursor_down() - require('smart-splits').move_cursor_left(same_row) - require('smart-splits').move_cursor_right(same_row) + require('smart-splits').move_cursor_left() + require('smart-splits').move_cursor_right() -- Swapping buffers directionally with the window to the specified direction require('smart-splits').swap_buf_up() require('smart-splits').swap_buf_down() @@ -410,7 +416,7 @@ Add the following snippet to your `~/.config/wezterm/wezterm.lua`: KITTY *smart-splits-kitty* - **Note** `config.wrap_at_edge = false` is not supoprted in Kitty terminal + **Note** `config.at_edge = 'wrap'` is not supoprted in Kitty terminal multiplexer due to inability to determine pane layout from CLI. Add the following snippet to `~/.config/kitty/kitty.conf`, adjusting the diff --git a/doc/tags b/doc/tags index 8f2ce5a..f0d2319 100644 --- a/doc/tags +++ b/doc/tags @@ -1,12 +1,12 @@ screen smart-splits.txt /*screen* smart-splits-configuration smart-splits.txt /*smart-splits-configuration* smart-splits-credits smart-splits.txt /*smart-splits-credits* -smart-splits-examples: smart-splits.txt /*smart-splits-examples:* +smart-splits-examples smart-splits.txt /*smart-splits-examples* smart-splits-hooks smart-splits.txt /*smart-splits-hooks* smart-splits-install smart-splits.txt /*smart-splits-install* smart-splits-key-mappings smart-splits.txt /*smart-splits-key-mappings* smart-splits-kitty smart-splits.txt /*smart-splits-kitty* -smart-splits-lua-api: smart-splits.txt /*smart-splits-lua-api:* +smart-splits-lua-api smart-splits.txt /*smart-splits-lua-api* smart-splits-multiplexer-integrations smart-splits.txt /*smart-splits-multiplexer-integrations* smart-splits-table-of-contents smart-splits.txt /*smart-splits-table-of-contents* smart-splits-tmux smart-splits.txt /*smart-splits-tmux*