diff --git a/doc/options.jax b/doc/options.jax index 94841bc91..ab0f88a92 100644 --- a/doc/options.jax +++ b/doc/options.jax @@ -1,4 +1,4 @@ -*options.txt* For Vim バージョン 9.1. Last change: 2024 Oct 06 +*options.txt* For Vim バージョン 9.1. Last change: 2024 Oct 16 VIMリファレンスマニュアル by Bram Moolenaar @@ -1196,12 +1196,14 @@ Note 1番目の形式では、行全体がオプション指定に使われる えば全てのファイルがシンボリックリンクやハードリンクになっているソース ツリーで便利である。変更がローカルのソースツリーに対してだけ行われ、元 のソースツリーには反映されない。 - *crontab* + *crontab* "no" と "auto" では問題が起きる場合がある。プログラムによっては、ファ イルを開き、Vimを呼び出してそのファイルを編集させ、(ファイル区別プログ ラムを使って) そのファイルが変更されたかどうかを調べるものがある。そう したプログラムは新しく書き出されたファイルではなく、バックアップファイ - ルの方を調べてしまう。例としては "crontab -e" が挙げられる。 + ルの方を調べてしまう。"crontab -e" は例であり、inotify のようないくつ + かの |file-watcher| デーモンも同様である。その場合は、このオプションを + 切り替える必要があるだろう。 コピーの方法のときは、元のファイルの中身はいったん空になり、そこに新し いテキストが書き込まれる。つまり、元のファイルの保護ビット、ファイル所 @@ -8005,7 +8007,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる 例: 'ruler' がオンのときの標準のステータス行に似せる > - :set statusline=%<%f%h%m%r%=%l,%c%V\ %P + :set statusline=%<%f\ %h%w%m%r%=%-14.(%l,%c%V%)\ %P < 同上、しかしカーソル下の文字の10/16進表現を表示する ("ga" のように) > :set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P < カーソルが置かれているバイト数、カーソル下の文字のコード、修正フラグを @@ -8749,7 +8751,9 @@ Note 1番目の形式では、行全体がオプション指定に使われる のタイトルが復元される |X11|。 値に関数 printf 形式の '%' による書式指定が含まれているときは、 - 'statusline' と同じ方法で展開される。 + 'statusline' と同じ方法で展開される。無効な '%' 形式が含まれている場 + 合、値はそのまま使用され、値が設定される時にエラーや警告は表示されな + い。 'modelineexpr' がオフの場合は、モードラインでこのオプションを設定する ことはできない。 diff --git a/en/options.txt b/en/options.txt index f0844e21b..075d3ee5e 100644 --- a/en/options.txt +++ b/en/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 9.1. Last change: 2024 Oct 06 +*options.txt* For Vim version 9.1. Last change: 2024 Oct 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1151,12 +1151,13 @@ A jump table for the options with a short description can be found at |Q_op|. useful for example in source trees where all the files are symbolic or hard links and any changes should stay in the local source tree, not be propagated back to the original source. - *crontab* + *crontab* One situation where "no" and "auto" will cause problems: A program that opens a file, invokes Vim to edit that file, and then tests if the open file was changed (through the file descriptor) will check the backup file instead of the newly created file. "crontab -e" is an - example. + example, as are several |file-watcher| daemons like inotify. In that + case you probably want to switch this option. When a copy is made, the original file is truncated and then filled with the new text. This means that protection bits, owner and @@ -7969,7 +7970,7 @@ A jump table for the options with a short description can be found at |Q_op|. Examples: Emulate standard status line with 'ruler' set > - :set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P + :set statusline=%<%f\ %h%w%m%r%=%-14.(%l,%c%V%)\ %P < Similar, but add ASCII value of char under the cursor (like "ga") > :set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P < Display byte count and byte value, modified flag in red. > @@ -8704,7 +8705,9 @@ A jump table for the options with a short description can be found at |Q_op|. be restored if possible, see |X11|. When this option contains printf-style '%' items, they will be - expanded according to the rules used for 'statusline'. + expanded according to the rules used for 'statusline'. If it contains + an invalid '%' format, the value is used as-is and no error or warning + will be given when the value is set. This option cannot be set in a modeline when 'modelineexpr' is off. Example: >