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
1 changed files with 9 additions and 0 deletions

View File

@ -43,6 +43,15 @@ au CursorHoldI * checktime
" Line numbers are cool
set number
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
" diagnostics appear/become resolved.
if has("nvim-0.5.0") || has("patch-8.1.1564")