Using Geany text editor to copy column blocks of text

5 respuestas [Último envío]
andyprough
Desconectado/a
se unió: 02/12/2015

Magic Banana will probably complain that I'm not using awk, but I really like the column block text selection in geany. I'm leaving this here for my future self to remember the keyboard shortcuts.

Mouse drag block column selection - hit the left or right Ctrl key prior to dragging around a column of text. This also seems to work in most terminal emulators.

Keyboard selection - use the Alt+Shift keys on the righthand side of the keyboard. Press those keys prior to using the arrow keys or page-down or page-up to select a column block of text. If you bounce to the bottom of a document, geany may think you intended to select the entire left half of the document - just page-up again to return to your block column selection area.

andyprough
Desconectado/a
se unió: 02/12/2015

For example, here's a column block of text that is selected in a plain text file:

2022-09-23_18-45.png
Legimet
Desconectado/a
se unió: 12/10/2013

Nice. That's like the visual block mode in Vim.

andyprough
Desconectado/a
se unió: 02/12/2015

Oh, I should have thought that Vim could do it as well. Anyway, this is super fast and easy once you can find out which keys to use. It's important to only use the right-hand Alt+Shift when selecting text with the arrow keys, at least on my keyboard when I am in DWM. Might work different in different desktops and window managers.

andyprough
Desconectado/a
se unió: 02/12/2015

Oh, I just found out that Libreoffice Writer copies column blocks of text too. To go into block copy mode, put your curser where you will want to start copying from and then press Ctrl+Shift+F8. Once you have selected your block column of text you can copy it with Ctrl+C or with right-click-copy.

Libreoffice Writer stays in block copy mode, so to leave it you need to press Ctrl+Shift+F8 a second time. So Ctrl+Shift+F8 works as a block copy mode toggle, which is different from Geany, where right Alt+Shift or Ctrl+mouse-select are just one-time keyboard shortcuts.

Avron
Conectado
se unió: 08/18/2020