1001Ferramentas
🇻 Dev

Basic .vimrc Generator

Build a starter .vimrc with colors, line numbers, indentation, search and common shortcuts. A great starting point for newcomers.

A starter .vimrc, with no plugins at all

Vim with no configuration is deliberately raw: no line numbers, no syntax highlighting on some distributions, and a search that does not highlight as you type. It is not neglect — it is compatibility with the original vi. Basic configuration switches on what practically everyone wants, and fits in twenty lines with nothing installed.

Tick the options and the page assembles the file. Worth highlighting the numbering pair: absolute number on the current line and relative on the others is what makes counted movement commands efficient, because the number shown beside a line is exactly what you type before the command. And the four search options work together: highlight, search incrementally, ignore case but start distinguishing again once you type a capital.

The first line of the file turns off vi compatibility, and it has to come before everything else — several options change behaviour depending on that setting. On indentation, the three values regularly cause confusion: one sets the visual width of a tab character, another how far the indent commands shift, and the third how many spaces the key inserts. Keeping them equal avoids surprises.

Frequently asked questions

Where does the file live?
At ~/.vimrc on Unix. Modern Vim also reads ~/.vim/vimrc, which many people prefer for keeping everything in one folder. Neovim uses a different path under the user config directory and does not read .vimrc automatically — though a single line can load it.
What is the difference between the three tab options?
The first says how many columns a tab character occupies on screen. The second says how far the indent commands and autoindent shift. The third says how many spaces the key inserts or deletes. With expandtab on everything becomes spaces, and keeping all three equal avoids unexpected behaviour.
How do I reload without quitting?
With the source command pointing at the config file. Worth knowing that not every option reverts: reloading applies what is written but does not undo something enabled in an earlier version of the file and later removed. To check properly, quit and reopen.

Related Tools