Basic Operations in Visual Studio Code
Basic Operations in Visual Studio Code
Creating Files
- Within VS Code:
1. In the Explorer pane, right-click on the folder where you want to create a file.
2. Select "New File".
3. Name your file (e.g., `main.py` for a Python file) and press Enter. The new file will open
in the editor.
Basic Editing
- Writing and Editing Code: Click on the file in the Explorer pane to open it in the editor. You
can now write or edit code.
- Saving Files: Use "Ctrl + S" (Windows/Linux) or "Cmd + S" (Mac) to save your changes.
- Closing Files: Close a file by clicking the 'X' on the file's tab or using "Ctrl + W"
(Windows/Linux) or "Cmd + W" (Mac).
Terminal Integration
- Opening the Integrated Terminal: Use "Ctrl + `" (backtick) to open the integrated terminal.
This terminal lets you run commands directly in VS Code.
Using Extensions
- Installing Extensions: To enhance functionality, go to the Extensions view by clicking on the
square icon on the left side, or use "Ctrl + Shift + X". Search for extensions (e.g., Python
extension for Python development) and click "Install".
Customising VS Code
- Preferences and Settings: Access settings by going to "File" > "Preferences" > "Settings".
Here, you can customise various aspects of VS Code, like theme, font size, editor settings,
etc.
This overview provides a foundational understanding of managing files and folders, editing,
and navigating within Visual Studio Code. Each section can be expanded with screenshots,
step-by-step instructions, and additional tips relevant to Python development for a more
comprehensive guide.