Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add notice about keybindings + example using transient.el #117

Merged
merged 1 commit into from
Jun 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,40 @@ Alternatively, you can install Phpactor on your own and configure `phpactor-exec
*** phpactor itself
See https://phpactor.github.io/phpactor/configuration.html

*** keybindings

Phpactor.el doesn't bring any keybindings and it's up to you to configure them as you wish.

You could for example limit yourself to only one by using [[https://github.com/magit/transient][transient.el]] like this

#+BEGIN_SRC elisp
(define-transient-command php-transient-menu ()
"Php"
[["Class"
("cc" "Copy" phpactor-copy-class)
("cn" "New" phpactor-create-new-class)
("cr" "Move" phpactor-move-class)
("ci" "Inflect" phpactor-inflect-class)
("n" "Namespace" phpactor-fix-namespace)]
["Properties"
("a" "Accessor" phpactor-generate-accessors)
("pc" "Constructor" phpactor-complete-constructor)
("pm" "Add missing props" phpactor-complete-properties)
("C" "Extract const" phpactor-extract-constant)
("r" "Rename var locally" phpactor-rename-variable-local)
("R" "Rename var in file" phpactor-rename-variable-file)]
["Methods"
("i" "Implement Contracts" phpactor-implement-contracts)
("m" "Generate method" phpactor-generate-method)]
["Navigate"
("x" "List refs" phpactor-list-references)
("X" "Replace refs" phpactor-replace-references)
("." "Goto def" phpactor-goto-definition)]
["Phpactor"
("s" "Status" phpactor-status)
("u" "Install" phpactor-install-or-update)]])
#+END_SRC

** Troubleshooting

You can run ``phpactor-status`` while visiting a project file.
Expand Down