X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=.vimrc;h=722b45bf83b4ffa671391f4e463beef013e8a2b3;hp=adff46293f4892c388021b04962a297cf565707f;hb=d92995153b1e0a83e8a849b32bbd7f7403bf7cc5;hpb=5e79226e5f79ba11433a52ed0ca0d0684042f0ef diff --git a/.vimrc b/.vimrc index adff462..722b45b 100644 --- a/.vimrc +++ b/.vimrc @@ -1,6 +1,26 @@ -":version 4.x -autocmd BufEnter * set sw=8 tabstop=8 -autocmd BufEnter /home/{short,root}/src/* set sw=2 tabstop=2 +"autocmd * * echo "test" + +"startup read existing file: BufReadPre BufReadPost BufEnter VimEnter +"command read non-existing file: BufCreate BufNewFile BufEnter +"immediate switch to existing file: BufReadPre BufReadPost BufEnter +"immediate switch to non-existing file: BufNewFile BufEnter + +autocmd BufCreate,VimEnter * let g:BufEnter_ts= 8 +autocmd BufCreate,VimEnter */home/{short,kratochvil,root}/{src,WWW}/* let g:BufEnter_ts= 2 +autocmd BufCreate,VimEnter */home/{short,kratochvil,root}/src/*gnokii*/* let g:BufEnter_ts= 8 +autocmd BufCreate,VimEnter *.{i{,.as},s} let g:BufEnter_ts=20 +autocmd BufEnter * call BufEnter() +autocmd VimEnter * call BufEnter() +function BufEnter() + if exists("g:BufEnter_ts") + let &ts=g:BufEnter_ts + let &sw=g:BufEnter_ts + unlet g:BufEnter_ts + endif +endfunction + +ca X x +syntax off set autoindent set noerrorbells set ruler @@ -8,9 +28,17 @@ set ignorecase set nobackup set nowritebackup set exrc +set nostartofline set nohlsearch -syntax off -ca X x -set fo=tcq2 +set fo=tcq set viminfo='100,\"1000,:100,/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 + +noremap p :set invpaste paste? +noremap q @q +noremap : @: +noremap N :next +noremap P :prev +noremap  G:r !date '+\%H:\%M:\%S-' kA +noremap d :set hlsearch/^[+-]\([^+-].*\\|\)$ +noremap D :set hlsearch/^[+-][+-]\([^+-].*\\|\)$