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 / dosbatch.vim < prev    next >
Encoding:
Text File  |  2012-05-31  |  777 b   |  31 lines

  1. " Vim filetype plugin file
  2. " Language:    MS-DOS .bat files
  3. " Maintainer:  Mike Williams <mrw@eandem.co.uk>
  4. " Last Change: 8th May 2012
  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. " BAT comment formatting
  18. setlocal comments=b:rem,b:@rem,b:REM,b:@REM,:::
  19. setlocal formatoptions-=t formatoptions+=rol
  20.  
  21. " Define patterns for the browse file filter
  22. if has("gui_win32") && !exists("b:browsefilter")
  23.   let b:browsefilter = "DOS Batch Files (*.bat, *.cmd)\t*.bat;*.cmd\nAll Files (*.*)\t*.*\n"
  24. endif
  25.  
  26. let b:undo_ftplugin = "setlocal comments< formatoptions<"
  27.     \ . "| unlet! b:browsefiler"
  28.  
  29. let &cpo = s:cpo_save
  30. unlet s:cpo_save
  31.