adding new stuff
This commit is contained in:
parent
f84d7183aa
commit
9ef8a96f9a
1580 changed files with 0 additions and 0 deletions
93
plugins/bundle/xptemplate/ftplugin/factor/factor.xpt.vim
Normal file
93
plugins/bundle/xptemplate/ftplugin/factor/factor.xpt.vim
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
XPTemplate priority=lang
|
||||
|
||||
let s:f = g:XPTfuncs()
|
||||
|
||||
XPTvar $TRUE 1
|
||||
XPTvar $FALSE 0
|
||||
XPTvar $NULL NULL
|
||||
XPTvar $UNDEFINED NULL
|
||||
|
||||
XPTinclude
|
||||
\ _common/common
|
||||
|
||||
|
||||
" ========================= Function and Variables =============================
|
||||
fun! s:f.ModuleName()
|
||||
let rootfolder = substitute(getcwd(), '^.*[\\/]\([^\\/]\+\)$', '\1', '')
|
||||
let filename = rootfolder . '/' . expand('%:h:h') . '/' . expand('%:t:r')
|
||||
let stripped = substitute( filename, '[\\/]', '.', 'g' )
|
||||
|
||||
return substitute( stripped, "-tests$", ".tests", '' )
|
||||
endfunction
|
||||
" ================================= Snippets ===================================
|
||||
|
||||
XPT alias "ALIAS: ... ...
|
||||
ALIAS: `newword^ `oldword^
|
||||
|
||||
XPT const "CONSTANT: ... ...
|
||||
CONSTANT: `word^ `constantValue^
|
||||
|
||||
XPT if "... [ ... ] [ ... ] if
|
||||
`cond^ [ `then^ ] [ `else^ ] if
|
||||
|
||||
XPT times "... [ ... ] times
|
||||
`count^ [ `what^ ] times
|
||||
|
||||
XPT mod " USING: ... IN: ...
|
||||
XSET moduleName=ModuleName()
|
||||
USING: kernel sequences accessors ;
|
||||
IN: `moduleName^
|
||||
|
||||
XPT quote " [ ... ]
|
||||
[ `cursor^ ]
|
||||
|
||||
XPT arr " { ... }
|
||||
{ `cursor^ }
|
||||
|
||||
XPT vec " V{ ... }
|
||||
V{ `cursor^ }
|
||||
|
||||
XPT bi " [ ... ] [ ... ] bi
|
||||
[ `first^ ] [ `cursor^ ] bi
|
||||
|
||||
XPT tri " [ ... ] [ ... ] [ ... ] tri
|
||||
[ `first^ ] [ `second^ ] [ `cursor^ ] tri
|
||||
|
||||
XPT map " [ ... ] map
|
||||
[ `cursor^ ] map
|
||||
|
||||
XPT filter " [ ... ] filter
|
||||
[ `cursor^ ] filter
|
||||
|
||||
XPT dip " [ ... ] dip
|
||||
[ `cursor^ ] dip
|
||||
|
||||
XPT cleave " { [ ... ] ... } cleave
|
||||
{ [ `code^ ]`...^
|
||||
[ `code^ ]`...^
|
||||
} cleave
|
||||
|
||||
XPT when " [ ... ] when
|
||||
[ `cursor^ ] when
|
||||
|
||||
XPT unless " [ ... ] unless
|
||||
[ `cursor^ ] unless
|
||||
|
||||
XPT keep " [ ... ] keep
|
||||
[ `cursor^ ] keep
|
||||
|
||||
XPT cond " { { [ ... ] [ ... ] } } cond
|
||||
{ { [ `cond^ ] [ `code^ ] }`...^
|
||||
{ [ `cond^ ] [ `code^ ] }`...^`default...{{^
|
||||
[ `cursor^ ]`}}^
|
||||
} cond
|
||||
|
||||
XPT case " { { ... [ ... ] } } case
|
||||
{ { `case^ [ `code^ ] }`...^
|
||||
{ `case^ [ `code^ ] }`...^`default...{{^
|
||||
[ `cursor^ ]`}}^
|
||||
} case
|
||||
|
||||
XPT test "[ ... ] [ ... ] unit-test
|
||||
{ `ret^ } [ `test^ ] unit-test
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue