Page 4 of 5
Re: foobar2000 - Mp3tag Title_formatting Lexer
Posted: 05.09.2024 11:03
by Stem75
Hmmm! I found something. This is working.
Code: Select all
{
"Tag a": {
"body": [
"$add(a,b,...)"
],
"prefix": [
"a"
]
}
}
Re: foobar2000 - Mp3tag Title_formatting Lexer
Posted: 05.09.2024 12:12
by main Alexey
Re: foobar2000 - Mp3tag Title_formatting Lexer
Posted: 05.09.2024 17:36
by Stem75
Before i start editing, is it ok with this two or should i change something?
Code: Select all
{
"Adds A and B test 1": {
"body": ["$add($1,,)$2"],
"prefix": "a",
"description": "Adds A and B test 1"
},
"Adds A and B test 2": {
"body": ["$add($1,,,)$2"],
"prefix": ["a"],
"description": "Adds A and B test 2"
},
"Adds A and B test 3": {
"body": ["$add($1,,,,)$2"],
"prefix": ["b"],
"description": "Adds A and B test 3"
}
}
![___Screenshot 0754.png](./download/file.php?id=1563&sid=5fa58f5bee8886c9c74596d2f81316d6)
- ___Screenshot 0754.png (4.79 KiB) Viewed 5169 times
Also i found this link with a good explanation. If you don't want it here tell me to delete it.
https://code.pieces.app/blog/vs-code-snippets-guide
Re: foobar2000 - Mp3tag Title_formatting Lexer
Posted: 05.09.2024 17:49
by main Alexey
you added 2-3 snips. test them in real life. insert one of em: are tabstops working by tab-key?
if not, maybe you need write tabstops like in Cud wiki: ${1} instead of $1.
Snippets-plugin emulates not 100% of VSCode.
Re: foobar2000 - Mp3tag Title_formatting Lexer
Posted: 05.09.2024 17:56
by Stem75
For me it is working fine. But for compatibility reasons i will try to change it.
Everything else is ok?
Re: foobar2000 - Mp3tag Title_formatting Lexer
Posted: 06.09.2024 04:50
by main Alexey
better use tabstop 0 at the end (after brackets). it's always activated last by tab.
i did not test, seems ok.
Re: foobar2000 - Mp3tag Title_formatting Lexer
Posted: 07.09.2024 13:44
by Stem75
I am trying to make the autocomplete file .acp with some values as test.
I am entering the $if(,,) successfully but when i try to add %artist% with autocomplete (manually i can write it)
here $If(here,,) as $if(%artist%,,) it removes the 2 commas and it inserts as $if(%artist%).
Also if i enter %artist% It doesn't pop up the next value without a space between them.
Like: %artist%%tit... NO pop up, %artist% %tit... YES pop up.
Probably is not working this way, or can i workaround it somehow;
The .acp file contains this lines (more but let's say those):
#chars ,_-$%
fun $if%28,,%29 |Test hint here
var %artist%
var %title%
Re: foobar2000 - Mp3tag Title_formatting Lexer
Posted: 07.09.2024 14:25
by Stem75
I updated the first post with the VS Code snippets.
And an update to the Lexer ( added two new words in the Query highlight ).
Also i updated the List.txt snippets with many new words.
For me it seems to work OK but have a look at it.
Re: foobar2000 - Mp3tag Title_formatting Lexer
Posted: 07.09.2024 15:34
by main Alexey
Issue with .acp file.
you should list in #chars line AS LITTLE of chars as possible, ie don't list comma (editor will think comma is wordchar and replace comma after %artist% ).
Re: foobar2000 - Mp3tag Title_formatting Lexer
Posted: 07.09.2024 15:54
by main Alexey
published snippets! Pls, update snippets file from actual file which I repacked:
https://sourceforge.net/projects/cudate ... ippets_ct/