this post was submitted on 30 Aug 2023
3 points (100.0% liked)

VS Code

867 readers
2 users here now

founded 2 years ago
MODERATORS
 

Hi,

I want to replace string in many files, but I the "replace all" feature trigger the formatting hook on save. I do not want this behavior. There is an option similar to "save without formatting", but for "replace all" ?

Thanks

top 3 comments
sorted by: hot top controversial new old
[–] fenouil@jlai.lu 3 points 2 years ago* (last edited 2 years ago) (1 children)

OK, 🤦‍♂️ I didn't think to simply disable the "editor.formatOnSave" option and re-enabling it after. Took me 2 sec

[–] mrsandwich@programming.dev 1 points 2 years ago (1 children)

There’s also a “Save without formatting” in the Command Palette

[–] joyjoy@lemm.ee 1 points 2 years ago

Depending on your setting, opening the command palette will trigger a save with formatting.