Skip to content

Instantly share code, notes, and snippets.

@nazo
Last active November 29, 2018 03:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nazo/10e009a41b9043b3d94f2586ad837c4c to your computer and use it in GitHub Desktop.
Save nazo/10e009a41b9043b3d94f2586ad837c4c to your computer and use it in GitHub Desktop.
VSCodeの使い方

設定の同期

Settings Syncを使うとsecret gistに設定を保存してくれる。

settings.json

  // ファイルを開くと、そのファイルの内容に基づいて `editor.tabSize` と `editor.insertSpaces` が検出されます。
  "editor.detectIndentation": true,
  // 行の折り返し方法を制御します。次の値を指定できます。
  //  - 'off' (折り返さない),
  //  - 'on' (ビューポート折り返し),
  //  - 'wordWrapColumn' ('editor.wordWrapColumn' で折り返し) or
  //  - 'bounded' (ビューポートと 'editor.wordWrapColumn' の最小値で折り返し).
  "editor.wordWrap": "off",

  // 開かれるエディターをプレビューとして表示するかどうかを制御します。プレビュー エディターは (例: ダブル クリックまたは編集などによって) 変更される時まで再利用し、斜体で表示します。
  "workbench.editor.enablePreview": true,

  // Quick Open で開いたエディターをプレビューとして表示するかどうかを制御します。プレビュー エディターは、保持されている間、再利用されます (ダブルクリックまたは編集などによって)。
  "workbench.editor.enablePreviewFromQuickOpen": true
  // 行の折り返し方法を制御します。次の値を指定できます。
  //  - 'off' (折り返さない),
  //  - 'on' (ビューポート折り返し),
  //  - 'wordWrapColumn' ('editor.wordWrapColumn' で折り返し) or
  //  - 'bounded' (ビューポートと 'editor.wordWrapColumn' の最小値で折り返し).
  "editor.wordWrap": "off",
  
// 折り返し行のインデントを制御します。'none'、'same'、'indent' または 'deepIndent' のいずれかを指定できます。
  "editor.wrappingIndent": "same"
  // Controls whether a top border is drawn on modified (dirty) editor tabs or not.
  // 編集中の未保存のタブを強調表示する
  "workbench.editor.highlightModifiedTabs": false

よく使うショートカット

  • Command+P : ファイル名を検索して開く。最近使ったファイルも表示。
  • Command+Shift+P : コマンドパレット
  • Command+Shift+D : 左ペインをデバッグにする
  • Command+Shift+E : 左ペインをエクスプローラ(ファイルツリー)にする
  • Command+Shift+F : 左ペインを検索にする
  • Command+Shift+O : ファイル内のシンボル単位でジャンプ
  • Command+Shift+M : エラー一覧を表示

言語ごとのインデントなどの設定

    "[ruby]": {
        "editor.insertSpaces": true,
        "editor.tabSize": 2
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment