Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

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

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

1 Answer 1

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

 
discard

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.