falcon.vim 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. " Vim filetype plugin file
  2. " Language: Falcon
  3. " Author: Steven Oliver <oliver.steven@gmail.com>
  4. " Copyright: Copyright (c) 2009-2013 Steven Oliver
  5. " License: You may redistribute this under the same terms as Vim itself
  6. " --------------------------------------------------------------------------
  7. " Only do this when not done yet for this buffer
  8. if (exists("b:did_ftplugin"))
  9. finish
  10. endif
  11. let b:did_ftplugin = 1
  12. let s:cpo_save = &cpo
  13. set cpo&vim
  14. setlocal softtabstop=4 shiftwidth=4 fileencoding=utf-8
  15. setlocal suffixesadd=.fal,.ftd
  16. " Matchit support
  17. if exists("loaded_matchit") && !exists("b:match_words")
  18. let b:match_ignorecase = 0
  19. let b:match_words =
  20. \ '\<\%(if\|case\|while\|until\|for\|do\|class\)\>=\@!' .
  21. \ ':' .
  22. \ '\<\%(else\|elsif\|when\)\>' .
  23. \ ':' .
  24. \ '\<end\>' .
  25. \ ',{:},\[:\],(:)'
  26. endif
  27. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
  28. " Windows allows you to filter the open file dialog
  29. if has("gui_win32") && !exists("b:browsefilter")
  30. let b:browsefilter = "Falcon Source Files (*.fal *.ftd)\t*.fal;*.ftd\n" .
  31. \ "All Files (*.*)\t*.*\n"
  32. endif
  33. let b:undo_ftplugin = "setlocal tabstop< shiftwidth< expandtab< fileencoding<"
  34. \ . " suffixesadd< comments<"
  35. \ . "| unlet! b:browsefiler"
  36. let &cpo = s:cpo_save
  37. unlet s:cpo_save
  38. " vim: set sw=4 sts=4 et tw=80 :