Emacs: Move helm config to tool-helm.el

master
Pierre Neidhardt 2016-06-10 13:53:40 +02:00
parent d2bcd1bc4c
commit 807962e0eb
2 changed files with 49 additions and 42 deletions

View File

@ -172,48 +172,7 @@ To view where the bindings are set in your config files, lookup
(add-to-list 'favorite-packages 'helm-fuzzy-find)
(add-to-list 'favorite-packages 'helm-ls-git)
(when (require 'helm-config nil t)
(when (require 'helm-descbinds nil t)
(helm-descbinds-mode))
(when (require 'helm-ls-git nil t)
(setq helm-grep-git-grep-command "git --no-pager grep -n%cH --color=always --full-name -e %p -- %f"))
(helm-mode 1)
; (helm-autoresize-mode 1)
(setq helm-apropos-fuzzy-match t)
(setq helm-buffers-fuzzy-matching t)
(setq helm-imenu-fuzzy-match t)
(setq helm-M-x-fuzzy-match t)
(define-key mickey-minor-mode-map (kbd "M-x") 'helm-M-x)
(define-key mickey-minor-mode-map (kbd "C-x M-f") 'helm-imenu)
(define-key mickey-minor-mode-map (kbd "C-x C-/") 'helm-find)
(when (require 'helm-fuzzy-find nil t)
(define-key mickey-minor-mode-map (kbd "C-c C-/") 'helm-fuzzy-find))
(define-key mickey-minor-mode-map (kbd "C-x C-f") 'helm-find-files)
(define-key mickey-minor-mode-map (kbd "C-x C-d") 'helm-browse-project)
(define-key mickey-minor-mode-map (kbd "C-x b") 'helm-buffers-list)
(define-key mickey-minor-mode-map (kbd "C-x C-b") 'helm-mini)
(define-key mickey-minor-mode-map (kbd "M-y") 'helm-show-kill-ring)
(define-key mickey-minor-mode-map (kbd "C-x C-x") 'helm-all-mark-rings)
(define-key mickey-minor-mode-map (kbd "C-x x") 'helm-mark-ring)
(define-key mickey-minor-mode-map (kbd "M-s o") 'helm-occur)
(define-key mickey-minor-mode-map (kbd "C-h a") 'helm-apropos)
(define-key mickey-minor-mode-map (kbd "M-%") 'helm-regexp)
(define-key mickey-minor-mode-map (kbd "C-M-%") 'helm-regexp)
(setq helm-follow-mode-persistent t)
;; Face
(set-face-background 'helm-source-header "#white")
(set-face-foreground 'helm-source-header nil)
(set-face-background 'helm-selection "#4f4f4f")
(set-face-background 'helm-visible-mark "#2f2f2f")
(set-face-foreground 'helm-visible-mark nil)
(set-face-attribute 'helm-buffer-file nil :background 'unspecified :foreground "while" :weight 'normal)
(set-face-attribute 'helm-buffer-file nil :background 'unspecified :foreground "while" :weight 'normal)
(set-face-attribute 'helm-buffer-directory nil :background 'unspecified :foreground "#1e90ff" :weight 'bold)
(set-face-foreground 'helm-match "red")
(set-face-foreground 'helm-match-item "red")
(set-face-attribute 'helm-ff-directory nil :background 'unspecified :foreground 'unspecified :weight 'unspecified :inherit 'helm-buffer-directory)
(set-face-attribute 'helm-ff-file nil :background 'unspecified :foreground 'unspecified :weight 'unspecified :inherit 'helm-buffer-file)
;; Helm color for unsaved buffers? Dim special *buffers*?
(add-to-list 'helm-sources-using-default-as-input 'helm-source-man-pages))
(require 'tool-helm))
(when (require 'dired+ nil t)
(toggle-diredp-find-file-reuse-dir 1))

View File

@ -0,0 +1,48 @@
(when (require 'helm-descbinds nil t)
(helm-descbinds-mode))
(when (require 'helm-ls-git nil t)
(setq helm-grep-git-grep-command "git --no-pager grep -n%cH --color=always --full-name -e %p -- %f"))
(helm-mode 1)
; (helm-autoresize-mode 1)
(setq helm-follow-mode-persistent t)
(add-to-list 'helm-sources-using-default-as-input 'helm-source-man-pages)
(setq helm-apropos-fuzzy-match t)
(setq helm-buffers-fuzzy-matching t)
(setq helm-imenu-fuzzy-match t)
(setq helm-M-x-fuzzy-match t)
(define-key mickey-minor-mode-map (kbd "M-x") 'helm-M-x)
(define-key mickey-minor-mode-map (kbd "C-x M-f") 'helm-imenu)
(define-key mickey-minor-mode-map (kbd "C-x C-/") 'helm-find)
(when (require 'helm-fuzzy-find nil t)
(define-key mickey-minor-mode-map (kbd "C-c C-/") 'helm-fuzzy-find))
(define-key mickey-minor-mode-map (kbd "C-x C-f") 'helm-find-files)
(define-key mickey-minor-mode-map (kbd "C-x C-d") 'helm-browse-project)
(define-key mickey-minor-mode-map (kbd "C-x b") 'helm-buffers-list)
(define-key mickey-minor-mode-map (kbd "C-x C-b") 'helm-mini)
(define-key mickey-minor-mode-map (kbd "M-y") 'helm-show-kill-ring)
(define-key mickey-minor-mode-map (kbd "C-x C-x") 'helm-all-mark-rings)
(define-key mickey-minor-mode-map (kbd "C-x x") 'helm-mark-ring)
(define-key mickey-minor-mode-map (kbd "M-s o") 'helm-occur)
(define-key mickey-minor-mode-map (kbd "C-h a") 'helm-apropos)
(define-key mickey-minor-mode-map (kbd "M-%") 'helm-regexp)
(define-key mickey-minor-mode-map (kbd "C-M-%") 'helm-regexp)
(set-face-background 'helm-source-header "#white")
(set-face-foreground 'helm-source-header nil)
(set-face-background 'helm-selection "#4f4f4f")
(set-face-background 'helm-visible-mark "#2f2f2f")
(set-face-foreground 'helm-visible-mark nil)
(set-face-attribute 'helm-buffer-file nil :background 'unspecified :foreground "while" :weight 'normal)
(set-face-attribute 'helm-buffer-file nil :background 'unspecified :foreground "while" :weight 'normal)
(set-face-attribute 'helm-buffer-directory nil :background 'unspecified :foreground "#1e90ff" :weight 'bold)
(set-face-foreground 'helm-match "red")
(set-face-foreground 'helm-match-item "red")
(set-face-attribute 'helm-ff-directory nil :background 'unspecified :foreground 'unspecified :weight 'unspecified :inherit 'helm-buffer-directory)
(set-face-attribute 'helm-ff-file nil :background 'unspecified :foreground 'unspecified :weight 'unspecified :inherit 'helm-buffer-file)
;; Helm color for unsaved buffers? Dim special *buffers*?
(provide 'tool-helm)