Monday, February 3, 2020

Re: viw / how to select a one char word ?

Hi,

Yes, thanks.
I was looking for a consistent way to select the whole word the cursor is on, no matter how many chars it is.
This could then become a new mapping or mouse double-click etc.

It seems viw, vaw, lbve are all good and work most of the time, but I cannot seem to find one set of cmds that always works.
It is also weird the difference between my vim and with -u NONE about the viw.

thx,
-m

On Monday, February 3, 2020 at 6:55:32 AM UTC-5, Boyko Bantchev wrote:
On Mon, 3 Feb 2020 at 13:16, M Kelly <mckel...@gmail.com> wrote:
>
> Hi,
>
> Is there a way to select a one char word ?
> lbve or viw or ?  All my attempts seem to continue on to the beginning (or end) of the next word.
> Is it that a 'word' cannot be a single char ?

If you are in a normal mode, typing 'v' (visually) selects the
character under the cursor.
Then, typing 'y' will yank that character (and take you back to the
normal mode).
Or instead, type 'yl' to the same end.
Either way you will have the character stored in the unnamed register.
Is this what you need?

--
--
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/58a6756f-9851-4f5a-bf6d-f6094c333b92%40googlegroups.com.

No comments:

Post a Comment