Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/1vank1n/sublime-bemjson-snippets
BEMJSON snippets for Sublime Text (2 || 3)
https://github.com/1vank1n/sublime-bemjson-snippets
Last synced: about 2 months ago
JSON representation
BEMJSON snippets for Sublime Text (2 || 3)
- Host: GitHub
- URL: https://github.com/1vank1n/sublime-bemjson-snippets
- Owner: 1vank1n
- Created: 2015-02-20T17:50:11.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-28T11:02:05.000Z (over 8 years ago)
- Last Synced: 2024-05-20T21:47:33.036Z (8 months ago)
- Size: 12.7 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BEMJSON snippets for Sublime
Write BEMSJON faster.
![gif](http://i59.tinypic.com/2cn9xe0.gif)
## Install
Copy the files in sublime-directory\Data\Packages\User
## Usage
{
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 modtag : '$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](https://github.com/verybigman/atom-bemjson-snippets)
## Contributors
[@1vank1n](https://github.com/1vank1n)
[@campykid](https://github.com/campykid)
[@vkhv] (https://github.com/vkhv)