Skip to content
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

Navigating between nvim splits doesn't work with nvim.appimage #213

Open
niklaas opened this issue Aug 8, 2018 · 8 comments
Open

Navigating between nvim splits doesn't work with nvim.appimage #213

niklaas opened this issue Aug 8, 2018 · 8 comments

Comments

@niklaas
Copy link

niklaas commented Aug 8, 2018

When using nvim.appimage from official releases (https://github.com/neovim/neovim/releases) navigating within nvim between splits doesn't work. I assume this has something to do with

is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
    | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h"  "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j"  "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k"  "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l"  "select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"

which catches the input (e.g. <c-j>) because grep -iqE ... doesn't match on nvim.appimage.

I already tried renaming nvim.appimage to nvim and copying it into /usr/bin but that didn't solve the issue. I don't want to fiddle around with above regex though because it seems quite sophisticated. :-)

When removing above lines from my .tmux.conf I can navigate between splits in nvim.appimage again. That said, obviously I then can no longer use navigation between nvim and tmux splits.

@blueyed
Copy link
Collaborator

blueyed commented Aug 8, 2018

#201 should solve this.

@christoomey
Copy link
Owner

Can you share the output of running : TmuxNavigatorProcessList in Vim as described here?

@niklaas
Copy link
Author

niklaas commented Aug 9, 2018

@christoomey sorry, I forgot about that.

:TmuxNavigatorProcessList run in nvim.appimage:

> bin/nvim.appimage --version | head -1
NVIM v0.3.2-152-g1593ee7cf
S zsh
S AppRun

:TmuxNavigatorProcessList run in nvim (distro install):

> nvim --version | head -1
NVIM 0.1.7
S zsh
S nvim
S tmux: client

:TmuxNavigatorProcessList run in vim:

> vim --version | head -1
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 30 2017 18:21:38)
S zsh
S vim
S tmux: client

Ha! So, I guess AppRun isn't caugth by the regex.

@blueyed I'll go through #201 later.

I'll keep you both updated.

@niklaas
Copy link
Author

niklaas commented Aug 9, 2018

To be honest, I am not quite sure what to make of #201. As far as I understand the discussion, the proposed fix requires a newer tmux version -- mine is 2.3 though.

Probably I should keep things simple and just use the nvim version distributed by the package manager.

@niklaas
Copy link
Author

niklaas commented Aug 9, 2018

I just figured out that building nvim from source works.

@blueyed
Copy link
Collaborator

blueyed commented Aug 9, 2018

Yes, it is certainly the regex/process name here.
Maybe the appimage could set this somehow? (so it does not show up as "AppRun")

As for #201 the tmux.conf from #201 (comment) works with older tmux versions.

@blueyed
Copy link
Collaborator

blueyed commented Aug 9, 2018

You might want to ask in Neovim's issues about having better output with ps for the appimage.
(I have not used them myself, so have no experience)

altnometer pushed a commit to altnometer/setupworkenv that referenced this issue Nov 6, 2018
Previously, an nvim.appimage was download and linked.
Now, it is cloned and built and installed.
This is done as a worwaround of
christoomey/vim-tmux-navigator#213
@jessebett
Copy link

This is also a problem for me. My sysadmin installed neovim and made it available to me only as an appimage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants