forked from lymslive/vimllearn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
movezola.sh
executable file
·560 lines (493 loc) · 10.7 KB
/
movezola.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
#!/bin/bash
# 重构目录结构,以适应 zola book 要求
mkdir content
cd content
##################################################
chapter=ch00-prefcace
mkdir ${chapter}
cat << EOF > ${chapter}/_index.md
+++
title = "前言"
weight = 0
sort_by = "weight"
+++
EOF
cat ../z/20170816_1.md >> ${chapter}/_index.md
##################################################
chapter=ch01-viml-feature
mkdir ${chapter}
cat << EOF > ${chapter}/_index.md
+++
title = "第一章 VimL 语言主要特点"
weight = 1
sort_by = "weight"
+++
EOF
cat << EOF >> ${chapter}/_index.md
# 第一章 VimL 语言主要特点
基础篇包括第一章至第三章。
EOF
section=sn1-hello-world
cat << EOF > ${chapter}/${section}.md
+++
title = "1.1 Hello World 的四种写法"
weight = 1
+++
EOF
cat ../z/20170816_2.md >> ${chapter}/${section}.md
section=sn2-from-ex-command
cat << EOF > ${chapter}/${section}.md
+++
title = "1.2 同源 ex 命令行"
weight = 2
+++
EOF
cat ../z/20170816_3.md >> ${chapter}/${section}.md
section=sn3-week-type-strong-scope
cat << EOF > ${chapter}/${section}.md
+++
title = "1.3 弱类型强作用域"
weight = 3
+++
EOF
cat ../z/20170816_4.md >> ${chapter}/${section}.md
section=sn4-autoload-schema
cat << EOF > ${chapter}/${section}.md
+++
title = "1.4 自动加载脚本机制"
weight = 4
+++
EOF
cat ../z/20170816_5.md >> ${chapter}/${section}.md
##################################################
chapter=ch02-viml-grammar
mkdir ${chapter}
cat << EOF > ${chapter}/_index.md
+++
title = "第二章 VimL 语言基本语法"
weight = 2
sort_by = "weight"
+++
EOF
cat << EOF >> ${chapter}/_index.md
# 第二章 VimL 语言基本语法
EOF
section=sn1-variable-type
cat << EOF > ${chapter}/${section}.md
+++
title = "2.1 变量与类型"
weight = 1
+++
EOF
cat ../z/20170817_1.md >> ${chapter}/${section}.md
section=sn2-comapare-condition
cat << EOF > ${chapter}/${section}.md
+++
title = "2.2 选择与比较"
weight = 2
+++
EOF
cat ../z/20170817_2.md >> ${chapter}/${section}.md
section=sn3-loop-iterate
cat << EOF > ${chapter}/${section}.md
+++
title = "2.3 循环与迭代"
weight = 3
+++
EOF
cat ../z/20170817_3.md >> ${chapter}/${section}.md
section=sn4-function-call
cat << EOF > ${chapter}/${section}.md
+++
title = "2.4 函数定义与使用"
weight = 4
+++
EOF
cat ../z/20170817_4.md >> ${chapter}/${section}.md
section=sn5-exception-error
cat << EOF > ${chapter}/${section}.md
+++
title = "2.5 异常处理"
weight = 5
+++
EOF
cat ../z/20170817_5.md >> ${chapter}/${section}.md
##################################################
chapter=ch03-viml-command
mkdir ${chapter}
cat << EOF > ${chapter}/_index.md
+++
title = "第三章 Vim 常用命令"
weight = 3
sort_by = "weight"
+++
EOF
cat << EOF >> ${chapter}/_index.md
# 第三章 Vim 常用命令
EOF
section=sn1-option-set
cat << EOF > ${chapter}/${section}.md
+++
title = "3.1 选项设置"
weight = 1
+++
EOF
cat ../z/20170818_1.md >> ${chapter}/${section}.md
section=sn2-key-remap
cat << EOF > ${chapter}/${section}.md
+++
title = "3.2 快捷键重映射"
weight = 2
+++
EOF
cat ../z/20170818_2.md >> ${chapter}/${section}.md
section=sn3-custom-command
cat << EOF > ${chapter}/${section}.md
+++
title = "3.3 自定义命令"
weight = 3
+++
EOF
cat ../z/20170818_3.md >> ${chapter}/${section}.md
section=sn4-execute-normal
cat << EOF > ${chapter}/${section}.md
+++
title = "3.4 execute 与 normal"
weight = 4
+++
EOF
cat ../z/20170818_4.md >> ${chapter}/${section}.md
section=sn5-autocmd-event
cat << EOF > ${chapter}/${section}.md
+++
title = "3.5 自动命令与事件"
weight = 5
+++
EOF
cat ../z/20170818_5.md >> ${chapter}/${section}.md
section=sn6-debug-command
cat << EOF > ${chapter}/${section}.md
+++
title = "3.6 调试命令"
weight = 6
+++
EOF
cat ../z/20170818_6.md >> ${chapter}/${section}.md
##################################################
chapter=ch04-viml-datastruct
mkdir ${chapter}
cat << EOF > ${chapter}/_index.md
+++
title = "第四章 VimL 数据结构进阶"
weight = 4
sort_by = "weight"
+++
EOF
cat << EOF >> ${chapter}/_index.md
# 第四章 VimL 数据结构进阶
中级篇包括第四章至第七章。
EOF
section=sn1-list-string
cat << EOF > ${chapter}/${section}.md
+++
title = "4.1 再谈列表与字符串"
weight = 1
+++
EOF
cat ../z/20170819_1.md >> ${chapter}/${section}.md
section=sn2-dictionary
cat << EOF > ${chapter}/${section}.md
+++
title = "4.2 通用的字典结构"
weight = 2
+++
EOF
cat ../z/20170819_2.md >> ${chapter}/${section}.md
section=sn3-nest-compose
cat << EOF > ${chapter}/${section}.md
+++
title = "4.3 嵌套组合与扩展"
weight = 3
+++
EOF
cat ../z/20170819_3.md >> ${chapter}/${section}.md
section=sn4-regex-apply
cat << EOF > ${chapter}/${section}.md
+++
title = "4.4 正则表达式"
weight = 4
+++
EOF
cat ../z/20170922_1.md >> ${chapter}/${section}.md
##################################################
chapter=ch05-viml-function
mkdir ${chapter}
cat << EOF > ${chapter}/_index.md
+++
title = "第五章 VimL 函数进阶"
weight = 5
sort_by = "weight"
+++
EOF
cat << EOF >> ${chapter}/_index.md
# 第五章 VimL 函数进阶
EOF
section=sn1-variable-argument
cat << EOF > ${chapter}/${section}.md
+++
title = "5.1 可变参数"
weight = 1
+++
EOF
cat ../z/20170819_4.md >> ${chapter}/${section}.md
section=sn2-function-refer
cat << EOF > ${chapter}/${section}.md
+++
title = "5.2 函数引用"
weight = 2
+++
EOF
cat ../z/20170819_5.md >> ${chapter}/${section}.md
section=sn3-dict-function
cat << EOF > ${chapter}/${section}.md
+++
title = "5.3 字典函数"
weight = 3
+++
EOF
cat ../z/20170819_6.md >> ${chapter}/${section}.md
section=sn4-closure-lambda
cat << EOF > ${chapter}/${section}.md
+++
title = "5.4 闭包函数"
weight = 4
+++
EOF
cat ../z/20171023_1.md >> ${chapter}/${section}.md
section=sn5-autoload-function
cat << EOF > ${chapter}/${section}.md
+++
title = "5.5 自动函数"
weight = 5
+++
EOF
cat ../z/20171028_1.md >> ${chapter}/${section}.md
##################################################
chapter=ch06-builtin-function
mkdir ${chapter}
cat << EOF > ${chapter}/_index.md
+++
title = "第六章 VimL 内建函数使用"
weight = 6
sort_by = "weight"
+++
EOF
cat << EOF >> ${chapter}/_index.md
# 第六章 VimL 内建函数使用
EOF
section=sn1-operate-datatype
cat << EOF > ${chapter}/${section}.md
+++
title = "6.1 操作数据类型"
weight = 1
+++
EOF
cat ../z/20170821_1.md >> ${chapter}/${section}.md
section=sn2-operate-edit-object
cat << EOF > ${chapter}/${section}.md
+++
title = "6.2 操作编辑对象"
weight = 2
+++
EOF
cat ../z/20170821_2.md >> ${chapter}/${section}.md
section=sn3-operate-filesystem
cat << EOF > ${chapter}/${section}.md
+++
title = "6.3 操作系统文件"
weight = 3
+++
EOF
cat ../z/20170821_3.md >> ${chapter}/${section}.md
section=sn4-other-utility
cat << EOF > ${chapter}/${section}.md
+++
title = "6.4 其他实用函数"
weight = 4
+++
EOF
cat ../z/20170821_4.md >> ${chapter}/${section}.md
##################################################
chapter=ch07-object-program
mkdir ${chapter}
cat << EOF > ${chapter}/_index.md
+++
title = "第七章 VimL 面向对象编程"
weight = 7
sort_by = "weight"
+++
EOF
cat << EOF >> ${chapter}/_index.md
# 第七章 VimL 面向对象编程
EOF
section=sn1-object-intro
cat << EOF > ${chapter}/${section}.md
+++
title = "7.1 面向对象的简介"
weight = 1
+++
EOF
cat ../z/20170821_5.md >> ${chapter}/${section}.md
section=sn2-dict-object
cat << EOF > ${chapter}/${section}.md
+++
title = "7.2 字典即对象 "
weight = 2
+++
EOF
cat ../z/20170821_6.md >> ${chapter}/${section}.md
section=sn3-object-organize
cat << EOF > ${chapter}/${section}.md
+++
title = "7.3 自定义类的组织管理"
weight = 3
+++
EOF
cat ../z/20170821_7.md >> ${chapter}/${section}.md
##################################################
chapter=ch08-viml-asynchronous
mkdir ${chapter}
cat << EOF > ${chapter}/_index.md
+++
title = "第八章 VimL 异步编程特性"
weight = 8
sort_by = "weight"
+++
EOF
cat << EOF >> ${chapter}/_index.md
# 第八章 VimL 异步编程特性
高级篇包括第八章至第十章
EOF
section=sn1-asynchronous-intro
cat << EOF > ${chapter}/${section}.md
+++
title = "8.1 异步工作简介"
weight = 1
+++
EOF
cat ../z/20181121_1.md >> ${chapter}/${section}.md
section=sn2-asynchronous-job
cat << EOF > ${chapter}/${section}.md
+++
title = "8.2 使用异步任务"
weight = 2
+++
EOF
cat ../z/20181205_1.md >> ${chapter}/${section}.md
section=sn3-channle-job
cat << EOF > ${chapter}/${section}.md
+++
title = "8.3 使用通道控制任务"
weight = 3
+++
EOF
cat ../z/20181210_1.md >> ${chapter}/${section}.md
section=sn4-internal-terminal
cat << EOF > ${chapter}/${section}.md
+++
title = "8.4 使用配置内置终端"
weight = 4
+++
EOF
cat ../z/20181212_1.md >> ${chapter}/${section}.md
##################################################
chapter=ch09-viml-mix-program
mkdir ${chapter}
cat << EOF > ${chapter}/_index.md
+++
title = "第九章 VimL 混合编程"
weight = 9
sort_by = "weight"
+++
EOF
cat << EOF >> ${chapter}/_index.md
# 第九章 VimL 混合编程
EOF
section=sn1-extern-filter
cat << EOF > ${chapter}/${section}.md
+++
title = "9.1 用外部语言写过滤器"
weight = 1
+++
EOF
cat ../z/20181215_1.md >> ${chapter}/${section}.md
section=sn2-extern-interface
cat << EOF > ${chapter}/${section}.md
+++
title = "9.2 外部语言接口编程"
weight = 2
+++
EOF
cat ../z/20181215_2.md >> ${chapter}/${section}.md
section=sn3-perl-interface
cat << EOF > ${chapter}/${section}.md
+++
title = "9.3 Perl 语言接口开发"
weight = 3
+++
EOF
cat ../z/20181217_2.md >> ${chapter}/${section}.md
##################################################
chapter=ch10-viml-plugin-develop
mkdir ${chapter}
cat << EOF > ${chapter}/_index.md
+++
title = "第十章 Vim 插件管理与开发"
weight = 10
sort_by = "weight"
+++
EOF
cat << EOF >> ${chapter}/_index.md
# 第十章 Vim 插件管理与开发
EOF
section=sn1-plugin-directory
cat << EOF > ${chapter}/${section}.md
+++
title = "10.1 典型插件的目录规范"
weight = 1
+++
EOF
cat ../z/20181219_1.md >> ${chapter}/${section}.md
section=sn2-plugin-manager
cat << EOF > ${chapter}/${section}.md
+++
title = "10.2 插件管理器插件介绍"
weight = 2
+++
EOF
cat ../z/20181219_2.md >> ${chapter}/${section}.md
section=sn3-plugin-devflow
cat << EOF > ${chapter}/${section}.md
+++
title = "10.3 插件开发流程指引"
weight = 3
+++
EOF
cat ../z/20181219_3.md >> ${chapter}/${section}.md
##################################################
chapter=chA1-postfcace
mkdir ${chapter}
cat << EOF > ${chapter}/_index.md
+++
title = "结语"
weight = 90
sort_by = "weight"
+++
EOF
cat << EOF >> ${chapter}/_index.md
# 结语
诚然,VimL 是个众语言,中文的教程书籍资料更是稀缺,故笔者不惮用爱发电,
将个人在钻研使用 VimL 开发插件过程的实践经验,整理成章。冀望对后来同好者
有所启迪与助益。
EOF
##################################################