"
" vimrc file for Linux and Win from Al Markov (markoval@hotbox.ru)
"
" $Source: /var/lib/cvs/nbs.pvt/markov/vimrc,v $
" $Revision: 1.8 $
"

set nocompatible
 
source ~/vim/my_system.vim

set tabstop=4
set shiftwidth=4

set nobackup
set background=dark
set noerrorbells
set backspace=2

if exists("my_system_unix")
	set fileformat="unix"
	set langmap=ÊÃÕËÅÎÇÛÝÚÈ߯Ù×ÁÐÒÏÌÄÖÜÑÞÓÍÉÔØÂÀêãõëåîçûýúèÿæù÷áðòïìäöüñþóíéôøâà;qwertyuiop[]asdfghjkl\;'zxcvbnm\,.QWERTYUIOP{}ASDFGHJKL\:\"ZXCVBNM<>
	
"	set langmap=Êq,Ãw,Õe,Ër,Åt,Îy,Çu,Ûi,Ýo,Úp,È[,ß],Æa,Ùs,×d,Áf,Ðg,Òh,Ïj,Ìk,Äl,Ö\;,Ü',Ñz,Þx,Óc,Ív,Éb,Ôn,Øm,Â\,,À.,êQ,ãW,õE,ëR,åT,îY,çU,ûI,ýO,úP,è[,ÿ],æA,ùS,÷D,áF,ðG,òH,ïJ,ìK,äL,öö,ü',ñZ,þX,óC,íV,éB,ôN,øM,â<,à>,\;$
	
	set tags=./tags,~/cimetrics/BACnet/tags
	set	path=.,/usr/include,~/cimetrics/BACnet/BACstac/include,~/cimetrics/BACnet/BACstac/include/api,,
	
elseif exists("my_system_win")
	set makeprg=nmake\ -NOLOGO
	set errorformat=%f(%l)\ :\ %m

	set fileformat="dos"
	set ffs="dos"
	set runtimepath+=~/vim
	"set langmap=éöóêåíãøùçõúôûâàïðîëäæýÿ÷ñìèòüáþ.ÉÖÓÊÅÍÃØÙÇÕÚÔÛÂÀÏÐÎËÄÆÝß×ÑÌÈÒÜÁÞ\;:;qwertyuiop[]asdfghjkl\;'zxcvbnm,./QWERTYUIOP{}ASDFGHJKL:\"ZXCVBNM<>$^

	map é q
	map ö w
	map ó e
	map ê r
	map å t
	map í y
	map ã u
	map ø i
	map ù o
	map ç p
	map õ [
	map ú ]
	map ô a
	map û s
	map â d
	map à f
	map ï g
	map ð h
	map î j
	map ë k
	map ä l
	map æ ;
	map ý '
	map ÿ z
	map ÷ x
	map ñ c
	map ì v
	map è b
	map ò n
	map ü m
	map á ,
	map þ .
	
	map É Q
	map Ö W
	map Ó E
	map Ê R
	map Å T
	map Í Y
	map à U
	map Ø I
	map Ù O
	map Ç P
	map Õ {
	map Ú }
	map ô A
	map Û S
	map  D
	map À F
	map Ï G
	map Ð H
	map Î J
	map Ë K
	map Ä L
	map Æ :
	map Ý "
	map ß Z
	map × X
	map Ñ C
	map Ì V
	map È B
	map Ò N
	map Ü M
	map Á <
	map Þ >
	
	set tags=./tags,~/../cimetrics/BACnet/tags

endif
	
set smartindent
set formatoptions=tcqro


syntax enable

"-----------------------------------------------------------------------------
" Maps 
"

map  :w
imap  
cmap  

map  gqap
imap  i
cmap  

" List of places of word
map  [I:let nr = input("Which one: ")exe "normal " . nr ."[\t"

map  :bn
imap  
cmap  

map  :bp
imap  
cmap  

map  :q
imap  
cmap  

map  :q!
imap  
cmap  

map  :wq
imap  
cmap  

map  :set hlsearch!
imap  :set hlsearch!

"insert char '"' before and after highlighted text
vmap _q `>a"`
" end maps

"-----------------------------------------------------------------------------
" Insert sceleton (templates) in new files

" All .h files is c, not cpp files
let c_syntax_for_h=""

source ~/vim/functions.vim

if has("autocmd")
	" ÷ÓÔÁ×ÌÑÔØ ÓËÅÌÅÔ × ÎÏ×ÙÅ ÆÁÊÌÙ. åÓÌÉ ÅÓÔØ, ËÏÎÅÞÎÏ.  
	autocmd BufNewFile * call Skeleton(expand("~/vim/skel/skeleton." . &filetype))
	autocmd BufRead *.c set comments=sr1:/*,mb:*,el:*/,://
	autocmd BufRead *.h set comments=sr1:/*,mb:*,el:*/,://
	autocmd BufRead *.c syn region myFold start="{" end="}" transparent fold
	
	autocmd BufRead,BufNewFile *.tpi set filetype=tpi		
	autocmd BufRead *.make set filetype=make
	autocmd BufRead *.mak set filetype=make
	autocmd BufRead,BufNewFile *.vts		set filetype=vts
	
	autocmd BufRead,BufNewFile *.html iab ÁçÞ 

autocmd BufRead /mnt/d/projects/cimetrics/BACnet set path=.,,/mnt/d/projects/cimetrics/BACnet/** endif "----------------------------------------------------------------------------- " Abbreviation " iab alnbs Al Markov iab Ydate =strftime("%Y/%m/%d") iab Yw =strftime("%A") iab Ydatew =strftime("%Y/%m/%d, %A") iab Ydatep =strftime("%Y/%m/%d")---------- iab --- --------------------------------------------------------------------- " eof