[Vim] .vimrc Configuration Memo

Tadashi Shigeoka ·  Sun, October 23, 2011

I edited vimrc to configure Vim, so here’s a memo.

$ vim ~/.vimrc
" Number of half-width spaces used for indentation
set shiftwidth=2
" Set the number of spaces a Tab character corresponds to
set tabstop=2
" Replace Tab characters with half-width spaces
set expandtab
" Automatically indent (noautoindent: don't indent)
set autoindent
" Allow backspace to delete indentation and line breaks
set backspace=2
" Turn off vi compatibility mode
set nocompatible
" Display line numbers
set number
" When searching, wrap from end of file to beginning (nowrapscan: don't wrap)
set wrapscan

syntax on
filetype on
filetype indent on
filetype plugin on

【Reference】

Vimの使い方-Tips (How to Use Vim - Tips)

Peace Pipe: はてな技術勉強会 .vimrc 説明補足 [vim] (Peace Pipe: Hatena Technical Study Group .vimrc Explanation Supplement [vim])

vimの設定 (vim Configuration)

vim の設定 (vim Configuration)

Mac で Vim で delete キー - mitszoの日記 (Delete Key in Vim on Mac - mitszo’s Diary)

set expandtab - ふぁいんでぃんぐねもの日記 (set expandtab - Finding Nemo Diary)

set shiftwidth=<number> - ふぁいんでぃんぐねもの日記 (set shiftwidth= - Finding Nemo Diary)

That’s all from the Gemba.