From 8375849316fbe04fa34b3ff94f4740bc5c9885c2 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Mon, 14 Oct 2019 17:40:52 +0000 Subject: [PATCH] Jump to last position in vim --- home/.vimrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/home/.vimrc b/home/.vimrc index ef9f4b4..be8e4e4 100644 --- a/home/.vimrc +++ b/home/.vimrc @@ -60,6 +60,13 @@ autocmd BufWinEnter * match ExtraWhitespace /\s\+$\| \+\ze\t/ " tab settings set ai +" jump to the last position +if has("autocmd") + au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") + \| exe "normal! g`\"" | endif +endif + + if has("gui_running") set guifont=Terminess\ Powerline endif