Closed bbaldino closed 6 years ago
ran across this issue when getting completions after typing std::
. there is a method in std
called quoted
which has an argument which defaults to the value of a double quote, which shows up in the signature as '"'
. it looks like vimscript grabs the results of the dict using repr
, which escapes that default argument as the string \'"\'
, but vimscript will complain about "Missing comma in Dictionary" since it expects single quotes to be escaped by doubling them (''
), so it detects python's escaping as the end of the string and then the dictionary looks malformed.
link to where i found out about the special case for escaping '
: http://learnvimscriptthehardway.stevelosh.com/chapters/26.html#literal-strings
Thanks! I ran into this issue but didn't know enough to fix it :)
Here's how to reproduce the issue:
$ echo "-std=c++14" > .clang_complete
$ echo "#include <iomanip>" > main.cpp
Now edit main.cpp in vim with clang_complete and enter std::
below the include to get the "Missing comma in Dictionary" error.
@racko np, glad it helped!
Thanks!
python will escape a single quote in a string with a slash
\'
, but vimscript wants it done via doubling the single quote''
. this commit introduces a new dictionary type used by the code which formats the completion results to properly escape single quotes