0

When working with a file that is regularly changing externally, a popup warning dialog is opened, asking whether to keep buffer contents (the default) or load the updated file into the buffer:

enter image description here

Is it possible to change the default button to Load File instead of OK, so a single press on Enter reloads the file?

I am aware of the autoread option, but I still want to be able to control the update.

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
ysap
  • 2,730

1 Answers1

1

To do that, you'd have to modify Vim's source code and compile your own version.

Alternatively, you can hook into the FileChangedShell event and implement your own emulation of the original dialog (with confirm()); :help FileChangedShell has all the details on that.

Ingo Karkat
  • 23,523