From 6352cee2d5bfe1f07648ac062e2d08f52a970d7e Mon Sep 17 00:00:00 2001 From: Brahmajit Das Date: Thu, 29 Jan 2026 21:40:13 +0530 Subject: plugin: basics: Keep window sizes equal when resizing Signed-off-by: Brahmajit Das --- plugin/basics.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'plugin/basics.lua') diff --git a/plugin/basics.lua b/plugin/basics.lua index 6184fe6..0e33569 100644 --- a/plugin/basics.lua +++ b/plugin/basics.lua @@ -42,6 +42,21 @@ opt.smartindent = true -- Autoindent new lines opt.autoindent = true -- Copy indent from current line when starting new line opt.cindent = true -- C programming indentation +----------------------------------------------------------- +-- Equal window sizes when resizing +----------------------------------------------------------- +vim.api.nvim_create_autocmd({ + "VimResized", + "WinNew", + "WinClosed", +}, { + callback = function() + vim.cmd("wincmd =") + end, +}) +opt.equalalways = true +opt.eadirection = "both" + ----------------------------------------------------------- -- Memory, CPU ----------------------------------------------------------- -- cgit v1.2.3