Fix helm buffer list
This commit is contained in:
parent
c594056f8d
commit
73a1dd00bf
2 changed files with 16 additions and 5 deletions
|
@ -12,7 +12,7 @@
|
||||||
helm-apropos-fuzzy-match nil
|
helm-apropos-fuzzy-match nil
|
||||||
helm-M-x-fuzzy-match nil
|
helm-M-x-fuzzy-match nil
|
||||||
helm-recentf-fuzzy-match nil
|
helm-recentf-fuzzy-match nil
|
||||||
helm-projectile-fuzzy-match t
|
helm-projectile-fuzzy-match nil
|
||||||
|
|
||||||
helm-display-header-line nil
|
helm-display-header-line nil
|
||||||
helm-ff-auto-update-initial-value nil
|
helm-ff-auto-update-initial-value nil
|
||||||
|
@ -32,18 +32,20 @@
|
||||||
(mapc (lambda (r) (add-to-list 'helm-boring-file-regexp-list r))
|
(mapc (lambda (r) (add-to-list 'helm-boring-file-regexp-list r))
|
||||||
(list "\\.projects$" "\\.DS_Store$"))
|
(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-w" 'backward-kill-word
|
||||||
"C-r" 'evil-paste-from-register ; Evil registers in helm! Glorious!
|
"C-r" 'evil-paste-from-register ; Evil registers in helm! Glorious!
|
||||||
"/" nil
|
"/" nil
|
||||||
"<left>" 'backward-char
|
"<left>" 'backward-char
|
||||||
"<right>" 'forward-char
|
"<right>" 'forward-char
|
||||||
"<escape>" 'helm-keyboard-quit
|
"<escape>" 'helm-keyboard-quit
|
||||||
[escape] 'helm-keyboard-quit)
|
[escape] 'helm-keyboard-quit
|
||||||
|
"<tab>" 'helm-execute-persistent-action)
|
||||||
(:map helm-find-files-map
|
(:map helm-find-files-map
|
||||||
"C-w" 'helm-find-files-up-one-level
|
"C-w" 'helm-find-files-up-one-level
|
||||||
"TAB" 'helm-execute-persistent-action
|
"TAB" 'helm-execute-persistent-action)
|
||||||
"/" 'helm-execute-persistent-action)
|
|
||||||
(:map helm-ag-map
|
(:map helm-ag-map
|
||||||
"<backtab>" 'helm-ag-edit)
|
"<backtab>" 'helm-ag-edit)
|
||||||
(:map helm-ag-edit-map
|
(:map helm-ag-edit-map
|
||||||
|
@ -71,6 +73,10 @@
|
||||||
(setcar (nthcdr 2 plist) helm-global-prompt))
|
(setcar (nthcdr 2 plist) helm-global-prompt))
|
||||||
plist)
|
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
|
;; Shrink source headers if there is only one source
|
||||||
(add-hook 'helm-after-initialize-hook 'narf*helm-hide-source-header-maybe)
|
(add-hook 'helm-after-initialize-hook 'narf*helm-hide-source-header-maybe)
|
||||||
;; A simpler prompt: see `helm-global-prompt'
|
;; A simpler prompt: see `helm-global-prompt'
|
||||||
|
|
|
@ -49,6 +49,11 @@ Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/"
|
||||||
buffers)
|
buffers)
|
||||||
buffers)))
|
buffers)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun narf/get-buffer-names (&optional project-p)
|
||||||
|
(mapcar (lambda (b) (buffer-name b))
|
||||||
|
(narf/get-buffers project-p)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun narf/get-visible-windows (&optional buffer-list)
|
(defun narf/get-visible-windows (&optional buffer-list)
|
||||||
(-map #'get-buffer-window
|
(-map #'get-buffer-window
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue