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.
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.
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.
@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 + , .
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With