Skip to content

Commit 1506b35

Browse files
Crypto-Spartanpieterlexis-tomtom
authored andcommitted
feat: add vim.opt.confirm = true (nvim-lua#1384)
1 parent 4ec892e commit 1506b35

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

init.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ vim.api.nvim_create_autocmd('FileType', {
8888
end,
8989
})
9090

91+
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
92+
-- instead raise a dialog asking if you wish to save the current file(s)
93+
-- See `:help 'confirm'`
94+
vim.opt.confirm = true
95+
9196
-- [[ Basic Keymaps ]]
9297
-- See `:help vim.keymap.set()`
9398

0 commit comments

Comments
 (0)