What is the name of this IntelliJ feature? - intellij-idea

I want to add a hotkey to the feature(toggle view/hide) on the image below, but do not know its name.
So on a git change IntelliJ shows a green(other colours) marker, so I click on it to view it. I want to add a hotkey so I don't have to use the mouse

In IntelliJ, you could use Next Change and Previous Change to achieve the above feature without using a mouse.
First open a file with Git changes.
Follow the attached image. (I have provided instruction for mac, but it should be the same on other OS as well)
Important: If the file that you opened does not have git changes, this won't be available on Navigate tab.
Let me know if you have any questions. Thanks.

Related

How to disable keyboard in a PyCharm project window?

I want to use search, undo, delete etc. using keyboard in my main editor window and NEVER on my project window.
But once I click file in the project window, I must now do second click into the editor, otherwise my keyboard will start wreaking havoc in the filesystem.
Please tell me there is an intelligent way to disable this!
Could not find it myself, mostly because I don't know how to even name this behaviour.

how to make the editor gutter show lines changes against another branch, such as origin/main?

As shown in the screen cap below, the gutter to the left of the editor shows line numbers and color indicators for which lines have changed (and what kind of change):
It shows the changes against the current HEAD.
How could I make it show changes against another branch, such as main or even a remote branch such as origin/main?
For example, if the same change was already made on origin/mainline, I want no color indicator to show at all.
Thank you!!!!!
You can do this with the Git Scope plugin
It adds a Git Scope tool window that looks much like the built-in Git tool window (or the Commit tool window if you have the Git non-modal interface enabled). In the Git Scope window you can select a different branch to be the basis of file change indictors:
Not only that:
If you click on the color indicators, you can see the actual diff against the chosen branch.
The Git Scope window shows all changed files against the chosen branch (much like the built-in git window shows all changed files against HEAD).
As with the built-in window, you can right click on any file to or press ⌘D to see a full diff, or the Show Diff button to iterate over all file changes.
In fact, as far as I can tell, Git-Scope changes the diff context for even the built-in commands for showing the diff of the currently open file.
The Git Scope window has a toggle button to conveniently switch back and forth between normal mode (diffs against HEAD) and the Git Scope mode.

Intellij vcs plugin, view changed files AND file changes in the same window

I normally do git diff for this but want to leverage the intellij gui.
The Version Control tab just shows me all the files that changed:
To view the actual changes I have to select a file and choose "Show Diff".
This opens another window. Now from this other window if I want to see changes for another file I have to click this button then open the other file:
I don't like that. Is there a way to have this in the same pane? Where on the left I see a list of the changed files and I just have to select the file to see its changes? Otherwise its very clunky and unusable for being able to see a tree of changed files and selecting the one's changes I want to see
Just found it, I wanted "preview diff"

How to do a svn compare between local code base and latest from repository like in Eclipse

In Eclipse, when click Synchronize view it will show up a tree structure of diff comparison from local to svn repo. Click on each file will pop up view to show code diff.
Is there a similar feature in Intellij and how to activate it? I am on latest Intellij Ultimate btw.
Click on the Version Control button on the bottom, click on the Incoming tab. Hit the refresh button (circle with arrows). First time it will ask you if you want to set up automatic refresh. It will then show any changes pending from the repository. You can click on files and get a diff. (You may have to right click on a revision and select "Show Affected Files".)
There is no exact same view in IDEA. See https://youtrack.jetbrains.com/issue/IDEA-119596
You can use Subversion -> Compare to the Latest repository version from a file's context menu.
There is also the Incoming tab that shows changes from the server not yet applied to your working copy. You could invoke Show Diff with local from the Details pane of the Incoming change

How to open files in Intellij-IDEA with double click?

My first day using this IDE...
is there a way to configure the IDE to open files in the project by double click? It is rather painful having to drag files from the project overview into the editor window.
You can change the KeyMap.
Go to File->Settings and find the keymap section.
You will have to create a new KeyMap by clicking copy, and then look in the View section for "Jump to Source" and change/add the keymap you want.
However, as Bozhidar Batsov noted, double clicking may not always work so well. Whether it works may vary by OS and/or windowing system. I have no trouble with it in Mac OS X, but it doesn't seem to work well in openSUSE.
There are also other predefined keymaps that you can select from this settings screen. They're set up to resemble other IDEs, so you might find them helpful if you're transitioning from something else.
It is easy way to do in windows.
I found a great solution to this problem by Jelmer Kuperus over at Orange11.
Create an .Xresources file in your home directory. Add the following line:
*multiClickTime: 400
Jelmer explains that this setting changes the default double-click speed from 200ms to 400ms, effectively slowing it down. Save the file and then run:
xrdb ~/.Xresources
The effect is immediate, no need to logout or reboot. Double-click in Intellij works as expected. I did try changing the mouse double-click speed in System Settings first before trying this out to see if that made a difference but it did not.
I am using Ubuntu 11.04, Intellij 10.5.2, and Sun JDK 1.6.0_26. YMMV
Use F4 to open quickly the selected files. Btw double clicking on files should work as well(at least in theory). Swing's buggy handling of such events, however, causes the double click to not always work in IDEA, so I eventually stopped double clicking and switched to using F4. You can also use "Autoscroll to source" from the projects menu - this will open the source files as soon as you select them in the project browser.