obsidian.nvim
obsidian.nvim copied to clipboard
How to add autobackup using obsidian git?
Hi,
I have installed Obsidian git plugin which automatically backups vaults one hour after file changed. This only works when Obsidian application is active, but if I change vaults inside neovim it does not run backups.
Is there any way to trigger backup changes in neovim as well?
Sincerely, Marko
Hey @ljudina not at the moment. Personally I just have my own shortcut command that I call periodically to create commits via fugitive.
Owner
Could you share them please?
@NikolaM-Dev Probably something like this I'd imagine:
mappings = {
['<c-s>'] = {
action = function() vim.cmd 'Git commit -am "This is a routine Obsidian commit"' end,
opts = { buffer = true }
}
}
But if you want automation you'd be better off setting up an hourly service that runs outside of Neovim to make these commits, that way they will always run as long as your computer is on. On linux a systemd user service would be great for this.