How To Enable Relative Line Numbers With IdeaVim

How do I turn on relative line numbers? I heard there's some sort of plugin, but when searching for "relative line numbers" or just "line numbers" I can't find it. Also, I'm using IdeaVim, if it's some sort of feature with that.

2 comments
Comment actions Permalink

This might be a bit late, but I was having the same problem and I found the solution so I thought I would post here for anyone else wanting to enable relative line numbers.

I found IdeaVim actually has this feature inbuilt. You can turn it on through the standard vim commands:

:set relativenumber
:set number 

You can also set these in your ~/.ideavimrc file, which you need to create if it doesn't already exist. 

You can find more information on the .ideavimrc here:
https://github.com/JetBrains/ideavim#files

And also here is a good medium article that explains a bit more about all the things you can do with the .ideavimrc 
https://medium.com/@danidiaz/configuring-ideavimrc-de16a4da0715

Hope that helps :)

1
Comment actions Permalink

Thanks! I actually figured it out (sorry for not updating over here) but you IdeaVim actually has a vimrc. So just open the ~/.ideavimrc file and put this line:

    set relativenumber number

 

0

Please sign in to leave a comment.