Is there a way to keep the cusror location off-screen in Vim / gVim while scrolling? Similar to many Windows editors.
I know about marks, and do use them. I also know the ‘.’ mark (last edit location), But looking for other ideas.
I’m asking this because sometimes i want to keep the cursor at some location, scroll to another place using the mouse-wheel, and then just press an arow key or something to get me back to that location.
Is there a way to keep the cusror location off-screen in Vim / gVim
Share
No. vim is a console application, so it doesn’t really make sense to have the cursour off-screen (it’s possible, but would just be confusing)
An alternative solution, to paraphrase posts from this thread from comp.editors:
Ctrl+ogoes to the previous cursor location,Ctrl+igoes to the next (like undo/redo for motions)Marks seem like the other solution..
Basically
ma, move around, then `a to jump back.Another option which Paul suggested,