Consider integrating numbers.vim for better line numbering #276

Closed
duhanebel opened this Issue Apr 2, 2013 · 11 comments

Comments

Projects
None yet
4 participants
@duhanebel
Collaborator

duhanebel commented Apr 2, 2013

This plugin will alternate between relative numbering (normal mode) and absolute numbering (insert mode) depending on the mode you are in. This allows you to easily move code around with the relative line numbers when in normal mode. As well as providing accurate line numbers when writing code in insert mode.

@skwp

This comment has been minimized.

Show comment Hide comment
@skwp

skwp Apr 2, 2013

Owner

I'm not a huge fan of relative numbering for the reason of seeing a line number somewhere in a stack trace and being easily able to visually spot it...but if this is toggleable or off by default I could see it being useful.

Owner

skwp commented Apr 2, 2013

I'm not a huge fan of relative numbering for the reason of seeing a line number somewhere in a stack trace and being easily able to visually spot it...but if this is toggleable or off by default I could see it being useful.

@duhanebel

This comment has been minimized.

Show comment Hide comment
@duhanebel

duhanebel Apr 3, 2013

Collaborator

I understand that, but movements are a lot more powerful if you can visually know how many lines you need to select when you can't use block selection.
I see pro and cons on having both kind of numbers so I'd like to add the plugin if we can find a nice way to configure it.

Collaborator

duhanebel commented Apr 3, 2013

I understand that, but movements are a lot more powerful if you can visually know how many lines you need to select when you can't use block selection.
I see pro and cons on having both kind of numbers so I'd like to add the plugin if we can find a nice way to configure it.

@zapatoche

This comment has been minimized.

Show comment Hide comment
@zapatoche

zapatoche Apr 3, 2013

Latest vim (7.3.875) has a nice little rnu improvement. It shows the current line real number, plus the relative numbering for the other lines.
http://share.bishbashbosh.it/image/0j2I2A2e1g10
So far I don't have issues with yadr since moving form macvim to vim head

Latest vim (7.3.875) has a nice little rnu improvement. It shows the current line real number, plus the relative numbering for the other lines.
http://share.bishbashbosh.it/image/0j2I2A2e1g10
So far I don't have issues with yadr since moving form macvim to vim head

@duhanebel

This comment has been minimized.

Show comment Hide comment
@duhanebel

duhanebel Apr 4, 2013

Collaborator

Interesting idea, but I'm not sure it helps when you need to jump to a line of code at glance.

Collaborator

duhanebel commented Apr 4, 2013

Interesting idea, but I'm not sure it helps when you need to jump to a line of code at glance.

@zapatoche

This comment has been minimized.

Show comment Hide comment
@zapatoche

zapatoche Apr 4, 2013

You can set up vim to switch line numbers on focus and blur. 

Sent from Mailbox for iPhon

On Thu, Apr 4, 2013 at 8:30 PM, Fabio notifications@github.com wrote:

Interesting idea, but I'm not sure it helps when you need to jump to a line of code at glance.

Reply to this email directly or view it on GitHub:
#276 (comment)

You can set up vim to switch line numbers on focus and blur. 

Sent from Mailbox for iPhon

On Thu, Apr 4, 2013 at 8:30 PM, Fabio notifications@github.com wrote:

Interesting idea, but I'm not sure it helps when you need to jump to a line of code at glance.

Reply to this email directly or view it on GitHub:
#276 (comment)

@zapatoche

This comment has been minimized.

Show comment Hide comment
@zapatoche

zapatoche Apr 4, 2013

I meant to add a link
http://jeffkreeftmeijer.com/2012/relative-line-numbers-in-vim-for-super-fast-movement/


Sent from Mailbox for iPhon

On Thu, Apr 4, 2013 at 8:30 PM, Fabio notifications@github.com wrote:

Interesting idea, but I'm not sure it helps when you need to jump to a line of code at glance.

Reply to this email directly or view it on GitHub:
#276 (comment)

I meant to add a link
http://jeffkreeftmeijer.com/2012/relative-line-numbers-in-vim-for-super-fast-movement/


Sent from Mailbox for iPhon

On Thu, Apr 4, 2013 at 8:30 PM, Fabio notifications@github.com wrote:

Interesting idea, but I'm not sure it helps when you need to jump to a line of code at glance.

Reply to this email directly or view it on GitHub:
#276 (comment)

@duhanebel

This comment has been minimized.

Show comment Hide comment
@duhanebel

duhanebel Apr 5, 2013

