-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is_vim not working #280
Comments
Hi @Math3mat1x, base on being able to switch around outside of vim, and within vim splits makes me think that it is not an OS incompatibility. Can you clarify what you mean by the following?
|
Thanks for your answer! |
Hello,
I tried to use the plugin as explained on the Vim Integration section on upcase/tmux, however, it doesn't work. When I am outside of vim, I can move between panes. When I'm inside vim, I can move between splits, however my cursor is blocked on vim when I enter the program.
Here's what I added in my tmux configuration file (I changed some keyboard shortcuts due to my keyboard layout):
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" bind-key -n 'C-c' if-shell "$is_vim" 'send-keys C-c' 'select-pane -L' bind-key -n 'C-t' if-shell "$is_vim" 'send-keys C-t' 'select-pane -D' bind-key -n 'C-s' if-shell "$is_vim" 'send-keys C-s' 'select-pane -U' bind-key -n 'C-n' if-shell "$is_vim" 'send-keys C-n' 'select-pane -R' tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")' if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \ "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \ "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
On the internet, I heard that vim creates a new thread each time you create a split, this can be found using ps and that's what is_vim does.
Do you know how to fix the issue?
Thanks in advance!
NB: I'm on ArchLinux, maybe it is a problem with compatibility with macOS...
The text was updated successfully, but these errors were encountered: