Created
June 30, 2014 13:53
-
-
Save agumonkey/8171b2095ea43f9867d7 to your computer and use it in GitHub Desktop.
virtual pseudo code for a simple differential line duplicator, turning some parts of the previous line as placeholders in a temporary yasnippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun templicate () | |
"duplicate the current line as a temporary | |
snippet to be filled on the fly. | |
" | |
(interactive) | |
(let ((line (current-line)) | |
(placeholders (select-many "word:")) | |
(template (mk-yasnippet-from-string line placeholders))) | |
(progn | |
(open-line) | |
(yasnippet-expand template)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment