From 41407376f051cd2898fb2a7efaa8778d9365722d Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 25 Mar 2014 00:43:04 -0400 Subject: Remove a few functions the are covered by snippets --- lisp/init-editing.el | 26 -------------------------- snippets/text-mode/cdate | 4 ++++ snippets/text-mode/date | 4 ++++ 3 files changed, 8 insertions(+), 26 deletions(-) create mode 100644 snippets/text-mode/cdate create mode 100644 snippets/text-mode/date diff --git a/lisp/init-editing.el b/lisp/init-editing.el index fbf959e..15d157d 100644 --- a/lisp/init-editing.el +++ b/lisp/init-editing.el @@ -75,17 +75,6 @@ (define-prefix-command 'insert-map) (global-set-key (kbd "C-c i") 'insert-map) -(defun km/shebang (&optional lang) - (interactive "s\language (default python):") - (if (= (length lang) 0) - (setq lang "python")) - (insert "#!/usr/bin/env " lang "\n")) -(define-key insert-map "s" 'km/shebang) - -(defun km/insert-date () - (interactive) - (insert (format-time-string "%Y-%m-%d"))) - (defun km/toggle-line-or-region-comment () "Comment/uncomment the current line or region" (interactive) @@ -98,21 +87,6 @@ (key-chord-define-global ",c" 'km/toggle-line-or-region-comment) -(defun km/todo-comment () - "Add commented TODO" - (interactive) - (let (beg end) - (if (region-active-p) - (setq beg (region-beginning) end (region-end)) - (setq beg (line-beginning-position) end (line-end-position))) - (unless (comment-only-p beg end) - (beginning-of-line) - (insert "TODO ") - (comment-region beg (+ end 5)) - (forward-line)))) - -(define-key insert-map "d" 'km/insert-date) -(define-key insert-map "t" 'km/todo-comment) (define-key insert-map "i" 'indent-relative) ;; Put multiple cursors map under insert prefix. diff --git a/snippets/text-mode/cdate b/snippets/text-mode/cdate new file mode 100644 index 0000000..ad32367 --- /dev/null +++ b/snippets/text-mode/cdate @@ -0,0 +1,4 @@ +# -*- mode: snippet -*- +# key: cdate +# -- +`(yas-with-comment (concat " " (format-time-string "%Y-%m-%d")))` diff --git a/snippets/text-mode/date b/snippets/text-mode/date new file mode 100644 index 0000000..8bc5ce1 --- /dev/null +++ b/snippets/text-mode/date @@ -0,0 +1,4 @@ +# -*- mode: snippet -*- +# key: date +# -- +`(format-time-string "%Y-%m-%d")`$0 -- cgit v1.2.3