From 4e803491d6b652bb581752125315860a60244792 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Thu, 21 Nov 2024 16:40:26 +0100 Subject: [PATCH] nvim: add ub to toggle light/dark background --- home/common/nvim/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/home/common/nvim/init.lua b/home/common/nvim/init.lua index 90f5db6..88c9353 100644 --- a/home/common/nvim/init.lua +++ b/home/common/nvim/init.lua @@ -147,5 +147,8 @@ vim.keymap.set("n", "K", function() offset_x = 2, } end, {}) +vim.keymap.set("n", "ub", function() + vim.o.background = (vim.o.background == "light" and "dark" or "light") + end, opts("Toggle dark/light background"))