Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://817496]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (14)
As of 2018-03-20 14:18 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (253 votes). Check out past polls.