sublimetext3 - How do I automatically have multiple cursors in a Sublime Text 3 snippet? -
i have console log snippet sublime text 3.
{ "keys": ["alt+super+l"], "command": "insert_snippet", "args": { "contents": "console.log('$1', $2)" }, "context": [ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, ] }
i there multiple cursors, that, when call key snippet, cursor @ both $1 , $2 locations, want log variable name , variable value in console. how manage this?
use ${1:placeholder}
(or $1
) in both places. particular snippet, like:
{ ... "contents": "console.log('${1:variable}', ${1:variable})" ... }
if don't want placeholder , want cursor in 2 places, it'll this:
{ ... "contents": "console.log('$1', $1)" ... }
let me know if works you.