mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-26 01:33:44 +01:00
ecd862d9ff
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.
26 lines
817 B
YAML
26 lines
817 B
YAML
%YAML 1.2
|
|
---
|
|
# http://www.sublimetext.com/docs/3/syntax.html
|
|
name: Highlight non-printables
|
|
file_extensions:
|
|
- show-nonprintable
|
|
scope: whitespace
|
|
contexts:
|
|
main:
|
|
- match: "•"
|
|
scope: support.function.show-nonprintable.space
|
|
- match: "├─*┤"
|
|
scope: constant.character.escape.show-nonprintable.tab
|
|
- match: ""
|
|
scope: keyword.operator.show-nonprintable.newline
|
|
- match: "␍"
|
|
scope: string.show-nonprintable.carriage-return
|
|
- match: "␀"
|
|
scope: entity.other.attribute-name.show-nonprintable.null
|
|
- match: "␇"
|
|
scope: entity.other.attribute-name.show-nonprintable.bell
|
|
- match: "␛"
|
|
scope: entity.other.attribute-name.show-nonprintable.escape
|
|
- match: "␈"
|
|
scope: entity.other.attribute-name.show-nonprintable.backspace
|