You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

77 lines
2.5 KiB

  1. "=============================================================================
  2. " FILE: neosnippet.vim
  3. " AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
  4. " License: MIT license
  5. "=============================================================================
  6. if exists('g:loaded_neosnippet')
  7. finish
  8. elseif v:version < 704
  9. echoerr 'neosnippet does not work this version of Vim "' . v:version . '".'
  10. finish
  11. endif
  12. let s:save_cpo = &cpo
  13. set cpo&vim
  14. " Plugin key-mappings. "{{{
  15. inoremap <silent><expr> <Plug>(neosnippet_expand_or_jump)
  16. \ neosnippet#mappings#expand_or_jump_impl()
  17. inoremap <silent><expr> <Plug>(neosnippet_jump_or_expand)
  18. \ neosnippet#mappings#jump_or_expand_impl()
  19. inoremap <silent><expr> <Plug>(neosnippet_expand)
  20. \ neosnippet#mappings#expand_impl()
  21. inoremap <silent><expr> <Plug>(neosnippet_jump)
  22. \ neosnippet#mappings#jump_impl()
  23. snoremap <silent><expr> <Plug>(neosnippet_expand_or_jump)
  24. \ neosnippet#mappings#expand_or_jump_impl()
  25. snoremap <silent><expr> <Plug>(neosnippet_jump_or_expand)
  26. \ neosnippet#mappings#jump_or_expand_impl()
  27. snoremap <silent><expr> <Plug>(neosnippet_expand)
  28. \ neosnippet#mappings#expand_impl()
  29. snoremap <silent><expr> <Plug>(neosnippet_jump)
  30. \ neosnippet#mappings#jump_impl()
  31. xnoremap <silent> <Plug>(neosnippet_get_selected_text)
  32. \ :call neosnippet#helpers#get_selected_text(visualmode(), 1)<CR>
  33. xnoremap <silent> <Plug>(neosnippet_expand_target)
  34. \ :<C-u>call neosnippet#mappings#_expand_target()<CR>
  35. xnoremap <silent> <Plug>(neosnippet_register_oneshot_snippet)
  36. \ :<C-u>call neosnippet#mappings#_register_oneshot_snippet()<CR>
  37. inoremap <expr><silent> <Plug>(neosnippet_start_unite_snippet)
  38. \ unite#sources#neosnippet#start_complete()
  39. "}}}
  40. augroup neosnippet "{{{
  41. autocmd InsertEnter * call neosnippet#init#_initialize()
  42. augroup END"}}}
  43. " Commands. "{{{
  44. command! -nargs=? -bar
  45. \ -complete=customlist,neosnippet#commands#_edit_complete
  46. \ NeoSnippetEdit
  47. \ call neosnippet#commands#_edit(<q-args>)
  48. command! -nargs=? -bar
  49. \ -complete=customlist,neosnippet#commands#_filetype_complete
  50. \ NeoSnippetMakeCache
  51. \ call neosnippet#commands#_make_cache(<q-args>)
  52. command! -nargs=1 -bar -complete=file
  53. \ NeoSnippetSource
  54. \ call neosnippet#commands#_source(<q-args>)
  55. command! -bar NeoSnippetClearMarkers
  56. \ call neosnippet#commands#_clear_markers()
  57. "}}}
  58. let g:loaded_neosnippet = 1
  59. let &cpo = s:save_cpo
  60. unlet s:save_cpo
  61. " __END__
  62. " vim: foldmethod=marker