-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-helm.el
70 lines (45 loc) · 2.59 KB
/
setup-helm.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
;; Helm-specific setup and configuration
;; Taken from:
;; Load helm
(add-to-list 'load-path "~/.emacs.d/plugins/helm")
(require 'helm)
(require 'helm-config)
(global-set-key (kbd "M-x") 'helm-M-x) ;; Bind to M-x
(global-set-key (kbd "C-x C-f") 'helm-find-files) ;; Bind helm-find-files to C-x C-f
;; 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-map (kbd "<tab>") 'helm-execute-persistent-action) ; rebind tab to run persistent action
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) ; make TAB works in terminal
(define-key helm-map (kbd "C-z") 'helm-select-action) ; list actions using C-z
(when (executable-find "curl")
(setq helm-google-suggest-use-curl-p t))
(setq helm-split-window-in-side-p t ; open helm buffer inside current window, not occupy whole other window
helm-move-to-line-cycle-in-source t ; move to end or beginning of source when reaching top or bottom of source.
helm-ff-search-library-in-sexp t ; search for library in `require' and `declare-function' sexp.
helm-scroll-amount 8 ; scroll 8 lines other window using M-<next>/M-<prior>
helm-ff-file-name-history-use-recentf t)
(helm-mode 1)
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) ; rebind tab to do persistent action
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) ; make TAB works in terminal
(define-key helm-map (kbd "C-z") 'helm-select-action) ; list actions using C-z
(helm-autoresize-mode t) ;; Resize to fir with the number of candidates
(setq helm-M-x-fuzzy-match t) ;; optional fuzzy matching for helm-M-x
(global-set-key (kbd "M-y") 'helm-show-kill-ring) ;; Cycle kill ring
(global-set-key (kbd "C-x b") 'helm-mini) ;; helm-mini
(setq helm-buffers-fuzzy-matching t
helm-recentf-fuzzy-match t)
(semantic-mode 1)
(setq helm-semantic-fuzzy-match t
helm-imenu-fuzzy-match t)
;; Enable man-page at point
(add-to-list 'helm-sources-using-default-as-input 'helm-source-man-pages)
(setq helm-locate-fuzzy-match t)
;; Search using helm
(global-set-key (kbd "C-c s") 'helm-occur) ;; Search using helm
(setq helm-apropos-fuzzy-match t) ;; Helm apropos
(setq helm-lisp-fuzzy-completion t)
(global-set-key (kbd "C-h SPC") 'helm-all-mark-rings) ;; Show global mark ring
(global-set-key (kbd "C-c g") 'helm-google-suggest) ;; search google