routeros.vim 820 B

1234567891011121314151617181920212223242526272829303132333435
  1. " Vim filetype plugin file
  2. " Language: MikroTik RouterOS Script
  3. " Maintainer: zainin <z@wintr.dev>
  4. " Last Change: 2021 Nov 14
  5. " 2024 Jan 14 by Vim Project (browsefilter)
  6. if exists("b:did_ftplugin")
  7. finish
  8. endif
  9. let b:did_ftplugin = 1
  10. let s:save_cpo = &cpo
  11. set cpo-=C
  12. setlocal comments=:#
  13. setlocal commentstring=#\ %s
  14. setlocal formatoptions-=t formatoptions+=croql
  15. let b:undo_ftplugin = "setlocal com< cms< fo<"
  16. if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
  17. let b:browsefilter = "RouterOS Script Files (*.rsc)\t*.rsc\n"
  18. if has("win32")
  19. let b:browsefilter ..= "All Files (*.*)\t*\n"
  20. else
  21. let b:browsefilter ..= "All Files (*)\t*\n"
  22. endif
  23. let b:undo_ftplugin ..= " | unlet! b:browsefilter"
  24. endif
  25. let &cpo = s:save_cpo
  26. unlet! s:save_cpo
  27. " vim: nowrap sw=2 sts=2 ts=8 noet: