References and Links: - Vim Official page
Learning Vim
- Starting out: Learn Vim Progressively
- VIM Adventures
- Type
vimtutor
at the command line and you'll have an interactive tutorial.
Vim Configuration
- VimConfig. Web-based generation of .vimrc
- Vim Wikia: Vimrc file
- Vim Wikia: Indenting source code
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.
- Enter [num lines] then
- 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 \
- Go to beginning of block, press \