X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/bae693a361cbfebf39191d3cef325a058c2a6598..03e579243f0a60f763bbc40ab5cfa7cd964b719e:/vim/vimrc?ds=inline diff --git a/vim/vimrc b/vim/vimrc index 9d18255..81713c7 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -42,9 +42,9 @@ 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' @@ -232,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 and / to be @@ -336,7 +330,7 @@ cnoremap cnoremap " close all folds open fold in cursor -nnoremap zx zMzxzz15 +nnoremap zx zMzxzt " edit vimrc in new tab nmap ev :tabedit $MYVIMRC:lcd %:p:h @@ -400,6 +394,13 @@ let g:checkattach_filebrowser = 'ranger' " Gundo {{{2 nnoremap :GundoToggle +" fswitch {{{2 +nnoremap ff :FSHere +nnoremap fl :FSRight +nnoremap fh :FSLeft +nnoremap fL :FSSplitRight +nnoremap fH :FSSplitLeft + " fugitive {{{2 nmap dd :tab split \| Gdiff \| wincmd h " delete fugitive buffers when closed @@ -409,6 +410,7 @@ nnoremap gs :Gstatus nnoremap gd :Gdiff nnoremap gc :tab Gcommit -v nnoremap ga :Gwrite +nnoremap gb :Gblame " NERDTree {{{2 " open/close NERDTree with \e @@ -442,7 +444,11 @@ 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 = "" +let g:UltiSnipsJumpForwardTrigger = "" +let g:UltiSnipsJumpBackwardTrigger = "" " youcompleteme {{{2 let g:ycm_extra_conf_globlist = ['~/src/*','/mnt/data/src/*'] @@ -453,9 +459,9 @@ let g:ycm_autoclose_preview_window_after_insertion = 1 "let g:ycm_extra_conf_vim_data = ['%:p'] nnoremap jd :YcmCompleter GoTo -" vim-easy-align +" vim-easy-align {{{2 " start interactive EasyAlign in visual mode -vnoremap (EasyAlign) +vmap (EasyAlign) " vim-json {{{2 let g:vim_json_syntax_conceal = 0 @@ -506,19 +512,3 @@ nnoremap s :call ToggleSpell() nnoremap S :call SwitchSpell() " fix spelling with first choice nnoremap f 1z= - -" Toggle line numbers {{{2 -function! g:ToggleNumber() - if !exists("b:relanum") - let b:relanum=1 - endif - if &l:number - let b:relanum = &relativenumber - setlocal nonumber norelativenumber - else - let &l:relativenumber = b:relanum - setlocal number - endif -endfunction -nnoremap n :call g:ToggleNumber() -nnoremap N :setlocal relativenumber!