Categories


Authors:
wallaby
Apache

SmarterEditor

Products: IntelliJ IDEA, RubyMine, WebStorm, PhpStorm, PyCharm, AppCode, Android Studio, 0xDBE

Vendor: Joachim Ansorg IT-Services

Email:

Website: N/A

SourceCode: https://code.google.com/...ereditor/source/checkout

Bugtracker page

Description:

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


Jump to the start of a navigation block

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

  • 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!
Downloads: 35323
Rating:
Participated in rating: 3
Version Since Build Until Build File/URL Size (Kb) Date Details
0.8.3. 117. . Download 94.08 2012-04-03 01:45:04 details
0.8. 80.8000. . Download 93.4 2011-12-20 21:58:07 details
. .
8 updates are hidden show all updates

Recent change notes:

Changes in this version:
  • Javascript string splitting improved

General usage instructions:

Source code repository is at http://code.google.com/p/idea-smartereditor/ .

Comments:

binkley@alumni.rice.edu
Rated:
2012-03-29 17:31:05
Would like to see these in stock IDEA.
.
kot1
2012-03-28 12:38:56
FYI, IDEA itself has a lot of useful shortcuts for actions like
Move to Code Block Start (Ctrl+[)
Move to Code Block End (Ctrl+])
Move to Code Block Start with Selection (Ctrl+Shift+[)
Move to Code Block End with Selection (Ctrl+Shift+])
etc.
For full list of basic editing features please refer to http://www.jetbrains.com/idea/webhelp/basic-editing.html.
.
wallaby
2012-03-28 01:22:47
0.8.2 now inserts an empty string in between and selects it-
.
SKelvin
2011-12-24 01:31:25
Thanks a lot!
Unfortunately that seems to be only exactly half a solution :-(
IDEA just fails to correctly format while there is still no text in between the two new "+" signs:
My code style has spaces around "+", but IDEA does not insert a space after the second "+".
Don't know if you can work around that. Maybe insert an empty string,
'spl' + '' + 'it'
reformat, then remove the empty string?
.
wallaby
2011-12-20 21:59:12
The split action now reformats the current block with the configured code style.
.
SKelvin
Rated:
2011-12-20 12:41:24
In fact the only one plug-in I install whenever I install a new IDEA version.

Of course, nothing is ever perfect, so here's a small wish:
Could you either evaluate the code style setting when splitting a string or else just reformat the line with string on it.
After splitting a string I get 'spl'+ +'it' with missing spaces.
.
wallaby
2010-03-29 22:53:44
The split action now also supports PHPStorm.

Jumping to the end of a php block is not possible, as far as I can see. The PHP parser does not provide the necessary items to do this. Feel free to request it from the PHPStorm developers :)
.
conf
Rated:
2010-03-22 13:50:16
Nice plugin, thanks.
I've got 2 notices:
- split string doesn't work in PhpStorm for php language;
- let's say i have this code:
if ($i == 1) {
// I place cursor here and type Ctrl+Alt+End (go to end block)
echo 1;
} else { // I would like it go here
echo 2;
} // but now it goes here
I.e. it would be nice to take the shortest block if it is possible and go further by next typing Ctrl+Alt+End. Same is true for Ctrl+Alt+Home.
.