Skip to content

Instantly share code, notes, and snippets.

@ramirez7
Created October 26, 2022 19:28
Show Gist options
  • Select an option

  • Save ramirez7/830092132cc652e41371681c8f0c6864 to your computer and use it in GitHub Desktop.

Select an option

Save ramirez7/830092132cc652e41371681c8f0c6864 to your computer and use it in GitHub Desktop.
(setq paste-dry-v "")
(setq paste-dry-txt "")
(defun paste-dry-setup (v txt)
"Setup a paste-dry"
(interactive
(list
(read-string
(format "Variable [%s]: " paste-dry-v)
nil nil
paste-dry-v-def)
(read-string "Template [%s]: " paste-dry-txt)))
(setq paste-dry-v v)
(setq paste-dry-txt txt))
(defun paste-dry (val)
(interactive
(list
(read-string (format "%s = ? " paste-dry-v))))
(insert (string-replace (concat ":" paste-dry-v) val paste-dry-txt)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment