diff options
author | Leiser Fernández Gallo <leiserfg@gmail.com> | 2018-11-30 11:28:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-30 11:28:33 +0100 |
commit | 1fded77e8d2cfe7d7e1d1a41677708dd8f67da56 (patch) | |
tree | c095788634fa7a09500a8a9a6a295281acac8095 | |
parent | bae44ae3c7440c00acf65ba4c26a0fd2a0f78c3a (diff) | |
download | ranger-1fded77e8d2cfe7d7e1d1a41677708dd8f67da56.tar.gz |
Add bat support for code highlighting
-rwxr-xr-x | ranger/data/scope.sh | 3 |
1 files changed, 3 insertions, 0 deletions
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;; |