Articles

Best Programming Text Editors for Linux Compared by Use Case

In short: the best programming text editor for Linux depends on where you write code. On a desktop, if you want things to work out of the box, pick Visual Studio Code, or VS Code (or VSCodium, its build without Microsoft telemetry). If you spend your days in a terminal or over SSH (Secure Shell, the protocol for logging in to remote machines), learn Neovim or Vim. Look at Helix if you want modern features with almost no configuration. Best Editor for linux and programming is a useful companion to this.

Those three answers cover most developers. The rest of this guide explains why and compares ten editors by use case. It also shows how to set one up for C and systems work, where a badly configured editor costs you hours. We focus on what each tool is good at, what it costs you in learning time and memory, and when you should pick something else.

Text editor or full development environment: what you actually need

A text editor opens files and helps you change them. An IDE (integrated development environment) adds a build system, a debugger, project management and refactoring tools in one window. The line has blurred, because modern editors borrow most IDE features through plugins.

The mechanism behind that shift is worth knowing, because it explains why a small editor can now feel smart.

Most editors no longer understand your language themselves. They talk to a separate program, a language server, through the Language Server Protocol (LSP), which Microsoft published as an open standard. Your editor asks the language server questions about the project: where is this function defined, what can I type here, which line has an error. One server, such as clangd for C and C++ or pyright for Python, then serves every editor that speaks LSP.

Syntax highlighting has gone through a similar change. Many editors now use tree-sitter, a parser that builds a real syntax tree instead of matching regular expressions, so colours, code folding and selection follow the structure of the code.

So the useful questions are these:

  • Do you need a graphical user interface (GUI), or will you often edit code on remote servers through a terminal?
  • Does the editor have a mature LSP client, so code completion and code navigation, such as go-to-definition, work for your language?
  • How much configuration are you willing to maintain?
  • How much memory can you spare on the machine where you code?

Some readers find full IDEs heavy: they generate project files nobody explains, and they hide the compiler behind buttons. On Linux, that’s a fair objection. An editor plus make, gcc and gdb in a terminal keeps you close to the tools you will use in production. An IDE wins on large Java or Kotlin codebases, where its refactoring engine saves real time.

linux code editor

The best programming text editor for Linux: ten editors side by side

The table sums up the trade-offs. “Learning curve” is our judgement for someone who already codes, not a measured score. All the licenses listed are open source except the proprietary ones.

MIT (Massachusetts Institute of Technology) names a short permissive license, and MPL is the Mozilla Public License. GPL is the General Public License of GNU (the free software project started by Richard Stallman). LGPL (Lesser GPL) and AGPL (Affero GPL) are its variants for libraries and network software.

Editor Interface License Learning curve Extensibility LSP support
Vim Terminal (gVim for GUI) Vim license (open source) Steep Vimscript plugins Through plugins
Neovim Terminal Apache 2.0 Steep Lua plugins, very large Built-in client
Helix Terminal MPL 2.0 Medium Config only, no plugin system yet Built-in
Micro Terminal MIT Flat Lua plugins Limited
GNU Emacs GUI and terminal GPL Steep Emacs Lisp, almost unlimited Built-in (Eglot)
VS Code / VSCodium GUI (Electron) Proprietary build / MIT Gentle Huge extension marketplace Built-in, the reference
Sublime Text GUI Proprietary, paid license Gentle Python packages Through the LSP package
Kate GUI (KDE) LGPL / GPL Gentle Plugins Built-in plugin
Geany GUI (GTK) GPL Gentle Plugins Through a plugin
Zed GUI (GPU rendering) GPL / AGPL Gentle Extensions, younger ecosystem Built-in

Terminal editors: Vim, Neovim, Helix, Micro and Nano

Terminal editors run anywhere a shell runs: on a headless server, inside a container, over a slow SSH link. That alone makes them worth knowing for anyone doing systems programming.

Vim

Vim is modal: you switch between a mode for typing text and a mode where every key is a command. That’s the source of both the learning curve and the speed, because commands combine like words (d for delete, w for word, so dw deletes a word).

