Skip to the content.

Settings

"editor.renderWhitespace": "all",
"editor.renderControlCharacters": true,: useful for rendering UNICODE Characters that sometimes are not good including invisible characters
"files.eol": "\n": set end of line format aka CRLF or LF aka part of the Unix/Windows format (from How to set default line endings in Visual Studio Code?)

Check git settings

Git also has CRLF settings that matter, esp. if working between windows and non-windows machines. the setting is autocrlf. See autocrlf in Git Commands

Shortcuts often forgotten

CTRL+R: Open different repo
CTRL+Shift+O: show outline/symbol list
F1 then Backspace: search current repo/workspace files
F1 then Backspace then %: search for text in files in current repo/workspace

Custom Keyboard Shortcuts

CTRL+U: Underline in Markdown

Based off: https://stackoverflow.com/questions/39333639/visual-studio-code-snippet-as-keyboard-shortcut-key/43604034#43604034

markdown.json (user snippet):

    "underline": {
        "prefix": "underline",
        "body": [
            "<ins>$TM_SELECTED_TEXT${1:}</ins>"
        ],
        "description": "Encloses selected text in <ins></ins> tags"
    }

keybindings.json:

{
    "key": "cmd+u",
    "command": "editor.action.insertSnippet",
    "args": { "name": "underline" },
    "when": "editorTextFocus && editorLangId == markdown"
}

References

Windows PDF
macOS PDF
Linux PDF

when clause contexts for keyboard shortcuts

Extensions

vscode-spell-checker

https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker
https://streetsidesoftware.com/vscode-spell-checker/
https://cspell.org/

vscode-spell-checker Commands

vscode-spell-checker Notes

vscode-spell-checker Tips

vscode-spell-checker Tips for Markdown

Consider configuring cspell to ignore codeblocks and any text between backticks ` for markdown

    "cSpell.languageSettings": [
        {
            // use with Markdown files
            "languageId": "markdown",
            // Exclude code.
            "ignoreRegExpList": [
                "/^\\s*```[\\s\\S]*?^\\s*```/gm",
                "`[^`]*`"
            ]
        }
    ],

vscode-spell-checker References

https://cspell.org/configuration/
https://streetsidesoftware.com/vscode-spell-checker/docs/configuration
https://github.com/streetsidesoftware/cspell-dicts/tree/main/dictionaries - list of all available dictionaries.
https://cspell.org/configuration/document-settings/#inline-document-settings - inline comments to control cspell

Markdown all in one

https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one
<vscode:extension/yzhang.markdown-all-in-one>

Markdown all in one Commands

Full list here but my fav manual ones are:

Markdown all in one Notes

Bug in Markdown all in one

When using the Markdown All in One extension in VS Code, and using the Table of Contents, it may do weird things if you have an intended code block inside an ordered list if the intending is not perfect.

https://github.com/tlourey/tlourey.github.io/commit/1ce91e004eca6ccb70b683c0e50895acdb879ea2 shows the slight intending change of the code block fixing up the table of contents.

Markdown all in one Tips

Useful settings:

Markdown all in one References

Full settings on marketplace base:https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one#supported-settings

markdownlint

https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
<vscode:extension/DavidAnson.vscode-markdownlint>

markdownlint Commands

Consider setting markdownlint.focusMode - only valid at user level, not workspace

{
    "editor.someSetting": true,
    "markdownlint.focusMode": true
}

To ignore issues on the N lines above and below the cursor, set focusMode to a positive integer representing the number of lines to ignore in each direction:

{
    "editor.someSetting": true,
    "markdownlint.focusMode": 2
}

More settings are here: https://github.com/DavidAnson/vscode-markdownlint

markdownlint Notes

Ignore Rules

You can use ignore lines inside of files where you can disable markdown lint or a specific rule for the whole file, the next line or just a section (where it can then be re-enabled), such as:

<!-- markdownlint-disable MD000 -->
<!-- markdownlint-enable MD000 -->
<!-- markdownlint-disable-next-line MD000 -->
<!-- markdownlint-disable-file MD000 -->

You can also configure the markdown lint settings to ignore this.

Rules with Parameter

Some rules may have parameters so you can customise how they are evaluated. See example in tips. Find the rules with Parameters in the rules link in references.

markdownlint Tips

Allow some inline HTML

 "markdownlint.config": {
    "MD033": {
      "allowed_elements": [
        "details",
        "summary",
        "ins",
        "kbd"
      ]
    },
 }

markdownlint References

https://github.com/DavidAnson/markdownlint/ - Contains rules