1 " Filename: /etc/vim/vimrc
2 " Purpose: configuration file for vim
3 " Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
4 " Bug-Reports: see http://grml.org/bugs/
5 " License: This file is licensed under the GPL v2.
6 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
8 " All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
9 " /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime you
10 " can find below. If you wish to change any of those settings, you should do it
11 " in the file /etc/vim/vimrc.local, since debian.vim will be overwritten
12 " everytime an upgrade of the vim packages is performed and this file
13 " (/etc/vim/vimrc) every time the package grml-etc-core is upgraded. It is
14 " recommended to make changes after sourcing debian.vim since it alters the
15 " value of the 'compatible' option.
17 " This line should not be removed as it ensures that various options are
18 " properly set to work with the Vim-related packages available in Debian.
21 " Uncomment the next line to make Vim more Vi-compatible
22 " NOTE: debian.vim sets 'nocompatible', but only if debian.vim is available,
23 " so let's make sure we run in nocompatible mode:
26 " Setting 'compatible' changes numerous
27 " options, so any other options should be set AFTER setting 'compatible'.
30 set backspace=indent,eol,start " more powerful backspacing
32 " Now we set some defaults for the editor
33 set autoindent " always set autoindenting on
34 " set linebreak " Don't wrap words by default
35 set textwidth=0 " Don't wrap lines by default
36 set nobackup " Don't keep a backup file
37 set backupcopy=no " grml: Overwrite files/links with w!
38 " set backupcopy=yes " Keep a backup file
39 set viminfo='20,\"50 " read/write a .viminfo file, don't store more than
40 " 50 lines of registers
41 set history=50 " keep 50 lines of command line history
42 set ruler " show the cursor position all the time
44 " Suffixes that get lower priority when doing tab completion for filenames.
45 " These are files we are not likely to want to edit or read.
46 set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
48 " Vim5 and later versions support syntax highlighting.
49 " Just load the main syntax file when Vim was compiled with "+syntax".
54 " Debian uses compressed helpfiles. We must inform vim that the main
55 " helpfiles is compressed. Other helpfiles are stated in the tags-file.
56 " set helpfile=$VIMRUNTIME/doc/help.txt.gz
58 " If using a dark background within the editing area and syntax highlighting
59 " turn on this option as well
62 " begin of grml specials:
63 " set list listchars=tab:»·
64 " set listchars=eol:$,precedes:«,extends:»,tab:··,trail:·
65 " end of grml specials
67 " Uncomment the following to have Vim jump to the last position when
70 " au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
71 " \| exe "normal g'\"" | endif
74 " Uncomment the following to have Vim load indentation rules according to the
75 " detected filetype. Per default Debian Vim only load filetype specific
81 " The following are commented out as they cause vim to behave a lot
82 " differently from regular Vi. They are highly recommended though.
83 set showcmd " Show (partial) command in status line.
84 set showmatch " Show matching brackets.
85 " set ignorecase " Do case insensitive matching
86 " set smartcase " Do smart case matching
87 " set incsearch " Incremental search
88 " set autowrite " Automatically save before commands like :next and :make
89 " When switching between different buffers you can't use undo without 'set hidden':
90 set hidden " Hide buffers when they are abandoned
91 " set mouse=a " Enable mouse usage (all modes) in terminals
92 set wildmenu " command-line completion operates in an enhanced mode
94 set pastetoggle=<f11> " don't change text when copy/pasting
95 set dictionary=/usr/share/dict/word " used with CTRL-X CTRL-K
97 """ set the screen hardstatus to vim(filename.ext)
98 if ((&term =~ '^screen') && ($VIM_PLEASE_SET_TITLE =~ '^yes$') || has('gui_running'))
102 autocmd BufEnter * let &titlestring = "vim(" . expand("%:t") . ")"
103 let &titleold = fnamemodify(&shell, ":t")
106 " Source a global configuration file if available
107 " Deprecated by Debian but still supported by grml
108 if filereadable("/etc/vim/vimrc.local")
109 source /etc/vim/vimrc.local