Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Indenting by spaces using HTMLTidy in Notepad++

How do I make it so that instead of indenting my elements by multiples of 2 spaces (when formatting without wrapping is selected), HTMLTidy indents them by multiples of tabs (4 spaces long but only 1 byte in size)?

like image 827
Max Avatar asked Jul 29 '09 14:07

Max


People also ask

How do you indent lines in notepad?

Capslock + Tab to indent multiple lines at once. Highlight the text first.

How do you indent a block of text in Notepad ++?

If you select multiple lines and hit “SHIFT+Tab”, Notepad++ will dicrease line indent.

How do I change indentation in Notepad ++?

Go to the Language Menu/Tab Settings tab. The tab options are on the right-hand side. Tab/indent away, good sir! To be fair, NP++ config is hideous.

How do I arrange codes in Notepad ++?

You can use the shortcut Ctrl + Alt + Shift + B. For the other older versions, you need to navigate to Menu -> text FX -> HTML Tidy -> Tidy: Reindent XML.


1 Answers

The HTML Tidy docs say that tidy never outputs tabs. But, since you're in Notepad++, you can use TextFX Edit -> Leading space to tabs to convert the spaces that HTMLTidy gives you into tabs. Just make sure that indent-spaces is set to 4 in your config file.

The location of your config file will vary depending on how you installed notepad++ and what version you have, but its path will probably look like one of these

C:\Program Files\Notepad++\plugins\NPPTextFX\tidycfg.ini
C:\Program Files\Notepad++\plugins\Config\tidy\tidycfg.ini
like image 60
Rob Avatar answered Oct 06 '22 19:10

Rob