blob: 168bc38eb36fff5926de0d7b3a71bd312e89e0a5 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim filetype plugin file
2" Language: Make
3" Maintainer: Bram Moolenaar <Bram@vim.org>
Bram Moolenaarcb80aa22020-10-26 21:12:46 +01004" Last Change: 2020 Oct 16
Bram Moolenaar071d4272004-06-13 20:20:40 +00005
6" Only do this when not done yet for this buffer
7if exists("b:did_ftplugin")
8 finish
9endif
10let b:did_ftplugin = 1
11
Bram Moolenaarcb80aa22020-10-26 21:12:46 +010012let b:undo_ftplugin = "setl et< sts< sw< fo< com< cms< inc<"
Bram Moolenaar071d4272004-06-13 20:20:40 +000013
14" Make sure a hard tab is used, required for most make programs
Bram Moolenaarcb80aa22020-10-26 21:12:46 +010015setlocal noexpandtab softtabstop=0 shiftwidth=0
Bram Moolenaar071d4272004-06-13 20:20:40 +000016
17" Set 'formatoptions' to break comment lines but not other lines,
18" and insert the comment leader when hitting <CR> or using "o".
19setlocal fo-=t fo+=croql
20
21" Set 'comments' to format dashed lists in comments
22setlocal com=sO:#\ -,mO:#\ \ ,b:#
23
24" Set 'commentstring' to put the marker after a #.
25setlocal commentstring=#\ %s
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000026
27" Including files.
28let &l:include = '^\s*include'
Bram Moolenaarff034192013-04-24 18:51:19 +020029
Bram Moolenaar723dd942019-04-04 13:11:03 +020030" For matchit.vim, suggested by Albert Netymk and Ken Takata.
Bram Moolenaarff034192013-04-24 18:51:19 +020031if exists("loaded_matchit")
Bram Moolenaar723dd942019-04-04 13:11:03 +020032 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 +020033endif