Moving to "next" tag in HTML

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

Moving to "next" tag in HTML

Chris Lott
Let's say I'm editing text, I'm in insert mode, and my cursor is at
the position marked by the | character:

<p><strong>Question 2|</strong></p>

And I want to move the cursor after the closing tag (or before the next tag):

<p><strong>Question 2</strong>|</p>

Is there a simpler way to do this than either: ESCwwwa or ESCf<f<a

?

c
--
Chris Lott <[hidden email]>

--
--
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: Moving to "next" tag in HTML

Benjamin Fritz
On Wednesday, June 10, 2015 at 11:11:37 AM UTC-5, Chris Lott wrote:

> Let's say I'm editing text, I'm in insert mode, and my cursor is at
> the position marked by the | character:
>
> <p><strong>Question 2|</strong></p>
>
> And I want to move the cursor after the closing tag (or before the next tag):
>
> <p><strong>Question 2</strong>|</p>
>
> Is there a simpler way to do this than either: ESCwwwa or ESCf<f<a
>
Slight improvement:

<ESC>f<;i

or:

<ESC>f>a

or:

<ESC>l%a

Alternate approach, good for big (especially multiline) jumps:

<ESC>vat<ESC>i

--
--
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: Moving to "next" tag in HTML

Paul Isambert
Le mercredi 10 juin 2015 à 19:38, Ben Fritz a écrit:

> On Wednesday, June 10, 2015 at 11:11:37 AM UTC-5, Chris Lott wrote:
> > Let's say I'm editing text, I'm in insert mode, and my cursor is at
> > the position marked by the | character:
> >
> > <p><strong>Question 2|</strong></p>
> >
> > And I want to move the cursor after the closing tag (or before the next tag):
> >
> > <p><strong>Question 2</strong>|</p>
> >
> > Is there a simpler way to do this than either: ESCwwwa or ESCf<f<a
> >
>
> Slight improvement:
>
> <ESC>f<;i
>
> or:
>
> <ESC>f>a
>
> or:
>
> <ESC>l%a
>
> Alternate approach, good for big (especially multiline) jumps:
>
> <ESC>vat<ESC>i

<Ctrl-o> instead of <Esc> can also save you one keystroke:

    <Ctrl-O>f<

Also, if you’re doing that often, a mapping seems like a good idea.

Best,
Paul

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