foobar2000 - Mp3tag Title_formatting Lexer

All questions regarding lexer highlighting schemes are discussed here...
Stem75
Posts: 55
Joined: 09.01.2024 15:29

Re: foobar2000 - Mp3tag Title_formatting Lexer

Post by Stem75 »

Hmmm! I found something. This is working.

Code: Select all

{
    "Tag a": {
        "body": [
            "$add(a,b,...)"
        ],
        "prefix": [
            "a"
        ]
    }
}
Stem75
Posts: 55
Joined: 09.01.2024 15:29

Re: foobar2000 - Mp3tag Title_formatting Lexer

Post 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
___Screenshot 0754.png (4.79 KiB) Viewed 3316 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
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: foobar2000 - Mp3tag Title_formatting Lexer

Post 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.
Stem75
Posts: 55
Joined: 09.01.2024 15:29

Re: foobar2000 - Mp3tag Title_formatting Lexer

Post by Stem75 »

For me it is working fine. But for compatibility reasons i will try to change it.

Everything else is ok?
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: foobar2000 - Mp3tag Title_formatting Lexer

Post 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.
Stem75
Posts: 55
Joined: 09.01.2024 15:29

Re: foobar2000 - Mp3tag Title_formatting Lexer

Post 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%
Stem75
Posts: 55
Joined: 09.01.2024 15:29

Re: foobar2000 - Mp3tag Title_formatting Lexer

Post 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.
Last edited by Stem75 on 07.09.2024 17:18, edited 1 time in total.
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: foobar2000 - Mp3tag Title_formatting Lexer

Post 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% ).
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: foobar2000 - Mp3tag Title_formatting Lexer

Post by main Alexey »

published snippets! Pls, update snippets file from actual file which I repacked:
https://sourceforge.net/projects/cudate ... ippets_ct/
Post Reply