X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fvim%2Fvimrc;h=2a3580f6726f911bd930a1d70053f3392b4de571;hb=refs%2Ftags%2F0.2.20;hp=838cacc15e9361e302be2f7bb5ec8150afdf7516;hpb=b285a6913f2b2f80d51d70b57bfe0a659903e2e2;p=grml-etc-core.git diff --git a/etc/vim/vimrc b/etc/vim/vimrc index 838cacc..2a3580f 100644 --- a/etc/vim/vimrc +++ b/etc/vim/vimrc @@ -3,7 +3,7 @@ " Authors: grml-team (grml.org), (c) Michael Prokop " Bug-Reports: see http://grml.org/bugs/ " License: This file is licensed under the GPL v2. -" Latest change: Fre Feb 09 14:32:09 CET 2007 [mika] +" Latest change: Sam Feb 10 11:07:20 CET 2007 [mika] """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just @@ -11,48 +11,49 @@ " 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 +" (/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 + 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 + set nocompatible + " Setting 'compatible' changes numerous " options, so any other options should be set AFTER setting 'compatible'. -"set compatible +" set compatible -set backspace=indent,eol,start " more powerful backspacing + 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 + 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 + 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 :let current_reg = @"gvdi=current_reg + vnoremap p :let current_reg = @"gvdi=current_reg " Vim5 and later versions support syntax highlighting. " Just load the main syntax file when Vim was compiled with "+syntax". if has("syntax") syntax on - fi + endif " Debian uses compressed helpfiles. We must inform vim that the main " helpfiles is compressed. Other helpfiles are stated in the tags-file. @@ -60,7 +61,7 @@ vnoremap p :let current_reg = @"gvdi=current_reg " If using a dark background within the editing area and syntax highlighting " turn on this option as well -set background=dark + set background=dark " begin of grml specials: " set list listchars=tab:»· @@ -69,34 +70,36 @@ set background=dark " 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 +" 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 + 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 + 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 hidden " Hide buffers when they are abandoned +" set mouse=a " Enable mouse usage (all modes) in terminals + + set pastetoggle= " don't change text when copy/pasting + set dictionary=/usr/share/dict/word " used with CTRL-X CTRL-K " 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 +" Deprecated by Debian but still supported by grml + if filereadable("/etc/vim/vimrc.local") + source /etc/vim/vimrc.local + endif " EOF