Thursday, 24 August 2017

Configure Git-bash Command on visual studio code

Install git-bash from https://git-scm.com


Put the bellow line on user setting file, save  and restart your visual studio code
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"

Configure: Visual studio Code on widows right click

First, create a file with a “.reg” extension.  For example,.vsCodeOpenFolder.reg
then positioned to add these contents to the file:
  • Windows Registry Editor Version 5.00
  • ; Open files
  • [HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
  • @="Edit with VS Code"
  • "Icon"="C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe,0"
  • [HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
  • @="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%1\""
  • ; This will make it appear when you right click ON a folder
  • ; The "Icon" line can be removed if you don't want the icon to appear
  • [HKEY_CLASSES_ROOT\Directory\shell\vscode]
  • @="Open Folder as VS Code Project"
  • "Icon"="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\",0"
  • [HKEY_CLASSES_ROOT\Directory\shell\vscode\command]
  • @="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%1\""
  • ; This will make it appear when you right click INSIDE a folder
  • ; The "Icon" line can be removed if you don't want the icon to appear
  • [HKEY_CLASSES_ROOT\Directory\Background\shell\vscode]
  • @="Open Folder as VS Code Project"
  • "Icon"="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\",0"
  • [HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]
  • @="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%V\""
Next, save the file.

Note: the above .reg file assumes that you installed VS Code in the default location—which will be the case for most people. Adjust accordingly if the Code.exe file is installed in a different folder.
Very nice – we are almost done.  Double click on the vsCodeOpenFolder.reg file that you just created.