Right Justifying Paragraphs
-
Thanks a lot; I just tried your steps and they work pretty well.
If anyone else wants to try it, be sure to use the **numeric **keypad to enter 031.
I will try (?-i)(?<!\bconst)\x20+ later on. And after that will brush up on my regular expressions :)
Appreciate your time!
Hoji
-
Hi, @hoji-afzal and All,
In my previous post, I used the control character
\x1Fas a temporary character, while executing theTextFXLine up option.Of course, this is not a mandatory step ! You may, as well, use any symbol, which is NOT part of your block selection, yet ;-)). So, for instance, with your initial block of text :
public byte PUSH = 1; private const int STOP = 0; public const double SECS_TO_START = 10; public int SEPARATOR = 21;Any symbol, other than a semicolon and the equal sign, could be appropriate ;-))
With a hash symbol, for example, the main actions, with your sample text, would be :
-
Copy a single
#, in the clipboard -
Perform a first S/R, below, with
Regular expressionandIn selectionoptions ticked-
SEARCH
(?-i)(?<!\bconst)\x20+ -
REPLACE
#
-
-
Click on
TextFX > TextFX Edit > Line up multiple lines by (Clipboard Character) -
Perform a second S/R, below, with
Regular expressionandIn selectionoptions ticked-
SEARCH
# -
REPLACE
\x20( you may, also, use a simple space char, instead ! )
-
Of course, if this temporary char is a control character, other than
\ror\n, you’re quasi-certain that it is not used anywhere else, in current text or source code file !Cheers,
guy038
-
-
Got it!
Notepad++ keeps a history of your searches, which is handy for this kind of operation.
Thanks a lot.
Hoji -
Hi all,
Just an update: I have been using TextFX in the last 5 months and it does the job pretty well. Was too lazy to try the other methods members graciously provided.
Thanks!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login