Thursday, April 5, 2012

Re: indenting python docstring in vim

On Apr 5, 2012, at 1:09 PM, Zetah Ghamin wrote:

> I suppose it's solved for now. I realized that I indeed did not have filetype indent on on the Ubuntu machine. It was on in the Arch machine, which now also works.


I'm really glad to hear that.
It can be frustrating to get the help remotely from the mailing list, but the most important thing is that it worked for you in the end.


> It seems though that the default indentation style is to not do any auto indentation for triple-quoted string.


True. Because they are used for documentation they are basically interpreted as a reST (reStructuredText). You may want to indent parts of reST to get quoted blocks or similar effects. Thus, once you enter
a triple-quoted string, indenter lets you to keep your own document formatting.


> So, if I deliberately mess up the indentation, using 1GvG= would do nothing. But if I properly line up the string, 1GvG= no longer messes it up.


Exactly. Once you set it up right it stays the way you wanted it.

All the best,

Zvezdan

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: