Looking at projectile it seems to offer four customizations for ignoring
files/directories globally. I am listing each of them below, with their
A list of files globally ignored by projectile.
A list of directories globally ignored by projectile.
Type M-x projectile-invalidate-cache and you'll see the command with the bindings listed next to it. For me the bindings said M-m p I which was correct, and should be the default I suspect for holy mode (spc p I for evil mode).
Yes, use C-SPC to mark each file individually or mark all with M-a, then press RET to open all those files. I wrote a Helm guide here that covers Helm basics and most of default commands. Also check my helm-projectile. It has the multifile opening right at the beginning.
Aside from the answer above, the question was updated with the question to open ...
So, it's about the modeline. You can set projectile-mode-line to check if you are in a project root; if so, displays in the modeline, otherwise displays nothing:
'(:eval (if (projectile-project-p)
(format " Projectile[%s]"
You have two ways:
Use helm-projectile-grep/ack/ag: You can search for everything starting from project root. Later if you want to save the search results, press F3 or press TAB to switch to action menu and select the 3rd action. To navigate hgrep buffer:
C-<down>: go to next match and open the match.
C-<up>: go to previous match and open the ...
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 directory of a project.
In order to add multiple projects at a time, you can use projectile-known-projects-file, which is read when projectile.el is first loaded. ...
Once activated, projectile works out-of-the-box for git projects. To activate include
in your Emacs configuration (or start projectile-mode) manually.
Then projectile-find-file (default key binding is C-c p f) works just like find-file, but will act on all files in the subdirectories of the project's main directory (where the ....
Okay, let me share a bit of the process of arriving at the solution to Question #1 (which should also resolve #2).
I'm going to assume you know Emacs key notation and at least a little about Elisp.
It's hard. :)
First, let's think a bit. helm-projectile-find-file is definitely calling find-file or some similar function at some point. You ...
According to the source code, you need to modify keybindings via ido-setup-hook:
;; Customize the `ido' group to change the `ido' functionality.
;; To modify the keybindings, use the ido-setup-hook. For example:
;;(add-hook 'ido-setup-hook 'ido-my-keys)
;;(defun ido-my-keys ()
;; "Add my keybindings for ido."
ack-and-a-half is now abandonware.
I don't think plain projectile-ack is still functional in current Projectile -- maybe you should try ag.
If you really want ack, you could give helm-projectile-ack a try.
Org itself provides a facility for filtering/searching information stored in .org files in various ways. It is called the "Agenda". The org-mode manual provides extensive information on how to use it (check the link above or do C-h i m Org Mode RET from within Emacs and navigate to the "Agenda Views" chapter), so it does not make sense to repeat all of this ...
You can do it like this:
(defun contextual-f9 ()
(if (projectile-project-p) ;; detect if current buffer is in a project
(define-key evil-normal-state-map (kbd "<f9>") 'helm-projectile)
(define-key evil-normal-state-map (kbd "<f9>") 'helm-for-files)))
(add-hook 'find-file-hook #'contextual-f9)
(add-hook 'dired-mode-hook #'contextual-...
Use projectile-project-root to get the root path and add it to the list with a c++-mode-hook
(defun setup-flycheck-clang-project-path ()
(let ((root (ignore-errors (projectile-project-root))))
(add-hook 'c++-mode-hook 'setup-flycheck-clang-...
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
(when (executable-find "rg")
.dir-locals.el does not care about the meaning of the variables that it sets, nor does it assume their values are lists (they do not have to be.) So it does not perform any merge or other processing. The only thing that's been taken into account is precedence which is described in the documentation you have linked to.
The values are interpreted as-is, emacs ...
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-z f3
After this you can move around the results like a regular buffer, and if you have two windows up, hitting RET on a result entry will open the entry in the ...
Actually you can do it by using a wrapper of those two functions:
(defun smart-for-files ()
"Call `helm-projectile' if `projectile-project-p', otherwise
fallback to `helm-for-files'."
then set the keybinding as you want:
(define-key evil-normal-state-map (kbd "&...
You got the error "Autoloading failed to define function" because multiple packages are apparently active in your load-path. Try M-x list-load-path-shadows to get a clue which packages are conflicting.
Your main question isn't really about global modes at all.
global-linum-mode is (auto) loaded in Emacs by default, and so is available to all Emacs users at all times.
projectile-global-mode is in a third-party package you've installed via the package manager, and therefore unavailable until your ELPA packages have been initialized.
Regarding your second ...
I have no idea how to check which magit-xyz command is triggered when using b b in magit-status.
Use b ? b in magit-status. This tells you it runs magit-checkout.
And even if I knew: How would I transparently "overwrite" that command to first call its previous definition and then projectile-invalidate-cache?
The quick answer is to invalidate the projectile cache. When using projectile-find-file if you use C-u to send the universal argument before running the function, it will invalidate the cache before searching it. To match your example;
C-u M-x projectile-find-file
There are a number of other functions in projectile that use the prefix argument, check for ...
You can define filter groups for known projects using something like this:
;; Define ibuffer filter groups for each known project
(defun my/define-projectile-filter-groups ()
(when (boundp 'projectile-known-projects)
(let ((name (file-name-nondirectory (directory-file-...
Project is meant in the Projectile sense of the word.
Using Projectile, there is a way to switch to a buffer inside a specific project C-c p b
May I suggest ibuffer-vc? A way to group your buffers by their parent vc root directory.
The bindings for projectile are stored in projectile-command-map, so we can use define-key to add more stuff: (define-key projectile-command-map (kbd "s p") #'projectile-pt). This adds s p to whatever projectile-keymap-prefix happens to be.
Assuming you have projectile-indexing-method set to 'alien' (the
default except for Windows), if the VCS isn't recognized, projectile
will call projectile-generic-command, which is "find . -type f
-print0" by default. If you want to take a closer look,
projectile-get-ext-command is the function that decides to what to
I don't think there's any easy ...
According to the source, I would reckon ack-and-a-half-executable is nil. This would explain the output you get. Again from the source, it would appear that ack is not visible to Emacs.
Note the TODO:
; TODO Determine how to fall back to using ack-grep if ack is not found.
(defcustom ack-and-a-half-executable (executable-find "ack")
"*The location of ...
Save the below function to your emacs init and call it via M-x.
By default this function will kill all buffers except the ones that belong to a projectile project or are special.
The same function will also kill special buffers (except *scratch* and *Messages*) if called with a prefix like C-u.
(defun modi/kill-non-project-buffers (&optional kill-...