Skip to content

Commit 2a7179e

Browse files
Crypto-Spartan2takker
authored andcommitted
feat: add vim.opt.confirm = true (nvim-lua#1384)
1 parent fef428b commit 2a7179e

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
@@ -159,6 +159,11 @@ vim.opt.cursorline = true
159159
-- Minimal number of screen lines to keep above and below the cursor.
160160
vim.opt.scrolloff = 10
161161

162+
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
163+
-- instead raise a dialog asking if you wish to save the current file(s)
164+
-- See `:help 'confirm'`
165+
vim.opt.confirm = true
166+
162167
-- [[ Basic Keymaps ]]
163168
-- See `:help vim.keymap.set()`
164169

0 commit comments

Comments
 (0)