The Best Vimrc Configuration Guide.

Learn how you can customize your .vimrc file. Configuring your .vimrc file lets you use the full capabilities of Vim. We will go over: Basic Settings, Plugins and more.

Starting .vimrc Basic Template File

Although it will be tempting to find a more comprehensive and complete .vimrc file, a good starting practice is not to put anything in your .virmc file that you do not understand.

As your understanding of vim grows, continue adding additional tools/settings as you find a workflow that works for you.

NOTE: Vim comments start with " character. Feel free to remove them once you are familiar with their function.

" Disable compatibility with vi which can cause unexpected issues.
set nocompatible

" Helps force plugins to load correctly when it is turned back on below.
filetype off

" TODO: Load plugins here (pathogen or vundle, I recommend vundle)

" Enable plugins and load plugin for the detected file type.
filetype plugin indent on

" Turn syntax highlighting on.
syntax on

" Highlight cursor line underneath the cursor horizontally.
set cursorline

" Highlight cursor line underneath the cursor vertically.
set cursorcolumn

" Set shift width to 4 spaces.
set shiftwidth=4

" Set shift width to 4 spaces.
set shiftwidth=4

" Show line numbers.
set number

" Show file stats.
set ruler

" Blink cursor on error instead of beeping.
set visualbell

" Encoding.
set encoding=utf-8

" Security.
set modelines=0

" Show color column at 80 characters width, visual reminder of keepingcode line within a popular line width.
set colorcolumn=80

"Whitespace.
set wrap
set autoindent
set smartindent
set tabstop=2 shiftwidth=2 expandtab

" Enable auto completion menu after pressing TAB.
set wildmenu

" Make wildmenu behave like similar to Bash completion.
set wildmode=list:longest

" Allow hidden buffers.
set hidden

" Rendering.
set ttyfast

" Status bar.
set laststatus=2

" Last line.
set showmode
set showcmd