I have 2.
The first thing I know, I took part of it from someone else, but I donβt remember who. Sorry, unknown. Here, as I did "C ^ N" automatic full work with Perl. Here are my .vimrc commands.
" to use CTRL+N with modules for autocomplete " set iskeyword+=: set complete+=k~/.vim_extras/installed_modules.dat
Then I create cron to create the installed_modules.dat file. Mine is for my mandriva system. Set accordingly.
locate *.pm | grep "perl5" | sed -e "s/\/usr\/lib\/perl5\///" | sed -e "s/5.8.8\///" | sed -e "s/5.8.7\///" | sed -e "s/vendor_perl\///" | sed -e "s/site_perl\///" | sed -e "s/x86_64-linux\///" | sed -e "s/\//::/g" | sed -e "s/\.pm//" >/home/jeremy/.vim_extras/installed_modules.dat
The second allows me to use gf in Perl. Gf is a shortcut to other files. just place the cursor over the file and type gf and it will open that file.
" To use gf with perl " set path+=$PWD/**, set path +=/usr/lib/perl5/*, set path+=/CompanyCode/*, " directory containing work code " autocmd BufRead *.p? set include=^use autocmd BufRead *.pl set includeexpr=substitute(v:fname,'\\(.*\\)','\\1.pm','i')
JJ Feb 17 '10 at 21:35 2010-02-17 21:35
source share