vicoapp / vico

Mac Programmers Text Editor
http://www.vicoapp.com/
657 stars 89 forks source link

Implement relative line numbers. #19

Closed Shadowfiend closed 11 years ago

Shadowfiend commented 12 years ago

There's an indented preference under "Show line numbers" labeled "count lines relative to the cursor". Additionally, :set commands for relativenumber, rnu, norelativenumber, and nornu work.

A notable difference from vim's implementation is that relative numbering is a setting on top of numbering. So :set norelativenumber will not disable line numbers altogether as it does in vim.

windock commented 12 years ago

Why not be as consistent with Vim as possible? Any implementation problems?

Shadowfiend commented 12 years ago

It's implementable the vim way, but to be honest the vim way doesn't make any sense at all to me. If I set number, set rnu, then set nornu, I don't have line numbers. It seemed strange both times that I played with the feature (checking this implementation and a while back when I first toyed with it in vim). The concepts don't seem distinct, perhaps because I consider set number to show/hide the number area, not the line numbers themselves?

I don't think we should feel tied to the vim approach when it comes to configuration, if we don't think it makes sense. That said, I don't mind switching it to the vim way if that's what's decided.

martinh commented 12 years ago

I agree that we shouldn't be tied to vim compatibility just for the sake of compatibility.

I don't have any comments on the patch yet though.