This gives you more, free for Java users (who have Eclipse)
This section provides those new to IntelliJ a hands-on guided introduction.
PROTIP: Before installing, create a folder that houses your various projects. I call mine “gits”. Some use “dev”. IntelliJ defaults to “IdeaProjects”.
download a folder containing an IntelliJ .idea folder (see below).
Complete Installation Folder
PROTIP: The tilde character that Macs recognize as taking the place of folder path “/User/username”? It’s not recognized by IntelliJ.
- brew cask install intellij
- Open IntelliJ from your /Applications folder.
- Unless you have a file from a previous installation, choose “Do not import settings” and click OK.
- Many choose the “Dracula” theme because it’s healthier on the eyes.
- For compatibiity with Windows (most enterprises need this), select “I used IDEA before” to use the Mac’s control button and G to generate, and command key with N to Go to a class and with Y to delete a line.
- Use the launcher script at /usr/local/bin/idea. This path must be in the PATH variable as defined in file ~/.bash_profile.
- Click customize under Version Controls.
Click Disable under Swing, Android, and Plugin Development unless you’ll be doing them.
When the “Tip of the Day” dialog appears, most people un-check “Show Tips on Startup”.
- In the Project pane, expand a folder by clicking the arrow to the left of that folder.
PROTIP: Look at how the most productive developers work and you’ll see that their hands stay on the keyboard and reach for the mouse much less frequently. This is why interviewers of developers ask “show me how you enter and exit Full Screen”.
### Key map
Apple’s keyboard: https://support.apple.com/en-us/HT201236
Menu Help > Keymap Reference brings up a pdf file online.
PROTIP: To prepare to refer to this while off-line, right-click and save the pdf to your Documents folder as “IntelliJIDEA_Keymap_Reference_Card.pdf”.
- Press command + tab to switch among apps until the Finder is highlighted. This opens Finder.
- Open the pdf.
- Press command + tab to switch between IntelliJ and the pdf shown by the Adobe app.
- Drag the corners to take the whole screen (so you don’t have to scroll).
- Hide the left navigation pane by clicking the black arrow in the vertical divider.
Search text in the pdf.
PROTIP: By investing time to try each keyboard shortcut, you will discover some that can save you time here and there that not only add up to time available for other things, but enable you to have a more enjoyable time using the software. For example:
Project view filters
command 1 (Alt 1 on Windows) hides and unhides the Project pane, for more space to code.
NOTE: In the Project pane, the sort order is for files beginning with special characters. At the top of the list are files with a dot (period) which, in the Linux world, specifies a hidden file.
File or folder names beginning with a capital letter are sorted below the same name in lower case.
Full Screen Toggle
In menu View, there is a Distraction Free Mode and Full Screen mode.
Toggle to enter Full Screen view by holding control with your left thumb and command with your right thumb, then pressing F with your left hand.
PROTIP: Some switch the control and command keys on the left side so that they can get to all such keys using thumbs, pressing two keys at once by pressing between the keys.
- Mouse up to the top edge exposes the menu bar again.
Toggle to exit Full Screen view by pressing control + command + F
Click the View selection “Project” for a drop-down of views:
- Select to filter out.
In each project making use of IntelliJ:
IntelliJ creates an .iml file to house basic module metadata for each discrete unit of functionality that can be independently run, tested, and debugged. Each IntelliJ module includes source code, build scripts, unit tests, deployment descriptors. It’s not related to “modules” in the Java language.
The project opens with the cursor at the project name.
To expand the list, press the right cursor.
Keep pressing the right cursor to keep opening the hierarchy.
Press the down cursor key to move down the list without expanding.
Press the left cursor key to contract.
Press Enter to open highlighted item.
For a search box to pop up, press a Shift keys twice quickly.
Press the dowm cursor.
Go To File Keys
To invoke the “Got To File” key combination, while you have your left forefinger resting on the “F” key, hold down the shift key with your left pinkie. Then while your right forefinger on the J home key, hold down the command key. Now press N with your right forefinger.
Projects edited by IntelliJ contain a folder named .idea which IntelliJ creates in the root of each project because it is applicable to all the modules within the project.
Add to the .gitignore file:
This file many ignore when pushing up to a shared repository because it contains personal preferences that can be different for each individual in the team.
Actions are automated by IntelliJ, such as Inspect code by pressing command+Z.
For a new, press control+N.
IntelliJ “Intentions” define the rules for flagging code inspectins.
Groovy is a programming language working within a JVM
Griffon is a desktop development platform working within a JVM
IntelliJ plug-ins are added to support languages such as Scala, Go, Dart, Erlang, Python, JPython, etc.
Kotlin is a programming language invented by JetBrains (the owner of IntelliJ)
https://app.pluralsight.com/library/courses/intellij-ce-getting-started/table-of-contents Getting Started with IntelliJ CE 2h 47m Released1 Sep 2017 by David Starr (@elegantcoder, ElegantCode.com)
IntelliJ IDE Automation
IntelliJ IDEA from Jetbrains, the free Community Edition (CE), provides check-boxes to activate Git hooks.
PROTIP: We don’t see how to get to Version Control in IntelliJ on videos because it’s often accessed via a hotkey - Apple command 9 on macs and Alt+9 on Windows.
See https://www.youtube.com/watch?v=V8KSaQKgR1Y for VCS improvements in IntelliJ 2016.3.
Let’s use a sample project that already has .idea folder containing files that define configurations for IntelliJ.
But Andrew Krug’s Java example also has integration with testing utilities.