How to display "git blame" in PhpStorm after opening file by default

PhpPhpstormWebstorm

Php Problem Overview


How to display "git blame" after opening a file by default in PhpStorm.

Without "right-click the left gutter, and select the Annotate option", I want to display "git blame" by default after just opening files.

Php Solutions


Solution 1 - Php

'git blame' is supported - the command is called annotate in PhpStorm.

  1. Right-click the file
  2. Choose Git > Annotate

Annotate option in the context menu

Annotate result in the file

Solution 2 - Php

You can set a hotkey for almost anything in PHPStorm.

Click Preferences > Keymap. Search for Annotate. You can then set a hotkey to toggle Annotations in PHPStorm.

This doesn't exactly solve the problem of showing annotations when a file is opened but does eliminate the need for lots of fiddly clicking.

Solution 3 - Php

It is possible with the GitToolbox plugin.
These settings are enabled by default i think and it also displays the blame in the status bar.

If you want to edit the settings, you go to File-> Settings-> Version Control -> GitToolbox and you can see the checkbox 'Show editor inline 'Blame''.

Solution 4 - Php

It's not exactly an solution, but can help if you're tired of creating new shortcuts for every little functionality that you need.

You right click the file, press G, release, and press N

it's the same as pointing to the GIT, waiting for the window to popup and selecting the annotate function, only faster.

That's the way I do.

Hope it helps somebody

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNH_jView Question on Stackoverflow
Solution 1 - PhplenaView Answer on Stackoverflow
Solution 2 - PhpJimmy BobView Answer on Stackoverflow
Solution 3 - PhptpliakasView Answer on Stackoverflow
Solution 4 - Phprt3norioView Answer on Stackoverflow