X-Git-Url: https://git.jankratochvil.net/?a=blobdiff_plain;f=.vimrc;h=c05e1a54d4f553ce943ba5eef88a0dc7d4f6fde1;hb=04168ddff1f6c1eec5c50b07aa656c205c8d5f42;hp=de0715620972bad8a97cb6bcb5a4bdb696c4e5e1;hpb=4a31f292e1976bb7c16820293dc59609cd2e8a12;p=nethome.git diff --git a/.vimrc b/.vimrc index de07156..c05e1a5 100644 --- a/.vimrc +++ b/.vimrc @@ -1,3 +1,6 @@ +" $Id$ + + if !exists("g:_kratochvil_vimrc") let g:_kratochvil_vimrc=1 @@ -33,11 +36,19 @@ function BufEnter() runtime! ./../../../../../../../../../../../.vimrc ./../../../../../../../../../../.vimrc ./../../../../../../../../../.vimrc ./../../../../../../../../.vimrc ./../../../../../../../.vimrc ./../../../../../../.vimrc ./../../../../../.vimrc ./../../../../.vimrc ./../../../.vimrc ./../../.vimrc ./../.vimrc ./.vimrc endif endfunction +" From Red Hat vimrc - restore the cursor position after the file got opened: +autocmd BufReadPost * call BufReadPost() +function BufReadPost() + if line("'\"") > 0 && line ("'\"") <= line("$") + exe "normal! g'\"" + endif +endfunction set encoding=utf-8 set termencoding=utf-8 " fileencoding is detected from fileencodings, first one for empty files -set fileencodings=utf-8,iso-8859-2 +" 'iso-8859-2,euc-jp' really does not work for 'euc-jp' +set fileencodings=utf-8,euc-jp,iso-8859-2 ca X x syntax off @@ -49,16 +60,22 @@ set nowritebackup set exrc set nostartofline set nohlsearch +set noincsearch +set nofoldenable set fo=tcq1 set viminfo='100,\"1000,:100,/40 +" FIXME: Learn how to do :tag instead of :tselect with :cstag (used by :tag and CTRL-] if set cst) +set nocst 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,./reactos/tags,./../reactos/tags,./../../reactos/tags,,./../../../reactos/tags,./../../../../reactos/tags,./../../../../../reactos/tags,./../../../../../../reactos/tags,./w32/inc/tags,./../w32/inc/tags,./../../w32/inc/tags,,./../../../w32/inc/tags,./../../../../w32/inc/tags,./../../../../../w32/inc/tags,./../../../../../../w32/inc/tags,./../../../../../../../w32/inc/tags,/usr/src/redhat/BUILD/tags,/usr/src/redhat/BUILD/TAGS,/usr/include/tags,/usr/include/TAGS noremap p :set invpaste paste? noremap l :set invlist paste? noremap q @q noremap : @: -noremap N :nextzz -noremap P :prevzz +noremap :nextzz +noremap :prevzz +noremap N :tnzz +noremap P :tpzz noremap M :cnzz noremap L :cpzz noremap g "myiw:grep-rw'm'. @@ -70,5 +87,6 @@ noremap D :set hlsearch/^[+-][+-]\([^+-].*\\|\)$ noremap w 0i /[^ ]vf.h"kyf./[^ ]vf.h"ly0x:r !date -d "`date '+\%Y'`-l-k" '+\%u'yypkV:!tr '1234567' 'PUSCPSN'jV:!tr '1234567' 'otttaoe'kJxv0xk0llllllplxxjddk0 noremap * :let ic_save=&ic:set noic*:let &ic=ic_save noremap # :let ic_save=&ic:set noic#:let &ic=ic_save +noremap :w:!aspell --check '%':e endif "!exists("g:_kratochvil_vimrc")