Plug 'elzr/vim-json'
Plug 'firef0x/pkgbuild.vim'
Plug 'junegunn/vim-easy-align'
-Plug 'klen/python-mode'
Plug 'kshenoy/vim-signature'
" Plug 'majutsushi/tagbar' " TODO: delete? {{{2
" map <F5> :TagbarToggle<cr>
nmap <silent> [og <Plug>IndentGuidesEnable
nmap <silent> ]og <Plug>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
vnoremap <silent> gs :sort<cr>
" 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 <leader>en :call EditConfig('init.lua')<CR>
nmap <leader>ev :call EditConfig('vimrc')<CR>
nmap <leader>ef :call EditConfig('ftplugin')<CR>
nmap <leader>es :call EditConfig('syntax')<CR>