mattn / mattn/emmet-vim

How can expand type in script tag?

Open
#545 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

In my emmet ,

"script" expanded into '<script></script>'
"script:src" expanded into '<script src=""></script>'

The code snippet in emmet.vim is as below:

\            'script': g:emmet_html5 ? [] : [{'type': 'text/javascript'}],
\            'script:src': (g:emmet_html5 ? [] : [{'type': 'text/javascript'}]) + [{'src': ''}],

How can trigger this kind of expanding?

"script" expanded into '<script type="text/javascript"></script>'
"script:src" expanded into '<script src="" type="text/javascript></script>'

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 emmet.vim definitions for "script" and "script:src", and inspect how g:emmet_html5 selects their attributes. Verify whether the requested type="text/javascript" output is already exposed by that setting; done means documenting or confirming the supported expansion behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, vim
Domain
tooling, web-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.