Choosing an Editor: vim, nano, emacs, and VS Code

Choosing an Editor: vim, nano, emacs, and VS Code

Which Editor Should You Use?

You typed vim, the screen changed, and suddenly you couldn't get out. Almost everyone learning Linux hits this wall once. There are so many text editors — vim, nano, emacs, VS Code — and yet nobody really tells you which one to use.

This guide untangles the differences between four popular editors (vim, nano, emacs, and VS Code) and which one a beginner should start with — all through a conversation between Lina and Linny-senpai.

What You'll Learn

  • Why there are so many kinds of editors
  • The strengths of nano, vim, emacs, and VS Code
  • How the four editors differ in learning curve and use case
  • Which editor a beginner should start with, and when to switch
  • How to escape the dreaded "I'm stuck in vim" in one move

1. Why Are There So Many Editors?

Conclusion: Editors evolved for different jobs — "quickly fix something on a server" versus "settle in and develop" — so several options grew up for different purposes.

Lina: Linny-senpai, why are there so many text editors? One would be enough...
Linny-senpai: Good question. It's because the "right" editor changes depending on where and what you're editing.
Lina: It depends on the situation?
Linny-senpai: Right. Say you SSH into a server to fix one line in a config file. Rather than launching a heavy development tool, you want something you can open and fix right inside the terminal. But if you write an app with hundreds of files every day, a feature-rich editor with strong completion and search is far more comfortable.
Lina: I see — the "right tool" grew up for each situation.
Linny-senpai: Exactly. So the answer isn't "which one is best," but "when do I use which."

CUI editors vs GUI editors

  • CUI (inside the terminal): nano, vim, emacs. They run even over SSH on a remote server.
  • GUI (window app): VS Code. Mouse and menus, strong for large-scale development.

CUI editors run anywhere. GUI editors are comfortable for local development. Keeping that split in mind makes everything easier.

2. What Is nano?

Conclusion: nano is the most beginner-friendly CUI editor — it always shows the key commands along the bottom of the screen. Perfect for "just fix it."

Lina: I want to start with the easiest one!
Linny-senpai: Then that's nano. The great thing about nano is that the keys you can press are always shown at the bottom of the screen. So even if you don't remember the commands, you won't get lost.
Lina: It's like having a cheat sheet built in.
Linny-senpai: Exactly. For example, ^X means "hold Ctrl and press X" to quit. The ^ symbol stands for the Ctrl key.
nano memo.txt

Once nano starts, you can just type to edit. To quit, press the keys shown below.

^X Exit    ^O Save    ^W Search    ^K Cut line
(^ means the Ctrl key)

nano basics

  • Save: Ctrl+O (Write Out), then Enter to confirm
  • Quit: Ctrl+X
  • Search: Ctrl+W

You move the cursor with the arrow keys, and there are no special "modes." It feels closest to Notepad on Windows.

When in doubt, start with nano. It comes pre-installed on most Linux systems, and for small edits to a config file on a server, nano is more than enough.

3. What Is vim?

Conclusion: vim is a powerful CUI editor that lets you edit fast with the keyboard alone. It has "modes" — once you get used to it, it's the fastest, but the learning curve is steep.

Lina: Once I opened vim and couldn't get out. I panicked...
Linny-senpai: That's a classic. vim has this idea of "modes," and if you don't know about them, it's easy to panic.
Lina: Modes?
Linny-senpai: Right. When vim starts, it's in "normal mode," where keys act as commands, not text input. To type characters, you press i to enter "insert mode."
Lina: So that's why nothing worked normally when I typed...!
Linny-senpai: Exactly. And to get out, you first press Esc to return to normal mode, then :q to quit. Once you know that, vim isn't scary anymore.
vim config.txt

Here are the three most important commands for escaping vim safely.

i        Enter insert mode (you can type now)
Esc      Return to normal mode
:wq      Save and quit
:q!      Quit without saving (force)

