aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md8
-rw-r--r--doc/modules/ROOT/pages/usage.adoc18
-rw-r--r--projectile.el9
3 files changed, 28 insertions, 7 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7b44063..53fa726 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -39,6 +39,14 @@
* Speed-up load time by moving known projects initialization outside of `projectile-mode`'s init.
* As a side effect the known projects will be initialized properly even if you're not using `projectile-mode`.
* The projects are read from disk the first time you invoke `projectile-switch-project` or a similar command.
+* Introduce a common prefix for project lifecycle command keybindings:
+ * `c o` -> `projectile-configure-project`
+ * `c c` -> `projectile-compile-project`
+ * `c p` -> `projectile-package-project`
+ * `c i` -> `projectile-install-project`
+ * `c t` -> `projectile-test-project`
+ * `c r` -> `projectile-run-project`
+ * The old keybindings will be removed in a future version of Projectile.
## 2.8.0 (2023-10-13)
diff --git a/doc/modules/ROOT/pages/usage.adoc b/doc/modules/ROOT/pages/usage.adoc
index 06ed9c1..1aa1602 100644
--- a/doc/modules/ROOT/pages/usage.adoc
+++ b/doc/modules/ROOT/pages/usage.adoc
@@ -134,8 +134,10 @@ You need to know only a handful of Projectile commands to start benefiting from
* Toggle between related files (e.g. `foo.h` <-> `foo.c` and `Gemfile` <-> `Gemfile.lock`) (kbd:[s-p a])
* Run a shell command in the root of the project (kbd:[s-p !] for a sync command and kbd:[s-p &] for an async command)
* Run various pre-defined project commands like:
-** build/compile project (kbd:[s-p c])
-** test project (kbd:[s-p T])
+** build/compile project (kbd:[s-p c c])
+** test project (kbd:[s-p c t])
+** install project (kbd:[s-p c i])
+** run project (kbd:[s-p c r])
The next section lists many more commands, but the basics can get you pretty far.
@@ -272,15 +274,21 @@ Here's a list of the interactive Emacs Lisp functions, provided by Projectile:
| kbd:[s-p &]
| Runs `async-shell-command` in the root directory of the project.
-| kbd:[s-p C]
+| kbd:[s-p c o]
| Runs a standard configure command for your type of project.
-| kbd:[s-p c]
+| kbd:[s-p c c]
| Runs a standard compilation command for your type of project.
-| kbd:[s-p P]
+| kbd:[s-p c t]
| Runs a standard test command for your type of project.
+| kbd:[s-p c i]
+| Runs a standard install command for your type of project.
+
+| kbd:[s-p c r]
+| Runs a standard run command for your type of project.
+
| kbd:[s-p t]
| Toggle between an implementation file and its test file.
diff --git a/projectile.el b/projectile.el
index 740e61f..c1ce7d3 100644
--- a/projectile.el
+++ b/projectile.el
@@ -6165,9 +6165,14 @@ thing shown in the mode line otherwise."
(define-key map (kbd "v") #'projectile-vc)
(define-key map (kbd "V") #'projectile-browse-dirty-projects)
;; project lifecycle external commands
- ;; TODO: Bundle those under some prefix key
+ (define-key map (kbd "c o") #'projectile-configure-project)
+ (define-key map (kbd "c c") #'projectile-compile-project)
+ (define-key map (kbd "c p") #'projectile-package-project)
+ (define-key map (kbd "c i") #'projectile-install-project)
+ (define-key map (kbd "c t") #'projectile-test-project)
+ (define-key map (kbd "c r") #'projectile-run-project)
+ ;; TODO: Legacy keybindings that will be removed in Projectile 3
(define-key map (kbd "C") #'projectile-configure-project)
- (define-key map (kbd "c") #'projectile-compile-project)
(define-key map (kbd "K") #'projectile-package-project)
(define-key map (kbd "L") #'projectile-install-project)
(define-key map (kbd "P") #'projectile-test-project)