Aug 11, 2023
0
Level 4
How to clamp strings on VSCode
I have been dealing with some long string texts inside my code and it kinda bothers me, because it's too much useless information inside my code. An example is this:
setSuccessMessage(email) {
if (this.step.isAt(this.step.LOGIN_CPF)) {
this.success_message = `Encontramos seu CPF cadastrado em nossa base, para o e-mail ${email}. Caso lembre sua senha, basta efetuar login, se não, você pode redefini-la abaixo.`
} else if (this.step.isAt(this.step.LOGIN_EMAIL)) {
this.success_message =
'Encontramos seu e-mail cadastrado. Caso lembre sua senha, basta efetuar login ou recuperar sua senha.'
}
},
As you can see, there are two lines that break down (inside VSCode) bacause of too much text. I am searching for an extension on VSCode that clamps those lines to something like this:
setSuccessMessage(email) {
if (this.step.isAt(this.step.LOGIN_CPF)) {
this.success_message = `Encontramos seu ...`
} else if (this.step.isAt(this.step.LOGIN_EMAIL)) {
this.success_message =
'Encontramos seu e-mail ...'
}
},
Anyone knows any extension like that or anything native to VSCode, maybe?
Please or to participate in this conversation.