7 ms·
Scite is a barebone open source text editor created by Neil Hodgson to exercise his "Scintilla" text-editor c++ library which is used in others like notepad++.
by strainer 10y ago
Scite is a barebone open source text editor created by Neil Hodgson to exercise his "Scintilla" text-editor c++ library which is used in others like notepad++.
In hindsight, I would have a bit more caution programming text editors. I started tweaking and modifying Scite years ago, it was very interesting but it was no small undertaking and I came to understand why Neil advised in the support forum, to customise it using the inbuilt Lua scripting. Im still using this 6 year old customised version of Scite that I never managed to sync with the latest version, and it has 10 thousand lines of custom Lua facilities like file encryption, navigation panels, multi-edit mode etc.. which I wrote and stabilised a few years ago. I rarely venture to alter it now that I am at last comfortable with it, but its going to need serious attention sooner or later...
- jwmc 10y agoOkay, I won't lie, this is a bit of a side-swipe but... ... it sounds like you kind of wanted emacs. One of the most impressive things I find about emacs (especially since semi-proper packages became a thing) is just how easy it is to get stuff that is 5-10-15 years old working on it. No word of a lie, it's amazing how they've managed to break so little over the years.
- strainer 10y agoNo I appreciate the tip and have often considered diving into Emacs or Vim. Im very fond of the Scite and Lua combo as well now, and i would like to have the time to share and develop it more than to set up on a new system - but yes those other systems do look good...
- jasim 10y agoThose features sound really nice. Any links/screenshots?
- strainer 10y agoIve put just a couple of snaps here: http://imgur.com/a/QMhpf http://imgur.com/a/QMhpf I really must get round to sharing the source but it needs a bit of preparation.
- stevekemp 10y agoLua is great for extensions, isn't it? I forked antizez's editor to add Lua support, and posted it here in the past: https://github.com/skx/kilua/ https://github.com/skx/kilua/ That works well for me, even with the minor omissions, and is well-paired with my console-based mail-client - again scripted by lua: https://github.com/lumail/lumail2/ https://github.com/lumail/lumail2/
- strainer 10y agoYes its great --a super efficient and fast little VM and comfortable syntax and scoping. I realised how great Lua is for separating user-complexity from an applications core as my customisations got more substantial.
- shalabhc 10y agoOver at howl.io we've been working on another Lua/moonscript based editor. Incidentally it used scintilla as well until we switched to an in-house engine called aullar. The author wrote a blog post about it: https://howl.io/blog/2016/05/26/introducing-aullar.html https://howl.io/blog/2016/05/26/introducing-aullar.html
- strainer 10y agoI want to get into that when I get time - an editor with LuaJIT - that should be brilliant.
- shalabhc 10y agoYes it's great. Interfacing with new libraries is easy with LuaJIT's FFI and implementing low level stuff works well too (e.g. something like reverse find on a string basically gets JITted to C speed).
- jokoon 10y agoI also tried to make an editor 5 years ago, because I was not satisfied by either notepad++ or sublime text. I was checking out notepad++'s code, and I was quite amazed by the fact that making a text editor was not some simple task. The syntax highlighting functionality alone is a combination of something as complex as what a compiler/parser does, and you have to do it almost in real time. So if you want to color every different part like operators, symbols, braces, with a different color, and you try to do this on C++, it is not going to be a small task... Also something you learn about text editors is the rope data structure. https://en.wikipedia.org/wiki/Rope_(data_structure) https://en.wikipedia.org/wiki/Rope_(data_structure)
- davorb 10y ago> So if you want to color every different part like operators, symbols, braces, with a different color, and you try to do this on C++, it is not going to be a small task... For a lot of modes, Emacs does this using regex.
- jokoon 10y agoRunning a regex each time you type a character seems a little heavy to me... Regex'ing languages like HTML or C++ can be quite mind breaking... I think.
- thomastjeffery 10y agoRopes are pretty sweet. I still prefer a piece table, just because of the sheer simplicity.
- wila 10y agoI wrote an open source editor with some buddies 10 years ago and still use it on a daily bases. That was built around codemax. A month ago, me and one of those friends picked it up again for a new revision and started retooling using Scintilla. Scintilla is an amazing control, very well documented and it has a lot of features. Some of the standard features from codemax have to be rebuilt, but I'm still very impressed. Oh and before somebody plugs their favorite editor and why I should be using that instead, if it doesn't know DataFlex it won't help ;)