> Any idea how I can solve this? It works fine with regular chars.
International characters are very much regular chars :). We had plenty of bug reports about them before in UltiSnips, so it is a very good thing that you added tests for them now.
The problem here is that you are trying to format a bytes string with a unicode object. Something along these lines should work:
Also think about what happens here if val or the trigger contain a " or a '. A test case for this might be indicated as well.
> So when I define a snippet as above the dict would be {'testâ', "abc123"} but I don't know how to define a snippet with description on the test file.
The code that spilts this tuple is in test.py, line 281. you can define a snippet as
("trigger", "content", "description", "options"), but you can leave out descriptions and/or options.
> Any idea how I can solve this? It works fine with regular chars.
International characters are very much regular chars :). We had plenty of bug reports about them before in UltiSnips, so it is a very good thing that you added tests for them now.
The problem here is that you are trying to format a bytes string with a unicode object. Something along these lines should work:
_vim. command( as_unicode( "let g:current_ ulti_dict[ '{key}' ] = '{val}' ").format( key=snip. trigger, val=description))
This should help with this problem.
Also think about what happens here if val or the trigger contain a " or a '. A test case for this might be indicated as well.
> So when I define a snippet as above the dict would be {'testâ', "abc123"} but I don't know how to define a snippet with description on the test file.
The code that spilts this tuple is in test.py, line 281. you can define a snippet as
("trigger", "content", "description", "options"), but you can leave out descriptions and/or options.
Hope that helps.