aap.vim 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. " Vim filetype plugin file
  2. " Language: Aap recipe
  3. " Maintainer: The Vim Project <https://github.com/vim/vim>
  4. " Last Change: 2024 Jan 14
  5. " Former Maintainer: Bram Moolenaar <Bram@vim.org>
  6. " Only do this when not done yet for this buffer
  7. if exists("b:did_ftplugin")
  8. finish
  9. endif
  10. " Don't load another plugin for this buffer
  11. let b:did_ftplugin = 1
  12. " Reset 'formatoptions', 'comments', 'commentstring' and 'expandtab' to undo
  13. " this plugin.
  14. let b:undo_ftplugin = "setl fo< com< cms< et<"
  15. " Set 'formatoptions' to break comment lines but not other lines,
  16. " and insert the comment leader when hitting <CR> or using "o".
  17. setlocal fo-=t fo+=croql
  18. " Set 'comments' to format dashed lists in comments.
  19. setlocal comments=s:#\ -,m:#\ \ ,e:#,n:#,fb:-
  20. setlocal commentstring=#\ %s
  21. " Expand tabs to spaces to avoid trouble.
  22. setlocal expandtab
  23. if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
  24. let b:browsefilter = "Aap Recipe Files (*.aap)\t*.aap\n"
  25. if has("win32")
  26. let b:browsefilter ..= "All Files (*.*)\t*\n"
  27. else
  28. let b:browsefilter ..= "All Files (*)\t*\n"
  29. endif
  30. let b:undo_ftplugin ..= " | unlet! b:browsefilter"
  31. endif