Skip to content

Commit efab5e3

Browse files
committed
Fix shortcut aliases & mention in README
1 parent eae9327 commit efab5e3

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,18 @@ always in front of the word that triggered this snippet.
109109
to_string()
110110
```
111111

112+
### `doom-snippets-enable-short-helpers`
113+
114+
If this variable is non-nil, this package will define the following shortcut
115+
function aliases for your convenience:
116+
117+
+ `!%!` = `(doom-snippet-format "%!%s%!")`
118+
+ `!%` = `(doom-snippet-format "%!%s")`
119+
+ `%$` = `(doom-snippet-format "%>")`
120+
+ `(%expand ...)` = `(doom-snippet-expand ...)`
121+
+ `(%format ...)` = `(doom-snippet-format ...)`
122+
+ `(%without-trigger ...)` = `(doom-snippets-without-trigger ...)`
123+
112124

113125
[yasnippet]: https://github.com/capitaomorte/yasnippet
114126
[Doom Emacs]: https://github.com/hlissner/doom-emacs

doom-snippets-lib.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
(when doom-snippets-enable-short-helpers
1010
(defalias '!%! 'doom-snippets-newline-selected-newline)
1111
(defalias '!% 'doom-snippets-newline-selected)
12-
(defalias '%1 'doom-snippets-newline-selected)
13-
(defalias '%$ 'doom-snippets-newline-selected))
12+
(defalias '%$ 'doom-snippets-newline-or-eol)
13+
(defalias '%without-trigger 'doom-snippets-without-trigger)
14+
(defalias '%format 'doom-snippets-format)
15+
(defalias '%expand 'doom-snippets-expand))
1416

1517

1618
(defmacro doom-snippets-without-trigger (&rest body)

0 commit comments

Comments
 (0)