Emacs Evil Nerd Commenter: Comment/uncomment lines more efficiently
;; URL: https://youtu.be/vTdbb7tsvQc
;; To comment/uncomment a line in Emacs you select the line(s) and invoke `M-;' `comment-dwim'
;; Or you go to the start of the line and type\delete your comment symbols
;; `M-;' by itself executes `comment-dwim'
(require 'dired-x)
;; One could rebind `M-;' to `comment-lines' but this moves point to the next line.
;; There is a better way
;; https://github.com/redguardtoo/evil-nerd-commenter
;; evil-nerd-commenter (you don't need to use evil-mode to use this)
(evilnc-default-hotkeys) ()
(defun matlab-mode-hook-config ()
(local-set-key (kbd "M-;") 'evilnc-comment-or-uncomment-lines))
;; (add-hook 'matlab-mode-hook 'matlab-mode-hook-config)
;; ;; To comment out multiple lines, use C-u + number prefix
Return to Home