diff --git a/README.md b/README.md index 37678011..1e551df0 100644 --- a/README.md +++ b/README.md @@ -490,6 +490,19 @@ and the `GitHub` theme when in the _light mode_. alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)" ``` +### Syntax of a file + +You can configure `bat` to change the default syntax of the file using `--map-syntax`. + +For example: +```bash +# Use INI syntax for .conf files +--map-syntax "*.conf:INI" + +# Use ".gitignore"-style highlighting for ".ignore" files +--map-syntax ".ignore:Git Ignore" +``` + ## Configuration file `bat` can also be customized with a configuration file. The location of the file is dependent @@ -528,19 +541,6 @@ Example configuration file: --map-syntax "*.ino:C++" ``` -### Syntax of a file - -`bat` can be configured to change the default syntax of the file using `--map-syntax`. For example not all `.conf` file's have `INI` syntax(some do) so it cannot be default. But you can configure it if you want. - -For example: -```bash -# Use INI syntax for .conf files ---map-syntax "*.conf:INI" - -# Use ".gitignore"-style highlighting for ".ignore" files ---map-syntax ".ignore:Git Ignore" -``` - ## Using `bat` on Windows `bat` mostly works out-of-the-box on Windows, but a few features may need extra configuration.