git://git.jankratochvil.net
/
nethome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
828bf45
)
+Restore the cursor position after the file got opened.
author
short
<>
Thu, 19 May 2005 06:25:54 +0000
(06:25 +0000)
committer
short
<>
Thu, 19 May 2005 06:25:54 +0000
(06:25 +0000)
- From Red Hat: vimrc
.vimrc
patch
|
blob
|
history
diff --git
a/.vimrc
b/.vimrc
index
ed7d998
..
4fc1e2f
100644
(file)
--- 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
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
set encoding=utf-8
set termencoding=utf-8