Git Product home page Git Product logo

intellij-diff-plugin's Introduction

intellij-diff-plugin

Syntax highlighting for .diff and .patch files in IntelliJ IDEA and other JetBrains IDEs.

Download

Development

This project was built using Java 11 and Gradle 6.7.1.

In order to open this project in IntelliJ IDEA, follow these steps:

  1. Install Java 11 JDK
  2. Define a project SDK named 11. If you have a Java 11 SDK already, you may choose to rename or clone it.
  3. Open the project and wait for IntelliJ to download the required libraries.
    (This may take a long time, because several hundred MBs are downloaded.)

Now, there are two run configurations, Run in IDE and Build Plugin.

  • Run in IDE allows you to launch an IntelliJ Community Edition with the plugin enabled.
    The IDE version is configured in build.gradle. Required files will be automatically downloaded.
    You can find version numbers here: stable | snapshots. See section com.jetbrains.intellij.idea. You can use Version or Build Number.
  • Build Plugin will generate build/distributions/intellij-diff-plugin-*.zip, which you can install in your JetBrains IDE.

To find out more about plugin development, please refer to the excellent official documentation: http://www.jetbrains.org/intellij/sdk/docs/

Troubleshooting

If you develop under Windows, and see the warning

WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs
at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

then simply run the file fix-jdk-warning-in-windows.reg, and confirm the dialogs.

intellij-diff-plugin's People

Contributors

thomasr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

intellij-diff-plugin's Issues

[feature request] add support for simple diff highlighting

Some diff files only have +/- prefixes without any fancy headers related to git (or whatever program generated the diff). For example:

text text
- sub
+ add
text foo bar 
- sub again

Right now diff-plugin does not even highlight anything, it just shows parsing error:

DiffTokenType.FOO_BAR expected

Issue Information

Please create some issues for open task so anybody knows what is to do and is able to help with this project.

Code folding by file

A patch file can be quite huge. To concentrate on a relevant diff, it would be beneficial to use code folding to reduce the space taken by the irrelevant files in the diff.

False positive syntax errors

If you open this patch, second file name will be highlighted as if there is a syntax error:

DiffTokenType.EOL_HINT, DiffTokenType.OTHER, DiffTokenType.UNIFIED_COMMON_LINE, DiffTokenType.UNIFIED_DELETED_LINE, DiffTokenType.UNIFIED_INSERTED_LINE, DiffTokenType.UNIFIED_LINE_NUMBERS or DiffTokenType.WHITE_SPACE expected, got '--- a/base/time/time...'

Plugin version: v2.1.1
IntelliJ IDEA 2019.1 Beta (Ultimate Edition)


diffp

Plugin is incompatible with 2020.1

Latest update to PyCharm (and presumably other) 2020.1 IDE says this plugin is not compatible. This seems to be a simple version numbering issue.

Compatible with PhpStorm 2017.2 / how to install?

Pretty much the title. Trying to install this with PhpStorm 2017.2, but "Install plugin from disk..." returns "Error: Plugin 'Diff / Patch File Support' is incompatible with this installation".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.