set nocompatible
source $VIMRUNTIME/mswin.vim
set winaltkeys=no
syntax on
filetype on
filetype plugin on
filetype indent on
set guioptions-=T
set hidden
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set smarttab
set autoindent
set copyindent
set co=106
set lines=60
set linespace=0
set gfn=Lucida_Console:h12:cRUSSIAN
set cursorline
set colorcolumn=80
set t_Co=256
set number
set hlsearch
set incsearch
set ignorecase
set smartcase
set statusline=%F[%M%R%H%W]\ {%Y/%{&ff}/%{&fileencoding}}%#error#%{&paste?'P':''}%*\ Line:\ %l/%L\ Col:\ %v\ Ch:\ \%04.4b/#\%04.4B\ (%p%%)
set laststatus=2
set scrolloff=4
"%"
set history=100
set confirm
set backup
set writebackup
set backupdir=C:\Users\Geo\AppData\Roaming\VimBackup
set directory=C:\Users\Geo\AppData\Local\Temp
set wildmenu
set wildignore=.svn,.git,CVS,*.o,*.a,*.class,*.mo,*.so,*.obj,*.swp,*.jpg,*.png,*.gif
set showcmd
set shortmess=asITW
set nostartofline
set undofile
set undodir=C:\Users\Geo\AppData\Roaming\VimBackup
set cm=blowfish
set tags=./tags,.,../tags,../../tags
set pastetoggle=<M-F12>
set cpoptions-=A
set autochdir
if has("multi_byte")
if &termencoding == ""
let &termencoding = &encoding
endif
set encoding=utf-8
setglobal fileencoding=utf-8 bomb
set fileencodings=ucs-bom,utf-8,cp1251,latin1
endif
"%"
colorscheme whitemoon
match ExtraWhitespace /\s\+$\|\t\+/
hi ExtraWhitespace ctermbg=lightred guibg=lightred
hi Pmenu guibg=#EEEEEE
hi PmenuSel guibg=#FFDD66
hi LineNr guifg=#333380 guibg=#E0E0E0
hi CursorLine guibg=#DCFFFF
hi ColorColumn guibg=#DCFFFF
let MRU_Max_Entries = 60
let MRU_Window_Height = 15
let g:calendar_monday = 1
let g:calendar_mark = 'right'
fun! ToggleNum()
if &rnu
set nornu
set nu
else
set nonu
set rnu
endif
endfun
fun! WriteBackup()
if expand("%") != "_vimfavorites" && !&readonly
let src = expand("%:p")
let dst = &backupdir . '\' . expand("%:t") . printf( '.%04X.bak',localtime()/5%0x10000 )
silent exec escape(':w ' . dst, '\')
endif
endfun
fun! RemoveTrailingSpaces()
let _s=@/
let _c = getpos(".")
%s/\s\+$//
call setpos('.', _c)
let @/=_s
endfun
fun! DoRunPyBuffer2()
pclose!
setlocal ft=python
sil %y a | below new | sil put a | sil %!C:\Python3\python.exe -
setlocal previewwindow ro nomodifiable nomodified
winc p
endfun
fun! MapFnKeysForPython()
set cinwords=if,elif,else,for,while,try,except,finally,def,class|
map <S-F5> :w<CR>:RunPyBuffer<CR>|
map <F5> :w<CR>:!c:\python3\python.exe %<CR><CR>|
imap <F5> <ESC>:w<CR>:!c:\python3\python.exe %<CR><CR>|
nnoremap <F1> :silent !start c:\bin\keyhh.exe -python -\#klink "<C-R><C-W>" "C:\Python3\Doc\python323.chm"<CR><CR>|
inoremap <F1> <ESC>:silent !start c:\bin\keyhh.exe -python -\#klink "<C-R><C-W>" "C:\Python3\Doc\python323.chm"<CR><CR>
endfun
autocmd VimEnter * nested
\ if argc() == 0 && bufname("%") == "" && bufname("2" + 0) != "" |
\ exe "normal! `0" |
\ endif
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
autocmd BufWritePre * silent! call RemoveTrailingSpaces()
autocmd BufWritePre *.py,*.pyw silent retab
autocmd BufNewFile,BufRead *.py,*.pyw silent call MapFnKeysForPython()
autocmd BufRead *.c++,*.cpp map <F5> :w<CR>:!g++ %<CR><CR>
autocmd BufRead *.ijs map <F5> :w<CR>:!C:\BIN\J8\bin\jconsole.exe <C-R>=expand("%:p")<CR><CR><CR>
autocmd BufRead *.htm* map <F5> :w<CR>:!start C:\Apps\ChromePlus\chrome.exe file:///<C-R>=expand("%:p")<CR><CR><CR>
autocmd BufRead *.go map <F5> :w<CR>:!go run %<CR><CR>
autocmd BufRead *.rb map <F5> :w<CR>:!C:\cygwin\bin\ruby.exe %<CR><CR>
au FileType helpfile nmap <buffer> <CR> <C-]> | set nonumber " no line numbers in help
au FocusLost * :wa
au BufRead,BufNewFile *.m setfiletype objc
"normal a#!/usr/bin/python\n#second line\e"
command! RunPyBuffer call DoRunPyBuffer2()
command! -nargs=1 -complete=help H tab help <args>
let mapleader = ";"
nnoremap \ ;
noremap gj j
noremap gh k
noremap j gj
noremap h gk
noremap k h
noremap H K
noremap K H
noremap zh zk
noremap zk zh
inoremap <C-G><C-H> <C-G><C-K>
inoremap <C-G>h <C-G>k
nnoremap <C-W>H <C-W>K
nnoremap <C-W>K <C-W>H
nnoremap <C-W>h <C-W>k
nnoremap <C-W>k <C-W>h
nnoremap <C-W><C-H> <C-W><C-K>
nnoremap <C-W><C-K> <C-W><C-H>
nnoremap gh gk
nnoremap gk gh
nnoremap gK gH
nnoremap g<C-K> g<C-H>
nmap <C-h> <C-w>h
nmap <C-j> <C-w>j
nmap <C-k> <C-w>k
nmap <C-l> <C-w>l
nmap <F2> gT
imap <F2> <Esc>gT
nmap <F3> gt
imap <F3> <Esc>gt
nmap <F4> :tabnew<CR>
imap <F4> <Esc>:tabnew<CR>
nmap <F6> <C-W>w
imap <F6> <C-O><C-W>w
nmap <F8> <C-W>c
imap <F8> <Esc><C-W>c
nnoremap <F11> <C-A>
inoremap <F11> <ESC><C-A>i
nnoremap <S-F11> <C-X>
inoremap <S-F11> <ESC><C-X>i
noremap <silent> <F12> :cal VimCommanderToggle()<CR>
inoremap <C-B> <C-X>
nmap <Space> i <ESC>
nmap <CR> i<CR><Esc>
nmap <M-Del> dd
imap <M-Del> <C-O>dd
nmap <M-Ins> yyp
imap <M-Ins> <C-O>yy<C-O>p
noremap Y y$
vnoremap <Home> ^
vnoremap <End> $
dig <3 9829
dig ^^ 769
dig __ 818
dig .. 8230
dig ex 259
dig ax 226
dig ix 238
dig sx 537
dig tx 539
dig Ex 258
dig Ax 194
dig Ix 206
dig Sx 536
dig Tx 538
map! <M-e> <C-K>ex
map! <M-a> <C-K>ax
map! <M-i> <C-K>ix
map! <M-s> <C-K>sx
map! <M-t> <C-K>tx
map! <M-S-E> <C-K>Ex
map! <M-S-A> <C-K>Ax
map! <M-S-I> <C-K>Ix
map! <M-S-S> <C-K>Sx
map! <M-S-T> <C-K>Tx
nnoremap <C-K> <C-T>
nnoremap <C-T> <C-]>
inoremap <C-^> <C-O><C-^>
nmap <C-kMinus> <C-W>-
imap <C-kMinus> <C-W>-
nmap <C-kPlus> <C-W>+
imap <C-kPlus> <C-W>+
vnoremap <S-Insert> "+y
map <S-Insert> "+y
map <C-Insert> "+gP
cmap <C-Insert> <C-R>+
imap <C-Insert> <C-V>
vmap <C-Insert> <C-V>
map <C-Del> dw
imap <C-Del> <C-O>dw
map <C-BS> db
imap <C-BS> <C-O>db
cmap <C-N> <CR>n
vmap <Tab> >gv
vmap <S-Tab> <gv
smap <Tab> <C-G>>gv
smap <S-Tab> <C-G><gv
cmap ~~ <C-R>=expand('%:p:h').'\'<cr>
nmap <M-Down> :<C-u>move .+1<CR>
nmap <M-Up> :<C-u>move .-2<CR>
imap <M-Down> <C-o>:<C-u>move .+1<CR>
imap <M-Up> <C-o>:<C-u>move .-2<CR>
vmap <M-Down> :move '>+1<CR>gv
vmap <M-Up> :move '<-2<CR>gv
nmap <silent> <M-Left> <<
nmap <silent> <M-Right> >>
vmap <silent> <M-Left> <
vmap <silent> <M-Right> >
imap <silent> <M-Left> <C-D>
imap <silent> <M-Right> <C-T>
nmap <C-up> <C-y>
imap <C-up> <C-o><C-y>
nmap <C-down> <C-e>
imap <C-down> <C-o><C-e>
nmap <leader>k :s/^/#/
vmap <leader>k :s/^/#/
nmap <leader>c :s/^\/\/\\|^--\\|^> \\|^[#"%!;]//
vmap <leader>c :s/^\/\/\\|^--\\|^> \\|^[#"%!;]//
nmap <silent> <leader>h :silent :nohlsearch<CR>
nmap <silent> <leader>w :set wrap!<CR>
nmap <silent> <leader>n :call ToggleNum()<CR>
nnoremap <silent> <leader>q :execute 'vimgrep /'.@/.'/g %'<CR>:copen<CR>
nnoremap <leader>s :%s///g<Left><Left><Left>
nnoremap <leader>S :%s/<c-r>=expand("<cword>")<cr>//c<left><left>
nnoremap <leader>/ :v//d<Left><Left>
nnoremap <leader>? :g//d<Left><Left>
nmap <leader>b :call WriteBackup()<CR>
nmap <leader>\| :bel vsp<CR>
nnoremap <leader>ft Vatzf
nnoremap <leader>V V`]
nnoremap <leader>p gqip
nnoremap <Leader>v V
noremap V <C-V>
xmap <Right> l
xmap <Left> k
xmap <Up> h
xmap <Down> j
map! <leader>a <a href=""></a><ESC>5ki
inoremap <leader>if <C-R>=expand("%:t:r")<CR>
inoremap <leader>in <C-R>=expand("%:t")<CR>
inoremap <leader>id <C-R>=expand("%:p:h")<CR>
inoremap <leader>ip <C-R>=expand("%:p")<CR>
inoremap <leader>: <c-r>=strftime('%Y%m%d-%H%M%S')<cr>
inoremap <leader>w <c-r>=strftime('%a')<cr>
inoremap <leader>d <c-r>=strftime('%B %d, %Y')<cr>
inoremap <leader>t <c-r>=strftime('%H:%M:%S')<cr>
inoremap <leader>m <c-r>=strftime('%m/%d/%Y')<cr>
inoremap <leader>y <c-r>=strftime('%Y.%m.%d')<cr>
iabbr <silent> h: <html>^M<head>^M<meta http-equiv="Content-Type" content="text/html; charset=utf-8">^M<title></title>^M</head>^M<body>^M</body>^M</html><ESC>hhhh^wwa<BS>
iabbr <silent> p: #!/usr/bin/python^M# -*- encoding: UTF-8 -*-^Mimport sys^M^Mif __name__=="__main__":^M .<BS>
iabbr <silent> c: #include <stdio.h>^Mint^Mmain( int argc, char* argv[] )^M{^M return 0;^M<BS>}<ESC>hh^
syn match ContactName "^\C[A-Z]\S*\(\s[A-Z]\S*\)*"
hi ContactName guifg=#000080 gui=bold
syn match ContactDate "\d\{2,4}/\d\d/\d\d"
hi ContactDate guifg=#8800CC
syn match ContactTag "=[a-z0-9][.a-z0-9]*"
hi ContactTag guifg=#CC00CC
syn match ContactAttr "[A-Za-z][.A-Za-z0-9]*:"
hi ContactAttr guifg=#440000 gui=bold
au BufNewFile,BufRead *.ijs setf j