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
|
priority -50
|
||||||
|
|
||||||
snippet pat "Case:Receive:Try Clause"
|
snippet pat "Case:Receive:Try Clause"
|
||||||
${1:pattern}${2: when ${3:guard}} ->;
|
${1:pattern}${2: when ${3:guard}} ->
|
||||||
${4:body}
|
${4:body}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet beh "Behaviour Directive"
|
snippet beh "Behaviour Directive" b
|
||||||
-behaviour(${1:behaviour}).
|
-behaviour(${1:behaviour}).
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
@ -20,11 +20,11 @@ case ${1:expression} of
|
|||||||
end
|
end
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet def "Define Directive"
|
snippet def "Define Directive" b
|
||||||
-define(${1:macro}${2: (${3:param})}, ${4:body}).
|
-define(${1:macro}${2: (${3:param})}, ${4:body}).
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet exp "Export Directive"
|
snippet exp "Export Directive" b
|
||||||
-export([${1:function}/${2:arity}]).
|
-export([${1:function}/${2:arity}]).
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
@ -47,23 +47,23 @@ if
|
|||||||
end
|
end
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet ifdef "Ifdef Directive"
|
snippet ifdef "Ifdef Directive" b
|
||||||
-ifdef(${1:macro}).
|
-ifdef(${1:macro}).
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet ifndef "Ifndef Directive"
|
snippet ifndef "Ifndef Directive" b
|
||||||
-ifndef(${1:macro}).
|
-ifndef(${1:macro}).
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet imp "Import Directive"
|
snippet imp "Import Directive" b
|
||||||
-import(${1:module}, [${2:function}/${3:arity}]).
|
-import(${1:module}, [${2:function}/${3:arity}]).
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet inc "Include Directive"
|
snippet inc "Include Directive" b
|
||||||
-include("${1:file}").
|
-include("${1:file}").
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet mod "Module Directive"
|
snippet mod "Module Directive" b
|
||||||
-module(${1:`!p snip.rv = snip.basename or "module"`}).
|
-module(${1:`!p snip.rv = snip.basename or "module"`}).
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ ${6:after
|
|||||||
end
|
end
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet rec "Record Directive"
|
snippet rec "Record Directive" b
|
||||||
-record(${1:record}, {${2:field}${3: = ${4:value}}}).
|
-record(${1:record}, {${2:field}${3: = ${4:value}}}).
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
@ -93,8 +93,16 @@ ${13:after
|
|||||||
end
|
end
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet undef "Undef Directive"
|
snippet undef "Undef Directive" b
|
||||||
-undef(${1:macro}).
|
-undef(${1:macro}).
|
||||||
endsnippet
|
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:
|
# vim:ft=snippets:
|
||||||
|
Loading…
Reference in New Issue
Block a user