Skip to content

Commit 8becbcf

Browse files
committed
📝 Update README
1 parent 5c765ec commit 8becbcf

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
# 🐜 denops_std
22

3-
[![deno land](http://img.shields.io/badge/available%20on-deno.land/x-lightgrey.svg?logo=deno)](https://deno.land/x/denops_std)
4-
[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/denops_std/mod.ts)
53
[![Test](https://github.com/vim-denops/deno-denops-std/actions/workflows/test.yml/badge.svg)](https://github.com/vim-denops/deno-denops-std/actions/workflows/test.yml)
4+
[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/denops_std/mod.ts)
5+
[![Documentation](https://img.shields.io/badge/denops-Documentation-yellow.svg)](https://vim-denops.github.io/denops-documentation/)
6+
[![deno land](http://img.shields.io/badge/available%20on-deno.land/x/denops__std-lightgrey.svg?logo=deno)](https://deno.land/x/denops_std)
67

78
[Deno][deno] module for [denops.vim][denops.vim]. This module is assumed to be
89
used in denops plugin and the code is assumed to be called in a worker thread
910
for a plugin.
1011

1112
See [Module README](./denops_std/README.md) for quick usage and API
12-
documentations.
13+
documentations and see
14+
[Denops Documentation](https://vim-denops.github.io/denops-documentation/) for
15+
learning how to write Vim/Neovim plugins.
1316

1417
[deno]: https://deno.land/
1518
[denops.vim]: https://github.com/vim-denops/denops.vim

denops_std/README.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# denops_std
22

3-
[![deno land](http://img.shields.io/badge/available%20on-deno.land/x-lightgrey.svg?logo=deno)](https://deno.land/x/denops_std)
4-
[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/denops_std/mod.ts)
53
[![Test](https://github.com/vim-denops/deno-denops-std/actions/workflows/test.yml/badge.svg)](https://github.com/vim-denops/deno-denops-std/actions/workflows/test.yml)
4+
[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/denops_std/mod.ts)
5+
[![Documentation](https://img.shields.io/badge/denops-Documentation-yellow.svg)](https://vim-denops.github.io/denops-documentation/)
6+
[![deno land](http://img.shields.io/badge/available%20on-deno.land/x/denops__std-lightgrey.svg?logo=deno)](https://deno.land/x/denops_std)
67

78
[Deno][deno] module for [denops.vim][denops.vim]. This module is assumed to be
89
used in denops plugin and the code is assumed to be called in a worker thread
@@ -14,33 +15,27 @@ By using this module, developers can write Vim/Neovim denops plugins like:
1415
import { Denops } from "https://deno.land/x/denops_std/mod.ts";
1516
import * as fn from "https://deno.land/x/denops_std/function/mod.ts";
1617
import * as vars from "https://deno.land/x/denops_std/variable/mod.ts";
17-
import { execute } from "https://deno.land/x/denops_std/helper/mod.ts";
18+
import * as helper from "https://deno.land/x/denops_std/helper/mod.ts";
19+
1820
import { ensureString } from "https://deno.land/x/unknownutil/mod.ts";
1921

2022
export async function main(denops: Denops): Promise<void> {
2123
denops.dispatcher = {
2224
async say(where: unknown): Promise<void> {
2325
// Ensure that `where` is `string` here
2426
ensureString(where);
25-
// Use `call` to call Vim's function
2627
const name = await fn.input(denops, "Your name: ");
27-
// Use `eval` to evaluate Vim's expression
2828
const progname = await vars.v.get(denops, "progname");
29-
// Construct messages
3029
const messages = [
31-
`Hello ${where}`,
32-
`Your name is ${name}`,
33-
`This is ${progname}`,
30+
`Hello ${where}.`,
31+
`Your name is ${name}.`,
32+
`This is ${progname}.`,
3433
];
35-
// Use `cmd` to execute Vim's command
36-
await denops.cmd(`redraw | echomsg message`, {
37-
message: messages.join(". "),
38-
});
34+
await helper.echo(denops, messages.join("\n"));
3935
},
4036
};
4137

42-
// Use 'execute()' to execute multiline Vim script
43-
await execute(
38+
await helper.execute(
4439
denops,
4540
`
4641
command! HelloWorld call denops#notify("${denops.name}", "say", ["World"])
@@ -50,7 +45,8 @@ export async function main(denops: Denops): Promise<void> {
5045
}
5146
```
5247

53-
See [denops-helloworld.vim](https://github.com/vim-denops/denops-helloworld.vim)
48+
See [Denops Documentation](https://vim-denops.github.io/denops-documentation/)
49+
or [denops-helloworld.vim](https://github.com/vim-denops/denops-helloworld.vim)
5450
for more details.
5551

5652
[deno]: https://deno.land/

0 commit comments

Comments
 (0)