Ask HN: Can you recommend me a fast, light text editor for Windows?

72 points by supersparrow ↗ HN
What do you guys use when you want to quickly open a file? I used to use VS Code for this purpose, but it's becoming more and more like an IDE and doesn't quite have the startup time that I would want anymore. Plus, it's a bit annoying when I already have a project open as it'll open as a tab and look as if it's part of that project if that makes sense.

Notepad almost fits my spec (startup time, simple, quick UI), but it doesn't have syntax highlighting or anything useful for text manipulation/navigation/etc.

I could never get along with Notepad++ - it's hard to explain why, because I can see it's a fantastic editor and is very popular, but it just doesn't fit into the way I work I suppose.

I think the main key points for me are startup time and syntax highlighting.

Thank you!

176 comments

[ 2.0 ms ] story [ 226 ms ] thread
Sublime maybe
Yes, or an open source alternative such as https://cudatext.github.io/
Hmmm, that one looks interesting! And written in Lazarus/Object Pascal, so cross-platform... Have to give it a try someday!
I use Notepad++, but looks like you've tried.

For ornery files (usually 50+ MB XMLs), I've used an editor in WSL (like nano). Is WSL an option for you?

no need for WSL. you can use nano directly, or through stuff like gitbash.
editplus.com
Finally somebody else who knows editplus! I used it a lot
Sublime Text still rocks.
saw https://github.com/lite-xl/lite-xl a few days ago posted.

Seems pretty fast, and has some plugins that might also add additional functionality. seems great for the occasional file edit without the vscode startup times.

