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.
 
 

93 lines
3.6 KiB

  1. "=============================================================================
  2. " FILE: neosnippet.vim
  3. " AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com>
  4. " License: MIT license
  5. "=============================================================================
  6. " Global options definition. "{{{
  7. call neosnippet#util#set_default(
  8. \ 'g:neosnippet#disable_runtime_snippets', {})
  9. call neosnippet#util#set_default(
  10. \ 'g:neosnippet#scope_aliases', {})
  11. call neosnippet#util#set_default(
  12. \ 'g:neosnippet#snippets_directory', '')
  13. call neosnippet#util#set_default(
  14. \ 'g:neosnippet#disable_select_mode_mappings', 1)
  15. call neosnippet#util#set_default(
  16. \ 'g:neosnippet#enable_snipmate_compatibility', 0)
  17. call neosnippet#util#set_default(
  18. \ 'g:neosnippet#expand_word_boundary', 0)
  19. call neosnippet#util#set_default(
  20. \ 'g:neosnippet#enable_conceal_markers', 1)
  21. call neosnippet#util#set_default(
  22. \ 'g:neosnippet#enable_completed_snippet', 0,
  23. \ 'g:neosnippet#enable_complete_done')
  24. call neosnippet#util#set_default(
  25. \ 'g:neosnippet#enable_auto_clear_markers', 1)
  26. call neosnippet#util#set_default(
  27. \ 'g:neosnippet#completed_pairs', {})
  28. call neosnippet#util#set_default(
  29. \ 'g:neosnippet#_completed_pairs',
  30. \ {'_':{ '(' : ')', '{' : '}', '"' : '"', '[' : ']' }})
  31. "}}}
  32. function! neosnippet#expandable_or_jumpable() abort "{{{
  33. return neosnippet#mappings#expandable_or_jumpable()
  34. endfunction"}}}
  35. function! neosnippet#expandable() abort "{{{
  36. return neosnippet#mappings#expandable()
  37. endfunction"}}}
  38. function! neosnippet#jumpable() abort "{{{
  39. return neosnippet#mappings#jumpable()
  40. endfunction"}}}
  41. function! neosnippet#anonymous(snippet) abort "{{{
  42. return neosnippet#mappings#_anonymous(a:snippet)
  43. endfunction"}}}
  44. function! neosnippet#expand(trigger) abort "{{{
  45. return neosnippet#mappings#_expand(a:trigger)
  46. endfunction"}}}
  47. function! neosnippet#get_snippets_directory() abort "{{{
  48. return neosnippet#helpers#get_snippets_directory()
  49. endfunction"}}}
  50. function! neosnippet#get_user_snippets_directory() abort "{{{
  51. return copy(neosnippet#variables#snippets_dir())
  52. endfunction"}}}
  53. function! neosnippet#get_runtime_snippets_directory() abort "{{{
  54. return copy(neosnippet#variables#runtime_dir())
  55. endfunction"}}}
  56. " Get marker patterns.
  57. function! neosnippet#get_placeholder_target_marker_pattern() abort "{{{
  58. return '\%(\\\@<!\|\\\\\zs\)\${\d\+:\(#:\)\?TARGET\%(:.\{-}\)\?\\\@<!}'
  59. endfunction"}}}
  60. function! neosnippet#get_placeholder_marker_pattern() abort "{{{
  61. return '<`\d\+\%(:.\{-}\)\?\\\@<!`>'
  62. endfunction"}}}
  63. function! neosnippet#get_placeholder_marker_substitute_pattern() abort "{{{
  64. return '\%(\\\@<!\|\\\\\zs\)\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}'
  65. endfunction"}}}
  66. function! neosnippet#get_placeholder_marker_substitute_nonzero_pattern() abort "{{{
  67. return '\%(\\\@<!\|\\\\\zs\)\${\([1-9]\d*\%(:.\{-}\)\?\\\@<!\)}'
  68. endfunction"}}}
  69. function! neosnippet#get_placeholder_marker_substitute_zero_pattern() abort "{{{
  70. return '\%(\\\@<!\|\\\\\zs\)\${\(0\%(:.\{-}\)\?\\\@<!\)}'
  71. endfunction"}}}
  72. function! neosnippet#get_placeholder_marker_default_pattern() abort "{{{
  73. return '<`\d\+:\zs.\{-}\ze\\\@<!`>'
  74. endfunction"}}}
  75. function! neosnippet#get_sync_placeholder_marker_pattern() abort "{{{
  76. return '<{\d\+\%(:.\{-}\)\?\\\@<!}>'
  77. endfunction"}}}
  78. function! neosnippet#get_sync_placeholder_marker_default_pattern() abort "{{{
  79. return '<{\d\+:\zs.\{-}\ze\\\@<!}>'
  80. endfunction"}}}
  81. function! neosnippet#get_mirror_placeholder_marker_pattern() abort "{{{
  82. return '<|\d\+|>'
  83. endfunction"}}}
  84. function! neosnippet#get_mirror_placeholder_marker_substitute_pattern() abort "{{{
  85. return '\\\@<!\$\(\d\+\)'
  86. endfunction"}}}
  87. " vim: foldmethod=marker