Vim, or at least its ancestor vi, is present on nearly every Unix-like system, which is why experienced admins keep telling newcomers to learn it. Regex find and replace (:%s/old/new/g) and recorded macros (q) make bulk edits fast. Its weakness is configuration: getting LSP, linting and a file tree working takes plugins and an evening of reading.

Neovim

Neovim is a fork of Vim that keeps the same editing model but adds a built-in LSP client, tree-sitter support and configuration in Lua instead of Vimscript. It has become the default choice for developers who want Vim’s speed with IDE features. If you don’t want to build a config from scratch, a starter distribution such as LazyVim or kickstart.nvim gives you a working setup in minutes.

Our advice: start with kickstart.nvim, which is a single commented file you can read and own. computerworld.com has a solid rundown on this.

Helix

Helix is a modal editor written in Rust with LSP, tree-sitter, fuzzy file search and multiple cursors built in. You select first and then act (w then d), the reverse of Vim. Its strength is that it works well with an almost empty config file. Its weakness is that it has no plugin system yet, so if a feature is missing, you wait.

Micro and Nano

Micro is a terminal editor with familiar keyboard shortcuts (Ctrl+S to save, Ctrl+Q to quit), mouse support and syntax highlighting for many languages. It’s the editor to hand someone who needs to fix a config file on a server and doesn’t want to learn modes. Nano plays the same role with fewer features and is the default editor on Debian and Ubuntu. Neither is a serious environment for a large codebase.

linux code editor

GUI editors: VS Code, VSCodium and Sublime Text

Visual Studio Code and VSCodium

VS Code is the most used development environment in the Stack Overflow Developer Survey, and for good reasons. It offers language support through extensions, an integrated terminal, Git integration, a debugger and remote development over SSH. Because Electron (a framework that runs desktop apps on a bundled browser engine) powers it, it uses noticeably more memory than a native editor.

Microsoft’s build sends telemetry, which you can lower with the telemetry.telemetryLevel setting. VSCodium is a community build of the same open source code without Microsoft branding and telemetry. It uses Open VSX, an open extension registry run by the Eclipse Foundation, where a few Microsoft extensions are missing.

Sublime Text

Sublime Text is fast, native and polished, with excellent multi-cursor editing and a “Goto Anything” palette. It’s not open source. The free version is an unlimited evaluation, but it regularly reminds you to buy a license, sold at $99 for personal use. LSP support comes from the community LSP package rather than the core.

Kate, Geany, Emacs, Zed and the default desktop editors

Kate

Kate is the code editor of the KDE project, and it’s far more capable than its simple look suggests. It has a built-in terminal panel, sessions, a Git panel and an LSP client plugin. On a KDE Plasma desktop it’s the obvious native choice, and it runs fine under GNOME (the default desktop environment of Ubuntu and Fedora) too. This is the sort of thing a solid web development agency ships without fuss.

Geany

Geany is a small GTK editor that behaves like a lightweight IDE. Written in C, it starts almost instantly. It can compile and run the current file with one key, has a symbol list, and embeds a terminal emulator. It suits students and older machines.

GNU Emacs

Emacs is less an editor than a Lisp environment that edits text, mail, Git repositories (with Magit) and notes (with Org mode). Since Emacs 29 it ships Eglot, an LSP client, and tree-sitter support. Its built-in package manager installs extensions from repositories such as MELPA (Milkypostman’s Emacs Lisp Package Archive). Expect a lot of configuring, or start from a distribution such as Doom Emacs, which also brings Vim-style keys.

Zed

Zed is a newer editor written in Rust with GPU rendering, built-in LSP and real-time collaboration. It now ships official Linux builds, after starting on macOS. Its plugin ecosystem is smaller than VS Code’s. It feels very fast, which matters most when you open multiple files in a large repository.

The default editors: gedit and GNOME Text Editor

Gedit and its successor, GNOME Text Editor, are fine for notes and quick edits with syntax highlighting. Their developers didn’t design them for programming projects.

Two once-popular editors you’ll still see in older lists have ended. GitHub archived Atom in December 2022, and the community now maintains a fork called Pulsar. Adobe ended Brackets, which lives on as Phoenix Code. Don’t start a new setup on either.

linux code editor

Web development, version control and installation

