Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Oh guys, thank you so much for new food for my vim-addiction. I'd hesitate to call myself anything but an interested beginner, so it's always very welcome to learn new stuff. I distinctly remember running vimtutor the first time as a teenager fresh of whatever Windows came before and thinking 'goddamn, whyyyyyy is this hot mess so popular among my mentors and idols?'...

Quite some years later, I don't think I could ever do without vim. Not saying that emacs wouldn't probably fill the same role, editor wars considered and all. I just had somebody tell me to pick an editor and get good with it, some blog or forum posting made me go with vim and it's been one of my favorite pieces of software since.

To contribute a little bit, what I've really come to learn recently is the 'hybrid line numbering mode' that was added with 7.4 iirc. When you add both. set relativenumber

set number

to your .vimrc, you get relative numbers for all lines except the current, which is displayed as absolute. Helped my navigation game a huge deal. Just in the unlikely case anyone here hadn't heard of it.



I tried this very briefly and thought "This seems useless." 1. It's annoying how they all change every time my cursor moves (though it'd be fine if I also did "scrolloff=999"), and g-4 doesn't work to jump up 4 lines.

Then I realized I could do y6k to pull the next six lines, rather than "told on, let me count/do the math on the line numbers". Took me another moment to realize "4j" is the way to move.

I think I'm going to like this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: