Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I move to end of text inside tag with one move?

Tags:

vim

Let's say I have some HTML:

<tag>Here is a bunch of text which is pretty long.</tag>

My cursor is on H.

I want to add some more text after the period. That is, I want to append text inside of the tag.

Right now, I'd probably $ to the end of the line and then b until I get to the .

The end of the text inside the tag is not predictable, so I can't use f..

What's the fastest way to get to the end of the text inside a tag?

like image 894
jshawl Avatar asked Dec 03 '22 21:12

jshawl


1 Answers

This might not be the best way but one way to do this is to use vit to visually select the inner tag block. And then type A to append to the visually selected region.

So the command is

vitA

And if you just want your cursor at the end of the tag just use

vit<esc>
like image 172
FDinoff Avatar answered Jan 18 '23 09:01

FDinoff