how do you move to a new line in your text editor?

Michael Ekstrand lists at elehack.net
Thu Mar 2 16:18:11 EST 2006


On Thu, 02 Mar 2006 18:39:55 GMT
John Salerno <johnjsal at NOSPAMgmail.com> wrote:
> But I read in the PEP that spaces are recommended over tabs. If this is 
> the case, it would involve pressing backspace 4 times (or 8, etc.) to 
> get back to column 1.
> 
> So I'm wondering, how do you all handle moving around in your code in 
> cases like this? Is there some sort of consistency to these things that 
> you can write rules for your text editor to know when to outdent? It 
> doesn't seem like you can do this reliably, though.

I use Vim, use spaces, and have no problems. It has a shorttabstop
option, which causes backspace to backspace to the preceding multiple
of <tabwith> spaces when the curser is after a set of spaces at the
beginning of the line. It feels like I'm using tabs, but I'm not.

Also, there's some Python indenting/folding macros I picked up from Vim
Online (don't remember where exactly), that provide an indent/outdent
pair of key mappings, which also work perfectly with my usage of 4
spaces.

- Michael

-- 
mouse, n: a device for pointing at the xterm in which you want to type.
                -- Fortune



More information about the Python-list mailing list