Persist global marks on disk
Fixes #3841
What this PR does / why we need it: This PR ensures that marks are persisted between sessions through a new history file. This makes marks much more usable as marks set before the editor was closed/loaded will still work. This persists local and global marks. Also includes duplicate dedection, so when old marks are overriden the history file also removes the old mark from the file.
Which issue(s) this PR fixes #3841
Special notes for your reviewer:
I merged this PR and roughly used it, and found two issues:
- When 'vim. showMarksInGutter' is set to true, the initialization plugin prompts: mark. position. getLineBegin is not a function
- Using ` + marker cannot jump and will result in an invalid button state
Hey @EerikSaksi was this something you were hoping to come back to? Persistent marks would be great to have
I fixed the gutter issues and fixed some linting stuff, I think the `+ thing should also be solved now
Hey @EerikSaksi I can test this, before I do some questions..
Are global marks supposed to be workspace wide? So if I set a global mark (uppercase letter after m) then move to another file and call it ('M) should it take me to that file? Or are they only file dependent?
Yeah global marks mark a position and a file and will take you to that file, lower case marks are specific to files
I've tested @EerikSaksi's PR and I can confirm it works, I've tried setting a permanent mark and reloading the window and it does take me back to the right place, this doesn't happen on the main branch.
I don't see a gutter mark for permanent marks only local marks, is this intended?
is there any way I can help pushing this PR to be merged?
I really want to have this feature :)
Sorry been busy keep forgetting I’ll try look into getting this merged this weekend
@J-Fields I think this might be ready for prime time and to be merged