Skip to content

Update vim9.{txt,jax} #1489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions doc/vim9.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*vim9.txt* For Vim バージョン 9.1. Last change: 2024 Jan 12
*vim9.txt* For Vim バージョン 9.1. Last change: 2024 Apr 13

VIMリファレンスマニュアル by Bram Moolenaar

Expand Down Expand Up @@ -647,6 +647,14 @@ OKです: >
ブロックはユーザーコマンドを定義するのにも使えます。ブロックの内側では Vim9
script の文法が使われます。

これはヒアドキュメントの使用例です: >
com SomeCommand {
g:someVar =<< trim eval END
ccc
ddd
END
}

もしブロックが辞書を含むのであれば、辞書の閉じカッコは行頭に書かれてはいけませ
ん。さもなくば閉じカッコがブロックの終了としてパースされてしまいます。これは動
作しません: >
Expand Down Expand Up @@ -1519,7 +1527,6 @@ func({type}, ?{type}, ...list<{type}>): {type}
:type MyList list<string>
ユーザー関数と似たように、後から追加される組み込み型との名前の衝突を避けるた
め、カスタム型は大文字から始まらなければなりません。
{not implemented yet}

そしてクラスとインターフェイスも型として使えます: >
:class MyClass
Expand Down
11 changes: 9 additions & 2 deletions en/vim9.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 9.1. Last change: 2024 Jan 12
*vim9.txt* For Vim version 9.1. Last change: 2024 Apr 13


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -641,6 +641,14 @@ No command can follow the "{", only a comment can be used there.
The block can also be used for defining a user command. Inside the block Vim9
syntax will be used.

This is an example of using here-docs: >
com SomeCommand {
g:someVar =<< trim eval END
ccc
ddd
END
}

If the statements include a dictionary, its closing bracket must not be
written at the start of a line. Otherwise, it would be parsed as the end of
the block. This does not work: >
Expand Down Expand Up @@ -1513,7 +1521,6 @@ Custom types can be defined with `:type`: >
:type MyList list<string>
Custom types must start with a capital letter, to avoid name clashes with
builtin types added later, similarly to user functions.
{not implemented yet}

And classes and interfaces can be used as types: >
:class MyClass
Expand Down