Skip to content

Commit

Permalink
Move helm configuration around
Browse files Browse the repository at this point in the history
  • Loading branch information
dakrone committed Feb 14, 2017
1 parent 86872bf commit 6384bbe
Showing 1 changed file with 69 additions and 71 deletions.
140 changes: 69 additions & 71 deletions eos-helm.org
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ bindings I use more frequently:
| C-x C-i | helm semantic or imenu (depending on the mode) |

#+BEGIN_SRC emacs-lisp
(use-package helm-config
:ensure helm
(use-package helm
:ensure t
:demand t ;; demand it be loaded!
:diminish helm-mode
:bind
Expand All @@ -86,6 +86,64 @@ bindings I use more frequently:
("C-x C-r" . helm-mini)
("C-x b" . helm-mini)
("C-h t" . helm-world-time))
:init
(setq helm-grep-default-command
"grep -a -d skip %e -n%cH -e %p %f"
;; may be overridden if 'ggrep' is in path (see below)
helm-grep-default-recurse-command
"grep -a -d recurse %e -n%cH -e %p %f"
;; use CURL, not url-retrieve-synchronously
helm-net-prefer-curl t
;; be idle for this many seconds, before updating in delayed sources.
helm-input-idle-delay 0.05
;; wider buffer name in helm-buffers-list
helm-buffer-max-length 28 ;; default is 20
;; instead of "..." use a smaller unicode ellipsis
helm-buffers-end-truncated-string "…"
;; open helm buffer in another window
;;helm-split-window-default-side 'other
;; set to nil and use <C-backspace> to toggle it in helm-find-files
helm-ff-auto-update-initial-value nil
;; if I change the resplit state, re-use my settings
;; helm-reuse-last-window-split-state t
;; don't delete windows to always have 2
helm-always-two-windows nil
;; open helm buffer inside current window, don't occupy whole other window
helm-split-window-in-side-p t
;; fit buffer to width automatically
;; fit-window-to-buffer-horizontally 1
;; don't check if the file exists on remote files
helm-buffer-skip-remote-checking t
;; limit the number of displayed canidates
helm-candidate-number-limit 150
;; don't use recentf stuff in helm-ff, I use C-x C-r for this
helm-ff-file-name-history-use-recentf nil
;; move to end or beginning of source when reaching top or bottom
;; of source
helm-move-to-line-cycle-in-source t
;; don't display the header line
helm-display-header-line nil
;; be semi-verbose for helm tramp messages
helm-tramp-verbose 3
;; fuzzy matching
helm-recentf-fuzzy-match t
helm-locate-fuzzy-match nil ;; locate fuzzy is worthless
helm-M-x-fuzzy-match t
helm-buffers-fuzzy-matching t
helm-semantic-fuzzy-match t
helm-gtags-fuzzy-match t
helm-imenu-fuzzy-match t
helm-apropos-fuzzy-match nil
helm-lisp-fuzzy-completion nil
helm-completion-in-region-fuzzy-match nil
helm-autoresize-min-height 6
helm-autoresize-max-height 25
;; Here are the things helm-mini shows, I add `helm-source-bookmarks'
;; here to the regular default list
helm-mini-default-sources '(helm-source-buffers-list
helm-source-recentf
helm-source-bookmarks
helm-source-buffer-not-found))
:config
(use-package helm-files
:config (setq helm-ff-file-compressed-list '("gz" "bz2" "zip" "tgz" "xz" "txz")))
Expand Down Expand Up @@ -122,6 +180,7 @@ bindings I use more frequently:
:init (use-package bookmark+ :ensure t))
(use-package helm-projectile
:ensure t
:demand t ;; demand it be loaded!
:bind (:map projectile-command-map
("b" . helm-projectile-switch-to-buffer)
("d" . helm-projectile-find-dir)
Expand All @@ -148,74 +207,16 @@ bindings I use more frequently:
;; Shows helm input in the header instead of the footer
(setq helm-echo-input-in-header-line t)
(defun helm-hide-minibuffer-maybe ()
"Hide minibuffer in Helm session if we use the header line as input field."
(when (with-helm-buffer helm-echo-input-in-header-line)
(let ((ov (make-overlay (point-min) (point-max) nil nil t)))
(overlay-put ov 'window (selected-window))
(overlay-put ov 'face
(let ((bg-color (face-background 'default nil)))
`(:background ,bg-color :foreground ,bg-color)))
(setq-local cursor-type nil))))
"Hide minibuffer in Helm session if we use the header line as input field."
(when (with-helm-buffer helm-echo-input-in-header-line)
(let ((ov (make-overlay (point-min) (point-max) nil nil t)))
(overlay-put ov 'window (selected-window))
(overlay-put ov 'face
(let ((bg-color (face-background 'default nil)))
`(:background ,bg-color :foreground ,bg-color)))
(setq-local cursor-type nil))))
(add-hook 'helm-minibuffer-set-up-hook #'helm-hide-minibuffer-maybe)

(setq helm-grep-default-command
"grep -a -d skip %e -n%cH -e %p %f"
;; may be overridden if 'ggrep' is in path (see below)
helm-grep-default-recurse-command
"grep -a -d recurse %e -n%cH -e %p %f"
;; use CURL, not url-retrieve-synchronously
helm-net-prefer-curl t
;; be idle for this many seconds, before updating in delayed sources.
helm-input-idle-delay 0.05
;; wider buffer name in helm-buffers-list
helm-buffer-max-length 28 ;; default is 20
;; instead of "..." use a smaller unicode ellipsis
helm-buffers-end-truncated-string "…"
;; open helm buffer in another window
;;helm-split-window-default-side 'other
;; set to nil and use <C-backspace> to toggle it in helm-find-files
helm-ff-auto-update-initial-value nil
;; if I change the resplit state, re-use my settings
;; helm-reuse-last-window-split-state t
;; don't delete windows to always have 2
helm-always-two-windows nil
;; open helm buffer inside current window, don't occupy whole other window
helm-split-window-in-side-p t
;; fit buffer to width automatically
;; fit-window-to-buffer-horizontally 1
;; don't check if the file exists on remote files
helm-buffer-skip-remote-checking t
;; limit the number of displayed canidates
helm-candidate-number-limit 150
;; don't use recentf stuff in helm-ff, I use C-x C-r for this
helm-ff-file-name-history-use-recentf nil
;; move to end or beginning of source when reaching top or bottom
;; of source
helm-move-to-line-cycle-in-source t
;; don't display the header line
helm-display-header-line nil
;; be semi-verbose for helm tramp messages
helm-tramp-verbose 3
;; fuzzy matching
helm-recentf-fuzzy-match t
helm-locate-fuzzy-match nil ;; locate fuzzy is worthless
helm-M-x-fuzzy-match t
helm-buffers-fuzzy-matching t
helm-semantic-fuzzy-match t
helm-gtags-fuzzy-match t
helm-imenu-fuzzy-match t
helm-apropos-fuzzy-match nil
helm-lisp-fuzzy-completion nil
helm-completion-in-region-fuzzy-match nil
helm-autoresize-min-height 6
helm-autoresize-max-height 25
;; Here are the things helm-mini shows, I add `helm-source-bookmarks'
;; here to the regular default list
helm-mini-default-sources '(helm-source-buffers-list
helm-source-recentf
helm-source-bookmarks
helm-source-buffer-not-found))

;; Files that helm should know how to open
(setq helm-external-programs-associations
'(("avi" . "vlc")
Expand Down Expand Up @@ -248,9 +249,6 @@ bindings I use more frequently:
(define-key helm-map (kbd "C-M-p") 'helm-previous-source)
(define-key helm-map (kbd "M-N") 'helm-next-source)
(define-key helm-map (kbd "M-P") 'helm-previous-source)
;; The normal binding is C-c h M-g s which is insane
(global-set-key (kbd "C-c h g") 'helm-do-grep)
(global-set-key (kbd "C-c h a") 'helm-do-ag)

(when (executable-find "curl")
(setq helm-google-suggest-use-curl-p t))
Expand Down

0 comments on commit 6384bbe

Please sign in to comment.