How to Undo the "Remove Unnecessary Blank and EOL" in NotePad++

0

1

I am using Notepad++ for my coding , just used the their

Edit > Remove Unnecessary Blank and EOL

feature to remove the space and tabs and compressed the code , but how do i UnDo it ?

is there any way to get the code back to normal view/with spaces and tabs with hierarchy ?

Thanks

AMB

Posted 2014-01-08T02:35:32.090

Reputation: 193

Answers

0

Did you try Ctrl-Z to Undo it? Otherwise it has no idea what was removed or where it would need to be put back -- it can't guess. ;)

Ƭᴇcʜιᴇ007

Posted 2014-01-08T02:35:32.090

Reputation: 103 763

i meant, after saving the file and opening again the saved compressed file. – AMB – 2014-01-09T02:48:58.193

0

If you are using a language with explicit line endings such as ;, you can easily use find'n'replace with ;/n

If you have nested structures with if/endif or {} you can easily search and tab those.

The real trick is keeping track of nesting and indenting based on nested levels. I am sure there is a regex you can come up with, but honestly, you are programming: try writing a simple text process routine which reads in the file and handles your rules.

It is probably faster than googling for a plugin.

horatio

Posted 2014-01-08T02:35:32.090

Reputation: 3 345

its php file, with mixed code, html,javascript,css,php – AMB – 2014-01-09T03:13:30.373