set vb t_vb= " * User Interface " ****************************************************************************** set confirm if has('syntax') && (&t_Co > 2) syntax on set hlsearch endif set history=50 set viminfo=/10,'10,r/mnt/zip,r/mnt/floppy,f0,h,\"100 set wildmenu set shortmess+=r set ruler set showmode set showcmd set showfulltag set display+=lastline set mouse=a set nrformats=alpha,hex set showmatch set noautowrite " folding set foldmethod=marker set foldmarker={{{,}}} " barevne schema colorscheme darkblue cmap // =expand("%:p:h")."/" cmap ,cd ="cd /media/data/www/" cmap ,cp ="\"+y" " * Text Formatting -- General " ****************************************************************************** filetype plugin indent on set nowrap set linebreak set showbreak=+ set noexpandtab set softtabstop=4 set tabstop=4 set shiftwidth=4 set shiftround set smarttab set autoindent set formatoptions=cqlr set textwidth=79 set scrolloff=3 set sidescrolloff=10 set previewheight=5 set fenc=utf-8 enc=utf-8 set fencs=utf-8,cp1250,iso8859-2 set termencoding=utf-8 au BufNewFile,BufRead *.pp setf pascal " * Text Formatting -- Specific File Formats " ****************************************************************************** autocmd FileType c,cpp set cindent cino=t0(0u0 | call CustomCommandsC() "expandtab autocmd FileType c,cpp,php,css,perl set smartindent autocmd FileType php call CustomCommandsPHP() autocmd FileType css set comments= autocmd FIletype tex command Cslatex call CslatexExecute() autocmd FIletype tex command Pdfcslatex call PdfcslatexExecute() autocmd Filetype tex command Xdvi call XdviExecute() augroup filetype " zvlastni syntaxe autocmd BufNewFile,BufRead style.css.php set filetype=css autocmd BufNewFile,BufRead style.css set filetype=css autocmd BufNewFile,BufRead style.php set filetype=css augroup END " * Search & Replace " ****************************************************************************** set ignorecase set smartcase set incsearch set gdefault " * Keystrokes " ****************************************************************************** set backspace=eol,start,indent " ulozeni souboru klavesou F2 nmap :w vmap omap imap cmap " ulozeni klavesovou zkratkou C-S nmap :w imap " doplnovani Ctrl-Space imap " prepinani mezi buffery a okny nmap :bp! nmap :bn! nmap W nmap w nmap :bp! nmap :bn! " smart-home imap ^i nmap ^ " make map :w:make imap " prochazeni chyb kompilace map :cn map :cp imap imap " mazani mezer na koncich radku nmap :%s#\s+##geH " dalsi radek bez komentare imap o " smazani slova imap " muj debug pro css imap ,bor border: 1px blue solid; " klavesa pro odstraneni highlightu hledani (dobra vec :)) map H :noh " man syntax highlighting a nastaveni Shift-k na otevirani man v novem okne runtime! ftplugin/man.vim " * Used functions " ****************************************************************************** function! XdviExecute() let dvifile=substitute(expand("%"), "\.tex", ".dvi", "l") let xdvicommand="! xdvi -watchfile 1 ".dvifile." &" execute xdvicommand endf function! CslatexExecute() set makeprg=cslatex\ --interaction\ nonstopmode\ % set errorformat=%E!\ LaTeX\ %trror:\ %m, \%E!\ %m, - "%.%#" (".*") - "%*\\d" ("\d\+") \%+WLaTeX\ %.%#Warning:\ %.%#line\ %l%.%#, \%+W%.%#\ at\ lines\ %l--%*\\d, \%WLaTeX\ %.%#Warning:\ %m, \%Cl.%l\ %m, \%+C\ \ %m., \%+C%.%#-%.%#, \%+C%.%#[]%.%#, \%+C[]%.%#, \%+C%.%#%[{}\\]%.%#, \%+C<%.%#>%.%#, \%C\ \ %m, \%-GSee\ the\ LaTeX%m, \%-GType\ \ H\ %m, \%-G\ ...%.%#, \%-G%.%#\ (C)\ %.%#, \%-G(see\ the\ transcript%.%#), \%-G\\s%#, \%+O(%f)%r, \%+P(%f%r, \%+P\ %\\=(%f%r, \%+P%*[^()](%f%r, \%+P[%\\d%[^()]%#(%f%r, \%+Q)%r, \%+Q%*[^()])%r, \%+Q[%\\d%*[^()])%r make endf function! PdfcslatexExecute() set makeprg=pdfcslatex\ --interaction\ nonstopmode\ % set errorformat=%E!\ LaTeX\ %trror:\ %m, \%E!\ %m, - "%.%#" (".*") - "%*\\d" ("\d\+") \%+WLaTeX\ %.%#Warning:\ %.%#line\ %l%.%#, \%+W%.%#\ at\ lines\ %l--%*\\d, \%WLaTeX\ %.%#Warning:\ %m, \%Cl.%l\ %m, \%+C\ \ %m., \%+C%.%#-%.%#, \%+C%.%#[]%.%#, \%+C[]%.%#, \%+C%.%#%[{}\\]%.%#, \%+C<%.%#>%.%#, \%C\ \ %m, \%-GSee\ the\ LaTeX%m, \%-GType\ \ H\ %m, \%-G\ ...%.%#, \%-G%.%#\ (C)\ %.%#, \%-G(see\ the\ transcript%.%#), \%-G\\s%#, \%+O(%f)%r, \%+P(%f%r, \%+P\ %\\=(%f%r, \%+P%*[^()](%f%r, \%+P[%\\d%[^()]%#(%f%r, \%+Q)%r, \%+Q%*[^()])%r, \%+Q[%\\d%*[^()])%r make endf function! CustomCommandsC() " manualove stranky nmap K \K " makra imap ,if if () {}k$2hi imap ,fo for (;;) {}k$4hi imap ,fi for (int i=0; i < ; i++) {}k$7hi imap ,wh while () {}k$2hi imap ,sw switch () {}k$2hi imap ,ca case :break;k$i imap ,de default:break;kA endf function! CustomCommandsPHP() " zkratky iab func function " makra imap ,if if () {}k$2hi imap ,fo for (;;) {}k$4hi imap ,fi for (int $i = 0; $i < ; $i++) {}k$F<2li imap ,wh while () {}k$2hi imap ,set $setting['shop']['url'] imap ,v var_dump();hi imap ,d dump();hi endf "function! CustomCommandsPascal() "makra pro pascal " imap ,if if () beginend$2k$2hi "endf set nocp let g:pydiction_location ="/opt/pydiction/complete-dict"