Last Updated: February 25, 2016
· pek

VIM : easy insert HTML tags

Add this cryptic string to your .vimrc

imap <C-t> <></><Esc>5hdiwp3lpT>i

If you are in insert mode, keyboard shortcut Ctrl+t create pair tag from word before cursor.


  • write tag name. ex.: strong
  • press Ctrl+t
  • pair tag is created, insert content

2 Responses
Add your response

I complemented with `map <C-t> bea<C-t>'

over 1 year ago ·

You could try zencoding ( and take that to a whole new level. ;-)

over 1 year ago ·