Awesome
<h1 align="center"> š¾ NeoSave.nvim </h1> <p align="center"> <a href="http://www.lua.org"> <img alt="Lua" src="https://img.shields.io/badge/Lua-blue.svg?style=for-the-badge&logo=lua" /> </a> <a href="https://neovim.io/"> <img alt="Neovim" src="https://img.shields.io/badge/NeoVim-%2357A143.svg?&style=for-the-badge&logo=neovim&logoColor=white" /> </a> </p>š¢ 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,
}