IntelliJ IDEA 16 EAP Improves Editor and VCS Integration
Every week we publish a fresh IntelliJ IDEA 16 EAP. Today’s build, among bugfixes that address issues you reported, brings a few improvements to Git integration and IntelliJ IDEA heart, the code editor.
Move elements right and left
We already have a way to move code statements up and down: Ctrl + Shift + Up/Down (Cmd + Shift + Up/Down for OS X.) They come in handy when you’re rearranging code statements. Sometimes, however, it might be useful to move them left or right (when you’re, for example, changing the order of attributes of an XML element, method parameters, or elements in an array initializer).
To make it possible we’ve added two new actions: Alt + Ctrl + Shift + Left/Right (Alt + Cmd + Shift + Left/Right for OS X).
UPDATE: The Action has been renamed to Move Element Left/Right.
VCS integration
Two new actions to help you work with Git branches, available via the Branches popup: Checkout with Rebase and Rename.
The Checkout with Rebase action is useful if you don’t want to waste your time on extra files synchronization and compilation when you do two operations: Checkout and then Rebase.
If you do an interactive rebase via the VCS → Git → Rebase main menu, IntelliJ IDEA now automatically stashes and unstashes local changes and assists with resolving conflicts.
The experience of applying patches has also been improved: you can now recover from the patches that could not be applied because of conflicts.
We hope you’ll find all these enhancements useful. Share your impressions and concerns in the EAP discussion forum, and reports bugs our issue tracker.
Kotlin
This EAP comes with bundled preview build of Kotlin 1.0 Release Candidate. If you use Kotlin in Maven or Gradle projects you need to setup Kotlin EAP Maven repository in your project, see Kotlin Early Access Preview for details.
Develop with pleasure!
Ingo says:
January 28, 2016I miss a responsive web site. I like reading these articles on my phone.
Mike says:
January 28, 2016The shifting of code left or right seems like it would be more valuable if it was an actual refactor. If I move method parameters to the left or right their corresponding usages aren’t changed. I know this would overlap with the “Change Signature” refactor but being able to do the change signature with a simple left/right movement would be really nice!
Riccardo Cossu says:
June 30, 2016that depends on the case; I agree that such a shortcut would be useful, but I just needed this exact functionality and it worked great for me (I had a list of calls where I swapped two String parameters)
Даниил Водопьян says:
January 29, 2016Does this swapping arguments work when they are on different lines? That would be super useful when changing the order of enum elements, for example.
Andrey Cheptsov says:
January 29, 2016Yes, it works for different lines too, including enum elements.
Shawn Kovalchick says:
January 29, 2016There are so many keyboard shortcuts! Is there an up-to-date reference guide to all the shortcuts? (even better, any on-screen reference guide?)
Andrey Cheptsov says:
January 29, 2016The Windows/Linux keymap reference (PDF): https://resources.jetbrains.com/assets/products/intellij-idea/IntelliJIDEA_ReferenceCard_WL.pdf
The OS X keymap reference (PDF): https://resources.jetbrains.com/assets/products/intellij-idea/IntelliJIDEA_ReferenceCard_Mac.pdf
Shawn Kovalchick says:
January 29, 2016Are there any references with the new commands? The commands listed in this article (including the pre-existing move commands up/down) are not on those reference guides.
FYI, those URLs did not work. The ‘M’ in ‘Mac’ should be lowercase, and the Windows/Linux reference card does not have ‘_WL’ in the URL.
TWiStErRob says:
January 29, 2016Settings > Keymap is the best reference.
It would be nice to have a generated map of common keys from there, much like Chrome Developer Tools > Settings > Shortcuts; it’s really hard to make that not up-to-date.
Mike says:
January 29, 2016Great feature.
The out-of-box key map for Eclipse is not updated for the «Alt + Ctrl + Shift + Left/Right» new combination.
Please, update & sync all key maps and publish the updated posters for all popular key maps, not only for the default IDEA key map.
Dmitry Batrak says:
February 1, 2016Alt + Ctrl + Shift + Left/Right is occupied already in Eclipse keymap. We’ll map it to Alt+Shift+Left/Right there, we don’t have an equivalent of Eclipse action bound to that shortcut anyway.
Selters says:
February 4, 2016Really like the idea of “Move statements right and left”. Looks really cool in html.
But it MUST work for Scala. It’s the only thing I care about. I have zero motivation for upgrading my license if this feature is not supported in Scala. IntelliJ is by far the best IDE for Scala and does an awesome job at that. Keep improving on the Scala plugin.
Thanks 🙂
kuba says:
February 22, 2016awesome. Been waiting for switching arguments shortcut for a while
Geoffrey De Smet says:
March 25, 2016In the Git log window, when looking at a diff of a commit, it would be nice – for peer reviewing usage – that the “show diff with local” action, shows a diff of the local file with the file BEFORE the commit, not after the commit.
This would make it easier to see the changes of a commit on a file and immediately edit that file in the diff window (such as revert part of those changes or improve them further by using better variable and method names for new the code).
CC says:
March 22, 2017Please add support for the new Move Element Left/Right action to editing javascript.
it’s shows disabled in the menu when editing js files, but appears for java files.