Difference between revisions of "InstallingAboutUsOnLinux/ConfiureVim"

m (Added 'set paste' for Vim)
m (Enclosed installation of vim in <pre>s)
Line 1: Line 1:
 +
<pre>
 
sudo apt-get install vim-full
 
sudo apt-get install vim-full
 +
</pre>
  
 
Settings for file ~/.vimrc
 
Settings for file ~/.vimrc

Revision as of 07:07, 25 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
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()

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



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