How to escape "I'm stuck!"

  1. Press Esc first (no matter which mode you're in, this returns you to normal mode)
  2. To save and quit, type :wq and press Enter
  3. To discard your edits and quit, type :q! and press Enter

Typing : lets you enter a command at the bottom of the screen. The trick is to stay calm and always start with Esc.

vim is tough at first, but its biggest appeal is editing fast without lifting your hands from the home row. Server administration often assumes vim, so learning the minimum (open, edit, save, quit) gives you peace of mind.

4. What Is emacs?

Conclusion: emacs is a CUI editor that aims to "do everything" through extensions. Its customizability is unmatched, but there's a lot to learn.

Lina: How is emacs different from vim?
Linny-senpai: The big difference is that emacs lets you type text right away, with no mode switching. Instead, you give commands with combinations of Ctrl and Alt.
Lina: So you don't get "stuck" like in vim?
Linny-senpai: Since there are no modes, you rarely get confused while typing. To quit, press Ctrl+X then Ctrl+C. To save, press Ctrl+X then Ctrl+S.
Lina: You press keys in two steps.
Linny-senpai: Right, that's the emacs way. And emacs's real power is its extensibility — you can rewrite its config to pull in email, file management, and more. It's less an editor and more a whole work environment.
emacs notes.txt

Here are the bare minimum emacs commands. C-x means "hold Ctrl and press x."

C-x C-s   Save
C-x C-c   Quit
C-g       Cancel the current action (use this when stuck)

Where emacs fits

  • No mode switching — you can type from the moment it starts
  • You operate it with Ctrl / Alt key combinations
  • You can add endless features with its config language (Lisp)

It suits people who want to grow a tool that's truly their own. For quick fixes, though, nano is often handier, and for fast editing, vim.

5. What Is VS Code?

Conclusion: VS Code is a GUI editor you operate intuitively with mouse and menus. With rich completion, search, and extensions, it's the best fit for serious development.

Lina: I hear about VS Code a lot. What makes it different?
Linny-senpai: Unlike the other three, VS Code is a GUI editor that opens in a window. You can click with the mouse, and it looks colorful and easy to read.
Lina: Then isn't VS Code the easiest of all?
Linny-senpai: For developing on your own computer, yes. Its completion is smart, and it highlights mistakes in color. Install extensions and you get language-specific help too.
Lina: It sounds like all upsides!
Linny-senpai: But it has a weakness. VS Code basically needs a GUI, so it won't run as-is on a server you just SSH'd into (a "remote" extension can cover that, but it takes extra setup). That's exactly why it's worth knowing nano and vim too.

You can also launch VS Code from the terminal. To open the entire current folder, use this command.

code .

When VS Code fits

  • Developing an app that spans multiple files, on your local PC
  • Wanting completion, debugging, and Git integration on one screen
  • Not yet comfortable with command-line editing, preferring the mouse

See Setting Up Linux for Developers for how to build out a dev environment.

6. So Which One Should You Choose?

Conclusion: Start with nano to experience "I can fix it," then learn the minimum vim, and use VS Code for serious development. Touch emacs if and when it interests you.

Lina: I understand the types now. But what should I actually use first?
Linny-senpai: As a beginner, starting with nano is my recommendation. Since the commands are shown on screen, you can safely build the experience of editing a file and saving it.
Lina: Can vim and emacs wait?
Linny-senpai: Just learn the vim minimum — open, edit, save, quit — ahead of time, so you're fine if vim suddenly launches on a server. Once you start writing code seriously, move to VS Code. That step-by-step path is plenty.
Editor Type Learning curve Best for
nano CUI Low Small server edits / a beginner's first
vim CUI High Fast keyboard-only editing / server admin
emacs CUI High Growing your own integrated workspace
VS Code GUI Medium Serious local app development

How to choose when in doubt

  • Just need to fix something → nano
  • vim opened on a server → remember Esc:wq
  • Developing locally → VS Code
  • Want to grow your tool → dive into emacs / vim

Editors are switchable. Don't overthink your first one — learn the next when you need it.

Summary

  • Editors evolved for different jobs. Choose by "when do I use which," not "which is best."
  • nano shows its commands on screen — ideal as a beginner's first editor
  • vim has modes and is fast. Learn at least Esc:wq to escape it
  • emacs has unmatched extensibility, but a lot to learn
  • VS Code is GUI and great for serious development, but you still need CUI editors on servers
  • A realistic order: nano first, then the vim minimum, then VS Code for serious work

Next Reading