diff options
author | Dan Davison <dandavison7@gmail.com> | 2023-03-09 14:08:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-09 09:08:34 -0500 |
commit | ffec84e3405dae86d3d0ab0f432388233240988e (patch) | |
tree | 7e7d2e53ee3dc67bc978c16eaddfa2c189c2812c | |
parent | cf683c8c6d1c00e0be9f1abafcbd3f45900f1123 (diff) |
Tips and tricks manual section (#1339)
* Add Tips & tricks section to manual
* Clean up manual
* Reorganize Tips & tricks
-rw-r--r-- | manual/src/SUMMARY.md | 15 | ||||
-rw-r--r-- | manual/src/delta-configs-used-in-screenshots.md | 2 | ||||
-rw-r--r-- | manual/src/side-by-side-view-1.md | 23 | ||||
-rw-r--r-- | manual/src/tips-and-tricks/24-bit-color-truecolor.md (renamed from manual/src/24-bit-color-truecolor.md) | 0 | ||||
-rw-r--r-- | manual/src/tips-and-tricks/export-to-html.md | 14 | ||||
-rw-r--r-- | manual/src/tips-and-tricks/mouse-scrolling.md (renamed from manual/src/mouse-scrolling.md) | 0 | ||||
-rw-r--r-- | manual/src/tips-and-tricks/tips-and-tricks.md | 1 | ||||
-rw-r--r-- | manual/src/tips-and-tricks/using-delta-on-windows.md (renamed from manual/src/using-delta-on-windows.md) | 0 | ||||
-rw-r--r-- | manual/src/tips-and-tricks/using-delta-with-gnu-screen.md (renamed from manual/src/using-delta-with-gnu-screen.md) | 0 | ||||
-rw-r--r-- | manual/src/tips-and-tricks/using-delta-with-magit.md (renamed from manual/src/using-delta-with-magit.md) | 0 | ||||
-rw-r--r-- | manual/src/tips-and-tricks/using-delta-with-tmux.md (renamed from manual/src/using-delta-with-tmux.md) | 2 |
11 files changed, 26 insertions, 31 deletions
diff --git a/manual/src/SUMMARY.md b/manual/src/SUMMARY.md index c997740e..232a19f3 100644 --- a/manual/src/SUMMARY.md +++ b/manual/src/SUMMARY.md @@ -19,16 +19,17 @@ - [Navigation keybindings for large diffs](./navigation-keybindings-for-large-diffs.md) - [Merge conflicts](./merge-conflicts.md) - [Git blame](./git-blame.md) - - [24 bit color (truecolor)](./24-bit-color-truecolor.md) - - [Using Delta with tmux](./using-delta-with-tmux.md) - - [Using Delta with GNU Screen](./using-delta-with-gnu-screen.md) - - [Using Delta on Windows](./using-delta-on-windows.md) - - [Mouse scrolling](./mouse-scrolling.md) - - [Using Delta with Magit](./using-delta-with-magit.md) - [Supported languages and themes](./supported-languages-and-themes.md) +- [Tips & tricks](./tips-and-tricks.md) + - [24 bit color (truecolor)](./tips-and-tricks/24-bit-color-truecolor.md) + - [Using Delta with tmux](./tips-and-tricks/using-delta-with-tmux.md) + - [Using Delta with GNU Screen](./tips-and-tricks/using-delta-with-gnu-screen.md) + - [Using Delta on Windows](./tips-and-tricks/using-delta-on-windows.md) + - [Mouse scrolling](./tips-and-tricks/mouse-scrolling.md) + - [Using Delta with Magit](./tips-and-tricks/using-delta-with-magit.md) + - [Save output with colors to HTML/PDF etc](./tips-and-tricks/export-to-html.md) - [Comparisons with other tools](./comparisons-with-other-tools.md) - [Build delta from source](./build-delta-from-source.md) - [Related projects](./related-projects.md) - [Full --help output](./full---help-output.md) - [Delta configs used in screenshots](./delta-configs-used-in-screenshots.md) - - [Side-by-side view](./side-by-side-view-1.md) diff --git a/manual/src/delta-configs-used-in-screenshots.md b/manual/src/delta-configs-used-in-screenshots.md index faec6997..3c3dc127 100644 --- a/manual/src/delta-configs-used-in-screenshots.md +++ b/manual/src/delta-configs-used-in-screenshots.md @@ -2,7 +2,7 @@ ## Side-by-side view -https://github.com/vuejs/vue/commit/7ec4627902020cccd7b3f4fbc63e1b0d6b9798cd +[https://github.com/vuejs/vue/commit/7ec4627902020cccd7b3f4fbc63e1b0d6b9798cd](https://github.com/vuejs/vue/commit/7ec4627902020cccd7b3f4fbc63e1b0d6b9798cd) ```gitconfig [delta] diff --git a/manual/src/side-by-side-view-1.md b/manual/src/side-by-side-view-1.md deleted file mode 100644 index e456a707..00000000 --- a/manual/src/side-by-side-view-1.md +++ /dev/null @@ -1,23 +0,0 @@ -# Side-by-side view - -[https://github.com/vuejs/vue/commit/7ec4627902020cccd7b3f4fbc63e1b0d6b9798cd](https://github.com/vuejs/vue/commit/7ec4627902020cccd7b3f4fbc63e1b0d6b9798cd) - -```gitconfig -[delta] - features = side-by-side line-numbers decorations - syntax-theme = Dracula - plus-style = syntax "#003800" - minus-style = syntax "#3f0001" - -[delta "decorations"] - commit-decoration-style = bold yellow box ul - file-style = bold yellow ul - file-decoration-style = none - hunk-header-decoration-style = cyan box ul - -[delta "line-numbers"] - line-numbers-left-style = cyan - line-numbers-right-style = cyan - line-numbers-minus-style = 124 - line-numbers-plus-style = 28 -``` diff --git a/manual/src/24-bit-color-truecolor.md b/manual/src/tips-and-tricks/24-bit-color-truecolor.md index 8b82d47d..8b82d47d 100644 --- a/manual/src/24-bit-color-truecolor.md +++ b/manual/src/tips-and-tricks/24-bit-color-truecolor.md diff --git a/manual/src/tips-and-tricks/export-to-html.md b/manual/src/tips-and-tricks/export-to-html.md new file mode 100644 index 00000000..26ae9798 --- /dev/null +++ b/manual/src/tips-and-tricks/export-to-html.md @@ -0,0 +1,14 @@ +# Save output with colors to HTML/PDF etc + +Install [ansifilter](https://formulae.brew.sh/formula/ansifilter). + +```sh +git show \ + | delta --no-gitconfig --file-decoration-style blue --hunk-header-decoration-style blue \ + | ansifilter --html \ + > /tmp/diff.html +``` + +Now open `/tmp/diff.html` in a web browser, print to PDF, etc. + +Remove the `--no-gitconfig` above to use your own delta style, but not that `ansifilter` does not handle hyperlinks or decoration boxes etc. diff --git a/manual/src/mouse-scrolling.md b/manual/src/tips-and-tricks/mouse-scrolling.md index 26e5510a..26e5510a 100644 --- a/manual/src/mouse-scrolling.md +++ b/manual/src/tips-and-tricks/mouse-scrolling.md diff --git a/manual/src/tips-and-tricks/tips-and-tricks.md b/manual/src/tips-and-tricks/tips-and-tricks.md new file mode 100644 index 00000000..2c8c73f1 --- /dev/null +++ b/manual/src/tips-and-tricks/tips-and-tricks.md @@ -0,0 +1 @@ +# Tips & tricks diff --git a/manual/src/using-delta-on-windows.md b/manual/src/tips-and-tricks/using-delta-on-windows.md index a0d67a04..a0d67a04 100644 --- a/manual/src/using-delta-on-windows.md +++ b/manual/src/tips-and-tricks/using-delta-on-windows.md diff --git a/manual/src/using-delta-with-gnu-screen.md b/manual/src/tips-and-tricks/using-delta-with-gnu-screen.md index 918e8733..918e8733 100644 --- a/manual/src/using-delta-with-gnu-screen.md +++ b/manual/src/tips-and-tricks/using-delta-with-gnu-screen.md diff --git a/manual/src/using-delta-with-magit.md b/manual/src/tips-and-tricks/using-delta-with-magit.md index 5ad2d03c..5ad2d03c 100644 --- a/manual/src/using-delta-with-magit.md +++ b/manual/src/tips-and-tricks/using-delta-with-magit.md diff --git a/manual/src/using-delta-with-tmux.md b/manual/src/tips-and-tricks/using-delta-with-tmux.md index 5367395c..5df79ab4 100644 --- a/manual/src/using-delta-with-tmux.md +++ b/manual/src/tips-and-tricks/using-delta-with-tmux.md @@ -1,3 +1,5 @@ +# Using Delta with tmux + If you're using tmux, it's worth checking that 24 bit color is working correctly. For example, run a color test script like [this one](https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh), or one of the others listed [here](https://gist.github.com/XVilka/8346728). If you do not see smooth color gradients, see the discussion at [tmux#696](https://github.com/tmux/tmux/issues/696). The short version is you need something like this in your `~/.tmux.conf`: ```Shell |