Column selection is one of those features that most developers know exists but only use occasionally — until the day they discover it can collapse a 20-minute manual editing task into 15 seconds. If you've ever needed to strip a specific field from every line in a CSV, add a prefix to 50 variable names at once, or align values in a config file, column selection is the tool that makes it instant.
This guide explains what column selection is, how it differs from multi-cursor editing, how to use it across major editors, and when it's the right tool versus reaching for regex.
What Is Column Selection (and Why Is It So Useful)?
Column selection — also called rectangular selection or block selection — lets you select a rectangular region of text across multiple lines simultaneously. Instead of selecting full lines, you select a vertical slice: characters 10 through 20 on lines 5 through 40, for example.
Once you have a rectangular selection, any edit you make applies across every row in the selection at once. Type a word and it appears on every selected line, replacing the selected text on each. Press Delete and it removes the selected column of characters on every line. This is conceptually different from multi-cursor editing because the shape of the selection is geometric — it's a rectangle — rather than a set of independent cursor positions.
The most common use cases where column selection saves significant time:
- Removing a fixed-width field from structured data. Log files, fixed-width exports, and legacy data formats often have timestamps or codes in the same character positions on every line. Column-select the column and delete it.
- Adding a prefix or suffix to every line in a range. Select a zero-width column at the start of 30 lines and type — the text appears at the beginning of each one.
- Extracting a column from a space-aligned file. Select the second word of a right-aligned config file across all lines and copy it to a new buffer.
- Aligning values in configuration files. Select the value column, delete it, and type the replacement aligned correctly.
- Editing CSV-like data without a spreadsheet. Select and replace a specific column position without opening Excel.
The key insight is that column selection treats your file as a two-dimensional grid, not just a sequence of characters. That mental model unlocks a class of transformations that line-based editing and even regex struggle to express cleanly.
Column Selection vs Multi-Cursor: What's the Difference?
Column selection and multi-cursor editing are related but distinct. Developers often conflate them because both let you type on multiple lines simultaneously. The difference matters when your lines are not uniformly structured.
Column selection always selects a strict rectangle. Line 5, characters 3–8. Line 6, characters 3–8. Line 7, characters 3–8. The horizontal extent is identical on every row. This is ideal when your data is positionally aligned — fixed-width columns, aligned config values, tabular text.
Multi-cursor editing places independent cursors at arbitrary positions. Cursor 1 might be at the end of line 5. Cursor 2 might be after the third word on line 12. Cursor 3 might be in the middle of a string on line 20. You can then type and all three cursors simultaneously insert the same text. This is ideal when the positions you want to edit share a logical relationship (like all being at the end of a certain kind of statement) but not a positional one.
In practice: use column selection when your data is visually aligned. Use multi-cursor when you're editing based on patterns that regex find-and-replace can identify but aren't positionally regular.
Some editors (including ZITEXT and VS Code) blur the line between these: activating column selection across lines of unequal length creates cursors at the end of each shorter line rather than strictly at the column position. This is generally the right behavior and makes column selection work gracefully on real-world irregular data.
How to Use Column Selection in ZITEXT
ZITEXT uses the Monaco editor engine, which has excellent column selection support built in. There are three ways to activate it:
Method 1: Middle Mouse Button Drag
Hold the middle mouse button and drag to select a rectangular region. This is the fastest method when you're working primarily with a mouse.
Method 2: Alt+Shift+Mouse Drag (Windows/Linux) or Option+Shift+Drag (macOS)
Hold Alt+Shift (Windows/Linux) or Option+Shift (macOS) and click-drag with the left mouse button. This draws a rectangular selection box over the text you drag across.
Method 3: Keyboard (Column Expansion)
Position your cursor at the top-left of the region you want. Then hold Shift+Alt and press the Down arrow to extend the selection downward one line at a time, keeping the same column position. Add Left or Right arrow keys to also expand horizontally. On macOS, use Shift+Option+Arrow.
Once you have a column selection active in ZITEXT, you can:
- Type to replace the selection on all lines simultaneously
- Press
DeleteorBackspaceto remove the selected column - Press
Ctrl+Cto copy the rectangular block - Press
Ctrl+Xto cut it - Use
Ctrl+Vto paste — if your clipboard contains a multi-line block, it pastes one line per cursor
Tip: After activating column selection in ZITEXT, you have full multi-cursor capability. You can press End to move all cursors to the end of their respective lines, or Home to the beginning. The selection converts to independent cursors once you start moving.
Column Selection Shortcuts Across Editors
| Action | ZITEXT | VS Code | Sublime Text | Notepad++ |
|---|---|---|---|---|
| Column drag (mouse) | Alt+Shift+Drag | Alt+Shift+Drag | Right-click+Drag | Alt+Drag |
| Expand column down | Shift+Alt+Down | Shift+Alt+Down | Ctrl+Shift+Down | Shift+Alt+Down |
| Expand column up | Shift+Alt+Up | Shift+Alt+Up | Ctrl+Shift+Up | Shift+Alt+Up |
| Add cursor below | Ctrl+Alt+Down | Ctrl+Alt+Down | Ctrl+Shift+Down | Not supported |
| Select all occurrences | Ctrl+Shift+L | Ctrl+Shift+L | Ctrl+Shift+L / Alt+F3 | Plugin only |
| Middle mouse column drag | Supported | Not supported | Not supported | Supported |
macOS users: replace Ctrl with Cmd, and Alt with Option in the shortcuts above, except for column selection shortcuts which use Option directly.
Practical Examples: Real Tasks Made Easy with Column Selection
Example 1: Stripping Timestamps from Log Lines
Imagine a log file where every line starts with a 23-character timestamp:
2026-04-08T14:32:01.441Z [INFO] Server started on port 8080
2026-04-08T14:32:01.887Z [INFO] Database connection established
2026-04-08T14:32:02.003Z [WARN] Cache miss for key user:4821
2026-04-08T14:32:02.119Z [ERROR] Failed to load config file
To strip all timestamps: position cursor at the start of line 1, column 1. Use Shift+Alt+Down three times to extend the column selection down four lines. Then use Shift+End — no, instead, hold Shift+Alt+Right 25 times to select through the timestamp and trailing spaces, or simply use Shift+Alt+Drag with the mouse to paint over the timestamp column. Press Delete. Done.
Example 2: Adding a CSS Class Prefix
You have a list of class names you need to prefix with btn-:
primary
secondary
danger
warning
success
Column-select the zero-width position at the start of all five lines (position cursor at line 1, column 1, then Shift+Alt+Down four times). Now type btn-. It appears at the beginning of every line simultaneously.
Example 3: Extracting a Column from Aligned Output
Command-line tools like ps, df, and netstat produce fixed-width output. If you paste their output into ZITEXT and want to extract just the second column (say, process IDs), column selection lets you paint over exactly that column of characters across all rows and copy them to a new file.
Example 4: Replacing Values in a Config Table
In INI or TOML config files where values are aligned:
timeout = 30
max_retries = 5
pool_size = 10
batch_limit = 100
To update all values at once to a new set of numbers: column-select the value column across all four lines, then type the new values one per line (paste mode handles multi-line clipboard content across a column selection intelligently).
When to Reach for Column Selection vs Regex Find and Replace
Column selection and regex find-and-replace solve overlapping problems, but each has cases where it's clearly superior.
Reach for column selection when:
- The text you want to edit is visually aligned — it occupies the same character positions on every line.
- The edit is purely positional: delete characters 5–12 on lines 20–50.
- You're working with data that has no consistent delimiter (like fixed-width reports).
- You're adding identical text at a specific column position across many lines.
- You want to see exactly what you're editing before committing — column selection is visual and immediate.
Reach for regex find-and-replace when:
- The pattern you're matching varies in position or length across lines.
- You need to capture parts of the match and reuse them in the replacement (backreferences).
- The file is too large to scroll through and you want to target all occurrences globally.
- You're replacing something structurally (like renaming a function everywhere it appears) rather than geometrically.
- The data uses consistent delimiters (CSV commas, tab characters) where regex can address by field rather than by position.
In many workflows, column selection and regex are complementary: use regex to find and isolate a block of lines, then use column selection to edit a specific part of each of those lines. ZITEXT supports both in the same editing session without any mode-switching or plugin activation.
The goal is always to match the tool to the shape of the problem. Positional, geometric edits call for column selection. Pattern-based, structural edits call for regex. Knowing both — and knowing when to switch — is one of the clearest marks of editor proficiency.