Skip to content

Latest commit

 

History

History
51 lines (41 loc) · 1.48 KB

README.md

File metadata and controls

51 lines (41 loc) · 1.48 KB

Integration softeq development environment with VSCode IDE

Install Visual Studio Code as root
sudo apt install vscode

Launch VS Code and install the following addons from the Extensions tab:

  • C/C++ Extension Pack by Microsoft
  • Shell Command by mngrm3a

Switch to your softeq-dev-env directory i.e.
cd ~/repos/softeq-dev-env

Copy contents of the ./ide/.vscode directory to ~/.vscode
cp -R ./ide/vscode/. ~/.vscode/

Adjust ~/.vscode/launch.json to meet your requirements

Intergration VSCode with Git

To make VSCode your default git editor
git config --global core.editor "code -w"

As an alternative of setting core.editor export following environment variables

export EDITOR="code -w"
export VISUAL="$EDITOR"

To make this settings permanent consider editing your ~/.profile

if [[ -n $SSH_CONNECTION ]]; then # SSH mode - no GUI available
  export EDITOR='vim'
  # replace vim with your favorite non-GUI editor
else # Local terminal mode
  export EDITOR='code -w'
fi
export VISUAL="$EDITOR"

This way not only git, but many other applications will use VS Code as an editor

To leverage the --diff option you can pass to VS Code to compare two files side by side

git config --global -e
And add following section into the git configuration file

[diff]
    tool = default-difftool
[difftool "default-difftool"]
    cmd = code -w --diff $LOCAL $REMOTE

Using VS Code for debugging

TBD