Reopen a pane
Sometimes you might accidentally close out of the explorer (left pane) or terminal (bottom pane).
To reopen them, there are keyboard shortcuts to close and reopen:
Ctrl (Windows) or Cmd (Mac) + B for left pane,
Ctrl (Windows) or Cmd (Mac) + J for bottom pane.
But, you can always click on the top left hamburger menu to bring up the VSCode options and visit “View” to reopen
Clear terminal
Mac OS: ⌘ + K
Windows: Ctrl + K
Interrupt program
If something goes wrong with a terminal program (i.e. you made a typo, a program gets stuck in an infinite loop, etc), you can generally interrupt it with:
Ctrl + C
Q to exit
When the output of a terminal command is too tall for a terminal tab to display at once, it paginates. Press Space to step through it one page at a time, or Q to quit and get back to the terminal prompt so that you can execute your next command.
Command Palette
The most important thing to memorize is how to open the Command Palette, which will allow you to fuzzy search within for all other commands. If the command has a keyboard shortcut mapped to it, the shortcut will be displayed to the right. This is the best way to learn the keyboard shortcuts for the commands that you use most frequently.
Mac OS: ⌘ + Shift + P
Windows: Ctrl + Shift + P
Quick open file
To quickly jump to a file:
Mac OS: ⌘ + P
Windows: Ctrl + P
And then fuzzily search for its name. For example, you could type “phco” to get to photos_controller.rb and the list would quickly narrow to bring that file to the top of the list.
What does the rails console command do?
Opens an interactive Ruby environment with your Rails application's context loaded
Why would you use the reload! command in Rails console?
To reload the application's code without exiting the console
Top comments (0)