Add pairing shortcut to disable relnu
This commit is contained in:
parent
ccd7321f98
commit
86e57588d2
1 changed files with 9 additions and 0 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue