" .vimrc " " Copyright (c) 2006 by PiT (Pierre BETTENS) " " You can use this configuration file at your convenience. " I think it's beter if you understand each couple attribute/value but ... " Remember, I encourage whose do not understand to ask question. " I hope this file will make your work easier and your comprehension of vim. " " I use this configuration file but I give NOT any warranty that this file " will work fine for you. If you don't like my abbréviation, just change it. " If part of this file is not usefull for you I don't care, cut it. " " sine: january 1995 " last revision: 10 octobre 2007 " " Set of setting " " I say vim is not vi set nocompatible " For a good indentation set autoindent set smartindent " I want to see parenthesis balance set showmatch " I cut line to 80 char thus I have never long line. " Java recommand tab to be 8 and shift 4 set tabstop=8 set shiftwidth=4 set textwidth=80 " Set visual bell, ie turn off the beep sounds and replace it by flash screen set vb " Hide the mouse pointer while typing set mousehide " Increase searching. When I search pattern with /foo, vim go to the fisrt f " after I type f, then fisrt fo when I type fo ... set incsearch " By default search if vim know the file's syntax, if yes color with elflord " color. You can choice your colorscheme in vi with TAB key syntax on "colorscheme default " Max number of tabs when I open vim with -p option set tabpagemax=25 " When vim start or open a file, it go to the dir who contain the file set autochdir " I want always see my statusline with filename, size and some other things set laststatus=2 set statusline=%a\ %F%1*%m%*%10{getfsize(expand('%'))}o%10l/%L highlight StatusLine term=bold cterm=bold ctermbg=9 " I learn vim, I map some extension file with file syntax au BufRead,BufNewFile *.inc set filetype=asm au BufRead,BufNewFile *.i set filetype=html au BufRead,BufNewFile *.src set filetype=html au BufRead,BufNewFile *.as set filetype=java "Action script syntax close to Java syntax ;-) " " Some abbreviations " Synopsis: abbr key value " " Remember. A good abbreviation have a key who is NOT a common word ^^ " Some time my fingers failed abbr itme item abbr foonote footnote abbr retrun return abbr rigth right abbr varaible variable abbr vpsace vspace " Java abbreviations " To the end of the line you find some chars for well positionning the cursor " (try with and without) abbr sout System.out.println("");hhha abbr serr System.err.println("");hhha abbr pr private abbr pu public abbr st static abbr fi final abbr _scanner import java.util.Scanner ; abbr _class public class :r!echo %:rA { abbr _main public static void main ( String[] args ) { abbr _clavier Scanner clavier = new Scanner ( System.in ) ; abbr _entete /** :r!echo %:rA @author PbT@since :r!date +"\%d \%B \%Y" i/kkkkko " LaTeX abbreviations " If you don't care, cut it. abbr s{ \section{ abbr ss{ \subsection{ abbr sss{ \subsubsection{ abbr bf{ \textbf{ abbr it{ \textit{la abbr tt{ \texttt{ abbr sc{ \textsc{ abbr \i \item " When I write text; I like to write english terms in italic. abbr threadI \textit{thread} abbr mutexI \textit{mutex} " I don't speak good English. I like to say it when I speak on a forum or by " mail. (Yes I write mail with vim) abbr _E (English is not my native langage) "Web abbr _IDE IDE abbr _pbt PbT abbr _mcd MCD " Just for "fun" or exercice me iab ladate =strftime("%A %d %B %Y") iab lheure =strftime("%H:%M") " " Other commands " " Comment (visual bloc) " Highlight a bloc and press ;c or ;j. The bloc is commented vmap ;c ``>a*/ vmap ;j ``>a*/ " LaTeX commands com L w|!latex % com V !xdvi %:r & com Pdf w|!pdflatex % com Xpdf !xpdf %:r.pdf & " print file com A2ps w|!a2ps % & " Last abbreviation " Automaticaly close '{' by '} // end ' iab }// } // end - 10h%$?\w\+\s*("xy/\s*(/{:nohl%$"xpa