vim-zellij-navigator This plugin is designed to give the same functionality as vim-tmux-navigator in Zellij. Note: When a new session is st…
vim-zellij-navigator This plugin is designed to give the same functionality as vim-tmux-navigator in Zellij. Note: When a new session is st…
This plugin is designed to give the same functionality as vim-tmux-navigator in Zellij.
Note: When a new session is started, a pane flashes the first time each direction is pressed. This will be fixed in a near release of Zellij when headless mode is available.
Version 0.1.0 makes use of an additional Neovim plugin to know whether Neovim is currently opened.
Starting from 0.2.0 the plugin makes use of the Zellij list-clients command to remove the need for the Neovim plugin, this currently has no plugin binding so a shell command needs to be launched from the plugin, which introduces some delay. If this bothers you, you can continue using 0.1.0 by changing the keybindings to use this version. This problem will be gone in the next release when direct plugin bindings for list-clients have released.
Minimum Zellij version: v0.42.2
Zellij plugins do not need to be installed, simply add the keybindings to your zellij configuration file.
Next to this plugin, you will also need support from the Neovim side to execute the correct commands if the edge of the Neovim panes have been reached. Since the plugin works by sending Ctrl+hjkl to Neovim, these must be bound to the corresponding command in one of the following plugins.
For version <0.2.0 you also need to install this plugin:
-- Lazy.nvim
{
"hiasr/vim-zellij-navigator.nvim",
config = function()
require('vim-zellij-navigator').setup()
end
},Available commands:
move_focus with payload up, down, left, right to move the focus in the corresponding direction.move_focus_or_tab with payload up, down, left, right to move the focus in the corresponding direction or switch to the next tab if the focus is already at the edge.resize with payload up, down, left, right to resize the pane in the corresponding direction.If you use configuration for the plugin it must be added to every command in order to function consistently. This is because the plugin is loaded with the configuration of the first command executed.
Available configuration options:
move_mod: The modifier keys passed to Neovim with move_focus or move_focus_or_tab. Default: ctrl. Multiple modifier keys should be separated with a +.resize_mod: The modifier keys passed to Neovim with the resize command. Default: alt. Multiple modifier keys should be separated with a +.use_arrow_keys: When set to true, uses arrow key sequences instead of hjkl for keybindings sent to Neovim. This setting can differ per command. Default: false.The plugin supports multiple modifier combinations. Available modifiers:
ctrl - Control key (uses ASCII control characters when used alone)alt - Alt key (uses escape sequences when used alone)shift - Shift keysuper - Super/Windows keyhyper - Hyper keymeta - Meta keycaps_lock - Caps Lock keynum_lock - Num Lock keyExamples:
move_mod "ctrl"move_mod "ctrl+shift"resize_mod "alt+super+shift"Note: Single ctrl and alt modifiers without using arrow keys use optimized ASCII control characters and escape sequences respectively. All other combinations (including multi-modifier with ctrl/alt) use the kitty keyboard protocol. Unexpected behaviour may occur if your terminal emulator doesn't support this.
Basic configuration:
…Configuration with multiple modifiers:
…No open issues yet, or sync has not completed.