[Keybinds] Add toggle relative numbering

This commit is contained in:
Janis Hutz 2025-04-03 14:07:50 +02:00
parent c736531a33
commit 4656f74fdd
2 changed files with 5 additions and 1 deletions

View File

@ -130,3 +130,7 @@ keymap.set({ "n", "v" }, "<leader><leader>d", '"+d', opts("yank to system clipbo
keymap.set({ "n", "v" }, "<leader><leader>D", '"+D', opts("YANK to system clipboard and DELETE"))
keymap.set("n", "<leader>wk", ":WhichKey<CR>", opts("Toggle WhichKey"))
-- Toggle relative line numbers
keymap.set( 'n', '<leader>.', ':lua vim.wo.relativenumber = not vim.wo.relativenumber', opts( 'Toggle relative line numbers' ))

View File

@ -18,7 +18,7 @@ vim.opt.linebreak = true
-- line numbers
vim.wo.number = true
vim.wo.cursorline = true
vim.wo.relativenumber = false
vim.wo.relativenumber = true
vim.opt.signcolumn = "yes" -- reserve space for diagnostics
-- search options