Vim can auto-complete syntax for popular programming languages, including HTML. It is, however, not enabled by default in most installations.

Entering the following while in Vim's command mode will enable auto-completion for HTML language.

Step-by-step video guide:
:set omnifunc=htmlcomplete#CompleteTags

To start using the feature, press Ctrl + x followed by Ctrl + o keys while writing HTML syntaxes.

The following screenshot is an example in auto-completing <!

You can use the arrow key to navigate through the list to choose your desired auto-complete suggestion.

Automatically enable auto-complete for HTML files

To enable auto-complete every time an HTML file is opened, add the following line to your ~/.vimrc;

autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
Discuss the article:

Comment anonymously. Login not required.