Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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...



Okay, 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.


No 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...


Lua 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/

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/


Yes 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.


Over 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


I want to get into that when I get time - an editor with LuaJIT - that should be brilliant.


Yes 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).


I 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 ;)


I 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)


> 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.


Running 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.


Ropes are pretty sweet. I still prefer a piece table, just because of the sheer simplicity.


Those features sound really nice. Any links/screenshots?


Ive put just a couple of snaps here: http://imgur.com/a/QMhpf

I really must get round to sharing the source but it needs a bit of preparation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: