When typing/editing text, how do I delete the word at which the text cursor currently is?
I mean a "system-wide" solution that works in most programs (and is maybe offered by the OS), rather than hotkeys that are specific to certain text editors.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityCtrl+Backspace deletes the current word up until the text cursor.
Ctrl+Del deletes the end of the current word from the text cursor onward, as well as all spaces and tabs directly after the word.
Therefore, if you hold Ctrl and press (simultaneously or in any order) Del and Backspace, you'll delete the current word.
This works for example on Windows in Notepad and Google Chrome.
You have an answer for Windows, but for other readers, it's worth noting that the same solution applies to Mac, with some key substitutions.
⌥ Option + ⌫ Delete deletes the current word up until the text cursor.
⌥ + ⌦ Delete (or for the shorter keyboards ⌥+fn+Delete) deletes the end of the current word from the text cursor onward (this does not delete spaces, or other characters directly after the word).
You may find this simpler, and give you more control over what you are doing: first do a double-click. This will mark the whole word. Then press delete.
The other answers are fairly good, but they miss an important problem: in some applications (try renaming a file in windows explorer), Ctrl+Backspace actually inserts a weird box character instead.
There are a few workarounds:
You can use Ctrl+← to go back to the beginning of the word, and then use Ctrl+Delete.
You can also select the text using Ctrl+Shift+←/→ after placing your cursor at the start of the word using Ctrl+←, and then delete it using Backspace or Delete. This method also has the advantage of making it extremely clear what exactly you are deleting.
I believe both of these apply to mac as well, though you might not run into the issue there in the first place.
diw
(= delete inner word)