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 / ftplugin / lua.vim < prev    next >
Encoding:
Text File  |  2012-05-31  |  973 b   |  43 lines

  1. " Vim filetype plugin file.
  2. " Language:    Lua 4.0+
  3. " Maintainer:    Max Ischenko <mfi@ukr.net>
  4. " Last Change:    2012 Mar 07
  5.  
  6. " Only do this when not done yet for this buffer
  7. if exists("b:did_ftplugin")
  8.   finish
  9. endif
  10.  
  11. " Don't load another plugin for this buffer
  12. let b:did_ftplugin = 1
  13.  
  14. let s:cpo_save = &cpo
  15. set cpo&vim
  16.  
  17. " Set 'formatoptions' to break comment lines but not other lines, and insert
  18. " the comment leader when hitting <CR> or using "o".
  19. setlocal fo-=t fo+=croql
  20.  
  21. setlocal com=:--
  22. setlocal cms=--%s
  23. setlocal suffixesadd=.lua
  24.  
  25.  
  26. " The following lines enable the macros/matchit.vim plugin for
  27. " extended matching with the % key.
  28. if exists("loaded_matchit")
  29.  
  30.   let b:match_ignorecase = 0
  31.   let b:match_words =
  32.     \ '\<\%(do\|function\|if\)\>:' .
  33.     \ '\<\%(return\|else\|elseif\)\>:' .
  34.     \ '\<end\>,' .
  35.     \ '\<repeat\>:\<until\>'
  36.  
  37. endif " exists("loaded_matchit")
  38.  
  39. let &cpo = s:cpo_save
  40. unlet s:cpo_save
  41.  
  42. let b:undo_ftplugin = "setlocal fo< com< cms< suffixesadd<"
  43.