set nocp ignorecase smartcase syntax enable function! PerlDoc() normal yy let l:this = @ if match(l:this, '^ *\(use\|require\) ') >= 0 exe ':new' exe ':resize' let l:this = substitute(l:this, '^ *\(use\|require\) *', "", "") let l:this = substitute(l:this, ";.*", "", "") let l:this = substitute(l:this, " .*", "", "") exe ':0r!perldoc -t ' . l:this exe ':0' return endif normal yiw exe ':new' exe ':resize' exe ':0r!perldoc -t -f ' . @ exe ':0' endfunction "Display docs for built-in functions when cursor is on function name "or for modules when cursor is on 'use' or 'require' line. map ,h :call PerlDoc():set nomod:set filetype=man:echo "perldoc" "Run program using everything past __END__ as stdin "Output of program replaces everything past __END__ "Makes it easy to undo and start over let @p="L?^#!\r/^__END__\ry''''p!Gperl\rG" "Simplify moving between split windows map j_ map k_ "Make goto file open in a split window map gf _ "Open next file in a split window map ,n :new:n_ "Default font is too small set guifont=-adobe-courier-medium-r-normal--14-140-75-75-m-90-hp-roman8 filetype plugin on "This is the only option I like for now set formatoptions=l "Edit vimrc file map ,v :sp ~/.vimrc_ "Reload vimrc file map ,V :source ~/.vimrc:filetype detect:exe ":echo 'vimrc reloaded'"