Many Linux programmers also write HTML, CSS and JavaScript. VS Code covers web development best, with Emmet abbreviations and extensions for every framework. Phoenix Code, the successor of Brackets, adds a live preview that updates the page as you type. Zed and Sublime Text handle large JavaScript projects comfortably too.

Version control integration matters more than any theme.

VS Code, Kate, Zed and Sublime Merge (Sublime’s companion app) show changed lines in the margin and let you stage hunks. In Emacs, Magit is so good that some developers keep Emacs just for Git. In Neovim, plugins such as gitsigns and fugitive do the same job. Terminal users can of course keep git open in a second pane.

Install editors through your distribution’s package manager when the packaged version is recent enough, since updates then arrive with the rest of the system.

For example, sudo apt install vim geany kate on Debian or Ubuntu, or sudo dnf install neovim on Fedora. VS Code and Sublime Text publish their own repositories for apt and dnf. Snap and Flatpak packages work too, but read the sandbox pitfall below first. Most editors in this list are cross-platform, so the same configuration follows you to macOS and Windows whatever your operating system at work.

When an IDE beats an editor

An editor plus language servers covers C, Go, Rust, Python and shell scripting well. Full IDEs still earn their memory in a few cases:

  • Java and Kotlin: IntelliJ IDEA (the Java IDE from JetBrains) in its free Community Edition, or Eclipse, for refactoring across thousands of classes.
  • Large Python projects with databases and test runners: PyCharm.
  • GNOME and GTK 4 applications: GNOME Builder, which knows the platform’s build system and libraries.
  • C and C++ with a visual debugger: KDevelop, Code::Blocks or Qt Creator.

If you have little memory (RAM), test before you commit. A JetBrains IDE indexing a big project alongside a browser can make a laptop crawl, and a terminal editor won’t.

linux code editor

Pick by situation

If you are… Choose Avoid
A beginner on a desktop VS Code or VSCodium Starting with Vim and a 40-plugin config
Mostly working over SSH on servers Neovim or Vim, plus basic vi skills A GUI editor that only works locally
A C or kernel developer Neovim, Emacs or VS Code with clangd Editors that convert tabs to spaces by default
On an old laptop with 4 gigabytes of RAM Geany, Kate, Helix or Micro Electron editors next to a heavy IDE
Wanting modal editing without configuration Helix Hand-building a Neovim config
Privacy-minded VSCodium, Kate, Neovim Microsoft’s VS Code build with default telemetry
Someone who just edits config files Micro or Nano Learning a full IDE for that

Here’s our opinion on the old editor war: learn enough vi to edit a file on any machine, then use whatever makes you productive for daily work. Those two skills don’t compete.

How to set up an editor for C and systems programming

For C, everything hinges on one file. clangd needs compile_commands.json, a list of the exact compiler flags for every source file. Without it, the server guesses, and your editor marks every #include as an error.

Step 1: generate the compilation database

  1. Install the tools: sudo apt install clangd bear (Debian, Ubuntu) or sudo dnf install clang-tools-extra bear (Fedora).
  2. For a Makefile project, run make clean, then bear -- make. Bear records each compiler call into compile_commands.json.
  3. For CMake, add -DCMAKE_EXPORT_COMPILE_COMMANDS=ON to the configure command.
  4. For the Linux kernel, build once, then run scripts/clang-tools/gen_compile_commands.py from the source tree.

Step 2a: Neovim

  1. Install Neovim from your distribution or the project’s release page, and check the version with nvim --version.
  2. Clone kickstart.nvim into ~/.config/nvim, start nvim and let it install its plugins.
  3. In the config file init.lua, enable clangd in the list of language servers.
  4. Run :checkhealth to see missing tools, then open a .c file. Use gd to jump to a definition.

Step 2b: VS Code or VSCodium

  1. Install the clangd extension, published by LLVM (the open source compiler project behind Clang).
  2. If you also installed Microsoft’s C/C++ extension, turn off its IntelliSense engine (C_Cpp.intelliSenseEngine set to disabled) so the two don’t fight.
  3. Open the folder that contains compile_commands.json. Errors on includes should disappear.
  4. For remote boxes, use the Remote – SSH extension so the language server runs on the server, next to the headers.

