3
3
"prefix" : " program" ,
4
4
"body" : [
5
5
" program ${1:name}" ,
6
- " implicit none" ,
7
- " " ,
6
+ " \t implicit none" ,
7
+ " \t ${0} " ,
8
8
" end program ${1:name}"
9
9
],
10
10
"description" : " Program Skeleton"
13
13
"prefix" : " module" ,
14
14
"body" : [
15
15
" module ${1:name}" ,
16
- " implicit none" ,
17
- " ${2}" ,
16
+ " \t implicit none" ,
17
+ " \t ${2}" ,
18
18
" contains" ,
19
+ " \t ${0}" ,
19
20
" end module ${1:name}"
20
21
],
21
22
"description" : " Create a new module"
22
23
},
23
24
"Do Loop" : {
24
25
"prefix" : " do" ,
25
26
"body" : [
26
- " do ${1:index} = ${2:start},${3:end}" ,
27
- " !TODO_statement" ,
28
- " ${4}" ,
29
- " enddo"
27
+ " do ${1:index} = ${2:start}, ${3:end}" ,
28
+ " \t ${0}" ,
29
+ " end do"
30
30
],
31
31
"description" : " Create a do loop"
32
32
},
33
33
"Function" : {
34
34
"prefix" : " fun" ,
35
35
"body" : [
36
36
" function ${1:func}(${2:arg}) result(${3:retval})" ,
37
- " ${4:type} :: ${2:arg} " ,
38
- " ${4:type} :: ${3:retval }" ,
39
- " !TODO_add_body " ,
40
- " ${5 }" ,
37
+ " \t implicit none " ,
38
+ " \t ${4:type} :: ${2:arg }" ,
39
+ " \t ${4:type} :: ${3:retval} " ,
40
+ " \t ${0 }" ,
41
41
" end function ${1:func}"
42
42
],
43
43
"description" : " Create a function"
46
46
"prefix" : " sub" ,
47
47
"body" : [
48
48
" subroutine ${1:routine}(${2:arg1}, ${3: arg2})" ,
49
- " ${4:type1},intent(in) :: ${2:arg1}" ,
49
+ " implicit none" ,
50
+ " ${4:type1},intent(in) :: ${2:arg1}" ,
50
51
" ${5:type2},intent(out) :: ${3:arg2}" ,
51
- " !TODO_add_body" ,
52
- " ${6}" ,
52
+ " ${0}" ,
53
53
" end subroutine ${1:routine}"
54
54
],
55
- "description" : " Create a function"
55
+ "description" : " Create a subroutine"
56
+ },
57
+ "ifs" : {
58
+ "prefix" : " if" ,
59
+ "body" : [
60
+ " if ( ${1:condition} ) ${0}"
61
+ ],
62
+ "description" : " if (single line)"
63
+ },
64
+ "if" : {
65
+ "prefix" : " if" ,
66
+ "body" : [
67
+ " if ( ${1:condition} ) then" ,
68
+ " \t ${0}" ,
69
+ " end if"
70
+ ],
71
+ "description" : " if then"
72
+ },
73
+ "elif" : {
74
+ "prefix" : " el" ,
75
+ "body" : [
76
+ " else if ( ${1:condition} ) then" ,
77
+ " \t ${0}"
78
+ ],
79
+ "description" : " else if"
80
+ },
81
+ "imp" : {
82
+ "prefix" : " imp" ,
83
+ "body" : [
84
+ " implicit none" ,
85
+ " ${0}"
86
+ ],
87
+ "description" : " implicit none"
56
88
},
57
89
"Module documentation header" : {
58
- "prefix" : " modoc" ,
59
- "body" : [ " !------------------------------------------------------------------------------" ,
60
- " ! ${1:Institution}, ${2:Affiliation}" ,
61
- " !------------------------------------------------------------------------------" ,
62
- " !" ,
63
- " ! MODULE: ${3: Module name}" ,
64
- " !" ,
65
- " !> @author" ,
66
- " !> ${4:Author Name}}" ,
67
- " !" ,
68
- " ! DESCRIPTION: " ,
69
- " !> ${5: Short module description}" ,
70
- " !" ,
71
- " ! REVISION HISTORY:" ,
72
- " ! dd Mmm yyyy - Initial Version" ,
73
- " ! TODO_dd_mmm_yyyy - TODO_describe_appropriate_changes - TODO_name" ,
74
- " !------------------------------------------------------------------------------"
90
+ "prefix" : " modoc" ,
91
+ "body" : [
92
+ " !------------------------------------------------------------------------------" ,
93
+ " ! ${1:Institution}, ${2:Affiliation}" ,
94
+ " !------------------------------------------------------------------------------" ,
95
+ " !" ,
96
+ " ! MODULE: ${3: Module name}" ,
97
+ " !" ,
98
+ " !> @author" ,
99
+ " !> ${4:Author Name}}" ,
100
+ " !" ,
101
+ " ! DESCRIPTION: " ,
102
+ " !> ${5: Short module description}" ,
103
+ " !" ,
104
+ " ! REVISION HISTORY:" ,
105
+ " ! dd Mmm yyyy - Initial Version" ,
106
+ " ! TODO_dd_mmm_yyyy - TODO_describe_appropriate_changes - TODO_name" ,
107
+ " !------------------------------------------------------------------------------"
75
108
],
76
109
"description" : " Add module documentation header"
77
110
}
78
-
79
-
80
111
}
0 commit comments