Auto file backup silently.
silentsaver.vim is a Vim plugin that automatically backup files.
If you use folke/lazy.nvim.
{
"yukimemi/silentsaver.vim",
lazy = false,
dependencies = {
"vim-denops/denops.vim",
},
}
If you use yukimemi/dvpm.
dvpm.add({ url: "yukimemi/silentsaver.vim" });
- Deno - A modern runtime for JavaScript and TypeScript
- vim-denops/denops.vim: 🐜 An ecosystem of Vim/Neovim which allows developers to write cross-platform plugins in Deno
No special settings are required.
By default, auto backup current buffer on CursorHold
and BufWritePre
.
:DisableSilentSaver
Disable auto backup.
:EnableSilentSaver
Enable auto backup.
:OpenSilentSaver
Show list of backed up files with quickfix.
No settings are required. However, the following settings can be made if necessary.
g:silentsaver_debug
Enable debug messages.
default is v:false
g:silentsaver_ignore_filetypes
A list of filetypes to be ignored.
default is ["log"]
g:silentsaver_echo
Whether to output echo messages during backup.
default is v:true
g:silentsaver_notify
Whether to vim.notify
messages during backup. (Neovim only)
default is v:false
g:silentsaver_dir
Backup directory.
default is ~/.cache/silentsaver
g:silentsaver_events
Event lists to do backup.
default is ["CursorHold", "BufWritePre"]
let g:silentsaver_debug = v:false
let g:silentsaver_echo = v:false
let g:silentsaver_notify = v:true
let g:silentsaver_dir = "~/.cache/silentsaver"
let g:silentsaver_events = ["CursorHold", "BufWritePre", "BufRead"]
let g:silentsaver_ignore_filetypes = ["csv", "log"]
Licensed under MIT License.
Copyright (c) 2023 yukimemi