"Delete to line start" breaks formatting
Answered
Currently, as the name implies, this deletes everything on the line and moves the caret to the start of the line and, consequently, breaks formatting. Instead, I think it should move the caret to where the first character of the deleted line started. This is how it currently works in editor:
abc
def // "Delete to line start" moves the caret right below "a", while I think it would make more sense to move it right below "c".
Or is there a shortcut I have missed that can do this? Right now, I go with "Delete line" and then "Start new line before current", but I'd really like to have a single shortcut to do this since I do this very often.
Please sign in to leave a comment.
"Delete to line start" action deletes the whole line to the very first cursor position. If "Delete line" (Ctrl+Y) action help does not help for the case, please fill free to file a request at https://youtrack.jetbrains.com/issues/IDEA for this.
>Right now, I go with "Delete line" and then "Start new line before current",
Also 'Move Caret to Line End' ('Home' shortcut) action will move the cursor to the indented position on the line.
Ok, so judging by your answer, I assume there is no single command to delete all characters on the line except leading whitespace (if present) so that formatting is retained. Do I go to the page that you linked to make a feature request (since this is not about a bug)?
>Do I go to the page that you linked to make a feature request (since this is not about a bug)?
Yes. Thanks.