" Filename:      /etc/vim/vimrc
" Purpose:       configuration file for vim
" Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
" Bug-Reports:   see http://grml.org/bugs/
" License:       This file is licensed under the GPL v2.
" Latest change: Son Nov 19 15:26:34 CET 2006 [mika]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime you
" can find below.  If you wish to change any of those settings, you should do it
" in the file /etc/vim/vimrc.local, since debian.vim will be overwritten
" everytime an upgrade of the vim packages is performed and this file
" (/etc/vim/vimrc) every time the package grml-etc is upgraded.  It is
" recommended to make changes after sourcing debian.vim since it alters the
" value of the 'compatible' option.

" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim

" Uncomment the next line to make Vim more Vi-compatible
" NOTE: debian.vim sets 'nocompatible', but only if debian.vim is available,
" so let's make sure we run in nocompatible mode:
set nocompatible
" Setting 'compatible' changes numerous
" options, so any other options should be set AFTER setting 'compatible'.
"set compatible

set backspace=indent,eol,start	" more powerful backspacing

" Now we set some defaults for the editor
set autoindent		" always set autoindenting on
" set linebreak		" Don't wrap words by default
set textwidth=0		" Don't wrap lines by default
set nobackup		" Don't keep a backup file
set backupcopy=no	" grml: Overwrite files/links with w!
" set backupcopy=yes	" Keep a backup file
set viminfo='20,\"50	" read/write a .viminfo file, don't store more than
			" 50 lines of registers
set history=50		" keep 50 lines of command line history
set ruler		" show the cursor position all the time

" Suffixes that get lower priority when doing tab completion for filenames.
" These are files we are not likely to want to edit or read.
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc

" Make p in Visual mode replace the selected text with the "" register.
vnoremap p <Esc>:let current_reg = @"<CR>gvdi<C-R>=current_reg<CR><Esc>

" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
syntax on

" Debian uses compressed helpfiles. We must inform vim that the main
" helpfiles is compressed. Other helpfiles are stated in the tags-file.
" set helpfile=$VIMRUNTIME/doc/help.txt.gz

" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
set background=dark

" begin of grml specials:
"  set list listchars=tab:
"  set listchars=eol:$,precedes:,extends:,tab:,trail:
" end of grml specials

" Uncomment the following to have Vim jump to the last position when
" reopening a file
"if has("autocmd")
"  au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
"    \| exe "normal g'\"" | endif
"endif

" Uncomment the following to have Vim load indentation rules according to the
" detected filetype. Per default Debian Vim only load filetype specific
" plugins.
"if has("autocmd")
"  filetype indent on
"endif

" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
  set showcmd		" Show (partial) command in status line.
  set showmatch		" Show matching brackets.
"set ignorecase		" Do case insensitive matching
"set smartcase		" Do smart case matching
"set incsearch		" Incremental search
"set autowrite		" Automatically save before commands like :next and :make
" When switching between different buffers you can't use undo without 'set hidden':
 set hidden             " Hide buffers when they are abandoned
"set mouse=a		" Enable mouse usage (all modes) in terminals

" Source a global configuration file if available
" XXX Deprecated by Debian but as grml's package grml-etc provides this file
" it is still valid
if filereadable("/etc/vim/vimrc.local")
  source /etc/vim/vimrc.local
endif
" EOF
