![]() ![]() If it’s not already the case, OPT+RETURN will become your best friend once you realize its power. For these, assistance is provided in a few different ways: Intention Actions (aka Mindreading Actions) We try to keep things DRY, but at the end of the day, repeating code is unavoidable in a lot of situations. Unfortunately, we spend a lot of time writing the same type of code over and over again. Switch to recently used files: CRT+TAB Code Generation Navigate forward to previous position: CMD+] View implementation (if interface or abstract): OPT+CMD+B If we can make navigating in and out of different areas of the code base frictionless, then we can maintain context and speed. With the cursor in the scope of the change we want to make you can perform the following with a single keystroke:Ī large amount of our time is spent trying to understand the existing code base before making a change. Our next goal is to identify some existing code where we want to perform simple refactorings, and do it quickly and accurately without skipping a beat. This shortcut makes it easier and faster. Trying to find the right parenthesis to select when many things are nested is difficult. A large portion of the time when you are selecting text, you are trying to select it as a valid unit. Select next occurrence(s): CTR+G Scope based selectionĪnother important way to avoid having to touch the mouse and speed up your workflow is improving text selection. This first group of shortcuts is based on simple operations that you probably do a lot, but if you do it with the mouse, you’re spending 10x longer getting there. The first step to achieving speed is to stop touching the mouse. Our goals here are to increase speed and accuracy. I also recommend disabling the Mac shortcut keys that override the F* keys, making many of the following shortcuts easier to work with. Note: all the shortcuts I discuss here are the default Android Studio shortcuts for Mac OS X. Like the term or not, this helps us get closer to the fabled “10x” level of productivity. Let’s explore an opportunity for making big leaps in both of these areas by embracing better tools and mastering them, inside and out. (I’m looking at you XCode users.) There are so many shortcuts and tools that I’m not going to attempt to cover them all here, but I will highlight some I use most often and provide me the most value in my daily work.Īs developers, we live in a fast-paced environment and must always look for ways to build software better and faster than we did yesterday. ![]() It’s easy to dismiss the power contained within them if you haven’t fully experienced it. Jetbrains’ IDEs (including Resharper) are arguably the best around. With friction, you see something you want to refactor and think to yourself, “This will interrupt my flow I’ll coming back to it later.” And how many times do you actually go back to it later? So let’s lower the friction and enable opportunistic refactoring of our codebase. Without friction, you will start to notice these things happen automatically and continuously. When you can do this effectively, refactoring, renaming and improving the code has close to zero friction. Here I’m going to talk specifically about how to harness the power of Android Studio’s keyboard shortcuts, refactoring options and live templates to allow you to navigate and refactor the code as fast as you can think about it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |