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.
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."
^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.
i to enter "insert mode."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!"
- Press
Escfirst (no matter which mode you're in, this returns you to normal mode) - To save and quit, type
:wqand press Enter - 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.
Ctrl and Alt.Ctrl+X then Ctrl+C. To save, press Ctrl+X then Ctrl+S.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/Altkey 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.
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.
| 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→:wqto 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