set nocompatible function! Func_Tex() map :w!:!texify --clean --src --quiet % " Konvertiert Text in Anfuehrungszeichne in die dt. Anfuehrungszeichen map :s="\([^"]*\)"=\\glqq \1\\grqq=g command! PDF w!|!texify --clean --quiet --pdf % abbreviate txbf \textbf{ abbreviate txit \textit{ endfunction function! Func_Python() map :w!:!python % endfunction function! Func_C() map :w!:!gcc % endfunction function! Func_java() ab tmsg t.traceMsg(); map :w!:!javac % endfunction function! Func_php() ab tmsg $t->traceMsg(); map :w!:!php -f % endfunction function! SaveReplace(needle, haystack) try execute ":%s/".a:needle."/".a:haystack."/g" catch /.*/ endtry endfunction function! Umlaute() call SaveReplace("Ä","Ae") call SaveReplace("ä","ae") call SaveReplace("Ö","Oe") call SaveReplace("ö","oe") call SaveReplace("Ü","Ue") call SaveReplace("ü","ue") call SaveReplace("ß","sz") endfunction command! U call Umlaute() au FileType php call Func_php() au FileType c call Func_C() au FileType java call Func_java() au FileType tex call Func_Tex() au FileType python call Func_Python() " Standardoption, welche zumindest ab 5.6 eingebaut sind set autoindent set backspace=2 set directory=~/tmp,/var/tmp,/tmp,c:\\temp,c:\\windows\\temp,c:\\winnt\\temp set expandtab set hlsearch set ignorecase set laststatus=2 set nobackup set noerrorbells set noincsearch set novisualbell t_vb="" set number set pastetoggle= set printfont=courier_new:h8:w4:cANSI set ruler set shiftwidth=2 set showbreak=+++ set showcmd set showmatch set showmode set smartcase set smartindent set smarttab set softtabstop=2 set statusline=[%n]\ %f\ %m\ %r\ %y\ Hex:%3.3B\ Ascii:%3.3b\ %=(%1.3c,%1.7l)\ \ %3.3p%% set suffixes=".bak,~,.o,.h,.info,.swp,.class" set tabstop=2 set wildcharm= set wildmenu set writebackup " Einstellungen ab Version 6.0 if version >= 600 set display=uhex set virtualedit=block set diffexpr=MyDiff() syntax enable " Enable file type detection. " Use the default filetype settings, so that mail gets 'tw' set to 72, " 'cindent' is on in C files, etc. " Also load indent files, to automatically do language-dependent indenting. filetype plugin indent on if has("autocmd") && exists("+omnifunc") autocmd Filetype * \ if &omnifunc == "" | \ setlocal omnifunc=syntaxcomplete#Complete | \ endif endif else syntax on endif " Einstellungen ab Version 7.0 if version >=700 set autochdir endif if has ("gui") set guifont=courier_new:h9:w5:cANSI set lines=35 set columns=100 if version >=600 set linespace=0 endif endif "Tooltipfunktion direkt aus der Vim-Hilfe uebernommen if has('balloon_eval') function! MyBalloonExpr() return 'Cursor is at line ' . v:beval_lnum . \', column ' . v:beval_col . \ ' of file ' . bufname(v:beval_bufnr) . \ ' on word "' . v:beval_text . '"' endfunction set bexpr=MyBalloonExpr() set ballooneval endif " " Mappings "========== " " creates Tags, cursor has to be placed on any but the first character " map ä ByEi<Ea>pa>Bf< " Make p in Visual mode replace the selected text with the "" register. vnoremap p :let current_reg = @"gvs=current_reg " Only do this part when compiled with support for autocommands. if has("autocmd") " For all text files set 'textwidth' to 78 characters. autocmd FileType text setlocal textwidth=78 " When editing a file, always jump to the last known cursor position. " Don't do it when the position is invalid or when inside an event handler " (happens when dropping a file on gvim). autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal g`\"" | \ endif endif " has("autocmd")