The command palette is at the core of a keyboard-centric interaction, and can be also useful for looking up available commands and key bindings. It is available through the following keyboard shortcut:
The command palette lists only those commands that are available in the current context. For
Go To Line... command shows in the palette only when a code editor is opened and has
Gitpod opens in its dark theme. If you prefer a lighter experience, you can switch to the light
theme. Simply use the command palette and select
Change Color Theme.
To quickly open any file using the keyboard, press:
- Ctrl+P (⌘+P on macOS).
It will let you search, find, and open any file by name.
To search for or to replace string occurrences in all files of your workspace, press:
- Ctrl+Shift+F (⌘+Shift+F on macOS)
It opens the search view, which is described here.
Most languages allow to name things and refer to them in other places, for example variables, functions, classes, modules etc. Gitpod supports the notion of symbols and references, and lets you navigate between them in both directions:
Open Symbol(Ctrl+Shift+O) finds a symbol by its name.
Find All References(Shift+F12) lists all references to the symbol at the current position in an inline editor.
Go to Definition(Ctrl+F12 or Ctrl/⌘+click) brings you to the definition of a symbol.
Peek Definition(Alt+F12) does the same in an inline editor.
Rename Symbol(F2) renames the symbol and changes all references to it accordingly.
To tidy up your code, many languages support
Format Document (Alt+Shift+F).
If you want to apply this to only a subsection of the current document, select the desired region
Format Selection from the editor’s context menu.
Still Have Questions?
Please reach out. We’re happy to answer them.