name | description |
---|---|
tataku.vim |
The plugin that define protocol |
tataku.vim define protocol between collector-processor, processor-processor, processor-emitter.
This plugin make easily to create plugin like call web API.
This plugin needs:
tataku.vim has some recipes define by user.
Recipe must have three parts.
Collector
C<Collector> collect strings from some resources.
Processor
C<Processor> process strings and pass strings to next processor.
Emitter
C<Emitter> output strings to some resources.
Recipe must be below format:
"Collector" and "Emitter" can be specified only one module. But "Processor" can be specified multiply.
Each module have two keys.
name
The module name. If you use C<tataku-collector-current_line>, specify C<current_line>.
options
The options for the module.
tataku#call_recipe(recipe_name)
Call recipe which registered in L<g:tataku_recipes>.
-
The recipe book. Default: C<{}>
-
Enable operator mappings starts with C<E<lt>PlugE<gt>(operator-tataku->. For details: L<tataku-operator> Default: C<v:false>
If set v:true
to g:tataku_enable_operator
, The operator mappings will be enable.
The mappings starts with <Plug>(operator-tataku-
.
If you registered foo
and bar
into g:tataku_recipes
, <Plug>(operator-tataku-foo)
and <Plug>(operator-tataku-bar)
will be enabled.
NOTE: If call recipe via operator, collector
module is ignored and use motion/textobj instead of its.
This section explain how to create module.
When call recipe, tataku.vim import module from denops/@tataku/<module-type>/<module-name>.ts
within &runtimepath.
The module must export function as default. The function must return correspoinding stream:
Collector:
ReadableStream<string[]>
Processor:
TransformStream<string[]>
Emitter:
WritableStream<string[]>
Hey! The above document had some coding errors, which are explained below:
- Around line 14:
-
Can't have a 0 in =over 0
- Around line 30:
-
Can't have a 0 in =over 0
- Around line 42:
-
Can't have a 0 in =over 0
- Around line 76:
-
Can't have a 0 in =over 0
- Around line 91:
-
Can't have a 0 in =over 0
- Around line 101:
-
Can't have a 0 in =over 0
- Around line 142:
-
Can't have a 0 in =over 0