VSCode Vim

  • gq - on a visual selection reflow and wordwrap blocks of text, preserving commenting style. Great for formatting documentation comments.
  • gb - adds another cursor on the next word it finds which is the same as the word under the cursor.
  • gh - equivalent to hovering your mouse over wherever the cursor is. Handy for seeing types and error messages without reaching for the mouse!

Dev Container

Language Specific


C++ build before debug

C/C++ Debug in Integrated Terminal

Use task.json to build and use launch.json to launch and debug.
Require extension: CodeLLDB - Visual Studio Marketplace

// task.json example
    "tasks": [
            "type": "cppbuild",
            "label": "C/C++: clang++ build active file",
            "command": "/usr/bin/clang++",
            "args": [
            "options": {
                "cwd": "${fileDirname}"
            "problemMatcher": [
            "group": {
                "kind": "build",
                "isDefault": true
            "detail": "Task generated by Debugger."
    "version": "2.0.0"
// launch.json example
    "version": "0.2.0",
    "configurations": [
            "type": "lldb",
            "request": "launch",
            "name": "Launch",
            "program": "${fileDirname}/${fileBasenameNoExtension}",
            "args": [],
            "cwd": "${workspaceFolder}",
            "preLaunchTask": "C/C++: clang++ build active file",