[英]How do I exit iedit mode with enter?
I want to use my regular keybinding to enter iedit (M--), but I want to exit iedit with a simple press of enter. 我想使用常规的键盘绑定输入iedit(M--),但是我想通过按回车键退出iedit。 How do I do that?
我怎么做?
I guess I should add a hook to my .emacs for iedit-mode, but reading the Ch f iedit ENTER it seems that no such thing exists. 我想我应该为我的.emacs添加一个用于iedit模式的钩子,但是阅读Ch iedit似乎没有这样的东西。
You can define a custom command and bind it to RET
in the keymap used by iedit-mode
: 您可以定义一个自定义命令并将其绑定到
iedit-mode
使用的键盘映射中的RET
:
(require 'iedit)
(defun quit-iedit-mode ()
"Turn off iedit-mode."
(interactive)
(iedit-mode -1))
(define-key iedit-mode-keymap (kbd "RET") 'quit-iedit-mode)
With this in place, pressing Enter turns off iedit-mode
. 将其放置在适当位置后,按Enter键将关闭
iedit-mode
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.