Latex smart quotes surround
I would like it if there was some sort of support for latex smart quotes which look like
``word''
as I would like to be able to go from
words words "quoted words"
to
words words ``quoted words''
with something like cs"s, for _s_mart quotes I guess. I'm not sure what the most memorable shortcut would be.
this would be a great feature if possible
I keep the following lines in my ~/.vim/ftplugin/after/tex.vim:
if exists('g:loaded_surround')
" vim-surround: q for `foo' and Q for ``foo''
let b:surround_{char2nr('q')} = "`\r'"
let b:surround_{char2nr('Q')} = "``\r''"
endif
This lets me do cs'q to change
'foobar' to `foobar'
and cs"Q to change
"foobar" to ``foobar''
or other such combinations.
@ajzafar Your workaround does not seem to work for me when attempting to do anything but add the characters. Can you confirm that changing and deleting the custom quote characters work for you?
@lafrenierejm Oh, no, that's a limitation of surround. Custom targets don't exist, but custom replacements do.
@ajzafar Alright. I might dig around in the source some to see if support for custom targets can be added.