question about VI

bob davis bob at
Wed Dec 20 04:53:15 UTC 2006

Jaime Davila wrote:
> Sorry if this is slightly off-topic, but I've looked everywhere for an 
> answer, with no luck.
> I have set vi to auto indent. I'm having an issue with comments and 
> their indentation. Whenever vi sees that I type the # character, it 
> moves it to the leftmost column. I would like the comment to stay at 
> whatever level of indentation my code is at the time.
> Does anyone have a solution?

I have seen this before when writing perl scripts. But I cant seem to 
get the version I am using right now to do it.
:help comments

and possibly
:set comments=
should turn off this automatic behavior.

More information about the ubuntu-users mailing list