New options `-t': timeout
[nethome.git] / .vimrc
diff --git a/.vimrc b/.vimrc
index 95fe92e..7f6d741 100644 (file)
--- 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
@@ -49,6 +64,8 @@ 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)
@@ -74,5 +91,6 @@ noremap <Esc>D :set hlsearch<cr>/^[+-][+-]\([^+-].*\\|\)$<cr>
 noremap <Esc>w 0i <Esc>/[^ ]<cr>vf.h"kyf./[^ ]<cr>vf.h"ly0x:r !date -d "`date '+\%Y'`-<C-r>l-<C-r>k" '+\%u'<cr>yypkV:!tr '1234567' 'PUSCPSN'<cr>jV:!tr '1234567' 'otttaoe'<cr>kJxv0xk0llllllplxxjddk0
 noremap * :let ic_save=&ic<cr>:set noic<cr>*:let &ic=ic_save<cr>
 noremap # :let ic_save=&ic<cr>:set noic<cr>#:let &ic=ic_save<cr>
+noremap <C-k> :w<cr>:!aspell --check '%'<cr>:e<cr>
 
 endif "!exists("g:_kratochvil_vimrc")