Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keyboard shortcut for Revisions > Hide Revision Information in Eclipse

I have set up a keyboard shortcut for 'Show Annotations' in my Java source files since I frequently want to know when a Git revision was made, and sometimes by whom. The thick margin on the left with lots of colors, which is pretty distracting while coding, so I would like to toggle it off with a keyboard command.

Following the advice at help.eclipse.org in order to toggle the revision information off I'm now moving my pointer to the margin, right-clicking, selecting Revisions, and clicking Hide Revision Information. Is there a way to assign a keyboard shortcut to Hide Revision Information? If not, is there a different way to achieve the action that I can shortcut?

I have EGit installed (although I use it as little as humanly possible), if it matters.

like image 691
Spork Avatar asked Aug 04 '15 12:08

Spork


2 Answers

You can use a trick. Use "Show Ruler Context Menu"-Short-Cut (Ctrl + F10), then V (for: ReVison), and then H (for: Hide Revision Information).

So, whole Short-Cut looks like this: Ctrl + F10, V, H

like image 176
tzaika Avatar answered Nov 11 '22 18:11

tzaika


I have not found a full answer to my question, but there's a coping mechanism: Toggle Revision Author Display. With the toggle for author the most annoying part can be turned off: taking space for author name. The colors still remain, however.

As @AleksandrM mentioned the Quick Diff toggle does achieve the goal - but it does not work when line numbers are shown. In case line numbers are shown it just toggles the revision information on the line numbers, and shows changes compared to Head in your current file with Quick Diff colors.

like image 30
Spork Avatar answered Nov 11 '22 16:11

Spork