From 5837d8dc5c51609b4cd373103a3cf570db7cb7eb Mon Sep 17 00:00:00 2001 From: Vladislav Khvostov Date: Sat, 1 Oct 2016 15:53:29 +0300 Subject: [PATCH 1/2] Added bemjson.snippets --- snippets/javascript/bemjson.snippets | 52 ++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 snippets/javascript/bemjson.snippets diff --git a/snippets/javascript/bemjson.snippets b/snippets/javascript/bemjson.snippets new file mode 100644 index 0000000..ec3af59 --- /dev/null +++ b/snippets/javascript/bemjson.snippets @@ -0,0 +1,52 @@ +# Snippet for bemjson. https://en.bem.info/platform/bemjson/ + +# Blocks +snippet b + { + block : '${1:name}', + content : [ + '${2:content}' + ] + } + +# btc - BEM block with text content +snippet btc + { + block : '${1:name}', + content: '${2:content}' + } + +# bwm - BEM block with modifier. +snippet bwm + { + block : '${1:name}', + mods: { ${2:modName}: '${3:modVal}' }, + content : [ + '${4:content}' + ] + } + +# Elems + +# e - BEM elem +snippet e + { + elem : '${1:name}', + content : [ + '${2:content}' + ] + } + + +# mo - Mods +snippet mo + mods : { ${1:modName} : '${2:modVal}' }, + +mi - BEM mix mod +snippet mi + mix : [ { ${1:block} : '${2:block}' } ], + +# a - BEM attrs mod +snippet a + attrs : { ${1:attr} : '${2:val}' }, + From 1cc15671958d5608dd98f53074a432ac07989da9 Mon Sep 17 00:00:00 2001 From: Vladislav Khvostov Date: Sat, 1 Oct 2016 20:17:00 +0300 Subject: [PATCH 2/2] Update bemjson.snippets --- snippets/javascript/bemjson.snippets | 52 ++++++++++++++-------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/snippets/javascript/bemjson.snippets b/snippets/javascript/bemjson.snippets index ec3af59..e96c70d 100644 --- a/snippets/javascript/bemjson.snippets +++ b/snippets/javascript/bemjson.snippets @@ -2,51 +2,51 @@ # Blocks snippet b - { - block : '${1:name}', - content : [ - '${2:content}' - ] - } + { + block : '${1:name}', + content : [ + '${2:content}' + ] + } # btc - BEM block with text content snippet btc - { - block : '${1:name}', - content: '${2:content}' - } + { + block : '${1:name}', + content: '${2:content}' + } # bwm - BEM block with modifier. snippet bwm - { - block : '${1:name}', - mods: { ${2:modName}: '${3:modVal}' }, - content : [ - '${4:content}' - ] - } + { + block : '${1:name}', + mods: { ${2:modName}: '${3:modVal}' }, + content : [ + '${4:content}' + ] + } # Elems # e - BEM elem snippet e - { - elem : '${1:name}', - content : [ - '${2:content}' - ] - } + { + elem : '${1:name}', + content : [ + '${2:content}' + ] + } # mo - Mods snippet mo - mods : { ${1:modName} : '${2:modVal}' }, + mods : { ${1:modName} : '${2:modVal}' }, mi - BEM mix mod snippet mi - mix : [ { ${1:block} : '${2:block}' } ], + mix : [ { ${1:block} : '${2:block}' } ], # a - BEM attrs mod snippet a - attrs : { ${1:attr} : '${2:val}' }, + attrs : { ${1:attr} : '${2:val}' },