vim newb - indenting python comments
robert.kern at gmail.com
Sat Jan 5 03:45:32 CET 2008
Tim Chase wrote:
>> One problem I have is that the >> indent in normal mode doesn't work
>> when a line starts with the # character. Any idea what I'm doing
> In short, ">>" *does* indent in normal mode (I presume you
> accurately mean "Normal" mode, rather than "Insert" mode). The
> question becomes why doesn't it work in your particular copy of Vim?
> To evidence this, start vim with
> vim -u NONE myfile.py
> (which bypasses startup files) and you'll see that >> does indeed
> shift commented lines.
> To track down the problem, you'll need to provide a little more
> info. Starting Vim the way you normally do, pointed at a
> problematic python file, what is the output of
> What mappings do you have defined:
> (particularly any mappings for ">" and its kin).
> What are your filetype settings:
> What are your settings for 'indentkeys', 'indentexpr',
> 'shiftwidth', 'tabstop', 'expandtab' and 'filetype'
> :set indentkeys? indentexpr? sw? ts? et? ft?
Having this set (in the absence of anything else) will replicate the behavior
for me (vim 7.1 OS X).
:filetype plugin on
:filetype indent on
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list