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

Word count in status-line

Expand Messages
  • Michael Jones
    Hi, This is my first attempt at modifying vim, so please bear with me. I liked the idea of being able to display the word count for the buffer on the status
    Message 1 of 1 , Aug 3, 2008
    • 0 Attachment
      Hi,

      This is my first attempt at modifying vim, so please bear with me.

      I liked the idea of being able to display the word count for the
      buffer on the status line. So I've made a patch which draws on code
      from the g<CTRL-g> option and adds 'D' as a status line option for
      showing the word count.

      The patch involves making the line_count_info function from ops.c
      non-static and using it in buffer.c.

      As a disclaimer I'd say, whilst I'm an ok programmer, I don't use C
      that much and so don't know the best practices nor all the
      consequences of my actions!

      My main concern is that it might be slow, but it seemed fine on the
      59000+ words of spell.c so I hope it'll be acceptable. That said I'm
      very happy for someone else to make it better or advise me on how to
      make it better.

      Cheers,
      Michael

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.