Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to highlight git changed line in Intellij

I have a big configuration file in IntelliJ which I am editing.

Is it possible to highlight the lines that I changed, in a way similar to a git diff directly in the editor?

Note that I am aware that IntelliJ shows the changed lines on the side of the editor (nice feature btw!). Here I am however looking for something more prominent, that would highlight the changed lines (eg by changing the background color) directly in the editor. The motivation is to enable to spot exactly what line was already changed while editing the file.

like image 350
Pierre-Antoine Avatar asked Jun 19 '18 12:06

Pierre-Antoine


People also ask

How do I know who changed a line in IntelliJ?

The change history for a file is displayed in the dedicated History tab of the Version Control tool window Alt+9 . The change history for a selection of code is displayed in a separate window, in the form of the differences viewer.

How do I see Git changes in IntelliJ?

IntelliJ IDEA lets you review the state of your project at a selected revision. Open the Git tool window Alt+9 and switch to the Log tab. Select a commit and choose Show Repository at Revision from the context menu.

How do I highlight a line of code in IntelliJ?

@o'rety ctrl + w is for highlighting only, and it is contextual. To highlight a whole line will be many presses of ctr + w - just to get the line highlighted. There is a shortcut called "Select Line at Caret" - interestingly, it has no value by default. I personally had this set to ctrl + alt + shift + , .

Can you highlight in IntelliJ?

Press Ctrl+Alt+S to open the IDE settings and select Editor | Color Scheme | Language Defaults | Semantic highlighting. Select the Semantic highlighting checkbox and customize the color ranges if necessary.

Can we track Git commands run in IntelliJ?

IntelliJ IDEA allows you to check the status of your local working copy compared to the repository version of the project. It uses specific colors to let you see which files have been modified, which new files have been added to the VCS, and which files are not being tracked by Git.

How do I view Git Log in IntelliJ?

One way to open the Git tool window is to hover over the quick access button in the bottom left of the IntelliJ IDEA window, and select Git. This will open the Git Log tool window. Alternatively, you can use ⌘9 (macOS), or Alt+9 (Windows/Linux), to open the Git Log tool window.


1 Answers

For lines in the editor: Settings/Preferences | Editor | General | Highlight modified lines in gutter.

From https://www.jetbrains.com/help/pycharm/file-status-highlights.html

like image 64
Sergey K. Avatar answered Oct 15 '22 14:10

Sergey K.