aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/plugins.vim5
-rw-r--r--lua/config/autosave.lua15
-rw-r--r--lua/plugins.lua8
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"}})