Skip to content

Commit 1d84f31

Browse files
committed
👍 Isolate execute and load modules from vim
1 parent 2eb9713 commit 1d84f31

File tree

6 files changed

+3
-27
lines changed

6 files changed

+3
-27
lines changed
File renamed without changes.
File renamed without changes.

helper/mod.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "./execute.ts";
2+
export * from "./load.ts";

vim/autocmd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Denops } from "../deps.ts";
2-
import { execute } from "./execute.ts";
2+
import { execute } from "../helper/execute.ts";
33

44
export async function autocmd(
55
denops: Denops,

vim/mod.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
export * from "./autocmd.ts";
2-
export * from "./execute.ts";
3-
export * from "./load.ts";
42
export * from "./vim.ts";

vim/vim.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { Context, Denops, Dispatcher } from "../deps.ts";
2-
import { execute } from "./execute.ts";
32
import { autocmd, AutocmdHelper } from "./autocmd.ts";
43
import { FunctionHelper } from "./function.ts";
5-
import { load } from "./load.ts";
64

75
/**
86
* Vim is a facade instance visible from each denops plugins for
@@ -59,19 +57,6 @@ export class Vim {
5957
return await this.#denops.eval(expr, ctx);
6058
}
6159

62-
/**
63-
* Execute an arbitrary Vim script under a given context.
64-
*
65-
* @param script: A script to be executed. Can be string or string list.
66-
* @param ctx: A context object which is expanded to the local namespace (l:)
67-
*/
68-
async execute(
69-
script: string | string[],
70-
ctx: Context = {},
71-
): Promise<void> {
72-
await execute(this.#denops, script, ctx);
73-
}
74-
7560
/**
7661
* Define autocmd in autocmd group.
7762
*
@@ -85,15 +70,6 @@ export class Vim {
8570
await autocmd(this.#denops, group, main);
8671
}
8772

88-
/**
89-
* Load an arbitrary Vim script from local or remote.
90-
*
91-
* @param url: An URL to locate the target Vim script.
92-
*/
93-
async load(url: URL): Promise<void> {
94-
await load(this.#denops, url);
95-
}
96-
9773
/**
9874
* Register plugin APIs
9975
*

0 commit comments

Comments
 (0)