Can't use a specific tag


I was working with select forms and suddenly I can’t use shortcut to the tag , meaning I have to type it manually. When I do that and check out how it looks on the browser, there’s a space between each option. Any ideas how I enable that tag back ? All other tags seem to work normally


Which tag? What’s the active grammar? Can you share your code with us?


Weird. I swear I had written the tag. It’s the tag < option >. Grammar is on auto detect ( I just started learning how to use these stuff, I’m currently learning HTML and I know nothing other then that for now, so I never touched on grammar ) Btw, I tried uninstalling and installing atom again, didn’t work.


Yeah, you’re going to need to tell the forum that that tag is code to be displayed, not parsed. You do it with backticks `like so`, or by selecting the text and pressing the <\> button.

When did you stop being able to insert the tag via autocomplete?

It doesn’t matter whether it autodetects or you set the grammar manually, only which grammar is active for the editor.


It happened today while I was working on a little exercise given by my online course. It was working fine until suddenly I wasn’t showing me the shortcut anymore.


Have you tried typing <opt instead of opt?

These things are almost never sudden. It stopped showing up for a reason.


Yeah that worked. Before it would show as “option” and not “opt”, so when it stopped showing option, I just thought it disappeared and the “opt” tag was something else entirely. Thanks for the support, sorry for wasting your time on something so little and stupid. :slight_smile:


It’s not little. The autocomplete provider for HTML figures out that you’re typing a tag based on the first < character, and then it only completes to the end of the tag name. It’s flexible, but inefficient. For tags you type often, consider using your snippets file to reduce your typing further. Something like

    prefix: 'form'
    body: """
      <form class="$1" action="index.html" method="post">
    prefix: 'select'
    body: """
      <select class="$1" name="$2">
        <option value="$3">$3</option>
        <option value="$4">$4</option>
        <option value="$5">$5</option>

Each dollar sign indicates a tab stop. Once you trigger the snippet, press tab to navigate between them. Play with that for a moment and you’ll see some of the things Atom can do to make your life easier.


OK thanks a lot @DamnedScholar. Really appreciate it :slight_smile: