nvim: sets: auto close unused buffers

This commit is contained in:
kalmenn 2023-12-18 00:26:46 +01:00
parent a4947fe4cf
commit 1a9ae8abef
Signed by: kalmenn
GPG key ID: DFF253360BF8471F

View file

@ -4,37 +4,33 @@ vim.o.number = true
vim.o.relativenumber = true vim.o.relativenumber = true
-- show hidden characters -- show hidden characters
vim.opt.list = true vim.opt.list = true
vim.opt.listchars = { tab = '', trail = '·' } vim.opt.listchars = { tab = '', trail = '·' }
-- indentation -- indentation
vim.opt.expandtab = true vim.opt.expandtab = true
vim.opt.tabstop = 4 vim.opt.tabstop = 4
vim.opt.softtabstop = vim.opt.tabstop:get() vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4 vim.opt.shiftwidth = 4
vim.opt.smartindent = true vim.opt.smartindent = true
-- line wrapping -- line wrapping
vim.opt.wrap = false vim.opt.wrap = false
-- undo history -- undo history
vim.opt.swapfile = false vim.opt.swapfile = false
vim.opt.backup = false vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.local/state/nvim/undodir" vim.opt.undodir = os.getenv("HOME") .. "/.local/state/nvim/undodir"
vim.opt.undofile = true vim.opt.undofile = true
vim.opt.updatetime = 50 vim.opt.updatetime = 50
-- end search when exiting -- end search when exiting
vim.opt.hlsearch = false vim.opt.hlsearch = false
vim.opt.incsearch = true vim.opt.incsearch = true
-- auto-close unused buffers if all changes have been saved
vim.opt.hidden = false
-- stuff -- stuff
vim.opt.fillchars:append({ eob = ' ' }) vim.opt.fillchars:append({ eob = ' ' })