Enable autoread events
This commit is contained in:
parent
df3ce8e0bc
commit
0420953d3a
@ -29,3 +29,14 @@ vim.cmd([[nnoremap <silent> <C-S-PageDown> :tabmove +1<CR>]])
|
||||
|
||||
-- Use system clipboard for unnamed register
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
|
||||
-- Reload file automatically if changed externally
|
||||
vim.o.autoread = true
|
||||
vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter" }, {
|
||||
group = vim.api.nvim_create_augroup("AutoRead", { clear = true }),
|
||||
callback = function()
|
||||
if vim.fn.mode() ~= 'c' then
|
||||
vim.cmd("checktime")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user