From e749abc6d75af7392b29b12f8f133e3d3ac9aabd Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 00:43:42 -0400 Subject: [PATCH 01/16] Update old name of submodules in .gitmodules --- .gitmodules | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitmodules b/.gitmodules index 5e53a28e341e..d74ae3056cec 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,33 +1,33 @@ -[submodule "extensions/pylookup"] +[submodule "spacemacs/extensions/pylookup"] path = spacemacs/extensions/pylookup url = http://github.com/syl20bnr/pylookup -[submodule "extensions/projmake-mode"] +[submodule "spacemacs/extensions/projmake-mode"] path = extensions/projmake-mode url = http://github.com/ericbmerritt/projmake-mode -[submodule "extensions/revive"] +[submodule "spacemacs/extensions/revive"] path = spacemacs/extensions/revive url = http://github.com/vedang/revive-mode.git -[submodule "extensions/helm-c-moccur"] +[submodule "spacemacs/extensions/helm-c-moccur"] path = extensions/helm-c-moccur url = http://github.com/syl20bnr/helm-c-moccur -[submodule "extensions/solarized-theme"] +[submodule "spacemacs/extensions/solarized-theme"] path = spacemacs/extensions/solarized-theme url = http://github.com/syl20bnr/solarized-emacs ignore = dirty -[submodule "extensions/evil-plugins"] +[submodule "spacemacs/extensions/evil-plugins"] path = spacemacs/extensions/evil-plugins url = http://github.com/tarao/evil-plugins -[submodule "extensions/nose"] +[submodule "spacemacs/extensions/nose"] path = spacemacs/extensions/nose url = http://github.com/syl20bnr/nose.el -[submodule "snippets"] +[submodule "spacemacs/snippets"] path = spacemacs/snippets url = http://github.com/syl20bnr/yasnippet-snippets ignore = dirty -[submodule "extensions/use-package"] +[submodule "spacemacs/extensions/use-package"] path = spacemacs/extensions/use-package url = http://github.com/jwiegley/use-package -[submodule "extensions/emoji-cheat-sheet"] +[submodule "spacemacs/extensions/emoji-cheat-sheet"] path = spacemacs/extensions/emoji-cheat-sheet url = http://github.com/ShingoFukuyama/emacs-emoji-cheat-sheet [submodule "spacemacs/extensions/evil-org-mode"] From 1dfc0dfc17ecb2e0a5ff7bcc68c723daeb9db59d Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 00:44:38 -0400 Subject: [PATCH 02/16] Lazy loading of tern-auto-complete --- spacemacs/packages.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index ef577dd2a111..b9907c55d8f5 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1792,9 +1792,9 @@ DELETE-FUNC when calling CALLBACK. (use-package tern-auto-complete :defer t :init - (progn - (tern-ac-setup) - (add-hook 'js2-mode-hook (lambda () (tern-mode t)))))) + (add-hook 'js2-mode-hook (lambda () (tern-mode t))) + :config + (tern-ac-setup))) (defun spacemacs/init-undo-tree () (use-package undo-tree From 53a44d25263e5b12bd1cc70e0c2627b07b3f5e52 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 00:46:16 -0400 Subject: [PATCH 03/16] Lazy loading of helm --- spacemacs/packages.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index b9907c55d8f5..6e9c59a4518f 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1269,8 +1269,7 @@ DELETE-FUNC when calling CALLBACK. (defun spacemacs/init-helm () (use-package helm - :idle (helm-mode 1) - :idle-priority 0 + :defer t :config (progn (evil-leader/set-key From 20de49cb512731bbe9f4af99e48e4a2aa7769314 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 01:03:01 -0400 Subject: [PATCH 04/16] Fixes #46 Weird behavior of projectile Projectile takes time to load (around 0.2 seconds) and it is lazy loading friendly if we want to enable it globally. To be able to lazy load it, we encapsulate the binded calls in spacemacs/xxx functions which take care of firing the mode globally if required. --- spacemacs/packages.el | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 6e9c59a4518f..faeae4dd29be 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1560,24 +1560,34 @@ DELETE-FUNC when calling CALLBACK. (defun spacemacs/init-projectile () (use-package projectile - :commands (projectile-switch-to-buffer - projectile-invalidate-cache - projectile-dired - projectile-find-file - projectile-kill-buffers - projectile-grep - projectile-replace) + :commands projectile-global-mode :init - (evil-leader/set-key - "pC" 'projectile-invalidate-cache - "pd" 'projectile-dired - "pF" 'projectile-find-file - "pg" 'projectile-grep - "pk" 'projectile-kill-buffers - "pr" 'projectile-replace - "ps" 'projectile-switch-to-buffer) + (progn + (defun spacemacs/projectile-lazy-loading (func) + "Wrap FUNC in order to be able to lazy load projectile." + (let ((funcstr (symbol-name func))) + (eval `(defun ,(intern (format "spacemacs/%s" funcstr)) (arg) + ,(format "Call %s" funcstr) + (interactive "P") + (projectile-global-mode) + (call-interactively ',func arg))))) + (mapc 'spacemacs/projectile-lazy-loading '(projectile-invalidate-cache + projectile-dired + projectile-find-file + projectile-grep + projectile-kill-buffers + projectile-replace + projectile-switch-to-buffer)) + (evil-leader/set-key + "pC" 'spacemacs/projectile-invalidate-cache + "pd" 'spacemacs/projectile-dired + "pF" 'spacemacs/projectile-find-file + "pg" 'spacemacs/projectile-grep + "pk" 'spacemacs/projectile-kill-buffers + "pr" 'spacemacs/projectile-replace + "ps" 'spacemacs/projectile-switch-to-buffer)) :config - (spacemacs//diminish projectile-mode " Ⓟ"))) + (spacemacs//hide-lighter projectile-mode))) (defun spacemacs/init-python () (use-package python From 3a3bb27b8d49848b3ac620e534dfe0489da391e3 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 09:07:41 -0400 Subject: [PATCH 05/16] Correctly load helm bindings at initialization time instead of at loading time which is useless :-) --- spacemacs/packages.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index faeae4dd29be..29d95bba7fa5 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1270,14 +1270,15 @@ DELETE-FUNC when calling CALLBACK. (defun spacemacs/init-helm () (use-package helm :defer t - :config - (progn - (evil-leader/set-key + :init + (evil-leader/set-key ":" 'helm-M-x "bs" 'helm-mini "sl" 'helm-semantic-or-imenu "hb" 'helm-bookmarks "kil" 'helm-how-kill-ring) + :config + (progn ;; alter helm-bookmark key bindings to be simpler (defun simpler-helm-bookmark-keybindings () (define-key helm-bookmark-map (kbd "C-d") 'helm-bookmark-run-delete) From 4f01dc89eef3f8062e2d1f830423cf042aa9a201 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 09:11:03 -0400 Subject: [PATCH 06/16] Fix helm-show-kill-ring binding --- spacemacs/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 29d95bba7fa5..2b1b011310fd 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1276,7 +1276,7 @@ DELETE-FUNC when calling CALLBACK. "bs" 'helm-mini "sl" 'helm-semantic-or-imenu "hb" 'helm-bookmarks - "kil" 'helm-how-kill-ring) + "kil" 'helm-show-kill-ring) :config (progn ;; alter helm-bookmark key bindings to be simpler From f4324be3b941f7162a6cea29de2f586cf7bb5a85 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 10:01:12 -0400 Subject: [PATCH 07/16] Fix helm lazy loading for describe-xxx functions --- spacemacs/packages.el | 1 + 1 file changed, 1 insertion(+) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 2b1b011310fd..031bc54be756 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1279,6 +1279,7 @@ DELETE-FUNC when calling CALLBACK. "kil" 'helm-show-kill-ring) :config (progn + (helm-mode +1) ;; alter helm-bookmark key bindings to be simpler (defun simpler-helm-bookmark-keybindings () (define-key helm-bookmark-map (kbd "C-d") 'helm-bookmark-run-delete) From bbac61b4e25558c7b02b726d7406400e597f62c7 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 10:02:28 -0400 Subject: [PATCH 08/16] Add bindings for describe functions --- README.md | 44 +++++++++++++++++++++++++++------------- spacemacs/keybindings.el | 6 ++++++ 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 0d506a2ae2ae..b4e2896b5e3c 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,9 @@ _Jump to [Install](#install) for more info and - [Troubleshoot](#troubleshoot) - [Loading fails](#loading-fails) - [Version mismatch for ~/.spacemacs](#version-mismatch-for-spacemacs) + - [Getting Help](#getting-help) + - [Key bindings](#key-bindings) + - [Other describe functions](#other-describe-functions) - [Configuration layers](#configuration-layers) - [Structure](#structure) - [Extensions and Packages declaration and initialization](#extensions-and-packages-declaration-and-initialization) @@ -61,7 +64,6 @@ _Jump to [Install](#install) for more info and - [Commands](#commands) - [Return to normal mode](#return-to-normal-mode) - [Executing Vim, Emacs and shell commands](#executing-vim-emacs-and-shell-commands) - - [Key bindings help](#key-bindings-help) - [Navigation](#navigation) - [Point/Cursor](#pointcursor) - [Vim motions with ace-jump mode](#vim-motions-with-ace-jump-mode) @@ -275,6 +277,33 @@ there is no automatic way to do it. You will have to refer to the template file If you need help to upgrade, open an issue or ask for help on the [Gitter channel](https://gitter.im/syl20bnr/spacemacs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge). +## Getting Help + +### Key bindings + +`Spacemacs` defines hundreds of key bindings, you can easily discover them +inside Emacs by pressing: + + ? + +To narrow the list to `Spacemacs` specific key bindings set the pattern to +something like the regular expression: + + `^SPC\ b` + +The example above will list all the `buffer` related bindings. + +### Other describe functions + +Emacs `describe-xxx` function are accessible with the following bindings: + +Key Binding | Description +--------------|------------------------------------------------------------------ +` h d f` | describe-function +` h d k` | describe-key +` h d m` | describe-mode +` h d v` | describe-variable + ## Configuration layers _This part of Spacemacs is still in beta, the structure can change over @@ -745,19 +774,6 @@ Vim | `:` Emacs | ` :` Shell | ` !` -### Key bindings help - -A list of all the key bindings can be accessed by pressing: - - ? - -To narrow the list to `Spacemacs` specific key bindings set the pattern to -something like the regular expression: - - `^SPC\ b` - -The example above will list all the `buffer` related bindings. - ### Navigation #### Point/Cursor diff --git a/spacemacs/keybindings.el b/spacemacs/keybindings.el index 42d3b43526c5..cc399b0c6a65 100644 --- a/spacemacs/keybindings.el +++ b/spacemacs/keybindings.el @@ -43,6 +43,12 @@ "bw" 'toggle-read-only) ;; Cycling settings ----------------------------------------------------------- (evil-leader/set-key "ct" 'spacemacs/cycle-spacemacs-theme) +;; describe functions --------------------------------------------------------- +(evil-leader/set-key + "hdf" 'describe-function + "hdk" 'describe-key + "hdm" 'describe-mode + "hdv" 'describe-variable) ;; errors --------------------------------------------------------------------- (evil-leader/set-key "en" 'next-error From fc16e0ecb5e64e8ab569e83691d4a7679a923711 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 10:46:50 -0400 Subject: [PATCH 09/16] Add notes about master and develop branches in install section --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index b4e2896b5e3c..87a5f8930908 100644 --- a/README.md +++ b/README.md @@ -245,6 +245,9 @@ be provided in this read me. _Stay tuned._ mv .emacs.d .emacs.bak git clone --recursive http://github.com/syl20bnr/spacemacs .emacs.d +`master` is a stable branch, if you want the "bleeding edge" checkout the +`develop` branch. + 2) Launch Emacs, the first time a bunch of packages will be downloaded and installed. When the package installation is complete restart Emacs and `Spacemacs` should be ready to use. From 891597ee97cd505f59cbf193b330f142bd9fc5b4 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 14:10:49 -0400 Subject: [PATCH 10/16] Remove obsolete readme section --- README.md | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 87a5f8930908..4b397aac228f 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ _Jump to [Install](#install) for more info and - [Install](#install) - [Troubleshoot](#troubleshoot) - [Loading fails](#loading-fails) - - [Version mismatch for ~/.spacemacs](#version-mismatch-for-spacemacs) - - [Getting Help](#getting-help) + - [I have no file ~/.spacemacs](#i-have-no-file-spacemacs) + - [Help commands](#help-commands) - [Key bindings](#key-bindings) - [Other describe functions](#other-describe-functions) - [Configuration layers](#configuration-layers) @@ -266,21 +266,12 @@ _('C-x b' means 'Ctrl + x then b' and 'RET' means 'return')_ Then you can copy/paste the error in a [Github issue][issues], thank you. -#### Version mismatch for ~/.spacemacs +#### I have no file ~/.spacemacs -If you get the error: -``` -Error: '~/.spacemacs' version mismatch. -``` - -Then you have to update your `~/.spacemacs` to the last version. Unfortunately -there is no automatic way to do it. You will have to refer to the template file -`.spacemacs.template` in your `~/.emacs.d` and to the commit messages. - -If you need help to upgrade, open an issue or ask for help on the [Gitter -channel](https://gitter.im/syl20bnr/spacemacs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge). +You have to manually copy the `~/.emacs.d/.spacemacs.template` file to +`~/.spacemacs` -## Getting Help +## Help commands ### Key bindings From 8a6f666aa1a50c686ca8520146559f78eaa19164 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 22:21:40 -0400 Subject: [PATCH 11/16] Use projectile-commander and bind it to ` p p` --- spacemacs/packages.el | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 031bc54be756..ec0fd9f92d02 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1562,34 +1562,14 @@ DELETE-FUNC when calling CALLBACK. (defun spacemacs/init-projectile () (use-package projectile - :commands projectile-global-mode - :init - (progn - (defun spacemacs/projectile-lazy-loading (func) - "Wrap FUNC in order to be able to lazy load projectile." - (let ((funcstr (symbol-name func))) - (eval `(defun ,(intern (format "spacemacs/%s" funcstr)) (arg) - ,(format "Call %s" funcstr) - (interactive "P") - (projectile-global-mode) - (call-interactively ',func arg))))) - (mapc 'spacemacs/projectile-lazy-loading '(projectile-invalidate-cache - projectile-dired - projectile-find-file - projectile-grep - projectile-kill-buffers - projectile-replace - projectile-switch-to-buffer)) - (evil-leader/set-key - "pC" 'spacemacs/projectile-invalidate-cache - "pd" 'spacemacs/projectile-dired - "pF" 'spacemacs/projectile-find-file - "pg" 'spacemacs/projectile-grep - "pk" 'spacemacs/projectile-kill-buffers - "pr" 'spacemacs/projectile-replace - "ps" 'spacemacs/projectile-switch-to-buffer)) + :defer t + :init (evil-leader/set-key "pp" 'projectile-commander) :config - (spacemacs//hide-lighter projectile-mode))) + (progn + (def-projectile-commander-method ?F + "Find file in project using helm." + (helm-projectile)) + (spacemacs//hide-lighter projectile-mode)))) (defun spacemacs/init-python () (use-package python From 97f3ffd33b50b0013d052d1c30e02059c4c2908d Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 22:47:02 -0400 Subject: [PATCH 12/16] Fix ido-vertical key bindings stability Sometimes the spacemacs key bindings for ido-vertical did not work. --- spacemacs/packages.el | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index ec0fd9f92d02..f8a2cecbada8 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1353,21 +1353,23 @@ DELETE-FUNC when calling CALLBACK. :init (progn (ido-vertical-mode t) - (define-key ido-file-completion-map (kbd "C-d") 'ido-delete-file-at-head) - (define-key ido-file-completion-map (kbd "C-k") 'ido-prev-match) - (define-key ido-file-dir-completion-map (kbd "C-") 'ido-select-text) - (define-key ido-file-dir-completion-map (kbd "C-h") 'ido-delete-backward-updir) - (define-key ido-file-dir-completion-map (kbd "C-j") 'ido-next-match) - (define-key ido-file-dir-completion-map (kbd "C-l") 'ido-exit-minibuffer) - (define-key ido-file-dir-completion-map (kbd "C-S-j") 'ido-next-match-dir) - (define-key ido-file-dir-completion-map (kbd "C-S-k") 'ido-prev-match-dir) - ;; more natural navigation keys: up, down to change current item - ;; left to go up dir - ;; right to open the selected item - (define-key ido-file-dir-completion-map (kbd "") 'ido-prev-match) - (define-key ido-file-dir-completion-map (kbd "") 'ido-next-match) - (define-key ido-file-dir-completion-map (kbd "") 'ido-delete-backward-updir) - (define-key ido-file-dir-completion-map (kbd "") 'ido-exit-minibuffer)))) + (defadvice ido-vertical-define-keys (after spacemacs/ido-vertical-define-keys activate) + ;; overwrite the key bindings for ido vertical mode only + (define-key ido-completion-map (kbd "C-d") 'ido-delete-file-at-head) + (define-key ido-completion-map (kbd "C-k") 'ido-prev-match) + (define-key ido-completion-map (kbd "C-") 'ido-select-text) + (define-key ido-completion-map (kbd "C-h") 'ido-delete-backward-updir) + (define-key ido-completion-map (kbd "C-j") 'ido-next-match) + (define-key ido-completion-map (kbd "C-l") 'ido-exit-minibuffer) + (define-key ido-completion-map (kbd "C-S-j") 'ido-next-match-dir) + (define-key ido-completion-map (kbd "C-S-k") 'ido-prev-match-dir) + ;; more natural navigation keys: up, down to change current item + ;; left to go up dir + ;; right to open the selected item + (define-key ido-completion-map (kbd "") 'ido-prev-match) + (define-key ido-completion-map (kbd "") 'ido-next-match) + (define-key ido-completion-map (kbd "") 'ido-delete-backward-updir) + (define-key ido-completion-map (kbd "") 'ido-exit-minibuffer))))) (defun spacemacs/init-js2-mode () (use-package js2-mode From 7fb21ca88fccd05d7d7b7f080a0f21484cf2aff5 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 23:01:42 -0400 Subject: [PATCH 13/16] `fd` can exit help window --- spacemacs/packages.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index f8a2cecbada8..4be67fb28de0 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -309,7 +309,10 @@ DELETE-FUNC when calling CALLBACK. (spacemacs/escape-state ',seq ',shadowed nil nil 'evil-exit-visual-state))) (define-key evil-motion-state-map key `(lambda () (interactive) - (spacemacs/escape-state ',seq ',shadowed nil nil 'evil-normal-state))) + (let ((exit-func (if (eq 'help-mode major-mode) + 'quit-window + 'evil-normal-state))) + (spacemacs/escape-state ',seq ',shadowed nil nil exit-func)))) (eval-after-load 'evil-lisp-state `(define-key evil-lisp-state-map ,key (lambda () (interactive) From 345f3ee0e206affc2101cf82fd2f672ad61bafea Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 23:29:14 -0400 Subject: [PATCH 14/16] Fixes #51 Projectile cache remains empty I had to explicitly enable projectile-enable-caching and explicitly start projectile-mode to initialize projectile-projects-cache --- spacemacs/packages.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 4be67fb28de0..28ac6e5f0cfa 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1568,9 +1568,13 @@ DELETE-FUNC when calling CALLBACK. (defun spacemacs/init-projectile () (use-package projectile :defer t - :init (evil-leader/set-key "pp" 'projectile-commander) + :init + (progn + (setq-default projectile-enable-caching t) + (evil-leader/set-key "pp" 'projectile-commander)) :config (progn + (projectile-global-mode) (def-projectile-commander-method ?F "Find file in project using helm." (helm-projectile)) From 2c1f055e4d09032072dc8fb7bec39a35498e7f09 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 23:53:11 -0400 Subject: [PATCH 15/16] Simplify binding for projectile-commander to p Also add ?r projectile-replace to commander --- spacemacs/packages.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 28ac6e5f0cfa..8058f5ecd71a 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1571,13 +1571,16 @@ DELETE-FUNC when calling CALLBACK. :init (progn (setq-default projectile-enable-caching t) - (evil-leader/set-key "pp" 'projectile-commander)) + (evil-leader/set-key "p" 'projectile-commander)) :config (progn (projectile-global-mode) (def-projectile-commander-method ?F "Find file in project using helm." (helm-projectile)) + (def-projectile-commander-method ?r + "Replace a string in the project." + (projectile-replace)) (spacemacs//hide-lighter projectile-mode)))) (defun spacemacs/init-python () From 1cab472bee0cb60c90aeed493d8a8cff85a9f0ee Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 29 Oct 2014 23:53:58 -0400 Subject: [PATCH 16/16] Update projectile documentation in readme --- README.md | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 4b397aac228f..6b1e7acd06e0 100644 --- a/README.md +++ b/README.md @@ -686,7 +686,6 @@ The minor mode area can be toggled on and off with: Ⓗ | [auto-highlight-symbol][auto-highlight] mode Ⓒ | [centered-cursor][centered-cursor] mode eⓅ | [e-project][e-project] mode -Ⓟ | [projectile][projectile] mode Ⓕ | flycheck mode Ⓕ2 | flymake mode Ⓢ | flyspell mode @@ -1115,23 +1114,35 @@ Custom fringe bitmaps: ### Project management -Projects in `Spacemacs` are managed with [projectile][projectile]. -So projects are defined implicitly, for instance the root of a project -is found when a `.git` repository or `.projectile` file is encountered -in the file tree. +Projects in `Spacemacs` are managed with [projectile][projectile]. In +`projectile` projects are defined implicitly, for instance the root of a +project is found when a `.git` repository or `.projectile` file is +encountered in the file tree. -Projects management commands (start with `p`): +The only bound key for `projectile` is `projectile-commander` which is: + + p + +`projectile commander` commands: Key Binding | Description ------------------|------------------------------------------------------------ -` p C` | invalidate the cache of `projectile` -` p d` | open a `dired` buffer at the root of the project -` p f` | open a file of the project using `helm` -` p F` | find a file if the project using `ido` -` p k` | kill all the buffers of the project -` p g` | grep search in the project -` p r` | replace a string in the files of the project -` p s` | switch to a buffer of the project +`a` | run `ack` on project +`A` | run `ag` on project +`b` | switch to project buffer +`d` | find directory in project +`D` | open project root in `dired` +`f` | find file in project +`F` | find file in project using `helm` +`g` | run `grep` on project +`j` | find a tag in project +`k` | kill all project buffers +`o` | run `multi-occur` on project +`R` | regenerate the project's [e|g]tags +`r` | replace a string in the project +`s` | switch project +`T` | find test files in project +`v` | open project root in `vc-dir` or `magit` ### Working with Git