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

VS Code

801 readers
1 users here now

founded 1 year 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

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 1 year ago* (last edited 1 year 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 1 points 1 year ago (1 children)

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

[–] [email protected] 1 points 1 year ago

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