Sublime Text (https://www.sublimetext.com/) is fantastic. Startup time is instant. RAM usage is low. It'll do syntax highlighting out of the box. And with a few extensions (optional) it'll do almost everything that VS Code does (sublime-lsp is key for IDE-like functionality). It's also great for large files so long as they'll fit in RAM.

Bonus: it works cross platform (windows/mac/linux).

+1 for Sublime.

I have yet to find it's max file size limit. It can seemingly open up literally anything with no perf impact.

I tried to open a 90GB file once (on a system with 16GB RAM), which it didn't like very much. It didn't actually crash, I just gave up on it before it completed loading the file (I suspect it may actually have worked eventually, utilising swap - but I imagine it would have been unusably slow). I think for such large files you really need an editor that doesn't buffer the entire file into RAM and loads chunks in from disk on demand.

That said, if your file is more reasonably sized (I've opened 7GB files no problem) then the performance and feature set you get is impressive. You can get instant scrolling to anywhere in the file, full syntax highlighting, find and replace, multiple cursors, etc all with reasonable performance. I find it does lag a little when making edits - especially with multiple cursors - but it's still quite usable.

> I think for such large files you really need an editor that doesn't buffer the entire file into RAM and loads chunks in from disk on demand.

That's what mmap does: maps the entire file into the address space of the process while letting the kernel load the pages as they are touched. I assume that would improve performance significantly but I'm not sure if anyone's tried it.

That would be read-only though, so not an ideal solution for Sublime. Although one could mmap and then reference the original from a structure describing how the file was modified.

However mmaping files which can be modified by another process concurrently is tricky. You can just get killed by SIGBUS.

>> I think for such large files you really need an editor that doesn't buffer the entire file into RAM and loads chunks in from disk on demand

It seems that vim could work this way as you are always dealing with a small section of text at a time. However, this seems not to be how it works.

Note: Sublime Text is proprietary software.
Indeed it is (and it's good that you mentioned this). I should note that the pricing and license terms are very reasonable:

- $99 (USD) for a perpetual licence for the current version at the time of purchase + 3 years worth of updates.

- Per-user rather than per-machine, so you can install it on multiple machines with a single licence.

Adding to this, while the software is proprietary the community mods/plugins/packages ecosystem is very healthy and easy to use. https://packagecontrol.io/
i wouldn’t call it healthy. the packages ecosystem is slowly dying and absolutely full of outdated, abandoned projects.
It's not at its peak for sure, perhaps aging, but still healthy enough to take a jog around the block.

SublimeLinter was modified 2 weeks ago, Side Bar Enhancements 1 month ago, Bracket Highlighter 2 weeks ago, etc.

Sorting by last modified on https://packagecontrol.io/browse/updated, you need to go to page 20 to find the ones updated more than one year ago.

Sublime Text may be downloaded and evaluated for free, however a license must be purchased for continued use.

For USD 99 you get three years of support for an individual license.

It's free though
When you try saving a file randomly you get pop ups telling you that you need a license. Eventually it gets so irritating you give up on sublime text entirely.
(comment deleted)
or, you know, pay for the great software you use?
I just got a license because it improved my life tremendously, but I can see that 70$ is a hefty price for individuals.
+1 for Sublime Text. Additional lesser known capability - it is possibly the best editor for gigantic text files. I have used it to open and edit files with 5.5 million lines, and it was reasonably fast. Afaik not many editors can even open very big files.
This is my use case for Sublime Text, if I get stuck with a massive file I go straight to Sublime.
but why is it your backup option? Any reason you don't use it as a first option?
Sublime Text has a small, maybe old, number of plug-ins.
This is my goto as well. There are other Windows-exclusive options but it being cross platform makes it a no-brainer for those bouncing between OSes, since things like configs and plugins can be easily shared between machines.

It also eschews Windows’ notoriously dodgy text rendering in favor of its own which means that it doesn’t share text rendering quirks with e.g. Visual Studio (the full fat IDE, not the electron thing). When doing C# work I wish I could transplant Sublime’s editor view into Visual Studio because it’s just so much better.

Gotta throw my vote in for this, too. I have been a paying user since the first version, after leaving Textmate. I daily drive VS Code now for the remote experience, but Sublime blows it away in performance. Even on the nicest hardware imaginable there is noticeable input latency on virtually all tasks in vscode.
+1. Great, solid editor, and the extension ecosystem is great, plugins for pretty much anything you'd need.
Just tried to load an .EXE and it only seemed to list as binary when loaded, that's OK but is there a 'load as text' option? Forcing text mode is sometimes useful when recovering damage files (loading a PDF seems to work as text). Sorry if I've overlooked something major.
File > Reopen with Encoding > UTF-8 (or pick your encoding of choice)
OK thanks, thought it'd be in the View menu or such. Seems a little odd that it's so obscure.
You'd usually look up stuff like that with a shot in the dark into the fuzzy-searching command bar, I believe it's available with ctrl+shift+p? It's been a while since I've used sublime.
Just tried it - as advertised! Much more responsive than VsCode. Replacing it for editing one-off files.

Now, we need a project-editing IDE like JetBrains with better responsiveness.

Showing an OOM lower RAM and CPU use in the Task Manager.

I use neovim when I need to just quickly edit files and IntelliJ for my full ide on Windows.
Notepad3. Looks and behaves like Windows notepad but with syntax highlighting, regex search, optional dark theme, lightweight native-built code that launches instantly, and all the other modern features you expect.

https://www.rizonesoft.com/downloads/notepad3/

I now run entirely on Linux. But before that I used Notepad++ for 12 years and finally switched to "Notepad3" 2-3 years ago. If you use an IDE for heavier tasks, "Notepad3" is excellent, much faster and cleaner than Notepad++ and other Windows editors.
Presumably it's called Notepad3 because Notepad2 was taken?

I haven't tried Notepad3, but I've used Notepad2 for years and preferred it to Notepad++. Great little editor. Bonus: no installation needed (useful if you don't have admin privileges on the machine).

https://www.flos-freeware.ch/notepad2.html

(Last updated 2012, but don't let that put you off. Solid little editor.)

Maybe I'm too old school but notepad2 gives me better experience than notepad3.
I use Notepad2. It’s a reasonably powerful editor like Notepad++ (in fact it uses the same text editing library), but all the extra features can be hidden or disabled until it looks just like stock Notepad.
This has been my go-to editor on Windows for the past 20+ years. https://www.contexteditor.org/

You can also make your own pretty easily using lazarus/fpc and the free synedit component.

gvim is plenty fast but i guess for the majority of people notepad++ is the recommendation to make
TED Notepad and Notepad2 (which has a number of more featureful forks) are two other Notepad-like options that aren't Notepad++.
I've used SciTE for years. I originally came across it looking for a lightweight, cross-platform editor that had a small footprint, regex replace, and find in files capabilities.

* https://en.wikipedia.org/wiki/SciTE

EDIT: just noticed you mention syntax highlight. No love there, sorry.

SciTE [0] does have good syntax highlighting for many languages.

It does struggle with very large files, though.

[0] (better link) https://www.scintilla.org/SciTEDownload.html

You are 100% correct. My mistake. I was thinking of something else for some reason. That's what I get for trying to socialize before I've finished my morning coffee.
Sublime Text is still my goto for large files and as a scratch-pad type text editor
Yeah, one "killer" feature of Sublime Text is that you don't have to save files - it will restore even unsaved buffers when you restart it. Not sure if other editors have copied this feature like they did with others (goto anything, command palette, minimap, ...)
If you are familiar with vim[1] and like the command line, you could try either vim for windows or eventually helix[2]. There also is emacs[3]

If you prefer GUI, I think Notepad++[4] is the best editor you can get, but there is also Sublime[5] (like already mentioned), Visual Studio Code[6]. Some people like jEdit[7], but that's not my personal favourite.

[1]: https://www.vim.org/download.php

[2]: https://github.com/helix-editor/helix/releases

[3]: https://www.gnu.org/software/emacs/

[4]: https://notepad-plus-plus.org/downloads/

[5]: https://www.sublimetext.com/

[6]: https://code.visualstudio.com/

[7]: http://www.jedit.org/

Sublime Text. Hands down.

https://www.sublimetext.com

- Instant startup.

- Very fast.

- Well-built software.

- Handles everything I throw at it; a lot of which would render other editors unresponsive.

- Great plug-ins.

I've used Sublime Text and have been recommending it to others since the first version. I still recommend it above all other text editors; especially for folks working on a Windows machine.

I actually VS Code as my "general text editor", but not IDE which is relegated to VS still. Notepad++ is what I use for anything big enough for Code to croak on, which is not very big, tens of MB or so and more.
Have you tried disabling extensions in VSC? It normally starts quickly so if you’re otherwise happy with it I would try that first.
Can you configure VSCode so that when opening folder/workspace, you have pre-configured extensions to enable? And default window could have none, yeah.

It bugs me that every extension I install is by default enabled and I have to disable them per project explicitly.

And I have same pity as op : vscode open is not instant AND it opens the file not in new vscode window, but some unrelated window which I used to open specific folder.

Otherwise VSCode is great.

Edit: Looks like ongoing effort is in progress to tackle extension problem: https://github.com/microsoft/vscode/issues/40239

I have a bookmark done with below text. I use it more like whiteboard in Zoom calls than a note-taker. But it's fast and clean.

data:text/html, <html contenteditable>

If you want GUI and a working and extensive syntax highlighting, your options boil down to Scintilla-based editors, which means Notepad++, Geany[0], TextAdept[1] or Notepad3[2].

There's also lite-xl[3] and CudaText[4], which are not based on Scintilla. Lapce[5] also looks promising, although it's slightly stretching the "light" condition.

For years, AkelPad[6] was considered to be the best substitute for the bundled Notepad, but it hasn't been updated in a while, although it still works absolutely fine in that role.

For the console, Helix[7], Micro[8], Moe[9] are all possible options which will work in cmd.exe out-of-the box.

Regarding vim/nvim - I had some issues with plugin-heavy configs running on top of Cygwin, but YMMV.

0. https://www.geany.org/download/releases

1. https://github.com/orbitalquark/textadept/releases

2. https://github.com/rizonesoft/Notepad3

3. https://github.com/lite-xl/lite-xl/releases

4. https://cudatext.github.io/download.html

5. https://github.com/lapce/lapce/releases

6. https://akelpad.sourceforge.net/en/download.php

7. https://github.com/helix-editor/helix/releases

8. https://github.com/zyedidia/micro

9. https://github.com/fox0430/moe/releases

You don't need cygwin or msys to use [neo]vim.

Vim is actually quite pleasant to use standalone until you reach for a shell and find cmd instead of bash - at which point cygwin/msys/etc. find their usefulness.

+1 for Geany; I don't think it gets as much attention as it deserves.