Skip to content

Commit

Permalink
Tips and tricks manual section (dandavison#1339)
Browse files Browse the repository at this point in the history
* Add Tips & tricks section to manual

* Clean up manual

* Reorganize Tips & tricks
  • Loading branch information
dandavison committed Mar 9, 2023
1 parent cf683c8 commit ffec84e
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 31 deletions.
15 changes: 8 additions & 7 deletions manual/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion manual/src/delta-configs-used-in-screenshots.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
23 changes: 0 additions & 23 deletions manual/src/side-by-side-view-1.md

This file was deleted.

File renamed without changes.
14 changes: 14 additions & 0 deletions manual/src/tips-and-tricks/export-to-html.md
Original file line number Diff line number Diff line change
@@ -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.
File renamed without changes.
1 change: 1 addition & 0 deletions manual/src/tips-and-tricks/tips-and-tricks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Tips & tricks
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit ffec84e

Please sign in to comment.