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"
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!