Don't panic! It is easy like a piece of cake ;)
Prerequisites (Do/confirm these first):
-
Make sure you have downloaded and installed VS-Code. You can download VS-Code from https://code.visualstudio.com.
-
To compile C, C++, you need to install a compiler for C/C++: MinGW or MSYS2. We prefer MSYS2 for Windows users.
-
Follow this YouTube video for installing MSYS2 and adding the compiler's path to the Environment Variable of Windows.
-
For Linux Users, you should have
gcc
installed by default, but, you need to have "build-essential" installed (For Debian based UBUNTU, LINUX MINT users), please typesudo apt-get install build-essential
in your terminal to install necessary packages for compiling (for Debian, Debian-like, ubuntu, linux mint users). -
If you already have a compiler (either MinGW or MSYS2 for Windows, and, GCC or clang for Linux) installed and the path added to the environment variable successfully, YOU CAN SKIP THIS STEP and move forward.
We'll continue with the following easy steps to set up your coding environment in VS Code.
- Download the configuration file (ending with
.code-profile
) by clicking the blue button:
This file should be downloaded to the 'Downloads' folder (by Default, or, you should know/track your download location).
Now, you can follow this video... Click the following photo...
Getting started with C/C++/Python programming? Want to use VS-Code? Use this beginner-friendly-VS-Code-profile (It effortlessly configures your VS-Code, ready for learning)
Happy Coding ;)
- (Almost) Everything is pre-configured. Just plug-and-play! (Download>install>EnjoyCoding)
- Default theme set to "One Dark". You can change the theme as you wish.
- Compile and Run functions are configured for
C
,CPP
,Python
,Java
as "Code-Runner" extension has been configured (But you need to install Compiler/Interpreter on your own) - Auto code formatting (Beautification and Indentation) while saving the file (
.c
,.cpp
,.py
,.java
) with the keyboard shortcut "Ctrl
+s
" - Snippet (Pre Generated Code) for "C" (type
c
and hit 'Enter' for basic code structure/body,pri
forprintf("");
andscan
forscanf("",&);
) - Text Wrap is enabled (Solves this issue)
- pre-added "Warm Up - Typing test" for practising typing inside VS-Code. Practice makes a man perfect.
;)
- Most of the extensions from this free-code-camp article are added, please visit this site and explore all extensions and how they work, individually. The list of these extensions are: Better Comments, Code Spell Checker, CodeSnap, and Material Icon Theme.
- For Web Development, HTML CSS Support, Auto Close Tag, Auto Complete Tag, and HTML End Tag Labels are pre-installed.
cph
(Competitive Programming Helper for CodeForces) andvjudge
extensions."editor.suggest.showWords": false,
, for this change insettings.json
, IntelliSense in Visual Studio Code will not suggest words from your code.
- line height is set to default where it was set to 1.5 in the first two releases(v1.1)
- this PERFECTLY works only with VS CODE (https://code.visualstudio.com); to use this profile without issues in
OSS CODE
andvscodium
, manual modification is needed - Whenever you run C, C++, Python, or Java code in the VS Code terminal, the entire terminal window clears. This means you will lose the history of previous outputs. due to this your code execution is also slightly slower.
- It does not override your previous profile or configurations. Just adds a new profile. You can switch your previous one any time from "
Settings icon
(Bottom-Left corner of VS-Code window) >Profile (...)
>Default
"
Kazi Rifat Morshed
CSE KU 230220
Special thanks go to Ibnul Abrar Shahriar Seam (CSE KU 230201)