JetBrains IDEs
All JetBrains IDEs share the same interface, and many common features such as:
- π Code improvement tips
- π§Ό Bugs, code smells, and typos detection
- β¨ GIT integration
- π Use of remote tools or environment
- πΊοΈ UML generation for supported languages
And in each IDE, some languages, frameworks, and build tools have additional features and support.
π΅ Aside from IntelliJ IDEA and PyCharm, all IDEs are paid.
π± Android Studio, by Google, is based on IntelliJ IDEA community.
π Their IDEs are free for students.
π₯ You can manage all of their IDEs using the toolbox.
π You can invite others to code with you. Use CTRL+SHIFT+Y
to generate a link. They will have to download a special version of the IDE. You can share your terminal with + > shared
.
Running some code
There is a green play icon next to the code that you can run:
This will create a Run configuration, which is a wrapper to all information related to the execution of your program. You could add compiler options, program arguments...
You can create, edit, or select a configuration here:
Basic file edition
When coding, the IDE will highlight or underline problems.
- π₯: this code won't compile
- π¨: possible problem/warning
- π©: there may be a typo
- π«οΈ: unused value or variable
In practice, there are more variations according to the specific problem.
Quick fixes
By hovering over a problem, you'll have an explanation, along with suggested fixes. There is the ALT+ENTER
shortcut for all quick fixes.
Autocompletion
When writing something, use TAB
to select a choice from the suggested list. Use arrows to move up/down.
Use CTRL+ENTER
to manually trigger auto-completion.
Shortcuts
π₯ There is a search menu to look for files (CTRL+SHIFT+N
), settings (CTRL+SHIFT+A
). Open it with Double Shift
.
- To enable zoom on scroll, search
mouse wheel
. - To add a
*
to modified files, searchmark modified
. - To set the proofreading language, search
natural language
. - To enable soft wraps, search
soft wrap
.
Editing shortcuts
- CTRL+C, CTRL+V, CTRL+X, CTRL+A, CTRL+F: common ones
- CTRL+D: duplicate line or selection
- SHIFT+ARROWS: select a lot of lines
- CTRL+Z: undo
- CTRL+SHIFT+Z: redo π
- CTRL+SHIFT+F: look for a word in a scope (project, folder...)
Use CTRL+SHIFT+U
to toggle uppercase/lowercase.
Programming-specific
Comments
- CTRL+Q: show the documentation of the selected element
- CTRL+/: comment selected lines (inline comment, such as //)
- CTRL+SHIFT+/: comment selected lines (block comment, such as /*)
Generation
- ALT+INSERT: generate getters, setters, methods...
-
CTRL+ALT+T: wrap selection inside a
if
/for
/... - CTRL+ALT+MAJ+U (paid): generate UML of selected files
Navigation
- SHIFT+MouseLeft: on a function call/..., navigate to the source
- ALT+F7: on a function/variable, list users
- CTRL+SHIFT+E: show the last opened/edited files
π Using todo
or fixme
in a comment, mark it as a TO-DO.
Features
Interface
The interface has often changed over the years, especially as they are moving to a more compact interface.
π Use CTRL+E
to see available menus.
π₯ There is a GIT menu and a TODO menu which are helpful.
ContextMenu
The context menu is the left-click menu. These are worth a mention:
- Analyze π: list all code smells, typos...
- Refactor π―: rename an element (smart renaming)
- Reformat π§Ό: code cleanup
- Local History πΌοΈ: all changes to a file
GIT π
There are two tabs: the "commit" tab (ALT+0
), to commit and push, and the "git" tab (ALT+9
), to see commits, checkout branch...
Refactor π§Ό
You can refactor (rename) variables, functions, files. Once you do try, you'll see a list of all detected locations that use the element.
β¨ Before confirming the refactoring, you can exclude or remove unwanted changes.
Snippets π
Navigate to Settings > Editor > Live template
. Create a new live template. Select the scope where it can be used.
You can create variables using $variable_name$
.
π» To-do π»
Stuff that I found, but never read/used yet.
-
```xxx!
- scratch files
- Project view
- CTRL-P
- Database (select a schema, SSH tunnel, query console)