Created
April 4, 2014 14:08
-
-
Save mbriggs/9975431 to your computer and use it in GitHub Desktop.
switch to project dir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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