DEV Community

Cover image for How I set up VSCode for productivity? [Checklist]
Zoe Chew
Zoe Chew

Posted on • Originally published at whizzoe.com

How I set up VSCode for productivity? [Checklist]

List of shortcuts, configuration, and extension that I use in VSCode

Note: This article is part of my toolkit newsletters↗️ where I share resources about building things. Join me :)

I made a code editor switch from Sublime Text to Visual Studio Code (VSCode). Like many developers, I couldn’t be happier.

As a newcomer to VSCode, I realized I needed to get the best out of it and explore what it has to offer.

In this post, I will share a list of configuration that I use, and how you can set them up to boost your productivity.

1. Get a nice theme

Coding is a long-hour and creative task. Therefore, I prefer a code editor theme that I feel comfortable and inspired to use.

I used to love Dracula theme. But recently, I’ve become a fan of Field Lights theme:

Field Lights Theme

2. Configure for workflow

I prefer a clean and minimalist view in VSCode. This allows me to focus on writing codes without seeing those extra panels.

Some of my settings in “View” > “Appearances”:

  • Status Bar (disable)
  • Activity Bar (disable)
  • Toggle Panel (disable)
  • Zoom In (to your comfortable level)
  • Minimap (disable)
  • Wordwrap (enable)

Fine-tune settings.json using Open Settings (JSON) editor:

I’ve enabled auto-save and wordWrap by adding few lines of code in the settings.json.

To edit this file, simply CTRL+SHIFT+P and type in search bar “Open Settings (JSON).

{
"workbench.colorTheme": "Field Lights",
"window.zoomLevel": 1,
"workbench.activityBar.visible": false,
"workbench.statusBar.visible": false,
"[html]": {
   "editor.defaultFormatter": "vscode.html-language-features",
   "editor.tabSize": 2
},
"breadcrumbs.enabled": false,
"window.menuBarVisibility": "default",
"editor.minimap.enabled": false,
"editor.renderControlCharacters": false
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 5000,
"editor.wordWrap": "on",
}

I keep these panels open for day-to-day navigation:

  • Terminal (built-in terminal without having to open externally)
  • Explorer (browse through files or create new ones)

panels

3. Handy shortcuts

Keyboard shortcuts are a huge time-saver. I’ve explored some VSCode shortcuts and applied on a daily basis.

