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.
 
 

68 lines
2.3 KiB

  1. "=============================================================================
  2. " FILE: neosnippet.vim
  3. " AUTHOR: Shougo Matsushita <Shougo.Matsu at 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. " Plugin key-mappings.
  13. inoremap <silent><expr> <Plug>(neosnippet_expand_or_jump)
  14. \ neosnippet#mappings#expand_or_jump_impl()
  15. inoremap <silent><expr> <Plug>(neosnippet_jump_or_expand)
  16. \ neosnippet#mappings#jump_or_expand_impl()
  17. inoremap <silent><expr> <Plug>(neosnippet_expand)
  18. \ neosnippet#mappings#expand_impl()
  19. inoremap <silent><expr> <Plug>(neosnippet_jump)
  20. \ neosnippet#mappings#jump_impl()
  21. snoremap <silent><expr> <Plug>(neosnippet_expand_or_jump)
  22. \ neosnippet#mappings#expand_or_jump_impl()
  23. snoremap <silent><expr> <Plug>(neosnippet_jump_or_expand)
  24. \ neosnippet#mappings#jump_or_expand_impl()
  25. snoremap <silent><expr> <Plug>(neosnippet_expand)
  26. \ neosnippet#mappings#expand_impl()
  27. snoremap <silent><expr> <Plug>(neosnippet_jump)
  28. \ neosnippet#mappings#jump_impl()
  29. xnoremap <silent> <Plug>(neosnippet_get_selected_text)
  30. \ :call neosnippet#helpers#get_selected_text(visualmode(), 1)<CR>
  31. xnoremap <silent> <Plug>(neosnippet_expand_target)
  32. \ :<C-u>call neosnippet#mappings#_expand_target()<CR>
  33. xnoremap <silent> <Plug>(neosnippet_register_oneshot_snippet)
  34. \ :<C-u>call neosnippet#mappings#_register_oneshot_snippet()<CR>
  35. inoremap <expr><silent> <Plug>(neosnippet_start_unite_snippet)
  36. \ unite#sources#neosnippet#start_complete()
  37. augroup neosnippet
  38. autocmd InsertEnter * call neosnippet#init#_initialize()
  39. augroup END
  40. " Commands.
  41. command! -nargs=? -bar
  42. \ -complete=customlist,neosnippet#commands#_edit_complete
  43. \ NeoSnippetEdit
  44. \ call neosnippet#commands#_edit(<q-args>)
  45. command! -nargs=? -bar
  46. \ -complete=customlist,neosnippet#commands#_filetype_complete
  47. \ NeoSnippetMakeCache
  48. \ call neosnippet#commands#_make_cache(<q-args>)
  49. command! -nargs=1 -bar -complete=file
  50. \ NeoSnippetSource
  51. \ call neosnippet#commands#_source(<q-args>)
  52. command! -bar NeoSnippetClearMarkers
  53. \ call neosnippet#commands#_clear_markers()
  54. let g:loaded_neosnippet = 1