Questions tagged [projectile]

Projectile is a project management package and framework that facilitates operations against the project as a whole.

Filter by
Sorted by
Tagged with
39
votes
4answers
16k views

How to exclude files from Projectile?

I am using the helm-projectile setup from prelude and it has been a huge improvement to my workflow. The only remaining issue are auto-generated files (e.g. generated by CMake) which show up during ...
33
votes
2answers
10k views

How to clear cache of projectile file in spacemacs?

I am using spacemacs and often use the SPC p f key binding to find files in a projectile project. But even after removing a file from a git, SPC p f will show me that deleted file. I tried using SPC ...
11
votes
1answer
3k views

Projectile does not show all files in project

After visiting a file that is part of a git repository, Projectile acknowledges the existence of my git repository as a project, but it only lists one file (the current file) as being part of the ...
10
votes
6answers
7k views

Recursive grep in directory with helm and/or projectile?

A recursive grep in a directory should be the simplest thing, but I haven't found the recipe to get it to work yet. I'm juggling between the following commands and am not sure which has the ...
10
votes
1answer
3k views

Mark and open multiple files with Helm and Projectile

Helm seem to support marking files in helm-find-files. Is it possible to open the marked files, each one inside of its own buffer from within the find file buffer? Update: I noticed that I was using ...
9
votes
1answer
990 views

Open helm search result in a new window?

Commands like helm-projectile-grep, helm-swoop, projectile-find-file are extremely useful for jumping around code. However, so far I've not found how I can open a search result in a new window (...
9
votes
2answers
1k views

Projectile with caching doesn't like new files

I use projectile for my project browsing. I have seen that it's really slow, so I turned on caching. Now it's fast (not blazingly fast, sadly). If I create a new file outside emacs itself, projectile ...
8
votes
3answers
1k views

ibuffer: how to automatically create groups per project

I'd like to group my buffer list in ibuffer by project. Project is meant in the Projectile sense of the word. I don't want to change my Emacs configuration every time I'm working on a new project. Is ...
8
votes
1answer
1k views

Turn on projectile-mode only for files in actual projects

Projectile is pretty great, but I'm finding it difficult to have it turned on only in places where it would be effective. As I understand it, the two standard choices are to turn it on manually, as ...
7
votes
1answer
3k views

How can the list of projects used by Projectile be manually updated?

I use the command locate --regex '/.git$' | grep username to get a list of all the Git repositories under my $HOME folder. Is there a way to load them all into Projectile, to make them all instantly ...
7
votes
2answers
4k views

A search interface for org mode files

I use org-mode to take notes. Currently I have a root directory, say, "Notes", and there are several subdirectories inside it, for example, "Linux", "Programming", etc. The notes taken using org-mode ...
7
votes
1answer
750 views

How do I bind keys in ido?

I'm trying Projectile + ido + flx-ido (just for Projectile, ido-mode disabled otherwise). But: I don't like using right and left to switch between items. I want to change them into up and down, but ...
7
votes
1answer
2k views

variable project root folder in .dir-locals.el

I'm using company-mode for completion in C++ code. To tell clang backend of company where the include files for the current project are I have to use the following .dir-locals.el file ((c++-mode (...
6
votes
2answers
3k views

Automatically add project directory to flycheck clang/gcc include path

I want to use syntax checking with Flycheck in my C++ projects, but the Clang checker fails to find the local file includes. For example, when I have: #include "foo/bar/x.h" in the file foo2/y.cc, ...
6
votes
1answer
2k views

Projectile installed but “Autoloading failed to define function projectile-mode”

I can M-x projectile-mode (I get this and other projectile commands in the completion list) but it fails with Autoloading failed to define function projectile-mode Projectile is an installed ...
6
votes
1answer
813 views

Close other buffers with projectile

Projectile has a function to close all buffers related to a project (projectile-kill-buffers). Normally I also open non project related files during the day or emacs opens them when I'm stepping ...
6
votes
2answers
449 views

How to remove the projectile project name after the file name

