简体   繁体   English

启用ergoemacs时,ido-completion-map键不起作用

[英]ido-completion-map keys not working when ergoemacs is enable

When using ergo emacs, for some reason Ml and Mj (forward-char and backward-char respectively) don't work properly in the minibuffer (with ido mode). 使用ergo emacs时,由于某些原因,M1和Mj(分别为前向字符和后向字符)在迷你缓冲区(使用ido模式)下无法正常工作。

I've tried setting the ido-completion-map with the following: 我尝试使用以下方法设置ido-completion-map:

(add-hook 'ido-setup-hook
  (lambda ()
    (define-key ido-completion-map (kbd "M-k") 'ido-next-match)
    (define-key ido-completion-map (kbd "M-i") 'ido-prev-match)
    (define-key ido-completion-map (kbd "M-l") 'ido-next-match)
    (define-key ido-completion-map (kbd "M-j") 'ido-prev-match)))

but these don't seem to stick. 但是这些似乎并不持久。

I seem to be having a similar problem to this person: ido-mode binding masked by global-set-key but none of the solutions seems to work for me 我似乎对此人有一个类似的问题: 全局设置键掩盖了ido-mode绑定,但是没有一种解决方案对我有用

Any help would be very appreciated 任何帮助将不胜感激

Kind regards Nimai 亲切的问候

Although the instructions at the outset of ido.el suggest using: 尽管ido.el一开始的ido.el建议使用:

;; Customization
;; -------------
;;
;; Customize the Ido group to change the Ido functionality.
;;
;; To modify the keybindings, use the ido-setup-hook.  For example:
;;(add-hook 'ido-setup-hook 'ido-my-keys)
;;
;;(defun ido-my-keys ()
;;  "Add my keybindings for ido."
;;  (define-key ido-completion-map " " 'ido-next-match)
;;  )

I recently found that using the ido-common-completion-map had better luck when using a frame-switch function -- the original poster can substitute his / her own preferred keyboard shortcuts instead of m-tab and/or mS-tab : 我最近发现,使用帧切换功能时,使用ido-common-completion-map效果更好-原始张贴者可以用他/她自己的首选键盘快捷方式代替m-tab和/或mS-tab

(add-hook 'ido-setup-hook 'ido-my-keys)

(defun ido-my-keys ()
  "Add my keybindings for ido."
  (define-key ido-common-completion-map (kbd "<M-tab>") 'ido-next-match)
  (define-key ido-common-completion-map (kbd "<M-S-tab>") 'ido-prev-match) )

I have met the save problem, i'm using Emacs 24.4 with ergoemacs-mode-5.14.7.3 (i don't use the latest version of ergoemacs because it has the speed issue. See: github issue ). 我遇到了保存问题,我在ergoemacs-mode-5.14.7.3中使用了Emacs 24.4(我不使用最新版本的ergoemacs,因为它存在速度问题。请参阅: github issue )。 After a lot of searching, i finally find this github commit , and get it work by adding below code to my emacs init file: 经过大量搜索,我终于找到了这个github commit ,并通过将以下代码添加到我的emacs初始化文件中来使其工作:

after enable ergoemacs-mode: 启用ergoemacs-mode后:

(when ido-mode
  (global-set-key [remap ido-magic-forward-char] 'ido-next-match)
  (global-set-key [remap ido-magic-backward-char] 'ido-prev-match))

Hope it helps, thanks! 希望对您有所帮助,谢谢!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM