home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / runtime / dos / ftplugin / falcon.vim < prev    next >
Encoding:
Text File  |  2012-05-31  |  1.5 KB  |  51 lines

  1. " Vim filetype plugin file
  2. " Language:     Falcon
  3. " Author:       Steven Oliver <oliver.steven@gmail.com>
  4. " Copyright:    Copyright (c) 2009, 2010, 2011, 2012 Steven Oliver
  5. " License:      You may redistribute this under the same terms as Vim itself
  6. " --------------------------------------------------------------------------
  7. " GetLatestVimScripts: 2762 1 :AutoInstall: falcon.vim
  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.  
  15. let s:cpo_save = &cpo
  16. set cpo&vim
  17.  
  18. setlocal tabstop=4 shiftwidth=4 expandtab fileencoding=utf-8
  19. setlocal suffixesadd=.fal,.ftd
  20.  
  21. " Matchit support
  22. if exists("loaded_matchit") && !exists("b:match_words")
  23.   let b:match_ignorecase = 0
  24.  
  25.   let b:match_words =
  26.     \ '\<\%(if\|case\|while\|until\|for\|do\|class\)\>=\@!' .
  27.     \ ':' .
  28.     \ '\<\%(else\|elsif\|when\)\>' .
  29.     \ ':' .
  30.     \ '\<end\>' .
  31.     \ ',{:},\[:\],(:)'
  32. endif
  33.  
  34. " Set comments to include dashed lines
  35. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
  36.  
  37. " Windows allows you to filter the open file dialog
  38. if has("gui_win32") && !exists("b:browsefilter")
  39.   let b:browsefilter = "Falcon Source Files (*.fal *.ftd)\t*.fal;*.ftd\n" .
  40.                      \ "All Files (*.*)\t*.*\n"
  41. endif
  42.  
  43. let b:undo_ftplugin = "setlocal tabstop< shiftwidth< expandtab< fileencoding<"
  44.     \ . " suffixesadd< comments<"
  45.     \ . "| unlet! b:browsefiler"
  46.  
  47. let &cpo = s:cpo_save
  48. unlet s:cpo_save
  49.  
  50. " vim: set sw=4 sts=4 et tw=80 :
  51.