Closed anichols-ht closed 1 year ago
Hey @anichols-ht - thanks for the kind words!
Can you add any specifics about the failure mode, and did happen to try anything describe in the Troubleshooting section?
Based on what you're describing (it works in a fresh Vim, but then stops working at some point), I'm guessing something is overriding the mappings or changing the process name.
:verbose nmap <C-j>
when it stops working, and compare to the output in a fresh vim instance?:TmuxNavigatorProcessList
when it stops working, and again compared to in a fresh vim session?Yeah, I should've included that in the initial report. verbose nmap <c-h>
(I chose h when I tried it) still reports tmux navigator; it just doesn't work. Just checked TmuxNavigatorProcessList
and it shows:
Ss -bash
S+ vim
S+ /bin/bash
S+ tmux
This definitely still could be environmental or user error, but I'm not sure what else to check.
Process list and mappings look right, so doesn't seem to be those.
Next things to check:
nmap <C-j> :echo 'hello'<cr>
and then hit Ctrl-j and confirm you see hello
printed out)TmuxNavigateRight
to run what should happen when you hit Ctrl-l)The mapping does not get triggered and the vim functions do work, so I think that must indicate something else is the problem. Shift-Enter just seems to stop Ctrl-hjkl from working. But it doesn't prevent other Ctrl bindings from working. I can still do Ctrl-w hjkl to move around (this is the weirdest part I think . . . it's so selective). I use terminal vim, so maybe it just doesn't like Shift-Enter for some reason.
I now suspect it has something to do with this: https://unix.stackexchange.com/questions/520273/setting-xterm-keys-in-tmux-affects-shift-enter-in-vim. I do have xterm-keys on in tmux. (This might require a new entry in your troubleshooting...)
Okay. Turning off xterm-keys
did not fix it, but removing Send ^[ [13;2u Shift Return
from iterm2 key mappings did (though of course Shift-Enter no longer works for mappings).
Sounds like this is coming from your xterm config rather than the plugin? Don't want to close preemptively, but assuming that's accurate, I'm thinking we can close this issue.
No, I agree with you. I only left it open cause I thought you might have experience with terminal escape sequences and say something like "Oh, you just need to do
First of all . . . love tmux navigator (thank you!). So much so that when something goes wrong, I have a hard time adjusting back tohjkl mappings.
I thought at first this was a problem with fern cause I started noticing it when using fern, but after a bit of debugging, it turns out that by itself (regardless of other plugins and whether that key combo has a mapping or not) causes tmux navigator to permanently no longer work in the vim session I'm in. I have to quit vim and relaunch to get them back (I could probably re-source it, but I haven't tried that). Seems weird, but I can reproduce it consistently.