Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Can't get vim to stop outdenting Perl comments, any ideas?

by rubasov (Friar)
on Jan 14, 2010 at 22:56 UTC ( #817496=note: print w/ replies, xml ) Need Help??


in reply to Can't get vim to stop outdenting Perl comments, any ideas?

There are several ways to get vim autoindent your code (set autoindent, set smartindent, set cindent, etc). When I first tried to use autoindenting I also faced your problem with comment outdenting, and later on I found a method to get rid of this "feature". So try this (put this to your .vimrc and comment out any other type of autoindenting)

filetype indent on
Probably this also helps you to get your desired indent level:
autocmd FileType perl set softtabstop=3 autocmd FileType perl set shiftwidth=3 autocmd FileType perl set tabstop=3 autocmd FileType perl set expandtab


Comment on Re: Can't get vim to stop outdenting Perl comments, any ideas?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://817496]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2014-10-20 13:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (76 votes), past polls