Backspace at end of empty line doesn't delete whole line and go to end of above line
See original GitHub issue- VSCode Version: 1.19.2
- OS Version: W10LTSB
Steps to Reproduce:
- Create a new line of a block of multi-line code like an opening div tag or JavaScript or PHP function, then hit Enter.
- If you have an indent, continue to step 3. If not, create an indent with Tab or 4 spaces (whatever your religion is).
- Hit the Backspace key; notice it merely removes an indent each time instead of deleting the whole line and putting your cursor at the end of the previous line like awesome JetBrains software does. Realize how many unnecessary keystrokes you’ll now have to deal with (and Ctrl+Shift+Up-End each line is still a lot).
- Continue to use VS Code because nobody can afford to buy another JetBrains license for your new job.
This should be standard logic in all editors; there’s zero functional or stylistic reason to want to just delete indents on an empty line with Backspace (unless there’s too many indents there which is rare, or your editor auto-indented wrong), and even if for some Pan-like reason you need to use that regressive space, you can just use Ctrl+Home to delete the line then indent where you want (or Shift+arrow, or just arrow if you’re a weirdo).
Does this issue occur when all extensions are disabled?: Yes
Issue Analytics
- State:
- Created 6 years ago
- Reactions:35
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Backspace won't delete a line in Word 2016
Hello, Recently, Word has started to act strangely: When I press ENTER to end the current line, the cursor goes down (normally), ...
Read more >Vim - Delete blank line using backspace in insert mode
When my cursor is placed at the start of an empty line and I press the backspace key while in insert mode, I'd...
Read more >JetBrains Rider - Add, delete, and manipulate lines
One way to delete a line is to select the whole line and press Delete or Backspace, but a slightly more efficient way...
Read more >Backspace and delete problems | Vim Tips Wiki - Fandom
Backspace key won't move from current line. Backspace works in Insert mode (e.g. not inserting a ^?), but won't delete over line breaks, ......
Read more >How to Delete a Blank Page in Word - Lifewire
Press the delete/backspace key on the keyboard until you've deleted every blank line and the entire blank page is gone.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That is something that should be implemented natively in VS Code. But for now I found this extension really useful https://marketplace.visualstudio.com/items?itemName=jasonlhy.hungry-delete
Saves up hours a day 😃
I like this feature idea, but one other thing to think about is the interaction with the
editor.trimAutoWhitespace
setting. Ifeditor.trimAutoWhitespace
is false, then I might want to delete some whitespace after hitting Enter, while still keeping the new line. And in those situations, reaching for the Backspace key would feel like the most natural way to do it.So if this is implemented, I’d like to see a setting to turn it off for the rare cases when I might actually need to backspace over some auto-inserted whitespace (e.g., if I’ve turned
editor.trimAutoWhitespace
off for some reason).