# Vim

> A free editor that runs in a terminal. You work it with keys, not a mouse.

**Field:** Software Development  
**Category:** Editors & Tools  
**Also known as:** Vi IMproved, Vim Editor, vi editor

## Think of it like

It is like a piano. Each key does a job, and your hands stay on the keys.

## Definition

Vim is a free text editor that runs inside a terminal. It is an improved copy of vi, an older editor found on most Unix systems. Vim has modes. In normal mode, each key is a command, so dd deletes a line. In insert mode, keys type text as in any editor. You never need the mouse, so practised users edit very fast.

## Example

Jack logs in to a server to fix one setting. The server has no window apps, so he opens the file in Vim, changes the line and saves.

## Example code

```vim
$ vim notes.txt
i      start typing (insert mode)
Esc    back to normal mode
:wq    write the file and quit
```

Open a file, press i to type, press Esc, then :wq to save and leave.

## Why it matters

It is there on almost every server. Knowing a few keys means you can fix a file anywhere, with no other app.

## Common mistake

Typing words while still in normal mode, so each letter runs as a command. Press i first, and Esc when done.

## Three principles

- **Modes.** Keys mean one thing in each mode.
- **Keys, not mouse.** Every action has a key for it.
- **Everywhere.** It is found on almost every server.

## Related terms

- [Code Editor](https://learn.benibix.com/term/development/code-editor)
- [Neovim](https://learn.benibix.com/term/development/neovim)
- [Emacs](https://learn.benibix.com/term/development/emacs)
- [Terminal](https://learn.benibix.com/term/infrastructure/terminal)
- [Visual Studio Code](https://learn.benibix.com/term/development/visual-studio-code)

## Told apart from

- [Vim vs Neovim](https://learn.benibix.com/compare/vim-vs-neovim): People think Neovim is a new editor with its own keys, and it is not. It was built from Vim's code, so the modes and keys are the same, and a Vim user feels at home. What changed is the setup. Neovim reads a short script in a file called init.lua, and it talks to language tools for hints and errors.

## Taught in

- [Vim, Neovim and Emacs](https://learn.benibix.com/learn/development-tools/vim-neovim-and-emacs): Coding Tools, 3/13

![Two boxes side by side. On the left, normal mode, where each key is a command, such as dd to delete a line. On the right, insert mode, where keys type letters. An arrow marked i goes from normal to insert, and an arrow marked Esc comes back. Below normal mode, a third box shows the command line, reached with a colon, where :wq saves and quits.](https://learn.benibix.com/diagrams/dev5-vim-modes.svg)

---

Source: https://learn.benibix.com/term/development/vim
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
