DEV Community

Discussion on: tmux - A Terminal Multiplexer

Collapse
 
aghost7 profile image
Jonathan Boudreau

There's a couple of things that you can do to make tmux feel similar to VIM. I'm my tmux.conf file I have the following:

# When in clipboard selection mode, behave like vim. E.g., "b" will go back a
# word, "w" goes to the start of the next word, "e" goes to the end of the next
# word, etc.
setw -g mode-keys vi

# Start the selection with "v" just like in vim
bind-key -Tcopy-mode-vi 'v' send -X begin-selection

# Copy the selection just like in vim with "y"
bind-key -Tcopy-mode-vi 'y' send -X copy-selection

# Move around panes like you can with ctrl+w in VIM
bind-key j select-pane -D
bind-key k select-pane -U
bind-key h select-pane -L
bind-key l select-pane -R

Full config: github.com/AGhost-7/docker-dev/blo...

Collapse
 
pmihaylov profile image
Preslav Mihaylov

That's actually pretty useful. Thanks!