Wednesday, December 28, 2022

Re: word count

On Wed, 28 Dec 2022 08:26:01 -0800 (PST)
Igor Lerinc <igor.lerinc7@gmail.com> 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 calculating how much words there is between
> cursor and word where i want to jump to. And it would be faster and
> efficient, 'to just know' how much words to jump in current line to get to
> some word

Should be easy, specially if Vim has a way to add virtual text. But I
think that'd add too much noise to be useful.

I suggest using 'f' and 't' and plain searching ('/' and '?') to move
around than motions like 'nw', 'nb', 'ne', etc. (where 'n' is any
positive integer). I can't provide any statistical data supporting that
'f','t','/','?' are better, but try it out and see if it works before
investing time building a custom plugin to add "relative numbering for
words."

P.S. I don't use line numbers (relative or otherwise) either, except
when doing pair programming. I find that '/','?' are much faster and
precise and jumping to lines with 'nj','nk','nG', etc. So consider my
suggestion with enough skepticism.

--
Enan
3nan.ajmain@gmail.com
https://git.sr.ht/~enan/
https://www.github.com/3N4N

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20221228233703.00006573%40gmail.com.

No comments: