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 ...
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. ...
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 ...
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 .git ...
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-...
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 ...
.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 ...
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 ...
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 "&...
Okay, this was dumb ... I had an empty Makefile sitting in my home directory. And because Projectile Project Root Files Top Down Recurring tells Projectile to recognize a Makefile as project root my home folder got picked up.
Just in case anybody has a similar problem in the future: If projectile picks up unwanted folders try to disable automatic project ...
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.
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")
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-...
You can advise create-file-buffer, if you care only about file buffers.
Likewise, you can advise rename-buffer.
That's what uniquify does, for instance. Are you familiar with uniquify.el? Maybe it offers all that you need. See the Emacs manual, node Uniquify.
I found the solution with projectile. It has a function projectile-project-root which can be used to get the project path.
I can noe use the following in .dir-locals.el and it will still work when I move the project or use it on another machine.
((nil . ((eval . (progn
Allowing user to custom action is a great feature of helm, for example, to use ace-window to select a window for buffer to switch, all you need to do is implement it as an action:
(defun helm-buffer-ace-window (buffer)
"Use ‘ace-window’ to select a window to display BUFFER."
then use this action:...
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?