From: https://apple.stackexchange.com/a/220145
Your edit-and-execute-command may not be bound for vi mode. Try:
edit-and-execute-command
vi
bind -m vi-insert '"\C-x\C-e": edit-and-execute-command'
To make it permanent, add that line to your ~/.inputrc file.
~/.inputrc