Collaborator

Interesting. I thin the plugin I have in mind does all that too. I'll take a look over the weekend.

@skwp: is there a shortcut you would feel confident in using to let the user manually switch between the two numbering modes?

Fabio

On 4 Apr 2013, at 20:50, Yannick Schall notifications@github.com wrote:

I meant to add a link
http://jeffkreeftmeijer.com/2012/relative-line-numbers-in-vim-for-super-fast-movement/


Sent from Mailbox for iPhon

On Thu, Apr 4, 2013 at 8:30 PM, Fabio notifications@github.com wrote:

Interesting idea, but I'm not sure it helps when you need to jump to a line of code at glance.

Reply to this email directly or view it on GitHub:
#276 (comment)

Reply to this email directly or view it on GitHub.

Collaborator

duhanebel commented Apr 5, 2013

Interesting. I thin the plugin I have in mind does all that too. I'll take a look over the weekend.

@skwp: is there a shortcut you would feel confident in using to let the user manually switch between the two numbering modes?

Fabio

On 4 Apr 2013, at 20:50, Yannick Schall notifications@github.com wrote:

I meant to add a link
http://jeffkreeftmeijer.com/2012/relative-line-numbers-in-vim-for-super-fast-movement/


Sent from Mailbox for iPhon

On Thu, Apr 4, 2013 at 8:30 PM, Fabio notifications@github.com wrote:

Interesting idea, but I'm not sure it helps when you need to jump to a line of code at glance.

Reply to this email directly or view it on GitHub:
#276 (comment)

Reply to this email directly or view it on GitHub.

@duhanebel duhanebel closed this in 23a9e72 Apr 9, 2013

jby added a commit to jby/dotfiles that referenced this issue Apr 9, 2013

Add numbers.vim to vundles.list
numbers.vim is a plugin that allows for easy switch between
absolute and relative line numbers.
A convenient shortcut: ,tn (toggle numbers) is provided to
switch between the two modes

Fixes #276
@myusuf3

This comment has been minimized.

Show comment Hide comment
@myusuf3

myusuf3 Apr 22, 2013

so I am just seeing this but it is toggleable and we have pull request coming in soon that on loose of focus it will switch back to absolute line numbering.

myusuf3 commented Apr 22, 2013

so I am just seeing this but it is toggleable and we have pull request coming in soon that on loose of focus it will switch back to absolute line numbering.

@duhanebel

This comment has been minimized.

Show comment Hide comment
@duhanebel

duhanebel Apr 24, 2013

Collaborator

@myusuf3 for some reasons I was unable to completely disable this for people who don't like relative numbers. I'm not clear on how to achieve this. Do you have any idea?

Collaborator

duhanebel commented Apr 24, 2013

@myusuf3 for some reasons I was unable to completely disable this for people who don't like relative numbers. I'm not clear on how to achieve this. Do you have any idea?

@myusuf3

This comment has been minimized.

Show comment Hide comment
@myusuf3

myusuf3 Apr 24, 2013

@duhanebel to turn the plugin completely off?

myusuf3 commented Apr 24, 2013

@duhanebel to turn the plugin completely off?

@duhanebel

This comment has been minimized.

Show comment Hide comment
@duhanebel

duhanebel Apr 24, 2013

Collaborator

Yes. It seems that not everybody like relative numbers, so I would be good to have a way to switch it off at a configuration level.

Collaborator

duhanebel commented Apr 24, 2013

Yes. It seems that not everybody like relative numbers, so I would be good to have a way to switch it off at a configuration level.

jby added a commit to jby/dotfiles that referenced this issue Sep 3, 2013

Add numbers.vim to vundles.list
numbers.vim is a plugin that allows for easy switch between
absolute and relative line numbers.
A convenient shortcut: ,tn (toggle numbers) is provided to
switch between the two modes

Fixes #276

jby added a commit to jby/dotfiles that referenced this issue Sep 3, 2013

Add numbers.vim to vundles.list
numbers.vim is a plugin that allows for easy switch between
absolute and relative line numbers.
A convenient shortcut: ,tn (toggle numbers) is provided to
switch between the two modes

Fixes #276

chrisnankervis pushed a commit to chrisnankervis/dotfiles that referenced this issue Oct 5, 2014

Add numbers.vim to vundles.list
numbers.vim is a plugin that allows for easy switch between
absolute and relative line numbers.
A convenient shortcut: ,tn (toggle numbers) is provided to
switch between the two modes

Fixes #276
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment