为什么我似乎必须在use-package init与配置中定义此键绑定?

时间:2018-04-27 01:09:52

标签: emacs emacs-helm

我的Emacs init文件中的<localRepository>c:\\.m2</localRepository> helm配置如下:

helm-swoop

在无数的在线示例中,我看到(use-package helm :demand t :diminish helm-mode :init (progn (require 'helm-config) (setq helm-candidate-number-limit 100) (setq helm-idle-delay 0.0 helm-input-idle-delay 0.01 helm-yas-display-key-on-candidate t helm-quick-update t helm-M-x-requires-pattern nil) (helm-mode) ) :bind ( ("C-h a" . helm-apropos) ("C-x C-b" . helm-buffers-list) ("C-x b" . helm-buffers-list) ("M-y" . helm-show-kill-ring) ("M-x" . helm-M-x) ("C-x C-f" . helm-find-files) ("C-c h o" . helm-occur) ("C-c h r" . helm-register) ("C-c h b" . helm-resume) ) :config (setq helm-command-prefix-key "C-c h") (setq helm-autoresize-min-height 25) (setq helm-autoresize-max-height 25) (setq helm-split-window-in-side-p t helm-move-to-line-cycle-in-source t helm-ff-search-library-in-sexp t helm-scroll-amount 8 helm-ff-file-name-history-use-recentf t) (setq helm-buffer-max-length nil) (helm-mode 1) (helm-autoresize-mode 1) (define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) (define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) (define-key helm-map (kbd "C-z") 'helm-select-action) :ensure helm) (use-package helm-swoop :ensure t :bind (("C-c h s" . helm-multi-swoop)) :init (bind-key "M-i" 'helm-swoop-from-isearch isearch-mode-map) :config (define-key helm-swoop-map (kbd "M-i") 'helm-multi-swoop-current-mode-from-helm-swoop) ) 部分中配置的helm-swoop模式映射绑定,我似乎无法将config:放入helm-swoop-map因为我得到一个空符号名称错误,但我必须将init:绑定放在isearch-mode-map中,否则绑定不会在启动时设置。为什么会这样?

0 个答案:

没有答案