Closed phoenixanimations closed 6 years ago
Looks like it could be useful! A problem though is that no other snippets right now use org-mode
properties; all text below the headline is considered part of the snippet. I think this is useful if people want snippets for org-mode
which inserts a specific set of properties, for instance.
An alternative solution might be to have a char as a separator for defining multiple keywords. Since we already have yankpad-expand-separator
(which is :
by default), perhaps that could be used. Then you could do something like:
* some-mode
** example1:example2: this is main snippet
Hi how are you?
What do you think?
I've added my alternative solution to the problem. You can now have several keywords by separating them with :
. I hope that's ok!
Wow that was fast!
I only suggested properties because of categories, your solution is nicer as it's easier to type as well.
The required change was very small, and also I'm procrastinating from grading assignments :)
Actually properties might be used in the future for features which simply aren't possible just by adding all information in the snippet title or as tags. Probably then you'd need to add a :props:
tag in order to use the properties.
I sometimes like to use a bunch of keywords for the same snippet as I don't know which keyword will stick in my head.
For example in csharp I have
l
,L
,list
,List
all do:List<$1> $0 = new List<$1>()
. I wouldn't mind the solution being something like:Which would result in
example1
, andexample2
expanding toHi how are you?
.