forked from redguardtoo/emacs.d
/
init-helm.el
58 lines (52 loc) · 1.87 KB
/
init-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
(helm-mode 1)
(setq helm-completing-read-handlers-alist
'((describe-function . ido)
(describe-variable . ido)
(debug-on-entry . helm-completing-read-symbols)
(find-function . helm-completing-read-symbols)
(find-tag . helm-completing-read-with-cands-in-buffer)
(ffap-alternate-file . nil)
(tmm-menubar . nil)
(dired-do-copy . nil)
(dired-do-rename . nil)
(dired-create-directory . nil)
(find-file . ido)
(copy-file-and-rename-buffer . nil)
(rename-file-and-buffer . nil)
(w3m-goto-url . nil)
(ido-find-file . nil)
(ido-edit-input . nil)
(read-file-name . ni)
(yas/compile-directory . ido)
(yas-compile-directory . ido)
(execute-extended-command . ido)
))
;; {{helm-gtags
;; customize
(setq helm-c-gtags-path-style 'relative)
(setq helm-c-gtags-ignore-case t)
(setq helm-c-gtags-read-only t)
(add-hook 'c-mode-hook (lambda () (helm-gtags-mode)))
(add-hook 'c++-mode-hook (lambda () (helm-gtags-mode)))
;; }}
;; key bindings
(add-hook 'helm-gtags-mode-hook
'(lambda ()
(local-set-key (kbd "M-t") 'helm-gtags-find-tag)
(local-set-key (kbd "M-r") 'helm-gtags-find-rtag)
(local-set-key (kbd "M-s") 'helm-gtags-find-symbol)
(local-set-key (kbd "C-t") 'helm-gtags-pop-stack)
(local-set-key (kbd "C-c C-f") 'helm-gtags-pop-stack)))
;; ==end
(if *emacs24*
(progn
(autoload 'helm-c-yas-complete "helm-c-yasnippet" nil t)
(global-set-key (kbd "C-x C-o") 'helm-find-files)
(global-set-key (kbd "C-c f") 'helm-for-files)
(global-set-key (kbd "C-c y") 'helm-c-yas-complete)
(global-set-key (kbd "C-c C-g") 'helm-ls-git-ls)
(global-set-key (kbd "C-c i") 'helm-imenu)
)
(global-set-key (kbd "C-x C-o") 'ffap)
)
(provide 'init-helm)