html-snippets icon indicating copy to clipboard operation
html-snippets copied to clipboard

Snippet insertion repeating character(<)

Open tradeli opened this issue 8 years ago • 2 comments

Hi, first I would like to say that your extension is very handy.

The extension works flawlessly when directly typing the tagname: it considers what already has been written and then completes it with all missing symbols and characters.

But when you start typing with the < symbol (e.g. like this <tagName) the extension appears to have 2 problems, or are they intended features?

Considering VSCode 1.10.2

  1. First problem: When typing <tagName it doesn't present any possible snippets, at all. Unless you press Enter after selecting the tagName in the auto-complete list, then CTRL+Space, then, and only then, the snippet shows. e.g.:
    First attempt with CTRL+Space after typing <a, only the IDE a tag appears: print1 With no snippet option: print2 After selecting the Auto-complete a tag, and hitting CTRL+Space again, the snippet option finally appears: print3

  2. Second problem: Continuing the above process, after hitting Enter over the a snippet option: print4

The extension places the snippet, but it doesn't take the symbol < into consideration, leaving it, which I think it shouldn't.

tradeli avatar Mar 17 '17 17:03 tradeli

hello @tradeli , thanks for the details explanation.

firstly, I made this extension was vscode had very little support for html autocomplete. the extension in its basic format is just snippet list that the vscode snippet engine feeds the workflow when it thinks a match is possible, the extension contains no logic to be smart about when to appear or how to handle the pre or post characters. if you are seeing the extension's suggestions below the default vscode html suggestions I believe there is a switch to set in the settings to allow the extensions to precede the default language type suggestions, again this is not just for this extension, this is for all snippet type extensions.

I have had many people enquire about similar features you have referred to, as to be able to understand what is on the page and the extension should provide that, I have been thinking of making a full fledged html extension that handles all user needs with that regard I just haven't had time to do so.

I hope this answers some of your thoughts.

abusaidm avatar Mar 18 '17 10:03 abusaidm

Yes, you did answer, thank you!

I'll improve the configuration of my installed VSCode.

I guess I should also try and get better at programming, so I can help you with it! Maybe one day :)

tradeli avatar Mar 19 '17 06:03 tradeli