DEV Community

Discussion on: tmux - A Terminal Multiplexer

Collapse
 
dmfay profile image
Dian Fay

To add: if you don't want to deal with the complexity of a multiplexer, use neovim and you get a built-in terminal emulator that can run in a split :)

Collapse
 
moopet profile image
Ben Sinclair

You don't need neovim to do that - it's been part of Vim for a while now.

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!

Collapse
 
pmihaylov profile image
Preslav Mihaylov

neovim is a great tool, I agree.

However, tmux can be useful outside of vim as well.

If you want to do a non-vim related task in the terminal, I wouldn't want to have to open vim just to be able to multiplex my terminal.

Correct me if I'm wrong. :P

Collapse
 
dmfay profile image
Dian Fay

It depends, as always. If you're just writing code and need a shell or two to start builds or commit things, the inline terminal emulator is everything you need and more. If you're managing a bunch of servers -- obviously not.