0

Using vim inside tmux, I would like to bring up the autocomplete line suggestions (normally done via C-x C-l).

I however have the following .tmux config which uses C-l as a navigation key between panes (select pane right):

is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
    | grep -iqE '^[^STXZ ]+ +(\\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 -T copy-mode-vi 'C-h' select-pane -L
bind-key -T copy-mode-vi 'C-j' select-pane -D
bind-key -T copy-mode-vi 'C-k' select-pane -U
bind-key -T copy-mode-vi 'C-l' select-pane -R

Running the C-x C-l inside vim inside tmux doesn't work, I get a bottom line in vim saying -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y).

Running vim directly (not from within tmux) works correctly.

How would I change my .tmux.conf to account for such situations?

1 Answer 1

0

This seems to work:

-grep -iqE '^[^STXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
+grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"

But it completely disables navigation from within vim.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .