3

I know how to show absolute as well as cursor-relative line numbers but I do not need to see each line number and they look too crowded. I would like to just see line numbers at an interval, say every 5 lines eg. 5, 10, 15, and so on. Is there a way to achieve this in vim?

4

1 Answer 1

2

For Neovim, there is a line-number-interval.nvim plugin that can provide the functionality. Screenshot below demonstrates the default look of the plugin (which is on par with what vscode can do), after following commands. Just note that the screenshots on Github repo are outdated.

:set number
:LineNumberIntervalEnable

Neovim line-number-interval plugin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.