If a viewed file is changed and a key r or Ctrl+R is typed, than the file has to be updated (repainted). But, it does not do that. To see the updated file without re-starting less, type h and after that type q.

Syntax Highlighting

  1. Install source-highlight:
    # apt install source-highlight
  2. Add to .bashrc or .zshrc:
    export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s"
    export LESS="-R"

Other Options

name of viewed file and line numbers of showed part are added to less prompt
ignore case in search
-s or --squeeze-blank-lines
squeeze consecutive blank lines into a single blank line