]> granicus.if.org Git - vim/commitdiff
updated for version 7.1-295 v7.1.295
authorBram Moolenaar <Bram@vim.org>
Wed, 7 May 2008 15:40:33 +0000 (15:40 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 7 May 2008 15:40:33 +0000 (15:40 +0000)
runtime/doc/vimtutor.1
src/Makefile
src/version.c
src/vimtutor

index 4b5aea64daebb9a848979b7d7500a46771d6df20..12bde7e4855ea10376ddb5a13b82b1f95af568f9 100644 (file)
@@ -3,7 +3,7 @@
 vimtutor \- the Vim tutor
 .SH SYNOPSIS
 .br
-.B vimtutor [language]
+.B vimtutor [-g] [language]
 .SH DESCRIPTION
 .B Vimtutor
 starts the
@@ -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
index ae8878c1ec0d48256ce5f1ce711da9e1d94a8655..3040dca738dd1f9a36d9f8ed9c7ad98152aba11d 100644 (file)
@@ -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)
@@ -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)
@@ -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
index a46ddaecb40f9384823adf25818b136a97268380..c8c461e8e2c41266804cdf6663472217304d78bf 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    295,
 /**/
     294,
 /**/
index 731b1ef235a64ad531e1416c285b7690ce870fdc..70d9ec7412d1a5b4d9077124f239db9fec0f5e06 100755 (executable)
@@ -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
 
@@ -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
@@ -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