Fandom

Vim Tips Wiki

Remember where you had ended reading help

1,624pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Tip 293 Printable Monobook Previous Next

created 2002 · complexity basic · author Max Ischenko · version 5.7


You could jump to the last place you had been while reading Vim help files if you add this to your vimrc file:

au BufLeave * if &ft == "help" | mark H | endif

Then use 'H to go to the mark H.

To work between Vim runs 'viminfo' option should be setup to save file marks.

ReferencesEdit

CommentsEdit

Perhaps a modification to allow 'H to open another window if a help window doesn't already exist might be useful here. Basically, the problem I had with this was that if i I hit 'H while editing a buffer, it replaced the buffer with the help file (though it DID take me to the right location, as you suggested it would) instead of opening a new window.


What about

nmap <F1> <C-W>s'H

Also on Fandom

Random Wiki