Begin with familiar behaviour

The example enables line numbers, spaces instead of tabs, four-space indentation, and syntax highlighting. Searches ignore case unless the query contains a capital letter.

vim/.vimrc
" A small, plugin-free starting point
set number
set expandtab
set shiftwidth=4
set tabstop=4
set ignorecase
set smartcase
set incsearch
set hlsearch
syntax on

Separate habits from project rules

Indent width is not a universal choice. Follow the conventions and existing files of the project you are editing. Personal configuration should help you work with a project rather than silently reformat it.

Add things when you need them

Use a small configuration for a while. Note a recurring inconvenience, find one relevant setting or command, and test it separately. Let the file grow with your actual work.

Further reading

Vim documentation ↗