Tuesday, March 20, 2012

Change of .vimrc

Change log:
1) Added tab settings for html
2) Enabled filetype plugins
3) Enabled matchit

  1 "
  2 " This file (.vimrc) is modified on 2012/3/19
  3 "
  4
  5 " General
  6 set number " to display lines
  7 set title " display filename on the title bar
  8 set ignorecase " search not casesensitively
  9 set showmatch " hilight a pair of parenthesis and braces
 10 set matchtime=2 " limit the showmatch's hilight time, ms
 11 set wildmenu " compliment vim's commandline instructions
 12 set tabstop=4
 13 set shiftwidth=4
 14 set softtabstop=4
 15 set autoindent " Enable autoindent
 16 set ruler  " Ruler on
 17 set incsearch
 18 set hlsearch
 19 set backup
 20 set backupdir=~/.tmp_vim
 21 set dir=~/.tmp_vim
 22
 23 " Plugins
 24 filetype on           " Enable filetype detection
 25 filetype indent on    " Enable filetype-specific indenting
 26 filetype plugin on    " Enable filetype-specific plugins
 27 runtime macros/matchit.vim
 28
 29 " Ruby
 30 autocmd FileType ruby,eruby compiler ruby
 31 autocmd FileType ruby,eruby set tabstop=2
 32 autocmd FileType ruby,eruby set shiftwidth=2
 33 autocmd FileType ruby,eruby set softtabstop=2
 34 autocmd FileType ruby,eruby set expandtab
 35
 36 " HTML
 37 autocmd FileType html set tabstop=2
 38 autocmd FileType html set shiftwidth=2
 39 autocmd FileType html set softtabstop=2
 40
 41
 42 " For GUI
 43 if has("gui_running")
 44   colorscheme oceandeep
 45   set clipboard+=unnamed  " Yanks to clipboard
 46 endif
 47