Added Tmux configuration
This commit is contained in:
parent
41f96d40ed
commit
6c0de2cca5
2 changed files with 92 additions and 0 deletions
65
Tmux.md
Normal file
65
Tmux.md
Normal file
|
@ -0,0 +1,65 @@
|
|||
# tmux cheatsheet
|
||||
|
||||
start new:
|
||||
|
||||
tmux
|
||||
|
||||
start new with session name:
|
||||
|
||||
tmux new -s myname
|
||||
|
||||
attach:
|
||||
|
||||
tmux a # (or at, or attach)
|
||||
|
||||
attach to named:
|
||||
|
||||
tmux a -t myname
|
||||
|
||||
list sessions:
|
||||
|
||||
tmux ls
|
||||
|
||||
kill session:
|
||||
|
||||
tmux kill-session -t myname
|
||||
|
||||
In tmux, hit the prefix `ctrl+b` and then:
|
||||
|
||||
## Sessions
|
||||
|
||||
:new<CR> new session
|
||||
s list sessions
|
||||
$ name session
|
||||
|
||||
## Windows (tabs)
|
||||
|
||||
c new window
|
||||
, name window
|
||||
w list windows
|
||||
f find window
|
||||
& kill window
|
||||
. move window - prompted for a new number
|
||||
:movew<CR> move window to the next unused number
|
||||
|
||||
## Panes (splits)
|
||||
|
||||
\ horizontal split
|
||||
- vertical split
|
||||
|
||||
o swap panes
|
||||
q show pane numbers
|
||||
x kill pane
|
||||
⍽ space - toggle between layouts
|
||||
|
||||
## Misc
|
||||
|
||||
d detach
|
||||
t big clock
|
||||
? list shortcuts
|
||||
: prompt
|
||||
|
||||
Resources:
|
||||
|
||||
* [Based on henrik config](https://gist.github.com/henrik/1967800)
|
||||
* [cheat sheet](http://cheat.errtheblog.com/s/tmux/)
|
27
dotfiles/tmux.conf
Normal file
27
dotfiles/tmux.conf
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Start window and pane indices at 1.
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
|
||||
# Status bar styling and content.
|
||||
set -g status-bg black
|
||||
set -g status-fg white
|
||||
set -g status-left '#S '
|
||||
|
||||
# Highlight the active window in the status bar.
|
||||
set-window-option -g window-status-current-bg cyan
|
||||
set-window-option -g window-status-current-fg black
|
||||
|
||||
# Don't prompt to kill panes/windows.
|
||||
bind-key x kill-pane
|
||||
bind-key & kill-window
|
||||
|
||||
# More intuitive split-window mappings.
|
||||
bind "\\" split-window -h
|
||||
bind - split-window -v
|
||||
|
||||
# Maximize pane, e.g. for copying.
|
||||
bind-key z resize-pane -Z
|
||||
|
||||
# Reload tmux conf.
|
||||
unbind r
|
||||
bind r source-file ~/.tmux.conf\; display "Reloaded conf."
|
Loading…
Reference in a new issue