How do you repeat the last command? Or even better how do you re-run a task?
mix phoenix.server running but many times I need to restart it. What I do so far is
- find the buffer where the command is running and kill that buffer
, m : to run alchemist-mix
- wait for the list of available mix tasks
- select or type
- if error repeat
Is there any better way?
UPDATE: I made some progress with this. looking from alchemist source and trying to understand spacemac's documentation I came up with this in my user config. It is a shortcut to run "mix phoenix.server".
(defun alchemist-phoenix-server ()
"Run the Mix task 'phoenix.server'"
(spacemacs/set-leader-keys-for-minor-mode 'alchemist-phoenix-mode (kbd "n S") 'alchemist-phoenix-server)
Heck, it even restarts the phoenix.server by killing the previous mix task. The problem I have now is that it runs by typing
Spc n S instead of
C-c a n S like the rest of the phoenix-mode commands.
I try to figure it from the documentation but I don't understand exactly how to register it there. I tried "C-c n S" but it doesn't work. It insists on prefixing with space.