Lazarus
Announcements => Third party => Topic started by: AlexTP on August 11, 2015, 09:37:58 pm
-
Info is at http://wiki.freepascal.org/CudaText
(wiki page).
-
Its clean and fast,I like it.
Congratulate Alex.
-
Nice, I tried it, looks good. You shoud put language highlight - lexer to a main menu.
-
Is it just a rebranded SynEdit component? What features does it bring to the table. What would make me decide to use it instead of say EditPad Pro [http://www.editpadpro.com/ (http://www.editpadpro.com/)]? eg: Is the syntax highlighting configurable. Can I easily define new syntax highlighters. Does it do file navigation. Can I create my own file navigation schemes for new file formats. How good is its regex? Does it support external tools, code templates? Does it come with its own help file? etc etc.
Not to be funny, but the wiki doesn't give much information. It mentions a Sublime Text 3 like config, but to be honest, how often to people using text editors fiddle with configs. It is the features that make me more productive that I'm interested in.
I have probably seen 20+ SynEdit based text editors. None of them offer anything extra, other that looking slightly different (user interface wise) between each other. In that case I could just as well use Lazarus IDE to edit text files.
-
Based on http://wiki.freepascal.org/ATSynEdit (not Synedit)
-
Nice, feels like SciTE + Sublime Text hybrid. Certainly incomplete, I don't expect great editor could be made in short time. A lot of things such as plugin and scripting are still missing, but the base is working great, with native UI (nicer than ST).
-
Unusable for large files (tested on pascal source file ~14000 lines) - very slow.
-
Unusable for large files (tested on pascal source
Wrap words is not fast. Turn off: see it's faster. (maybe later i make better)
-
Wrap words is not fast. Turn off: see it's faster. (maybe later i make better)
More likely minimap.
-
Minimap with synt-hilite is slow.I confirm. will see..
-
IMO syntax highlight is not slow.
I tried pascal file ~3000 lines. CudaText was in fullscreen. Scrolling with or without syntax hightlight is slow (i.e. not very smooth; Lazarus Source Editor is much smoother/faster as well as built-in editor of Double Commander).
Minimap is slowing it even more. What do you use in behind? It is known that Canvas.Pixels[x, y] is very slow.
Also order of main menu item is unusual. I would do File-Edit-Search-Selection-View-Settings-Help which is more standart.
But great job! CudaText has really many features.
P.S.: Minimap is feature I would like to see in Lazarus.
-
Blaazen
maybe you can try to optimize? paint is CanvasTextOut (unit with name *Canvas*).
You can install atSynedit, and open app/demo_editor. (It has no syntax hilite)
-
About map speed
https://github.com/Alexey-T/ATSynEdit/blob/master/todo-minimap.txt
-
maybe you can try to optimize? paint is CanvasTextOut (unit with name *Canvas*).
I don't think that it's the problem. After all, this method is used also in Lazarus Source Editor which is pretty fast. This method calls some widgetset-specific methods (Lazarus doesn't render text itself).
How it is done inside CudaText? When I scroll one line down, is everything rewritten? Would it be possible to copy rectangle of rendered text (previous state) and paste it one line up, and only the new bottom line would be rendered?
Also, CudaText has some unpleasant inertia. When I hold key_down or key_up and scroll the text, the scrolling persists a while after releasing the key.
-
Blaazen
Not sure inertia exists: I open dbgrids.pas (4500lines) and seems no, or maybe yes for key_down only
-
Graeme
http://wiki.freepascal.org/CudaText#Lexers to help you.
-
redone map. Now i don't do TextOut with fontsize=2, i do Line() 1x2 pixel for chars. Still need to speedup hiliting, but map OK now.
(dbgrids.pas: If lexer Off, map is fast, if lexer On, map is slow)
Upd.
-
Thanks Alextp for the wiki update. Seeing as SynWrite is the "big brother" of CudaText, I installed SynWrite and gave it a try.
Unfortunately SynWrite didn't handle my files correctly. It didn't display my IBM850, CP437 and other UTF-8 files correctly. No matter what I tried in the settings, it didn't work and I saw garbled characters on screen.
Clearly I'm just spoilt for choice with EditPad Pro. But to be fair, not many editors I have tried comes close to EditPad Pro's excellent text encoding support (interpreting and conversions) - and I've tried a LOT of text editors. Even though EPP is a Windows application, it is that good, that I decided to even use it under FreeBSD (via WINE) as my editor of choice. I normally don't like running Windows apps via WINE.
If CudaText can match some of the SynWrite features there is promise for the project. I also recommend you download a trial version of EditPad Pro (or LITE) and give it a try - if only to get some ideas.
Macro Recording, advanced settings per File Type etc are other immensely useful features of EPP.
I wish you all the luck with the CudaText project. I know how hard it is to start something from scratch.
-
Graeme, wrote in PM, about Synwrite. It works ok on Win7 and CudaText also has encodings support..
-
Home is now http://uvviewsoft.com/cudatext/
Update. V0.5.X.
-
Hi! is very nice text editor, i used in windows and macos, but macos version have some problems, i think maybe could the directories.
http://wiki.lazarus.freepascal.org/Multiplatform_Programming_Guide#Configuration_files (http://wiki.lazarus.freepascal.org/Multiplatform_Programming_Guide#Configuration_files)
(Replacing de ./.cudatext/Data from last windows version, the OS X version work fine too.)
For show Icon on OS X:
Edit info.plist and add
<key>CFBundleIconFile</key>
<string>cudatext</string>
And into resourses directory add the icns file (attached)
Good work :)
-
>OSX has some problems
What problems? i don't get idea of your post.
-
hello, I can see three problems: (I say this as a constructive criticism)
1) configuration files, did not take me .cudatext files / data / reeplazar I had with the Windows version, as of this moment I could select the highlighters
2) The icon is nothing more aesthetic, they are converted to attach your mac icon icns format, so they can use if they want
3) The CPU usage is very high on MacOS, happens when a file that has a selected highlighter
Images attached so that they can see that by reference.
Best regards
-
I can't understand ur post, sorry. Only that OSX CPU usage high.
I don't see high cpu usage on 100K file on Linux(can't repeat)
-
CudaText is a nice tool. I have discoverd it some days ago and have play a bit with it.
But I have two ideas for features
-A global code theme that not every lexer must modified externely(for example I change comment color in HTML and in CSS it gets the same color) or a option to change it in mulible lexers at once
-and auto close from commands for example I write "<html>" and it close automaticly with "</html>" or I write "begin" and it puts an "end;"
-
Html autoclose: it is in plan, I make it later. Option "auto close tag". Other wish is not easy doable, with theme of lexer.
-
ok thanks (HTML was only an example. I mean autoclose in general)
To the global theme. I have an idea, a parser which paars for example the defined lexers in the lexer file(lib.lxl)
[php] function, Commen, .. and for
[pascal] function, Command, multiline command, ...
that the output in global themes setting menu is
[Global] function, Command, multiline command
and when the save button is pressed, an checklistbox is opening(similar to the lexers checklistbox to aktivate the diferent lexers) with headline "for which lexer would you like to change highlithing settings".
(the languages are only examples)
I would try to implement it myself, and commit it, but my programming skills are to poor to implement it by myself.
I have also tried to compile CudaText myself, but the compiler doesn't found the unit proc_linklabel.pas. Where I can find it.
-
Very broken english lang.
I dont get it
About compiling, pls at forum...
-
I have changed my previus post. I hope you can read it better now.
-
@Wolf
1)proc_linklabel.pas was deleted, i delete ref from Proj now
2)Idea isnot OK, since you don't know how lexer styles are saved: need other approach, and only I can make
-
Thanks for adding global Themes :).
-
Hi
Do you plan to make a theme? or just thanks? I need themes
-
I can make a theme or two.
I upload them here when they are finished.
I have only one Question. How can I configure CudaText in that way, that I can see all Highlithings like in the picture from this person.
https://github.com/myCrack/verbis-diablo
-
Hm.. I dont know so pls, ask myCrack at his GH, at Issues page..
-
Ok here is my Theme. I'm not 100% happy with all(for example json look) in it but here it is :).
-
TheWolf
It is weird... but maybe you like it :-]
- Can you make zip? http://wiki.freepascal.org/CudaText#How_to_make_theme_package
- Listbox colors not ok (white on white)
-
when there is white on white something is broken. moment i check it.
where exactly is white on white in it?
Here Bg is Gray/black and font is white
and the oposite for selected
When i have fix the white white problem i make a theme package zip.
-
I 'll post details to PM
-
Ok thanks, I try to fix the things.
-
Ok I have make some fixes.
And have make in install zip from it.
-
I will put theme to AddonManager today. Tks.
-
ok, thanks.
-
I change some more things in the theme.
it is now much Eye friendlier.
I have rename to DarkWolf because wolf with ve looks stupid :D.
-
Good; will upload it too to AddonMan.
-
Have no image uploader, sorry.
So I upload here.
What I mean is after url in line 3 you see a green "(" but at the end you see a olive ")" + ";" the url doesn't end with the ")"
-
TheWolf
I will see how to fix URL regex, it is possible
-
I have two questions
-Is there an roadmap anywhere
-Is it planed to make the plugin/lexer/.. APIs compatible to some other editors to make more extensions availeble
-
1)Roadmap is to optimize EControl speed, it has too many recalculations of XY to offset and offset to XY, so editing of 40K is not ok.
1b)And github
2)Lexer is not APIs. lexer is resouce for Econtrol. I don't support other lexers
-
ok thanks.
and what is with the plugin API. Will there be support for other editor plugin APIs sometimes later
-
No.My own APIs are ok.
-
Yes, your API is great.
I have begin to give python a look, so that i can write plugins too.
But have access to more APIs could incraese the ammount of availeble plugins
Stupid Question:
When one function is availele in your API and inanother too, only in another way of deklaration. Isn't then only an function overload needet to support the other API, too?
Why is the lexer editor only in SynWrite but not in CudaText?
Sorry I'm anoying
-
No, access to other api won't give plugins. More api is no need. One api, ok
2) I dont understand question..
-
Which Question the first or second
-
Cud don't have lexer-editor by design
Other question-?
-
I think you mean this Question
When one function is availele in your API and inanother too, only in another way of deklaration. Isn't then only an function overload needet to support the other API, too?
What i mean is when your API say for example pos(X, Y, Color)
and the API for Editor XY says for example pos(Color, X, Y)
isn't then only an overload needet in you API to support plugins from the other editor too
-
it is nonsense, no code is needed to support API in other editor, I dont have func above.
-
The pos function was only an example to explain what i mean
But I think you haven't understand what I mean.
I try it once again
As abstract explanation code not working code
Cuda: API function pos(X, Y, Color)
Edito XY API function pos(Color, X, Y)
And when
Cuda: API function pos(X, Y, Color):overload
API function pos(Color, X, Y):overload
to support plugins from the other editor too?
-
You make a patch? which?
-
No at the moment I dont plan to make a patch, I havent the knowledge and time at the moment.
My question was, isn't only this needn't to support both APIs.
-
What is "both APIs"?
-
Its a theoretical question, with both i mean your and the one from the fictional example editor
-
I don't know. About fictional editor.
-
Fictional=imaginary
Only a construct as an example not a real editor