Browse Source

Major tmux changes, also added project notes to the gitignore

master
Taylor Bockman 9 years ago
parent
commit
670fcbe59c
  1. 3
      dotfiles/global_gitignore
  2. 31
      dotfiles/tmux.conf

3
dotfiles/global_gitignore

@ -35,3 +35,6 @@ tramp
/smex-items
/.smex-items
/smex-save-file
# Notes file I tend to leave in projects
project-notes.org

31
dotfiles/tmux.conf

@ -7,13 +7,13 @@
# Rebind tmux prefix to <c-space> to match vim
unbind-key C-b
set -g prefix Escape
bind Escape send-prefix
# remap prefix to Ctrl+A
set -g prefix C-a
unbind C-b
bind-key C-a send-prefix
set -s escape-time 0
###################################
# #
# Colors #
@ -49,22 +49,19 @@ set-window-option -g window-status-bell-style fg=black,bg=red #base02, red
bind Space copy-mode
bind C-Space copy-mode
# Rebind window splitting
# <prefix>j and <prefix>l split vertically and horizontally, respectively
bind j split-window -v
bind C-j split-window -v
bind l split-window -h
bind C-l split-window -h
# Rebinds to be like neotree
unbind %
bind | split-window -h
bind - split-window -v
# Smart pane switching with awareness of vim splits
# This is the tmux side of the vim-tmux-navigator plugin
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"
# is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'"
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Vim keybinds so copy mode behaves more like vim
bind-key -t vi-copy 'v' begin-selection

Loading…
Cancel
Save