File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- *eval.txt* For Vim バージョン 9.1. Last change: 2025 Dec 27
1+ *eval.txt* For Vim バージョン 9.1. Last change: 2026 Jan 10
22
33
44 VIM リファレンスマニュアル by Bram Moolenaar
@@ -454,7 +454,13 @@ Note リストの比較について注意: 2つのリストは、同じ長さを
454454 :call reverse(list) " 項目の順序を反転させる
455455 :call uniq(sort(list)) " ソートして重複を削除する
456456
457-
457+ Vim9 script または def メソッド内では、リストの長さをインデックスとして使用し
458+ て、新しい項目をリストに追加できる: >
459+ vim9script
460+ var l: list<string>
461+ l[0] = 'a'
462+ l[1] = 'b'
463+ <
458464for ループ ~
459465
460466| :for | ループは、リスト、Tuple、文字列または Blob の各項目に対してコマンドを実
Original file line number Diff line number Diff line change 1- *eval.txt* For Vim version 9.1. Last change: 2025 Dec 27
1+ *eval.txt* For Vim version 9.1. Last change: 2026 Jan 10
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -467,7 +467,13 @@ Changing the order of items in a list: >
467467 :call reverse(list) " reverse the order of items
468468 :call uniq(sort(list)) " sort and remove duplicates
469469
470-
470+ In a Vim9 script or a def method, a new item can be appended to a List by
471+ using the list length as the index: >
472+ vim9script
473+ var l: list<string>
474+ l[0] = 'a'
475+ l[1] = 'b'
476+ <
471477For loop ~
472478
473479The | :for | loop executes commands for each item in a List, Tuple, String or
You can’t perform that action at this time.
0 commit comments