How can I write to multiple lines simultaneously in Geany?
Asked Answered
T

4

6

I want to modify the beginning of every line of a txt file in Geany. Somehow it is possible to write in multiple lines at the same time (maybe with box selection?). How to do this?

Tetrameter answered 26/8, 2018 at 8:36 Comment(0)
O
4

You need to install before the plugin Extra Selection.

For my configuration (Debian/Buster, Geany 1.33) I add to configure shortcuts key. See plugin manual for more details :

Usage :

Under Tools -> Extra Selection, there are 7 new items: "Column Mode", "Select to Line", "Select to Matching Brace", "Toggle Rectangular/Stream", "Set Anchor", "Select to Anchor" and "Rectangle Select to Anchor". Normally these should be bound to keys, for example Alt-C, Alt-Shift-L, Ctrl-Shift-B, Ctrl+2, F12, Shift-F12 and Alt-Shift-F12.

Occident answered 27/8, 2018 at 6:47 Comment(0)
B
3

This is just an addition to the answer by @zaboop since the edit queue was full and many people might not have understood the solution properly.

In Geany you cannot edit different parts of multiple lines at once (like in VS Code) without using plugins. Instead what you can do is you can edit the starting of multiple lines at once.To do so:

  • Hold Shift + Alt and press your up or down arrow keys to correspondingly select the lines above or below the current line.
  • Then release Shift + Alt and continue editing the lines.
Betide answered 13/6, 2021 at 15:31 Comment(0)
E
2

No plugins needed.

Strangely, unlike the other answers, I had to press Shift + Ctrl while selecting a region, and selecting only works with the mouse, not with the keyboard. After selecting, I was able to edit multiple lines at once.

Configuration: (Debian-based) Raspberry Pi OS, accessed via VNC, Geany 1.33

Erubescent answered 14/4, 2022 at 14:52 Comment(0)
T
0

Select the region, while pressing Alt-Shift, then move around with cursor with arrows.

Tetrameter answered 26/8, 2018 at 9:1 Comment(1)
Just selects the region and when i then move around the cursor using the key arrows it unselects the region but does nothing else.Taper

© 2022 - 2024 — McMap. All rights reserved.