Browse Source

Added vim key remappings.

master
Daniel Sissom 5 years ago
parent
commit
607d7a4c37
Signed by untrusted user who does not match committer: djsissom GPG Key ID: 2C30FFB796852389
1 changed files with 10 additions and 1 deletions
  1. + 10
    - 1
      vim/vimrc

+ 10
- 1
vim/vimrc

@ -72,6 +72,7 @@ set scrolloff=5 " Add visible lines beyond cursor at top or bottom of wi
" Turn off search highlighting with Enter " Turn off search highlighting with Enter
nnoremap <silent> <CR> :nohlsearch<CR><CR> nnoremap <silent> <CR> :nohlsearch<CR><CR>
" Center page on search
noremap n nzz noremap n nzz
noremap N Nzz noremap N Nzz
noremap * *zz noremap * *zz
@ -79,6 +80,12 @@ noremap # #zz
noremap g* g*zz noremap g* g*zz
noremap g# g#zz noremap g# g#zz
" Better scrolling keys
noremap <C-n> <C-e>
noremap <C-p> <C-y>
inoremap <C-n> <C-o><C-e>
inoremap <C-p> <C-o><C-y>
" Allow saving files with sudo after starting vim " Allow saving files with sudo after starting vim
cmap w!! w !sudo tee > /dev/null % cmap w!! w !sudo tee > /dev/null %
@ -140,7 +147,9 @@ Plug 'dense-analysis/ale'
call plug#end() call plug#end()
map <C-n> :NERDTreeToggle<CR>
" press / instead of _
nnoremap <C-_> :NERDTreeToggle<CR>
nnoremap <F2> :ALEToggle<CR>
let g:ycm_autoclose_preview_window_after_insertion = 1 let g:ycm_autoclose_preview_window_after_insertion = 1

Loading…
Cancel
Save