Skip to content

Commit b5ef497

Browse files
Crypto-SpartanParamvirSran
authored andcommitted
feat: add vim.opt.confirm = true (nvim-lua#1384)
1 parent 8270f55 commit b5ef497

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

164+
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
165+
-- instead raise a dialog asking if you wish to save the current file(s)
166+
-- See `:help 'confirm'`
167+
vim.opt.confirm = true
168+
164169
-- [[ Basic Keymaps ]]
165170
-- See `:help vim.keymap.set()`
166171
vim.keymap.set('x', '<leader>p', [["_dP]])

0 commit comments

Comments
 (0)