Loading ...
Sorry, an error occurred while loading the content.

139091Trailing space with UltiSnips snippet

Expand Messages
  • Marco
    Sep 8, 2013
    • 0 Attachment
      Hi,

      I use the UltiSnips┬╣ plugin and have a snippet as follows:

      snippet sst
      \start${1} ${2}
      ${3}
      \stop${1/\s*//g}
      $0
      endsnippet

      This works fine if I provide an argument for the start command:

      sst<trigger>foo<trigger>bar<trigger> leads to

      \startfoo bar

      \stopfoo

      But this snippet should also work without an argument, but it leaves
      a trailing space:

      sst<trigger>foo<trigger><trigger> leads to

      \startfoo

      \stopfoo

      How do I define this snippet so it doesn't leave the trailing space
      when no argument is provided?

      Marco

      ┬╣ https://github.com/SirVer/ultisnips

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 3 messages in this topic