I use a Mac and if I press Alt+Backspace it deletes the entire word. This way it is simple for me to delete many words one after the other very quickly. May I use the same functionality on Windows 10? Mapping a shortcut to delete an entire word and not character-by-character?
4 Answers
Please use Ctrl + Backspace on Windows to delete an entire word.
-
4+1, because I didn't know this shortcut key. But it technically doesn't answer the question, but presents an alternative. You may want to add that to your question.– LPChipMar 13, 2018 at 22:51
-
31It does answer the question - "Mapping a shortcut to delete an entire word" seems to be the goal. The Alt+Backspace is just an example from another OS. Mar 14, 2018 at 0:35
-
6@user11230 You can use Karabiner to configure various shortcut keys on Mac. But after years of tweaking configs on various systems, I would not recommend doing that. Just learn the defaults. That will train your context switching and your muscle memory. Eventually you will be able to use fresh installations and colleague's machines with ease. Mar 14, 2018 at 7:22
-
16Indeed, Ctrl has this effect, just like Ctrl+Arrow key moves the caret a word to the left or right, and Ctrl+Delete removes the word to the right of the caret. Shift+Ctrl+Arrow key expands the selection with a whole word to the left or right. Please notice that standard Windows Edit controls don't support Ctrl+Backspace, however, unless autocomplete is enabled. For instance, you will notice that Ctrl+Backspace works in the Run dialog (Win+R) but not in RegEdit's "address bar". Mar 14, 2018 at 7:48
-
2This is also working for me on Linux (Cinnamon). Bizarrely enough, it doesn't work in Windows' Notepad. Mar 15, 2018 at 5:22
You can remap the hot key using AutoHotkey.
The following script will do it. Set it up to run on Windows start up or when you log in.
!BS::
Send ^{Backspace}
Note: On my PC, Alt-Backspace seems to be Undo, same as Ctrl-Z. AutoHotkey will replace the existing functionality while the script is running.
-
Thanks, i'll look into that even tho I would prefer a native solution Mar 14, 2018 at 12:08
-
Note that mapping this to the sequence Ctrl+Shift+Left, Del/Backspace should be a better variant, since Ctrl+Backspace is not supported in the default edit control, for example (cf. Notepad).– JoeyMar 14, 2018 at 17:16
If you wanted to emulate the Alt + Backspace which deletes the word to the left of the cursor, it is possible that you would also want to emulate the Command + Backspace functionality, which deletes the line to the left of the cursor.
Assuming that you use the native Ctrl + Backspace Windows functionality to delete the previous word, you can remap Alt + Backspace to delete the previous line. This is especially convenient as on most Windows keyboards the Alt key is approximately in the same position as the Command key on Mac computers.
The following AutoHotKey script would achieve the aforementioned functionality:
!Backspace::
Send {Shift down}{Home}{Shift up}{Backspace}
return
Ctrl+Backspace to delete the word on the left of insertion point
Ctrl+Delete to delete the word on the right of insertion point
daw
and then.
for the next word. You're usingvim
, right?Ctrl-W
in insert-mode. :)