set nocompatible set backspace=indent,eol,start " zapamietywane w viminfo set viminfo='20,\"50,h history=50 " linijka z dolu ekranu set ruler " sciezka szukania plikow dla ^Wf, gf itd. set path=.,/usr/include,/usr/local/include "set autoindent filetype indent on if has("autocmd") " pliki HTML i PHP edytujemy z rozsadnym kodowaniem "autocmd FileType html,php e! ++enc=iso8859-2 " w HTML dodajemy < i > jako nawiasy autocmd FileType html,php set matchpairs+=<:> indentexpr= autoindent autocmd FileType css set indentexpr= autocmd FileType cpp set path+=/usr/include/g++-3 " przywracanie pozycji w pliku "autocmd BufReadPost * if line("'\"") | exe "'\"" | endif " w plikach Makefile ustawiamy tabulator na 4 znaki itd. autocmd FileType make setlocal noet ts=4 sw=4 sts=4 endif " Don't use Ex mode, use Q for formatting map Q gq " Switch syntax highlighting on, when the terminal has colors " Also switch on highlighting the last used search pattern. if &t_Co > 2 || has("gui_running") syntax on set hlsearch endif function! Iso2win() %s///ge %s///ge %s///ge %s///ge %s///ge %s///ge set fileformat="dos" endfunction function! Win2iso() %s///ge %s///ge %s///ge %s///ge %s///ge %s///ge set fileformat="unix" endfunction function! DelIso() %s//c/ge | %s//e/ge | %s//l/ge | %s//n/ge | %s//o/ge | %s//z/ge %s//C/ge | %s//E/ge | %s//L/ge | %s//N/ge | %s//O/ge | %s//Z/ge %s//a/ge | %s//s/ge | %s//z/ge | %s//A/ge | %s//S/ge | %s//Z/ge endfunction function! DelWin() %s//c/ge | %s//e/ge | %s//l/ge | %s//n/ge | %s//o/ge | %s//z/ge %s//C/ge | %s//E/ge | %s//L/ge | %s//N/ge | %s//O/ge | %s//Z/ge %s//a/ge | %s//s/ge | %s//z/ge | %s//A/ge | %s//S/ge | %s//Z/ge endfunction if has("autocmd") augroup gzip " Remove all gzip autocommands au! " Enable editing of gzipped files " read: set binary mode before reading the file " uncompress text in buffer after reading " write: compress file after writing " append: uncompress file, append, compress file autocmd BufReadPre,FileReadPre *.gz set bin autocmd BufReadPost,FileReadPost *.gz let ch_save = &ch|set ch=2 autocmd BufReadPost,FileReadPost *.gz '[,']!gunzip autocmd BufReadPost,FileReadPost *.gz set nobin autocmd BufReadPost,FileReadPost *.gz let &ch = ch_save|unlet ch_save autocmd BufReadPost,FileReadPost *.gz execute ":doautocmd BufReadPost " . expand("%:r") autocmd BufWritePost,FileWritePost *.gz !mv :r autocmd BufWritePost,FileWritePost *.gz !gzip :r autocmd FileAppendPre *.gz !gunzip autocmd FileAppendPre *.gz !mv :r autocmd FileAppendPost *.gz !mv :r autocmd FileAppendPost *.gz !gzip :r augroup END endif if &term=="xterm" set t_Co=8 set t_Sb=^[4%dm set t_Sf=^[3%dm " pod xtermem brzydko wyglada podswietlanie skladni syntax off endif " some extra commands for HTML editing nmap \m wbgueyei<ea>pa>bba nmap \h1 _i

A

nmap \h2 _i

A

nmap \h3 _i

A

nmap \h4 _i

A

nmap \h5 _i
A
nmap \h6 _i
A
nmap \b wbieabb nmap \i wbieabb nmap \u wbieabb nmap \r wbieabb nmap \t wbieabb nmap \e wbieabb nmap \s wbieabb nmap \x wbFf noremap :bN inoremap :bN noremap :bn inoremap :bn noremap l :ls noremap :ls! inoremap D nmap # #:noh nmap * *:noh " automatycznie przechodz do katalogu z plikiem set autochdir " ustawienia tabulatora set shiftwidth=2 tabstop=2 expandtab " tekst na 78 kolumn, formatowanie komentarzy i tekstu set textwidth=78 formatoptions=tcroql1 nojoinspaces " opcje dla formatowania C/C++/Java set cinoptions=>1s,n0,f0,{1s,}0,^-1s,:1s,g0,+1s,(0 " pokazywanie par nawiasow set showmatch matchtime=3 set showfulltag virtualedit=block " nowe okna pod spodem i na prawo set splitbelow splitright " opcje szukania set incsearch noignorecase " bez ekranu powitalnego set shortmess+=I showcmd language pl_PL language messages en_US " if we are in C/C++ file set browsed man sections to useful for programmist, " if we are in SH/CSH file - set sections to useful for script-writter if has("autocmd") autocmd FileType c,cpp let $MANSECT="2:3:7:4" autocmd FileType sh,csh let $MANSECT="1:5:8:4" endif " set keyword characters (for moving "word" forward/backward etc.) set isk=a-z,A-Z,,,,,,,,,,,,,,,,,,,48-57,_ " load man plugin and let K letter to be "keyword man search" command runtime ftplugin/man.vim noremap K :exec 'Man ' . expand("")