问题描述
在emacs中,在诸如 comment-region
的操作之后,所选区域将自动取消选择。
有没有任何方式禁用此行为?
如果该区域被取消选择,那听起来像您必须使用。在 transient-mark-mode
中,当您执行在该区域上运行的命令时,该区域将被取消选择(特别是该标记保持不变,但不起作用)。您可以使用 Cx Cx
( exchange-point-and-mark
)重新选择该区域(重新激活标记)。 / p>
如果要完全禁用取消选择,可以关闭 transient-mark-mode
。这意味着您不会得到当前区域的任何突出显示,但如果要设置标记并突出显示该区域,则可以使用 C< SPC> C-< SPC>
或 C-u C-x C-x
。
In emacs, after an operation such as comment-region
, the selected region is automatically deselected.
Is there any way of disabling this behaviour?
If the region is deselected, that sounds like you must be using transient-mark-mode
. In transient-mark-mode
, when you execute a command that operates on the region, the region is deselected (in particular, the mark remains, but it is inactive). You can reselect the region (reactivate the mark) using C-x C-x
(exchange-point-and-mark
).
If you want to disable the deselection entirely, you can turn off transient-mark-mode
. This means that you won't get any highlighting of the current region, though if you would like to set the mark and highlight the region, you can turn on transient mark mode briefly using C-<SPC> C-<SPC>
or C-u C-x C-x
.
这篇关于Emacs:操作后选择保留区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!