New plugin teaser

Let me tease the Xojo developers out there with a little project I work on for months:

An advanced text editor control for Xojo based on the Scintilla engine.

Coming soon with a new plugin pre-release.

12 Likes

Windows and macos?
And linux?

  1. MacOS works
  2. Windows works
  3. Linux, if possible later.
2 Likes

Cool. Does it support markdown?

Yes, the lever should be able to do markdown for the highlighting.

3 Likes

I uploaded the plugin: MBS Xojo Plugins, version 21.6pr2

3 Likes

How well does it perform with huge files? Such as lines thousands of characters long?

Edit: Oh and I’m very interested in Linux support too.

Scintilla is very good engine, its a bit old and maybe out dated in some ways. But non the less very good engine.

I would expect you can get great performance from Christans plugin maybe similar to Notepad++ (which uses Scintilla also) depending on how much overhead there is in having it as Xojo plugin.

I expect the engine to work well with several megabytes big files.
Feel free to try it.

Wow this looks really comprehensive Christian.

Can I ask a few questions?

  1. You mentioned it can highlight Markdown. Can it highlight Xojoscript?
  2. How are syntax highlighters written?
  3. Can we write our own?
  4. Can we style the editor with themes?
  5. Can we access the tokens at a certain x,y location?

We have currently no Xojo specific lexer, so we use one for VB.
They are written as part of Lexilla Library library in C++.
You can write your own if you like.
Once you have the lexer, you assign in code the colors for each style (and attributes like bold).
there is a function to get position from X/Y, so you could see what word is at cursor position.

and a picture

1 Like

I haven’t downloaded yet so pardon the questions if this is obvious, but is there a way to customize the design to match our own apps?

I’m very interested in this, I just don’t have time to actually dig in right now.

You can change all the colors and fonts of course.
And the behavior. This library is huge.
Over 1000 new items to document.

Hmm. I don’t need the status bar or the space for code folding. The line number gutter could work since I can change colors.

those are defined in code and so you can set the margins all to zero, including folding and line numbers.
For the status bar, I could do a property to hide it.

1 Like

I’ve also added the breakpoint/bookmarks to the example for next pre-release:

Cool. I’m getting excited about this. Users have been asking for a better code editor. How about highlighting search results? Not a requirement, just curious.

You can highlight them.

TextMate?

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.