This link has been bookmarked by 49 people . It was first bookmarked on 20 Apr 2017, by Ben Turner.
-
01 Apr 18Jason Yau
"is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
is_fzf="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?fzf$'"
bind -n C-h run "($is_vim && tmux send-keys C-h) || \
tmux select-pane -L"
bind -n C-j run "($is_vim && tmux send-keys C-j) || \
($is_fzf && tmux send-keys C-j) || \
tmux select-pane -D"
bind -n C-k run "($is_vim && tmux send-keys C-k) || \
($is_fzf && tmux send-keys C-k) || \
tmux select-pane -U"
bind -n C-l run "($is_vim && tmux send-keys C-l) || \
tmux select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"" -
19 Jun 17
-
02 May 17
-
29 Apr 17
-
27 Apr 17
-
24 Apr 17
-
21 Apr 17
-
20 Apr 17
-
Daniel Ionescu
tmux vim
-
saasworks4
Article URL: https://blog.bugsnag.com/tmux-and-vim/Comments URL: https://news.ycombinator.com/item?id=14155761Points: 41# Comments: 13
-
-
This post covers just a few of the many possible ways to configure tmux and vim to get even more out of both.
-
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.