Cmd-Shift-F to find in project like TextMate
This commit is contained in:
parent
87f4865da0
commit
8aca01d137
2 changed files with 18 additions and 0 deletions
3
emacs
3
emacs
|
|
@ -376,6 +376,9 @@
|
|||
;; can't seem to un-hijack cmd-`, so make it do something useful
|
||||
(global-set-key "\M-`" 'other-window-in-any-frame)
|
||||
|
||||
;; find files like textmate
|
||||
(global-set-key "\M-F" 'textmate-find-in-project)
|
||||
|
||||
;; run the ssa server
|
||||
(global-set-key [(super s)] 'ssa-run-server)
|
||||
|
||||
|
|
|
|||
|
|
@ -301,6 +301,21 @@ Symbols matching the text at point are put first in the completion list."
|
|||
(setq *textmate-project-files* nil)
|
||||
(message "textmate-mode cache cleared."))
|
||||
|
||||
(defun textmate-find-regex-in-project (regex)
|
||||
"Search the project for a regular expression and quickly jump
|
||||
to matches in a project.
|
||||
|
||||
This function just finds the project root and calls `LGREP'."
|
||||
(interactive "sRegex: ")
|
||||
(let ((root (textmate-project-root)))
|
||||
(when (null root)
|
||||
(error
|
||||
(concat
|
||||
"Can't find a suitable project root ("
|
||||
(string-join " " *textmate-project-roots* )
|
||||
")")))
|
||||
(lgrep regex "*" root)))
|
||||
|
||||
;;; Utilities
|
||||
|
||||
(defun textmate-project-files (root)
|
||||
|
|
|
|||
Loading…
Reference in a new issue