DEV Community

Marcos RJJunior
Marcos RJJunior

Posted on

2

3 Tricks on VS Code

I've been using the first one since the last update.

The options are very minimal, but really helpful !! let me know how do you feel using them.

Enabling bracket pair colorization

"editor.bracketPairColorization.enabled": true,
Enter fullscreen mode Exit fullscreen mode

bracket pair colorization

Enabling Auto complete your sentence

"editor.suggest.preview": true,
Enter fullscreen mode Exit fullscreen mode

auto complete sentence

Sorting code

{
    "key": "shift+alt+s",
    "command": "editor.action.sortLinesAscending"
}
Enter fullscreen mode Exit fullscreen mode

Running multiple actions using macros

Because this is still not native feature, I'm using the macros extension.

{
    "key": "shift+alt+f",
    "command": "macros.fixDocumentAndSort",
    "when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor"
}
Enter fullscreen mode Exit fullscreen mode
"macros": {
    "eslintFixAndFormatDocument": [
        "eslint.executeAutofix",
        "editor.action.formatDocument"
    ],
},
Enter fullscreen mode Exit fullscreen mode

In this binding, vscode is performing two actions

  • formatting the document
  • fixing eslint issues.

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay