aap.vim 979 B

123456789101112131415161718192021222324252627282930313233
  1. " Vim filetype plugin file
  2. " Language: Aap recipe
  3. " Maintainer: Bram Moolenaar <Bram@vim.org>
  4. " Last Change: 2021 Nov 14
  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. " Reset 'formatoptions', 'comments', 'commentstring' and 'expandtab' to undo
  12. " this plugin.
  13. let b:undo_ftplugin = "setl fo< com< cms< et<"
  14. " Set 'formatoptions' to break comment lines but not other lines,
  15. " and insert the comment leader when hitting <CR> or using "o".
  16. setlocal fo-=t fo+=croql
  17. " Set 'comments' to format dashed lists in comments.
  18. setlocal comments=s:#\ -,m:#\ \ ,e:#,n:#,fb:-
  19. setlocal commentstring=#\ %s
  20. " Expand tabs to spaces to avoid trouble.
  21. setlocal expandtab
  22. if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
  23. let b:browsefilter = "Aap Recipe Files (*.aap)\t*.aap\nAll Files (*.*)\t*.*\n"
  24. let b:undo_ftplugin ..= " | unlet! b:browsefilter"
  25. endif