Settings: Fix completion values (#348)
Settings: Fix completion values (#348)

The root cause was that text manipulation was reordered in a wrong way:
JSON-encoded string was converted to snippet-field-content-encoded
string first, but then it was treated as a simply JSON-encoded string
again. Namely, stripping curly brackets away _after_ encoding them
as \\} broke cursor things in a weird ways.

Used pretty printing just because it looks better. But it required extra
whitespace stripping: both outside and inside stripped
brackets/braces.

Also changed variable name from `encoded` to `content` in fmt, so they
can never be accidentally reordered again.

Fixes SublimeText#347

SublimeText/PackageDev