How to collaborate like a pro in VS Code
Tags: productivity, vscode
Published: 2019-05-03 00:00:25

---
title: How to collaborate like a pro in VS Code
published: true
description: An overview of a few tools to help your team
tags: productivity, vscode
cover_image: https://thepracticaldev.s3.amazonaws.com/i/d05za9vysc8ofed5yksl.jpg
---

Development is often a team sport. Code does not live in silos—it can be delicately interwoven with developers working across the entire codebase with different team members. 

As developers, how can we work more efficiently as a team? What tools can we use to better collaborate? 

Over the years we have seen the rise of many software development frameworks, but we have also built powerful development tools that are ushering in a new golden age of collaboration. VS Code is one of these tools. 

VS Code has a vibrant ecosystem of open source extensions and customizations that can supercharge your team's ability to work smarter. 

## Streamline pair programming and debugging

Writing and debugging code together is great for harnessing the power of common thinking. Pair programming can lead to fewer coding mistakes and facilitates knowledge sharing between team members. 

Code collaboration, however, often requires either screen sharing, which limits interactivity, or text-based messaging, which becomes a clunky mess of copying and pasting code snippets and trying to replicate environments.

[Live Share](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare) for VS Code eliminates the friction of coding together by letting you collaboratively edit, debug, and fix code in real-time without leaving the comfort of your own VS Code setup. 

One of the best features of Live Share is that collaborators keep their personal development environment setups and settings—teammates can jump into your code from their own workspace. Collaborators can view and edit your code, but still use the extensions, settings, and customizations of their own personal text editor—no haphazardly cloning repos or installing a slew of dependencies to help your team.

