mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-10-30 22:54:07 +00:00 
			
		
		
		
	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.
This commit is contained in:
		
							
								
								
									
										25
									
								
								assets/syntaxes/show-nonprintable.sublime-syntax
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								assets/syntaxes/show-nonprintable.sublime-syntax
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| %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 | ||||
		Reference in New Issue
	
	Block a user