r5n-dev / vscode-react-javascript-snippets

Extension for React/Javascript snippets with search supporting ES7+ and babel features
MIT License
1.72k stars 441 forks source link

How to change a snippet -> remove the object in the clg shortcut? #197

Closed aindriu80 closed 2 years ago

aindriu80 commented 2 years ago

Hi,

How do you remove the object in the console line shortcut or create a shortcut without the object there? When you type clg you get the following:-

console.log(object)

I want the following:-

console.log()

Often when I am using console.log I am using it to print quotes out and then something else, once I type clg and then quotes I get:

console.log("object")

The problem is that I have to manually delete what's in the quotes and it's too much effort. Also, when using the clo shortcut the second tab brings you outside the ) bracket and not after the comma with the object highlighted.

console.log(object, object)

ice-chillios commented 2 years ago

clg is for console.log($1), you can tap TAB to go to those parents. for console.log("object", object) go with clo

aindriu80 commented 2 years ago

I don't think you read my post,

I am NOT looking for object at all.

How do you REMOVE the object in the shortcut?