Merge pull request #684 from tuhdo/master

Set Helm prefix key independent of Helm's packages
This commit is contained in:
Bozhidar Batsov 2014-09-13 20:06:27 +03:00
commit 822a595a6b

View file

@ -38,13 +38,15 @@
(require 'helm) (require 'helm)
(require 'helm-grep) (require 'helm-grep)
(require 'helm-files) (require 'helm-files)
(require 'helm-projectile)
;; The default "C-x c" is quite close to "C-x C-c", which quits Emacs. ;; The default "C-x c" is quite close to "C-x C-c", which quits Emacs.
;; Note: this must be placed before require `helm-config' ;; Note: this must be placed before require `helm-config'. If `helm-projectile' is
;; available, it must also be set before `helm-projectile', since `helm-projectile'
;; loads `helm-config'
(setq helm-command-prefix-key "C-c h") (setq helm-command-prefix-key "C-c h")
(require 'helm-config) (require 'helm-config)
(require 'helm-projectile)
(when (executable-find "curl") (when (executable-find "curl")
(setq helm-google-suggest-use-curl-p t)) (setq helm-google-suggest-use-curl-p t))
@ -58,6 +60,12 @@
helm-ff-search-library-in-sexp t helm-ff-search-library-in-sexp t
helm-ff-file-name-history-use-recentf t) helm-ff-file-name-history-use-recentf t)
;; The default "C-x c" is quite close to "C-x C-c", which quits Emacs.
;; Changed to "C-c h". Note: We must set "C-c h" globally, because we
;; cannot change `helm-command-prefix-key' once `helm-config' is loaded.
(global-set-key (kbd "C-c h") 'helm-command-prefix)
(global-unset-key (kbd "C-x c"))
(define-key helm-command-map (kbd "o") 'helm-occur) (define-key helm-command-map (kbd "o") 'helm-occur)
(define-key helm-command-map (kbd "g") 'helm-do-grep) (define-key helm-command-map (kbd "g") 'helm-do-grep)
(define-key helm-command-map (kbd "C-c w") 'helm-wikipedia-suggest) (define-key helm-command-map (kbd "C-c w") 'helm-wikipedia-suggest)