0

I'd like to reindent all files in a VS Code project, after changing indentation configuration. I can perfectly reindent a single file by opening it and running the Reindent Lines command. But I don't want to do that for every file in the project, as there are to many.

Is there a way to convert indentation in a whole project, e.g. by applying Reindent Lines to folders or multiple files at once?

enter image description here

starball
  • 20,030
  • 7
  • 43
  • 238
andreas
  • 16,357
  • 12
  • 72
  • 76
  • I'd like to close this as a dup of https://stackoverflow.com/q/51068247/11107541, but sadly cannot since the answer there is not upvoted or accepted. – starball Jul 04 '23 at 01:17

1 Answers1

1

You can use rioV8's extension: Command on All Files (I have no affiliation with this extension).

I found this from this Q&A: How to execute command across multiple files in VS Code?.

starball
  • 20,030
  • 7
  • 43
  • 238
  • Thank you for this suggestion, it worked. A little weird, that it visually opens each file, but it does the job. – andreas Mar 14 '23 at 20:22