[Level 1] Back to the last position in Vim

Everytime when we left Vim, and we have to use the arrow down from the first line,
is that possible to back to the last position when we re-open it?
You can add the configuration below in your .vimrc!

au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif

Wish this helps.

regards,
Stanley Huang

Comments

Popular posts from this blog

[Level 2] Shell Interactive With Zenity Episode 5 -- list

[Level 2] iif in Python