Skip to content

Instantly share code, notes, and snippets.

@Lartza
Forked from anonymous/tmux.conf
Last active December 3, 2025 21:09
Show Gist options
  • Select an option

  • Save Lartza/6a7a62466a8a3e436234412d9b1c5066 to your computer and use it in GitHub Desktop.

Select an option

Save Lartza/6a7a62466a8a3e436234412d9b1c5066 to your computer and use it in GitHub Desktop.

Revisions

  1. Lartza revised this gist Jan 6, 2019. 1 changed file with 5 additions and 8 deletions.
    13 changes: 5 additions & 8 deletions tmux.conf
    Original file line number Diff line number Diff line change
    @@ -8,10 +8,7 @@ set -g base-index 1
    setw -g pane-base-index 1

    #Mouse works as expected
    setw -g mode-mouse on
    set -g mouse-select-pane on
    set -g mouse-resize-pane on
    set -g mouse-select-window on
    set -g mouse on

    setw -g monitor-activity on
    set -g visual-activity on
    @@ -23,10 +20,10 @@ set -g history-limit 10000
    bind Escape copy-mode
    unbind p
    bind p paste-buffer
    bind -t vi-copy 'v' begin-selection
    bind -t vi-copy 'y' copy-selection
    bind -t vi-copy 'Space' halfpage-down
    bind -t vi-copy 'Bspace' halfpage-up
    bind-key -T copy-mode-vi 'v' send -X begin-selection
    bind-key -T copy-mode-vi 'y' send -X copy-selection
    bind-key -T copy-mode-vi 'Space' send -X halfpage-down
    bind-key -T copy-mode-vi 'Bspace' send -X halfpage-up

    # extra commands for interacting with the ICCCM clipboard
    bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
  2. @invalid-email-address Anonymous created this gist Sep 9, 2014.
    55 changes: 55 additions & 0 deletions tmux.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,55 @@
    #Prefix is Ctrl-a
    set -g prefix C-a
    bind C-a send-prefix
    unbind C-b

    set -sg escape-time 1
    set -g base-index 1
    setw -g pane-base-index 1

    #Mouse works as expected
    setw -g mode-mouse on
    set -g mouse-select-pane on
    set -g mouse-resize-pane on
    set -g mouse-select-window on

    setw -g monitor-activity on
    set -g visual-activity on

    set -g mode-keys vi
    set -g history-limit 10000

    # y and p as in vim
    bind Escape copy-mode
    unbind p
    bind p paste-buffer
    bind -t vi-copy 'v' begin-selection
    bind -t vi-copy 'y' copy-selection
    bind -t vi-copy 'Space' halfpage-down
    bind -t vi-copy 'Bspace' halfpage-up

    # extra commands for interacting with the ICCCM clipboard
    bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
    bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"

    # easy-to-remember split pane commands
    bind | split-window -h
    bind - split-window -v
    unbind '"'
    unbind %

    # moving between panes with vim movement keys
    bind h select-pane -L
    bind j select-pane -D
    bind k select-pane -U
    bind l select-pane -R

    # moving between windows with vim movement keys
    bind -r C-h select-window -t :-
    bind -r C-l select-window -t :+

    # resize panes with vim movement keys
    bind -r H resize-pane -L 5
    bind -r J resize-pane -D 5
    bind -r K resize-pane -U 5
    bind -r L resize-pane -R 5