I'm the author of a vim script distributed with recent vims that helps to reindent perl code while typing. I find it very useful. But it doesn't function as well when syntax highlighting isn't enabled, because it looks up the current syntax group for hints on how to reindent (e.g. it doesn't perform any reindentation in the middle of a here-doc or of a POD paragraph.)
So what to do if you want smart perl indentation without perl coloring ?
Answer : revert all color groups to "Normal", as the following little vim script does
so $VIMRUNTIME/syntax/perl.vim
redir @x
silent highlight
redir END
new
put x
v/^\(perl\|pod\)/d
%s/ xxx.*/ Normal/
%s/^/hi link/
%y x
silent @x
q!
noh
(This can be pasted into one's
Not using colors in vim 0 Comments More | Login | Reply /