René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -

my .vimrc

this is my .gvimrc file:
"   Don't source $VIMRUNTIME/menu.vim,
"   (must be stated before sourceing :syntax on (sy on))
set guioptions+=M

"   There's a comment in :help filetype
"      NOTE: Filetypes and 'compatible' don't work together well, since being Vi
"      compatible means options are global.  Resetting 'compatible' is recommended,
"      if you didn't do that already.
"   Now, I'm not sure if compatible is meant to be reset before :sy on, but I
"   want to be on the secure side.
set nocompatible

sy on

set sw=2
set ts=2

set expandtab     "use spaces instead of tabulators"
set smarttab

set modeline
set modelines=5

set bs=2		" allow backspacing over everything in insert mode "

set ai			" always set autoindenting on "
set backup		" keep a backup file "
set backupdir=c:\temp\vim

set history=50		" keep 50 lines of command line history

set wildchar=9
"set wildmode=list,longest

set pastetoggle=<F4>
autocmd BufRead *.txt set tw=78

" Only useful if using windows
" Opens gvim using the entire screen
autocmd GuiEnter * simalt ~x

" Search recursively and case insensitive for regular expressions (Windows)
" For example, search in all *.txt files for foo.*bar: 
" :grep "foo.*bar" *.txt
set grepprg=findstr\ /n\ /s\ /i\ /r\ /c:$*

" No fancy visual bell
set visualbell t_vb=""

au BufNewFile,BufRead *.orc,*.sco,*.csd   so $VIMRUNTIME/syntax/csound.vim

set foldmarker={,}
set foldmethod=marker
set foldtext=getline(v:foldstart)

set guifont=Lucida_Console:h8

set ruler		" show the cursor position all the time

cmap <C-P> <Up>
cmap <C-N> <Down>

autocmd FileType *      set formatoptions=tcql nocindent
autocmd FileType c,cpp  set formatoptions=croql cindent comments=://

" set digraph
imap <M-a> a<BS>"
imap <M-o> o<BS>"
imap <M-u> u<BS>"

autocmd FileType cpp so $VIMmyCpp.vim
" autocmd BufRead *.html   so $VIMmyHtml.vim
autocmd BufEnter *.html,*.htm so $VIM/myHtml.vim

set path=.,**
set foldopen-=search

set suffixes=.bak,~,.o,.info,.swp,.obj

let g:explHideFiles='\.swp$'