Append [grid] to prompt when we think we're running from the grid.
[profile.git] / .profile.d / man.bashrc
1 # $Id$
2 #
3 # Use vim for manpages and infopages.
4 # Requires vim 5+ and info.vim plugin.
5 #
6
7 vimmajor=$(vim --help 2>&1 | head -n 1 | sed 's/^VIM[^0-9]*\([0-9]*\)\..*/\1/')
8
9 function vman() {
10   vim -c "runtime ftplugin/man.vim" -c "Man ${1-man}" \
11       -c "set nolist noruler ls=0" +"wincmd o"
12 }
13
14 function vinfo() {
15   vim -c "Info ${1-info}" \
16       -c "set nolist noruler ls=0" +"wincmd o"
17 }
18
19 if [ ! -z "$vimmajor" -a $vimmajor -gt 4 ]; then
20   alias man=vman
21   alias info=vinfo
22 fi
23
24 unset vimmajor