Difference between revisions of "InstallingAboutUsOnLinux/ConfiureVim"

m
Line 1: Line 1:
 +
sudo apt-get install vim-full
 +
 
Settings for file ~/.vimrc
 
Settings for file ~/.vimrc
  
Line 41: Line 43:
 
autocmd FileType php call FunPhp()
 
autocmd FileType php call FunPhp()
 
</pre>
 
</pre>
 +
--[[User:Ali Anwar|Ali Anwar]] 23:32, 7 January 2008 (PST)

Revision as of 07:32, 8 January 2008

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

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()

--Ali Anwar 23:32, 7 January 2008 (PST)



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