Merge pull request #670 from toctan/helm-cleanup

Helm cleanup
This commit is contained in:
Bozhidar Batsov 2014-09-04 19:41:21 +03:00
commit 10011d66d0

View file

@ -11,7 +11,7 @@
;;; Commentary: ;;; Commentary:
;; Some config for Helm that follows thiks guide: http://tuhdo.github.io/helm-intro.html ;; Some config for Helm that follows this guide: http://tuhdo.github.io/helm-intro.html
;;; License: ;;; License:
@ -36,9 +36,9 @@
(require 'helm) (require 'helm)
;; must set before helm-config, otherwise helm use default ;; must set before helm-config, otherwise helm use default
;; prefix "C-x c", which is inconvenient because you can ;; prefix "C-x c", which is inconvenient because you can
;; accidentially pressed "C-x C-c" ;; accidentally pressed "C-x C-c"
(setq helm-command-prefix-key "C-c h") (setq helm-command-prefix-key "C-c h")
(require 'helm-config) (require 'helm-config)
@ -47,29 +47,27 @@
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) ; rebihnd tab to do persistent action (define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) ; rebihnd 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-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 (define-key helm-map (kbd "C-z") 'helm-select-action) ; list actions using C-z
(define-key helm-grep-mode-map (kbd "<return>") 'helm-grep-mode-jump-other-window) (define-key helm-grep-mode-map (kbd "<return>") 'helm-grep-mode-jump-other-window)
(define-key helm-grep-mode-map (kbd "n") 'helm-grep-mode-jump-other-window-forward) (define-key helm-grep-mode-map (kbd "n") 'helm-grep-mode-jump-other-window-forward)
(define-key helm-grep-mode-map (kbd "p") 'helm-grep-mode-jump-other-window-backward) (define-key helm-grep-mode-map (kbd "p") 'helm-grep-mode-jump-other-window-backward)
(when (executable-find "curl")
(setq helm-google-suggest-use-curl-p t))
(setq (setq
helm-google-suggest-use-curl-p t
helm-scroll-amount 4 ; scroll 4 lines other window using M-<next>/M-<prior> helm-scroll-amount 4 ; scroll 4 lines other window using M-<next>/M-<prior>
helm-quick-update t ; do not display invisible candidates helm-quick-update t ; do not display invisible candidates
helm-idle-delay 0.01 ; be idle for this many seconds, before updating in delayed sources.
helm-input-idle-delay 0.01 ; be idle for this many seconds, before updating candidate buffer
helm-ff-search-library-in-sexp t ; search for library in `require' and `declare-function' sexp. helm-ff-search-library-in-sexp t ; search for library in `require' and `declare-function' sexp.
helm-split-window-default-side 'other ;; open helm buffer in another window helm-split-window-default-side 'other ;; open helm buffer in another window
helm-split-window-in-side-p t ;; open helm buffer inside current window, not occupy whole other window helm-split-window-in-side-p t ;; open helm buffer inside current window, not occupy whole other window
helm-buffers-favorite-modes (append helm-buffers-favorite-modes helm-buffers-favorite-modes (append helm-buffers-favorite-modes
'(picture-mode artist-mode)) '(picture-mode artist-mode))
helm-candidate-number-limit 500 ; limit the number of displayed canidates helm-candidate-number-limit 500 ; limit the number of displayed candidates
helm-M-x-requires-pattern 0 ; show all candidates when set to 0
helm-ff-file-name-history-use-recentf t helm-ff-file-name-history-use-recentf t
helm-move-to-line-cycle-in-source t ; move to end or beginning of source helm-move-to-line-cycle-in-source t ; move to end or beginning of source
; when reaching top or bottom of source. ; when reaching top or bottom of source.
ido-use-virtual-buffers t ; Needed in helm-buffers-list
helm-buffers-fuzzy-matching t ; fuzzy matching buffer names when non-nil helm-buffers-fuzzy-matching t ; fuzzy matching buffer names when non-nil
; useful in helm-mini that lists buffers ; useful in helm-mini that lists buffers
) )
@ -80,9 +78,6 @@
(global-set-key (kbd "C-c h x") 'helm-register) (global-set-key (kbd "C-c h x") 'helm-register)
(global-set-key (kbd "C-c h SPC") 'helm-all-mark-rings) (global-set-key (kbd "C-c h SPC") 'helm-all-mark-rings)
;;; Save current position to mark ring
(add-hook 'helm-goto-line-before-hook 'helm-save-current-pos-to-mark-ring)
;; PACKAGE: helm-projectile ;; PACKAGE: helm-projectile
(require 'helm-projectile) (require 'helm-projectile)
(push "Press <C-c p h> to navigate a project in Helm." prelude-tips) (push "Press <C-c p h> to navigate a project in Helm." prelude-tips)