[分享] [email protected] 保持默认 (即: set-mark-command), [email protected] [email protected] 换绑为 multiple-cursors 里的 set-rectangular-region-anchor

使用下面的代码即可.

(add-hook 'activate-mark-hook '(lambda ()
                                 (local-set-key (kbd "[email protected]") 'set-rectangular-region-anchor)
                                 ))
(add-hook 'deactivate-mark-hook '(lambda ()
                                   (local-unset-key (kbd "[email protected]"))
                                   ))

效果就是, 如果只俺一次 [email protected], 就是我们默认的 region 操作, 你可以 M-w 复制它, 或删除它, 等等. 但是如果同时按两次 [email protected] [email protected], 就是 set-rectangular-region-anchor 了.