InstallingAboutUsOnLinux/ConfiureVim

sudo apt-get install vim-full

Settings for file ~/.vimrc

set background=dark
set hlsearch
set incsearch

set nocompatible
syntax on
filetype on
filetype indent on
filetype plugin on

set tabstop=2
set shiftwidth=2
set expandtab
set number
set noautoindent
set paste

map <Enter> i

fun FunRuby()
  map <F5> :w<cr>:!ruby %<cr>
  map <F2> :w<cr>
  map <F3> :wq<cr>
 
  map <F4> :w<cr><C-z>
  imap <F4> <esc>:w<cr><C-z>

  imap <F3> <esc>:wq<cr>
  imap <F5> <esc>:w<cr>:!ruby %<cr>
  imap <F2> <esc>:w<cr>i
endfun

fun FunPhp()
  map <F5> :w<cr>:!php %<cr>
  imap <F5> <esc>:w<cr>:!php %<cr>
endfun

autocmd FileType ruby call FunRuby()
autocmd FileType php call FunPhp()


Retrieved from "http://aboutus.com/index.php?title=InstallingAboutUsOnLinux/ConfiureVim&oldid=14700411"