Page 1 of 4

Restore Lexer Styles?

Posted: 26.10.2021 20:40
by sl23
This was a really helpful feature in SynWrite, does it exist in CudaText? Will it ever make an appearance if not?

Posted: 26.10.2021 20:53
by main Alexey
If you use lexer-themes, "ui_lexer_themes":true, you should not need this command. If option is 'false' then Cud uses files *.cuda-lexops. They are auto loaded, no?

Posted: 26.10.2021 21:08
by sl23
Sorry, all the Lexer stuff confuses me!!! Not just in SynWrite or CudaText, but also other editors too.

At present, I am having to drop all the exported SynWrite Lexers onto CT in order to load them back on every update of CT. Does the option you refer to support that?

Posted: 26.10.2021 21:10
by main Alexey
CT don't support that 'restore lexer styles' cmd, because it don't need it- CT auto loads lexer changed styles, if they are changed in CT itself, files *.cuda-lexops.

Posted: 26.10.2021 21:12
by sl23
Is there a way to "convert" Syn Lexers to CT ones?

Posted: 26.10.2021 21:14
by main Alexey
Syn lexers are OK for CT already- files *.lcf *.cuda-lexmap. But saved-lexer-styles cannot be converted, so you must config lexer styles in CT now.

Posted: 26.10.2021 21:16
by sl23
But at present, on every CT update, I have to drag and drop the zipped Lexers onto the CT window in order for CT to recognise them and use them.
Is there a way around this? Could I unzip those Lexers and place them within the Lexer folder or something like that?

Posted: 26.10.2021 22:01
by main Alexey
If they are lexers with the same names as default lexers, no way. If they are additional ones, just put them to the 'data/lexlib'.

Posted: 26.10.2021 22:33
by sl23
Well, yes, they are existing Lexers in Syn that have been exported and are now a list of zip files:
lexer.Batch_files.zip
lexer.C#.zip
lexer.C.zip
lexer.C++.zip
lexer.CSS.zip
lexer.HTML.zip
lexer.Ini_files.zip
lexer.JavaScript.zip
lexer.JSON.zip
lexer.Lua.zip
lexer.Markdown.zip
lexer.Pascal.zip
lexer.Pascal_script.zip
lexer.PHP.zip
lexer.Python.zip
lexer.VBScript.zip
lexer.XML.zip

Each zip contains four files:
Batch files.acp
Batch files.cuda-lexmap
Batch files.lcf
install.inf

So there's nothing I can do to make the process easier?

Posted: 26.10.2021 22:57
by main Alexey
You can just copy (using Batch file) folder data/lexlib from Synwrite to CT, it is the same as installing all these zip's.