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

438
Visualizações
VS Code autosuggest

VS Code's autocomplete is awesome:

enter image description here

after tabbing:

enter image description here

However, a lot of times I find myself wanting to insert something to the start of a non-blank line. For example, in the following example I have a variable named 'myVar' and I want to insert the log auto-complete:

enter image description here

Now of course one way to solve this is to enter in 'space', 'arrow-left' and then type in the word, but I'm wondering if there's a way to get an auto-complet that will basically ignore any text that is to the right of the cursor.

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

0

create your own rules and stuff.

at the root of your project create a folder call .vscode inside add a file [WHATEVER-NAME].code-snippets make sure it has the extenssion code-snippets

enter image description here

{
    "clg": {
        "prefix": "clg",
        "body": "console.log(\"$1\", $1);"
    },
    "react": {
        "prefix": "react",
        "body": "import * as React from \"react\";",
    },
    "useEffect": {
        "prefix": "useEffect",
        "body": [
            "React.useEffect(()=> {",
            "$1",
            "},[]);"
        ]
    },
    "useState": {
        "prefix": "useState",
        "body": "const [ $1, $1Set ] = React.useState($2);"
    }
}

unfortunatelly it is imposible to ignore any text after. but for example what I do is I used the snippet from above. when I type clg it becomes console.log('text', text); then I type what ever I want for text and it changes both texts at the same time. you feelme?

for an advanced and customized way go to https://code.visualstudio.com/docs/editor/intellisense#_customizing-intellisense

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