Disclaimer: ChatGPT generated document.
If you're working in a Unix/Linux shell, the "main" text editors are generally vi/vim, nano, and emacs. More recently, Neovim and editors like Helix have also become popular. Here's how they compare.
| Editor | Best for | Learning curve | Usually installed |
|---|---|---|---|
| vi | Emergency editing, POSIX systems | High | Almost always |
| Vim | Powerful editing, programming | High | Very common |
| Neovim | Modern Vim experience | High | Often installed separately |
| nano | Simple edits | Low | Very common |
| Emacs | Editing plus extensive customization | High | Sometimes |
| Helix | Modern modal editing | Medium | Usually separate install |
vi is the original Unix screen editor, dating back to the 1970s. It was designed for slow terminals and remains part of the POSIX standard.
Strengths:
- Available on nearly every Unix-like system
- Lightweight and fast
- Essential for system administration and recovery environments
Weaknesses:
- Modal editing can be confusing at first
- Limited compared to modern descendants
Basic commands:
i enter insert mode
Esc return to command mode
:w save
:q quit
:wq save and quit
:q! quit without saving
Vim is the most widely used evolution of vi. It keeps the modal editing model while adding many features.
Features include:
- Syntax highlighting
- Multiple undo levels
- Split windows
- Macros
- Powerful search and replace
- Plugin ecosystem
Programmers often like Vim because almost everything can be done from the keyboard.
Example:
vim file.txtNeovim is a modern fork of Vim that focuses on:
- Better plugin architecture
- Faster development
- Built-in Language Server Protocol (LSP) support (with configuration)
- Improved scripting via Lua
Many developers who use Vim today have migrated to Neovim because of its modern ecosystem.
Nano is designed to be simple and approachable.
Advantages:
- No modes
- Shortcut keys are displayed at the bottom
- Easy to learn in minutes
Example:
nano notes.txtCommon shortcuts:
Ctrl+O save
Ctrl+X exit
Ctrl+K cut line
Ctrl+U paste
Ctrl+W search
If you've never used a terminal editor before, Nano is usually the easiest starting point.
Emacs is much more than a text editor—it's often described as an entire computing environment.
Capabilities:
- Programming
- Calendar
- Terminal emulator
- Git integration
- Note-taking
- Window management (with extensions)
Pros:
- Extremely customizable
- Huge package ecosystem
Cons:
- Large and complex
- Many keyboard shortcuts to learn
Example:
emacs file.txtHelix is a newer editor inspired by Vim but designed around modern language features.
Highlights:
- Modal editing
- Multiple cursors
- Built-in syntax highlighting
- Tree-sitter parsing
- Built-in LSP support
Many users find it easier to learn than Vim because it has sensible defaults and less configuration.
One major distinction is how they handle editing.
Modal editors (vi, Vim, Neovim, Helix):
- Different modes for commands and text insertion
- Extremely efficient once learned
- Better for heavy keyboard use
Non-modal editors (Nano, Emacs by default):
- Typing always inserts text
- Commands use key combinations
- Easier for beginners
- Complete beginner: Nano
- System administrator: Vim (and basic
vi) - Software developer: Neovim or Vim
- Power user who wants an extensible environment: Emacs
- Modern alternative with fewer configuration hassles: Helix
For many people, a practical progression is:
- Learn Nano to become comfortable editing files in the terminal.
- Learn the basics of Vim, since it's available on almost every Unix-like system.
- If you enjoy Vim's workflow, consider Neovim or Helix depending on your preferences.
