Visual Studio Code – コード エディター | Microsoft Azure ExternalLink
からVisual Studio Codeをダウンロードしてインストールして初期設定をする。
2023年3月28日(火)にVisual Studio Code[バージョン:1.76.2(user setup)]をWindows10(64bit)にインストールした。
(001)インストールを押す
![](https://i0.wp.com/attacktube.com/wp-content/uploads/2023/03/20230328_001.png?resize=1024%2C576)
(002)日本語化する
![](https://i0.wp.com/attacktube.com/wp-content/uploads/2023/03/20230328_002.png?resize=1024%2C576)
(003)再起動する。
![](https://i0.wp.com/attacktube.com/wp-content/uploads/2023/03/20230328_003.png?resize=1024%2C576)
(004)初期設定をする。
[ファイル]-[ユーザ設定]-[設定]
![](https://i0.wp.com/attacktube.com/wp-content/uploads/2023/03/20230328_004.png?resize=1024%2C576)
(005)初期設定をする。
「tabsize」と検索する。
「Tab Size」と「Detect Indentation」の設定変更前(初期値)
![](https://i0.wp.com/attacktube.com/wp-content/uploads/2023/03/20230328_005_before.png?resize=1024%2C576)
(005)初期設定をする。
「Tab Size」と「Detect Indentation」の設定変更後
「Tab Size」を4から2に変更する。
「Detect Indentation」のチェックを外す。
「Detect Indentation」はファイルを開いた時に自動でインデントを分析して入れてくれる機能である。
けれども、あまりうまく判別してくれないのでチェックを外しておく。
![](https://i0.wp.com/attacktube.com/wp-content/uploads/2023/03/20230328_005_after.png?resize=1024%2C576)
(006)初期設定をする。
「autoguess」と検索をする。
「Auto Guess Encoding」の設定変更前
![](https://i0.wp.com/attacktube.com/wp-content/uploads/2023/03/20230328_006_before.png?resize=1024%2C576)
(006)初期設定をする。
「autoguess」と検索をする。
「Auto Guess Encoding」のチェックを付ける。
Visual Studio CodeはデフォルトではUTF-8を開く設定です。
けれども、「Auto Guess Encoding」にチェックを入れると文字化けせずにShift-JISを開ける(Shift-JISを自動で判定して表示することができる)。
![](https://i0.wp.com/attacktube.com/wp-content/uploads/2023/03/20230328_006_after.png?resize=1024%2C576)
(007)バージョン情報を確認する。
[ファイル]-[バージョン情報]
![](https://i0.wp.com/attacktube.com/wp-content/uploads/2023/03/20230328_007.png?resize=1024%2C576)
(008)バージョンが表示される。
![](https://i0.wp.com/attacktube.com/wp-content/uploads/2023/03/20230328_008.png?resize=1024%2C576)