How to Align Text using Notepad++

If you have some text that you want to align say based on space like I have below, then Notepad++ Code Alignment Plugin works wonders!

Un-aligned Text:

'Line 1'
'Line    2'
'Line   3'
'Line  4'
'Line 5'
'Line  6'
'Line     7'
'Line    8'
'Line      9'
'Line       10'

Go to Menu: Plugins > Plugin Admin... and download Code Alignment.

Code Alignment Plugin in Notepad++

Now to align the text select it and go to Plugin > code alignment > align by space.

Text Aligned by Space using Notepad++

As you can see the text got perfectly aligned by space.

Aligned Text:

'Line       1'
'Line       2'
'Line       3'
'Line       4'
'Line       5'
'Line       6'
'Line       7'
'Line       8'
'Line       9'
'Line       10'

You can choose from other options such as,

Align by equals
Align by equals equals
Align by m_
Align by quote ()
Align by period
Align by space
Align from caret
Align by key

If you have a custom alignment requirement choose the option "align by..." to choose from advanced configurations.

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap