diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index e7534d7..a549016 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -43,6 +43,15 @@ au CursorHoldI * checktime " Line numbers are cool set number set relativenumber +nn p :call ToggleNumber() +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")