]> git.rmz.io Git - dotfiles.git/blobdiff - vim/vimrc
flexget: cleanup config
[dotfiles.git] / vim / vimrc
index 576e984fe2b6035a6ebf2ada50e514ae2aeaad2a..17e2a1e946cc9581ffb873cd2fd45390fae8a9f0 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -42,9 +42,11 @@ Plugin 'derekwyatt/vim-fswitch'
 " 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
@@ -230,12 +232,6 @@ augroup cursor_pos
                 \ 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>
@@ -312,8 +308,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>
@@ -392,9 +388,19 @@ let g:airline_detect_whitespace=2
 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
@@ -403,7 +409,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
@@ -437,16 +443,25 @@ let g:tagbar_iconchars = ['+', '-']
 
 " 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