DEV Community is one of the most famous platform for developers to share great ideas. Thanks to DEV API, I made an extension to make it possible to write posts using Visual Studio Code.
In this article, you will learn how to use DEV Community extension for Visual Studio Code to write posts in DEV Community using Visual Studio Code.
Prerequisites
To get started, you need install Visual Studio Code. For better user experience, you can also install one or more markdown extensions for Visual Studio Code.
Install the DEV Community extension
In Visual Studio Code, open Extensions and search for dev.to.
Click Install to install the extension.
Restart Visual Studio Code and select DEV icon on the activity bar.

Sign In DEV Community Account
To write posts you need to sign in your DEV Community account first.
Click Create API key in DEV COMMUNITY: POSTS view to open DEV Community account dashboard in browser. Input vscode in description inputbox then click Generate API key button:

Back to Visual Studio Code, and click Sign in, paste API key:

Edit or Write A New Post
Updated on 2019/10/23
You can use Code Spell Checker for spell check. To make Code Spell Checker work with DEV Community extension, you need add
devtoto Code Spell Checker allowed schemas:
- Click File - Preferences - Settings to open Visual Studio Code settings page.
- Search Allowed Schemas, click Add Item button to add
devtointo the list:![]()
Preview and View Online
Visual Studio Code has built-in support for markdown preview, you can press Ctrl + K then press V (Ctrl + K V) to preview locally.
To published post, you can also right click its title in the post list to select View online to view the post in browser:
Publish A Post
To publish a post you can do one of the followings:
Change
publishvalue totruein post yaml properties at top of the content, and save the post.
Insert Images
Like any markdown, you can insert online images like following:

Updated on 2019/10/8
From v0.0.11, the extension uploads images to Imgur by default. If you would like to upload to GitHub instead, press
Ctrl+Shift+Pand execute DEV Community: Update GitHub personal access token to configure GitHub token, and the extension will upload images to your GitHub repository then.
The DEV Community extension can help you to quickly upload images to GitHub and insert the code to your current post.
Open browser and go to https://github.com/settings/tokens/new.
Input vscode in note inputbox, check repo scope and click Generate token button:

Copy the generated token.
-
Click Upload images at bottom left corner of Visual Studio Code:

From v0.0.11, you need set GitHub token by executing DEV Community: Update GitHub personal access token command. Or the image will be uploaded to Imgur. See step 7.
Select the image you would like to upload, and the extension starts to upload the image to GitHub:

After upload complete, the code will insert to your current post automatically:

To change or remove GitHub token, press
Ctrl+Shift+P, and execute DEV Community: Update GitHub personal access token and DEV Community: Remove GitHub personal access token:

Feedback and Contribute
DEV Community extension for Visual Studio Code is published under MIT license. You can find its source code from https://github.com/Sneezry/vscode-devto. This extension is still in preview, and its functionality may be limited. If you have any feedback, welcome to open a ticket at https://github.com/Sneezry/vscode-devto/issues (GitHub account required).







Latest comments (19)
Thanks for this. But the images i use is are gotten from Pinterest , if will upload them to GitHub will there be any problems like copyright infringement.
Is there a way to add a post to a series from this extension; or should this be done on the site still?
You can add
seriesproperty in yaml section on top of the article.Ah, perfect. Thank you :) this is a great extension.
what you have done is so great , i just used this tools and now we need to move forward and work on other extension for the auto-complete and suggestions
I'm not sure why, but trying to sign in just gives me an
Unexpected end of JSON inputerror =/Ohhh that’s good!
This is Lit!!! :D great
Cool beans :D
Very cool 🥰😎🥰
So cool I'll try this out!
Damn, this is pretty awesome. Thanks a lot