3

我设法通过(set-variable 'shift-select-mode nil). 我喜欢C-RetCUA模式的-column-selection。但是 CUA 会自动启用移位选择(但似乎不是通过变量shift-select-mode)。

  • 那么,是否有可能在 CUA 模式下禁用换档选择?
  • 或者:有没有办法专门使用 CUA 模式的列选择功能,即没有任何其他 CUA 事物?
4

3 回答 3

0

具体来说,要禁用 的移位选择,请在打开之前将cua-mode以下内容添加到您的 init 文件(例如 .emacscua-mode )中:

(setq cua-enable-cua-keys nil)
(setq cua-highlight-region-shift-only t) ;; no transient mark mode
(setq cua-toggle-set-mark nil) ;; original set-mark behavior, i.e. no transient-mark-mode

...
(cua-mode)

最初回答https://superuser.com/a/77453/223457

于 2013-05-10T17:02:46.893 回答
0

要仅从 Cua 启用矩形(列)编辑,您可以使用以下内容(来自emacs-fu

(setq cua-enable-cua-keys nil) ;; 仅适用于矩形(cua-mode t)

于 2013-05-10T18:47:03.020 回答
0

这不是一个解决方案,但仅供参考......

我注意到帮助中提到的这个变量cua-mode

cua-highlight-region-shift-only is a variable defined in `cua-base.el'.

*If non-nil, only highlight region if marked with S-<move>.
When this is non-nil, CUA toggles `transient-mark-mode' on when the region
is marked using shifted movement keys, and off when the mark is cleared.
But when the mark was set using M-x cua-set-mark, Transient Mark mode
is not turned on.

cua-mode做这个:

(setq shift-select-mode nil)
(setq transient-mark-mode (and cua-mode
               (if cua-highlight-region-shift-only
                   (not cua--explicit-region-start)
                 t))))
于 2010-12-15T23:48:30.060 回答