adding new stuff

This commit is contained in:
ViktorBarzin 2017-07-09 00:22:01 +03:00
parent f84d7183aa
commit 9ef8a96f9a
1580 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,73 @@
XPTemplate priority=like
XPTvar $TRUE 1
XPTvar $FALSE 0
XPTvar $NULL NULL
" if () ** {
XPTvar $BRif ' '
" } ** else {
XPTvar $BRel \n
" int fun( ** arg ** )
" if ( ** condition ** )
XPTvar $SParg ''
" if ** (
XPTvar $SPcmd ' '
" a = a ** + ** 1
XPTvar $SPop ' '
XPTvar $VOID_LINE /* void */;
XPTvar $CURSOR_PH /* cursor */
XPT _if hidden
if`$SPcmd^(`$SParg^`condition^`$SParg^)`$BRif^{
`cursor^
}
XPT if wrap " if ( .. ) { .. }
`Include:_if^
XPT elif wrap " else if ( .. ) { .. }
else `Include:_if^
XPT else wrap " else { ... }
else`$BRif^{
`cursor^
}
XPT ifn alias=if " if (.. == $NULL) {..} else...
XSET condition=Embed('`a^`$SPop^==`$SPop^`$NULL^')
XPT ifnn alias=if " if (.. != $NULL) {..} else...
XSET condition=Embed('`a^`$SPop^!=`$SPop^`$NULL^')
XPT if0 alias=if " if (.. == 0) {..} else...
XSET condition=Embed('`a^`$SPop^==`$SPop^0')
XPT ifn0 alias=if " if (.. != 0) {..} else...
XSET condition=Embed('`a^`$SPop^!=`$SPop^0')
XPT ifee " if (..) {..} else if...
`:_if:^` `else_if...{{^`$BRel^`Include:elif^` `else_if...^`}}^
XPT switch wrap " switch (..) {case..}
switch (`$SParg^`var^`$SParg^)`$BRif^{
`Include:case^
}
..XPT
XPT case wrap " case ..:
case `constant^:
`cursor^
break;
XPT default " default ..:
default:
`cursor^

View file

@ -0,0 +1,28 @@
XPTemplate priority=spec
let s:f = g:XPTfuncs()
XPTvar $TRUE true
XPTvar $FALSE false
XPTvar $NULL null
XPTvar $UNDEFINED undefined
XPTvar $VOID_LINE /* void */;
XPTvar $BRif \n
XPTinclude
\ _common/common
\ _condition/c.like
" ========================= Function and Variables =============================
" ================================= Snippets ===================================
XPT ifu alias=if " if ($UNDEFINED == ..) {..} else...
XSET condition=Embed('`$UNDEFINED^`$SPop^==`$SPop^`var^')
XPT ifnu alias=if " if ($UNDEFINED == ..) {..} else...
XSET condition=Embed('`$UNDEFINED^`$SPop^!=`$SPop^`var^')

View file

@ -0,0 +1,38 @@
XPTemplate priority=like
let s:f = g:XPTfuncs()
XPTvar $TRUE 1
XPTvar $FALSE 0
XPTvar $NULL NULL
XPTvar $UNDEFINED NULL
XPTvar $VOID_LINE /* void */;
XPTvar $BRif \n
XPTinclude
\ _common/common
" ========================= Function and Variables =============================
" ================================= Snippets ===================================
XPT if hint=(if\ (then)\ (else))
(if [`condition^]
(`then^)
`else...{{^(`cursor^)`}}^)
XPT when hint=(when\ cond\ ..)
(when (`cond^)
(`todo0^)` `...^
(`todon^)` `...^)
XPT unless hint=(unless\ cond\ ..)
(unless (`cond^)
(`todo0^)` `...^
(`todon^)` `...^)