diff --git a/00 Introduction.md b/00 Introduction.md index d6719e8..184b97b 100644 --- a/00 Introduction.md +++ b/00 Introduction.md @@ -105,13 +105,15 @@ Note that you may need to update the configuration database before Visual Studio sudo apt-get update && sudo apt-get install libgconf2-4 ``` -### Launching a code editor from the Terminal +### Launching Visual Studio Code from the Terminal -You will be spending a lot of time in the terminal so here is a useful tip. If you have visual studio code installed you can launch it with the contents of a specified directory. Start by editing your `.bash_profile` file located in your home directory. Since this is hidden by default you can open it in **nano** using `nano ~/.bash_profile`. Now add the following line, save the changes and exit. -``` -code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;} -``` -Close the terminal and re-launch. Now you can open any directory. +You will be spending a lot of time in the terminal so here is a useful tip. If you have visual studio code installed you can launch it with the contents of a specified directory. - `code ~/Documents/bookshop/` opens Visual Studio Code with the contents of the directory specified. - `code .` opens Visual Studio Code with the contents of the _current directory_. + +If you are using Ubuntu this works 'out of the box' but if you are using MacOS you will need to edit your `.bash_profile` file located in your home directory. Since this is hidden by default you can open it in **nano** using `nano ~/.bash_profile`. Now add the following line, save the changes and exit. +``` +code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;} +``` +Close the terminal and re-launch. Now you can open Visual Studio Code using the same commands as Ubuntu.