Help with word motions

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with word motions

Patrik Iselind
Hi,

I have a use case that I run into quite often, but cannot find a solution for. So I ask here.

I have an example document
```example document
foo bar
```

My cursor is at the first o character in foo. I would like to change foo to foolish, so the document becomes
```example document
foolish bar
```.

How do I place the cursor on the space between the words with a motion so I can append the "lish" part without moving around so much to adjust?

If I hit e or E I just end up on the last o character of foo. If I insert "lish" here I get "folisho bar", which is obviously not what I want. To make this correct I would have to hit the following key combination <elilish>.

If I hit w or W I end up on the b in bar. If I insert "list" here I get "foo lishbar" which is not what I want. To make this correct I would have to hit the following key combination <whilish>.

Any suggestions?

Thanks a lot in advance,
Patrik

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help with word motions

Erik Christiansen
On 04.06.18 02:44, Patrik Iselind wrote:

> Hi,
>
> I have a use case that I run into quite often, but cannot find a solution for. So I ask here.
>
> I have an example document
> ```example document
> foo bar
> ```
>
> My cursor is at the first o character in foo. I would like to change
> foo to foolish, so the document becomes ```example document foolish
> bar ```.
>
> How do I place the cursor on the space between the words with a motion
> so I can append the "lish" part without moving around so much to
> adjust?

Hit ealish. Since you'd like to append, then appending seems appropriate.
(No need to be concerned with the unrelated space, then.)

Erik

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help with word motions

Patrik Iselind
Den måndag 4 juni 2018 kl. 13:17:29 UTC+2 skrev Erik Christiansen:

> On 04.06.18 02:44, Patrik Iselind wrote:
> > Hi,
> >
> > I have a use case that I run into quite often, but cannot find a solution for. So I ask here.
> >
> > I have an example document
> > ```example document
> > foo bar
> > ```
> >
> > My cursor is at the first o character in foo. I would like to change
> > foo to foolish, so the document becomes ```example document foolish
> > bar ```.
> >
> > How do I place the cursor on the space between the words with a motion
> > so I can append the "lish" part without moving around so much to
> > adjust?
>
> Hit ealish. Since you'd like to append, then appending seems appropriate.
Absolutely make sense. I had completely forgot about a. Thanks a lot Erik!

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.