" Maintainer: Erik Jonkers " Last change: Wed Apr 30 2003 "******************** options ******************** "set nocompatible set ts=4 " set Tab Stop at 4 space set bs=2 " allow backspacing over everything in insert mode set nobackup " do not keep a backup file, use versions instead set history=3000 " keep 50 lines of command line history set ruler " show the cursor position all the time set incsearch " do incremental searching set textwidth=2000 set wrapmargin=2000 set nowrap "********** auto header generation ************** map ,cfileheader /****************************************************************************************Project: Filename: Author: Created: Ydate at YtimeDescribtion: x****************************************************************************************/ /**************************************************************************************** Includes x****************************************************************************************/ /**************************************************************************************** Prototypesx****************************************************************************************//**************************************************************************************** Define'sx****************************************************************************************//****************************************************************************************Globals x****************************************************************************************/ map ,cfuncheader /****************************************************************************************Function name: Describtion: Author: Created: Ydate at YtimeComments: x****************************************************************************************/ map ,phpfileheader /* * Author : E J Jonkers * company : DataCT * date created : Ydate * date modified : */?> map ,pyfileheader ### # Author : E J Jonkers # company : DataCT # date created : Ydate # date modified : #### "***************** key mappings ****************** map :w map :wq map :q! map ,cfileheader map ,cfuncheader map int main(int argc,char *argv[]){ return 0;} map if(<> ) { } else { }" map :r!echo -e "\tfor( ; ; )\n\t{\n\t\t\n\t\t\n\t}\n" map :r!echo -e "\twhile( )\n\t{\n\t\t\n\t\t\n\t}\n" map :r!echo -e "\tswitch( )\n\t{\n\tcase :\n\t\t\n\t\tbreak;\n\n\tcase :\n\t\t\n\t\tbreak;\n\n\t}\n" map :make map :r!date map Q gq if has("autocmd") autocmd BufNewFile *.c,*.cpp :normal ,cfileheader autocmd BufNewFile *.php :normal ,phpfileheader autocmd BufNewFile *.py :normal ,pyfileheader endif "****************** iab's *********************** iab Npi 3.1415926535897932384626433832795028841972 iab Ne 2.7182818284590452353602874713526624977573 iab Ydate =strftime("%y-%m-%d") iab Ytime =strftime("%H:%M") iab #d #define iab #i #include <> " Make p in Visual mode replace the selected text with the "" register. vnoremap p :let current_reg = @"gvs=current_reg " Switch syntax highlighting on, when the terminal has colors " Also switch on highlighting the last used search pattern. if &t_Co > 2 || has("gui_running") syntax on set hlsearch endif " Only do this part when compiled with support for autocommands. if has("autocmd") " 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 " For all text files set 'textwidth' to 140 characters. au FileType text setlocal tw=140 " When editing a file, always jump to the last known cursor position. autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal g`\"" | \ endif endif