Choosing Your Editor

nano vs vim isn't a religious war. They're tools. Use the right one.

When to Use nano

Quick config edits:

Terminal
$sudo nano /etc/hosts
(add a line, save, done)

You need to edit something NOW:

  • You're on a server you've never used
  • The server might not have vim
  • You forgot vim commands

You're new to Linux:

  • nano has visible shortcuts
  • No modes to confuse you
  • Just works

When to Use vim

Extended editing sessions:

  • Writing scripts
  • Coding
  • Editing multiple files

You're editing remotely often:

  • vim keybindings become muscle memory
  • Much faster once proficient

The file requires complex edits:

  • Multiple search/replace
  • Block editing
  • Macro automation

The Practical Approach

Most working developers use both:

Quick fix on server     → nano
Writing a script        → VS Code (local) or vim (remote)
Editing .bashrc         → nano or vim (both fine)
Complex log parsing     → vim
Emergency config fix    → nano (no thinking required)

Learn Both

Be comfortable in nano (5 minutes to learn). Get decent at vim (invest the time). Use whatever fits the situation.

vim Keybindings Everywhere

Even if you don't use vim directly, learn the keybindings:

  • VS Code: vim extension
  • JetBrains IDEs: IdeaVim plugin
  • Sublime Text: Vintage mode
  • Browser: Vimium extension

The skills transfer. Navigate with hjkl, search with /, delete with d.

Other Options

emacs

The other major terminal editor. Very powerful, steep learning curve.

Terminal
$emacs file.txt
(if you're into that)

Pro: Extremely customizable, built-in everything Con: Complex keybindings, Emacs pinky

Micro

Modern terminal editor. Familiar shortcuts (Ctrl+S to save).

Terminal
$micro file.txt
(if installed)

Like nano but with modern features.

Remote Editing

Edit remote files with local editor:

Terminal
$# VS Code Remote SSH
$code --remote ssh-remote+user@host /path/to/file

Best of both worlds - your fancy editor, remote files.

My Recommendation

  1. Learn nano basics (10 minutes)

    • Good enough for most quick edits
    • Zero learning curve
  2. Learn vim essentials (a few hours)

    • :wq, i, dd, /search, :%s/old/new/g
    • Practice with vimtutor
  3. Use your preferred GUI editor for real work

    • VS Code, Sublime, whatever
    • Install vim keybindings if you want speed
  4. Level up vim gradually

    • Learn one new command per week
    • Eventually you'll be fast
Terminal
$vimtutor
(built-in vim tutorial - 30 minutes well spent)
Knowledge Check

When would nano be a better choice than vim?

Editor Comparison

Featurenanovim
Learning curveMinutesHours/Days
Visible shortcutsYesNo
Speed ceilingLowVery high
Available everywhereYesUsually
Complex editsLimitedPowerful
Scripting/MacrosNoYes

Key Takeaways

  • nano for quick edits, vim for extended editing
  • Learn both - they serve different purposes
  • vim keybindings transfer to other editors
  • Run vimtutor if you want to improve
  • Don't let editor choice slow you down
  • The best editor is the one that gets the job done

Congratulations! You've completed Chapter 11: Text Editors.

Next chapter: Shell Scripting - automate everything.