History
Article Edit this page Discussion

Remember where you had ended reading help

From Vim Tips Wiki

(Redirected from VimTip293)
Jump to: navigation, search

Tip 293 Previous Next Created: July 30, 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.

[edit] References

[edit] Comments

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

Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Pixar
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Dark Shadows
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions


Vote for collaboration of the month.

Send this article to a friend
"Remember where you had ended reading help"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation