Skip to content

Notepad++ Column Editing

Notepad++ logo.

Spoiler alert! Column editing is super simple in Notepad++ 🤓 All you have to do is press the Alt key while selecting text. You can use either Alt+Mouse Dragging or Alt+Shift+Arrows. This works perfectly on text that is already aligned. But what if your text is not formatted as columns already? You can quickly fix that by using the TextFX plugin.

Animation showing column editing in Notepad++.

Column Editing in Notepad++ using TextFX

In this example, we want to clean up a “table”. We have created the table by separating columns with the pipe (|) character. We want to reorganize the columns, then sort the data alphabetically.

Step 1: Line Up Columns using the TextFX Plugin

1. Select the pipe (|) character that separates the “columns” and copy it to the clipboard:

Screenshot showing copying the column separator.

2. Select the text (CTRL+A) and click TextFX → TextFX Edit → Line up multiple lines by (Clipboard Character):

Screenshot showing clicking “Line up multiple lines by (Clipboard Character)”.

3. We have now lined up the text using the pipe (|) character to make it look like a table with columns:

Screenshot showing text formatted as table.

Step 2: Move and Sort Columns

4. Use Alt+Mouse Dragging or Alt+Shift+Arrows to select the “colums” you want to move:

Screenshot of selecting columns.

5. Drag the columns to the start of the first line. You can also Cut (CTRL+X) the selected columns, move the caret to the start of the first line, then Paste (CTRL+V) the columns there.

Screenshot of dragging columns.

6. Select all the text, click Edit → Line Operations → Sort Lines Lexicographically Ascending:

Screenshot of sorting lines alphabetically.

7. We have now sorted the text alphabetically by the first “columns”:

Screenshot of lines sorted alphabetically.

Summary

Do you already have text formatted as columns? Then you can edit these columns by pressing the Alt key while selecting text. You can use either Alt+Mouse Dragging or Alt+Shift+Arrows.

Do you not already have text formatted as columns? No problem! Quickly fix this first by using the Line up multiple lines by (Clipboard Character) option in the TextFX plugin.

Share or Comment?

About the Author

Professional headshot of Cathrine Wilhelmsen.Cathrine Wilhelmsen is a Microsoft Data Platform MVP, international speaker, author, blogger, organizer, and chronic volunteer. She loves data and coding, as well as teaching and sharing knowledge - oh, and sci-fi, gaming, coffee and chocolate 🤓