Sublime Text 3 syntax highlighting and auto completion for .swan
file(Baidu 'smart program').
Baidu smart program is a new open ability. Developers can quickly develop an samrt program. Through searching, users can be easily acquired and disseminated within the Baidu Apps. document
- Package Control(Under review, temporarily unavailable)
Search Sublime Swan
via Package Control: Install Package
- Git
Git clone this repository to Sublime Packages Path.
- Zip
Download zip and unzip to Sublime Packages Path.
-
In order to improve SWAN completion efficiency, Preferences.sublime-settings(User) should be edited and added config below:
"auto_complete_triggers": [ { "characters": "abcdefghijklmnopqrstuvwxyz< :.", "selector": "text.swan" } ],
-
.swan file syntax highlighting
-
Baidu smart app components auto-completion
-
Baidu smart app apis auto-completion and suggestion
- Swan
- choose
view
====><view></view>
- choose
view:id
===><view id=""></view>
view.demo + tab
===><view class="demo"></view>
view#demo + tab
===><view id="demo"></view>
- JavaScript(api and snippet)
-
choose
swan.login api
===>swan.login();
-
choose
swan.login snippet
===>swan.login({ success: function (res) {} });
Note: Snippets only include the necesssary keys
This plugin is published under the MIT License