From 8c8da65b2578863fecea1a1a6017df409fb4ccea Mon Sep 17 00:00:00 2001 From: Fabien Dubosson Date: Mon, 1 Feb 2016 19:08:11 +0100 Subject: [PATCH] Add FAQ entry about helm-ag file extension filter Fix #3282 --- doc/FAQ.org | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/FAQ.org b/doc/FAQ.org index ac42e7ad6..bc4fce2e0 100644 --- a/doc/FAQ.org +++ b/doc/FAQ.org @@ -36,6 +36,7 @@ - [[Use Spacemacs as the =$EDITOR= for git commits?][Use Spacemacs as the =$EDITOR= for git commits?]] - [[Try Spacemacs without modifying my existing Emacs configuration?][Try Spacemacs without modifying my existing Emacs configuration?]] - [[Make copy/paste working with the mouse in X11 terminals?][Make copy/paste working with the mouse in X11 terminals?]] + - [[Use =helm-ag= to search only in files of a certain type?][Use =helm-ag= to search only in files of a certain type?]] - [[Windows][Windows]] - [[Why do the fonts look crappy on Windows?][Why do the fonts look crappy on Windows?]] - [[Why is there no Spacemacs logo in the startup buffer?][Why is there no Spacemacs logo in the startup buffer?]] @@ -413,6 +414,24 @@ enable copying/pasting with the mouse. You need to add this line to your (xterm-mouse-mode -1) #+end_src +** Use =helm-ag= to search only in files of a certain type? +It is possible to restrict the scope of =helm-ag= to search only expressions in +some specified file types. There is two way of doing this, both by appending +some expressions to the search input: + +- By using a regexp with =-G=, for instance =-G\.el$= will look for all files + ending with =.el= which are emacs-lisp files. + +- By using a flag like =--python= which should be self-explaining. The list of + available flags colud be accessed from terminal with: + + #+begin_src shell + ag --list-file-types + #+end_src + +This is possible because =helm-ag= is treating the search input as command-line +arguments of the =ag= program. + * Windows ** Why do the fonts look crappy on Windows? You can install [[https://code.google.com/p/mactype/][MacType]] on Windows to get very nice looking fonts. It is also