adding new stuff
This commit is contained in:
parent
f84d7183aa
commit
9ef8a96f9a
1580 changed files with 0 additions and 0 deletions
135
plugins/bundle/xptemplate/ftplugin/erlang/erlang.xpt.vim
Executable file
135
plugins/bundle/xptemplate/ftplugin/erlang/erlang.xpt.vim
Executable file
|
|
@ -0,0 +1,135 @@
|
|||
XPTemplate priority=lang
|
||||
|
||||
let s:f = g:XPTfuncs()
|
||||
|
||||
XPTvar $TRUE 1
|
||||
XPTvar $FALSE 0
|
||||
XPTvar $NULL NULL
|
||||
XPTvar $UNDEFINED NULL
|
||||
|
||||
XPTvar $VOID_LINE /* void */;
|
||||
XPTvar $CURSOR_PH cursor
|
||||
|
||||
XPTvar $BRif ' '
|
||||
XPTvar $BRel \n
|
||||
XPTvar $BRloop ' '
|
||||
XPTvar $BRstc ' '
|
||||
XPTvar $BRfun ' '
|
||||
|
||||
XPTinclude
|
||||
\ _common/common
|
||||
|
||||
|
||||
" ========================= Function and Variables =============================
|
||||
|
||||
" ================================= Snippets ===================================
|
||||
|
||||
|
||||
XPT inc " -include ..
|
||||
-include( "`cursor^.hrl").
|
||||
|
||||
|
||||
XPT def " -define ..
|
||||
-define( `what^, `def^ ).
|
||||
|
||||
|
||||
XPT ifdef " -ifdef ..\-endif..
|
||||
-ifdef( `what^ ).
|
||||
`thenmacro^
|
||||
``else...`
|
||||
{{^-else.
|
||||
`cursor^
|
||||
`}}^-endif().
|
||||
|
||||
|
||||
XPT ifndef " -ifndef ..\-endif
|
||||
-ifndef( `what^ ).
|
||||
`thenmacro^
|
||||
``else...`
|
||||
{{^-else.
|
||||
`cursor^
|
||||
`}}^-endif().
|
||||
|
||||
|
||||
XPT record " -record ..,{..}
|
||||
-record( `recordName^
|
||||
,{ `field1^`...^
|
||||
, `fieldn^`...^
|
||||
}).
|
||||
|
||||
|
||||
XPT if " if .. -> .. end
|
||||
if
|
||||
`cond^ ->
|
||||
`body^` `...^;
|
||||
`cond2^ ->
|
||||
`bodyn^` `...^
|
||||
end `cursor^
|
||||
|
||||
|
||||
XPT case " case .. of .. -> .. end
|
||||
case `matched^ of
|
||||
`pattern^ ->
|
||||
`body^`...^;
|
||||
`patternn^ ->
|
||||
`bodyn^`...^
|
||||
end `cursor^
|
||||
|
||||
|
||||
XPT receive " receive .. -> .. end
|
||||
receive
|
||||
`pattern^ ->
|
||||
`body^` `...^;
|
||||
`patternn^ ->
|
||||
`body^` `...^`
|
||||
`after...{{^
|
||||
after
|
||||
`afterBody^`}}^
|
||||
end
|
||||
|
||||
|
||||
|
||||
XPT fun " fun .. -> .. end
|
||||
fun (`params^) `_^ -> `body^`
|
||||
`more...{{^;
|
||||
(`params^) `_^ -> `body^`
|
||||
`...{{^;
|
||||
(`params^) `_^ -> `body^`
|
||||
`...^`}}^`}}^
|
||||
end `cursor^
|
||||
|
||||
|
||||
XPT try wrap=what " try .. catch .. end
|
||||
try `what^
|
||||
catch
|
||||
`except^ -> `toRet^`
|
||||
`...^;
|
||||
`except^ -> `toRet^`
|
||||
`...^`
|
||||
`after...{{^
|
||||
after
|
||||
`afterBody^`}}^
|
||||
end `cursor^
|
||||
|
||||
|
||||
XPT tryof " try .. of ..
|
||||
try `what^ of
|
||||
`pattern^ ->
|
||||
`body^` `more...^;
|
||||
`patternn^ ->
|
||||
`body^` `more...^
|
||||
catch
|
||||
`excep^ -> `toRet^` `...^;
|
||||
`except^ -> `toRet^` `...^`
|
||||
`after...{{^
|
||||
after
|
||||
`afterBody^`}}^
|
||||
end `cursor^
|
||||
|
||||
|
||||
XPT function " f \( .. \) -> ..
|
||||
`funName^ ( `args0^ ) `_^ ->
|
||||
`body0^ `...^;
|
||||
`name^R('funName')^ ( `argsn^ ) `_^ ->
|
||||
`bodyn^`...^
|
||||
.
|
||||
Loading…
Add table
Add a link
Reference in a new issue