dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

commit 108dd50602569a7374844f09cd7935b1a57dbb87
parent 5a3a855e339fd162dd68a19aa1018546f6dbb744
Author: Chris Bracken <chris@bracken.jp>
Date:   Sun, 25 Aug 2024 17:42:33 -0700

vim: inline line numbering toggling

Diffstat:
M.config/nvim/lua/config/keymaps.lua | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/.config/nvim/lua/config/keymaps.lua b/.config/nvim/lua/config/keymaps.lua @@ -22,8 +22,8 @@ vim.keymap.set('n', '<leader>l', '<cmd>FzfLua live_grep<CR>') vim.keymap.set('n', '<leader>c', '<cmd>FzfLua builtin commands<CR>') vim.keymap.set('n', '<leader>q', function() vim.diagnostic.setqflist() end) --- Function to toggle absolute/relative numbering -local function toggle_numbering() +-- Key mapping to toggle absolute/relative numbering. +vim.keymap.set('n', '<leader>n', function() local opt = vim.opt if opt.number:get() == false then opt.number = true @@ -33,7 +33,4 @@ local function toggle_numbering() opt.relativenumber = false opt.number = false end -end - --- Key mapping to toggle numbering -vim.keymap.set('n', '<leader>n', toggle_numbering) +end)