vim-tmux-navigator
vim-tmux-navigator copied to clipboard
vim-tmux-navigator stops working randomly
I am using neovim 0.3.2-953 on Ubuntu 16.04 LTS with tmux 2.7. I have the plugin installed for both tmux and vim and for most part it works fine, however on random occasions i get stuck inside vim(even if there are no vim splits) and and the navigation to different tmux panes does not work until i exit out of vim.
Please let me know if more information is needed from my side. I have not seen any pattern when this behavior is exhibited which is why I am sorry for not being able to provide any so troubleshooting information.
Hmmm, unfortunately I’m not sure what the issue would be. If it happens again, I’d check what :TmuxNavigatorProcessList
outputs in Vim. Also, I’d split a window in Vim and see if navigation is only stuck in the Vim pane, or failing entirely. Lastly I’d check what the output of :verbose nmap <C-k>
to see if something may have changed tinge mappings.
So :TmuxNavigatorProcessList
shows just zsh
and nvim
. Navigation is stuck between vim and tmux panes means i can move fine b/w vim splits however i am not able to move out of vim to tmux panes. Mappings for ctrl-[hjkl] have not been changed, just checked in the vim.
@christoomey Hey any further suggestion you can give.
I have the same problem. When creating a new split with prefix % or prefix ", I can easily navigate between other splits until I focus the vim split and I'm stuck again until I create a new split to get out.
:TmuxNavigatorProcessList
output is
S bash
S nvim
I have the same problem. When creating a new split with prefix % or prefix ", I can easily navigate between other splits until I focus the vim split and I'm stuck again until I create a new split to get out.
:TmuxNavigatorProcessList
output isS bash S nvim
:TmuxNavigatorProcessList
i get the same output as you get except my shell is zsh
. In my case i have to exit out of nvim
by :q
and then only i can move into other tmux splits. I am not sure if this issue is specific to nvim
when used in conjuncture with tmux
or does it happen with vanilla vim
as well, this is something i am going to test out soon until @christoomey comment on it.
NVIM v0.3.5-7-g947069ba1 tmux 2.6
I get the same as above but interestingly it's consistent in that everything's fine initially and the connection only breaks when I source my vim config from within vim. I'm guessing somehow the reloading of this module causes it somehow. The process list output is the same whether it's working or not.
Will let you all know if I manage to figure anything out.
i am able to replicate the issue when there are more than about 4 panes/windows open in tmux. I am connecting to the machine in question over ssh using Putty. Here is a docker with the entire configuration: https://github.com/nicholas-long/pen-test-environ/tree/d12b666ebd0276e1d2d152b0813d4f44848c25e9
I have the same problem. When creating a new split with prefix % or prefix ", I can easily navigate between other splits until I focus the vim split and I'm stuck again until I create a new split to get out.
:TmuxNavigatorProcessList
output isS bash S nvim
:TmuxNavigatorProcessList
i get the same output as you get except my shell iszsh
. In my case i have to exit out ofnvim
by:q
and then only i can move into other tmux splits. I am not sure if this issue is specific tonvim
when used in conjuncture withtmux
or does it happen with vanillavim
as well, this is something i am going to test out soon until @christoomey comment on it.
I have the same issue with vanilla vim. I haven't been able to pinpoint what causes the issue, but it's random and happens to me a few times per day. My process list output is:
Ss -zsh
S+ /opt/homebrew/Cellar/macvim/9.0.472_1/MacVim.app/Contents/MacOS/Vim
S+ tmux
This is a really infuriating issue and it's taken me this long just to stumble upon this thread 😅 I can click on other tmux panes in the same window and navigate to vim from any other pane, but once I'm in the vim pane there is no navigating either across vim panes or outside of the tmux pane housing vim.
@brianbolnick Does this plugin work for you when the process list looks like what you shared, or is that an example from when it's not working. I'd expect it to work with that process list.
but it's random and happens to me a few times per day
This makes me think some other plugin is shelling out in a way that changes your process list. If you can capture the process list when it's working and when it breaks, that would likely help narrow down.
Unfortunately the process list always looks like that... both when it's working and not :/ @christoomey
For me adding the changes in the issue https://github.com/LunarVim/LunarVim/issues/2745#issuecomment-1165905419 helped out. Changing the regex in my tmux conf solved the issue somehow.
Try running :TmuxNavigateDown or any of the other navigation commands manually within vim to see whether the functionality is completely broken or if the default key binds are being overridden somehow. I had the same issue and manually re-mapping the default keybindings fixed for my config.
For me this happens sometimes in an old vim window and this is the error messages that show up on the bottom of my screen.
line 4:
E282: Cannot read from "/var/folders/3s/ljg21x_s17xbzjd_j514j7240000gp/T/v6BCizH/1158"
If I manually run the :TmuxNavigateDown then I get the same error. It's like a temp file or folder is being referenced but has been deleted.