From 859ff50766e877ac96f7350daa18d6e38fa1d30e Mon Sep 17 00:00:00 2001 From: sharkdp Date: Tue, 21 Apr 2020 17:45:14 +0200 Subject: [PATCH] Update default config file, add comment about tmux mouse scrolling support --- src/bin/bat/config.rs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/bin/bat/config.rs b/src/bin/bat/config.rs index 0ed56bc7..5fc60dc0 100644 --- a/src/bin/bat/config.rs +++ b/src/bin/bat/config.rs @@ -43,21 +43,30 @@ pub fn generate_config_file() -> bat::errors::Result<()> { } } - let default_config = r#"# bat config + let default_config = r#"# This is `bat`s configuration file. Each line either contains a comment or +# a command-line option that you want to pass to `bat` by default. You can +# run `bat --help` to get a list of all possible configuration options. -# Specify desired theme (e.g. "TwoDark"). Issue `bat --list-themes` for a list of all available themes +# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes` +# for a list of all available themes #--theme="TwoDark" -# Enable this to use italic text on the terminal (not supported on all terminals): +# Enable this to use italic text on the terminal. This is not supported on all +# terminal emulators (like tmux, by default): #--italic-text=always # Uncomment the following line to disable automatic paging: #--paging=never -# Use C++ syntax for .ino files -#--map-syntax "*.ino:C++" +# Uncomment the following line if you are using less version >= 551 and want to +# enable mouse scrolling support in `bat` when running inside tmux. This might +# disable text selection, unless you press shift. +#--pager="--RAW-CONTROL-CHARS --quit-if-one-screen --mouse" -# Use ".gitignore"-style highlighting for ".ignore" files +# Syntax mappings: map a certain filename pattern to a language. +# Example 1: use the C++ syntax for .ino files +# Example 2: Use ".gitignore"-style highlighting for ".ignore" files +#--map-syntax "*.ino:C++" #--map-syntax ".ignore:Git Ignore" "#;