1
0
mirror of https://github.com/sharkdp/bat synced 2026-08-03 18:51:44 +00:00

Compare commits

...

738 Commits

Author SHA1 Message Date
sharkdp 28af18ba27 Bump version to 0.15.2 2020-05-25 17:27:27 +02:00
sharkdp 8f1babf346 Mark 'vcs_modification_markers' as deprecated 2020-05-25 11:51:10 +02:00
sharkdp fa25695b74 Make 'vcs_modification_markers' change non-breaking 2020-05-25 11:51:10 +02:00
sharkdp 943b1f82b6 Fix syntax detection for symlinks
closes #1001
2020-05-24 17:32:43 +02:00
sharkdp b7a09516e7 Update CHANGELOG 2020-05-24 11:30:10 +02:00
sharkdp c4031ad65c Fix syntax detection for files called 'rails'
closes #1008
2020-05-24 11:27:42 +02:00
dependabot-preview[bot] 2eaced4d30 Bump wild from 2.0.2 to 2.0.3
Bumps [wild](https://gitlab.com/kornelski/wild) from 2.0.2 to 2.0.3.
- [Release notes](https://gitlab.com/kornelski/wild/tags)
- [Commits](https://gitlab.com/kornelski/wild/commits/master)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-24 10:51:02 +02:00
dependabot-preview[bot] bdea2fe94c Bump serde from 1.0.106 to 1.0.110
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.106 to 1.0.110.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.106...v1.0.110)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-24 10:50:48 +02:00
dependabot-preview[bot] c96ff30876 Bump serde_yaml from 0.8.11 to 0.8.12
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.8.11 to 0.8.12.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.8.11...0.8.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-24 10:48:31 +02:00
dependabot-preview[bot] 4c100cffdb Bump shell-words from 0.1.0 to 1.0.0
Bumps [shell-words](https://github.com/tmiasko/shell-words) from 0.1.0 to 1.0.0.
- [Release notes](https://github.com/tmiasko/shell-words/releases)
- [Commits](https://github.com/tmiasko/shell-words/commits/v1.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-24 10:41:50 +02:00
sharkdp d6abad908a Update README and CHANGELOG, see #650 2020-05-24 10:01:53 +02:00
dependabot-preview[bot] f1129189ea Bump syntect from 4.1.1 to 4.2.0
Bumps [syntect](https://github.com/trishume/syntect) from 4.1.1 to 4.2.0.
- [Release notes](https://github.com/trishume/syntect/releases)
- [Changelog](https://github.com/trishume/syntect/blob/master/CHANGELOG.md)
- [Commits](https://github.com/trishume/syntect/compare/v4.1.1...v4.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-24 10:00:15 +02:00
sharkdp 7e84477408 Add CHANGELOG entry 2020-05-19 06:40:24 +02:00
sharkdp 6b86ab5cd0 Move syntax to 02_Extra folder 2020-05-19 06:40:24 +02:00
Cooper Pierce 5074b96cd5 Add syntax highlighting for SML
Converted from
https://github.com/seanjames777/SML-Language-Definition/blob/master/sml.tmLanguage
and removed `ml` filetype to fix an (assumed) possible conflict with
existing OCaml support.
2020-05-19 06:40:24 +02:00
sharkdp 3094ac90b7 Update CHANGELOG entry 2020-05-16 13:44:26 +02:00
Ethan P 35b6067496 Print error message when invalid syntax is specified 2020-05-16 13:44:26 +02:00
Ethan P 5aa20c090b Refactor HighlightingAssets::get_syntax to return Result type 2020-05-16 13:44:26 +02:00
Ethan P 9c371ed8a2 Merge pull request #997 from eth-p/misc-fixes-1
Allow 'bat' application to built without git feature, remove PrettyPrint git support when feature not enabled.
2020-05-15 16:41:13 -07:00
Ethan P f03ab11623 Update CHANGELOG.md 2020-05-15 14:03:04 -07:00
Ethan P 887e61a99d Allow application to be built without git support
Caveats:
The help descriptions aren't changed with you remove the "git" feature.
2020-05-15 13:58:48 -07:00
Ethan P 0aca8cab0b Remove vcs_modification_markers from PrettyPrinter 'git' feature disabled 2020-05-15 13:58:48 -07:00
Ethan P d08d1f8c45 Merge pull request #985 from eth-p/string-input
Unify syntax detection for all variants of InputKind, fix #983
2020-05-15 13:57:44 -07:00
Ethan P 403ab6e443 Update CHANGELOG.md 2020-05-15 13:23:24 -07:00
Ethan P b8687bc969 Merge branch 'master' of github.com:sharkdp/bat into string-input 2020-05-15 13:22:24 -07:00
Ethan P 9166c9dd35 Remove unnecessary clone in integration tests 2020-05-15 12:29:01 -07:00
Ethan P cc52f79e42 Add helper fn for checking if opened input is theme preview file 2020-05-15 12:20:20 -07:00
Ethan P 59140b458c Consolidate syntax detection behavior for all InputKind types 2020-05-13 02:53:30 -07:00
Ethan P 82981c9663 Add regression test for detected syntax differing for stdin and files 2020-05-13 02:53:19 -07:00
Ethan P 157b8dd848 Rename test for checking if inputkinds are consistent 2020-05-13 00:47:18 -07:00
Ethan P 1fb669ae1a Test that OrdinaryFile consistent with CustomReader 2020-05-13 00:38:56 -07:00
Ethan P 7d07aa395a Change assets.rs tests to use InputKind::CustomReader
This should avoid errors in filesystems that don't
support UTF-8 or invalid UTF-8.
2020-05-13 00:38:41 -07:00
dependabot-preview[bot] c2c7070712 Bump assets/syntaxes/02_Extra/Julia from 0ca4cc2 to 6c0d770
Bumps [assets/syntaxes/02_Extra/Julia](https://github.com/JuliaEditorSupport/Julia-sublime) from `0ca4cc2` to `6c0d770`.
- [Release notes](https://github.com/JuliaEditorSupport/Julia-sublime/releases)
- [Commits](https://github.com/JuliaEditorSupport/Julia-sublime/compare/0ca4cc29907e9476cb603fed00d1d5fd9dc13c9c...6c0d770fc74e6bc037c70cae1f94fe113b60fd95)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-13 08:31:26 +02:00
dependabot-preview[bot] daf06bb026 Bump assets/syntaxes/02_Extra/Email from fc034fb to ee3e68f
Bumps [assets/syntaxes/02_Extra/Email](https://github.com/mariozaizar/email.sublime-syntax) from `fc034fb` to `ee3e68f`.
- [Release notes](https://github.com/mariozaizar/email.sublime-syntax/releases)
- [Commits](https://github.com/mariozaizar/email.sublime-syntax/compare/fc034fb85ae8a277627f1148769924dbc115dbe4...ee3e68fce26cb7ab6ad8c8bf7ca45cfe2a70c07a)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-13 08:22:27 +02:00
dependabot-preview[bot] 5b11b1ba47 Bump assets/themes/onehalf from fdcbffe to 970abdf
Bumps [assets/themes/onehalf](https://github.com/sonph/onehalf) from `fdcbffe` to `970abdf`.
- [Release notes](https://github.com/sonph/onehalf/releases)
- [Commits](https://github.com/sonph/onehalf/compare/fdcbffe3175c29bb78d19dcaf9b2a456482fcf1e...970abdf26b399100cbb59c6b6e693c4ff877c59d)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-13 08:22:13 +02:00
sharkdp ee287447c5 Update CHANGELOG 2020-05-13 08:21:58 +02:00
dependabot-preview[bot] 257f978ceb Bump assets/syntaxes/02_Extra/ssh-config from 16e19d5 to 3ec06d0
Bumps [assets/syntaxes/02_Extra/ssh-config](https://github.com/robballou/sublimetext-sshconfig) from `16e19d5` to `3ec06d0`.
- [Release notes](https://github.com/robballou/sublimetext-sshconfig/releases)
- [Commits](https://github.com/robballou/sublimetext-sshconfig/compare/16e19d5da48a7c4d30fdded8ac4c97ff643f5d7b...3ec06d0e9c2d20e7bb31f0149364d25f77503d97)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-13 08:19:17 +02:00
dependabot-preview[bot] 8e803bdb02 Bump assets/themes/dracula-sublime from 811a634 to 26c57ec
Bumps [assets/themes/dracula-sublime](https://github.com/dracula/sublime) from `811a634` to `26c57ec`.
- [Release notes](https://github.com/dracula/sublime/releases)
- [Commits](https://github.com/dracula/sublime/compare/811a634420a0cb9023bb7afd1c8968a5aaf6a753...26c57ec282abcaa76e57e055f38432bd827ac34e)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-13 07:58:49 +02:00
dependabot-preview[bot] a265242e6e Bump assets/themes/Solarized from 87e0109 to 3707f68
Bumps [assets/themes/Solarized](https://github.com/braver/Solarized) from `87e0109` to `3707f68`.
- [Release notes](https://github.com/braver/Solarized/releases)
- [Commits](https://github.com/braver/Solarized/compare/87e01090cf5fb821a234265b3138426ae84900e7...3707f68ddc535723c02c65cbc97187c1aa99ad4d)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-13 07:58:32 +02:00
dependabot-preview[bot] 3aa9b31bda Bump assets/syntaxes/02_Extra/Elm from dfbb8bd to e266d27
Bumps [assets/syntaxes/02_Extra/Elm](https://github.com/elm-community/SublimeElmLanguageSupport) from `dfbb8bd` to `e266d27`.
- [Release notes](https://github.com/elm-community/SublimeElmLanguageSupport/releases)
- [Commits](https://github.com/elm-community/SublimeElmLanguageSupport/compare/dfbb8bdc9a8403092c884d3eb893a270538cfa72...e266d279c8074aa342f106554cfa87ebe839a782)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-13 07:58:15 +02:00
dependabot-preview[bot] c692c4770a Bump assets/syntaxes/02_Extra/Elixir from 89b3bad to 1f010d5
Bumps [assets/syntaxes/02_Extra/Elixir](https://github.com/princemaple/elixir-sublime-syntax) from `89b3bad` to `1f010d5`.
- [Release notes](https://github.com/princemaple/elixir-sublime-syntax/releases)
- [Commits](https://github.com/princemaple/elixir-sublime-syntax/compare/89b3bada3262bc58e0a5393d12a82f725d5063ad...1f010d5f63f20aa8eafa57aaaeafe736e0748dca)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-13 07:58:02 +02:00
sharkdp 6ceba56288 Add 'mkdir -p …' to Ubuntu instructions, see #982 2020-05-12 18:35:35 +02:00
David Peter 4be66f8b88 Update README.md 2020-05-12 17:42:52 +02:00
David Peter 54a85d98f1 Add instructions for ~/.local/bin/bat symlink 2020-05-12 17:41:15 +02:00
Prat T 491a5a17f3 Update CHANGELOG 2020-05-12 16:37:29 +02:00
Prat T b3373398e8 Remove padding if the header style is not enabled 2020-05-12 16:37:29 +02:00
Prat T 0040fef215 Add padding above headers when no grid 2020-05-12 16:37:29 +02:00
Ethan P 1a6e8d297f Update README to mention batcat for Debian/Ubuntu 2020-05-12 11:08:21 +02:00
Ethan P f39487fca9 Make syntax detection more consistent for Reader and File inputs 2020-05-11 19:44:09 -07:00
sharkdp 2596bfe7a7 Bump version to v0.15.1 2020-05-11 20:30:45 +02:00
sharkdp 406bffa8c8 Update syntaxes and themes 2020-05-11 20:29:49 +02:00
sharkdp 48441b99ef Patch Markdown syntax
closes #963
see #977
2020-05-11 20:22:50 +02:00
sharkdp ce4717144a Update CHANGELOG 2020-05-11 19:33:13 +02:00
Mitchell Kember f59d00d4c7 Fix base16, and combine 00 and 0f alpha encodings
This changes the base16 theme back from #RRGGBB0f to #RRGGBB00,
reverting part of #934. That PR used the 0f encoding to produce ANSI
escape sequences 30-37 and 40-47 rather than 38;5 and 48;5 which require
256-color support. Unfortunately, it resulted in base16 using the wrong
colors becuase ansi_term does not support the bright variants (90-97 and
100-107) so it simply mapped them to the non-bright colors.

This PR makes combines the 00 and 0f alpha encodings into 00, and makes
them use the Color enum for the first 8 colors and Fixed otherwise. This
means the ansi-light and ansi-dark themes will work on terminals without
256-color support, and base16 will render bright colors correctly.
2020-05-11 19:29:19 +02:00
Ethan P dcfdbf82dd Do not warn if both 'bat' and 'batcat' are available in info.sh 2020-05-02 10:39:58 +02:00
Ethan P 0cb884d501 Prevent batcat warning from being in output of info.sh 2020-05-02 10:39:58 +02:00
Ethan P 7bc4020a92 Check for 'batcat' in info.sh 2020-05-02 10:39:58 +02:00
sharkdp 0792195156 Properly add QML submodule 2020-05-01 10:24:19 +02:00
dependabot-preview[bot] 83f24ffcfb Bump git2 from 0.13.3 to 0.13.5
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.3 to 0.13.5.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.3...0.13.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-01 10:21:19 +02:00
pylipp 74ec390770 Add QML syntax
QML.sublime-syntax file generated from Support/QML.tmLanguage using
Sublime's built-in converter.
Fix sharkdp/bat#962
2020-04-30 09:59:14 +02:00
Mario Zaizar 9014ffcfd8 Adds Email (https://github.com/mariozaizar/email.sublime-syntax) 2020-04-29 19:38:39 +02:00
sharkdp 81af375289 Use console 0.11.2, see #955 2020-04-28 21:18:48 +02:00
sharkdp d707eab95c Revert "Use console 0.11.1, see #955"
This reverts commit d64c55ef11.
The build on Windows failed due to two broken tests:

    line_numbers
    tabs_numbers
2020-04-28 09:22:19 +02:00
sharkdp d64c55ef11 Use console 0.11.1, see #955 2020-04-28 00:00:59 +02:00
sharkdp 2b1d53fb27 Add '--locked' flag to all 'cargo install' commands 2020-04-27 23:43:18 +02:00
sharkdp bf696f58c8 Pin version of console to 0.10.0 2020-04-27 23:37:06 +02:00
sharkdp 296bad8ffd Update CHANGELOG 2020-04-27 22:01:41 +02:00
sharkdp 94310af30c Add Fortran syntax, closes #957 2020-04-27 21:45:36 +02:00
sharkdp 38c096bf79 Update CHANGELOG 2020-04-25 15:19:42 +02:00
sharkdp 696d1b3ed3 Update CHANGELOG 2020-04-25 13:17:07 +02:00
sharkdp 17d98724a5 Bump version to v0.15.0 2020-04-25 13:09:24 +02:00
sharkdp 7d7ee1b594 Update cached verison of themes 2020-04-25 13:08:30 +02:00
sharkdp 682b4209f2 Update solarized themes to braver/Solarized, closes #941 2020-04-25 13:08:30 +02:00
sharkdp 41ddcbd240 Remove old Sublime themes 2020-04-25 13:08:30 +02:00
sharkdp 48a7ce3bf2 Write error messages to pager, if attached
closes #946
2020-04-25 13:08:00 +02:00
Lzu Tao 3bcc4d0d55 lto=true and codegen-units=1 together 2020-04-24 17:39:25 +02:00
Lzu Tao 8821bca656 appveyor: Use rustup minimal profile 2020-04-24 17:39:25 +02:00
Lzu Tao 56111aa20d simplify build.rs 2020-04-24 17:39:25 +02:00
sharkdp 5fe8a8342b Add annotations again 2020-04-24 16:51:11 +02:00
sharkdp 989109145a Add '-d' for '--diff' 2020-04-24 16:12:38 +02:00
sharkdp 23afc8e90c Skip non-file inputs when using --diff 2020-04-24 16:12:38 +02:00
sharkdp 8e18786556 Run 'cargo fmt' 2020-04-24 16:11:05 +02:00
sharkdp 81488adf8b Use unreachable!(…) 2020-04-24 16:11:05 +02:00
Lzu Tao e37e9c1214 Fix some clippy lints
Some might actually improve perf
2020-04-24 16:11:05 +02:00
Lzu Tao a4828387c1 simplify build.rs 2020-04-24 16:11:05 +02:00
sharkdp abeac8b12e Bump min. required Rust version to 1.40 2020-04-24 09:57:57 +02:00
sharkdp 82e7786e74 Implementation of 'bat --diff'
This adds a new `--diff` option that can be used to only show lines
close to Git changes (added/removed/modified lines). The amount of
additional context can be controlled with `--diff-context=N`.

closes #23
2020-04-24 09:57:57 +02:00
sharkdp 0064321323 cargo fmt 2020-04-23 00:56:35 +02:00
sharkdp 9e622a1a5f Update version in README 2020-04-23 00:56:27 +02:00
sharkdp 59ca933aee Update dependencies 2020-04-22 23:59:35 +02:00
sharkdp 793af6b911 Add a syntax mapping for bats own config file 2020-04-22 23:58:41 +02:00
sharkdp c8abe3f235 Update CHANGELOG 2020-04-22 23:56:20 +02:00
sharkdp 5d71056209 Fix import in app 2020-04-22 23:55:28 +02:00
sharkdp eb7d4d002a Update documentation 2020-04-22 23:55:28 +02:00
sharkdp 62b32bd848 Make module private 2020-04-22 23:55:28 +02:00
sharkdp 8961f7aef8 Move PagingMode to separate module 2020-04-22 23:55:28 +02:00
sharkdp 17f3a3b95d Simpler highlight method 2020-04-22 23:55:28 +02:00
sharkdp 261a7ea154 Add *_with_name methods 2020-04-22 23:55:28 +02:00
sharkdp 53a973e9dd Add syntaxes and themes method 2020-04-22 23:55:28 +02:00
sharkdp cba9df746e Add paging to advanced example 2020-04-22 23:55:28 +02:00
sharkdp 12eee0c590 Fix warnings for --no-default-features mode 2020-04-22 23:55:28 +02:00
sharkdp b76f5e72d4 Use unwrap 2020-04-22 23:55:28 +02:00
sharkdp 702cb198da Rename error module 2020-04-22 23:55:28 +02:00
sharkdp 5f826419d1 Add YAML example 2020-04-22 23:55:28 +02:00
sharkdp 13f671b499 Update examples 2020-04-22 23:55:28 +02:00
sharkdp 49f4322054 Fix example 2020-04-22 23:55:28 +02:00
sharkdp 0c9e044e41 Update 'cat' example 2020-04-22 23:55:28 +02:00
sharkdp 74d4377ed2 Add advanced example 2020-04-22 23:55:28 +02:00
sharkdp 6a124591df Easier configuration of style components 2020-04-22 23:55:28 +02:00
sharkdp 7a87315b94 Fix #937 2020-04-22 23:55:28 +02:00
sharkdp 0cde4e9121 Numbers => LineNumbers 2020-04-22 23:55:28 +02:00
sharkdp 36dde9275a Simplify style_components 2020-04-22 23:55:28 +02:00
sharkdp a8f759c080 Rename wrap => wrapping 2020-04-22 23:55:28 +02:00
sharkdp f034be71e7 rename run => print 2020-04-22 23:55:28 +02:00
sharkdp eee35e54e9 Update documentation 2020-04-22 23:55:28 +02:00
sharkdp ec0ce05455 Better API for highlighting lines 2020-04-22 23:55:28 +02:00
sharkdp 13e6b3fac7 Reduce public API 2020-04-22 23:55:28 +02:00
sharkdp 26c951fec4 Fix warnings, sort imports, input from string 2020-04-22 23:55:28 +02:00
sharkdp 590960f7f5 Completely refactor 'input' module 2020-04-22 23:55:28 +02:00
sharkdp b4d54106fe Fix comment 2020-04-22 23:55:28 +02:00
sharkdp f3b90ddb38 Add InputDescription 2020-04-22 23:55:28 +02:00
sharkdp 3bacfc5184 Allow fluent style 2020-04-22 23:55:28 +02:00
sharkdp f8d0956893 Rename InputFile => Input 2020-04-22 23:55:28 +02:00
sharkdp 1dc328ad49 Separate inputs from config 2020-04-22 23:55:28 +02:00
sharkdp 5e5cb89da6 Add all builder options 2020-04-22 23:55:28 +02:00
sharkdp 057e4eced1 Large refactoring towards a better builder structure 2020-04-22 23:55:28 +02:00
sharkdp 27974616bf Initial verison of PrettyPrinter builder 2020-04-22 23:55:28 +02:00
sharkdp 319ab779ee Use 4-bit ANSI codes for base16 theme
closes #865
2020-04-22 10:22:11 +02:00
Brice Dutheil 37831cdcb3 Fix README phrasing about dark mode 2020-04-21 22:37:24 +02:00
sharkdp 70480ee9d4 Bump version to v0.14.0 2020-04-21 18:21:22 +02:00
sharkdp 371c929ede Update CHANGELOG 2020-04-21 18:21:12 +02:00
sharkdp 864656bd11 Pass --no-init on Windows if less version < 559
We used to call `less` with
``` bash
less --RAW-CONTROL-CHARS --quit-if-one-screen --no-init
```
We only passed `--no-init` because there was a bug with previous versions
of `less` which required the use of `--no-init` in combination with
`--quit-if-one-screen` to prevent this "no output" issue from happening.

Since bat 0.13, [we omit the `--no-init` option](https://github.com/sharkdp/bat/blob/0ecc94956b88beed27ca13a130c8ba09f1a220d8/src/output.rs#L85-L97)
if we can detect that the version of `less` is higher than or equal to 530. We
did that because `--no-init` breaks mouse support and because [less 530 fixed
the above-mentioned bug](http://www.greenwoodsoftware.com/less/news.530.html).
However, it seems that this bug was *not* fixed on Windows!

According to @gwsw, the issue should be fixed with less 559 on Windows.

closes #887
2020-04-21 18:18:03 +02:00
sharkdp 2e9cf63a5f Fix compilation of library 2020-04-21 18:14:31 +02:00
sharkdp 886b22e0ee Do not store metadata.yaml file in git 2020-04-21 18:14:31 +02:00
sharkdp 72618db179 Add metadata information to cached assets
When saving/reading user-provided syntaxes or themes, `bat` will now maintain a
`metadata.yaml` file which includes information about the `bat` version which was
used to create the cached files. When loading cached files, we now print an error
if they have been created with an incompatible version

closes #882
2020-04-21 18:14:31 +02:00
sharkdp c8273369cc Make get_cache_dir private 2020-04-21 18:14:31 +02:00
sharkdp 95a56a2795 Typo in CHANGELOG 2020-04-21 17:49:36 +02:00
sharkdp 859ff50766 Update default config file, add comment about tmux mouse scrolling support 2020-04-21 17:45:14 +02:00
sharkdp ce583eb9bf Revert "Pass '--mouse' to less versions >= 551"
This reverts commit cb21b74ecd.
2020-04-21 17:29:01 +02:00
sharkdp 3a195be14e Revert "Only enable --mouse when running from tmux, see #904"
This reverts commit 5f6e310152.
2020-04-21 17:28:37 +02:00
sharkdp 5f6e310152 Only enable --mouse when running from tmux, see #904 2020-04-21 16:15:02 +02:00
sharkdp 5449472f15 Remove invalid UTF-8 file from repo, use temp file instead 2020-04-21 16:02:28 +02:00
sharkdp 82e20bfe14 Fix bug for file with invalid-utf8 filenames 2020-04-21 14:09:18 +02:00
sharkdp 47abb192bc Patch Rust syntax file
closes #924
2020-04-21 13:45:26 +02:00
sharkdp 03a7d6be92 Disable Travis caching 2020-04-21 13:44:51 +02:00
sharkdp a927815292 Update CHANGELOG 2020-04-21 11:50:26 +02:00
sharkdp 3447a03433 Update dependencies 2020-04-21 11:50:26 +02:00
sharkdp 03c2281828 Add do-not-panic! regression tests 2020-04-21 11:50:26 +02:00
sharkdp c386cb35fb Pass '--mouse' to less versions >= 551
When using `less` version 551 or newer, `bat` will now pass the `--mouse` argument, allowing
for (better) mouse scrolling support in some terminals.

closes #904
2020-04-21 10:00:32 +02:00
sharkdp 97ea3dd4dc Update CHANGELOG 2020-04-21 08:58:38 +02:00
sharkdp a6d9d1551f Improve error message 2020-04-21 08:57:15 +02:00
sharkdp 34619a2e89 Small refactoring, handle invalid UTF-8 filenames 2020-04-21 08:57:15 +02:00
Kyle Criddle 83d408bab3 Extract common syntax functionality to helper fns 2020-04-21 08:57:15 +02:00
sharkdp 8067fd9eda Fix build on 1.37 2020-04-21 08:57:15 +02:00
sharkdp 98ba9e0101 Use to_string_lossy 2020-04-21 08:57:15 +02:00
sharkdp 1b8ce60054 Pass stdin as a generic BufRead, fix stdin tests 2020-04-21 08:57:15 +02:00
sharkdp d5a31dc2ec Remove commented-out code 2020-04-21 08:57:15 +02:00
sharkdp 051dd4ba87 Make filename method private 2020-04-21 08:57:15 +02:00
sharkdp 2ad1848859 Do not take optional as argument 2020-04-21 08:57:15 +02:00
sharkdp 90e7d2fe33 Rename field name, new constructors 2020-04-21 08:57:15 +02:00
Kyle Criddle 04fa84aea7 Moved user_provided_filename to be contained within OrdinaryFile struct 2020-04-21 08:57:15 +02:00
Kyle Criddle a3f8140fbe Use --file-name to detect syntax highlighting
Closes #891
2020-04-21 08:57:15 +02:00
Ethan P 96aedf6240 Add cat alias detection to info.sh (#911) 2020-04-21 08:33:44 +02:00
Michael Diamond 4cc2989fe9 Clarify the Ubuntu/Debian install instructions
A cursory reading of the existing text would lead a reader to think `bat`should be available on Debian, which isn't really true. Most users are not running Sid, so `bat` isn't yet available to them.
2020-04-17 14:10:08 +02:00
sharkdp 0ecc94956b Add performance patch for Makefile syntax
Thanks to @keith-hall!

closes #750
2020-04-13 10:38:22 +02:00
David Peter 61e47e0c13 Add Stylus syntax (#917)
closes #915
2020-04-12 19:42:36 +02:00
sharkdp f5145ef130 Move Rego syntax 2020-04-12 19:20:28 +02:00
sharkdp edd27645d0 Add a way to directly search for a pattern 2020-04-12 19:19:33 +02:00
sharkdp fc6f4f31dd Add documentation 2020-04-12 19:19:33 +02:00
sharkdp f2cef702a0 Add script to find slow-to-highlight files 2020-04-12 19:19:33 +02:00
sharkdp 8b3d54ce29 Update CHANGELOG 2020-04-11 23:55:27 +02:00
sharkdp 47a3721890 Add patch for C# syntax 2020-04-11 23:55:27 +02:00
sharkdp 495fab24a5 cargo fmt 2020-04-11 19:40:04 +02:00
sharkdp fccbe4f4f2 Add regex-onig feature to 'cargo check' tests 2020-04-11 10:33:53 +02:00
sharkdp 9793bb3938 Update to syntect 4.1, fancy-regex support 2020-04-11 10:33:53 +02:00
sharkdp 496dd29cb9 Add -i option for bash/zsh to output wrapper function 2020-04-09 09:20:03 +02:00
Ethan P 116d76a00f Reformat info.sh 2020-04-09 09:20:03 +02:00
Ethan P dd336e6fb2 Fix wrapper detection failing on non-English LANG in info.sh 2020-04-09 09:20:03 +02:00
Ethan P c33af3581a Fix missing shell '-i' option when checking for wrapper in info.sh 2020-04-09 09:20:03 +02:00
Ethan P 2f4ecf8fc5 Add zsh wrapper detection to info.sh 2020-04-09 09:20:03 +02:00
Ethan P e037afeaca Add custom theme/syntax detection to info.sh 2020-04-09 09:02:23 +02:00
sharkdp 7b87af1748 Update dependencies, closes #476 2020-04-08 09:31:50 +02:00
dependabot-preview[bot] 0eee26fb09 Bump assert_cmd from 0.12.0 to 1.0.1
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 0.12.0 to 1.0.1.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases)
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v0.12.0...v1.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-01 07:50:24 +02:00
sharkdp 3355aeba22 Update CHANGELOG 2020-03-31 09:33:58 +02:00
David Tolnay 42e3825daf Updates for review of PR 899 2020-03-31 09:27:56 +02:00
David Tolnay 014d754588 Move paging support behind a feature 2020-03-31 09:27:56 +02:00
David Tolnay 4e11abdf9b Move git changes support behind a feature 2020-03-31 09:27:56 +02:00
David Tolnay 570805bc98 Strip dependencies of bat-as-a-library 2020-03-31 09:27:56 +02:00
David Tolnay e7e1967bb0 Allow using bat-as-a-library with older syntect 2020-03-30 22:01:18 +02:00
sharkdp 9a050cd87f Update CHANGELOG 2020-03-27 07:33:56 +01:00
Patrick East d39507889a Add OPA Rego syntax
This adds syntax support for Rego, the declarative policy language
used by the Open Policy Agent:

https://github.com/open-policy-agent/opa

Generated from:

https://github.com/open-policy-agent/opa/blob/master/misc/syntax/textmate/Rego.tmLanguage

Using:

https://github.com/aziz/SublimeSyntaxConvertor

Signed-off-by: Patrick East <east.patrick@gmail.com>
2020-03-27 07:33:07 +01:00
sharkdp 3e8d444c78 Fix for Rust 1.37 2020-03-26 10:01:02 +01:00
sharkdp 522ab7a83c CHANGELOG: Add entries for upcoming release 2020-03-26 09:55:21 +01:00
David Peter 0c5b4fcd4a Add CHANGELOG to the repository 2020-03-26 09:55:21 +01:00
David Peter 37b3b8730d Merge pull request #871 from neuronull/fix_654_stdin_filename
Implement --file-name<name> option
2020-03-26 09:35:01 +01:00
Josh Mickley 7c50fe5fec Document the --generate-config-file option 2020-03-26 09:14:40 +01:00
Josh Mickley 40a827ebcb Graceful handling of error conditions 2020-03-26 09:14:40 +01:00
Josh Mickley 376c556862 Add option to generate a default config file, fixes #870 2020-03-26 09:14:40 +01:00
Kyle Criddle 83772bd2cf Minor --file-name code hygeine 2020-03-25 18:58:05 -06:00
Marco Ieni 4aef8c180a README: fix manpage syntax link 2020-03-25 20:07:50 +01:00
Kyle Criddle 131d113ff5 Merge branch 'fix_654_stdin_filename' of github.com:neuronull/bat into fix_654_stdin_filename 2020-03-24 19:14:07 -06:00
Kyle Criddle 38178fedf4 Merge branch 'master' into fix_654_stdin_filename 2020-03-24 19:08:43 -06:00
Kyle Criddle 59f2e2d58d Implemented --file-name for multiple files + tests 2020-03-24 18:26:00 -06:00
Samuel FORESTIER 8d3136eb6f Adds Homepage to Debian package control file 2020-03-24 08:36:13 +01:00
Igor Raits 136a745c5d chore: Update liquid to 0.20
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
2020-03-22 21:37:14 +01:00
sharkdp 5edd8260e8 Fix path to assets 2020-03-22 13:16:47 +01:00
sharkdp 02f2b55d5f Write completions and manfile to cargo outdir (cargo publish restriction) 2020-03-22 11:33:50 +01:00
sharkdp 6386a4b812 Update dependencies, see #845 2020-03-22 11:23:19 +01:00
sharkdp c13935f3c0 Bump version to 0.13, see #845 2020-03-22 11:23:16 +01:00
Kyle Criddle fb3c775c8b --file-name for normal files. integration tests. 2020-03-22 11:10:27 +01:00
Kyle Criddle 8adce9fae8 Implement --file-name<name> option
- can specify filename to be displayed when printing.
- useful for when piping data from STDIN

Closes #654
2020-03-22 11:10:27 +01:00
sharkdp eb2f3ddb7c Rename test methods 2020-03-22 11:02:51 +01:00
sharkdp dfd3ef022e Add more default mappings, reverse traversal 2020-03-22 11:02:51 +01:00
sharkdp 978def2d40 Update documentation 2020-03-22 11:02:51 +01:00
sharkdp 57aed07814 Use absolute path for lookup in database 2020-03-22 11:02:51 +01:00
sharkdp bd8a13dbc9 Initial implementation of glob-based syntax mapping 2020-03-22 11:02:51 +01:00
sharkdp ba29e07636 Remove superfluous files 2020-03-22 00:04:33 +01:00
sharkdp 32346612b7 Move syntaxes, fixes #874 2020-03-21 23:53:53 +01:00
sharkdp 0550a286bd Cargo fmt 2020-03-21 23:53:53 +01:00
sharkdp dfe5eb3e98 Add an even simple example 2020-03-21 22:21:23 +01:00
sharkdp 2c2861db6a Further simplify module structure 2020-03-21 22:21:23 +01:00
sharkdp bb0a3d586e Simplify public API module structure 2020-03-21 22:21:23 +01:00
sharkdp 90397a8aac Hide SyntaxMapping::replace 2020-03-21 22:21:23 +01:00
sharkdp 84ba323b1c Rename output component to 'style compinent', move wrap to separate module 2020-03-21 22:21:23 +01:00
sharkdp a8851e1307 Hide methods from line_range 2020-03-21 22:21:23 +01:00
sharkdp d4a39f99d2 Hide API of InputFileReader 2020-03-21 22:21:23 +01:00
sharkdp 8c500a7e40 Hide get_syntax, move tests to module 2020-03-21 22:21:23 +01:00
sharkdp acf51bd7b3 Rename methods and parameters 2020-03-21 22:21:23 +01:00
sharkdp 83dc13a86d Add fallback theme, remove BAT_THEME_DEFAULT 2020-03-21 22:21:23 +01:00
sharkdp 094c526a0e Hide some methods from HighlightingAssets 2020-03-21 22:21:23 +01:00
sharkdp 62f2d0c100 Do not export syntax_set and theme_set 2020-03-21 22:21:23 +01:00
sharkdp fc1ca0875a Move error handling to a callback 2020-03-21 22:21:23 +01:00
sharkdp a7338e2ea2 Run cargo fmt 2020-03-21 22:21:23 +01:00
sharkdp 9b8ddb24d1 move Config struct to separate file 2020-03-21 22:21:23 +01:00
sharkdp 7e0115641d Move error module to separate file 2020-03-21 22:21:23 +01:00
sharkdp fedd32173e Restructure and fix bug in line range module 2020-03-21 19:19:15 +01:00
sharkdp 4855a47105 Rename enum field 2020-03-21 19:19:15 +01:00
sharkdp 06b7be7ee9 Major restructuring of theme/syntax handling 2020-03-21 19:19:15 +01:00
Kyle Criddle cfa2cb6ec7 --file-name for normal files. integration tests. 2020-03-19 20:46:19 -06:00
Kyle Criddle b1b8addf7e remove unnecessary Some() 2020-03-18 17:03:03 +01:00
Kyle Criddle 4be5adc6f5 remove absolute path restraint from BAT_CACHE_PATH 2020-03-18 17:03:03 +01:00
Kyle Criddle a9a31dca7f Specify cache dir with BAT_CACHE_DIR
- if set, BAT_CACHE_DIR is used. otherwise use OS default.
2020-03-18 17:03:03 +01:00
Kyle Criddle 517be5c7bc Implement --file-name<name> option
- can specify filename to be displayed when printing.
- useful for when piping data from STDIN

Closes #654
2020-03-17 20:29:01 -06:00
sharkdp 9a9902bf9b Remove custom .github settings 2020-03-16 07:54:55 +01:00
sharkdp 4e40d4c720 Major update for the man page, closes #573 2020-03-15 23:15:30 +01:00
sharkdp 916c1e4359 Update assets 2020-03-15 22:33:26 +01:00
sharkdp 439be03634 Remove duplicate F# syntax 2020-03-15 22:33:26 +01:00
sharkdp b611d2aef4 Add no-duplicate-extensions unit test 2020-03-15 22:33:26 +01:00
sharkdp a2075b0f24 Update git dependency 2020-03-15 21:00:23 +01:00
sharkdp 3c1dd8558d Update links 2020-03-15 12:03:25 +01:00
sharkdp 17382d36b7 Update dependencies 2020-03-15 11:46:24 +01:00
cheese.cake 2e07aabb74 fix links 2020-03-15 10:38:45 +01:00
cheese.cake f525fb974e fix typo and broken links 2020-03-15 10:38:45 +01:00
cheese.cake edf62953c4 add README-ko.md 2020-03-15 10:38:45 +01:00
k-ta-yamada 260c5dcb75 fix: doc/README-ja.md
- Synchronized the contents of `README.md`.
- Fixed `README.md` to match the line number of text.
- Translated to Japanese.
- Fixed menu link anchor.
2020-03-11 22:36:09 +01:00
sharkdp 1bc62cd7b5 Add syntax detection unit tests 2020-03-11 10:08:11 +01:00
sharkdp b1183f72a5 Update to new assert_cmd 2020-03-09 21:30:46 +01:00
dependabot-preview[bot] a5e98146fb Bump assert_cmd from 0.11.1 to 0.12.0
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 0.11.1 to 0.12.0.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases)
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v0.11.1...v0.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-09 21:30:46 +01:00
dependabot-preview[bot] 6d32d3dbec Bump assert_cmd from 0.11.1 to 0.12.0
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 0.11.1 to 0.12.0.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases)
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v0.11.1...v0.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-09 21:30:46 +01:00
dependabot-preview[bot] c6bbca62ef Bump console from 0.9.2 to 0.10.0
Bumps [console](https://github.com/mitsuhiko/console) from 0.9.2 to 0.10.0.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-09 06:35:56 +01:00
sharkdp dd9755f223 Update dependencies 2020-03-06 23:54:58 +01:00
sharkdp 61e39158de Install fish completions into 'vendor_completions.d', fixes #651 2020-03-06 23:47:26 +01:00
dependabot-preview[bot] 65023a987e Bump assets/syntaxes/Packages from 71fd0ec to 759d6ee
Bumps [assets/syntaxes/Packages](https://github.com/sublimehq/Packages) from `71fd0ec` to `759d6ee`.
- [Release notes](https://github.com/sublimehq/Packages/releases)
- [Commits](https://github.com/sublimehq/Packages/compare/71fd0ec9e4b42c73e560d088a05ccc14ef0f54fc...759d6eed9b4beed87e602a23303a121c3a6c2fb3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-06 23:43:34 +01:00
sharkdp 91843f6f65 Update 'JavaScript (Babel).sublime-syntax' 2020-03-06 23:43:16 +01:00
dependabot-preview[bot] 696547b646 Bump assets/syntaxes/JavaScript (Babel) from a9a908f to f4579f9
Bumps [assets/syntaxes/JavaScript (Babel)](https://github.com/babel/babel-sublime) from `a9a908f` to `f4579f9`.
- [Release notes](https://github.com/babel/babel-sublime/releases)
- [Commits](https://github.com/babel/babel-sublime/compare/a9a908fe1d39ec84893e6edcbb146f09e9e60cc6...f4579f9107996c16208466248a85dc2296083a5f)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-06 23:43:16 +01:00
sharkdp 4d2682325b Update TypeScript.sublime-syntax 2020-03-06 23:40:53 +01:00
dependabot-preview[bot] 65811d9034 Bump assets/syntaxes/TypeScript from ab51614 to 9cd994a
Bumps [assets/syntaxes/TypeScript](https://github.com/Microsoft/TypeScript-Sublime-Plugin) from `ab51614` to `9cd994a`.
- [Release notes](https://github.com/Microsoft/TypeScript-Sublime-Plugin/releases)
- [Commits](https://github.com/Microsoft/TypeScript-Sublime-Plugin/compare/ab51614c07db60dd674d6d9905f74c03d1c35473...9cd994af73c58371a14dbe64fd69fcaa782bb321)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-06 23:40:53 +01:00
sharkdp f2b7c060a3 Add link to Choco package 2020-03-06 23:39:17 +01:00
sharkdp 08dd251b9c Update Windows install instructions 2020-03-06 23:38:07 +01:00
Anthony Cerruti d081473261 Update README.md 2020-03-06 23:38:07 +01:00
Anthony Cerruti 3901480c59 Move VC++ to Windows section 2020-03-06 23:38:07 +01:00
Anthony Cerruti 1cad3f56ec Explain how to fix no output issue
I just ran into this so I figured it might be helpful for others.
2020-03-06 23:38:07 +01:00
sharkdp 147503bd56 Add CoffeeScript syntax, closes #833 2020-03-06 23:29:08 +01:00
sharkdp d1b0e955ea Update dependencies 2020-03-06 23:29:08 +01:00
Pavel Aslanov 4021cf8128 Support combination of multiple styles at the same time
Old version of the code did not allowed for `bold italic` or `bold underline` styles
2020-03-04 23:28:53 +01:00
Ethan P 7155f76963 Merge pull request #854 from eth-p/master
Fix broken link in issue template.
2020-03-03 13:41:18 -08:00
Ethan P b63f31e15d Fix broken link in issue template. 2020-03-03 13:09:31 -08:00
dependabot-preview[bot] 9c3d8c4028 Bump assets/syntaxes/ssh-config from e84b78f to 16e19d5
Bumps [assets/syntaxes/ssh-config](https://github.com/robballou/sublimetext-sshconfig) from `e84b78f` to `16e19d5`.
- [Release notes](https://github.com/robballou/sublimetext-sshconfig/releases)
- [Commits](https://github.com/robballou/sublimetext-sshconfig/compare/e84b78f9f9d3dd4455fc7c085f8515ec7846d932...16e19d5da48a7c4d30fdded8ac4c97ff643f5d7b)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-01 11:00:18 +01:00
dependabot-preview[bot] d33b7071e3 Bump assets/syntaxes/GraphQL from 66ce871 to c9d8458
Bumps [assets/syntaxes/GraphQL](https://github.com/dncrews/GraphQL-SublimeText3) from `66ce871` to `c9d8458`.
- [Release notes](https://github.com/dncrews/GraphQL-SublimeText3/releases)
- [Commits](https://github.com/dncrews/GraphQL-SublimeText3/compare/66ce8713d8915e74a2822c6f052cc9d3449cde0d...c9d84587eb1a6eb34457a875f21b9b1a29306be3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-01 10:59:58 +01:00
sharkdp ca066bf7cd Run 'cargo fmt' 2020-02-28 10:27:06 +01:00
sharkdp 4ac3161c19 Rename label syntax-request 2020-02-28 09:47:27 +01:00
sharkdp d479e07bcb Rename label 2020-02-28 09:46:33 +01:00
sharkdp 369ba7bb0a Remove title prefix (we already have labels for that) 2020-02-28 09:39:38 +01:00
sharkdp 9df85edc4c Add 'question' template 2020-02-28 09:36:46 +01:00
David Peter d007caf39c Add simple "Feature request" template 2020-02-28 09:32:47 +01:00
sharkdp 7d453dfdc5 Simplify issue templates 2020-02-28 09:30:28 +01:00
Kogia-sima 60f48a0c91 Update test data
Avoid using existing text
2020-02-28 09:06:51 +01:00
Kogia-sima 25640a8a81 Fix bug where max_width is not initialized after line break 2020-02-28 09:06:51 +01:00
Kogia-sima 944866affd Fix wrapping method to support unicode text
Related issues:
- #787
- #811
2020-02-28 09:06:51 +01:00
Kogia-sima 22ded00824 Add test for unicode wrapping 2020-02-28 09:06:51 +01:00
Kogia-sima 85e84ab3eb Add unicode-width dependency 2020-02-28 09:06:51 +01:00
Ethan P 993b76654d Change bug_report template to accomodate info.sh output 2020-02-28 08:03:13 +01:00
Ethan P 2b2743b120 Change output format of info.sh to markdown 2020-02-28 08:03:13 +01:00
Ethan P f01263bcff Fix typo causing missing command warning in info.sh 2020-02-28 08:03:13 +01:00
Ethan P 8648b86a73 Add detection of a wrapper function to info.sh 2020-02-28 08:03:13 +01:00
Ethan P 39d9343a7d Change a word in bug_report.md 2020-02-28 08:03:13 +01:00
Ethan P 5faf7ca158 Change ISSUE_TEMPLATE files based on feedback in #837 2020-02-28 08:03:13 +01:00
Ethan P ebe475247c Change consent banner (and fix tput) in info.sh 2020-02-28 08:03:13 +01:00
Ethan P 63f6343cf1 Add issue templates 2020-02-28 08:03:13 +01:00
Ethan P ad42b275a9 Add script to use for diagnosing issues 2020-02-28 08:03:13 +01:00
Ethan P 2dac1c8785 Add @sharkdp's regression test for #798 2020-02-28 07:56:24 +01:00
Ethan P 1225e65299 Fix #798 2020-02-28 07:56:24 +01:00
sharkdp d1bb47d741 Bump min. required Rust version to 1.36 2020-02-27 23:09:03 +01:00
dependabot-preview[bot] f079c14068 Bump git2 from 0.11.0 to 0.12.0
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/git2-curl-0.11.0...git2-curl-0.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-27 23:09:03 +01:00
wt-l00 388f4c71fd Add ja-transration of Paging on Using bat on Windows 2020-02-27 21:51:50 +01:00
chaaaaarlotte b675e1bb61 Add Vue syntax 2020-02-25 20:12:33 +01:00
dependabot-preview[bot] f96220f33d Bump error-chain from 0.12.1 to 0.12.2
Bumps [error-chain](https://github.com/rust-lang-nursery/error-chain) from 0.12.1 to 0.12.2.
- [Release notes](https://github.com/rust-lang-nursery/error-chain/releases)
- [Changelog](https://github.com/rust-lang-nursery/error-chain/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang-nursery/error-chain/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-22 12:10:39 +01:00
dependabot-preview[bot] 6739230039 Bump assets/syntaxes/ssh-config from fcd4378 to e84b78f
Bumps [assets/syntaxes/ssh-config](https://github.com/robballou/sublimetext-sshconfig) from `fcd4378` to `e84b78f`.
- [Release notes](https://github.com/robballou/sublimetext-sshconfig/releases)
- [Commits](https://github.com/robballou/sublimetext-sshconfig/compare/fcd4378567e0b607109a8d301f19de61e0096900...e84b78f9f9d3dd4455fc7c085f8515ec7846d932)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-16 18:56:35 +01:00
dependabot-preview[bot] 710018b845 Bump assets/syntaxes/Fish from ad6a6ca to 2c254cc
Bumps [assets/syntaxes/Fish](https://github.com/Phidica/sublime-fish) from `ad6a6ca` to `2c254cc`.
- [Release notes](https://github.com/Phidica/sublime-fish/releases)
- [Commits](https://github.com/Phidica/sublime-fish/compare/ad6a6ca83c50570cefc121ad375f8ef63c26b1f4...2c254cc8512d53b7af306e4379fc9744ee5b4aee)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-16 18:44:27 +01:00
sharkdp 7779d9f622 Allow for non-unicode filenames, closes #225 2020-02-13 08:25:04 +01:00
dependabot-preview[bot] e98f34b1e8 Bump assets/syntaxes/LESS from 8cd08e3 to 3020993
Bumps [assets/syntaxes/LESS](https://github.com/danro/LESS-sublime) from `8cd08e3` to `3020993`.
- [Release notes](https://github.com/danro/LESS-sublime/releases)
- [Commits](https://github.com/danro/LESS-sublime/compare/8cd08e30e68a82f75c4d40806ae29fa071f674fe...302099365866daca49d25288111696a30a4b4e03)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 20:23:01 +01:00
dependabot-preview[bot] 9ace915d71 Bump assets/themes/dracula-sublime from c31934f to 811a634
Bumps [assets/themes/dracula-sublime](https://github.com/dracula/sublime) from `c31934f` to `811a634`.
- [Release notes](https://github.com/dracula/sublime/releases)
- [Commits](https://github.com/dracula/sublime/compare/c31934f43f3d0c3d62665c00e8587cc97d764ec1...811a634420a0cb9023bb7afd1c8968a5aaf6a753)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 19:54:04 +01:00
dependabot-preview[bot] e5c415555d Bump console from 0.9.1 to 0.9.2
Bumps [console](https://github.com/mitsuhiko/console) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/compare/0.9.1...0.9.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-27 06:56:43 +01:00
Liam Kalir 5ef1c6cce2 Grammar touch-ups, more descriptive error message for invalid line
ranges
2020-01-27 06:54:00 +01:00
Liam Kalir 93881d9a64 Adds range syntax for line highlights 2020-01-27 06:54:00 +01:00
dependabot-preview[bot] 87776ae07e Bump assets/syntaxes/TypeScript from 1d5160e to ab51614
Bumps [assets/syntaxes/TypeScript](https://github.com/Microsoft/TypeScript-Sublime-Plugin) from `1d5160e` to `ab51614`.
- [Release notes](https://github.com/Microsoft/TypeScript-Sublime-Plugin/releases)
- [Commits](https://github.com/Microsoft/TypeScript-Sublime-Plugin/compare/1d5160e8a1ab1e2804736b90a52f7661e04591a6...ab51614c07db60dd674d6d9905f74c03d1c35473)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-26 13:52:14 +01:00
dependabot-preview[bot] 6c71a4324b Bump assets/syntaxes/Terraform from c683495 to 64208ea
Bumps [assets/syntaxes/Terraform](https://github.com/alexlouden/Terraform.tmLanguage) from `c683495` to `64208ea`.
- [Release notes](https://github.com/alexlouden/Terraform.tmLanguage/releases)
- [Commits](https://github.com/alexlouden/Terraform.tmLanguage/compare/c683495c6414a172c58a39beaa952c822cbbcc84...64208ea816d940e4b9c93f4a6b67d64c02a09825)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-26 13:51:59 +01:00
Shun Sakai 90ee939671 Add information about the license to README files 2020-01-18 20:45:56 +01:00
Shun Sakai cae06bf649 Fix invalid link 2020-01-18 20:45:56 +01:00
Shun Sakai 89220da47b Update copyright year of the MIT License file 2020-01-18 20:45:56 +01:00
David Peter 903af3ee09 Show master state 2020-01-12 10:59:24 +01:00
dependabot-preview[bot] 0418e6294b Bump atty from 0.2.13 to 0.2.14
Bumps [atty](https://github.com/softprops/atty) from 0.2.13 to 0.2.14.
- [Release notes](https://github.com/softprops/atty/releases)
- [Changelog](https://github.com/softprops/atty/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/atty/compare/0.2.13...0.2.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-06 08:14:51 +01:00
sharkdp eabd100dad Simplify Travis caching 2020-01-04 16:02:57 +01:00
dependabot-preview[bot] f66a5bfa42 Bump assets/themes/dracula-sublime from 1d068cb to c31934f
Bumps [assets/themes/dracula-sublime](https://github.com/dracula/sublime) from `1d068cb` to `c31934f`.
- [Release notes](https://github.com/dracula/sublime/releases)
- [Commits](https://github.com/dracula/sublime/compare/1d068cb1ba6e5dc25524803c23810ce4b4920a9d...c31934f43f3d0c3d62665c00e8587cc97d764ec1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-27 18:34:13 +01:00
sharkdp 8d0b8a227b Add test for less 529 2019-12-23 13:01:14 +01:00
sharkdp e400ebd1bd Also pass '--no-init' if version could not be retrieved 2019-12-23 12:45:23 +01:00
sharkdp 6684c0b07a Remove example line from config file 2019-12-23 12:45:23 +01:00
sharkdp 6568d03924 Update README 2019-12-23 12:45:23 +01:00
sharkdp 67fe804256 Do not pass '--no-init' on newer less versions
With this change, we do not pass the `--no-init` option in newer
versions of less (530 or higher).

This fixes #749
2019-12-23 12:45:23 +01:00
sharkdp 126729f87a Enable LTO
closes #719
2019-12-22 16:46:55 +01:00
sharkdp 0aca27511a Add simple /proc/meminfo syntax, see #593 2019-12-22 16:25:39 +01:00
sharkdp 77ff853739 Add simple /proc/cpuinfo syntax, see #593 2019-12-22 16:22:32 +01:00
sharkdp 20ba984c6d Update help text, closes #713 2019-12-22 16:05:00 +01:00
fusillicode 6311ca22f9 Add check for terminal-width in output_wrap config value in not interactive case
Co-authored-by: allevo <tomallevi@gmail.com>
Co-authored-by: gildo <gildo.fiorito@gmail.com>
2019-12-22 15:20:34 +01:00
Ryota Kayanuma 41d547532f Fix '日本文' to '日本語' 2019-12-21 10:03:53 +01:00
dependabot-preview[bot] e9156f8090 Bump assets/syntaxes/SCSS_Sass from 0e8e0f9 to b98a3f3
Bumps [assets/syntaxes/SCSS_Sass](https://github.com/braver/SublimeSass) from `0e8e0f9` to `b98a3f3`.
- [Release notes](https://github.com/braver/SublimeSass/releases)
- [Commits](https://github.com/braver/SublimeSass/compare/0e8e0f9d2ffa56981fcb6a0beee3648e5e27c851...b98a3f3ccff0134c38544d9bc41caf7f61048cdf)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-20 17:57:16 +01:00
dependabot-preview[bot] 1eaa681c7e Bump assets/themes/dracula-sublime from b7e8961 to 1d068cb
Bumps [assets/themes/dracula-sublime](https://github.com/dracula/sublime) from `b7e8961` to `1d068cb`.
- [Release notes](https://github.com/dracula/sublime/releases)
- [Commits](https://github.com/dracula/sublime/compare/b7e8961afa4c11d620ad26abe28d76929c7ff90b...1d068cb1ba6e5dc25524803c23810ce4b4920a9d)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-20 17:57:02 +01:00
dependabot-preview[bot] d96ae099ef Bump assets/syntaxes/Elixir from 044d9af to 89b3bad
Bumps [assets/syntaxes/Elixir](https://github.com/princemaple/elixir-sublime-syntax) from `044d9af` to `89b3bad`.
- [Release notes](https://github.com/princemaple/elixir-sublime-syntax/releases)
- [Commits](https://github.com/princemaple/elixir-sublime-syntax/compare/044d9af8a1cc5c4da234e60f4a22ce8603b2d772...89b3bada3262bc58e0a5393d12a82f725d5063ad)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-20 17:56:33 +01:00
sharkdp 40e5befdc7 Minor change 2019-12-15 20:55:48 +01:00
Franco Victorio f94ff93953 Accept "default" as a theme 2019-12-15 20:55:48 +01:00
Mohamad Barbar 3523f60299 Leave blank lines blank terminal output.
Would add some ANSI colour codes previously.
2019-12-15 20:32:02 +01:00
Steve Huff 83dc8468b0 feat(theme): Solarized light and dark themes 2019-12-15 20:10:32 +01:00
dependabot-preview[bot] 826624c9fa Bump git2 from 0.10.2 to 0.11.0
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.10.2 to 0.11.0.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.10.2...git2-curl-0.11.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-15 19:30:34 +01:00
dependabot-preview[bot] 0fed098c53 Bump assets/syntaxes/LESS from 4eada94 to 8cd08e3
Bumps [assets/syntaxes/LESS](https://github.com/danro/LESS-sublime) from `4eada94` to `8cd08e3`.
- [Release notes](https://github.com/danro/LESS-sublime/releases)
- [Commits](https://github.com/danro/LESS-sublime/compare/4eada94009ae7185b1f518d3f4b0d4db2b2b217c...8cd08e30e68a82f75c4d40806ae29fa071f674fe)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-15 19:05:10 +01:00
dependabot-preview[bot] cc7eafb7fb Bump assets/syntaxes/TypeScript from 8bfce29 to 1d5160e
Bumps [assets/syntaxes/TypeScript](https://github.com/Microsoft/TypeScript-Sublime-Plugin) from `8bfce29` to `1d5160e`.
- [Release notes](https://github.com/Microsoft/TypeScript-Sublime-Plugin/releases)
- [Commits](https://github.com/Microsoft/TypeScript-Sublime-Plugin/compare/8bfce299be3b899e996663f8a27e2013bd2e65b8...1d5160e8a1ab1e2804736b90a52f7661e04591a6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-15 19:04:46 +01:00
dependabot-preview[bot] f35c41ba13 Bump assets/syntaxes/Fish from 0f7d31b to ad6a6ca
Bumps [assets/syntaxes/Fish](https://github.com/Phidica/sublime-fish) from `0f7d31b` to `ad6a6ca`.
- [Release notes](https://github.com/Phidica/sublime-fish/releases)
- [Commits](https://github.com/Phidica/sublime-fish/compare/0f7d31b43e260bb3c7fe3fbc9d8f0024c1b39cf4...ad6a6ca83c50570cefc121ad375f8ef63c26b1f4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-15 19:03:49 +01:00
dependabot-preview[bot] 1f4246eb3c Bump assets/syntaxes/ssh-config from 17e23d7 to fcd4378
Bumps [assets/syntaxes/ssh-config](https://github.com/robballou/sublimetext-sshconfig) from `17e23d7` to `fcd4378`.
- [Release notes](https://github.com/robballou/sublimetext-sshconfig/releases)
- [Commits](https://github.com/robballou/sublimetext-sshconfig/compare/17e23d7d38e5cf1c63e5c0242514965ffb080499...fcd4378567e0b607109a8d301f19de61e0096900)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-15 19:03:34 +01:00
dependabot-preview[bot] 9300392c43 Bump assets/themes/zenburn from b7f27e2 to cb746f6
Bumps [assets/themes/zenburn](https://github.com/colinta/zenburn) from `b7f27e2` to `cb746f6`.
- [Release notes](https://github.com/colinta/zenburn/releases)
- [Commits](https://github.com/colinta/zenburn/compare/b7f27e2f6567813991496b387fe902a3a2ef0747...cb746f69624e635f6f4d127fa9244658e690c34b)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-15 19:03:06 +01:00
sharkdp 8d3ce5f88a Manually convert PowerShell.sublime-syntax 2019-12-09 23:40:31 +01:00
dependabot-preview[bot] a1d18d8c8c Bump assets/syntaxes/PowerShell from 12b7d72 to 4a0a076
Bumps [assets/syntaxes/PowerShell](https://github.com/PowerShell/EditorSyntax) from `12b7d72` to `4a0a076`.
- [Release notes](https://github.com/PowerShell/EditorSyntax/releases)
- [Commits](https://github.com/PowerShell/EditorSyntax/compare/12b7d7257eb493e45a9af0af9094ec0c2a996712...4a0a076661d26473cac71b9a17e6a759e9b1c643)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-09 23:40:31 +01:00
sharkdp d43431d8f1 Manually convert Crystal.sublime-syntax 2019-12-09 23:39:07 +01:00
dependabot-preview[bot] 8baa76aa8f Bump assets/syntaxes/Crystal from 2f96cec to 2ee9d66
Bumps [assets/syntaxes/Crystal](https://github.com/crystal-lang-tools/sublime-crystal) from `2f96cec` to `2ee9d66`.
- [Release notes](https://github.com/crystal-lang-tools/sublime-crystal/releases)
- [Commits](https://github.com/crystal-lang-tools/sublime-crystal/compare/2f96cec2cae2f1efee17a2f82e82f7175290c6f6...2ee9d667aeb9e90846244b5a74e78826014676de)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-09 23:39:07 +01:00
sharkdp 01846fad30 Manually convert Nix.sublime-syntax 2019-12-09 23:37:41 +01:00
dependabot-preview[bot] 18255f9835 Bump assets/syntaxes/Nix from ebf0657 to 9032bd6
Bumps [assets/syntaxes/Nix](https://github.com/wmertens/sublime-nix) from `ebf0657` to `9032bd6`.
- [Release notes](https://github.com/wmertens/sublime-nix/releases)
- [Commits](https://github.com/wmertens/sublime-nix/compare/ebf06571f3cc2b30a7f88bbd4eb371b72ce828c2...9032bd613746b9c135223fd6f26a5fa555f18946)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-09 23:37:41 +01:00
sharkdp 7b94f2c1d7 Manually convert Cabal.sublime-syntax 2019-12-09 23:36:28 +01:00
dependabot-preview[bot] 7ca73c2e79 Bump assets/syntaxes/Cabal from 1c054d9 to 2d98cb7
Bumps [assets/syntaxes/Cabal](https://github.com/SublimeHaskell/SublimeHaskell) from `1c054d9` to `2d98cb7`.
- [Release notes](https://github.com/SublimeHaskell/SublimeHaskell/releases)
- [Commits](https://github.com/SublimeHaskell/SublimeHaskell/compare/1c054d9b3684d4f8278f934099614674217fea4d...2d98cb79ebf76c3e9ef884675005ed96226ad07e)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-09 23:36:28 +01:00
sharkdp 75cb1ce196 Manually convert Robot.sublime-syntax 2019-12-09 23:34:50 +01:00
dependabot-preview[bot] 35026a033a Bump assets/syntaxes/Robot from 8e5a349 to fcd3323
Bumps [assets/syntaxes/Robot](https://github.com/andriyko/sublime-robot-framework-assistant) from `8e5a349` to `fcd3323`.
- [Release notes](https://github.com/andriyko/sublime-robot-framework-assistant/releases)
- [Commits](https://github.com/andriyko/sublime-robot-framework-assistant/compare/8e5a349a3ea64f2e75d224f6ed1dcef6b9fbc525...fcd3323b5631d4abe61e8e8c728d0f4329640a64)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-09 23:34:50 +01:00
Shun Sakai 48031f282c Update Japanese README file
The beginning part of untranslated was translated into Japanese text.
2019-12-06 20:09:34 +01:00
crabique 7b2e98d5b7 added Nord color theme 2019-12-04 22:05:26 +01:00
Takayuki Nakata fb71b67a8d Remove the already translated line
This line was already translated at 159f234.
2019-11-24 23:27:33 +01:00
dependabot-preview[bot] d48f51e39d Bump git2 from 0.10.1 to 0.10.2
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.10.1 to 0.10.2.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/git2-curl-0.10.1...0.10.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-24 23:09:35 +01:00
dependabot-preview[bot] 9b1930b2b3 Bump assets/syntaxes/Packages from d1494f4 to 71fd0ec
Bumps [assets/syntaxes/Packages](https://github.com/sublimehq/Packages) from `d1494f4` to `71fd0ec`.
- [Release notes](https://github.com/sublimehq/Packages/releases)
- [Commits](https://github.com/sublimehq/Packages/compare/d1494f4a5a2bf8c6ae2f3e7ad762a05273df97ef...71fd0ec9e4b42c73e560d088a05ccc14ef0f54fc)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-08 10:44:29 +01:00
dependabot-preview[bot] 96d8013581 Bump assets/syntaxes/Docker from 6e521ea to 9e9a518
Bumps [assets/syntaxes/Docker](https://github.com/asbjornenge/Docker.tmbundle) from `6e521ea` to `9e9a518`.
- [Release notes](https://github.com/asbjornenge/Docker.tmbundle/releases)
- [Commits](https://github.com/asbjornenge/Docker.tmbundle/compare/6e521ead6cd39013b8d8b95d6d2e2c9e5a548464...9e9a518aed93031042c54710f8f02c839301de26)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-08 10:38:32 +01:00
dependabot-preview[bot] 46b345f2c2 Bump assets/syntaxes/Jsonnet from 80775c6 to e2c917e
Bumps [assets/syntaxes/Jsonnet](https://github.com/gburiola/sublime-jsonnet-syntax) from `80775c6` to `e2c917e`.
- [Release notes](https://github.com/gburiola/sublime-jsonnet-syntax/releases)
- [Commits](https://github.com/gburiola/sublime-jsonnet-syntax/compare/80775c616ee21051a72c8e62427f0a249150457d...e2c917ed7d6020e2ba6c18b06c7278c094db03f7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-08 10:37:48 +01:00
dependabot-preview[bot] 4e5b40e274 Bump assets/syntaxes/SCSS_Sass from 1195db9 to 0e8e0f9
Bumps [assets/syntaxes/SCSS_Sass](https://github.com/braver/SublimeSass) from `1195db9` to `0e8e0f9`.
- [Release notes](https://github.com/braver/SublimeSass/releases)
- [Commits](https://github.com/braver/SublimeSass/compare/1195db9f16e07a478a20df17a7aa8a6f0ed366a2...0e8e0f9d2ffa56981fcb6a0beee3648e5e27c851)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-08 10:36:43 +01:00
dependabot-preview[bot] d0e7ca159a Bump assets/syntaxes/Julia from 581805e to 0ca4cc2
Bumps [assets/syntaxes/Julia](https://github.com/JuliaEditorSupport/Julia-sublime) from `581805e` to `0ca4cc2`.
- [Release notes](https://github.com/JuliaEditorSupport/Julia-sublime/releases)
- [Commits](https://github.com/JuliaEditorSupport/Julia-sublime/compare/581805e47c7af5ab0a880aaef5b27f8c1ccc29aa...0ca4cc29907e9476cb603fed00d1d5fd9dc13c9c)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-08 10:35:57 +01:00
sharkdp e981e97407 Manually convert DotENV.sublime-syntax 2019-11-06 20:23:07 +01:00
dependabot-preview[bot] a8ec3b826c Bump assets/syntaxes/DotENV from f6cad11 to a1c9176
Bumps [assets/syntaxes/DotENV](https://github.com/zaynali53/DotENV) from `f6cad11` to `a1c9176`.
- [Release notes](https://github.com/zaynali53/DotENV/releases)
- [Commits](https://github.com/zaynali53/DotENV/compare/f6cad1140ccc0a108278748a493f51c8f2d1d7f5...a1c917633d3f3c4222cdcfac5b46831abff54d65)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-06 20:23:07 +01:00
sharkdp f4a59d74f1 Manually convert TypeScript.sublime-syntax 2019-11-06 20:21:53 +01:00
dependabot-preview[bot] b9b6d9e31e Bump assets/syntaxes/TypeScript from 19a599a to 8bfce29
Bumps [assets/syntaxes/TypeScript](https://github.com/Microsoft/TypeScript-Sublime-Plugin) from `19a599a` to `8bfce29`.
- [Release notes](https://github.com/Microsoft/TypeScript-Sublime-Plugin/releases)
- [Commits](https://github.com/Microsoft/TypeScript-Sublime-Plugin/compare/19a599ad0e2edfb13c107db4305cf07b82cdc023...8bfce299be3b899e996663f8a27e2013bd2e65b8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-06 20:21:53 +01:00
sharkdp d65ae517dd Rename Fish syntax folder 2019-11-06 20:19:01 +01:00
sharkdp bb675e57c7 Remove manually converted fish syntax 2019-11-06 20:16:25 +01:00
dependabot-preview[bot] 9fe38e200e Bump assets/syntaxes/sublime-fish from 0795764 to 0f7d31b
Bumps [assets/syntaxes/sublime-fish](https://github.com/Phidica/sublime-fish) from `0795764` to `0f7d31b`.
- [Release notes](https://github.com/Phidica/sublime-fish/releases)
- [Commits](https://github.com/Phidica/sublime-fish/compare/079576415af7e25116f1cec0a508a3a43344416b...0f7d31b43e260bb3c7fe3fbc9d8f0024c1b39cf4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-06 20:16:25 +01:00
dependabot-preview[bot] a2fcb09d7a Bump assets/syntaxes/Protobuf from 5115c1c to 726e21d
Bumps [assets/syntaxes/Protobuf](https://github.com/VcamX/protobuf-syntax-highlighting) from `5115c1c` to `726e21d`.
- [Release notes](https://github.com/VcamX/protobuf-syntax-highlighting/releases)
- [Commits](https://github.com/VcamX/protobuf-syntax-highlighting/compare/5115c1c59aec63c89a872166686d23b7390cea12...726e21d74dac23cbb036f2fbbd626decdc954060)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-06 20:03:57 +01:00
dependabot-preview[bot] 8c7916e128 Bump assets/themes/sublime-monokai-extended from 1658f51 to 0ca4e75
Bumps [assets/themes/sublime-monokai-extended](https://github.com/jonschlinkert/sublime-monokai-extended) from `1658f51` to `0ca4e75`.
- [Release notes](https://github.com/jonschlinkert/sublime-monokai-extended/releases)
- [Commits](https://github.com/jonschlinkert/sublime-monokai-extended/compare/1658f51c15400978b3f6ba7cf5ed6b171e71058c...0ca4e75291515c4d47e2d455e598e03e0dc53745)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-06 20:03:21 +01:00
dependabot-preview[bot] 3d23daa7b4 Bump assets/syntaxes/LESS from d3ddfe7 to 4eada94
Bumps [assets/syntaxes/LESS](https://github.com/danro/LESS-sublime) from `d3ddfe7` to `4eada94`.
- [Release notes](https://github.com/danro/LESS-sublime/releases)
- [Commits](https://github.com/danro/LESS-sublime/compare/d3ddfe7b51e01140db209f57af3bc47d04d9ac0a...4eada94009ae7185b1f518d3f4b0d4db2b2b217c)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-05 20:42:09 +01:00
dependabot-preview[bot] 572cbb00e2 Bump assets/syntaxes/PureScript from 42a61e3 to 5acebc1
Bumps [assets/syntaxes/PureScript](https://github.com/tellnobody1/sublime-purescript-syntax) from `42a61e3` to `5acebc1`.
- [Release notes](https://github.com/tellnobody1/sublime-purescript-syntax/releases)
- [Commits](https://github.com/tellnobody1/sublime-purescript-syntax/compare/42a61e39adf52806acc48fd7fd8e37d4f11d62d6...5acebc18503697be09df047591964e68e80fcf8e)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-05 20:41:54 +01:00
dependabot-preview[bot] dedaebdf15 Bump assets/syntaxes/Terraform from 3227a2d to c683495
Bumps [assets/syntaxes/Terraform](https://github.com/alexlouden/Terraform.tmLanguage) from `3227a2d` to `c683495`.
- [Release notes](https://github.com/alexlouden/Terraform.tmLanguage/releases)
- [Commits](https://github.com/alexlouden/Terraform.tmLanguage/compare/3227a2d2a25dcb2625805ed4de04145c6cfbe912...c683495c6414a172c58a39beaa952c822cbbcc84)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-05 20:41:47 +01:00
dependabot-preview[bot] 3d90c6adee Bump assets/syntaxes/ssh-config from 86bfd1b to 17e23d7
Bumps [assets/syntaxes/ssh-config](https://github.com/robballou/sublimetext-sshconfig) from `86bfd1b` to `17e23d7`.
- [Release notes](https://github.com/robballou/sublimetext-sshconfig/releases)
- [Commits](https://github.com/robballou/sublimetext-sshconfig/compare/86bfd1b09043053437d39c6bf61dc683e79d8940...17e23d7d38e5cf1c63e5c0242514965ffb080499)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-05 20:41:37 +01:00
dependabot-preview[bot] 06a521ec34 Bump assets/themes/onehalf from 2516b37 to fdcbffe
Bumps [assets/themes/onehalf](https://github.com/sonph/onehalf) from `2516b37` to `fdcbffe`.
- [Release notes](https://github.com/sonph/onehalf/releases)
- [Commits](https://github.com/sonph/onehalf/compare/2516b37c3f201f3d9f2ee194f00fbb20c1ca7413...fdcbffe3175c29bb78d19dcaf9b2a456482fcf1e)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-05 20:41:26 +01:00
sharkdp 37f7c94ba4 Properly add Twig submodule, closes #721 2019-11-05 20:33:16 +01:00
sharkdp 396e1ac6b6 Add simple pattern for command-line options 2019-11-05 07:13:33 +01:00
sharkdp 49e2073910 Highlight capitalized function calls / man page references 2019-11-05 07:13:33 +01:00
dependabot-preview[bot] 7d18649284 Bump console from 0.9.0 to 0.9.1
Bumps [console](https://github.com/mitsuhiko/console) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/compare/0.9.0...0.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-04 20:38:01 +01:00
sharkdp 850677f121 Remove 'advanced' example 2019-10-30 19:47:51 +01:00
sharkdp c132e19e74 Make a few modules private 2019-10-30 19:47:51 +01:00
sharkdp 3334f74b72 Remove custom 'transpose' function 2019-10-30 19:47:51 +01:00
sharkdp b9ce3c248c Simplify 'using_controller' example 2019-10-30 19:47:51 +01:00
David Peter 310654d49f Format "delta" like the other programs. 2019-10-30 19:47:37 +01:00
Dan Davison 3f37d292ec Point to delta in usage-with-git section of README 2019-10-30 19:47:37 +01:00
sharkdp 0a42d2b897 Add Nim syntax, closes #542 2019-10-30 19:47:24 +01:00
Helder M 3b5fcf4619 Update options sort order in --help and manpage file
This commit updates the sort order of --help options in order to improve
usability/importance putting most useful/used commands on top. In
addition to that, similar options were grouped together.
2019-10-29 19:54:25 +01:00
Ethan P ab2a6ad1d5 Add more colors to fstab syntax 2019-10-29 09:20:14 +01:00
Ethan P 7db30f9123 Merge pull request #705 from MarcoFalke/patch-1
doc: Add Ubuntu/Debian bat package to Readme
2019-10-28 15:44:06 -07:00
Ethan P 59f2b30768 Merge pull request #696 from flopp/fstab-syntax
Add fstab syntax definitions
2019-10-28 15:41:56 -07:00
Anubhab Ghosh 9fb14d78e1 Add syntax highlighting for /etc/resolv.conf 2019-10-28 21:29:29 +01:00
MarcoFalke 921a65f0a1 Update README.md 2019-10-28 16:26:28 -04:00
MarcoFalke b9c07e52e8 doc: Add Ubuntu/Debian bat package to Readme
Documentation update to fix #323
2019-10-26 10:33:17 -04:00
Anubhab Ghosh edbb4b2fc9 Add syntax highlighting for /etc/passwd file 2019-10-24 08:20:46 +02:00
Anubhab Ghosh 15b1676b72 Add syntax highlighting for /etc/group file 2019-10-24 08:20:46 +02:00
Florian Pigorsch 753a124ef2 Add some comments 2019-10-21 22:00:39 +02:00
Florian Pigorsch 58a4d009fa Add fstab file syntax 2019-10-21 21:56:24 +02:00
Fahmi Akbar Wildana 4664fb6f91 Remove comment in both examples
```diff
-// add_file()
```
2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana e287594654 Fix compile-error on Rust v1.35.0 2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana 1e19404736 Add 2 examples 2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana 2253d07341 Derive fmt::Debug whenever possible 2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana 7208a63a49 Implement trait Default for struct Config 2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana 0273848f54 Run cargo fmt 2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana e542621125 Move back printer.rs and others into lib
others:
bin/bat/{controller,decorations,output,printer}.rs
2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana 26439b41d2 Move Config,PagingMode from app.rs into lib.rs 2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana a2ee753b25 Move config.rs into src/bin/bat/ 2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana d3243903c0 Add --bins flag in CI before_deploy 2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana cf68b13322 Fix CI 'src/main.rs': No such file or directory 2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana 837d0998da Remove unused macros in bin/bat 2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana 23d80f9e84 Fix all compile errors in bin/bat
* Change `mod errors` in lib.rs to public

* Add `fn handle_error` in lib.rs errors module
2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana e981bd88c1 Move src/bin/* into src/bin/bat/
This will limit [[bin]] to *bat* only which will make:
- `cargo run` works without specifying --bin
- prevent `cargo build --bins` to produce multiple binaries (app,clap_app,...)
2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana 710a1df4ff Fix all compile warnings in lib.rs 2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana cfd33168af Fix all compile errors in lib.rs 🚚
* Move {controller,output,printer,decorations}.rs into src/bin/

* Add `mod errors` from main.rs
2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana eefdb186b8 Add lib.rs 2019-10-20 21:43:51 +02:00
Fahmi Akbar Wildana fc0ad4db2e Move {main,app,clap_app}.rs into src/bin/ 2019-10-20 21:43:51 +02:00
sharkdp f03b45f3e5 Update TOML syntax 2019-10-20 20:48:14 +02:00
sharkdp 9a74bf1a88 Disable nightly build 2019-10-19 18:20:15 +02:00
David Peter ff0b331dd6 Add llvm/libclang install instructions. 2019-10-15 21:40:38 +02:00
sharkdp 00bfbbf884 Add section concerning file encodings, see #568 2019-10-11 21:47:40 +02:00
Clar Fon e44045a71a Add Dracula theme 2019-10-11 20:18:22 +02:00
Ethan P 962abcef80 Update create.sh to quickly check for and update missing submodules 2019-10-10 23:49:39 +02:00
Ethan P 95f2e5bbb7 Ensure submodules are updated before creating asset cache 2019-10-10 23:49:39 +02:00
David Peter f46123e149 Add sponsor links as an experiment :-) 2019-10-07 19:43:36 +02:00
Martin Polreich f0f77b1673 Add SaltStack SLS syntax 2019-10-06 21:26:46 +02:00
Rogelio Domínguez Hernández 39112e80c3 cmake and libz are not needed to install bat
Closes sharkdp#649
2019-10-06 20:34:14 +02:00
Rogelio Domínguez Hernández a84c598e2c cmake and libz are not needed to install bat
Closes #649
2019-10-06 20:34:14 +02:00
Bernard Niset 6b2f78ec51 Add MacPorts instructions 2019-09-30 21:21:43 +02:00
Ethan P 938005864f Merge pull request #676 from sharkdp/dependabot/cargo/liquid-0.19.0
Bump liquid from 0.18.2 to 0.19.0
2019-09-30 10:37:13 -07:00
dependabot-preview[bot] 3a5f8ece49 Bump liquid from 0.18.2 to 0.19.0
Bumps [liquid](https://github.com/cobalt-org/liquid-rust) from 0.18.2 to 0.19.0.
- [Release notes](https://github.com/cobalt-org/liquid-rust/releases)
- [Changelog](https://github.com/cobalt-org/liquid-rust/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cobalt-org/liquid-rust/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-30 02:17:48 +00:00
Ethan P 047a6f3b85 Merge pull request #673 from eth-p/fix-659
Parameterized documentation.
2019-09-28 18:58:35 -07:00
Ethan P f09b75dafa Revert changing generated file names based on parameters
It should be handled by a packaging script, not a build script.
2019-09-27 12:34:08 -07:00
Ethan P 54ec2e7bd0 Fix CI before_deploy to use parameterized names 2019-09-27 12:29:22 -07:00
Ethan P e57b2e9528 Add generated files to gitignore 2019-09-27 12:14:43 -07:00
Ethan P ea2179b352 Update fish completions to use parameterized names 2019-09-27 12:13:55 -07:00
Ethan P c8478cedc5 Update manual page to use parameterized names 2019-09-27 12:06:54 -07:00
Ethan P 1692e5fef7 Merge pull request #669 from sharkdp/fix-666
Fix 'bat cache other-arg'
2019-09-27 10:57:01 -07:00
Ben Iofel 7ba5bc78b7 Update sublimehq/Packages to master 2019-09-23 08:58:56 +02:00
dependabot-preview[bot] 25c2e1725e Bump syntect from 3.2.1 to 3.3.0
Bumps [syntect](https://github.com/trishume/syntect) from 3.2.1 to 3.3.0.
- [Release notes](https://github.com/trishume/syntect/releases)
- [Changelog](https://github.com/trishume/syntect/blob/master/CHANGELOG.md)
- [Commits](https://github.com/trishume/syntect/compare/v3.2.1...v3.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 08:14:41 +02:00
Luna 853e48e3f3 Allow underscores and dashes in page names to fix highlighting issues with pages such as signal-safety or posix_openpt. 2019-09-22 22:26:58 +02:00
sharkdp f5d359927a Fix 'bat cache other-arg', closes #666 2019-09-21 09:10:12 +02:00
sharkdp 4df5973fde Replace 'Printer' by 'needle' 2019-09-21 09:01:54 +02:00
sharkdp 45f3c73331 Extend 'man' integration section 2019-09-21 08:51:26 +02:00
sharkdp 4102175d98 Add '-x' flag for 'col', see #652, see #667 2019-09-21 08:44:26 +02:00
Ethan P 30ee2a464f Add eth-p/bat-extras integrations to README 2019-09-21 08:42:56 +02:00
Ethan P 7a5d1f27e7 Fix missing and inconsistent code fences in REAMDE 2019-09-21 08:42:56 +02:00
dependabot-preview[bot] ac5ff9d454 Bump console from 0.8.0 to 0.9.0
Bumps [console](https://github.com/mitsuhiko/console) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/compare/0.8.0...0.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-15 22:10:29 +02:00
David Peter c9c3341a38 Use bash syntax highlighting 2019-09-15 15:54:44 +02:00
Jerguš Lejko a736889ef1 add dark mode script 2019-09-15 15:54:44 +02:00
dependabot-preview[bot] ea5e096705 Bump git2 from 0.10.0 to 0.10.1
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.10.0 to 0.10.1.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/git2-curl-0.10.0...git2-curl-0.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-14 09:31:34 +02:00
Martin Polreich 12330fd154 Add Jinja2 syntax 2019-09-09 20:13:21 +02:00
David Peter 337ee568b1 Add list of maintainers to README 2019-09-07 08:57:07 +02:00
sharkdp 608cefb05c Bump version 2019-09-03 08:07:42 +02:00
dependabot-preview[bot] 8d0aa39181 Bump ansi_term from 0.12.0 to 0.12.1
Bumps [ansi_term](https://github.com/ogham/rust-ansi-term) from 0.12.0 to 0.12.1.
- [Release notes](https://github.com/ogham/rust-ansi-term/releases)
- [Commits](https://github.com/ogham/rust-ansi-term/compare/v0.12.0...v0.12.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-03 07:21:05 +02:00
David Peter 5815364206 Add packaging status from repology.org 2019-09-01 11:03:35 +02:00
sharkdp 79f016e15c Update syntaxes 2019-08-31 20:58:16 +02:00
sharkdp 26f9125ebb Re-formulate help text 2019-08-31 20:56:53 +02:00
sharkdp 9814eab13f Suppress warning in -A mode 2019-08-31 20:56:53 +02:00
sharkdp 82ca8804a2 Handle non-unicode characters in the preprocessor 2019-08-31 20:56:53 +02:00
pjsier b48b9fcf3b Display binary file content for bat -A 2019-08-31 20:56:53 +02:00
sharkdp c64ab29739 Update min. required rust version 2019-08-31 14:48:42 +02:00
sharkdp 83dd3fb551 Update man page 2019-08-31 14:47:04 +02:00
sharkdp ed345f2889 Fix headline 2019-08-31 14:44:11 +02:00
sharkdp d2492980c0 Update syntaxes and themes 2019-08-31 14:43:20 +02:00
sharkdp 47d5130764 Bump version 2019-08-31 14:43:04 +02:00
sharkdp 4ba45e2ba2 Add first version of 'man page' syntax, closes #523 2019-08-31 14:32:37 +02:00
sharkdp 7076ae5cd9 Update dependencies 2019-08-31 14:14:08 +02:00
sharkdp 2e71146801 Fix another instance of the 'bat cache' bug, closes #584 2019-08-31 14:13:36 +02:00
sharkdp f3824bad17 Add explicit terminal width for test 2019-08-31 13:46:48 +02:00
sharkdp ec908d5937 Run 'cargo fmt' 2019-08-31 13:46:48 +02:00
sharkdp 3a75d85b80 Add test for 'snip' feature 2019-08-31 13:46:48 +02:00
sharkdp 63d652dab5 Add 'dyn' keyword for trait references 2019-08-31 13:46:48 +02:00
Ethan P 7f2e61d579 Add new style component to separate multiple '--line-range's 2019-08-31 13:46:48 +02:00
sharkdp e289a2c698 Add short '-L' option as an alias for --list-languages 2019-08-31 13:22:16 +02:00
sharkdp 83a213bae7 Add 'strace' syntax, closes #599 2019-08-31 13:13:42 +02:00
sharkdp 3967e28ded Add SCSS and Sass syntax, closes #637 2019-08-31 13:09:38 +02:00
sharkdp 2dc2a3712a Add Verilog syntax, closes #616 2019-08-31 12:59:02 +02:00
sharkdp 10e0f9efb0 Install fish completions in DEB package, closes #554 2019-08-28 21:06:52 +02:00
dependabot-preview[bot] f8ea075e78 Bump console from 0.7.7 to 0.8.0
Bumps [console](https://github.com/mitsuhiko/console) from 0.7.7 to 0.8.0.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/compare/0.7.7...0.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-26 21:44:57 +02:00
dependabot-preview[bot] c187dce2c2 Bump lazy_static from 1.3.0 to 1.4.0
Bumps [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/rust-lang-nursery/lazy-static.rs/releases)
- [Commits](https://github.com/rust-lang-nursery/lazy-static.rs/compare/1.3.0...1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-26 07:13:01 +02:00
dependabot-preview[bot] 108c907d69 Bump git2 from 0.9.2 to 0.10.0
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.9.2 to 0.10.0.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/git2-curl-0.9.2...git2-curl-0.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-24 08:47:50 +02:00
sharkdp 187a3b9341 Use consistent syntax for command-line options
closes #574
2019-08-15 21:57:32 +02:00
David Peter 9c2d4f6a51 Add libc6-dev dependency for aarch64 2019-08-10 15:58:13 +02:00
sharkdp c1126157d4 Re-enable aarch64 builds 2019-08-10 15:58:13 +02:00
dependabot-preview[bot] dcfa810112 Bump syntect from 3.2.0 to 3.2.1
Bumps [syntect](https://github.com/trishume/syntect) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/trishume/syntect/releases)
- [Changelog](https://github.com/trishume/syntect/blob/master/CHANGELOG.md)
- [Commits](https://github.com/trishume/syntect/compare/v3.2.0...v3.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-10 14:06:13 +02:00
Dan Davison f963104006 Add GraphQL sublime syntax submodule 2019-08-10 13:17:02 +02:00
sharkdp 45e1c0ea6f Temporarily disable aarch64 2019-08-02 21:14:44 +02:00
sharkdp 590a1e9a4b Bump minimum supported version to 1.33 2019-08-02 21:00:33 +02:00
sharkdp 8e2c6abb13 Update dependencies 2019-08-02 20:57:16 +02:00
Wild Kat 28266ee441 use explicit dyn with Write to appease compiler 2019-08-02 18:50:55 +02:00
Ethan P 21821f1d4c Updated snapshot tests 2019-07-26 06:51:33 +02:00
Ethan P 772ce2e4fe Print a horizontal header line when 'grid' style without 'header' style 2019-07-26 06:51:33 +02:00
dependabot-preview[bot] 35ca1c5191 Bump atty from 0.2.12 to 0.2.13
Bumps [atty](https://github.com/softprops/atty) from 0.2.12 to 0.2.13.
- [Release notes](https://github.com/softprops/atty/releases)
- [Changelog](https://github.com/softprops/atty/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/atty/compare/0.2.12...0.2.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-25 21:34:19 +02:00
dependabot-preview[bot] 0cc60a1519 Bump wild from 2.0.1 to 2.0.2
Bumps [wild](https://gitlab.com/kornelski/wild) from 2.0.1 to 2.0.2.
- [Release notes](https://gitlab.com/kornelski/wild/tags)
- [Commits](https://gitlab.com/kornelski/wild/commits/master)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-24 21:50:05 +02:00
dependabot-preview[bot] ee6659dacf Bump ansi_term from 0.11.0 to 0.12.0
Bumps [ansi_term](https://github.com/ogham/rust-ansi-term) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/ogham/rust-ansi-term/releases)
- [Commits](https://github.com/ogham/rust-ansi-term/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-24 21:45:44 +02:00
sharkdp 76c615a304 Allow leading minus in '--terminal-width <value>'
closes #611
2019-07-24 21:44:25 +02:00
Igor Gnatenko e8c04672f0 Small improvements for Fedora instructions
Anything older than F29 is EOL now, so no need to mention it. Also in F29+ you can use standard `dnf install`.
2019-07-24 21:38:11 +02:00
dependabot-preview[bot] 7f5a5612e4 Bump atty from 0.2.11 to 0.2.12
Bumps [atty](https://github.com/softprops/atty) from 0.2.11 to 0.2.12.
- [Release notes](https://github.com/softprops/atty/releases)
- [Changelog](https://github.com/softprops/atty/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/atty/compare/0.2.11...0.2.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-12 07:15:42 +02:00
dependabot-preview[bot] eee5d424bb [Security] Bump smallvec from 0.6.9 to 0.6.10
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 0.6.9 to 0.6.10. **This update includes security fixes.**
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-07 15:34:01 +02:00
dependabot-preview[bot] e5311e4b30 Bump console from 0.7.6 to 0.7.7
Bumps [console](https://github.com/mitsuhiko/console) from 0.7.6 to 0.7.7.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/compare/0.7.6...0.7.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-05 14:34:15 +02:00
dependabot-preview[bot] a1b9334a44 Bump console from 0.7.5 to 0.7.6
Bumps [console](https://github.com/mitsuhiko/console) from 0.7.5 to 0.7.6.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/compare/0.7.5...0.7.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-20 10:04:08 +02:00
Chloe Kudryavtsev d86b7cf7e0 Add Alpine Linux installation instructions
Resolves #586
2019-06-11 07:40:23 +02:00
dependabot-preview[bot] 67834da681 Bump git2 from 0.9.0 to 0.9.1
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.9.0...0.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-10 11:15:51 +02:00
toku-sa-n dcdf8dfaa7 Add install instructions(ja) for Gentoo Users. 2019-06-09 17:50:18 +02:00
toku-sa-n 9a44fa11c0 Add install instructions for Gentoo Users. 2019-06-09 17:50:18 +02:00
sharkdp 4ee0b2e16d Merge branch 'issmirnov-ssh-config' 2019-06-07 08:17:17 +02:00
sharkdp 518997135e Merge branch 'ssh-config' of https://github.com/issmirnov/bat into issmirnov-ssh-config 2019-06-07 08:17:04 +02:00
Ivan Smirnov 69fc1caead Add support for "etc/hosts" files.
- Syntax author: https://github.com/brandonwamboldt/sublime-hosts

Since the upstream version only has a tmLanguage, added a sublime-syntax
file manually.
2019-06-07 08:02:38 +02:00
Ivan Smirnov 175dd4c290 Add SSH config syntax
Tested:
```
bash assets/create.sh
cargo build
target/debug/bat --language ssh_config ~/.ssh/config
```
2019-06-06 20:01:23 -07:00
dependabot-preview[bot] e9210c0f6c Bump git2 from 0.8.0 to 0.9.0
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/git2-curl-0.8.0...0.9.0)
2019-06-05 07:17:09 +02:00
sharkdp 3795acbd17 Add '.env' (DotENV) syntax 2019-05-31 21:05:34 +02:00
sharkdp c7d08cfcfd Add 'requirements.txt' syntax 2019-05-31 20:58:08 +02:00
dependabot-preview[bot] 8ec96da9f0 Bump dirs from 2.0.0 to 2.0.1
Bumps [dirs](https://github.com/soc/dirs-rs) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/soc/dirs-rs/releases)
- [Commits](https://github.com/soc/dirs-rs/commits)
2019-05-31 08:57:04 +02:00
Fernando Mendes c9d7e3652b Enforce the creation of the full cache dir path
Fixes #576
2019-05-30 22:28:52 +02:00
Brice Waegeneire dfa024f9e6 Add Org mode syntax, closes sharkdp#36 2019-05-29 19:52:06 +02:00
dependabot-preview[bot] b2757cb461 Bump dirs from 1.0.5 to 2.0.0
Bumps [dirs](https://github.com/soc/dirs-rs) from 1.0.5 to 2.0.0.
- [Release notes](https://github.com/soc/dirs-rs/releases)
- [Commits](https://github.com/soc/dirs-rs/commits)
2019-05-28 21:32:57 +02:00
sharkdp 416a0fd439 Fix autocompletion-path 2019-05-15 23:24:37 +02:00
sharkdp 9b1b3dda14 Only print the header for empty files
Instead of printing
```
───────┬─────────────────────────────────────────────────────────
       │ File: some-file
───────┼─────────────────────────────────────────────────────────
───────┴─────────────────────────────────────────────────────────
```
for empty files, bat will now print
```
───────┬─────────────────────────────────────────────────────────
       │ File: some-file   <EMPTY>
───────┴─────────────────────────────────────────────────────────
```
2019-05-15 22:37:03 +02:00
sharkdp ae7db313a6 Update man page 2019-05-15 22:14:40 +02:00
sharkdp 3c4384990d Update syntaxes and themes 2019-05-15 22:12:02 +02:00
sharkdp 260814c377 Bump version to 0.11 2019-05-15 22:07:35 +02:00
sharkdp 3675a82a1b Update dependencies 2019-05-15 22:06:28 +02:00
sharkdp 5b2b594919 Revert "Run 'cargo fmt'" (outdated rustfmt)
This reverts commit dd40f7545d.
2019-05-15 08:07:08 +02:00
sharkdp 9d53ce6be6 Fix warning 2019-05-14 23:42:23 +02:00
sharkdp 51e05499a9 Update dependencies 2019-05-14 23:40:21 +02:00
sharkdp dd40f7545d Run 'cargo fmt' 2019-05-14 23:40:07 +02:00
sharkdp c709bf2103 Print a warning message instead of just '<BINARY>' 2019-05-14 23:35:22 +02:00
Maksim Panfilov f37dbb80a8 Added printing of "<BINARY>" for binary files in the interactive mode if header decorations are turned off 2019-05-14 23:35:22 +02:00
sharkdp 0a1e08da96 Extend help text for --terminal-width and --wrap, closes #535 2019-05-14 23:24:13 +02:00
Ethan P 06b8dcb7eb Update fish completions for new --list-languages format 2019-05-14 22:50:42 +02:00
Ethan P 493a4e719e Added non-interactive mode for --list-languages
This makes scripting it a lot easier and less hacky.
2019-05-14 22:50:42 +02:00
Ethan P 27e0ca98d9 Remove language completions for config files 2019-05-14 22:50:42 +02:00
Ethan P 1b2066c5f2 Add fish shell argument completions for --language option 2019-05-14 22:50:42 +02:00
dependabot[bot] 4ec3cdb5b8 Bump error-chain from 0.12.0 to 0.12.1
Bumps [error-chain](https://github.com/rust-lang-nursery/error-chain) from 0.12.0 to 0.12.1.
- [Release notes](https://github.com/rust-lang-nursery/error-chain/releases)
- [Changelog](https://github.com/rust-lang-nursery/error-chain/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang-nursery/error-chain/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-13 18:32:28 +02:00
sharkdp 72152296c7 Fix accidental printing of files named 'cache'
This also adds two regression tests, so this will hopefully not pop up
again.

closes #557
2019-05-10 17:55:46 -05:00
Ethan P 2b9d25df05 Replace iterator with string starts_with and ends_with 2019-05-10 17:52:35 -05:00
Ethan P cc8186103b Reformatted with cargo fmt. 2019-05-10 17:52:35 -05:00
Ethan P 0ad09df7ab Improved logic when encountering ANSI in character wrap mode
Fixes #551
2019-05-10 17:52:35 -05:00
Ethan P 7ef0fe091d Cleaned up terminal-width validation even more 2019-05-10 17:50:58 -05:00
Ethan P 89fcbb2b15 Cleaned up terminal-width validation slightly 2019-05-10 17:50:58 -05:00
Ethan P a7e2bb86cb Add validation for --terminal-width option 2019-05-10 17:50:58 -05:00
sharkdp 1ce0bc8e0d Slightly modified help text 2019-05-10 11:04:46 -05:00
Ethan P fde00eec98 Add -pp for plain styling and no pager 2019-05-10 11:01:02 -05:00
Mitchell Kember bb6594e691 Add 3 new themes: ansi-light, ansi-dark, base16
Also, interpret transparent colors (#RRGGBB00) as specifying a terminal
color palette number with RR. The three new themes use this.
2019-05-08 07:35:43 -05:00
rasmuskriest e7c5561df7 Update Chocolatey package name to bat 2019-04-25 17:58:15 +02:00
rasmuskriest 0aabbc03d7 Add Chocolatey package instructions 2019-04-25 17:58:15 +02:00
Alexander Hultnér 8a5b59febc Updated manual to include -H, --highlight-line <N> 2019-04-25 17:57:01 +02:00
Tim Sampson 7afdd44c43 cache/misc: be more cautious with bash 2019-04-25 17:52:21 +02:00
Tim Sampson d72549a873 add fish shell syntax definition 2019-04-25 17:52:21 +02:00
evdev 1ba8540e5f Updated packaging script to include manual fish shell completions 2019-04-13 10:59:22 +02:00
evdev a6cee4da67 Removed completions file accidentaly left in root dir 2019-04-13 10:59:22 +02:00
evdev cd6850947e Updated fish completions to include parameter completion for available themes, added cache subcommand completions 2019-04-13 10:59:22 +02:00
evdev 14bfedeb20 Updated fish completions to include parameter completion for flags: color, italic-text, decorations, paging, wrap 2019-04-13 10:59:22 +02:00
evdev 8fe65252f7 WIP: added manual minimal fish shell completions for current flags. Does not include flag sub-options like language lists or subcommands 2019-04-13 10:59:22 +02:00
evdev 5e9351445f WIP: added manual minimal fish shell completions for current flags. Does not include flag sub-options like language lists or subcommands 2019-04-13 10:59:22 +02:00
dependabot[bot] 2fdfb8de40 Bump escargot from 0.4.0 to 0.5.0
Bumps [escargot](https://github.com/crate-ci/escargot) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/crate-ci/escargot/releases)
- [Changelog](https://github.com/crate-ci/escargot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/escargot/compare/v0.4.0...v0.5.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-09 21:48:33 +02:00
dependabot[bot] f8c759edff Bump clap from 2.32.0 to 2.33.0
Bumps [clap](https://github.com/clap-rs/clap) from 2.32.0 to 2.33.0.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-08 13:00:03 +02:00
dependabot[bot] e34431f922 Bump assert_cmd from 0.11.0 to 0.11.1
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 0.11.0 to 0.11.1.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases)
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v0.11.0...v0.11.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-04 21:11:46 +02:00
Björn c96927b550 Update F# syntax 2019-04-04 21:11:19 +02:00
Laurent Arnoud 921cc0d1cb Add copyright file on Debian package 2019-03-17 18:59:28 +01:00
dependabot[bot] dbc49e534a Bump syntect from 3.1.0 to 3.2.0
Bumps [syntect](https://github.com/trishume/syntect) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/trishume/syntect/releases)
- [Changelog](https://github.com/trishume/syntect/blob/master/CHANGELOG.md)
- [Commits](https://github.com/trishume/syntect/compare/v3.1.0...v3.2.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-11 06:37:16 +01:00
David Peter 7755ed79e0 Delete .DS_Store 2019-03-11 06:35:21 +01:00
Daniele Esposti 50aabf331d Updated minimum version of Rust 2019-03-09 07:43:41 +01:00
Daniele Esposti f259ff2920 Formatted code 2019-03-09 07:43:41 +01:00
Daniele Esposti 82f14121bd Applied linter fixes 2019-03-09 07:43:41 +01:00
Daniele Esposti a21ae614e6 Migrated to Rust 2018 2019-03-09 07:43:41 +01:00
dependabot[bot] b94c94e845 Bump lazy_static from 1.2.0 to 1.3.0
Bumps [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/rust-lang-nursery/lazy-static.rs/releases)
- [Commits](https://github.com/rust-lang-nursery/lazy-static.rs/compare/1.2.0...1.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-08 21:45:42 +01:00
dependabot[bot] 161d107ec3 Bump dirs from 1.0.4 to 1.0.5
Bumps [dirs](https://github.com/soc/dirs-rs) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/soc/dirs-rs/releases)
- [Commits](https://github.com/soc/dirs-rs/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-05 22:31:16 +01:00
dependabot[bot] ecf147fd96 Bump syntect from 3.0.2 to 3.1.0
Bumps [syntect](https://github.com/trishume/syntect) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/trishume/syntect/releases)
- [Changelog](https://github.com/trishume/syntect/blob/master/CHANGELOG.md)
- [Commits](https://github.com/trishume/syntect/compare/v3.0.2...v3.1.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-25 07:03:17 +01:00
sharkdp f0771d6532 Do not replace arguments to pager when --pager is used, closes #509 2019-02-18 20:28:44 +01:00
Geoff Shannon d8f28c177a Make fd link actually link to fd 2019-02-17 09:19:42 +01:00
David Peter fbee9df719 Add "git show" section 2019-02-11 22:04:22 +01:00
David Peter 6e9ca7d6dc Add "xclip" section 2019-02-11 22:01:03 +01:00
David Peter a9ec5c063a Add documentation about "tail -f" 2019-02-11 21:54:16 +01:00
David Peter 8470fd7173 Add "Integration with other tools" section 2019-02-11 21:38:18 +01:00
Reid Wagner 76b7418e35 Only print contents if file wasn't empty, or EOF wasn't first thing received from stdin. 2019-02-11 20:33:16 +01:00
Reid Wagner 10c5f79640 Revert "Check result of read_until, and return Error if 0, which indicates EOF was found before delimeter."
This reverts commit 61e888de7f.
2019-02-11 20:33:16 +01:00
sharkdp 9e11d66979 Handle UTF-16 encoding errors with replacement characters 2019-02-10 10:18:07 +01:00
sharkdp fa3244f7c1 Add test for UTF-16LE encoding 2019-02-10 10:18:07 +01:00
sharkdp 906774e6d3 Integration tests for single-line files 2019-02-10 10:18:07 +01:00
Reid Wagner cec9cc073c Add integration tests running bat with empty input files. 2019-02-08 23:30:33 +01:00
David Peter a16789a060 Update alternatives.md 2019-02-07 23:52:31 +01:00
sharkdp e09499b3df Move config-dir and cache-dir from 'bat cache' to 'bat' 2019-02-07 23:27:53 +01:00
sharkdp cff01d81fa Rename 'bat cache --init' to 'bat cache --build' 2019-02-07 23:27:53 +01:00
sharkdp 31608c9a03 Update syntaxes 2019-02-07 23:01:06 +01:00
sharkdp 357ce84c56 Bump version to 0.10 2019-02-07 23:00:40 +01:00
sharkdp 3a5c52641b Update assets/syntaxes/Packages 2019-02-07 22:53:18 +01:00
sharkdp 6e8fca5bb2 Replace less command line arguments only for PAGER 2019-02-07 22:37:33 +01:00
Park Juhyung 63c77383ce Ignore flags from PAGER env var if the program is 'less' 2019-02-07 22:37:33 +01:00
sharkdp 4df22e617f Update documentation 2019-02-07 22:19:32 +01:00
sharkdp 6473e8c1be Remove import 2019-02-07 22:19:32 +01:00
sharkdp 972a764a74 Simplify Optional handling 2019-02-07 22:19:32 +01:00
sharkdp 54143d1403 Add --cache-dir option 2019-02-07 22:19:32 +01:00
sharkdp 6523bbf62f Replace 'is_absolute_path' with map and filter 2019-02-07 22:19:32 +01:00
Lavi 05e2c2c66b removed compile errors and warnings on non-macs 2019-02-07 22:19:32 +01:00
Lavi 69227222b5 config and cache now check XDG env vars first
`XDG_CACHE_HOME` and `XDG_CONFIG_HOME` are checked first and fall-back
to `~/.cache/` and `~/.config/`.
2019-02-07 22:19:32 +01:00
Lavi 49af3e854b Set cache_dir on MacOS to ~/.cache/bat/ 2019-02-07 22:19:32 +01:00
Lavi 6a8e4757b7 Updated bat config dir for MacOs
Removed directories crate and using dirs_rs
Changed bat config file and cache dir on MacOs:
config: ~/.config/bat/config
cache: ~/.config/bat/cache/
2019-02-07 22:19:32 +01:00
Harald Hoyer 91deef8b13 add varlink syntax
Varlink is an interface description format and protocol that aims
to make services accessible to both humans and machines in the
simplest feasible way.

See: https://varlink.org/ and https://github.com/varlink/ for
more information
2019-02-07 07:40:22 +01:00
Reid Wagner 61e888de7f Check result of read_until, and return Error if 0, which indicates EOF was found before delimeter. 2019-02-07 07:32:28 +01:00
Okumura Takahiro f3f9f10f05 Add Jsonnet (*.jsonnet) syntax
Jsonnet: https://jsonnet.org/
sublime-syntax: https://github.com/gburiola/sublime-jsonnet-syntax
2019-02-04 23:28:39 +01:00
object_1037 29ffa2a832 add Fedora instructions 2019-02-03 12:58:04 +01:00
object_1037 42a873fdb8 update README-ja.md 2019-02-03 12:58:04 +01:00
dependabot[bot] 82f048aedb Bump assert_cmd from 0.10.2 to 0.11.0
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 0.10.2 to 0.11.0.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases)
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v0.10.2...v0.11.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-29 08:13:31 +01:00
Benjamin Santos ae08785ec8 Add Terraform syntax 2019-01-28 20:09:56 +01:00
sharkdp a500629359 Completely disable generation of shell completion files 2019-01-26 19:11:54 +01:00
Gergely Gombos 724a5fac99 Fix Fedora instructions in README
Correct instructions regarding Fedora Modular repos.
2019-01-26 19:11:37 +01:00
sharkdp c483e49b92 Consistent naming for submodules 2019-01-20 10:22:35 +01:00
Benjamin 94c9b40694 Protobuf-syntax and ProtobufText syntax (#474) 2019-01-20 10:20:53 +01:00
dependabot[bot] 0c9dc3b257 Bump console from 0.7.3 to 0.7.5
Bumps [console](https://github.com/mitsuhiko/console) from 0.7.3 to 0.7.5.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/compare/0.7.3...0.7.5)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-18 07:25:29 +01:00
Benjamin Santos 3b5174bb1d Add syslog-syntax 2019-01-18 07:24:46 +01:00
David Peter 3324505383 Update README.md 2019-01-16 20:04:46 +01:00
dependabot[bot] de7872f8a8 Bump console from 0.7.2 to 0.7.3
Bumps [console](https://github.com/mitsuhiko/console) from 0.7.2 to 0.7.3.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/compare/0.7.2...0.7.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-14 09:12:12 +01:00
dependabot[bot] abf0229741 Bump escargot from 0.3.1 to 0.4.0
Bumps [escargot](https://github.com/crate-ci/escargot) from 0.3.1 to 0.4.0.
- [Release notes](https://github.com/crate-ci/escargot/releases)
- [Changelog](https://github.com/crate-ci/escargot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/escargot/compare/v0.3.1...v0.4.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-01 12:32:25 +01:00
dependabot[bot] e04bccd12d Bump console from 0.7.1 to 0.7.2
Bumps [console](https://github.com/mitsuhiko/console) from 0.7.1 to 0.7.2.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-24 08:41:06 +01:00
David Peter 668c8a6703 Merge pull request #453 from sharkdp/line-highlight
Line highlight
2018-12-18 09:06:28 +01:00
sharkdp bd68684537 Fix the number of values to one 2018-12-16 22:35:22 +01:00
sharkdp c2847f6a9f Short options for line-range and highlight-line 2018-12-16 22:17:39 +01:00
sharkdp cf7ed042c1 Colorize the whole line 2018-12-16 21:53:15 +01:00
sharkdp 6b92814ea0 Allow for multiple highlighted lines 2018-12-16 21:00:18 +01:00
sharkdp a236a9b195 Merge branch 'master' of https://github.com/tskinn/bat into tskinn-master 2018-12-16 20:43:36 +01:00
sharkdp b68c5d8576 Bump minimum required Rust version to 1.30 2018-12-14 23:34:13 +01:00
sharkdp fee57d71d9 Print ANSI-reset code before newline
fixes #379
2018-12-14 23:34:13 +01:00
sharkdp 5d3205acc0 Add x86_64 Assembly manually 2018-12-14 23:07:11 +01:00
sharkdp 4e6816abd6 Remove problematic 'Assembly (x86_64)' submodule 2018-12-14 23:07:11 +01:00
dependabot[bot] 72e8036edc Bump git2 from 0.7.5 to 0.8.0
Bumps [git2](https://github.com/alexcrichton/git2-rs) from 0.7.5 to 0.8.0.
- [Release notes](https://github.com/alexcrichton/git2-rs/releases)
- [Commits](https://github.com/alexcrichton/git2-rs/compare/libgit2-sys-0.7.5...git2-curl-0.8.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-14 22:55:25 +01:00
sharkdp 397def1320 Omit launching of pager if NO file exists
closes #387
2018-12-14 22:53:31 +01:00
sharkdp d2d29180a7 Add ARM assembly 2018-12-14 22:52:57 +01:00
sharkdp 2f263c9fbf Add x86_64 assembly 2018-12-14 22:46:50 +01:00
ufuji1984 4ff360669f add quotes around filename
and make it more concise by using map_err
2018-12-11 22:24:52 +01:00
ufuji1984 549e5d7355 Report filename if File::open return Err
From issue #441
2018-12-11 22:24:52 +01:00
Markus Thömmes dd48d29c28 Add AsciiDoc syntax. 2018-12-11 21:12:29 +01:00
sharkdp 98ee5f7400 Add vimpager to alternatives, closes #429 2018-12-07 20:28:47 +01:00
dependabot[bot] 638c04c13e Bump console from 0.7.0 to 0.7.1
Bumps [console](https://github.com/mitsuhiko/console) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/compare/0.7.0...0.7.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-03 07:04:34 +01:00
David Peter b1c865acaa Update README.md 2018-12-02 22:02:39 +01:00
Lavi Blumberg d3d795ffb2 Removed confusing variable from examples in README.md
Removed confusing the variable `BAT_CONFIG_DIR` from examples because it
 is not a real configuration option for bat.
2018-12-02 20:19:12 +01:00
David Peter 0571c51487 Add copyright notice in MIT license 2018-12-02 18:35:29 +01:00
Ole Martin Ruud 348c9f3562 Enhance SyntaxMapping with impl Trait 2018-11-27 20:36:23 +01:00
Ole Martin Ruud 6b6a8f8e16 Fix doc comment typo 2018-11-27 20:34:32 +01:00
Keith Devens 6aa002850c Correct typo in readme 2018-11-26 20:11:25 +01:00
dependabot[bot] 49c22c8d39 Bump console from 0.6.2 to 0.7.0
Bumps [console](https://github.com/mitsuhiko/console) from 0.6.2 to 0.7.0.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/compare/0.6.2...0.7.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-23 08:04:46 +01:00
dependabot[bot] 673caf6b59 Bump assert_cmd from 0.10.1 to 0.10.2
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 0.10.1 to 0.10.2.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases)
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v0.10.1...v0.10.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-21 19:11:22 +01:00
David Peter e6ffab3cb4 Update assets/README.md 2018-11-19 18:48:36 +01:00
Jerome Leclanche 4e43f8fa74 Highlight XDG desktop entry as .ini file
Reference: https://standards.freedesktop.org/desktop-entry-spec/latest/
2018-11-19 18:48:36 +01:00
David Peter bac1b16885 Consistent spelling of "color" 2018-11-18 12:11:07 +01:00
Ahmed El Gabri 778a4929a8 Add twig support 2018-11-18 11:58:05 +01:00
sh-tech 5c22dd4248 add close tag 2018-11-15 08:53:03 +01:00
sh-tech 214cd0f8ea add link to original README 2018-11-15 08:53:03 +01:00
sh-tech 9fd61fcb6d add table of contents 2018-11-15 08:53:03 +01:00
sh-tech edf1d3b256 modify url 2018-11-15 08:53:03 +01:00
sh-tech eca47b2a28 translate Project goals, alternatives 2018-11-15 08:53:03 +01:00
sh-tech 62424e70d7 translate Customization 2018-11-15 08:53:03 +01:00
sh-tech 4791f15222 translate Installation 2018-11-15 08:53:03 +01:00
sh-tech 159f234b78 translate Key Features & How to Use 2018-11-15 08:53:03 +01:00
sh-tech 3ec96127f2 translate table of contents 2018-11-15 08:53:03 +01:00
sh-tech a9acb2711b copy README.md (NOT translate yet) 2018-11-15 08:53:03 +01:00
sharkdp a3182e68e4 Update .gitattributes 2018-11-12 21:49:19 +01:00
sharkdp 0691b18231 Add assets/.gitattributes 2018-11-11 14:50:59 +01:00
sharkdp c711cd1b2e Update .gitattributes 2018-11-11 14:50:05 +01:00
sharkdp 14e6b41a5f Add .gitattributes 2018-11-11 14:49:24 +01:00
Arnav Borborah 532af6556d Use Rust inclusive range (stable in 1.26) 2018-11-11 14:42:22 +01:00
David Peter 26717b0cd2 Update README.md 2018-11-11 14:39:04 +01:00
David Peter 1f177f0a1c Update README.md 2018-11-11 14:35:08 +01:00
David Peter 54c81fa543 Update README.md 2018-11-11 14:32:59 +01:00
David Peter 34dee9e3aa Updates for README 2018-11-11 14:28:18 +01:00
David Peter c073d4a118 Add new image 2018-11-11 13:19:34 +01:00
sharkdp e79c5516bf Bump version, update assets 2018-11-11 12:55:38 +01:00
sharkdp 4776c2a575 Update man page 2018-11-11 12:31:28 +01:00
sharkdp f98a96c1ed Update help text 2018-11-11 12:26:39 +01:00
sharkdp 8a3446d219 Update dependencies 2018-11-11 12:17:58 +01:00
David Peter 5d5bf616ca Update README.md 2018-11-11 12:17:15 +01:00
sharkdp b68c038db8 Update link to new issue 2018-11-11 11:08:08 +01:00
dependabot[bot] 1117d2f9cb Bump syntect from 3.0.1 to 3.0.2
Bumps [syntect](https://github.com/trishume/syntect) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/trishume/syntect/releases)
- [Changelog](https://github.com/trishume/syntect/blob/master/CHANGELOG.md)
- [Commits](https://github.com/trishume/syntect/compare/v3.0.1...v3.0.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-11 11:08:08 +01:00
David Peter d0ba5bcb32 Wording 2018-11-11 11:07:55 +01:00
Ricky f8d39d5624 Resolving requested changes 2018-11-11 11:07:55 +01:00
Ricky 9998e2eac6 Initial commit of updated README for config file formatting 2018-11-11 11:07:55 +01:00
sharkdp 7cac07d845 issue #383: Handle cases like PAGER=/usr/bin/bat 2018-11-06 19:53:32 +01:00
Rodrigo Orem 148caa1381 Fix code style 2018-11-06 19:35:41 +01:00
Rodrigo Orem ab27cac0cc Remove args when change from bat to less 2018-11-06 19:35:41 +01:00
Rodrigo Orem 01fcbf2183 Better placement of bat detection 2018-11-06 19:35:41 +01:00
Rodrigo Orem 8a0c30b385 Avoid endless bat executions with PAGER="bat"
From issue #383
2018-11-06 19:35:41 +01:00
Dany Marcoux bc21c4d0e0 Add openSUSE installation instructions 2018-11-06 19:21:33 +01:00
dependabot[bot] 0800562ba2 Bump content_inspector from 0.2.3 to 0.2.4
Bumps [content_inspector](https://github.com/sharkdp/content_inspector) from 0.2.3 to 0.2.4.
- [Release notes](https://github.com/sharkdp/content_inspector/releases)
- [Commits](https://github.com/sharkdp/content_inspector/compare/v0.2.3...v0.2.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-05 19:37:58 +01:00
sharkdp 1f9befbcd1 Update SHA1 in TOML submodule 2018-11-05 19:37:23 +01:00
sharkdp a5c779c518 Update path to TOML syntax remote 2018-11-05 19:23:44 +01:00
dependabot[bot] f37f100352 Bump lazy_static from 1.1.0 to 1.2.0
Bumps [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/rust-lang-nursery/lazy-static.rs/releases)
- [Commits](https://github.com/rust-lang-nursery/lazy-static.rs/compare/1.1.0...1.2.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-05 07:22:39 +01:00
Nisheet Sinvhal 18d1a3b973 Changed italics to use-italic-text in config
Better placing of italics in help and also added long_help for it
2018-11-04 19:40:05 +01:00
Nisheet Sinvhal dc10246bd2 Linting 2018-11-04 19:40:05 +01:00
Nisheet Sinvhal 44bdae0212 Linting 2018-11-04 19:40:05 +01:00
Nisheet Sinvhal 1ece38a4c4 Changed flag name 2018-11-04 19:40:05 +01:00
Nisheet Sinvhal e90308e1f8 italics enable|disable working 2018-11-04 19:40:05 +01:00
Nisheet Sinvhal d702d6740c Added args 2018-11-04 19:40:05 +01:00
sharkdp c6a526f99c Run 'cargo run' only once 2018-11-04 12:24:56 +01:00
sharkdp 278d841408 Move '--paging' arg to config file. 2018-11-04 11:19:49 +01:00
sharkdp 5f576f1ecf Remove all relevant environment variables during testing 2018-11-04 11:19:49 +01:00
sharkdp 48c6ea6b25 Simplify integration test setup 2018-11-04 11:19:49 +01:00
Ricky 558134f6c8 Changed to unwrap methods, added integration tests 2018-11-04 11:19:49 +01:00
Ricky 1dd57e6d7e Ran rust fmt 2018-11-04 11:19:49 +01:00
Ricky 20ba84d1fa Added in environment variable and the result is a file check in config.rs 2018-11-04 11:19:49 +01:00
sharkdp e81f9b23e6 Fix --show-all for UTF-16 encoding 2018-11-01 22:00:47 +01:00
sharkdp 50dc4a79b0 Display line-feed as instead of 2018-11-01 22:00:47 +01:00
sharkdp 8fa8f44706 Use character if tab-width == 1. 2018-11-01 22:00:47 +01:00
sharkdp ecd862d9ff Feature: Highlight non-printable characters
Adds a new `-A`/`--show-all` option (in analogy to GNU Linux `cat`s option) that
highlights non-printable characters like space, tab or newline.

This works in two steps:
- **Preprocessing**: replace space by `•`, replace tab by `├──┤`, replace
newline by `␤`, etc.
- **Highlighting**: Use a newly written Sublime syntax to highlight
these special symbols.

Note: This feature is not technically a drop-in replacement for GNU `cat`s
`--show-all` but it has the same purpose.
2018-11-01 22:00:47 +01:00
sharkdp cbed338c3a Remove generation code for tabs_ tests 2018-11-01 15:30:58 +01:00
sharkdp 4492d99556 Change default tab width to 4 2018-11-01 15:30:58 +01:00
sharkdp d96ee2261f Remove tab-related text 2018-11-01 15:30:58 +01:00
sharkdp dda27b253b Allow offset values in --terminal-width
Allows the `width` argument to `--terminal-width` to be an offset
instead of an absolute number. Examples:

    --terminal-width=80   # Set output width to 80 characters
    --terminal-width=-2   # Set output width to actual_width - 2

closes #376
2018-10-31 22:21:22 +01:00
sharkdp 78f26d0caf Temporarily disable shipping of shell completions
closes #372
2018-10-31 22:03:05 +01:00
David Peter abcd09f869 Remove commented-out code 2018-10-21 22:52:26 +02:00
Sindre Johansen 41a5ff039b Only use the last argument of {style,plain,number} 2018-10-21 22:52:26 +02:00
Sindre Johansen 155bad3862 Rustfmt 2018-10-21 22:52:26 +02:00
Sindre Johansen 7c98a1c901 When specifying style multiple times the last occurence wins
Closes: #367
2018-10-21 22:52:26 +02:00
David Peter c1246fcd53 Update help text 2018-10-21 22:42:11 +02:00
David Peter 9f401ea122 Update docstring 2018-10-21 22:42:11 +02:00
Park Juhyung 9c782fb692 Fix format error 2018-10-21 22:42:11 +02:00
Park Juhyung 154186a58d Add --pager option 2018-10-21 22:42:11 +02:00
David Peter b22a9f8fe3 Update README.md 2018-10-20 14:56:25 +02:00
David Peter 5219c40ed8 PAGER: Wrapper script is not needed anymore 2018-10-20 14:54:44 +02:00
sharkdp a25ee0e6fd Add sublime-snazzy theme 2018-10-20 11:32:25 +02:00
sharkdp 496e0bc046 Allow for multiple line ranges
See #23
2018-10-20 10:44:13 +02:00
sharkdp 7082fd09f0 Modify TravisCI caching policy 2018-10-19 23:06:25 +02:00
David Peter 857cc215b4 Move link to header line 2018-10-19 22:00:05 +02:00
yobrave 481268f018 Doc: add Chinese readme link
#251
2018-10-19 22:00:05 +02:00
sharkdp f7d9f49503 Remove leftovers from tab-tests 2018-10-19 21:57:35 +02:00
Lawrence Chou 88fcfd76aa cargo fmt 2018-10-19 21:04:46 +02:00
Lawrence Chou 76e34b29ec Avoid empty line in snapshot 2018-10-19 21:04:46 +02:00
Lawrence Chou 01984e1d02 Test 'tabs' with 'numbers' 2018-10-19 21:04:46 +02:00
Lawrence Chou 536390509f remove --wrap for now 2018-10-19 21:04:46 +02:00
Lawrence Chou 58198d0700 rewrite 6 snapshot tests as integration test 2018-10-19 21:04:46 +02:00
Lawrence Chou afc5aacb28 Move tabs_* snapshot tests to integration_tests 2018-10-19 21:04:46 +02:00
Taylor cea05e9f22 be consistent 2018-10-10 22:19:40 -06:00
sharkdp 2a7851530d Fix formatting 2018-10-10 20:45:10 +02:00
Taylor 1a6709c2cb add line highlight 2018-10-09 22:25:33 -06:00
236 changed files with 15993 additions and 3332 deletions
+39
View File
@@ -0,0 +1,39 @@
---
name: Bug Report
about: Report a bug.
title: ""
labels: bug
assignees: ''
---
<!--
Hey there, thanks for creating an issue!
In order to reproduce your issue, we might need to know a little bit more about the environment
which you're running `bat` on.
If you're on Linux or MacOS:
Please run the script at https://github.com/sharkdp/bat/blob/master/diagnostics/info.sh and
paste the output at the bottom of the bug report.
If you're on Windows:
Please tell us about your Windows Version (e.g. "Windows 10 1908") at the
bottom of the bug report.
-->
**What version of `bat` are you using?**
[paste the output of `bat --version` here]
**Describe the bug you encountered:**
...
**Describe what you expected to happen?**
...
**How did you install `bat`?**
apt-get, homebrew, GitHub release, etc.
---
[paste the output of `info.sh` here]
+2
View File
@@ -0,0 +1,2 @@
blank_issues_enabled: true
+10
View File
@@ -0,0 +1,10 @@
---
name: Feature Request
about: Suggest an idea for this project.
title: ''
labels: feature-request
assignees: ''
---
+10
View File
@@ -0,0 +1,10 @@
---
name: Question
about: Ask a question about 'bat'.
title: ''
labels: question
assignees: ''
---
+29
View File
@@ -0,0 +1,29 @@
---
name: Syntax Request
about: Request adding a new syntax to bat.
title: ""
labels: syntax-request
assignees: ''
---
<!--
BEFORE YOU MAKE A REQUEST:
Are you looking to add a new syntax to use on one of your devices?
Bat supports locally-installed language definitions. See the link below:
https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions
If you think adding this syntax would help others as well, please make sure that it meets our
guidelines for adding new syntaxes:
- 10,000 downloads on packagecontrol.io
-->
**Syntax:**
[Name or description of the syntax/language here]
**Guideline Criteria:**
[packagecontro.io link here]
+5 -1
View File
@@ -1,3 +1,7 @@
/target/ /target/
**/*.rs.bk **/*.rs.bk
# Generated files
/assets/completions/bat.fish
/assets/manual/bat.1
/assets/metadata.yaml
+120 -26
View File
@@ -1,32 +1,32 @@
[submodule "assets/syntaxes/Elixir"] [submodule "assets/syntaxes/Elixir"]
path = assets/syntaxes/Elixir path = assets/syntaxes/02_Extra/Elixir
url = https://github.com/princemaple/elixir-sublime-syntax/ url = https://github.com/princemaple/elixir-sublime-syntax/
[submodule "assets/syntaxes/Packages"] [submodule "assets/syntaxes/Packages"]
path = assets/syntaxes/Packages path = assets/syntaxes/01_Packages
url = https://github.com/sublimehq/Packages/ url = https://github.com/sublimehq/Packages/
[submodule "assets/syntaxes/TOML"] [submodule "assets/syntaxes/TOML"]
path = assets/syntaxes/TOML path = assets/syntaxes/02_Extra/TOML
url = https://github.com/sharkdp/sublime_toml_highlighting url = https://github.com/jasonwilliams/sublime_toml_highlighting
[submodule "assets/syntaxes/Julia"] [submodule "assets/syntaxes/Julia"]
path = assets/syntaxes/Julia path = assets/syntaxes/02_Extra/Julia
url = https://github.com/JuliaEditorSupport/Julia-sublime url = https://github.com/JuliaEditorSupport/Julia-sublime
[submodule "assets/themes/sublime-monokai-extended"] [submodule "assets/themes/sublime-monokai-extended"]
path = assets/themes/sublime-monokai-extended path = assets/themes/sublime-monokai-extended
url = https://github.com/jonschlinkert/sublime-monokai-extended url = https://github.com/jonschlinkert/sublime-monokai-extended
[submodule "assets/syntaxes/Docker"] [submodule "assets/syntaxes/Docker"]
path = assets/syntaxes/Docker path = assets/syntaxes/02_Extra/Docker
url = https://github.com/asbjornenge/Docker.tmbundle url = https://github.com/asbjornenge/Docker.tmbundle
[submodule "assets/syntaxes/VimL"] [submodule "assets/syntaxes/VimL"]
path = assets/syntaxes/VimL path = assets/syntaxes/02_Extra/VimL
url = https://github.com/SalGnt/Sublime-VimL url = https://github.com/SalGnt/Sublime-VimL
[submodule "assets/syntaxes/INI"] [submodule "assets/syntaxes/INI"]
path = assets/syntaxes/INI path = assets/syntaxes/02_Extra/INI
url = https://github.com/clintberry/sublime-text-2-ini url = https://github.com/clintberry/sublime-text-2-ini
[submodule "assets/syntaxes/CMake"] [submodule "assets/syntaxes/CMake"]
path = assets/syntaxes/CMake path = assets/syntaxes/02_Extra/CMake
url = https://github.com/zyxar/Sublime-CMakeLists url = https://github.com/zyxar/Sublime-CMakeLists
[submodule "assets/syntaxes/LESS"] [submodule "assets/syntaxes/LESS"]
path = assets/syntaxes/LESS path = assets/syntaxes/02_Extra/LESS
url = https://github.com/danro/LESS-sublime url = https://github.com/danro/LESS-sublime
[submodule "assets/themes/DarkNeon"] [submodule "assets/themes/DarkNeon"]
path = assets/themes/DarkNeon path = assets/themes/DarkNeon
@@ -41,56 +41,150 @@
path = assets/themes/TwoDark path = assets/themes/TwoDark
url = https://github.com/erremauro/TwoDark url = https://github.com/erremauro/TwoDark
[submodule "assets/syntaxes/AWK"] [submodule "assets/syntaxes/AWK"]
path = assets/syntaxes/AWK path = assets/syntaxes/02_Extra/AWK
url = https://github.com/JohnNilsson/awk-sublime url = https://github.com/JohnNilsson/awk-sublime
[submodule "assets/syntaxes/Nix"] [submodule "assets/syntaxes/Nix"]
path = assets/syntaxes/Nix path = assets/syntaxes/02_Extra/Nix
url = https://github.com/wmertens/sublime-nix url = https://github.com/wmertens/sublime-nix
[submodule "assets/themes/zenburn"] [submodule "assets/themes/zenburn"]
path = assets/themes/zenburn path = assets/themes/zenburn
url = https://github.com/colinta/zenburn.git url = https://github.com/colinta/zenburn.git
[submodule "assets/syntaxes/Kotlin"] [submodule "assets/syntaxes/Kotlin"]
path = assets/syntaxes/Kotlin path = assets/syntaxes/02_Extra/Kotlin
url = https://github.com/vkostyukov/kotlin-sublime-package url = https://github.com/vkostyukov/kotlin-sublime-package
[submodule "assets/syntaxes/Elm"] [submodule "assets/syntaxes/Elm"]
path = assets/syntaxes/Elm path = assets/syntaxes/02_Extra/Elm
url = https://github.com/elm-community/SublimeElmLanguageSupport url = https://github.com/elm-community/SublimeElmLanguageSupport
[submodule "assets/syntaxes/TypeScript"] [submodule "assets/syntaxes/TypeScript"]
path = assets/syntaxes/TypeScript path = assets/syntaxes/02_Extra/TypeScript
url = https://github.com/Microsoft/TypeScript-Sublime-Plugin url = https://github.com/Microsoft/TypeScript-Sublime-Plugin
[submodule "assets/syntaxes/Puppet"] [submodule "assets/syntaxes/Puppet"]
path = assets/syntaxes/Puppet path = assets/syntaxes/02_Extra/Puppet
url = https://github.com/russCloak/SublimePuppet url = https://github.com/russCloak/SublimePuppet
[submodule "assets/syntaxes/CSV"] [submodule "assets/syntaxes/CSV"]
path = assets/syntaxes/CSV path = assets/syntaxes/02_Extra/CSV
url = https://github.com/wadetb/Sublime-Text-Advanced-CSV url = https://github.com/wadetb/Sublime-Text-Advanced-CSV
[submodule "assets/themes/onehalf"] [submodule "assets/themes/onehalf"]
path = assets/themes/onehalf path = assets/themes/onehalf
url = https://github.com/sonph/onehalf url = https://github.com/sonph/onehalf
[submodule "assets/syntaxes/JavaScript (Babel)"] [submodule "assets/syntaxes/JavaScript (Babel)"]
path = assets/syntaxes/JavaScript (Babel) path = assets/syntaxes/02_Extra/JavaScript (Babel)
url = https://github.com/babel/babel-sublime url = https://github.com/babel/babel-sublime
[submodule "assets/syntaxes/Cabal"] [submodule "assets/syntaxes/Cabal"]
path = assets/syntaxes/Cabal path = assets/syntaxes/02_Extra/Cabal
url = https://github.com/SublimeHaskell/SublimeHaskell url = https://github.com/SublimeHaskell/SublimeHaskell
[submodule "assets/syntaxes/Dart"] [submodule "assets/syntaxes/Dart"]
path = assets/syntaxes/Dart path = assets/syntaxes/02_Extra/Dart
url = https://github.com/guillermooo/dart-sublime-bundle url = https://github.com/guillermooo/dart-sublime-bundle
[submodule "assets/syntaxes/FSharp"] [submodule "assets/syntaxes/FSharp"]
path = assets/syntaxes/FSharp path = assets/syntaxes/02_Extra/FSharp
url = https://github.com/hoest/sublimetext-fsharp url = https://github.com/hoest/sublimetext-fsharp
[submodule "assets/syntaxes/PureScript"] [submodule "assets/syntaxes/PureScript"]
path = assets/syntaxes/PureScript path = assets/syntaxes/02_Extra/PureScript
url = https://github.com/tellnobody1/sublime-purescript-syntax url = https://github.com/tellnobody1/sublime-purescript-syntax
[submodule "assets/syntaxes/Swift"] [submodule "assets/syntaxes/Swift"]
path = assets/syntaxes/Swift path = assets/syntaxes/02_Extra/Swift
url = https://github.com/quiqueg/Swift-Sublime-Package url = https://github.com/quiqueg/Swift-Sublime-Package
[submodule "assets/syntaxes/Crystal"] [submodule "assets/syntaxes/Crystal"]
path = assets/syntaxes/Crystal path = assets/syntaxes/02_Extra/Crystal
url = https://github.com/crystal-lang-tools/sublime-crystal.git url = https://github.com/crystal-lang-tools/sublime-crystal.git
[submodule "assets/syntaxes/PowerShell"] [submodule "assets/syntaxes/PowerShell"]
path = assets/syntaxes/PowerShell path = assets/syntaxes/02_Extra/PowerShell
url = https://github.com/PowerShell/EditorSyntax url = https://github.com/PowerShell/EditorSyntax
[submodule "assets/syntaxes/Robot"] [submodule "assets/syntaxes/Robot"]
path = assets/syntaxes/Robot path = assets/syntaxes/02_Extra/Robot
url = https://github.com/andriyko/sublime-robot-framework-assistant.git url = https://github.com/andriyko/sublime-robot-framework-assistant.git
[submodule "assets/themes/sublime-snazzy"]
path = assets/themes/sublime-snazzy
url = https://github.com/greggb/sublime-snazzy
[submodule "assets/syntaxes/AsciiDoc"]
path = assets/syntaxes/02_Extra/AsciiDoc
url = https://github.com/SublimeText/AsciiDoc.git
[submodule "assets/syntaxes/Assembly (ARM)"]
path = assets/syntaxes/02_Extra/Assembly (ARM)
url = https://github.com/tvi/Sublime-ARM-Assembly
[submodule "assets/syntaxes/syslog-syntax"]
path = assets/syntaxes/02_Extra/Syslog
url = https://github.com/caos21/syslog-syntax.git
branch = master
[submodule "assets/syntaxes/protobuf-syntax-highlighting"]
path = assets/syntaxes/02_Extra/Protobuf
url = https://github.com/VcamX/protobuf-syntax-highlighting.git
branch = master
[submodule "assets/syntaxes/Terraform"]
path = assets/syntaxes/02_Extra/Terraform
url = https://github.com/alexlouden/Terraform.tmLanguage.git
[submodule "assets/syntaxes/Jsonnet"]
path = assets/syntaxes/02_Extra/Jsonnet
url = https://github.com/gburiola/sublime-jsonnet-syntax.git
[submodule "assets/syntaxes/varlink"]
path = assets/syntaxes/02_Extra/varlink
url = https://github.com/varlink/syntax-highlight-varlink.git
[submodule "assets/syntaxes/sublime-fish"]
path = assets/syntaxes/02_Extra/Fish
url = https://github.com/Phidica/sublime-fish.git
[submodule "assets/syntaxes/Org mode"]
path = assets/syntaxes/02_Extra/Org mode
url = https://github.com/jezcope/Org.tmbundle.git
[submodule "assets/syntaxes/requirementstxt"]
path = assets/syntaxes/02_Extra/requirementstxt
url = https://github.com/wuub/requirementstxt
[submodule "assets/syntaxes/DotENV"]
path = assets/syntaxes/02_Extra/DotENV
url = https://github.com/zaynali53/DotENV
[submodule "assets/syntaxes/hosts"]
path = assets/syntaxes/02_Extra/hosts
url = https://github.com/brandonwamboldt/sublime-hosts
[submodule "assets/syntaxes/ssh-config"]
path = assets/syntaxes/02_Extra/ssh-config
url = https://github.com/robballou/sublimetext-sshconfig.git
[submodule "assets/syntaxes/GraphQL"]
path = assets/syntaxes/02_Extra/GraphQL
url = https://github.com/dncrews/GraphQL-SublimeText3.git
[submodule "assets/syntaxes/Verilog"]
path = assets/syntaxes/02_Extra/Verilog
url = https://github.com/pro711/sublime-verilog
[submodule "assets/syntaxes/SCSS_Sass"]
path = assets/syntaxes/02_Extra/SCSS_Sass
url = https://github.com/braver/SublimeSass
[submodule "assets/syntaxes/Strace"]
path = assets/syntaxes/02_Extra/Strace
url = https://github.com/djuretic/SublimeStrace
[submodule "assets/syntaxes/Jinja2"]
path = assets/syntaxes/02_Extra/Jinja2
url = https://github.com/Martin819/sublime-jinja2
[submodule "assets/syntaxes/SLS"]
path = assets/syntaxes/02_Extra/SLS
url = https://github.com/saltstack/sublime-text
branch = master
[submodule "assets/themes/dracula-sublime"]
path = assets/themes/dracula-sublime
url = https://github.com/dracula/sublime.git
[submodule "assets/syntaxes/HTML (Twig)"]
path = assets/syntaxes/02_Extra/HTML (Twig)
url = https://github.com/Anomareh/PHP-Twig.tmbundle.git
[submodule "assets/themes/Nord-sublime"]
path = assets/themes/Nord-sublime
url = https://github.com/crabique/Nord-plist.git
[submodule "assets/syntaxes/Vue"]
path = assets/syntaxes/02_Extra/Vue
url = https://github.com/vuejs/vue-syntax-highlight.git
branch = new
[submodule "assets/syntaxes/CoffeeScript"]
path = assets/syntaxes/02_Extra/CoffeeScript
url = https://github.com/sustained/CoffeeScript-Sublime-Plugin
[submodule "assets/syntaxes/02_Extra/Stylus"]
path = assets/syntaxes/02_Extra/Stylus
url = https://github.com/billymoon/Stylus
[submodule "assets/themes/Solarized"]
path = assets/themes/Solarized
url = https://github.com/braver/Solarized
[submodule "assets/syntaxes/02_Extra/Fortran"]
path = assets/syntaxes/02_Extra/Fortran
url = https://github.com/315234/SublimeFortran
[submodule "assets/syntaxes/02_Extra/Email"]
path = assets/syntaxes/02_Extra/Email
url = https://github.com/mariozaizar/email.sublime-syntax.git
[submodule "assets/syntaxes/02_Extra/QML"]
path = assets/syntaxes/02_Extra/QML
url = https://github.com/skozlovf/Sublime-QML
+12 -11
View File
@@ -1,5 +1,5 @@
language: rust language: rust
cache: cargo
matrix: matrix:
include: include:
# Stable channel. # Stable channel.
@@ -32,24 +32,25 @@ matrix:
# Minimum Rust supported channel. # Minimum Rust supported channel.
- os: linux - os: linux
rust: 1.29.0 rust: 1.40.0
env: TARGET=x86_64-unknown-linux-gnu env: TARGET=x86_64-unknown-linux-gnu
- os: linux - os: linux
rust: 1.29.0 rust: 1.40.0
env: env:
- TARGET=x86_64-unknown-linux-musl - TARGET=x86_64-unknown-linux-musl
- CC_x86_64_unknown_linux_musl=/usr/bin/musl-gcc - CC_x86_64_unknown_linux_musl=/usr/bin/musl-gcc
- os: osx - os: osx
rust: 1.29.0 rust: 1.40.0
env: TARGET=x86_64-apple-darwin env: TARGET=x86_64-apple-darwin
# Code formatting check # Disable nightly for now
- os: linux # # Code formatting check
rust: nightly # - os: linux
# skip the global install step # rust: nightly
install: # # skip the global install step
- cargo install --debug --force rustfmt-nightly # install:
script: cargo fmt -- --check # - cargo install --debug --force rustfmt-nightly
# script: cargo fmt -- --check
sudo: required sudo: required
+691
View File
@@ -0,0 +1,691 @@
# unreleased
## Features
## Bugfixes
## Other
## New syntaxes
## New themes
## `bat` as a library
## Packaging
# v0.15.2
## Bugfixes
- bat mishighlights Users that start with digits in SSH config, see #984
- `--map-syntax` doesn't work with names provided through `--file-name` (@eth-p)
- Fix syntax detection for files called 'rails', see #1008
- Fix potential errors with syntax detection for symlinked files, see #1001
## Other
- Add padding above headers when not using a grid, see #968 and #981 (@pt2121)
- bat now prints an error if an invalid syntax is specified via `-l` or `--map-syntax`, see #1004 (@eth-p)
## New syntaxes
- SML, see #1005 (@kopecs)
## New themes
## `bat` as a library
- `PrettyPrinter::vcs_modification_markers` has been marked deprecated when building without the `git` feature, see #997 and #1020 (@eth-p, @sharkdp)
## Packaging
- Compilation problems with `onig_sys` on various platforms have been resolved by upgrading to `syntect 4.2`, which includes a new `onig` version that allows to build `onig_sys` without the `bindgen` dependency. This removes the need for `libclang(-dev)` to be installed to compile `bat`. Package maintainers might want to remove `clang` as a build dependency. See #650 for more details.
# v0.15.1
## Bugfixes
- Fix highlighting of Markdown files, see #963 and #977
- Fix `base16` theme (was broken since in v0.14), see #972, #934 and #979 (@mk12).
Users suffering from #865 ("no color for bat in ssh from a Windows client") can use the `ansi-dark` and `ansi-light` themes from now on.
## New syntaxes
- Fortran, see #957
- Email (@mariozaizar)
- QML, see #962 (@pylipp)
# v0.15.0
## Features
- Add a new `--diff`/`-d` option that can be used to only show lines surrounding
Git changes, i.e. added, removed or modified lines. The amount of additional
context can be controlled with `--diff-context=N`. See #23 and #940
## Bugfixes
- Error message printed in the middle of the output for another file, see #946
- Performance improvements when using custom caches (via `bat cache --build`): the `bat` startup time should now be twice as fast (@lzutao).
## Themes
- Updated version of the Solarized dark/light themes, see #941
## `bat` as a library
- There are a few changes in the "low level" API (the `Config` struct has changed and
the error handler needs a new `&mut dyn Write` argument). The high-level API is not
affected.
# v0.14.0
## Features
- Added a new `--file-name <name>…` option to overwrite the displayed filename(s)
in the header. This is useful when piping input into `bat`. See #654 and #892 (@neuronull).
- Added a new `--generate-config-file` option to create an initial configuration file
at the right place. See #870 (@jmick414)
## Bugfixes
- Performance problems with C# source code have been fixed, see #677 (@keith-hall)
- Performance problems with Makefiles have been fixed, see #750 (@keith-hall)
- Fix bug when highlighting Ruby files with unindented heredocs, see #914 (@keith-hall)
- A highlighting problem with Rust source code has been fixed, see #924 (@keith-hall)
- Windows: short files that do not require paging are displayed and then lost, see #887
- `--highlight-line` did not work correctly in combination with `--tabs=0` and `--wrap=never`,
see #937
## Other
- When saving/reading user-provided syntaxes or themes, `bat` will now maintain a
`metadata.yaml` file which includes information about the `bat` version which was
used to create the cached files. When loading cached files, we now print an error
if they have been created with an incompatible version. See #882
- Updated `liquid` dependency to 0.20, see #880 (@ignatenkobrain)
## `bat` as a library
- A completely new "high level" API has been added that is much more convenient
to use. See the `examples` folder for the updated code. The older "low level"
API is still available (basically everything that is not in the root `bat`
module), but has been refactored quite a bit. It is recommended to only use
the new "high level" API, if possible. This will be much easier to keep stable.
Note that this should still be considered a "beta" release of `bat`-as-a-library.
For more details and some screenshots of the example programs, see #936.
- Stripped out a lot of binary-only dependencies, see #895 and #899 (@dtolnay)
This introduces a `features = ["application"]` which is enabled by default and pulls in
everything required by `bat` the application. When depending on bat as a library, downstream
`Cargo.toml` should disable this feature to cut out inapplicable heavy dependencies:
``` toml
[dependencies]
bat = { version = "0.14", default-features = false }
```
Other optional functionality has also been put behind features: `paging` and `git` support.
- Allow using the library with older syntect, see #896 and #898 (@dtolnay)
## New syntaxes
- Rego, see #872 (@patrick-east)
- Stylo, see #917
# v0.13.0
## `bat` as a library
Beginning with this release, `bat` can be used as a library (#423).
This was a huge effort and I want to thank all people who made this possible: @DrSensor, @mitsuhiko, @mre, @eth-p!
- Initial attempt in #469 (@mitsuhiko)
- Second attempt, complete restructuring of the `bat` crate, see #679 (@DrSensor)
- Updates to example, public API, error handling, further refactoring: #693 #873 #875 (@sharkdp)
I want to stress that this is the very first release of the library. Things are very likely to change. A lot of things are still missing (including the documentation).
That being said, you can start using it! See the example programs in [`examples/`](https://github.com/sharkdp/bat/tree/master/examples).
You can see the API documentation here: https://docs.rs/bat/
## Features
- (**Breaking change**) Glob-based syntax mapping, see #877 and #592. With this change,
users need to update their bat config files (`bat --config-file`), if they have any `--map-syntax` settings
present.
The option now works like this:
```bash
--map-syntax <glob-pattern>:<syntax-name>
```
For more information, see the `--help` text, the man page or the README.
This new feature allows us to properly highlight files like:
* `/etc/profile`
* `~/.ssh/config`
- `--highlight-line` now accepts line ranges, see #809 (@lkalir)
- Proper wrapping support for output with wide Unicode characters, see #811 #787 and #815 (@Kogia-sima)
- A lot of updates to existing syntaxes via #644 (@benwaffle, @keith-hall)
- `BAT_CACHE_PATH` can be used to place cached `bat` assets in a non-standard path, see #829 (@neuronull)
- Support combination of multiple styles at the same time, see #857 (@aslpavel)
## Bugfixes
- Do not pass '--no-init' on newer less versions, see #749 and #786 (@sharkdp)
- 'bat cache' still takes precedence over existing files, see #666 (@sharkdp)
- `.sc` files should be treated as scala files, see #443 (@benwaffle)
- Allow underscores and dashes in page names, see #670 (@LunarLambda)
- Keep empty lines empty, see #601 (@mbarbar)
- Wrapping does not work when piping, see #758 (@fusillicode, @allevo, @gildo)
- Allow for non-unicode filenames, see #225 (@sharkdp)
- Empty file without header produces incomplete grid, see #798 (@eth-p)
- Files named `build` don't respect shebang lines, see #685 (@sharkdp)
## Other
- Parametrizable names for man page and shell completion files, see #659 #673 #656 (@eth-p)
- Enabled LTO, making `bat` about 10% faster, see #719 (@bolinfest, @sharkdp)
- Suggestions non how to configure `bat` for MacOS dark mode, see README (@jerguslejko)
- Extended ["Integration with other tools"](https://github.com/sharkdp/bat#integration-with-other-tools) section (@eth-p)
- Updated [instrutions on how to use `bat` as a `man`-pager](https://github.com/sharkdp/bat#man), see #652, see #667 (@sharkdp)
- Add section concerning file encodings, see #688 and #568 (@sharkdp)
- Updated sort order of command-line options in `--help` text and manpage, see #653 and #700 (@hrlmartins)
- Updates to the man page syntax, see #718 (@sharkdp)
- Japanese documentation updates, see #863 (@k-ta-yamada, @sorairolake and @wt-l00)
- Accept "default" as a theme, see #757 (@fvictorio)
- Updated Windows installation instructions, see #852 (@sorenbug)
- Updated man page, see #573 (@sharkdp)
## New syntaxes
- Jinja2, see #648 (@Martin819)
- SaltStack SLS, see #658 (@Martin819)
- `/etc/fstab`, see #696 (@flopp and @eth-p)
- `/etc/group` and `/etc/passwd`, see #698 (@argentite)
- `/proc/cpuinfo` and `/proc/meminfo`, see #593 (@sharkdp)
- Nim, see #542 (@sharkdp)
- Vue, see #826 (@chaaaaarlotte)
- CoffeScript, see #833 (@sharkdp)
## New themes
- Dracula, see #687 (@clarfon)
- Nord, see #760 (@crabique)
- Solarized light and dark, see #768 (@hakamadare)
## Packaging
- `bat` is now in the official Ubuntu and Debian repositories, see #323 and #705 (@MarcoFalke)
- `bat` can now be installed via MacPorts, see #675 (@bn3t)
- Install fish completions into 'vendor_completions.d', see #651 (@sharkdp)
## Thanks
- To @eth-p for joining me as a maintainer! I'm very grateful for all the work you put into
managing and responding to issues, improving our deployment, adding PR/issue templates (#837) as
well as fixing bugs and implementing new features.
# v0.12.1
## Bugfixes
- Fixes a bug for older Windows versions (*"The procedure entry point `CreateFile2` could not be located"*), see #643 (@rivy)
# v0.12.0
## Features
- Binary file content can now be viewed with `bat -A`, see #623, #640 (@pjsier and @sharkdp)
- `bat` can now be used as a man pager. Take a look at the README and #523 for more details.
- Add new style component to separate multiple `--line-range`s, see #570 (@eth-p)
- Added `-L` as an alias for `--list-languages`
## Bugfixes
- Output looks unbalanced when using '--style=grid,numbers' without 'header', see #571 (@eth-p)
- issues with filenames starting with "cache", see #584
- Can't build cache with new theme without creating cache dir, see #576 (@frm)
- `--terminal-width -10` is parsed incorrectly, see #611
## Other
- Added fish completions to DEB package, see #554
## New syntaxes
- Emacs Org mode, see #36 (@bricewge)
- `requirements.txt`
- DotENV `.env`
- SSH config syntax (`-l ssh_config`), see #582 (@issmirnov)
- `/etc/hosts`, see #583 (@issmirnov)
- GraphQL, see #625 (@dandavison)
- Verilog, see #616
- SCSS and Sass, see #637
- `strace` syntax, see #599
## Packaging
- `bat` is now in the official Gentoo repositories, see #588 (@toku-sa-n)
- `bat` is now in the official Alpine Linux repositories, see #586 (@5paceToast)
- `bat` is in the official Fedora repositories, see #610 (@ignatenkobrain)
# v0.11.0
## Features
- Three new special color themes are available: `ansi-light`, `ansi-dark` and `base16`. These
are useful for people that often switch from dark to light themes in their terminal emulator
or for people that want the colors to match their terminal theme colors. For more details,
see #543 and #490 (@mk12, implementation idea by @trishume)
- Hand-written auto completion script for Fish shell, see #524 and #555 (@ev-dev and @eth-p)
- The `-p`/`--plain` option can now be used twice (typically `-pp`). The first `-p` switches the
`--style` to "plain". The second `-p` disables the pager. See #560 and #552 (@eth-p)
## Bugfixes
- Do not replace arguments to `less` when using `--pager`, see #509
- Binary files will now be indicated by a warning in interactive mode, see #530 #466 #550 (@maxfilov)
- Empty files are (once again) printed with a single header line, see #504 and #566 (@reidwagner
and @sharkdp)
- `--terminal-width=0` is now disallowed, see #559 (@eth-p)
- Accidental printing of files named `cache`, see #557
## Other
- New integration tests, see #500 and #502 (@reidwagner and @sharkdp)
- New ["Integration with other tools"](https://github.com/sharkdp/bat#integration-with-other-tools) section in the README.
- Migrated to Rust 2018 (@expobrain)
## New syntaxes
- F# syntax has been updated, see #531 (@stroborobo)
- Fish shell, see #548 (@sanga)
## Packaging
- `bat` is now available on Chocolatey, see #541 (@rasmuskriest)
# v0.10.0
## Features
- Added new `--highlight-line <N>` option, see #453, #346 and #175 (@tskinn and @sharkdp)
## Changes
- **Change the default configuration directory on macOS** to `~/.config/bat`, see #442 (@lavifb). If you are on macOS, you need to copy your configuration directory from the previous place (`~/Library/Preferences/bat`) to the new place (`~/.config/bat`).
- Completely disabled the generation of shell completion files, see #372
- Properly set arguments to `less` if `PAGER` environment variable contains something like `less -F` (which is missing the `-R` option), see #430 (@majecty)
- Report the name of missing files, see #444 (@ufuji1984)
- Don't start pager if file doesn't exist, see #387
- Rename `bat cache --init` to `bat cache --build`, see #498
- Move the `--config-dir` and `--cache-dir` options from `bat cache` to `bat` and hide them from the help text.
## Bugfixes
- Blank line at the end of output when using `--style=plain`, see #379
- EOF must be sent twice on stdin if no other input is sent, see #477 (@reidwagner)
## New syntaxes
- Twig (@ahmedelgabri)
- `.desktop` files (@jleclanche)
- AsciiDoc (@markusthoemmes)
- Assembly (x86_64 and ARM)
- Log files (@caos21)
- Protobuf and ProtobufText (@caos21)
- Terraform (@caos21)
- Jsonnet (@hfm)
- Varlink (@haraldh)
## Other
- Added Japanese version of README (@sh-tech and @object1037)
- Code improvements (@barskern)
# v0.9.0
## Features
- A new `-A`/`--show-all` option has been added to show and highlight non-printable characters (in analogy to GNU `cat`s option):
![](https://camo.githubusercontent.com/c3e769482ef3184f6be6adaa34bdc8d19c378254/68747470733a2f2f692e696d6775722e636f6d2f324b54486859542e706e67)
see #395 and #381 for more details.
- Added `--pager` option (to configure the pager from the configuration file), see #362 (@majecty)
- Added `BAT_CONFIG_PATH` environment variable to set a non-default path for `bat`s configuration file, see #375 (@deg4uss3r)
- Allow for multiple occurences of `--style` to allow for the configuration
of styles from the config file, see #367 (@sindreij)
- Allow for multiple `--line-range` arguments, see #23
- The `--terminal-width` option can now also accept offsets, see #376
## Changes
- Use of italics is now *disabled by default* (see #389 for details). They can be
re-enabled by adding `--italic-text=always` to your configuration file.
- The default tab-width has been set to 4.
- Added new "Sublime Snazzy" theme.
- Shell completions are currently *not* shipped anymore, see #372 for details.
## Bugfixes
- Avoid endless recursion when `PAGER="bat"`, see #383 (@rodorgas)
## Other
- `bat` is now available on openSUSE, see #405 (@dmarcoux)
- Added section about the new configuration file in the README (@deg4uss3r)
- Chinese translation of README (@chinanf-boy)
- Re-written tests for `--tabs` (@choznerol)
- Speed up integration tests, see #394
# v0.8.0
## Features
- Support for a configuration file with the following simple format:
```bash
--tabs=4
--theme="Sublime Snazzy"
# A line-comment
--map-syntax .ignore:.gitignore
--map-syntax PKGBUILD:bash
--map-syntax Podfile:ruby
# Flags and options can also be on a single line:
--wrap=never --paging=never
```
The configuration file path can be accessed via `bat --config-file`. On Linux,
it is stored in `~/.config/bat/config`.
- Support for the `BAT_OPTS` environment variable with the same format as specified
above (in a single line). This takes precedence over the configuration file.
See also #310.
- Support for custom syntax mappings via the `-m`/`--max-syntax` option.
This allows users to (re)map certain file extensions or file names to an existing syntax:
``` bash
bat --map-syntax .config:json ...
```
The option can be use multiple times. Note that you can easily make these mappings permanent by using bats new configuration file.
See #169
- Support pager command-line arguments in `PAGER` and `BAT_PAGER`, see #352 (@Foxboron)
- Add support for wildcards in Windows CMD, see #309 (@zxey)
- First-line syntax detection for all input types, see #205
- Encoding support for UTF-16LE and UTF-16BE, see #285
- New syntaxes: Robot framework (@sanga)
## Changes
- Binary files are now detected and not displayed when the output goes to an interactive terminal, see #205
## Bugfixes
- JavaDoc comments break syntax highlighting in .java files, see #81
- Bat Panics on Haskell Source Code, see #314
## Other
- Better `-h` and `--help` texts.
- Updated documentation on how to configure `bat`s pager
- Updated documentation for light backgrounds, see #328 (@russtaylor)
- Generate shell completions during build, see #115 (@davideGiovannini)
- A lot of new tests have been written
- `bat` is now available via [Termux](https://termux.com/), see #341 (@fornwall)
- `bat` is now available via [nix](https://nixos.org/nix), see #344 (@mgttlinger)
- `bat` is now available via [Docker](https://hub.docker.com/r/danlynn/bat/), see #331 (@danlynn)
# v0.7.1
## Features
- Use the `ansi_colours` package by @mina86 for better true-color approximation on 8 bit color terminals, see #319 and #202.
## Bugfixes
- Bat Panics on Haskell Source Code, see #314
- Disable wrapping when `--style=plain`/`-p` is used, see #289
## Other
- Added Ansible install instructions (@aeimer)
- Added section about Cygwin to the README (@eth-p)
# v0.7.0
## Features
- Tabs are now (optionally) expanded to spaces. This can be controlled with the new
`--tabs` command-line option or the `BAT_TABS` environment variable. The
new feature also closes two bugs #166 and #184. For more information, see #302 (@eth-p).
- Added support for the `BAT_STYLE` environment variable, see #208 (@ms2300)
- Added `OneHalf` theme for terminals with a light-gray background, see #256
- Added new syntaxes for CSV, JSX in JavaScript and TypeScript, Cabal, Dart,
F#, PureScript, Swift, Crystal, PowerShell (Many Thanks to @tobenna and @mimadrid)
## Changes
- Query `git diff` only when needed, see #303 (@ShikChen)
- Disable wrapping when `--plain` is used, see #289 (@eth-p)
## Bugfixes
- Can read files named `cache`, see #275 (@BK1603)
- A lot of bugfixes for Windows, see #252, #264
- Detect `less` reliably and in a portable way, see #271 and #290 (@Aankhen)
- last decoration line is not formatted properly with `--wrap never`, see #299 (@Rogach)
- Do not show file header for directories, see #292
## Other
- Enabled a new `aarch64` build target, see #258 (@rachitchokshi)
- Provide Debian packages for `armhf`, see #280 (@rachitchokshi)
- Added README section about "`bat` on Windows" (@Aankhen)
- Windows installation via scoop (@meltinglava)
# v0.6.1
## Bugfixes
- Fixed panic when running `bat --list-languages | head`, see #232 (@mchlrhw)
- Respect `--color` settings for `--list-themes` and `--list-languages`, see #233
- Git modifications now work on Windows
## Other
- There will be auto-generated Windows releases, starting with this version (@anykao)
# v0.6.0
## Features
- The `--list-themes` option now shows a preview for each highlighting theme (@ms2300)
- Added `-p`/`--plain` as an alias for `--style=plain`, see #212 (@ms2300)
- Major refactorings, enabling some progress on #150. In non-interactive mode, `bat` will now copy input bytes 1:1.
- New languages: Elm, Kotlin, Puppet, TypeScript, see #215 #216 #217 #218
- New syntax highlighting theme: zenburn (@colindean)
## Changes
- New themes in `$BAT_CONFIG_DIR/themes` are now loaded *in addition* to
the default themes (they may also override), see #172
- The `Default.tmTheme` symlink is not necessary anymore.
## Bugfixes
* Using `bat cache --init` leads to duplicated syntaxes, see #206
## Other
* Extended and cleaned-up `--help` text.
* Added initial version of a man page, see #52
* New README sections: *Development* and *Troubleshooting*, see #220
# v0.5.0
## Features
- Added `--line-range n:m` option to print a range of lines, see #159 (@tskinn)
- The syntax highlighting theme can now be controlled by the `BAT_THEME` environment variable, see [README](https://github.com/sharkdp/bat#highlighting-theme) and #177 (@mandx)
- The `PAGER` and `BAT_PAGER` environment variables can be used to control the pager that `bat` uses, see #158 and the [new README section](https://github.com/sharkdp/bat#using-a-different-pager)
- Added syntax highlighting for Nix, see #180
- Added syntax highlighting for AWK (Gert Hulselmans)
## Changes
- The customization of syntax sets and theme sets is now separated. Syntax definitions are now loaded *in addition* to the ones that are stored in the `bat` binary by default. Please refer to these new sections in the README: [Adding new syntaxes](https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions), [Adding new themes](https://github.com/sharkdp/bat#adding-new-themes), also see #172
- The color for the filename is now the default foreground color. The colors for the grid and the line numbers is now determined from the syntax highlighting theme, which now also works for light backgrounds, see #178.
## Bugfixes
- Escape Sequences get partially stripped, see #182 (@eth-p)
- Use separate Git repository for snapshot testing, see #165 and #161
- Markdown breaking on JavaScript, see #183
## Other
- Binaries for armv7 are now provided, see #196
- `bat` is now in the official [Arch package repositories](https://www.archlinux.org/packages/community/x86_64/bat/).
- Optimizations in the RGB => 8-bit conversion (@mina86)
# v0.4.1
(this is just a small bugfix release, see 0.4.0 for all features and changes)
## Bugfixes
- Fix problem with `cargo test` when `bat` is not checked out in a Git repository, see #161
# v0.4.0
## Features
* Support for line-wrapping, see #54 and #102 (@eth-p)
* New and updated `--style` parameter, see #74 and README (@pitkley)
* Added `--theme` and `--list-themes` options, see #89 (@rleungx)
* Added syntax highlighting for: Julia (@iamed2), Dockerfiles, VimL, CMake, INI, Less
* Added a few popular Sublime Text highlighting themes, see #133
* Support for bold, italic and underline font styles, see #96
* Support for 32bit systems is now available, see #84
* Added `-u` and `-n` options, see #134
* ANSI color support on Windows 10
## Changes
* The customization folder for own syntaxes has been renamed from `syntax` to `syntaxes`, see README.
* Changed Markdown syntax to the default Sublime Text syntax, see #157
* Sorted language listing (@rleungx)
* Command line arguments like `--theme` or `--color` can now override themselves.
* Improved `--help` text.
## Bugfixes
- Fixed crash for (really) small terminal sizes, see #117 (@eth-p)
- Syntax detection for `.bashrc`, `CMakeLists.txt` etc., see #100
- Properly handle lines with invalid UTF-8, see #7 (@BrainMaestro)
- Better error handling, see #17 (@rleungx and @sharkdp)
- Proper handling of UTF-8 characters in `less`, see #98 (@ghuls)
- Build fix on nightly, see #148 (@tathanhdinh)
## Other
- [Comparison with alternative projects](https://github.com/sharkdp/bat/blob/master/doc/alternatives.md).
- New "bat" logo in the README, see #119 (@jraulhernandezi)
- Output test cases (@BrainMaestro)
- Lots of great refactoring work (@BrainMaestro)
# v0.3.0
## Features
* Automatic paging by integrating with `less`, see #29 (@BrainMaestro)
* Added support for reading from standard input, see #2
* Added support for writing to non-interactive terminals (pipes, files, ..); new
`--color=auto/always/never` option, see #26 (@BrainMaestro)
* Added `--list-languages` option to print all available syntaxes, see #69 (@connorkuehl)
* New option to specify the syntax via `-l`/`--language`, see #19 (@BrainMaestro)
* New option to control the output style (`--style`), see #5 (@nakulcg)
* Added syntax highlighting support for TOML files, see #37
## Changes
* The `init-cache` sub-command has been removed. The cache can now be controlled via
`bat cache`. See `bat cache -h` for all available commands.
## Bug fixes
* Get git repository from file path instead of current directory, see #22 (@nakulcg)
* Process substitution can now be used with bat (`bat <(echo a) <(echo b)`), see #80
## Thanks
I'd like to say a big THANK YOU to all contributors and everyone that has given us
some form of feedback.
Special thanks go to @BrainMaestro for his huge support with new features, bug reports
and code reviews!
# v0.2.3
- Added a new statically linked version of bat (`..-musl-..`)
# v0.2.2
- Remove openssl dependency completely, see #30.
# v0.2.1
- Added Elixir syntax, see #25.
- Use libcurl-openssl instead of libcurl-gnutls, see #30.
# v0.2.0
- Support for custom syntaxes, add 'Markdown extended' theme
- Bugfix: Git modifications not shown from child folder
# v0.1.0
Initial release
Generated
+849 -411
View File
File diff suppressed because it is too large Load Diff
+48 -16
View File
@@ -7,48 +7,80 @@ license = "MIT/Apache-2.0"
name = "bat" name = "bat"
readme = "README.md" readme = "README.md"
repository = "https://github.com/sharkdp/bat" repository = "https://github.com/sharkdp/bat"
version = "0.8.0" version = "0.15.2"
exclude = [ exclude = [
"assets/syntaxes/*", "assets/syntaxes/*",
"assets/themes/*", "assets/themes/*",
] ]
build = "build.rs" build = "build.rs"
edition = '2018'
[features]
default = ["application"]
# Feature required for bat the application. Should be disabled when depending on
# bat as a library.
application = [
"atty",
"clap",
"dirs",
"git",
"lazy_static",
"liquid",
"paging",
"wild",
"regex-onig",
]
git = ["git2"] # Support indicating git modifications
paging = ["shell-words"] # Support applying a pager on the output
regex-onig = ["syntect/regex-onig"] # Use the "oniguruma" regex engine
regex-fancy = ["syntect/regex-fancy"] # Use the rust-only "fancy-regex" engine
[dependencies] [dependencies]
atty = "0.2.2" atty = { version = "0.2.14", optional = true }
ansi_term = "0.11" ansi_term = "^0.12.1"
ansi_colours = "^1.0" ansi_colours = "^1.0"
console = "0.6" console = "0.11.2"
directories = "1.0" dirs = { version = "2.0", optional = true }
lazy_static = "1.0" lazy_static = { version = "1.4", optional = true }
wild = "2.0" wild = { version = "2.0", optional = true }
content_inspector = "0.2.3" content_inspector = "0.2.4"
encoding = "0.2" encoding = "0.2"
shell-words = "0.1.0" shell-words = { version = "1.0.0", optional = true }
unicode-width = "0.1.7"
globset = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.8"
semver = "0.9"
path-absolutize = "1.2.0"
[dependencies.git2] [dependencies.git2]
version = "0.7" version = "0.13"
optional = true
default-features = false default-features = false
features = []
[dependencies.syntect] [dependencies.syntect]
version = "3.0.1" version = "4.2.0"
default-features = false default-features = false
features = ["parsing", "yaml-load", "dump-load", "dump-create"] features = ["parsing", "yaml-load", "dump-load", "dump-create"]
[dependencies.clap] [dependencies.clap]
version = "2.32" version = "2.33"
optional = true
default-features = false default-features = false
features = ["suggestions", "color", "wrap_help"] features = ["suggestions", "color", "wrap_help"]
[dependencies.error-chain] [dependencies.error-chain]
version = "0.12" version = "0.12"
default-features = false default-features = false
features = []
[dev-dependencies] [dev-dependencies]
tempdir = "0.3" tempdir = "0.3"
assert_cmd = "0.10.1" assert_cmd = "1.0.1"
[build-dependencies] [build-dependencies]
clap = "2.32" clap = { version = "2.33", optional = true }
liquid = { version = "0.20", optional = true }
[profile.release]
lto = true
codegen-units = 1
+2
View File
@@ -1,3 +1,5 @@
Copyright (c) 2018-2020 bat-developers (https://github.com/sharkdp/bat).
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
+295 -59
View File
@@ -1,7 +1,7 @@
<p align="center"> <p align="center">
<img src="doc/logo-header.svg" alt="bat - a cat clone with wings"><br> <img src="doc/logo-header.svg" alt="bat - a cat clone with wings"><br>
<a href="https://travis-ci.org/sharkdp/bat"><img src="https://travis-ci.org/sharkdp/bat.svg?branch=master" alt="Build Status"></a> <a href="https://travis-ci.org/sharkdp/bat"><img src="https://travis-ci.org/sharkdp/bat.svg?branch=master" alt="Build Status"></a>
<a href="https://ci.appveyor.com/project/sharkdp/bat"><img src="https://ci.appveyor.com/api/projects/status/cptsmtbiwbnr2vhf?svg=true"></a> <a href="https://ci.appveyor.com/project/sharkdp/bat"><img src="https://ci.appveyor.com/api/projects/status/cptsmtbiwbnr2vhf/branch/master?svg=true"></a>
<img src="https://img.shields.io/crates/l/bat.svg" alt="license"> <img src="https://img.shields.io/crates/l/bat.svg" alt="license">
<a href="https://crates.io/crates/bat"><img src="https://img.shields.io/crates/v/bat.svg?colorB=319e8c" alt="Version info"></a><br> <a href="https://crates.io/crates/bat"><img src="https://img.shields.io/crates/v/bat.svg?colorB=319e8c" alt="Version info"></a><br>
A <i>cat(1)</i> clone with syntax highlighting and Git integration. A <i>cat(1)</i> clone with syntax highlighting and Git integration.
@@ -12,7 +12,8 @@
<a href="#how-to-use">How To Use</a> • <a href="#how-to-use">How To Use</a> •
<a href="#installation">Installation</a> • <a href="#installation">Installation</a> •
<a href="#customization">Customization</a> • <a href="#customization">Customization</a> •
<a href="#project-goals-and-alternatives">Project goals, alternatives</a> <a href="#project-goals-and-alternatives">Project goals, alternatives</a>
Translation [<a href="https://github.com/chinanf-boy/bat-zh">中文</a>][<a href="doc/README-ja.md">日本語</a>][<a href="doc/README-ko.md">한국어</a>]
</p> </p>
### Syntax highlighting ### Syntax highlighting
@@ -29,6 +30,13 @@ languages:
![Git integration example](https://i.imgur.com/2lSW4RE.png) ![Git integration example](https://i.imgur.com/2lSW4RE.png)
### Show non-printable characters
You can use the `-A`/`--show-all` option to show and highlight non-printable
characters:
![Non-printable character example](https://i.imgur.com/WndGp9H.png)
### Automatic paging ### Automatic paging
`bat` can pipe its own output to `less` if the output is too large for one screen. `bat` can pipe its own output to `less` if the output is too large for one screen.
@@ -36,8 +44,9 @@ languages:
### File concatenation ### File concatenation
Oh.. you can also use it to concatenate files :wink:. Whenever Oh.. you can also use it to concatenate files :wink:. Whenever
`bat` detects a non-interactive terminal, it will fall back to printing `bat` detects a non-interactive terminal (i.e. when you pipe into another process
the plain file contents. or into a file), `bat` will act as a drop-in replacement for `cat` and
fall back to printing the plain file contents.
## How to use ## How to use
@@ -65,8 +74,12 @@ Read from stdin, specify the language explicitly
> yaml2json .travis.yml | json_pp | bat -l json > yaml2json .travis.yml | json_pp | bat -l json
``` ```
Show and highlight non-printable characters:
```bash
> bat -A /etc/hosts
```
As a replacement for `cat`: Use it as a `cat` replacement:
```bash ```bash
bat > note.md # quickly create a new file bat > note.md # quickly create a new file
@@ -78,15 +91,122 @@ bat -n main.rs # show line numbers (only)
bat f - g # output 'f', then stdin, then 'g'. bat f - g # output 'f', then stdin, then 'g'.
``` ```
### Integration with other tools
#### `find` or `fd`
You can use the `-exec` option of `find` to preview all search results with `bat`:
```bash
find … -exec bat {} +
```
If you happen to use [`fd`](https://github.com/sharkdp/fd), you can use the `-X`/`--exec-batch` option to do the same:
```bash
fd … -X bat
```
#### `ripgrep`
With [`batgrep`](https://github.com/eth-p/bat-extras/blob/master/doc/batgrep.md), `bat` can be used as the printer for [`ripgrep`](https://github.com/BurntSushi/ripgrep) search results.
```bash
batgrep needle src/
```
#### `tail -f`
`bat` can be combined with `tail -f` to continuously monitor a given file with syntax highlighting.
```bash
tail -f /var/log/pacman.log | bat --paging=never -l log
```
Note that we have to switch off paging in order for this to work. We have also specified the syntax
explicitly (`-l log`), as it can not be auto-detected in this case.
#### `git`
You can combine `bat` with `git show` to view an older version of a given file with proper syntax
highlighting:
```bash
git show v0.6.0:src/main.rs | bat -l rs
```
Note that syntax highlighting within diffs is currently not supported. If you are looking for this, check out [`delta`](https://github.com/dandavison/delta).
#### `xclip`
The line numbers and Git modification markers in the output of `bat` can make it hard to copy
the contents of a file. To prevent this, you can call `bat` with the `-p`/`--plain` option or
simply pipe the output into `xclip`:
```bash
bat main.cpp | xclip
```
`bat` will detect that the output is being redirected and print the plain file contents.
#### `man`
`bat` can be used as a colorizing pager for `man`, by setting the
`MANPAGER` environment variable:
```bash
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
man 2 select
```
It might also be necessary to set `MANROFFOPT="-c"` if you experience
formatting problems.
If you prefer to have this bundled in a new command, you can also use [`batman`](https://github.com/eth-p/bat-extras/blob/master/doc/batman.md).
Note that the [Manpage syntax](assets/syntaxes/02_Extra/Manpage.sublime-syntax) is developed in this repository and still needs some work.
#### `prettier` / `shfmt` / `rustfmt`
The [`prettybat`](https://github.com/eth-p/bat-extras/blob/master/doc/prettybat.md) script is a wrapper that will format code and print it with `bat`.
## Installation ## Installation
### On Ubuntu [![Packaging status](https://repology.org/badge/vertical-allrepos/bat.svg)](https://repology.org/project/bat/versions)
### On Ubuntu (using `apt`)
*... and other Debian-based Linux distributions.* *... and other Debian-based Linux distributions.*
Download the latest `.deb` package from the [release page](https://github.com/sharkdp/bat/releases) `bat` is making its way through the [Ubuntu](https://packages.ubuntu.com/eoan/bat) and
and install it via: [Debian](https://packages.debian.org/sid/bat) package release process, and is available
for Ubuntu as of Eoan 19.10. On Debian `bat` is currently only available on the unstable
"Sid" branch.
If your Ubuntu/Debian installation is new enough you can simply run:
```bash
apt install bat
```
If you install `bat` this way, please note that the executable may be installed as `batcat` instead of `bat` (due to [a name
clash with another package](https://github.com/sharkdp/bat/issues/982)). You can set up a `bat -> batcat` symlink or alias to prevent any issues that may come up because of this and to be consistent with other distrutions:
``` bash ``` bash
sudo dpkg -i bat_0.8.0_amd64.deb # adapt version number and architecture mkdir -p ~/.local/bin
ln -s /usr/bin/batcat ~/.local/bin/bat
```
### On Ubuntu (using most recent `.deb` packages)
*... and other Debian-based Linux distributions.*
If the package has not yet been promoted to your Ubuntu/Debian installation, or you want
the most recent release of `bat`, download the latest `.deb` package from the
[release page](https://github.com/sharkdp/bat/releases) and install it via:
```bash
sudo dpkg -i bat_0.15.2_amd64.deb # adapt version number and architecture
```
### On Alpine Linux
You can install [the `bat` package](https://pkgs.alpinelinux.org/packages?name=bat)
from the official sources, provided you have the appropriate repository enabled:
```bash
apk add bat
``` ```
### On Arch Linux ### On Arch Linux
@@ -98,10 +218,27 @@ from the official sources:
pacman -S bat pacman -S bat
``` ```
### On Fedora
You can install [the `bat` package](https://koji.fedoraproject.org/koji/packageinfo?packageID=27506) from the official [Fedora Modular](https://docs.fedoraproject.org/en-US/modularity/using-modules/) repository.
```bash
dnf install bat
```
### On Gentoo Linux
You can install [the `bat` package](https://packages.gentoo.org/packages/sys-apps/bat)
from the official sources:
```bash
emerge sys-apps/bat
```
### On Void Linux ### On Void Linux
You can install `bat` via xbps-install: You can install `bat` via xbps-install:
``` ```bash
xbps-install -S bat xbps-install -S bat
``` ```
@@ -128,6 +265,14 @@ You can install `bat` using the [nix package manager](https://nixos.org/nix):
nix-env -i bat nix-env -i bat
``` ```
### On openSUSE
You can install `bat` with zypper:
```bash
zypper install bat
```
### On macOS ### On macOS
You can install `bat` with [Homebrew](http://braumeister.org/formula/bat): You can install `bat` with [Homebrew](http://braumeister.org/formula/bat):
@@ -136,16 +281,38 @@ You can install `bat` with [Homebrew](http://braumeister.org/formula/bat):
brew install bat brew install bat
``` ```
Or install `bat` with [MacPorts](https://ports.macports.org/port/bat/summary):
```bash
port install bat
```
### On Windows ### On Windows
You can download prebuilt binaries from the [Release page](https://github.com/sharkdp/bat/releases), There are a few options to install `bat` on Windows. Once you have installed `bat`,
or install it with [scoop](https://scoop.sh/): take a look at the ["Using `bat` on Windows"](#using-bat-on-windows) section.
#### With Chocolatey
You can install `bat` via [Chocolatey](https://chocolatey.org/packages/Bat):
```bash
choco install bat
```
#### With Scoop
You can install `bat` via [scoop](https://scoop.sh/):
```bash ```bash
scoop install bat scoop install bat
``` ```
[See below](#using-bat-on-windows) for notes. You will need to install the [Visual C++ Redistributable](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) package.
#### From prebuilt binaries:
You can download prebuilt binaries from the [Release page](https://github.com/sharkdp/bat/releases),
You will need to install the [Visual C++ Redistributable](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) package.
### Via Docker ### Via Docker
@@ -187,21 +354,17 @@ This should work with the following distributions:
Check out the [Release page](https://github.com/sharkdp/bat/releases) for Check out the [Release page](https://github.com/sharkdp/bat/releases) for
prebuilt versions of `bat` for many different architectures. Statically-linked prebuilt versions of `bat` for many different architectures. Statically-linked
binaries are available, just look for releases with `musl` in the name on the binaries are also available: look for archives with `musl` in the file name.
releases page.
### From source ### From source
If you want to build `bat` from source, you need Rust 1.29 or If you want to build `bat` from source, you need Rust 1.40 or
higher. You can then use `cargo` to build everything: higher. You can then use `cargo` to build everything:
```bash ```bash
cargo install bat cargo install --locked bat
``` ```
You may have to install `cmake` and the `libz` development package
(`libz-dev` or `libz-devel`) in order for the build to succeed.
## Customization ## Customization
### Highlighting theme ### Highlighting theme
@@ -210,25 +373,27 @@ Use `bat --list-themes` to get a list of all available themes for syntax
highlighting. To select the `TwoDark` theme, call `bat` with the highlighting. To select the `TwoDark` theme, call `bat` with the
`--theme=TwoDark` option or set the `BAT_THEME` environment variable to `--theme=TwoDark` option or set the `BAT_THEME` environment variable to
`TwoDark`. Use `export BAT_THEME="TwoDark"` in your shell's startup file to `TwoDark`. Use `export BAT_THEME="TwoDark"` in your shell's startup file to
make the change permanent. make the change permanent. Alternatively, use `bat`s
[configuration file](https://github.com/sharkdp/bat#configuration-file).
If you want to preview the different themes on a custom file, you can use If you want to preview the different themes on a custom file, you can use
the following command (you need [`fzf`](https://github.com/junegunn/fzf) for this): the following command (you need [`fzf`](https://github.com/junegunn/fzf) for this):
``` bash ```bash
bat --list-themes | fzf --preview="bat --theme={} --color=always /path/to/file" bat --list-themes | fzf --preview="bat --theme={} --color=always /path/to/file"
``` ```
`bat` looks good on a dark background by default. However, if your terminal uses a `bat` looks good on a dark background by default. However, if your terminal uses a
light background, some themes will work better for you. For example, the `GitHub` light background, some themes like `GitHub` or `OneHalfLight` will work better for you.
theme is made for light backgrounds. You can also make your own theme by following the You can also use a custom theme by following the
['Adding new themes' section below](https://github.com/sharkdp/bat#adding-new-themes). ['Adding new themes' section below](https://github.com/sharkdp/bat#adding-new-themes).
### Output style ### Output style
You can use the `--style` option to control the appearance of `bat`s output. You can use the `--style` option to control the appearance of `bat`s output.
You can use `--style=numbers,changes`, for example, to show only Git changes You can use `--style=numbers,changes`, for example, to show only Git changes
and line numbers but no grid and no file header. Use the `BAT_STYLE` environment and line numbers but no grid and no file header. Set the `BAT_STYLE` environment
variable to make these changes permanent. variable to make these changes permanent or use `bat`s
[configuration file](https://github.com/sharkdp/bat#configuration-file).
### Adding new syntaxes / language definitions ### Adding new syntaxes / language definitions
@@ -240,10 +405,8 @@ and theme. To add new syntax definitions, do the following.
Create a folder with syntax definition files: Create a folder with syntax definition files:
```bash ```bash
BAT_CONFIG_DIR="$(bat cache --config-dir)" mkdir -p "$(bat --config-dir)/syntaxes"
cd "$(bat --config-dir)/syntaxes"
mkdir -p "$BAT_CONFIG_DIR/syntaxes"
cd "$BAT_CONFIG_DIR/syntaxes"
# Put new '.sublime-syntax' language definition files # Put new '.sublime-syntax' language definition files
# in this folder (or its subdirectories), for example: # in this folder (or its subdirectories), for example:
@@ -253,7 +416,7 @@ git clone https://github.com/tellnobody1/sublime-purescript-syntax
Now use the following command to parse these files into a binary cache: Now use the following command to parse these files into a binary cache:
```bash ```bash
bat cache --init bat cache --build
``` ```
Finally, use `bat --list-languages` to check if the new languages are available. Finally, use `bat --list-languages` to check if the new languages are available.
@@ -270,16 +433,14 @@ This works very similar to how we add new syntax definitions.
First, create a folder with the new syntax highlighting themes: First, create a folder with the new syntax highlighting themes:
```bash ```bash
BAT_CONFIG_DIR="$(bat cache --config-dir)" mkdir -p "$(bat --config-dir)/themes"
cd "$(bat --config-dir)/themes"
mkdir -p "$BAT_CONFIG_DIR/themes"
cd "$BAT_CONFIG_DIR/themes"
# Download a theme in '.tmTheme' format, for example: # Download a theme in '.tmTheme' format, for example:
git clone https://github.com/greggb/sublime-snazzy git clone https://github.com/greggb/sublime-snazzy
# Update the binary cache # Update the binary cache
bat cache --init bat cache --build
``` ```
Finally, use `bat --list-themes` to check if the new themes are available. Finally, use `bat --list-themes` to check if the new themes are available.
@@ -291,29 +452,80 @@ set, `less` is used by default. If you want to use a different pager, you can ei
`PAGER` variable or set the `BAT_PAGER` environment variable to override what is specified in `PAGER` variable or set the `BAT_PAGER` environment variable to override what is specified in
`PAGER`. `PAGER`.
If you want to pass command-line arguments to the pager, you need to create a small shell If you want to pass command-line arguments to the pager, you can also set them via the
script as a wrapper, for example `PAGER`/`BAT_PAGER` variables:
```bash ```bash
#!/bin/bash export BAT_PAGER="less -RF"
less --tabs 4 -R "$@"
``` ```
(put this in a file `~/.bat-pager.sh`, make it executable `chmod +x ~/.bat-pager.sh` and use
`export BAT_PAGER="$HOME/.bat-pager.sh"` in your shells `rc` file)
**Note**: By default, if the pager is set to `less`, `bat` will pass the following command line Instead of using environment variables, you can also use `bat`s [configuration file](https://github.com/sharkdp/bat#configuration-file) to configure the pager (`--pager` option).
options to the pager: `-R`/`--RAW-CONTROL-CHARS`, `-F`/`--quit-if-one-screen` and `-X`/`--no-init`.
The first (`-R`) is needed to interpret ANSI colors correctly. The second option (`-F`) instructs **Note**: By default, if the pager is set to `less` (and no command-line options are specified),
`bat` will pass the following command line options to the pager: `-R`/`--RAW-CONTROL-CHARS`,
`-F`/`--quit-if-one-screen` and `-X`/`--no-init`. The last option (`-X`) is only used for `less`
versions older than 530.
The `-R` option is needed to interpret ANSI colors correctly. The second option (`-F`) instructs
less to exit immediately if the output size is smaller than the vertical size of the terminal. less to exit immediately if the output size is smaller than the vertical size of the terminal.
This is convenient for small files because you do not have to press `q` to quit the pager. The This is convenient for small files because you do not have to press `q` to quit the pager. The
third option (`-X`) is needed to fix a bug with the `--quit-if-one-screen` feature in old versions third option (`-X`) is needed to fix a bug with the `--quit-if-one-screen` feature in old versions
of `less`. Unfortunately, it also breaks mouse-wheel support in `less`. If you want to enable of `less`. Unfortunately, it also breaks mouse-wheel support in `less`.
mouse-wheel scrolling, you can either pass just `-R` (as in the example above, this will disable
the quit-if-one-screen feature), or you can use a recent version of `less` and pass `-RF` which
will hopefully enable both quit-if-one-screen and mouse-wheel scrolling.
If scrolling still doesn't work for you, you can try to pass the `-S` option in addition. If you want to enable mouse-wheel scrolling on older versions of `less`, you can pass just `-R` (as
in the example above, this will disable the quit-if-one-screen feature). For less 530 or newer,
it should work out of the box.
### Dark mode
If you make use of the dark mode feature in macOS, you might want to configure `bat` to use a different
theme based on the OS theme. The following snippet uses the `default` theme when in the _dark mode_
and the `GitHub` theme when in the _light mode_.
```bash
alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)"
```
## Configuration file
`bat` can also be customized with a configuration file. The location of the file is dependent
on your operating system. To get the default path for your system, call
```
bat --config-file
```
Alternatively, you can use the `BAT_CONFIG_PATH` environment variable to point `bat` to a
non-default location of the configuration file:
```bash
export BAT_CONFIG_PATH="/path/to/bat.conf"
```
A default configuration file can be created with the `--generate-config-file` option.
```bash
bat --generate-config-file
```
### Format
The configuration file is a simple list of command line arguments. Use `bat --help` to see a full list of possible options and values. In addition, you can add comments by prepending a line with the `#` character.
Example configuration file:
```bash
# Set the theme to "TwoDark"
--theme="TwoDark"
# Show line numbers, Git modifications and file header (but no grid)
--style="numbers,changes,header"
# Use italic text on the terminal (not supported on all terminals)
--italic-text=always
# Use C++ syntax for .ino files
--map-syntax "*.ino:C++"
# Use ".gitignore"-style highlighting for ".ignore" files
--map-syntax ".ignore:Git Ignore"
```
## Using `bat` on Windows ## Using `bat` on Windows
@@ -324,16 +536,16 @@ If scrolling still doesn't work for you, you can try to pass the `-S` option in
Windows only includes a very limited pager in the form of `more`. You can download a Windows binary Windows only includes a very limited pager in the form of `more`. You can download a Windows binary
for `less` [from its homepage](http://www.greenwoodsoftware.com/less/download.html) or [through for `less` [from its homepage](http://www.greenwoodsoftware.com/less/download.html) or [through
Chocolatey](https://chocolatey.org/packages/Less). To use it, place the binary in a directory in Chocolatey](https://chocolatey.org/packages/Less). To use it, place the binary in a directory in
your `PATH` or [define an environment variable](#using-a-different-pager). your `PATH` or [define an environment variable](#using-a-different-pager). The [Chocolatey package](#on-windows) installs `less` automatically.
### Colours ### Colors
Windows 10 natively supports colours in both `conhost.exe` (Command Prompt) and PowerShell since Windows 10 natively supports colors in both `conhost.exe` (Command Prompt) and PowerShell since
[v1511](https://en.wikipedia.org/wiki/Windows_10_version_history#Version_1511_(November_Update)), as [v1511](https://en.wikipedia.org/wiki/Windows_10_version_history#Version_1511_(November_Update)), as
well as in newer versions of bash. On earlier versions of Windows, you can use well as in newer versions of bash. On earlier versions of Windows, you can use
[Cmder](http://cmder.net/), which includes [ConEmu](https://conemu.github.io/). [Cmder](http://cmder.net/), which includes [ConEmu](https://conemu.github.io/).
**Note:** The Git and MSYS versions of `less` do not correctly interpret colours on Windows. If you **Note:** The Git and MSYS versions of `less` do not correctly interpret colors on Windows. If you
dont have any other pagers installed, you can disable paging entirely by passing `--paging=never` dont have any other pagers installed, you can disable paging entirely by passing `--paging=never`
or by setting `BAT_PAGER` to an empty string. or by setting `BAT_PAGER` to an empty string.
@@ -343,7 +555,7 @@ or by setting `BAT_PAGER` to an empty string.
This can be solved by creating a wrapper or adding the following function to your `.bash_profile` file: This can be solved by creating a wrapper or adding the following function to your `.bash_profile` file:
```shell ```bash
bat() { bat() {
local index local index
local args=("$@") local args=("$@")
@@ -376,6 +588,18 @@ are supported (and fall back to 8-bit colors).
Please try a different theme (see `bat --list-themes` for a list). The `OneHalfDark` and Please try a different theme (see `bat --list-themes` for a list). The `OneHalfDark` and
`OneHalfLight` themes provide grid and line colors that are brighter. `OneHalfLight` themes provide grid and line colors that are brighter.
### File encodings
`bat` natively supports UTF-8 as well as UTF-16. For every other file encoding, you may need to
convert to UTF-8 first because the encodings can typically not be auto-detected. You can `iconv`
to do so.
Example: if you have a PHP file in Latin-1 (ISO-8859-1) encoding, you can call:
``` bash
iconv -f ISO-8859-1 -t UTF-8 my-file.php | bat
```
Note: you might have to use the `-l`/`--language` option if the syntax can not be auto-detected
by `bat`.
## Development ## Development
```bash ```bash
@@ -384,19 +608,24 @@ git clone --recursive https://github.com/sharkdp/bat
# Build (debug version) # Build (debug version)
cd bat cd bat
cargo build cargo build --bins
# Run unit tests and integration tests # Run unit tests and integration tests
cargo test cargo test
# Install (release version) # Install (release version)
cargo install cargo install --locked
# Build a bat binary with modified syntaxes and themes # Build a bat binary with modified syntaxes and themes
bash assets/create.sh bash assets/create.sh
cargo install -f cargo install --locked --force
``` ```
## Maintainers
- [sharkdp](https://github.com/sharkdp)
- [eth-p](https://github.com/eth-p)
## Project goals and alternatives ## Project goals and alternatives
`bat` tries to achieve the following goals: `bat` tries to achieve the following goals:
@@ -408,3 +637,10 @@ cargo install -f
There are a lot of alternatives, if you are looking for similar programs. See There are a lot of alternatives, if you are looking for similar programs. See
[this document](doc/alternatives.md) for a comparison. [this document](doc/alternatives.md) for a comparison.
## License
Copyright (c) 2018-2020 [bat-developers](https://github.com/sharkdp/bat).
`bat` is distributed under the terms of both the MIT License and the Apache License 2.0.
See the [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) files for license details.
+3 -3
View File
@@ -8,7 +8,7 @@ environment:
install: install:
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
- rustup-init.exe -y --default-host %TARGET% - rustup-init.exe -y --default-host %TARGET% --profile minimal
- set PATH=%PATH%;C:\cargo\bin - set PATH=%PATH%;C:\cargo\bin
- rustc -Vv - rustc -Vv
- cargo -V - cargo -V
@@ -16,11 +16,11 @@ install:
build: false build: false
test_script: test_script:
- cargo test --target %TARGET% --verbose - cargo test --target %TARGET% --verbose
- cargo run --target %TARGET% -- src/main.rs README.md --paging=never - cargo run --target %TARGET% -- src/bin/bat/main.rs README.md --paging=never
before_deploy: before_deploy:
# Generate artifacts for release # Generate artifacts for release
- cargo build --release --verbose - cargo build --bins --release --verbose
- ps: ci\before_deploy.ps1 - ps: ci\before_deploy.ps1
deploy: deploy:
+1
View File
@@ -0,0 +1 @@
* linguist-vendored
+20 -2
View File
@@ -13,12 +13,15 @@ In order to add new syntaxes to `bat`, follow these steps:
Sublime Text and convert it to a `.sublime-syntax` file via *Tools* -> *Developer* -> Sublime Text and convert it to a `.sublime-syntax` file via *Tools* -> *Developer* ->
*New Syntax from XXX.tmLanguage...*. Save the new file in the `assets/syntaxes` folder. *New Syntax from XXX.tmLanguage...*. Save the new file in the `assets/syntaxes` folder.
3. Run the `create.sh` script. It calls `bat cache --init` to parse all available 3. Run the `create.sh` script. It calls `bat cache --build` to parse all available
`.sublime-syntax` files and serialize them to a `syntaxes.bin` file (in this folder). `.sublime-syntax` files and serialize them to a `syntaxes.bin` file (in this folder).
4. Re-compile `bat`. At compilation time, the `syntaxes.bin` file will be stored inside the 4. Re-compile `bat`. At compilation time, the `syntaxes.bin` file will be stored inside the
`bat` binary. `bat` binary.
5. If you send a pull request with your changes, please do *not* include the changed `syntaxes.bin`
file. A new binary cache file will be created once before every new release of `bat`.
### Troubleshooting ### Troubleshooting
Make sure that the local cache does not interfere with the internally stored syntaxes and Make sure that the local cache does not interfere with the internally stored syntaxes and
@@ -29,4 +32,19 @@ themes (`bat cache --clear`).
The following files have been manually modified after converting from a `.tmLanguage` file: The following files have been manually modified after converting from a `.tmLanguage` file:
* `Dart.sublime-syntax` => removed `#regex.dart` include. * `Dart.sublime-syntax` => removed `#regex.dart` include.
* `INI.sublime-syntax` => added `.hgrc` and `hgrc` file types. * `INI.sublime-syntax` => added `.hgrc`, `hgrc`, and `desktop` file types.
* `Org mode.sublime-syntax` => removed `task` file type.
* `SML.sublime_syntax` => removed `ml` file type.
### Non-submodule additions
* `Assembly (x86_64)` has been manually added from https://github.com/13xforever/x86-assembly-textmate-bundle due to `git clone` recursion problems
* `Nim.sublime-syntax` has been added manually from https://github.com/getzola/zola/blob/master/sublime_syntaxes/Nim.sublime-syntax as there was no suitable Git repository for it. The original syntax seems to originate from https://github.com/Varriount/NimLime
* `Rego.sublime-syntax` has been added manually from https://github.com/open-policy-agent/opa/blob/master/misc/syntax/sublime/rego.sublime-syntax
as it is not kept in a standalone repository. The file is generated from
https://github.com/open-policy-agent/opa/blob/master/misc/syntax/textmate/Rego.tmLanguage
* `SML.sublime_syntax` has been added manually from
https://github.com/seanjames777/SML-Language-Definitiona as it is not
kept in a standalone repository. The file generated is from
https://github.com/seanjames777/SML-Language-Definition/blob/master/sml.tmLanguage
+76
View File
@@ -0,0 +1,76 @@
# Fish Shell Completions
# Place or symlink to $XDG_CONFIG_HOME/fish/completions/{{PROJECT_EXECUTABLE}}.fish ($XDG_CONFIG_HOME is usually set to ~/.config)
# Helper function:
function __{{PROJECT_EXECUTABLE}}_autocomplete_languages --description "A helper function used by "(status filename)
{{PROJECT_EXECUTABLE}} --list-languages | awk -F':' '
{
lang=$1
split($2, exts, ",")
for (i in exts) {
ext=exts[i]
if (ext !~ /[A-Z].*/ && ext !~ /^\..*rc$/) {
print ext"\t"lang
}
}
}
' | sort
end
# Completions:
complete -c {{PROJECT_EXECUTABLE}} -l color -xka "auto never always" -d "Specify when to use colored output (default: auto)" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -l config-dir -d "Display location of '{{PROJECT_EXECUTABLE}}' configuration directory" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -l config-file -d "Display location of '{{PROJECT_EXECUTABLE}}' configuration file" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -l decorations -xka "auto never always" -d "Specify when to use the decorations specified with '--style' (default: auto)" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -s h -l help -d "Print help message" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -s H -l highlight-line -x -d "<N> Highlight the N-th line with a different background color" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -l italic-text -xka "always never" -d "Specify when to use ANSI sequences for italic text (default: never)" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -s l -l language -d "Set the language for syntax highlighting" -n "not __fish_seen_subcommand_from cache" -xa "(__{{PROJECT_EXECUTABLE}}_autocomplete_languages)"
complete -c {{PROJECT_EXECUTABLE}} -s r -l line-range -x -d "<N:M> Only print the specified range of lines for each file" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -l list-languages -d "Display list of supported languages for syntax highlighting" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -l list-themes -d "Display a list of supported themes for syntax highlighting" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -s m -l map-syntax -x -d "<from:to> Map a file extension or file name to an existing syntax" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -s n -l number -d "Only show line numbers, no other decorations. Alias for '--style=numbers'" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -l pager -x -d "<command> Specify which pager program to use (default: less)" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -l paging -xka "auto never always" -d "Specify when to use the pager (default: auto)" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -s p -l plain -d "Only show plain style, no decorations. Alias for '--style=plain'" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -s A -l show-all -d "Show non-printable characters like space/tab/newline" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -l style -xka "auto full plain changes header grid numbers" -d "Comma-separated list of style elements or presets to display with file contents" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -l tabs -x -d "<T> Set the tab width to T spaces (width of 0 passes tabs through directly)" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -l terminal-width -x -d "<width> Explicitly set terminal width; Prefix with '+' or '-' to offset (default width is auto determined)" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -l theme -xka "({{PROJECT_EXECUTABLE}} --list-themes | cat)" -d "Set the theme for syntax highlighting" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -s u -l unbuffered -d "POSIX-compliant unbuffered output. Option is ignored" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -s V -l version -d "Show version information" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -l wrap -xka "auto never character" -d "<mode> Specify the text-wrapping mode (default: auto)" -n "not __fish_seen_subcommand_from cache"
# Sub-command 'cache' completions
complete -c {{PROJECT_EXECUTABLE}} -a "cache" -d "Modify the syntax/language definition cache" -n "not __fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -l build -f -d "Parse syntaxes/language definitions into cache" -n "__fish_seen_subcommand_from cache"
complete -c {{PROJECT_EXECUTABLE}} -l clear -f -d "Reset syntaxes/language definitions to default settings" -n "__fish_seen_subcommand_from cache"
+54 -7
View File
@@ -1,16 +1,63 @@
#!/bin/bash #!/bin/bash
set -euo pipefail
ASSET_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ASSET_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
REPO_DIR="$ASSET_DIR/.."
# Ensure submodules are initialized.
function update_submodules() {
local submodule
local submodule_prompt=unspecified
local submodule_path
{
while { read -r submodule && read -r submodule_path; } <&3; do
if ! [[ -d "${REPO_DIR}/.git/modules/${submodule}" ]] && [[ -d "${REPO_DIR}/${submodule_path}" ]]; then
if [[ "$submodule_prompt" = "unspecified" ]]; then
echo "One or more submodules were found to be uninitialized."
printf "Initialize and update them? [Y/n] "
read -r submodule_prompt
fi
case "$submodule_prompt" in
y|yes|'') {
git -C "$REPO_DIR" submodule update --init "$submodule_path"
};;
n|no) {
return
};;
*) {
echo "Unknown answer. Not updating submodules."
};;
esac
fi
done
} 3< <(git config --file "${REPO_DIR}/.gitmodules" --null --get-regexp path | xargs -0 printf "%s\n" | sed 's/^submodule.//;s/.path$//')
}
if [ -t 0 ]; then
update_submodules
fi
# Always remove the local cache to avoid any confusion # Always remove the local cache to avoid any confusion
bat cache --clear bat cache --clear
# TODO: Remove this (and the reverse part below) when # TODO:
# https://github.com/trishume/syntect/issues/160 has been fixed # - Remove the JavaDoc patch once https://github.com/trishume/syntect/issues/222 has been fixed
JAVADOC_FILE="${ASSET_DIR}/syntaxes/Packages/Java/JavaDoc.sublime-syntax" # - Remove the C# patch once https://github.com/sublimehq/Packages/pull/2331 has been merged
JAVADOC_PATCH="${ASSET_DIR}/JavaDoc.sublime-syntax.patch"
patch "$JAVADOC_FILE" "$JAVADOC_PATCH"
bat cache --init --blank --source="$ASSET_DIR" --target="$ASSET_DIR" (
cd "$ASSET_DIR"
for patch in patches/*.patch; do
patch --strip=0 < "$patch"
done
)
patch -R "$JAVADOC_FILE" "$JAVADOC_PATCH" bat cache --build --blank --source="$ASSET_DIR" --target="$ASSET_DIR"
(
cd "$ASSET_DIR"
for patch in patches/*.patch; do
patch --strip=0 --reverse < "$patch"
done
)
+173
View File
@@ -0,0 +1,173 @@
.TH {{PROJECT_EXECUTABLE | upcase}} "1"
.SH NAME
{{PROJECT_EXECUTABLE}} \- a cat(1) clone with syntax highlighting and Git integration.
.SH "USAGE"
.IP "{{PROJECT_EXECUTABLE}} [OPTIONS] [FILE]..."
.IP "{{PROJECT_EXECUTABLE}} cache [CACHE-OPTIONS] [--build|--clear]
.SH DESCRIPTION
{{PROJECT_EXECUTABLE}} prints the syntax-highlighted content of a collection of FILEs to the
terminal. If no FILE is specified, or when FILE is '-', it reads from standard input.
{{PROJECT_EXECUTABLE}} supports a large number of programming and markup languages.
It also communicates with git(1) to show modifications with respect to the git index.
{{PROJECT_EXECUTABLE}} automatically pipes its output through a pager (by default: less).
Whenever the output of {{PROJECT_EXECUTABLE}} goes to a non-interactive terminal, i.e. when the
output is piped into another process or into a file, {{PROJECT_EXECUTABLE}} will act as a drop-in
replacement for cat(1) and fall back to printing the plain file contents.
.SH "OPTIONS"
General remarks: Command-line options like '-l'/'--language' that take values can be specified as
either '--language value', '--language=value', '-l value' or '-lvalue'.
.HP
\fB\-A\fR, \fB\-\-show\-all\fR
.IP
Show non\-printable characters like space, tab or newline. Use '\-\-tabs' to
control the width of the tab\-placeholders.
.HP
\fB\-p\fR, \fB\-\-plain\fR
.IP
Only show plain style, no decorations. This is an alias for
\&'\-\-style=plain'. When '\-p' is used twice ('\-pp'), it also disables
automatic paging (alias for '\-\-style=plain \fB\-\-pager\fR=\fI\,never\/\fR').
.HP
\fB\-l\fR, \fB\-\-language\fR <language>
.IP
Explicitly set the language for syntax highlighting. The language can be
specified as a name (like 'C++' or 'LaTeX') or possible file extension
(like 'cpp', 'hpp' or 'md'). Use '\-\-list\-languages' to show all supported
language names and file extensions.
.HP
\fB\-H\fR, \fB\-\-highlight\-line\fR <N:M>...
.IP
Highlight the specified line ranges with a different background color For example:
.RS
.IP "\-\-highlight\-line 40"
highlights line 40
.IP "\-\-highlight\-line 30:40"
highlights lines 30 to 40
.IP "\-\-highlight\-line :40"
highlights lines 1 to 40
.IP "\-\-highlight\-line 40:"
highlights lines 40 to the end of the file
.RE
.HP
\fB\-\-tabs\fR <T>
.IP
Set the tab width to T spaces. Use a width of 0 to pass tabs through directly
.HP
\fB\-\-wrap\fR <mode>
.IP
Specify the text\-wrapping mode (*auto*, never, character). The '\-\-terminal\-width' option
can be used in addition to control the output width.
.HP
\fB\-\-terminal\-width\fR <width>
.IP
Explicitly set the width of the terminal instead of determining it automatically. If
prefixed with '+' or '\-', the value will be treated as an offset to the actual terminal
width. See also: '\-\-wrap'.
.HP
\fB\-n\fR, \fB\-\-number\fR
.IP
Only show line numbers, no other decorations. This is an alias for '\-\-style=numbers'
.HP
\fB\-\-color\fR <when>
.IP
Specify when to use colored output. The automatic mode only enables colors if an
interactive terminal is detected. Possible values: *auto*, never, always.
.HP
\fB\-\-italic\-text\fR <when>
.IP
Specify when to use ANSI sequences for italic text in the output. Possible values:
always, *never*.
.HP
\fB\-\-decorations\fR <when>
.IP
Specify when to use the decorations that have been specified via '\-\-style'. The
automatic mode only enables decorations if an interactive terminal is detected. Possible
values: *auto*, never, always.
.HP
\fB\-\-paging\fR <when>
.IP
Specify when to use the pager. To control which pager is used, set the PAGER or
BAT_PAGER environment variables (the latter takes precedence) or use the '\-\-pager'
option. To disable the pager permanently, set BAT_PAGER to an empty string or set
\&'\-\-paging=never' in the configuration file. Possible values: *auto*, never, always.
.HP
\fB\-\-pager\fR <command>
.IP
Determine which pager is used. This option will overwrite the PAGER and BAT_PAGER
environment variables. The default pager is 'less'. To disable the pager completely, use
the '\-\-paging' option. Example: '\-\-pager "less \fB\-RF\fR"'.
.HP
\fB\-m\fR, \fB\-\-map\-syntax\fR <glob-pattern:syntax-name>...
.IP
Map a glob pattern to an existing syntax name. The glob pattern is matched on the full
path and the filename. For example, to highlight *.build files with the Python syntax,
use -m '*.build:Python'. To highlight files named '.myignore' with the Git Ignore
syntax, use -m '.myignore:Git Ignore'.
.HP
\fB\-\-theme\fR <theme>
.IP
Set the theme for syntax highlighting. Use '\-\-list\-themes' to see all available themes.
To set a default theme, add the '\-\-theme="..."' option to the configuration file or
export the BAT_THEME environment variable (e.g.: export BAT_THEME="...").
.HP
\fB\-\-list\-themes\fR
.IP
Display a list of supported themes for syntax highlighting.
.HP
\fB\-\-style\fR <style\-components>
.IP
Configure which elements (line numbers, file headers, grid borders, Git modifications,
\&..) to display in addition to the file contents. The argument is a comma\-separated list
of components to display (e.g. 'numbers,changes,grid') or a pre\-defined style ('full').
To set a default style, add the '\-\-style=".."' option to the configuration file or
export the BAT_STYLE environment variable (e.g.: export BAT_STYLE=".."). Possible
values: *auto*, full, plain, changes, header, grid, numbers, snip.
.HP
\fB\-r\fR, \fB\-\-line\-range\fR <N:M>...
.IP
Only print the specified range of lines for each file. For example:
.RS
.IP "\-\-line\-range 30:40"
prints lines 30 to 40
.IP "\-\-line\-range :40"
prints lines 1 to 40
.IP "\-\-line\-range 40:"
prints lines 40 to the end of the file
.RE
.HP
\fB\-L\fR, \fB\-\-list\-languages\fR
.IP
Display a list of supported languages for syntax highlighting.
.HP
\fB\-u\fR, \fB\-\-unbuffered\fR
.IP
This option exists for POSIX\-compliance reasons ('u' is for 'unbuffered'). The output is
always unbuffered \- this option is simply ignored.
.HP
\fB\-h\fR, \fB\-\-help\fR
.IP
Print this help message.
.HP
\fB\-V\fR, \fB\-\-version\fR
.IP
Show version information.
.SH "POSITIONAL ARGUMENTS"
.HP
\fB<FILE>...\fR
.IP
Files to print and concatenate. Use a dash ('\-') or no argument at all to read from
standard input.
.SH "SUBCOMMANDS"
.HP
\fBcache\fR - Modify the syntax\-definition and theme cache.
.SH "FILES"
{{PROJECT_EXECUTABLE}} can also be customized with a configuration file. The location of the file
is dependent on your operating system. To get the default path for your system, call:
\fB{{PROJECT_EXECUTABLE}} --config-file\fR
Alternatively, you can use the BAT_CONFIG_PATH environment variable to point bat to a non-default
location of the configuration file.
+13
View File
@@ -0,0 +1,13 @@
diff --git syntaxes/01_Packages/C#/C#.sublime-syntax syntaxes/01_Packages/C#/C#.sublime-syntax
index ed494f8b..01b710e8 100644
--- syntaxes/01_Packages/C#/C#.sublime-syntax
+++ syntaxes/01_Packages/C#/C#.sublime-syntax
@@ -1312,7 +1312,7 @@ contexts:
2: punctuation.separator.cs
3: punctuation.section.brackets.end.cs
4: keyword.operator.pointer.cs
- - match: \((?=(?:[^,)(]*|\([^\)]*\))*,)
+ - match: \((?=(?:[^,)(]|\([^\)]*\))*,)
scope: punctuation.section.group.begin.cs
push:
- meta_scope: meta.group.tuple.cs
@@ -1,7 +1,7 @@
diff --git syntaxes/Packages/Java/JavaDoc.sublime-syntax syntaxes/Packages/Java/JavaDoc.sublime-syntax diff --git syntaxes/01_Packages/Java/JavaDoc.sublime-syntax syntaxes/01_Packages/Java/JavaDoc.sublime-syntax
index 422a6a9..40a741e 100644 index 422a6a9..40a741e 100644
--- syntaxes/Packages/Java/JavaDoc.sublime-syntax --- syntaxes/01_Packages/Java/JavaDoc.sublime-syntax
+++ syntaxes/Packages/Java/JavaDoc.sublime-syntax +++ syntaxes/01_Packages/Java/JavaDoc.sublime-syntax
@@ -13,7 +13,7 @@ variables: @@ -13,7 +13,7 @@ variables:
contexts: contexts:
prototype: prototype:
+81
View File
@@ -0,0 +1,81 @@
diff --git syntaxes/01_Packages/Makefile/Makefile.sublime-syntax syntaxes/01_Packages/Makefile/Makefile.sublime-syntax
index 3cc3a97e..0c7a3f24 100644
--- syntaxes/01_Packages/Makefile/Makefile.sublime-syntax
+++ syntaxes/01_Packages/Makefile/Makefile.sublime-syntax
@@ -44,64 +44,50 @@ variables:
# variable substitutions anywhere. We try to remedy this by hacking in a
# regex that matches up to four levels of nested parentheses, and ignores
# whatever's inside the parentheses.
- nps: '[^()]*'
- open: '(?:\('
- close: '\))?' # ignore this invalid.illegal
+ nps_unnested: '[^()]*'
+ nps: '[^()]*(?=[()])'
+ open: '(?:{{nps}}\('
+ close: '\){{nps_unnested}})?' # ignore this invalid.illegal
just_eat: | # WARNING: INSANITY FOLLOWS!
- (?x) # ignore whitespace in this regex
- {{nps}} # level 0
+ (?x)(?: # ignore whitespace in this regex
{{open}} # start level 1 __
- {{nps}} # level 1 _______ /*_>-<
{{open}} # start level 2 ___/ _____ \__/ /
- {{nps}} # level 2 <____/ \____/
{{open}} # start level 3 is like snek... (by Valerie Haecky)
- {{nps}} # level 3
{{open}} # start level 4
{{nps}} # level 4
{{close}} # end level 4
- {{nps}} # level 3
{{close}} # end level 3
- {{nps}} # level 2
{{open}} # start level 3
- {{nps}} # level 3
{{open}} # start level 4
{{nps}} # level 4
{{close}} # end level 4
- {{nps}} # level 3
{{close}} # end level 3
- {{nps}} # level 2
+ {{nps}}
{{close}} # end level 2
- {{nps}} # level 1
{{open}} # start level 2
- {{nps}} # level 2
{{open}} # start level 3
- {{nps}} # level 3
{{open}} # start level 4
{{nps}} # level 4
{{close}} # end level 4
- {{nps}} # level 3
+ {{nps}}
{{close}} # end level 3
- {{nps}} # level 2
{{open}} # start level 3
- {{nps}} # level 3
{{open}} # start level 4
{{nps}} # level 4
{{close}} # end level 4
- {{nps}} # level 3
+ {{nps}}
{{close}} # end level 3
- {{nps}} # level 2
{{open}} # start level 3
- {{nps}} # level 3
{{open}} # start level 4
{{nps}} # level 4
{{close}} # end level 4
- {{nps}} # level 3
+ {{nps}}
{{close}} # end level 3
- {{nps}} # level 2
+ {{nps}}
{{close}} # end level 2
- {{nps}} # level 1
+ {{nps}}
{{close}} # end level 1
- {{nps}} # level 0
+ |{{nps_unnested}})
rule_lookahead: '{{just_eat}}{{ruleassign}}{{just_eat}}'
var_lookahead_base: '{{just_eat}}({{varassign}}|{{shellassign}}){{just_eat}}'
+168
View File
@@ -0,0 +1,168 @@
diff --git syntaxes/01_Packages/Markdown/Markdown.sublime-syntax syntaxes/01_Packages/Markdown/Markdown.sublime-syntax
index 19dc685d..6afd87ae 100644
--- syntaxes/01_Packages/Markdown/Markdown.sublime-syntax
+++ syntaxes/01_Packages/Markdown/Markdown.sublime-syntax
@@ -24,7 +24,6 @@ variables:
)
[ \t]*$ # followed by any number of tabs or spaces, followed by the end of the line
)
- setext_escape: ^(?=\s{0,3}(?:---+|===+)\s*$)
block_quote: (?:[ ]{,3}>(?:.|$)) # between 0 and 3 spaces, followed by a greater than sign, followed by any character or the end of the line
atx_heading: (?:[#]{1,6}\s*) # between 1 and 6 hashes, followed by any amount of whitespace
indented_code_block: (?:[ ]{4}|\t) # 4 spaces or a tab
@@ -277,69 +276,40 @@ contexts:
8: markup.underline.link.markdown
push: [link-ref-def, after-link-title, link-title]
- match: '^(?=\S)(?![=-]{3,}\s*$)'
- branch_point: heading2-branch
- branch:
- - not-heading2
- - heading2
-
- not-paragraph:
- - match: |-
- (?x) # pop out of this context when one of the following conditions are met:
- ^(?:
- \s*$ # the line is blank (or only contains whitespace)
- | (?=
- {{block_quote}} # a block quote begins the line
- | [ ]{,3}[*+-][ ] # an unordered list item begins the line
- | [ ]{,3}1[.][ ] # an ordered list item with number "1" begins the line
- | \# # an ATX heading begins the line
- | [ ]{,3}<( # all types of HTML blocks except type 7 may interrupt a paragraph
- {{html_tag_block_end_at_close_tag}} # 1
- | !-- # 2
- | \? # 3
- | ![A-Z] # 4
- | !\[CDATA\[ # 5
- | {{html_tag_block_end_at_blank_line}} # 6
+ push:
+ - meta_scope: meta.paragraph.markdown
+ - match: |-
+ (?x) # pop out of this context when one of the following conditions are met:
+ ^(?:
+ \s*$ # the line is blank (or only contains whitespace)
+ | (?=
+ {{block_quote}} # a block quote begins the line
+ | [ ]{,3}[*+-][ ] # an unordered list item begins the line
+ | [ ]{,3}1[.][ ] # an ordered list item with number "1" begins the line
+ | \# # an ATX heading begins the line
+ | [ ]{,3}<( # all types of HTML blocks except type 7 may interrupt a paragraph
+ {{html_tag_block_end_at_close_tag}} # 1
+ | !-- # 2
+ | \? # 3
+ | ![A-Z] # 4
+ | !\[CDATA\[ # 5
+ | {{html_tag_block_end_at_blank_line}} # 6
+ )
)
)
- )
- pop: true
-
- not-heading2:
- - include: not-paragraph
- - match: (?=\S)
- branch_point: heading1-branch
- branch:
- - paragraph
- - heading1
- - match: ''
- pop: true
-
- paragraph:
- - meta_scope: meta.paragraph.markdown
- - match: ^\s{0,3}===+\s*$
- fail: heading1-branch
- - match: ^\s{0,3}---+\s*$
- fail: heading2-branch
- - include: not-paragraph
- - include: inline-bold-italic-linebreak
- - include: scope:text.html.basic
-
- heading1:
- - meta_scope: markup.heading.1.markdown
- - include: inline-bold-italic-linebreak
- - match: '^[ \t]{0,3}(={3,})(?=[ \t]*$)'
- captures:
- 1: markup.heading.1.setext.markdown punctuation.definition.heading.setext.markdown
- pop: true
-
- heading2:
- - meta_scope: markup.heading.2.markdown
- - include: inline-bold-italic-linebreak
- - match: '^[ \t]{0,3}(-{3,})(?=[ \t]*$)'
- captures:
- 1: markup.heading.2.setext.markdown punctuation.definition.heading.setext.markdown
- pop: true
-
+ pop: true
+ - include: inline-bold-italic-linebreak
+ - include: scope:text.html.basic
+ - match: '^(={3,})(?=[ \t]*$)'
+ scope: markup.heading.1.setext.markdown
+ captures:
+ 1: punctuation.definition.heading.setext.markdown
+ pop: true
+ - match: '^(-{3,})(?=[ \t]*$)'
+ scope: markup.heading.2.setext.markdown
+ captures:
+ 1: punctuation.definition.heading.setext.markdown
+ pop: true
link-ref-def:
- meta_scope: meta.link.reference.def.markdown
- match: ''
@@ -430,8 +400,6 @@ contexts:
push:
- meta_scope: markup.bold.markdown
- meta_content_scope: markup.italic.markdown
- - match: '{{setext_escape}}'
- pop: true
- match: |-
(?x)
[ \t]*\*{4,} # if there are more than 3 its not applicable to be bold or italic
@@ -446,8 +414,6 @@ contexts:
scope: punctuation.definition.bold.end.markdown
set:
- meta_content_scope: markup.italic.markdown
- - match: '{{setext_escape}}'
- pop: true
- match: |-
(?x)
[ \t]*\*{3,} # if there are more than 3 its not applicable to be bold or italic
@@ -463,8 +429,6 @@ contexts:
scope: punctuation.definition.italic.end.markdown
set:
- meta_content_scope: markup.bold.markdown
- - match: '{{setext_escape}}'
- pop: true
- match: |-
(?x)
[ \t]*\*{3,} # if there are more than 3 its not applicable to be bold or italic
@@ -727,8 +691,6 @@ contexts:
scope: punctuation.definition.italic.begin.markdown
push:
- meta_scope: markup.italic.markdown
- - match: '{{setext_escape}}'
- pop: true
- match: |-
(?x)
[ \t]*\*{4,} # if there are more than 3 its not applicable to be bold or italic
@@ -745,8 +707,6 @@ contexts:
scope: punctuation.definition.italic.begin.markdown
push:
- meta_scope: markup.italic.markdown
- - match: '{{setext_escape}}'
- pop: true
- match: |-
(?x)
[ \t]*_{4,} # if there are more than 3 its not applicable to be bold or italic
@@ -773,8 +733,6 @@ contexts:
- include: bold-italic-trailing
bold-italic-trailing:
- include: scope:text.html.basic
- - match: '{{setext_escape}}'
- pop: true
- match: ^\s*$\n?
scope: invalid.illegal.non-terminated.bold-italic.markdown
pop: true
+13
View File
@@ -0,0 +1,13 @@
diff --git syntaxes/01_Packages/Rust/Rust.sublime-syntax syntaxes/01_Packages/Rust/Rust.sublime-syntax
index 3c354486..24727a4e 100644
--- syntaxes/01_Packages/Rust/Rust.sublime-syntax
+++ syntaxes/01_Packages/Rust/Rust.sublime-syntax
@@ -907,6 +907,8 @@ contexts:
- include: type-any-identifier
- match: ':'
scope: punctuation.separator.rust
+ - match: (?=;)
+ pop: true
fn-body:
- meta_scope: meta.function.rust
BIN
View File
Binary file not shown.
+283
View File
@@ -0,0 +1,283 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: AsciiDoc
comment: |
A very early hack. Mostly ripped from other syntaxes.
Only the very basic stuff is working.
file_extensions:
- adoc
- asciidoc
- asc
scope: text.html.asciidoc
contexts:
main:
- include: heading_inline
- include: heading-block
- include: heading-blockattr
- match: \$\$(?!\$)
push:
- meta_scope: comment.block.passthrough.macro.doubledollar.asciidoc
- match: \$\$(?!\$)
pop: true
- match: \+\+\+(?!\+)
push:
- meta_scope: comment.block.passthrough.macro.tripeplus.asciidoc
- match: \+\+\+(?!\+)
pop: true
- match: (//).*$\n?
scope: comment.line.double-slash.asciidoc
- match: |-
(?x)^
(?= ([/+-.*_=]{4,})\s*$
| ([ \t]{1,})
| [=]{1,6}\s*+
| [ ]{,3}(?<marker>[-*_])([ ]{,2}\k<marker>){2,}[ \t]*+$
)
push:
- meta_scope: meta.block-level.asciidoc
- match: |-
(?x)^
(?! \1
| ([ \t]{1,})
| [=]{1,6}\s*+
| [ ]{,3}(?<marker>[-*_])([ ]{,2}\k<marker>){2,}[ \t]*+$
)
pop: true
- include: block_quote
- include: block_raw
- include: heading_inline
- include: heading-block
- include: separator
- match: '^[ ]{0,3}([*+-])(?=\s)'
captures:
1: punctuation.definition.list_item.asciidoc
push:
- meta_scope: markup.list.unnumbered.asciidoc
- match: ^(?=\S)
captures:
1: punctuation.definition.list_item.asciidoc
pop: true
- include: list-paragraph
- match: '^[ ]{0,3}[0-9]+(\.)(?=\s)'
captures:
1: punctuation.definition.list_item.asciidoc
push:
- meta_scope: markup.list.numbered.asciidoc
- match: ^(?=\S)
captures:
1: punctuation.definition.list_item.asciidoc
pop: true
- include: list-paragraph
- match: '^([/+-.*_=]){4,}\s*$'
push:
- meta_scope: comment.block.asciidoc
- match: '^\1{4,}\s*$'
pop: true
- match: '^([/+.]){4,}\s*$'
comment: asciidoc formatting is disabled inside certain blocks.
push:
- meta_scope: meta.disable-asciidoc
- match: '^[/+.]{4,}\s*$'
pop: true
- match: '^(?=\S)(?![=-]{3,}(?=$))(?!\.\S+)'
push:
- meta_scope: meta.paragraph.asciidoc
- match: '^(?:\s*$|(?=[ ]{,3}>.))|(?=[ \t]*\n)(?<=^===|^====|=====|^---|^----|-----)[ \t]*\n'
pop: true
- include: inline
- include: scope:text.html.basic
- match: '^(={3,})(?=[ \t]*$)'
scope: markup.heading.0.asciidoc
captures:
1: punctuation.definition.heading.asciidoc
- match: '^(-{3,})(?=[ \t]*$)'
scope: markup.heading.1.asciidoc
captures:
1: punctuation.definition.heading.asciidoc
- match: '^(~{3,})(?=[ \t]*$)'
scope: markup.heading.2.asciidoc
captures:
1: punctuation.definition.heading.asciidoc
- match: '^(\^{3,})(?=[ \t]*$)'
scope: markup.heading.3.asciidoc
captures:
1: punctuation.definition.heading.asciidoc
- match: '^(\+{3,})(?=[ \t]*$)'
scope: markup.heading.4.asciidoc
captures:
1: punctuation.definition.heading.asciidoc
attribute-entry:
- match: '^:[-_. A-Za-z0-9]+:\s*(.*)\s*$'
scope: variable.other
attribute-reference:
- match: "{[-_. A-Za-z0-9]+}"
scope: variable.other
attribute-reference-predefined:
- match: "{(?i:amp|asciidoc-dir|asciidoc-file|asciidoc-version|author|authored|authorinitials|backend-docbook|backend-xhtml11|backend-html4|docbook-article|xhtml11-article|html4-article|docbook-book|xhtml11-book|html4-book|docbook-manpage|xhtml11-manpage|html4-manpage|backend|backslash|basebackend|brvbar|date|docdate|doctime|docname|docfile|docdir|doctitle|doctype-article|doctype-book|doctype-manpage|doctype|email|empty|encoding|filetype|firstname|gt|id|indir|infile|lastname|level|listindex|localdate|localtime|lt|manname|manpurpose|mantitle|manvolnum|middlename|nbsp|outdir|outfile|reftext|revision|sectnum|showcomments|title|two_colons|two_semicolons|user-dir|verbose)}"
scope: support.variable
block_quote:
- match: '^([/+-.*_=]){4,}\s*$'
push:
- meta_scope: comment.block.asciidoc
- match: '^\1{4,}\s*$'
pop: true
block_raw:
- match: '\G([ ]{4}|\t).*$\n?'
scope: markup.raw.block.asciidoc
bracket:
- match: '<(?![a-z/?\$!])'
comment: |
asciidoc will convert this for us. We match it so that the
HTML grammar will not mark it up as invalid.
scope: meta.other.valid-bracket.asciidoc
character-replacements:
- match: \(C\)|\(R\)|\(TM\)|--(?!-)|\.\.\.(?!\.)|->|<-|=>|<=
scope: constant.character.asciidoc
escape:
- match: '\\[-`*_#+.!(){}\[\]\\>:]'
scope: constant.character.escape.asciidoc
heading:
- match: '(?m)^(\S+)$([=-~^+])+\s*$'
scope: markup.heading.asciidoc
captures:
1: punctuation.definition.heading.asciidoc
heading-block:
- match: ^\.(\w.*)$
scope: markup.heading.asciidoc
captures:
1: punctuation.definition.heading.asciidoc
heading-blockattr:
- match: '^\[\[?(\w.*)\]$'
scope: markup.heading.asciidoc
captures:
1: punctuation.definition.heading.asciidoc
heading_inline:
- match: '\G(={1,6})(?!=)\s*(?=\S)'
captures:
1: punctuation.definition.heading.asciidoc
push:
- meta_scope: markup.heading.asciidoc
- meta_content_scope: entity.name.section.asciidoc
- match: \s*(=*)$\n?
captures:
1: punctuation.definition.heading.asciidoc
pop: true
- include: inline
inline:
- include: line-break
- include: line-page-break
- include: line-ruler
- include: escape
- include: passthrough-macro-trippleplus-inline
- include: passthrough-macro-doubledollar-inline
- include: character-replacements
- include: bracket
- include: raw
- include: text-quote-single
- include: text-quote-double
- include: text-quote-other
- include: text-bold-unconstrained
- include: text-italic-unconstrained
- include: text-monospace-unconstrained
- include: text-unquoted-unconstrained
- include: text-bold
- include: text-italic
- include: text-monospace
- include: text-unquoted
- include: attribute-entry
- include: attribute-reference-predefined
- include: attribute-reference
line-break:
- match: (?<=\S)\s+\+$
scope: constant.character.escape.asciidoc
line-page-break:
- match: "^<{3,}$"
scope: constant.character.escape.asciidoc
line-ruler:
- match: "^'{3,}$"
scope: constant.character.escape.asciidoc
list-paragraph:
- match: \G\s+(?=\S)
push:
- meta_scope: meta.paragraph.list.asciidoc
- match: ^\s*$
pop: true
- include: inline
passthrough-macro-doubledollar-inline:
- match: '(?:\[.*\])?\$\$(?!\$).+\$\$(?!\$)'
scope: comment.block.passthrough.asciidoc
passthrough-macro-trippleplus-inline:
- match: '(?:\[.*\])?\+\+\+(?!\+).+\+\+\+(?!\+)'
scope: comment.block.passthrough.asciidoc
raw:
- match: '(`+)(?:[^`]|(?!(?<!`)\1(?!`))`)*+(\1)'
scope: markup.raw.inline.asciidoc
captures:
1: punctuation.definition.raw.asciidoc
2: punctuation.definition.raw.asciidoc
separator:
- match: '\G[ ]{,3}([-*_])([ ]{,2}\1){2,}[ \t]*$\n?'
scope: meta.separator.asciidoc
text-bold:
- match: (?<!\w)(\*)(?=\S)
captures:
1: punctuation.definition.bold.asciidoc
push:
- meta_scope: markup.bold.asciidoc
- match: (?<=\S)(\1)(?!\w)
captures:
1: punctuation.definition.bold.asciidoc
pop: true
text-bold-unconstrained:
- match: (\*\*)(?=\S)
captures:
1: punctuation.definition.bold.asciidoc
push:
- meta_scope: markup.bold.asciidoc
- match: (?<=\S)(\1)
captures:
1: punctuation.definition.bold.asciidoc
pop: true
text-italic:
- match: (?<!\w)('|_)(?=\S)
captures:
1: punctuation.definition.italic.asciidoc
push:
- meta_scope: markup.italic.asciidoc
- match: (?<=\S)(\1)((?!\1)|(?=\1\1))(?!\w)
captures:
1: punctuation.definition.italic.asciidoc
pop: true
text-italic-unconstrained:
- match: (__)(?=\S)
captures:
1: punctuation.definition.italic.asciidoc
push:
- meta_scope: markup.italic.asciidoc
- match: (?<=\S)(\1)
captures:
1: punctuation.definition.italic.asciidoc
pop: true
text-monospace:
- match: '(?<!\w)([\+`])[^\+]*(\1)(?!\w)'
scope: string.interpolated.asciidoc
text-monospace-unconstrained:
- match: (\+\+).*(\1)
scope: string.interpolated.asciidoc
text-quote-double:
- match: '(?<!\w)(?:\[.*\])?``(?!`).*''''(?!'')(?!\w)'
scope: string.quoted.double.asciidoc
text-quote-other:
- match: '(?<!\w)(?:\[.*\])?([~^]).*(\1)(?!\w)'
scope: string.quoted.single.asciidoc
text-quote-single:
- match: '(?<!\w)(?:\[.*\])?`(?!`).*''(?!'')(?!\w)'
comment: "TODO: Sub- and Superscript are really unconstrained"
scope: string.quoted.single.asciidoc
text-unquoted:
- match: (?<!\w)(#).*(\1)(?!\w)
scope: string.unquoted.asciidoc
text-unquoted-unconstrained:
- match: (##).*(\1)
scope: string.unquoted.asciidoc
+172
View File
@@ -0,0 +1,172 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: ARM Assembly
file_extensions:
- s
- S
scope: source.asm.arm
contexts:
main:
- match: "@.*$"
scope: comment.line
- match: //.*$
scope: comment.line
- match: ;.*$
scope: comment.line
- match: ^\s*\#\s*if\s+0\b
push:
- meta_scope: comment.preprocessor
- match: ^\s*\#\s*endif\b
pop: true
- match: /\*
push:
- meta_scope: comment.block
- match: \*/
pop: true
- match: |-
(?x)
^\s*\#\s*(define)\s+ # define
((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name
(?: # and optionally:
(\() # an open parenthesis
(
\s* \g<id> \s* # first argument
((,) \s* \g<id> \s*)* # additional arguments
(?:\.\.\.)? # varargs ellipsis?
)
(\)) # a close parenthesis
)?
captures:
1: keyword.control.import.define.c
2: entity.name.function.preprocessor.c
4: punctuation.definition.parameters.c
5: variable.parameter.preprocessor.c
7: punctuation.separator.parameters.c
8: punctuation.definition.parameters.c
push:
- meta_scope: meta.preprocessor.macro.c
- match: (?=(?://|/\*))|$
pop: true
- match: (?>\\\s*\n)
scope: punctuation.separator.continuation.c
- include: $top_level_main
- match: ^\s*#\s*(error|warning)\b
captures:
1: keyword.control.import.error.c
push:
- meta_scope: meta.preprocessor.diagnostic.c
- match: $
captures:
1: keyword.control.import.error.c
pop: true
- match: (?>\\\s*\n)
scope: punctuation.separator.continuation.c
- match: ^\s*#\s*(include|import)\b\s+
captures:
1: keyword.control.import.include.c
push:
- meta_scope: meta.preprocessor.c.include
- match: (?=(?://|/\*))|$
captures:
1: keyword.control.import.include.c
pop: true
- match: (?>\\\s*\n)
scope: punctuation.separator.continuation.c
- match: '"'
captures:
0: punctuation.definition.string.begin.c
push:
- meta_scope: string.quoted.double.include.c
- match: '"'
captures:
0: punctuation.definition.string.end.c
pop: true
- match: <
captures:
0: punctuation.definition.string.begin.c
push:
- meta_scope: string.quoted.other.lt-gt.include.c
- match: ">"
captures:
0: punctuation.definition.string.end.c
pop: true
- match: '((?i)([xw][0-9]|[xw]1[0-9]||[xw]2[0-9]|[wx]30|wzr|xzr|wsp|fpsr|fpcr|[rcp]1[0-5]|[rcp][0-9]|a[1-4]|v[1-8]|sl|sb|fp|ip|sp|lr|(c|s)psr(_c)?|pc|[sd]3[0-1]|[sd][12][0-9]|[sd][0-9]|fpsid|fpscr|fpexc|q3[0-1]|q2[0-9]|q1[0-9]|q[0-9]|APSR_nzcv|sy)!?(?-i))?\b'
scope: storage.other.register
- match: \.(?i)(globl|global|macro|endm|purgem|if|elseif|else|endif|section|text|arm|align|balign|irp|rept|endr|req|unreq|error|short|func|endfunc|hidden|type|fpu|arch|code|altmacro|object_arch|word|int|string)(?-i)\b
scope: keyword.control.directive
- match: armv(2a?|3m?|4t?|5t?e?6(j|t2|zk?|-m)?|7v?e?(-(a|r|m))?|8-a(\+crc)?)
scope: keyword.control.arch.arm
- match: ^\s*#\s*(define|defined|elif|else|if|ifdef|ifndef|line|pragma|undef|endif)\b
captures:
1: keyword.control.import.c
push:
- meta_scope: meta.preprocessor.c
- match: (?=(?://|/\*))|$
captures:
1: keyword.control.import.c
pop: true
- match: (?>\\\s*\n)
scope: punctuation.separator.continuation.c
- match: |-
(?x)\b((?i)
(
(bf(c|i)|(u|s)bfx|(u|s)xta?(h|b)?) |
(v(add|cvt|sub|mov|trn|cmp|div|qdmulh|mrs|mul|ld1|qadd|qshrun|st[1234]|addw|mull|mlal|rshrn|swp|qmovun)|qmovun)(\.([isup]?8|[isupf]?16|[isuf]?32|[isu]?64))* |
(and|m(rs|sr)|eor|sub|rsb|add|adc|sbc|rsc|tst|teq|cmp|cmn|orr|mov|bic|mvn |
(neg) |
(lsr|lsl|ror|asr) # shift ops either pseudo ops or actual shifts
)s? |
(mul|mla|mull|smlabb) |
(mov(w|t)) |
rev(8|16)? |
(pld|adr|adrl|vswp)
)
(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?(?-i))?\b
scope: support.function.mnemonic.arithmetic
- match: |-
(?x)\b((?i)(
swi|svc|wfi|
dmb | clrex | dsb | isb |
v(ldr|str|push|pop) |
(push|pop) |
(st|ld)(
p |
r(ex|s?(h|b)|d)? |
m(
(f|e)(d|a) |
(d|i)(b|a)
)?
) |
b(l|x|lx|lr|r)? |
(i|e)?ret|
b\.(eq|ne|hs|cs|lo|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|nv)+ |
(c|t)?bn?z|
)+(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?(?-i))\b
scope: support.function.mnemonic.memory
- match: '\b((?i)(def(b|w|s)|equ|(include|get)(\s+([a-zA-Z_]+[0-9a-zA-Z_]*|[0-9]+[a-zA-Z_]+[0-9a-zA-Z_]*?)\.s)?)?(?-i))\b'
scope: meta.preprocessor.c.include
- match: \b((?i)(align)(?-i))?\b
scope: storage.type.c.memaccess
- match: \s+\".+\"
scope: string
- match: \b((?i)nop(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?(?-i))?\b
scope: comment.nop
- match: '\s\['
push:
- meta_scope: storage.type.c.memaccess
- match: '\]'
pop: true
- match: (?>\\\s*\n)
scope: punctuation.separator.continuation.c
- include: $top_level_main
- match: (\b|\s+)\=\b
scope: keyword.control.evaluation
- match: '(\b|\s+)(\#)?-?(0x|&)[0-9a-fA-F_]+\b'
scope: constant.numeric.hex
- match: '(\b|\s+)\#-?[0-9a-zA-Z_]+\b'
scope: constant.numeric.literal
- match: '(\b|\s+)[0-9]+\b'
scope: constant.numeric.dec
- match: '\b([a-zA-Z_]+[0-9a-zA-Z_]*|[0-9]+[a-zA-Z_]+[0-9a-zA-Z_]*)\b'
scope: meta.function.source.arm.label
File diff suppressed because it is too large Load Diff
@@ -33,7 +33,7 @@ contexts:
captures: captures:
1: constant.other.cabal 1: constant.other.cabal
2: punctuation.entity.cabal 2: punctuation.entity.cabal
- match: '^(?i)(executable|library|test-suite|benchmark|flag|source-repository)\s+([^\s,]+)\s*$' - match: '^(?i)(executable|library|test-suite|benchmark|flag|source-repository|custom-setup)\s+([^\s,]+)\s*$'
scope: entity.cabal scope: entity.cabal
captures: captures:
1: keyword.entity.cabal 1: keyword.entity.cabal
+271
View File
@@ -0,0 +1,271 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: CoffeeScript
comment: "CoffeeScript Syntax: version 1"
file_extensions:
- coffee
- Cakefile
- coffee.erb
- cson
first_line_match: ^#!.*\bcoffee
scope: source.coffee
contexts:
main:
- match: '(\([^()]*?\))\s*([=-]>)'
comment: "match stuff like: a -> …"
scope: meta.inline.function.coffee
captures:
1: variable.parameter.function.coffee
2: storage.type.function.coffee
- match: (new)\s+(\w+(?:\.\w*)*)
scope: meta.class.instance.constructor
captures:
1: keyword.operator.new.coffee
2: support.class.coffee
- match: "'''"
captures:
0: punctuation.definition.string.begin.coffee
push:
- meta_scope: string.quoted.heredoc.coffee
- match: "'''"
captures:
0: punctuation.definition.string.end.coffee
pop: true
- match: '"""'
captures:
0: punctuation.definition.string.begin.coffee
push:
- meta_scope: string.quoted.double.heredoc.coffee
- match: '"""'
captures:
0: punctuation.definition.string.end.coffee
pop: true
- match: \\.
scope: constant.character.escape.coffee
- include: interpolated_coffee
- match: "`"
captures:
0: punctuation.definition.string.begin.coffee
push:
- meta_scope: string.quoted.script.coffee
- match: "`"
captures:
0: punctuation.definition.string.end.coffee
pop: true
- match: '\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)'
scope: constant.character.escape.coffee
- match: (?<!#)###(?!#)
captures:
0: punctuation.definition.comment.coffee
push:
- meta_scope: comment.block.coffee
- match: '###(?:[ \t]*\n)'
captures:
0: punctuation.definition.comment.coffee
pop: true
- match: '@\w*'
scope: storage.type.annotation.coffeescript
- match: '(#)(?!\{).*$\n?'
scope: comment.line.number-sign.coffee
captures:
1: punctuation.definition.comment.coffee
- match: "/{3}"
push:
- meta_scope: string.regexp.coffee
- match: "/{3}[imgy]{0,4}"
pop: true
- include: interpolated_coffee
- include: embedded_comment
- match: '/(?![\s=/*+{}?]).*?[^\\]/[igmy]{0,4}(?![a-zA-Z0-9])'
scope: string.regexp.coffee
- match: |-
(?x)
\b(?<![\.\$])(
break|by|catch|continue|else|finally|for|in|of|if|return|switch|
then|throw|try|unless|when|while|until|loop|do|(?<=for)\s+own
)(?!\s*:)\b
scope: keyword.control.coffee
- match: |-
(?x)
and=|or=|!|%|&|\^|\*|\/|(\-)?\-(?!>)|\+\+|\+|~|==|=(?!>)|!=|<=|>=|<<=|>>=|
>>>=|<>|<|>|!|&&|\.\.(\.)?|\?|\||\|\||\:|\*=|(?<!\()/=|%=|\+=|\-=|&=|
\^=|\b(?<![\.\$])(instanceof|new|delete|typeof|and|or|is|isnt|not|super)\b
scope: keyword.operator.coffee
- match: '([a-zA-Z\$_](\w|\$|\.)*\s*(?!\::)((:)|(=[^=]))(?!(\s*\(.*\))?\s*((=|-)>)))'
scope: variable.assignment.coffee
captures:
1: variable.assignment.coffee
4: punctuation.separator.key-value
5: keyword.operator.coffee
- match: '(?<=\s|^)([\[\{])(?=.*?[\]\}]\s+[:=])'
captures:
0: keyword.operator.coffee
push:
- meta_scope: meta.variable.assignment.destructured.coffee
- match: '([\]\}]\s*[:=])'
captures:
0: keyword.operator.coffee
pop: true
- include: variable_name
- include: instance_variable
- include: single_quoted_string
- include: double_quoted_string
- include: numeric
- match: |-
(?x)
(\s*)
(?=[a-zA-Z\$_])
(
[a-zA-Z\$_](\w|\$|:|\.)*\s*
(?=[:=](\s*\(.*\))?\s*([=-]>))
)
scope: meta.function.coffee
captures:
2: entity.name.function.coffee
3: entity.name.function.coffee
4: variable.parameter.function.coffee
5: storage.type.function.coffee
- match: ^\s*(describe|it|app\.(get|post|put|all|del|delete))
comment: Show well-known functions from Express and Mocha in Go To Symbol view
push:
- meta_scope: meta.function.symbols.coffee
- match: $
pop: true
- include: main
- match: "[=-]>"
scope: storage.type.function.coffee
- match: '\b(?<!\.)(true|on|yes)(?!\s*[:=])\b'
scope: constant.language.boolean.true.coffee
- match: '\b(?<!\.)(false|off|no)(?!\s*[:=])\b'
scope: constant.language.boolean.false.coffee
- match: '\b(?<!\.)null(?!\s*[:=])\b'
scope: constant.language.null.coffee
- match: '\b(?<!\.)(this|extends)(?!\s*[:=])\b'
scope: variable.language.coffee
- match: '(class\b)\s+(@?[a-zA-Z\$_][\w\.]*)?(?:\s+(extends)\s+(@?[a-zA-Z\$\._][\w\.]*))?'
scope: meta.class.coffee
captures:
1: storage.type.class.coffee
2: entity.name.type.class.coffee
3: keyword.control.inheritance.coffee
4: entity.other.inherited-class.coffee
- match: \b(debugger|\\)\b
scope: keyword.other.coffee
- match: |-
(?x)\b(
Array|ArrayBuffer|Blob|Boolean|Date|document|event|Function|
Int(8|16|32|64)Array|Math|Map|Number|
Object|Proxy|RegExp|Set|String|WeakMap|
window|Uint(8|16|32|64)Array|XMLHttpRequest
)\b
scope: support.class.coffee
- match: ((?<=console\.)(debug|warn|info|log|error|time|timeEnd|assert))\b
scope: support.function.console.coffee
- match: |-
(?x)\b(
decodeURI(Component)?|encodeURI(Component)?|eval|parse(Float|Int)|require
)\b
scope: support.function.coffee
- match: |-
(?x)((?<=\.)(
apply|call|concat|every|filter|forEach|from|hasOwnProperty|indexOf|
isPrototypeOf|join|lastIndexOf|map|of|pop|propertyIsEnumerable|push|
reduce(Right)?|reverse|shift|slice|some|sort|splice|to(Locale)?String|
unshift|valueOf
))\b
scope: support.function.method.array.coffee
- match: |-
(?x)((?<=Array\.)(
isArray
))\b
scope: support.function.static.array.coffee
- match: |-
(?x)((?<=Object\.)(
create|definePropert(ies|y)|freeze|getOwnProperty(Descriptors?|Names)|
getProperty(Descriptor|Names)|getPrototypeOf|is(Extensible|Frozen|Sealed)?|
isnt|keys|preventExtensions|seal
))\b
scope: support.function.static.object.coffee
- match: |-
(?x)((?<=Math\.)(
abs|acos|acosh|asin|asinh|atan|atan2|atanh|ceil|cos|cosh|exp|expm1|floor|
hypot|log|log10|log1p|log2|max|min|pow|random|round|sign|sin|sinh|sqrt|
tan|tanh|trunc
))\b
scope: support.function.static.math.coffee
- match: |-
(?x)((?<=Number\.)(
is(Finite|Integer|NaN)|toInteger
))\b
scope: support.function.static.number.coffee
- match: \b(Infinity|NaN|undefined)\b
scope: constant.language.coffee
- match: \;
scope: punctuation.terminator.statement.coffee
- match: ',[ |\t]*'
scope: meta.delimiter.object.comma.coffee
- match: \.
scope: meta.delimiter.method.period.coffee
- match: '\{|\}'
scope: meta.brace.curly.coffee
- match: \(|\)
scope: meta.brace.round.coffee
- match: '\[|\]\s*'
scope: meta.brace.square.coffee
- include: instance_variable
- include: single_quoted_string
- include: double_quoted_string
- include: numeric
double_quoted_string:
- match: '"'
captures:
0: punctuation.definition.string.begin.coffee
push:
- meta_scope: string.quoted.double.coffee
- match: '"'
captures:
0: punctuation.definition.string.end.coffee
pop: true
- match: '\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)'
scope: constant.character.escape.coffee
- include: interpolated_coffee
embedded_comment:
- match: (?<!\\)(#).*$\n?
scope: comment.line.number-sign.coffee
captures:
1: punctuation.definition.comment.coffee
instance_variable:
- match: '(@)([a-zA-Z_\$]\w*)?'
scope: variable.other.readwrite.instance.coffee
interpolated_coffee:
- match: '\#\{'
captures:
0: punctuation.section.embedded.coffee
push:
- meta_scope: source.coffee.embedded.source
- match: '\}'
captures:
0: punctuation.section.embedded.coffee
pop: true
- include: main
numeric:
- match: '(?<!\$)\b((0([box])[0-9a-fA-F]+)|([0-9]+(\.[0-9]+)?(e[+\-]?[0-9]+)?))\b'
scope: constant.numeric.coffee
single_quoted_string:
- match: "'"
captures:
0: punctuation.definition.string.begin.coffee
push:
- meta_scope: string.quoted.single.coffee
- match: "'"
captures:
0: punctuation.definition.string.end.coffee
pop: true
- match: '\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)'
scope: constant.character.escape.coffee
variable_name:
- match: '([a-zA-Z\$_]\w*(\.\w+)*)'
scope: variable.assignment.coffee
captures:
1: variable.assignment.coffee
+14
View File
@@ -0,0 +1,14 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: CpuInfo
file_extensions:
- cpuinfo
scope: source.cpuinfo
contexts:
main:
- match: '^([^:]+)\w*:\w*(.*)$'
captures:
1: keyword.other.cpuinfo-key
2: string.other.cpuinfo-value
@@ -131,9 +131,9 @@ contexts:
scope: keyword.control.pseudo-method.crystal scope: keyword.control.pseudo-method.crystal
- match: '\b(nil|true|false)\b(?![?!])' - match: '\b(nil|true|false)\b(?![?!])'
scope: constant.language.crystal scope: constant.language.crystal
- match: '\b(__(DIR|FILE|LINE)__|self)\b(?![?!])' - match: '\b(__(DIR|FILE|LINE|END_LINE)__|self)\b(?![?!])'
scope: variable.language.crystal scope: variable.language.crystal
- match: '\b(initialize|new|loop|include|extend|raise|getter|setter|property|class_getter|class_setter|class_property|describe|it|with|delegate|def_hash|def_equals|def_equals_and_hash|forward_missing_to|record|assert_responds_to|spawn)\b[!?]?' - match: '\b(initialize|new|loop|include|extend|raise|getter|setter|property|class_getter|class_setter|class_property|describe|context|it|with|delegate|def_hash|def_equals|def_equals_and_hash|forward_missing_to|record|assert_responds_to|spawn|annotation|verbatim)\b[!?]?'
comment: everything being a method but having a special function is a.. comment: everything being a method but having a special function is a..
scope: keyword.control.special-method.crystal scope: keyword.control.special-method.crystal
- match: \b(require)\b - match: \b(require)\b
@@ -180,7 +180,7 @@ contexts:
(?<=^|\s)(def)\s+ # the def keyword (?<=^|\s)(def)\s+ # the def keyword
( (?>[a-zA-Z_\x{80}-\x{10FFFF}][\x{80}-\x{10FFFF}\w]*(?>\.|::))? # a method name prefix ( (?>[a-zA-Z_\x{80}-\x{10FFFF}][\x{80}-\x{10FFFF}\w]*(?>\.|::))? # a method name prefix
(?>[a-zA-Z_\x{80}-\x{10FFFF}][\x{80}-\x{10FFFF}\w]*(?>[?!]|=(?!>))? # the method name (?>[a-zA-Z_\x{80}-\x{10FFFF}][\x{80}-\x{10FFFF}\w]*(?>[?!]|=(?!>))? # the method name
|===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) # …or an operator method |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\](?:=|\?)?) ) # …or an operator method
\s*(\() # the openning parenthesis for arguments \s*(\() # the openning parenthesis for arguments
comment: the method pattern comes from the symbol pattern, see there for a explaination comment: the method pattern comes from the symbol pattern, see there for a explaination
captures: captures:
@@ -201,7 +201,7 @@ contexts:
(?<=^|\s)(def)\s+ # the def keyword (?<=^|\s)(def)\s+ # the def keyword
( (?>[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>\.|::))? # a method name prefix ( (?>[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>\.|::))? # a method name prefix
(?>[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>[?!]|=(?!>))? # the method name (?>[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>[?!]|=(?!>))? # the method name
|===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) # …or an operator method |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\](?:=|\?)?) ) # …or an operator method
[ \t] # the space separating the arguments [ \t] # the space separating the arguments
(?=[ \t]*[^\s#;]) # make sure arguments and not a comment follow (?=[ \t]*[^\s#;]) # make sure arguments and not a comment follow
comment: same as the previous rule, but without parentheses around the arguments comment: same as the previous rule, but without parentheses around the arguments
@@ -221,7 +221,7 @@ contexts:
( \s+ # an optional group of whitespace followed by… ( \s+ # an optional group of whitespace followed by…
( (?>[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>\.|::))? # a method name prefix ( (?>[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>\.|::))? # a method name prefix
(?>[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>[?!]|=(?!>))? # the method name (?>[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>[?!]|=(?!>))? # the method name
|===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) )? # …or an operator method |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\](?:=|\?)?) ) )? # …or an operator method
comment: the optional name is just to catch the def also without a method-name comment: the optional name is just to catch the def also without a method-name
scope: meta.function.method.without-arguments.crystal scope: meta.function.method.without-arguments.crystal
captures: captures:
@@ -588,7 +588,7 @@ contexts:
pop: true pop: true
- match: \\. - match: \\.
comment: Cant be named because its not neccesarily an escape. comment: Cant be named because its not neccesarily an escape.
- match: '(?<!:)(:)(?>[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<[<=]?|<=>|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?|@@?[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*)' - match: '(?<!:)(:)(?>[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<[<=]?|<=>|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\](?:=|\?)?|@@?[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*|!=?(?![?!]))'
comment: symbols comment: symbols
scope: constant.other.symbol.crystal scope: constant.other.symbol.crystal
captures: captures:
@@ -713,14 +713,14 @@ contexts:
captures: captures:
0: punctuation.definition.string.begin.crystal 0: punctuation.definition.string.begin.crystal
push: push:
- meta_scope: string.unquoted.embedded.js.jquery.crystal - meta_scope: string.unquoted.embedded.js.crystal
- meta_content_scope: text.js.jquery.embedded.crystal - meta_content_scope: text.js.embedded.crystal
- match: \s*\2$ - match: \s*\2$
captures: captures:
0: punctuation.definition.string.end.crystal 0: punctuation.definition.string.end.crystal
pop: true pop: true
- include: heredoc - include: heredoc
- include: scope:source.js.jquery - include: scope:source.js
- include: interpolated_crystal - include: interpolated_crystal
- include: escaped_char - include: escaped_char
- match: '(?><<-("?)((?:[_\w]+_|)(?:SH|SHELL))\b\1)' - match: '(?><<-("?)((?:[_\w]+_|)(?:SH|SHELL))\b\1)'
+91
View File
@@ -0,0 +1,91 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: DotENV
file_extensions:
- .env
- .envrc
- .env.dist
- .env.local
- .env.sample
- .env.example
- .env.test
- .env.test.local
- .env.testing
- .env.dev
- .env.development
- .env.development.local
- .env.prod
- .env.production
- .env.production.local
- .env.dusk.local
- .flaskenv
- .env.staging
scope: source.env
contexts:
main:
- match: (#).*$\n?
comment: "Comments - starts with #"
scope: comment.line.number-sign.env
captures:
1: punctuation.definition.comment.env
- match: (\")
comment: Strings (double)
captures:
1: punctuation.definition.string.begin.env
push:
- meta_scope: string.quoted.double.env
- match: (\")
captures:
1: punctuation.definition.string.end
pop: true
- include: interpolation
- include: variable
- include: escape-characters
- match: (\')
comment: Strings (single)
captures:
1: punctuation.definition.string.begin.env
push:
- meta_scope: string.quoted.single.env
- match: (\')
captures:
1: punctuation.definition.string.end
pop: true
- match: '(?<=[\w])\s?='
comment: Assignment Operator
scope: keyword.operator.assignment.env
- match: '([\w]+)(?=\s?\=)'
comment: Variable
scope: variable.other.env
- match: (?i)\s?(export)
comment: Keywords
scope: keyword.other.env
- match: (?i)(?<=\=)\s?(true|false|null)
comment: Constants
scope: constant.language.env
- match: '\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)\b'
comment: Numeric
scope: constant.numeric.env
escape-characters:
- match: '\\[nrt\\\$\"\'']'
scope: constant.character.escape.env
interpolation:
- match: '(\$\{|\{)'
comment: 'Template Syntax: "foo ${bar} {$baz}"'
captures:
1: string.interpolated.env keyword.other.template.begin.env
push:
- match: '(\})'
captures:
1: string.interpolated.env keyword.other.template.end.env
pop: true
- match: '(?x)(\$+)?([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*?\b)'
captures:
1: punctuation.definition.variable.env variable.other.env
2: variable.other.env
variable:
- match: '(?x)(\$+)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*?\b)'
captures:
1: punctuation.definition.variable.env variable.other.env
2: variable.other.env
+133
View File
@@ -0,0 +1,133 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: fstab
file_extensions:
- fstab
scope: source.fstab
contexts:
main:
- include: comment
- match: '^'
push: fstab_device
comment: leading spaces
fstab_device:
- include: comment
- match: '\s*([^=\s]+=)([^\s]+)\s*'
comment: device by uuid or label
set: fstab_mountpoint
captures:
1: punctuation.accessor
2: keyword.other.device
- match: '\s*(//|\\\\)([^\s]+)\s*'
comment: device by samba share
set: fstab_mountpoint
captures:
1: punctuation.accessor
2: keyword.other.device
- match: '\s*([^\s]+)(:)([^\s]+)\s*'
comment: device by server
set: fstab_mountpoint
captures:
1: keyword.other.device
2: punctuation.accessor
3: keyword.other.device
- match: '\s*[^\s/\\]+\s*'
comment: device by dev name
set: fstab_mountpoint
scope: keyword.other.device
- match: '\s*(/dev/)([^\s]+)\s*'
comment: device by dev path
set: fstab_mountpoint
captures:
1: punctuation.accessor
2: keyword.other.device
- match: '\s*([^\s/]*/)*([^\s]+)\s*'
comment: device by unknown path
set: fstab_mountpoint
captures:
1: punctuation.accessor
2: keyword.other.device
- include: clear
fstab_mountpoint:
- include: comment
- match: '\s*/[^\s]*\s*'
comment: mount point
set: fstab_filesystem
scope: string.unquoted.mountpoint
- match: '\s*[^\s]+\s*'
comment: mount point without leading slash (invalid)
set: fstab_filesystem
scope: invalid.illegal
- include: clear
fstab_filesystem:
- include: comment
- match: '\s*[^\s]+\s*'
comment: filesystem type
set: fstab_options
scope: variable.parameter.filesystem
- include: clear
fstab_options:
- include: comment
- match: '([^\s,=]+)(=)([^\s,]+)'
comment: key-value option
captures:
1: entity.name.option
2: entity.other.separator
3: variable.parameter
- match: '[^\s,]+'
comment: flag option
scope: entity.name.option
- match: ','
comment: option separator
scope: punctuation.separator
- match: '\s+'
comment: next field
set: fstab_dump
- include: clear
fstab_dump:
- include: comment
- match: '\s*[01]\s*'
comment: dump field
scope: constant.numeric
set: fstab_pass
- match: '\s*[^\s]+\s*'
comment: invalid dump field
scope: invalid.illegal
set: fstab_pass
- include: clear
fstab_pass:
- include: comment
- match: '\s*[01]\s*'
comment: pass field
scope: constant.numeric
set: expected_eol
- match: '\s*[^\s]+\s*'
comment: invalid pass field
scope: invalid.illegal
set: expected_eol
- include: clear
expected_eol:
- include: comment
- include: clear
- match: '.*'
scope: invalid.illegal
comment:
- match: '\s*#.*$'
comment: comment using the number sign
scope: comment.line
clear:
- match: '.*$'
comment: used for clearing the context
pop: true
+48
View File
@@ -0,0 +1,48 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: group
file_extensions:
- group
scope: source.group
contexts:
main:
- comment: name
match: ^[^:]+
scope: keyword
- comment: password
match: ":"
push: password
password:
- comment: uid
match: ":"
set: gid
- comment: shadowpassword
match: "[^:]+"
scope: invalid
gid:
- comment: gid
match: ":"
set: users
- comment: number
match: "[0-9]+"
scope: constant.numeric
users:
- comment: newline
match: "\n"
pop: true
- comment: directory
match: "[^:\n]+"
scope: variable.parameter
- comment: separator
match: ","
scope: punctuation
+662
View File
@@ -0,0 +1,662 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: HTML (Twig)
file_extensions:
- twig
- html.twig
scope: text.html.twig
contexts:
main:
- match: '(<)([a-zA-Z0-9:]++)(?=[^>]*></\2>)'
captures:
1: punctuation.definition.tag.html
2: entity.name.tag.html
push:
- meta_scope: meta.tag.any.html
- match: (>(<)/)(\2)(>)
captures:
1: punctuation.definition.tag.html
2: meta.scope.between-tag-pair.html
3: entity.name.tag.html
4: punctuation.definition.tag.html
pop: true
- include: tag-stuff
- match: (<\?)(xml)
captures:
1: punctuation.definition.tag.html
2: entity.name.tag.xml.html
push:
- meta_scope: meta.tag.preprocessor.xml.html
- match: (\?>)
captures:
1: punctuation.definition.tag.html
2: entity.name.tag.xml.html
pop: true
- include: tag-generic-attribute
- include: string-double-quoted
- include: string-single-quoted
- match: <!--
captures:
0: punctuation.definition.comment.html
push:
- meta_scope: comment.block.html
- match: '--\s*>'
captures:
0: punctuation.definition.comment.html
pop: true
- match: "--"
scope: invalid.illegal.bad-comments-or-CDATA.html
- include: embedded-code
- match: <!
captures:
0: punctuation.definition.tag.html
push:
- meta_scope: meta.tag.sgml.html
- match: ">"
captures:
0: punctuation.definition.tag.html
pop: true
- match: (?i:DOCTYPE)
captures:
1: entity.name.tag.doctype.html
push:
- meta_scope: meta.tag.sgml.doctype.html
- match: (?=>)
captures:
1: entity.name.tag.doctype.html
pop: true
- match: '"[^">]*"'
scope: string.quoted.double.doctype.identifiers-and-DTDs.html
- match: '\[CDATA\['
push:
- meta_scope: constant.other.inline-data.html
- match: "]](?=>)"
pop: true
- match: (\s*)(?!--|>)\S(\s*)
scope: invalid.illegal.bad-comments-or-CDATA.html
- include: embedded-code
- match: '(?:^\s+)?(<)((?i:style))\b(?![^>]*/>)'
captures:
1: punctuation.definition.tag.html
2: entity.name.tag.style.html
3: punctuation.definition.tag.html
push:
- meta_scope: source.css.embedded.html
- match: (</)((?i:style))(>)(?:\s*\n)?
captures:
1: punctuation.definition.tag.html
2: entity.name.tag.style.html
3: punctuation.definition.tag.html
pop: true
- include: tag-stuff
- match: (>)
captures:
1: punctuation.definition.tag.html
push:
- match: (?=</(?i:style))
pop: true
- include: embedded-code
- include: scope:source.css
- match: '(?:^\s+)?(<)((?i:script))\b(?![^>]*/>)'
captures:
1: punctuation.definition.tag.html
2: entity.name.tag.script.html
push:
- meta_scope: source.js.embedded.html
- match: (?<=</(script|SCRIPT))(>)(?:\s*\n)?
captures:
2: punctuation.definition.tag.html
pop: true
- include: tag-stuff
- match: (?<!</(?:script|SCRIPT))(>)
captures:
1: punctuation.definition.tag.html
2: entity.name.tag.script.html
push:
- match: (</)((?i:script))
captures:
1: punctuation.definition.tag.html
2: entity.name.tag.script.html
pop: true
- match: (//).*?((?=</script)|$\n?)
scope: comment.line.double-slash.js
captures:
1: punctuation.definition.comment.js
- match: /\*
captures:
0: punctuation.definition.comment.js
push:
- meta_scope: comment.block.js
- match: \*/|(?=</script)
captures:
0: punctuation.definition.comment.js
pop: true
- include: php
- include: twig-print-tag
- include: twig-statement-tag
- include: twig-comment-tag
- include: scope:source.js
- match: (</?)((?i:body|head|html)\b)
captures:
1: punctuation.definition.tag.html
2: entity.name.tag.structure.any.html
push:
- meta_scope: meta.tag.structure.any.html
- match: (>)
captures:
1: punctuation.definition.tag.html
2: entity.name.tag.structure.any.html
pop: true
- include: tag-stuff
- match: (</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\b)
captures:
1: punctuation.definition.tag.begin.html
2: entity.name.tag.block.any.html
push:
- meta_scope: meta.tag.block.any.html
- match: (>)
captures:
1: punctuation.definition.tag.end.html
pop: true
- include: tag-stuff
- match: (</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\b)
captures:
1: punctuation.definition.tag.begin.html
2: entity.name.tag.inline.any.html
push:
- meta_scope: meta.tag.inline.any.html
- match: "((?: ?/)?>)"
captures:
1: punctuation.definition.tag.end.html
pop: true
- include: tag-stuff
- match: "(</?)([a-zA-Z0-9:]+)"
captures:
1: punctuation.definition.tag.begin.html
2: entity.name.tag.other.html
push:
- meta_scope: meta.tag.other.html
- match: (>)
captures:
1: punctuation.definition.tag.end.html
pop: true
- include: tag-stuff
- include: entities
- match: <>
scope: invalid.illegal.incomplete.html
- match: <
scope: invalid.illegal.bad-angle-bracket.html
- include: twig-print-tag
- include: twig-statement-tag
- include: twig-comment-tag
embedded-code:
- include: ruby
- include: php
- include: twig-print-tag
- include: twig-statement-tag
- include: twig-comment-tag
- include: python
entities:
- match: "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)"
scope: constant.character.entity.html
captures:
1: punctuation.definition.entity.html
3: punctuation.definition.entity.html
- match: "&"
scope: invalid.illegal.bad-ampersand.html
php:
- match: (?=(^\s*)?<\?)
push:
- match: (?!(^\s*)?<\?)
pop: true
- include: scope:text.html.php
python:
- match: (?:^\s*)<\?python(?!.*\?>)
push:
- meta_scope: source.python.embedded.html
- match: \?>(?:\s*$\n)?
pop: true
- include: scope:source.python
ruby:
- match: "<%+#"
captures:
0: punctuation.definition.comment.erb
push:
- meta_scope: comment.block.erb
- match: "%>"
captures:
0: punctuation.definition.comment.erb
pop: true
- match: <%+(?!>)=?
captures:
0: punctuation.section.embedded.ruby
push:
- meta_scope: source.ruby.embedded.html
- match: "-?%>"
captures:
0: punctuation.section.embedded.ruby
pop: true
- match: (#).*?(?=-?%>)
scope: comment.line.number-sign.ruby
captures:
1: punctuation.definition.comment.ruby
- include: scope:source.ruby
- match: <\?r(?!>)=?
captures:
0: punctuation.section.embedded.ruby.nitro
push:
- meta_scope: source.ruby.nitro.embedded.html
- match: '-?\?>'
captures:
0: punctuation.section.embedded.ruby.nitro
pop: true
- match: (#).*?(?=-?\?>)
scope: comment.line.number-sign.ruby.nitro
captures:
1: punctuation.definition.comment.ruby.nitro
- include: scope:source.ruby
string-double-quoted:
- match: '"'
captures:
0: punctuation.definition.string.begin.html
push:
- meta_scope: string.quoted.double.html
- match: '"'
captures:
0: punctuation.definition.string.end.html
pop: true
- include: embedded-code
- include: entities
string-single-quoted:
- match: "'"
captures:
0: punctuation.definition.string.begin.html
push:
- meta_scope: string.quoted.single.html
- match: "'"
captures:
0: punctuation.definition.string.end.html
pop: true
- include: embedded-code
- include: entities
tag-generic-attribute:
- match: '\b([a-zA-Z\-:]+)'
scope: entity.other.attribute-name.html
tag-id-attribute:
- match: \b(id)\b\s*(=)
captures:
1: entity.other.attribute-name.id.html
2: punctuation.separator.key-value.html
push:
- meta_scope: meta.attribute-with-value.id.html
- match: (?<='|")
captures:
1: entity.other.attribute-name.id.html
2: punctuation.separator.key-value.html
pop: true
- match: '"'
captures:
0: punctuation.definition.string.begin.html
push:
- meta_scope: string.quoted.double.html
- meta_content_scope: meta.toc-list.id.html
- match: '"'
captures:
0: punctuation.definition.string.end.html
pop: true
- include: embedded-code
- include: entities
- match: "'"
captures:
0: punctuation.definition.string.begin.html
push:
- meta_scope: string.quoted.single.html
- meta_content_scope: meta.toc-list.id.html
- match: "'"
captures:
0: punctuation.definition.string.end.html
pop: true
- include: embedded-code
- include: entities
tag-stuff:
- include: tag-id-attribute
- include: tag-generic-attribute
- include: string-double-quoted
- include: string-single-quoted
- include: embedded-code
twig-arrays:
- match: '(?<=[\s\(\{\[:,])\['
captures:
0: punctuation.section.array.begin.twig
push:
- meta_scope: meta.array.twig
- match: '\]'
captures:
0: punctuation.section.array.end.twig
pop: true
- include: twig-arrays
- include: twig-hashes
- include: twig-constants
- include: twig-strings
- include: twig-functions-warg
- include: twig-functions
- include: twig-macros
- include: twig-objects
- include: twig-properties
- include: twig-filters-warg
- include: twig-filters
- include: twig-filters-warg-ud
- include: twig-filters-ud
- match: ","
scope: punctuation.separator.object.twig
twig-comment-tag:
- match: '\{#-?'
captures:
0: punctuation.definition.comment.begin.twig
push:
- meta_scope: comment.block.twig
- match: '-?#\}'
captures:
0: punctuation.definition.comment.end.twig
pop: true
twig-constants:
- match: '(?i)(?<=[\s\[\(\{:,])(?:true|false|null|none)(?=[\s\)\]\}\,])'
scope: constant.language.twig
- match: '(?<=[\s\[\(\{:,]|\.\.|\*\*)[0-9]+(?:\.[0-9]+)?(?=[\s\)\]\}\,]|\.\.|\*\*)'
scope: constant.numeric.twig
twig-filters:
- match: '(?<=(?:[a-zA-Z0-9_\x{7f}-\x{ff}\]\)\''\"]\|)|\{%\sfilter\s)(abs|capitalize|e(?:scape)?|first|join|(?:json|url)_encode|keys|last|length|lower|nl2br|number_format|raw|reverse|round|sort|striptags|title|trim|upper)(?=[\s\|\]\}\):,]|\.\.|\*\*)'
captures:
1: support.function.twig
twig-filters-ud:
- match: '(?<=(?:[a-zA-Z0-9_\x{7f}-\x{ff}\]\)\''\"]\|)|\{%\sfilter\s)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)'
captures:
1: meta.function-call.other.twig
twig-filters-warg:
- match: '(?<=(?:[a-zA-Z0-9_\x{7f}-\x{ff}\]\)\''\"]\|)|\{%\sfilter\s)(batch|convert_encoding|date|date_modify|default|e(?:scape)?|format|join|merge|number_format|replace|round|slice|split|trim)(\()'
captures:
1: support.function.twig
2: punctuation.definition.parameters.begin.twig
push:
- meta_content_scope: meta.function.arguments.twig
- match: \)
captures:
0: punctuation.definition.parameters.end.twig
pop: true
- include: twig-constants
- include: twig-functions-warg
- include: twig-functions
- include: twig-macros
- include: twig-objects
- include: twig-properties
- include: twig-filters-warg
- include: twig-filters
- include: twig-filters-warg-ud
- include: twig-filters-ud
- include: twig-strings
- include: twig-arrays
- include: twig-hashes
twig-filters-warg-ud:
- match: '(?<=(?:[a-zA-Z0-9_\x{7f}-\x{ff}\]\)\''\"]\|)|\{%\sfilter\s)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(\()'
captures:
1: meta.function-call.other.twig
2: punctuation.definition.parameters.begin.twig
push:
- meta_content_scope: meta.function.arguments.twig
- match: \)
captures:
0: punctuation.definition.parameters.end.twig
pop: true
- include: twig-constants
- include: twig-functions-warg
- include: twig-functions
- include: twig-macros
- include: twig-objects
- include: twig-properties
- include: twig-filters-warg
- include: twig-filters
- include: twig-filters-warg-ud
- include: twig-filters-ud
- include: twig-strings
- include: twig-arrays
- include: twig-hashes
twig-functions:
- match: (?<=is\s)(defined|empty|even|iterable|odd)
captures:
1: support.function.twig
twig-functions-warg:
- match: '(?<=[\s\(\[\{:,])(attribute|block|constant|cycle|date|divisible by|dump|include|max|min|parent|random|range|same as|source|template_from_string)(\()'
captures:
1: support.function.twig
2: punctuation.definition.parameters.begin.twig
push:
- meta_content_scope: meta.function.arguments.twig
- match: \)
captures:
0: punctuation.definition.parameters.end.twig
pop: true
- include: twig-constants
- include: twig-functions-warg
- include: twig-functions
- include: twig-macros
- include: twig-objects
- include: twig-properties
- include: twig-filters-warg
- include: twig-filters
- include: twig-filters-warg-ud
- include: twig-filters-ud
- include: twig-strings
- include: twig-arrays
twig-hashes:
- match: '(?<=[\s\(\{\[:,])\{'
captures:
0: punctuation.section.hash.begin.twig
push:
- meta_scope: meta.hash.twig
- match: '\}'
captures:
0: punctuation.section.hash.end.twig
pop: true
- include: twig-hashes
- include: twig-arrays
- include: twig-constants
- include: twig-strings
- include: twig-functions-warg
- include: twig-functions
- include: twig-macros
- include: twig-objects
- include: twig-properties
- include: twig-filters-warg
- include: twig-filters
- include: twig-filters-warg-ud
- include: twig-filters-ud
- match: ":"
scope: punctuation.separator.key-value.twig
- match: ","
scope: punctuation.separator.object.twig
twig-keywords:
- match: (?<=\s)((?:end)?(?:autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)|as|do|else|elseif|extends|flush|from|ignore missing|import|include|only|use|with)(?=\s)
scope: keyword.control.twig
twig-macros:
- match: |-
(?x)
(?<=[\s\(\[\{:,])
([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)
(?:
(\.)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)
)?
(\()
captures:
1: meta.function-call.twig
2: punctuation.separator.property.twig
3: variable.other.property.twig
4: punctuation.definition.parameters.begin.twig
push:
- meta_content_scope: meta.function.arguments.twig
- match: \)
captures:
0: punctuation.definition.parameters.end.twig
pop: true
- include: twig-constants
- include: twig-operators
- include: twig-functions-warg
- include: twig-functions
- include: twig-macros
- include: twig-objects
- include: twig-properties
- include: twig-filters-warg
- include: twig-filters
- include: twig-filters-warg-ud
- include: twig-filters-ud
- include: twig-strings
- include: twig-arrays
- include: twig-hashes
twig-objects:
- match: '(?<=[\s\{\[\(:,])([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?=[\s\}\[\]\(\)\.\|,:])'
captures:
1: variable.other.twig
twig-operators:
- match: (?<=\s)(\+|-|//?|%|\*\*?)(?=\s)
captures:
1: keyword.operator.arithmetic.twig
- match: (?<=\s)(=|~)(?=\s)
captures:
1: keyword.operator.assignment.twig
- match: (?<=\s)(b-(?:and|or|xor))(?=\s)
captures:
1: keyword.operator.bitwise.twig
- match: '(?<=\s)((?:!|=)=|<=?|>=?|(?:not )?in|is(?: not)?|(?:ends|starts) with|matches)(?=\s)'
captures:
1: keyword.operator.comparison.twig
- match: (?<=\s)(\?|:|and|not|or)(?=\s)
captures:
1: keyword.operator.logical.twig
- match: '(?<=[a-zA-Z0-9_\x{7f}-\x{ff}\]\)''"])\.\.(?=[a-zA-Z0-9_\x{7f}-\x{ff}''"])'
captures:
0: keyword.operator.other.twig
- match: '(?<=[a-zA-Z0-9_\x{7f}-\x{ff}\]\}\)''"])\|(?=[a-zA-Z_\x{7f}-\x{ff}])'
captures:
0: keyword.operator.other.twig
twig-print-tag:
- match: '\{\{-?'
captures:
0: punctuation.section.tag.twig
push:
- meta_scope: meta.tag.template.value.twig
- match: '-?\}\}'
captures:
0: punctuation.section.tag.twig
pop: true
- include: twig-constants
- include: twig-operators
- include: twig-functions-warg
- include: twig-functions
- include: twig-macros
- include: twig-objects
- include: twig-properties
- include: twig-filters-warg
- include: twig-filters
- include: twig-filters-warg-ud
- include: twig-filters-ud
- include: twig-strings
- include: twig-arrays
- include: twig-hashes
twig-properties:
- match: |-
(?x)
(?<=[a-zA-Z0-9_\x{7f}-\x{ff}])
(\.)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)
(?=[\.\s\|\[\)\]\}:,])
captures:
1: punctuation.separator.property.twig
2: variable.other.property.twig
- match: |-
(?x)
(?<=[a-zA-Z0-9_\x{7f}-\x{ff}])
(\.)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)
(\()
captures:
1: punctuation.separator.property.twig
2: variable.other.property.twig
3: punctuation.definition.parameters.begin.twig
push:
- meta_content_scope: meta.function.arguments.twig
- match: \)
captures:
0: punctuation.definition.parameters.end.twig
pop: true
- include: twig-constants
- include: twig-functions-warg
- include: twig-functions
- include: twig-macros
- include: twig-objects
- include: twig-properties
- include: twig-filters-warg
- include: twig-filters
- include: twig-filters-warg-ud
- include: twig-filters-ud
- include: twig-strings
- include: twig-arrays
- match: |-
(?x)
(?<=[a-zA-Z0-9_\x{7f}-\x{ff}\]])
(?:
(\[)('[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*')(\])
|(\[)("[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*")(\])
|(\[)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(\])
)
captures:
1: punctuation.section.array.begin.twig
2: variable.other.property.twig
3: punctuation.section.array.end.twig
4: punctuation.section.array.begin.twig
5: variable.other.property.twig
6: punctuation.section.array.end.twig
7: punctuation.section.array.begin.twig
8: variable.other.property.twig
9: punctuation.section.array.end.twig
twig-statement-tag:
- match: '\{%-?'
captures:
0: punctuation.section.tag.twig
push:
- meta_scope: meta.tag.template.block.twig
- match: '-?%\}'
captures:
0: punctuation.section.tag.twig
pop: true
- include: twig-constants
- include: twig-keywords
- include: twig-operators
- include: twig-functions-warg
- include: twig-functions
- include: twig-macros
- include: twig-filters-warg
- include: twig-filters
- include: twig-filters-warg-ud
- include: twig-filters-ud
- include: twig-objects
- include: twig-properties
- include: twig-strings
- include: twig-arrays
- include: twig-hashes
twig-strings:
- match: (?:(?<!\\)|(?<=\\\\))'
captures:
0: punctuation.definition.string.begin.twig
push:
- meta_scope: string.quoted.single.twig
- match: (?:(?<!\\)|(?<=\\\\))'
captures:
0: punctuation.definition.string.end.twig
pop: true
- match: (?:(?<!\\)|(?<=\\\\))"
captures:
0: punctuation.definition.string.begin.twig
push:
- meta_scope: string.quoted.double.twig
- match: (?:(?<!\\)|(?<=\\\\))"
captures:
0: punctuation.definition.string.end.twig
pop: true
+23
View File
@@ -0,0 +1,23 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: hosts
file_extensions:
- hosts
scope: source.hosts
contexts:
main:
- scope: comment.line.number-sign
match: \#.*
comment: comment
- match: ^\s*([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|[0-9a-f:]+)
comment: ipaddress
scope: constant.numeric.ipaddress
- match: \s(localhost|ip6-loopback|ip6-localhost|ip6-localnet|ip6-mcastprefix|ip6-allnodes|ip6-allrouters|ip6-allhosts|broadcasthost)\b
scope: keyword.host.predefined}
comment: prefdfined
@@ -12,6 +12,7 @@ file_extensions:
- lng - lng
- cfg - cfg
- CFG - CFG
- desktop
- url - url
- URL - URL
- .editorconfig - .editorconfig
@@ -4,9 +4,11 @@
name: JavaScript (Babel) name: JavaScript (Babel)
file_extensions: file_extensions:
- js - js
- mjs
- jsx - jsx
- babel - babel
- es6 - es6
- cjs
first_line_match: ^#!\s*/.*\b(node|js)$\n? first_line_match: ^#!\s*/.*\b(node|js)$\n?
scope: source.js scope: source.js
contexts: contexts:
+53
View File
@@ -0,0 +1,53 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Manpage
file_extensions:
- man
scope: source.man
variables:
section_heading: '^\S.*$'
contexts:
main:
- match: ^
push: first_line
first_line:
- match: '([A-Z0-9_\-]+)(\()([^)]+)(\))'
captures:
1: meta.preprocessor
2: keyword.operator
3: string.quoted.other
4: keyword.operator
- match: '$'
push: body
body:
- match: '^(SYNOPSIS|SYNTAX|SINTASSI|SKŁADNIA|СИНТАКСИС|書式)'
push: Packages/C/C.sublime-syntax
scope: markup.heading
with_prototype:
- match: '(?={{section_heading}})'
pop: true
- match: '^\S.*$'
scope: markup.heading
- match: '\b([A-Za-z0-9_\-]+)(\()([^)]*)(\))'
captures:
1: entity.name.function
2: keyword.operator
3: constant.numeric
4: keyword.operator
# command-line options like --option=value, --some-flag, or -x
- match: '(?:[^a-zA-Z0-9_-]|^|\s)(--?[A-Za-z0-9][A-Za-z0-9-]*)(?:(=)?("?)([A-Za-z0-9]+)("?))?'
captures:
1: entity.name
2: keyword.operator
3: punctuation.definition.string.begin
4: variable.parameter
3: punctuation.definition.string.end
+14
View File
@@ -0,0 +1,14 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: MemInfo
file_extensions:
- meminfo
scope: source.meminfo
contexts:
main:
- match: '^([^:]+)\w*:\w*(.*)$'
captures:
1: keyword.other.meminfo-key
2: string.other.meminfo-value
+257
View File
@@ -0,0 +1,257 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Nim
file_extensions:
- nim
- nims
scope: source.nim
contexts:
main:
- match: '(\#\[\s*(TODO|todo)?)'
comment: A multiline comment.
captures:
1: punctuation.definition.multi-comment.nim
2: invalid.illegal.TODO.nim
push:
- meta_scope: comment.line.number-sign.multi-comment.nim
- match: '(.*]\#)'
captures:
1: punctuation.definition.multi-comment.nim
2: invalid.illegal.TODO.nim
pop: true
- match: (##\s*(TODO|todo)?).+$\n?
comment: A documentation comment.
scope: comment.line.number-sign.doc-comment.nim
captures:
1: punctuation.definition.doc-comment.nim
2: invalid.illegal.TODO.nim
- match: (##\s*)$\n?
comment: An empty documentation comment.
scope: comment.line.number-sign.doc-comment.empty.nim
captures:
1: punctuation.definition.doc-comment.empty.nim
- match: (#\s*(TODO|todo)?).*$\n?
comment: A regular comment
scope: comment.line.number-sign.comment.nim
captures:
1: punctuation.definition.comment.nim
2: invalid.illegal.TODO.nim
- match: '\{\.'
comment: Pragmas
push:
- meta_scope: pragma
- match: '\.?\}'
pop: true
- match: \"
push:
- meta_scope: string.something.nim
- match: \"
pop: true
- match: '([\w\x{80}-\x{10FFFF}]+)'
scope: entity.other.attribute-name.pragma.nim
- match: discard \"\"\"
comment: A discarded triple string literal comment
push:
- meta_scope: comment.line.discarded.nim
- match: \"\"\"
pop: true
- match: '(?<![\w\x{80}-\x{10FFFF}])(\d[_\d]*((\.[_\d]+([eE][\+\-]?\d[_\d]*)?)|([eE][\+\-]?\d[_\d]*)))(''?([fF](32|64|128))|[fFdD])?'
comment: A float literal
scope: constant.numeric.float.decimal.nim
- match: '(?<![\w\x{80}-\x{10FFFF}])(0[xX][0-9A-Fa-f][_0-9A-Fa-f]*)(''?(([iIuUfF](8|16|32|64))|[uUfFdD]))?'
comment: A hexadecimal literal
scope: constant.numeric.integer.hexadecimal.nim
- match: '(?<![\w\x{80}-\x{10FFFF}])(0[ocC][0-7][_0-7]*)(''?(([iIuUfF](8|16|32|64))|[uUfFdD]))?'
comment: A base-8 integer literal
scope: constant.numeric.integer.octal.nim
- match: '(?<![\w\x{80}-\x{10FFFF}])(0(b|B)[01][_01]*)(''?(([iIuUfF](8|16|32|64))|[uUfFdD]))?'
comment: A base-2 integer literal
scope: constant.numeric.integer.binary.nim
- match: '(?<![\w\x{80}-\x{10FFFF}])(\d[_\d]*)(''?(([iIuUfF](8|16|32|64))|[uUfFdD]))?'
comment: A base-10 integer literal
scope: constant.numeric.integer.decimal.nim
- match: '(?<![\w\x{80}-\x{10FFFF}])(true|false|inf|nil)(?![\w\x{80}-\x{10FFFF}])'
comment: Language Constants.
scope: constant.language.nim
- match: (?:^|\s+|=)(when|if)\b
comment: Primary branching keywords
captures:
1: keyword.control.primary.nim
push:
- match: (?=:)
captures:
1: control.variable.parameter.nim
pop: true
- include: scope:source.nim
- match: (?:^|\s+|=)(case)\b
comment: Primary branching keyword 'case'
captures:
1: keyword.control.primary.nim
push:
- match: (?=\bof\b)
captures:
1: control.variable.parameter.nim
pop: true
- include: scope:source.nim
- match: (?:^|\s+)(of|else|elif)\b
comment: Secondary branching keywords and their conditions
captures:
1: keyword.control.secondary.nim
push:
- match: (?=:)
captures:
1: control.variable.parameter.nim
pop: true
- include: scope:source.nim
- match: '(?<![\w\x{80}-\x{10FFFF}])(await|block|break|continue|do|end|except|finally|raise|return|try|while|yield)(?![\w\x{80}-\x{10FFFF}])'
comment: Keywords that affect program control flow or scope.
scope: keyword.control.nim
- match: '((?<![\w\x{80}-\x{10FFFF}])(and|in|is|isnot|not|notin|or|xor)(?![\w\x{80}-\x{10FFFF}]))'
comment: Keyword boolean operators for expressions.
scope: keyword.operator.boolean.nim
- match: '((?<![\w\x{80}-\x{10FFFF}])(addr|as|atomic|bind|cast|const|converter|defer|discard|distinct|div|enum|export|include|let|mixin|object|of|ptr|ref|shl|shr|static|type|var)(?![\w\x{80}-\x{10FFFF}]))'
comment: Other keywords.
scope: keyword.other.nim
- match: (\b()\b|(=|\+|-|\*|/|<|>|@|\$|~|&|%|!|\?|\^|\.|:|\\)+)
comment: Generic operators for expressions.
scope: keyword.operator.nim
- match: (for)\s+
comment: in keyword in a 'for' loop
captures:
1: keyword.control.nim
push:
- meta_scope: meta.forloop.nim
- match: (?=:)
captures:
1: keyword.control.nim
pop: true
- match: '\ [\w\x{80}-\x{10FFFF},]+\s+(in)\s+'
captures:
1: keyword.control.nim
- include: scope:source.nim
- match: '((import)\s+[\.|\w|\/]+,?)'
comment: Import syntax
captures:
2: keyword.control.nim
- match: '(from)\s+[\/\w]+\s+(?=import)'
captures:
1: keyword.control.nim
- match: (var|let)\s*\(
comment: Destructure syntax
captures:
1: keyword.other.nim
push:
- match: \)
captures:
1: keyword.other.nim
pop: true
- match: '((?<![\w\x{80}-\x{10FFFF}])(generic|interface|lambda|out|shared|with|without)(?![\w\x{80}-\x{10FFFF}]))'
comment: Invalid and unused keywords.
scope: keyword.invalid.nim
- match: '(?<![\w\x{80}-\x{10FFFF}])(new|GC_ref|GC_unref|assert|echo|defined|declared|newException|countup|countdown|len|high|low)(?![\w\x{80}-\x{10FFFF}])'
comment: Common functions
scope: keyword.other.common.function.nim
- match: '(?<![\w\x{80}-\x{10FFFF}])(((uint|int|float)(8|16|32|64)?)|clong|culong|cchar|cschar|cshort|cint|csize|clonglong|cfloat|cdouble|clongdouble|cuchar|cushort|cuint|culonglong|cstringArray|bool|string|auto|cstring|char|byte|tobject|typedesc|stmt|expr|any|untyped|typed)(?![\w\x{80}-\x{10FFFF}])'
comment: Built-in, concrete types.
scope: storage.type.concrete.nim
- match: '(?<![\w\x{80}-\x{10FFFF}])(range|array|seq|tuple|natural|set|ref|ptr|pointer)(?![\w\x{80}-\x{10FFFF}])'
comment: Built-in, generic types.
scope: storage.type.generic.nim
- match: '(?<![\w\x{80}-\x{10FFFF}])(proc|iterator|method|template|macro)(?![\w\x{80}-\x{10FFFF}])'
comment: Function types
scope: storage.type.function.nim
- match: '(?<![\w\x{80}-\x{10FFFF}])(openarray|varargs|void)(?![\w\x{80}-\x{10FFFF}])'
comment: Special types.
scope: storage.type.generic.nim
- match: '(?<![\w\x{80}-\x{10FFFF}])([A-Z][A-Z0-9_]+)(?![\w\x{80}-\x{10FFFF}])'
comment: Other constants.
scope: support.constant.nim
- match: '(?<![\w\x{80}-\x{10FFFF}])([A-Z]\w+)(?![\w\x{80}-\x{10FFFF}])'
comment: Other types.
scope: support.type.nim
- match: '(?<![\w\x{80}-\x{10FFFF}])(\w+)(?![\w\x{80}-\x{10FFFF}])(?=\()'
comment: Function call.
scope: support.function.any-method.nim
- match: r?\"\"\"
comment: (Raw) Triple Quoted String
push:
- meta_scope: string.quoted.triple.nim
- match: '\"\"\"[^\"]'
pop: true
- match: r\"
comment: Raw Double Quoted String
push:
- meta_scope: string.quoted.double.raw.nim
- match: \"
pop: true
- match: \"\"
- match: \"
comment: Double Quoted String
push:
- meta_scope: string.quoted.double.nim
- match: \"
pop: true
- include: escaped_char
- match: \'
comment: Single quoted character literal
push:
- meta_scope: string.quoted.single.nim
- match: \'
pop: true
- match: \\n
scope: invalid.illegal.character.nim
- include: escaped_char
- match: '([^\''][^\'']+?)'
scope: invalid.illegal.character.nim
- match: '([\w\x{80}-\x{10FFFF}\`]+)\s*(?=\(|\[.+?\]\s*\()'
comment: Call syntax
captures:
1: support.function.any-method.nim
push:
- match: \)
captures:
1: support.function.any-method.nim
pop: true
- include: scope:source.nim
- match: '([\w\x{80}-\x{10FFFF}]+)(?=\s+[\w](?![\w\x{80}-\x{10FFFF}]+((?!\n)\s)+))'
comment: Command syntax
captures:
1: support.function.any-method.nim
- match: '([\w\x{80}-\x{10FFFF}]+)(?=\s+[\"\''\`])'
captures:
1: support.function.any-method.nim
- match: (tmpl(i)?)(?=( (nim|html|xml|js|css|glsl|md))?\"\"\")
comment: tmpl specifier
captures:
1: storage.type.function.nim
2: keyword.operator.nim
escaped_char:
- match: '\\[nN]'
scope: constant.character.escape.newline.nim
- match: '\\[cC]|\\[rR]'
scope: constant.character.escape.carriagereturn.nim
- match: '\\[lL]'
scope: constant.character.escape.linefeed.nim
- match: '\\[fF]'
scope: constant.character.escape.formfeed.nim
- match: '\\[tT]'
scope: constant.character.escape.tabulator.nim
- match: '\\[vV]'
scope: constant.character.escape.verticaltabulator.nim
- match: \\\"
scope: constant.character.escape.double-quote.nim
- match: \\'
scope: constant.character.escape.single-quote.nim
- match: '\\[0-9]+'
scope: constant.character.escape.chardecimalvalue.nim
- match: '\\[aA]'
scope: constant.character.escape.alert.nim
- match: '\\[bB]'
scope: constant.character.escape.backspace.nim
- match: '\\[eE]'
scope: constant.character.escape.escape.nim
- match: '\\[xX][0-9A-Fa-f]{2}'
scope: constant.character.escape.hex.nim
- match: \\\\
scope: constant.character.escape.backslash.nim
@@ -140,7 +140,7 @@ contexts:
push: push:
- match: '(?=([\])};]|\b(else|then)\b))' - match: '(?=([\])};]|\b(else|then)\b))'
pop: true pop: true
- match: '(?=(\s*\}|\"|\binherit\b|\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*(\s*\.|\s*=[^=])))' - match: '(?=(\s*\}|\"|\binherit\b|\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*(\s*\.|\s*=[^=])|\$\{[a-zA-z0-9\_\''\-]+\}(\s*\.|\s*=[^=])))'
push: push:
- match: '(?=([\])};,]|\b(else|then)\b))' - match: '(?=([\])};,]|\b(else|then)\b))'
pop: true pop: true
@@ -563,7 +563,7 @@ contexts:
pop: true pop: true
- include: string-quoted - include: string-quoted
- include: expression-cont - include: expression-cont
- match: '([a-zA-Z0-9\.\_\-\+]*(\/[a-zA-Z0-9\.\_\-\+]+)+)' - match: '(~?[a-zA-Z0-9\.\_\-\+]*(\/[a-zA-Z0-9\.\_\-\+]+)+)'
captures: captures:
0: string.unquoted.path.nix 0: string.unquoted.path.nix
push: push:
+219
View File
@@ -0,0 +1,219 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: orgmode
file_extensions:
- org
scope: text.orgmode
contexts:
main:
- match: |-
(?x)
^(\*+) # leading stars
\s*([A-Z_]{2,})? # todo keywords
\s*(\[\#[A-Ca-c]\])? # priority
\s*(?=\s+[A-Za-z0-9]+) # expected heading text
comment: Outline headings
captures:
1: punctuation.definition.heading.orgmode
2: keyword.other.todo.orgmode
3: constant.other.priority.orgmode
push:
- meta_scope: markup.heading.orgmode
- meta_content_scope: entity.name.section.orgmode
- match: (?=\s*$\n?)
pop: true
- include: heading-inline
- match: "^-{5,}$"
scope: meta.separator.orgmode
- match: '^\s*([-+]|\s+\*)\s+(.*?)\s+::'
captures:
1: keyword.operator.list.orgmode
2: markup.bold.definition.orgmode
push:
- meta_scope: meta.list.definition.orgmode
- match: $
pop: true
- include: inline
- match: '^\s*?([-+]|\s+\*|\d+[).])'
captures:
1: keyword.operator.list.orgmode
push:
- meta_scope: meta.list.plain.orgmode
- match: $
pop: true
- include: list-inline
- match: (?i)^#\+(BEGIN_(QUOTE|VERSE|CENTER))$
captures:
1: keyword.control.block.orgmode
push:
- meta_scope: markup.quote.orgmode
- match: (?i)^#\+(END_\2)$
captures:
1: keyword.control.block.orgmode
pop: true
- match: "^#[^+].*$"
scope: comment.line.number-sign.orgmode
- match: ^:(PROPERTIES):$
captures:
1: keyword.control.drawer.orgmode
push:
- meta_scope: meta.drawer.properties.orgmode
- match: ^:(END):$
captures:
1: keyword.control.drawer.orgmode
pop: true
- include: properties
- match: ^:(.+):$
captures:
1: keyword.control.drawer.orgmode
push:
- meta_scope: meta.drawer.other.orgmode
- match: ^:(END):$
captures:
1: keyword.control.drawer.orgmode
pop: true
- match: (?i)#\+(BEGIN_LaTeX)$
captures:
1: keyword.control.block.orgmode
push:
- meta_scope: meta.block.latex.orgmode
- match: (?i)#\+(END_LaTeX)$
captures:
1: keyword.control.block.orgmode
pop: true
- include: scope:text.tex.latex
- match: (?i)#\+(BEGIN_HTML)$
captures:
1: keyword.control.block.orgmode
push:
- meta_scope: meta.block.html.orgmode
- match: (?i)#\+(END_HTML)$
captures:
1: keyword.control.block.orgmode
pop: true
- include: scope:text.html.basic
- match: (?i)#\+(BEGIN_SRC)\s+(python)\s*(.*)$
captures:
1: keyword.control.block.orgmode
2: constant.other.language.orgmode
3: string.other.header-args.orgmode
push:
- meta_scope: meta.block.source.python.orgmode
- match: (?i)#\+(END_SRC)$
captures:
1: keyword.control.block.orgmode
pop: true
- include: scope:source.python
- match: (?i)#\+(BEGIN_SRC)\s+(ruby)\s*(.*)$
captures:
1: keyword.control.block.orgmode
2: constant.other.language.orgmode
3: string.other.header-args.orgmode
push:
- meta_scope: meta.block.source.ruby.orgmode
- match: (?i)#\+(END_SRC)$
captures:
1: keyword.control.block.orgmode
pop: true
- include: scope:source.ruby
- match: (?i)#\+(BEGIN_SRC)\s+((?:emacs-)?lisp)\s*(.*)$
captures:
1: keyword.control.block.orgmode
2: constant.other.language.orgmode
3: string.other.header-args.orgmode
push:
- meta_scope: meta.block.source.lisp.orgmode
- match: (?i)#\+(END_SRC)$
captures:
1: keyword.control.block.orgmode
pop: true
- include: scope:source.lisp
- match: (?i)#\+(BEGIN_SRC)\s+(sh)\s*(.*)$
captures:
1: keyword.control.block.orgmode
2: constant.other.language.orgmode
3: string.other.header-args.orgmode
push:
- meta_scope: meta.block.source.shell.orgmode
- match: (?i)#\+(END_SRC)$
captures:
1: keyword.control.block.orgmode
pop: true
- include: scope:source.shell
- match: '(?i)#\+(BEGIN_(SRC|EXAMPLE))(?:\s+([\w-]+)?\s*(.*))?$'
captures:
1: keyword.control.block.orgmode
3: constant.other.language.orgmode
4: string.other.header-args.orgmode
push:
- meta_scope: meta.block.source.other.orgmode
- meta_content_scope: markup.raw.block.orgmode
- match: (?i)#\+(END_\2)$
captures:
1: keyword.control.block.orgmode
pop: true
- match: '#\+(OPTIONS):'
captures:
1: keyword.control.pragma.orgmode
push:
- meta_scope: meta.pragma.options.orgmode
- match: $
pop: true
- match: '([^\s]+):([^\s]+)'
scope: meta.option.orgmode
captures:
1: variable.parameter.option.orgmode
2: string.other.option.orgmode
- match: '#\+(CALL):\s+[A-Za-z-]+(?:\[([^\]]*)\])?\(?'
captures:
1: keyword.control.pragma.orgmode
2: string.other.header-args.orgmode
push:
- meta_scope: meta.pragma.call.orgmode
- match: '\)?([^)]*)$'
captures:
1: string.other.header-args.orgmode
pop: true
- match: (\w+)=
scope: meta.assignment.orgmode
captures:
1: variable.parameter.header-args.orgmode
- match: '^#\+([a-zA-Z_-]+): ?(.*)$'
scope: meta.pragma.orgmode
captures:
1: keyword.control.pragma.orgmode
2: string.unquoted.pragma.orgmode
- include: inline
heading-inline:
- match: ':([^:^\s]*)(?=:)'
scope: meta.keyword.orgmode
captures:
1: string.quoted.keyword.orgmode
- include: inline
inline:
- match: '(?<=^|[.,:;\s])/[^/]+/(?=$|[.,:;\s])'
scope: markup.italic.orgmode
- match: '(?<=^|[.,:;\s])\*[^*]+\*(?=$|[.,:;\s])'
scope: markup.bold.orgmode
- match: '(?<=^|[.,:;\s])_[^_]+_(?=$|[.,:;\s])'
scope: markup.underline.orgmode
- match: '(?<=^|[.,:;\s])([~=]).+?\1(?=$|[.,:;\s])'
scope: markup.raw.inline.orgmode
- match: '\[(?:\[([^\]]*)\])?\[([^\]]*)\]\]'
scope: meta.link.orgmode
captures:
1: markup.underline.link.orgmode
2: string.other.link.orgmode
- match: (?:http|ftp)s?:\/\/\S+
scope: markup.underline.url.orgmode
list-inline:
- match: '\[[ -X]\]'
scope: keyword.operator.checkbox.orgmode
- include: inline
properties:
- match: '^:([A-Za-z_]+):\s(.*)$'
scope: meta.property.orgmode
captures:
1: keyword.control.property.orgmode
2: string.unquoted.propval.orgmode
+71
View File
@@ -0,0 +1,71 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: passwd
file_extensions:
- passwd
scope: source.passwd
contexts:
main:
- comment: name
match: ^[^:]+
scope: keyword
- comment: password
match: ":"
push: password
password:
- comment: uid
match: ":"
set: uid
- comment: shadowpassword
match: "[^:]+"
scope: invalid
uid:
- comment: gid
match: ":"
set: gid
- comment: number
match: "[0-9]+"
scope: constant.numeric
gid:
- comment: comment
match: ":"
set: comment
- comment: number
match: "[0-9]+"
scope: constant.language
comment:
- comment: directory
match: ":"
set: directory
- comment: comment
match: "[^:]+"
scope: entity.name
directory:
- comment: shell
match: ":"
set: shell
- comment: directory
match: "[^:]+"
scope: string.unquoted
shell:
- comment: newline
match: "\n"
pop: true
- comment: directory
match: "[^:\n]+"
scope: variable.parameter
@@ -147,7 +147,7 @@ contexts:
2: keyword.other.powershell 2: keyword.other.powershell
3: variable.parameter.powershell 3: variable.parameter.powershell
attribute: attribute:
- match: '(\[)\s*\b(?i)(cmdletbinding|alias|outputtype|parameter|validatenotnull|validatenotnullorempty|validatecount|validateset|allownull|allowemptycollection|allowemptystring|validatescript|validaterange|validatepattern|validatelength)\b' - match: '(\[)\s*\b(?i)(cmdletbinding|alias|outputtype|parameter|validatenotnull|validatenotnullorempty|validatecount|validateset|allownull|allowemptycollection|allowemptystring|validatescript|validaterange|validatepattern|validatelength|supportswildcards)\b'
captures: captures:
1: punctuation.section.bracket.begin.powershell 1: punctuation.section.bracket.begin.powershell
2: support.function.attribute.powershell 2: support.function.attribute.powershell
@@ -165,31 +165,11 @@ contexts:
captures: captures:
0: punctuation.section.group.end.powershell 0: punctuation.section.group.end.powershell
pop: true pop: true
- include: variable
- include: variableNoProperty
- include: hashtable
- include: scriptblock
- include: doubleQuotedStringEscapes
- include: doubleQuotedString
- include: type
- include: numericConstant
- include: doubleQuotedString
- include: main - include: main
- match: (?i)\b(mandatory|valuefrompipeline|valuefrompipelinebypropertyname|valuefromremainingarguments|position|parametersetname|defaultparametersetname|supportsshouldprocess|supportspaging|positionalbinding|helpuri|confirmimpact|helpmessage)\b(?:\s+)?(=)? - match: (?i)\b(mandatory|valuefrompipeline|valuefrompipelinebypropertyname|valuefromremainingarguments|position|parametersetname|defaultparametersetname|supportsshouldprocess|supportspaging|positionalbinding|helpuri|confirmimpact|helpmessage)\b(?:\s+)?(=)?
captures: captures:
1: variable.parameter.attribute.powershell 1: variable.parameter.attribute.powershell
2: keyword.operator.assignment.powershell 2: keyword.operator.assignment.powershell
- match: (?<!')'
captures:
0: punctuation.definition.string.begin.powershell
push:
- meta_scope: string.quoted.single.powershell
- match: "'(?!')"
captures:
0: punctuation.definition.string.end.powershell
pop: true
- match: "''"
scope: constant.character.escape.powershell
commands: commands:
- match: '(?:(\p{L}|\d|_|-|\\|\:)*\\)?\b(?i:Add|Approve|Assert|Backup|Block|Build|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Deploy|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Mount|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Write)\-.+?(?:\.(?i:exe|cmd|bat|ps1))?\b' - match: '(?:(\p{L}|\d|_|-|\\|\:)*\\)?\b(?i:Add|Approve|Assert|Backup|Block|Build|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Deploy|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Mount|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Write)\-.+?(?:\.(?i:exe|cmd|bat|ps1))?\b'
comment: "Verb-Noun pattern:" comment: "Verb-Noun pattern:"
@@ -242,14 +222,14 @@ contexts:
pop: true pop: true
- match: '(?i)\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,64}\b' - match: '(?i)\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,64}\b'
- include: variableNoProperty - include: variableNoProperty
- include: variable
- include: doubleQuotedStringEscapes - include: doubleQuotedStringEscapes
- include: interpolation - include: interpolation
- match: '`\s*$' - match: '`\s*$'
scope: keyword.other.powershell scope: keyword.other.powershell
doubleQuotedStringEscapes: doubleQuotedStringEscapes:
- match: '`[0abnfrvt"''$`]' - match: '`[`0abefnrtv"''$]'
scope: constant.character.escape.powershell scope: constant.character.escape.powershell
- include: unicodeEscape
- match: '""' - match: '""'
scope: constant.character.escape.powershell scope: constant.character.escape.powershell
function: function:
@@ -362,6 +342,11 @@ contexts:
- match: '(?!\d+|\.)(?:\p{L}|\p{N}|\.)+' - match: '(?!\d+|\.)(?:\p{L}|\p{N}|\.)+'
scope: storage.type.powershell scope: storage.type.powershell
- include: main - include: main
unicodeEscape:
- match: '`u\{(?:(?:10)?([0-9a-fA-F]){1,4}|0?\g<1>{1,5})}'
scope: constant.character.escape.powershell
- match: '`u(?:\{[0-9a-fA-F]{,6}.)?'
scope: invalid.character.escape.powershell
variable: variable:
- match: (\$)(?i:(False|Null|True))\b - match: (\$)(?i:(False|Null|True))\b
comment: These are special constants. comment: These are special constants.
@@ -374,13 +359,13 @@ contexts:
0: support.constant.variable.powershell 0: support.constant.variable.powershell
1: punctuation.definition.variable.powershell 1: punctuation.definition.variable.powershell
3: variable.other.member.powershell 3: variable.other.member.powershell
- match: '(\$)(?i:(\$|\^|\?|_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This))((?:\.(?:\p{L}|\d|_)+)*\b)?\b' - match: '(\$)((?:[$^?])|(?i:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\b)((?:\.(?:\p{L}|\d|_)+)*\b)?'
comment: Automatic variables are not constants, but they are read-only. In monokai (default) color schema support.variable doesn't have color, so we use constant. comment: Automatic variables are not constants, but they are read-only. In monokai (default) color schema support.variable doesn't have color, so we use constant.
captures: captures:
0: support.constant.automatic.powershell 0: support.variable.automatic.powershell
1: punctuation.definition.variable.powershell 1: punctuation.definition.variable.powershell
3: variable.other.member.powershell 3: variable.other.member.powershell
- match: '(\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|ProgressPreference|PsCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|VerbosePreference|WarningPreference|WhatIfPreference))((?:\.(?:\p{L}|\d|_)+)*\b)?\b' - match: '(\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))((?:\.(?:\p{L}|\d|_)+)*\b)?\b'
comment: Style preference variables as language variables so that they stand out. comment: Style preference variables as language variables so that they stand out.
captures: captures:
0: variable.language.powershell 0: variable.language.powershell
@@ -426,19 +411,19 @@ contexts:
0: support.constant.variable.powershell 0: support.constant.variable.powershell
1: punctuation.definition.variable.powershell 1: punctuation.definition.variable.powershell
3: variable.other.member.powershell 3: variable.other.member.powershell
- match: (\$)(?i:(\$|\^|\?|_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This))\b - match: '(\$)((?:[$^?])|(?i:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\b)'
comment: Automatic variables are not constants, but they are read-only... comment: Automatic variables are not constants, but they are read-only...
captures: captures:
0: support.variable.automatic.powershell 0: support.variable.automatic.powershell
1: punctuation.definition.variable.powershell 1: punctuation.definition.variable.powershell
3: variable.other.member.powershell 3: variable.other.member.powershell
- match: (\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|ProgressPreference|PsCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|VerbosePreference|WarningPreference|WhatIfPreference))\b - match: (\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))\b
comment: Style preference variables as language variables so that they stand out. comment: Style preference variables as language variables so that they stand out.
captures: captures:
0: variable.language.powershell 0: variable.language.powershell
1: punctuation.definition.variable.powershell 1: punctuation.definition.variable.powershell
3: variable.other.member.powershell 3: variable.other.member.powershell
- match: '(?i:(\$|@)(global|local|private|script|using|workflow):((?:\p{L}|\d|_)+))' - match: '(?i:(\$)(global|local|private|script|using|workflow):((?:\p{L}|\d|_)+))'
captures: captures:
0: variable.other.readwrite.powershell 0: variable.other.readwrite.powershell
1: punctuation.definition.variable.powershell 1: punctuation.definition.variable.powershell
+103
View File
@@ -0,0 +1,103 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: QML
file_extensions:
- qml
- qmlproject
scope: source.qml
contexts:
main:
- match: /\*(?!/)
comment: Block comment.
push:
- meta_scope: comment.block.documentation.qml
- match: \*/
pop: true
- match: //.*$
comment: Line comment.
scope: comment.line.double-slash.qml
- match: \b(import)\s+
comment: import statement.
captures:
1: keyword.other.import.qml
push:
- meta_scope: meta.import.qml
- match: $
pop: true
- match: '([\w\d\.]+)\s+(\d+\.\d+)(?:\s+(as)\s+([A-Z][\w\d]*))?'
comment: "import Namespace VersionMajor.VersionMinor [as SingletonTypeIdentifier]"
scope: meta.import.namespace.qml
captures:
1: entity.name.class.qml
2: constant.numeric.qml
3: keyword.other.import.qml
4: entity.name.class.qml
- match: '(\"[^\"]+\")(?:\s+(as)\s+([A-Z][\w\d]*))?'
comment: "import <string> [as Script]"
scope: meta.import.dirjs.qml
captures:
1: string.quoted.double.qml
2: keyword.other.import.qml
3: entity.name.class.qml
- match: '\b[A-Z]\w*\b'
comment: Capitalized word (class or enum).
scope: support.class.qml
- match: '(((^|\{)\s*)|\b)on[A-Z]\w*\b'
comment: onSomething - handler.
scope: support.class.qml
- match: '(?:^|\{)\s*(id)\s*\:\s*([^;\s]+)\b'
comment: "id: <something>"
scope: meta.id.qml
captures:
1: keyword.other.qml
2: storage.modifier.qml
- match: '^\s*(?:(default|readonly)\s+)?(property)\s+(?:(alias)|([\w\<\>]+))\s+(\w+)'
comment: property definition.
scope: meta.propertydef.qml
captures:
1: keyword.other.qml
2: keyword.other.qml
3: keyword.other.qml
4: storage.type.qml
5: entity.other.attribute-name.qml
- match: \b(signal)\s+(\w+)\s*
comment: "signal <signalName>[([<type> <parameter>[, ...]])]"
captures:
1: keyword.other.qml
2: support.function.qml
push:
- meta_scope: meta.signal.qml
- match: ;|(?=/)|$
pop: true
- match: (\w+)\s+(\w+)
scope: meta.signal.parameters.qml
captures:
1: storage.type.qml
2: variable.parameter.qml
- match: (?:\b|\s+)(?:(true|false|null|undefined)|(var|void)|(on|as|enum|connect|break|case|catch|continue|debugger|default|delete|do|else|finally|for|if|in|instanceof|new|return|switch|this|throw|try|typeof|while|with))\b
comment: js keywords.
scope: meta.keyword.qml
captures:
1: constant.language.qml
2: storage.type.qml
3: keyword.control.qml
- match: '\b(function)\s+([\w_]+)\s*(?=\()'
comment: function definition.
scope: meta.function.qml
captures:
1: storage.type.qml
2: entity.name.function.untitled
- match: '\b[\w_]+\s*(?=\()'
comment: function call.
scope: support.function.qml
- match: '(?:^|\{|;)\s*[a-z][\w\.]*\s*(?=\:)'
comment: "property (property: <something>)."
scope: entity.other.attribute-name.qml
- match: (?<=\.)\b\w*
comment: property of the variable (name.property).
scope: entity.other.attribute-name.qml
- match: '\b([a-z_]\w*)\b'
comment: All non colored words are assumed to be variables.
scope: variable.parameter
- include: scope:source.js
+97
View File
@@ -0,0 +1,97 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Rego
file_extensions:
- rego
scope: source.rego
contexts:
main:
- include: comment
- include: keyword
- include: operator
- include: head
- include: term
comment:
- match: (#).*$\n?
scope: comment.line.number-sign.rego
captures:
1: punctuation.definition.comment.rego
call:
- match: '([a-zA-Z_][a-zA-Z0-9_]*)\('
scope: meta.function-call.rego
captures:
1: support.function.any-method.rego
constant:
- match: \b(?:true|false|null)\b
scope: constant.language.rego
head:
- match: "^([[:alpha:]_][[:alnum:]_]*)"
captures:
1: entity.name.function.declaration
push:
- meta_scope: meta.function.rego
- match: '(=|{|\n)'
pop: true
- include: term
keyword:
- match: (^|\s+)(?:(default|not|package|import|as|with|else|some))\s+
scope: keyword.other.rego
number:
- match: |-
(?x: # turn on extended mode
-? # an optional minus
(?:
0 # a zero
| # ...or...
[1-9] # a 1-9 character
\d* # followed by zero or more digits
)
(?:
(?:
\. # a period
\d+ # followed by one or more digits
)?
(?:
[eE] # an e character
[+-]? # followed by an option +/-
\d+ # followed by one or more digits
)? # make exponent optional
)? # make decimal portion optional
)
scope: constant.numeric.rego
operator:
- match: \=|\!\=|>|<|<\=|>\=|\+|-|\*|%|/|\||&|:\=
scope: keyword.operator.comparison.rego
string:
- match: '"'
captures:
0: punctuation.definition.string.begin.rego
push:
- meta_scope: string.quoted.double.rego
- match: '"'
captures:
0: punctuation.definition.string.end.rego
pop: true
- match: |-
(?x: # turn on extended mode
\\ # a literal backslash
(?: # ...followed by...
["\\/bfnrt] # one of these characters
| # ...or...
u # a u
[0-9a-fA-F]{4} # and four hex digits
)
)
scope: constant.character.escape.rego
- match: \\.
scope: invalid.illegal.unrecognized-string-escape.rego
term:
- include: constant
- include: string
- include: number
- include: call
- include: variable
variable:
- match: '\b[[:alpha:]_][[:alnum:]_]*\b'
scope: meta.identifier.rego
+21
View File
@@ -0,0 +1,21 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: resolv
file_extensions:
- resolv.conf
scope: source.resolv
contexts:
main:
- scope: comment.line.number-sign
match: \#.*
comment: comment
- comment: configuration
match: "(nameserver|domain|search|sortlist|options)"
scope: keyword.control
- comment: options
match: "(debug|ndots|timeout|attempts|rotate|no-check-names|inet6|ip6-bytestring|ip6-dotint|no-ip6-dotint|edns0|single-request|single-request-reopen|no-tld-query|use-vc|no-reload)"
scope: entity.name
@@ -52,3 +52,6 @@ contexts:
- meta_scope: keyword.control.robot - meta_scope: keyword.control.robot
- match: '($|\||\s{2,})' - match: '($|\||\s{2,})'
pop: true pop: true
- match: (?i)^\s+(Given|When|and|but|Then)
comment: BDD keywords
scope: string.robot.bdd
+33
View File
@@ -0,0 +1,33 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: SML
file_extensions:
- sml
- cm
- sig
scope: source.sml
contexts:
main:
- match: \b(EQUAL|GREATER|LESS|NONE|SOME|abstraction|abstype|and|andalso|array|as|before|bool|case|char|datatype|do|else|end|eqtype|exception|exn|false|fn|fun|functor|handle|if|in|include|infix|infixr|int|let|list|local|nil|nonfix|not|o|of|op|open|option|orelse|overload|print|raise|real|rec|ref|sharing|sig|signature|string|struct|structure|substring|then|true|type|unit|val|vector|where|while|with|withtype|word)\b
comment: SML keywords
scope: keyword.source.sml
- match: '\b[0-9]+\b'
comment: Numeric constants
scope: constant.numeric.sml
- match: '\b[A-Z]([A-z0-9]*)\b'
comment: Built in types
scope: support.type.sml
- match: '"(\\"|[^"])*"'
comment: String constant
scope: string.sml
- match: \(\*
comment: Comment
push:
- meta_scope: comment.sml
- match: \*\)
pop: true
- match: '(\(\)|=>|::|\[\]|->|:>)'
comment: Character
scope: constant.character.sml
+711
View File
@@ -0,0 +1,711 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Stylus
file_extensions:
- styl
- stylus
scope: source.stylus
contexts:
main:
- include: comments
- match: '^\s*(@(?:import|charset|css|font-face|(?:-webkit-)?keyframes)(?:\s+([\w-]+))?)\b'
captures:
1: keyword.control.at-rule.other.stylus
2: variable.other.animation-name.stylus
push:
- match: '$|;|(?=\{)'
pop: true
- include: string-quoted
- match: ^\s*(@media)\s*
captures:
1: keyword.control.at-rule.media.stylus
push:
- match: '$|(?=\{)'
pop: true
- include: media-query
- match: |-
(?x)
(?<=^|;|})
\s*
(?=
[\[\]'".\w$-]+
\s*
([?:]?=)
(?![^\[]*\])
)
push:
- match: $|;
pop: true
- include: expression
- include: iteration
- include: conditionals
- include: return
- match: |-
(?x) # multi-line regex definition mode
^(\s*) # starts at the beginning of line
([\w$-]+) # identifier (name)
(\() # start of argument list
(?=
.*?
\)\s*\{ # we see a curly brace afterwards
) # which means this is a function definition
captures:
2: entity.name.function.stylus
3: punctuation.definition.parameters.start.stylus
push:
- meta_scope: meta.function-call.stylus
- match: (\))
captures:
1: punctuation.definition.parameters.end.stylus
pop: true
- include: expression
- match: |-
(?x) # multi-line regex definition mode
(
(^|;) # starts at the beginning of line or at a ;
\s*
(\+?\s* # for block mixins
[\w$-]+) # identifier (name)
(\() # start of argument list
(?=
.*?
\)\s*;?\s* # if there are only spaces and semicolons
$|; # then this a
)
)
captures:
3: entity.other.attribute-name.mixin.stylus
4: punctuation.definition.parameters.start.stylus
push:
- meta_scope: meta.function-call.stylus
- match: (\))
captures:
1: punctuation.definition.parameters.end.stylus
pop: true
- include: expression
- match: |-
(?x) # multi-line regex definition mode
(^|(?<=\*/|\}))\s*
(?=
font(?!
\s*:\s
|
-
|
.*?
(?:
\/|normal|bold|light(er?)|serif|sans|monospace|
\b\d+(?:\b|px|r?em|%)|
var\s*\(|
['"][^\]]*$
)
) | # we need to distinguish between tag and property `cursor`
cursor(?!
\s*[:;]\s
|
-
|
.*?
(?:
(?:url\s*\()|
(?:-moz-|-webkit-|-ms-)?
(?:auto|default|none|context-menu|help|pointer|progress|
wait|cell|crosshair|text|vertical-text|alias|copy|
move|no-drop|not-allowed|e-resize|n-resize|ne-resize|
nw-resize|s-resize|se-resize|sw-resize|w-resize|
ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|
row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing
normal|bold|light(er?)|serif|sans|monospace)
)
) | (
(
altGlyph|altGlyphDef|altGlyphItem|animate|animateColor|
animateMotion|animateTransform|circle|clipPath|color-profile|
defs|desc|ellipse|feBlend|feColorMatrix|
feComponentTransfer|feComposite|feConvolveMatrix|
feDiffuseLighting|feDisplacementMap|feDistantLight|feFlood|
feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feImage|feMerge|
feMergeNode|feMorphology|feOffset|fePointLight|
feSpecularLighting|feSpotLight|feTile|feTurbulence|filter|
font-face|font-face-format|font-face-name|font-face-src|
font-face-uri|foreignObject|g|glyph|glyphRef|hkern|image|line|
linearGradient|marker|mask|metadata|missing-glyph|mpath|path|
pattern|polygon|polyline|radialGradient|rect|set|stop|svg|
switch|symbol|text|textPath|tref|tspan|use|view|vkern|
a|abbr|acronym|address|applet|area|article|aside|audio|b|base|
basefont|bdi|bdo|bgsound|big|blink|blockquote|body|br|button|
canvas|caption|center|cite|code|col|colgroup|data|
datalist|dd|decorator|del|details|dfn|dir|div|dl|dt|element|
em|embed|fieldset|figcaption|figure|footer|form|frame|
frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|
img|input|ins|isindex|kbd|keygen|label|legend|li|link|listing|
main|map|mark|marquee|menu|menuitem|meta|meter|nav|nobr|
noframes|noscript|object|ol|optgroup|option|output|p|param|
plaintext|pre|progress|q|rp|rt|ruby|s|samp|script|section|
select|shadow|small|source|spacer|span|strike|strong|style|
sub|summary|sup|table|tbody|td|template|textarea|tfoot|th|
thead|time|title|tr|track|tt|u|ul|var|video|wbr|xmp)
\s*([\s,.#\[]|:[^\s]|(?=\{|$))
) | (
[:~>\[*\/] # symbols but they are valid for selector
) | (
\+\s*[\w$-]+\b\s* # are an identifier starting with $
(?!\() # and they can't have anything besides
) | ( # for animtions
\d+(\.\d+)?%|(from|to)\b
) | ( # Placeholder selectors
\$[\w$-]+\b\s* # are an identifier starting with $
(?=$|\{) # and they can't have anything besides
) | ( # CSS class
\.[a-zA-Z0-9_-]+
) | ( # CSS id
\#[a-zA-Z0-9_-]+
) | ( # Reference to parent
([\w\d_-]+)? # matching any word right before &
(&) # & itself, escaped because of plist
([\w\d_-]+)? # matching any word right after &
)
)
push:
- meta_scope: meta.selector.stylus
- match: |-
|$|(?=\{\s*\}.*$)|(?=\{.*?[:;])|(?=\{)(?!.+\}.*$)
pop: true
- include: comma
- match: \d+(\.\d+)?%|from|to
scope: entity.other.animation-keyframe.stylus
- include: selector-components
- match: .
scope: entity.other.attribute-name.stylus
- match: |-
(?x) # multi-line regex definition mode
(?<=^|;|{)\s* # starts after begining of line, '{' or ';''
(?= # lookahead for
(
[a-zA-Z0-9_-] # then a letter
| # or
(\{(.*?)\}) # interpolation
| # or
(/\*.*?\*/) # comment
)+
\s*[:\s]\s* # value is separted by colon or space
(?!(\s*\{)) # if there are only spaces afterwards
(?!
[^}]*? # checking for an unclosed curly braces on this
\{ # line because if one exists it means that
[^}]* # this is a selector and not a property
($|\})
)
)
push:
- match: '(?=\}|;)|(?<!,)\s*\n'
pop: true
- include: comments
- include: interpolation
- match: '(?<!^|;|{)\s*(?:(:)|\s)'
captures:
1: punctuation.separator.key-value.stylus
push:
- match: '(;)|(?=\})|(?=(?<!\,)\s*\n)'
captures:
1: punctuation.terminator.rule.stylus
pop: true
- include: comments
- include: expression
- match: "-(moz|o|ms|webkit|khtml)-"
scope: support.type.vendor-prefix.stylus
- match: .
scope: meta.property-name.stylus support.type.property-name.stylus
- match: '@extends?\s'
captures:
0: keyword.language.stylus
push:
- match: (?=$|;)
pop: true
- include: selector-components
- include: string-quoted
- include: escape
- include: language-constants
- include: language-operators
- include: language-keywords
- include: property-reference
- include: function-call
- match: '\{'
scope: punctuation.section.start.stylus
- match: '\}'
scope: punctuation.section.end.stylus
attribute-selector:
- match: '\[(?=[^\]]*\])'
captures:
0: punctuation.definition.entity.start.stylus
push:
- meta_scope: meta.attribute-selector.stylus
- match: '\]'
captures:
0: punctuation.definition.entity.end.stylus
pop: true
- match: '(?<=\[)|(?<=\{)'
push:
- match: '(?=[|~=\]\s])'
pop: true
- include: interpolation
- match: .
captures:
0: entity.other.attribute-name.stylus
- include: interpolation
- match: "([|~]?=)"
captures:
1: keyword.operator.stylus
- include: string-quoted
- match: .
captures:
0: string.unquoted.stylus
color-values:
- match: \b(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\b
scope: constant.color.w3c-standard-color-name.stylus
- match: (hsla?|rgba?)\s*(\()
captures:
1: keyword.language.function.misc.stylus
2: punctuation.definition.parameters.start.stylus
push:
- match: \)
captures:
0: punctuation.definition.parameters.end.stylus
pop: true
- match: |-
(?x) # multi-line regex definition mode
\b
(?:0*((?:1?[0-9]{1,2})|(?:2(?:[0-4][0-9]|5[0-5])))\s*(,)\s*)
(?:0*((?:1?[0-9]{1,2})|(?:2(?:[0-4][0-9]|5[0-5])))\s*(,)\s*)
(?:0*((?:1?[0-9]{1,2})|(?:2(?:[0-4][0-9]|5[0-5])))\b)
captures:
1: constant.other.color.rgb-value.stylus constant.other.color.rgb-value.red.stylus
2: punctuation.delimiter.comma.stylus
3: constant.other.color.rgb-value.stylus constant.other.color.rgb-value.green.stylus
4: punctuation.delimiter.comma.stylus
5: constant.other.color.rgb-value.stylus constant.other.color.rgb-value.blue.stylus
- match: |-
(?x) # multi-line regex definition mode
\b
((?:[0-9]{1,2}|100)%)(,) # red
\s*
((?:[0-9]{1,2}|100)%)(,) # green
\s*
((?:[0-9]{1,2}|100)%) # blue
captures:
1: constant.other.color.rgb-value.stylus constant.other.color.rgb-value.red.stylus
2: punctuation.delimiter.comma.stylus
3: constant.other.color.rgb-value.stylus constant.other.color.rgb-value.green.stylus
4: punctuation.delimiter.comma.stylus
5: constant.other.color.rgb-value.stylus constant.other.color.rgb-value.blue.stylus
- match: |-
(?x) # multi-line regex definition mode
(?:\s*(,)\s*((0?\.[0-9]+)|[0-1]))?
captures:
1: punctuation.delimiter.comma.stylus
2: constant.other.color.rgb-value.stylus constant.other.color.rgb-value.alpha.stylus
- include: numeric-values
- include: numeric-values
comma:
- match: \s*,\s*
scope: punctuation.delimiter.comma.stylus
comments:
- include: single-line-comment
- match: \/\*
captures:
0: punctuation.definition.comment.stylus
push:
- meta_scope: comment.block.stylus
- match: \*\/
captures:
0: punctuation.definition.comment.stylus
pop: true
conditionals:
- match: '(^\s*|\s+)(if|unless|else)(?=[\s({]|$)\s*'
captures:
2: keyword.control.stylus
push:
- match: '(?=$|\{)'
pop: true
- include: expression
escape:
- match: \\.
scope: constant.character.escape.stylus
expression:
- include: single-line-comment
- include: comma
- include: iteration
- include: conditionals
- include: language-operators
- include: language-keywords
- include: hash-definition
- include: color-values
- include: url
- include: function-call
- include: string-quoted
- include: escape
- include: hash-access
- include: language-constants
- include: language-property-value-constants
- include: property-reference
- include: variable
function-call:
- match: '([\w$-]+)(\()'
captures:
1: entity.function-name.stylus
2: punctuation.definition.parameters.start.stylus
push:
- meta_scope: meta.function-call.stylus
- match: (\))
captures:
1: punctuation.definition.parameters.end.stylus
pop: true
- include: expression
hash-access:
- match: '(?=[\w$-]+(?:\.|\[[^\]=]*\]))'
push:
- meta_scope: meta.hash-access.stylus
- match: '(?=[^''''""\[\]\w.$-]|\s|$)'
pop: true
- match: \.
scope: punctuation.delimiter.hash.stylus
- match: '\['
scope: punctuation.definition.entity.start.stylus
- match: '\]'
scope: punctuation.definition.entity.end.stylus
- include: string-quoted
- include: variable
hash-definition:
- match: '\{'
captures:
0: punctuation.section.embedded.start.stylus
push:
- meta_scope: meta.hash.stylus
- match: '\}'
captures:
0: punctuation.section.embedded.end.stylus
pop: true
- include: single-line-comment
- match: |-
(?x)
(?:
([\w$-]+)
|
('[^']*')
|
("[^"]*")
)
\s*
(:)
\s*
captures:
1: support.type.property-name.stylus
2: string.quoted.single.stylus
3: string.quoted.double.stylus
4: punctuation.separator.key-value.stylus
push:
- match: '(;)|(?=\}|$)'
captures:
1: punctuation.terminator.statement.stylus
pop: true
- include: expression
interpolation:
- match: '\{'
captures:
0: punctuation.section.embedded.start.stylus
push:
- meta_scope: stylus.embedded.source
- match: '\}'
captures:
0: punctuation.section.embedded.end.stylus
pop: true
- include: expression
iteration:
- match: (^\s*|\s+)(for)\s+(?=.*?\s+in\s+)
captures:
2: keyword.control.stylus
push:
- match: '$|\{'
pop: true
- include: expression
language-constants:
- match: \b(true|false|null)\b
scope: constant.language.stylus
language-keywords:
- match: (\b|\s)(return|else)\b
scope: keyword.control.stylus
- match: (\b|\s)(!important|in|is defined|is a)\b
scope: keyword.other.stylus
- match: \barguments\b
scope: variable.language.stylus
language-operators:
- match: ((?:\?|:|!|~|\+|-|(?:\*)?\*|\/|%|(\.)?\.\.|<|>|(?:=|:|\?|\+|-|\*|\/|%|<|>)?=|!=)|\b(?:in|is(?:nt)?|(?<!:)not)\b)
scope: keyword.operator.stylus
language-property-value-constants:
- match: \b(absolute|all(-scroll)?|always|armenian|auto|avoid|baseline|below|bidi-override|block|bold(er)?|(border|content|padding)-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|crosshair|cursive|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fantasy|fixed|geometricPrecision|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|monospace|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|optimize(Legibility|Quality|Speed)|outset|outside|overline|pointer|pre(-(wrap|line))?|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|(sans-)?serif|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|sub|super|sw-resize|table(-(row|cell|footer-group|header-group))?|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical(-(ideographic|text))?|visible(Painted|Fill|Stroke)?|w-resize|wait|whitespace|zero|smaller|larger|((xx?-)?(small(er)?|large(r)?))|painted|fill|stroke)\b
scope: constant.property-value.stylus
media-query:
- match: '\s*(?![{;]|$)'
push:
- meta_scope: meta.at-rule.media.stylus
- match: '\s*(?=[{;]|$)'
pop: true
- match: '(?i)\s*(only|not)?\s*(all|aural|braille|embossed|handheld|print|projection|screen|tty|tv)?(?![\w\d$-]+)'
captures:
1: keyword.operator.logic.media.stylus
2: support.constant.media.stylus
push:
- match: '\s*(?:(,)|(?=[{;]|$))'
pop: true
- include: media-query-list
- include: variable
media-query-list:
- match: \s*(and)?\s*(\()\s*
captures:
1: keyword.operator.logic.media.stylus
2: punctuation.definition.parameters.start.stylus
push:
- match: \)
captures:
0: punctuation.definition.parameters.end.stylus
pop: true
- include: media-query-properties
- include: numeric-values
media-query-properties:
- match: \s*:\s*
captures:
0: punctuation.separator.key-value.stylus
- match: |-
(?x)
(
((min|max)-)?
(
((device-)?(height|width|aspect-ratio))|
(color(-index)?)|monochrome|resolution
)
)|grid|scan|orientation
captures:
0: support.type.property-name.media.stylus
- match: \b(portrait|landscape|progressive|interlace)\b
captures:
1: support.constant.property-value.stylus
numeric-values:
- match: |-
(?x) # multi-line regex definition mode
(\#)(?:
([0-9a-fA-F])
([0-9a-fA-F])
([0-9a-fA-F])
([0-9a-fA-F])?
| ([0-9a-fA-F]{2})
([0-9a-fA-F]{2})
([0-9a-fA-F]{2})
([0-9a-fA-F]{2})?
)\b
scope: constant.other.color.rgb-value.stylus
captures:
1: punctuation.definition.constant.stylus
2: constant.other.color.rgb-value.red.stylus
3: constant.other.color.rgb-value.green.stylus
4: constant.other.color.rgb-value.blue.stylus
5: constant.other.color.rgb-value.alpha.stylus
6: constant.other.color.rgb-value.red.stylus
7: constant.other.color.rgb-value.green.stylus
8: constant.other.color.rgb-value.blue.stylus
9: constant.other.color.rgb-value.alpha.stylus
- match: |-
(?x) # multi-line regex definition mode
(?:-|\+)? # negative / positive
(?:
(?:
[0-9]+ # integer part
(?:\.[0-9]+)? # fraction
) |
(?:\.[0-9]+) # fraction without leading zero
)
((?: # units
px|pt|ch|cm|mm|in|
r?em|ex|pc|vw|vh|vmin|vmax|deg|
g?rad|turn|dpi|dpcm|dppx|m?s|k?Hz
)\b|%)?
scope: constant.numeric.stylus
captures:
1: keyword.other.unit.stylus
property-reference:
- match: "@[a-z-]+"
scope: variable.other.property.stylus
pseudo:
- match: (:)(active|checked|default|disabled|empty|enabled|first-child|first-of-type|first|fullscreen|focus|hover|indeterminate|in-range|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|read-only|read-write|required|right|root|scope|target|valid|visited)\b
scope: entity.other.attribute-name.pseudo-class.stylus
captures:
1: puncutation.definition.entity.stylus
- match: (:?:)(before|after)\b
scope: entity.other.attribute-name.pseudo-element.stylus
captures:
1: puncutation.definition.entity.stylus
- match: (::)(first-letter|first-number|selection)\b
scope: entity.other.attribute-name.pseudo-element.stylus
captures:
1: puncutation.definition.entity.stylus
- match: ((:)dir)\s*(?:(\()(ltr|rtl)?(\)))?
captures:
1: entity.other.attribute-name.pseudo-element.stylus
2: puncutation.definition.entity.stylus
3: puncutation.definition.parameters.start.stylus
4: constant.language.stylus
5: puncutation.definition.parameters.end.stylus
- match: ((:)lang)\s*(?:(\()(\w+(-\w+)?)?(\)))?
captures:
1: entity.other.attribute-name.pseudo-element.stylus
2: puncutation.definition.entity.stylus
3: puncutation.definition.parameters.start.stylus
4: constant.language.stylus
5: puncutation.definition.parameters.end.stylus
- include: pseudo-nth
- include: pseudo-not
pseudo-not:
- match: ((:)not)\s*(\()
captures:
1: entity.other.attribute-name.pseudo-element.stylus
2: puncutation.definition.entity.stylus
3: puncutation.definition.parameters.start.stylus
push:
- match: \)
captures:
0: puncutation.definition.parameters.end.stylus
pop: true
- include: selector-components
pseudo-nth:
- match: ((:)(?:nth-child|nth-last-child|nth-of-type|nth-last-of-type|nth-match|nth-last-match|nth-column|nth-last-column))\s*(\()
captures:
1: entity.other.attribute-name.pseudo-class.stylus
2: puncutation.definition.entity.stylus
3: puncutation.definition.parameters.start.stylus
push:
- match: \)
captures:
0: puncutation.definition.parameters.end.stylus
pop: true
- include: language-operators
- include: interpolation
- match: \b(odd|even)\b
scope: constant.language.stylus
- match: \b(\d+)?n\b
scope: variable.language.stylus
captures:
1: constant.numeric.stylus
- match: \d+
scope: constant.numeric.stylus
return:
- match: ^\s*(return)
captures:
1: keyword.control.stylus
push:
- match: (;)|(?=$)
captures:
1: punctuation.terminator.statement.stylus
pop: true
- include: expression
selector-components:
- include: comments
- include: interpolation
- include: attribute-selector
- include: pseudo
- match: '\$[\w$-]+\b'
scope: entity.other.placeholder.stylus
- match: "[:~>]"
scope: keyword.operator.selector.stylus
- match: |-
(?x) # multi-line regex definition mode
\b(
altGlyph|altGlyphDef|altGlyphItem|animate|animateColor|
animateMotion|animateTransform|circle|clipPath|color-profile|
defs|desc|ellipse|feBlend|feColorMatrix|
feComponentTransfer|feComposite|feConvolveMatrix|
feDiffuseLighting|feDisplacementMap|feDistantLight|feFlood|
feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feImage|feMerge|
feMergeNode|feMorphology|feOffset|fePointLight|
feSpecularLighting|feSpotLight|feTile|feTurbulence|filter|
font-face|font-face-format|font-face-name|font-face-src|
font-face-uri|foreignObject|g|glyph|glyphRef|hkern|image|line|
linearGradient|marker|mask|metadata|missing-glyph|mpath|path|
pattern|polygon|polyline|radialGradient|rect|set|stop|svg|
switch|symbol|text|textPath|tref|tspan|use|view|vkern|
a|abbr|acronym|address|applet|area|article|aside|audio|b|base|
basefont|bdi|bdo|bgsound|big|blink|blockquote|body|br|button|
canvas|caption|center|cite|code|col|colgroup|content|data|
datalist|dd|decorator|del|details|dfn|dir|div|dl|dt|element|
em|embed|fieldset|figcaption|figure|font|footer|form|frame|
frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|
img|input|ins|isindex|kbd|keygen|label|legend|li|link|listing|
main|map|mark|marquee|menu|menuitem|meta|meter|nav|nobr|
noframes|noscript|object|ol|optgroup|option|output|p|param|
plaintext|pre|progress|q|rp|rt|ruby|s|samp|script|section|
select|shadow|small|source|spacer|span|strike|strong|style|
sub|summary|sup|table|tbody|td|template|textarea|tfoot|th|
thead|time|title|tr|track|tt|u|ul|var|video|wbr|xmp
)\b
scope: entity.name.tag.stylus
- match: '\.[a-zA-Z0-9_-]+'
scope: entity.other.attribute-name.class.stylus
- match: "#[a-zA-Z0-9_-]+"
scope: entity.other.attribute-name.id.stylus
- match: |-
(?x) # multi-line regex definition mode
([\w\d_-]+)? # matching any word right before &
(&) # & itself, escaped because of plist
([\w\d_-]+)? # matching any word right after &
captures:
1: entity.other.attribute-name.stylus
2: variable.language.stylus
3: entity.other.attribute-name.stylus
single-line-comment:
- match: (\/\/).*$
scope: comment.line.stylus
captures:
1: punctuation.definition.comment.stylus
string-quoted:
- match: "'[^']*'"
scope: string.quoted.single.stylus
- match: '"[^"]*"'
scope: string.quoted.double.stylus
url:
- match: (url)\s*(\()
captures:
1: entity.function-name.stylus
2: punctuation.definition.parameters.start.stylus
push:
- meta_scope: meta.function-call.stylus
- match: (\))
captures:
1: punctuation.definition.parameters.end.stylus
pop: true
- include: string-quoted
- include: language-constants
- include: language-property-value-constants
- include: property-reference
- include: variable
variable:
- match: '([\w$-]+\b)'
scope: variable.other.stylus

Some files were not shown because too many files have changed in this diff Show More