💾 NeoSave.nvim
📢 Introduction
NeoSave is a Neovim plugin that automatically saves your files as you edit, ensuring your progress is preserved. Configure NeoSave to save either the current buffer or all open buffers, and easily toggle auto-saving on and off.
✨ Features
- Save all open buffers or only the current buffer.
- Auto-save files upon modification.
- Toggle auto-saving off and on.
💽 Persistence
NeoSave remembers the auto-save state across sessions.
🔔 Default Behavior
NeoSave is enabled by default. To toggle it off and on for specific files, see below.
🛠️ Usage
To toggle NeoSave off and on, you can use the ToggleNeoSave
command:
:ToggleNeoSave
You can also create a keybinding to toggle NeoSave more conveniently:
vim.keymap.set("n", "<leader>s", "<cmd>ToggleNeoSave<cr>", { noremap = true, silent = true })
To clear the list of disabled files, you can use the ClearNeoSave
command:
:ClearNeoSave
📦 Installation
- Install via your favorite package manager.
{
"ecthelionvi/NeoSave.nvim",
opts = {}
},
use "ecthelionvi/NeoSave.nvim"
- Setup the plugin in your
init.lua
. This step is not needed with lazy.nvim ifopts
is set as above.
require("NeoSave").setup()
🔧 Configuration
Pass your config table into the setup() function or opts with lazy.nvim.
The available options:
write_all_bufs
(boolean): save all open buffers or only the current buffer- false (default)
Default Config
local config = {
write_all_bufs = false,
}