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

Re: Installing a word count plugin -- or recommendations of other plugins

Expand Messages
  • Tony Berkopes
    On Jul 23, 2011, at 10:59 PM, Arthur Lee wrote: -- Arthur Lee Sent with Sparrow ... Strange!! Yesterday it worked pretty well. But today I open my macvim, ...
    Message 1 of 38 , Jul 24, 2011
    • 0 Attachment

      On Jul 23, 2011, at 10:59 PM, Arthur Lee wrote:



      -- 
      Arthur Lee
      Sent with Sparrow

      On Sunday, July 24, 2011 at 10:33 AM, Tony Berkopes wrote:


      On Jul 23, 2011, at 10:12 PM, Eric Weir wrote:


      On Jul 23, 2011, at 9:10 PM, Eric Weir wrote:

      On Jul 23, 2011, at 2:32 PM, Tony Berkopes wrote:

      set statusline=\ %F\ %m%r\ %y\ [wc:%{WordCount()}]

      :help statusline

      Thanks, Tony.

      I put that line in my .vimrc. I sourced .vimrc, but didn't get a status line. I restarted Vim. Still not getting a status line. I read the help. It doesn't help me diagnose the problem.

      OK, reading the help didn't help, but reading the FAQ did [19.13]. [For this novice anyway, the FAQ is generally far more helpful than the help. From my beginner's perspective the help is help for people who don't need help and not anyone else.]

      FAQ 19.13 made me realize I needed to go ahead and put "set laststatus=2" in my .vimrc.

      ------------------------------------------------------------------------------------------
      Eric Weir
      Decatur, GA  USA





      --
      You received this message from the "vim_mac" 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


      Eric,

      yes, laststatus=2 means ALWAYS display the statusline

      TonyB


      --
      You received this message from the "vim_mac" 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

      Strange!! Yesterday it worked pretty well. But today I open my macvim, and following errors appeared:

      Error detected while processing function Wordcount:
      line    3:
      E684: list index out of range: 11
      Press ENTER or type command to continue
      Error detected while processing function Wordcount:
      line    3:
      E116: Invalid arguments for function str2nr(split(v:statusmsg)[11])
      Press ENTER or type command to continue
      Error detected while processing function Wordcount:
      line    3:
      E15: Invalid expression: str2nr(split(v:statusmsg)[11])
      Press ENTER or type command to continue
      Error detected while processing function Wordcount:
      line    5:
      E121: Undefined variable: s:word_count
      Press ENTER or type command to continue
      Error detected while processing function Wordcount:
      line    5:
      E15: Invalid expression: s:word_count
      •  After press several enter key, I open my .vimrc file and the statusline shows just the file name "~/.vimrc" and nothing more.

      • Then I did nothing but to save the file by ":w". And the statusline updated. All my settings works! And the word count even could update instantly as I typed. 

      • Then I closed the macvim and reopen it. Same error again! 

      Strange! Any idea?

      --
      You received this message from the "vim_mac" 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

      Arthur,

      That appears to be the same error I had, look for any strange characters (blanks) in the section of code for wordcount().

      I use the original version of word count and I have wc.vim plugin a directory other than 'plugin' and load it when I might need it.

      TonyB



      --
      You received this message from the "vim_mac" 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
    • Tony Berkopes
      On Jul 23, 2011, at 10:59 PM, Arthur Lee wrote: -- Arthur Lee Sent with Sparrow ... Strange!! Yesterday it worked pretty well. But today I open my macvim, ...
      Message 38 of 38 , Jul 24, 2011
      • 0 Attachment

        On Jul 23, 2011, at 10:59 PM, Arthur Lee wrote:



        -- 
        Arthur Lee
        Sent with Sparrow

        On Sunday, July 24, 2011 at 10:33 AM, Tony Berkopes wrote:


        On Jul 23, 2011, at 10:12 PM, Eric Weir wrote:


        On Jul 23, 2011, at 9:10 PM, Eric Weir wrote:

        On Jul 23, 2011, at 2:32 PM, Tony Berkopes wrote:

        set statusline=\ %F\ %m%r\ %y\ [wc:%{WordCount()}]

        :help statusline

        Thanks, Tony.

        I put that line in my .vimrc. I sourced .vimrc, but didn't get a status line. I restarted Vim. Still not getting a status line. I read the help. It doesn't help me diagnose the problem.

        OK, reading the help didn't help, but reading the FAQ did [19.13]. [For this novice anyway, the FAQ is generally far more helpful than the help. From my beginner's perspective the help is help for people who don't need help and not anyone else.]

        FAQ 19.13 made me realize I needed to go ahead and put "set laststatus=2" in my .vimrc.

        ------------------------------------------------------------------------------------------
        Eric Weir
        Decatur, GA  USA





        --
        You received this message from the "vim_mac" 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


        Eric,

        yes, laststatus=2 means ALWAYS display the statusline

        TonyB


        --
        You received this message from the "vim_mac" 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

        Strange!! Yesterday it worked pretty well. But today I open my macvim, and following errors appeared:

        Error detected while processing function Wordcount:
        line    3:
        E684: list index out of range: 11
        Press ENTER or type command to continue
        Error detected while processing function Wordcount:
        line    3:
        E116: Invalid arguments for function str2nr(split(v:statusmsg)[11])
        Press ENTER or type command to continue
        Error detected while processing function Wordcount:
        line    3:
        E15: Invalid expression: str2nr(split(v:statusmsg)[11])
        Press ENTER or type command to continue
        Error detected while processing function Wordcount:
        line    5:
        E121: Undefined variable: s:word_count
        Press ENTER or type command to continue
        Error detected while processing function Wordcount:
        line    5:
        E15: Invalid expression: s:word_count
        •  After press several enter key, I open my .vimrc file and the statusline shows just the file name "~/.vimrc" and nothing more.

        • Then I did nothing but to save the file by ":w". And the statusline updated. All my settings works! And the word count even could update instantly as I typed. 

        • Then I closed the macvim and reopen it. Same error again! 

        Strange! Any idea?

        --
        You received this message from the "vim_mac" 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

        Arthur,

        That appears to be the same error I had, look for any strange characters (blanks) in the section of code for wordcount().

        I use the original version of word count and I have wc.vim plugin a directory other than 'plugin' and load it when I might need it.

        TonyB



        --
        You received this message from the "vim_mac" 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
      Your message has been successfully submitted and would be delivered to recipients shortly.