From 9195a341f5f23ac8c3644f3fb4759ca150ec410f Mon Sep 17 00:00:00 2001 From: Patrick Auernig Date: Mon, 30 Sep 2024 19:19:02 +0200 Subject: [PATCH] Open help in a vertical split --- lua/valeth/options.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lua/valeth/options.lua b/lua/valeth/options.lua index 47a9955..89e0696 100644 --- a/lua/valeth/options.lua +++ b/lua/valeth/options.lua @@ -41,3 +41,14 @@ aucmd({ "InsertEnter", "InsertLeave", "BufEnter" }, { vim.opt.cursorline = not entered_insert_mode end }) + +-- Open help window in a vertical split +aucmd("BufWinEnter", { + group = "valeth", + pattern = "*/doc/*", + callback = function() + if vim.bo.filetype == "help" then + vim.cmd.wincmd("H") + end + end +})