cvbge / vscode-escape-string

Visual Studio Code extension which helps escaping string when copy/pasting
MIT License
2 stars 4 forks source link

What About Un-Escaping??? #2

Open jad45 opened 1 year ago

jad45 commented 1 year ago

Shouldn't this VSCode extension also provide the inverse functionality - to un-escape a string? For example:

"Some multi-line strings\nare worth\"un-escaping\"\ndon't you think?"

would be "un-escaped" into:

Some multi-line strings
are worth "un-escaping"
don't you think?
cvbge commented 1 month ago

Hi @jad45, that sounds like an interesting idea.

I searched vscode marketplace for similar extensions and there are a couple for json and js/typescript. But didn't found one for other languages (maybe I didn't search enough).

Anyway, it's a good idea, but looks to be much more complex to implement. I'd be happy to integrate a pull request with such feature if someone provides it.

On the other hand, I guess "unescaping" is easier than "escaping" in a way - you can copy such string and write a simple program in the original language which will "print()" it. There's no such way for "escaping" strings.