Reputation: 8129
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.
Upvotes: 13
Views: 18576
Reputation: 2023
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
Upvotes: 16
Reputation: 1267
Usually, I look at the green bar near the right vertical scroller, it shows where the changes are made. It helps me to keep track of where I made changes to the file.
I hope it might help someone.
Upvotes: 2
Reputation: 7558
No, there is no way to highlight lines in Editor in the same way as in Diff. Showing all the diff in the editor will be too distracting most likely. And there is specific Diff view for that purpose. Somewhat similar request - https://youtrack.jetbrains.com/issue/IDEA-140053
The motivation is to enable to spot exactly what line was already changed while editing the file.
Markers in the gutter are there exactly for this purpose. Changed sections are also marked on the scrollbar. You could change the color to be more noticeable, btw.
Upvotes: 3
Reputation: 508
Go to Version Control -> Local Changes
. Right click on the file you change and show diff
(or CTRL + D
when the file is selected).
Then you'll see the differences with the current version in editable mode, and you can resize the left window to have the right one on full screen.
Upvotes: 3