My Favorite vimrc

" An example for a gvimrc file.
" The commands in this are executed when the GUI is started.
" Maintainer:	Bram Moolenaar <>
" Last change:	2001 Sep 02
" To use it, copy it to
"     for Unix and OS/2:  ~/.gvimrc
"	      for Amiga:  s:.gvimrc
"  for MS-DOS and Win32:  $VIM\_gvimrc
"	    for OpenVMS:  sys$login:.gvimrc

" Make external commands work through a pipe instead of a pseudo-tty
"set noguipty

" set the X11 font to use
" set guifont=-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1

set ch=2		" Make command line two lines high

set mousehide		" Hide the mouse when typing text

" Make shift-insert work like in Xterm

" Only do this for Vim version 5.0 and later.
if version >= 500

set guioptions+=a  
set cpoptions-=W

  " I like highlighting strings inside C comments
  let c_comment_strings=1

  " Switch on syntax highlighting if it wasn't on yet.
  if !exists("syntax_on")
    syntax on
map f gu
map F gU

  " Switch on search pattern highlighting.
set hlsearch "highlight previous patter
set ai  "For auto indenting"
set sel=inclusive
set slm=key
set cb=autoselect "clipboard
set km=startsel
set ul=100
set hi=100
set mps=(:),{:},[:],
set sm
set bs=2
set incsearch
set ru

" Hide the mouse pointer while typing
set mousehide

" Set nice colors
" background for normal text is light grey
" Text below the last line is darker grey
" Cursor is green
" Constants are not underlined but have a slightly lighter background
" highlight MatchParen
highlight Normal guibg=White
highlight Cursor guibg=Black guifg=NONE
highlight NonText guibg=White
highlight Constant gui=NONE guibg=grey95
highlight Special gui=NONE guibg=grey95
highlight ErrorMsg guibg=White guifg=Red
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
"set guifontset=-b&h-lucidatypewriter-small-r-normal-*-*-100-*-*-s-*-iso10646-1
"set number
set ruler
"set ts=8
"set sw=2
"set tw=150
syntax on
"syntax match <> /\<\l\+\>/
"syntax match () /\(\l\+\)/
"syntax match {} /\{\l\+\}/
let g:plaintex_delimiters = 1
imap \vo  "=strftime("VST%m%d%y :")Pa 
imap \vc  "=strftime("ACTION : c : VST%m%d%y :")Pa 
imap \c  "set ic"
imap \e  "=strftime("// End of")Pa 

runtime macros/matchit.vim

filetype plugin on
set omnifunc=syntaxcomplete#Complete

vmap  "+yy
map  "+gP

"Show Macro REG => "p e.g. "ap .

set tabpagemax=100
set showcmd
set ic
set colorcolumn=80

map <F2> :mksession! ~/vim_session <cr> " Quick write session with F2 
map <F3> :source ~/vim_session <cr> " And load session with F3

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s