I use the following Vim macro a lot (it puts the current line inside XML tags):
I^[A
So I saved it into my .vimrc
I'm answering what I do to add Escape in macro.
Using in vim editor
:let @a='iabcjj'
here I map to jj by
jj
.vimrc file
imap jj