From: Samir Benmendil Date: Sun, 21 May 2023 09:42:09 +0000 (+0100) Subject: nvim: open init.lua file with en X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/7db0967343a8df158a089c21e552526fcde314dd nvim: open init.lua file with en --- diff --git a/vim/vimrc b/vim/vimrc index a7e23ac..a600c8e 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -911,8 +911,10 @@ 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') - if a:what == 'vimrc' + if a:what == 'vimrc' || a:what == 'init.lua' let l:file = a:what elseif empty(&filetype) echoe 'filetype is empty!' @@ -923,6 +925,7 @@ function! EditConfig(what, ext = '.vim') 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')