+encoding=utf-8; termencoding=iso-8859-2; fileencodings=utf-8,iso-8859-2
[nethome.git] / .vimrc
1 "autocmd * * echo "test"
2
3 "startup   read      existing     file: BufReadPre BufReadPost BufEnter VimEnter
4 "command   read      non-existing file: BufCreate   BufNewFile BufEnter
5 "immediate switch to existing     file: BufReadPre BufReadPost BufEnter
6 "immediate switch to non-existing file:             BufNewFile BufEnter
7
8 autocmd BufCreate,VimEnter *                                             let g:BufEnter_ts= 8
9 autocmd BufCreate,VimEnter */home/{short,kratochvil,root}/{src,WWW}/*    let g:BufEnter_ts= 2
10 autocmd BufCreate,VimEnter */home/{short,kratochvil,root}/src/*gnokii*/* let g:BufEnter_ts= 8
11 autocmd BufCreate,VimEnter *.{i{,.as},s}                                 let g:BufEnter_ts=20
12 autocmd BufEnter * call BufEnter()
13 autocmd VimEnter * call BufEnter()
14 function BufEnter()
15         if exists("g:BufEnter_ts")
16                 let &ts=g:BufEnter_ts
17                 let &sw=g:BufEnter_ts
18                 unlet g:BufEnter_ts
19         endif
20 endfunction
21
22 set encoding=utf-8
23 set termencoding=iso-8859-2
24 " fileencoding is detected from fileencodings, first one for empty files
25 set fileencodings=utf-8,iso-8859-2
26
27 ca X x
28 syntax off
29 set autoindent
30 set noerrorbells
31 set ruler
32 set ignorecase
33 set nobackup
34 set nowritebackup
35 set exrc
36 set nostartofline
37 set nohlsearch
38 set fo=tcq
39 set viminfo='100,\"1000,:100,/40
40 set tags=./tags,./TAGS,./../tags,./../TAGS,./../../tags,./../../TAGS,./../../../tags,./../../../TAGS,./../../../../tags,./../../../../TAGS,./../../../../../tags,./../../../../../TAGS,./../../../../../../tags,./../../../../../../TAGS,./../../../../../../../tags,./../../../../../../../TAGS,./../../../../../../../../tags,./../../../../../../../../TAGS,./../../../../../../../../../tags,./../../../../../../../../../TAGS,./../../../../../../../../../../tags,./../../../../../../../../../../TAGS,./../../../../../../../../../../../tags,./../../../../../../../../../../../TAGS,/usr/src/redhat/BUILD/tags,/usr/src/redhat/BUILD/TAGS,/usr/include/tags,/usr/include/TAGS
41
42 noremap \ep :set invpaste paste?<cr>
43 noremap \eq @q
44 noremap \e: @:
45 noremap \eN :next<cr>
46 noremap \eP :prev<cr>
47 noremap \ 4 G:r !date '+\%H:\%M:\%S-'\rkA
48 noremap \ed :set hlsearch<cr>/^[+-]\([^+-].*\\|\)$<cr>
49 noremap \eD :set hlsearch<cr>/^[+-][+-]\([^+-].*\\|\)$<cr>