Add pairing shortcut to disable relnu

This commit is contained in:
Nicole Tietz-Sokolskaya 2024-02-16 09:30:01 -05:00
parent ccd7321f98
commit 86e57588d2

View file

@ -43,6 +43,15 @@ au CursorHoldI * checktime
" Line numbers are cool " Line numbers are cool
set number set number
set relativenumber set relativenumber
nn <silent> <leader>p :call ToggleNumber()<CR>
fun! ToggleNumber()
if exists('+relativenumber')
setl nornu!
else
setl nu!
endif
endf
" Always show the signcolumn, otherwise it would shift the text each time " Always show the signcolumn, otherwise it would shift the text each time
" diagnostics appear/become resolved. " diagnostics appear/become resolved.
if has("nvim-0.5.0") || has("patch-8.1.1564") if has("nvim-0.5.0") || has("patch-8.1.1564")