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
47
votes
5answers
21k 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 ...
35
votes
2answers
13k 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 ...
13
votes
2answers
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 ...
13
votes
1answer
1k 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 (...
12
votes
1answer
4k 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 ...
11
votes
6answers
8k 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 ...
9
votes
3answers
2k 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 ...
9
votes
1answer
5k 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 ...
9
votes
2answers
2k 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
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 ...
8
votes
1answer
3k 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 (...
7
votes
2answers
5k 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
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 ...
7
votes
1answer
809 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
1k 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 ...
7
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-...
6
votes
2answers
4k 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
847 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 ...
6
votes
1answer
846 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 ...
6
votes
2answers
469 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
1answer
306 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.
6
votes
0answers
3k 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. ...
5
votes
2answers
732 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 ...
5
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 ...
5
votes
2answers
533 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
3k 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 ...
5
votes
1answer
231 views

Equivalent of helm-ag-edit with ivy

I've been trying to switch to Ivy from Helm for the past little while. One feature I miss (and because of this I keep helm installed) is the ability to run helm-ag, and then to hit C-c C-e so I can ...
5
votes
1answer
1k 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
1k 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
118 views

Sort ripgrep results based on proximity to current buffer

I use counsel-projectile-rg to search within the project I work on. But there is my sub-project inside this big repo that most of my development is in. Is there a way to sort ripgrep results based on ...
5
votes
0answers
877 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 ...
5
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 ...
4
votes
2answers
808 views

Get file name relative to projectile root

I am trying to write a little function to get the projectile relative path of a buffer. My idea is to delete the substring projectile-project-root from the string buffer-file-name. For example: root-...
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
829 views

Open file in a specific window

Very similar to this question. I'm using helm-projectile to find files. My Emacs frame is divided in three vertical column windows. In one of the windows I have an open file from the project I'm ...
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
768 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
730 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
90 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
612 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
288 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
147 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-...
4
votes
1answer
888 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
647 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
787 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
716 views

Projectile not remembering remote projects

I'm using spacemacs and regularly use Tramp (via /sshx:) to open files, once I've opened a file in Tramp I can use projectile without any problems. However, projectile doesn't remember these projects ...
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
2answers
415 views

helm-projectile-ag use thing-at-point as input?

I want to use the current word as the input when I do helm-projectile-ag. That saves me the typing work. I didn't see this option in customize. How would I implement that?
3
votes
1answer
439 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
1answer
431 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 ...