On 18.09.15 10:33, Samir Benmendil wrote: > On Sep 18, 2015 at 19:09, Erik Christiansen wrote: > >Now there's no need to hunt around amongst all sorts of files, > >wondering where stuff is configured - it's configured in the config > >file! > There's a function for that: > > | " edit configs {{{2 > | function! EditConfig(what) > | 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!" > | elseif empty(&filetype) > | echoe 'filetype is empty!' > | else > | let l:file = l:dir.'/'.a:what.'/'.&filetype.'.vim' > | endif > | | execute ':vsplit '.file > | execute ':lcd %:p:h' > | endf > | nmap <leader>ev :call EditConfig('vimrc')<CR> > | nmap <leader>ef :call EditConfig('ftplugin')<CR> > | nmap <leader>es :call EditConfig('syntax')<CR> > | nmap <leader>ei :call EditConfig('indent')<CR> > | nmap <leader>eu :UltiSnipsEdit<CR>:lcd %:p:h<CR> > > This is way simpler than searching for it in the huge monolithic vimrc.
Samir, your irony gave me a very good belly laugh! With folding, the attractively monolithic .vimrc is visually small. Structure makes everything readily accessible - without any need for complex functions to get to a swarm of files. Still, you are most welcome to do it your way. Erik (Who found that folding fostered much improved structure in a 430 page/ 26k line file of *nix notes.) -- The ultimate barrier is one's viewpoint. - Terry Pratchett, "The Dark Side of the Sun"