![Microsoft Live Share](https://assets.website-files.com/5be13d6342a0a15c8f2c5aff/5be13d6342a0a1f0762c5c17_vs-code-ls-session.png)

Microsoft also offers the [Live Share Extension Pack](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack), which provides integrated voice calling and text chat by including two additional extensions, Team Chat and VS Live Share Audio, alongside the core Live Share extension. The pack is worth downloading to get the full experience.

If you’re using Live Share, you should also try its companion extension [Live Share Pomodoro](https://marketplace.visualstudio.com/items?itemName=lostintangent.vsls-pomodoro). Pomodoro timers are a great way to implement the [pomodoro technique](https://francescocirillo.com/pages/pomodoro-technique), where your work is broken down into intervals (typically 25 minutes in length) that are separated by short breaks. 

![Pomodoro technique](https://thepracticaldev.s3.amazonaws.com/i/u1szubdpeu3l5moue9wx.png)

Integrating the Pomodoro technique into your collaborative coding sessions can make them even more powerful and productive. And, if you’re already using the Pomodoro technique, it’s a smooth way to hook your colleagues into trying it.  

## Integrate productive communication

Some developers prefer communication tools inside VS Code, others do not. We are often inundated with notifications (I flinch when I hear that focus-shattering knock brush from a Slack notification). 

Tools must strike a balance between providing you with the information you need and preserving your focus and flow. I think the tools listed below aim to be as least intrusive as possible. 

[CodeStream](https://marketplace.visualstudio.com/items?itemName=CodeStream.codestream) allows you to leave comments, ask questions, and have discussions across your codebase from within VS Code. It eliminates the cumbersome task of trying to identify lines of code from inside Slack and manage multiple threads about different sections of the codebase. By eliminating this workflow, you eliminate a costly context switch. 

![CodeStream](https://assets.website-files.com/5c1b064db9734016ca52ab39/5c1d1027ea7f432072c6b762_2018-12-21%2011.08.39.gif)

Slack is great for discussions about specific topics, but is not so great for conversations about code. 

Sometimes, however, it is important to make sure conversations can continue even if you’ve left your VS Code workspace. CodeStream integrates with Slack to keep the necessary channels in the loop. 

Many of you may also use Jira, Atlassian’s development planning and management solution. Jumping back and forth between Jira and VS Code can be disruptive. And losing track of what tasks you’ve been assigned by your team can be even more disruptive. 

![Jira and VS Code](https://thepracticaldev.s3.amazonaws.com/i/ou1qpdrtcsq1evzjeizj.png)

Using the [Jira extension](https://marketplace.visualstudio.com/items?itemName=gioboa.jira-plugin) you can get view, search, and filter issues in Jira inside VS Code. Pull up the extension for a quick reference when you need to and ignore it when you don’t. You will avoid a few unnecessary trips to the browser to check Jira and can access your team’s tasks even faster. 

## Enhance the capabilities of source control

Git is already a powerful tool every team should be using, but with a few tweaks, your team can enhance its Git superpowers. 

[GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) is by far the most popular extension to fully harness the power of Git in VS Code. You can do a lot of different tasks with GitLens (I’d recommend reading over the entire [README](https://github.com/eamodio/vscode-gitlens)), but a few notable highlights:  

* Current line blame adds blame information at the end of each line, with more detailed info available on hover
* On-demand recent change annotations to highlight lines changed by the most recent commit
* Authorship code lens showing the most recent commit at the top of files or code blocks
* Status bar blame annotation showing author and date for the current line

![GitLens](https://raw.githubusercontent.com/eamodio/vscode-gitlens/master/images/docs/current-line-blame.png)

By bringing your team’s Git information into VS Code, you can better understand who is responsible for changes to the codebase and how those changes relate to the code’s commit history. 

If you’re looking for a simpler version of GitLens, try [GitBlame](https://marketplace.visualstudio.com/items?itemName=waderyan.gitblame), which helps you pinpoint who is responsible for what changes, so that you know exactly which team member to ask when you have a question. 

GitBlame simply adds blame information to the status bar in your VS Code workspace. 

![GitBlame](https://github.com/Sertion/vscode-gitblame/raw/master/images/GitBlamePreview.gif)

Your team will also have to manage pull requests for your GitHub repos. Making sure pull requests are reviewed efficiently can empower your team to build new features and improve the quality of your code faster. 

[GitHub Pull Requests](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github) is an official GitHub extension that helps you review and manage GitHub pull requests right inside VS Code. 

![GitHub Pull Requests](https://github.com/Microsoft/vscode-pull-request-github/raw/master/.readme/demo.gif)

GitHub Pull Requests allows you to: 

* Browse PRs from within VS Code
* Review PRs from within VS Code with in-editor commenting
* Validate PRs from within VS Code with easy checkouts

With the Pull Requests extension, you can review code changes faster and with ease to keep things flowing smoothly. 

## Ensure consistency across workspaces

[EditorConfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) ensures your team is using consistent settings in VS Code (and across other IDEs as well). [EditorConfig](https://editorconfig.org/) lets you override user and workspace settings with custom settings in a `.editorconfig` file. 

With EditorConfig, you can: 

* Set the indent style and width
* Configure the default tab width
* Control the charset
* Trim trailing whitespace
* Insert final newlines 

Below is an example of an EditorConfig file that adjusts the end-of-line and indentation styles for Python and JavaScript files: 

![EditorConfig](https://thepracticaldev.s3.amazonaws.com/i/9j6478xmk8oxj6r4kc1h.png)

EditorConfig is a powerful, yet simple tool. Notice how you can adjust formatting for particular files using wildcard matching.

Keeping file formatting makes sure files are easily readable by any team member on any editor or IDE—and it only takes a minute to set up. And, by including a `.editorconfig` file in your Git repositories, anyone who clones or forks the repo will be able to use the settings that you have preconfigured. 

## Supercharge your team’s comments 

When jumping into a teammate’s code, comments act as critical guideposts for navigating and understanding what role each part of the code plays. Writing clear, concise, and descriptive comments is important for allowing others to read (and hopefully make changes) to your code. 

If you’re looking to write useful comments, check out Jeff Atwood’s [Code Tells You How, Comments Tell You Why](https://blog.codinghorror.com/code-tells-you-how-comments-tell-you-why/) and freeCodeCamp’s [Putting Comments in Code: The Good, the Bad, and the Ugly](https://medium.freecodecamp.org/code-comments-the-good-the-bad-and-the-ugly-be9cc65fbf83). 

A few VS Code extensions can help you supercharge your comments.

[Todo Tree](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree) will automatically create a tree in your explorer pane that organizes your `TODO` and `FIXME` comments so that you can quickly jump to specific parts of the codebase that need to be reworked. When you open a file, it will also highlight each `TODO`. 

![Todo Tree](https://raw.githubusercontent.com/Gruntfuggly/todo-tree/master/resources/screenshot.png)

Highlighting and organizing your team’s todos is a great way to ensure you don’t overlook any work that needs to be done, and your teammates can easily find where they might be able to help in your code. 

If you don’t want to add another icon to your explorer pane, [Todo Highlight](https://marketplace.visualstudio.com/items?itemName=wayou.vscode-todo-highlight)  is a simpler extension that simply highlights `TODO` and `FIXME` comments so that you can identify where to go in each file. Tag highlighting can be quickly toggled from the command palette. 

In addition to improving your `TODO` comments, you can also add context to other comments to provide you and your team with visual cues.  

[Better Comments](https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments) can help you annotate your comments so that they can be categorized into alerts, queries, todos, and more. It works best when your entire team has the extension installed. 

![Better Comments](https://github.com/aaron-bond/better-comments/raw/master/images/better-comments.PNG)

Color-coded comments are a nice way to help others understand your code, but If you’re writing a long comment, you can also make it more manageable for your teammates to read by automatically breaking it into multiple lines. [Rewrap](https://marketplace.visualstudio.com/items?itemName=stkb.rewrap) will wrap your comments to a set line length so that you no longer have to worry about reorganizing your comment if you add or delete information. 

![Rewrap](https://github.com/stkb/Rewrap/wiki/images/example.png)

Keep your fellow contributors sane—no more horizontal scrolling. 


Thanks for reading! Are there any tools you use that make collaborating easier for you and your team? 


**I write a newsletter called [SRC](https://www.software.com/src)—what developers need to know, every week.** No spam or fluff. Every email includes the government-mandated unsubscribe link.