2015-01-18 12:58:28 +00:00
|
|
|
snippet impl
|
|
|
|
implicit none
|
2019-11-30 12:06:56 +00:00
|
|
|
${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
snippet prog
|
|
|
|
program ${1:main}
|
2019-11-30 12:06:56 +00:00
|
|
|
${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
end program $1
|
|
|
|
snippet mod
|
|
|
|
module ${1:modulename}
|
2019-11-30 12:06:56 +00:00
|
|
|
${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
end module $1
|
|
|
|
snippet proc
|
|
|
|
procedure ${1:name}
|
|
|
|
${0}
|
|
|
|
end procedure $1
|
|
|
|
snippet iface
|
|
|
|
interface ${1:name}
|
|
|
|
${0}
|
|
|
|
end interface $1
|
|
|
|
snippet doc
|
|
|
|
! """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
! File: ${2:`vim_snippets#Filename('$1')`}
|
|
|
|
! Author: `g:snips_author`
|
|
|
|
! Email: `g:snips_email`
|
|
|
|
! Github: `g:snips_github`
|
|
|
|
! Description: $1
|
|
|
|
! """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
2019-11-30 12:06:56 +00:00
|
|
|
${0}
|
2016-12-27 14:46:49 +00:00
|
|
|
snippet dox
|
|
|
|
!> @brief ${1}
|
2017-03-07 17:04:28 +00:00
|
|
|
!!
|
2016-12-27 14:46:49 +00:00
|
|
|
!> ${2}
|
|
|
|
!> @author `g:snips_author`
|
|
|
|
${0}
|
2017-03-07 17:04:28 +00:00
|
|
|
snippet doxp
|
|
|
|
!> @param[${1}]${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
# Variables definitions
|
|
|
|
# Boolean
|
|
|
|
snippet bool
|
2019-11-30 12:06:56 +00:00
|
|
|
logical :: ${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
# Integer
|
|
|
|
snippet int
|
2019-11-30 12:06:56 +00:00
|
|
|
integer :: ${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
snippet real
|
2019-11-30 12:06:56 +00:00
|
|
|
real :: ${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
# Double Precision
|
|
|
|
snippet double
|
2019-11-30 12:06:56 +00:00
|
|
|
double precision :: ${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
# Char
|
|
|
|
snippet str
|
|
|
|
character(len=${1:*}) :: ${0:}
|
|
|
|
# Types
|
|
|
|
snippet type
|
|
|
|
type(${1:name})
|
2019-11-30 12:06:56 +00:00
|
|
|
${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
end type
|
|
|
|
snippet const
|
2019-11-30 12:06:56 +00:00
|
|
|
${1:type}, parameter :: $2 = ${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
snippet arr
|
2019-11-30 12:06:56 +00:00
|
|
|
${1:type}, ${2:allocatable, }dimension(${3::}) :: ${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
snippet intent
|
2019-11-30 12:06:56 +00:00
|
|
|
${1:type}, intent(inout) :: ${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
# Array
|
|
|
|
snippet /
|
2019-11-30 12:06:56 +00:00
|
|
|
(/ $1 /) ${2:,&} ${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
snippet if
|
2022-09-20 08:08:31 +00:00
|
|
|
if ($1) then
|
2019-11-30 12:06:56 +00:00
|
|
|
${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
end if
|
|
|
|
snippet case
|
|
|
|
select case (${1:expr})
|
|
|
|
case ($2)
|
|
|
|
case default
|
|
|
|
$3
|
2019-11-30 12:06:56 +00:00
|
|
|
end select ${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
snippet do
|
2016-12-27 14:46:49 +00:00
|
|
|
do ${1:i} = ${2:start}, ${3:end}, ${4:incr}
|
2019-11-30 12:06:56 +00:00
|
|
|
${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
end do
|
|
|
|
snippet dow
|
2022-09-20 08:08:31 +00:00
|
|
|
do while ($1)
|
2015-01-18 12:58:28 +00:00
|
|
|
$2
|
|
|
|
end do
|
|
|
|
snippet sub
|
|
|
|
subroutine ${1:name}($2)
|
2019-11-30 12:06:56 +00:00
|
|
|
${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
end subroutine $1
|
|
|
|
snippet func
|
|
|
|
function ${1:name}($2) result($3)
|
2019-11-30 12:06:56 +00:00
|
|
|
${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
end function $1
|
|
|
|
snippet pr
|
2019-11-30 12:06:56 +00:00
|
|
|
write(*,*) ${0}
|
2017-05-02 12:42:08 +00:00
|
|
|
snippet dpr
|
|
|
|
write(*,*) '$1 = ', $1
|
2015-01-18 12:58:28 +00:00
|
|
|
snippet read
|
2019-11-30 12:06:56 +00:00
|
|
|
read(unit = ${1:fp}, file = ${2:filename}, iostat = ${3:ierr}) ${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
snippet write
|
2019-11-30 12:06:56 +00:00
|
|
|
write(unit = ${1:fp}, file = ${2:filename}, iostat = ${3:ierr}) ${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
snippet open
|
2019-11-30 12:06:56 +00:00
|
|
|
open(unit = ${1:fp}, file = ${2:filename}, status = ${3:unknown}, iostat = ${4:ierr}) ${0}
|
2015-01-18 12:58:28 +00:00
|
|
|
snippet close
|
2019-11-30 12:06:56 +00:00
|
|
|
close(unit = ${1:fp}) ${0}
|