Update vimrc: drop the p vmap
[grml-etc-core.git] / etc / vim / vimrc
index 5cac7a6..4c01be2 100644 (file)
@@ -3,7 +3,7 @@
 " 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: Son Nov 19 15:26:34 CET 2006 [mika]
+" Latest change: Mon Dez 24 21:07:04 CET 2007 [mika]
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
 " All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
 " 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
-
-" Make p in Visual mode replace the selected text with the "" register.
-vnoremap p <Esc>:let current_reg = @"<CR>gvdi<C-R>=current_reg<CR><Esc>
+  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. Uncommenting the next
-" line enables syntax highlighting by default.
-syntax on
+" 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.
@@ -58,7 +58,7 @@ syntax on
 
 " 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:»·
@@ -67,34 +67,37 @@ 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 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
 
 " 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