Update phoenix prefix to `SPC m f`

As per the convention
https://github.com/syl20bnr/spacemacs/commit/90452329
This commit is contained in:
Lyuben Petrov 2018-01-19 08:53:47 +02:00 committed by Codruț Constantin Gușoi
parent 86683ad558
commit e82efb4c45
2 changed files with 24 additions and 23 deletions

View File

@ -3,12 +3,13 @@
[[file:img/phoenix.png]] with [[file:img/alchemist.png]]
* Table of Contents :TOC_4_gh:noexport:
- [[#description][Description]]
- [[#install][Install]]
- [[#key-bindings][Key bindings]]
- [[#description][Description]]
- [[#install][Install]]
- [[#key-bindings][Key bindings]]
* Description
This layer adds keybindings for [[https://github.com/tonini/alchemist.el][Alchemist]]'s already built in phoenix mode.
* Install
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
add =phoenix= to the existing =dotspacemacs-configuration-layers= list in this
@ -18,12 +19,12 @@ file.
| Key Binding | Description |
|---------------+--------------------|
| ~SPC m p r~ | Shows routes |
| ~SPC m p f w~ | Find in web folder |
| ~SPC m p f v~ | Find view |
| ~SPC m p f c~ | Find controller |
| ~SPC m p f C~ | Find channel |
| ~SPC m p f t~ | Find template |
| ~SPC m p f m~ | Find model |
| ~SPC m p f s~ | Find static |
| ~SPC m p f r~ | Find router |
| ~SPC m f r~ | Shows routes |
| ~SPC m f f w~ | Find in web folder |
| ~SPC m f f v~ | Find view |
| ~SPC m f f c~ | Find controller |
| ~SPC m f f C~ | Find channel |
| ~SPC m f f t~ | Find template |
| ~SPC m f f m~ | Find model |
| ~SPC m f f s~ | Find static |
| ~SPC m f f r~ | Find router |

View File

@ -14,15 +14,15 @@
(defun phoenix/post-init-alchemist ()
(progn
(spacemacs/declare-prefix-for-mode 'elixir-mode "mp" "phoenix")
(spacemacs/declare-prefix-for-mode 'elixir-mode "mpf" "find")
(spacemacs/declare-prefix-for-mode 'elixir-mode "mf" "phoenix")
(spacemacs/declare-prefix-for-mode 'elixir-mode "mff" "find")
(spacemacs/set-leader-keys-for-major-mode 'elixir-mode
"pfw" 'alchemist-phoenix-find-web
"pfv" 'alchemist-phoenix-find-views
"pfc" 'alchemist-phoenix-find-controllers
"pfC" 'alchemist-phoenix-find-channels
"pft" 'alchemist-phoenix-find-templates
"pfm" 'alchemist-phoenix-find-models
"pfs" 'alchemist-phoenix-find-static
"pfr" 'alchemist-phoenix-router
"pr" 'alchemist-phoenix-routes)))
"ffw" 'alchemist-phoenix-find-web
"ffv" 'alchemist-phoenix-find-views
"ffc" 'alchemist-phoenix-find-controllers
"ffC" 'alchemist-phoenix-find-channels
"fft" 'alchemist-phoenix-find-templates
"ffm" 'alchemist-phoenix-find-models
"ffs" 'alchemist-phoenix-find-static
"ffr" 'alchemist-phoenix-router
"fr" 'alchemist-phoenix-routes)))