40

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?

  • 7
    FYI, you can use Ctrl+arrows to skip entire words, and with Shift added to the combo, you can select sentences much faster and with precision. Same should work on Mac. – user1306322 Mar 14 '18 at 7:52
  • 8
    Also, double-clicking and dragging without releasing the left mouse button from the second click will allow you to select entire words, including the one you clicked on. And triple-click selects whole paragraphs of text, dragging optional. – user1306322 Mar 14 '18 at 8:08
  • 19
    Just type daw and then . for the next word. You're using vim, right? – Eric Duminil Mar 14 '18 at 12:21
  • 7
    @user1306322 MIND == BLOWN. I've been a windows ("power")user for decades and was aware of double/triple clicking for words/paragraphs. Never realized it would work for dragging too. – RobIII Mar 15 '18 at 13:41
  • 1
    @EricDuminil The equivalent functionality in vim would be Ctrl-W in insert-mode. :) – JoL Mar 15 '18 at 18:20
117

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. – LPChip Mar 13 '18 at 22:51
  • 29
    It 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. – Sir Adelaide Mar 14 '18 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. – joeytwiddle Mar 14 '18 at 7:22
  • 16
    Indeed, 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". – Andreas Rejbrand Mar 14 '18 at 7:48
  • 2
    This is also working for me on Linux (Cinnamon). Bizarrely enough, it doesn't work in Windows' Notepad. – Marc.2377 Mar 15 '18 at 5:22
17

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 – user11230 Mar 14 '18 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). – Joey Mar 14 '18 at 17:16
1

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
0

Ctrl+Backspace to delete the word on the left of insertion point

Ctrl+Delete to delete the word on the right of insertion point

  • how does this provide any more information than the older answers? – phuclv Jul 10 '18 at 5:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.