So you’ve finally decided to make the switch, and it’s time to toss Windows aside. For many, one of the most challenging tasks in moving to Linux is what program or application should they use to edit their text.
I know that was something that challenged me when installing Linux on my dual boot (Windows & Ubuntu). If you are looking for a solid text editor that can handle everything from writing documents to editing code, then you’re in luck.
Sublime Text
What makes Sublime Text stand out is its ability to make use of each OS’ native functionalities. That makes Sublime Text one of the more resource-efficient options.
Pros: Sublime Text is highly customizable, both in appearance and in functionality (using plugins). In addition to having many of the basic editor features (like colored syntax and searchability), Sublime adds a Goto Anything feature. You can search inside or outside the application or open and manipulate files with a quick keystroke. It also allows multiple selections, so you can highlight multiple lines and edit them all at once.
Cons: Sublime Text has a steep learning curve even though it’s designed to simplify workflows. You can use it free of charge, but it has a very intrusive popup system asking users to buy a license.
How to Install
Sublime Text is not a default application on most Linux installations. Install it with the following command:
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt update
sudo apt install sublime-text
Vim
Almost all Linux distributions, even older versions, come with the Vim editor installed. Vim stands for Vi Improved, meaning that Vim is a modified and improved version of the old Vi text editor.
Pros: Vim supports automatic commands, digraph inputs (useful in programming), split and session screens, tabs, colored schemes (color-coded by function), and tagging. It can be configured with plugins and comes with a tutorial (invoked with the vimtutor
command). When you master the commands, Vim is very efficient.
Cons: It does not have a GUI. The only way you can initiate Vim is from the command line. The interface is user-unfriendly, while some commands are not intuitive. Coding a file from scratch would be too complicated. The learning curve can be steep, but Vim is very popular in the Linux community.
Nano Editor
Nano is a revision of an older editor called Pico and comes pre-loaded on most Linux installations. Nano is an ideal lightweight editor for beginners. It’s a lot easier to use than Vim, so it’s worth learning Nano for quick configuration edits.
Pros: It supports GNU Autoconf, interactive search-and-replace, auto-indent, and spellcheck. Nano is intuitive and easy to use. It lists the keystroke commands at the bottom of the editor, so you don’t have to memorize or look them up.
Cons: The list of commands is short and some may be unintuitive.
Atom
Atom is a popular open-source code/text editor that works across several platforms such as Windows, Mac, or Linux. Atom is also considered to be one of the best Python code editors.
Pros: Atom has color-coded syntax, a smart autocomplete feature, multiple panes, and a search-and-replace feature. It also has its own package manager for plugins, so you can easily expand its functionality. You can also customize the appearance manually by using themes. A new plugin – called teletype – allows you to share workspaces with other Atom users.
Cons: Most users will have to tweak the default configuration. Low-spec computers will struggle to run Atom, especially if you load multiple projects.
How to Install
Atom is not typically included in a default Linux installation. Install it with the following commands:
sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update
sudo apt-get install atom
For RedHat or CentOS systems, use the yum install
command instead of apt-get install.
Atom is a modern and sleek-looking open-source editor for programmers. Atom was developed by GitHub and promoted as a “hackable text editor for the 21st century”.https://imasdk.googleapis.com/js/core/bridge3.484.0_en.html#goog_1556341401
Atom became popular even before its first stable release. Based on its excellent list of features, I can certainly mention it as one of the best text editors for Ubuntu, or any other operating system for that matter.
Don’t just take my word for it. Have a look at some key features of the Atom code editor:
- Easily extensible
- Built-in package manager with a huge number of plugins available
- Smart autocompletion
- Split windows
- Cross-platform
- Embedded Git control
- Command palette support
Atom offers .deb and .rpm packages on their official website. You can also follow our tutorial to easily install Atom on Ubuntu and Fedora-based Linux distributions.
In either case, you can also head to their GitHub page to explore more.Atom
Gedit
Gedit is a text editor that comes with the GNOME desktop environment. The design emphasizes simplicity so gedit is a great editor for beginners. Even though simple in design, gedit is a powerful tool.
Pros: The uncomplicated interface includes clipboard support, multilanguage spellchecking, undo/redo, syntax highlighting for various languages (C, C++, Java, Python, etc,), color-coded syntax, and has a flexible plugin system.
Cons: This editor works well if you do not need too many features, or if you simply prefer a clean interface. Gedit works great with GNOME, but there are better options for other desktop environments.
How to Install
On older versions of Linux, or versions without GNOME, it may not come pre-installed. Install gedit with the following command:
sudo apt-get install gedit
Note: Can’t decide between CentOS and Ubuntu? Read our CentOS vs Ubuntu comparison article.
Visual Studio Code
If you’ve installed Anaconda on Linux, you may be familiar with the option to install Microsoft Visual Studio Code. Even though it’s from Microsoft, VSCode is cross-platform, meaning it works on Windows, Linux, and Mac.
Pros: Visual Studio Code is lightweight but powerful, and it offers an extensive library of add-ons. These include additional programming language support, debuggers, and commands. This text editor is an excellent choice for developing JavaScript applications and working in cross-platform environments.
Cons: Compared to other text editors on this list, VSCode might not always run properly on Linux, especially Ubuntu. It is also known to use a lot of memory and CPU resources. Furthermore, it may run slower compared to other text editors.
How to Install
Install VSCode with the following command:
sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make
GNU Emacs
GNU Emacs is a text/code editor for Linux professionals created by Richard Stallman, the founder of the GNU project. Emacs allows you to write code, display a manual, or draft an email from the same interface.
Pros: It has content-aware editing modes, extensive documentation and a tutorial, incredible language support, and a package manager for extensions. It also offers cross-compatibility with other GNU apps, including an organizer, mail app, calendar, and debugger.
Cons: It’s not for everyone. You might choose Emacs if you have multiple different tasks and want a standard interface. It’s designed for the Linux power user, so if that’s you, it’s worth a try.
How to Install
Install GNU Emacs with the following command:
sudo add-apt-repository ppa:kelleyk/emacs
sudo apt update
sudo apt install emacs26
Visual Studio Code
Visual Studio Code is a popular code editor from Microsoft. Now don’t push the panic button just yet. Visual Studio Code is completely open-source.
In fact, Visual Studio Code was among the first few ‘peace offerings’ from Microsoft to the Linux and open-source world.
Visual Studio Code is an excellent code editor for all kinds of tasks. It’s lightweight as well. Some key features are:
- Intellisense provides useful hints and auto-completion features
- Built-in Git support
- Built-in extension manager with plenty of extensions available to download
- Integrated terminal
- Custom snippet support
- Debugging tools
- Support for a huge number of programming languages
- Cross-platform
Installing Visual Studio Code on Ubuntu and other distributions such as Fedora-based ones is very easy, thanks to Snap and Flatpak packages.
Alternatively, you can also download .deb/.rpm packages for Ubuntu, Fedora, and other Linux distributions from its official website.Visual Studio Code
VSCodium
If you want to get rid of the telemetry, branding, and licenses of Visual Code Studio, VSCodium is for you.
VSCodium is essentially the same minus Microsoft telemetry and branding.
You can find .deb/.rpm packages along with files for Windows or ARM-based systems on their GitHub page. If you prefer to use Flatpak, you can also find it listed on Flathub. For reference, you can take a look at our Flatpak guide for help.VSCodium
Kate
Kate is an underrated modern text editor developed by KDE.
Kate can prove to be a potential alternative to Microsoft’s Visual Studio Code. It may not offer the same features/plugins that you find with Visual Studio Code, but you should get all the essentials to get started.
Some of the features are:
- Split window
- Multiple document editing
- Session support
- Code folding
- Cross-platform support
- Integrated Git support
- Autocomplete feature
- Plugins to extend functionality
If you want a different code editor with similar features as VS Code, you should try Kate editor.
You can find an AppImage file and a Snap package to install it on any Linux distribution.
In either case, you may find it listed in your software center (check for the version available), or you can build it from the source.Kate Editor
CudaText
CudaText is a neat open-source text editor which is a cross-platform option that also includes Linux support.
It may not be the best there is, but it is suitable for HTML/CSS coding; it gives you the ability to tweak the editor’s theme with a couple of options available.
If you want a simpler and faster solution with a modern look/feel, you should try CudaText. Here are some key features that it offers:
- Syntax highlighting
- Code tree
- Code folding
- Binary/hex viewer
- Cross-platform support
You can get the latest release files to install from FossHub. Also, you may check our separate article on CudaText to explore more about it and how to install it.
In either case, head to their official website for more information.CudaText
Gedit
If you want a simple yet elegant experience, Gedit is a great option.
Of course, it may not give you a rich UI—but it is a clean and modern-looking text editor compared to some others.
Some of the key features it offers are:
- Full support for internationalized text
- Syntax highlighting
- Word auto-completion
- Spell-checking
- Text wrapping
- Cross-platform
It comes pre-installed by default on Linux distributions with the GNOME desktop environment. But, if you do not have it installed, you can install it from your respective package manager or the Software Center.
You can even find it available for Windows 10 and macOS. For more details, you should check out their official GNOME wiki page.Gedit
Lite
A fairly new text editor for coding on Linux (and for Windows as well). When compared to others, this editor aims to provide a fast experience without compromising the user experience.
Unfortunately, as of now, there’s no easy way to install it; you have to build it from source on Linux.
Conclusion
There are tons of text editors out there to choose from in Linux. Each one is better at doing certain things compared to others. Some like Atom, Brackets, Vim and even Sublime Text support modern front-end frameworks like AngularJS, ReactJS, Sass, Less.