Skip to content

Latest commit

 

History

History
35 lines (32 loc) · 2.54 KB

useful-keystrokes.md

File metadata and controls

35 lines (32 loc) · 2.54 KB

Useful Keystrokes in Android Studio / WebStorm

Windows Mac Name & Use
Control + Shift + A Command + Shift + A Action -> This is an awesome feature: Search any action by name and find the corresponding keystroke
Alt + F7 Alt + F7 Find Usages -> Note the distinction between 'value read' and 'value write' in result window
Control + B Command + B Go to declaration -> Go to the field/method definition, or go to the usage of that field/definition
Alt + Control + Left/Right Arrow Option + Command + Left/Right Arrow Go back or forward to the previous/next cursor location
Control + Shift + Backspace Command + Shift + Backspace Go to last edit location. Press again to go to previous edit location etc.
Control + Tab Control Tab Go to the next file (+ Shift for previous file)
Control + W Alt + Up Arrow Expand current selection (Select successively increasing code blocks)
Control + Shift + W Alt + Down Arrow Contract current selection (Decrease current selection to previous state)
Control + Alt + V Command + Option + V Extract a variable
Control + Alt + M Command + Option + M Extract a method
Shift + F6 Shift + F6 Rename in file
Control + Q F1, Control+J Quick Documentation (press again for side-panel view)
Control + M (need to verify) Control + M Hint (Or Basic code completion)
Alt + Enter Option + Enter Same as selecting the little lightbulb next to margin (Project quick fix (show intention actions and quick fixes)
Control + N Command + O Go to a class by name
Control + Shift + N Command + Shift + O Go to a file by name
Control + F12 Command + F12 View File structure popup and then search by typing
Press Shift Twice Press Shift Twice Search Anywhere
Control + Shift + A Command + Shift + A Find Action
Alt + Insert Command + N Generate Code (Constructor, getter, setter)
Control + / Command + / Line Comment or Uncomment
Control + '+' or '-' Command + '+' or '-' Collapse or expand code blocks (equivalent of clicking plus/minus on side)
Control + D Command + D Duplicate a line
Control + Y Command + Backspace Delete whole line

Other useful features

  1. Collapse large if/try blocks (consider refactoring to make them a separate method)
  2. Flutter Inspector to jump from a widget in emulator to the associated code
  3. Structure side panel
  4. Click on margin color to show change compared with latest git commit