commit c5e3293871aaa83b2ea9ac2e6e4f418850566512
parent b25adcdd2bfc8b413db6ccdd061611fbd5d07d49
Author: edvb54 <edvb54@gmail.com>
Date: Fri, 13 Jun 2014 16:25:35 -0700
Add vim-tmux-navigator plug-in
Diffstat:
6 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/tmux.conf b/tmux.conf
@@ -10,10 +10,11 @@ set -g pane-active-border-bg default
#}}}
# mappings{{{1
# vi keys for moving around panes
-bind-key h select-pane -L
-bind-key j select-pane -D
-bind-key k select-pane -U
-bind-key l select-pane -R
+bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
+bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
+bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
+bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
+bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
# vi keys for resizing around panes
bind-key -r H resize-pane -L "5"
@@ -21,9 +22,13 @@ bind-key -r J resize-pane -D "5"
bind-key -r K resize-pane -U "5"
bind-key -r L resize-pane -R "5"
-# better split window keys
-bind-key "s" split-window -h
-bind-key "v" split-window -v
+# vi keys for changing windows
+bind-key h previous-window
+bind-key l next-window
+
+# vi split window keys
+bind-key "v" split-window -h
+bind-key "s" split-window -v
# use double ctrl+space to switch to last window
bind-key C-Space last-window
@@ -31,9 +36,6 @@ bind-key C-Space last-window
# prefix r to reload this file
bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf Reloaded"
-# use ctrl+space b to go to previous window
-bind-key b previous-window
-
# set vi mode keys
setw -g mode-keys vi
diff --git a/vim/bundle/vim-easymotion b/vim/bundle/vim-easymotion
@@ -1 +1 @@
-Subproject commit 2c4fa0dde254d64fe3380d4a3e2f3fee9bd9bc55
+Subproject commit 10a147d534e31a75e4829a48c69a4935dee041bf
diff --git a/vim/bundle/vim-snippets b/vim/bundle/vim-snippets
@@ -1 +1 @@
-Subproject commit c3db5beee984402483afcfa83c6c6cc7131f316d
+Subproject commit 45bcd32d596ef9db84919d7a1fcb20e4c920cf92
diff --git a/vim/bundle/vim-tmux-navigator b/vim/bundle/vim-tmux-navigator
@@ -0,0 +1 @@
+Subproject commit d12c394110a803786cab2c488d83af72a23a063d
diff --git a/vimrc b/vimrc
@@ -279,11 +279,6 @@ inoremap <C-D> <C-k>
inoremap <C-J> <C-N>
inoremap <C-K> <C-P>
-" window movements{{{2
-map <A-h> <C-w>h
-map <A-j> <C-w>j
-map <A-k> <C-w>k
-map <A-l> <C-w>l
" folding{{{1
set foldmethod=marker
set foldcolumn=2
diff --git a/vimrc.bundles b/vimrc.bundles
@@ -41,7 +41,7 @@ Bundle 'matchit.zip'
Bundle 'sheerun/vim-polyglot'
""" window plug-ins
-" allows you to have split widows that adjust
+" split widows that adjust
Bundle 'zhaocai/GoldenView.Vim'
" better file explorer
Bundle 'jeetsukumaran/vim-filebeagle'
@@ -51,6 +51,8 @@ Bundle 'Tagbar'
Bundle 'bling/vim-airline'
" improved Vim start screen
Bundle 'mhinz/vim-startify'
+" use same keys for moving around TMUX and Vim splits
+Bundle 'christoomey/vim-tmux-navigator'
""" auto complete plug-ins
" implement snippets