Skip to content

Instantly share code, notes, and snippets.

@bingeboy
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bingeboy/9128478 to your computer and use it in GitHub Desktop.
Save bingeboy/9128478 to your computer and use it in GitHub Desktop.
tmux commands
# remap C-b to C-a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
#set index to 1
set -g base-index 1
set -g base-pane-index 1
#split window horizontal
bind v split-window -h
bind h split-window -v
#color borders of pane
set -g pane-border -fg green
set -g pane-border -bg black
set -g pane-active-border -fg white
set -g pane-active-border -bg yellow
#prefix session to menu
set -g status-left "Sesssion: #S"
set -g status-right "#H #[fg-white, bg=defualt]%a%l%M:%S %p#[defualt]
gem install tmuxinator
Sessions
start new session
$tmux new -s sessionName
List all sessions
$ tmux ls
Target a session
$tmux attach -t sessionName
Windows
$ tmux new -s name -n top
Create a new session in a window
Rename Session
$ <ctrnl+b> ,
Create a new window
$<cntrl+b> c
Next window of index value
$<Contrl+b> n
Previous window of index value
$<Contrl+b> p
Goto specidif inex
$<contrl+b> 0
Show menue
$<contrl+b> w
Search for name
$<contrl+b> m
Panes
vsplit pane
$<contrl+b> %
split pane
$<contrl+b> "
switch pane
$<contrl+b> o
split all panes
$<contrl+b> spacekey
close pane
$<contrl+b> x
Create a tmux configuration file:
$ touch ~/.tmux.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment