aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--%HOME%/.vimrc8
1 files changed, 8 insertions, 0 deletions
diff --git a/%HOME%/.vimrc b/%HOME%/.vimrc
index 4d28c5c..c615bd6 100644
--- a/%HOME%/.vimrc
+++ b/%HOME%/.vimrc
@@ -89,6 +89,14 @@ endif
set exrc
set secure
+" Remember cursor position. This was copied from a random vimrc_example.vim.
+" It should be picked up when sourcing vimrc_example.vim, but I'm currently
+" using a platform that doesn't have this file.
+autocmd BufReadPost *
+ \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
+ \ | exe "normal! g`\""
+ \ | endif
+
" -----------------------------------------------------------------------------
" Search
" -----------------------------------------------------------------------------