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

I've tried relative numbers a few times in Vim, but always found it hard to adjust. But recently Jeff Kreeftmeijer wrote up a way to get the best of both worlds[1]: relative numbers in command mode and absolute numbers in insert mode or if Vim loses focus. Just another option to consider.

[1] http://jeffkreeftmeijer.com/2012/relative-line-numbers-in-vi...



That's a good hack. Personally I just have F4 mapped to toggle between relative and absolute, but relative is the default. I rarely care about specific line numbers because if I'm looking at a stack trace for something I just jump directly with :#




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

Search: