|
1 | 1 | snippet impl
|
2 |
| - IMPLICIT NONE |
3 |
| - ${0} |
4 |
| - |
| 2 | + implicit none |
| 3 | + $0 |
5 | 4 | snippet prog
|
6 |
| - PROGRAM ${1:main} |
7 |
| - ${0} |
8 |
| - END PROGRAM $1 |
9 |
| - |
| 5 | + program ${1:main} |
| 6 | + $0 |
| 7 | + end program $1 |
10 | 8 | snippet mod
|
11 |
| - MODULE ${1:modulename} |
| 9 | + module ${1:modulename} |
| 10 | + $0 |
| 11 | + end module $1 |
| 12 | +snippet proc |
| 13 | + procedure ${1:name} |
| 14 | + ${0} |
| 15 | + end procedure $1 |
| 16 | +snippet iface |
| 17 | + interface ${1:name} |
12 | 18 | ${0}
|
13 |
| - END MODULE $1 |
14 |
| - |
| 19 | + end interface $1 |
15 | 20 | snippet doc
|
16 | 21 | ! """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
17 | 22 | ! File: ${2:`vim_snippets#Filename('$1')`}
|
18 | 23 | ! Author: `g:snips_author`
|
19 | 24 | ! Email: `g:snips_email`
|
20 | 25 | ! Github: `g:snips_github`
|
21 |
| - ! Description: ${1} |
| 26 | + ! Description: $1 |
22 | 27 | ! """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
23 |
| - ${0} |
24 |
| - |
25 |
| -# Variables defs |
| 28 | + $0 |
| 29 | +# Variables definitions |
26 | 30 | # Boolean
|
27 |
| -snippet logic |
28 |
| - logical :: ${0:names} |
29 |
| - |
| 31 | +snippet bool |
| 32 | + logical :: $0 |
30 | 33 | # Integer
|
31 | 34 | snippet int
|
32 |
| - integer :: ${0:names} |
33 |
| -snippet intp |
34 |
| - integer, parameter :: ${0:names} |
35 |
| -snippet inta |
36 |
| - integer, allocatable, dimension(${1::}) :: ${0:names} |
37 |
| - |
38 |
| -# Real |
| 35 | + integer :: $0 |
39 | 36 | snippet real
|
40 |
| - real :: ${0:names} |
41 |
| -snippet realp |
42 |
| - real,parameter :: ${0:names} |
43 |
| -snippet reala |
44 |
| - real, allocatable, dimension(${1::}) :: ${0:names} |
45 |
| - |
| 37 | + real :: $0 |
46 | 38 | # Double Precision
|
47 | 39 | snippet double
|
48 |
| - double precision :: ${0:names} |
49 |
| -snippet doublep |
50 |
| - double precision, parameter :: ${0:names} |
51 |
| -snippet doublea |
52 |
| - double precision, allocatable, dimension(${1::}) :: ${0:names} |
53 |
| - |
| 40 | + double precision :: $0 |
54 | 41 | # Char
|
55 |
| -snippet char |
56 |
| - character(len=${1:*}) :: ${0:names} |
57 |
| - |
| 42 | +snippet str |
| 43 | + character(len=${1:*}) :: ${0:} |
58 | 44 | # Types
|
59 | 45 | snippet type
|
60 |
| - type(${1:name}) :: ${0:names} |
61 |
| - |
62 |
| -# Array |
| 46 | + type(${1:name}) |
| 47 | + $0 |
| 48 | + end type |
| 49 | +snippet const |
| 50 | + ${1:type}, parameter :: $2 = $0 |
63 | 51 | snippet arr
|
64 |
| - (/ (${0:}) /) |
| 52 | + ${1:type}, allocatable, dimension(${2::}) :: $0 |
| 53 | +snippet intent |
| 54 | + ${1:type}, intent(inout) :: $0 |
| 55 | +# Array |
| 56 | +snippet / |
| 57 | + (/ $1 /) ${2:,&} $0 |
| 58 | +snippet if |
| 59 | + if (${1:condition}) then |
| 60 | + $2 |
| 61 | + end if |
| 62 | +snippet case |
| 63 | + select case (${1:expr}) |
| 64 | + case ($2) |
| 65 | + case default |
| 66 | + $3 |
| 67 | + end select $0 |
| 68 | +snippet do |
| 69 | + do ${1:i} = ${2:start},${3:end}, ${4:incr} |
| 70 | + $4 |
| 71 | + end do |
| 72 | +snippet dow |
| 73 | + do while (${1:condition}) |
| 74 | + $2 |
| 75 | + end do |
| 76 | +snippet sub |
| 77 | + subroutine ${1:name}($2) |
| 78 | + $0 |
| 79 | + end subroutine $1 |
| 80 | +snippet func |
| 81 | + function ${1:name}($2) result($3) |
| 82 | + $0 |
| 83 | + end function $1 |
| 84 | +snippet pr |
| 85 | + write(*,*) $0 |
| 86 | +snippet read |
| 87 | + read( unit = ${1:fp}, file = ${2:filename}${3:, iostat = IERR }) $0 |
| 88 | +snippet write |
| 89 | + write( unit = ${1:fp}, file = ${2:filename}${3:, iostat = IERR }) $0 |
| 90 | +snippet open |
| 91 | + open (unit = ${1:fp}, file = ${2:filename}, status = unknown${3:, iostat = IERR }) $0 |
| 92 | +snippet close |
| 93 | + close ( unit = ${1:fp} ) $0 |
0 commit comments