質問するログイン新規登録

質問編集履歴

1

補足追記

2019/09/27 02:32

投稿

makition
makition

スコア11

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
- ![イメージ説明](7ff27f81e8b13ecc61f15bfc000d4dbc.png)
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
- ![イメージ説明](ba05a0e54dbba547305b184c741ea99b.png)
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
- ![メージ説明](27dd7586d742e0a49a1fa0bf85600e9a.png)
111
+ // 検索対象外にするファル設定( files.exclude のファイルも含む)
112
+ "**/tmp": true
113
+ },
114
+ //"window.openFoldersInNewWindow": "on", // 新規ワークスペースを別ウインドウで開く
115
+ "workbench.editor.showTabs": true, // アクティビティバー(左端)を非表示に
116
+ "workbench.editor.tabSizing": "shrink", // タブが多い場合,文字を非表示にしてもタブ表示を優先する
29
- ![イメジ説明](1adee8199920ca46aa4fabdf41817451.png)
117
+ "workbench.statusBar.visible": true, // ステタスバー(下端)を表示
118
+ "workbench.sideBar.location": "left", // サイドバーを左に
119
+ "workbench.startupEditor": "none", // Welcome Page を表示しない
120
+ // クラッシュレポートを送信する
30
- ![イメージ説明](bcecea30ecfb6127a30e291eafb26cd6.png)
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
- ![イメージ説明](f8bc3bf356604a930a5ae33ba79fb880.png)
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などの関係が明らかになさそうなものはとりあえず省いてます。