13
votes
Accepted
How can the list of projects used by Projectile be manually updated?
You can add a single project to Projectile's runtime list of known projects (projectile-known-projects) using the command projectile-add-known-project, which interactively prompts you for the root ...
10
votes
How to exclude files from Projectile?
Another solution would be to use ag(the_silver_searcher) or rg (ripgrep) to generate project files. Here's how you can do it with rg:
(setq projectile-enable-caching t)
;;; Default rg arguments
;; ...
9
votes
Accepted
How to set Projectile project name as frame title
The following code works for me.
(setq frame-title-format
'(""
"%b"
(:eval
(let ((project-name (projectile-project-name)))
(unless (string= "-" project-name)
...
9
votes
Accepted
9
votes
Accepted
helm-projectile-ag use thing-at-point as input?
Found it. The setting is
(setq helm-ag-insert-at-point 'symbol)
Reference: https://github.com/syl20bnr/spacemacs/issues/1848#issuecomment-108973505
8
votes
Open helm search result in a new window?
C-z will bring up a new buffer with actions available to helm, and I see the following:
[f1] Open file
[f2] Open file other window
[f3] Save results in buffer
[f4] Edit search results
So you want C-...
7
votes
Get file name relative to projectile root
I think the reason your code is not working as hoped for is because you are using the buffer-local variable projectile-project-root instead of the eponymous function.
C-hvprojectile-project-rootRET ...
5
votes
how do I write a projectile-switch-action that changes the current working directory to the chosen project's root dir?
The default action is projectile-find-file. Change it to projectile-dired, and whenever you switch project, you get into a dired buffer of the root of that project:
(setq projectile-switch-project-...
5
votes
Accepted
Projectile indexing won't work on Windows
This question does not seem to be about Projectile or Helm, but more generally about using grep/find with Emacs on Windows. Have you tried any of the built-in Emacs commands like rgrep, find-grep-...
5
votes
Accepted
Regenerate ctags TAGS file without freezing Emacs for a while?
You can use https://github.com/redguardtoo/counsel-etags/blob/master/counsel-etags.el which originally called aysnc-shell-command to run shell command ctags -e -R.
Or else write your own ...
5
votes
How to exclude files from Projectile?
Check if the variable projectile-indexing-method is set to alien. If that's the case Projectile will ignore ignores/unignores/sorting provided in Projectile config:
The alien indexing method ...
5
votes
Accepted
Projectile - "PATH is not a project"?
Using the answer from here, they said.
I think your project is indeed considered a project by projectile only
if you have a .git folder in it (did you forget to git init?). I'm not
seeing one in your ...
4
votes
How to exclude files from Projectile?
search that respects ignored dirs/files:
install ack (An alternative to grep. I install via homebrew.)
put --ignore-case in your ~.ackrc file (assuming you want to ignore case)
bind helm-projectile-...
4
votes
How to exclude files from Projectile?
A new solution with no speed compromise of projectile
Since projetile-indexing-method is default set to alien, both
projectile-globally-ignored-directories and
projectile-globally-ignored-files will ...
4
votes
how to helm-projectile-grep for exact string?
Fuzzy matching should be switched off by default, but if you have a space character in your pattern it will turn fuzzy matching on.
If your query didn't have spaces, check your emacs config and make ...
4
votes
Accepted
How can I configure projectile to use my `grep-find-command`?
It is possible to set Projectile to use Git's version of the grep command. If you have Git installed on Windows, simply applying the configuration below should suffice:
(setq projectile-use-git-grep ...
4
votes
Accepted
Equivalent of helm-ag-edit with ivy
Thanks to this blogpost, I found a solution. The real tool that I was looking for was wgrep which does the multi-editing heavy lifting that I was missing. Here are the steps for using the Silver ...
4
votes
Accepted
3
votes
Projectile buffer names with project relative filenames
Actually, not quite as difficult as it seemed, added this to my init.el and it seems to work:
(defun my-proj-relative-buf-name ()
(rename-buffer
(file-relative-name buffer-file-name (projectile-...
3
votes
Stopping Neotree from constantly switching to the open file's directory?
Same issue here. I could solve it disabling neo-autorefresh variable.
My configuration with use-package:
(use-package neotree
:ensure t
:bind (([f8] . neotree-toggle))
:config (setq neo-...
3
votes
Incremental Search across Projectile project
I recommend projectile-ag for this. Works very well and is somewhat faster than isearch
3
votes
Accepted
Open files in git repo that have been edited since a previous commit or branch
Here's a complete working solution with an example keybinding for spacemacs.
The master branch is hard-coded in as the default branch to compare for file
changes against. If you want to diff against ...
3
votes
Delete trailing white space from all projectile project files
This works for me:
(defun projectile-delete-trailing-white-spaces-from-project-files ()
"Deletes trailing spaces from all projectile project files."
(interactive)
(let ((project-files (...
3
votes
a function to grep specified files?
The package elgrep is a quite powerful search tool. I just listed the features in an answer to a similar question.
Recursive search for occurences of regexp matches in specified files is only one of ...
3
votes
Accepted
projectile-run-project without prompt
The documentation of projectile-run-project command describes this.
(projectile-run-project ARG)
Run project run command.
Normally you’ll be prompted for a compilation command, unless ...
3
votes
How to override projectile keybind for custom one?
If you(or prelude maker) set it up as explained on the projectile(wrapped by helm-projectile) home(github.com), you'll bind the internal projectile-command-map to this minor-mode's projectile-mode-...
3
votes
How do you grep/ag in specific subdirectory of a project?
For grep itself, M-x rgrep (recursive from specified directory), and M-x lgrep (specified directory only) let you do this.
3
votes
How to mark a directory as "not a project" in projectile?
The name is not explanatory, but the function projectile-remove-current-project-from-known-projects works fine: simply navigate to the main-directory and call the command. Visited subprojects will ...
3
votes
Accepted
Auto insert include guard in cpp header when inside projectile project
Thanks to f-sasa, I was able to write my own yasnippet file in order to construct the include guard. With the help of this yasnippet example and also this thread about getting the projectile file path ...
3
votes
Projectile switch between opened projects
What I would want is a function or a package that could display all opened projectile projects with ivy or helm and let me choose a candidate. When the candidate would be selected, the last buffer ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
projectile × 207helm × 40
helm-projectile × 20
spacemacs × 10
project × 9
init-file × 7
ivy × 7
grep × 7
counsel × 7
debugging × 6
files × 6
git × 6
org-mode × 5
key-bindings × 5
python × 5
dired × 5
window × 5
mode-line × 5
doom × 5
ag × 5
buffers × 4
tramp × 4
use-package × 4
directory-local-variables × 4
magit × 3