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>
cabbrev w!! SudoWrite
" uppercase previous word
-inoremap <C-C> <Esc>gUiwgi
+inoremap <C-C> <C-G>u<Esc>gUiwgi
" http://git.io/v3ZeU
nmap <silent> <leader>qq :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<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')
- if a:what == 'vimrc'
+ if a:what == 'vimrc' || a:what == 'init.lua'
let l:file = a:what
elseif empty(&filetype)
echoe 'filetype is empty!'
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>