I wanted to edit some work files in Vim, but in doing so realized that Vim uses straight quotes and apostrophes instead of curly ones (which I needed given the constraints of this project). I added the following to vimrc to make this feasible (note that I have vimwiki installed, so Vim id'd the markdown file I was editing as a vw file):
augroup vimrc_vimwiki
au!
au FileType vimwiki inoremap ' ’
au FileType vimwiki inoremap <leader>' ‘
au FileType vimwiki inoremap <leader>" “
au FileType vimwiki inoremap " ”
augroup END
Voila'! Typing a quote converts it to a closing curly quote; adding the Leader key makes it an opening curly quote!