" fixing, and it has a bug which causes spurious "c"s to appear, which can be " fixed by unsetting t_RV: "if $COLORTERM == 'gnome-terminal' " execute 'set t_kb=' . nr2char(8) " [Char 8 is +H.] "fixdel "set t_RV= " `XTerm', `Konsole', and `KVT' all also need and fixing; " there's no easy way of distinguishing these terminals from other things " that claim to be "xterm", but `RXVT' sets $COLORTERM to "rxvt" and these " don't: "elseif $COLORTERM == '' " execute 'set t_kb=' . nr2char(8) "fixdel " The above won't work if an `XTerm' or `KVT' is started from within a `Gnome " Terminal' or an `RXVT': the $COLORTERM setting will propagate; it's always " OK with `Konsole' which explicitly sets $COLORTERM to "". "endif "endif 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 morning 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 noexpandtab set softtabstop=2 set tabstop=2 set shiftwidth=2 set shiftround set smarttab set autoindent set formatoptions=cqlr set textwidth=79 set scrolloff=3 set sidescrolloff=10 set previewheight=5 " nibiru pridal "set fencs=cp1250 fenc=cp1250 "set encoding=utf8 set fencs=utf-8,cp1250 fenc=utf-8 enc=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 pp call CustomCommandsPascal() 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 " specialni pripady "autocmd BufNewFile,BufRead /media/data/www/* set fencs=cp1250 fenc=cp1250 "autocmd BufNewFile,BufRead /media/data/www/shopsys_prerevolution/* set encoding=utf8 "autocmd BufNewFile,BufRead /media/data/www/subversion/shopsys2/* set fencs=cp1250 fenc=cp1250 "autocmd BufNewFile,BufRead ~/work/newshop/templates/*.tpl echo expand("") 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! 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 " specialni makra imap ,fwh while ($a = $db->fetch()) { endf function! OpenShopSysModule(filename) edit a:0 endf "function! CustomCommandsPascal() "makra pro pascal " imap ,if if () beginend$2k$2hi "endf