DEV Community

Cover image for console.log() shortcut in VS code
Faisal Ahmed
Faisal Ahmed

Posted on • Updated on

console.log() shortcut in VS code

FIRST WAY

  • vs code open kore
  • ctrl + shift + p press korte hobe
  • snippets likhe search dite hobe
  • erpor j language e dorkar, oi language select kore, amader configure korte hobe.

Image description

Image description

Image description

{
    "Console.log": {
        "prefix": "clg",
        "body": "console.log($1);",
        "description": "Console Log"
    }
}
Enter fullscreen mode Exit fullscreen mode



ANOTHER WAY

  • first step:

Image description

  • second step (click the red mark like the image)

Image description

  • third step (write 11 to 18no. line of code)

Image description

  • code
// Place your key bindings in this file to override the defaultsauto[]
[
    {
        "key": "ctrl+r",
        "command": "code-runner.run"
    },
    {
        "key": "ctrl+alt+n",
        "command": "-code-runner.run"
    },
    {
        "key": "ctrl+shift+l",
        "command": "editor.action.insertSnippet",
        "when": "editorTextFocus",
        "args": {
            "snippet": "console.log(`${TM_SELECTED_TEXT}$1`$2);"
        }
    }
]
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
abdraevaraisa profile image
Raisa Abdraeva

super, thank you