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.
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.
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
Comment anonymously. Login not required.