Commit c2dab18 1 parent 48390f3 commit c2dab18 Copy full SHA for c2dab18
File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,27 @@ detail.
332
332
333
333
[tmate]: http://tmate.io/
334
334
335
+ ### Switching between host panes doesn' t work when docker is running
336
+
337
+ Replace the ` is_vim` variable in your ` ~/.tmux.conf` file with:
338
+ ` ` ` tmux
339
+ if-shell ' [ -f /.dockerenv ]' \
340
+ " is_vim=\" ps -o state=,comm= -t '#{pane_tty}' \
341
+ | grep -iqE '^[^TXZ ]+ +(\\ S+\\ /)?g?(view|n?vim?x?)(diff)?$'\" "
342
+ # Filter out docker instances of nvim from the host system to prevent
343
+ # host from thinking nvim is running in a pseudoterminal when its not.
344
+ " is_vim=\" ps -o state=,comm=,cgroup= -t '#{pane_tty}' \
345
+ | grep -ivE '^.+ +.+ +.+\\ /docker\\ /.+$' \
346
+ | grep -iqE '^[^TXZ ]+ +(\\ S+\\ /)?g?(view|n?vim?x?)(diff)? +'\" "
347
+ ` ` `
348
+
349
+ Details: The output of the ps command on the host system includes processes
350
+ running within containers, but containers have their own instances of
351
+ /dev/pts/\* . vim-tmux-navigator relies on /dev/pts/\* to determine if vim is
352
+ running, so if vim is running in say /dev/pts/< N> in a container and there is a
353
+ tmux pane (not running vim) in /dev/pts/< N> on the host system, then without
354
+ the patch above vim-tmux-navigator will think vim is running when its not.
355
+
335
356
# ## It Still Doesn't Work!!!
336
357
337
358
The tmux configuration uses an inlined grep pattern match to help determine if
You can’t perform that action at this time.
0 commit comments