Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A shortcut for your productivity in Android Studio

A shortcut for your productivity in Android Studio

# A shortcut for your productivity in Android Studio
Talk given at the following conferences/events:
- Droidcon Lisbon (September / 2023)
- Droidcon San Francisco (June / 2023)

## Abstract
Throughout my journey as a developer, I've spent countless hours in front of Android Studio. In order to be more productive, it was important for me to know the right shortcuts and how to use them in the most effective way.

In this talk, we will learn how to develop a shortcut mindset and explore many shortcuts with real world examples in order to make your life as a developer much easier. Finally, I will share my favorite plugins to help you get the most out of Android Studio.

After this talk, your daily work won't be the same. These shortcuts will boost your efficiency to another level and make it less error prone, allowing you to focus on what really matters.

Zhenlei Ji

June 09, 2023
Tweet

More Decks by Zhenlei Ji

Other Decks in Technology

Transcript

  1. 🗓 Agenda 1. The problem 2. How to develop shortcut

    mindset? 3. Demo 4. Final considerations
  2. jetbrains.com/idea blog.jetbrains.com/idea @intellijidea Default macOS keymap REMEMBER THESE SHORTCUTS Smart

    code completion Ň Space Search everywhere Double Show intention actions and quick-fixes Ņ↩ Generate code ľN, Ň↩ Parameter info ľP Extend selection Ņņ Shrink selection Ņt Recent files popup ľE Rename F6 GENERAL Open corresponding tool window ľ0...ľ9 Save all ľS Synchronize ľŅY Toggle maximizing editor ľ F12 Inspect current file with current profile Ņ I Quick switch current scheme Ň` Open Settings dialog ľ , Open Project Structure dialog ľ ; Find Action ľ A DEBUGGING Step over/into F8/F7 Smart step into/Step out F7/ F8 Run to cursor ŅF9 Evaluate expression ŅF8 Resume program ľŅR Toggle breakpoint ľF8 View breakpoints ľ F8 SEARCH / REPLACE Search everywhere Double Find ľF Find next/previous ľG/ľ G Replace ľR Find in path ľ F Replace in path ľ R Select next occurrence ŇG Select all occurrences ŇľG Unselect occurrence ŇG EDITING Basic code completion ŇSpace Smart code completion Ň Space Complete statement ľ ↩ Parameter info ľP Quick documentation lookup ľJ, F1 External Doc F1 Brief Info ľ+mouse Show descriptions of error at caret ľF1 Generate code... ľN, Ň↩ Override methods ŇO Implement methods ŇI Surroundwith… ľŅT Comment/uncomment with line comment ľ/ Comment/uncomment with block comment ľŅ/ Extend selection Ņņ Shrink selection Ņt Context info Ň Q Show intention actions and quick-fixes Ņ↩ Reformat code ľŅL Optimize imports ŇŅO Auto-indent line(s) ŇŅI Indent/unindent selected lines / Cut current line to clipboard ľX Copy current line to clipboard ľC Paste from clipboard ľV Paste from recent bu ers... ľ V Duplicate current line ľD Delete line at caret ľ Smart line join Ň J Smart line split ľ↩ Start new line ↩ Toggle case for word at caret or selected block ľ U Select till code block end/start ľŅ [/ľŅ ] Delete to word end Ņ Delete to word start Ņ Expand/collapse code block ľ+/ľ- Expand all ľ + Collapse all ľ - Close active editor tab ľW REFACTORING Copy F5 Move F6 Safe Delete ľDelete Rename F6 Refactor this ŇT Change Signature ľF6 Inline ľŅN Extract Method ľŅM Extract Variable ľŅV Extract Field ľŅF Extract Constant ľŅC Extract Parameter ľŅP NAVIGATION Go to class ľO Go to file ľ O Go to symbol ľŅO Go to next/previous editor tab Ň /Ň Go back to previous tool window F12 Go to editor (from tool window) ۚ Hide active or last active window ۚ Go to line ľL Recent files popup ľE Recent locations popup ľ E Navigate back/forward ľŅ /ľŅ Navigate to last edit location ľ Select current file or symbol in any view ŅF1 Go to declaration ľB, ľClick Go to implementation(s) ľŅB Open quick definition lookup ŅSpace, ľY Go to type declaration Ň B Go to super-method / super-class ľU Go to previous/next method Ňņ/Ňt Move to code block end/start ľŅ[ / ľŅ] File structure popup ľF12 Type hierarchy ŇH Method hierarchy ľ H Call hierarchy ŇŅH Next/Previous highlighted error F2/ F2 Edit source/View source F4/ľt Show navigation bar ŅHome Toggle bookmark F3 Toggle bookmark with mnemonic ŅF3 Go to numbered bookmark Ň0 ...Ň9 Show bookmarks ľF3 COMPILE AND RUN Build project ľF9 Compile selected file, package or module ľ F9 Select configuration and run/debug ŇŅR/D Run/Debug ŇR/D Run context configuration from editor Ň R, Ň D Run anything DoubleŇ USAGE SEARCH Find usages/Find usages in file ŅF7/ľF7 Highlight usages in file ľ F7 Show usages ľŅF7 VCS / LOCAL HISTORY Commit project to VCS ľK Update project from VCS ľT Push commits ľ K ‘VCS’ quick popup ŇV LIVE TEMPLATES Surround with Live Template ľŅJ Insert Live Template ľJ https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf
  3. https://www.merriam-webster.com/dictionary/shortcut “a key or combination of keys on a computer

    keyboard programmed to perform a specific function when pressed”
  4. Refactoring code Extract • Extract to a Variable • Extract

    to a Constant • Extract to a Field • Extract to a Parameter • Extract to a Method option ⌥ command ⌘ V option ⌥ command ⌘ C option ⌥ command ⌘ F option ⌥ command ⌘ P option ⌥ command ⌘ M
  5. Progressive learning Methodology to understand the shortcuts Programming Search the

    shortcut Execute the shortcut Understand the shortcut exist? Assign a shortcut yes no
  6. Progressive learning Methodology to understand the shortcuts Programming Search the

    shortcut Execute shortcut Understand the shortcut exist? Assign a shortcut yes no