Bat Cat Clone With Syntax Highlighting
github.com
1
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Bat is a modern replacement for the cat command that adds syntax highlighting for over 160 programming and markup languages using the same syntax highlighting engine as the Sublime Text editor. Written in Rust, it provides Git integration that shows changes in the working tree directly in the gutter, automatic paging for long outputs, and line numbers for easy reference. The tool serves as a drop-in replacement for cat while offering dramatically improved readability through its colorized output, which can be customized with custom themes matching popular editor color schemes. It intelligently detects file types based on extensions and content, applying appropriate syntax highlighting without manual configuration. Beyond simple file display, it supports concatenating multiple files with headers showing filenames, displaying non-printable characters such as tabs and line endings, and extracting specific line ranges. The tool integrates seamlessly with other command-line utilities like fzf, ripgrep, and man pages, serving as a default pager or previewer. It also provides a feature to display files from remote Git repositories and supports plain text mode when output is piped to other commands, ensuring compatibility with existing scripts. The project has accumulated over 59,000 GitHub stars and ships with sensible defaults while offering extensive configuration through a YAML-based settings file. Advanced capabilities include custom syntax definitions, multiple built-in themes including Solarized and GitHub color schemes, and the ability to show associated files or URLs for specific content sections. Cross-platform binaries are available for Windows, macOS, and Linux through package managers.
Tags & Categories
Categories
Tags
Statistics
1
Views
0
Clicks
0
Like
0
Dislike