make.vim 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. " Vim filetype plugin file
  2. " Language: Make
  3. " Maintainer: The Vim Project <https://github.com/vim/vim>
  4. " Last Change: 2023 Aug 10
  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. let b:did_ftplugin = 1
  11. let b:undo_ftplugin = "setl et< sts< sw< fo< com< cms< inc<"
  12. " Make sure a hard tab is used, required for most make programs
  13. setlocal noexpandtab softtabstop=0 shiftwidth=0
  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 com=sO:#\ -,mO:#\ \ ,b:#
  19. " Set 'commentstring' to put the marker after a #.
  20. setlocal commentstring=#\ %s
  21. " Including files.
  22. let &l:include = '^\s*include'
  23. " For matchit.vim, suggested by Albert Netymk and Ken Takata.
  24. if exists("loaded_matchit")
  25. let b:match_words = '^ *ifn\=\(eq\|def\)\>:^ *else\(\s\+ifn\=\(eq\|def\)\)\=\>:^ *endif\>,\<define\>:\<endef\>,^!\s*if\(n\=def\)\=\>:^!\s*else\(if\(n\=def\)\=\)\=\>:^!\s*endif\>'
  26. endif