[wingide-users] Small nit with vi o
Michael at Hipp.com
Thu Aug 19 13:59:02 MDT 2010
On 8/19/2010 2:49 PM, Wingware Support wrote:
> Michael Hipp wrote:
>> When I type this and placed the cursor on that line:
>> if foo:
>> When I hit 'o' it opens the line as expected but the cursor lands
>> directly under the 'i' instead of indented. Does the same on a 'class'
>> or 'def' line. I don't think it used to do this.
> Yes, I believe the original bug report was that o and O didn't match
> what vi does because we were auto-indenting rather than copying the
> existing indent on the line you started on. You can get the
> auto-indentation (assuming default Tab Key Action preference) by
> pressing Tab after 'o'. It's possible this is an area where different vi
> users will disagree on what we should be doing.
If you're referring to the bug report I filed earlier this morning, I don't
think it has much to do with this issue. That one was indenting a line it
shouldn't touch and putting the cursor at wholly the wrong place.
In Python there is pretty much never a case where the line after a ':'
terminated line would begin in the same column. Vi, in typical default setup,
does what Wing is doing now (places the cursor on the newly opened line under
the first char of the previous line). But Vi is very configurable so it's hard
to argue that one way is correct or not.
However, in my Wing settings I have 'auto indent always' selected so I expected
it to do what is best for Python and indent the next line.
More information about the wingide-users