-
-
Notifications
You must be signed in to change notification settings - Fork 582
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't provide any default keymap prefix
Turns out C-c C-p conflicted with many modes, so I think it's best to just leave it to the users to select whatever works best for them.
- Loading branch information
Showing
6 changed files
with
98 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,77 +23,72 @@ more powerful alternative to `ido`'s built-in `flex` matching. | |
|
||
## Interactive Commands | ||
|
||
!!! Note | ||
|
||
Projectile doesn't have a default key prefix for its commands, but all the examples | ||
in the manual assume you've opted for `s-p`. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
bbatsov
Author
Owner
|
||
|
||
Here's a list of the interactive Emacs Lisp functions, provided by Projectile: | ||
|
||
Keybinding | Description | ||
-------------------|------------------------------------------------------------ | ||
<kbd>C-c C-p f</kbd> | Display a list of all files in the project. With a prefix argument it will clear the cache first. | ||
<kbd>C-c C-p F</kbd> | Display a list of all files in all known projects. | ||
<kbd>C-c C-p g</kbd> | Display a list of all files at point in the project. With a prefix argument it will clear the cache first. | ||
<kbd>C-c C-p 4 f</kbd> | Jump to a project's file using completion and show it in another window. | ||
<kbd>C-c C-p 4 g</kbd> | Jump to a project's file based on context at point and show it in another window. | ||
<kbd>C-c C-p 5 f</kbd> | Jump to a project's file using completion and show it in another frame. | ||
<kbd>C-c C-p 5 g</kbd> | Jump to a project's file based on context at point and show it in another frame. | ||
<kbd>C-c C-p d</kbd> | Display a list of all directories in the project. With a prefix argument it will clear the cache first. | ||
<kbd>C-c C-p 4 d</kbd> | Switch to a project directory and show it in another window. | ||
<kbd>C-c C-p 5 d</kbd> | Switch to a project directory and show it in another frame. | ||
<kbd>C-c C-p T</kbd> | Display a list of all test files(specs, features, etc) in the project. | ||
<kbd>C-c C-p l</kbd> | Display a list of all files in a directory (that's not necessarily a project) | ||
<kbd>C-c C-p s g</kbd> | Run grep on the files in the project. | ||
<kbd>M-- C-c C-p s g</kbd> | Run grep on `projectile-grep-default-files` in the project. | ||
<kbd>C-c C-p v</kbd> | Run `vc-dir` on the root directory of the project. | ||
<kbd>C-c C-p V</kbd> | Browse dirty version controlled projects. | ||
<kbd>C-c C-p b</kbd> | Display a list of all project buffers currently open. | ||
<kbd>C-c C-p 4 b</kbd> | Switch to a project buffer and show it in another window. | ||
<kbd>C-c C-p 5 b</kbd> | Switch to a project buffer and show it in another frame. | ||
<kbd>C-c C-p 4 C-o</kbd> | Display a project buffer in another window without selecting it. | ||
<kbd>C-c C-p a</kbd> | Switch between files with the same name but different extensions. | ||
<kbd>C-c C-p 4 a</kbd> | Switch between files with the same name but different extensions in other window. | ||
<kbd>C-c C-p 5 a</kbd> | Switch between files with the same name but different extensions in other frame. | ||
<kbd>C-c C-p o</kbd> | Runs `multi-occur` on all project buffers currently open. | ||
<kbd>C-c C-p r</kbd> | Runs interactive query-replace on all files in the projects. | ||
<kbd>C-c C-p i</kbd> | Invalidates the project cache (if existing). | ||
<kbd>C-c C-p R</kbd> | Regenerates the projects `TAGS` file. | ||
<kbd>C-c C-p j</kbd> | Find tag in project's `TAGS` file. | ||
<kbd>C-c C-p k</kbd> | Kills all project buffers. | ||
<kbd>C-c C-p D</kbd> | Opens the root of the project in `dired`. | ||
<kbd>C-c C-p 4 D</kbd> | Opens the root of the project in `dired` in another window. | ||
<kbd>C-c C-p 5 D</kbd> | Opens the root of the project in `dired` in another frame. | ||
<kbd>C-c C-p e</kbd> | Shows a list of recently visited project files. | ||
<kbd>C-c C-p E</kbd> | Opens the root `dir-locals-file` of the project. | ||
<kbd>C-c C-p s s</kbd> | Runs `ag` on the project. Requires the presence of `ag.el`. | ||
<kbd>C-c C-p !</kbd> | Runs `shell-command` in the root directory of the project. | ||
<kbd>C-c C-p &</kbd> | Runs `async-shell-command` in the root directory of the project. | ||
<kbd>C-c C-p C</kbd> | Runs a standard configure command for your type of project. | ||
<kbd>C-c C-p c</kbd> | Runs a standard compilation command for your type of project. | ||
<kbd>C-c C-p P</kbd> | Runs a standard test command for your type of project. | ||
<kbd>C-c C-p t</kbd> | Toggle between an implementation file and its test file. | ||
<kbd>C-c C-p 4 t</kbd> | Jump to implementation or test file in other window. | ||
<kbd>C-c C-p 5 t</kbd> | Jump to implementation or test file in other frame. | ||
<kbd>C-c C-p z</kbd> | Adds the currently visited file to the cache. | ||
<kbd>C-c C-p p</kbd> | Display a list of known projects you can switch to. | ||
<kbd>C-c C-p S</kbd> | Save all project buffers. | ||
<kbd>C-c C-p m</kbd> | Run the commander (an interface to run commands with a single key). | ||
<kbd>C-c C-p ESC</kbd> | Switch to the most recently selected Projectile buffer. | ||
<kbd>s-p f</kbd> | Display a list of all files in the project. With a prefix argument it will clear the cache first. | ||
<kbd>s-p F</kbd> | Display a list of all files in all known projects. | ||
<kbd>s-p g</kbd> | Display a list of all files at point in the project. With a prefix argument it will clear the cache first. | ||
<kbd>s-p 4 f</kbd> | Jump to a project's file using completion and show it in another window. | ||
<kbd>s-p 4 g</kbd> | Jump to a project's file based on context at point and show it in another window. | ||
<kbd>s-p 5 f</kbd> | Jump to a project's file using completion and show it in another frame. | ||
<kbd>s-p 5 g</kbd> | Jump to a project's file based on context at point and show it in another frame. | ||
<kbd>s-p d</kbd> | Display a list of all directories in the project. With a prefix argument it will clear the cache first. | ||
<kbd>s-p 4 d</kbd> | Switch to a project directory and show it in another window. | ||
<kbd>s-p 5 d</kbd> | Switch to a project directory and show it in another frame. | ||
<kbd>s-p T</kbd> | Display a list of all test files(specs, features, etc) in the project. | ||
<kbd>s-p l</kbd> | Display a list of all files in a directory (that's not necessarily a project) | ||
<kbd>s-p s g</kbd> | Run grep on the files in the project. | ||
<kbd>M-- s-p s g</kbd> | Run grep on `projectile-grep-default-files` in the project. | ||
<kbd>s-p v</kbd> | Run `vc-dir` on the root directory of the project. | ||
<kbd>s-p V</kbd> | Browse dirty version controlled projects. | ||
<kbd>s-p b</kbd> | Display a list of all project buffers currently open. | ||
<kbd>s-p 4 b</kbd> | Switch to a project buffer and show it in another window. | ||
<kbd>s-p 5 b</kbd> | Switch to a project buffer and show it in another frame. | ||
<kbd>s-p 4 C-o</kbd> | Display a project buffer in another window without selecting it. | ||
<kbd>s-p a</kbd> | Switch between files with the same name but different extensions. | ||
<kbd>s-p 4 a</kbd> | Switch between files with the same name but different extensions in other window. | ||
<kbd>s-p 5 a</kbd> | Switch between files with the same name but different extensions in other frame. | ||
<kbd>s-p o</kbd> | Runs `multi-occur` on all project buffers currently open. | ||
<kbd>s-p r</kbd> | Runs interactive query-replace on all files in the projects. | ||
<kbd>s-p i</kbd> | Invalidates the project cache (if existing). | ||
<kbd>s-p R</kbd> | Regenerates the projects `TAGS` file. | ||
<kbd>s-p j</kbd> | Find tag in project's `TAGS` file. | ||
<kbd>s-p k</kbd> | Kills all project buffers. | ||
<kbd>s-p D</kbd> | Opens the root of the project in `dired`. | ||
<kbd>s-p 4 D</kbd> | Opens the root of the project in `dired` in another window. | ||
<kbd>s-p 5 D</kbd> | Opens the root of the project in `dired` in another frame. | ||
<kbd>s-p e</kbd> | Shows a list of recently visited project files. | ||
<kbd>s-p E</kbd> | Opens the root `dir-locals-file` of the project. | ||
<kbd>s-p s s</kbd> | Runs `ag` on the project. Requires the presence of `ag.el`. | ||
<kbd>s-p !</kbd> | Runs `shell-command` in the root directory of the project. | ||
<kbd>s-p &</kbd> | Runs `async-shell-command` in the root directory of the project. | ||
<kbd>s-p C</kbd> | Runs a standard configure command for your type of project. | ||
<kbd>s-p c</kbd> | Runs a standard compilation command for your type of project. | ||
<kbd>s-p P</kbd> | Runs a standard test command for your type of project. | ||
<kbd>s-p t</kbd> | Toggle between an implementation file and its test file. | ||
<kbd>s-p 4 t</kbd> | Jump to implementation or test file in other window. | ||
<kbd>s-p 5 t</kbd> | Jump to implementation or test file in other frame. | ||
<kbd>s-p z</kbd> | Adds the currently visited file to the cache. | ||
<kbd>s-p p</kbd> | Display a list of known projects you can switch to. | ||
<kbd>s-p S</kbd> | Save all project buffers. | ||
<kbd>s-p m</kbd> | Run the commander (an interface to run commands with a single key). | ||
<kbd>s-p ESC</kbd> | Switch to the most recently selected Projectile buffer. | ||
|
||
If you ever forget any of Projectile's keybindings just do a: | ||
|
||
<kbd>C-c C-p C-h</kbd> | ||
|
||
You can change the default keymap prefix `C-c C-p` like this: | ||
|
||
```el | ||
(setq projectile-keymap-prefix (kbd "C-c p")) | ||
``` | ||
|
||
!!! Note | ||
|
||
`C-c p` used to be the default prefix up to version 1.1. | ||
<kbd>s-p C-h</kbd> | ||
|
||
It is also possible to add additional commands to | ||
It is possible to add additional commands to | ||
`projectile-command-map` referenced by the prefix key in | ||
`projectile-mode-map`. You can even add an alternative prefix for all | ||
commands. Here's an example that adds `super-p` as the extra prefix: | ||
commands. Here's an example that adds `super-p` as a command prefix: | ||
|
||
```el | ||
(define-key projectile-mode-map (kbd "s-p") 'projectile-command-map) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is probably obvious, but what is
s-p
? How does someone type that?C-c p
makes sense: as [control] + [c] and then [p]The README does suggest setting both: