How can I block select in Geany?

caduceus picture caduceus · Sep 16, 2013 · Viewed 15k times · Source

I often need to select a block of text, like a leading character that occurs on many lines. LibreOffice has block selection. How can I do this in Geany?

For example, I want to remove the pipe and the space at the beginning of each line:

| Create another 'Login Role' for the 'auth' user:
| Role name: auth
| Password: auth
| Role privileges: Create database objects

Answer

paulsm4 picture paulsm4 · Sep 16, 2013

It's called "column mode editing". Look here:

Column mode editing (rectangular selections)

There is basic support for column mode editing. To use it, create a rectangular selection by holding down the Control and Shift keys (or Alt and Shift on Windows) while selecting some text. Once a rectangular selection exists you can start editing the text within this selection and the modifications will be done for every line in the selection.

It is also possible to create a zero-column selection - this is useful to insert text on multiple lines.