In other editors if I have a line of Javascript like:
const longString = 'abc abc abc abc abc abc abc abc abc';
and my cursor is in the middle of that string:
const longString = 'abc abc abc abc abc |abc abc abc abc';
and I hit ENTER
, my editor will be smart enough to break that string into two valid strings, joined by a +
:
const longString = 'abc abc abc abc abc ' +
'abc abc abc abc';
... but not VS Code. The most advanced editor I've ever used can't do this one (seemingly) basic thing, and it's driving me crazy.
Now there is a plug-in called Split Lines, that promises to do just this ... but it's been broken for awhile.
My question is, is there any way, in 2023 (ideally with just VS Code, but if not, with extensions) to make VS Code smarter when I break up strings?
from How Can I Make VS Code Split Long Strings *Properly* When I Break Them Up?
No comments:
Post a Comment