about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2016-11-04T20·53-0400
committerWilliam Carroll <wpcarro@gmail.com>2016-11-04T20·53-0400
commit6db646d789a490b243b5edad1703c71925118f88 (patch)
tree7cbbfc3ec07418961cd2a9d6f72841451425a75d
parent0661c25246dd28a903ac1d17461974c67e050a4c (diff)
Adds additional bindings
-rw-r--r--configs/.tmux.conf3
-rw-r--r--configs/.zsh_profile4
-rw-r--r--usbify/vim/.vimrc32
3 files changed, 33 insertions, 6 deletions
diff --git a/configs/.tmux.conf b/configs/.tmux.conf
index 45ef0596ed81..4e4099fefeb7 100644
--- a/configs/.tmux.conf
+++ b/configs/.tmux.conf
@@ -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}"
diff --git a/configs/.zsh_profile b/configs/.zsh_profile
index 26da66d00ccb..89eb0b738c7e 100644
--- a/configs/.zsh_profile
+++ b/configs/.zsh_profile
@@ -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
+
diff --git a/usbify/vim/.vimrc b/usbify/vim/.vimrc
index b98dc273ca17..42563ec96343 100644
--- a/usbify/vim/.vimrc
+++ b/usbify/vim/.vimrc
@@ -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