release 0.2.3
An ETPL syntax definition & snippets specifically for Sublime Text.
ETPL is a reusable, flexible, high-performance JavaScript template engine for Browser & Node.
Default syntax & base16-ocean.dark.tmTheme:
base16-ocean.dark.tmTheme
Mustache style syntax & Tomorrow.tmTheme:
Tomorrow.tmTheme
Clone the repository in your Sublime Text Packages directory:
Packages
git clone https://github.com/ecomfe/sublime-etpl.git ETPL
The Packages directory is located at:
~/Library/Application Support/Sublime Text 3/Packages/
~/.Sublime Text 3/Packages/
%APPDATA%/Sublime Text 3/Packages/
~/Library/Application Support/Sublime Text 2/Packages/
~/.Sublime Text 2/Packages/
%APPDATA%/Sublime Text 2/Packages/
If you haven’t used it yet, just install it from the link above and then:
install
ETPL
Go to Preferences > Package Settings > ETPL > Settings - User, insert & override the following JSON snippet:
Preferences
Package Settings
Settings - User
{ "commandOpen": "<!--", "commandClose": "-->", "variableOpen": "${", "variableClose": "}" }
Key bindings for <!-- // ETPL_COMMENTS -->:
<!-- // ETPL_COMMENTS -->
target:
<!-- target: TARGET_NAME(master = MASTER_NAME) -->
block:
<!-- block: BLOCK_NAME --> ... <!-- /block -->
import:
<!-- import: TARGET_NAME -->
use:
<!-- use: TARGET_NAME(ASSIGNMENT_EXPRESSIONS) -->
var:
<!-- var: VAR_NAME = EXPRESSION -->
for:
<!-- for: VARIABLE as ITEM, KEY_OR_INDEX --> ... <!-- /for -->
if:
<!-- if: CONDITIONAL_EXPRESSION --> ... <!-- /if -->
elif:
<!-- elif: CONDITIONAL_EXPRESSION -->
else:
<!-- else -->
filter:
<!-- filter: FILTER_NAME(ARGUMENTS) --> ... <!-- /filter -->
MIT © Baidu Inc.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Sublime ETPL
An ETPL syntax definition & snippets specifically for Sublime Text.
About ETPL
ETPL is a reusable, flexible, high-performance JavaScript template engine for Browser & Node.
Screenshot
Default syntax &
base16-ocean.dark.tmTheme:Mustache style syntax &
Tomorrow.tmTheme:Install
Get it through Git
Clone the repository in your Sublime Text
Packagesdirectory:The
Packagesdirectory is located at:~/Library/Application Support/Sublime Text 3/Packages/~/.Sublime Text 3/Packages/%APPDATA%/Sublime Text 3/Packages/~/Library/Application Support/Sublime Text 2/Packages/~/.Sublime Text 2/Packages/%APPDATA%/Sublime Text 2/Packages/Get it through Sublime Package Control
If you haven’t used it yet, just install it from the link above and then:
install, to bring up the “Package Control: Install Package” option, and press EnterETPL, and press Enter to install it.Settings
Go to
Preferences>Package Settings>ETPL>Settings - User, insert & override the following JSON snippet:Usage
Comments
Key bindings for
<!-- // ETPL_COMMENTS -->:Snippets
target:+ Tab →<!-- target: TARGET_NAME(master = MASTER_NAME) -->block:+ Tab →<!-- block: BLOCK_NAME --> ... <!-- /block -->import:+ Tab →<!-- import: TARGET_NAME -->use:+ Tab →<!-- use: TARGET_NAME(ASSIGNMENT_EXPRESSIONS) -->var:+ Tab →<!-- var: VAR_NAME = EXPRESSION -->for:+ Tab →<!-- for: VARIABLE as ITEM, KEY_OR_INDEX --> ... <!-- /for -->if:+ Tab →<!-- if: CONDITIONAL_EXPRESSION --> ... <!-- /if -->elif:+ Tab →<!-- elif: CONDITIONAL_EXPRESSION -->else:+ Tab →<!-- else -->filter:+ Tab →<!-- filter: FILTER_NAME(ARGUMENTS) --> ... <!-- /filter -->Related
Contributors
License
MIT © Baidu Inc.