Hacker News new | ask | show | jobs
by nandkeypull 3123 days ago
Best thing I ever did for tmux was to get rid of the annoying command prefix altogether and just use bindings with Ctrl/Shift and the arrow keys - it's much faster, e.g.

    # Window switching
    bind -n S-up    new-window
    bind -n S-down  confirm-before -p "kill-window #W? (y/n)" kill-window
    bind -n S-left  prev
    bind -n S-right next

    # Pane switching
    bind -n C-left  select-pane -L
    bind -n C-right select-pane -R
    bind -n C-down  select-pane -D
    bind -n C-up    select-pane -U

    # Special pane operations
    bind -n C-M-up    respawn-pane -k
    bind -n C-M-down  kill-pane
    bind -n C-M-left  swap-pane -U
    bind -n C-M-right swap-pane -D
  
    # Window splitting
    bind -n C-M-\ split-window -h
    bind -n C-M-] split-window -v
3 comments

Have you ever heard about byobu? It's basically a tmux wrapper with crtl/shift hotkeys by default.
C-M-left,right is used in some wm to cycle desktops, otherwise good idea.
Thanks ! I was looking for gnome shell style navigation