X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=.vimrc;h=9a24e117f73e7a9a876abb1d8d9055104700d57d;hp=c97feba41e201c9fa90303ebb74e6fcf33d23b66;hb=3e8fc54d2a8d6b6daa0f9624814bf1a011f6d298;hpb=1073f4b16912de570250fc178a3a4f4127925e0c diff --git a/.vimrc b/.vimrc index c97feba..9a24e11 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,WWW}/* 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/^[+-][+-]\([^+-].*\\|\)$