On 21 Jul 2011, at 07:20, Eric Weir wrote: > I would like to have a word count plugin to replace the g<C-g> command. The > results of the latter are displayed so briefly and amongst other details that > it is hard to be certain what they are. > > I've found a "manuscript word count" plugin at vim.org. The creator explains > that "Standard word count utilities (like unix 'wc') do not provide an > accurate count because they count breaks between words. In fiction writing, > some sentences--like this one--have more words than breaks between words." > > So it does what I want but there are no installation instructions and I'm not > certain how to install it. I put it in ~/.vim/plugin and reloaded Vim but it > does not work. > > Suggestions for getting the plugin to work would be appreciated. > > Likewise regarding alternatives to it and the built-in word count command.
If this <http://www.vim.org/scripts/script.php?script_id=1191> is the script you’re writing about, then you’ve installed it correctly. If you were to launch MacVim from the terminal, you would see several lines of errors when the script tries to load. Based on one of those errors, I suspected that the issue was the end of line (eol) marker in the vim script. I opened the script in vim and issued the :set ff command which told me that the file was a DOS file; then, I issued :set ff=unix followed by :w. I relaunched MacVim, opened an essay, issued :WC, and received the expected output from the command. The problem was in the eol, the carriage return marker confused vim for example line 4: E492: Not an editor command: ^M line 9: E15: Invalid expression: !&cp && !exists(":WC") && has("user_commands")^M note the ^M in the above, that is vim’s way of saying carriage return. David P Henderson c: 757.286.3212 -- "To announce that there must be no criticism of the president, or that we are to stand by the president, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public." -- Theodore Roosevelt -- 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