" 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: Mon Dez 24 21:07:04 CET 2007 [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-core 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

" Vim5 and later versions support syntax highlighting.
" Just load the main syntax file when Vim was compiled with "+syntax".
  if has("syntax")
     syntax on
  endif

" 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
  set wildmenu          " command-line completion operates in an enhanced mode

  set pastetoggle=<f11>               " don't change text when copy/pasting
  set dictionary=/usr/share/dict/word " used with CTRL-X CTRL-K

""" set the screen hardstatus to vim(filename.ext)
  if ((&term =~ '^screen') && ($VIM_PLEASE_SET_TITLE =~ '^yes$') || has('gui_running'))
    set t_ts=k
    set t_fs=\
    set title
    autocmd BufEnter * let &titlestring = "vim(" . expand("%:t") . ")"
    let &titleold = fnamemodify(&shell, ":t")
  endif

" Source a global configuration file if available
" Deprecated by Debian but still supported by grml
  if filereadable("/etc/vim/vimrc.local")
    source /etc/vim/vimrc.local
  endif
" EOF
