Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
switch to project dir
(defun switch-to-local-project ()
(interactive)
(let* ((prompt "Switch to project: ")
(project-dir "~/src")
(choices (actionable-files-in-directory project-dir))
(project (ido-completing-read prompt choices nil t)))
(find-file (concat project-dir "/" project))))
(defun actionable-files-in-directory (dir)
(let ((files (directory-files dir))
(blacklist '(".DS_Store" "." "..")))
(-difference files blacklist)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.