erlang: remove spaces before parens in UltiSnips
This is almost never seen in common Erlang style, and was inconsistent with the Snipmate snippets for Erlang. Adds a list comprehension snippet, as a bonus.
This commit is contained in:
parent
147001fb01
commit
d9a5607c8f
@ -5,11 +5,11 @@
|
||||
priority -50
|
||||
|
||||
snippet pat "Case:Receive:Try Clause"
|
||||
${1:pattern}${2: when ${3:guard}} ->;
|
||||
${1:pattern}${2: when ${3:guard}} ->
|
||||
${4:body}
|
||||
endsnippet
|
||||
|
||||
snippet beh "Behaviour Directive"
|
||||
snippet beh "Behaviour Directive" b
|
||||
-behaviour(${1:behaviour}).
|
||||
endsnippet
|
||||
|
||||
@ -20,11 +20,11 @@ case ${1:expression} of
|
||||
end
|
||||
endsnippet
|
||||
|
||||
snippet def "Define Directive"
|
||||
snippet def "Define Directive" b
|
||||
-define(${1:macro}${2: (${3:param})}, ${4:body}).
|
||||
endsnippet
|
||||
|
||||
snippet exp "Export Directive"
|
||||
snippet exp "Export Directive" b
|
||||
-export([${1:function}/${2:arity}]).
|
||||
endsnippet
|
||||
|
||||
@ -47,23 +47,23 @@ if
|
||||
end
|
||||
endsnippet
|
||||
|
||||
snippet ifdef "Ifdef Directive"
|
||||
snippet ifdef "Ifdef Directive" b
|
||||
-ifdef(${1:macro}).
|
||||
endsnippet
|
||||
|
||||
snippet ifndef "Ifndef Directive"
|
||||
snippet ifndef "Ifndef Directive" b
|
||||
-ifndef(${1:macro}).
|
||||
endsnippet
|
||||
|
||||
snippet imp "Import Directive"
|
||||
snippet imp "Import Directive" b
|
||||
-import(${1:module}, [${2:function}/${3:arity}]).
|
||||
endsnippet
|
||||
|
||||
snippet inc "Include Directive"
|
||||
snippet inc "Include Directive" b
|
||||
-include("${1:file}").
|
||||
endsnippet
|
||||
|
||||
snippet mod "Module Directive"
|
||||
snippet mod "Module Directive" b
|
||||
-module(${1:`!p snip.rv = snip.basename or "module"`}).
|
||||
endsnippet
|
||||
|
||||
@ -77,7 +77,7 @@ ${6:after
|
||||
end
|
||||
endsnippet
|
||||
|
||||
snippet rec "Record Directive"
|
||||
snippet rec "Record Directive" b
|
||||
-record(${1:record}, {${2:field}${3: = ${4:value}}}).
|
||||
endsnippet
|
||||
|
||||
@ -93,8 +93,16 @@ ${13:after
|
||||
end
|
||||
endsnippet
|
||||
|
||||
snippet undef "Undef Directive"
|
||||
snippet undef "Undef Directive" b
|
||||
-undef(${1:macro}).
|
||||
endsnippet
|
||||
|
||||
snippet || "List Comprehension"
|
||||
[${1:X} || ${2:X} <- ${3:List}${4:, gen}]
|
||||
endsnippet
|
||||
|
||||
snippet gen "Generator Expression"
|
||||
${1:X} <- ${2:List}${3:, gen}
|
||||
endsnippet
|
||||
|
||||
# vim:ft=snippets:
|
||||
|
Loading…
Reference in New Issue
Block a user