Skip to content

Update options.{txt,jax} #1750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions doc/options.jax
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -1196,12 +1196,14 @@ Note 1番目の形式では、行全体がオプション指定に使われる
えば全てのファイルがシンボリックリンクやハードリンクになっているソース
ツリーで便利である。変更がローカルのソースツリーに対してだけ行われ、元
のソースツリーには反映されない。
*crontab*
*crontab*
"no" と "auto" では問題が起きる場合がある。プログラムによっては、ファ
イルを開き、Vimを呼び出してそのファイルを編集させ、(ファイル区別プログ
ラムを使って) そのファイルが変更されたかどうかを調べるものがある。そう
したプログラムは新しく書き出されたファイルではなく、バックアップファイ
ルの方を調べてしまう。例としては "crontab -e" が挙げられる。
ルの方を調べてしまう。"crontab -e" は例であり、inotify のようないくつ
かの |file-watcher| デーモンも同様である。その場合は、このオプションを
切り替える必要があるだろう。

コピーの方法のときは、元のファイルの中身はいったん空になり、そこに新し
いテキストが書き込まれる。つまり、元のファイルの保護ビット、ファイル所
Expand Down Expand Up @@ -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
< カーソルが置かれているバイト数、カーソル下の文字のコード、修正フラグを
Expand Down Expand Up @@ -8749,7 +8751,9 @@ Note 1番目の形式では、行全体がオプション指定に使われる
のタイトルが復元される |X11|。

値に関数 printf 形式の '%' による書式指定が含まれているときは、
'statusline' と同じ方法で展開される。
'statusline' と同じ方法で展開される。無効な '%' 形式が含まれている場
合、値はそのまま使用され、値が設定される時にエラーや警告は表示されな
い。
'modelineexpr' がオフの場合は、モードラインでこのオプションを設定する
ことはできない。

Expand Down
13 changes: 8 additions & 5 deletions en/options.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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. >
Expand Down Expand Up @@ -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: >
Expand Down