Closed MrDevel0per closed 1 year ago
One important thing to take note of, is it deletes all text on the line leading up to the cursors position and retains all text after it. As shown in the above video, if the cursor is placed at the end of the line, it will get rid of the entire lines contents but keep the line itself resulting in an empty line.
@austincondiff I think this can be closed as it already works in STTextView:
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
In Xcode, one of the default keyboard shortcuts is ⌘⌫, which deletes to the start of the line. This is used across several text editors and should be implimented in CodeEdit. This allows the user to delete an entire line of code to the start instead of having to either select the line or keep holding the backspace key.
Describe alternatives you've considered
I think this is the simplest solution and has the standard shortcut, although the shortcut could be changed to accommodate CodeEdit's other features. I think that the only other options would be either continuing to hold the delete key or some sort of "delete" icon next to the line in the
CodeEditTextView
.Additional context
Here is a video in Xcode of what I am suggesting:
https://user-images.githubusercontent.com/104732280/212492621-d3f9e23f-9cec-4868-a984-9fcf12461da4.mov
In this video, I use the ⌘⌫ shortcut to delete the entire line, which makes editing code much easier.