Reputation: 125
Eclipse has an option that copy-paste of multi-line text into String literals will result in quoted newlines.
Preferences > Java > Editor > Typing > Escape text when pasting into a string literal
Does vscode can do it?
for example
copy bellow and paste:
some text with tabs and new lines
Then eclipse change like this:
"some text\twith tabs\r\n" + "and new \r\n" + "lines"
How can I do it in vscode?
Upvotes: 4
Views: 4436
Reputation: 1670
There is a plug that works for JavaScript and others now: https://marketplace.visualstudio.com/items?itemName=cvbge.escape-string
Upvotes: 1
Reputation: 397
No, it can't at this moment. There is a closed issue for this at backlog without an estimation.
There is a plugin at marketplace that does the job, but for TypeScript.
Upvotes: 3