How to install and use Notepad++ in Linux - Tutorial

Updated: May 13, 2022

The most difficult part in my recently started Windows to Linux migration, initiated (after more than 30 years of steady use of Windows) due to the inefficiency and pointlessness of Windows 11, is in having a sufficiently engaging opening sequence to an article, without repeating myself. It ain't easy, but I'm trying.

Anyway, if you've just turned on your TVs, Dedo is starting a process. It will take three or four years, maybe longer. The mission is to use Linux 100% of the time, no more Windows, reasons ere outlined. In a long series of articles, I will be detailing the progress of this mega-project. We've already covered a whole bunch of nice programs, including SketchUp, Kerkythea, and KompoZer. Great success. Now, we need to tackle Notepad++, a most splendid and Windows-only text editor. Follow me.

Teaser

Why Notepad++?

When I published my Windows to Linux migration software checklist article, a lot of Linux folks have emailed and asked me why I keep insisting on using Notepad++ when there are so many good native programs available? The simple answer is, yes, they are many good text editors in Linux, but Notepad++ is simply better. That's all there is to it.

I do use Kate and Geany quite a bit, but they still aren't as smooth or polished as Notepad++. Just to give a tiny little example. In Notepad++, you can create a new text file, write a bunch of stuff, NOT save it, and then quit the program. When you launch it the next time, the unsaved buffer will be there. So in a way, this text editor has a built-in session save, and it doesn't require you to actually commit files to the disk (per se), which also makes it an awesome notes keeper. Open new 1, new 4, new 9, put in some reminders, memos, whatever, and then re-use them (without saving to the disk) across session. Very neat and elegant.

No Linux text editor does this quite as elegantly (some do, but). Sometimes, in Kate, I leave a bunch of unsaved text files as temporary reminders, and then, when I want to reboot my Plasma session, it keeps pestering me about saving them. Notepad++ never complains, and the stuff is all there. On top of that, it has excellent plugins management, it's very fast and responsive, and there you have it.

So yes, Geany is similar, but not quite. People also suggested I try Notepadqq. Again, similar but not the same thing. Moreover, from what I've been able to decipher, it hasn't been updated that much recently, compared to Notepad++. This isn't really a drastic requirement for a text editor, but it is still an indicator of where things stand. Moreover, in Linux, the frequency of updates does matter, because eventually, you can hit the problem of incompatible libraries and dependencies, and then a perfectly viable program may simply stop running because of some missing shared object or whatnot. And so.

32-bit versus 64-bit?

This may sound like an odd question, but there are scenarios where you might want to favor the 32-bit build of Notepad++. Of course, in a few years, this will probably change, but for now, the (original) 32-bit version has more features. As it happens, the 32-bit version supports a wider range of plugins, i.e., a number of older plugins have only been compiled as 32-bit and not 64-bit, and if you need them, this limits your choice of architecture.

I happen to be one of those folks who uses an old 32-bit plugin that has no 64-bit version. It's the Tidy2 plugin, a Notepad++ utility equivalent to the HTML5 Tidy2 tool. It hasn't been updated in a few years, but it still works majestically. True, the world is slowly moving away from pure HTML to some modern garbage model, but that's no reason to deliberately cripple one's usage by ignoring awesome functionality. This isn't a text editor's fault in any way, but it is a consideration you should have, especially if you've been using Notepad++ for a long time and have accumulated a bit of legacy tooling along the way.

And so, with that, let us move on to the actual setup.

WINE configuration

The first step is to have WINE installed on your system. I am going to use the exact same method outlined in the SketchUp Make 2017 tutorial. I have the WINE repositories added, and I installed the 6.X branch on my system (at the time of writing).

Notepad++ installation

Download the desired 32/64-bit version of the program and then install it. The process should be fast and straightforward.

wine "Notepad++ installer executable"

Installation, start

The program installs and runs fine. It is quite fast, too, and you will most likely not see any difference in terms of performance compared to Windows, unless you perform the setup on totally disparate hardware. On a side note, newer versions of Plasma let you pin WINE apps, so you don't need my tutorial for that anymore. Notice the new 1, new 2 buffers in the Notepad++ tab row. Both unsaved, and both will still be preserved when you relaunch the program. The Plugins Admin (manager) works without problems, too.

Npp works

Import plugins and settings (from an existing Windows system)

If you already have a working Notepad++ setup, you may want to import the configuration rather than start from scratch. This can be particularly useful if you use plugins and have altered their default options. Since WINE mimics the Windows directory tree structure, then you will find the necessary data in the following locations by default:

Import plugins and settings

You can now grab the files from the Windows system and copy them here. For instance, take the Tidy2 folder from the plugins directory and copy it under Program Files, and then also copy the Tidy2 plugins configuration folder from AppData folder and copy it to your Linux box. Notice the difference. The first operation copies the actual plugin (DLL and such), the second the configuration files. Two separate locations!

Now, you can relaunch Notepad++ and your plugins will be loaded - if the architectures match!

Plugin error

I purposefully tried to load a 32-bit plugin against the 64-bit version of Notepad++. Of course, this did not work. So I installed a 32-bit version of the text editor and tried again. This time, everything was cushty. And there you have it, the same workspace as on your Windows box, including all the fine tweaks and changes you introduced over the years.

Plugin loaded

Conclusion

We have completed one more step on our journey away from Windows. I find this both sad and satisfying. The sadness stems from the tragic necessity of this whole thing, and how easy it is (or could be) for Microsoft to just let the desktop be what it always has been. Alas, one can dream. That's where satisfaction comes from, the knowledge that when the day of reckoning comes, I will have sufficient freedom to continue working with minimal disruptions to my setup.

Next on the menu is IrfanView. No big spoilers here, it works fine through WINE. Even so, I will write a guide, for the sake of thoroughness and completeness. So far things have been going pretty well. Anyway, if you're using Notepad++, and you're pondering a move to Linux, there you have it. Take care.

Cheers.

You may also like: