On Sun, Feb 15, 2009 at 1:22 PM, kba wrote:
>
> hi
>
> when I shift a block of perl code to the right (in visual mode with '>'
> or with '>>' in normal mode), all the comments at the start of the line
> stay where they are. As soon as I insert a whitespace at the start of
> line, the comments are shifted with the code.
>
[snip example]
>
> How can I change this behaviour to "always shift comments like code"?

My wild guess is that you're setting 'smartindent' in your ~/.vimrc -
you'll probably be happier removing that line and using

filetype plugin indent on

instead - to use per-filetype plugins and indent scripts.  In my
experience, it's much better to turn the indent script off for any
language where it annoys you than to work without the indent scripts,
but as always, YMMV.  Suffice to say that keeping # always in the
first column is an expected behavior with smartindent.

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to