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?
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.
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.
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
Select the region, while pressing Alt-Shift, then move around with cursor with arrows.
© 2022 - 2024 — McMap. All rights reserved.