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@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Sunday, September 8, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment