Add better navigation
This commit is contained in:
parent
d5bbd8efdb
commit
50df4379e1
2 changed files with 12 additions and 5 deletions
|
@ -128,6 +128,7 @@ install_vim_plugins () {
|
|||
"pangloss/vim-javascript"
|
||||
"JulesWang/css.vim"
|
||||
"genoma/vim-less"
|
||||
"christoomey/vim-tmux-navigator"
|
||||
)
|
||||
local BASE_DIR="$DOTFILES_ROOT/vim/vim.symlink/bundle"
|
||||
local GIT_HOST="git@github.com"
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
# remap prefix to Control + a
|
||||
set -g prefix C-a
|
||||
unbind C-b
|
||||
bind C-a send-prefix
|
||||
|
||||
# quick pane cycling
|
||||
unbind ^A
|
||||
bind ^A select-pane -t :.+
|
||||
# smart pane switching with awareness of vim splits
|
||||
#
|
||||
# See: https://robots.thoughtbot.com/seamlessly-navigate-vim-and-tmux-splits
|
||||
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
|
||||
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
|
||||
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
|
||||
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
|
||||
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
|
||||
|
||||
# easily toggle synchronization (mnemonic: e is for echo)
|
||||
bind e setw synchronize-panes on
|
||||
bind E setw synchronize-panes off
|
||||
|
|
Loading…
Add table
Reference in a new issue