You can bind it similarly to vim:
(define-key evil-normal-state-map " " (kbd "@@"))
Regarding your code: The second argument of evil-execute-macro
should be a character, i.e. ?@
. But this only holds if evil-execute-macro
is called interactively because the content of the corresponding register is only retrieved in the interactive
form.
This boils down to this: The correct call would be (evil-execute-macro 1 last-kbd-macro)
.