How to automatically complete the html tag when Codemirror presses the Tab key?

for example, enter

div

then press the tab key at the cursor, and the auto-completion is

.
<div></div>

how can it be implemented?


Zen code (Emmet) haven't seen it? There are many implementations of each editor, and the source code is not difficult to find. The principle is to automatically match the rules according to a few characters before the cursor position

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e585df-454ba.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e585df-454ba.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?