I have configured .dotfiles. Eg. see here https://wiki.archlinux.org/index.php/Dotfiles
So now I can do dgit push or dgit pull on whichever computer I want, and I have all my config files (including .vimrc) with me.
Now I wish to share vim history across all my accounts on different computers. I suppose that there can be many different solutions to this problem.
So far I am doing this manually by storing vim history inside a ~/.vim_history_manual.txt file. I do this by typing exactly this inside gvim (version 8.0.707):
These commands followed by a dgit push will make my vim history available on other computers.
I wanted to make it more automatic. However I have never written such advanced functions in gvim :) I started typing in .vimrc this:
function! ExportVimHistoryManually() ...? endfunction
only to realize that, I suppose, putting these commands there verbatim would not work:
So could you tell me:
how to solve this problem in general - share vim history across different accounts, using vim / gvim version 8.0.707
or how to solve this problem in particular - how to write this function ExportVimHistoryManually() which I started?
Perhaps then this function could be supplemented by a second function ImportVimHistoryManually() ? Because currently, when I want to check some of my old commands, I open ~/.vim_history_manual.txt file.
or maybe there is some vim plugin for this which I missed?
EDIT: I didn't mention it before, but only now (after seeing B Layer's answer, and earlier discussion) I realized, that it would be most useful when invoked from inside a running vim session. This is because usually I have multiple instances of gvim opened, and the instance which has quit last is overwriting the viminfo file. So it seems to me, that the best way to preserve history of other instances is to export it manually without ever quitting. The other way is to save session then quit, run B Layer's command, then start it again and restore session.
NOTE: I am using devuan linux ascii release.