|
5 | 5 | Vim9 script でプラグインを作る
|
6 | 6 |
|
7 | 7 |
|
8 |
| -The Vim9 script language is used for writing plugins, especially larger ones |
9 |
| -that use multiple files. This chapter explains how to split up a plugin into |
10 |
| -modules, import and export items and keep the rest local. |
| 8 | +Vim9 script 言語はプラグイン、とりわけ複数ファイルから使われる巨大なものを書く |
| 9 | +のに使えます。この章ではプラグインをモジュールとして分割し、アイテムのインポー |
| 10 | +トとエクスポートおよび局所性を維持する方法を解説します。 |
11 | 11 |
|
12 |
| -|46.1| Introduction |
13 |
| -|46.2| Variable declarations |
14 |
| -|46.3| Functions and types |
15 |
| -|46.?| Using a Vim9 script from legacy script |
| 12 | +|46.1| 導入 |
| 13 | +|46.2| 変数の宣言 |
| 14 | +|46.3| 関数と型 |
| 15 | +|46.?| 旧来のスクリプトから Vim9 script を使う |
16 | 16 |
|
17 | 17 | 次章: |usr_90.txt| Vim のインストール
|
18 | 18 | 前章: |usr_45.txt| 言語を選択する (ロケール)
|
19 | 19 | 目次: |usr_toc.txt|
|
20 | 20 |
|
21 | 21 | ==============================================================================
|
22 |
| -*46.1* Introduction *vim9-script-intro* |
| 22 | +*46.1* 導入 *vim9-script-intro* |
23 | 23 |
|
24 | 24 | Vim9 script was designed to make it easier to write large Vim scripts. It
|
25 | 25 | looks more like other script languages, especially Typescript. Also,
|
@@ -69,7 +69,7 @@ Notice that the assignment `result = GetPart(count)` does not use the `let`
|
69 | 69 | command. That is explained in the next section.
|
70 | 70 |
|
71 | 71 | ==============================================================================
|
72 |
| -*46.2* Variable declarations *vim9-declarations* |
| 72 | +*46.2* 変数の宣言 *vim9-declarations* |
73 | 73 |
|
74 | 74 | In Vim9 script variables are declared once with a `:let` or `:const` command.
|
75 | 75 | Assigning a value is done without `:let` and it is not possible to `:unlet`
|
@@ -108,7 +108,7 @@ Although it's shorter to do: >
|
108 | 108 | let word = condition ? 'yes' : 'no'
|
109 | 109 |
|
110 | 110 | ==============================================================================
|
111 |
| -*46.3* Functions and types |
| 111 | +*46.3* 関数と型 *vim9-functions* *vim9-types* |
112 | 112 |
|
113 | 113 | Legacy Vim script does have type checking, but this happens at runtime, when
|
114 | 114 | the code is executed. And it's permissive, often a computation gives an
|
@@ -161,7 +161,7 @@ multiple types, you can use the "any" type: >
|
161 | 161 | enddef
|
162 | 162 |
|
163 | 163 | ==============================================================================
|
164 |
| -*46.?* Using a Vim9 script from legacy script *source-vim9-script* |
| 164 | +*46.?* 旧来のスクリプトから Vim9 script を使う *source-vim9-script* |
165 | 165 |
|
166 | 166 | In some cases you have a legacy Vim script where you want to use items from a
|
167 | 167 | Vim9 script. For example in your .vimrc you want to initialize a plugin. The
|
|
0 commit comments