File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ # ` function `
2
+
3
+ This module provides entry points of raw Vim and Neovim functions. Most of codes
4
+ are automatically generated by
5
+ [ ` gen-function.ts ` ] ( ../../scripts/gen-function/gen-function.ts ) from ` eval.txt `
6
+ in minimal supported Vim and Neovim versions.
7
+
8
+ ## Example
9
+
10
+ ``` typescript
11
+ import * as fn from " https://deno.land/x/denops_std/function/mod.ts" ;
12
+ import * as vimFn from " https://deno.land/x/denops_std/function/vim/mod.ts" ;
13
+ import * as nvimFn from " https://deno.land/x/denops_std/function/nvim/mod.ts" ;
14
+
15
+ export async function main(denops ) {
16
+ // fn holds functions exists in both Vim and Neovim
17
+ console .log (fn .or (denops , 0 , 1 ));
18
+
19
+ // vimFn holds functions exists only in Vim
20
+ console .log (vimFn .balloon_gettext (denops ));
21
+
22
+ // nvimFn holds functions exists only in Neovim
23
+ console .log (nvimFn .api_info (denops ));
24
+ }
25
+ ```
26
+
27
+ ## How to add functions manually
28
+
29
+ To add functions manually, create or modify corresponding module under
30
+ ` function ` , ` function/vim ` , or ` function/nvim ` module then make sure that module
31
+ is listed in ` _manual.ts ` uneder corresponding module. After that, execute
32
+ ` make gen ` on the repository top so that ` gen-function.ts ` automatically remove
33
+ duplicated functions from ` _generated.ts ` .
You can’t perform that action at this time.
0 commit comments