From 65a5e2076cc3f29c169f5c16a1e0a8de76506e0e Mon Sep 17 00:00:00 2001 From: h-east Date: Tue, 15 Oct 2024 20:28:01 +0900 Subject: [PATCH 1/2] Update options.{txt,jax} --- doc/options.jax | 10 ++++++---- en/options.txt | 9 +++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/doc/options.jax b/doc/options.jax index 94841bc91..c562e9c1c 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 14 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 < カーソルが置かれているバイト数、カーソル下の文字のコード、修正フラグを diff --git a/en/options.txt b/en/options.txt index f0844e21b..40dc139b0 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 14 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. > From 98a5fbfd188a2c8395137b5ccf28bcf74814dd72 Mon Sep 17 00:00:00 2001 From: h-east Date: Thu, 17 Oct 2024 15:43:19 +0900 Subject: [PATCH 2/2] Update by original --- doc/options.jax | 6 ++++-- en/options.txt | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/options.jax b/doc/options.jax index c562e9c1c..ab0f88a92 100644 --- a/doc/options.jax +++ b/doc/options.jax @@ -1,4 +1,4 @@ -*options.txt* For Vim バージョン 9.1. Last change: 2024 Oct 14 +*options.txt* For Vim バージョン 9.1. Last change: 2024 Oct 16 VIMリファレンスマニュアル by Bram Moolenaar @@ -8751,7 +8751,9 @@ Note 1番目の形式では、行全体がオプション指定に使われる のタイトルが復元される |X11|。 値に関数 printf 形式の '%' による書式指定が含まれているときは、 - 'statusline' と同じ方法で展開される。 + 'statusline' と同じ方法で展開される。無効な '%' 形式が含まれている場 + 合、値はそのまま使用され、値が設定される時にエラーや警告は表示されな + い。 'modelineexpr' がオフの場合は、モードラインでこのオプションを設定する ことはできない。 diff --git a/en/options.txt b/en/options.txt index 40dc139b0..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 14 +*options.txt* For Vim version 9.1. Last change: 2024 Oct 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -8705,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: >