summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2008-05-07 15:40:33 +0000
committervimboss <devnull@localhost>2008-05-07 15:40:33 +0000
commitdf93835ebb2f3a8001c683e9c2efa8fd8a44f95f (patch)
tree97a834843125b68360f1cbfe2dee13e665a8a074
parent3a01a94e3434edb82d937a357cb41adc4070a54e (diff)
downloadvim-df93835ebb2f3a8001c683e9c2efa8fd8a44f95f.tar.gz
updated for version 7.1-295v7.1.295v7-1-295
-rw-r--r--runtime/doc/vimtutor.15
-rw-r--r--src/Makefile5
-rw-r--r--src/version.c2
-rwxr-xr-xsrc/vimtutor23
4 files changed, 26 insertions, 9 deletions
diff --git a/runtime/doc/vimtutor.1 b/runtime/doc/vimtutor.1
index 4b5aea64..12bde7e4 100644
--- a/runtime/doc/vimtutor.1
+++ b/runtime/doc/vimtutor.1
@@ -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
diff --git a/src/Makefile b/src/Makefile
index ae8878c1..3040dca7 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -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
diff --git a/src/version.c b/src/version.c
index a46ddaec..c8c461e8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -667,6 +667,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 295,
+/**/
294,
/**/
293,
diff --git a/src/vimtutor b/src/vimtutor
index 731b1ef2..70d9ec74 100755
--- a/src/vimtutor
+++ b/src/vimtutor
@@ -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