我经常需要选择文本块,例如出现在许多行上的前导字符。LibreOffice具有块选择功能。那么我如何在Geany中执行此操作?
例如,我想要删除每行开头的|和空格:
| Create another 'Login Role' for the 'auth' user:
| Role name: auth
| Password: auth
| Role privileges: Create database objects
我经常需要选择文本块,例如出现在许多行上的前导字符。LibreOffice具有块选择功能。那么我如何在Geany中执行此操作?
例如,我想要删除每行开头的|和空格:
| Create another 'Login Role' for the 'auth' user:
| Role name: auth
| Password: auth
| Role privileges: Create database objects
列模式编辑(矩形选择)
支持基本的列模式编辑。要使用它,请按住Control和Shift键(或Windows上的Alt和Shift键)选择文本以创建矩形选择。一旦存在矩形选择,您可以开始在该选择中编辑文本,修改将应用于选择中的每一行。
还可以创建零列选择-这对于在多行上插入文本很有用。
https://pmortensen.eu/world2/2020/03/29/using-geany/#Column_mode_blues
On Lubuntu, the keyboard shortcuts for selecting a rectangular area of text (“column mode” in UltraEdit) do not work, because they conflict with four default keyboard shortcuts in the window manager (LXDE? Openbox?),
Shift + Alt + arrow up
,Shift + Alt + arrow down
,Shift + Alt + arrow left
, andShift + Alt + arrow right
.Disable the window manager keyboard shortcuts by editing file
~/.config/openbox/lubuntu-rc.xml
near “S-A-Up”, “S-A-Down”, “S-A-Left”, and “S-A-Right”. For example, change “S-A-Up” to “S-A-Up99”, “S-A-Down” to “S-A-Down99”, “S-A-Left” to “S-A-Left99”, and “S-A-Right” to “S-A-Right99”, respectively. And add an XML comment as to why and document the original values (so they can more easily be reverted). Edit and update (without a restart required):
vi ~/.config/openbox/lubuntu-rc.xml openbox --reconfigure
It was tested with Lubuntu 18.04 (32 bit).
对我来说,关键快捷键是不同的。安装了 Extra Selection Geany 插件后,我可以使用:
Alt + Shift + C(然后使用上下箭头等箭头键移动光标;编辑文本;再次使用 Alt + Shift + C 返回“常规”编辑模式)。
更多信息在这里。
(我使用 VirtualBox 和 Xubuntu 16.04.4 LTS(Windows 10 主机)。)