mclear-tools / tabspaces

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[feature-requrest] ivy-integration

CsBigDataHub opened this issue · comments

Any insights in to how to integrate ivy?

Try the following in a tabspace:

(defun tabspaces-ivy-switch-buffer (buffer &optional norecord force-same-window)
  "Display the local buffer BUFFER in the selected window.
This is the frame/tab-local equivilant to `switch-to-buffer'.
The arguments NORECORD and FORCE-SAME-WINDOW are passed to `switch-to-buffer'."
  (interactive
   (list
    (let ((blst (mapcar #'buffer-name (tabspaces-buffer-list))))
      (read-buffer
       "Switch to local buffer: " blst nil
       (lambda (b) (member (if (stringp b) b (car b)) blst))))))
  (ivy-switch-buffer buffer))

Thanks that worked.

Good -- I don't use ivy so I could only test it in a limited way. I'll put a note in the README.