Here are some of my favorites:

  • Quickly search any project files in the folder CTRL+P
  • Command Palette CTRL+SHIFT+P
  • Show/hide sidebar CTRL+B
  • Open Terminal CTRL+SHIFT+`
  • Jump between file tabs CTRL+TAB
  • Open files side-by-side *CTRL+*
  • Switch between editors side-by-side CTRL+1 ; CTRL+2 ; CTRL+3
  • Fast scrolling ALT+scroll
  • Search by file name CTRL+P
  • Multi-occurrence editing current selection+CTRL+SHIFT+L
  • Duplicate a line Up or Down SHIFT+ALT+UP/DOWN
  • Move a line of code Up or Down ALT+UP/DOWN
  • Clear extra whitespaces CTRL+K then CTRL+X
  • Enable multi-cursor editing ALT+click+select text
  • Add or remove comment CTRL+/
  • Write HTML tags with Emmet abbreviation type html:5+tab
  • Zoom In or Out CTRL+ ‘+’ / ‘-’

You can also download the full VSCode shortcut from the official website:

vscode shortcut

4. Cool extensions

The awesome thing about VSCode is that it comes with a library of free extensions that can improve your workflow.

Some extensions that I use:

  • Python extension (support your python programming)
  • Prettier — Code formatter (easily format your JavaScript / TypeScript / CSS)
  • Inline HTML (syntax Highlighting for html/css)
  • Indent 4-to-2 (convert indentation from tab or 4 spaces into 2 spaces)
  • IntelliSense for CSS class names in HTML (CSS class name autocomplete)

Where to find me? 👋

[1] Find me on Personal Site / Twitter / LinkedIn 🔥

[2] In case you miss out, I can send my upcoming toolkit to your inbox — Click here to join my newsletter 💌

[3] If you’re feeling generous today, you can buy me a coffee

Top comments (35)

Collapse
 
riencoertjens profile image
Rien Coertjens

cool, some extra tricks!
I prefer cmd/ctrl + j for opening terminal, it doesn't stop any of the processes, it just hides the panel
and another useful multi-select shortcut is cmd/ctrl + i, which puts a cursor on every selected line

Collapse
 
whizzzoe profile image
Zoe Chew

👋 Hey Rien! Thanks so much for your generous share! I'm adding cmd+j on my list soon!

Collapse
 
metruzanca profile image
Samuele Zanca

A shortcut i recently discovered is ctrl + enter, which just gives you a new line without creating a mess regardless of where you were in the line.

I used to just ctrl + right arrow as I could never remember where my end key is on my many laptop keyboards (3: work, gaming, toaster-level pc) but this new trick is super handy.

Also surprised you didn't mention all the multi cursor tricks.

Collapse
 
amirthananth profile image
Amirthananth

This is such a nice article for a Beginners to VSCode. I've spent a lot of time searching for many of these options when I switched to VSCode.

Nice Work Zoe :)

PS: Check out "Material Icon Them". I love having a vibrant icon choice when i work with multiple files/rechnologies.

Collapse
 
whizzzoe profile image
Zoe Chew

Hey Amirthananth! Thanks a lot for reading & glad to hear your feedback :)

Material Icon Theme is such a cool recommendation! Love it & just installed. Thanks for sharing it!

Collapse
 
amirthananth profile image
Amirthananth • Edited

Glad to hear :)

Collapse
 
chachan profile image
Cherny

Love the theme, I've been looking for one like this for ages. For productivity I'm also using these:

  • Code Time

    GitHub logo swdotcom / swdc-vscode

    Time-tracking plugin for Visual Studio Code


    Code Time
     


    Code Time is an open source plugin for automatic programming metrics and time-tracking


    Marketplace Installs Rating Live Share enabled


    Getting started

    1. Create your web account

    Code Time for VS Code login prompt

    The Code Time web app has data visualizations and settings you can customize, such as your work hours and rates per project for advanced time tracking. You can also connect Google Calendar to visualize your Code Time vs. meetings in a single calendar.

    You can connect multiple code editors on multiple devices using the same email account.

    2. Track your progress during the day

    Code Time for VS Code status bar

    Your status bar shows you in real-time how many hours and minutes you code each day. A rocket will appear if your code time exceeds your daily average on this day of the week.

    3. Check out your coding activity

    To see an overview of your coding activity and project metrics, open the Code Time panel by clicking on the Code Time icon in…

  • carbon-now-sh

    GitHub logo carbon-app / carbon

    🎨 Create and share beautiful images of your source code

    maintained with Ranger All Contributors MIT License FOSSA Status

    Open Collective sponsors Open Collective backers Open Collective sponsors

    Translations

    Introduction

    You know all of those code screenshots you see on Twitter? Though the code's usually impressive, we saw room for improvement in the aesthetic department. Carbon makes it easy to create and share beautiful images of your source code. So what are you waiting for? Go impress all of your followers with your newfound design prowess.

    Carbon example

    Features

    • Customization. Customize things like your image's syntax theme, window style, and more
    • Share quickly. Save your image or a link with one click
    • Import from GitHub gist. Simply append a GitHub gist id to the url

    Usage

    Import

    There are a few different ways to import code into Carbon:

    • Drop a file onto the editor
    • Append a GitHub gist id to the url (e.g. carbon.now.sh/GIST_ID_HERE)
    • Paste your code directly

    Customization

    Once you've got…



  • GitLens



    GitHub logo
    eamodio / vscode-gitlens



    Supercharge the Git capabilities built into Visual Studio Code — Visualize code authorship at a glance via Git blame annotations and code lens, seamlessly navigate and explore Git repositories, gain valuable insights via powerful comparison commands, and so much more





    GitLens Logo

    GitLens supercharges the Git capabilities built into Visual Studio Code. It helps you to visualize code authorship at a glance via Git blame annotations and code lens, seamlessly navigate and explore Git repositories, gain valuable insights via powerful comparison commands, and so much more.

    Support GitLens

    Sponsored by


    Discuss, review, and share code with your team in VS Code. Links discussions about code to your code. Integrates w/ Slack, Jira, Trello, and Live Share. Try it free

    While GitLens is generously offered to everyone free of charge, if you find it useful, please consider supporting it.

    Also please write a review, star me on GitHub, and follow me on Twitter

    What's new in GitLens 10

    • Adds all-new iconography to better match VS Code's new visual style
    • Adds an all-new…
  • Indenticator



    GitHub logo
    SirTori / indenticator



    VS Code Extension: Highlights the current indent depth of the cursor




    Build Status

    Indenticator

    Visually highlights the current indent depth.

    This extension can be used by itself, but it's recommended to use it alongside the builtin indent guides.

    Changes in Visual Studio Code 1.23.0:
    With Version 1.23.0 VS Code introduced a new builtin active indent guide. For an explanation of differences and tips regarding the new feature and this extension please see remarks section

    Indenticator demonstration
    Example using default settings

    Feature Highlights

    • Peeking around the current indent block: Optionally a hover can be added on the current indent marker to peek before and/or after the current indent block.
      To activate set indenticator.showHover to true

      Indenticator demonstration
      Example has indenticator.hover.peekBack & indenticator.hover.peekForward set to 1
    • Highlighting the the indent guide for the contained block: Optionally a second indent highlight can be configured to highlight the block contained by the current cursor position
      To activate set indenticator.inner.showHighlight to true

      Indenticator demonstration
      Example has indenticator.inner.color.dark set to #ff0000
    • Language

Collapse
 
whizzzoe profile image
Zoe Chew

Hey 👋 Cherny! Thanks so much for your generous share! All of them are really helpful and I can't wait to try 'em. Happy coding! 😊

Collapse
 
dsctopher profile image
dsc-topher

Have you tried using Git Graph? Just a bit of easy in the eyes git log and easier access to git diffs or check changes

marketplace.visualstudio.com/items...

Collapse
 
whizzzoe profile image
Zoe Chew

Awesome share, thanks so much! I haven't but am adding it to my list!

Collapse
 
fabiorosado profile image
Fabio Rosado

This is a great list of tips Zoe I need to add the auto-save one on my end.

Another extension I’d recommend is Brackets. It helps a lot when you have to deal with lots of ( and {

Collapse
 
whizzzoe profile image
Zoe Chew

Thanks so much for recommending, Fabio! I just looked it up, I assume it's the "Bracket Pair Colorizer" hehe :D Going to try this extension soon!

Collapse
 
fabiorosado profile image
Fabio Rosado

Yeah that’s the one it’s great if you code on a language that uses a lot of brackets and such but still good for python helped me a few times 😄

Thread Thread
 
whizzzoe profile image
Zoe Chew

That's great to hear! 😁

Collapse
 
shjordan profile image
Jordan Humberto de Souza

Couldn't find the Inline HTML extension, could you provide a link?

Collapse
 
whizzzoe profile image
Zoe Chew

Hey 😊Jordan, yeah sure and here you go: marketplace.visualstudio.com/items...

Collapse
 
shjordan profile image
Jordan Humberto de Souza

Seems it is not available anymore:
"This extension is now unpublished from Marketplace. You can choose to uninstall it."

Thread Thread
 
whizzzoe profile image
Zoe Chew

Ah great catch :) Thanks for the info, appreciate it!

Collapse
 
julienverkest profile image
Julien Verkest

Fast scrolling ALT+scroll

Thank you just for this trick!

Collapse
 
whizzzoe profile image
Zoe Chew

Hey Julien, so happy to hear you find it useful!

Collapse
 
peacefullatom profile image
Yuriy Markov

Check out this article for more shortcuts:
dev.to/peacefullatom/productivity-...

HappyCoding!

Collapse
 
whizzzoe profile image
Zoe Chew

And thank you so much for the awesome share of shortcuts!!

Collapse
 
peacefullatom profile image
Yuriy Markov

You are welcome! 👍

Collapse
 
whizzzoe profile image
Zoe Chew

Thanks Yuriy! Happy coding too!

Collapse
 
yokotobe profile image
yokotobe

Do you use Git on VS Code?

Collapse
 
whizzzoe profile image
Zoe Chew

hey thanks for leaving a comment :) I haven't yet for my new MBP, but in my old Windows laptop I've Git installed + VS Code

Collapse
 
lt0mm profile image
Tom

gitlens is a really nice extension with file, line history views, gitblame and bunch of other cool stuff

Collapse
 
whizzzoe profile image
Zoe Chew

Great share, Tom! Thanks a lot for recommending :)

Collapse
 
sitelifer profile image
Karen Grau

Zoe, great tips. I am a beginner and can't open vscode terminal. I was doing fine with it and now I am getting this error message.
The terminal process "/bin/zsh '-l', 'zsh'" failed to launch (exit code: 127).

Will buy many coffees for help.

Collapse
 
gaelgthomas profile image
Gaël Thomas

Another great article made by you Zoe! 😀
Thank you, I discovered a new theme, and I love it!

Collapse
 
whizzzoe profile image
Zoe Chew

Thanks so much, Gaël! I'm glad to hear you find this article useful! Yeah, love the theme super comfortable for my eyes haha

Collapse
 
salmacoder profile image
Salma

Great Article, Thank you for the share

Collapse
 
whizzzoe profile image
Zoe Chew

Thanks Salma! Glad you find value in this article :)

Collapse
 
myjanala profile image
Mezbaur Rahman

Great article, thanks!

Collapse
 
whizzzoe profile image
Zoe Chew

hey thanks for taking the time to read! I find myself using the file finder a lot 😁