neocomplete.vim 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. "=============================================================================
  2. " FILE: neocomplete.vim
  3. " AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
  4. " License: MIT license {{{
  5. " Permission is hereby granted, free of charge, to any person obtaining
  6. " a copy of this software and associated documentation files (the
  7. " "Software"), to deal in the Software without restriction, including
  8. " without limitation the rights to use, copy, modify, merge, publish,
  9. " distribute, sublicense, and/or sell copies of the Software, and to
  10. " permit persons to whom the Software is furnished to do so, subject to
  11. " the following conditions:
  12. "
  13. " The above copyright notice and this permission notice shall be included
  14. " in all copies or substantial portions of the Software.
  15. "
  16. " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  17. " OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  18. " MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  19. " IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  20. " CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  21. " TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  22. " SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  23. " }}}
  24. "=============================================================================
  25. if exists('g:loaded_neocomplete')
  26. finish
  27. endif
  28. let g:loaded_neocomplete = 1
  29. let s:save_cpo = &cpo
  30. set cpo&vim
  31. command! -nargs=0 -bar NeoCompleteEnable
  32. \ call neocomplete#init#enable()
  33. command! -nargs=0 -bar NeoCompleteDisable
  34. \ call neocomplete#init#disable()
  35. command! -nargs=0 -bar NeoCompleteLock
  36. \ call neocomplete#commands#_lock()
  37. command! -nargs=0 -bar NeoCompleteUnlock
  38. \ call neocomplete#commands#_unlock()
  39. command! -nargs=0 -bar NeoCompleteToggle
  40. \ call neocomplete#commands#_toggle_lock()
  41. command! -nargs=1 -bar -complete=filetype NeoCompleteSetFileType
  42. \ call neocomplete#commands#_set_file_type(<q-args>)
  43. command! -nargs=0 -bar NeoCompleteClean
  44. \ call neocomplete#commands#_clean()
  45. " Global options definition. "{{{
  46. let g:neocomplete#enable_debug =
  47. \ get(g:, 'neocomplete#enable_debug', 0)
  48. if get(g:, 'neocomplete#enable_at_startup', 0)
  49. augroup neocomplete
  50. " Enable startup.
  51. autocmd CursorHold,InsertEnter
  52. \ * call neocomplete#init#enable()
  53. augroup END
  54. endif"}}}
  55. let &cpo = s:save_cpo
  56. unlet s:save_cpo
  57. " vim: foldmethod=marker