diff --git a/doc/popup.jax b/doc/popup.jax index 757ee1a48..77b986d7b 100644 --- a/doc/popup.jax +++ b/doc/popup.jax @@ -1,4 +1,4 @@ -*popup.txt* For Vim バージョン 8.2. Last change: 2020 Jul 27 +*popup.txt* For Vim バージョン 8.2. Last change: 2021 Feb 06 VIMリファレンスマニュアル by Bram Moolenaar @@ -102,7 +102,7 @@ Exコマンドの出力のために画面がスクロールアップすると、 通常、ポップアップウィンドウを作成したプラグインは、それを閉じることも担当す る。何らかの理由でポップアップが表示される場合は、次のコマンドですべてを閉じる ことができる: > - call popup_clear() + call popup_clear(1) 通知などの一部のポップアップは、指定した時間が経過すると閉じる。これは、 `popup_create()` の "time" プロパティで設定できる。 それ以外の場合は、右上隅の X をクリックするか、ポップアップ内の任意の場所をク @@ -312,11 +312,12 @@ popup_dialog({what}, {options}) *popup_dialog()* popup_filter_menu({id}, {key}) *popup_filter_menu()* ポップアップに使用できるフィルタ。これらのキーが使用できる: - j 下の項目を選択する - k 上の項目を選択する + j 下の項目を選択する + k 上の項目を選択する 現在の選択を受け入れる x Esc CTRL-C メニューをキャンセルする 他のキーは無視される。 + 常に |v:true| を返す。 行をハイライトするためにマッチがセットされる。|popup_menu()| を参照。 @@ -591,8 +592,6 @@ POPUP_CREATE() の引数 *popup_create-arguments* 自分で新しいバッファを作成したい場合は、|bufadd()| を使用して、バッファ番号を popup_create() に渡す。 -端末ウィンドウのバッファを使用することはできない。 *E278* 隠した状態の端末バッ -ファを作ってポップアップウィンドウに使うことができる。 |popup_create()| の第2引数は任意の辞書である: line ポップアップを配置する画面の行。数値または、カーソルの @@ -624,7 +623,8 @@ popup_create() に渡す。 する。削除するには空の文字列を使用すること。 |popup-textprop-pos| を参照。 textpropwin テキストプロパティを検索するウィンドウ。省略または無効 - な場合、現在のウィンドウが使用される。 + な場合、現在のウィンドウが使用される。"textprop" が指 + 定された場合に使用される。 textpropid "textprop" が指定された場合にテキストプロパティを識別 するために使用される。0 を使用してリセットする。 fixed FALSE (デフォルト)の場合は: @@ -705,9 +705,9 @@ popup_create() に渡す。 'encoding' が "utf-8" かつ 'ambiwidth' が "single" の ときはデフォルトで2重線が使われる。それ以外の場合は ASCII文字が使われる。 - scrollbar 0 以外: テキストが収まらない場合にスクロールバーを表示 - する。0: スクロールバーを表示しない。デフォルトは 0以 - 外である。|popup-scrollbar| も参照。 + scrollbar 1か true: テキストが収まらない場合にスクロールバーを + 表示する。0: スクロールバーを表示しない。デフォルトは + 0以外である。|popup-scrollbar| も参照。 scrollbarhighlight スクロールバー用のハイライトグループ名。背景色が重 要である。指定しない場合、PmenuSbar が使用される。 thumbhighlight スクロールバーのつまみ用のハイライトグループ名。背景色 @@ -898,11 +898,22 @@ zindex を持つポップアップウィンドウのフィルタが最初に呼 Vimは標準のフィルタ |popup_filter_menu()| と |popup_filter_yesno()| を提供す る。 +キーは `:normal` からフィルターをすり抜けないでくる。これは "cursorline" が設 +定されているならポップアップ内でカーソルを動かすことに使える: > + call win_execute(winid, 'normal! 10Gzz') +キーが `feedkeys()` からならフィルターをすり抜けてくる。 + Note "x" はポップアップを閉じる通常の方法である。Escを使いたくなるかもしれない が、多くのキーはEsc文字で始まるので、VimがEscキーを認識するまでに時間がかかる ことがある。Escを使用する場合は、'ttimeoutlen' オプションを 100 に設定し、 'timeout' または 'ttimeout'、あるいはその両方を設定することを薦める。 + *popup-filter-errors* +フィルター関数は、たとえば名前が正しくないなどで、呼ばれないことがあり、その時 +はポップアップは閉じられる。フィルターが原因のエラーの時は0を返す。もしある行 +で3度発生したらポップアップは閉じられる。ポップアップでの呼び出しでエラーが10% +未満であるなら、閉じられない。 + ポップアップコールバック *popup-callback* diff --git a/doc/print.jax b/doc/print.jax index 38aed776a..3fafb0b03 100644 --- a/doc/print.jax +++ b/doc/print.jax @@ -1,4 +1,4 @@ -*print.txt* For Vim バージョン 8.2. Last change: 2019 Dec 17 +*print.txt* For Vim バージョン 8.2. Last change: 2020 Aug 15 VIMリファレンスマニュアル by Bram Moolenaar diff --git a/doc/quickfix.jax b/doc/quickfix.jax index 37f3ed801..cd81b6734 100644 --- a/doc/quickfix.jax +++ b/doc/quickfix.jax @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim バージョン 8.2. Last change: 2020 May 31 +*quickfix.txt* For Vim バージョン 8.2. Last change: 2021 Feb 05 VIMリファレンスマニュアル by Bram Moolenaar @@ -966,6 +966,13 @@ Note: 検索結果へのリンク一覧を開くには |:copen| (|:lgrep| なら 'smartcase' は適用されない。 {pattern} が空のときは(つまり // が指定されたときは)、 最後に使われた検索パターンが使用される。|last-pattern| + + |QuickFixCmdPre| と |QuickFixCmdPost| がトリガーされ + る。 + マッチのために開かれたファイルはバッファ番号を使用する + が、バッファ番号の消費を避けるために、可能であれば再利 + 用される。 + :{count}vim[grep] ... このコマンドの前に数字が置かれると、その数が検索する マッチの最大数となる。":1vimgrep pattern file" とする diff --git a/doc/quickref.jax b/doc/quickref.jax index 3c1f08c49..9db9da418 100644 --- a/doc/quickref.jax +++ b/doc/quickref.jax @@ -1,4 +1,4 @@ -*quickref.txt* For Vim バージョン 8.2. Last change: 2020 Jun 10 +*quickref.txt* For Vim バージョン 8.2. Last change: 2020 Aug 15 VIMリファレンスマニュアル by Bram Moolenaar diff --git a/doc/recover.jax b/doc/recover.jax index 937b17dfb..bbb7c914d 100644 --- a/doc/recover.jax +++ b/doc/recover.jax @@ -1,4 +1,4 @@ -*recover.txt* For Vim バージョン 8.2. Last change: 2020 May 09 +*recover.txt* For Vim バージョン 8.2. Last change: 2020 Aug 15 VIMリファレンスマニュアル by Bram Moolenaar @@ -64,8 +64,8 @@ Vimは変更した箇所をスワップファイルに蓄える。編集を開 れを避けようとするが)。 これによって偽の注意メッセージが表示される。 - あなたがホームディレクトリで作業をしていて、他の誰かが同じファイルを編集しよ - うとしたとき、その人はあなたのスワップファイルに気づかないし、注意のメッセー - ジも表示されない。 + うとしたとき、そのユーザーはあなたのスワップファイルに気づかないし、注意の + メッセージも表示されない。 Amigaでは、回復可能なramディスクを使えるが、それが100%働くという保証はない。 スワップファイルを通常のramディスク(AmigaではRAM:など)に置いたり、リブートに よって消されてしまう場所(Unixの/tmpなど)に置くことは無意味であり、クラッシュに diff --git a/doc/repeat.jax b/doc/repeat.jax index ee6b00b48..81569bb59 100644 --- a/doc/repeat.jax +++ b/doc/repeat.jax @@ -1,4 +1,4 @@ -*repeat.txt* For Vim バージョン 8.2. Last change: 2020 May 14 +*repeat.txt* For Vim バージョン 8.2. Last change: 2021 Jan 23 VIMリファレンスマニュアル by Bram Moolenaar @@ -269,6 +269,9 @@ Vim script の書き方はユーザーマニュアルの41章|usr_41.txt|を参 く場合は便利である。追加されたプラグインは初期化時に読 み込まれる。|load-plugins|を参照。また|pack-add|も参照。 {|+eval| 機能付きでコンパイルされたときのみ有効} + Note ftdetect スクリプトがロードされるようにするには、 + `filetype plugin indent on` を全ての `packadd!` よりも + 「後に」書く必要がある。 *:packl* *:packloadall* :packl[oadall][!] 'packpath' 以下の "start" ディレクトリ中の全パッケージ @@ -344,6 +347,16 @@ Vim script の書き方はユーザーマニュアルの41章|usr_41.txt|を参 しいバージョンに更新する必要がある。バージョン間の変更 点については |vimscript-version| を参照。 +:vim9s[cript] [noclear] *:vim9s* *:vim9script* + |Vim9-script| のコマンドがスクリプトファイルに含まれる + ことをマークする。|vim9-namespace| も参照。 + ファイルの先頭のコマンドである必要がある。 + [noclear] については |vim9-reload| を参照。 + |+eval| 機能がない場合、これは一部のコマンドの文法を変 + 更する。 + Vim9 の文法と方式で単一コマンドを実行するには + |:vim9cmd| を参照。 + *:scr* *:scriptnames* :scr[iptnames] 読み込まれているスクリプトを読み込まれた順番どおりに 全て表示する。数字はスクリプトのID(識別子)||に使 @@ -633,10 +646,10 @@ Filetype プラグインはファイルタイプに複数のプラグインが パッケージとして配布する1つ以上のプラグインを記述していることを前提とする。 -2つの無関係なプラグインがある場合は、2つのパッケージを使用するので、Vimユー -ザーはそのパッケージに含まれるものを選択できる。あるいは、オプションのプラグイ -ンで1つのパッケージを使用し、`:packadd` で必要なプラグインを追加するようにユー -ザーに指示することもできる。 +2つの無関係なプラグインがある場合、2つのパッケージを使用することで、Vimユーザー +はどれを含めてどれを含めないかを選択できるようになる。あるいは、両プラグインを +オプショナルとして1つのパッケージにし、`:packadd` で望みのプラグインを追加する +ようユーザーに指示することもできる。 パッケージの配布方法を決める。アーカイブを作成することも、リポジトリを使用する こともできる。より多くのユーザーがアーカイブを使用できるが、新しいバージョンに @@ -873,8 +886,9 @@ NOTE: デバッグモードは未完成である。デバッグはVimの動作 breakadd file */explorer.vim ".../plugin/explorer.vim" だけに一致する。 -関数名のパターン検査は ":function" で表示される名前に対して行われる。ローカル -関数には "99_" といったものが前に付くということである。 +関数名のパターン検査は ":function" で表示される名前に対して行われる。しかしな +がら、ローカル関数ではスクリプトのIDを知らずともスクリプトローカル関数との照合 +が容易にできるようにスクリプト固有の "99_" のような接頭辞は無視される。 Note 関数はまず読み込まれ、後で実行される。読み込まれたときに "file" ブレーク ポイントがチェックされ、実行されるときに "func" ブレークポイントがチェックされ @@ -931,10 +945,10 @@ Note 関数はまず読み込まれ、後で実行される。読み込まれた プロファイリングとは、関数やスクリプトの実行にかかる時間を計測することである。 これを行うには |+profile| 機能が必要である。 -この機能は "huge" 機能つきでコンパイルしたときだけ含まれる。 +この機能は "huge" 機能つきでコンパイルしたときに含まれる。 また、関数 |reltime()| を使っても時間を計測できる。この関数には |+reltime| 機 -能だけが必要である。これは "huge" 以外でもしばしばついてくる。 +能だけが必要である。これは "huge" 以外の多くのビルドについてくる。 シンタックスハイライトのプロファイリングについては |:syntime| を参照せよ。 @@ -982,8 +996,12 @@ Note 関数はまず読み込まれ、後で実行される。読み込まれた は |:breakdel| を参照。 最初は常に ":profile start fname" コマンドで始めなければならない。結果のファイ -ルは Vim が終了するときに書き出される。次に出力の例を挙げる。説明のために行番 -号が行頭についている: +ルは Vim が終了するときに書き出される。例えば、特定の1つの関数のプロファイルな +らば: > + profile start /tmp/vimprofile + profile func MyFunc + +次に出力の例を挙げる。説明のために行番号が行頭についている: 1 FUNCTION Test2() ~ 2 Called 1 time ~ diff --git a/doc/windows.jax b/doc/windows.jax index b4d53f91d..eb6373234 100644 --- a/doc/windows.jax +++ b/doc/windows.jax @@ -1,4 +1,4 @@ -*windows.txt* For Vim バージョン 8.2. Last change: 2020 May 10 +*windows.txt* For Vim バージョン 8.2. Last change: 2021 Feb 06 VIMリファレンスマニュアル by Bram Moolenaar @@ -144,10 +144,11 @@ Note: ステータス行が反転表示されるはずが反転表示されな られる。 *filler-lines* -ウィンドウ内の最後のバッファ行の後の行は、フィラー行と呼ばれる。これらの行はチ -ルダ (~) 文字で始まる。デフォルトでは、これらの行は NonText (|hl-Nontext|) と -してハイライトされる。EndOfBuffer ハイライトグループ (|hl-EndOfBuffer|) を使用 -して、フィラー行のハイライトを変更することができる。 +ウィンドウ内の最後のバッファ行の後の行は、フィラー行と呼ばれる。デフォルトで +は、これらの行はチルダ (~) 文字で始まる。'fillchars' オプション内の 'eob' 項目 +で使用する文字を変更することができる。デフォルトでは、これらの文字は NonText +(|hl-Nontext|) としてハイライトされる。EndOfBuffer ハイライトグループ +(|hl-EndOfBuffer|) を使用して、フィラー文字のハイライトを変更することができる。 ============================================================================== 3. ウィンドウのオープンとクローズ *opening-window* *E36* @@ -214,16 +215,12 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N* この動作は、はじめに ":split"、次に ":enew" コマンドを実行した 場合と同じ動作である。 -:[N]vne[w] [++opt] [+cmd] [file] *:vne* *:vnew* - |:new|と同様だが、垂直分割する。'equalalways' がセットされ、 - 'eadirection' が "ver" でないならば、幅が指定されない限りウィ - ンドウは水平に広げられる。 - :[N]new [++opt] [+cmd] {file} :[N]sp[lit] [++opt] [+cmd] {file} *:split_f* 新しいウィンドウを作成し、そのウィンドウでファイル {file} の編 - 集が始まる。この動作は、はじめに ":split"、次に ":e" コマンド - を実行した場合と同じ動作である。 + 集が始まる。この動作は、はじめに ":split"、次に ":edit" コマン + ドを実行した場合とほぼ同じ動作であるが、元々のウィンドウに + {file} を代替ファイル名として設定する。 [+cmd] が指定された場合は、ファイルをロードしコマンドを実行す る |+cmd|。 |++opt| も参照のこと。 @@ -232,6 +229,11 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N* レントウィンドウの高さは低くなる。('equalalways' オプションが セットされていれば他のウィンドウも低くなる) +:[N]vne[w] [++opt] [+cmd] [file] *:vne* *:vnew* + |:new|と同様だが、垂直分割する。'equalalways' がセットされ、 + 'eadirection' が "ver" でないならば、幅が指定されない限りウィ + ンドウは水平に広げられる。 + :[N]sv[iew] [++opt] [+cmd] [file] *:sv* *:sview* *splitview* ":split" と同じ。ただし、バッファに対して 'readonly' オプショ ンがセットされる。 @@ -974,13 +976,13 @@ CTRL-W g } *CTRL-W_g}* 関する情報を自動的に表示させることができる。これは |:ptag| コ マンドを使うほど賢くないが、tags ファイルが必要なく、システム インクルードファイル内のマッチを見つけることもできる。例: > - :au! CursorHold *.[ch] nested exe "silent! psearch " . expand("") + :au! CursorHold *.[ch] ++nested exe "silent! psearch " . expand("") < 注意:遅いかもしれない。 例 *CursorHold-example* - :au! CursorHold *.[ch] nested exe "silent! ptag " . expand("") + :au! CursorHold *.[ch] ++nested exe "silent! ptag " . expand("") この例では、'updatetime' に設定された時間の間カーソルが動かなければ、カーソル 下のキーワードで ":ptag" が実行される。"nested" は他の自動コマンドを実行するの @@ -993,7 +995,7 @@ CTRL-W g } *CTRL-W_g}* 見つかったタグをハイライトさせる、カーソル位置に単語がないときに ":ptag" を実 行しない、などの改良をしたものが以下の通り: > - :au! CursorHold *.[ch] nested call PreviewWord() + :au! CursorHold *.[ch] ++nested call PreviewWord() :func PreviewWord() : if &previewwindow " プレビューウィンドウ内では実行しない : return @@ -1134,10 +1136,17 @@ CTRL-W g } *CTRL-W_g}* < *:bad* *:badd* :bad[d] [+lnum] {fname} - ファイル名 {fname} をバッファリストに追加する。ただし、メモリ - 上には読み込まれない。"lnum" が指定された場合、バッファに初め - て移動したときにカーソルが指定された行番号にジャンプする。+ 以 - 降の他のコマンドは無視されることに注意。 + ファイル名 {fname} をバッファリストに追加する。ただしメモリ上 + には読み込まず、リストもされない。そのバッファが以前に削除さ + れ、かつ、ワイプされていないなら、再度リストされる。 + "lnum" が指定された場合、バッファに初めて移動したときにカーソ + ルが指定された行番号にジャンプする。Note + 以降の他のコマンド + は無視される。 + + *:balt* +:balt [+lnum] {fname} + `:badd` と同様に現在のウィンドウに {fname} を代替ファイル名と + して設定する。 :[N]bd[elete][!] *:bd* *:bdel* *:bdelete* *E516* :bd[elete][!] [N] diff --git a/en/popup.txt b/en/popup.txt index 8a0f2ba51..e7209c4e3 100644 --- a/en/popup.txt +++ b/en/popup.txt @@ -1,4 +1,4 @@ -*popup.txt* For Vim version 8.2. Last change: 2020 Jul 27 +*popup.txt* For Vim version 8.2. Last change: 2021 Feb 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -101,7 +101,7 @@ CLOSING THE POPUP WINDOW *popup-close* Normally the plugin that created the popup window is also in charge of closing it. If somehow a popup hangs around, you can close all of them with: > - call popup_clear() + call popup_clear(1) Some popups, such as notifications, close after a specified time. This can be set with the "time" property on `popup_create()`. Otherwise, a popup can be closed by clicking on the X in the top-right corner @@ -309,11 +309,12 @@ popup_dialog({what}, {options}) *popup_dialog()* popup_filter_menu({id}, {key}) *popup_filter_menu()* Filter that can be used for a popup. These keys can be used: - j select item below - k select item above + j select item below + k select item above accept current selection x Esc CTRL-C cancel the menu Other keys are ignored. + Always returns |v:true|. A match is set on that line to highlight it, see |popup_menu()|. @@ -587,8 +588,6 @@ properties. It is in one of four forms: If you want to create a new buffer yourself use |bufadd()| and pass the buffer number to popup_create(). -It is not possible to use the buffer of a terminal window. *E278* You CAN -create a hidden terminal buffer and use that one in a popup window. The second argument of |popup_create()| is a dictionary with options: line Screen line where to position the popup. Can use a @@ -621,7 +620,8 @@ The second argument of |popup_create()| is a dictionary with options: property moves. Use an empty string to remove. See |popup-textprop-pos|. textpropwin What window to search for the text property. When - omitted or invalid the current window is used. + omitted or invalid the current window is used. Used + when "textprop" is present. textpropid Used to identify the text property when "textprop" is present. Use zero to reset. fixed When FALSE (the default), and: @@ -711,7 +711,7 @@ The second argument of |popup_create()| is a dictionary with options: By default a double line is used all around when 'encoding' is "utf-8" and 'ambiwidth' is "single", otherwise ASCII characters are used. - scrollbar non-zero: show a scrollbar when the text doesn't fit. + scrollbar 1 or true: show a scrollbar when the text doesn't fit. zero: do not show a scrollbar. Default is non-zero. Also see |popup-scrollbar|. scrollbarhighlight Highlight group name for the scrollbar. The @@ -910,11 +910,22 @@ A mouse click arrives as . The coordinates can be obtained with Vim provides standard filters |popup_filter_menu()| and |popup_filter_yesno()|. +Keys coming from a `:normal` command do not pass through the filter. This can +be used to move the cursor in a popup where the "cursorline" option is set: > + call win_execute(winid, 'normal! 10Gzz') +Keys coming from `feedkeys()` are passed through the filter. + Note that "x" is the normal way to close a popup. You may want to use Esc, but since many keys start with an Esc character, there may be a delay before Vim recognizes the Esc key. If you do use Esc, it is recommended to set the 'ttimeoutlen' option to 100 and set 'timeout' and/or 'ttimeout'. + *popup-filter-errors* +If the filter function can't be called, e.g. because the name is wrong, then +the popup is closed. If the filter causes an error then it is assumed to +return zero. If this happens three times in a row the popup is closed. If +the popup gives errors fewer than 10% of the calls then it won't be closed. + POPUP CALLBACK *popup-callback* diff --git a/en/print.txt b/en/print.txt index 3f231d0fe..bbbca1d08 100644 --- a/en/print.txt +++ b/en/print.txt @@ -1,4 +1,4 @@ -*print.txt* For Vim version 8.2. Last change: 2019 Dec 17 +*print.txt* For Vim version 8.2. Last change: 2020 Aug 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -114,7 +114,7 @@ If 'printencoding' is empty or Vim cannot find the file then it will use encoding file. If Vim is unable to find a character encoding file then it will use the "latin1" print character encoding file. -When 'encoding' is set to a multi-byte encoding, Vim will try to convert +When 'encoding' is set to a multibyte encoding, Vim will try to convert characters to the printing encoding for printing (if 'printencoding' is empty then the conversion will be to latin1). Conversion to a printing encoding other than latin1 will require Vim to be compiled with the |+iconv| feature. @@ -269,7 +269,7 @@ Japanese text you would do the following; > :set printmbcharset=JIS_X_1983 If 'printmbcharset' is not one of the above values then it is assumed to -specify a custom multi-byte character set and no check will be made that it is +specify a custom multibyte character set and no check will be made that it is compatible with the value for 'printencoding'. Vim will look for a file defining the character set in the "print" directory in 'runtimepath'. @@ -304,7 +304,7 @@ printing of characters in the ASCII code range. a:yes Use ASCII character set for codes in the ASCII a:no (default) code range. -The following is an example of specifying two multi-byte fonts, one for normal +The following is an example of specifying two multibyte fonts, one for normal and italic printing and one for bold and bold-italic printing, and using Courier to print codes in the ASCII code range but using the national character set: > @@ -420,10 +420,10 @@ There are currently a number of limitations with PostScript printing: possible to get all the characters in an encoding to print by installing a new version of the Courier font family. -- Multi-byte support - Currently Vim will try to convert multi-byte characters +- Multi-byte support - Currently Vim will try to convert multibyte characters to the 8-bit encoding specified by 'printencoding' (or latin1 if it is empty). Any characters that are not successfully converted are shown as - unknown characters. Printing will fail if Vim cannot convert the multi-byte + unknown characters. Printing will fail if Vim cannot convert the multibyte to the 8-bit encoding. ============================================================================== @@ -508,7 +508,7 @@ print ASCII text using the national character set you may see some unexpected characters. If you want true ASCII code printing then you need to configure Vim to output ASCII characters for the ASCII code range with 'printmbfont'. -It is possible to define your own multi-byte character set although this +It is possible to define your own multibyte character set although this should not be attempted lightly. A discussion on the process if beyond the scope of these help files. You can find details on CMap (character map) files in the document 'Adobe CMap and CIDFont Files Specification, Version 1.0', diff --git a/en/quickfix.txt b/en/quickfix.txt index 487764873..2f34f49bf 100644 --- a/en/quickfix.txt +++ b/en/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 8.2. Last change: 2020 May 31 +*quickfix.txt* For Vim version 8.2. Last change: 2021 Feb 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1025,6 +1025,12 @@ commands can be combined to create a NewGrep command: > 'smartcase' is not used. If {pattern} is empty (e.g. // is specified), the last used search pattern is used. |last-pattern| + + |QuickFixCmdPre| and |QuickFixCmdPost| are triggered. + A file that is opened for matching may use a buffer + number, but it is reused if possible to avoid + consuming buffer numbers. + :{count}vim[grep] ... When a number is put before the command this is used as the maximum number of matches to find. Use @@ -1705,7 +1711,7 @@ special problem here is that it doesn't print information on leaving the directory and that it doesn't print the absolute path. To solve the problem with relative paths and missing "leave directory" -messages Vim uses following algorithm: +messages Vim uses the following algorithm: 1) Check if the given directory is a subdirectory of the current directory. If this is true, store it as the current directory. @@ -1938,7 +1944,7 @@ list window is: The values displayed in each line correspond to the "bufnr", "lnum", "col" and "text" fields returned by the |getqflist()| function. -For some quickfix/location lists, the displayed text need to be customized. +For some quickfix/location lists, the displayed text needs to be customized. For example, if only the filename is present for a quickfix entry, then the two "|" field separator characters after the filename are not needed. Another use case is to customize the path displayed for a filename. By default, the diff --git a/en/quickref.txt b/en/quickref.txt index 488f14292..c0a070d24 100644 --- a/en/quickref.txt +++ b/en/quickref.txt @@ -1,4 +1,4 @@ -*quickref.txt* For Vim version 8.2. Last change: 2020 Jun 10 +*quickref.txt* For Vim version 8.2. Last change: 2020 Aug 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -696,7 +696,7 @@ Short explanation of each option: *option-list* 'eventignore' 'ei' autocommand events that are ignored 'expandtab' 'et' use spaces when is inserted 'exrc' 'ex' read .vimrc and .exrc in the current directory -'fileencoding' 'fenc' file encoding for multi-byte text +'fileencoding' 'fenc' file encoding for multibyte text 'fileencodings' 'fencs' automatically detected character encodings 'fileformat' 'ff' file format used for file I/O 'fileformats' 'ffs' automatically detected values for 'fileformat' @@ -728,7 +728,7 @@ Short explanation of each option: *option-list* 'grepprg' 'gp' program to use for ":grep" 'guicursor' 'gcr' GUI: settings for cursor shape and blinking 'guifont' 'gfn' GUI: Name(s) of font(s) to be used -'guifontset' 'gfs' GUI: Names of multi-byte fonts to be used +'guifontset' 'gfs' GUI: Names of multibyte fonts to be used 'guifontwide' 'gfw' list of font names for double-wide characters 'guiheadroom' 'ghr' GUI: pixels room for window decorations 'guioptions' 'go' GUI: Which components and options are used diff --git a/en/recover.txt b/en/recover.txt index 34f7f1845..c8f3d8f4c 100644 --- a/en/recover.txt +++ b/en/recover.txt @@ -1,4 +1,4 @@ -*recover.txt* For Vim version 8.2. Last change: 2020 May 09 +*recover.txt* For Vim version 8.2. Last change: 2020 Aug 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -64,8 +64,8 @@ Disadvantages: directories (although Vim tries to avoid that by comparing the path name). This will result in bogus ATTENTION warning messages. - When you use your home directory, and somebody else tries to edit the same - file, he will not see your swap file and will not get the ATTENTION warning - message. + file, that user will not see your swap file and will not get the ATTENTION + warning message. On the Amiga you can also use a recoverable ram disk, but there is no 100% guarantee that this works. Putting swap files in a normal ram disk (like RAM: on the Amiga) or in a place that is cleared when rebooting (like /tmp on Unix) diff --git a/en/repeat.txt b/en/repeat.txt index d14e7d918..60ef9c1a0 100644 --- a/en/repeat.txt +++ b/en/repeat.txt @@ -1,4 +1,4 @@ -*repeat.txt* For Vim version 8.2. Last change: 2020 May 14 +*repeat.txt* For Vim version 8.2. Last change: 2021 Jan 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -271,6 +271,9 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. directories are added to 'runtimepath'. This is useful in your .vimrc. The plugins will then be loaded during initialization, see |load-plugins|. + Note that for ftdetect scripts to be loaded + you will need to write `filetype plugin indent on` + AFTER all `packadd!` commands. Also see |pack-add|. {only available when compiled with |+eval|} @@ -351,6 +354,16 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. Vim version, or update Vim to a newer version. See |vimscript-version| for what changed between versions. +:vim9s[cript] [noclear] *:vim9s* *:vim9script* + Marks a script file as containing |Vim9-script| + commands. Also see |vim9-namespace|. + Must be the first command in the file. + For [noclear] see |vim9-reload|. + Without the |+eval| feature this changes the syntax + for some commands. + See |:vim9cmd| for executing one command with Vim9 + syntax and semantics. + *:scr* *:scriptnames* :scr[iptnames] List all sourced script names, in the order they were first sourced. The number is used for the script ID @@ -643,7 +656,7 @@ This assumes you write one or more plugins that you distribute as a package. If you have two unrelated plugins you would use two packages, so that Vim users can choose what they include or not. Or you can decide to use one -package with optional plugins, and tell the user to add the ones he wants with +package with optional plugins, and tell the user to add the preferred ones with `:packadd`. Decide how you want to distribute the package. You can create an archive or @@ -679,7 +692,7 @@ You could add this packadd command in one of your plugins, to be executed when the optional plugin is needed. Run the `:helptags` command to generate the doc/tags file. Including this -generated file in the package means that the user can drop the package in his +generated file in the package means that the user can drop the package in the pack directory and the help command works right away. Don't forget to re-run the command after changing the plugin help: > :helptags path/start/foobar/doc @@ -888,8 +901,9 @@ matches ".../plugin/explorer.vim", ".../plugin/iexplorer.vim", etc. > matches ".../plugin/explorer.vim" and "explorer.vim" in any other directory. The match for functions is done against the name as it's shown in the output -of ":function". For local functions this means that something like "99_" -is prepended. +of ":function". However, for local functions the script-specific prefix such +as "99_" is ignored to make it easier to match script-local functions +without knowing the ID of the script. Note that functions are first loaded and later executed. When they are loaded the "file" breakpoints are checked, when they are executed the "func" @@ -944,10 +958,10 @@ OBSCURE Profiling means that Vim measures the time that is spent on executing functions and/or scripts. The |+profile| feature is required for this. -It is only included when Vim was compiled with "huge" features. +It is included when Vim was compiled with "huge" features. You can also use the |reltime()| function to measure time. This only requires -the |+reltime| feature, which is present more often. +the |+reltime| feature, which is present in more builds. For profiling syntax highlighting see |:syntime|. @@ -994,7 +1008,12 @@ For example, to profile the one_script.vim script file: > You must always start with a ":profile start fname" command. The resulting -file is written when Vim exits. Here is an example of the output, with line +file is written when Vim exits. For example, to profile one specific +function: > + profile start /tmp/vimprofile + profile func MyFunc + +Here is an example of the output, with line numbers prepended for the explanation: 1 FUNCTION Test2() ~ diff --git a/en/windows.txt b/en/windows.txt index 0f04b5694..69de9bafe 100644 --- a/en/windows.txt +++ b/en/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 8.2. Last change: 2020 May 10 +*windows.txt* For Vim version 8.2. Last change: 2021 Feb 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -138,10 +138,12 @@ status line is inverted anyway; you will only see this problem on terminals that have termcap codes for italics. *filler-lines* -The lines after the last buffer line in a window are called filler lines. -These lines start with a tilde (~) character. By default, these are -highlighted as NonText (|hl-NonText|). The EndOfBuffer highlight group -(|hl-EndOfBuffer|) can be used to change the highlighting of filler lines. +The lines after the last buffer line in a window are called filler lines. By +default, these lines start with a tilde (~) character. The 'eob' item in the +'fillchars' option can be used to change this character. By default, these +characters are highlighted as NonText (|hl-NonText|). The EndOfBuffer +highlight group (|hl-EndOfBuffer|) can be used to change the highlighting of +the filler characters. ============================================================================== 3. Opening and closing a window *opening-window* *E36* @@ -205,15 +207,12 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N* This behaves like a ":split" first, and then an ":enew" command. -:[N]vne[w] [++opt] [+cmd] [file] *:vne* *:vnew* - Like |:new|, but split vertically. If 'equalalways' is set - and 'eadirection' isn't "ver" the windows will be spread out - horizontally, unless a width was specified. - :[N]new [++opt] [+cmd] {file} :[N]sp[lit] [++opt] [+cmd] {file} *:split_f* Create a new window and start editing file {file} in it. This - behaves like a ":split" first, and then an ":e" command. + behaves almost like a ":split" first, and then an ":edit" + command, but the alternate file name in the original window is + set to {file}. If [+cmd] is given, execute the command when the file has been loaded |+cmd|. Also see |++opt|. @@ -221,6 +220,11 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N* height). Reduces the current window height to create room (and others, if the 'equalalways' option is set). +:[N]vne[w] [++opt] [+cmd] [file] *:vne* *:vnew* + Like |:new|, but split vertically. If 'equalalways' is set + and 'eadirection' isn't "ver" the windows will be spread out + horizontally, unless a width was specified. + :[N]sv[iew] [++opt] [+cmd] [file] *:sv* *:sview* *splitview* Same as ":split", but set 'readonly' option for this buffer. @@ -955,12 +959,12 @@ CTRL-W g } *CTRL-W_g}* cursor. This is less clever than using |:ptag|, but you don't need a tags file and it will also find matches in system include files. Example: > - :au! CursorHold *.[ch] nested exe "silent! psearch " . expand("") + :au! CursorHold *.[ch] ++nested exe "silent! psearch " . expand("") < Warning: This can be slow. Example *CursorHold-example* > - :au! CursorHold *.[ch] nested exe "silent! ptag " . expand("") + :au! CursorHold *.[ch] ++nested exe "silent! ptag " . expand("") This will cause a ":ptag" to be executed for the keyword under the cursor, when the cursor hasn't moved for the time set with 'updatetime'. The "nested" @@ -973,7 +977,7 @@ be found. Also see |CursorHold|. To disable this again: > A nice addition is to highlight the found tag, avoid the ":ptag" when there is no word under the cursor, and a few other things: > - :au! CursorHold *.[ch] nested call PreviewWord() + :au! CursorHold *.[ch] ++nested call PreviewWord() :func PreviewWord() : if &previewwindow " don't do this in the preview window : return @@ -1112,11 +1116,18 @@ list of buffers. |unlisted-buffer| < *:bad* *:badd* :bad[d] [+lnum] {fname} - Add file name {fname} to the buffer list, without loading it. + Add file name {fname} to the buffer list, without loading it, + if it wasn't listed yet. If the buffer was previously + deleted, not wiped, it will be made listed again. If "lnum" is specified, the cursor will be positioned at that line when the buffer is first entered. Note that other commands after the + will be ignored. + *:balt* +:balt [+lnum] {fname} + Like `:badd` and also set the alternate file for the current + window to {fname}. + :[N]bd[elete][!] *:bd* *:bdel* *:bdelete* *E516* :bd[elete][!] [N] Unload buffer [N] (default: current buffer) and delete it from