This is what I'm trying to achieve:
then pressing some key combination to get
I know this can be done with the autopairs plugin. In the docs they write that the default binding is M-}. I am using Vim/iTerm2/Mac, and I can't seem to figure out how to use the meta key.
In the autopairs plugin they let you remap another feature which is called Fast Wrap and is used to enclose a line with brackets. As you can understand, this is not exactly what I'm looking for, but even with Fast Wrap, which is mapped to M-e, I was not able to remap it or used it as is.
I googled and tried using the sed command in the terminal to see what the option key is outputting, then I tried to remap this output to M-}. Didn't work. Any ideas?