mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-09 20:34:31 +02:00
feat(autocmds): rebalance windows on resize
This commit is contained in:
parent
2ea489c7ba
commit
6674a3accf
1 changed files with 8 additions and 1 deletions
|
@ -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
|
-- Check if we need to reload the file when it changed
|
||||||
vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, { command = "checktime" })
|
vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, { command = "checktime" })
|
||||||
|
@ -10,6 +10,13 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
end,
|
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
|
-- go to last loc when opening a buffer
|
||||||
vim.api.nvim_create_autocmd("BufReadPost", {
|
vim.api.nvim_create_autocmd("BufReadPost", {
|
||||||
callback = function()
|
callback = function()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue