File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 1- *editing.txt* For Vim バージョン 9.1. Last change: 2024 Oct 13
1+ *editing.txt* For Vim バージョン 9.1. Last change: 2024 Oct 14
22
33
44 VIMリファレンスマニュアル by Bram Moolenaar
@@ -1053,6 +1053,15 @@ Vimは別の場所で変更を受けたファイルを上書きしようとし
10531053バックアップファイルの生成に失敗すると、書き込みは行われない。それでも書き込み
10541054たいときにはコマンドに '!' を追加すること。
10551055
1056+ *file-watcher*
1057+ バッファが書き込まれたときに動作するプログラム (inotify、entr、fswatch のよう
1058+ な) や、外部アプリケーションが Vim を実行してファイルを編集する (gitのような)
1059+ ときに、それらのプログラムが元のファイルが変更されたことに気付かないような問題
1060+ に気付いた場合は、'backupcopy' オプションの値を "yes" に切り替えることを検討す
1061+ ること。これにより、Vim は新しいファイルを作成 (ファイルが変更されたことを検出
1062+ できなくなる) せずに、それらのウォッチャープログラムが期待する同じファイルに書
1063+ き込む。| crontab | も参照。
1064+
10561065 *write-permissions*
10571066新しいファイルを書き込むときは読み書きの権限が付く。unix ではマスクの値は
105810670o666 に umask を適用させたものになる。Vim で開いたファイルに書き込むときは権
Original file line number Diff line number Diff line change 1- *editing.txt* For Vim version 9.1. Last change: 2024 Oct 13
1+ *editing.txt* For Vim version 9.1. Last change: 2024 Oct 14
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1058,6 +1058,15 @@ explanation of when the copy is made and when the file is renamed.
10581058If the creation of a backup file fails, the write is not done. If you want
10591059to write anyway add a '!' to the command.
10601060
1061+ *file-watcher*
1062+ When you notice issues with programs, that act upon when a buffer is written
1063+ (like inotify, entr or fswatch) or when external applications execute Vim to
1064+ edit the file (like git) and those programs do not seem to notice that the
1065+ original file has been changed, you may want to consider switching the
1066+ 'backupcopy' option value to "yes". This makes sure, Vim writes to the same
1067+ file, that those watcher programs expect, without creating a new file (which
1068+ prevents them from detecting that the file has changed). See also | crontab |
1069+
10611070 *write-permissions*
10621071When writing a new file the permissions are read-write. For unix the mask is
106310720o666 with additionally umask applied. When writing a file that was read Vim
You can’t perform that action at this time.
0 commit comments