Ulysses
Ulysses

Reputation: 6015

How to add replace tabs with 4 spaces without disturbing formatting in notepad++

I have to replace tabs with 4 spaces in my notepad++ file but this would also mean that tab indents with different space indentation in consequent lines would lose formatting. Is there any other way to do it than an extended set replace.

Upvotes: 1

Views: 6463

Answers (2)

AdrianHHH
AdrianHHH

Reputation: 14046

Select the lines to be changed then use the Notepad++ command: Menus => Edit => Blank operations => Tab to space.

Upvotes: 4

Ash
Ash

Reputation: 6035

Firstly, if you change the tab indent size by going to

Settings -> Preferences -> Tab Settings -> Tab Size

all previous tab sizes will change. If you see differently sized tab spaces, chances are npp is reading them as spaces.

To replace spaces, simply enter the number of spaces you want to replace in the Find what textbox.

To replace tabs, click the Extended (\n, \r....) option and enter \t in the Find What text box.

Upvotes: 1

Related Questions