Open tomory opened 1 year ago
I can't reproduce that here. Can you give a sample of text you were using and list exactly what commands you ran and what mode you were in when you ran the commands?
It may also be useful to try starting vim with a minimal vimrc
and no other plugins (except vim-textobj-user and vim-textobj-quote).
For example, save this as vimrc (no dot in that filename).
set vif=NONE
set nocompatible
filetype on
packadd vim-textobj-user
packadd vim-textobj-quote
function! StartQuote()
call textobj#quote#init()
map <silent> ; <Plug>ReplaceWithCurly
map <silent> \ <Plug>ReplaceWithStraight
endfunction
augroup test
autocmd!
autocmd FileType markdown call StartQuote()
augroup END
And edit this (as foo.md
).
This is a test. "This is only a test."
Start up vim with this command: vim --noplugin -u vimrc foo.md
You should be able to swap the quotes around the second sentence from normal mode and visual mode using \
and ;
.
After doing
map <silent> <leader>qc <Plug>ReplaceWithCurly
per the README, I tried\qc
. Instead of replacing pairs of straight quotes with matching curlies, it instead replaced all straight quotes with right curly quotes.