例如,yasnippet提供命令const inventoryArray = [{"name":"pizza","category":"food","unique":"no","amount":12},{"name":"bow","category":"weapon","unique":"no","amount":1},{"name":"pizza","category":"food","unique":"yes","amount":1}]
const props = ['name', 'category', 'unique', 'amount']
const result = props.map(p =>
[...new Set(inventoryArray.map(o => o[p]))]
)
console.log(result)
,该命令绑定到yas-new-snippet
。我不明白这是什么意思。这并不意味着先按Ctrl-C,然后再按Ctrl-n(应为C-c & C-n
)。这也不意味着先按Ctrl-C,再按n。正确的输入方式是什么?
答案 0 :(得分:3)
只需输入 C-c ,&和 C-n 。