質問編集履歴
1
補足追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -23,14 +23,203 @@
|
|
23
23
|
コードを保存すると(保存時に整形)このようにタグが全て左寄せになってしまう。
|
24
24
|
|
25
25
|
### setting.jsonについて
|
26
|
+
```json
|
27
|
+
{
|
28
|
+
// ウィンドウ設定
|
29
|
+
"window.zoomLevel": -1, // 拡大率
|
30
|
+
"window.title": "${activeEditorShort}${separator}${rootName}",
|
31
|
+
// エディター設定
|
32
|
+
"editor.codeLens": false,
|
33
|
+
"editor.lineHeight": 28,
|
34
|
+
// "editor.fontFamily": "Inconsolata-g",
|
35
|
+
// "editor.fontSize": 14,
|
36
|
+
"editor.fontFamily": "Hasklig, Consolas, 'Courier New', monospace",
|
37
|
+
"editor.fontLigatures": true,
|
38
|
+
"editor.fontSize": 15,
|
39
|
+
"editor.glyphMargin": true, // 行の左端に余白を作る
|
40
|
+
"editor.roundedSelection": true, // 選択範囲の角を丸める
|
41
|
+
"editor.quickSuggestions": {
|
42
|
+
"comments": false, // コメント内では無効
|
43
|
+
"other": true, // その他の場所で有効
|
44
|
+
"strings": true // 文字列内では有効
|
45
|
+
},
|
46
|
+
"editor.folding": true, // コードの折りたたみを許可
|
47
|
+
"editor.lineNumbers": "on",
|
48
|
+
"editor.minimap.enabled": true,
|
49
|
+
"editor.minimap.maxColumn": 40,
|
50
|
+
"editor.insertSpaces": true, // Tabキーで半角スペースを入力
|
51
|
+
"editor.renderIndentGuides": true, // インデントのガイドラインを表示
|
52
|
+
"editor.minimap.side": "right", // ミニマップを右に表示
|
53
|
+
"editor.autoIndent": false, // オートインデント
|
54
|
+
"editor.cursorStyle": "block",
|
55
|
+
"editor.cursorWidth": 3,
|
56
|
+
"editor.cursorSmoothCaretAnimation": true,
|
57
|
+
"editor.emptySelectionClipboard": true, // 選択範囲無しでのコピーを許可
|
58
|
+
"editor.links": true, // リンクをクリック可能に
|
59
|
+
"editor.matchBrackets": true, // 対応する括弧の強調表示をオンに
|
60
|
+
"editor.mouseWheelScrollSensitivity": 0.7, // マウスホイール回転の移動係数
|
61
|
+
//"editor.suggestFontSize": 24, // サジェストの文字サイズ
|
62
|
+
"editor.suggestLineHeight": 24, // サジェスト欄の行の高さ
|
63
|
+
"diffEditor.renderSideBySide": false, // Git の差分を行内に表示
|
64
|
+
"editor.colorDecorators": false, // カラーデコレーターを非表示
|
65
|
+
"editor.formatOnPaste": true, // ファイル保存時に自動でフォーマット
|
66
|
+
"editor.formatOnType": true, // 入力した行を自動でフォーマット
|
67
|
+
"editor.formatOnSave": true,
|
68
|
+
"editor.minimap.renderCharacters": false, // ミニマップの表示文字をブロックに変更
|
69
|
+
"editor.minimap.showSlider": "always", // 表示領域をミニマップで常にハイライト
|
70
|
+
"editor.multiCursorModifier": "ctrlCmd", // マウスでの複数選択時の修飾キーを変更
|
71
|
+
"editor.renderControlCharacters": true, // 制御文字を表示
|
72
|
+
"editor.renderLineHighlight": "all", // 選択行を行番号含めすべてハイライト
|
73
|
+
"editor.renderWhitespace": "all", // エディターの幅で折り返し
|
74
|
+
"editor.trimAutoWhitespace": false, // 改行時に空行のインデントを保持する
|
75
|
+
"editor.cursorBlinking": "smooth",
|
76
|
+
// ターミナル
|
26
|
-
|
77
|
+
"terminal.integrated.fontSize": 14,
|
78
|
+
// emmet
|
79
|
+
"emmet.showSuggestionsAsSnippets": true, // Emmet の候補を表示
|
80
|
+
"emmet.triggerExpansionOnTab": true, // TAB キーで Emmet を展開できるようにする
|
81
|
+
"emmet.variables": {
|
82
|
+
// Emmet で展開される HTML の言語を変更
|
83
|
+
"lang": "ja"
|
84
|
+
},
|
85
|
+
// ファイル設定
|
86
|
+
"explorer.confirmDelete": false, // ファイル削除時の確認を表示しない
|
87
|
+
"files.associations": {
|
88
|
+
"*.c": "c",
|
89
|
+
"*.cpp": "cpp",
|
90
|
+
"*.cs6": "csharp",
|
91
|
+
"*.cs7": "csharp"
|
92
|
+
},
|
93
|
+
"files.exclude": {
|
94
|
+
"**/*.map": true,
|
95
|
+
"**/node_modules": true,
|
96
|
+
"**/.classpath": true,
|
97
|
+
"**/.project": true,
|
98
|
+
"**/.settings": true,
|
99
|
+
"**/.factorypath": true
|
100
|
+
}, // ファイルの保存時に末尾を改行
|
101
|
+
"files.trimFinalNewlines": true, // ファイルの保存時に最終行以降をトリミング
|
102
|
+
"files.trimTrailingWhitespace": true, // ファイルの保存時に行末の空白をトリミング
|
103
|
+
"files.autoGuessEncoding": true, // 文字コードを自動判断
|
27
|
-
|
104
|
+
"files.autoSave": "afterDelay",
|
105
|
+
"files.autoSaveDelay": 1000,
|
106
|
+
"html.format.contentUnformatted": "pre, code, textarea, title, h1, h2, h3, h4, h5, h6, p", // タグ内の記述はフォーマットしない
|
107
|
+
"html.format.extraLiners": "", // head, body, /html タグの前に改行を入れない
|
108
|
+
"html.format.unformatted": null, // フレージング・コンテンツ(旧インライン要素のようなタグ)はフォーマットしない
|
109
|
+
"html.format.wrapLineLength": 0, // 行の文字数制限を無くし自動で改行させない
|
110
|
+
"search.exclude": {
|
28
|
-
|
111
|
+
// 検索対象外にするファイル設定( files.exclude のファイルも含む)
|
112
|
+
"**/tmp": true
|
113
|
+
},
|
114
|
+
//"window.openFoldersInNewWindow": "on", // 新規ワークスペースを別ウインドウで開く
|
115
|
+
"workbench.editor.showTabs": true, // アクティビティバー(左端)を非表示に
|
116
|
+
"workbench.editor.tabSizing": "shrink", // タブが多い場合,文字を非表示にしてもタブ表示を優先する
|
29
|
-
|
117
|
+
"workbench.statusBar.visible": true, // ステータスバー(下端)を表示
|
118
|
+
"workbench.sideBar.location": "left", // サイドバーを左に
|
119
|
+
"workbench.startupEditor": "none", // Welcome Page を表示しない
|
120
|
+
// クラッシュレポートを送信する
|
30
|
-
|
121
|
+
"telemetry.enableCrashReporter": true,
|
122
|
+
"telemetry.enableTelemetry": true,
|
123
|
+
// 拡張機能関連
|
124
|
+
"extensions.autoUpdate": true,
|
125
|
+
"extensions.ignoreRecommendations": false,
|
126
|
+
"C_Cpp.default.cppStandard": "c++14",
|
127
|
+
"C_Cpp.default.cStandard": "c11",
|
128
|
+
"terminal.explorerKind": "external",
|
129
|
+
"terminal.integrated.cursorStyle": "line",
|
130
|
+
"C_Cpp.clang_format_style": "file",
|
131
|
+
"C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: K&R, IndentWidth: 4}",
|
132
|
+
// Whether to lint Python files.
|
133
|
+
"python.linting.enabled": true,
|
134
|
+
// Whether to lint Python files using pylint.
|
135
|
+
"python.linting.pylintEnabled": false,
|
31
|
-
|
136
|
+
"python.linting.flake8Enabled": true,
|
137
|
+
"python.linting.lintOnSave": true,
|
138
|
+
"python.linting.flake8Args": [
|
139
|
+
"--ignore=W293, W504, E501", // 空行に空白があるとWarningが出るW293はエディタのコード整形が引っかかるためOFF, +のオペレータのあとで改行すると引っかかるW504もOFF
|
140
|
+
],
|
141
|
+
"python.formatting.provider": "autopep8",
|
142
|
+
"python.formatting.autopep8Args": [
|
143
|
+
"--aggressive",
|
144
|
+
"--aggressive",
|
145
|
+
"--max-line-length",
|
146
|
+
"160", // Pythonのmaxlength設定
|
147
|
+
],
|
148
|
+
// 言語別設定
|
149
|
+
"[markdown]": {
|
150
|
+
"files.trimTrailingWhitespace": false, // Markdown のファイルは行末の空白をトリミングしない
|
151
|
+
// markdownでスニペットが表示されないのを回避
|
152
|
+
"editor.wordWrap": "on",
|
153
|
+
"editor.quickSuggestions": true,
|
154
|
+
"editor.snippetSuggestions": "top",
|
155
|
+
"editor.tabSize": 2,
|
156
|
+
"diffEditor.ignoreTrimWhitespace": true,
|
157
|
+
"files.trimFinalNewlines": false,
|
158
|
+
"editor.trimAutoWhitespace": false,
|
159
|
+
},
|
160
|
+
"markdown.preview.breaks": true,
|
161
|
+
// JavaScriptでのみ保存時フォーマットを有効化
|
162
|
+
"[javascript]": {
|
163
|
+
"editor.formatOnSave": true,
|
164
|
+
"editor.tabSize": 4
|
165
|
+
},
|
166
|
+
// prettierのシングルクォーテーションオプションをon
|
167
|
+
"prettier.singleQuote": true,
|
168
|
+
"prettier.disableLanguages": [
|
169
|
+
"vue",
|
170
|
+
"markdown",
|
171
|
+
],
|
172
|
+
"[javascriptreact]": {
|
173
|
+
"editor.formatOnSave": true,
|
174
|
+
"editor.tabSize": 2
|
175
|
+
},
|
176
|
+
"[plaintext]": {
|
177
|
+
"files.insertFinalNewline": false
|
178
|
+
},
|
179
|
+
"[cpp]": {
|
180
|
+
"editor.quickSuggestions": true
|
181
|
+
},
|
182
|
+
"editor.acceptSuggestionOnEnter": "off",
|
183
|
+
"C_Cpp.intelliSenseEngineFallback": "Disabled",
|
184
|
+
"clang.executable": "clang++",
|
185
|
+
"clang.cxxflags": [
|
186
|
+
"-std=c++14"
|
187
|
+
],
|
188
|
+
"clang.cflags": [
|
189
|
+
"-std=c11"
|
190
|
+
],
|
191
|
+
"editor.snippetSuggestions": "inline",
|
192
|
+
"csharpfixformat.style.braces.onSameLine": false,
|
193
|
+
"csharp.format.enable": false,
|
194
|
+
"C_Cpp.autocomplete": "Disabled",
|
195
|
+
"path-intellisense.extensionOnImport": true,
|
196
|
+
"editor.detectIndentation": false,
|
197
|
+
"editor.suggestSelection": "first",
|
198
|
+
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
|
199
|
+
"java.errors.incompleteClasspath.severity": "ignore",
|
200
|
+
"C_Cpp.updateChannel": "Insiders",
|
201
|
+
"workbench.colorTheme": "SynthWave '84",
|
202
|
+
"python.jediEnabled": false,
|
203
|
+
"editor.wordWrap": "on",
|
204
|
+
"files.insertFinalNewline": true,
|
205
|
+
"editor.scrollBeyondLastLine": true,
|
206
|
+
"workbench.iconTheme": "simple-icons",
|
207
|
+
"python.pythonPath": "/usr/local/opt/python/bin/python3.7",
|
208
|
+
}
|
209
|
+
```
|
32
210
|
|
33
211
|
### 質問
|
34
212
|
- 何か拡張機能を入れれば解決出来るのだろうか?
|
35
213
|
- html用のフォーマッターとして何か記述すべきか、導入すべきか
|
36
|
-
- キー入力でコード整形をするにも上記のようになってしまうし、保存時の整形で綺麗にしたい。
|
214
|
+
- キー入力でコード整形をするにも上記のようになってしまうし、保存時の整形で綺麗にしたい。
|
215
|
+
|
216
|
+
### 拡張機能について
|
217
|
+
- Auto Close Tag
|
218
|
+
- Auto Rename Tag
|
219
|
+
- Beautify
|
220
|
+
- Bracket Pair Colorizer2
|
221
|
+
- indent rainbow
|
222
|
+
- Prettier
|
223
|
+
- Visual Studio IntelliCode
|
224
|
+
|
225
|
+
他にも入れてますが、Pythonなどの関係が明らかになさそうなものはとりあえず省いてます。
|