From 315e10206a34eff2444d77b374bb2ab6fc2623a9 Mon Sep 17 00:00:00 2001 From: tagplus5 Date: Wed, 8 Mar 2017 02:49:44 +0200 Subject: [PATCH 1/2] Add diff tool command explanation to README.md Prevert errors ``` Check [difftool Command] in your settings (remote-sync). Command error: Error: Command failed: "code -d -n --disable-extensions" "/home/t/test/about.html" "/tmp/remote-sync/VQOLI439DXAQFBSY/about.html" /bin/sh: 1: code -d -n --disable-extensions: not found command: code -d -n --disable-extensions /home/t/test/about.html /tmp/remote-sync/VQOLI439DXAQFBSY/about.html ``` when use diff tool with parameters --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/README.md b/README.md index 84b0cd7..f5550db 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,10 @@ You can install this like any other Atom package, with one of these methods: - Enter the directory - Run `apm install` +## Configuration + +- [Diff tool command](https://github.com/yongkangchen/remote-sync#diff-tool-command) + ## Usage You can configure remote sync a couple of ways: @@ -218,6 +222,39 @@ The `.remote-sync.json` in your project root will use these options: ] } ``` +## Diff tool command + +You can use any GUI app which takes two arguments without parameters like **meld** or **gvimdiff**. + +If you want to use app with parameters or console app, try this: + +- **code**(visual studio code) + + create shell script `atom-diff-code` in `/usr/local/bin/` with command + + ``` + #!/bin/bash + code -d -n --disable-extensions $1 $2 + ``` + + Then set `atom-diff-code` in Diff tool command setting in remote-sync in atom + +- vim in Ubuntu: + + `atom-diff-vimdiff` + + ``` + #!/bin/bash + gnome-terminal -x bash -c "vimdiff $1 $2" + ``` +- diff in Ubuntu: + + `atom-diff-diff` + + ``` + #!/bin/bash + gnome-terminal -x bash -c "diff $1 $2; exec bash" + ``` # Make a donation via Paypal ![Make a donation via Paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif) From af0516166abbfdeedc18ed1a2a594f35d943dce9 Mon Sep 17 00:00:00 2001 From: tagplus5 Date: Wed, 8 Mar 2017 02:54:26 +0200 Subject: [PATCH 2/2] Update README.md app names bold --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f5550db..854ea28 100644 --- a/README.md +++ b/README.md @@ -228,7 +228,7 @@ You can use any GUI app which takes two arguments without parameters like **meld If you want to use app with parameters or console app, try this: -- **code**(visual studio code) +- **code** (visual studio code) create shell script `atom-diff-code` in `/usr/local/bin/` with command @@ -239,7 +239,7 @@ If you want to use app with parameters or console app, try this: Then set `atom-diff-code` in Diff tool command setting in remote-sync in atom -- vim in Ubuntu: +- **vim** in Ubuntu: `atom-diff-vimdiff` @@ -247,7 +247,7 @@ If you want to use app with parameters or console app, try this: #!/bin/bash gnome-terminal -x bash -c "vimdiff $1 $2" ``` -- diff in Ubuntu: +- **diff** in Ubuntu: `atom-diff-diff`