Skip to main content
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 ...
Basil's user avatar
  • 12.6k
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 ;; ...
Chakravarthy Raghunandan's user avatar
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) ...
takaxp's user avatar
  • 116
9 votes
Accepted

Show counsel-ag results in separate buffer?

Try C-c C-o (ivy-occur) in the minibuffer.
Erik Hetzner's user avatar
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
user10375's user avatar
  • 245
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-...
Mitchell Tracy's user avatar
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 ...
Basil's user avatar
  • 12.6k
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-...
Tu Do's user avatar
  • 6,882
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-...
glucas's user avatar
  • 20.9k
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 ...
chen bin's user avatar
  • 4,957
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 ...
Navidot's user avatar
  • 792
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 ...
greenbug's user avatar
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-...
haroldcarr's user avatar
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 ...
oracleyue's user avatar
  • 161
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 ...
alecvn's user avatar
  • 419
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 ...
Arthur Colombini Gusmão's user avatar
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 ...
Ashton Wiersdorf's user avatar
4 votes
Accepted

counsel-rg how to repeat last search?

M-p will do it. Works like most list commands.
Muihlinn's user avatar
  • 2,684
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-...
Michael's user avatar
  • 151
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-...
Birei's user avatar
  • 131
3 votes

Incremental Search across Projectile project

I recommend projectile-ag for this. Works very well and is somewhat faster than isearch
tanenbring's user avatar
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 ...
Joe's user avatar
  • 1,342
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 (...
Jack's user avatar
  • 780
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 ...
Tobias's user avatar
  • 33.7k
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 ...
mkcms's user avatar
  • 1,400
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-...
roomworoof's user avatar
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.
phils's user avatar
  • 53k
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 ...
T. Verron's user avatar
  • 4,323
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 ...
johhnry's user avatar
  • 31
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 ...
Basil's user avatar
  • 12.6k

Only top scored, non community-wiki answers of a minimum length are eligible