1

Here is my html file already edited,there are two errors in it.

<!DOCTYPE html>
<html lang="zh-Hans">
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="   " />
</head>
<body>
    <nav>6 navs</nav
    <div>intro</div>
    <div>edu</div>
    <div>specialization</div>
    <div>work/div>
    <div>production</div>
    <nav>contact</nav>
</body>
</html>

1.not <nav>6 navs</nav but <nav>6 navs</nav>
2.not <div>work/div> but <div>work</div>

How to choose the two errors automatically with vim command or some plugins?
How to fix it ,enclosed it automatically after locating the position?

  • 1
    mattn.github.io/emmet-vim A good plugin for html files though it relies heavily on visual mode. – Ashok Mar 13 '17 at 9:05
  • 1
    Another plugin to suggest would be github.com/alvan/vim-closetag - it won't fix errors, but will ensure that tags are closed properly (unless you manually break them later on) – grodzik Mar 13 '17 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.