Comment

Comment by antics9

> kill-region-dwim fixes a decades-old papercut. Set it to 'emacs-word and hitting C-w with no active region kills a word backwards instead of signalling an error.

Thank you! No more:

(defun cutregion-or-killword (beginning end) "Kills region if marked else backward kills word." (interactive "r") (if (use-region-p) (kill-region beginning end) (backward-kill-word 1)))

(global-set-key (kbd "C-w") 'cutregion-or-killword)

parent antics9 4 months ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton