X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/06ffb1c18671a5ccafa189608b5bd3aba4899fac..0038a5d6682b9facccbf188b65e1679f5de3b0f9:/vim/vimrc diff --git a/vim/vimrc b/vim/vimrc index c1dc477..fcd2f58 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -213,9 +213,15 @@ Plug 'derekwyatt/vim-fswitch' Plug 'elzr/vim-json' Plug 'firef0x/pkgbuild.vim' Plug 'junegunn/vim-easy-align' -Plug 'klen/python-mode' Plug 'kshenoy/vim-signature' -Plug 'majutsushi/tagbar' +" Plug 'majutsushi/tagbar' " TODO: delete? {{{2 +" map :TagbarToggle +" let g:tagbar_sort = 0 +" let g:tagbar_compact = 1 +" let g:tagbar_autoshowtag = 1 +" let g:tagbar_width = 25 +" let g:tagbar_iconchars = ['+', '-'] +"}}} Plug 'octol/vim-cpp-enhanced-highlight' Plug 'sgeb/vim-diff-fold' Plug 'skywind3000/asyncrun.vim' " {{{2 @@ -223,10 +229,10 @@ command! -bang -nargs=* -complete=file Make AsyncRun -save=2 -program=make @ RestoreWinPosn -nmap coswp SaveWinPosn -"}}} +" Plug 'vim-scripts/ansiesc.vim' " TODO: delete? {{{2 +" nmap corwp RestoreWinPosn +" nmap coswp SaveWinPosn +" "}}} Plug 'neovimhaskell/haskell-vim' " {{{2 let g:haskell_enable_quantification = 1 " to enable highlighting of `forall` @@ -282,10 +288,10 @@ Plug 'mtth/scratch.vim' " {{{2 let g:scratch_autohide = 0 "}}} -Plug 'jenterkin/vim-autosource' " {{{2 - let g:autosource_hashdir = $XDG_CACHE_HOME . '/vim/vim-autosource' - let g:autosource_conf_names = ['.vimrc', '.vimrc.lua'] -"}}} +" Plug 'jenterkin/vim-autosource' " TODO: delete? {{{2 +" let g:autosource_hashdir = $XDG_CACHE_HOME . '/vim/vim-autosource' +" let g:autosource_conf_names = ['.vimrc', '.vimrc.lua'] +" "}}} call plug#end() @@ -738,7 +744,7 @@ vnoremap zf cabbrev w!! SudoWrite " uppercase previous word -inoremap gUiwgi +inoremap ugUiwgi " http://git.io/v3ZeU nmap qq :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" @@ -820,16 +826,6 @@ nmap cog IndentGuidesToggle nmap [og IndentGuidesEnable nmap ]og IndentGuidesDisable -" python-mode {{{2 - -let g:pymode_rope_completion = 0 -let g:pymode_rope = 0 -let g:pymode_run = 0 -let g:pymode_folding = 1 -let g:pymode_lint_ignore = "E221,E266,E501" -let g:pymode_lint_cwindow = 0 " don't open cwindow when linting -let g:pymode_syntax_space_errors = 0 " don't bother me when I'm typing - " signature {{{2 " disable '[ mappings @@ -867,13 +863,6 @@ if ! &diff let g:syntastic_check_on_open=1 endif -" tagbar {{{2 -map :TagbarToggle -let g:tagbar_sort = 0 -let g:tagbar_compact = 1 -let g:tagbar_autoshowtag = 1 -let g:tagbar_width = 25 -let g:tagbar_iconchars = ['+', '-'] " vim-easy-align {{{2 " start interactive EasyAlign in visual mode @@ -911,21 +900,21 @@ nnoremap gs :set operatorfunc=SortLinesOpFuncg@ vnoremap gs :sort " edit configs {{{2 +" TODO: populate location list with both .vim and .lua files +" TODO: create file if it doesn't exist in nvim or vim rtps function! EditConfig(what, ext = '.vim') - let l:dir = split(&runtimepath,',')[0] - if a:what == 'vimrc' - let l:file = expand($MYVIMRC) - elseif ! isdirectory(globpath(l:dir, a:what)) - echoe a:what." is not valid!" + if a:what == 'vimrc' || a:what == 'init.lua' + let l:file = a:what elseif empty(&filetype) echoe 'filetype is empty!' + return else - let l:file = l:dir.'/'.a:what.'/'.&filetype.a:ext + let l:file = a:what.'/'.&filetype.a:ext endif - execute ':vsplit '.file - execute ':lcd %:p:h' + execute ':Vvsplit! '.file endf +nmap en :call EditConfig('init.lua') nmap ev :call EditConfig('vimrc') nmap ef :call EditConfig('ftplugin') nmap es :call EditConfig('syntax')