" Configuration file for vim "set runtimepath=~/.vim,/usr/share/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vimcurrent,/usr/share/vim/vimfiles/after,/usr/share/vim/addons/after,~/.vim/after " Normally we use vim-extensions. If you want true vi-compatibility " remove change the following statements 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 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 noautoindent set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif set hlsearch set showmatch set incsearch set ignorecase set smartcase set showcmd set autowrite set nocompatible set pastetoggle= set history=500 " Ich brauche viele alte Befehle! set mouse=h " Maus im Help-Modus aktivieren. |Links| werden per Doppelklick " besucht (mit Tasten: C-+). Zurück mit g+ " " oder STRG+t oder STRG+o. " Deaktivieren mit `set " mouse='. " set noai " " NoAutoIndent - Keine " automatische " Zeileneinrückung. Vgl ! set nojoinspaces " Einfügen von 2 Leerzeichen nach "!", "." und "?" ausschalten. " spell checking "if version >= 700 " " "let loaded_matchparen = 1 " " turn spelling on by default " set spell " set spellfile="~/.vim/user.add" " " change to german " set spelllang=de,en " let spellst = ["de", "en"] " " toggle spelling with F2 key " map :set spell!:echo "Spell Check: " . strpart("OffOn", 3 * &spell, 3) " " they were using white on white " highlight PmenuSel ctermfg=black ctermbg=lightgray " " limit it to just the top 10 items " set sps=best,5 " " highlighting " hi SpellBad ctermfg=Red ctermbg=Black cterm=underline " hi SpellCap ctermfg=blue ctermbg=black cterm=underline " " imap z=i " nmap z= " imap zgi " nmap zg " "endif " key mappings inoremap cnoremap inoremap cnoremap " Rückt im C-Modus mit "TAB / SHIFT-TAB" Zeilen ein/aus: nnoremap a nnoremap a " Dauernd vertippe ich mich: nnoremap :W :w nnoremap :Q :q nnoremap :Q! :q! nnoremap :qq :q! nnoremap :wQ :wq nnoremap :Wq :wq nnoremap :WQ :wq " schaltet Zeilenumbruch an/aus: map :if &wrapset nowrapelseset wrapendif map! :if &wrapset nowrapelseset wrapendifa " schaltet Zeilennummerierung an/aus: map :if &numberset nonumberelseset numberendif map! :if &numberset nonumberelseset numberendifa " schaltet Search-Highlighting an/aus (:set hlsearch /:set nohlsearch): map :if &hlsearchset nohlsearchelseset hlsearchendif cmap :if &hlsearchset nohlsearchelseset hlsearchendif/ imap :if &hlsearchset nohlsearchelseset hlsearchendifa " schaltet Syntax-Highlighting an/aus: map :if has("syntax_items")syntax offelsesyntax onendif cmap :if has("syntax_items")syntax offelsesyntax onendif/ imap :if has("syntax_items")syntax offelsesyntax onendifa " schaltet die Darstellung von Leerzeichen, TABs und Zeilenenden an/aus: " " Interessante Zeichen: ^$¬|÷°~·¨¯_¢¤¥©®<>«»±¶¡¿þÞøæÐ×Øø " " Zuerst muss man die Zeichen angeben, die einbezogen werden sollen. " set listchars=tab:>-,trail:·,eol:¶,extends:»,precedes:« " map :if &listset nolistelseset listendif set listchars=tab:>-,trail:·,eol:¶,extends:»,precedes:« map :if &listset nolistelseset listendif cmap :if &listset nolistelseset listendif: imap :if &listset nolistelseset listendifa " remove ^M map ^M :%s///g " Put "and" around the current word " map '" i"ea" map '" i"^[ea"^[ " Put `and' around the current word " map `' i`ea' map `' i`^[ea'^[ " Put 'and' around the current word " map '' i'ea' map '' i'^[ea'^[ function HtmlEscape() silent s/&/\&/eg silent s/ä/\ä/eg silent s/ö/\ö/eg silent s/Ä/\Ä/eg silent s/Ö/\Ö/eg silent s/ü/\ü/eg silent s/Ü/\Ü/eg silent s/ß/\ß/eg endfunction map :call HtmlEscape() "if FileType = html " " turn line into a heading " map h1 0i

^[A

^[j " map h2 0i

^[A

^[j " map h3 0i

^[A

^[j " map h4 0i

^[A

^[j " map h5 0i
^[A
^[j " map h6 0i
^[A
^[j " " " turn line into image uri " map hmg 0i^[ " " " turn line into link uri " map hrf 0i^[ " " " turn word into link uri " map hrl i^[ea^[ " " ab ;s   " ab ;& & " ab ;< < " ab ;> > " " Umlaute " imap ä ä " imap ü ü " imap ö ö " imap Ä Ä " imap Ö Ö " imap Ü Ü " imap ß ß "endif " 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 " We know xterm-debian is a color terminal "if &term =~ "xterm-debian" || &term =~ "xterm-xfree86" set t_Co=16 set t_Sf=[3%dm set t_Sb=[4%dm "endif " Vim5 and later versions support syntax highlighting. Uncommenting the next " line enables syntax highlighting by default. syntax enable " If using a dark background within the editing area and syntax highlighting " turn on this option as well " set background=dark if has("autocmd") " Enabled file type detection " Use the default filetype settings. If you also want to load indent files " to automatically do language-dependent indenting add 'indent' as well. filetype plugin on endif " has ("autocmd") " Some Debian-specific things if has("autocmd") augroup filetype au BufRead reportbug.* set ft=mail au BufRead reportbug-* set ft=mail augroup END endif " Set paper size from /etc/papersize if available (Debian-specific) if filereadable("/etc/papersize") try let s:shellbak = &shell let &shell="/bin/sh" let s:papersize = matchstr(system("cat /etc/papersize"), "\\p*") let &shell=s:shellbak if strlen(s:papersize) let &printoptions = "paper:" . s:papersize endif catch /^Vim\%((\a\+)\)\=:E145/ endtry endif " Source a global configuration file if available if filereadable("/etc/vim/vimrc.local") source /etc/vim/vimrc.local endif " Zum Exportieren eines Syntaxhighlightings als HTML Code mit ":TOhtml" bzw. " " ":runtime! syntax/2html.vim". CSS Angaben verwenden statt "": let html_use_css=1