" FILE ~/.vimrc " AUTHOR F4FTX " Tue Jul 19 18:05:29 CEST 2011 "--------------------------- BASE SETUP ------------------------------ set backup set backupcopy=auto set backupdir=~/.backup set backupext=.backup set swapfile set directory=~/.backup/swap set swapsync=fsync set nocompatible " pure vim, ni vi compatibility set backspace=indent,eol,start " allow backspacing over everything in insert set autoindent " always set autoindenting on set history=1000 " keep 1000 lines of command line history set ruler " show the cursor position all the time set showcmd " display incomplete commands set incsearch " do incremental searching set hlsearch " colored search set showmode " display command mode set smartcase " Ignore la casse dans les pattern que si ils ne contiennent pas de Maj set ignorecase " ignore case on search / replace set cmdheight=2 " 2 lines in command set mousehide " hide mouse upon typing set mousefocus " focus set without click set browsedir=buffer " current dir = file dir set more " page vim output set printdevice=lp " print info set printheader=f4ftx set noconfirm " no interactivity on errors set noerrorbells " no sound set selection=inclusive " smart selection set showmatch " bracket matching set tabstop=4 " tab size set shiftwidth=4 " autoindent tab set smarttab set expandtab " tabs as spaces set commentstring=//%s set shell=bash set fileformat=unix set write " read/write enabled set noautowrite " manual write set autoread " refresh automatic set history=100 set guioptions+=T set noequalalways " no automatic resize of windows set keymodel+=startsel set keymodel+=stopsel set viminfo='1000,f1,\"500,:200 " ,@200,/200 set path+=/usr/include " paths to included files set wildmenu " display option choices with tokens set wildmode=longest,list set nostartofline " don't change col when changing of line set formatoptions=cqrt " smart comments set comments=b:#,:%,n:> " smart comments 2 set laststatus=2 " status bar event with 1 file set shortmess=at " non verbose mode set whichwrap=<,>,h,l " allow right arrow on end of line set report=1 " Seuil au-dela duquel est rapporte le nombre de lignes modifiees set encoding=utf-8 set fileencoding=utf-8 "--------------------------- COLOR SCHEME ------------------------- "colors delek "colors desert "colors blue "colors darkblue "colors elflord "colors evening "colors koehler "colors morning "colors murphy "colors pablo "colors peachpuff "colors ron "colors shine "colors slate colors torte "colors zellner "--------------------------- MAP ---------------------------------- " Don't use Ex mode, use Q for formatting map Q gq " Make p in Visual mode replace the selected text with the "" register. vnoremap p :let current_reg = @"gvs=current_reg vnoremap * y/\V=substitute(escape(@@,"/\\"),"\n","\\\\n","ge") vnoremap # y?\V=substitute(escape(@@,"?\\"),"\n","\\\\n","ge") map j_ map k_ map :tabnext map :tabprevious " force python syntax (bug) noremap :call SetSyn("python") inoremap :call SetSyn("python") " Affichage de la liste des membres noremap :Tlist inoremap :Tlisti "Bouton droit de la souris: Proposition de correction syntaxique noremap " (Des)Activation de la verification syntaxique noremap :set spell! inoremap :set spell! i " tabs map :tabnew map :tabnew map :tabclose "--------------------------- PLUGINS ------------------------------ " Tlist ( Permet de voir les fonctions C/C++ ) let Tlist_Sort_Type = "name" let Tlist_Compact_Format = 1 let Tlist_Auto_Open = 0 let Tlist_Enable_Fold_Column = 0 let Tlist_Show_One_File = 1 "--------------------------- DIVERS ------------------------------ " 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 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 "syntax on " colored syntax " gtk encoding " eof