> On Jul 21, 2011, at 7:38 PM, Andy Wokula wrote:
>
>> I'd assume that a word count is supposed to count words ("word" as in :h
>> word), not WORDs. So here is a simple command you can put in the vimrc:
> Thanks, Andy. I'm assuming given the above that you cooked that script up special order. If so, I appreciate that. Nevertheless, a couple people on vim_mac diagnosed the problem as a filetype problem. Changing it from DOS to unix fixed. Since that was so simple, and since I like what the plugin does -- count two words not separated by a space as two words -- I decided to stick with it.
>
> Sincerely,
> ------------------------------------------------------------------------------------------
> Eric Weir
> Decatur, GA USA
> eeweir@bellsouth.net
>
Just for reference, this following command will return a list of matches
too (the regex can probably be improved):
:%s/\<.\{-}\>//gn | set nohlsearch
... a "search and replace" command that only counts all matches (and
does no replacing). Of course, it clobbers your search register, etc, so
it's probably not the solution you wanted.
I just thought you might want to know about :%s/...//gn
--
.----------------------------------------------------------.
| Albie Janse van Rensburg |
| Respect! ~ http://www.dtcc.edu/cs/rfc1855.html |
'----------------------------------------------------------'
Each of us bears his own Hell.
-- Publius Vergilius Maro (Virgil)
--
You received this message from the "vim_use" 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
No comments:
Post a Comment