X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=.vimrc;h=6f20711258dd9e507c3c52f4ac24552f35f32d3b;hp=95fe92eafd507460b20038185d63920f70d65e32;hb=9dd74b7898cce5f91fb3821f6d301d5774bc24c8;hpb=7c9b10d7f5e3e34a6372699e6bc057c53c0d00e7 diff --git a/.vimrc b/.vimrc index 95fe92e..6f20711 100644 --- a/.vimrc +++ b/.vimrc @@ -33,11 +33,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,6 +57,7 @@ set nowritebackup set exrc set nostartofline set nohlsearch +set noincsearch 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)