[Vim Series 1] Why Should You Learn Vim?

한국어 버전

Why Should You Learn Vim?

The modern developer toolbox is full of polished GUI editors such as VS Code, Sublime Text, and Atom. So why bother with an editor designed for terminal environments like Vim? This post is for readers who are comfortable in GUI editors but have not yet felt what happens when only a terminal is available.

What You Will Do Here

  • Understand the situations where VS Code simply cannot help
  • Experience three real scenarios where Vim becomes the practical choice
  • Recognize why investing time in Vim keeps paying off

The First Moment VS Code Stops Helping

Exercise 1: Logging in to a Server

You are responsible for keeping your company website running. One day an outage hits and you must jump into the server immediately.

Before you start, assume you already have SSH access to a Linux server. Even if you do not manage a server today, the same pattern shows up in remote machines, containers, and recovery shells.

Step 1: Open a terminal

On macOS, open Terminal or iTerm2. On Linux, open your usual terminal. On Windows, use WSL, Windows Terminal, or another SSH client.

Step 2: Connect to the Remote Server

Watch the SSH flow below. [email protected] means "log in as user on that server."

SSH into the server zsh · ~/workspace
Ready. Press Replay to run the scripted session.

Step 3: Inspect the Config Files

After logging in, move into the nginx directory and list the files.

Check config directory zsh · ~/workspace
Ready. Press Replay to run the scripted session.

Here Is the Problem

You now have to edit a config file, but the server offers no GUI. Running a VS Code command fails instantly.

VS Code launch failure zsh · ~/workspace
Ready. Press Replay to run the scripted session.

Why did this happen?

  1. No GUI on the server: VS Code requires a graphical environment.
  2. Remote GUI setups add friction: Remote desktop, X11 forwarding, or extra editor integrations may exist, but they add setup time when you need to act fast.
  3. Terminal access is the reliable baseline: On many production systems, SSH is the one tool you can count on.

Why Vim Becomes the Practical Choice

Once you accept that the terminal is your working environment, the next question is simple: which editor is already there?

Exercise 2: Which Editors Are Actually Installed?

Use which to see the editors that really exist on the server.

Check installed editors zsh · ~/workspace
Ready. Press Replay to run the scripted session.

Why is Vim the standard?

Editor Installed on nearly every server Ease of use Feature depth
vi Yes (legacy baseline) Hard Only the basics
nano Usually Easy Limited
vim Usually Steep at first Extremely powerful

vi is the old Unix editor. Vim means "Vi Improved," and on many Linux and Unix systems it is the more capable editor you actually get.

Exercise 3: The Fastest Recovery Path

This is the key payoff: when you need to change a file right where the problem exists, Vim lets you work in place.

Open the nginx config directly on the server, edit, and restart the service. No download-edit-upload loop is required.

user@server:/etc/nginx$ sudo vim /etc/nginx/nginx.conf

After saving:

$ sudo nginx -t && sudo systemctl restart nginx

If the config test passes, your site can come back immediately.

Two More Places Vim Keeps Showing Up

The server outage story is the urgent example. These two cases are less dramatic, but they are where many people keep bumping into Vim later.

Moment 1: Large log files

# Inspect multi-gigabyte logs in place
vim /var/log/nginx/access.log

Inside Vim:

  • /error searches for error
  • G jumps to the end for the newest entries
  • ?timeout searches backward for timeout

You do not need to memorize those commands yet. For now, just notice what Vim gives you: fast movement and search inside a file that would feel heavy in many GUI editors.

Why VS Code struggles:

  • Loading a 10GB log in VS Code will likely crash or freeze
  • Vim often stays responsive because it avoids the GUI rendering and extension overhead that slows graphical editors

Moment 2: Writing a Git commit message

Git may launch Vim when it needs a commit message if Vim is configured as your editor, or if the system default points there.

Git commit opens Vim zsh · ~/workspace
Ready. Press Replay to run the scripted session.

You do not have to make Vim your Git editor forever, but you should be comfortable with the basics when it appears.

When Vim Matters Most

You may not need Vim for all of your daily local work. VS Code with good extensions, remote features, and shortcuts solves many problems well. Vim matters when you need a dependable editor inside terminal-first environments.

VS Code vs. Vim at a Glance

Scenario VS Code Vim
Local development Excellent Works
Remote server access Often needs extra tooling Built in
Huge files Slow or impossible Instant
Remote editing Needs extra setup Works immediately
Memory usage High Low
Customization Extension-rich Unlimited

What Changes Once You Learn the Basics

Long-term Value

1) Works everywhere

# Raspberry Pi
ssh [email protected]
vim script.py

# Docker container
docker exec -it container_name vim config.yml

# AWS EC2
ssh -i key.pem [email protected]
vim app/settings.py

2) A tool for life

  • vi was created in 1976 (almost 50 years ago)
  • Vim has evolved since 1991 (over 35 years)
  • Both continue to receive active updates

3) A new level of speed

Move, edit, save, search, and replace without lifting your hands from the keyboard.

VS Code:  "Open file" → click → browse → select → click again (≈5 seconds)
Vim:      :e filename + Enter (≈1 second)

Common Misconceptions

  • “Vim is outdated.” Vim ships with syntax highlighting, plugins, LSP, and modern features.
  • “It’s too hard to learn.” The first hour feels unfamiliar, but the basic open-edit-save workflow is small enough to learn quickly.
  • “VS Code is better anyway.” They solve different problems: VS Code shines locally, Vim shines in terminals and servers. Knowing both gives you choice.

Who Should Learn Vim First

  • Developers who maintain servers or infrastructure
  • Anyone who spends time inside Docker or SSH sessions
  • People who want hands-on-the-keyboard editing speed
  • Learners who value a tool they can use for decades

Quick Answers

Question Answer
Is VS Code enough? Not when you must edit directly on a server
Do I really need Vim? Yes for server and infrastructure tasks
Isn’t it too hard? The curve is real but worth it
Are there alternatives? nano exists but lacks power

Coming Up Next

Now that you know why Vim matters, it is time to install it and run it for the first time.

Vim Series 2: Install and Launch Vim walks you through verifying the installation, opening files, and saving/closing with real commands.


Practice Checklist

  • Understand the remote server scenario
  • Experience a situation where VS Code cannot run
  • Identify three moments when Vim saves the day
  • Recognize Vim’s long-term value

💬 댓글

이 글에 대한 의견을 남겨주세요