You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be a bit of vim muscle memory, but I noticed that if I hit o, I'd get the cursor indented on the new line at the same level as the current line. If, instead, I do shift-O, I don't get the indent of the previous line. Instead, I seem to get the indent of the current line.
Might be my workflow here, but I'm often on a blank line and want to add something to the previous line when I hit shift-O. Might be nice to make it the mirror of hitting o from the previous line.
The text was updated successfully, but these errors were encountered:
Previously, we'd only consult the current line when determining
indentation for a new line. If the current line is blank, we don't
indent the new line at all; this is the wrong choice if the current
line is in an indented block.
We now search backwards from the current line, looking for a non-blank
line, and base the new line's indentation off of the that.
Fixes#103.
Thanks for the context, @jonathandturner. I've updated the heuristic used in those commands to search backwards for the nearest non-blank line's indent and use that, rather than simply taking the current line's.
This also fixes the scenario in which you'd hit o to insert a newline below a blank line in an indented block and get no indent, either.
This might be a bit of vim muscle memory, but I noticed that if I hit
o
, I'd get the cursor indented on the new line at the same level as the current line. If, instead, I doshift-O
, I don't get the indent of the previous line. Instead, I seem to get the indent of the current line.Might be my workflow here, but I'm often on a blank line and want to add something to the previous line when I hit shift-O. Might be nice to make it the mirror of hitting
o
from the previous line.The text was updated successfully, but these errors were encountered: