2

In my .vimrc i have added this line

set number

But it only displays the line number for the lines that exist in the buffer, and not beyond this; after this it just shows ~.

How can I show line numbers for the entire visual area?

  • 6
    I don't think you can, and I'm not sure if it would really make any sense. For example if your buffer is thee lines, then doing something like 10G (to do to the tenth line) simply won't work because from Vim's perspective there isn't a "tenth line"... Vim works a bit different than many other editors in this respect, which could be considered both a good and bad thing depending on your assumptions ;-) – Martin Tournoij Aug 28 '16 at 20:33
  • 1
    @Carpetsmoker oh ok :) btw thanks for the fast reply. +1 – Ashok Aug 28 '16 at 20:40
  • 4
    No line, no line number. – romainl Aug 28 '16 at 20:52
  • Thanks for all the comments ! Highly appreciate the fast response ! 😄 – Ashok Aug 28 '16 at 21:26
  • No line number, no cry. ;) – Sato Katsura Aug 29 '16 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.