VIM snipMate pascal 代码补全

 

源文件
 
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
#
snippet int
    integer
#
snippet lo
    longint
#
snippet var
    var ${1:i}:${2:integer}
#
snippet array
    var ${1:a}:array[1..${2:num}] of ${3:integer}
#comment
snippet comment
    //==================================================================
    //  ${1}
    //==================================================================
#
snippet comau
    //==================================================================
    //    author:Rainboy
    //        QQ:597872644
    //      date:`strftime("%Y-%m-%d")`
    //      `&enc[:2] == "utf" ? "?" : "(c)"` Copyright `strftime("%Y")` ${1:`g:snips_author`}. All Rights Reserved.${2}
    //==================================================================
# begin end
snippet be
    begin
        ${1}
    end;
snippet be.
    begin
        ${1}
    end.
# If Condition
snippet if
    if ${1:/* condition */} then ${2:/* code */}
##################
snippet ife
    if ${1:/* condition */}
    then ${2:/* code */}
        else ${3:/* code */}
#####################      
snippet elif    else if
    else if ${1:/* condition */} then
        ${2:/* code */}
snippet elb
    else
    begin
        ${1}
    end;
# writeln write
snippet wn
    writeln(${1:/* content */});
snippet w
    write(${1:/* content */});
# readln read
snippet rn
    readln(${1:/* content */});
snippet r
    read(${1:/* content */});
# Do While Loop
snippet do
    do begin
        ${2:/* code */}
    end while (${1:/* condition */});
# While Loop
snippet wh
    while ${1:/* condition */} do
    begin
        ${2:/* code */}
    end;
# For Loop
snippet for
    for ${2:i} := ${1:1} to ${3:10} do
        ${4:/* code */}
snippet forb
    for ${2:i} := ${1:1} to ${3:10} do
    begin
        ${4:/* code */}
    end;
# Custom For Loop
#
#sinppet 函数
snippet fun
function    ${1:fun_name}(${3}):${2:Integer}
  begin
  ${4:/* code */}

  

 

 

快捷键
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
comment
comau
be
be.
if
ife
elif
elb
wn
w
rn
r
wh
for
forb

  

 

 

 

 

 

posted @   rainboy  阅读(260)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示