]> git.r.bdr.sh - rbdr/api-notation.vim/blame - README.md
Adds the syntax def
[rbdr/api-notation.vim] / README.md
CommitLineData
41d7b8b0
BB
1# API Notation Syntax for Vim
2
3This is a syntax for api notation, a simple notation I've been using for
4annotating module APIs in specs and other documents.
5
6## API Notation Reference
7
8The most recent reference as of now is in this [gist][api-reference], so
9check that to be sure. But here's a reproduction of the notation.
10
11```
12Class Members
13 + class property
14 - instance property
15 ~> listened events (socket)
16 +> listened events (class/module)
17 -> listened events (instance)
18 <~ dispatched events (socket)
19 <+ dispatched events(class/module)
20 <- dispatched events (instance)
21 :: class method
22 # instance method
23
24Other symbols
25 => returns
26->() callback return
27[xx] optional
28<xx> data type
29
30Recommended order: class first, then sockets, then instance. Internally:
31Properties, events, methods.
32```
33
34## How does it look like?
35
36Like this.
37
38![Like this.][api-example]
39
40[api-reference]: https://gist.github.com/benbeltran/4694c46fcec131468e34
41[api-example]: http://ns.vc/1gXwQ.png