Skip to content

Commit 084fc10

Browse files
authored
Merge pull request #1301 from vim-jp/hh-update-cmdline
Update cmdline.{txt,jax}
2 parents 100e6d8 + 26df38b commit 084fc10

File tree

2 files changed

+124
-21
lines changed

2 files changed

+124
-21
lines changed

doc/cmdline.jax

Lines changed: 61 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*cmdline.txt* For Vim バージョン 9.0. Last change: 2022 Sep 26
1+
*cmdline.txt* For Vim バージョン 9.0. Last change: 2023 May 20
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -491,16 +491,26 @@ tcshのautolist補完が好みなら、オプション 'wildmode' を使って
491491
:e *.c$
492492
これは ".cpp" で終わるファイルにはマッチしない。"$" をつけないとマッチする。
493493

494-
オプションの、以前に設定された値は、'=' の後で 'wildchar' のキーを打ち込むこと
495-
で得られる。例えば、":set dir=" の後で 'wildchar' のキーを打ち込むと、'dir'
496-
現在の値が挿入される。この動作は、ファイル名を取るオプションに対するファイル名
497-
補完より優先する。
498-
499494
xtermで <S-Tab>CTRL-P として使いたいときは、このコマンドをユーザーの
500495
.cshrc に加えること。 >
501496
xmodmap -e "keysym Tab = Tab Find"
502497
そして次を .vimrc に加えること。 >
503498
cmap <Esc>[1~ <C-P>
499+
<
500+
|:set=| を使用してオプションを設定する場合、オプションの古い値は、'=' の後で
501+
'wildchar' のキーを打ち込むことで得られる。例えば、":set dir=" の後で
502+
'wildchar' のキーを打ち込むと、'dir' の現在の値が挿入される。この動作は、ファ
503+
イル名を取るオプションに対するファイル名補完より優先する。
504+
505+
|:set=||:set+=|、または |:set^=| を使用する場合、事前に定義された名前または
506+
構文を持つ文字列オプション ('diffopt''listchars' など)、または 1 文字のフラ
507+
グのリスト ('shortmess' など) は、'wildchar' を使用する場合に補完に使用できる
508+
値のリストも表示する。
509+
510+
|:set-=| を使用する場合、'diffopt''backupdir' などのコンマ区切りのオプショ
511+
ンは各項目を個別に表示する。'shortmess' のようなフラグリストのオプションでは、
512+
古い値全体と個々のフラグの両方が表示される。それ以外の場合は、古い値全体が補完
513+
されるだけである。
504514

505515
==============================================================================
506516
3. Exコマンドライン *cmdline-lines*
@@ -590,6 +600,7 @@ Exコマンドはいくつかの特徴を持っている。
590600
:read !
591601
:scscope
592602
:sign
603+
:tabdo
593604
:tcl
594605
:tcldo
595606
:tclfile
@@ -704,15 +715,54 @@ Exコマンドには、その前に行単位の範囲を指定できるものが
704715
'T マーク Tの位置 (大文字); マーク位置が別ファイルにある
705716
ときには範囲指定には使えない
706717
/{pattern}[/] 次に {pattern} のマッチする行 (下向き) *:/*
718+
以下の |:range-pattern| も参照
707719
?{pattern}[?] 次に {pattern} のマッチする行 (上向き) *:?*
720+
以下の |:range-pattern| も参照
708721
\/ 次に直前の検索パターンのマッチする行 (下向き)
709722
\? 次に直前の検索パターンのマッチする行 (上向き)
710723
\& 次に直前の置換元パターンのマッチする行 (下向き)
711724

725+
*:range-offset*
712726
これらの後に '+' または '-' と数値を付けてもよい (複数も可)。この数は直前の行
713727
番号に加算または減算される。数が省略された場合は 1 が指定されたと見なされる。
714728
もし '+' や '-' の前に何も無い場合は現在行が使われる。
715-
729+
*:range-closed-fold*
730+
コンマの後の行番号が閉じた折り畳みにある場合、折り畳みの最後の行に調整されるた
731+
め、折り畳み全体が含まれる。
732+
733+
数値を追加する場合は、折り畳みの最後の行を調整した後に追加される。これは、これ
734+
らの行が範囲に追加で含まれることを意味する。例えば: >
735+
:3,4+2print
736+
このテキスト上だと:
737+
1 one ~
738+
2 two ~
739+
3 three ~
740+
4 four FOLDED ~
741+
5 five FOLDED ~
742+
6 six ~
743+
7 seven ~
744+
8 eight ~
745+
4 行目と 5 行目が閉じた折り畳みである場合、最終的に 3 行目から 7 行目が表示さ
746+
れる。7 は範囲内の "4" から来ており、閉じた折り畳みの終わりである 5 に調整さ
747+
れ、オフセット 2 が追加される。
748+
749+
減算の例 (あまり役に立たない): >
750+
:2,4-1print
751+
このテキスト上だと:
752+
1 one ~
753+
2 two ~
754+
3 three FOLDED~
755+
4 four FOLDED ~
756+
5 five FOLDED ~
757+
6 six FOLDED ~
758+
7 seven ~
759+
8 eight ~
760+
3 行目から 6 行目が閉じた折り畳みである場合、最終的に 2 行目から 6 行目が表示
761+
される。6 は範囲内の "4" から来ており、閉じた折り畳みの終わりである 6 に調整さ
762+
れ、1 が減算される。この場合、これはまだ閉じた折り畳みにあり、その折り畳みの最
763+
後の行である 6 が使用される。
764+
765+
*:range-pattern*
716766
{pattern} の後の "/" と "?" は、パターンとその後の項目とを区別するために必要と
717767
なる。
718768

@@ -878,9 +928,10 @@ Note: これらは文字通りに打ち込まれる、これらは特別なキ
878928
たは読み書き用のファイル名に置き換えられる。 *E495*
879929
*:<abuf>* *<abuf>*
880930
<abuf> 自動コマンドの実行時、カレントバッファの番号に置き換えられ
881-
る (":r file" と ":so file" のときにもカレントバッファの番
882-
号に置き換えられる。読み込まれているファイルはバッファ内に
883-
ない) *E496*
931+
る。すべてのイベントに設定されるわけではない。|bufnr()|
932+
参照すること。":r file" および ":so file" の場合、これはカ
933+
レントバッファであり、読み込まれるファイルはバッファ内にな
934+
い。 *E496*
884935
*:<amatch>* *<amatch>*
885936
<amatch> 自動コマンドの実行時、この自動コマンドが実行されたときのマッ
886937
チに置き換えられる。 *E497*

en/cmdline.txt

Lines changed: 63 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*cmdline.txt* For Vim version 9.0. Last change: 2022 Sep 26
1+
*cmdline.txt* For Vim version 9.0. Last change: 2023 May 20
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -517,16 +517,26 @@ example, to match only files that end in ".c": >
517517
:e *.c$
518518
This will not match a file ending in ".cpp". Without the "$" it does match.
519519

520-
The old value of an option can be obtained by hitting 'wildchar' just after
521-
the '='. For example, typing 'wildchar' after ":set dir=" will insert the
522-
current value of 'dir'. This overrules file name completion for the options
523-
that take a file name.
524-
525520
If you would like using <S-Tab> for CTRL-P in an xterm, put this command in
526521
your .cshrc: >
527522
xmodmap -e "keysym Tab = Tab Find"
528523
And this in your .vimrc: >
529524
:cmap <Esc>[1~ <C-P>
525+
< *complete-set-option*
526+
When setting an option using |:set=|, the old value of an option can be
527+
obtained by hitting 'wildchar' just after the '='. For example, typing
528+
'wildchar' after ":set dir=" will insert the current value of 'dir'. This
529+
overrules file name completion for the options that take a file name.
530+
531+
When using |:set=|, |:set+=|, or |:set^=|, string options that have
532+
pre-defined names or syntax (e.g. 'diffopt', 'listchars') or are a list of
533+
single-character flags (e.g. 'shortmess') will also present a list of possible
534+
values for completion when using 'wildchar'.
535+
536+
When using |:set-=|, comma-separated options like 'diffopt' or 'backupdir'
537+
will show each item separately. Flag list options like 'shortmess' will show
538+
both the entire old value and the individual flags. Otherwise completion will
539+
just fill in with the entire old value.
530540

531541
==============================================================================
532542
3. Ex command-lines *cmdline-lines*
@@ -617,6 +627,7 @@ followed by another Vim command:
617627
:read !
618628
:scscope
619629
:sign
630+
:tabdo
620631
:tcl
621632
:tcldo
622633
:tclfile
@@ -736,19 +747,59 @@ Line numbers may be specified with: *:range* *{address}*
736747
'T position of mark T (uppercase); when the mark is in
737748
another file it cannot be used in a range
738749
/{pattern}[/] the next line where {pattern} matches *:/*
750+
also see |:range-pattern| below
739751
?{pattern}[?] the previous line where {pattern} matches *:?*
752+
also see |:range-pattern| below
740753
\/ the next line where the previously used search
741754
pattern matches
742755
\? the previous line where the previously used search
743756
pattern matches
744757
\& the next line where the previously used substitute
745758
pattern matches
746759

760+
*:range-offset*
747761
Each may be followed (several times) by '+' or '-' and an optional number.
748762
This number is added or subtracted from the preceding line number. If the
749763
number is omitted, 1 is used. If there is nothing before the '+' or '-' then
750764
the current line is used.
751-
765+
*:range-closed-fold*
766+
When a line number after the comma is in a closed fold it is adjusted to the
767+
last line of the fold, thus the whole fold is included.
768+
769+
When a number is added this is done after the adjustment to the last line of
770+
the fold. This means these lines are additionally included in the range. For
771+
example: >
772+
:3,4+2print
773+
On this text:
774+
1 one ~
775+
2 two ~
776+
3 three ~
777+
4 four FOLDED ~
778+
5 five FOLDED ~
779+
6 six ~
780+
7 seven ~
781+
8 eight ~
782+
Where lines four and five are a closed fold, ends up printing lines 3 to 7.
783+
The 7 comes from the "4" in the range, which is adjusted to the end of the
784+
closed fold, which is 5, and then the offset 2 is added.
785+
786+
An example for subtracting (which isn't very useful): >
787+
:2,4-1print
788+
On this text:
789+
1 one ~
790+
2 two ~
791+
3 three FOLDED~
792+
4 four FOLDED ~
793+
5 five FOLDED ~
794+
6 six FOLDED ~
795+
7 seven ~
796+
8 eight ~
797+
Where lines three to six are a closed fold, ends up printing lines 2 to 6.
798+
The 6 comes from the "4" in the range, which is adjusted to the end of the
799+
closed fold, which is 6, and then 1 is subtracted, then this is still in the
800+
closed fold and the last line of that fold is used, which is 6.
801+
802+
*:range-pattern*
752803
The "/" and "?" after {pattern} are required to separate the pattern from
753804
anything that follows.
754805

@@ -804,7 +855,7 @@ always be swapped then.
804855

805856
Count and Range *N:*
806857

807-
When giving a count before entering ":", this is translated into:
858+
When giving a count before entering ":", this is translated into: >
808859
:.,.+(count - 1)
809860
In words: The "count" lines at and after the cursor. Example: To delete
810861
three lines: >
@@ -921,9 +972,10 @@ Note: these are typed literally, they are not special keys!
921972
write. *E495*
922973
*:<abuf>* *<abuf>*
923974
<abuf> When executing autocommands, is replaced with the currently
924-
effective buffer number (for ":r file" and ":so file" it is
925-
the current buffer, the file being read/sourced is not in a
926-
buffer). *E496*
975+
effective buffer number. It is not set for all events,
976+
also see |bufnr()|. For ":r file" and ":so file" it is the
977+
current buffer, the file being read/sourced is not in a
978+
buffer. *E496*
927979
*:<amatch>* *<amatch>*
928980
<amatch> When executing autocommands, is replaced with the match for
929981
which this autocommand was executed. *E497*

0 commit comments

Comments
 (0)