Open bountonw opened 8 years ago
You might want to check out vim-textobj-quote
which integrates support for smart (curly) quotes both into motion commands and with vim-surround
.
You can add a custom replacement to your vimrc
like this:
let g:surround_{char2nr('“')} = "“\r”"
let g:surround_{char2nr('‘')} = "‘\r’"
That lets you type ysiw“
to wrap a word in curly double quotes or cs'‘
to change straight single quotes to curly single quotes.
Smart Quotes for Smart People shows you keyboard shortcuts to write the curly quotes when you need them.
Could support for single and double smart quotes be possible?