Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete one character to the right in Webstorm

This key binding escapes me. It is the same as emacs Ctrl+D and I've tried Googling such things as "delete one character to the right," "forward delete," "delete next character", etc.

Here are the bindings in phpstorm which I assume is pretty similar to Webstorm.

Any idea what this action would be called?

Note this is what fn+delete does on mac. If there were a way to reverse engineer this keybinding and see what function is actually called in Webstorm, that would work. I asked how to reverse engineer bindings here.

like image 756
djechlin Avatar asked Jan 13 '14 15:01

djechlin


2 Answers

It is buried a bit but, under the WebStorm menu, Preferences..., Keymap (under IDE Settings). Scroll to the bottom of the window until you get to Other. Click the triangle to expand. Scroll down until you get to Delete, double click it and assign it Control D. WebStorm might warn you that the key stroke is already assigned and gives you the option to remove the other command. That's it. Made me happy to find it as well.

like image 92
Jeff Warner Avatar answered Nov 15 '22 22:11

Jeff Warner


On recent version of WebStorm (I have 2019.1), the way to do this is to add ^D (control-D) as a second keyboard shortcut to the existing Delete function (the one that is run by the delete key). Somehow with this combination, WebStorm knows to delete the character to the left with the 'delete' key, but delete the character to the right with the '^D' key. (I also removed the ^D keyboard mapping for my Run Debug function.)

like image 39
Michael57 Avatar answered Nov 15 '22 22:11

Michael57