Editor Integration
Quick Fix Context Menu
When P42 refactorings or actions are available, you will see a lightbulb in your editor. Clicking it will open the quick fix context menu. Alternatively, you can use a keyboard shortcut (see below).
Refactoring Suggestions
The P42 JavaScript Assistant suggests beneficial refactorings by showing an underline with three dots (for refactorings) or a blue or yellow squiggly underline (For code cleanups). You can invoke them as a quick fix.
💡 If you want to show some suggestions differently, e.g., as a warning, you can configure them in the Visual Studio Code settings.
Keyboard Shortcuts
Keyboard shortcuts are a fast way to select and execute refactorings.
💡 You can re-configure the keyboard shortcuts in the Visual Studio Code preferences.
Quick Fix context menu
The Quick Fix context menu contains the most relevant refactorings for the current cursor position or text selection.
- Mac: CMD + . (default Visual Studio Code shortcut)
- Windows CTRL + . (default Visual Studio Code shortcut)
Refactor context menu
The Refactor context menu contains all available refactorings for the current cursor position or text selection.
- Mac: CMD + SHIFT + R
- Windows / Linux: ALT + SHIFT + R
Inline context menu
- Mac: CMD + SHIFT + I
- Windows / Linux: ALT + SHIFT + I
Extract context menu
- Mac: CMD + SHIFT + X
- Windows / Linux: ALT + SHIFT + X
Convert context menu
- Mac: CMD + SHIFT + V
- Windows / Linux: ALT + SHIFT + V
Action context menu
- Mac: CMD + SHIFT + A
- Windows / Linux: ALT + SHIFT + A