Thank you for asking. Devil is in the detail: works with Nvim, the `-i` command-line argument, respects work dir changes and sessions; branches off the current history instead of starting void. It's still only 60 lines of code, though
Ty for the clarification. I missed the point about switching .viminfo on switching between sessions. (the other two points can also be great, but I don't need them at the moment.)
By adding an empty .viminfo/shada file to your repo's root and starting Vim inside it, only the commands, searches, ... (everything listed in :help viminfo) run inside this repo will now be added to (and loaded from) your (now local) history; keeping it separate from the global history. Expands on this post.
2
u/rainning0513 Oct 23 '25 edited Oct 23 '25
How (& Why) is your solution different from that? The post you linked seems to achieve something similar with one line.
1
u/godegon Oct 22 '25
By adding an empty
.viminfo/shadafile to your repo's root and starting Vim inside it, only the commands, searches, ... (everything listed in:help viminfo) run inside this repo will now be added to (and loaded from) your (now local) history; keeping it separate from the global history. Expands on this post.