Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions docs/diff-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,63 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
* `/Applications/Araxis Merge.app/Contents/Utilities/compare`
* `%PATH%compare`

### [Cursor](https://cursor.com)

* Cost: Free and Paid
* Is MDI: True
* Supports auto-refresh: True
* Supports text files: True
* Use shell execute: False
* Environment variable for custom install location: `DiffEngine_Cursor`
* Supported binaries: .bin, .svg

#### Notes:

* [Command line reference](https://cursor.com/docs/configuration/shell)

#### Windows settings:

* Example target on left arguments:
```
--diff "targetFile.txt" "tempFile.txt"
```
* Example target on right arguments:
```
--diff "tempFile.txt" "targetFile.txt"
```
* Scanned paths:
* `%ProgramFiles%\Cursor\Cursor.exe`
* `%ProgramW6432%\Cursor\Cursor.exe`
* `%ProgramFiles(x86)%\Cursor\Cursor.exe`
* `%PATH%Cursor.exe`

#### OSX settings:

* Example target on left arguments:
```
--diff "targetFile.txt" "tempFile.txt"
```
* Example target on right arguments:
```
--diff "tempFile.txt" "targetFile.txt"
```
* Scanned paths:
* `/Applications/Cursor.app/Contents/MacOScursor`
* `%PATH%cursor`

#### Linux settings:

* Example target on left arguments:
```
--diff "targetFile.txt" "tempFile.txt"
```
* Example target on right arguments:
```
--diff "tempFile.txt" "targetFile.txt"
```
* Scanned paths:
* `%PATH%cursor`

### [Meld](https://meldmerge.org/)

* Cost: Free
Expand Down
1 change: 1 addition & 0 deletions docs/diff-tool.order.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ To change this file edit the source file and then run MarkdownSnippets.
* **[Meld](/docs/diff-tool.md#meld)** Win/OSX/Linux (Cost: Free)
* **[SublimeMerge](/docs/diff-tool.md#sublimemerge)** Win/OSX/Linux (Cost: Paid)
* **[VisualStudioCode](/docs/diff-tool.md#visualstudiocode)** Win/OSX/Linux (Cost: Free)
* **[Cursor](/docs/diff-tool.md#cursor)** Win/OSX/Linux (Cost: Free and Paid)
* **[VisualStudio](/docs/diff-tool.md#visualstudio)** Win (Cost: Paid and free options)<!-- endInclude -->


Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ DiffEngine manages launching and cleanup of diff tools. It is designed to be use
* **[Meld](/docs/diff-tool.md#meld)** Win/OSX/Linux (Cost: Free)
* **[SublimeMerge](/docs/diff-tool.md#sublimemerge)** Win/OSX/Linux (Cost: Paid)
* **[VisualStudioCode](/docs/diff-tool.md#visualstudiocode)** Win/OSX/Linux (Cost: Free)
* **[Cursor](/docs/diff-tool.md#cursor)** Win/OSX/Linux (Cost: Free and Paid)
* **[VisualStudio](/docs/diff-tool.md#visualstudio)** Win (Cost: Paid and free options)<!-- endInclude -->


Expand Down
1 change: 1 addition & 0 deletions src/DiffEngine.Tests/defaultOrder.include.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
* **[Meld](/docs/diff-tool.md#meld)** Win/OSX/Linux (Cost: Free)
* **[SublimeMerge](/docs/diff-tool.md#sublimemerge)** Win/OSX/Linux (Cost: Paid)
* **[VisualStudioCode](/docs/diff-tool.md#visualstudiocode)** Win/OSX/Linux (Cost: Free)
* **[Cursor](/docs/diff-tool.md#cursor)** Win/OSX/Linux (Cost: Free and Paid)
* **[VisualStudio](/docs/diff-tool.md#visualstudio)** Win (Cost: Paid and free options)
1 change: 1 addition & 0 deletions src/DiffEngine.Tests/diffToolList.include.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
* **[Meld](/docs/diff-tool.md#meld)** Win/OSX/Linux (Cost: Free)
* **[SublimeMerge](/docs/diff-tool.md#sublimemerge)** Win/OSX/Linux (Cost: Paid)
* **[VisualStudioCode](/docs/diff-tool.md#visualstudiocode)** Win/OSX/Linux (Cost: Free)
* **[Cursor](/docs/diff-tool.md#cursor)** Win/OSX/Linux (Cost: Free and Paid)
* **[VisualStudio](/docs/diff-tool.md#visualstudio)** Win (Cost: Paid and free options)
57 changes: 57 additions & 0 deletions src/DiffEngine.Tests/diffTools.include.md
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,63 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
* `/Applications/Araxis Merge.app/Contents/Utilities/compare`
* `%PATH%compare`

### [Cursor](https://cursor.com)

* Cost: Free and Paid
* Is MDI: True
* Supports auto-refresh: True
* Supports text files: True
* Use shell execute: False
* Environment variable for custom install location: `DiffEngine_Cursor`
* Supported binaries: .bin, .svg

#### Notes:

* [Command line reference](https://cursor.com/docs/configuration/shell)

#### Windows settings:

* Example target on left arguments:
```
--diff "targetFile.txt" "tempFile.txt"
```
* Example target on right arguments:
```
--diff "tempFile.txt" "targetFile.txt"
```
* Scanned paths:
* `%ProgramFiles%\Cursor\Cursor.exe`
* `%ProgramW6432%\Cursor\Cursor.exe`
* `%ProgramFiles(x86)%\Cursor\Cursor.exe`
* `%PATH%Cursor.exe`

#### OSX settings:

* Example target on left arguments:
```
--diff "targetFile.txt" "tempFile.txt"
```
* Example target on right arguments:
```
--diff "tempFile.txt" "targetFile.txt"
```
* Scanned paths:
* `/Applications/Cursor.app/Contents/MacOScursor`
* `%PATH%cursor`

#### Linux settings:

* Example target on left arguments:
```
--diff "targetFile.txt" "tempFile.txt"
```
* Example target on right arguments:
```
--diff "tempFile.txt" "targetFile.txt"
```
* Scanned paths:
* `%PATH%cursor`

### [Meld](https://meldmerge.org/)

* Cost: Free
Expand Down
1 change: 1 addition & 0 deletions src/DiffEngine/Definitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ static Definitions() =>
Implementation.Meld(),
Implementation.SublimeMerge(),
Implementation.VisualStudioCode(),
Implementation.Cursor(),
Implementation.VisualStudio()
];
}
3 changes: 2 additions & 1 deletion src/DiffEngine/DiffTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ public enum DiffTool
Meld,
SublimeMerge,
VisualStudioCode,
VisualStudio
VisualStudio,
Cursor
}
36 changes: 36 additions & 0 deletions src/DiffEngine/Implementation/Cursor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
static partial class Implementation
{
public static Definition Cursor()
{
var launchArguments = new LaunchArguments(
Left: (temp, target) => $"--diff \"{target}\" \"{temp}\"",
Right: (temp, target) => $"--diff \"{temp}\" \"{target}\"");
return new(
Tool: DiffTool.Cursor,
Url: "https://cursor.com",
AutoRefresh: true,
IsMdi: true,
SupportsText: true,
UseShellExecute: false,
RequiresTarget: true,
Cost: "Free and Paid",
BinaryExtensions:
[
".svg",
".bin"
],
OsSupport: new(
Windows: new(
"Cursor.exe",
launchArguments,
@"%ProgramFiles%\Cursor\"),
Linux: new(
"cursor",
launchArguments),
Osx: new(
"cursor",
launchArguments,
"/Applications/Cursor.app/Contents/MacOS")),
Notes: " * [Command line reference](https://cursor.com/docs/configuration/shell)");
}
}