Shougo / neosnippet.vim

neo-snippet plugin
Other
1.12k stars 108 forks source link

Wierd behaviour with use of & and later expansion #505

Closed dbeecham closed 2 years ago

dbeecham commented 2 years ago

This snippet

options head
    ret = foo(${1:&foo}, ${2:&bar}, ${3:0});
    $1
    ${0}

expands badly. However, this one works fine (no later expansion with $1)

options head
    ret = foo(${1:&foo}, ${2:&bar}, ${3:0});
    ${0}

as does this (no use of & in the expanded variable)

options head
    ret = foo(${1:foo}, ${2:&bar}, ${3:0});
    $1
    ${0}

The smallest bad example is this one

snippet foo
    ${1:&}
    $1
    ${0}
Shougo commented 2 years ago

Fixed.