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

Swan

by efe-blue ST3

sublime plugin of smartprogram

Details

Installs

  • Total 7
  • Win 3
  • OS X 4
  • Linux 0
Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1
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 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
OS X 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 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 0

Readme

Source
raw.​githubusercontent.​com

sublime-swan

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

Install

  • 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.

Setting

  • 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"
      }
    ],
    

Feature

  • .swan file syntax highlighting

  • Baidu smart app components auto-completion

  • Baidu smart app apis auto-completion and suggestion

Usage

  • 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

Liscense

This plugin is published under the MIT License