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