feat(manpager): add tag jumping keybinds

This commit is contained in:
oddlama 2023-09-19 13:11:40 +02:00
parent ea63eea40b
commit eb302ea61e
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
2 changed files with 8 additions and 3 deletions

View file

@ -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", "<CR>", "<C-]>", { silent = true, desc = "Jump to tag under cursor" })
vim.keymap.set("n", "<BS>", ":pop<CR>", { silent = true, desc = "Jump to previous tag in stack" })
vim.keymap.set("n", "<C-Left>", ":pop<CR>", { silent = true, desc = "Jump to previous tag in stack" })
vim.keymap.set("n", "<C-Right>", ":tag<CR>", { silent = true, desc = "Jump to next tag in stack" })

View file

@ -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.