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.
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.
CodePudding user response:
[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