3 ms·
On Windows, Ctrl+Backspace will delete the word left from the cursor, Ctrl+Delete the word to the right. It's pretty much unknown as far as I'm aware but it has
by mrich 5y ago
On Windows, Ctrl+Backspace will delete the word left from the cursor, Ctrl+Delete the word to the right. It's pretty much unknown as far as I'm aware but it has boosted my editing productivity immensely.
vi users will probably laugh at this.
- copperx 5y agoUnknown? You can't work inside Windows at all without those shortcuts. In Emacs it's alt+Backspace, so it's not too hard to organically find in other environments by trial and error. Whenever I switch editors, I quickly look for the following shortcuts: * How do you delete a word forwards and backwards? (there might be a better shortcut such as Ctrl+W) * How do you move to the word ahead and the word behind? * How do you kill a line? * How do you duplicate a line? * How do you move a line up and down? * How do you activate multiple cursors? * How do you comment/uncomment a line/block? * How do you expand/contract a selection? I think that covers about 80% of the common actions, and learning them will make you instantly productive in your new editor.
- Aeolun 5y agoI really only use one of those on a consistent basis.
- dumpsterdiver 5y agoOne of my favorites is option-arrow (left or right) to jump between words in the terminal.
- d0gsg0w00f 5y agoset -o vi
- dan-robertson 5y agoIf it’s readline-based like bash and you are still using default shortcuts then you can do M-b and M-f for backward/forward a word at a time (not sure what the Meta equivalent is on a Mac. On my keyboard it is the ‘Alt’ key.) Many Mac apps/text inputs support emacs-style shortcuts like these.
- Jtsummers 5y agoMeta on macOS is the Option key.
- NortySpock 5y agoThank you for posting this; I had ctrl-arrow-key left or right to jump words but this is magical.
- djokkataja 5y agoActually as a Vim user I have Ctrl+Backspace mapped for insert mode. But I learned Windows shortcuts before vim...
- funkymike 5y agoSome other very handy shortcuts in MS Office programs (and maybe others) is alt-shift-up/down arrow will move the entire line up or down. Quite handy to move text around when composing an email for instance. Ctrl-up/down will move the cursor past newlines, so you can more quickly navigate when there are long lines with lots of wrapped text.
- bwill94 5y agoI got a laugh out of helping a PhD ML researcher who was having problems with their keyboard. They showed me how they had lowered the repeat delay on their wireless mac keyboard, and now when they typed, it went nuts and stayed stuck on repeat randomly. The reason they lowered the delay was that it was taking too long to delete the long command they had (they wanted to hold down delete to clear everything out). I was able to show them that there was interference from their USB-C dock which likely caused the key up events to be dropped - and that they could also use the option key to delete entire words at a time.
- Jarwain 5y agoI've always used CTRL+SHIFT+left then backspace. Since I'm used to using ctrl to navigate and skip words, adding the shift modifier just kinda slotted right into my brain