1
0
Fork 0
mirror of synced 2024-11-27 03:05:36 -05:00
ultimate-vim/sources_non_forked/vim-snippets/snippets/racket.snippets
2020-05-10 10:24:38 -04:00

131 lines
1.8 KiB
Text

# Languages
snippet #r
#lang racket
snippet #tr
#lang typed/racket
snippet #rg
#lang racket/gui
snippet #sb
#lang scribble/base
snippet #d
#lang datalog
snippet #wi
#lang web-server/insta
# Defines
snippet def
(define ${1} ${0})
snippet defun
(define (${1})
${0})
snippet defv "define-values"
(define-values (${1}) (${0}))
snippet defm "define/match"
(define/match (${1})
[(${2}) ${3}]
${0})
snippet defs "define-syntax"
(define-syntax (${1})
${0})
# Conditionals
snippet if
(if ${1} ${2} ${0})
snippet ifn
(if (not ${1}) ${2} ${0})
snippet ifl
(if ${1}
(let (${2})
${3})
${0})
snippet ifnl
(if (not ${1})
(let (${2})
${3})
${0})
snippet ifb
(if ${1}
(begin
${2})
${0})
snippet ifnb
(if (not ${1})
(begin
${2})
${0})
snippet when
(when ${1}
${0})
snippet unless
(unless ${1} ${2} ${0})
snippet cond
(cond
[(${1}) ${0}])
snippet conde
(cond
[(${1}) ${2}]
[else ${0}])
snippet case
(case ${1}
[(${2}) ${0}])
snippet match
(match ${1}
[(${2}) ${0}])
# For iterations
snippet for
(for ([${1}])
${0})
snippet forl "for/list"
(for/list ([${1}])
${0})
snippet forf "for/fold"
(for/fold
([${1}])
([${2}])
${0})
snippet forfr "for/foldr"
(for/foldr
([${1}])
([${2}])
${0})
snippet fora "for/and"
(for/and ([${1}])
${0})
snippet foro "for/or"
(for/or ([${1}])
${0})
snippet fors "for/sum"
(for/sum ([${1}])
${0})
snippet forp "for/product"
(for/product ([${1}])
${0})
snippet forfi "for/first"
(for/first ([${1}])
${0})
snippet forla "for/last"
(for/last ([${1}])
${0})
snippet lambda
(lambda (${1}) ${0})
snippet apply
(apply ${1} ${0})
snippet map
(map ${1} ${0})
snippet filter
(filter ${1} ${0})
snippet req
(require ${0})
snippet prov
(provide ${0})
snippet let
(let ([${1}]) ${0})
snippet letcc
(let/cc here (set! ${1} here) ${0})
snippet begin
(begin
${0})