let perl_fold = 1
" copy & comment current line with #
map <F6> yypkI#<ESC>j
" format inner para
map <F7> !ipperl -MText::Autoformat -eautoformat<CR>
au BufRead,BufNewFile *.pm,*.pl setlocal keywordprg=perldoc\ -f
" Only fold if bigger than window
function SetFoldLevel()
"echo "Win:" . winheight(0) . " lines:" . line("$")
if winheight(0) >= line("$")
set foldlevel=99
"echo "open"
else
set foldlevel=1
"echo "closed"
endif
endfunction
autocmd BufRead * call SetFoldLevel()
In reply to Re: Vim configs (slightly OT)
by bsb
in thread Vim configs (slightly OT)
by djw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |