]> git.rmz.io Git - dotfiles.git/blobdiff - vim/vimrc
dwb: update github dark
[dotfiles.git] / vim / vimrc
index 576e984fe2b6035a6ebf2ada50e514ae2aeaad2a..b3947e64dfbaa0477d2c49d72ca9085fa07bd143 100644 (file)
--- 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
@@ -312,8 +313,8 @@ cnoremap <c-a> <home>
 cnoremap <c-e> <end>
 
 " proper movement when lines are wrapped
-noremap j gj
-noremap k gk
+noremap <expr> j (v:count == 0 ? 'gj' : 'j')
+noremap <expr> k (v:count == 0 ? 'gk' : 'k')
 
 " disable arrows
 noremap  <Up>    <NOP>
@@ -403,7 +404,7 @@ autocmd BufReadPost fugitive://* set bufhidden=delete
 nnoremap <silent> <leader>gs :Gstatus<CR>
 nnoremap <silent> <leader>gd :Gdiff<CR>
 nnoremap <silent> <leader>gc :tab Gcommit -v<CR>
-nnoremap <silent> <leader>gw :Gwrite<cr>
+nnoremap <silent> <leader>ga :Gwrite<cr>
 
 " NERDTree {{{2
 " open/close NERDTree with \e
@@ -442,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 <leader>jd :YcmCompleter GoTo<CR>
 
+" vim-easy-align
+" start interactive EasyAlign in visual mode
+vnoremap <Enter> <Plug>(EasyAlign)
+
 " vim-json {{{2
 let g:vim_json_syntax_conceal = 0