File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -8,17 +8,16 @@ import { Denops } from "../deps.ts";
8
8
* w - Window local variables
9
9
* t - Tab page local variables
10
10
* v - Vim's variables
11
- * env - Environment variables
12
11
*
13
12
*/
14
- export type VariableGroups = "g" | "b" | "w" | "t" | "v" | "env" ;
13
+ export type VariableGroups = "g" | "b" | "w" | "t" | "v" ;
15
14
16
15
export async function getVar < T = unknown > (
17
16
denops : Denops ,
18
17
group : VariableGroups ,
19
18
prop : string ,
20
19
) : Promise < T > {
21
- const name = group === "env" ? `\$ ${ prop } ` : `${ group } :${ prop } ` ;
20
+ const name = `${ group } :${ prop } ` ;
22
21
// deno-lint-ignore no-explicit-any
23
22
return ( await denops . eval ( name ) ) as any ;
24
23
}
@@ -29,7 +28,7 @@ export async function setVar<T = unknown>(
29
28
prop : string ,
30
29
value : T ,
31
30
) : Promise < void > {
32
- const name = group === "env" ? `\$ ${ prop } ` : `${ group } :${ prop } ` ;
31
+ const name = `${ group } :${ prop } ` ;
33
32
await denops . cmd ( `let ${ name } = value` , {
34
33
value,
35
34
} ) ;
@@ -40,7 +39,7 @@ export async function removeVar(
40
39
group : VariableGroups ,
41
40
prop : string ,
42
41
) : Promise < void > {
43
- const name = group === "env" ? `\$ ${ prop } ` : `${ group } :${ prop } ` ;
42
+ const name = `${ group } :${ prop } ` ;
44
43
await denops . cmd ( `unlet ${ name } ` ) ;
45
44
}
46
45
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ export class Vim {
11
11
readonly w : VariableHelper ;
12
12
readonly t : VariableHelper ;
13
13
readonly v : VariableHelper ;
14
- readonly env : VariableHelper ;
15
14
16
15
constructor ( denops : Denops ) {
17
16
this . #denops = denops ;
@@ -20,7 +19,6 @@ export class Vim {
20
19
this . w = new VariableHelper ( denops , "w" ) ;
21
20
this . t = new VariableHelper ( denops , "t" ) ;
22
21
this . v = new VariableHelper ( denops , "v" ) ;
23
- this . env = new VariableHelper ( denops , "env" ) ;
24
22
}
25
23
26
24
static get ( ) : Vim {
You can’t perform that action at this time.
0 commit comments