Closed Nicola-Bini closed 12 months ago
Hello!
Could you please review the text of the issue you submitted? It seems you mixed left and right. If what you meant is "the left tmux pane contains 2 neovim splits, and there's an additional tmux pane on the right", then I cannot seem to figure out what the problem is. To re-iterate (from what I see in the picture and take as correct), your cursor is on the far left neovim split, and you try to move through <C-l>
to the right, correct? This should indeed place you on the neovim split on the right, in the same tmux pane. If that is not the case, we could investigate what the problem is, however you might need to run a few things for me, as I cannot re-produce the problem.
Hi @alexghergh,
Thank you for responding. You are correct, I update my first comment to make it clearer. The problem is that instead of moving to the second neovim split (in the same tmux pane), like you described, it moves my cursor to the right tmux pane. Effectively removing the possibility to move to the the second neovim split, without using my mouse.
Happy to run whatever test is necessary
Alright, let's see. First of all, can you replicate this with all directions of movement, i.e. the same thing happens when you have 2 tmux panes, and the right tmux pane contains 2 neovim splits, and you try to move with the cursor from the rightmost neovim split to the one to the left? Up/down movement too?
It looks like neovim somehow might not register your key presses, and they go directly to tmux. Could you change the keybinds from neovim to something else? For example, keep tmux keybinds Ctrl
based, and temporarily assign neovim keybinds to Alt
or Shift
or something else (any key will do). Then, try the same experiment as above, inside neovim, except with the new keybinds.
Hi @alexghergh,
Thank you for the suggestion. I changed the keybindings to <C-a>
and <C-o>
. They work as expected.
Here is my nvim config . I know it is still very dirty (I am still experimenting and trying to understand how to set up language servers)
Hey,
I just noticed that your <C-h>
and <C-l>
bindings are reversed (i.e. h
should move to the left, and l
to the right, if to follow the Vim convention).
If that's the case, then the behaviour described in your initial comment is consistent with how it should work.
Was that the problem, or were they reversed on purpose?
Thank you for spotting that! I recently moved to a dvorak layout and I made confusion. I will test it soon, and let you know if that was the only problem
Hi @alexghergh,
It worked! that was the problem, and I was also missing part of your config in the tmux.conf
file.
Thank you for the help, and for the plugin!
Hi!
I have 2 neovim splits on the right and 1 tmux pane on the left, and my cursor is on the far left. When I now use "C-l" (shortcut for nvim_tmux_nav.NvimTmuxNavigateRight), I would expect the cursor move to the second neovim split from the left, in the same tmux split. Instead it jumps to the right pane. What am I missing?
My config `local nvim_tmux_nav = require('nvim-tmux-navigation') local keymap = vim.keymap.set local opts = { noremap = true, silent = true}
nvim_tmux_nav.setup{}
keymap('n', "", nvim_tmux_nav.NvimTmuxNavigateLeft)
keymap('n', "", nvim_tmux_nav.NvimTmuxNavigateDown)
keymap('n', "", nvim_tmux_nav.NvimTmuxNavigateUp)
keymap('n', "", nvim_tmux_nav.NvimTmuxNavigateRight)
keymap('n', "<C-\>", nvim_tmux_nav.NvimTmuxNavigateLastActive)
keymap('n', "", nvim_tmux_nav.NvimTmuxNavigateNext)
`
-- tmux use {'alexghergh/nvim-tmux-navigation', disable_when_zoomed = true -- defaults to false }
tmux.conf
PS: Great Plugin, thank you for that!