This plugin enables you to navigate navigate seamlessly between nvim and tmux. It is greatly inspired by Chris Tommey's vim-tmux-navigator.
Nvimux requires that you have Neovim with Python3 support and libtmux:
pip install pynvim
pip install libtmux
You can then install it like your others Nvim plugins and run :UpdateRemotePlugins
. You should restart Nvim after that.
Please check Chris Tommey's vim-tmux-navigator and add his tmux snippet in your .tmux.conf
You can map the NvimuxNavigate(arg)
function to your preferred keys, it works with or without tmux.
The arg can be h
, j
, k
, or l
respectively for left, down, up and right.
Use these commands to manipulate your tmux panes directly from Nvim
Command | Action |
---|---|
NvimuxLinkPane (pane_id) |
pane_id : Specify the pane you'd like to link Nvim with. Must be under the format: %n . |
NvimuxOpenPane [-a|-t target] [-v|-d dir] |
|
NvimuxOpenAndLink [-a|-t target] [-v|-d dir] |
The arguments are the same as for NvimuxOpenPane , only it links the newly opened pane to Nvim. |
NvimuxSendCommand (cmd) |
Send the cmd command to the linked pane. If no pane is linked an error is returned. |
NvimuxSendKeys [-e|-l] (keys) |
Send the keys to the tmux linked pane as they are written. If no pane is linked an error is returned.
|
Please feel free to open an issue if you think of an improvement or find a bug. Any help is appreciated.