Jump to content
Mr. Daniel

SynEdit replacement for Delphi 10.1 Berlin / editor wanted for source code (not Delphi)

Recommended Posts

I have successfully used SynEdit with Delph 7, but I am hesitant to try to get the old SynEdit code working in Delphi 10.1. What is a recommended solution for 10.1 to be able to edit software source code (not Delphi) other then to resort to a TMemo control ? I basically need line numbers left of the source code and more fancy text selection capabilities compared to a TMemo. Syntax highlighting and other fancy stuff is not necessary. I think SynEdit is discontinued.

 

Any thoughts ?

 

Share this post


Link to post
Posted (edited)
15 minutes ago, Mr. Daniel said:

I have successfully used SynEdit with Delph 7, but I am hesitant to try to get the old SynEdit code working in Delphi 10.1. What is a recommended solution for 10.1 to be able to edit software source code (not Delphi) other then to resort to a TMemo control ? I basically need line numbers left of the source code and more fancy text selection capabilities compared to a TMemo. Syntax highlighting and other fancy stuff is not necessary. I think SynEdit is discontinued.

 

Any thoughts ?

 

I was looking into this, too. There was a discussion about it and a few alternatives suggested, if you find anything useful:

 

Edited by Mike Torrettinni

Share this post


Link to post
Posted (edited)

Hi,

 

I'm a huge fan of the Scintilla control and have used it as a base for our open source editor called The Hammer (sorry not in Delphi, but in DataFlex instead)

At the time when I chose for Scintilla I needed a good control to replace the CodeMax control we were using before that. One of the features that I was looking for was code collapse.

Tried to use SynEdit, then a patched version of SynEdit and while it worked, getting extra features like code collapse wasn't easy.

In my opinion it all was a step back from CodeMax.

 

The scintilla control OTOH is well supported and is under constant development.

It's not that hard to get fixes upstream as long as you do your homework either.

 

Hope this helps.

Edited by wva
  • Like 1

Share this post


Link to post

PlusMemo (www.ecmqc.com/ecmhome.htm) is an excellent and well-supported editor component; low-cost but not free.  It  comes with an add-in for line numbering.

Share this post


Link to post
1 hour ago, Mr. Daniel said:

Thanks for all your comments, I will first go for either:

 

https://github.com/SynEdit/SynEdit

or

https://github.com/pyscripter/SynEdit-2

 

I tend to prefer the first link, basically because the second link looks like someone needing SynEdit for some Python project.

 

Is there a good reason to prefer https://github.com/pyscripter/SynEdit-2 though ?

That "Python project" is PyScripter, one of the most popular IDEs for Python developments.


GitHub makes branching so easy, everybody and his brother seems to create his private branch of basically every library in existence, which makes it difficult to see if there is such a thing as an "official" repository.

So, welcome to branching hell. 😉

 

Which version you chose might depend on how much you need / value backwards compatibility. Last time I looked, SynEdit was backwards compatible to at least Delphi 6, SynEdit-2 only to some XE version. SynEdit-2 focuses more on keeping up with the latest Delphi versions.

Share this post


Link to post

Thanks for your help.

 

I guess PyScripter is made in Delphi using SynEdit-2? If that's the case that will give some kind of guarantee to SynEdit-2, considering robustness, quality of code etc.

 

Share this post


Link to post
25 minutes ago, Mr. Daniel said:

I guess PyScripter is made in Delphi using SynEdit-2? If that's the case that will give some kind of guarantee to SynEdit-2, considering robustness, quality of code etc.

You should ask @pyscripter about that.

My guess is that the original SynEdit is used in a lot more applications and probably maintained more. You can check the commit logs yourself.

Share this post


Link to post
On 8/21/2020 at 2:19 PM, dummzeuch said:

GitHub makes branching so easy, everybody and his brother seems to create his private branch of basically every library in existence, which makes it difficult to see if there is such a thing as an "official" repository.

What you refer to is called forking and in fact GitHub is able to track what repositories are a fork and where they originate from. The problem is a different one and that is that often forks are more active than the original one which at some point might be completely inactive. If I were someone actively working on a fork while the original project might be dead I'd reach out to the original maintainer/author and try to work something out.

Share this post


Link to post

I have dowloaded from github/synedit/synedit and github/pyscripter/synedit-2. 

 

What I don't understand is that when I open and compile a .dpk file from either location, I don't get any install button, like I used to get in Delphi 7.

 

Does this work differently with Delphi 10.1 Berlin ??

 

Share this post


Link to post
20 minutes ago, Mr. Daniel said:

What I don't understand is that when I open and compile a .dpk file from either location, I don't get any install button, like I used to get in Delphi 7

 

In the Project Manager do a right-click on the dpk file and choose "install".

Share this post


Link to post

I am still struggling. My goal is to have synedit installed for windows 32 and 64 bit builds.

 

My focus is on https://github.com/SynEdit/SynEditRight not the one from github.com/pyscripter.

 

I manage to install SynEdit as 32 bit build (thank you all for that), but I don't get the Install option when I build with 64 bit target platform.

 

 

Share this post


Link to post
Posted (edited)
14 minutes ago, Mr. Daniel said:

I manage to install SynEdit as 32 bit build (thank you all for that), but I don't get the Install option when I build with 64 bit target platform.

Design-time packages are always 32-bit only since the Delphi IDE is 32-bit.

 

You don't need the package installed to build. You need them installed to have design-time support. E.g. being able to drop SynEdit controls and components on forms, set their properties at design time etc.

Edited by Anders Melander
Some time later today someone else will come by and repeat everything I just wrote

Share this post


Link to post

Ok, that sounds logical.

 

So I installed the 32 bits compile, Added the path to the synedit source files to Tool / Options / Library / Library path for both 32 and 64 bit platforms, created a test project with a synedit control, and it runs with 32 and 64 bits builds !!!

 

That is great, thanks for the support !!

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×