I am attempting to clean up my modeline due to overcrowding. In my quest I have come across a problem I cannot figure out, namely projectile. By this I mean the project name after the file name, it ...
6
votes
0answers
1k views

Projectile only sees project related to current buffer, if the buffer belongs to a project

I have two projects opened in my Emacs. Both are git repos and have .projectile files in their directories. Relevant lines in my init.el (projectile-global-mode 1) (helm-mode) (setq projectile-...
5
votes
2answers
346 views

How to set Projectile project name as frame title

I would like to have the Projectile project name as frame title and also have it updated when I switch between two different buffers in two different Projectile projects. I tried with the following: (...
5
votes
1answer
971 views

Projectile indexes my home directory, how do I stop it from doing that?

Since I updated the whole of my emacs third party packages projectile has started to see my home folder (which emacs opens in) as a projectile project. There is no .projectile file in my home folder, ...
5
votes
1answer
649 views

Run hook on new buffer

I am trying to create something like uniquely, which renames the buffer to the full path within the projectile project. I have the code working, however, I can't seem to figure out how to get it to ...
5
votes
1answer
192 views

how to helm-projectile-grep for exact string?

How can I direct helm-projectile-ag and helm-projectile-grep to search for an exact string? If I enclose a string in quotes, I get no results. If I don't, I get fuzzy matching.
5
votes
1answer
844 views

Can I make the projectile chosen project sticky and not follow the current buffer

Is it possible to make projectile only switch projects when calling projectile-switch-project, and not follow the buffers? When I switch buffers in emacs, projectile will switch project to the ...
5
votes
0answers
2k views

Best practice for Emacs Helm setup after (use-package) verse [closed]

Just recently discovered use-package (a macro written by John Wiegley) that comes in handy if you want to avoid .emacs bankruptcy declaration and keep things tidy in your configuration dot file. ...
4
votes
2answers
593 views

How to detect if in a project, then configure another keybinding for Projectile?

I have a keybinding that's bounded to helm-for-files. (define-key evil-normal-state-map (kbd "<f9>") 'helm-for-files) But when I enter a directory which is a project (to being recognized with ...
4
votes
2answers
3k views

Ignoring files in Projectile

After googling and being recommended projectile as project navigation, I ended up trying that. I'm now frustrated by the lack of tutorials and/or explanations on how it works, so I was hoping somebody ...
4
votes
3answers
1k views

Stopping Neotree from constantly switching to the open file's directory?

I have the problem that, even when I'm in a projectile project, NeoTree always switches to the directory of the currently open file in the active buffer. Which is annoying to say the least. It used ...
4
votes
1answer
2k views

Adding a new project type to Projectile Mode

I would like Projectile Mode to recognize other projects besides the default ones (GIT, Maven, etc.) The README.md describes how to customize project root files, however it doesn't explain how ...
4
votes
3answers
713 views

find-grep-dired equivalents for ack and ag

Is there an equivalent find-grep-dired using ack or ag? With the ability to specify the directory where the search starts? The Dired output itself is not so important (in fact I prefer the ack-mode ...
4
votes
1answer
576 views

Projectile not showing all files under my Git project

I'm using Projectile to index a Rails 4 project. When I use M-x projectile-find-file to locate files using their file name, some files simply don't appear. For example, I have a file located in app/...
4
votes
1answer
78 views

Emacs hashtag bracket(#[]) notation

When choosing a project using helm-projectile-switch-project one can type C-d to run dired on that project root directory. Running describe-key on C-d returns the following function: #[nil "\300\301!...
4
votes
2answers
556 views

projectile-rails: run the current test

While it is easy to run the whole test suite with projectile-rails, this takes too much time. I'd like to be able to run the current test (i.e., the test point is located in) with a shortcut. Is this ...
4
votes
2answers
255 views

Projectile project in folder without write access?

At times I want to browse the code of projects to which I have read-only access. This makes it impossible for me to drop a .projectile file at the root of the project. Is there a way to define ...
4
votes
1answer
637 views

Regenerate ctags TAGS file without freezing Emacs for a while?

When I'm currently in a large project and I call the command projectile-regenate-tags, the project will be scanned by ctags and the tags will be stored in the TAGS file. While all this action is ...
4
votes
1answer
701 views

Setting projectile-keymap-prefix with use-package

I use persp-mode and projectile both of which are installed using the use-package package and both want to prefix their keymaps with C-c p. The projectile readme says that you can define a custom ...
4
votes
1answer
574 views

helm-projectile startup issue

I installed helm and projectile and added the following to my .emacs: (require 'helm) (projectile-global-mode) (setq projectile-completion-system 'helm) (helm-projectile-on) But I get this error ...
4
votes
1answer
516 views

how do I write a projectile-switch-action that changes the current working directory to the chosen project's root dir?

I want that when I choose a project from the list presented by projectile-switch-project, projectile changes the current working directory to the chosen project's root directory. I tried this: ;; ...
4
votes
0answers
738 views

projectile grep file filter

I'm trying to use helm-projectile-grep function on Windows 7, but it searches in every file, though in .projectile I excluded file types which I don't want to work with. Do I have to configure grep ...
4
votes
0answers
1k views

helm-projectile-ag : How can I refine the grep results further?

I have a newb question regarding the use of Helm in the context of Projectile. I'm using helm-projectile-ag to grep for strings in a large code base. The performance is excellent, but I'm needing to ...
3
votes
3answers
1k views

Find in Project with Ack

Trying to find in Project with Projectile.. In the Projectile menu i have Find in project (grep) Find in project (ack) Grep works but if i try ack i get.. -*- mode: ack-and-a-half; default-...
3
votes
1answer
2k views

How to use .dir-locals.el with Projectile?

I'm trying to ignore some file patterns while performing helm-projectile-grep and some with helm-projectile-find-file. I've found that it could be achieved using .dir-locals.el here. Following this ...
3
votes
1answer
336 views

Projectile and magit branch checkout

Every time I use M-x magit-status b b to checkout a different branch, the projectile cache is of course out of date. I then use M-x projectile-invalidate-cache to force projectile to rebuild its cache ...
3
votes
1answer
322 views

Show counsel-ag results in separate buffer?

I use counsel-projectile for Ivy + Projectile interoperability. But, when I run something like C-c p s s / M-x counsel-projectile-ag, the results are shown in the minibuffer, and I can't see any ...
3
votes
2answers
212 views

Delete trailing white space from all projectile project files

Problem So the problem is pretty straight forward I'm just trying to get delete trailing spaces from all files in a projectile project. Here's what I've tried so far: (defun projectile-delete-...
3
votes
1answer
1k views

How can I whitelist a file or directory that is in my .gitignore?

In my Clojure projects, I like to keep my REPL namespace separate from my other source files, so I always have something like this in my project.clj: :profiles {:dev {:source-paths ["dev"] ...
3
votes
1answer
223 views

How do I add a keybinding to a keymap that is on a prefix key

I just installed the pt.el package and now I want to bind projectile-pt to the default projectile search prefix (which is C-c p s). The goal is to have it as C-c p s p to begin with but also to have ...
3
votes
1answer
536 views

Show colors in mode-line for minor modes

Can't get colors to show up in the mode-line. (eval-after-load "projectile" '(setq projectile-mode-line '(:eval (concat " Pj[" (propertize (projectile-project-...
3
votes
1answer
116 views

Open files in git repo that have been edited since a previous commit or branch

Is there a way to provide a list of files that have been edited since a previous commit or branch with helm and projectile integration? The use case is as follows: Create feature branch feat-my-...
3
votes
1answer
66 views

How to execute a function in all files in the git working tree?

How to invoke a function on all files in the git working tree, while opening the ones which have had no opened buffers beforehand? A potential use case: Check and fix spelling in all project files ...
3
votes
2answers
76 views

project based ibuffer

I have emacs 27 on MacOS running in -nw mode. I have prelude installed. It comes with projectile. I regularly work on two git repos in my disk. ~/client1/ ~/client2/ In any given day, I would open ...