0
votes

I've to maintain some source code files written by another programmer. Part of the requirements is to improve readability.

Currently Tabs are used for indentation and I'm required to change all tabs to be 4 spaces.

My question is, Is there a quick and easy way to convert Tabs into spaces. A shortcut key or something else for any of notepad++ and/or Visual Studio.

(Search and replace is greatly ok but again I'm unable to enter a tab, hitting tab key moves curser to the next input box).

2

2 Answers

2
votes

In Visual Studio: Edit | Advanced | Untabifiy Selected Lines

The number of spaces converted will be determined by the settings for the file type.

I would suggest assigning a keyboard shortcut if you are going to do more than a few files.

1
votes

In Notepad++ you can use the menu => Edit => Blank Operations => TAB to Space command. Additionally, the TextFX plugin has some tab to space commands within its menu => TextFX => TextFX Edit commands.