add vim custom settings
[debian6500.git] / master / etc / vim / vimrc
CommitLineData
a3300608
LM
1" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
2" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
3" you can find below. If you wish to change any of those settings, you should
4" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
5" everytime an upgrade of the vim packages is performed. It is recommended to
6" make changes after sourcing debian.vim since it alters the value of the
7" 'compatible' option.
8
9" This line should not be removed as it ensures that various options are
10" properly set to work with the Vim-related packages available in Debian.
11runtime! debian.vim
12
13" Uncomment the next line to make Vim more Vi-compatible
14" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous
15" options, so any other options should be set AFTER setting 'compatible'.
16"set compatible
17
18" Vim5 and later versions support syntax highlighting. Uncommenting the next
19" line enables syntax highlighting by default.
f4914914 20syntax on
a3300608
LM
21
22" If using a dark background within the editing area and syntax highlighting
23" turn on this option as well
f4914914 24set background=dark
a3300608
LM
25
26" Uncomment the following to have Vim jump to the last position when
27" reopening a file
f4914914
LM
28if has("autocmd")
29 au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
30endif
a3300608
LM
31
32" Uncomment the following to have Vim load indentation rules and plugins
33" according to the detected filetype.
f4914914
LM
34if has("autocmd")
35 filetype plugin indent on
36endif
a3300608
LM
37
38" The following are commented out as they cause vim to behave a lot
39" differently from regular Vi. They are highly recommended though.
f4914914
LM
40set showcmd " Show (partial) command in status line.
41set showmatch " Show matching brackets.
42set ignorecase " Do case insensitive matching
43set smartcase " Do smart case matching
44set incsearch " Incremental search
45set autowrite " Automatically save before commands like :next and :make
46set hidden " Hide buffers when they are abandoned
a3300608
LM
47"set mouse=a " Enable mouse usage (all modes)
48
49" Source a global configuration file if available
50if filereadable("/etc/vim/vimrc.local")
51 source /etc/vim/vimrc.local
52endif
53