Is there a way to highlight text inserted since the last commit in IntelliJ in the Editor? - intellij-idea

I'm talking about getting the same effect you get when you commit/merge/diff and are reviewing your changes.
I would like to have code I added to be highlighted. Right now if you go under VCS, Editor Gutter and VCS annotations, both of them have Foreground disabled. I was wondering if there was a way around this.

There is an IntelliJ plugin called Git Scope that provides the functionality you are looking for.
You can install it by going to Settings > Plugin > Marketplace and searching for "Git Scope".

This is not possible without an additional plugin (see the other answer). With any plugins, your current VCS changes are shown with markers in the gutter.

Related

How to enable sidebar changelog in WebStorm?

Today I added Material Theme plugin to WebStorm and I believe this is the reason behind changelist not appearing on the sidebar.
To be precise, this is what happens in IntelliJ when I make change to a specific line of code and click on the yellow bar that appeared after I removed the semicolon:
The change I made can also be seen under VCS -> Local History -> Show History menu option, which shows the diff between the previous and current version of that file.
However, performing the same action in WebStorm doesn't show the changelist/diff on the sidebar:
which means that the only way I can see it is by going to VCS -> Local History -> Show History which is very tedious:
I found being able to quickly revert/lookup the changes on the fly by clicking on that coloured bar really handy, could someone tell me if there is a setting in the IDE that enables that? I looked up and down but couldn't find anything relevant, perhaps I wasn't looking for the right keyword.
Thanks in advance.
Change markers are there for me when using Material UI plugin. Do you have Highlight modified lines in gutter enabled in Settings | Editor | General?

How to show access modifiers for classes in IntelliJ IDEA?

I've recently upgraded to Intellij IDEA 2017.2 and access modifier icons disappeared from my file tree... How to get them back?
UPDATE
Since 2019.2 version you can enable it in the Project view options, toggle the Show Visibility Icons:
For older versions:
This option was disabled intentionally, see this comment for the explanation:
This information was intentionally removed, as we believe that it
brings more clutter than actual value.
To enable it back add -Dide.projectView.show.visibility=true in Help | Edit Custom VM Options.
Since 2019.2 there is actually an easy to use option as described in comment:
you can find this setting in options menu of Project Tool Window. It's called "Show Visibility Icons"

How to get more Webstorm theme listed in Appearance

I want to change the look and feel of entire Webstorm editor. How can I add more themes in the Appearance section?
As of now it lists only 2 option, Default and Darcula.
The 'Theme' dropdown in your snapshot actually refers to Look & Feel in the Intellij/Webstorm parlance. This is also seen if you try doing a View -> Quick Switch Scheme :
Notice that the options in the above correspond to the 'Themes' dropdown in your snapshot.
I would imagine that creating a new Look&Feel would be a non-trivial task. This is somewhat substantiated by https://stackoverflow.com/a/27864988/325742:
Write a plug-in to add a new LAF. Keep in mind this is a lot of work.
It took the JetBrains team a year to develop the Darcula L&F and that
was with dedicated graphic artists to create a whole suite of icons
and recommend color combinations. Since the IntelliJ IDEA Community
Edition is open source, you could use that source code to develop your
plug-in. I'm pretty sure Darcula is available in the community
edition.
Therefore, you may not find a lot of stuff out there that change the whole Look and Feel of a Jetbrains product (like IntelliJ or WebStorm).
However, the best place to look for it would be in the plugins section.
Therefore:
First option: Theme Plugins
Note that, the complete appearance of Intellij changed when I installed this, however the plugins (I tried Material Theme UI) did not appear in the dropdown list.
Second Option : https://github.com/sdvoynikov/color-themes
This is just an editor color scheme and not a full fledged L&F plugin.
Download a color theme from there, then go to File -> Import Settings and choose the downloaded file after which you should see the following:
Finally, restart Webstorm:

How to toggle spell check with a keyboard shortcut in IntelliJ IDEA?

Currently I run with spell check disabled globally in IntelliJ as it ends up being more annoying than helpful most of the time. But there are many times where I'd like to quickly toggle it on and off to check the spelling of things I'm unsure of.
My current workflow in this case is to switch over to sublime then hit my toggle spell check key binding there and then jump back to IntelliJ, which isn't really ideal.
After Google searching around for it all I found was "how to disable spellcheck in IntelliJ" which I already know how to do and searching for "toggle inspection shortcut" was also unfruitful. So does anyone here happen to know if there's a way to bind toggle spell check(or toggle an individual inspection) to a keyboard shortcut in IntelliJ?
If not I might end up writing my own IntelliJ plugin today as I really really want this..
The best thing you can do with out-of-the-box functionality is using Analyze | Run Inspection by Name..., selecting "Typo" from the list and then selecting the scope to run it on.
If you want to run it with a single keyboard shortcut, you'd indeed need to write a simple plugin.
So I ended up making the plugin this late-ish afternoon in a couple hours (thank you yole for telling me it couldn't be done without a plugin before I started work on the plugin). I added the spell check toggle I wanted plus 3 custom toggle bindings that can be bound to any inspection you want.
It's currentley awaiting moderation to get in the JetBrains plugin repository but you can download the plugin jar from my website here.
And I put the source code up on GitHub here

JetBrains IDEA: how to disable diff highlighting in editor?

I checked my project into GIT support and after that there are marks in editor showing me places I changed in file relative to the last commit (I think). It really slows editor. How to turn this off? I can't find the specific option in settings.
There is no way to disable it except disabling the version control completely in Settings | Version Control.
If it slows down the editor (it shouldn't), please file a bug with a CPU snapshot.