Emacsで日付を挿入する。

変更履歴などに便利かと。


init.el




;; 日付挿入
(defun insert-current-time()
  (interactive)
  (insert (format-time-string "%Y-%m-%d(%a) %H:%M:%S" (current-time))))

(define-key global-map "\C-cd" `insert-current-time)



Ctrl+c d