X-Git-Url: https://git.jankratochvil.net/?a=blobdiff_plain;f=.vimrc;h=4fc1e2f6fd16f08a79a48fdcb946964706659c19;hb=82e0aa5676ee5e3f4b4b06c850294c2ec04d51ec;hp=652525e81bd96852618e58999c64aa49821dd699;hpb=26b5c23cee866b73b9f8874c467c7f5611c81410;p=nethome.git diff --git a/.vimrc b/.vimrc index 652525e..4fc1e2f 100644 --- a/.vimrc +++ b/.vimrc @@ -33,6 +33,13 @@ 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 @@ -49,17 +56,22 @@ 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) +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 B :cnzz -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'. noremap zz