we have relative numbering for lines, so we don't have to calculate when we
want to jump between lines.
But is something similar possible for words?
For current line to show, what number of word it is? Depending on where
cursor is?
Because i don't feel like calculating how much words there is
Igor Lerinc said on Wed, 28 Dec 2022 08:26:01 -0800 (PST)
>we have relative numbering for lines, so we don't have to calculate
>when we want to jump between lines.
>
>But is something similar possible for words?
>For current line to show, what number of word it is? Depending on
>where cursor is?
Yes, but is there way for it, to show some sort of numbers relative to
curson on that line.
Some small nukber above word, idk.
Just not to calculate how much words i need to jump, if i want to go
jumping between words.
sre, 28. dec 2022. 17:56 Steve Litt je
napisao/la:
> Igor Lerinc said on Wed
On Wed, 28 Dec 2022 08:26:01 -0800 (PST)
Igor Lerinc wrote:
> we have relative numbering for lines, so we don't have to calculate when we
> want to jump between lines.
>
> But is something similar possible for words?
> For current line to show, what number of word it is? Depending on where
> curso
On 12/28/22 08:26, Igor Lerinc wrote:
we have relative numbering for lines, so we don't have to calculate when we
want to jump between lines.
But is something similar possible for words?
For current line to show, what number of word it is? Depending on where
cursor is?
Because i don't feel like
I would like to have a word count plugin to replace the 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 "
Maybe this article could help:
http://stackoverflow.com/questions/114431/fast-word-count-function-in-vim/120386<http://stackoverflow.com/questions/114431/fast-word-count-function-in-vim/120386#120386>
I used the code from the last comment, although nobody voted for it.
On Thu, Jul 21, 2
On Jul 21, 2011, at 12:42 PM, Xell Liu wrote:
> Maybe this article could help:
>
> http://stackoverflow.com/questions/114431/fast-word-count-function-in-vim/120386
>
> I used the code from the last comment, although nobody voted for it.
Thanks, Xell. [Or should that be Liu?
Am 21.07.2011 16:20, schrieb Eric Weir:
I would like to have a word count plugin to replace the 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
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 scrip
Eric Weir wrote on 22/07/2011 02:03 AM:
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 a
On Jul 25, 2011, at 9:18 AM, Albie Janse van Rensburg wrote:
> 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 do
On Jul 25, 2011, at 9:18 AM, Albie Janse van Rensburg wrote:
:%s/\<.\{-}\>//gn | set nohlsearch
Correction, it should be
:%s/\<.\{-}\>//gn | nohlsearch
the "set" makes your hlsearch setting permanent.
--
.--.
|
Reply to message «Re: Installing a word count plugin -- or recommendations of
other plugins»,
sent 17:57:37 25 July 2011, Monday
by Albie Janse van Rensburg:
It also makes sense to use :%sm/... or :%s/\v<.{-}>//gn: both make you
independent of 'magic' setting.
Original mess
Still, I think the following function works great!
function! WordCount()
let s:old_status=v:statusmsg
exe "silent normal g\"
let s:word_count=str2nr(split(v:statusmsg)[11])
let v:statusmsg=s:old_status
return s:word_count
endfunction
As for the errors when open the macvim, I think it may be ly
Reply to message «Re: Installing a word count plugin -- or recommendations of
other plugins»,
sent 18:35:01 26 July 2011, Tuesday
by Arthur Lee:
You should not use :normal without a bang in a plugin (it may be the cause).
And you don't need any script-local variables here:
fun
ZyX,
Thanks for your post. But there still be some error pop up when reopen the
macvim.
> Error detected while processing function WordCount:
> line 4:
> E684: list index out of range: 11
> --
It seems the g command does not execute at all!
Any suggestion will be appreciate. Thanks.!
--
Ar
Reply to message «Re: Installing a word count plugin -- or recommendations of
other plugins»,
sent 19:06:48 26 July 2011, Tuesday
by Arthur Lee:
> It seems the g command does not execute at all!
> Any suggestion will be appreciate. Thanks.!
Read :debug. I have no suggestions about what
18 matches
Mail list logo