summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-10-03 09:51:06 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-10-03 09:51:06 +0200
commit38d257d50797f612c8876b85d807e770d38a4081 (patch)
tree617d6b0928451a53276d68492b2de81fe9832e21
parent22c30db2e071c1f006cffe050c1435c6b79e0231 (diff)
downloadbin-38d257d50797f612c8876b85d807e770d38a4081.tar.gz
bin-38d257d50797f612c8876b85d807e770d38a4081.tar.xz
remove copy of vimpager
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xvimpager79
1 files changed, 0 insertions, 79 deletions
diff --git a/vimpager b/vimpager
deleted file mode 100755
index 1fe5328..0000000
--- a/vimpager
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-
-# Script for using ViM as a PAGER.
-# Based on Bram's less.sh.
-# Version 1.4.3
-# git://github.com/rkitover/vimpager.git
-
-# Just pass through if not on a tty
-if [ ! -t 1 ]; then
- exec cat "$@"
-fi
-
-case `uname -s` in
- Cygwin) cygwin=1 ;;
- Linux) linux=1 ;;
- SunOS) solaris=1 ;;
- *) bsd=1 ;;
-esac
-
-less_vim() {
- vim -R \
- -c 'let no_plugin_maps = 1' \
- -c 'set scrolloff=999' \
- -c 'runtime! macros/less.vim' \
- -c 'set foldlevel=999' \
- -c 'set mouse=a' \
- -c 'set nonu' \
- -c 'nmap <ESC>u :nohlsearch<cr>' \
- "${@:--}"
-}
-
-awk_pstree() {
- awk -v mypid=$1 '{
- cmd[$1]=$3
- ppid[$1]=$2
- }
- END {
- while (mypid != 1 && cmd[mypid]) {
- ptree=mypid " " cmd[mypid] "\n" ptree
- mypid=ppid[mypid]
- }
- print ptree
- }'
-}
-
-do_ptree() {
- if [ $solaris ]; then
- # Tested on Solaris 8 and 10
- ptree $$
- else
- # Tested on Linux and OS X
- ps awo pid=,ppid=,comm= | awk_pstree $$
- fi
-}
-
-# Check if called from man, perldoc or pydoc
-ptree="`do_ptree`"
-if echo "$ptree" | awk '$2 ~ /(^|\/)(man|perl(doc)?([0-9.]*)?|py(thon|doc|doc2))/ {t=1} END { exit 1-t }'; then
- sed -e 's/\[[^m]*m//g' -e 's/.//g' "${@:--}" \
- | less_vim -c 'set ft=man' -c "set nonumber" -
- exit
-fi
-
-case "$@" in
- *.gz) gunzip -c "${@:--}" | sed -e 's/\[[^m]*m//g' -e 's/.//g' | less_vim - ;;
- *.Z) uncompress -c "${@:--}" | sed -e 's/\[[^m]*m//g' -e 's/.//g' | less_vim - ;;
- *) sed -e 's/\[[^m]*m//g' -e 's/.//g' "${@:--}" | less_vim - ;;
-esac
-
-
-# CONTRIBUTORS:
-#
-# Rafael Kitover
-# Antonio Ospite
-# Jean-Marie Gaillourdet
-# Perry Hargrave
-# Koen Smits
-# Ivan S. Freitas <ivansichfreitas@gmail.com>
-# Wout Mertens (Solaris compatibility, less processes)