Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I really like vim 7.3's relativenumber setting, but it seems to me that it should be 1-indexed. Most line-based commands operate on a number of lines that includes the current one. For example, with the below setup:

0  def hello():<cursor>
1      """
2      Say Hello!
3      """
4      print "Hello!"

If I want to delete the whole function, I have to type 5dd which is weird because it looks like the last line is the fourth one. Typing 4>> doesn't indent the whole function.

The only reason to have zero indexing is for the j and k motions, but there's so many other ways to move (w, } etc.) and besides, being off by one usually isn't a big deal in motions (unless you are doing something like d4j).

It just seems to me that I look at the sidebar for numbers most often when I am doing line manipulation, and in those cases the default zero-index makes me do mental gymnastics. Can I change it?

share|improve this question

No, it's hard coded.

d4j and >4j is actually the intended use of relativenumber: use it the way it was meant to be used and all will be good.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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