Lazarus

Announcements => Third party => Topic started by: Alextp on August 11, 2015, 09:37:58 pm

Title: CudaText Editor (written in Lazarus)
Post by: Alextp on August 11, 2015, 09:37:58 pm
Info is at http://wiki.freepascal.org/CudaText
(wiki page).

Title: Re: CudaText Editor (written in Lazarus)
Post by: aradeonas on August 11, 2015, 11:01:06 pm
Its clean and fast,I like it.
Congratulate Alex.
Title: Re: CudaText Editor (written in Lazarus)
Post by: sin_dragan on August 12, 2015, 07:45:58 am
Nice, I tried it, looks good. You shoud put language highlight - lexer to a main menu.
Title: Re: CudaText Editor (written in Lazarus)
Post by: Graeme on August 12, 2015, 10:08:43 am
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.
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on August 12, 2015, 12:03:04 pm
Based on http://wiki.freepascal.org/ATSynEdit (not Synedit)
Title: Re: CudaText Editor (written in Lazarus)
Post by: Leledumbo on August 12, 2015, 01:14:14 pm
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).
Title: Re: CudaText Editor (written in Lazarus)
Post by: kazalex on August 12, 2015, 02:17:44 pm
Unusable for large files (tested on pascal source file ~14000 lines) - very slow.
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on August 12, 2015, 02:46:37 pm
 
Quote
Unusable for large files (tested on pascal source
 
Wrap words is not fast. Turn off: see it's faster. (maybe later i make better)
Title: Re: CudaText Editor (written in Lazarus)
Post by: kazalex on August 12, 2015, 03:02:41 pm
Wrap words is not fast. Turn off: see it's faster. (maybe later i make better)
More likely minimap.
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on August 12, 2015, 03:24:38 pm
Minimap with synt-hilite is slow.I confirm. will see..
Title: Re: CudaText Editor (written in Lazarus)
Post by: Blaazen on August 12, 2015, 06:32:19 pm
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.
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on August 12, 2015, 07:23:27 pm
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)
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on August 12, 2015, 08:45:51 pm
About map speed
https://github.com/Alexey-T/ATSynEdit/blob/master/todo-minimap.txt
Title: Re: CudaText Editor (written in Lazarus)
Post by: Blaazen on August 13, 2015, 05:43:05 pm
Quote
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.
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on August 13, 2015, 05:56:04 pm
Blaazen
Not sure inertia exists: I open dbgrids.pas (4500lines) and seems no, or maybe yes for key_down only
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on August 14, 2015, 04:06:44 am
Graeme
http://wiki.freepascal.org/CudaText#Lexers to help you.
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on August 14, 2015, 09:55:55 am
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.
Title: Re: CudaText Editor (written in Lazarus)
Post by: Graeme on August 14, 2015, 01:11:53 pm
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.
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on August 17, 2015, 09:02:03 pm
Graeme, wrote in PM, about Synwrite. It works ok on Win7 and CudaText also has encodings support..
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on August 25, 2015, 05:39:01 pm
Home is now http://uvviewsoft.com/cudatext/
Update. V0.5.X.
Title: Re: CudaText Editor (written in Lazarus)
Post by: esvignolo on August 27, 2015, 01:01:33 am
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 :)
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on August 30, 2015, 11:21:36 am
>OSX has some problems

What problems? i don't get idea of your post.
Title: Re: CudaText Editor (written in Lazarus)
Post by: esvignolo on August 31, 2015, 05:09:24 pm
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
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on August 31, 2015, 09:01:52 pm
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)
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on February 06, 2016, 07:51:19 pm
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;"
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on February 06, 2016, 08:08:38 pm
Html autoclose: it is in plan, I make it later. Option "auto close tag". Other wish is not easy doable, with theme of lexer.
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on February 06, 2016, 08:16:44 pm
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.
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on February 06, 2016, 10:42:04 pm
Very broken english lang.
I dont get it
About compiling, pls at forum...
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on February 06, 2016, 10:51:14 pm
I have changed my previus post. I hope you can read it better now.
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on February 06, 2016, 10:54:25 pm
@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
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on March 25, 2016, 11:56:07 pm
Thanks for adding global Themes :).
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on March 26, 2016, 01:25:01 am
Hi
Do you plan to make a theme? or just thanks? I need themes
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on March 26, 2016, 01:53:27 am
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
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on March 26, 2016, 02:34:59 am
Hm.. I dont know so pls, ask myCrack at his GH, at Issues page..
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on March 26, 2016, 02:29:16 pm
Ok here is my Theme. I'm not 100% happy with all(for example json look) in it but here it is :).

Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on March 26, 2016, 02:58:16 pm
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)
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on March 26, 2016, 03:00:45 pm
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.
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on March 26, 2016, 03:08:02 pm
I 'll post details to PM
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on March 26, 2016, 03:09:24 pm
Ok thanks, I try to fix the things.
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on March 26, 2016, 03:57:19 pm
Ok I have make some fixes.
And have make in install zip from it.
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on March 26, 2016, 04:21:06 pm
I will put theme to AddonManager today. Tks.
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on March 26, 2016, 04:24:57 pm
ok, thanks.
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on March 27, 2016, 01:57:06 am
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.
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on March 27, 2016, 03:28:16 am
Good; will upload it too to AddonMan.
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on March 27, 2016, 05:56:27 pm
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 ")"
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on March 27, 2016, 06:04:11 pm
TheWolf
I will see how to fix URL regex, it is possible
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on April 20, 2016, 08:17:47 pm
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
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on April 20, 2016, 08:27:43 pm
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
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on April 20, 2016, 08:35:22 pm
ok thanks.

and what is with the plugin API. Will there be support for other editor plugin APIs sometimes later
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on April 20, 2016, 08:43:24 pm
No.My own APIs are ok.
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on April 20, 2016, 08:47:37 pm
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
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on April 20, 2016, 09:13:55 pm
No, access to other api won't give plugins. More api is no need. One api, ok
2) I dont understand question..
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on April 20, 2016, 09:16:22 pm
Which Question the first or second
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on April 20, 2016, 09:27:56 pm
Cud don't have lexer-editor by design
Other question-?
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on April 20, 2016, 09:31:12 pm
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
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on April 20, 2016, 09:46:51 pm
it is nonsense, no code is needed to support API in other editor, I dont have func above.
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on April 20, 2016, 09:51:03 pm
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?
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on April 21, 2016, 01:37:30 am
You make a patch? which?
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on April 21, 2016, 06:41:20 am
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.
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on April 21, 2016, 10:39:47 am
What is "both APIs"?
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on April 21, 2016, 11:28:43 am
Its a theoretical question, with both i mean your and the one from the fictional example editor
Title: Re: CudaText Editor (written in Lazarus)
Post by: Alextp on April 21, 2016, 11:37:36 am
I don't know. About fictional editor.
Title: Re: CudaText Editor (written in Lazarus)
Post by: TheWolf on April 21, 2016, 01:27:07 pm
Fictional=imaginary
Only a construct as an example not a real editor