Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Scintilla is a free source code editing component with a permissive license (scintilla.org)
108 points by mariuz on Feb 19, 2023 | hide | past | favorite | 47 comments


For those who weren't aware, scintilla forms the basis of the popular Notepad++ Windows text editor.


The Qt port of Scintilla is also used by a number of projects as a lightweight editor component:

  $ lsb_release -d && apt rdepends libqscintilla2-qt5-15
  Description:    Ubuntu 22.04.1 LTS
  libqscintilla2-qt5-15
  Reverse Depends:
    Depends: libqscintilla2-qt5-dev (<< 2.11.6+dfsg+1~)
    Depends: sqlitebrowser (>= 2.11.2)
    Depends: sonic-pi (>= 2.11.2)
    Depends: qgis-providers (>= 2.11.2)
    Depends: python3-qgis (>= 2.11.2)
    Depends: python3-pyqt5.qsci (>= 2.11.2)
    Depends: openscad (>= 2.11.2)
    Depends: octave (>= 2.11.2)
    Suggests: libqscintilla2-qt5-l10n
    Depends: libqscintilla2-qt5-dev (>= 2.11.6+dfsg)
    Depends: juffed (>= 2.11.2)
    Depends: libqscintilla2-qt5-designer (>= 2.11.2)
    Depends: libqgis-gui3.22.4 (>= 2.11.2)
    Depends: libqgis-app3.22.4 (>= 2.11.2)


It feels like an eternity ago, but an editor I wrote in Qt for a game did exactly this so you could write Lua inline on objects.


Doesn't Qt already have an editor component?


It does, but IIRC Scintilla is more full-featured (e.g. I think it has better syntax highlighting support).


Whenever I work on Windows machines, Notepad++ is a must to have.

But usually, SciTE is more than sufficient: https://www.scintilla.org/SciTE.html

and also works fine on Linux.


I remember using SciTE in the early 00s. Apart from some oddities of displaying italic text in a weird way it was a perfectly cromulent editor and you could start it, do your task, and close it before eclipse had even finished the loading screen :P


and Notepad++ itself sometimes gets bundled with other software.


Now there's a name I haven't heard much in the last decades. Before I switched from Windows to MacOS I used their demo editor SciTE as my text editor of choice and was very happy with it.


> a name I haven't heard much

Probably you never had to develop specialized text editors - the Scintilla library is very precious.


Is it still the only library for such that lets developers easily set code comments in a completely different font?

I remember wondering why it wasn't a widespread feature, and then realizing that the common ingredient in all the editors I was looking at was s Scintilla.


Being able to use non-monospace fonts is another great feature too.


SciTE has been my notepad replacement for twenty years. I love its speed, simplicity, and lua scripting. I only wish there were an easier way to add syntax highlighting for new languages.


I would love for there to be a Mac equivalent of Notepad++ (i.e. Scintilla). I miss that editor every day. The Mac world has many advantages, but in terms of text editors all your options are either:

1. Electron-based, and take forever to launch (even if they are "fast for an Electron app").

2. Little to no plugin ecosystem whatever. No Vim mode, etc (yes there's Vim itself, but that's not a great choice for a GUI window editor).

3. Commercial, and costs nearly as much as a full-blown IDE.

Notepad++ was (is) pretty much perfect. Sadly, its default look-and-feel is "light mode" and "Courier New", rather than dark mode and Menlo/Consolas, so I don't think it even exists for the newer crowd.


Take a look at Geany https://www.geany.org/ which uses scintilla under the hood and is blisteringly fast and lightweight and plugin friendly as well as FOSS.


I use it on Mac and happy with it. Very few integration issues for a nonnative app. I usually hide the message window and apply my custom dark theme.


I don’t understand why geany isn’t more popular.


IMO on macos, geany feels more alien than electron-based editors (vscode, etc). I think this is because it sort of falls into an uncanny valley of UI where it's _almost_ native looking, but noticeably different; whereas electron-based editors don't even try and so are less jarring.

Geany is definitely my fav editor on linux though.


Geany uses GTK on all platforms which means it only really looks "native" in Gnome based Linux distro.


That’s probably the reason. Most Mac users stick to Macs exclusively, whereas Linux and windows users are more likely to use both windows and *nix so having a single cross platform editor, besides vim/emacs, is useful.


What about Sublime Text? It's always been fast and have lots of plugins




+1 for TextAdept, it's been my Notepad++ replacement on Linux for quite some time.


> 1. Electron-based, and take forever to launch (even if they are "fast for an Electron app").

FWIW, I just tried this with VSCode and I was looking at previously-only files 1.5s later. I believe new installs/updates take a bit longer. Maybe this has gotten better since the last time you tried it?

A rollup of interesting Mac text editor options: BBEdit (core functionality free), CodeEdit (open source), CotEditor (open source), Geany (open source, hat tip to thinkingemote), Nova, Sublime Text, TextMate, UltraEdit. Wikipedia has a full list at https://en.wikipedia.org/wiki/Category:MacOS_text_editors.


