Topic 2B: VS Code: Command Palette

Visual Studio Code Tutorial

Learn how to effectively use Visual Studio Code's Command Palette and discover valuable commands. This tutorial provides a step-by-step guide to transforming text into title case and introduces useful commands including sorting lines and updating image sizes.

Key Insights

  • The Command Palette in Visual Studio Code enables users to swiftly find and apply commands.
  • Accessing the Command Palette can be achieved through View > Command Palette or by using keyboard shortcuts Cmd–Shift–P (Mac) or Ctrl–Shift–P (Windows).
  • The Command Palette can be utilized to transform selected text into title case.
  • Users can find specific commands by typing in relevant keywords or acronyms into the Command Palette.
  • The Command Palette allows for the execution of a wide range of commands, including transformation and selection functions.
  • Some useful commands for users include 'Sort Lines Ascending', 'Sort Lines Descending', and 'Update Image Size'.

This exercise is excerpted from Noble Desktop’s front-end web development (Visual Studio Code) training materials and is compatible with updates through 2022. To continue learning web development with hands-on training, check out our coding bootcamps in NYC and live online.

Use the Command Palette

  1. Open with Cmd-Shift-P / Ctrl-Shift-P

    Or View → Command Palette.

  2. Start Typing Your Command

    Type 'title' to find Transform to Title Case (or just 'ttt' — fuzzy matching is fast).

  3. Use Arrow Keys to Pick

    Down/Up to move through suggestions.

  4. Hit Return/Enter to Run

    Command executes on your selection or current file.

Using the Command Palette

Vs. Code’s Command Palette lets you quickly find and apply commands. To open the Command Palette, choose View > Command Palette or hit Cmd–Shift–P (Mac) or CTRL–Shift–P (Windows).

Here’s an example of how to use it:

  1. Select some text that you want to convert into title case (where the first letter of each word is capitalized).
  2. Hit Cmd–Shift–P (Mac) or CTRL–Shift–P (Windows) to open the Command Palette.
  3. Start typing title until Transform to Title Case appears and is selected. (If needed, use the Down/Up Arrow keys to move the selection down or up.)

    NOTE: You can also find this command by typing ttt (for t ransform t o t itle case) because the search is very good at matching!

  4. Hit Return (Mac) or Enter (Windows) to execute the command.

Full-Stack Web Development Certificate: Live & Hands-on, In NYC or Online, 0% Financing, 1-on-1 Mentoring, Free Retake, Job Prep. Named a Top Bootcamp by Forbes, Fortune, & Time Out. Noble Desktop. Learn More.

Some Useful Commands

  • Sort Lines Ascending or Sort Lines Descending
  • Update Image Size

Learn more in these courses

How to Learn Coding

Master coding with hands-on training. Learning how to code in JavaScript, Python, and other popular languages can pave the way to a job in tech such as web development, data science & analytics, or software engineering.

Yelp Facebook LinkedIn YouTube Twitter Instagram