Skip to content

Instantly share code, notes, and snippets.

@kevindayton
Created January 27, 2017 14:46
Show Gist options
  • Select an option

  • Save kevindayton/8c10f59f2b93c67158ba2465d9694006 to your computer and use it in GitHub Desktop.

Select an option

Save kevindayton/8c10f59f2b93c67158ba2465d9694006 to your computer and use it in GitHub Desktop.

Revisions

  1. kevindayton created this gist Jan 27, 2017.
    26 changes: 26 additions & 0 deletions .tmux.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    run-shell "~/Library/Python/2.7/bin/powerline-daemon -q"
    source "~/Library/Python/2.7/lib/python/site-packages/powerline/bindings/tmux/powerline.conf"
    set -g default-terminal "screen-256color"
    set -g @plugin 'seebi/tmux-colors-solarized'
    set -g @colors-solarized 'dark'
    set-option -g mouse on

    # Copy-paste integration
    set-option -g default-command "reattach-to-user-namespace -l bash"

    # Use vim keybindings in copy mode
    setw -g mode-keys vi

    # Setup 'v' to begin selection as in Vim
    bind-key -t vi-copy v begin-selection
    bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"

    # Update default binding of `Enter` to also use copy-pipe
    unbind -t vi-copy Enter
    bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"

    # Bind ']' to use pbpaste
    bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"

    # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
    run '~/.tmux/plugins/tpm/tpm'