DEV Community

Cover image for Professional Favorite Code Editor: Vim
Farhad Rahimi Klie
Farhad Rahimi Klie

Posted on

Professional Favorite Code Editor: Vim

When you ask experienced developers what code editor they trust the most, a surprising number of them will answer with a single word: Vim.

Vim is not flashy.
It does not advertise itself as beginner-friendly.
And it definitely does not try to hold your hand.

Yet, Vim has survived for decades and is still actively used by kernel developers, backend engineers, security researchers, system programmers, and DevOps professionals.

This article explains why Vim is a professional favorite, how it works conceptually, and how to use it effectively in real-world development.


What Is Vim?

Vim (Vi IMproved) is a modal text editor designed for speed, precision, and efficiency.

It is:

  • Terminal-based (but has GUI versions)
  • Keyboard-driven
  • Extremely fast
  • Highly customizable
  • Available on almost every system (Linux, macOS, BSD, Windows, servers, containers)

Vim is an improved version of the classic vi editor, which originated in UNIX systems.

If you can SSH into a machine, chances are Vim is already there.


Why Professionals Love Vim

1. Vim Is Always Available

On servers, cloud instances, containers, and embedded systems, you often don’t have VS Code or a GUI.

But Vim is:

  • Installed by default on most UNIX-like systems
  • Lightweight
  • Does not depend on graphics or heavy runtimes

For professionals who work with servers and infrastructure, this matters.


2. Modal Editing = Speed

Vim is not like normal editors.
It is modal, meaning the keyboard behaves differently depending on the mode.

The main modes are:

  • Normal mode → navigation and commands
  • Insert mode → typing text
  • Visual mode → selecting text
  • Command-line mode → executing commands

This design allows you to:

  • Navigate
  • Edit
  • Delete
  • Copy
  • Refactor

without touching the mouse or arrow keys.

Once learned, this is significantly faster than traditional editors.


3. Vim Encourages Thinking in Operations

In Vim, you don’t think:

“Move cursor, select text, press delete”

You think:

“Delete a word” → dw
“Change inside parentheses” → ci(
“Delete a whole function” → df}

Vim editing is verb + object:

  • d → delete
  • c → change
  • y → yank (copy)
  • w → word
  • i( → inside parentheses
  • } → block

This mental model is why Vim feels powerful to professionals.


Basic Vim Workflow

Opening a File

vim main.c
Enter fullscreen mode Exit fullscreen mode

Modes at a Glance

Mode Purpose
Normal Navigation & commands
Insert Writing text
Visual Selecting text
Command Editor commands

When Vim opens, you are in Normal mode.


Insert Mode

Press:

  • i → insert before cursor
  • a → insert after cursor
  • o → new line below

Exit insert mode:

Esc
Enter fullscreen mode Exit fullscreen mode

Saving and Quitting

In Normal mode:

:w        " save
:q        " quit
:wq       " save and quit
:q!       " force quit
Enter fullscreen mode Exit fullscreen mode

Navigation Like a Professional

Basic Movement

h  left
j  down
k  up
l  right
Enter fullscreen mode Exit fullscreen mode

Word-Based Movement

w  next word
b  previous word
e  end of word
Enter fullscreen mode Exit fullscreen mode

Line & File Movement

0   start of line
^   first non-space
$   end of line
gg  top of file
G   bottom of file
Enter fullscreen mode Exit fullscreen mode

Editing Power Moves

Deleting

dw   delete word
dd   delete line
d$   delete to end of line
Enter fullscreen mode Exit fullscreen mode

Changing

cw    change word
cc    change line
ci"   change inside quotes
Enter fullscreen mode Exit fullscreen mode

Copy & Paste

yy    copy line
p     paste after
P     paste before
Enter fullscreen mode Exit fullscreen mode

Visual Mode (Selection)

Press:

v    character selection
V    line selection
Ctrl+v  block selection
Enter fullscreen mode Exit fullscreen mode

This is extremely useful for:

  • Column editing
  • Refactoring
  • Multi-line changes

Search and Replace

Search

/word
Enter fullscreen mode Exit fullscreen mode

Navigate results:

n  next
N  previous
Enter fullscreen mode Exit fullscreen mode

Replace

:%s/old/new/g
Enter fullscreen mode Exit fullscreen mode

This single command can refactor entire files in seconds.


Buffers, Windows, and Tabs

Buffers (Open Files)

:ls
:b next
:b prev
Enter fullscreen mode Exit fullscreen mode

Split Windows

:split
:vsplit
Ctrl+w w
Enter fullscreen mode Exit fullscreen mode

Tabs

:tabnew
:tabnext
Enter fullscreen mode Exit fullscreen mode

Professionals rely on buffers + splits, not dozens of windows.


Vim Configuration (.vimrc)

Your power comes from configuration.

Example .vimrc:

set number
set relativenumber
set tabstop=4
set shiftwidth=4
set expandtab
syntax on
set clipboard=unnamedplus
Enter fullscreen mode Exit fullscreen mode

With configuration, Vim becomes your editor, not just an editor.


Plugins: Turning Vim Into an IDE

Popular plugin managers:

  • vim-plug
  • Vundle
  • Pathogen

Popular plugins:

  • NERDTree → file explorer
  • fzf → fuzzy search
  • coc.nvim → autocomplete + LSP
  • vim-airline → status bar
  • telescope.nvim (Neovim)

Vim can be minimal or a full IDE—your choice.


Vim vs Modern Editors

Feature Vim VS Code
Startup speed Instant Slower
Mouse-free Yes No
Remote editing Excellent Limited
Learning curve Steep Easy
Customization Extreme Moderate

Professionals often:

  • Use Vim for servers & system work
  • Use VS Code + Vim keybindings locally

The Real Reason Professionals Use Vim

It’s not nostalgia.
It’s not ego.
It’s efficiency.

Vim:

  • Keeps your hands on the keyboard
  • Reduces context switching
  • Scales with your skill
  • Never gets in your way

Once learned, Vim becomes muscle memory, not a tool.


Final Thoughts

Vim is not for everyone.
But for developers who value speed, control, and mastery, Vim is unmatched.

Learning Vim is an investment:

  • Painful at first
  • Powerful forever

Editors come and go. Vim stays.

If you’re serious about becoming a professional developer, Vim is worth learning.

Top comments (0)