Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

598
Visualizações
How to edit Visual Studio Code auto-complete in JavaScript?

I was coding on JavaScript when my instructor, Andrew J. Mead (I actually learn JS from Udemy) were telling about try and catch. I type slowly so I often use auto-complete given by VS Code. Anyway, I wrote try and in auto-complete it gave me trycatch. I clicked on it and it gave me this

try {

} catch (error) {

}

I want the error to be e like catch(e), not catch(error). Is there any way that I can edit VS Code's auto-complete?

Screenshots given

  1. trycatch

trycatch

  1. auto-complete result

auto-complete result

  1. what I want

what I want

Thanks recently for the support

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can create custom snippet for VS Code
For do this, you need:

  • Open snippet editor for js (open Command Palette (Ctrl-Shift-P) and print "Snippet", and then select "Configure user snippets", select "JavaScript")
  • In the end of json paste:

{
  ...
  "My Try-Catch block": {
    "prefix": "trycatch",
    "body": [
      "try {",
      "\t$0",
      "} catch (e) {",
      "\t",
      "}",
    ],
    "description": "Paste try-catch with e"
  }
}

Your snippet will be up than standard in autocomplete


Or you can edit default snippets located at:

%localappdata%\Programs\Microsoft VS Code\resources\app\extensions\javascript\snippets

In javascript.code-snippets file, but custom snippets is better way in any cases

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda