如何在 Geany 中同时写入多行?
How can I write to multiple lines simultaneously in Geany?
我想在 Geany 中修改 txt 文件每一行的开头。不知何故可以同时写多行(也许用框选择?)。
如何做到这一点?
Select 区域,同时按住 Alt-Shift,然后使用带箭头的光标四处移动。
您需要先安装插件Extra Selection。
对于我的配置(Debian/Buster,Geany 1.33)我添加了配置快捷键。
有关详细信息,请参阅 plugin manual:
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.
这只是对@zaboop 回答的补充,因为编辑队列已满,许多人可能没有正确理解解决方案。
在 Geany 中,您不能在不使用插件的情况下一次编辑多行的不同部分(就像在 VS Code 中一样)。
相反,您可以在 once.To 处编辑多行的开头,这样做:
- 按住
Shift + Alt
并按向上或向下箭头键相应地 select 当前行上方或下方的行。
- 然后释放
Shift + Alt
并继续编辑这些行。
不需要插件。
奇怪的是,与其他答案不同,我必须在选择区域时按 Shift + Ctrl
,并且选择只能用鼠标,不能用键盘。选择后,我可以一次编辑多行。
配置:(Debian-based)Raspberry PiOS,通过 VNC 访问,Geany 1.33
我想在 Geany 中修改 txt 文件每一行的开头。不知何故可以同时写多行(也许用框选择?)。 如何做到这一点?
Select 区域,同时按住 Alt-Shift,然后使用带箭头的光标四处移动。
您需要先安装插件Extra Selection。
对于我的配置(Debian/Buster,Geany 1.33)我添加了配置快捷键。 有关详细信息,请参阅 plugin manual:
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.
这只是对@zaboop 回答的补充,因为编辑队列已满,许多人可能没有正确理解解决方案。
在 Geany 中,您不能在不使用插件的情况下一次编辑多行的不同部分(就像在 VS Code 中一样)。 相反,您可以在 once.To 处编辑多行的开头,这样做:
- 按住
Shift + Alt
并按向上或向下箭头键相应地 select 当前行上方或下方的行。 - 然后释放
Shift + Alt
并继续编辑这些行。
不需要插件。
奇怪的是,与其他答案不同,我必须在选择区域时按 Shift + Ctrl
,并且选择只能用鼠标,不能用键盘。选择后,我可以一次编辑多行。
配置:(Debian-based)Raspberry PiOS,通过 VNC 访问,Geany 1.33