References and Links: - Vim Official page

Learning Vim

Vim Configuration

Useful plugins

  • Pathogen.vim. An easy way to install plugins and manage your runtimepath.
  • vim-pug. Vim syntax highlighting for Pug (formerly Jade) templates.

Simple .VIMRC file

set number
set showmatch
set visualbell
set hlsearch
set smartcase
set ignorecase
set incsearch
set autoindent
set expandtab
set shiftwidth=4
set smartindent
set softtabstop=4
set ruler
set backspace=indent,eol,start

Some tips found on the web:

  • Indent multiple lines quickly ([Very detailed answer at source]}(http://stackoverflow.com/questions/235839/indent-multiple-lines-quickly-in-vi)]):
    • Enter [num lines] then >>: E.g. 8>> will indent 8 lines.
  • Commenting out blocks of code (Source):
    • Go to beginning of block, press \ to enter visual mode.
    • Move down to the end of the block, then press \ to insert, type #, and then \