edbee-lib icon indicating copy to clipboard operation
edbee-lib copied to clipboard

Edbee-lib status/future

Open brupelo opened this issue 3 years ago • 6 comments

@gamecreature Hi Rick, happy new year! how you doing? :)

Today I was curious to see what was the status of your amazing project in comparison to last time I did so I've reviewed the whole issue tracker as well as the number of contributors and I must to admit I don't really understand why this amazing project hasn't gained all the traction it deserves :/.

It's surprising because if your research about this topic you'll soon realize this poject is probably one the best choices Qt devs have when it comes to have a proper modern text editor widget on their Qt apps.

Thing is, few years ago I'd been using QScintilla/pyqt in my projects and I'd reimplemented a large part of sublime text API on top of it... thanks to that I was able to use some of the ST's commands on top of it and it was quite nice. Problem was the QScintilla widget wasn't originally designed to support multiple cursors and when it was implemented by Neil the feature ended up more like a "hack" rather than a proper implementation. What do I mean by that? Check for instance undo/redo history and you'll see Scintilla isn't preserving properly the regions produced by multiple cursors like St et al.

After discarding QScintilla as a proper solution to my projects I'd tried out using some proper solution from the web such as codemirror, monaco, ace embedded on a qt web view... at first I thought this idea was great and in terms of features the solution was ideal, problem being is the performance is pretty damm terrible :/ . No wonder though, having the whole chromium overhead just to have a text editor widget in your project is nuts, think about it :D

Nowadays I think the only "real solutions" for Qt devs are either your project or hoping this thread https://bugreports.qt.io/browse/QTCREATORBUG-16013 will evolve properly. About later I'm not sure how that will evolve to be honest (I'm not too optimistic). But even if that was the case and the QtCreators devs were able to implement it properly, it'd be pretty hard to decouple the text editor (subclass of QPlainTextEdit) to be reused as standalone widget.

Here's the thing, I code 3d tools and being able to edit assets such scripts/shaders/etc is critical... for now I've decided to have live reloading by using ST behind the curtains but this is far away of being ideal and I'd love to have a proper text editor embedded in my tools in order to avoid context switching but I've run of options.

So, I'd like to hear your opinion/feedback about the future of your project, still passionated about it? Willing to invest more time on it? What about undo/redo history on multiple cursors... do you think this one is too difficult to implement?

Also, what do you think would be the main reasons the project hasn't gained proper traction yet? Lack of examples? Docs? Too hard for new devs start contributing?

Thanks.

brupelo avatar Jan 03 '21 13:01 brupelo

It's still the same as the last time you've asked. It's a mature product, there are active users and it is updated regularly.

vadi2 avatar Jan 03 '21 16:01 vadi2

@brupelo Happy new year for you too. It's a side project I developed a time ago. It's still maintained, but not the main focus anymore (In the beginning it was the required by product I was developing). But unfortunately I don't have a lots of time to spare at the moment. So I will address issues and merge (sometimes develop) suggestions. Feel free to contribute to this project!

Undo/redo history for multiple carets is present. Or do you mean something different?

gamecreature avatar Jan 03 '21 18:01 gamecreature

@gamecreature Hey, thanks for the fast answer and letting me know. I totally understand, the fact you're still maintaining is great news though, plus... having you reviewing potential PRs is great so you can make sure the project will evolve in the right direction.

Feel free to contribute to this project!

I'd love to... as you know, few months ago I'd posted somewhere some pyqt bindings I'd done in some thread but if I was going to give it a shot again nowadays I'd probably create & submit pyside2 bindings instead (less restrictive license) and also probably adjust & submit my ST "clone" api on top of edbee-lib.

Obviously, this wouldn't be a trivial job so before considering doing so I wanted to be sure I won't get "stuck" similarly like my other attempts using scintilla, codemirror et al.

So yeah, basically undo/redo history with multiple carets is extremely important to me, not only for the feature itself but because it becomes really important if you intend to create more complex commands on top of edbee. Here's a little video showing you what I meant by that. Also, if it's not clear what I meant by looking at that video, please toy around with codemirror widget here https://codemirror.net/ . You'll see the regions created with the multiple carets will be preserved nicely... Also, no matter if you're using code folding or not, regions also preserved nicely in this case.

In any case, IMHO I think this project could eventually become an "standard" defacto for the Qt community... In fact, I wasn't suggesting it wasn't a mature product already @vadi2 , the last time I'd checked out my overall impression was the project was pretty amazing as it was but I also noticed there was still a lot of room to growth (growth in this context as having feature parity check with counterparters like ST, codemirror, monaco, ...)

I'll try to checkout latest version and review in the next upcoming days to see which important features are missing and how hard would be to dispatch them. Again, I don't want to add another contribution to my stack this time without being 100% sure this time will fullfill all my requirements :P

brupelo avatar Jan 03 '21 19:01 brupelo

@brupelo edbee has this undo/redo support you refer to in you video. (folding regions are not implemented)

gamecreature avatar Jan 05 '21 07:01 gamecreature

@gamecreature Awesome :O , yesterday i've compiled and tested latest version of edbee-lib and I can confirm what you're saying there, undo/redo are preserving the regions like sublime_text, codemirror, monarch, vscode, atom et al.... Although I've noticed the very old issue #82 hasn't been addressed yet... So for instance right now I'd say add new regions/cursors is kind of buggy.

Anyway, If that bug was fixed I'd say the "core widget" would become really nice... And yeah, folding regions is definitely a "nice to have". For that particular one it'd be really nice to have a simple API like the one provided by sublime at https://www.sublimetext.com/docs/3/api_reference.html#sublime.View , where you can fold/unfold region(s). So once you've got that API in place you could implement easily non-core commands on top of it such as https://github.com/randy3k/sublime-default/blob/master/fold.py , which it's extremely handy

brupelo avatar Jan 16 '21 22:01 brupelo

Feel free to send in a PR doing that

vadi2 avatar Jan 17 '21 08:01 vadi2