One of the things I love about #Vim is how easy it is to add little bits of ad hoc personal customisation like this.

https://urusai.social/@negativeprimes/114802562768646512

NegativePrimes (@negativeprimes@urusai.social)

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! #vim #editing

URUSAI! Social