Adds additional bindings

This commit is contained in:
William Carroll 2016-11-04 16:53:45 -04:00
parent 0661c25246
commit 6db646d789
3 changed files with 33 additions and 6 deletions

View file

@ -1,15 +1,18 @@
set -g default-terminal "screen-256color"
bind-key -r -T prefix k select-pane -U
bind-key -r -T prefix j select-pane -D
bind-key -r -T prefix h select-pane -L
bind-key -r -T prefix l select-pane -R
bind-key -r -T prefix C-k resize-p -U 2
bind-key -r -T prefix C-j resize-p -D 2
bind-key -r -T prefix C-h resize-p -L 2
bind-key -r -T prefix C-l resize-p -R 2
bind % split-window -c "#{pane_current_path}"
bind '"' split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"

View file

@ -39,3 +39,7 @@ bindkey -M viins 'jj' vi-cmd-mode
# brew install zsh-syntax-highlighting
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# Regain control of CLI <C- mappings for vim keybindings
# RE: http://superuser.com/questions/588846/cannot-get-vim-to-remap-ctrls-to-w
stty -ixon

View file

@ -93,6 +93,27 @@ let g:UltiSnipsExpandTrigger="<c-x>"
inoremap ;; <C-n>
" remap <C- keys in insert mode to have similar directional behavior to the
" behavior that they have in normal and visual modes
inoremap <C-w> <Esc>lwi
inoremap <C-W> <Esc>lWi
" TODO: debug why <C-b><C-b> repetition is needed
inoremap <C-b> <Esc>bi
inoremap <C-B> <Esc>Bi
" set -o emacs line-editor defaults
inoremap <C-a> <Esc>I
inoremap <C-e> <Esc>A
" keybinds to close a buffer
inoremap <C-q> <Esc>:q<CR>
nnoremap <C-q> :q<CR>
nnoremap <C-q> :q<CR>
" vs and sp keybinding
nnoremap vs <Esc>:vs<CR>
nnoremap vv <Esc>:vs<CR>
@ -217,10 +238,14 @@ set number
set tabstop=2
set expandtab
set shiftwidth=2
colorscheme elflord
colorscheme monokai
set t_Co=255
" Remove all characters until the end of the line
inoremap <C-c> <Esc>lC
" Ensure that <header> is "," character
let mapleader = ","
@ -273,11 +298,6 @@ nnoremap H ^
nnoremap L $
" set -o emacs line-editor defaults
inoremap <C-a> <Esc>I
inoremap <C-e> <Esc>A
" trim trailing whitespace on save
autocmd BufWritePre *.{js,py,tpl,html} :%s/\s\+$//e