Files
doom/snippets/latex-mode/hat

15 lines
334 B
Plaintext
Raw Normal View History

2025-11-16 15:47:31 +11:00
# -*- mode: snippet -*-
# name: hat
# key: hat
# type: command
# condition: (and (texmathp) 'auto)
# group: math
# --
(let ((argument t))
(condition-case nil
(progn
(backward-sexp)
(kill-sexp)
(delete-char 1))
(error (setq argument 'nil)))
(insert "\\hat{" (if argument (current-kill 0) "") "}"))