Problems with the autocomplete suggestion


When I press enter or tab to confirm a suggestion, it goes good for the first member.
But when it give me the second member, and I confirm the second member, what i get is the first member(again) and the second.
For example, I wrote cons and it suggest me console. Hit enter and it wrote it.
But, when I wrote “lo” it suggest me “log”, and when I confirm the suggestion i get console.console.log()


This likely means that you have a log snippet that expands to console.log(). You can verify this by opening your ~/.atom/snippets.cson, it’ll contain something like this (if I remember correctly, it is in there by default, if not it is probably provided by the language-javascript package):

# Javascript
  'Console Log':
    'prefix': 'log'
    'body': 'console.log($1);'

So in this case you can avoid typing cons and instead start with log and expand to console.log() right away. I agree it’d be nice if it would ‘merge’ with an already existing partial snippet in the scenario you describe though. I thought there was an issue for this already on the autocomplete-plus tracker, but I cannot find it right now.