Add buffer overview to main helm shortcut menu
Often, I want to open some file and try to first open the corresponding buffer in the hope there's some open buffer for it already. When no such buffer exists, I have to close the list of buffers, reopen the helm shortcut menu, and navigate to the corresponding bookmark. This is cumbersome and somehow duplicate work, since the bookmark and the file most often are named similarly. With a buffer overview in the helm shortcut menu I can now search for the file directly and if it's already open, directly select the corresponding buffer. If it has not been opened, though, I can navigate to the corresponding bookmark with at most one additional keystroke (C-o) and open it there. Nice!
This commit is contained in:
parent
2051347e72
commit
1be7f0e171
7
init.el
7
init.el
|
@ -666,7 +666,10 @@ With given ARG, display files in `db/important-document-path’."
|
|||
:action '(("Open" . call-interactively))
|
||||
:filtered-candidate-transformer #'helm-adaptive-sort)
|
||||
|
||||
;; if prefix arg is given, extrac files from
|
||||
;; taken from `helm-buffers-list'
|
||||
(helm-make-source "Buffers" 'helm-source-buffers)
|
||||
|
||||
;; if prefix arg is given, extract files from
|
||||
;; `db/important-documents-path’ and list them as well
|
||||
(when (and (= arg 4)
|
||||
(file-directory-p db/important-documents-path))
|
||||
|
@ -683,6 +686,8 @@ With given ARG, display files in `db/important-document-path’."
|
|||
("Find file" . find-file)))))
|
||||
|
||||
helm-source-bookmarks
|
||||
|
||||
helm-source-buffer-not-found
|
||||
helm-source-bookmark-set)))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue