Macos – How to delete faster? Word boundary backspace

keyboardmacosproductivity

I like to type fast. I'm a chronic delete-keyer. I will type first, re-think the output later and hit delete. It seems I'm addicted to always doing something fast.

Anyways, I have to tap the delete button very often. Is there a way to do a backspace to word boundary that's native?

In a chat box, I can use alt+shift+left to get a word, cmd shift left to get the whole line, etc. but I can't do that in a python shell for example.

Any ideas?

Best Answer

⌥⌫ (option-delete) deletes a word backward and ⌥⌦ (option-forward delete) a word forward in most text views.

M-delete deletes a word backward and M-d a word forward by default in readline. You can duplicate the OS X shortcuts by using option as a meta key and assinging ⌥⌦ to \033d.

You can also define new shortcuts by creating ~/Library/KeyBindings/ and saving a property list like this as DefaultKeyBinding.dict.

{
    "~z" = (selectParagraph:, delete:);
    "~u" = (moveToBeginningOfParagraphAndModifySelection:, cut:);
    "~k" = (moveToEndOfParagraphAndModifySelection:, cut:);
    "@\UF728" = deleteToEndOfLine:;
}
Related Question