falcon.vim 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. " Last Update: 2020 Oct 10
  7. " --------------------------------------------------------------------------
  8. " Only do this when not done yet for this buffer
  9. if (exists("b:did_ftplugin"))
  10. finish
  11. endif
  12. let b:did_ftplugin = 1
  13. let s:cpo_save = &cpo
  14. set cpo&vim
  15. setlocal softtabstop=4 shiftwidth=4
  16. setlocal suffixesadd=.fal,.ftd
  17. " Matchit support
  18. if exists("loaded_matchit") && !exists("b:match_words")
  19. let b:match_ignorecase = 0
  20. let b:match_words =
  21. \ '\<\%(if\|case\|while\|until\|for\|do\|class\)\>=\@!' .
  22. \ ':' .
  23. \ '\<\%(else\|elsif\|when\)\>' .
  24. \ ':' .
  25. \ '\<end\>' .
  26. \ ',{:},\[:\],(:)'
  27. endif
  28. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
  29. " Windows allows you to filter the open file dialog
  30. if has("gui_win32") && !exists("b:browsefilter")
  31. let b:browsefilter = "Falcon Source Files (*.fal *.ftd)\t*.fal;*.ftd\n" .
  32. \ "All Files (*.*)\t*.*\n"
  33. endif
  34. let b:undo_ftplugin = "setlocal tabstop< shiftwidth< expandtab< fileencoding<"
  35. \ . " suffixesadd< comments<"
  36. \ . "| unlet! b:browsefiler"
  37. let &cpo = s:cpo_save
  38. unlet s:cpo_save
  39. " vim: set sw=4 sts=4 et tw=80 :