[wingide-users] Small nit with vi o
vandry at TZoNE.ORG
Sun Aug 22 09:24:23 MDT 2010
On Thu, Aug 19, 2010 at 03:49:05PM -0400, Wingware Support wrote:
> 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.
Uh-oh... did I break something by making a suggestion? OK, so this is
subtle and I guess needs more explanation because I didn't want to
suggest defeating/cancelling autoindent.
- If I want to add a new line between "if foo" and "line1":
It doesn't matter whether I do this by pressing "o" over "if foo" or
by pressing "O" over "line1". Either way it's clear that the new line
has to be indented the same as "line1".
- If I want to add a new line between "line1" and "line2":
This is not so clear. Am I adding a new line at the end of the "if foo"
block, or am I adding a new line to the top level?
It was my intuition that the IDE's best guess as to which one of these
I mean to do should be based on where my cursor was when I decided to
create the new line. If I was editing "line1" and decided to add a new
line by pressing "o", I probably meant to add a new statement to the
inside of the "if" block after "line1". If I was editing "line2" and
decided to add a new line by pressing "O", I probably meant to add an
extra statement at the top level before "line2".
More information about the wingide-users