Loading ...
Sorry, an error occurred while loading the content.

Re: New feature: absolute line number in relativenumber for the current line

Expand Messages
  • Lane East
    在 2013年1月30日星期三UTC+8上午5时33分42秒,Bram Moolenaar写道: ... Here is a patch that adds an option rnucurrent / rnuc to control the
    Message 1 of 47 , Feb 6 1:53 AM
    • 0 Attachment
      在 2013年1月30日星期三UTC+8上午5时33分42秒,Bram Moolenaar写道:
      > Nazri Ramliy wrote:
      >
      >
      >
      > > On Tue, Jan 29, 2013 at 6:21 PM, Paul Ruane wrote:
      >
      > > > Whilst it is not that hard to scan the status line, I find that I hit
      >
      > > > this glitch in my workflow many, many times a day: when I want to know
      >
      > > > what line I am on, I intuitively scan the gutter for the line number.
      >
      > > > I then realise that relativenumber is on so I redirect my attention to
      >
      > > > the status line and then have to parse the number from the other
      >
      > > > fields down there.
      >
      > >
      >
      > > The following patch does what you want. After trying it out for a few minutes
      >
      > > it does feel easier to find out the current line number. I normally
      >
      > > have the line
      >
      > > number in my statusline, and on the occasion where the statusline is not shown
      >
      > > I've trained my fingers to hit Ctrl+G and scan the bottom line for the
      >
      > > line number.
      >
      > >
      >
      > > Having the current line number, instead of a '0' shown at the current
      >
      > > line seems more useful. For better distinction the current line number
      >
      > > ca be left-aligned (for left-to-right text orientation) to make it
      >
      > > look different than the relative-line-numbers (I made no attempt at
      >
      > > this in the patch below).
      >
      > >
      >
      > > Others might find it weird.
      >
      >
      >
      > I think the information is useful. Who is against showing the current
      >
      > line number instead of zero?
      >
      >
      >
      > Is the width of the column a problem?
      >
      >
      >
      > --
      >
      > "Hegel was right when he said that we learn from history that man can
      >
      > never learn anything from history." (George Bernard Shaw)
      >
      >
      >
      > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      >
      > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      >
      > \\\ an exciting new programming language -- http://www.Zimbu.org ///
      >
      > \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      Here is a patch that adds an option 'rnucurrent'/'rnuc' to control the current line number style: left-align, absolute line number.

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • sxc4244@...
      Ah, I understand now; sorry for the confusion -- I didn t know that patch 1115 changed the behavior of relativenumber/number. I know what I have to do now to
      Message 47 of 47 , Jun 29, 2013
      • 0 Attachment
        Ah, I understand now; sorry for the confusion -- I didn't know that patch 1115 changed the behavior of relativenumber/number. I know what I have to do now to modify my vimrc to behave like it used to for older versions by using the has("patch#") check.

        I do indeed like this new behavior better though :)
        Thanks very much for your help!

        --Stan

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      Your message has been successfully submitted and would be delivered to recipients shortly.