Skip to content

Instantly share code, notes, and snippets.

@ungood
Forked from henrik/tmux_cheatsheet.markdown
Created November 29, 2012 22:04

Revisions

  1. @henrik henrik revised this gist Jun 30, 2012. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -79,6 +79,4 @@ Notes:

    TODO:

    * Conf copy mode to use system clipboard. See PragProg book.
    * Keep pwd when splitting? See PragProg book.
    * [start on every shell login](https://wiki.archlinux.org/index.php/Tmux) Also see PragProg book.
    * Conf copy mode to use system clipboard. See PragProg book.
  2. @henrik henrik revised this gist Jun 30, 2012. 1 changed file with 11 additions and 9 deletions.
    20 changes: 11 additions & 9 deletions tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -36,11 +36,13 @@ In tmux, hit the prefix `ctrl+b` and then:

    ## Windows (tabs)

    c new window
    w list windows
    f find window
    , name window
    & kill window
    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)

    @@ -54,10 +56,11 @@ In tmux, hit the prefix `ctrl+b` and then:

    ## Window/pane surgery

    :joinp -s :2 move window 2 into a new pane in the current window
    :joinp -t :1 move the current pane into a new pane in window 1
    :joinp -s :2<CR> move window 2 into a new pane in the current window
    :joinp -t :1<CR> move the current pane into a new pane in window 1

    * http://unix.stackexchange.com/questions/14300/tmux-move-window-to-pane
    * [Move window to pane](http://unix.stackexchange.com/questions/14300/tmux-move-window-to-pane)
    * [How to reorder windows](http://superuser.com/questions/343572/tmux-how-do-i-reorder-my-windows)

    ## Misc

    @@ -68,7 +71,6 @@ In tmux, hit the prefix `ctrl+b` and then:

    Resources:

    * [How to reorder windows](http://superuser.com/questions/343572/tmux-how-do-i-reorder-my-windows)
    * [cheat sheet](http://cheat.errtheblog.com/s/tmux/)

    Notes:
  3. @henrik henrik revised this gist Jun 30, 2012. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -50,10 +50,15 @@ In tmux, hit the prefix `ctrl+b` and then:
    o swap panes
    q show pane numbers
    x kill pane
    + break pane into window (e.g. to select text by mouse to copy)
    - restore pane from window
    ⍽ space - toggle between layouts

    ## Window/pane surgery

    :joinp -s :2 move window 2 into a new pane in the current window
    :joinp -t :1 move the current pane into a new pane in window 1

    * http://unix.stackexchange.com/questions/14300/tmux-move-window-to-pane

    ## Misc

    d detach
  4. @henrik henrik revised this gist Mar 20, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -30,7 +30,7 @@ In tmux, hit the prefix `ctrl+b` and then:

    ## Sessions

    :new-session<CR> new session
    :new<CR> new session
    s list sessions
    $ name session

  5. @henrik henrik revised this gist Mar 17, 2012. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -74,5 +74,4 @@ TODO:

    * Conf copy mode to use system clipboard. See PragProg book.
    * Keep pwd when splitting? See PragProg book.
    * Fix Vim's bg color? [This](http://stackoverflow.com/questions/6427650/vim-in-tmux-background-color-changes-when-paging) fixes it but breaks e.g. arrow keys in `<leader>t`. [This fix](http://superuser.com/questions/237751/messed-up-keys-in-vim-when-running-inside-tmux) isn't enough.
    * [start on every shell login](https://wiki.archlinux.org/index.php/Tmux) Also see PragProg book.
  6. @henrik henrik revised this gist Mar 4, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -74,5 +74,5 @@ TODO:

    * Conf copy mode to use system clipboard. See PragProg book.
    * Keep pwd when splitting? See PragProg book.
    * Fix Vim's bg color? [This](http://stackoverflow.com/questions/6427650/vim-in-tmux-background-color-changes-when-paging) fixes it but breaks e.g. arrow keys in `<leader>t`.
    * Fix Vim's bg color? [This](http://stackoverflow.com/questions/6427650/vim-in-tmux-background-color-changes-when-paging) fixes it but breaks e.g. arrow keys in `<leader>t`. [This fix](http://superuser.com/questions/237751/messed-up-keys-in-vim-when-running-inside-tmux) isn't enough.
    * [start on every shell login](https://wiki.archlinux.org/index.php/Tmux) Also see PragProg book.
  7. @henrik henrik revised this gist Mar 4, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -74,5 +74,5 @@ TODO:

    * Conf copy mode to use system clipboard. See PragProg book.
    * Keep pwd when splitting? See PragProg book.
    * Fix Vim's bg color?
    * Fix Vim's bg color? [This](http://stackoverflow.com/questions/6427650/vim-in-tmux-background-color-changes-when-paging) fixes it but breaks e.g. arrow keys in `<leader>t`.
    * [start on every shell login](https://wiki.archlinux.org/index.php/Tmux) Also see PragProg book.
  8. @henrik henrik revised this gist Mar 4, 2012. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -75,5 +75,4 @@ TODO:
    * Conf copy mode to use system clipboard. See PragProg book.
    * Keep pwd when splitting? See PragProg book.
    * Fix Vim's bg color?
    * Get an insert cursor in iTerm
    * [start on every shell login](https://wiki.archlinux.org/index.php/Tmux) Also see PragProg book.
  9. @henrik henrik revised this gist Mar 4, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -76,4 +76,4 @@ TODO:
    * Keep pwd when splitting? See PragProg book.
    * Fix Vim's bg color?
    * Get an insert cursor in iTerm
    * [start on every shell login](https://wiki.archlinux.org/index.php/Tmux)
    * [start on every shell login](https://wiki.archlinux.org/index.php/Tmux) Also see PragProg book.
  10. @henrik henrik revised this gist Mar 4, 2012. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -72,7 +72,8 @@ Notes:

    TODO:

    * Keep pwd when splitting
    * Conf copy mode to use system clipboard. See PragProg book.
    * Keep pwd when splitting? See PragProg book.
    * Fix Vim's bg color?
    * Get an insert cursor in iTerm
    * [start on every shell login](https://wiki.archlinux.org/index.php/Tmux)
  11. @henrik henrik revised this gist Mar 4, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -38,6 +38,7 @@ In tmux, hit the prefix `ctrl+b` and then:

    c new window
    w list windows
    f find window
    , name window
    & kill window

  12. @henrik henrik revised this gist Mar 4, 2012. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,14 @@ 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
  13. @henrik henrik revised this gist Mar 3, 2012. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,10 @@ attach:

    tmux a # (or at, or attach)

    attach to named:

    tmux a -t myname

    In tmux, hit the prefix `ctrl+b` and then:

    ## Sessions
  14. @henrik henrik revised this gist Mar 3, 2012. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,11 @@ As configured in [my dotfiles](https://github.com/henrik/dotfiles/blob/master/tm

    start new:

    tmux
    tmux

    start new with session name:

    tmux new -s myname

    attach:

  15. @henrik henrik revised this gist Mar 3, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -35,6 +35,7 @@ In tmux, hit the prefix `ctrl+b` and then:
    x kill pane
    + break pane into window (e.g. to select text by mouse to copy)
    - restore pane from window
    ⍽ space - toggle between layouts

    ## Misc

  16. @henrik henrik revised this gist Mar 3, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -38,6 +38,7 @@ In tmux, hit the prefix `ctrl+b` and then:

    ## Misc

    d detach
    t big clock
    ? list shortcuts
    : prompt
  17. @henrik henrik revised this gist Mar 3, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions tmux_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -33,7 +33,7 @@ In tmux, hit the prefix `ctrl+b` and then:
    o swap panes
    q show pane numbers
    x kill pane
    + break pane into window (where you can select text by mouse to copy)
    + break pane into window (e.g. to select text by mouse to copy)
    - restore pane from window

    ## Misc
    @@ -49,7 +49,7 @@ Resources:

    Notes:

    * You can cmd+click URLs to open in iTerm, if you only have one pane (see `+` above)
    * You can cmd+click URLs to open in iTerm.

    TODO:

  18. @henrik henrik renamed this gist Mar 3, 2012. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  19. @henrik henrik created this gist Mar 3, 2012.
    59 changes: 59 additions & 0 deletions tmux_cheatsheet.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,59 @@
    # tmux cheatsheet

    As configured in [my dotfiles](https://github.com/henrik/dotfiles/blob/master/tmux.conf).

    start new:

    tmux

    attach:

    tmux a # (or at, or attach)

    In tmux, hit the prefix `ctrl+b` and then:

    ## Sessions

    :new-session<CR> new session
    s list sessions
    $ name session

    ## Windows (tabs)

    c new window
    w list windows
    , name window
    & kill window

    ## Panes (splits)

    % horizontal split
    " vertical split

    o swap panes
    q show pane numbers
    x kill pane
    + break pane into window (where you can select text by mouse to copy)
    - restore pane from window

    ## Misc

    t big clock
    ? list shortcuts
    : prompt

    Resources:

    * [How to reorder windows](http://superuser.com/questions/343572/tmux-how-do-i-reorder-my-windows)
    * [cheat sheet](http://cheat.errtheblog.com/s/tmux/)

    Notes:

    * You can cmd+click URLs to open in iTerm, if you only have one pane (see `+` above)

    TODO:

    * Keep pwd when splitting
    * Fix Vim's bg color?
    * Get an insert cursor in iTerm
    * [start on every shell login](https://wiki.archlinux.org/index.php/Tmux)