Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 2.87 KB

README.md

File metadata and controls

47 lines (29 loc) · 2.87 KB

vscode-intelli-refactor README

💡⚡️ Smartly select range for refactoring under the cursor. Imports great Alt+Enter experience of IntelliJ / Android Studio into VSCode! 🚀

Features

Nearest Quick Fix

Automatically expands selection to the region where at least one code action is available, in contrast to Command+. (or Ctrl+. in Windows) which does not show refactoring actions until selecting a whole expression by hand.

intelli-quickfix

Refactor Shortcuts & Expression Selector

IntelliJ offers shortcut keys for individual refactor actions e.g. extract variable or function. Picker will be shown to select target expression under the cursor.

intelli-extract

Default Keybindings

Win Mac Action Type
Alt+Enter Alt+Enter Quick Fix Nearest
Ctrl+Shift+Alt+T Ctrl+Shift+Alt+T
(Ctrl+T in IntelliJ)
Refactor This Nearest
F6 F6 Move Nearest
Ctrl+Alt+V Command+Alt+V Extract Local Variable Expression
Ctrl+Alt+C Command+Alt+C Extract Constant
(including Local Variable)
Expression
Ctrl+Alt+M Command+Alt+M Extract Function
(Extract Method in IntelliJ)
Expression
Ctrl+Shift+Alt+A Command+Shift+Alt+A Extract Type Alias Expression

Requirements

Minimum supported VSCode version is 1.38 (including insider). Older versions have bug around retrieving code actions, which is fixed in microsoft/vscode#77999.

Extension Settings

  • intelli-refactor.useCompatSelection: Enable this if you are using old refactor extension and getting unexpected No code actions available message after selection expanded. See microsoft/vscode#49024 for detail. Selection will blink while loading actions.

Known Issues

Currently only supports TypeScript/JavaScript.

Notices

The icon is based on vscode's lightbulb icon.