diff options
| author | jdhao <jdhao@hotmail.com> | 2022-08-01 01:14:09 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2022-08-01 01:14:09 +0800 |
| commit | 5498a05bf782977453f11608f5ad905c9119790f (patch) | |
| tree | d4a46cf71c9741f84d8a386306a0ce1664404081 | |
| parent | 644f8b6e2dc2ff3100c1f489a4c343f64f0d992c (diff) | |
revert to vim-auto-save
auto-save.nvim is erroring out
| -rw-r--r-- | core/plugins.vim | 5 | ||||
| -rw-r--r-- | lua/config/autosave.lua | 15 | ||||
| -rw-r--r-- | lua/plugins.lua | 8 |
3 files changed, 6 insertions, 22 deletions
diff --git a/core/plugins.vim b/core/plugins.vim index 910c4ab..a044b76 100644 --- a/core/plugins.vim +++ b/core/plugins.vim @@ -425,3 +425,8 @@ function! s:wilder_init() abort echohl Error |echomsg "Wilder.nvim missing: run :PackerSync to fix."|echohl None endtry endfunction + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" auto-save " +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +let g:auto_save = 1 " enable AutoSave on Vim startup diff --git a/lua/config/autosave.lua b/lua/config/autosave.lua deleted file mode 100644 index d290e7f..0000000 --- a/lua/config/autosave.lua +++ /dev/null @@ -1,15 +0,0 @@ -require("autosave").setup({ - enabled = true, - execution_message = "Autosaved at " .. vim.fn.strftime("%H:%M:%S"), - events = { "InsertLeave", "TextChanged" }, - conditions = { - exists = true, - filename_is_not = {"plugins.lua"}, - filetype_is_not = {}, - modifiable = true, - }, - write_all_buffers = false, - on_off_commands = true, - clean_command_line_interval = 1000, - debounce_delay = 135, -}) diff --git a/lua/plugins.lua b/lua/plugins.lua index da47601..a12b655 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -186,13 +186,7 @@ packer.startup({ -- use 'mg979/vim-visual-multi' -- Autosave files on certain events - use({ - "Pocco81/AutoSave.nvim", - event = "VimEnter", - config = function() - vim.defer_fn(function() require('config.autosave') end, 1500) - end - }) + use({"907th/vim-auto-save", event = "InsertEnter"}) -- Show undo history visually use({"simnalamburt/vim-mundo", cmd = {"MundoToggle", "MundoShow"}}) |
