X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=.vimrc;h=7f6d741a347148caaf81f22bf8ad05de93633c4e;hp=ed7d99871cce85a34df8b48d9a6da4702c9dccde;hb=6b28974e8504502ac1bd8814da4f966faecd042d;hpb=8e50a9f15f1f1d3e269bc8e7b43b162110dc96eb diff --git a/.vimrc b/.vimrc index ed7d998..7f6d741 100644 --- a/.vimrc +++ b/.vimrc @@ -1,3 +1,6 @@ +" $Id$ + + if !exists("g:_kratochvil_vimrc") let g:_kratochvil_vimrc=1 @@ -33,14 +36,26 @@ 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 +let g:loaded_matchparen = 1 +set swapsync= +" vim-7+ only +silent! set nofsync set noerrorbells set ruler set ignorecase @@ -50,6 +65,7 @@ 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) @@ -75,5 +91,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")