@jps Hi Jon, sorry to ping you once again directly. Hope this time you’ll be able to read and and answer it
Let me talk a little bit first about my case/concerns here. Nowadays all the apps I write use python+(pyqt/pyside2) for the frontends and c++/c/asm for the backends (only when strictly necessary in terms of performance), this combo is terrific and it allows to be extremely productive while still creating awesome beautiful desktop apps.
There is a little problem I’ve struggled with for very long time though and it has been the fact than many of my apps are still using the archaic Scintilla widget. Scintilla gives a reasonable ammount of useful text-editor features but it simply can’t compare with SublimeText at all (my favourite text editor of all times). Because of this fact, I’m always trying to replicate SublimeText features on Scintilla (unuscesfully).
After trying to replicate many ST features on Scintilla I’ve reached the conclusion that this approach is simply just wrong and very limiting. Duplicating ST features on a scintilla widget is hard because internal design of scintilla is quite different to Sublime: no scope based, tmLanguage/tmTheme unsupported, multiselections working badly in comparison to ST, undo/redo not behaving like ST and so on…
Here’s a little list of some attempts I’ve tried to replace Scintilla on my apps:
-
Using ace on a chromium qt widget… while ace provides a fair ammount of similar features than sublime there was a big problem, the rendering is slow as hell and embedding chromium on a desktop apps is a big overhead and a dependency i wouldn’t like to keep.
-
Few days ago I’ve tried to port an existing cool open-source c++ widget to vanilla python, pylime but I realize even if that project would be finished, the result wouldn’t be optimal and the widget would still miss a fair ammount of “must-to-have” features.
-
Wrapped edbee-lib directly to python but the widget wouldn’t have the same ammount of features than SublimeText.
-
Embedded SublimeText as a dock widget on my apps and communicated with it using interprocess comunication or rcp protocols… not ideal in many cases and definitely an overhead as I don’t need the whole Sublime editor embedded but just Sublime Views as standalone widgets . Plus, many of my apps will create thousands of text editor widgets on demand and you don’t definitely want to embed thousands of ST process, do you?
Summing up, as you can see, none of my attempts were ideal at all so I was thinking… how difficult would be to create a SublimeText standalone pyqt/pyside editor? In my experience wrapping c++ code to pyqt(sip) or pyside2(shiboken) is relatively easy but I’m not sure how hard would be replacing internal skia renderer with qt’s rendering engine.
That said, just to clarify I don’t care about SublimeText source code at all but instead I would really love if some standalone text editor widget was available ready to use on qt for python. If that was just crazy difficult, being able to use sublime_api module as a python module or static library could be interesting.
Sorry for the long thread but this issue of providing a proper text editor to my apps that satisfies me is driving me nuts and it seems to be not trivial at all after so much researching… guess having as a minimum standard of quality SublimeText itself isn’t making it easy to achieve
As I already mentioned it once… but I think if there was available some sort of Standalone SublimeText editor library to embed directly in pyside2 or qt in a similar way than Scintilla I wouldn’t be the only one willing to pay money to include it on my apps, of course, if the ammount was reasonable. Unfortunately, there isn’t many offers out there about high-quality standalone text editor widgets like Sublime’s…
Ideas? Thoughts? Alternatives solutions?
Please let me know about it so if this is not possible I’ll continue exploring another options… who’d tell creating an state-of-the-art text editor would be so complex
Apologies for the long thread btw.
Yours,
Bruno