Add the following to your .emacs file:
;; insert a comment w/ name and date (defun insert-comment () (interactive) (comment-dwim "") (insert-string "!!! ") (insert-string (getenv "USER")) (insert (format-time-string " %Y%m%d: ")))
To use it, just type “M-x insert-comment“.
If it’s too much work for you, you can add a shortcut for it, again, in your .emacs, after the insert-comment definition, add the following:
(global-set-key "C-xv" 'insert-comment)
Now you can insert your comment with just “C-x v“


























Leave a Reply