Shougo / neosnippet.vim

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

Using the same variable in a single snippet stopped working #468

Closed bugeats closed 5 years ago

bugeats commented 5 years ago

At one point this was working as expected:

snippet console-log
alias cl
options head
  console.log('>> ${0}', $0);

When the first $0 is tabbed to, you can fill in a value. Upon tabbing to the next position, that value would be populated with what you just typed.

At some point there was an update and the above example stopped working. Instead of populating the second $0, it's just blank.

Shougo commented 5 years ago

Unfortunately, it is invalid syntax. So it does not work.

You cannot use $0 as mirror placeholder.

snippet console-log
alias cl
options head
  console.log('>> ${1}', $1);

It should work.

bugeats commented 5 years ago

Thanks buddy. You do good work.