Jump to content
pyscripter

SynEdit now has annotated Scrollbars.

Recommended Posts

SynEdit now has annotated Scrollbars.

 

image.thumb.png.5ac90dd23cacbcc55cccdd6fc28d7c56.png

 

In this screenshot you can see in the scrollbar:

  • the position of the multiple carets (full blueish line)
  • lines with errors (full red line)
  • the position of the bookmarks (mini bluish marks on the left)
  • line modification info (on the right side)
  • alpha-blended slider

 

This feature is on the multicaret branch.

Zoom In/Out/Reset functionality has also been implemented.

 

You can still vote on this poll to influence future development.

See the technical details.

See also SynEdit now supports mulit-caret, multi-selection editing - I made this - Delphi-PRAXiS [en].

Edited by pyscripter
  • Like 3
  • Thanks 2

Share this post


Link to post

The best Editor component, better than native Delphi IDE editor (IMO).

Share this post


Link to post

> Highlighters need to override this method to support this feature. Currently the Pascal, DWS and python highlighters do that.

 

Hi, tried Flow control symbols. It seem to work with Pascal as Highlighter but not with DWS. Delphi 12.2 Patch 1. 

Share this post


Link to post
7 minutes ago, pcoenen said:

but not with DWS. Delphi 12.2 Patch 1

Works here with the same version.  Are you using the latest sources now from the master branch.

Share this post


Link to post

Yes, double checked, guess I'm doing something wrong. I switched to the Pascal Highlighter. Thank you for the new features, very nice.

Share this post


Link to post

Fantastic work! Thank you for your contributions.

If I may, while this component is very powerful, I find that a serious limitation is the number of languages that it supports and the difficulty to add new languages. Many common languages are missing (such as Powershell, Rust, TypeScript, Go...) and creating highlighters is complicated.

@pyscripter as you know the internals better than anyone, would it be possible to imagine a way to import highlighters from other projects such as highlight.js: https://github.com/highlightjs/highlight.js/blob/main/src/languages/powershell.js ?

Or would it be better to imagine a simpler way to define highlighters ?

Share this post


Link to post
2 hours ago, John R. said:

Fantastic work! Thank you for your contributions.

If I may, while this component is very powerful, I find that a serious limitation is the number of languages that it supports and the difficulty to add new languages. Many common languages are missing (such as Powershell, Rust, TypeScript, Go...) and creating highlighters is complicated.

@pyscripter as you know the internals better than anyone, would it be possible to imagine a way to import highlighters from other projects such as highlight.js: https://github.com/highlightjs/highlight.js/blob/main/src/languages/powershell.js ?

Or would it be better to imagine a simpler way to define highlighters ?

There are about 75 highlighters and It is not too difficult to add new ones.

  • You can start with a highlighter for a language that is quite similar and adapt it, e.g. change the keywords.
  • There is also SynGen that helps you create a highlighter from scratch.
  • You can request a highlighter and someone may have or contribute  a new one.

 

Regarding Powershell have a look at this discussion.  It contains an extended General highlighter that can be adapted to practically any language.   PSPad uses that unit to support syntax highlighting for 180 programming languages. 

 

Edited by pyscripter
  • Like 1

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

×