自定义emacs以支持ctrl + c,v,x和替换文本区域等

Mat*_*att 4 emacs

我以前有emacs设置我喜欢它的方式,直到我丢失了我的emacs配置文件.

如何自定义emacs,以便它支持CTRL + x,c,v键,如在窗口(剪切,复制粘贴),以及粘贴时,突出显示的区域被替换?

我还希望删除键的行为,以便突出显示某个区域时,它将删除该区域.它目前只删除右光标的字符.

0xA*_*xAX 9

您可以将CUA模式用于CTRL + x,c,v.- http://www.emacswiki.org/emacs/CuaMode

写在.emacs中:

(cua-mode t)
    (setq cua-auto-tabify-rectangles nil) ;; Don't tabify after rectangle commands
    (transient-mark-mode 1)               ;; No region when it is not highlighted
    (setq cua-keep-region-after-copy t) 
Run Code Online (Sandbox Code Playgroud)

如果您使用Emacs 23.1及更高版本,默认情况下,在emacs中存在cua.

  • @Matt-H CUA模式也有一个出色的矩形辅助模式.按Ctrl + RET激活它. (2认同)