comparison src/vimtutor @ 1316:469c42f90fda v7.1.030

updated for version 7.1-030
author vimboss
date Tue, 17 Jul 2007 12:33:46 +0000
parents 3fc0f57ecb91
children 73c5752b957d
comparison
equal deleted inserted replaced
1315:0868e4e53fb2 1316:469c42f90fda
37 export TUTORCOPY 37 export TUTORCOPY
38 38
39 # remove the copy of the tutor on exit 39 # remove the copy of the tutor on exit
40 trap "rm -rf $TODELETE" 0 1 2 3 9 11 13 15 40 trap "rm -rf $TODELETE" 0 1 2 3 9 11 13 15
41 41
42 # Vim could be called "vim" or "vi". Also check for "vim6", for people who 42 # Vim could be called "vim" or "vi". Also check for "vimN", for people who
43 # have Vim 5.x installed as "vim" and Vim 6.0 as "vim6". 43 # have Vim installed with its version number.
44 testvim=`which vim6 2>/dev/null` 44 # We anticipate up to a future Vim 8 version :-).
45 if test -f "$testvim"; then 45 seq="vim vim8 vim75 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
46 VIM=vim6 46 for i in $seq; do
47 else 47 testvim=`which $i 2>/dev/null`
48 testvim=`which vim`
49 if test -f "$testvim"; then 48 if test -f "$testvim"; then
50 VIM=vim 49 VIM=$i
51 else 50 break
52 VIM=vi
53 fi 51 fi
52 done
53
54 # When no Vim version was found fall back to "vim", you'll get an error message
55 # below.
56 if test -z "$VIM"; then
57 VIM=vim
54 fi 58 fi
55 59
56 # Use Vim to copy the tutor, it knows the value of $VIMRUNTIME 60 # Use Vim to copy the tutor, it knows the value of $VIMRUNTIME
57 # The script tutor.vim tells Vim which file to copy 61 # The script tutor.vim tells Vim which file to copy
58 $VIM -u NONE -c 'so $VIMRUNTIME/tutor/tutor.vim' 62 $VIM -u NONE -c 'so $VIMRUNTIME/tutor/tutor.vim'