Skip to main content
deleted 2 characters in body
Source Link
xsot
  • 141
  • 4

I have a snippet for C-like languages that looks like this:

snippet '{' "braces"
{
    $0
}
endsnippet

I would like to restrict this snippet to expand only if the tab trigger occurs at the end of the line.

I tried to use a regex trigger instead ({$) without success. To quote the documentation: "The snippet is expanded if the recently typed characters match the regular expression".

I have a snippet for C-like languages that looks like this:

snippet '{' "braces"
{
    $0
}
endsnippet

I would like to restrict this snippet to expand only if the tab trigger occurs at the end of the line.

I tried to use a regex trigger instead ({$) without success. To quote the documentation: "The snippet is expanded if the recently typed characters match the regular expression".

I have a snippet for C-like languages that looks like this:

snippet { "braces"
{
    $0
}
endsnippet

I would like to restrict this snippet to expand only if the tab trigger occurs at the end of the line.

I tried to use a regex trigger instead ({$) without success. To quote the documentation: "The snippet is expanded if the recently typed characters match the regular expression".

Source Link
xsot
  • 141
  • 4

Ultisnips - trigger expansion only at end of line

I have a snippet for C-like languages that looks like this:

snippet '{' "braces"
{
    $0
}
endsnippet

I would like to restrict this snippet to expand only if the tab trigger occurs at the end of the line.

I tried to use a regex trigger instead ({$) without success. To quote the documentation: "The snippet is expanded if the recently typed characters match the regular expression".