Selectrum: add embark action to open file in new workspace
This commit is contained in:
parent
ebd72b715e
commit
540c523023
2 changed files with 8 additions and 1 deletions
|
@ -45,3 +45,9 @@ Use consult narrowing with another workspace number to open a buffer from that w
|
|||
;; create a new buffer with the name.
|
||||
(unless (cdr buffer)
|
||||
(funcall consult--buffer-display (car buffer)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +selectrum-embark-open-in-new-workspace (x)
|
||||
"Open X (a file) in a new workspace."
|
||||
(+workspace/new)
|
||||
(find-file x))
|
||||
|
|
|
@ -148,7 +148,8 @@
|
|||
(nthcdr pos embark-target-finders)))
|
||||
(map!
|
||||
:map embark-file-map
|
||||
:desc "Open target with sudo" "s" #'doom/sudo-find-file)
|
||||
:desc "Open target with sudo" "s" #'doom/sudo-find-file
|
||||
:desc "Open in new workspace" "TAB" #'+selectrum-embark-open-in-new-workspace)
|
||||
(setq embark-package-map (make-sparse-keymap))
|
||||
(map! :map embark-package-map
|
||||
"h" #'doom/help-packages
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue