We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c17915 commit 96c9450Copy full SHA for 96c9450
init.lua
@@ -214,6 +214,17 @@ vim.api.nvim_create_autocmd('TextYankPost', {
214
end,
215
})
216
217
+-- Guardar archivo al salir de INSERT MODE
218
+vim.api.nvim_create_autocmd('InsertLeave', {
219
+ pattern = '*',
220
+ callback = function()
221
+ -- Guarda solo si el buffer fue modificado y se puede escribir
222
+ if vim.bo.modified and vim.bo.modifiable and not vim.bo.readonly then
223
+ vim.cmd 'silent write'
224
+ end
225
+ end,
226
+})
227
+
228
-- [[ Install `lazy.nvim` plugin manager ]]
229
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
230
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
0 commit comments