Page 1 of 5

foobar2000 - Mp3tag Title_formatting Lexer

Posted: 03.09.2024 02:56
by Stem75
A lexer for the programs:

foobar2000 https://www.foobar2000.org
and
Mp3tag https://www.mp3tag.de/en/

Made for dark theme.

added 2024-09-07
lexer.foobar2000_title_formatting.zip
(10.06 KiB) Downloaded 62 times

Support for VS Code Snippets
added 2024-09-07
snippets_ct.foobar2000_title_formatting.zip
(11.34 KiB) Downloaded 69 times

And

A Zip file which contains snippets for Snippet_Panel plugin.
File List.txt must be copied to the folder [cudatext]/data/clips ,
then it can be called from the Snippet_Panel in the CudaText side panel.
You can use it as a quick help.

added 2024-09-07

Re: foobar2000 - Mp3tag Title_formatting Lexer

Posted: 03.09.2024 05:29
by main Alexey
Thanks.. minor notes:
1. fb2 extension is also taken by FictionBook format. https://en.wikipedia.org/wiki/FictionBook . can you change it maybe? what extension is used by foobar2000 and Mp3tag?

2. .cuda-lexmap file is missing theming info. can you open sample in CudaText and then call dialog "Options / Lexers / Lexer style mapping" (if it don't auto appear)?

Re: foobar2000 - Mp3tag Title_formatting Lexer

Posted: 03.09.2024 06:15
by main Alexey
3. if you shorten the sample inside the .lcf file, it (lexer) will load little faster.

Re: foobar2000 - Mp3tag Title_formatting Lexer

Posted: 03.09.2024 06:45
by Stem75
1.
foobar2000 and Mp3tag don't use files for their scripts.

The language is integrated within the programs (as far as i know).

What about .foomp3 (from foo-bar2000 and Mp3-tag)

2.
I can't understand this. When i install it and i open Cudatext
for the first time this dialogue appears and i assign them all to none.
Should i do something else.

3.
The sample yes i will shorten it.

Re: foobar2000 - Mp3tag Title_formatting Lexer

Posted: 03.09.2024 06:52
by Stem75
Oh! You are saying about the file created in lexlib folder as Title_formatting.cuda-lexmap?

Re: foobar2000 - Mp3tag Title_formatting Lexer

Posted: 03.09.2024 06:55
by main Alexey
yes, file Title_formatting.cuda-lexmap - CudaText will update it.

Re: foobar2000 - Mp3tag Title_formatting Lexer

Posted: 03.09.2024 06:57
by main Alexey
1.
>What about .foomp3

Good.
or don't assign extensions at all.

2.
> this dialogue appears and i assign them all to none. Should i do something else.

yes! you should click for each left item - some right item. left listbox will be updated.
each left item must have some item from right.

this will allow lexer to be OK on dark+light themes.

Re: foobar2000 - Mp3tag Title_formatting Lexer

Posted: 03.09.2024 07:06
by main Alexey
Let's rename lexer to eg "foobar2000 title formatting" so users will be able to find it in addons-manager more easy.
Char '_' in the name - is not needed.

Re: foobar2000 - Mp3tag Title_formatting Lexer

Posted: 03.09.2024 08:00
by Stem75
main Alexey wrote: 03.09.2024 06:57 yes! you should click for each left item - some right item. left listbox will be updated.
each left item must have some item from right.

this will allow lexer to be OK on dark+light themes.
But if i do this it destroys all the colouring of the lexer!

Re: foobar2000 - Mp3tag Title_formatting Lexer

Posted: 03.09.2024 08:01
by main Alexey
When you don't want to use themes, you should turn off the option "ui_lexer_themes":false.
so your colors will be used as is.
but for majority, themes support must be present.
because on default CudaText theme, your current colors are invisible.