auto-pairs
auto-pairs copied to clipboard
Doesn't work with Python f-strings
Python f-strings have the following syntax:
user = 'jiangmiao'
repo = 'auto-pairs'
full_repo = f'{user}/{repo}'
When typing f'
, I would expect the closing '
character to be auto-paired, but it currently does not.
Same here, but it does work with double quotes.
au FileType python let b:AutoPairs = AutoPairsDefine({"f'" : "'", "r'" : "'", "b'" : "'"})
This almost works perfectly, except for if your string ends in an f, and you try to close the string it will add another apostrophe to close that one.
Same here, but it does work with double quotes.
Weird. Does anybody have any idea why it works for double but not single quotes? Maybe this could be used to fix the issue.
I think this is intended behavior. https://github.com/jiangmiao/auto-pairs/blob/master/doc/AutoPairs.txt#L57-L60
Skip ' when inside a word: >
input: foo| (press ' at |)
output: foo'
One of the features of this plugin is to NOT complete apostrophes while inside a word. Hence, double quotes are not affected