dosbatch.vim 777 B

12345678910111213141516171819202122232425262728293031
  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. " Only do this when not done yet for this buffer
  6. if exists("b:did_ftplugin")
  7. finish
  8. endif
  9. " Don't load another plugin for this buffer
  10. let b:did_ftplugin = 1
  11. let s:cpo_save = &cpo
  12. set cpo&vim
  13. " BAT comment formatting
  14. setlocal comments=b:rem,b:@rem,b:REM,b:@REM,:::
  15. setlocal formatoptions-=t formatoptions+=rol
  16. " Define patterns for the browse file filter
  17. if has("gui_win32") && !exists("b:browsefilter")
  18. let b:browsefilter = "DOS Batch Files (*.bat, *.cmd)\t*.bat;*.cmd\nAll Files (*.*)\t*.*\n"
  19. endif
  20. let b:undo_ftplugin = "setlocal comments< formatoptions<"
  21. \ . "| unlet! b:browsefiler"
  22. let &cpo = s:cpo_save
  23. unlet s:cpo_save