WebStorm Power User Manual

Intro

Overview

In April 2022 I did a Webinar with JetBrains titled WebStorm's Power User Manual.

Along with Margaux Flores we shared some of our favourite WebStorm features in a fairly freewheeling discussion.

This article accompanied the webinar and is what I was using to make sure I'd covered as much as I could in the time, as well as giving attendees a prompt to ask questions or request demos.

For JetBrains' own one-page intro to WebStorm, see their excellent Getting Started article.

Thanks again to JetBrains, Paul Everitt and Aleksandra Aganezova.

Content

Because WebStorm is already so well documented, so I've listed only the features rather than adding screenshots, etc.

For each feature there's:

  • the feature name / purpose
  • a link to the docs
  • a short description / tips
  • any shortcut key

If you want to get the most out of WebStorm, I recommend trying each of these features for yourself. If you have any questions or comments, I'd be glad to answer them below.

See my article on WebStorm's keyboard shortcuts to get way more done without taking your hands off the keyboard.

UI

General

  • Get to know the user interface so you don't feel overwhelmed
  • Arrange tool windows in one of 8 dock locations that makes sense to you
  • Pin or unpin tool windows so they stay prominent (Dock Pinned) or get out of your way (Dock Unpinned)
  • Save and restore your ideal arrangement so you don't need to set up each individual project

Tabs

Lists

  • Type in any list (Project, Recent Files, Find in Files, etc) to filter / highlight entries

Project

Projects

  • Manage Projects (add Cmd + Shift + P) using the popup to quickly view, filter and open projects

Scopes

Folders

Files

Scratch files

  • Scratch Files (Cmd + Shift + N) let you work on temporary notes, code, styles, or any other file type!
  • Run or debug the scratch file by Right Click then choose "Run Scratch" or "Debug"
  • Use the Quokka plugin (free and paid versions available) for additional code insight

Editing

Cursor

  • Navigate edits (Cmd + [ / ] ) to go to and from last edit locations, even across files
  • Multiple carets (Alt + Click / Drag) allow you to make multiple simultaneous edits and selections
  • Copy and paste to and from multiple carets to manipulate code like a pro!

Selection

Manipulation

Find and replace

Coding

Code style

  • Configure code style for any language or markup, globally, per-project, or per-folder (with unbelievable options!)
  • Reformat code on the fly (Cmd + Alt + L) according to your configured code style

Intentions

  • Use Code completion (Ctrl + Space) to show completion suggestions for code and markup
  • Use Intention actions (Alt + Enter) on any code or markup member to get a list of clever things you can do
  • For the full list, see Preferences > Editor > Intentions

Navigation

  • Go to declaration (Cmd + B / Cmd + Click) on any keyword (component, import, tag, CSS class)
  • Show usages popup (Cmd + B / Cmd + Click) on any declaration (variable, class)
  • Find usages (Alt + F7 / Right Click > Find Usages) on any file in the Project View

Importing

  • Imports are added automatically by simply typing the symbol name and hitting Tab
  • For existing code, use Intention actions (Alt + Enter) then choose "Import..." to generate the imports

Refactoring

  • In the Project view, drag or move files (F5) to automatically update imports for the file and its usages
  • Use move refactoring (F6) to move declarations to other files and automatically update imports
  • Use rename refactoring (Shift + F6) to rename symbols and automatically update imports
  • Use extract refactorings to introduce variables, constants, parameters, fields, methods, and functions
  • Use change signature (Cmd + F6) to update the function name, params and order, and all calls to that function
  • Use the Refactor This popup (Ctrl + T) to get access to all these refactorings in a single list

Code generation

Smart Keys

  • Anywhere:
    • Type < ( { [ " ' to insert the corresponding pair
    • Surround selection on typing quote or brace, i.e. hit [ to get [selection]
  • HTML:
    • Within tags, type = to automatically add "" and place the caret in between
    • Change one tag to automatically update the other
  • JavaScript:
    • Start template string interpolation on typing $
    • Convert attributes when pasting HTML into JSX files
  • See the Smart Keys help for the full list of languages and smarts

Language injection

Tooling

Commands

  • Search actions (Cmd + Shift + A) when you can't quite remember the name of the thing you need to do
  • Search everywhere (Shift + Shift) to find files, actions, panels, preferences, etc

Change lists

  • Manage changelists to group changes related to different tasks and commit these sets of changes independently
  • Shelve and unshelve changelists to easily switch tasks and work on them later

Version control

NPM support

Debugging code

Test support

Web development tools

Plugins

Because WebStorm has so much functionality built-in, I don't use that many plugins, but here are some I like:

  • Quokka
    Run JavaScript and TypeScript directly in WebStorm with instant feedback and live values
  • Awesome Console
    Displays links to local files (including errors) and opens them in an editor pane
  • DataGrip
    An outrageously good database editing tool, directly in WebStorm
  • String Manipulation
    Case switching, sorting, filtering, incrementing, aligning to columns, grepping, escaping, encoding...