Skip to content

Instantly share code, notes, and snippets.

@mcbenjemaa
Forked from rodricels/.tmux.conf
Created December 2, 2019 16:22
Show Gist options
  • Save mcbenjemaa/63e14191a25a35c3a15b840d41431b32 to your computer and use it in GitHub Desktop.
Save mcbenjemaa/63e14191a25a35c3a15b840d41431b32 to your computer and use it in GitHub Desktop.

Revisions

  1. @rodricels rodricels revised this gist Sep 14, 2017. No changes.
  2. @rodricels rodricels revised this gist Sep 14, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions .tmux.conf
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # My tmux configuration, partly based on https://github.com/wbkang/wbk-stow/blob/master/tmux-config/.tmux.conf

    # Scroll History
    set -g history-limit 50000

  3. @rodricels rodricels revised this gist Sep 14, 2017. 1 changed file with 13 additions and 4 deletions.
    17 changes: 13 additions & 4 deletions .tmux.conf
    Original file line number Diff line number Diff line change
    @@ -1,21 +1,30 @@
    # My tmux configuration, partly based on https://github.com/wbkang/wbk-stow/blob/master/tmux-config/.tmux.conf

    # Scroll History
    set -g history-limit 50000

    # show messages for 4 seconds instead
    set -g display-time 4000

    # set first window to index 1 (not 0) to map more to the keyboard layout
    set-option -g renumber-windows on
    set -g base-index 1
    setw -g pane-base-index 1

    # Make mouse useful, tmux > 2.1 include select, resize pane/window
    # Make mouse useful, tmux > 2.1 include select, resize pane/window and console wheel scroll
    set -g mouse on

    # Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
    set -s escape-time 50


    ## Clipboard integration
    # ctrl+c to send to clipboard
    bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
    # ctrl+v to paste from clipboard
    bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"

    # Selection with mouse should copy to clipboard right away, in addition to the default action.
    unbind -n -Tcopy-mode-vi MouseDragEnd1Pane
    bind -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null"
    bind -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null"


    # Middle click to paste from the clipboard
  4. @rodricels rodricels created this gist Sep 14, 2017.
    29 changes: 29 additions & 0 deletions .tmux.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    # My tmux configuration, partly based on https://github.com/wbkang/wbk-stow/blob/master/tmux-config/.tmux.conf

    # Scroll History
    set -g history-limit 50000

    # set first window to index 1 (not 0) to map more to the keyboard layout
    set -g base-index 1
    setw -g pane-base-index 1

    # Make mouse useful, tmux > 2.1 include select, resize pane/window
    set -g mouse on

    # Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
    set -s escape-time 50

    # Selection with mouse should copy to clipboard right away, in addition to the default action.
    unbind -n -Tcopy-mode-vi MouseDragEnd1Pane
    bind -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null"


    # Middle click to paste from the clipboard
    unbind-key MouseDown2Pane
    bind-key -n MouseDown2Pane run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"

    # Drag to re-order windows
    bind-key -n MouseDrag1Status swap-window -t=

    # Double click on the window list to open a new window
    bind-key -n DoubleClick1Status new-window