Live data from Hacker News

Numbers.vim - better line numbers for vim

myusuf3.github.com

31–40 of 47 posts

Re: Numbers.vim - better line numbers for vim

#31
post #27
post #18

Earlier quoted context omitted.

I do that by jumping to the particular line. : or G does that.

I think the point is that it's harder to see what line number you want to jump to if you don't have line numbering on. . . .

Yes, that's exactly my point

Re: Numbers.vim - better line numbers for vim

#32
post #18

Earlier quoted context omitted.

That's fine for determining what line you're on, but visible line numbers make it much easier to jump to a particular line. I've only recently set number in my .vimrc and wish I'd have done it sooner.

I do that by jumping to the particular line. : or G does that.

Yes, that's how we all jump to a particular line :) It's just easier to target a specific line when numbering is turned on, as hesitz said.

Re: Numbers.vim - better line numbers for vim

#33

I'm still pondering the "how is this useful?" part... why are absolute numbers useful for you in insert mode?

My exact thought. I absolutely love 'relative line numbering' as it lets me use different VIM commands without having to do math. And as I can go to any line number by typing ': ' [generally reported by debugger or other means], I don't really care about actual line numbers anymore.

I still feel like I have to do math (albeit simple math) with relative line numbering. If I want to yank a block of code that's X lines long, I have to look at line X, and add one to the number next to it. E.g., when I want to grab 8 lines, the last line I want to grab has a 7 next to it.

I guess I think it'd be more helpful if the numbers were inclusive, and 1-indexed. I'm not sure how to configure that though.

Re: Numbers.vim - better line numbers for vim

#35

I'm still pondering the "how is this useful?" part... why are absolute numbers useful for you in insert mode?

well when you moving around code you want to be in normal mode. so lets say you cursor is at the top of the function which would be 0 (with relative numbering) you could simply look down and see how many lines you need to delete. so for example lets say 5, then you could simply do 5dd or 5yy, without having to count all to see how many lines which can get annoying. while in insert mode you would simply want to see wh…

If you're operating on more than just a couple lines, then it's probably a bad sign to be doing math. It's usually better to navigate to the end of the selection and set a mark or select the text in visual mode.

Re: Numbers.vim - better line numbers for vim

#37
post #12

I know some people like line numbers, but personally, I just look at the status bar at the bottom of the buffer. I find line numbers on the side clutter up my view too much. I always use 80 character terminal widths, to make it easier to stick to my PEP8 validation script we run.

That's fine for determining what line you're on, but visible line numbers make it much easier to jump to a particular line. I've only recently set number in my .vimrc and wish I'd have done it sooner.

They also make it much easier to find the line number named in an exception backtrace. :)

Re: Numbers.vim - better line numbers for vim

#39

As someone with a low-bandwidth connection and that I often work in cafés I hate it when the only description available is through video when there could easily have been text and screenshots.

Or when you're behind a corporate firewall that prohibits youtube.

Re: Numbers.vim - better line numbers for vim

#40
post #28
post #17

Its these kind of things that I wish to see vanilla vim shipped with, without bothering the user much. Yes you can toss some commands and code snippets at me and ask me to use them to get these features. But not having to type commands/snippets and have all goodies out of the box is what modern text editors like sublime text are all about.

If you don't like typing, vim is not the right editor for you!

There's a difference in productive typing and typing to set up your editor. I would compare this to the popularity in Ubuntu vs Arch, too.
Post reply on HN