on master help sign in
fix section
commitaa00e0a6b0d31072a5a6eea54d663d64ec48bb14 authorhenil <dedaniahenil@gmail.com> dateSun 4 Oct 2020, 01:20 (6 years ago) parentbb7fae7
1 file changed+13−13
README.md+13−13
README.md+13−13
@@ -490,6 +490,19 @@ and the `GitHub` theme when in the _light mode_.
490490alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)"
491491```
492492
493+### Syntax of a file
494+
495+You can configure `bat` to change the default syntax of the file using `--map-syntax`.
496+
497+For example:
498+```bash
499+# Use INI syntax for .conf files
500+--map-syntax "*.conf:INI"
501+
502+# Use ".gitignore"-style highlighting for ".ignore" files
503+--map-syntax ".ignore:Git Ignore"
504+```
505+
493506## Configuration file
494507
495508`bat` can also be customized with a configuration file. The location of the file is dependent
@@ -528,19 +541,6 @@ Example configuration file:
528541--map-syntax "*.ino:C++"
529542```
530543
531−### Syntax of a file
532−
533−`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.
534−
535−For example:
536−```bash
537−# Use INI syntax for .conf files
538−--map-syntax "*.conf:INI"
539−
540−# Use ".gitignore"-style highlighting for ".ignore" files
541−--map-syntax ".ignore:Git Ignore"
542−```
543−
544544## Using `bat` on Windows
545545
546546`bat` mostly works out-of-the-box on Windows, but a few features may need extra configuration.