falcon.vim 1.5 KB

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