diff options
-rw-r--r-- | doc/ranger.1 | 31 | ||||
-rw-r--r-- | doc/ranger.pod | 30 | ||||
-rwxr-xr-x | ranger/data/scope.sh | 6 |
3 files changed, 25 insertions, 42 deletions
diff --git a/doc/ranger.1 b/doc/ranger.1 index 0a548dd4..d050b3b2 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RANGER 1" -.TH RANGER 1 "ranger-1.9.2" "2019-05-18" "ranger manual" +.TH RANGER 1 "ranger-1.9.2" "2019-05-20" "ranger manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -1677,31 +1677,22 @@ Defines the terminal emulator command that ranger is going to use with the .IP "\s-1PYGMENTIZE_STYLE\s0" 8 .IX Item "PYGMENTIZE_STYLE" Specifies the theme to be used for syntax highlighting when \fIpygmentize\fR is -installed unless \fIhighlight\fR is also installed, possible values (find out by -running \f(CW\*(C`pygments.styles.get_all_styles()\*(C'\fR): abap, algol, algol_nu, arduino, -autumn, borland, bw, colorful, emacs, friendly, fruity, igor, lovelace, manni, -monokai, murphy, native, paraiso-dark, paraiso-light, pastie, perldoc, -rainbow_dash, rrt, tango, trac, vim, vs and xcode. +installed, unless \fIhighlight\fR is also installed. Find out possible values by +running: + python \-c 'import pygments.styles; [print(stl) for stl in + pygments.styles.\fBget_all_styles()\fR]' .IP "\s-1HIGHLIGHT_STYLE\s0" 8 .IX Item "HIGHLIGHT_STYLE" Specifies the theme to be used for syntax highlighting when \fIhighlight\fR is -installed, possible values (find out by running \f(CW\*(C`highlight \-\-list\-themes\*(C'\fR): -acid, aiseered, andes, anotherdark, autumn, baycomb, bclear, biogoo, bipolar, -blacknblue, bluegreen, breeze, bright, camo, candy, clarity, dante, darkblue, -darkbone, darkness, darkslategray, darkspectrum, denim, dusk, earendel, easter, -edit-anjuta, edit-bbedit, edit-eclipse, edit-emacs, edit-fasm, -edit-flashdevelop, edit-gedit, edit-godot, edit-jedit, edit-kwrite, -edit-matlab, edit\-msvs2008, edit-nedit, edit-purebasic, edit-vim, -edit-vim-dark, edit-xcode, ekvoli, fine_blue, freya, fruit, github, golden, -greenlcd, kellys, leo, lucretia, manxome, maroloccio, matrix, moe, molokai, -moria, navajo-night, navy, neon, night, nightshimmer, nuvola, olive, orion, -oxygenated, pablo, peaksea, print, rand01, rdark, relaxedgreen, rootwater, -seashell, solarized-dark, solarized-light, sourceforge, tabula, tcsoft, the, -vampire, whitengrey, xoria256, zellner, zenburn and zmrok. +installed. Find out possible values by running \f(CW\*(C`highlight \-\-list\-themes\*(C'\fR. +.IP "\s-1HIGHLIGHT_TABWIDTH\s0" 8 +.IX Item "HIGHLIGHT_TABWIDTH" +Specifies the number of spaces to use to replace tabs in \fIhighlight\fRed files. .IP "\s-1HIGHLIGHT_OPTIONS\s0" 8 .IX Item "HIGHLIGHT_OPTIONS" \&\fIhighlight\fR will pick up command line options specified in this variable. A -\&\f(CW\*(C`\-\-style=\*(C'\fR option specified here will override \f(CW\*(C`HIGHLIGHT_STYLE\*(C'\fR. +\&\f(CW\*(C`\-\-style=\*(C'\fR option specified here will override \f(CW\*(C`HIGHLIGHT_STYLE\*(C'\fR. Similarly, +\&\f(CW\*(C`\-\-replace\-tabs=\*(C'\fR will override \f(CW\*(C`HIGHLIGHT_TABWIDTH\*(C'\fR. .IP "\s-1XDG_CONFIG_HOME\s0" 8 .IX Item "XDG_CONFIG_HOME" Specifies the directory for configuration files. Defaults to \fI\f(CI$HOME\fI/.config\fR. diff --git a/doc/ranger.pod b/doc/ranger.pod index d5de3851..7a414df6 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -1816,33 +1816,25 @@ Defines the terminal emulator command that ranger is going to use with the =item PYGMENTIZE_STYLE Specifies the theme to be used for syntax highlighting when I<pygmentize> is -installed unless I<highlight> is also installed, possible values (find out by -running C<pygments.styles.get_all_styles()>): abap, algol, algol_nu, arduino, -autumn, borland, bw, colorful, emacs, friendly, fruity, igor, lovelace, manni, -monokai, murphy, native, paraiso-dark, paraiso-light, pastie, perldoc, -rainbow_dash, rrt, tango, trac, vim, vs and xcode. +installed, unless I<highlight> is also installed. Find out possible values by +running: + python -c 'import pygments.styles; [print(stl) for stl in + pygments.styles.get_all_styles()]' =item HIGHLIGHT_STYLE Specifies the theme to be used for syntax highlighting when I<highlight> is -installed, possible values (find out by running C<highlight --list-themes>): -acid, aiseered, andes, anotherdark, autumn, baycomb, bclear, biogoo, bipolar, -blacknblue, bluegreen, breeze, bright, camo, candy, clarity, dante, darkblue, -darkbone, darkness, darkslategray, darkspectrum, denim, dusk, earendel, easter, -edit-anjuta, edit-bbedit, edit-eclipse, edit-emacs, edit-fasm, -edit-flashdevelop, edit-gedit, edit-godot, edit-jedit, edit-kwrite, -edit-matlab, edit-msvs2008, edit-nedit, edit-purebasic, edit-vim, -edit-vim-dark, edit-xcode, ekvoli, fine_blue, freya, fruit, github, golden, -greenlcd, kellys, leo, lucretia, manxome, maroloccio, matrix, moe, molokai, -moria, navajo-night, navy, neon, night, nightshimmer, nuvola, olive, orion, -oxygenated, pablo, peaksea, print, rand01, rdark, relaxedgreen, rootwater, -seashell, solarized-dark, solarized-light, sourceforge, tabula, tcsoft, the, -vampire, whitengrey, xoria256, zellner, zenburn and zmrok. +installed. Find out possible values by running C<highlight --list-themes>. + +=item HIGHLIGHT_TABWIDTH + +Specifies the number of spaces to use to replace tabs in I<highlight>ed files. =item HIGHLIGHT_OPTIONS I<highlight> will pick up command line options specified in this variable. A -C<--style=> option specified here will override C<HIGHLIGHT_STYLE>. +C<--style=> option specified here will override C<HIGHLIGHT_STYLE>. Similarly, +C<--replace-tabs=> will override C<HIGHLIGHT_TABWIDTH>. =item XDG_CONFIG_HOME diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh index ba9edc50..e9c10916 100755 --- a/ranger/data/scope.sh +++ b/ranger/data/scope.sh @@ -35,9 +35,9 @@ FILE_EXTENSION_LOWER="$(printf "%s" "${FILE_EXTENSION}" | tr '[:upper:]' '[:lowe # Settings HIGHLIGHT_SIZE_MAX=262143 # 256KiB -HIGHLIGHT_TABWIDTH=8 +HIGHLIGHT_TABWIDTH=${HIGHLIGHT_TABWIDTH:-8} HIGHLIGHT_STYLE=${HIGHLIGHT_STYLE:-pablo} -HIGHLIGHT_OPTIONS="--style=${HIGHLIGHT_STYLE} ${HIGHLIGHT_OPTIONS:-}" +HIGHLIGHT_OPTIONS="--replace-tabs=${HIGHLIGHT_TABWIDTH} --style=${HIGHLIGHT_STYLE} ${HIGHLIGHT_OPTIONS:-}" PYGMENTIZE_STYLE=${PYGMENTIZE_STYLE:-autumn} @@ -229,7 +229,7 @@ handle_mime() { local pygmentize_format='terminal' local highlight_format='ansi' fi - env HIGHLIGHT_OPTIONS="${HIGHLIGHT_OPTIONS}" highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" \ + env HIGHLIGHT_OPTIONS="${HIGHLIGHT_OPTIONS}" highlight \ --out-format="${highlight_format}" \ --force -- "${FILE_PATH}" && exit 5 pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}"\ |