diff --git a/core/core-helm.el b/core/core-helm.el index 6e30b5dec..85403e52e 100644 --- a/core/core-helm.el +++ b/core/core-helm.el @@ -12,7 +12,7 @@ helm-apropos-fuzzy-match nil helm-M-x-fuzzy-match nil helm-recentf-fuzzy-match nil - helm-projectile-fuzzy-match t + helm-projectile-fuzzy-match nil helm-display-header-line nil helm-ff-auto-update-initial-value nil @@ -32,18 +32,20 @@ (mapc (lambda (r) (add-to-list 'helm-boring-file-regexp-list r)) (list "\\.projects$" "\\.DS_Store$")) - (map! (:map (helm-map helm-generic-files-map helm-find-files-map helm-swoop-map helm-projectile-find-file-map) + (map! (:map helm-generic-files-map + "ESC" 'helm-keyboard-quit) + (:map (helm-map helm-generic-files-map helm-find-files-map helm-swoop-map helm-projectile-find-file-map) "C-w" 'backward-kill-word "C-r" 'evil-paste-from-register ; Evil registers in helm! Glorious! "/" nil "" 'backward-char "" 'forward-char "" 'helm-keyboard-quit - [escape] 'helm-keyboard-quit) + [escape] 'helm-keyboard-quit + "" 'helm-execute-persistent-action) (:map helm-find-files-map "C-w" 'helm-find-files-up-one-level - "TAB" 'helm-execute-persistent-action - "/" 'helm-execute-persistent-action) + "TAB" 'helm-execute-persistent-action) (:map helm-ag-map "" 'helm-ag-edit) (:map helm-ag-edit-map @@ -71,6 +73,10 @@ (setcar (nthcdr 2 plist) helm-global-prompt)) plist) + (defvar narf-helm-force-project-buffers nil) + (defun helm*buffer-list (&rest _) (narf/get-buffer-names narf-helm-force-project-buffers)) + (advice-add 'helm-buffer-list :override 'helm*buffer-list) + ;; Shrink source headers if there is only one source (add-hook 'helm-after-initialize-hook 'narf*helm-hide-source-header-maybe) ;; A simpler prompt: see `helm-global-prompt' diff --git a/core/defuns/defuns-buffers.el b/core/defuns/defuns-buffers.el index 1cfd55768..98bae50ab 100644 --- a/core/defuns/defuns-buffers.el +++ b/core/defuns/defuns-buffers.el @@ -49,6 +49,11 @@ Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/" buffers) buffers))) +;;;###autoload +(defun narf/get-buffer-names (&optional project-p) + (mapcar (lambda (b) (buffer-name b)) + (narf/get-buffers project-p))) + ;;;###autoload (defun narf/get-visible-windows (&optional buffer-list) (-map #'get-buffer-window