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

Mithrilizer

by Bondifrench ST2/ST3

Sublime package for auto completions of usual Mithril methods

Details

Installs

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

Readme

Source
raw.​githubusercontent.​com

Mithrilizer

Sublime package for auto completions of common Mithril methods
[Needs to be updated with Mithril 2.0 API]
Mithril is a client-side MVC lightweight Javascript framework created by Leo Horie

Installation

Package Control

  1. Open Package Control: Preferences -> Package Control
  2. Select Package Control: Install Package
  3. Type Mithrilizer into the search box and select the package to install it

Usage

Once installed, you need to be on a page with the syntax set to Javascript

m -> m()

will display:

m('div',{
    style: { }, 
    config: 'function name'
    },[
        'Children'
    ])

More details on the use of m() here

mi -> m('input')

will display:

m('input[type=]', oninput:, value: )

More details on the use of m() here

ma -> m('a')

m('a[href=/myroute]', {config: m.route}, 'Myroute')

More details on the use of m() here

mm -> Mithril module

Will display:

var mymodule = {};

mymodule.vm = 'Object literal {} or function Constructor'

mymodule.controller = function (options) {
    mymodule.vm.init();
};

mymodule.view = function (ctrl) {
    return 'view here';
}
m.module(document.body, mymodule);

More details on the use of m.module() here

mp -> m.prop()

Will display:

m.prop('initial value');

More details on the use of m.prop() here

mw -> m.withAttr()

Will display:

m.withAttr('string here', callback here)

More details on the use of m.withAttr() here

mro -> m.route()

Will display:

m.route({root Element, '/defaultRoute',
    '/route1': Module name

    });

m.route.mode = 'search/hash/pathname';

More details on the use of m.route() here

mreq -> m.request()

Will display:

m.request({
    method: 'GET/POST',
    url: '/user',
    dataType: ,
    callbackKey: ,
    type: ,
})

More details on the use of m.request() here

md -> m.deferred()

Will display:

m.deferred('initial value');

More details on the use of m.deferred() here

ms -> m.sync([])

Will display:

m.sync([
    Array of promises
]);

More details on the use of m.sync() here

mt -> m.trust()

Will display:

m.trust(content);

More details on the use of m.trust() here

mren -> m.render()

Will display:

m.render(root Element, [
    'Children elements'
]);

More details on the use of m.render() here

mrd -> m.redraw()

Will display:

m.redraw(true/false);

More details on the use of m.redraw() here

mrs -> m.redraw.strategy()

Will display:

m.redraw.strategy('all/diff/none');

More details on the use of m.redraw.strategy() here

mst -> m.startComputation() and m.endComputation()

Will display:

m.startComputation();

m.endComputation();

More details on the use of m.startComputation/m.endComputation here