-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax highlighting #43
Comments
Hi vampiebar, If you want syntax highlighting so that you can use the editor application regularly, I suggest you take a look at https://github.com/magiblot/turbo instead. But if you are just interested in reusing the Cheers. |
Thanks for the information, |
If you mean whether that application depends on this tvision repository, yes, it does (it is also written by me). What idea do you have in mind? It'd be great to make the tvision-Scintilla adapter reusable for other projects, but I don't think it should be part of the main Turbo Vision library (this repository). For your own project, I'm fine if you just copy code from the Turbo text editor. It's not good to have duplicate code among projects, but it will allow you to begin working on your application right away. |
If you mean whether that application depends on this tvision repository, yes, it does (it is also written by me). ---> perfect What idea do you have in mind? It'd be great to make the tvision-Scintilla adapter reusable for other projects, but I don't think it should be part of the main Turbo Vision library (this repository). ---> I want to make rhide / borland c++ 3.5 style editor with "textadept" like lua code completion etc.. with language server protocol.. |
That's fine. This Turbo Vision port does not depend on X and is well integrated even with the legacy Linux console (GPM mouse support, support for key modifiers, etc). If you try the Turbo text editor you will see it also benefits from this, and so will your application. I think relying on Scintilla, like Turbo does, is a good idea. There are hundreds of text editors based on Scintilla out there and I'm pretty sure it can be integrated with language servers and other cool features. |
For what it's worth, I have found that basic syntax coloring is surprisingly easy to hack into a Here is an example implementation that implements syntax coloring and system clipboard support (using libclipboard) in a I overrided |
Although it costs nothing to make One could think of improving But that's just how I see it, maybe you find adopting Scintilla too much of a burden compared to just hacking |
It's very possible that you're right. I see what you mean about the undo support; I hadn't tried it out, but yeah, that implementation really only works in the simplest situations. I'd certainly like the ability to undo more than one step, and the ability to redo. I did write an undo manager for my picture editor but I haven't tried to integrate it with The other issue I didn't mention is that my syntax coloring support doesn't work for the current line being edited. As soon as you start typing, the whole line turns gray. It becomes colored again after you navigate to another line. I had filed this under "it's probably fine" but it's among these shortcomings. Maybe I'll take another look at integrating turbo. With your turbo fixes I got it successfully built and linked into tmbasic and I could pull up the editor window, but I hit a wall when I tried to actually integrate it for use as my code editor. The file handling seems to be integrated directly into the editor, but I want it to operate on in-memory strings and let me handle the file stuff. I also need turbo to able to share my fallback clipboard when running on Linux without X. It seemed like I was heading for a full fork, which I wanted to avoid. Maybe I can try to upstream the changes. |
It's enough if you share the changes you already did. That'll help me figure out how the responsabilities of each class need to be split. |
Is it possible to make CPP editor widget syntax highlight theme?
what is the most elegant way to do it?
The text was updated successfully, but these errors were encountered: