Create Multi-Line Snippet?


#1

Hey there!

Not sure if I’m just unable to figure out how to accomplish this or not, but it would be nice to be able to have multi line snippets. For example:

'.source.scss':
  'Comment':
    'prefix': 'cmnt'
    'body': '
    /*------------------------------------*\
    ::$1
    \*------------------------------------*/
    $2'

should output:

/*------------------------------------*
  :: 
*------------------------------------*/ 

as opposed to:

/*------------------------------------*:: *------------------------------------*/ 

#2

I’m not entirely sure why it’s doing that, but you can just add \n to force a line break, like so.

'.source.scss':
  'Comment':
    'prefix': 'cmnt'
    'body': '
    /*------------------------------------*
    \n
    ::$1
    \n
    \*------------------------------------*/
    \n
    $2'

#3

Well that just seems like a very logical answer, thank you kindly for the quick reply!


#4

This can be done too.

'.source.scss':
    'Comment':
        'prefix': 'cmnt'
        'body': """
            /*------------------------------------*
            ::$1
            \*------------------------------------*/
            $2
            """

whoops . .edit


#5

This works perfectly as well, thank you kindly!