From eb302ea61ebc5734bf3fba640ea94a94708835d5 Mon Sep 17 00:00:00 2001 From: oddlama Date: Tue, 19 Sep 2023 13:11:40 +0200 Subject: [PATCH] feat(manpager): add tag jumping keybinds --- users/modules/config/manpager/init.lua | 8 +++++++- users/myuser/neovim/lua/options.lua | 3 +-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/users/modules/config/manpager/init.lua b/users/modules/config/manpager/init.lua index 8a99758..0f729d4 100644 --- a/users/modules/config/manpager/init.lua +++ b/users/modules/config/manpager/init.lua @@ -6,6 +6,12 @@ vim.opt.swapfile = false vim.opt.undofile = false vim.opt.writebackup = false vim.opt.shadafile = vim.fn.stdpath "state" .. "/shada/man.shada" - +vim.opt.virtualedit = "all" +vim.opt.splitkeep = "screen" -- Make sure to use ANSI colors vim.opt.termguicolors = false + +vim.keymap.set("n", "", "", { silent = true, desc = "Jump to tag under cursor" }) +vim.keymap.set("n", "", ":pop", { silent = true, desc = "Jump to previous tag in stack" }) +vim.keymap.set("n", "", ":pop", { silent = true, desc = "Jump to previous tag in stack" }) +vim.keymap.set("n", "", ":tag", { silent = true, desc = "Jump to next tag in stack" }) diff --git a/users/myuser/neovim/lua/options.lua b/users/myuser/neovim/lua/options.lua index 9924bd4..0f36eb2 100644 --- a/users/myuser/neovim/lua/options.lua +++ b/users/myuser/neovim/lua/options.lua @@ -18,8 +18,7 @@ opt.mouse = "a" -- Enable full mouse support opt.termguicolors = true -- Enable true color in terminals --- FIXME: TODO: neovim after 0.8: enable this! ---opt.splitkeep = 'screen' -- Try not to move text when opening/closing splits +opt.splitkeep = "screen" -- Try not to move text when opening/closing splits opt.wrap = false -- Do not wrap text longer than the window's width opt.scrolloff = 2 -- Keep 2 lines above and below the cursor. opt.sidescrolloff = 2 -- Keep 2 lines left and right of the cursor.