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

Swan

by efe-blue ST3

sublime plugin of smartprogram

Details

Installs

  • Total 12
  • Win 6
  • Mac 6
  • Linux 0
Feb 29 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 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
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 0 0 0 0 0 0 1 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 2 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

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