diff options
author | Chris <[email protected]> | 2020-04-24 15:29:55 -0400 |
---|---|---|
committer | Chris <[email protected]> | 2020-04-24 15:29:55 -0400 |
commit | 81f3cf18db8d8fbc7a0c63ac7fe3915d7202eee2 (patch) | |
tree | d2b23c306d9d96c3c6d1a373ac13093eb69a7b17 /keys | |
parent | 1688fdbe9dca8ff9eaa674de44b5f336a623b742 (diff) |
auto push
Diffstat (limited to 'keys')
-rw-r--r-- | keys/mappings.vim | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/keys/mappings.vim b/keys/mappings.vim new file mode 100644 index 00000000..577df5cf --- /dev/null +++ b/keys/mappings.vim @@ -0,0 +1,41 @@ +" Better nav for omnicomplete +inoremap <expr> <c-j> ("\<C-n>") +inoremap <expr> <c-k> ("\<C-p>") + +" Use alt + hjkl to resize windows +nnoremap <M-j> :resize -2<CR> +nnoremap <M-k> :resize +2<CR> +nnoremap <M-h> :vertical resize -2<CR> +nnoremap <M-l> :vertical resize +2<CR> + +" I hate escape more than anything else +inoremap jk <Esc> +inoremap kj <Esc> + +" Easy CAPS +inoremap <c-u> <ESC>viwUi +nnoremap <c-u> viwU<Esc> + +" TAB in general mode will move to text buffer +nnoremap <TAB> :bnext<CR> +" SHIFT-TAB will go back +nnoremap <S-TAB> :bprevious<CR> + +" Alternate way to save +nnoremap <C-s> :w<CR> +" Alternate way to quit +nnoremap <C-Q> :wq!<CR> +" Use control-c instead of escape +nnoremap <C-c> <Esc> +" <TAB>: completion. +inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" + +" Better tabbing +vnoremap < <gv +vnoremap > >gv + +" Better window navigation +nnoremap <C-h> <C-w>h +nnoremap <C-j> <C-w>j +nnoremap <C-k> <C-w>k +nnoremap <C-l> <C-w>l |