Updated: January 30, 2019
I really like Notepad++. I think it's the best, most convenient text editor around, with a simple interface, tons of useful commands and options, and a wealth of lovely plugins, all of which transform a simple text pad into a powerful, flexible document processor. Whether you're working on notes, Web pages or complex software code, Notepad++ does it all. There's only one problem - it's a Windows application.
In my Slimbook & Kubuntu reports, I remarked on the shortcomings of different text editors in Linux, all of which pushed me to using Notepad++ on Linux, something I tried to avoid. Now, Notepad++ does not run natively on Linux, so I had to use WINE, and this introduced a whole bunch of other complications. HD scaling in Plasma is tricky for WINE software (and in general, for various compatibility reasons), and you need custom tweaks to get a shortcut icon pinned to the Plasma task manager. In this guide, I'd like to highlight a few tricks you can use to make Notepad++ look and behave beautifully in Linux.
Similar to what I've shown you with Winepak games and TrackMania Nations Forever, you can use a standalone bundle, in this case a snap, to get Notepad++ deployed. This should handle most of the WINE backend dependencies for you. Still, there are a few small steps you do need do yourself before you can can get Notepad++ up and running all nice and proper like. First, install the application.
snap install notepad-plus-plus
Fonts & scaling
The installation command may pull in additional stuff, like WINE extras and fonts. Once all of that completes, you can launch the program. In the Plasma desktop environment, Notepad++ started fine, but much like the manually installed version of the program using WINE, the fonts were all tiny as there's no seamless WINE integration in Plasma. I wanted to increase the font DPI, the way I showed you, but the Notepad++ snap package does not provide winecfg, but it does come with its own .wine settings. So that got me thinking, what's the best way to do this manually?
I decided to copy the *.reg files from my home directory installation into the snap environment, and lo and behold, this sorted out the fonts beautifully. You can manually play with font values, but this is hard work, because a typical configuration looks like this:
system.reg:[Software\\Microsoft\\Windows NT\\CurrentVersion\\FontDpi] 1539246013
system.reg:[Software\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\FontDpi] 1539246012
And this is why we want to do a simple copy. Faster, easier, more elegant:
cp ~/.wine/*.reg /home/(user)/snap/notepad-plus-plus/common/.wine/
If you do copy ALL the .reg files, you will also port the application configuration. This also means Notepad++ running as Administrator (in Windows terms). But you don't need that, especially since snap packages are normally designed to run restricted (confined), with reduced access to system resources, so you can just copy the user.reg file, which contains the font declarations.
cp ~/.wine/user.reg /home/(user)/snap/notepad-plus-plus/common/.wine/
In this guide, I decided to do both, to show you that it works (either as user or admin). On a subsequent launch, Notepad++ was looking spiffy, and the fonts were big and dandy and sweet. I was also able to pin the application to the Plasma task manager, so this also saved me the hassle of doing any manual desktop configurations. In fact, this is a useful trick for any new WINE installation anywhere - you can port your old WINE files to new distros or systems.
The next thing I discovered is that the application comes without the Package Manager bundled - this is a new thing with Notepad++, regardless of how you set the program up. I decided to install it manually. The Plugin Manager is available on GitHub. Download it to your system. Then, extract the archive. In Notepad++, go to Settings > Import > Import plugin(s)... Locate the extracted archive and select PluginManager.dll file. On next application start, the Plugin Manager will be available.
However, it may not have a network connection, and you will see this error:
The thing is, you may assume that Notepad++ cannot connect to the Web, but this is not so. This is a long-standing issue with Plugin Manager in Notepad++, so you will need to make yet another small tweak to make everything peachy and dandy. Chiefly, in Plugin Manager, click on Settings, and then select Force HTTP instead of HTTPS for ... Restart the program again, and now you should have the full and mighty functionality available, including new plugins, updates for existing plugins and whatnot.
And that makes your Notepad++ perfect.
There are all sorts of ways you can get Notepad++ running in Linux. The idea is to have as seamless and elegant experience as possible. You can go full DYI, but then, you might not have timely enough updates for the program. Or you can use a combination of automation plus manual steps. Of course, the ultimate goal is not having to need Notepad++ in the first place, which means that Linux text editors need to up their game so they offer a comparable level of efficiency and flexibility.
In the Plasma desktop, the snap package offers some advantages over the DYI setup, but you do need to fix the fonts manually. That's a generic WINE problem, and hopefully, Linux desktops will soon have font and theming tweaks for Windows software just as they do for Qt and GTK frameworks, plus a seamless way of porting and migrating settings. Until then, you can rely on the tweaks shown in this guide to get along. Lastly, the Plugin Manager setup is not strictly related to the application setup per se, and yet it is, and it showcases nicely how you can manage Windows software, and that the underlying platform does not really matter. In the end, you have a dope text editor that does everything. Mission accomplished. See you around, childrens of the Internet.