Created
November 3, 2012 17:50
-
-
Save jaycfields/4008106 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 grep-in (project-root) | |
(interactive (list (read-directory-name "Project Root: " | |
(locate-dominating-file | |
default-directory | |
"project.clj")))) | |
(er/mark-clj-word) | |
(grep (concat "grep -nH -e " | |
(buffer-substring-no-properties (region-beginning) (region-end)) | |
" -R " project-root))) | |
(global-set-key (kbd "C-c C-g") 'grep-in) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment