2

Is there a tool that can easily untabify or tabify all the source files in a Visual Studio solution?

Requirements:

  • Free.
  • Works on multiple files and recursively goes into subdirectories.
  • Changes only the leading tabs and spaces, not tabs or spaces in the middle of a source code line.
  • Does not make changes for any other reason (astyle --indent=tab for example will make changes even to lines that already start with a tab ).
2

I would recommend Notepad++ to do all sorts of heavy duty file editing. The current version, 7.0, is a new release and when you go for the 64bit flavor, and compatible plugins/add-ons are few, currently. Many of the plugins which do so much of the formatting for various flavors of files have not yet been updated, but still work well with the prior versions.

I have even Notepad++ as the editor for multiple development environments. Versions prior to 7.0 have dozens of plugins, a nice selection of which can indent/re-indent/tab convert/restructure source code and other formatted text, then even pass you edited file to a CL compiler.

Version 7 has a convert tab to space right out of the box, which may be sufficient for your needs. The add-on developers are slowly getting the 64bit versions of their stuff rolled out, but it always seems to take time for what you want to be released. :-(

  • I want to do it on multiple files though, not only on the currently selected file. – sashoalm Sep 28 '16 at 6:34
  • Press Ctrl-Shift-F to go to Find in Files dialog. This way you can search and replace on all files (or those with a certain extension). – Michael S. Mar 27 '17 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.