Extract method: the shortcut in 5 apps
On Mac it is usually Option+Cmd+M (2 of 4 apps); on Windows it is usually Ctrl+Alt+M (3 of 5 apps); on Linux it is usually Ctrl+Alt+M (3 of 4 apps). The table shows where each app agrees and where it differs.
| App | Mac | Windows | Linux |
|---|---|---|---|
| EclipseExtract method | OptionShiftM | AltShiftM | AltShiftM |
| IntelliJExtract method | OptionCmdM | CtrlAltM | CtrlAltM |
| Visual StudioExtract method | — | CtrlR,CtrlM | — |
| PyCharmExtract method | OptionCmdM | CtrlAltM | CtrlAltM |
| WebStormExtract function | OptionCmdM | CtrlAltM | CtrlAltM |
How the apps compare
- Mac: Option+Cmd+M in PyCharm and WebStorm; Option+Shift+M in Eclipse; Cmd+Option+M in IntelliJ.
- Windows: Ctrl+Alt+M in IntelliJ, PyCharm and WebStorm; Alt+Shift+M in Eclipse; Ctrl+R Ctrl+M in Visual Studio.
- Linux: Ctrl+Alt+M in IntelliJ, PyCharm and WebStorm; Alt+Shift+M in Eclipse.
Learn it by pressing it: Eclipse shortcuts practice, IntelliJ shortcuts practice, Visual Studio shortcuts practice, PyCharm shortcuts practice or WebStorm shortcuts practice.