feat(emacs.d): Add function to insert TODO comments
This commit is contained in:
parent
cc68e28514
commit
940a9c580c
2 changed files with 15 additions and 0 deletions
|
@ -37,4 +37,7 @@
|
|||
;; Open a file in project:
|
||||
(global-set-key (kbd "C-c f") 'project-find-file)
|
||||
|
||||
;; Insert TODO comments
|
||||
(global-set-key (kbd "C-c t") 'insert-todo-comment)
|
||||
|
||||
(provide 'bindings)
|
||||
|
|
|
@ -230,4 +230,16 @@ Including indent-buffer, which should not be called automatically on save."
|
|||
(goto-char start)
|
||||
(insert memed))))
|
||||
|
||||
(defun insert-todo-comment (prefix todo)
|
||||
"Insert a comment at point with something for me to do."
|
||||
|
||||
(interactive "P\nsWhat needs doing? ")
|
||||
(save-excursion
|
||||
(move-end-of-line nil)
|
||||
(insert (format " %s TODO(%s): %s"
|
||||
comment-start
|
||||
(if prefix (read-string "Who needs to do this? ")
|
||||
(getenv "USER"))
|
||||
todo))))
|
||||
|
||||
(provide 'functions)
|
||||
|
|
Loading…
Reference in a new issue