mattn / emmet-vim

emmet for vim: http://emmet.io/
http://mattn.github.io/emmet-vim
MIT License
6.42k stars 411 forks source link

Single quotes for attributes not working #366

Closed shammellee closed 7 years ago

shammellee commented 7 years ago

If I specify single quotes for attributes, the expansion should be single quotes. Instead, the expansion is double quotes…

input expected output actual output
p[foo='bar'] <p foo='bar'></p> <p foo="bar"></p>
mattn commented 7 years ago

set quote_char to '.

shammellee commented 7 years ago

Could you be a little more clear? How do I set quote_char to ' exactly?

mattn commented 7 years ago

if you want to set it for html, please try to set like below.

    let g:user_emmet_settings = {
    \  'html' : {
    \    'quote_char': "'",
    \  },
    \}
shammellee commented 7 years ago

Cool, and how do I enable single quotes for .js and .jsx files?

shammellee commented 7 years ago

Never mind, I figured it out. For anyone else wondering…

let g:user_emmet_settings = {
\    "html": {
\        "quote_char": "'"
\    }
\    ,"javascript.jsx": {
\        "extends": "jsx"
\        "quote_char": "'"
\    }
\}
mattn commented 7 years ago

Still have issue?

rom-dos commented 5 years ago

Never mind, I figured it out. For anyone else wondering…

let g:user_emmet_settings = {
\    "html": {
\        "quote_char": "'"
\    }
\    ,"javascript.jsx": {
\        "extends": "jsx"
\        "quote_char": "'"
\    }
\}

Just to clarify, I think there should be a comma after "extends": "jsx" -- otherwise this solved the issue for me!