Skip to content

Commit

Permalink
updated for version 7.1-295
Browse files Browse the repository at this point in the history
  • Loading branch information
vimboss committed May 7, 2008
1 parent bd54260 commit bc8b62f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
5 changes: 4 additions & 1 deletion runtime/doc/vimtutor.1
Expand Up @@ -3,7 +3,7 @@
vimtutor \- the Vim tutor
.SH SYNOPSIS
.br
.B vimtutor [language]
.B vimtutor [-g] [language]
.SH DESCRIPTION
.B Vimtutor
starts the
Expand All @@ -18,6 +18,9 @@ is useful for people that want to learn their first
.B Vim
commands.
.PP
The optional argument -g starts vimtutor with gvim rather than vim, if the
GUI version of vim is available, or falls back to Vim if gvim is not found.
.PP
The optional [language] argument is the two-letter name of a language, like
"it" or "es".
If the [language] argument is missing, the language of the current locale will
Expand Down
5 changes: 4 additions & 1 deletion src/Makefile
Expand Up @@ -1867,6 +1867,8 @@ installmacros: $(DEST_VIM) $(DEST_RT) $(DEST_MACRO)
installtutorbin: $(DEST_VIM)
$(INSTALL_DATA) vimtutor $(DEST_BIN)/$(VIMNAME)tutor
chmod $(SCRIPTMOD) $(DEST_BIN)/$(VIMNAME)tutor
$(INSTALL_DATA) gvimtutor $(DEST_BIN)/$(GVIMNAME)tutor
chmod $(SCRIPTMOD) $(DEST_BIN)/$(GVIMNAME)tutor

installtutor: $(DEST_RT) $(DEST_TUTOR)
-$(INSTALL_DATA) $(TUTORSOURCE)/README* $(TUTORSOURCE)/tutor* $(DEST_TUTOR)
Expand Down Expand Up @@ -2075,6 +2077,7 @@ installmanlinks:
uninstall: uninstall_runtime
-rm -f $(DEST_BIN)/$(VIMTARGET)
-rm -f $(DEST_BIN)/vimtutor
-rm -f $(DEST_BIN)/gvimtutor
-rm -f $(DEST_BIN)/$(EXTARGET) $(DEST_BIN)/$(VIEWTARGET)
-rm -f $(DEST_BIN)/$(GVIMTARGET) $(DEST_BIN)/$(GVIEWTARGET)
-rm -f $(DEST_BIN)/$(RVIMTARGET) $(DEST_BIN)/$(RVIEWTARGET)
Expand Down Expand Up @@ -2171,7 +2174,7 @@ SHADOWDIR = shadow

shadow: runtime pixmaps
mkdir $(SHADOWDIR)
cd $(SHADOWDIR); ln -s ../*.[ch] ../*.in ../*.sh ../*.xs ../*.xbm ../toolcheck ../proto ../vimtutor ../mkinstalldirs .
cd $(SHADOWDIR); ln -s ../*.[ch] ../*.in ../*.sh ../*.xs ../*.xbm ../toolcheck ../proto ../vimtutor ../gvimtutor ../mkinstalldirs .
mkdir $(SHADOWDIR)/auto
cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
cd $(SHADOWDIR); rm -f auto/link.sed
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -666,6 +666,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
295,
/**/
294,
/**/
Expand Down
23 changes: 16 additions & 7 deletions src/vimtutor
Expand Up @@ -2,11 +2,24 @@

# Start Vim on a copy of the tutor file.

# Usage: vimtutor [xx], where xx is a language code like "es" or "nl".
# Usage: vimtutor [-g] [xx]
# Where optional argument -g starts vimtutor in gvim (GUI) instead of vim.
# and xx is a language code like "es" or "nl".
# When an argument is given, it tries loading that tutor.
# When this fails or no argument was given, it tries using 'v:lang'
# When that also fails, it uses the English version.

# Vim could be called "vim" or "vi". Also check for "vimN", for people who
# have Vim installed with its version number.
# We anticipate up to a future Vim 8 version :-).
seq="vim vim8 vim75 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
if test "$1" = "-g"; then
# Try to use the GUI version of Vim if possible, it will fall back
# on Vim if Gvim is not installed.
seq="gvim gvim8 gvim75 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
shift
fi

xx=$1
export xx

Expand Down Expand Up @@ -39,10 +52,6 @@ export TUTORCOPY
# remove the copy of the tutor on exit
trap "rm -rf $TODELETE" 0 1 2 3 9 11 13 15

# Vim could be called "vim" or "vi". Also check for "vimN", for people who
# have Vim installed with its version number.
# We anticipate up to a future Vim 8 version :-).
seq="vim vim8 vim75 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
for i in $seq; do
testvim=`which $i 2>/dev/null`
if test -f "$testvim"; then
Expand All @@ -59,7 +68,7 @@ fi

# Use Vim to copy the tutor, it knows the value of $VIMRUNTIME
# The script tutor.vim tells Vim which file to copy
$VIM -u NONE -c 'so $VIMRUNTIME/tutor/tutor.vim'
$VIM -f -u NONE -c 'so $VIMRUNTIME/tutor/tutor.vim'

# Start vim without any .vimrc, set 'nocompatible'
$VIM -u NONE -c "set nocp" $TUTORCOPY
$VIM -f -u NONE -c "set nocp" $TUTORCOPY

0 comments on commit bc8b62f

Please sign in to comment.