delimitMate icon indicating copy to clipboard operation
delimitMate copied to clipboard

add support for python f-strings

Open gmnr opened this issue 2 years ago • 2 comments

I am failing at configuring delimitMate to work with f-strings in python.

The desired behavior is that, in python, prepending f to the pair of single (') or double (") quotes still triggers the autocompletion, without repeating the f.

Thank you in advance for your help!

gmnr avatar Nov 17 '21 22:11 gmnr

+1 for this. Came here looking for a solution to exactly this problem.

BTrey avatar Jan 16 '22 17:01 BTrey

I also encountered this problem and finally solved it.

Add this line to your vimrc.

au FileType python let b:delimitMate_smart_quotes = '\%(_\|[^[:punct:][:space:]bfu]\|\%(\\\\\)*\\\)\%#\|\%#\%(\w\|[^[:space:][:punct:]]\)'

This acts like the default behavior except you type a quote after b/f/u(possible python string prefixes)

0xKira avatar Aug 25 '22 17:08 0xKira