Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

BernardoBF4's avatar

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?

0 likes
0 replies

Please or to participate in this conversation.