Notepad++ has been the de facto standard for source code editors for nearly 16 years, almost since its creation in 2003. For Windows users, that is. For years, Linux users had no source code editor that compared to Notepad++ with all its bells and whistles, such as code folding, scripting, markup languages, syntax highlighting, auto-completion for programming (limited).
Not to mention the over 140 compatible plugins developed to support and enhance Notepad++.
Such is no longer the case. There are now dozens of comparable alternatives to Notepad++ for Linux users.
Best Notepad++ Linux Alternatives
Here are five Linux-based source code editors we think are the best. Not only are they the best, but all five we chose are cross-platform and all work on Linux, macOS, and Windows.
Bluefish offers developers a host of advanced features such as tag auto-completion, external program integration, auto-indentation, auto-recovery, full-screen editing, a powerful search and replace function and a multitude of others. Bluefish is a multilingual application, available in 17 languages with more translations actively being worked on.
The installation of Bluefish is simple, especially on a Debian/Ubuntu-base distro.
# sudo apt install bluefish
The latest version of Bluefish is version 2.2.10, available from their website.
Like all the applications featured in our article, Atom is a free and open-source that its developers’ bill as “A hackable text editor for the 21st Century.”
GitHub developed Atom based on Electron (formerly Atom Shell) using web technologies.
Atom has native support for dozens of different programming languages, Python, Perl, C/C++, Java, and CoffeeScript, among them. Atom also provides code folding, code completion, native support for GitHub, a built-in package manager, syntax highlighting, and a heap of others.
One of the coolest features of the Atom is its Teletype package. This package allows developers to code together in real-time using “portals” for sharing workspaces. A developer, the host, can open a portal, making their active tab a shared workspace where invited collaborators can join and make edits in real-time. All collaborators see all that’s happening in the portal as it occurs.
Atom ‘retired’ its IDE (integrated development environment) functionality in 2018. However, that feature is available by installing the atom-ide-ui along with the IDE language package you want (i.e., ide-php, ide-flowtype, etc.). Many other third-party packages and themes to customize the Atom’s features and looks are also available. Atom installs, manages, and publishes these via their package manager, apm. The vast majority of Atom’s functionality depends on the easy installation of these packages.
Installation of Atom, if you have Snap installed, is ironically a snap.
# sudo snap install atom
If you don’t have Snap installed, the installation of Atom is not so simple.
We must first get the Atom GPG key.
# wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add -
We then have to add the repository to our sources.list.d folder.
# sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list'
Let’s now update our system’s repository to ensure we get the latest available version of Atom.
$ sudo apt-get update
Finally, we can install the latest stable release of Atom.
$ sudo apt-get install atom
Atom 1.43.0 is the latest version of Atom and is available directly from their website.
3. Light Table
Light Table is a newer and lesser-known source code editor that bills itself as “the next generation code editor” with a claim of programming time reduction by up to 20%. The truth, however, is that Light Table is more of an IDE than it is a code editor.
Except for specific language clients, Light Table is written almost entirely in ClojureScript.
Like our previous three choices, Light Table works with most common programming languages, with the developers promising future support for more languages via plugins in the not-so-distant future.
Some other capabilities of Light Table are a Behavior-Object-Tag engine, keymaps, a roadmap, inline code evaluation, the opportunity to connect with other Light Table users, automatic update downloads, and file tree, navigation, and command panes.
Light Table is probably the most challenging source code editor on our list to install.
First, let’s download the latest release (currently 0.8.1).
# wget https://github.com/LightTable/LightTable/releases/download/0.8.1/lighttable-0.8.1-linux.tar.gz
Now, let’s extract the files using the tar command and then remove the original file.
# tar xzf lighttable*.tar.gz # rm lighttable*.tar.gz
Next, let’s move our unzipped folder to the opt directory.
# sudo mv lighttable-0.8.1-linux/ /opt
A directory named /opt/lighttable-0.8.1-linux is a bit ‘clunky’ to me. Let’s rename it to a more user-friendly name.
# sudo mv /opt/lighttable-0.8.1-linux /opt/LightTable
And since every great application needs a launcher file, let’s create on. We’ll name it light-table.desktop.
# sudo vi /usr/share/applications/light-table.desktop
Next, enter the following into our new file:
[Desktop Entry] Version=0.8.1 Name=Light Table GenericName=Source Code Editor Exec=/opt/LightTable/LightTable Terminal=false Icon=/opt/LightTable/resources/app/core/img/lticon.png Type=Application Categories=GTK;Utility;TextEditor;Application;IDE;Development;
And for our final trick, let’s create a symbolic link (symlink) to make it easy to launch Light Table from anywhere we are in the terminal.
# sudo ln -s /opt/LightTable/LightTable /usr/local/bin/light-table
Let’s test out our newly installed source code editor/IDE.
Version 0.89 is the most up-to-date version of Light Table. To download it, go to their website.
4. Visual Studio Code
I never thought I would write a Linux article that listed a Microsoft product in the best of the article, yet here we are. Not only is Visual Studio Code a Microsoft-developed source-code editor, but it is also free and open-source, free for private or commercial use.
Like Atom, Visual Studio Code is based on the Electron framework. However, Microsoft’s code editor uses the same editor, codenamed “Monaco,” used in Azure DevOps. Visual Studio Code includes basic support for most common programming languages out-of-the-box, with support for additional languages provided by freely available extensions in the VS Code Marketplace.
One of the coolest features of Visual Studio Code is its sidebar, which hosts the core features that developers interact with when they’re coding. Most everything else not included in the sidebar that you might need is but an extension installation away. Other unique features include IntelliSense, code debugging for the editor, git commands built into the sidebar, nightly build releases, an integrated terminal capable of handling multiple instances, and it’s vast ability to be customized via extensions and themes.
Visual Studio Code, like all packages, is easy to install if you have Snap installed.
# sudo snap install --classic code
If you don’t have Snap installed, you will either have to download the .deb for Debian/Ubuntu-based distros, or the .rpm file for Fedora/CentOS from the Visual Studio Code website.
However, if you’re using a Debian/Ubuntu-based distro, I recommend (as always) installing from the command line using repositories. There are several steps, but they are fairly straightforward.
First, let’s manually install the repository and key with the following three commands:
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg # sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/ # sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
Next, we’ll update the package cache and then install the Visual Studio Code package.
# sudo apt-get install apt-transport-https # sudo apt-get update # sudo apt-get install code
You’ll notice that you receive a “gpg: WARNING: unsafe ownership on homedir ‘/home/username/.gnup‘ error. This is normal and expected since we ran gpg with sudo (as root), but the home directory is still the user. Let’s fix it with two commands.
First, we have to kill the dirmgr socket since it’s running as root.
# sudo gpconf --kill dirmngr
Lastly, we restore ownership to ourselves.
# sudo chown -R $USER:USER ~/.gnupg
Visual Studio Code is easy to run from the terminal.
The latest version of Visual Studio Code is version 1.4.1 and available from Microsoft’s Visual Studio website.
As a long-time Linux and Unix user, I could not, in good faith, write an article on source code editor without bringing up Vim. For over 25 years, Vim has long been the tried-and-true go-to source code editor of choice for many Linux developers. It still is for many of them, myself included, on the now rare occasion I need to create or edit code.
Vim (VI IMproved) is a clone of the original Unix text editor, vi. It appeals to many Linux codes because of its minimal memory footprint. It’s highly configurable, it supports multiple windows and buffers, its command-centric, and there are many plug-ins available for Vim that can significantly extend Vim’s functionality. An additional bonus of Vim is its longevity. Not only is it the oldest source code editor on our list, but it is also the most rock solid.
Like most of the other source code editors in our list, installation of Vim is a straight-forward process on most Linux flavors, including Debian-based distros.
First, let’s ensure our repositories are up-to-date.
# sudo apt update
Now, let’s install Vim.
# sudo apt install vim
Vim enthusiasts may also be interested in Neovim, a fork of Vim with additions. Benefits of the fork are that both programs can share the same config file, and Neovim is compatible with most all of Vim’s features.
Vim is not as flashy and feature-filled as the other editors listed here. However, it gets the job done and done well. It has for over twenty-five years. Vim is an excellent alternative for us “old school” Linux users comfortable in the shell and the minimalistic look and feel we find so familiar and comforting.
The latest version, Vim 8.2, is available for download from the Vim website.
Whew! We’ve covered a lot of excellent source code and advanced text editors above, each one more than deserving of their article. All are just as good, if not better, than the old Windows standby, Notepad++.
Speaking of Notepad++, if none of our favorite alternatives appealed to you and you wish to stick with it, fret not. Notepad++ works just fine on Linux if you have Snap installed. However, realize that since it’s not natively developed for Linux and runs on Wine.
To install Notepad++ on your Linux distro:
# sudo snap install notepad-plus-plus
Notably absent from our list is Sublime Text 3. I agonized over adding it to this list for days, finally opting not to. I based my decision, not on the Sublime Text 3 features and functionality; it is just as good, if not better than any of the source code editors included here. However, Sublime Text 3 is free only for an evaluation period. If developers wish to continue using it, they must fork over $80 to do so. That’s not free and open-source, and this is FOSS Linux.
Was your favorite source code editor for Linux on the list? Was there one, or more, that we missed? Did we include an editor you don’t think belongs on the list? What’s your favorite source code editor, FOSS Linux readers? Please let us know in the comments below.