当前位置:网站首页>Puge - Code Honghu team -vscade code formatting and sorting
Puge - Code Honghu team -vscade code formatting and sorting
2022-07-18 04:56:00 【~Grapefruit flavored Poetry~】
vs code Code formatting
vs code The shortcut keys for formatting code are as follows : ( Source address )
- On Windows Shift + Alt + F
- On Mac Shift + Option + F
- On Ubuntu Ctrl + Shift + I
1、 The code is formatted as eslint style
link : ( For the installation of plug-ins, please refer to here )
Plug in required :eslint
Add... To the settings :
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "html",
"autoFix": true
},
{
"language": "vue",
"autoFix": true
}
],
eslint.autoFixOnSave Used for automatic formatting when saving , But only supported by default javascript .js file .
eslint.validate The file type used to configure the role .
Then when saving the code , It will be automatically formatted as eslint style ( It needs to be saved many times ).
2、HTML Format code indent
Plug in required :Vetur
link : ( install Vetur Reference here )
After installing this plug-in , You can see the following in the settings :

In order to make HTML Code can be formatted and indented , Add the following :
"vetur.format.defaultFormatter.html": "prettier"
Use the shortcut key of formatting code
边栏推荐
猜你喜欢

Socke编程简介

抢先体验! 在浏览器里写 Flutter 是一种什么体验?

Motion capture assists China Electric Power Research Institute in establishing a side cloud collaborative power independent inspection system

Start of u-boot S analysis (I)

u-boot之start.S分析(二)

For the treatment of test bugs, the management and improvement of code defects

云中断的三个主要原因

清晰的理解大端和小端

Sword finger offer16- integer power bit operation of numeric value

元宇宙带火的VR市场,字节也才摸到一点边
随机推荐
生成VOC数据集的xml文件
A 59 year old doctor studying in the United States, today received his fifth listed company
A solution to the failure of NVIDIA SMI command
59岁留美博士, 今天收获第五家上市公司
SQL Server存储过程多角度介绍建议收藏
Create a list, add the strings "a", "B", "C", "d" and "d" in turn, and print the contents of the set, then remove all the strings "d" in the list, and print its contents again
Six ways to simplify the process adopted by it suppliers
“高内聚低耦合”的软件设计建议收藏
Browser compatibility testing system, method and process
1143. Longest common subsequence
C#基本概念列举说明建议收藏
Cookies and sessions
winform去掉右上角关闭按钮
浏览器渲染原理解析建议收藏
[rasterio] geojson vector rasterization
争议中的换电:头部玩家的有限游戏
三、索引优化
MySQL时区问题
收银系统的硬件有哪些?
LeetCode_ Sliding window_ Simple_ 643. Maximum average number of subarrays I