diff --git a/.vimrc b/.vimrc index ffaf469..8d903e2 100644 --- a/.vimrc +++ b/.vimrc @@ -47,16 +47,33 @@ nmap yr :YcmCompleter RefactorRename =expand('') nnoremap ghw :h =expand("") -inoremap kj +" exit from insert mode without cursor movement +inoremap kj `^ nmap :MaximizerToggle let g:maximizer_set_default_mapping = 0 " Make Y consistent with C and D. See :help Y. nnoremap Y y$ +" by default, 'a jumps to line marked with ma +" while `a jumps to line AND column marked with ma +" swap ' and ` +nnoremap ' ` +nnoremap ` ' + +" q quits the current window +nnoremap q :q +inoremap q :q + +" indent with tab in visual mode +vmap > +vmap < " Disable quote concealing in JSON files let g:vim_json_conceal=0 +" scroll by visual lines, useful when wrapping is enabled +nnoremap j gj +nnoremap k gk let g:sneak#label = 1 let g:loaded_matchparen=1 @@ -235,6 +252,7 @@ if has('syntax') && has('eval') packadd! matchit endif + "automatically start nerdtree when vim is opened "autocmd vimenter * NERDTree "ignore some files and dirs in nerdtree