Closed veksha closed 1 year ago
Agree! I don’t remember are old snip formats still supported or not. I will check it . And will update readme
I know that both formats
Dir snippets_ct Dir snippets_vs
are supported. Addons manager has many snippets in first format !
Addons manager has many snippets in first format !
can you show example of snippets in old format that can be installed from Addons manager? I read somewhere they were all converted to a new format.
readme is fixed. wiki is cleaned.
can you show example of snippets in old format that can be installed from Addons manager?
no, all old snippets-sets were converted to snippets_ct format.
snippets_ct format is the same as snippets_vs format, no?
hmm, I don't know. pls check it.
I checked some. I think the old format is not used. they are both in VS Code JSON format.
Yes, okay. what to fix in readme/wiki?
in wiki this is no longer needed:
Format of .cuda-snippet
First lines have format "key=value" (no spaces around "="), where "key" is one of strings:
"name": snippet full name, shown in dialog.
"id": snippet short alias for Tab-key (latin letters, digits, "_.$"), line is optional.
"lex": lexers list, comma-separated, for which snippet is active, line is optional, empty means snippet always active.
Then follows the line "text=" without value, and all next lines - are snippet contents.
Trailing blank lines are discarded.
Use tab-chars in text indents, they are auto replaced to spaces if current editor configured so.
Format of .cuda-snips
File contains one or several lines, one snippet per line. Empty lines, lines starting with "#" or space, are ignored. Format of lines:
id text
/N=name text
id /N=name text
id /L=lexers text
id /L=lexers /N=name text
id /L="lexers" /N="name" text
Here "id" is short alias for Tab-key, "name" (if not set, it's the same as "id") is full name for dialog, "lexers" is comma-separated lexer list, "text" is snippet contents. Contents can have escaped special chars: "\n", "\r", "\t" (tab-char), "\\" (backslash).
and maybe mention in readme/wiki that both folders has same format.
ok, changed line to
Plugin supports two snippets folder, but formats of data are the same, VSCode JSON format:
readme.txt changed too, will upload it next time.
we can add to readme:
also question: what formats of snippets are actually supported by Snippets plugin/engine?
i think the only format that is supported now is VSCode Snippets JSON format?
if so then we can remove "Now plugin also supports snippets from VS Code...." from readme. and replace with something like: "VS Code snippet format support is a big rework done by @OlehL" also we can remove info about macros from readme. this info is too detailed for file like this, i think.
and reword "Formats of snippets supported:" to "Snippet folders:" ?
also maybe this info in wiki is outdated:
what do you say, @Alexey-T ?