diff options
| author | Maciej Sobkowski <maciej.sobkowski@nokia.com> | 2015-07-02 14:01:46 +0200 |
|---|---|---|
| committer | Maciej Sobkowski <maciej.sobkowski@nokia.com> | 2015-07-02 14:01:46 +0200 |
| commit | 90ae7bc638bcbb398eff5c73c493bbbe518526cd (patch) | |
| tree | 39c46d0d06a12e70aedf3b083fd86c29c14b4cf0 /tmux | |
| parent | fcfa4d7a941c24fcefb52c73d94c5ddcbf7ec673 (diff) | |
Added Tmux config
Diffstat (limited to 'tmux')
| -rw-r--r-- | tmux/.tmux.conf | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf new file mode 100644 index 0000000..b06c890 --- /dev/null +++ b/tmux/.tmux.conf @@ -0,0 +1,50 @@ +# Tmux configuration for vim-like keybindings + +setw -g mode-keys vi + +unbind [ +bind Escape copy-mode +unbind p +bind p paste-buffer +bind-key -t vi-copy 'v' begin-selection +bind-key -t vi-copy 'y' copy-selection + + +# splitting windows: tmux definition of vertical/horizontal split is reversed +# to vim's +bind s split-window -v +bind v split-window -h + +# vim-like resizing +bind < resize-pane -L 10 +bind > resize-pane -R 10 +bind + resize-pane -U 10 +bind - resize-pane -D 10 + +# vim-like command prompt +bind : command-prompt + +# Smart pane switching with awareness of vim splits +is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"' +bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" +bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" +bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" +bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" +bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" + +setw -g clock-mode-colour colour117 +setw -g mode-attr bold +setw -g mode-fg colour117 +setw -g mode-bg colour238 +set -g status-bg colour235 +set -g status-fg colour248 +set -g status-attr dim +set -g status-left '#[fg=colour187,bold]#H' +set -g status-right '#[fg=colour174]#(mpc) #[fg=colour187,bold]%H:%M:%S' +set -g status-right-length 80 +setw -g window-status-current-fg colour223 +setw -g window-status-current-bg colour237 +setw -g window-status-current-attr bold +set -g message-attr bold +set -g message-fg colour117 +set -g message-bg colour235 |
