1

helm我的 Emacs 初始化文件和helm-swoop在我的 Emacs 初始化文件中有以下配置:

(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-mapinit:因为我得到一个 void symbol name 错误,但我必须放入isearch-mode-map绑定,init否则绑定不会在启动时设置。为什么会这样?

4

0 回答 0