I have the following snippet:
Which will wrap a line/selection with console.log(); replacing any ';' characters in the line. This is what I want if I select the line, but If I run the snippet (via a key binding) on a line without selecting text, it will duplicate the text.
// If I trigger the keybinding while the cursor is at the beginning of the following line, with no text selected:
console.log( exampleFunction()); exampleFunction();
I'd prefer it replace the whole line. Is this possible?