How do I convert tabs to spaces in Notepad++?
I found a webpage that suggests it's possible, but I couldn't find any information about how to do it.
I would like to be able to do that, because some web forms don't respect code with tabs in them.
How do I convert tabs to spaces in Notepad++?
I found a webpage that suggests it's possible, but I couldn't find any information about how to do it.
I would like to be able to do that, because some web forms don't respect code with tabs in them.
If you happen to work in a Unix environment, the expand command is what you need:
Settings
->
Preference->
Edit Components (tab)->
Tab Setting (group)->
Replace by spaceIn version 5.6.8 (and above):
Settings
->
Preferences...->
Language Menu/Tab Settings->
Tab Settings (group)->
Replace by spaceI follow this simple way:
ctrl + F
(Find/repace
).Find What:
field. But don't worry.space
inReplace With:
field.Replce All
.Done! :)
See:
Note: This method applies to reverse (Replace a space by a tab) case too.
You need to replace
\t
- make sure you use extended mode!The easy way:
To convert existing tabs to spaces, press
Edit->Blank Operations->TAB to Space
.If in the future you want to enter spaces instead of tab when you press tab key:
Settings->Preferences...->Language
(since version 7.1) orSettings->Preferences...->Tab Settings
(previous versions)Replace by space
Tab size
field.