4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Vimtutor only works with vim, not gvim.
12 Solution: Add the -g flag to vimtutor. (Dominique Pelle) Add gvimtutor.
13 Files: src/Makefile, src/gvimtutor, src/vimtutor, runtime/doc/vimtutor.1
16 *** ../vim-7.1.294/src/Makefile Wed May 7 13:09:17 2008
17 --- src/Makefile Wed May 7 17:34:31 2008
21 installtutorbin: $(DEST_VIM)
22 $(INSTALL_DATA) vimtutor $(DEST_BIN)/$(VIMNAME)tutor
23 chmod $(SCRIPTMOD) $(DEST_BIN)/$(VIMNAME)tutor
24 + $(INSTALL_DATA) gvimtutor $(DEST_BIN)/$(GVIMNAME)tutor
25 + chmod $(SCRIPTMOD) $(DEST_BIN)/$(GVIMNAME)tutor
27 installtutor: $(DEST_RT) $(DEST_TUTOR)
28 -$(INSTALL_DATA) $(TUTORSOURCE)/README* $(TUTORSOURCE)/tutor* $(DEST_TUTOR)
32 uninstall: uninstall_runtime
33 -rm -f $(DEST_BIN)/$(VIMTARGET)
34 -rm -f $(DEST_BIN)/vimtutor
35 + -rm -f $(DEST_BIN)/gvimtutor
36 -rm -f $(DEST_BIN)/$(EXTARGET) $(DEST_BIN)/$(VIEWTARGET)
37 -rm -f $(DEST_BIN)/$(GVIMTARGET) $(DEST_BIN)/$(GVIEWTARGET)
38 -rm -f $(DEST_BIN)/$(RVIMTARGET) $(DEST_BIN)/$(RVIEWTARGET)
42 shadow: runtime pixmaps
44 ! cd $(SHADOWDIR); ln -s ../*.[ch] ../*.in ../*.sh ../*.xs ../*.xbm ../toolcheck ../proto ../vimtutor ../mkinstalldirs .
45 mkdir $(SHADOWDIR)/auto
46 cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
47 cd $(SHADOWDIR); rm -f auto/link.sed
50 shadow: runtime pixmaps
52 ! cd $(SHADOWDIR); ln -s ../*.[ch] ../*.in ../*.sh ../*.xs ../*.xbm ../toolcheck ../proto ../vimtutor ../gvimtutor ../mkinstalldirs .
53 mkdir $(SHADOWDIR)/auto
54 cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
55 cd $(SHADOWDIR); rm -f auto/link.sed
56 *** ../vim-7.1.294/src/gvimtutor Wed May 7 17:38:10 2008
57 --- src/gvimtutor Wed May 7 17:29:35 2008
63 + # Start GUI Vim on a copy of the tutor file.
65 + # Usage: gvimtutor [xx]
66 + # See vimtutor for usage.
68 + exec `dirname $0`/vimtutor -g "$@"
69 *** ../vim-7.1.294/src/vimtutor Tue Jul 17 14:32:07 2007
70 --- src/vimtutor Sat Apr 5 12:21:11 2008
74 # Start Vim on a copy of the tutor file.
76 ! # Usage: vimtutor [xx], where xx is a language code like "es" or "nl".
77 # When an argument is given, it tries loading that tutor.
78 # When this fails or no argument was given, it tries using 'v:lang'
79 # When that also fails, it uses the English version.
86 # Start Vim on a copy of the tutor file.
88 ! # Usage: vimtutor [-g] [xx]
89 ! # Where optional argument -g starts vimtutor in gvim (GUI) instead of vim.
90 ! # and xx is a language code like "es" or "nl".
91 # When an argument is given, it tries loading that tutor.
92 # When this fails or no argument was given, it tries using 'v:lang'
93 # When that also fails, it uses the English version.
95 + # Vim could be called "vim" or "vi". Also check for "vimN", for people who
96 + # have Vim installed with its version number.
97 + # We anticipate up to a future Vim 8 version :-).
98 + seq="vim vim8 vim75 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
99 + if test "$1" = "-g"; then
100 + # Try to use the GUI version of Vim if possible, it will fall back
101 + # on Vim if Gvim is not installed.
102 + seq="gvim gvim8 gvim75 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
111 # remove the copy of the tutor on exit
112 trap "rm -rf $TODELETE" 0 1 2 3 9 11 13 15
114 - # Vim could be called "vim" or "vi". Also check for "vimN", for people who
115 - # have Vim installed with its version number.
116 - # We anticipate up to a future Vim 8 version :-).
117 - seq="vim vim8 vim75 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
119 testvim=`which $i 2>/dev/null`
120 if test -f "$testvim"; then
125 # Use Vim to copy the tutor, it knows the value of $VIMRUNTIME
126 # The script tutor.vim tells Vim which file to copy
127 ! $VIM -u NONE -c 'so $VIMRUNTIME/tutor/tutor.vim'
129 # Start vim without any .vimrc, set 'nocompatible'
130 ! $VIM -u NONE -c "set nocp" $TUTORCOPY
133 # Use Vim to copy the tutor, it knows the value of $VIMRUNTIME
134 # The script tutor.vim tells Vim which file to copy
135 ! $VIM -f -u NONE -c 'so $VIMRUNTIME/tutor/tutor.vim'
137 # Start vim without any .vimrc, set 'nocompatible'
138 ! $VIM -f -u NONE -c "set nocp" $TUTORCOPY
139 *** ../vim-7.1.294/runtime/doc/vimtutor.1 Sun Jun 13 18:50:18 2004
140 --- runtime/doc/vimtutor.1 Sat Apr 5 12:21:11 2008
143 vimtutor \- the Vim tutor
146 ! .B vimtutor [language]
151 vimtutor \- the Vim tutor
154 ! .B vimtutor [-g] [language]
164 + The optional argument -g starts vimtutor with gvim rather than vim, if the
165 + GUI version of vim is available, or falls back to Vim if gvim is not found.
167 The optional [language] argument is the two-letter name of a language, like
169 If the [language] argument is missing, the language of the current locale will
170 *** ../vim-7.1.294/src/version.c Wed May 7 13:09:12 2008
171 --- src/version.c Wed May 7 17:12:43 2008
175 { /* Add new patch number below this line */
181 Time flies like an arrow.
182 Fruit flies like a banana.
184 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
185 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
186 \\\ download, build and distribute -- http://www.A-A-P.org ///
187 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///