DEV Community

Discussion on: Why I *love* TMUX

Collapse
 
waylonwalker profile image
Waylon Walker

Tmux is so scriptable and customizable. Thats my favorite part of any terminal application really. My favorite shortcuts are my hotkeys for splitting, windowing, and navigating new windows. I closely mirrored the existing commands with alt instead of c-b.

alt+s - split
alt+v - vsplit
alt+c - create new window
alt+n - next window
alt+p - previous window

alt+[hjkl] - go to [left,lower,upper, or right] split

This makes it super quick to have vim open and gatsbt develop like you mentioned to jump between running servers, a shell, and vim.

Sadly copy and paste support on wsl is atrocious. Makes it hard to paste in something a team mate sent in chat.

Collapse
 
antjanus profile image
Antonin J. (they/them)

oooh, I like that alt thing! That didn't even occur to me, I got so used to the Ctrl+a mapping that many tutorials suggested when I started early on that I can't imagine doing things any different way.

Yeah copy/paste no matter where is a pain in the ass. I'm thinking of using the tmux-yank plugin that's supposed to handle copy/paste on all platforms including via SSH and WSL.

Collapse
 
waylonwalker profile image
Waylon Walker

Two keystrokes is ok for single commands, but multiple in a row is a pain. For instance checking on a server running in an adjacent window and getting back is a simple alt+n+n.

My first post on Dev walks through replicating my alt key setup from tmux to vscode dev.to/waylonwalker/keyboard-drive.... I honestly use vscode mostly for copy and paste. Every time I go to use tmux I end up pairing with a team mate an thier like what is this you cant even paste properly here. I have my hotkeys setup so similarly that I can switch between them comfortably.