6

When I create a new yasnippet template using the 'yas-new-snippet' command, I'm unable to get the leading whitespace to show when the template is expanded in a new document or even tested using 'yas-tryout-snippet'.

For example:

interface t1 
    description 
    no shutdown

Becomes:

interface t1 
description 
no shutdown

How can I get the leading whitespace to show when I expand?

The snippet is saved as text-mode.

I'm using GNU Emacs24 with a new installation of Yasnippet from MELPA.

6

Use the expand-env directive, as described in the manual.

E.g.

# expand-env: ((yas-indent-line 'fixed) (yas-wrap-around-region 'nil))

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.