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 786
  • Mac 287
  • Linux 172
Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9
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 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 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 0 0 0 0 0 0 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 0 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