From 7845fa4e392e8808693096329bf3638e3231186f Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Mon, 9 Jan 2023 21:32:27 +0100 Subject: Added restore cursor position functionality --- plugin/vim-recently-used.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/vim-recently-used.vim b/plugin/vim-recently-used.vim index f3c4b00..c8f8f11 100644 --- a/plugin/vim-recently-used.vim +++ b/plugin/vim-recently-used.vim @@ -36,3 +36,7 @@ autocmd VimEnter * \ | execute ':RecentlyUsed" \ | wincmd w' \ | endif + +" When opening files: Restore last cursor position from shadafile or viminfo +autocmd BufReadPost * + \ call setpos(".", getpos("'\"")) -- cgit v1.2.3