annotate runtime/tutor/tutor.vim @ 11466:0e0fc3272dd9

Added tag v8.0.0616 for changeset 7cbcba782c4eec06db2ac892a5620bb1ceda71cf
author Christian Brabandt <cb@256bit.org>
date Sun, 04 Jun 2017 21:15:04 +0200
parents 9560a5b782ee
children a62eeee5f116
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 " Vim tutor support file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1621
diff changeset
3 " Maintainer: Bram Moolenaar
9555
9560a5b782ee commit https://github.com/vim/vim/commit/42ebd066422d73cdb7bda6a1dc828a3dd022dec8
Christian Brabandt <cb@256bit.org>
parents: 6009
diff changeset
4 " Last Change: 2016 Jul 16
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1621
diff changeset
6 " This Vim script is used for detecting if a translation of the
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " tutor file exist, i.e., a tutor.xx file, where xx is the language.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " If the translation does not exist, or no extension is given,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " it defaults to the english version.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " It is invoked by the vimtutor shell script.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " 1. Build the extension of the file, if any:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 let s:ext = ""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 if strlen($xx) > 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 let s:ext = "." . $xx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 let s:lang = ""
782
d20041a02ee5 updated for version 7.0228
vimboss
parents: 557
diff changeset
19 " Check that a potential value has at least two letters.
d20041a02ee5 updated for version 7.0228
vimboss
parents: 557
diff changeset
20 " Ignore "1043" and "C".
d20041a02ee5 updated for version 7.0228
vimboss
parents: 557
diff changeset
21 if exists("v:lang") && v:lang =~ '\a\a'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 let s:lang = v:lang
782
d20041a02ee5 updated for version 7.0228
vimboss
parents: 557
diff changeset
23 elseif $LC_ALL =~ '\a\a'
205
d292c40ca788 updated for version 7.0060
vimboss
parents: 24
diff changeset
24 let s:lang = $LC_ALL
782
d20041a02ee5 updated for version 7.0228
vimboss
parents: 557
diff changeset
25 elseif $LANG =~ '\a\a'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 let s:lang = $LANG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 if s:lang != ""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " Remove "@euro" (ignoring case), it may be at the end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 let s:lang = substitute(s:lang, '\c@euro', '', '')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " On MS-Windows it may be German_Germany.1252 or Polish_Poland.1250. How
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " about other languages?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 if s:lang =~ "German"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 let s:ext = ".de"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 elseif s:lang =~ "Polish"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 let s:ext = ".pl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 elseif s:lang =~ "Slovak"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 let s:ext = ".sk"
6009
7b83c190d370 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3830
diff changeset
39 elseif s:lang =~ "Serbian"
7b83c190d370 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3830
diff changeset
40 let s:ext = ".sr"
1154
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
41 elseif s:lang =~ "Czech"
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
42 let s:ext = ".cs"
782
d20041a02ee5 updated for version 7.0228
vimboss
parents: 557
diff changeset
43 elseif s:lang =~ "Dutch"
d20041a02ee5 updated for version 7.0228
vimboss
parents: 557
diff changeset
44 let s:ext = ".nl"
9555
9560a5b782ee commit https://github.com/vim/vim/commit/42ebd066422d73cdb7bda6a1dc828a3dd022dec8
Christian Brabandt <cb@256bit.org>
parents: 6009
diff changeset
45 elseif s:lang =~ "Bulgarian"
9560a5b782ee commit https://github.com/vim/vim/commit/42ebd066422d73cdb7bda6a1dc828a3dd022dec8
Christian Brabandt <cb@256bit.org>
parents: 6009
diff changeset
46 let s:ext = ".bg"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 let s:ext = "." . strpart(s:lang, 0, 2)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
53 " Somehow ".ge" (Germany) is sometimes used for ".de" (Deutsch).
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
54 if s:ext =~? '\.ge'
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
55 let s:ext = ".de"
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
56 endif
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
57
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
58 if s:ext =~? '\.en'
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
59 let s:ext = ""
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
60 endif
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
61
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 " The japanese tutor is available in two encodings, guess which one to use
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 " The "sjis" one is actually "cp932", it doesn't matter for this text.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 if s:ext =~? '\.ja'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 if &enc =~ "euc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 let s:ext = ".ja.euc"
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
67 elseif &enc != "utf-8"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 let s:ext = ".ja.sjis"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 " The korean tutor is available in two encodings, guess which one to use
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 if s:ext =~? '\.ko'
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
74 if &enc != "utf-8"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 let s:ext = ".ko.euc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1698
diff changeset
79 " The Chinese tutor is available in three encodings, guess which one to use
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 " This segment is from the above lines and modified by
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 " Mendel L Chan <beos@turbolinux.com.cn> for Chinese vim tutorial
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1698
diff changeset
82 " When 'encoding' is utf-8, choose between China (simplified) and Taiwan
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1698
diff changeset
83 " (traditional) based on the language, suggested by Alick Zhao.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 if s:ext =~? '\.zh'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 if &enc =~ 'big5\|cp950'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 let s:ext = ".zh.big5"
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
87 elseif &enc != 'utf-8'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 let s:ext = ".zh.euc"
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1698
diff changeset
89 elseif s:ext =~? 'zh_tw' || (exists("s:lang") && s:lang =~? 'zh_tw')
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1698
diff changeset
90 let s:ext = ".zh_tw"
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1698
diff changeset
91 else
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1698
diff changeset
92 let s:ext = ".zh_cn"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 " The Polish tutor is available in two encodings, guess which one to use.
24
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
97 if s:ext =~? '\.pl'
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
98 if &enc =~ 1250
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
99 let s:ext = ".pl.cp1250"
8ff7fd162d3c updated for version 7.0016
vimboss
parents: 7
diff changeset
100 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
557
862863033fdd updated for version 7.0158
vimboss
parents: 205
diff changeset
103 " The Turkish tutor is available in two encodings, guess which one to use
862863033fdd updated for version 7.0158
vimboss
parents: 205
diff changeset
104 if s:ext =~? '\.tr'
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
105 if &enc == "iso-8859-9"
557
862863033fdd updated for version 7.0158
vimboss
parents: 205
diff changeset
106 let s:ext = ".tr.iso9"
862863033fdd updated for version 7.0158
vimboss
parents: 205
diff changeset
107 endif
862863033fdd updated for version 7.0158
vimboss
parents: 205
diff changeset
108 endif
862863033fdd updated for version 7.0158
vimboss
parents: 205
diff changeset
109
969
cf4d73a8924e updated for version 7.0-095
vimboss
parents: 953
diff changeset
110 " The Greek tutor is available in three encodings, guess what to use.
cf4d73a8924e updated for version 7.0-095
vimboss
parents: 953
diff changeset
111 " We used ".gr" (Greece) instead of ".el" (Greek); accept both.
cf4d73a8924e updated for version 7.0-095
vimboss
parents: 953
diff changeset
112 if s:ext =~? '\.gr\|\.el'
cf4d73a8924e updated for version 7.0-095
vimboss
parents: 953
diff changeset
113 if &enc == "iso-8859-7"
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
114 let s:ext = ".el"
969
cf4d73a8924e updated for version 7.0-095
vimboss
parents: 953
diff changeset
115 elseif &enc == "utf-8"
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
116 let s:ext = ".el.utf-8"
969
cf4d73a8924e updated for version 7.0-095
vimboss
parents: 953
diff changeset
117 elseif &enc =~ 737
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
118 let s:ext = ".el.cp737"
969
cf4d73a8924e updated for version 7.0-095
vimboss
parents: 953
diff changeset
119 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
1154
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
122 " The Slovak tutor is available in three encodings, guess which one to use
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
123 if s:ext =~? '\.sk'
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
124 if &enc =~ 1250
1154
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
125 let s:ext = ".sk.cp1250"
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
126 endif
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
127 endif
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
128
6009
7b83c190d370 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3830
diff changeset
129 " The Slovak tutor is available in two encodings, guess which one to use
7b83c190d370 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3830
diff changeset
130 " Note that the utf-8 version is the original, the cp1250 version is created
7b83c190d370 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3830
diff changeset
131 " from it.
7b83c190d370 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3830
diff changeset
132 if s:ext =~? '\.sr'
7b83c190d370 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3830
diff changeset
133 if &enc =~ 1250
7b83c190d370 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3830
diff changeset
134 let s:ext = ".sr.cp1250"
7b83c190d370 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3830
diff changeset
135 endif
7b83c190d370 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3830
diff changeset
136 endif
7b83c190d370 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3830
diff changeset
137
1154
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
138 " The Czech tutor is available in three encodings, guess which one to use
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
139 if s:ext =~? '\.cs'
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
140 if &enc =~ 1250
1154
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
141 let s:ext = ".cs.cp1250"
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
142 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144
953
2fb204616c9b updated for version 7.0-079
vimboss
parents: 782
diff changeset
145 " The Russian tutor is available in three encodings, guess which one to use.
2fb204616c9b updated for version 7.0-079
vimboss
parents: 782
diff changeset
146 if s:ext =~? '\.ru'
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
147 if &enc =~ '1251'
953
2fb204616c9b updated for version 7.0-079
vimboss
parents: 782
diff changeset
148 let s:ext = '.ru.cp1251'
2fb204616c9b updated for version 7.0-079
vimboss
parents: 782
diff changeset
149 elseif &enc =~ 'koi8'
2fb204616c9b updated for version 7.0-079
vimboss
parents: 782
diff changeset
150 let s:ext = '.ru'
2fb204616c9b updated for version 7.0-079
vimboss
parents: 782
diff changeset
151 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
154 " The Hungarian tutor is available in three encodings, guess which one to use.
1154
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
155 if s:ext =~? '\.hu'
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
156 if &enc =~ 1250
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
157 let s:ext = ".hu.cp1250"
1154
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
158 elseif &enc =~ 'iso-8859-2'
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
159 let s:ext = '.hu'
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
160 endif
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
161 endif
f23b876b21ff updated for version 7.1a
vimboss
parents: 969
diff changeset
162
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
163 " The Croatian tutor is available in three encodings, guess which one to use.
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
164 if s:ext =~? '\.hr'
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
165 if &enc =~ 1250
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
166 let s:ext = ".hr.cp1250"
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
167 elseif &enc =~ 'iso-8859-2'
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
168 let s:ext = '.hr'
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
169 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
172 " Esperanto is only available in utf-8
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
173 if s:ext =~? '\.eo'
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
174 let s:ext = ".eo.utf-8"
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
175 endif
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
176 " Vietnamese is only available in utf-8
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
177 if s:ext =~? '\.vi'
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
178 let s:ext = ".vi.utf-8"
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
179 endif
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
180
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
181 " If 'encoding' is utf-8 s:ext must end in utf-8.
82b5078be2dd updated for version 7.2a
vimboss
parents: 1154
diff changeset
182 if &enc == 'utf-8' && s:ext !~ '\.utf-8'
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1621
diff changeset
183 let s:ext .= '.utf-8'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 " 2. Build the name of the file:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 let s:tutorfile = "/tutor/tutor"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 let s:tutorxx = $VIMRUNTIME . s:tutorfile . s:ext
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 " 3. Finding the file:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 if filereadable(s:tutorxx)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 let $TUTOR = s:tutorxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 let $TUTOR = $VIMRUNTIME . s:tutorfile
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 echo "The file " . s:tutorxx . " does not exist.\n"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 echo "Copying English version: " . $TUTOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 4sleep
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 " 4. Making the copy and exiting Vim:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 e $TUTOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 wq! $TUTORCOPY