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

230
Visualizações
vscode Make snippet first choice when hitting tab

I wrote my own simple snippet for const in javascript:

const should trigger const ${1} = ${0};

and it works very well. However, when I enter const and the available options pop open in the menu, I do not get the snippet as a first, but as a second option which means I first need to go down one step with an arrow and then I can select it with tab.

I'm coming from vim where evert keystroke matters in terms of productivity and this is annoying me so much that I decided to write here no stackoverflow. Does anyone know how I can make it the first option if it matches the snippet?

Also, does anyone know what the first option actually means?

const Snippet vscode

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

0

In settings.json

{
    "typescript.useCodeSnippetsOnMethodSuggest": true,
    "editor.snippetSuggestions": "top",
    "editor.tabCompletion": true
}

By default, editor.snippetSuggestions is bottom so setting it to top wil show it at top.

Note: both standard and your custom snippets will be show in suggestion.if you want your snippet to go above the standard - you can change description so that it sorts at top.

You can see about it here(github link)

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