Plugin 'Raimondi/delimitMate'
Plugin 'SirVer/ultisnips'
Plugin 'Lokaltog/vim-easymotion'
+Plugin 'junegunn/vim-easy-align'
" remove entries first
set runtimepath -=$HOME/.vim
" 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
cnoremap <c-a> <home>
cnoremap <c-e> <end>
+" proper movement when lines are wrapped
+noremap <expr> j (v:count == 0 ? 'gj' : 'j')
+noremap <expr> k (v:count == 0 ? 'gk' : 'k')
+
" disable arrows
noremap <Up> <NOP>
noremap <Down> <NOP>
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
" 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