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
\x1F
as a temporary character, while executing theTextFX
Line 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 expression
andIn selection
options 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 expression
andIn selection
options 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
\r
or\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!