I just leave it running all the time and it launches a new window basically instantly lol


> Sadly, its default look-and-feel is "light mode" and "Courier New", rather than dark mode and Menlo/Consolas

That is precisely why I like it as a secondary editor. That and because scintilla based editors (there are many besides notepad++ which are cross platform) are really good at handling large text files like cSv and the like.


The Scintilla library works on MacOS and the SciTE implementation is available

https://www.scintilla.org/SciTE-OSX.html


The answer used to be TextWrangler. I'm not sure how BBEdit 14 is.


I really like Notepad++ on Windows but BBEdit Free Mode does the job for me on macOS.


Have you tried CotEditor?


CotEditor Tincta textmate


notepadqq


reminds me about Akelpad which was my preference over notepad++/scintilla editors. It feels similar to Scintilla but uses an allegedly more performant editing component called AkelEdit. It has lots of interesting plugins and easily editable GUI. it was fun to tinker with.

https://akelpad.sourceforge.net/en/index.php


I upgraded from Notepad++ to Geany when I switched to Linux. Fantastic editor, and while it didn't have all the plugins I used, I can run a Linux command on the selected text, and it subtitutes the text with the output. Very useful to sort, count uniques, format JSON and such.


There’s a related project that’s really cool called scintillua that lets you use lpeg lexers for scintilla. It supports over 120 languages and it’s super easy to add new ones.

https://github.com/orbitalquark/scintillua

You can also use it as a standalone lua library. I packaged it up to make a faster (but much less feature full) alternative to bat.

https://github.com/jpe90/clp


I love SciTE. Have been using it for 20+ years as my lightweight editor of choice on Windows.


Probably one of the best for macOS:

https://cudatext.github.io/


Relatively unknown Eric Python IDE using scintilla as editor component https://eric-ide.python-projects.org/


I love SciTE/Scintilla's column selection feature. SciTE's recent find/replace panel is excellent too.


Notepad++ or SciTE have no support for LSP, tree-sitter parsers or the new debug adapter protocol, which are table-stakes requirements for serious development nowadays. So you're pretty much limited to quick and dirty editing of single-file scripts or configs. Meanwhile both Neovim and emacs are getting support for this stuff.


Please stop mentioning neovim as if it's a defacto replacement for vim. The original vim is very much alive and much more popular than neovim.

Neovim is a cash grab by developers who forked the repo and demanded patreon payments etc. with wild claims that it will replace vim. Neovim doesn't support vim's development it only takes from it. It never pushes anything back upstream and most importantly, never contributes to Bram's charity, ICCF Holland.


> demanded patreon payments etc.

I've been using neovim for years and have never heard of this, and have never paid them anything. I'm not saying you're incorrect that they've asked ("demanded" feels a bit strong?) for patreon payments or other forms of compensation, but a) that is their prerogative, and b) as a user, I haven't felt pressured into contributing at all.

> Neovim doesn't support vim's development it only takes from it. It never pushes anything back upstream

I suspect at this point they've diverged enough that doing so would be infeasible.

And yes, by definition, a fork "takes" from the original parent project. Neovim is not obligated (legally or morally) to contribute back to vim. That's the -- brilliant -- nature of open source & permissive licensing.

> ... and most importantly, never contributes to Bram's charity, ICCF Holland.

Why is this a requirement? I'd been using vim for at least a decade prior to switching to neovim, and never donated. I think charitable donations are a very personal thing; people can donate to whatever causes they feel like, and pressuring someone to donate to a charity just because it's linked to a piece of software they use (or have forked from) sounds awfully similar in tone to your "demanded patreon payments" rant above.

> Please stop mentioning neovim as if it's a defacto replacement for vim.

I don't think the GP was trying to do that. They merely pointed out that neovim (and emacs) has built-in support for LSP (etc.), which I believe vim does not? So vim isn't really relevant to the point being made.

I think perhaps you should step back a little and ask yourself why this topic seems to be so emotionally charged for you. It's just a text editor; let people use and promote whatever editor they like.


The Neovim community and developers push a lot of things back into vim. Your hate is irrational.


You might be in a bubble. Only about a quarter of the developers I work with know of or care about LSP or the debug adapter protocol, and about half of those who do regard them as Microsoft-specific. Tree-sitter is just a personal preference, there are plenty of alternate solutions that work just as well.


I do Win32 development almost exclusively using regular Notepad (not even the ++). IMHO codebases that nearly require the use of complex tools to work with are a bad thing as they may contain lots of unnecessary complexity, and the accompanying probability of bugs.


I don't use any of the scintilla-based editors for serious developments, but as lightweight text editors.

I don't even want those two use cases to have the same history for files opened. In fact Notepad++ on Windows is my eternal scratchpad and I open a "code" file maybe once a month.




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

Search: