VS Code Tips
- 1. Introduction to VS Code
- 2. Command Palette & Navigation
- 3. Multi-Cursor & Advanced Editing
- 4. Workspace & Global Search
- 5. Keyboard Shortcuts Customization
- 6. Integrated Terminal Secrets
- 7. Custom Snippets & Emmet
- 8. Advanced Git Integration
- 9. Theme & Font Customizations
- 10. Essential Productivity Extensions
- 11. Debugging in VS Code
- 12. Task Automation (tasks.json)
- 13. Remote Development (SSH, Docker, WSL)
- 14. Profiles & Settings Sync
- 15. Best Practices & Speed Up
6. Integrated Terminal Secrets
Constantly switching back and forth between your code editor and a separate command terminal window breaks focus. VS Code features a high-performance **Integrated Terminal Panel** running right below your editors, complete with terminal profiles, split panes, and drag-and-drop operations.
Opening & Toggling the Terminal
You can bring up the terminal tray instantly from your keyboard:
| Platform | Shortcut Key |
|---|---|
| Windows / Linux | Ctrl + ` (Backtick) |
| macOS | Ctrl + ` (Backtick) |
Managing Terminal Instances & Splitting Panes
Often, you need multiple terminals active concurrently—for instance, running a local backend node process in one shell while executing git commands in another. VS Code supports multiple terminal workflows:
- Create New Terminal: Press Ctrl + Shift + ` to add another terminal shell instance. Switch between them using the sidebar drop-down menu inside the terminal panel.
- Split Terminal Pane: Press Ctrl + \ (or Cmd + \ on macOS) to split the terminal panel vertically. This displays multiple shells side-by-side inside the same horizontal tray! (Shortcut: Ctrl + Shift + 5 on older setups).
- Maximize Terminal: Need to view long compile outputs? Click the arrow-up icon in the terminal menu (or use the Command Palette command `Toggle Terminal Maximize`) to expand the terminal panel to occupy the entire editor window!
Changing Shell Profiles
Depending on your project requirements, you may need to switch your terminal shell (e.g. from PowerShell or CMD on Windows to Git Bash or WSL Bash, or from bash to zsh on macOS).
- Inside the terminal panel, click the **+** button dropdown arrow in the top right menu.
- Select **Select Default Profile**.
- Choose your preferred shell from the active list. Next time you open a terminal, this shell will load by default!
Dynamic Execution: Sending Code blocks to Terminal
When reading documentation or writing short script modules, copy-pasting code into the terminal manually is repetitive. VS Code allows you to execute selected lines of code instantly:
- Highlight any line of code or script block in your editor.
- Open the Command Palette (Ctrl + Shift + P).
- Search and execute:
Terminal: Run Selected Text In Active Terminal. - VS Code will copy the highlighted code, paste it into the open shell, and trigger execution instantly! (Shortcut: bind this to a custom hotkey like Ctrl + Enter).
cd navigation commands!