IntelliJ IDEA has inspired many Java developers to write plug-ins, from J2EE to code editing tools to games. Now it has a robust plugin ecosystem with more than 1500 available plugins and new ones appearing nearly every week.
In this article we are going to present the 10 most useful to our point of view plugins for any developer using this IDE.
Detects type of selection, line or keyword at caret and shifts it “up” or “down” on keyboard shortcut. If there’s only one shiftable word in a line, it can be shifted without the caret touching it. Lowercase/uppercase or lower case with upper first character of shifted words is maintained.
Default keyboard shortcuts:
- Ctrl+Shift+Alt+Comma : Shift Down
- Ctrl+Shift+Alt+Period : Shift Up
- Ctrl+Shift+Alt+K : Shift Up More*
- Ctrl+Shift+Alt+J : Shift Down More*
Shift more: repeats shifting the selected value multiple times. The amount of repetitions can be configured in the plugin configuration (default: 10).
Allows to easily browse next/previous word at caret and highlight other appearances of selected word. Usage: Browse with CTRL-ALT-UP, CTRL-ALT-DOWN (note: on default-keymap this shortcut is also for next/previous occurrence).
Bash language support for IntelliJ. It supports syntax highlighting, rename refactoring, documentation lookup, inspections, quickfixes. BashSupport can directly run scripts within IntelliJ. You can create a new run configuration for Bash scripts. Here you can set which interpreter is used to run it. Whenever a script is executed the output is logged. If Bash prints out syntax errors then the erroneous lines are clickable to jump to the location of the error.
IdeaVim is a Vim emulation plug-in for IDEs based on the IntelliJ platform. Use the IDE’s plugin manager to install the latest version of the plugin. Start the IDE normally and enable the Vim emulation using “Tools | Vim Emulator” menu item. At this point you must use Vim keystrokes in all editors.
If you wish to disable the plugin, select the “Tools | Vim Emulator” menu so it is unchecked. At this point IDE will work with its regular keyboard shortcuts. Keyboard shortcut conflicts between the Vim emulation and the IDE can be resolved via “File | Settings | Vim Emulation”, “File | Settings | Keymap” and key mapping commands in your ~/.ideavimrc file.
6. Maven Helper
Provides actions to run/debug the current test file. If maven-surefire-plugin is configured to skip or exclude the test, ‘verify’ goal will be used. It also provides actions to run/debug maven goals for a module that contains the current file and an easy way to find and exclude conflicting dependencies
- Right click in Editor | Run Maven
- Right click in Project View Toolbar | Run Maven
- CTRL + ALT + R – “Quick Run Maven Goal” action
- Customize goals: Settings | (Other Settings) | Maven Helper
- Define shortcuts: Settings | Keymap | Plug-ins | Maven Helper
Open pom file, click on ‘Dependency Analyzer’ tab, right click in the tree for context actions.
7. String Manipulation
Provides actions for text manipulation:
- Toggle style (camelCase, hyphen-lowercase, HYPHEN-UPPERCASE, snake_case, SCREAMING_SNAKE_CASE, dot.case, words lowercase, Words Capitalized, PascalCase)
- To SCREAMING_SNAKE_CASE (or to camelCase)
- To snake_case (or to camelCase)
- To dot.case (or to camelCase)
- To hyphen-case (or to camelCase)
- To hyphen-case (or to snake_case)
- To camelCase (or to words)
- To PascalCase (or to camelCase)
- Capitalize selected text
-when nothing is selected, then either nothing or whole line or a particular element is selected – report an issue if you find something to improve, each file type needs its own implementation to work flawlessly.
- Un/Escape selected Java text
- Un/Escape selected HTML text
- Un/Escape selected XML text
- Un/Escape selected SQL text
- Un/Escape selected PHP text
- Convert non ASCII to escaped Unicode
- Convert escaped Unicode to String
- Encode selected text to MD5 Hex16
- De/Encode selected text as URL
- De/Encode selected text to Base64
- Format selected text to columns/table by a chosen separator/delimiter
- Increment/decrement all numbers found.
- Duplicate line and increment/decrement all numbers found.
- Trim selected text
- Trim all spaces in selected text
- Remove all spaces in selected text
- Remove duplicate lines
- Remove empty lines
- Swap characters at caret
- Grep selected text, All lines not matching input text wil be removed. (Does not work in column mode)
- Actions are available under Edit menu, or via the shortcut “alt M” and “alt shift M”. You can setup your own shortcuts for better usability.
8. SQL Query Plugin
A tool for executing SQL statements through a JDBC connection.
- Syntax highlighting
- Executing multiple statements at once
- Highlighting of primary and foreign keys
- Editing of results
- Support for easier configuration of common JDBC driver
- Support of different column formats (including custom formats)
- Browser for database structure
- Statement templates for often used statements
- Support for Java BLOB’s
- Export into XML, HTML, CSV and Excel
- Data Load
9. JRebel for IntelliJ
JRebel is a productivity tool that allows developers to reload code changes instantly. It skips the rebuild, restart, and redeploy cycle common in Java development. JRebel enables developers to get more done in the same amount of time and stay in the flow while coding. JRebel supports a majority of real-world enterprise java stacks and is easy to install into existing development environments. The JRebel plugin for IntelliJ IDEA includes the JRebel agent and helps you to automatically generate the JRebel configuration. It enables JRebel for applications and servers with a single click and improves the debugging support in the IDE.
9.1 External servers and JRebel Cloud/Remote
When launching the application server from a command line or using a remote server, open Settings > JRebel and select Startup.
- Run via IDE – This displays the server launch instructions from within the IDE.
- Run using CLI – Select this option to access JRebel’s integrated CLI instructions. You will be presented with a set of drop-down menus. Select your desired Java version and operating system to receive a set of pre-configured instructions. Follow the steps provided to start your external, command line server with JRebel enabled.
- Run on a remote server – Select this option to configure JRebel in a JRebel Cloud/Remote setting. Follow the steps provided.
10. Grep Console
Allows you to define a series of regular expressions which will be tested against the console output or file. Each expression matching a line will affect the style of the entire line, or play a sound. For example, error messages could be set to show up with a red background.
Additional Features: ANSI colouring
- Main menu | Tools | Open File in Console
- Main Menu | Help | Tail (IntelliJ) Log in Console
- Drag&Drop “Tail File” panel in main toolbar
- http and Windows context menu integration
So this is list of experiences, tips and thoughts about the best IntelliJ IDEA plugins out there. In this article we tried to present some of the best choices for you developers in order to make the development process more convenient. I hope you find it useful and by using them or another plugin of your choice, become even more productive and deliver code faster and in better quality.