scala.vim 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. " Vim filetype plugin file
  2. " Language: Scala
  3. " Maintainer: Derek Wyatt
  4. " URL: https://github.com/derekwyatt/vim-scala
  5. " License: Same as Vim
  6. " Last Change: 02 August 2016
  7. " ----------------------------------------------------------------------------
  8. if exists('b:did_ftplugin') || &cp
  9. finish
  10. endif
  11. let b:did_ftplugin = 1
  12. " j is fairly new in Vim, so don't complain if it's not there
  13. setlocal formatoptions-=t formatoptions+=croqnl
  14. silent! setlocal formatoptions+=j
  15. " Just like c.vim, but additionally doesn't wrap text onto /** line when
  16. " formatting. Doesn't bungle bulleted lists when formatting.
  17. if get(g:, 'scala_scaladoc_indent', 0)
  18. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s2:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,://
  19. else
  20. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,://
  21. endif
  22. setlocal commentstring=//\ %s
  23. setlocal shiftwidth=2 softtabstop=2 expandtab
  24. setlocal include='^\s*import'
  25. setlocal includeexpr='substitute(v:fname,"\\.","/","g")'
  26. setlocal path+=src/main/scala,src/test/scala
  27. setlocal suffixesadd=.scala
  28. " vim:set sw=2 sts=2 ts=8 et: