feat(autocmds): rebalance windows on resize
This commit is contained in:
1 file changed
+8
-1
@@ -1,4 +1,4 @@
|
||||
-- This file is automatically loaded by plugins.config
|
||||
-- This file is automatically loaded by plugins.init
|
||||
|
||||
-- Check if we need to reload the file when it changed
|
||||
vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, { command = "checktime" })
|
||||
@@ -10,6 +10,13 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
end,
|
||||
})
|
||||
|
||||
-- resize splits if window got resized
|
||||
vim.api.nvim_create_autocmd({ "VimResized" }, {
|
||||
callback = function()
|
||||
vim.cmd("tabdo wincmd =")
|
||||
end,
|
||||
})
|
||||
|
||||
-- go to last loc when opening a buffer
|
||||
vim.api.nvim_create_autocmd("BufReadPost", {
|
||||
callback = function()
|
||||
|
||||
Reference in new issue
Block a user