Idiomatic Language – ‘On File Save’ vs ‘When the File is Saved’ vs ‘When Saving the File’

idiomatic-languagephrase-choice

The following sentences are from hypothetical manual for some text editor:

  1. To reformat the code on file save, use the "Autoformat" feature.
  2. To reformat the code when the file is saved, use the "Autoformat" feature.
  3. To reformat the code when saving the file, use the "Autoformat" feature.

Which sentence sounds more natural? I tried to find some examples on Google to make my own initial research, but all the examples that I have found are from sites that are not really creditable.

Best Answer

Option 3 ("when saving the file") sounds the most natural to me.

Strictly speaking this implies that the user who is saving the file is the one doing the reformatting; to be completely correct it should be "To have the code reformatted when saving...." But this is unnecessary. OptionĀ 3 on its own is perfectly fine.

Option 2 (again, in a very technical sense) more correct, because it does not imply that the user is the one reformatting the file. But it does not sound as good.

Option 1 may be acceptable depending on the exact context; the format OnAction is common in JavaScript, for example the OnClick and OnPageLoad event handlers. But it should not be used in everyday English.

Related Topic