" Plugin 'powerman/vim-plugin-viewdoc'
Plugin 'airblade/vim-gitgutter'
-Plugin 'Raimondi/delimitMate'
-Plugin 'SirVer/ultisnips'
-Plugin 'Lokaltog/vim-easymotion'
+Plugin 'raimondi/delimitmate'
+Plugin 'sirver/ultisnips'
+Plugin 'lokaltog/vim-easymotion'
+Plugin 'junegunn/vim-easy-align'
+Plugin 'chrisbra/checkattach'
" remove entries first
set runtimepath -=$HOME/.vim
\ endif
augroup END
-" auto source vimrc when saved {{{2
-augroup source_vimrc
- au!
- autocmd bufwritepost vimrc source $MYVIMRC
-augroup END
-
" bindings {{{1
" allow both <space> and / to be <leader>
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>
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
+" checkattach {{{2
+let g:checkattach_filebrowser = 'ranger'
+
" Gundo {{{2
nnoremap <F7> :GundoToggle<CR>
+" fswitch {{{2
+nnoremap <silent> <Leader>ff :FSHere<CR>
+nnoremap <silent> <Leader>fl :FSRight<CR>
+nnoremap <silent> <Leader>fh :FSLeft<CR>
+nnoremap <silent> <Leader>fL :FSSplitRight<CR>
+nnoremap <silent> <Leader>fH :FSSplitLeft<CR>
+
" fugitive {{{2
nmap <silent> <leader>dd :tab split \| Gdiff \| wincmd h<CR>
" delete fugitive buffers when closed
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
" UltiSnips {{{2
let g:UltiSnipsEditSplit = 'vertical'
-let g:UltiSnipsSnippetsDir = "$XDG_CONFIG_HOME/vim/ultisnips"
+let g:UltiSnipsSnippetsDir = expand("$XDG_CONFIG_HOME/vim/ultisnips")
+let g:UltiSnipsSnippetDirectories = ["UltiSnips", "ultisnips"]
+let g:UltiSnipsExpandTrigger = "<C-L>"
+let g:UltiSnipsJumpForwardTrigger = "<C-L>"
+let g:UltiSnipsJumpBackwardTrigger = "<C-H>"
" 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 {{{2
+" start interactive EasyAlign in visual mode
+vnoremap <CR> <Plug>(EasyAlign)
+
" vim-json {{{2
let g:vim_json_syntax_conceal = 0