Refactor ivy switch buffer defuns
This commit is contained in:
parent
d69828101e
commit
96058450da
2 changed files with 3 additions and 8 deletions
|
@ -31,22 +31,17 @@ determine if a directory is a project."
|
|||
;;
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/switch-to-project-buffer (&optional all-p)
|
||||
(defun doom/switch-to-project-buffer ()
|
||||
"Displays open buffers in current project. If ALL-P, then show all open
|
||||
buffers."
|
||||
(interactive)
|
||||
(ivy-read "Switch to: " (doom/get-buffer-names (not all-p))
|
||||
(ivy-read "Switch to: " (doom/get-buffer-names t)
|
||||
:matcher #'ivy--switch-buffer-matcher
|
||||
:preselect (buffer-name (other-buffer (current-buffer)))
|
||||
:action #'ivy--switch-buffer-action
|
||||
:keymap ivy-switch-buffer-map
|
||||
:caller 'doom/switch-to-project-buffer))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/switch-to-buffer ()
|
||||
(interactive)
|
||||
(doom/switch-to-project-buffer t))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/find-file-in-emacsd ()
|
||||
(interactive)
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
:m ";" 'evil-ex
|
||||
(:leader
|
||||
:nv "," 'doom/switch-to-project-buffer
|
||||
:nv "<" 'doom/switch-to-buffer
|
||||
:nv "<" 'ivy-switch-buffer
|
||||
:nv "." 'counsel-find-file
|
||||
:nv ">" 'projectile-find-file-in-known-projects
|
||||
:nv "/" 'counsel-projectile-find-file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue