0

I am creating my firsts neosnippet-snippets in c.snip, it looks like that:

snippet head
  options head
  ////////////////////////////////////////////////////////////////////////////////
  // ${1:TITLE}
  ////////////////////////////////////////////////////////////////////////////////

  ${0:TARGET}

  //// END OF $1

snippet stdlib
  options head
  alias std
  #include <stdlib.h>${0}

The first snippet expands correctly while the seconds expands to:

  options head
  alias std
  #include <stdlib.h>

Why so?

2

It's because you indent the snippet options ('keywords'), by not following the help example (:h neosnippet-snippet-syntax). So, you need:

snippet stdlib
options head
alias std
    #include<stdlib.h>${0}

BTW, I'm not sure if ${0} is needed at all, in this example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.