Snippet/Macro
1:
<${1:p}>${2:${SelText}}</$1>$0
Trigger such a snippet and escape midway.
Undo.
** Unable to Redo the Undone step.
---------------
2:
editor.ExecutePlugin( "Snippets.dll", eePluginUserMessage, 1, "FolderName\\SnippetName" );
Is it possible to make it support "\" in folder/snippet names?
And even support folders/snippets with same name?
1. We will fix this on the next version.
2. The next version will allow you to use this second form (notice the 3rd parameter is 2):
editor.ExecutePlugin( "Snippets.dll", eePluginUserMessage, 2, "/FolderName/SnippetName" );
The separator character (in this case, '/') must be used as the first character of the string.
'/' can be any single character. For instance, the following is also OK.
editor.ExecutePlugin( "Snippets.dll", eePluginUserMessage, 2, "|FolderName|SnippetName" );
You can still use the old form (3rd parameter is 1) to keep backward compatibility.
Considerate improvement.
Thank you for the detailed reply.
Maybe "Notes" are needed in pages like this:
emeditor_en.chm::/macro/editor/editor_executeplugin.htm
But I have to rename the same-named snippets for macro cases? Though Snippets plug-in allows the use.
I just need to clarify your question. Do you want the 4th parameter (in this case "|FolderName|Snippets|") case-insensitive?
Not really.
For example,
Duplicate a snippet by Ctrl+C and Ctrl+V.
Then change the content of either one.
I'd rather keep their names identical for some reasons.
I know it's not a good habit, but since the plug-in allows same names...
I wonder if there's a way in a macro to handle the same-named ones (by order or something).
5 posts in this topic