Save valuable time and preempt frustration with these top twenty features and shortcuts. 

Why You Should Learn Your Dev Tools

Let's start with a question: why should you spend time digging through tool features?

As developers, our careers and daily projects bring us into contact with many tools, apps, libraries, and technologies. And more often than not, we tend to avoid reading manuals, tutorials, or guides on them. Nothing out of the ordinary here, right? We are just mirroring what we do in the non-virtual environment when we buy something we've never used before and, rather than reading the manual, we just want to get to the functional point and see things working. For most of us, our default is we want to get things done without spending too much time on trivial instructions (or what we think are trivial instructions).

When it comes to coding, refactoring, testing, and all the related programming activities, however, we really need to know our tools. Why? If we don't, we will face loads of actions being repeated or not being efficiently executed on a daily basis. Being in contact with repetitive tasks while having this sense of wasting time will likely cause frustration and boredom, and it might even traumatize some inexperienced developers.

As a collaborative community driven by performance and productivity, we care about maintaining a healthy and appealing environment where we can feel motivated and know that we are always adding value to projects. 

Thus, regardless of your experience, I would strongly recommend that you take the time to know each and every tool you use. Understand each tool's strengths and weaknesses and try to have a good notion of what it offers you in terms of features, automations, and especially shortcuts for commonly used actions. I can guarantee that you will be pleasantly surprised about how much time it will save you.

IntelliJ IDEA

There are several Java IDEs (Integrated Development Environments) available on the market, including Eclipse, Netbeans, BlueJ, and JDeveloper. But in this article, I will focus on IntelliJ and show you why it has become developers' top choice. 

IDEs were created to provide smooth environments in which to code, and therefore they come equipped with several features that aim to make our lives easier. On the other hand, if you don't know where or how to find the functions, chances are that your IDE will turn your routine into a bit of a nightmare.

The IntelliJ IDEA Official Website states that:

“Every aspect of IntelliJ IDEA has been designed to maximize developer productivity. Together, intelligent coding assistance and ergonomic design make development not only productive but also enjoyable.”

Here, I will point out some of the main features and characteristics of IntelliJ IDEA, after which I'll detail a list of really useful shortcuts that will drastically improve your productivity.

COMPLETION

Completion is one of the most important features in IDEs, and IntelliJ provides it in a seamless and smart manner suited to the context in which you're coding. This feature saves a lot of time and also typing.

IntelliJ serves you with different types of completion like Static Member Completion, Chain Completion, Data Flow Analysis (completion), Statements Completion, Instant Completion (which activates as soon as you start typing), and Smart Completion (which filters suggestions, showing only relevant types suited to the context).

REFACTORING

When it comes to Refactoring, IntelliJ’s main idea (pun intended) is that every action you perform should lead into green and clean code. In other words, you don’t have to bother going after each reference or worry that your code might break.

The mechanism that IDEA uses to keep track of the code syntax tree and all the relations allows it to perform complex refactorings even through different languages, dialects, and expressions.

Among its refactoring features, the IDE offers you Extract (variable, field, method, and parameter), Move, Rename, and Inline.

SELECTION

When you select statements you want to refactor, IntelliJ will enable you to extract, move, or rename them. In many cases, you won’t even need to select a statement because the IDE will automatically present you with a list of possible variants.

QUICK SEARCH

In IntelliJ, every pop-up list or tree you see has a built-in feature to search over the items. You just need to start typing and it will highlight the matching items.

HELPFUL SHORTCUTS

Now that we've covered some of the main features in IntelliJ IDEA, you may also want to reference and learn these commonly used shortcuts:

  1. Intention Actions (Magical Fix): ⌥ ⏎ / Alt + Enter
  2. Find Action: ⇧ ⌘ A / Ctrl + Shift + A
  3. Search Everywhere:  Double-⇧
  4. Show Recent Files: ⌘ E / Ctrl + E
  5. Navigate between Errors: F2
  6. Go to Declaration: ⌘ B / Ctrl + B
  7. Go to Implementation: ⌥ ⌘ B / Ctrl + Alt + B
  8. Find Usages: ⌥ F7 / Alt + F7
  9. Go To
    • CamelCase Completion (typing only the initial uppercase characters;
    • Works with Wildcards (* for instance);
    • Search for “ClassnameTest:40” takes you to the line 40 of this Class;
    • To Class: ⌘ O / Ctrl + O
    • To File:  ⌘ O / Ctrl + Shift + O
  10.  Extract Variable: ⌥ ⌘ V or Ctrl + Alt + V
    • new Square()Extract variable -> Square square = new Square();
  11.  Inline (opposite of extract): ⌥ ⌘ N / Ctrl + Alt + N
  12.  Commit Interface (VCS): ⌘ K / Ctrl + K
  13.  Change Method’s Signature: ⌘ F6 / Ctrl + F6
  14.  Delete Line: ⌘ del / Ctrl + Y
  15.  Duplicate Line: ⌘ D / Ctrl + D
  16.  Live Templates
    • Type just a few letters to write big pieces of code;
    • System.out.println(); → “sout”
    • Iterate over → “iter” or “it…” to see the options
Conclusion

If you start to wonder if you might be overusing your mouse, that's a great indicator that you probably are. You'll realize huge benefits by taking the time to learn shortcuts and, if necessary, even redefining some shortcuts in a way that's suitable for you.

Knowing the main keyboard shortcuts for IntelliJ will enhance your performance, save you precious time, and help you to become a more efficient and productive developer.

I sincerely hope you found this article useful and start putting into practice at least some of the features and shortcuts mentioned above. Tell us which tip helped you the most and feel free to comment about any other handy features or shortcuts that boost your daily activities!

Don’t forget to share this article with your colleagues and contribute to creating a more efficient and productive community!

 

What Developers Say About IntelliJ

Need more reasons to learn IntelliJ IDEA features and shortcuts? Here's what developers say about it:

Mary Grygleski

Software Technologist/ Engineer

“... Efficiency and intelligence are built into the design…”

“... I switched to using IntelliJ IDEA 5 years ago and have never looked back. It has certainly made my life easier. I am producing more with less effort.”

 

Mercedes Wyss

Groundbreakers Ambassador

CTO

“What I like the most about IntelliJ IDEA, far beyond all the technology integrations, shortcuts, and that kind of stuff that makes us more productive, are the simple and smart suggestions…”

 

Mohamed Taman

Owner/CEO

Java Champion

“...First of all, it makes me productive and does a lot in a short time. It is like a Swiss Army knife, providing me with all the features and tools I need to finish the task at hand seamlessly and more effectively…”


Author

Gabriel Sifuentes

Gabriel Sifuentes is a Software Engineer at Avenue Code. He lived and worked in Milan for 1 year, where he learned a lot about different cultures, people and places. He loves outdoor exercises like calisthenics, rollerblade riding, climbing and obstacle course races.


How to Use Fixture Factory on Unit and Component Tests in Spring Boot

READ MORE

How to Use Circuit Breaker Resilience in Your API Integration

READ MORE

How to Create Your Own RAR Extractor Using Electron

READ MORE

Deep Dive into MuleSoft Internals - API Tracking

READ MORE