Then follow the house style. The Linux kernel coding style asks for tabs that are 8 characters wide. An .editorconfig file at the project root tells most editors which indentation to use, so one file keeps Vim, VS Code and Kate users consistent.

linux code editor

Five pitfalls that waste the most time

  • make stops with “missing separator” → your editor replaced the tab at the start of a recipe line with spaces. Make requires a tab there → turn off “insert spaces” for Makefiles. You can also set [Makefile] indent_style = tab in .editorconfig.
  • Every #include underlined in red → clangd has no compilation database → generate compile_commands.json as shown above, at the project root.
  • VS Code’s terminal can’t find your compiler or gdb → you installed a Flatpak build, which runs in a sandbox → install the .deb or .rpm package instead. You can also call host tools through flatpak-spawn --host.
  • Neovim takes seconds to open → too many plugins load at startup → run nvim --startuptime startup.log, find the slow plugin and lazy-load it or remove it.
  • Stuck inside Vim → you’re in a mode you didn’t expect → press Esc, then type :q! to quit without saving or :wq to save and quit. Run vimtutor once: it walks you through the basics in a single sitting.

How to measure whether an editor suits your machine

Opinions on “lightweight” vary, so measure on your own hardware. Open your real project, wait until indexing ends, then check memory with ps -o rss,comm -C code (replace code with nvim, kate or another process name). The RSS column (resident set size) is the memory in use, in kilobytes. Count the language server too, since clangd on a large tree can use more memory than the editor itself.

For speed, time how long the editor takes to open a large file, and how long completion takes to appear in your biggest source file. Then give your choice two weeks before judging it, because every editor feels slow while your hands are still learning it. Keep your configuration in a Git repository of dotfiles, so you can roll back a change and reuse the same setup on every machine.

Checklist before you settle on an editor

  1. Decide whether you need a GUI, a terminal editor, or both.
  2. Check that the editor has an LSP client and a language server for each programming language you use.
  3. Generate compile_commands.json for C and C++ projects.
  4. Add an .editorconfig to each project, with tabs for Makefiles.
  5. Learn basic vi commands, whatever your main editor is.
  6. Measure memory with your real project open.
  7. Turn off telemetry you don’t want, or use a build without it.
  8. Put your configuration in a dotfiles Git repository.

Your next step is simple. Pick one editor from the “pick by situation” table and set it up on one real project this week. Only switch if a concrete problem remains after two weeks. Browse our other guides on Unix and Linux programming to sharpen the toolchain around it, from make to gdb.

FAQ

Does anyone still use Vim?

Yes, widely, both as Vim itself and through Neovim. Vim key bindings also exist as extensions for VS Code, JetBrains IDEs and Emacs, so the editing model has outlived any single program.

Does Linux have a built-in text editor?

Almost every Linux distribution ships at least one. Most include vi or Vim and Nano in the base system, and desktop editions add a graphical editor such as GNOME Text Editor or Kate.

What are the three types of editors?

The classic answer is line editors, stream editors and screen editors. ed edits one line at a time, while sed transforms text as it flows through a pipe. Screen editors such as vi and Nano show the file you’re changing on screen. Much the same conclusion turns up on linuxandubuntu.com.

Which is the lightest IDE on Linux?

Geany is usually the lightest tool that still behaves like an IDE, with build commands, a symbol list and a terminal. If you accept a terminal interface, Neovim or Helix with a language server gives you more features for less memory.

Can I run Notepad++ on Linux?

Notepad++ is a Windows program. On Linux it runs through Wine, the Windows compatibility layer, including in unofficial Snap packages that bundle it. A native editor such as Kate, Geany or Notepadqq gives you a similar experience without the compatibility layer.

Is VS Code open source?

The source code, called Code – OSS (open source software), is under the MIT license, but the build Microsoft distributes adds proprietary parts and its own license. VSCodium packages the open source code without those parts.

Latest Posts

No Posts Found!

Banner of the Day

NewsLetter

Do not miss our news
Sign up and receive the latest news of our company
Newsletter

Contact Info
Copyright © 2022 I-4 Linux. All Rights Reserved.