Plugins such as snipMate, emmet and many others allow me to quickly insert opening and closing html tags. For example by typing span
and hitting the correct key (TAB for snipMate, <C-y>,
for emmet) I can magically get <span>_</span>
with my cursor positioned where I have placed the underscore. Now I type some content that should go inside the span. That leads to my question. How to efficiently leave the span and continue entering text?
For a block-level tag the best I have found is <Esc>o
because I almost always want to start on a new line with the next block-level tag. But for a span
or other inline tag, I'd like to skip the closing tag and continue typing. For example I might type span<C-y>,
and get <span>_</span>
followed by some text leaving me with <span>some text_</span>
where the cursor is shown by the underscore again. I'm in input mode. How to efficiently get to after the </span>
and still be in input mode?
I could use <Esc>vat<Esc>a
which seems like a ton of keys for a simple action though it does allow climbing the hierarchy in a nice way.
I could <Esc>f>a
which still seems heavy for something I use many times.
Is there some more efficient way that I am missing?