Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ad: jp-rails-grep

  • Loading branch information...
commit cf03da744d915bad6a0e3be1edd0f898d1ddbe48 1 parent 04c18ba
@jpablobr authored
View
26 custom/lib/jp-lib-grep.el
@@ -1,5 +1,15 @@
(defvar jp-grep-cmd
- "find %s -type f \\( ! -regex '.*\\.git.*' \\) -a \\( ! -regex '.*\\.elc$' \\) -exec egrep -nH -e %s {} +")
+ "find %s -type f \
+ \\( ! -regex '.*\\.git.*' \\) -a \
+ \\( ! -regex '.*\\.elc$' \\) \
+ -exec egrep -nH -e %s {} +")
+
+(defvar jp-rails-cmd
+ "find %s -type f \
+ \\( ! -regex '.*\\.git.*' \\) -a \
+ \\( ! -regex '.*\\tmp.*' \\) -a \
+ \\( ! -regex '.*\\log.*' \\) \
+ -exec egrep -nH -e %s {} +")
(defun jp-grep-emacs-config ()
(interactive
@@ -27,6 +37,20 @@
what)
'grep-mode))))
+(defun jp-rails-grep ()
+ (interactive
+ (let (what)
+ (setq what
+ (read-from-minibuffer
+ "Grep for: "
+ (if (and transient-mark-mode mark-active)
+ (buffer-substring-no-properties (region-beginning) (region-end))
+ (thing-at-point 'symbol))))
+ (compilation-start (format jp-rails-cmd
+ (find-git-repo default-directory)
+ what)
+ 'grep-mode))))
+
(defun jp-grep-by-name ()
(interactive (agrep-by-name-read-info 'query 'name))
(setq query (or query (agrep-by-name-read-info 'query)))
View
4 custom/lib/jp-lib-hooks.el
@@ -157,6 +157,10 @@
'(lambda ()
(local-set-key (kbd "M-o") 'other-window)))
+(add-hook 'coffee-mode-hook
+ '(lambda ()
+ (setq show-trailing-whitespace t)))
+
(add-hook 'clojure-mode-hook 'turn-on-paredit)
(add-hook 'lua-mode-hook 'flymake-lua-load)
2  vendor/anything/anything-etags2
@@ -1 +1 @@
-Subproject commit e4a285eaea8ddb9a3e07b6992ddb84b3ce293868
+Subproject commit e2bb8defcad12094e8461372fed86d922d9d63fa
2  vendor/anything/anything-git-grep
@@ -1 +1 @@
-Subproject commit 1cdfd4ebfad8735978fd2636a50a308694fa4780
+Subproject commit 727194dcc8aebec5da7597a7fcd49ec2fc123a9e
2  vendor/ruby/anything-ruby-inspect
@@ -1 +1 @@
-Subproject commit 3d42f3202fb025b49a290be785baf37e9392e5e2
+Subproject commit fd51320a09c72f1b59ed50c8705895b84148f7ae
2  vendor/ruby/testr
@@ -1 +1 @@
-Subproject commit e58366c2634b06f8f726042cce05b25970226164
+Subproject commit 6168b8e1997db7deeebad62020ec5566156ada84
Please sign in to comment.
Something went wrong with that request. Please try again.