mattn / mattn/emmet-vim

How to add link tag in expanding html:5?

Open
#374 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
6.5k
Forks
414
PR merge metrics
No merged PRs in 30d

Description

html:5 will be expanded as following.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
        
</body>
</html>

I want to customize it as following when to expand html:5 in my vim.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link  href="" >
</head>
<body>
        
</body>
</html>

Here is my try .
vim snippets.json
#to change the line containing doc": as

doc": "html>(head>meta[charset=${charset}]+meta:vp+meta:edge+link[href=""])+body",
Why still no link tag when to expand html:5?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the snippets.json entry containing the doc expansion and the html:5 expansion path in Emmet-vim. Check how custom snippet syntax is parsed, then verify the expansion in Vim. Done means expanding html:5 includes the requested link tag without breaking the existing HTML structure.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, vim
Domain
tooling, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.