当前位置:网站首页>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 :
边栏推荐
- rclone中文文档:常用命令大全
- K8s set up redis cluster
- Principle of introducing modules into node
- 图像风格迁移 CycleGAN原理
- 熱烈祝賀五行和合酒成功掛牌
- Using fuseki query when there are multiple models in TDB
- WiFi settings for raspberry Pie 4
- Fix the problem that the AI video intelligent platform easycvr device video cannot be played
- 微软宣布开源 (GODEL) 语言模型聊天机器人
- 广发证券开户是安全可靠的么?怎么开广发证券账户
猜你喜欢

为什么这么多人转行产品经理?产品经理发展前景如何?

Félicitations pour l'inscription réussie de wuxinghe
![[lingo] find the shortest path problem of undirected graph](/img/14/1ccae0f33f5857b546d7fd0aa74c35.png)
[lingo] find the shortest path problem of undirected graph

C语言实现【扫雷游戏】完整版(实现源码)

Illusory and simple screen raindrop post-processing effect

赌上了绩效,赢了公司CTO,我要搭DevOps平台!

Solve the problem of "unexpected status code 503 service unavailable" when kaniko pushes the image to harbor

运维管理系统,人性化操作体验

ctfhub-端口扫描(SSRF)

运维面临挑战?智能运维管理系统来帮您
随机推荐
【电气介数】电气介数及考虑HVDC和FACTS元件的电气介数计算
【系统分析师之路】第五章 复盘软件工程(逆向净室与模型驱动开发)
Solution to the problem that objects in unity2021 scene view cannot be directly selected
【FPGA帧差】基于VmodCAM摄像头的帧差法目标跟踪FPGA实现
Introduction to spark (one article is enough)
Programming examples of stm32f1 and stm32subeide infrared receiving and decoding of NEC protocol
灰度何以跌下神坛?
Is it safe to buy funds on Alipay? Where can I buy funds
关于图灵测试和中文屋Chinese room的理解
5G Massive MIMO的概念和优点总结
Will Internet talents be scarce in the future? Which technology directions are popular?
图像风格迁移 CycleGAN原理
Is it reliable to open an account on the compass with your mobile phone? Is there any potential safety hazard
AI视频智能平台EasyCVR设备录像出现无法播放现象的问题修复
go-etcd
Jena default inference query based on OWL
Reply and explanation on issues related to "online training of network security education in 2022"
[classification model] Q-type cluster analysis
Product learning (I) - structure diagram
Problem: officeexception: failed to start and connect (II)