[ILUG] vim's perl mode...
Darragh Bailey
felix at compsoc.nuigalway.ie
Wed Aug 18 16:28:24 IST 2004
Quoting kevin lyda <kevin+dated+1093271536.15a773 at ie.suberic.net>:
> so has anyone found a vim perl mode that does auto- indenting/deindenting
> like vim's c mode? for instance when i type this in vim's c mode:
>
> if (drink()) {<ret>tea();<ret>} else {<ret>coffee();<ret>}
>
> i get:
>
> if (drink()) {
> tea();
> } else {
> coffee();
> }
>
> however when i do that in perl i get:
>
> if (drink()) {
> tea();
> } else {
> coffee();
> }
cindent seems to work just fine with most perl syntax, not sure whether you use
the au commands to determine if the file just been opened is perl or not but I
use the following in my ~/.vimrc
au BufNewFile,BufRead *.pl setlocal cindent
seems to work just fine, although I do need to workout how to get it to use the
correct tabbing distance. (it still uses 8 when I have it set to 4)
--
Darragh
"Nothing's foolproof to a sufficently talented fool"
More information about the ILUG
mailing list