vscode 원 키 규범 코드 형식의 실현
성숙 한 개발 로 서 당연히 코드 규범 을 지 켜 야 한다.먼저 코드 의 청결 도 는 첫 번 째 에 있어 야 한다.
vscode 포맷 코드 를 사용 하면 소량의 경우 수 동 으로 포맷 을 수정 할 수 있 지만,대량의 포맷 이 정렬 되 지 않 은 경우 어떻게 해 야 합 니까?
파일->첫 번 째 옵션->설정->{}
오른쪽 사용자 설정 에서 현재 편집기 의 기본 값 을 변경 할 수 있 습 니 다.
아래 의 복 사 는 사용자 설정 에 있 습 니 다
ctrl + s
코드 에 대한 규범 을 완성 할 수 있 습 니 다.
{
// vscode tabsize
"editor.detectIndentation": false,
// tabsize
"editor.tabSize": 2,
// #
"editor.formatOnSave": true,
// # eslint
"eslint.autoFixOnSave": true,
// vue
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "vue",
"autoFix": true
}
],
// # prettier eslint
"prettier.eslintIntegration": true,
// #
"prettier.semi": false,
// #
"prettier.singleQuote": true,
// # ( )
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
// #
"vetur.format.defaultFormatter.html": "js-beautify-html",
// # vue js ts
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "force-aligned"
// #vue html
}
},
// stylus, Manta's Stylus Supremacy
"stylusSupremacy.insertColons": false, //
"stylusSupremacy.insertSemicolons": false, //
"stylusSupremacy.insertBraces": false, //
"stylusSupremacy.insertNewLineAroundImports": false, // import
"stylusSupremacy.insertNewLineAroundBlocks": false //
}
vscode 원 키 규범 코드 형식 실현 에 관 한 이 글 은 여기까지 소개 되 었 습 니 다.더 많은 vscode 규범 코드 형식 내용 은 우리 의 이전 글 을 검색 하거나 아래 의 관련 글 을 계속 조회 하 시기 바 랍 니 다.앞으로 많은 지원 바 랍 니 다!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
React Typescript 스니펫새로운 구성 요소를 생성할 때 동일한 코드를 입력하는 데 지쳤다면 VS Code가 제공하는 멋진 솔루션인 코드 스니펫 🔥이 있습니다. 다음은 Typescript로 React 구성 요소를 만들기 위한 두 가지 스니펫입...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.