Smarten up the editor with new editor actions. This plugin makes you more productive in the editor. It supports some frequently used actions with the press of a key. You can easily select, format and navigate in selections. And it allows to to split literals at the current position without breaking your code!

It relies on navigation contexts. A navigation context is defined as:

Block statement: If, Switch or loops statements

Method definition

Class definition

XML tag

This plugin saves you from unnecessary caret movements.

Supported languages:

Java

JavaScript

CSS

XML

Bash (BashSupport plugin)

SQL (only certain dialects)

PHP

Split the current string literal at caret or around selection

Press alt + PLUS / Edit: Smart split. This action splits a string into two parts and positions the caret between two parts. For example: the string "abcd" is turned into "a" + "bc" + "d" if "bc" was selected. Useful examples:

Working on Java code: simply split a string into two parts and enter a variable in between

Working on a Java loop statement: Use this action to jump to the loop beginning.

Working on XML tag body: Use this action to directly jump to the tag definition. Press again to jump to the parent tag definition.

Jump to the end of a navigation block

Press ctrl + alt + END / Edit: Smart end. This action moves the editor caret to the end of the next parent navigation context. Useful examples:

Working on a Java loop in a method: Use once to add code after the loop, press another time to move after the method to add more class level code.

Working on XML tag body: Press to add another tag after the current one. Press again to move after the parent tag.

Format a navigation block

Press ctrl + alt + shift + F / Edit: Format favourite. This action reformats the next parent navigation context according to the code style settings. It puts a selection on the reformatted text. It can be called multiple times to reformat the next parent context. Before you needed to press ctrl+w multiple times, then ctrl+alt+L and confirm the message box. Useful examples:

Working on a Java method: If you want to reduce whitespace changes just reformat the current method by calling this action.

Working on XML tag body: Reformat the current tag and child context by calling this from anywhere on the first level below the tag.

Select a navigation block

Press ctrl + alt + shift + D / Edit: Select favourite. This action select the next parent navigation context. It can be called multiple times to select the next parent context. Before you needed to press ctrl+w multiple times, which works on a much finer grained model. Useful examples:

Working on a Java code: Select code on a more coarse grained model, e.g. anonymous class, then the method, then the inner class, then the outer class.

Working on XML tag body: Copy all sibilings and the parent tag by calling this action twice and then ctrl + c

This is an early release of this plugin. Please vote and provide feedback to help!

-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:

Un/Escape selected Java text

Un/Escape selected JavaScript text

Un/Escape selected HTML text

Un/Escape selected XML text

Un/Escape selected SQL text

Un/Escape selected PHP text

Convert diacritics(accents) to ASCII

Convert non ASCII to escaped Unicode

Convert escaped Unicode to String

Encode/Decode:

Encode selected text to MD5 Hex16

De/Encode selected text as URL

De/Encode selected text to Base64

Increment/Decrement:

Increment/decrement all numbers found.

Duplicate line and increment/decrement all numbers found.

Create sequence - Keep first number, replace all other by incrementing

Increment duplicate numbers

Sort with natural order:

Reversing order of lines

Shuffle lines

Sort case-sensitive A-z

Sort case-sensitive z-A

Sort case-insensitive A-Z

Sort case-insensitive Z-A

Sort line length asc., desc.

Sort lines by subselection - only one selection/caret per line is handled

Align:

Format selected text to columns/table by a chosen separator/delimiter

Align text to left/center/right

Filter/Remove/Trim...:

Grep selected text, All lines not matching input text wil be removed. (Does not work in column mode)

Trim selected text

Trim all spaces in selected text

Remove all spaces in selected text

Remove duplicate lines

Remove empty lines

Other:

Swap characters at caret

Switch file path separators: Windows<->UNIX

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.

Note: As of version 1.0, this plugin supports only IDEA 14.1.x-based products and later (e.g., PyCharm 4.1, WebStorm 10, Android Studio 1.3).

Wrap selected text to the specified column width. Similar to the Emacs command 'Fill Paragraph' and Vim's `gq` (format lines) command. A replacement for the native Intellij Fill Paragraph command, which doesn't work quite how I need it to.