automatic relative number toggle

This commit is contained in:
Tazoeur 2024-09-28 23:11:21 +02:00
parent 45e2a64680
commit 377c00592f
4 changed files with 13 additions and 1 deletions

View file

@ -27,3 +27,6 @@ vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left wind
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
vim.keymap.set('n', '<C-d>', '<C-d>zz')
vim.keymap.set('n', '<C-u>', '<C-u>zz')

View file

@ -12,8 +12,10 @@ vim.g.loaded_netrwPlugin = 1
-- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = true
-- Make line numbers default
-- vim.opt.number = true -- Make line number default
-- see `help: number_relativenumber`
vim.opt.number = true -- Make line number default
vim.opt.relativenumber = true -- Make relative line number default
-- Enable mouse mode, can be useful for resizing splits for example!

View file

@ -0,0 +1,6 @@
-- Automatically toggling smoothly between relative and absolute line numbers in various Neovim events.
-- This is useful when you want to take advantage of the information on those types of numbers in different situations.
--
-- https://github.com/cpea2506/relative-toggle.nvim
return { 'cpea2506/relative-toggle.nvim' }