X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/6bacdb9f616ad2a517286d40e6e7a2026b884d5e..ce5b43c2d7fc687e9877da8b9eb5851a1f1601ee:/vim/vimrc?ds=sidebyside diff --git a/vim/vimrc b/vim/vimrc index e976fb8..b3947e6 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -45,6 +45,7 @@ Plugin 'airblade/vim-gitgutter' Plugin 'Raimondi/delimitMate' Plugin 'SirVer/ultisnips' Plugin 'Lokaltog/vim-easymotion' +Plugin 'junegunn/vim-easy-align' " remove entries first set runtimepath -=$HOME/.vim @@ -158,6 +159,9 @@ set foldlevelstart=0 " value for 'foldlevel' when starting to edit a " save and restore folds set viewoptions=folds,cursor " don't save local options +" diff mode {{{2 +set diffopt=filler,vertical + " reading and writing files {{{2 set modeline " read modelines set modelines=2 " only check first/last 2 lines @@ -308,6 +312,10 @@ inoremap A cnoremap cnoremap +" proper movement when lines are wrapped +noremap j (v:count == 0 ? 'gj' : 'j') +noremap k (v:count == 0 ? 'gk' : 'k') + " disable arrows noremap noremap @@ -396,7 +404,7 @@ autocmd BufReadPost fugitive://* set bufhidden=delete nnoremap gs :Gstatus nnoremap gd :Gdiff nnoremap gc :tab Gcommit -v -nnoremap gw :Gwrite +nnoremap ga :Gwrite " NERDTree {{{2 " open/close NERDTree with \e @@ -435,11 +443,16 @@ let g:UltiSnipsSnippetsDir = "$XDG_CONFIG_HOME/vim/ultisnips" " youcompleteme {{{2 let g:ycm_extra_conf_globlist = ['~/src/*','/mnt/data/src/*'] let g:ycm_global_ycm_extra_conf = expand('$XDG_CONFIG_HOME/vim/ycm_extra_conf.py') +let g:ycm_extra_conf_vim_data = ['getcwd()'] let g:ycm_add_preview_to_completeopt = 1 let g:ycm_autoclose_preview_window_after_insertion = 1 "let g:ycm_extra_conf_vim_data = ['%:p'] nnoremap jd :YcmCompleter GoTo +" vim-easy-align +" start interactive EasyAlign in visual mode +vnoremap (EasyAlign) + " vim-json {{{2 let g:vim_json_syntax_conceal = 0