当前位置:网站首页>How to create an exclusive vs Code theme
How to create an exclusive vs Code theme
2022-07-01 07:10:00 【CamphorBloom】
1、color How it works .
Using shortcut keys Ctrl+Shift+P, Input Open settings, Choose not to default Of settings.json File Click :

Try adding the following configuration :

You can see tab.activeBackground This attribute renders the label background of the currently used file red .
Other relevant configuration references :Visual Studio Code User and Workspace Settings
There are hundreds of color schemes , This is both exciting and overwhelming .
2、color Classification of uses
These color attributes can be roughly divided into two categories :

- Apply color ( The color of the program itself ) Include title block 、 tab 、 menu 、 Scroll bar 、 General text, etc .
- Symbol color ( Such as code highlighting ).
3、* Use VS Code Extension generator
For our convenience, we will post it on VS Code Theme Market , Need its extension / Custom template file .
https://github.com/microsoft/vscode-generator-code
https://www.npmjs.com/package/generator-code
Refer to the above documents , Download dependency :
npm install -g yo generator-codeGlobal installation is convenient for future management .
Start the generator :
yo code
You need to answer a few necessary questions , Use the arrow keys +enter Choice you ( The blue words at the back are the filling contents ).

Is answered , It will initialize a locally git Warehouse ( The file name is filled in by the third option ).
4、 edit xxx--color-theme.json
Of course, open the file , You will find that there is 600 Come on , If you don't mind , Maybe it will be buried tomorrow . Do you want to change one by one ? Here's a tip !—— Use Theme Debugger To preview the color effect .

It will pop up a new window , Once you make any changes , restart debugger You can see the effect .

There's another problem , How do we know that an attribute and scope are mapped to theme What about the place of ?( The replacement of some keywords is unknown )
The second skill is to open the command panel Token and Scopes Inspector, as follows :

The mouse is hovering selector On , Pop up relevant information ( Languages , type , The foreground , Background color , Contrast , Text matching range )

An attribute has been added here , Find out Extension Development Host The corresponding window border becomes the defined color .
It is a headache to go through the properties one by one and modify them , After all, no one wants to do something that takes time and effort .
Online theme color generator :VS Code Theme Color Generator - Coder Coder
Design according to personal preferences , Finally, the defined theme json Just copy and paste the file . If you don't know how to choose colors , Recommend to Coolors - The super fast color palettes generator! Look for inspiration , Or to Image to Colors Palette Generator - Extract Colors from Image Looking for the right visual experience .
5、 Release theme

- Sign in Microsoft Azure DevOps.
- Create an organization .
- Register your theme extension .
- Release
- Brag about it on social media (·...·)

Fill in the relevant information , Click on Continue.
After verification , Direct to personal dashboard interface :
Click next to the user's Avatar User settings, choice Personal access tokens( Used for authentication ).
Click on +New Token, Fill in the following information ( Baidu, if you don't understand it ):


Don't forget to copy your token Oh !!!
Navigate to https://marketplace.visualstudio.com/manage/createpublisher?managePageRedirect=true
You just need to fill in Basic information that will do :
Click on Create( It may need to be verified ).
Go back to the topic extension file , perfect package.json The messages in the :

And customization README.md The contents of the document .
everything , Only the last shiver .
Refer to the official website : Publishing Extensions | Visual Studio Code ExtensionAPI
vsce,“Visual Studio Code Extensions” Abbreviation , Is a package for 、 Release and manage VS Code Extended command line tools .
install vsce command :
npm install -g vsceWith Publisher Identity login :
vsce login <YourPublisherName> 
You are then asked to enter token To verify .

Pack it up as a xxx.vsix file ( The output is in the root directory ):
vsce package
command :
vsce publish
Be accomplished !!!
stay vscode market, Manager Publisher & Extensions View in :

stay marketplace.visualstudio Details shown in :Menon Dark - Visual Studio Marketplace


The above is what I developed vscode First experience of theme expansion , If you like , Try this theme !
Reference material :
边栏推荐
- [target detection] yolov5, the shoulder of target detection (detailed principle + Training Guide)
- 电脑有网络,但所有浏览器网页都打不开,是怎么回事?
- 运维管理系统,人性化操作体验
- [FPGA frame difference] FPGA implementation of frame difference target tracking based on vmodcam camera
- Code practice - build your own diffusion models / score based generic models from scratch
- [the path of system analysts] Chapter 5: software engineering of double disk (reverse clean room and Model Driven Development)
- 【剑指offer&牛客101】中那些高频笔试,面试题——链表篇
- Subclasses call methods and properties of the parent class with the same name
- 如何通过cdn方式使用阿里巴巴矢量图字体文件
- 手机开户选哪个证券公司比较好,哪个更安全
猜你喜欢
![C language implementation [minesweeping game] full version (implementation source code)](/img/70/60f9a61bd99fa5fb5fab679a32528e.png)
C language implementation [minesweeping game] full version (implementation source code)
![C language implementation [Sanzi chess game] (step analysis and implementation source code)](/img/3b/d32b46292ed20f31a6e1db97349df1.png)
C language implementation [Sanzi chess game] (step analysis and implementation source code)

如何进入互联网行业,成为产品经理?没有项目经验如何转行当上产品经理?

【Tikhonov】基于Tikhonov正则化的图像超分辨率重建

Image style migration cyclegan principle

ctfshow-web355,356(SSRF)

关于图灵测试和中文屋Chinese room的理解

【LINGO】求解二次规划

JAX的深度学习和科学计算

運維管理系統,人性化操作體驗
随机推荐
【分类模型】Q 型聚类分析
自动化测试平台(十三):接口自动化框架与平台对比及应用场景分析及设计思路分享
ctfshow-web351(SSRF)
8 figures | analyze Eureka's first synchronization registry
【系统分析师之路】第五章 复盘软件工程(逆向净室与模型驱动开发)
Buildreoot override mechanism
Automated test platform (13): interface automation framework and platform comparison, application scenario analysis and design ideas sharing
DC-4靶机
Solve the problem of "unexpected status code 503 service unavailable" when kaniko pushes the image to harbor
Problem: officeexception: failed to start and connect (III)
Will Internet talents be scarce in the future? Which technology directions are popular?
解决无法读取META-INF.services里面定义的类
Webapck packaging principle -- Analysis of startup process
如何进入互联网行业,成为产品经理?没有项目经验如何转行当上产品经理?
【Tikhonov】基于Tikhonov正则化的图像超分辨率重建
How to permanently configure local opencv4.5.5 for vs2019
Is the account opening of GF Securities safe and reliable? How to open GF Securities Account
Introduction to spark (one article is enough)
DC-4 target
rclone 访问web界面