[SOLVED]Snippet auto-complete fail inline only


#1

I have a snippet

'.source.asciidoc':
  'Inter-Doc Cross Reference':
    'prefix': '<<'
    'body': '<<${1:path/to/wiki/page}#,${2:custom label text}>>'

When the cursor is on a empty line, autocomplete works fine,


but as is shown on the top line when inline it doesn’t. Code insertion works fine though.

Imgur wasn’t displaying image for some reason so uploaded it.


#2

Hello.

Possible issues:

  • The snippet trigger phrase has less then 3 characters.
    (See the settings of autocomplete-plus)

  • The snippet trigger uses special characters.


Suggestion:

  • Change the trigger phrase. I have used xref instead of << which worked well.
    (even ref is fine)

  • Else… keep what you have and press Tab after typing <<.


Bonus suggestion:

Include the following into Atom’s Keymap file (keymaps.cson). This trigger brings up a list of snippets available for the grammar (language) that you are busy with.

# MAIN TEXT EDITOR
'atom-text-editor:not(.mini)':
  'alt-x': 'snippets:available'


Your thoughts?


#3

Had tried this but didn’t change things.

This seems to be the problem. Not sure why it only works on empty lines though.

xref works fine.

Thank you.