2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

VSCodeの設定

Last updated at Posted at 2021-03-16

VsCode快適設定を考える

vs-codeとかのショートカットのはなし

マウスを使わない

機能 コマンド 重要度
コピー command+C ★★★★★
ペースト command+V ★★★★★
検索 command+F ★★★★★
コメントアウト command+/ ★★★★★
一行切り取る command+X ★★★★★
ターミナル画面へ control+` ★★★★
開いているタブ移動 control+tab+(shift) ★★★★
新しいファイルを開く command+P ★★★★
行をそのまま移動 option(alt)+↑↓ ★★★★
タブ閉じ command+W ★★★
対応するカッコに飛ぶ command+shift+\ ★★★
--- ---- ---
分割画面 command+\ ★★★★★
分割画面移動 command+1←画面の番号 ★★★★★

キーバインド設定の出し方
command+K ⇨ command+S

WakaTime

これは面白い
https://wakatime.com/

settings.json

常に新しいタブで開く設定

settings.json
{
  /*
    ウィンドウ設定
  */
  "window.zoomLevel": -1, // 拡大率
  // "window.menuBarVisibility": "Shift", // fnキーでメニューバーの表示切り替え
  "window.title": "${dirty}${activeEditorShort} / ${rootName}", // タイトルバーの文字
  "window.closeWhenEmpty": false,
  /*
    エディター設定
  */
  // カラーテーマ
  // "workbench.colorTheme": "Iceberg",
  //ソースコード上で変更履歴を確認できる機能(邪魔)
  "editor.codeLens": false,
  // 行の折り返し
  "editor.wordWrap": "on",
  // Tabキーで入力されるスペース数
  "editor.tabSize": 2,
  // タブサイズとインデントサイズを自動検出するか
  "editor.detectIndentation": false,
  // ミニマップスライダーを常に表示
  "editor.minimap.showSlider": "always",
  // スニペット予測の表示位置
  "editor.snippetSuggestions": "top",
  // ラインの高さ
  "editor.lineHeight": 28,
  // ホワイトスペースを視覚化
  "editor.renderWhitespace": "all",
  // 選択中の行を強調する
  "editor.renderLineHighlight": "all",
  // フォント
  "editor.fontFamily": "'Roboto Mono'",
  // 行の左端に余白を作る
  "editor.glyphMargin": true,
  // 選択範囲の角を丸める
  "editor.roundedSelection": true,
  // コード整形
  "editor.formatOnType": true,
  // コード整形
  "editor.formatOnPaste": true,
  // コードの折りたたみを許可
  "editor.folding": true,
  // 文字の間隔を詰める
  "editor.letterSpacing": -1,
  // 行番号の表示
  "editor.lineNumbers": "on",
  // ミニマップの表示
  "editor.minimap.enabled": true,
  // ミニマップの幅
  "editor.minimap.maxColumn": 40,
  // 最終行よりも下へのスクロールを許可
  "editor.scrollBeyondLastLine": true,
  // 制御文字の表示
  "editor.renderControlCharacters": true,
  // Tabキーで半角スペースを入力
  "editor.insertSpaces": true,
  //  文字サイズ
  "editor.fontSize": 20,
  // インデントのガイドラインを表示
  "editor.renderIndentGuides": true,
  // ミニマップを簡略化
  "editor.minimap.renderCharacters": false,
  // ミニマップを右に表示
  "editor.minimap.side": "right",
  // オートインデント
  "editor.autoIndent": "String",
  // カーソルの形状
  "editor.cursorStyle": "line-thin",
  // カーソルの表示形式
  "editor.cursorBlinking": "smooth",
  // カーソル幅
  "editor.cursorWidth": 5,
  // 選択範囲無しでのコピーを許可
  "editor.emptySelectionClipboard": true,
  // リンクをクリック可能に
  "editor.links": true,
  // 対応する括弧の強調表示をオンに
  "editor.matchBrackets": true,
  // マウスホイール回転の移動係数
  "editor.mouseWheelScrollSensitivity": 0.7,
  // Ctrl+マウスホイールによるズームを無効化
  "editor.mouseWheelZoom": false,
  // サジェストの文字サイズ
  "editor.suggestFontSize": 24,
  // サジェスト欄の行の高さ
  "editor.suggestLineHeight": 24,
  //保存時フォーマットを統一
  "editor.formatOnSave": true,
  // 補完候補の自動表示
  "editor.quickSuggestions": {
    "comments": false, // コメント内では無効
    "strings": true, // 文字列内では有効
    "other": true //  その他の場所で有効
  },
  /*
    ターミナル
  */
  // "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\wsl.exe", // WSLへのパス
  // "terminal.integrated.fontFamily": "'Roboto Mono'", // フォント
  "terminal.integrated.fontSize": 22, // フォントサイズ
  // "terminal.integrated.wordSeparators": "",
  "terminal.integrated.letterSpacing": 0,
  "terminal.external.osxExec": "Rosettaターミナル.app",
  "terminal.integrated.copyOnSelection": true,
  "terminal.integrated.cursorBlinking": true,
  "terminal.integrated.cursorStyle": "line",
  "terminal.integrated.cwd": "/Users/akidon/program/",
  // ファイルのオートセーブ化 1000 ミリ秒後自動保存
  "files.autoSave": "afterDelay", //"off","afterDelay","onFocusChange","onWindowChange"
  "files.autoSaveDelay": 1000,
  // 改行コードをLFに指定
  //ダーティファイルの作成を無効
  "files.eol": "\n", // 改行コードをLF(Linux/OSX)にする
  "files.insertFinalNewline": true, // ファイルの終端に空の行を追加
  "files.autoGuessEncoding": true, // 文字コードを自動判別
  // エクスプローラーから除外するファイルとフォルダ
  "files.exclude": {
    "**/.git": true,
    "**/.svn": true,
    "**/.hg": true,
    "**/CVS": true,
    "**/.DS_Store": true,
    "**/bin": true,
    //"**/*.exe": true,
    "**/*.o": true,
    "**/*.obj": true,
    "**/*.ilk": true,
    "**/*.pdb": true,
    "**/*.tlog": true,
    "**/*.idb": true,
    "**/*.dll": true
    // "**.vs": true,
  },
  // ワークベンチ設定
  // "workbench.editor.showTabs": true, // アクティビティバー(左端)を非表示に
  "workbench.editor.tabSizing": "shrink", // ステータスバー(下端)を表示
  "workbench.sideBar.location": "left", // サイドバーを左に
  "workbench.editor.enablePreview": false, //常に新しいタブで表示=false
  // "workbench.colorTheme": "Breeze Dark Theme", // カラーテーマ
  // "workbench.iconTheme": "eq-material-theme-icons", // アイコンの適用
  // "workbench.colorCustomizations": { // カラーテーマに上書きする個別の設定
  //   "statusBar.background": "#000000", // ステータスバー背景色
  //   "statusBar.noFolderBackground": "#000000",
  //   "statusBar.foreground": "#ffffff", // ステータスバー前景色
  //   "statusBar.noFolderForeground": "#ffffff",
  //   "statusBar.border": "#ffffff", // ステータスバーの境界線
  //   "sideBar.background": "#000000", // サイドバーの背景色
  //   "sideBar.foreground": "#ffffff", // サイドバーの前景色
  //   "sideBar.border": "#ffffff", // サイドバーの境界線
  //   "activityBar.background": "#000000", // アクティビティバーの背景色
  //   "activityBar.foreground": "#ffffff", // アクティビティバーの前景色
  //   "activityBar.border": "#ffffff", // アクティビティバーの境界線
  //   "editor.background": "#121817", // エディタ背景色
  //   "editor.lineHighlightBackground": "#002255", // 選択している行の強調色
  //   "editor.selectionBackground": "#660000", // 選択領域の強調色
  //   "editorError.border": "#ff0000", // エラー部分の下線
  //   "editorLineNumber.foreground": "#0077ffbb",
  //   "editorLineNumber.activeForeground": "#ffffff",
  //   "scrollbarSlider.background": "#0077ff99", // スクロールバーの色
  //   "scrollbarSlider.hoverBackground": "#00ccffcc", // 移動中のスクロールバーの色
  //   "tab.activeBorder": "#ffffff", // アクティブタブの下線
  //   "tab.inactiveForeground": "#999999", // 非選択タブの文字色
  //   "editorBracketMatch.background": "#ffff0077",// 対応する括弧の背景色
  //   "editorSuggestWidget.selectedBackground": "#0044ff", // サジェスト欄,選択中項目の背景色
  //   "scrollbar.shadow": "#0077ff99",
  //   "editorLink.activeForeground": "#5555ce",
  // },
  // 画面の透過設定
  "glassit.alpha": 255,
  "glassit.step": 1,
  // クラッシュレポートを送信する
  "telemetry.enableCrashReporter": true,
  "telemetry.enableTelemetry": true,
  // 拡張機能関連
  "extensions.autoUpdate": true, // 自動更新
  "extensions.ignoreRecommendations": false, // 推奨事項の通知をOFF
  // Git
  // "git.path": "C:\\wslgit.exe",
  // markdown
  "markdown.preview.breaks": true, // 改行を反映
  "markdown.preview.fontSize": 22, // 文字サイズ
  "markdown.preview.lineHeight": 1.1, // 行幅
  "markdown.styles": [
    "~/markdown_pdf.css",
  ],
  // markdown-pdf
  "markdown-pdf.convertOnSave": false, // 保存時に自動でpdf化しない
  "markdown-pdf.type": "pdf", // PDFで出力
  "markdown-pdf.styles": [
    "~/markdown_pdf.css",
  ],
  // c# fixformat
  "csharp.format.enable": false,
  // clang-formatの実行ファイルへのフルパス
  // 拡張機能のインストール時にダウンロードされるので設定する必要は無い
  "C_Cpp.clang_format_path": null,
  // clang-formatでコード整形する時のスタイルを設定する
  // デフォルトはワークスペースルートとその親フォルダに`.clang-format`ファイルがある場合はその設定値を使用し、
  // .clang-formatファイルが無い場合はC_Cpp.clang_format_fallbackStyleで代わりの設定を実行される
  "C_Cpp.clang_format_style": "file",
  // C_Cpp.clang_format_styleが実行できなかった時に代わりに実行される書式設定を指定する
  "C_Cpp.clang_format_fallbackStyle": "Visual Studio",
  // includeをソートするかを設定
  // この設定値は.clang-formatファイルのSortIncludesプロパティを上書きする
  "C_Cpp.clang_format_sortIncludes": null,
  // ファイルの保存時に自動整形を有効にする
  // "C_Cpp.clang_format_formatOnSave": false,
  // `Default`はコードフォーマットを有効にし、`Disabled`は無効にする。
  "C_Cpp.formatting": "Disabled",
  // CMake
  // "cmake.cmakePath": "C:\\Program Files\\download\\CMake\\bin\\cmake.exe",
  // "cmake-tools-helper.cmake_download_path": "~\\.vscode\\extensions\\maddouri.cmake-tools-helper-0.2.1\\cmake_download",
  // "workbench.colorTheme": "GitHub Dark",
  "[json]": {
    "editor.quickSuggestions": {
      "strings": true
    },
    "editor.suggest.insertMode": "replace"
  },
  "code-runner.runInTerminal": true,
  "code-runner.clearPreviousOutput": true,
  "explorer.confirmDelete": false,
  "tabnine.experimentalAutoImports": true,
  "explorer.confirmDragAndDrop": false,
  // "workbench.iconTheme": "vscode-icons",
  "files.trimTrailingWhitespace": true,
  "vsicons.dontShowNewVersionMessage": true,
  "C_Cpp.updateChannel": "Insiders",
  "python.linting.lintOnSave": true,
  "python.linting.pylintEnabled": false,
  "python.linting.pycodestyleEnabled": false,
  "python.linting.flake8Enabled": true,
  "python.linting.flake8Args": [
    "--ignore=W293, W504",
    "--max-line-length=150",
    "--max-complexity=20"
  ],
  "python.formatting.provider": "autopep8",
  "python.formatting.autopep8Args": [
    "--aggressive",
    "--aggressive",
  ],
  "autoDocstring.docstringFormat": "google",
  "editor.suggestSelection": "first",
  "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
  "python.languageServer": "Pylance",
  "terminal.integrated.inheritEnv": false,
  "terminal.integrated.fontFamily": "monospace",
  "python.venvPath": "/Users/akidon/tensorflow_macos_venv",
  "workbench.editorAssociations": [
    {
      "viewType": "jupyter.notebook.ipynb",
      "filenamePattern": "*.ipynb"
    }
  ],
  "kite.showWelcomeNotificationOnStartup": false,
  "go.goroot": "/Users/akidon/.goenv/shims/go",
}

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?