Restore Lexer Styles?

sl23
Posts: 175
Joined: 29.01.2013 10:04

Post by sl23 »

I was planning on uninstalling SynWrite. So I have anything like icons, lexers, etc, are in a folder called Backup in the CT folder.

I don't know batch code, so I'll have to stick to hitting the enter key 38 times lol I'll look into it though to see if I can figure it out. Thanks for your help.
Live for an ideal and leave no place in the mind for anything else.
sl23
Posts: 175
Joined: 29.01.2013 10:04

Post by sl23 »

main Alexey wrote:You can just copy (using Batch file) folder data/lexlib from Synwrite to CT, it is the same as installing all these zip's.
Sorry to bother you on this again. Could you please elaborate clearly on what exactly the catch file needs to do please.

Does it simply copy the files from SynWrite folder to CT folder? But then if that's all that's needed, then you could do that manually, and CT would just load them, wouldn't it? I'm confused how it works and why it's not possible to just have a specified directory for SynWrite lexers which are then used if found?
Live for an ideal and leave no place in the mind for anything else.
main Alexey
Posts: 2708
Joined: 25.08.2021 18:15

Post by main Alexey »

In SynWrite you have dir Data/LexLib. it contains lexer files.
In CT you have dir data/lexlib (case is not important on Windows). if you want to install Synw's lexers to CT,

- delete cudatext/data/lexlib
- copy synwrite/data/lexlib to cudatext/data/lexlib

>if that's all that's needed, then you could do that manually, and CT would just load them, wouldn't it?
Yes.
sl23
Posts: 175
Joined: 29.01.2013 10:04

Post by sl23 »

Superb, thank you.
Live for an ideal and leave no place in the mind for anything else.
sl23
Posts: 175
Joined: 29.01.2013 10:04

Post by sl23 »

I assume this will need to be done on each update?
Live for an ideal and leave no place in the mind for anything else.
main Alexey
Posts: 2708
Joined: 25.08.2021 18:15

Post by main Alexey »

Yes, each time you update the data/ folder. But better don't do that - Synwrite lexers are copied from OLD CT lexers, they are missing last year update.
sl23
Posts: 175
Joined: 29.01.2013 10:04

Post by sl23 »

main Alexey wrote:Yes, each time you update the data/ folder. But better don't do that - Synwrite lexers are copied from OLD CT lexers, they are missing last year update.
Sorry, what do you mean? It's I need to copy on each update, but don't as they're out of date?
How else can I change the Lexers to suit my coloured syntax highlighting?

I read in the manual, I think, that SynWrite is still used for editing and creating Lexers, is that still right? Which would mean that copying them from the Syn folder to the CT folder is the only way to use your own syntax highlighters, yes?

Do you plan on adding these features to CT at some point?
Live for an ideal and leave no place in the mind for anything else.
main Alexey
Posts: 2708
Joined: 25.08.2021 18:15

Post by main Alexey »

You can edit ALL features of lexer only in Synwrite. but you can edit lexer-styles in CT too. E.g. set the C lexer, in CT, and call menu "Options / lexers / lexer properties". In the "lexer properties" dlg, activate "Styles" tab and edit styles.

This tab of dlg is disabled if CT option "ui_lexer_themes": true. You can change option to 'false' and edit styles then. Styles are saved by CT to files *.cuda-lexops.
sl23
Posts: 175
Joined: 29.01.2013 10:04

Post by sl23 »

Ok thanks, I'll try that out tomorrow. :D
Live for an ideal and leave no place in the mind for anything else.
main Alexey
Posts: 2708
Joined: 25.08.2021 18:15

Post by main Alexey »

I wrote this info to the wiki today, https://wiki.freepascal.org/CudaText#Le ... tyles_only
Post Reply