2

from style that looks like this:

ul#menu
{
  padding: 0 0 2px;
  position: relative;
  margin: 0;
  text-align: right;
}

to:

ul#menu { padding: 0 0 2px; position: relative;  margin: 0; text-align: right; }

Is there auto plugin, or script?

5 Answers 5

12

If you have the TextFX plugin (which comes by default) select the text you wish to fix and then follow these instructions to select the appropriate TextFX function from the menu bar:

TextFX -> TextFX Edit -> Unwrap Text

Sign up to request clarification or add additional context in comments.

4 Comments

How could one extend your approach for multiple blocks?
As long as there is a blank line between the blocks then the blank line will be preserved.
Otherwise you will need to Unwrap Text then replace all instances of } with }\n.
great answer, thank you. Is there actually a shortcut for it? I cannot access the menu by alt+key.
3

Without any notepad++ plugin just select and use : CTR + J

Comments

1

Notepad++ doesn't support formatting code by default. It can be achieved using plugins. I haven't tried it myself, but Googling I found a link that explains how Notepad++ can integrate with this pay-for product that does the actual formatting, and is configurable:

http://www.sourceformat.com/

Comments

0

Not the answer you're seeking, but anyway. If you've the right to use other tools, the task will be dead simple with PSPad and its options Reformat into Structured CSS / Reformat into Inline CSS.

Comments

0

TextFX is not working for this problem. I had same problem and this solution worked for me:
Press Ctrl+H to then type } in find what text box and }\n in replace with text box and choose Extended from Search mode then press replace all. That's it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.