#!/bin/bash if test -t 1; then # If $DISPLAY is set then prefer gvim to vim if test $DISPLAY; then col -b | gvim -c \ "so \$VIMRUNTIME/macros/less.vim | \ setfiletype man | \ set nomod nolist laststatus=0 noruler | \ syn on" - > /dev/null else col -b | vim -f -c \ "so \$VIMRUNTIME/macros/less.vim | \ setfiletype man | \ set nomod nolist laststatus=0 noruler | \ syn on" - fi else cat fi