Skip to content

Instantly share code, notes, and snippets.

@MangaD
Created August 2, 2026 16:55
Show Gist options
  • Select an option

  • Save MangaD/7a814a27af3b0cccfd976b8c5c1e9c62 to your computer and use it in GitHub Desktop.

Select an option

Save MangaD/7a814a27af3b0cccfd976b8c5c1e9c62 to your computer and use it in GitHub Desktop.
Main Shell Editors: A Guide to Terminal-Based Text Editors

Main Shell Editors: A Guide to Terminal-Based Text Editors

CC0

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

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 (Vi IMproved)

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.txt

Neovim

Neovim 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

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.txt

Common 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

Emacs is much more than a text editor—it's often described as an entire computing environment.

Capabilities:

  • Programming
  • Email
  • 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.txt

Helix

Helix 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.


Modal vs. non-modal editors

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

Which one should you choose?

  • 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:

  1. Learn Nano to become comfortable editing files in the terminal.
  2. Learn the basics of Vim, since it's available on almost every Unix-like system.
  3. If you enjoy Vim's workflow, consider Neovim or Helix depending on your preferences.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment