From afd085487e8c8221bf35266c515235e567d46012 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Fri, 24 Feb 2023 18:35:46 +0100 Subject: [PATCH] Added section about VS Code settings --- .vscode/settings.json | 1 + examples/vscode/settings.json | 24 +++++++++ knowledge base/visual studio code.md | 77 ++++++++++++++++++++++++++-- 3 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 examples/vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json index 96beebd..50c097e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -52,6 +52,7 @@ "rootlv", "rootvg", "runcmd", + "scrollback", "setfacl", "sshpass", "subvolume", diff --git a/examples/vscode/settings.json b/examples/vscode/settings.json new file mode 100644 index 0000000..8a15d6e --- /dev/null +++ b/examples/vscode/settings.json @@ -0,0 +1,24 @@ +{ + "clock.alignment": "Right", + "clock.format": "yyyy-mm-dd HH:MM", + "files.trimFinalNewlines": true, + "markdown.extension.toc.levels": "2..6", + "redhat.telemetry.enabled": false, + "settingsSync.ignoredExtensions": [ + "casualjim.gotemplate", + "golang.go" + ], + "telemetry.telemetryLevel": "off", + "terminal.integrated.cursorBlinking": true, + "terminal.integrated.cursorStyle": "line", + "terminal.integrated.defaultProfile.osx": "zsh", + "terminal.integrated.scrollback": 100000, + "[markdown]": { + "editor.defaultFormatter": "yzhang.markdown-all-in-one" + }, + "editor.copyWithSyntaxHighlighting": false, + "extensions.autoUpdate": false, + "files.insertFinalNewline": true, + "markdown.extension.orderedList.marker": "one", + "markdown.extension.toc.orderedList": true, +} diff --git a/knowledge base/visual studio code.md b/knowledge base/visual studio code.md index 2778d1c..9d4fe77 100644 --- a/knowledge base/visual studio code.md +++ b/knowledge base/visual studio code.md @@ -1,10 +1,81 @@ # Visual Studio Code +1. [Handy keyboard shortcuts](#handy-keyboard-shortcuts) +1. [Handy settings](#handy-settings) + 1. [Built-in](#built-in) + 1. [Extensions](#extensions) + 1. [Example](#example) 1. [Network connections](#network-connections) -2. [Troubleshooting](#troubleshooting) +1. [Troubleshooting](#troubleshooting) 1. [_No extensions found_ when running from source](#no-extensions-found-when-running-from-source) -3. [Further readings](#further-readings) -4. [Sources](#sources) +1. [Further readings](#further-readings) +1. [Sources](#sources) + +## Handy keyboard shortcuts + +| Shortcuts | Effect | +| --------- | ---------------- | +| `⌘+N` | New file | +| `⌥+Z` | Toggle word wrap | + +## Handy settings + +### Built-in + +| Setting | Default value | Scopes | Location in tree | Description | +| ---------------------------------------- | ------------- | --------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | +| `editor.copyWithSyntaxHighlighting` | `true` | User, Workspace | Text Editor | Copy syntax highlighting too when copying something to the clipboard. | +| `extensions.autoCheckUpdates` | `true` | User | Features > Extensions | Automatically check extensions for updates. | +| `extensions.autoUpdates` | `true` | User | Features > Extensions | Automatically update extensions. | +| `files.insertFinalNewline` | `false` | User, Workspace | Text Editor > Files | Insert a final newline at the end of the file when saving it. | +| `files.trimFinalNewlines` | `false` | User, Workspace | Text Editor > Files | Trim all new lines after the final new line at the end of the file when saving it. | +| `settingsSync.ignoredExtensions` | `[]` | User | Application > Settings Sync | List of extensions to ignore while synchronizing. | +| `telemetry.telemetryLevel` | `all` | User | Application > Telemetry | Controls Visual Studio Code telemetry, first-party extension telemetry, and **participating** third-party extension telemetry. | +| `terminal.integrated.cursorBlinking` | `false` | User, Workspace | Features > Terminal | Make the cursor blink in the integrated terminal. | +| `terminal.integrated.cursorStyle` | `block` | User, Workspace | Features > Terminal | Show the cursor as a block in the integrated terminal. | +| `terminal.integrated.defaultProfile.osx` | `null` | User, Workspace | Features > Terminal | The default profile used on macOS. | +| `terminal.integrated.scrollback` | `1000` | User, Workspace | Features > Terminal | The maximum number of lines the terminal keeps in its buffer. | +| `update.mode` | `default` | User | Application > Update | Automatically check for application updates. | + +### Extensions + +| Extension | Setting | Default value | Scopes | Location in tree | Description | +| -------------------------- | --------------------------------------- | ------------- | --------------- | -------------------------------- | ------------------------------------------------------------------------------------------------- | +| angelo-breuer.clock | `clock.alignment` | `Left` | User, Workspace | Extensions > Status Bar Clock | Alignment of the clock on the status bar. | +| angelo-breuer.clock | `clock.format` | `hh:MM` | User, Workspace | Extensions > Status Bar Clock | Date and time format. See https://www.npmjs.com/package/dateformat#mask-options for more options. | +| yzhang.markdown-all-in-one | `markdown.extension.orderedList.marker` | `ordered` | User, Workspace | Extensions > Markdown All In One | Auto fix ordered list markers. | +| yzhang.markdown-all-in-one | `markdown.extension.toc.levels` | `1..6` | User, Workspace | Extensions > Markdown All In One | Range of levels for the ToC. | +| yzhang.markdown-all-in-one | `markdown.extension.toc.orderedList` | `false` | User, Workspace | Extensions > Markdown All In One | Use an ordered list in the ToC. | +| redhat.ansible | `redhat.telemetry.enabled` | `true` | User, Workspace | Extensions > Ansible | Send telemetry to Red Hat servers. | + +### Example + +```json +{ + "clock.alignment": "Right", + "clock.format": "yyyy-mm-dd HH:MM", + "files.trimFinalNewlines": true, + "markdown.extension.toc.levels": "2..6", + "redhat.telemetry.enabled": false, + "settingsSync.ignoredExtensions": [ + "casualjim.gotemplate", + "golang.go" + ], + "telemetry.telemetryLevel": "off", + "terminal.integrated.cursorBlinking": true, + "terminal.integrated.cursorStyle": "line", + "terminal.integrated.defaultProfile.osx": "zsh", + "terminal.integrated.scrollback": 100000, + "[markdown]": { + "editor.defaultFormatter": "yzhang.markdown-all-in-one" + }, + "editor.copyWithSyntaxHighlighting": false, + "extensions.autoUpdate": false, + "files.insertFinalNewline": true, + "markdown.extension.orderedList.marker": "one", + "markdown.extension.toc.orderedList": true, +} +``` ## Network connections