Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Keyboard shortcut to delete character under/after cursor in vscode?

suppose I have Hello World on a line in vscode, and the cursor is at the beginning of the line.

Is there a keyboard shortcut to delete the characters under (or after, not sure) the cursor?

For example, if foo is the shortcut, then for the above case, pressing foo 3 times will result in lo World, since we deleted the character under cursor 3 times.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

note: this is handy if you want to delete a part of a word without first selecting it and pressing backspace, in this way you can place the cursor at the start and press the shortcut until all the unwanted characters are gone.

>Solution :

[I looked to see if this was a duplicate, but didn’t find anything in a reasonable amount of time, so…]

You can use the Delete to delete the character after the cursor if using the line style cursor or "at" the cursor if using the block or underline styles.

Cursor styles can be controlled by the setting:

Editor: Cursor Style

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading