From 1fded77e8d2cfe7d7e1d1a41677708dd8f67da56 Mon Sep 17 00:00:00 2001 From: Leiser Fernández Gallo Date: Fri, 30 Nov 2018 11:28:33 +0100 Subject: Add bat support for code highlighting --- ranger/data/scope.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh index 8e0a0f6d..64f55a12 100755 --- a/ranger/data/scope.sh +++ b/ranger/data/scope.sh @@ -186,6 +186,9 @@ handle_mime() { fi highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \ --style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" && exit 5 + + # env COLORTERM=$pygmentize_format bat --color=always --style="plain" "${FILE_PATH}" && exit 5 + # pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}" -- "${FILE_PATH}" && exit 5 exit 2;; -- cgit 1.4.1-2-gfad0