1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-01 10:52:24 +01:00

Merge pull request #3381 from CalebLarsen/update-docs

docs: added minor theming documentation notes
This commit is contained in:
Keith Hall
2025-08-22 07:12:17 +03:00
committed by GitHub

View File

@@ -503,8 +503,9 @@ bat --completion <shell>
### Highlighting theme
Use `bat --list-themes` to get a list of all available themes for syntax
highlighting. To select the `TwoDark` theme, call `bat` with the
`--theme=TwoDark` option or set the `BAT_THEME` environment variable to
highlighting. By default, `bat` uses `Monokai Extended` or `Monokai Extended Light`
for dark and light themes respectively. To select the `TwoDark` theme, call `bat`
with the `--theme=TwoDark` option or set the `BAT_THEME` environment variable to
`TwoDark`. Use `export BAT_THEME="TwoDark"` in your shell's startup file to
make the change permanent. Alternatively, use `bat`'s
[configuration file](#configuration-file).
@@ -605,6 +606,8 @@ syntax:
### Adding new themes
This works very similar to how we add new syntax definitions.
> [!NOTE]
> Themes are stored in [`.tmTheme` files](https://www.sublimetext.com/docs/color_schemes_tmtheme.html).
First, create a folder with the new syntax highlighting themes:
```bash
@@ -619,6 +622,8 @@ bat cache --build
```
Finally, use `bat --list-themes` to check if the new themes are available.
> [!NOTE]
> `bat` uses the name of the `.tmTheme` file for the theme's name.
### Adding or changing file type associations