Dunno about this version of Xcode but on Mac I tend to map Caps Lock to Ctrl so either in Vim or an emulation layer I can just use Ctrl+[ which is the same thing as <ESC> and doesn't require a new mapping, which can differ as to the if and how depending on emulation layer