annotate vimtutor.bat @ 15858:3a45b89639fb v8.1.0936

patch 8.1.0936: may leak memory when using 'vartabstop' commit https://github.com/vim/vim/commit/55c77cf2ea9c15e1ec75d1faf702ec3c9e325271 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 16 19:05:11 2019 +0100 patch 8.1.0936: may leak memory when using 'vartabstop' Problem: May leak memory when using 'vartabstop'. (Kuang-che Wu) Solution: Fix handling allocated memory for 'vartabstop'. (closes https://github.com/vim/vim/issues/3976)
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 Feb 2019 19:15:06 +0100
parents 1b154b5f247d
children 831a3f3be6f4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 :: Start Vim on a copy of the tutor file.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 @echo off
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 :: Usage: vimtutor [-console] [xx]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 ::
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 :: -console means gvim will not be used
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 :: xx is a language code like "es" or "nl".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 :: When an xx argument is given, it tries loading that tutor.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 :: When this fails or no xx argument was given, it tries using 'v:lang'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 :: When that also fails, it uses the English version.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 :: Use Vim to copy the tutor, it knows the value of $VIMRUNTIME
13113
1b154b5f247d patch 8.0.1431: MS-Windows: vimtutor fails if %TMP% has special chars
Christian Brabandt <cb@256bit.org>
parents: 12485
diff changeset
13 FOR %%d in (. "%TMP%" "%TEMP%") DO IF EXIST %%d\nul SET TUTORCOPY=%%d\$tutor$
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 SET xx=%1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 IF NOT .%1==.-console GOTO use_gui
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 SHIFT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 SET xx=%1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 GOTO use_vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 :use_gui
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 :: Try making a copy of tutor with gvim. If gvim cannot be found, try using
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 :: vim instead. If vim cannot be found, alert user to check environment and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 :: installation.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 :: The script tutor.vim tells Vim which file to copy.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 :: For Windows NT "start" works a bit differently.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 IF .%OS%==.Windows_NT GOTO ntaction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 start /w gvim -u NONE -c "so $VIMRUNTIME/tutor/tutor.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 IF ERRORLEVEL 1 GOTO use_vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 :: Start gvim without any .vimrc, set 'nocompatible'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 start /w gvim -u NONE -c "set nocp" %TUTORCOPY%
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 GOTO end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 :ntaction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 start "dummy" /b /w gvim -u NONE -c "so $VIMRUNTIME/tutor/tutor.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 IF ERRORLEVEL 1 GOTO use_vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 :: Start gvim without any .vimrc, set 'nocompatible'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 start "dummy" /b /w gvim -u NONE -c "set nocp" %TUTORCOPY%
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 GOTO end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 :use_vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 :: The script tutor.vim tells Vim which file to copy
12485
ab40ecb0fd73 patch 8.0.1122: vimtutor.bat doesn't work well with vim.bat
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
50 call vim -u NONE -c "so $VIMRUNTIME/tutor/tutor.vim"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 IF ERRORLEVEL 1 GOTO no_executable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 :: Start vim without any .vimrc, set 'nocompatible'
12485
ab40ecb0fd73 patch 8.0.1122: vimtutor.bat doesn't work well with vim.bat
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
54 call vim -u NONE -c "set nocp" %TUTORCOPY%
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 GOTO end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 :no_executable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 ECHO.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 ECHO.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 ECHO No vim or gvim found in current directory or PATH.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 ECHO Check your installation or re-run install.exe
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 :end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 :: remove the copy of the tutor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 IF EXIST %TUTORCOPY% DEL %TUTORCOPY%
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 SET xx=