Good news...
Good news...
... some more suggestions Nothing of the following is really important, just some ideas.
1. I am not sure how the tabs in the switch-tab dialog are sorted but whatever sort order there may be I find it not very intuitive. For me it would be perfect if there was an option to order the lines in the dialog the same as the actual tab order (ie first line in dialog is left-most tab, second line is left-most+1, ..., last line is right-most).
2. How can I edit a .cuda-session file from the command line? If I start cudatext with "cudatext test.cuda-session" this just loads the files in the session. Would a command-line option make sense? (It's possible to load a .cuda-session file via File>>Open... so it's not that important.) EDIT: Perhaps a better idea is to add an Edit file... command to the Session plugin... I could do that on my own.
3. An idea for the Lua lexer, although it may be usable for other, similar lexers as well. There is probably some work involved so see this as a modest suggestion for some future expansion. Like Cud, AkelPad has a Lua lexer and this lexer has a nice way of highlighting Lua syntactical blocks (keywords like function if then else end etc.), see the short video here: https://imgur.com/a/Qqa5WPx . I think that Cud has all (or almost all) the required information as this is a prerequisite for the code folding but I have no idea how hard it would be to implement this sort of thing.
Just an
And thanks @Alexey for the lexer line length thing... it always amazes me how fast you do these things.
1. I am not sure how the tabs in the switch-tab dialog are sorted but whatever sort order there may be I find it not very intuitive. For me it would be perfect if there was an option to order the lines in the dialog the same as the actual tab order (ie first line in dialog is left-most tab, second line is left-most+1, ..., last line is right-most).
2. How can I edit a .cuda-session file from the command line? If I start cudatext with "cudatext test.cuda-session" this just loads the files in the session. Would a command-line option make sense? (It's possible to load a .cuda-session file via File>>Open... so it's not that important.) EDIT: Perhaps a better idea is to add an Edit file... command to the Session plugin... I could do that on my own.
3. An idea for the Lua lexer, although it may be usable for other, similar lexers as well. There is probably some work involved so see this as a modest suggestion for some future expansion. Like Cud, AkelPad has a Lua lexer and this lexer has a nice way of highlighting Lua syntactical blocks (keywords like function if then else end etc.), see the short video here: https://imgur.com/a/Qqa5WPx . I think that Cud has all (or almost all) the required information as this is a prerequisite for the code folding but I have no idea how hard it would be to implement this sort of thing.
Just an
And thanks @Alexey for the lexer line length thing... it always amazes me how fast you do these things.
Hm... tried to do that. The simple-minded approach viatmsg wrote:EDIT: Perhaps a better idea is to add an Edit file... command to the Session plugin... I could do that on my own.
Code: Select all
file_open(app_path(APP_FILE_SESSION))
The following works but it does an unnecessary save step in the last line, just to give the new tab its name:
Code: Select all
def loadSessfile(self):
sess=app_path(APP_FILE_SESSION)
f=open(sess)
txt=f.read()
f.close()
file_open('')
ed.set_text_all(txt)
ed.save(sess)
3. Idea for Lua lexer.
I added dynamic-highlight rules to lexer. please test, download 2 files Lua.*
https://github.com/Alexey-T/CudaText/tr ... ata/lexlib
Cud option must be set: lexer_dynamic_hilite
I added dynamic-highlight rules to lexer. please test, download 2 files Lua.*
https://github.com/Alexey-T/CudaText/tr ... ata/lexlib
Cud option must be set: lexer_dynamic_hilite
1. TabSwitcher dialog. not a good idea, now we have order of lines from last actiavated time of each tab, so Ctrl+Tab n times (with holded Ctrl)--> n steps back
https://wiki.freepascal.org/CudaText#Tab_switcher
https://wiki.freepascal.org/CudaText#Tab_switcher
It seems the "on_open_pre" event has to be suppressed. I hadn't realised how the session plugin does its jobs... but I should have checked this on my own in install.inf Many thanks for putting me on the right track .Alexey wrote:2. file_open(fn, options=....)
You can try these options-
If it has "/noevent", then "on_open_pre" event won't fire.
EDIT: For the sake of completeness, the added command code looks like this:
Code: Select all
def loadSessfile(self):
file_open(app_path(APP_FILE_SESSION),-1,'/noevent')
Well, I already had "lexer_dynamic_hilite" set to true and so had high hopes that the lexer would then do something like that... and now it does! I will have to play around with it a little (and set a better BracketBG ) but it looks not bad at all.Alexey wrote:3. Idea for Lua lexer.
I added dynamic-highlight rules to lexer. please test, download 2 files Lua.*
https://github.com/Alexey-T/CudaText/tr ... ata/lexlib
Cud option must be set: lexer_dynamic_hilite
That's fine, either I can write a plugin that shows the files in a listbox in the tab display order or I will get used to it.Alexey wrote:1. TabSwitcher dialog. not a good idea, now we have order of lines from last actiavated time of each tab, so Ctrl+Tab n times (with holded Ctrl)--> n steps back
https://wiki.freepascal.org/CudaText#Tab_switcher
A great Thank You for your continued help and patience.
Last edited by tmsg on 08.06.2020 14:43, edited 1 time in total.
Re the dynamic lexing... possibly a small correction: in Lua.cuda-lexmap you have "CurBlock BG=BracketBG" (note the blank in CurBlock BG). In the .lcf you also refer to "CurBlock BG". There seems to be a CurBlockBG (no blank) already defined... so I have replaced all "CurBlock BG" in the .lcf file with "CurBlockBG" and changed the .cuda-lexmap to read "CurBlockBG=CurBlockBG". Seems to work and means that I can have a BRIGHT RED BracketBG and a slightly less in-your-face CurBlockBG.