Difference between revisions of "InstallingAboutUsOnLinux/ConfiureVim"

(New page: 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 no...)
 
Line 1: Line 1:
 +
Settings for file ~/.vimrc
 +
 +
<pre>
 
set background=dark
 
set background=dark
 
set hlsearch
 
set hlsearch
Line 37: Line 40:
 
autocmd FileType ruby call FunRuby()
 
autocmd FileType ruby call FunRuby()
 
autocmd FileType php call FunPhp()
 
autocmd FileType php call FunPhp()
 +
</pre>

Revision as of 09:50, 3 January 2008

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


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