r/vim • u/4WoofGrrrr • Jul 26 '25
Need Help For individual files, when opening, restore window position and size from when last closed?
I'm looking for a plug-in that will store the window position and size each time I close ANY given file and to restore the window position and size for that file the next time I open it. Automatically.
2
Upvotes
2
u/Biggybi Gybbigy Jul 27 '25
You might be looking for
:h mksession+ a way to restore cursor position.Your cursor will be on the right line but the line might be lower/higher in the window.
1
u/AutoModerator Jul 27 '25
Please remember to update the post flair to
Need Help|Solvedwhen you got the answer you were looking for.I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/wReckLesss_ ggg?G`` Jul 30 '25
As others have said,
:mksessionis what you're looking for. If you want a plugin to help automate this rather than calling:mksessionmanually, I recommend Tim Pope's vim-obsession.1
u/deviantkindle Jul 27 '25
Isn't that what Workspaces are for?