During our development we prefer to use tools that have already been proved as reliable.However, many of these tools require high number of clicks, keyboard presses or both to achieve certain result.Have you ever wondered how many same simple actions you do every day that can be optimized by using different tool? How much impact on your focus has the time spent finding the right file, folder, method, string or note?How effective is your communication if you have limited amount of time to find some specific information, for example during a meeting?If you think computers should do the hard work of finding information instead of us, join me on this exploration of utility tools that make everyday work much easier. You are very welcome to share your own set of utility tools.
Content:
- IntelliJ IDEA tools for notes and sharing
- tool for folder navigation
- tool for global hotkey configuration
- clipboard manager
How to open this window? Open help and select Productivity Guide
Statistics preview: number of possible bugs eliminated, number of characters automatically generated
List of features that have not been used yet
Instructions with demo how to use each feature
With find action you don’t need to know most of existing shortcuts if you know action name (or part of the name) that you wish to perform – just start typing its name in the search box and run it
Search everywhere is slower than ‘find action’ but it can search actions, settings, tools, symbols, run configurations
Show intention actions is really powerful since it generates and reformats code in given context. If you want to modify or generate code, always check whether InteliJ can do it for you with this shortcut!
First step in using IntelliJ efficiently is learning the navigation.
One tab is enough
By pressing Ctrl + Alt + left arrow key moves you back in history of visited files, Ctrl + Alt + right moves you forward.
By using ONE tab you eliminate the need to close all the tabs that you have previously opened which are not related to your current work.
Additionally, by using powerful navigation features you are always focusing on relevant information instead of focusing on searching and clicking through multiple tabs.
Tip for recent files: pressing Ctrl + E and then Enter opens last visited file.
Tip for bookmarks: pressing Shift + F11 shows all bookmarks
Always keep in mind that In Intellij there is usually a one step solution available for navigating to a particular file or even a line.
Tip for file navigation (Ctrl + Shift + N): add / or \ at the end for searching folders
Tip for navigation: write initial letter of camelHumps names to speed up the search. For example, searching ComplexClassManager can be found by Typing ‘ccm’ or ‘CCM’
Structural search is advanced feature which allows you to choose template to narrow down the search. It is especially useful in large projects where Find File would return thousands of search results. With structural search template you can specify for example to search only in classes which name matches specific regex. In the next demo searching for a specific field is shown.
In each context it is a good decision to check whether Intellij can solve an issue for you.
In this example new field can be easily generated from constructor parameter by placing carret on newField parameter and pressing Alt + Enter.
Tip: this is especially useful when handling errors, generating remaining options within switch statement, wrapping exceptions inside try and catch blocks etc.
Tip: custom live templates can be configured within IntelliJ. Each custom template can contain variables which will contain value suggestion within given context, for example variables within a scope will be suggested as part of the template.
Use cases: generating code for logger initialization, framework specific templates etc.
The simplest one and the most common one. It generates a lot of code over time.
Tip: Ctrl + W expands selection under cursor
The forgetting curveThe brain forgets things that are no longer useful to make space for something more important.
But unfortunately also important informations will be deleted
This graph shows that after a presentation within a day about 50% of the memory is gone.
After a week it is almost 90%. The whole workload for nothing. You should always have that in mind ... What can we do about it?
It is much more efficient to send your colleague a screenshot than describing what has happened on your computer or with your site since picture is worth a thousand words!
Capture the window option is very useful feature since you can use your chat while for example recording a video call. You can be certain that video recording will only contain video call without showing other programs that you had to use to respond to your colleagues.
Tip: using Shift + F2 moves carret to previous error
Tip: once you hit Ctrl + F12 you can start typing class member name to narrow down the search
As you can see, you can navigate to method names, constructors and class name.
Once you hit Ctrl + Shift + F you can start typing content you are searching for.
In this example we are searching for string “Example” and exactly two lines in project contain our string.
First line that is found is selected and preview of the file that contains the line is shown below.
Additional options for configuring the search include changing the scope, specifying the regular expression and defining a file mask.
Last option for scope named ‘Scope’ allows you to run your search even in project libraries.
Tip: to run global Find and Replace use Ctrl + Shift + R
Tip: you can use “Extract Constant” (Ctrl + Alt + C) which is more appropriate for string constants.
After pressing Alt + Insert within a class you can generate constructors and common methods like getters, setters, equals, hashCode toString.
Furthermore, you can override methods from interfaces and super classes.
You can also delegate methods by choosing particular object within a class, in this case like firstName and lastName objects, to which a call will be delegated.
Within generated method another method from chosen object will be called.