ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

BEMJSON snippets

by 1vank1n ALL

BEMJSON snippets for Sublime Text (2 || 3)

Labels snippets

Details

Installs

  • Total 1K
  • Win 771
  • Mac 277
  • Linux 169
Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

BEMJSON snippets for Sublime

Write BEMSJON faster.

Install

Copy the files in sublime-directory\Data\Packages\User

Usage

Blocks

b – BEM block

{
    block : '${1:name}',
    content : [
        $0
    ]
}

btc - BEM block with text content

{
    block : '${1:name}',
    content : '$0'
}

bwm - BEM block with modifier.

{
    block : '${1:name}',
    mods: { ${2:modName}: '${3:modVal}' },
    content : [
        $0
    ]
}

bwt - BEM block with tag mod

{
    block : '$1',
    tag : '$2',
    content : [
        $0
    ]
}

bfc - BEM block with function content

{
    block : '$1',
    content : (function () {
        return $0;
    })()
}

Elements

e - BEM elem

{
    elem : '$1',
    content : [
        $0
    ]
}

etc - BEM elem with text content

{
    elem : '$1',
    content : '$0'
}

ewt - BEM elem with tag mod

{
    elem : '$1',
    tag : '$2',
    content : [
        $0
    ]
}

efc - BEM elem with function content

{
    elem : '$1',
    content : (function () {
        return $0;
    })()
}

bundle - Template for bemjson file.

([
    {
        block: 'b-page',
        mods: {theme: 'normal'},
        title: 'title',
        head: [
            {elem: 'css', url: '.css'},
        ],
        content: [
            {
                block : '',
                content : [

                ]
            }
        ]
    }
]);

Mods

t - BEM tag mod

tag : '$1',

js – BEM js mod

js : { $1 : '$2' },

mo - BEM mods mod

mods : { $1 : '$2' },

mi - BEM mix mod

mix : [ { $1 : '$2' } ],

a - BEM attrs mod

attrs : { $1 : '$2' },

Links

For ATOM users = atom-bemjson-snippets

Contributors

@1vank1n @campykid @vkhv