aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-03-01 19:59:09 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2023-03-01 19:59:09 +0100
commit07344f87a105f36e6e255b34a8aed629d258b4e6 (patch)
tree3e60d3d5d4f6b18e491e4a7cc31f227c81c2999f
parentvim: remove unused key bindings (diff)
downloadlinux-home-07344f87a105f36e6e255b34a8aed629d258b4e6.tar.gz
linux-home-07344f87a105f36e6e255b34a8aed629d258b4e6.zip
vim: add more settings from vimrc_example.vim
Diffstat (limited to '')
-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
" -----------------------------------------------------------------------------