Skip to content

Instantly share code, notes, and snippets.

@mscoutermarsh
Last active September 21, 2016 19:32
Show Gist options
  • Save mscoutermarsh/c345382d76b2360e757f121215fe62ba to your computer and use it in GitHub Desktop.
Save mscoutermarsh/c345382d76b2360e757f121215fe62ba to your computer and use it in GitHub Desktop.
how i setup/navigate tmux panes

Hey!

I tried to make a video :): http://cloud.mikeasaur.us/2Y2I2x3h0O0v

As I write this, I'm realizing it's super confusing at first. So I hope this makes sense.

From a new terminal, I first start a new tmux session

tmux new -s mike

(after -s is the name of the session)

Then i create new splits with the following:

ctrl + a + _
ctrl + a + /

Tmux prefix key

ctrl + a is my tmux prefix. By default, it is typically ctrl + b. But I find that hard, so I changed it to a.

"prefix" basically means, when I hit these keys, whatever comes next is a command for tmux.

More info: http://zanshin.net/2014/12/27/changing-my-tmux-command-prefix-to-tic/

Creating splits

For splits, I then I have it mapped for prefix + either _ or . The reasoning for that is _ looks like a horizontal split. And \ looks like a vertical split.

More info about that here: https://robots.thoughtbot.com/a-tmux-crash-course Key bindings: https://github.com/christoomey/dotfiles/blob/master/tmux/tmux.conf#L115-L117

Navigation

I then navigate between splits using ctrl + hjkl.

More info: https://robots.thoughtbot.com/seamlessly-navigate-vim-and-tmux-splits

Hope that helps! After a little bit it becomes muscle memory. But super confusing at first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment