Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move cursor up after deleting a line in VSCode

In IntelliJ IDEA there is a setting I quite enjoy: When you delete an empty line, its cursor automatically move to the upper line, like this:

enter image description here

How can I assign this setting in VSCode ?

like image 586
STEPHEN bui Avatar asked Oct 04 '18 04:10

STEPHEN bui


People also ask

How do you move cursor in VS code?

To add cursors at arbitrary positions, select a position with your mouse and use Alt+Click (Option+Click on macOS). You can add additional cursors to all occurrences of the current selection with Ctrl+Shift+L. Note: You can also change the modifier to Ctrl/Cmd for applying multiple cursors with the editor.

How do you move the cursor to the end of the line in VSCode?

CTRL + J/L : Move cursor to start/end of line.

How do you delete a single line in VS code?

In order to quickly delete a line in VSCode, you can simply press Ctrl+Shift+K keyboard combination while the cursor is being placed in the desired line. The hotkey can be changed by modifying editor.


1 Answers

You want to install the Hungry Delete extension.

It changes the behavior of the backspace. When you hit backspace in a line that has none other than white space, it erases the whole line and moves the cursor up, which is the same behavior of JetBrains' editors, demonstrated in the question.

like image 60
Derik Avatar answered Sep 20 '22 13:09

Derik