blob: 7227bb3739a859ed9a2c3b4ecc9b12f226ebabaa [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim filetype plugin file
2" Language: Make
Christian Brabandte978b452023-08-13 10:33:05 +02003" Maintainer: The Vim Project <https://github.com/vim/vim>
4" Last Change: 2023 Aug 10
5" Former Maintainer: Bram Moolenaar <Bram@vim.org>
Bram Moolenaar071d4272004-06-13 20:20:40 +00006
7" Only do this when not done yet for this buffer
8if exists("b:did_ftplugin")
9 finish
10endif
11let b:did_ftplugin = 1
12
Bram Moolenaarcb80aa22020-10-26 21:12:46 +010013let b:undo_ftplugin = "setl et< sts< sw< fo< com< cms< inc<"
Bram Moolenaar071d4272004-06-13 20:20:40 +000014
15" Make sure a hard tab is used, required for most make programs
Bram Moolenaarcb80aa22020-10-26 21:12:46 +010016setlocal noexpandtab softtabstop=0 shiftwidth=0
Bram Moolenaar071d4272004-06-13 20:20:40 +000017
18" Set 'formatoptions' to break comment lines but not other lines,
19" and insert the comment leader when hitting <CR> or using "o".
20setlocal fo-=t fo+=croql
21
22" Set 'comments' to format dashed lists in comments
23setlocal com=sO:#\ -,mO:#\ \ ,b:#
24
25" Set 'commentstring' to put the marker after a #.
26setlocal commentstring=#\ %s
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000027
28" Including files.
29let &l:include = '^\s*include'
Bram Moolenaarff034192013-04-24 18:51:19 +020030
Bram Moolenaar723dd942019-04-04 13:11:03 +020031" For matchit.vim, suggested by Albert Netymk and Ken Takata.
Bram Moolenaarff034192013-04-24 18:51:19 +020032if exists("loaded_matchit")
Bram Moolenaar723dd942019-04-04 13:11:03 +020033 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\>'
Bram Moolenaarff034192013-04-24 18:51:19 +020034endif