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

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

Expand Messages
  • Nazri Ramliy
    On Fri, Feb 1, 2013 at 8:42 AM, Charles E Campbell ... I can understand the problem. But hey this vim, the editor that lets you customize a thousand things
    Message 1 of 47 , Feb 1, 2013
    • 0 Attachment
      On Fri, Feb 1, 2013 at 8:42 AM, Charles E Campbell
      <drchip@...> wrote:
      > When some users of some simulation s/w I helped write have a problem, I
      > usually end up with 10-150G long debugging traces; I usually break these up
      > into 1G chunks and "edit" (more usually, examine) these. So I often end up
      > with files having considerably more than 10,000 lines in them. Since the
      > patch has been accepted which installs the current line number, I'll
      > probably just use my RltvNmbr plugin instead.

      I can understand the problem. But hey this vim, the editor that lets you
      customize a thousand things with its myriad of options, so here's a toy
      patch that attempts to combine the number/relative number option into
      a single option called 'linenumber'. Here's the relevant part in
      options.txt:

      -->8--
      'linenumber' 'lnr' string (default "none")
      local to window
      {not in Vi}
      Controls how line numbers are shown:
      value effect
      none No line numbers are shown
      number Same as ":set number"
      relative Same as ":set relativenumber"
      numrel Same as ":set relativenumber", but instead of
      showing '0' for the current line, show the actual
      line number instead. The actual line number is
      left-aligned to differentiate it from the relative
      line number.
      --8<--

      The patch do not include Christian's fix for the problem
      reported by Fran├žois Ingelrest.

      Nazri

      --
      --
      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.