PageRenderTime 121ms CodeModel.GetById 15ms RepoModel.GetById 24ms app.codeStats 0ms

/vim/ftplugin/latex-suite/packages/babel

https://bitbucket.org/vertespain/config
#! | 98 lines | 90 code | 8 blank | 0 comment | 0 complexity | 22dd628ff35fea3a201805099c8295ad MD5 | raw file
  1. if exists("babel_package_file")
  2. finish
  3. endif
  4. let babel_package_file = 1
  5. " This package sets some language specific options.
  6. " Since it needs to find out which options the user used with the babel
  7. " package, it needs to wait till latex-suite is done scanning packages. It
  8. " then catches the LatexSuiteScannedPackages event which
  9. " Tex_pack_updateall() throws at which time g:Tex_pack_detected and
  10. " g:Tex_babel_options contain the necessary information.
  11. let g:TeX_package_option_babel =
  12. \ 'afrikaans,'
  13. \.'bahasa,'
  14. \.'basque,'
  15. \.'breton,'
  16. \.'bulgarian,'
  17. \.'catalan,'
  18. \.'croatian,'
  19. \.'chech,'
  20. \.'danish,'
  21. \.'dutch,'
  22. \.'english,USenglish,american,UKenglish,british,canadian,'
  23. \.'esperanto,'
  24. \.'estonian,'
  25. \.'finnish,'
  26. \.'french,francais,canadien,acadian,'
  27. \.'galician,'
  28. \.'austrian,german,germanb,ngerman,naustrian,'
  29. \.'greek,polutonikogreek,'
  30. \.'hebrew,'
  31. \.'magyar,hungarian,'
  32. \.'icelandic,'
  33. \.'irish,'
  34. \.'italian,'
  35. \.'latin,'
  36. \.'lowersorbian,'
  37. \.'samin,'
  38. \.'norsk,nynorsk,'
  39. \.'polish,'
  40. \.'portuges,portuguese,brazilian,brazil,'
  41. \.'romanian,'
  42. \.'russian,'
  43. \.'scottish,'
  44. \.'spanish,'
  45. \.'slovak,'
  46. \.'slovene,'
  47. \.'swedish,'
  48. \.'serbian,'
  49. \.'turkish,'
  50. \.'ukrainian,'
  51. \.'uppersorbian,'
  52. \.'welsh'
  53. let g:TeX_package_babel =
  54. \ 'bra:selectlanguage,'
  55. \.'env:otherlanguage,'
  56. \.'env:otherlanguage*,'
  57. \.'env:hyphenrules,'
  58. \.'brd:foreignlanguage,'
  59. \.'spe:iflanguage{<+name+>}{<+true+>}{<+false+>},'
  60. \.'languagename,'
  61. \.'bra:useshorthands,'
  62. \.'brd:defineshorthand,'
  63. \.'brd:aliasshorthand,'
  64. \.'bra:languageshorthans,'
  65. \.'bra:shorthandon,'
  66. \.'bra:shorthandoff,'
  67. \.'brd:languageattribute'
  68. " vim:ft=vim:ff=unix:
  69. if exists('s:doneOnce')
  70. finish
  71. endif
  72. let s:doneOnce = 1
  73. augroup LatexSuite
  74. au LatexSuite User LatexSuiteScannedPackages
  75. \ call Tex_Debug('babel: catching LatexSuiteScannedPackages event') |
  76. \ call s:SetQuotes()
  77. augroup END
  78. let s:path = expand('<sfile>:p:h')
  79. " SetQuotes: sets quotes for various languages {{{
  80. " Description:
  81. function! <SID>SetQuotes()
  82. if g:Tex_package_detected =~ '\<babel\>'
  83. if g:Tex_babel_options =~ '\<german\>'
  84. exec 'so '.s:path.'/german'
  85. elseif g:Tex_babel_options =~ '\<ngerman\>'
  86. exec 'so '.s:path.'/ngerman'
  87. endif
  88. endif
  89. endfunction " }}}
  90. " vim:ft=vim:ff=unix: