From b26548d532ecfc4ada28dc95e1ba8700cfa5162c Mon Sep 17 00:00:00 2001 From: "Blazej M. Baczkowski" Date: Fri, 6 Feb 2026 13:46:20 +0100 Subject: [PATCH 1/3] update VS Code Learn the Fundamentals screenshot correct description to avoid misunderstanding that these are installation configs --- content/vscode.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/content/vscode.md b/content/vscode.md index 87aba3a..d97a375 100644 --- a/content/vscode.md +++ b/content/vscode.md @@ -19,10 +19,9 @@ for languages such as C++, Fortran, R, C#, Matlab, Java, Python, PHP, and Go. installing, select the option "Add to PATH" (this is default). ```{figure} img/vscode.png -:alt: Screenshot of configuration options when setting up Visual Studio Code +:alt: Screenshot of the VS Code "Learn the Fundamentals" page highlighting features such as the built-in terminal and Git integration. -When installing Visual Studio Code, I have selected the options -"Built-in terminal" and "Track your code with Git". +Visual Studio Code “Learn the Fundamentals” page highlighting features, including the built-in terminal and Git support (“Track your code with Git”). ``` ## Using VS Code as a git editor From 8273095fdb9b9cf9912b8530be2cc7810223bd44 Mon Sep 17 00:00:00 2001 From: "Blazej M. Baczkowski" Date: Fri, 6 Feb 2026 14:02:30 +0100 Subject: [PATCH 2/3] docs: improve VS Code Git editor setup instructions Add prerequisite about in PATH and clarify how --wait works. --- content/vscode.md | 49 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/content/vscode.md b/content/vscode.md index d97a375..58737d1 100644 --- a/content/vscode.md +++ b/content/vscode.md @@ -26,11 +26,52 @@ Visual Studio Code “Learn the Fundamentals” page highlighting features, incl ## Using VS Code as a git editor -This will set VS Code as the editor that Git starts. It will start a -new tab, and Git will wait until you save and close that tab. Git for -Windows on Windows may automatically set this if you select it as an -editor: +By default, Git uses your system’s configured editor. You can configure it to use Visual Studio Code instead. + + +Before configuring Git to use VS Code, make sure the `code` command is available in your system `PATH`. + +`````{tabs} + ````{tab} Windows + + If you selected VS Code during Git for Windows installation, it may already be configured. Otherwise, ensure the `code` command is available in `PATH` before running the command above. + + ```` + + ````{tab} macOS + + In VS Code, open the Command Palette and run: + + - Shell Command: Install 'code' command in PATH + + You can verify by running: + ```console + $ code --version + ``` + + ```` + + ````{tab} Linux + + If you installed VS Code via: + + - deb/rpm package -> `code` is usually added automatically + - Snap -> use `code` (already available) + - Manual install (tarball) -> you may need to manually add it to `PATH` + + You can verify by running: + ```console + $ code --version + ``` + ```` + +````` + +To configure VS Code as the editor that Git starts, run: ```console $ git config --global core.editor "code --wait" ``` + +The `--wait` option ensures that Git pauses while the file (for example, a commit message) is open in VS Code. Git resumes only after you close the editor. + From 86685020134292b750f5cf47f780ca35f5edee02 Mon Sep 17 00:00:00 2001 From: "Blazej M. Baczkowski" Date: Fri, 6 Feb 2026 14:14:04 +0100 Subject: [PATCH 3/3] docs: add cross-reference to VS Code Git editor section Explain prerequisites for VS Code to work with Git as editor in the section Text editors by referencing to the section on VS Code --- content/editors.md | 5 ++++- content/vscode.md | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/content/editors.md b/content/editors.md index 9466874..8eef8dd 100644 --- a/content/editors.md +++ b/content/editors.md @@ -38,13 +38,16 @@ We have an extra page for it: {ref}`vscode`. ```{admonition} If you choose a different editor If you choose a different editor, make sure to browse its documentation -on how to conntect it to Git. +on how to connect it to Git. ``` This command will configure git to start VS Code as its editor. (This will happen automatically if you select the VS Code option when installing Git for Windows.) +This command configures Git to start VS Code as its editor when Git launches an editor (for example, to edit a commit message). See {ref}`using-vscode-as-git-editor` for details on prerequisites and the `--wait` option. + + ```console $ git config --global core.editor "code --wait" ``` diff --git a/content/vscode.md b/content/vscode.md index 58737d1..8ac6d69 100644 --- a/content/vscode.md +++ b/content/vscode.md @@ -24,6 +24,7 @@ for languages such as C++, Fortran, R, C#, Matlab, Java, Python, PHP, and Go. Visual Studio Code “Learn the Fundamentals” page highlighting features, including the built-in terminal and Git support (“Track your code with Git”). ``` +(using-vscode-as-git-editor)= ## Using VS Code as a git editor By default, Git uses your system’s configured editor. You can configure it to use Visual Studio Code instead.