소스 검색

feat: add `vim.opt.confirm = true` (#1384)

Crypto-Spartan 1 년 전
부모
커밋
38f4744e25
1개의 변경된 파일과 5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      init.lua

+ 5 - 0
init.lua

@@ -156,6 +156,11 @@ vim.opt.cursorline = true
 -- Minimal number of screen lines to keep above and below the cursor.
 vim.opt.scrolloff = 10
 
+-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
+-- instead raise a dialog asking if you wish to save the current file(s)
+-- See `:help 'confirm'`
+vim.opt.confirm = true
+
 -- [[ Basic Keymaps ]]
 --  See `:help vim.keymap.set()`