localcfg/plugins/vim_textobj_quote.vim

Don’t limit ourselves to plain ASCII encoding:

scriptencoding utf-8

Enforce vim script implementation to reduce ambiguities and improve robustness:

scriptversion 4
augroup jnrowe_vim_textobj_quote
    autocmd!

Enable for reST and other largely prose filetypes:

autocmd FileType gitcommit,gitrebase,note,rst call textobj#quote#init()
autocmd FileType text call textobj#quote#init(#{educate: 0})

Note

We enable, but don’t force, for plain text so that we don’t send fancy characters to things that expect ASCII.

Configure quotes for current language:

autocmd BufNewFile,BufRead *
\   call plugins#vim_textobj_quote#select_quotes()
augroup END