Another useful emacs package: crux

Contains various helper functions including crux-duplicate-and-comment-current-line-or-region for when you want to rework a line of code but keep the original. I’ve added these shortcuts:

;; crux
(global-set-key (kbd "C-c I") #'crux-find-user-init-file)
(global-set-key (kbd "C-c r") #'crux-rename-file-and-buffer)
(global-set-key (kbd "C-c d") #'crux-duplicate-current-line-or-region)
(global-set-key (kbd "C-c M-d") #'crux-duplicate-and-comment-current-line-or-region)
(global-set-key (kbd "C-c n") #'crux-cleanup-buffer-or-region)

Leave a Reply

Your email address will not be published. Required fields are marked *