You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I write my snippets myself most of the time, and even though SnippyEdit is handy opening snippet buffer for me, it could be even easier if it could template out new snippets for me.
Certainly I could put similar functionality together myself, but expand_snippet(snippet, word) does not take pre-fills, and I could not enable it to jump between stops.
Ideas or possible solutions
SnippyEdit could expand a snippet to create new snippets, and put the selected text in main content, i.e, $0.
The workflow should like:
:SnippyEdit entered
A choice of snippet files is presented, like what it is right now
Depending on the chosen snippet flavour, expand a built-in snippet and put the text selection as $0. For example
This would certainly be handy on many occasions. Implementation-wise, SnippyEdit could take an optional range to determine the text to used for creating the snippet.
For the built-in snippet, we could either hard-code it or store it in a snippets/ folder within the plugin tree. The latter approach would make it easier for user to override.
Problem Statement
I write my snippets myself most of the time, and even though
SnippyEdit
is handy opening snippet buffer for me, it could be even easier if it could template out new snippets for me.Certainly I could put similar functionality together myself, but
expand_snippet(snippet, word)
does not take pre-fills, and I could not enable it to jump between stops.Ideas or possible solutions
SnippyEdit
could expand a snippet to create new snippets, and put the selected text in main content, i.e,$0
.The workflow should like:
:SnippyEdit
entered$0
. For exampleAlternatives you have considered
Maybe it could have its own command, but having the function in
SnippyEdit
would be better.The text was updated successfully, but these errors were encountered: