Skip to content

Instantly share code, notes, and snippets.

@ntotani
Created March 2, 2012 12:31
Show Gist options
  • Save ntotani/1958119 to your computer and use it in GitHub Desktop.
Save ntotani/1958119 to your computer and use it in GitHub Desktop.
neocomplecache source for enchant.js
function! neocomplcache#sources#enchantjs_complete#define()
return s:source
endfunction
let s:source = {'name' : 'enchantjs_complete', 'kind' : 'plugin'}
function! s:source.initialize()
let s:keywords = []
for word in [
\'Event',
\'TOUCH_START',
\'TOUCH_MOVE',
\'TOUCH_END',
\'ENTER_FRAME',
\'localX',
\'localY',
\'addEventListener',
\'removeEventListener',
\'Game',
\'assets',
\'frame',
\'width',
\'height',
\'instance',
\'scale',
\'pushScene',
\'popScene',
\'replaceScene',
\'preload',
\'parentNode',
\'scene',
\'moveBy',
\'moveTo',
\'Group',
\'childNodes',
\'addChild',
\'removeChild',
\'backgroundColor',
\'opacity',
\'visible',
\'intersect',
\'within',
\'Label',
\'Sprite',
\'image',
\'Surface',
\'context',
\ ]
call add(s:keywords, {'word': word, 'menu': '[enchant.js]'})
endfor
endfunction
function! s:source.finalize()
endfunction
function! s:source.get_keyword_list(cur_keyword_str)
return neocomplcache#keyword_filter(copy(s:keywords), a:cur_keyword_str)
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment