diff options
author | William Carroll <wpcarro@gmail.com> | 2016-11-04T20·53-0400 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2016-11-04T20·53-0400 |
commit | 6db646d789a490b243b5edad1703c71925118f88 (patch) | |
tree | 7cbbfc3ec07418961cd2a9d6f72841451425a75d /usbify/vim | |
parent | 0661c25246dd28a903ac1d17461974c67e050a4c (diff) |
Adds additional bindings
Diffstat (limited to 'usbify/vim')
-rw-r--r-- | usbify/vim/.vimrc | 32 |
1 files changed, 26 insertions, 6 deletions
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 |