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

John Salerno johnjsal at NOSPAMgmail.com
Fri Mar 3 14:51:23 EST 2006


John Salerno wrote:
> This is a real small point, but I'd like to hear what others do in this 
> case. It's more an 'administrative' type question than Python code 
> question, but it still involves a bit of syntax.
> 
> One thing I like to do is use tabs for my indentation, because this 
> makes it easy to outdent when I need to start a new line in column 1. I 
> can press backspace once and move 4 spaces to the left.
> 
> 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 apologize for the OT nature of this question, but it's at least 
on-topic as far as this thread goes! :)

Anyway, one problem I have in UltraEdit when I'm writing HTML is that 
linewrapping is never handled quite right when using soft returns. Hard 
returns screw things up when you need to edit the text, so it's not a 
good option. But with soft returns, the lines wrap to column 1 of the 
next line, and they don't line up properly (indentation-wise) with the 
line being continued.

Do emacs or vim allow you to line up wrapped lines like this without 
actually inserting return or space or tab characters in the text?



More information about the Python-list mailing list