vim-snippets/snippets/javascript/bemjson.snippets

53 lines
710 B
Plaintext
Raw Normal View History

2016-10-01 08:53:29 -04:00
# Snippet for bemjson. https://en.bem.info/platform/bemjson/
# Blocks
snippet b
2016-10-01 13:17:00 -04:00
{
block : '${1:name}',
content : [
'${2:content}'
]
}
2016-10-01 08:53:29 -04:00
# btc - BEM block with text content
snippet btc
2016-10-01 13:17:00 -04:00
{
block : '${1:name}',
content: '${2:content}'
}
2016-10-01 08:53:29 -04:00
# bwm - BEM block with modifier.
snippet bwm
2016-10-01 13:17:00 -04:00
{
block : '${1:name}',
mods: { ${2:modName}: '${3:modVal}' },
content : [
'${4:content}'
]
}
2016-10-01 08:53:29 -04:00
# Elems
# e - BEM elem
snippet e
2016-10-01 13:17:00 -04:00
{
elem : '${1:name}',
content : [
'${2:content}'
]
}
2016-10-01 08:53:29 -04:00
# mo - Mods
snippet mo
2016-10-01 13:17:00 -04:00
mods : { ${1:modName} : '${2:modVal}' },
2016-10-01 08:53:29 -04:00
mi - BEM mix mod
snippet mi
2016-10-01 13:17:00 -04:00
mix : [ { ${1:block} : '${2:block}' } ],
2016-10-01 08:53:29 -04:00
# a - BEM attrs mod
snippet a
2016-10-01 13:17:00 -04:00
attrs : { ${1:attr} : '${2:val}' },
2016-10-01 08:53:29 -04:00