occivink / kakoune-snippets

Snippet support for kakoune
The Unlicense
48 stars 6 forks source link

Using |} in snippet trigger seems to break loading #19

Closed andreyorst closed 5 years ago

andreyorst commented 5 years ago

Another snippet for Rust.

filename: |} - Closure, anonymous function (block)

${1:move }|${2:what}| {
        ${0:/* body */}
}

Trying to load this snippet produces this error message:

error running hook WinSetOption(snippets='Closure, anonymous function (block)' '|}' 'snippets-insert ''${1:move }|${2:what}| {
    ${0:/* body */}
}'' ')/: 2:6: 'set' regex parse error: unexpected '}' at '(|<<<HERE>>>})'
occivink commented 5 years ago

I hazard a guess that it's because of the trigger, if you want to use regex meta characters you have to escape them, so you'd have to rename the file \|\} - Closure, anonymouse function (block)

andreyorst commented 5 years ago

Yeah. you right.