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
2
2
3
3
4
4
VIMリファレンスマニュアル by Bram Moolenaar
@@ -1053,6 +1053,15 @@ Vimは別の場所で変更を受けたファイルを上書きしようとし
1053
1053
バックアップファイルの生成に失敗すると、書き込みは行われない。それでも書き込み
1054
1054
たいときにはコマンドに '!' を追加すること。
1055
1055
1056
+ *file-watcher*
1057
+ バッファが書き込まれたときに動作するプログラム (inotify、entr、fswatch のよう
1058
+ な) や、外部アプリケーションが Vim を実行してファイルを編集する (gitのような)
1059
+ ときに、それらのプログラムが元のファイルが変更されたことに気付かないような問題
1060
+ に気付いた場合は、'backupcopy' オプションの値を "yes" に切り替えることを検討す
1061
+ ること。これにより、Vim は新しいファイルを作成 (ファイルが変更されたことを検出
1062
+ できなくなる) せずに、それらのウォッチャープログラムが期待する同じファイルに書
1063
+ き込む。| crontab | も参照。
1064
+
1056
1065
*write-permissions*
1057
1066
新しいファイルを書き込むときは読み書きの権限が付く。unix ではマスクの値は
1058
1067
0o666 に 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
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1058,6 +1058,15 @@ explanation of when the copy is made and when the file is renamed.
1058
1058
If the creation of a backup file fails, the write is not done. If you want
1059
1059
to write anyway add a '!' to the command.
1060
1060
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
+
1061
1070
*write-permissions*
1062
1071
When writing a new file the permissions are read-write. For unix the mask is
1063
1072
0o666 with additionally umask applied. When writing a file that was read Vim
You can’t perform that action at this time.
0 commit comments