blob: cd7e2a425e24ff56b4d935d2fc782e981aa0f7c1 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim filetype plugin file
2" Language: Aap recipe
Christian Brabandte978b452023-08-13 10:33:05 +02003" Maintainer: The Vim Project <https://github.com/vim/vim>
Doug Kearns93197fd2024-01-14 20:59:02 +01004" Last Change: 2024 Jan 14
Christian Brabandte978b452023-08-13 10:33:05 +02005" 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
11
12" Don't load another plugin for this buffer
13let b:did_ftplugin = 1
14
Bram Moolenaar519cc552021-11-16 19:18:26 +000015" Reset 'formatoptions', 'comments', 'commentstring' and 'expandtab' to undo
16" this plugin.
17let b:undo_ftplugin = "setl fo< com< cms< et<"
Bram Moolenaar071d4272004-06-13 20:20:40 +000018
19" Set 'formatoptions' to break comment lines but not other lines,
20" and insert the comment leader when hitting <CR> or using "o".
21setlocal fo-=t fo+=croql
22
23" Set 'comments' to format dashed lists in comments.
Bram Moolenaarbf884932013-04-05 22:26:15 +020024setlocal comments=s:#\ -,m:#\ \ ,e:#,n:#,fb:-
Bram Moolenaar519cc552021-11-16 19:18:26 +000025setlocal commentstring=#\ %s
Bram Moolenaar071d4272004-06-13 20:20:40 +000026
27" Expand tabs to spaces to avoid trouble.
28setlocal expandtab
Bram Moolenaar519cc552021-11-16 19:18:26 +000029
30if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
Doug Kearns93197fd2024-01-14 20:59:02 +010031 let b:browsefilter = "Aap Recipe Files (*.aap)\t*.aap\n"
32 if has("win32")
33 let b:browsefilter ..= "All Files (*.*)\t*\n"
34 else
35 let b:browsefilter ..= "All Files (*)\t*\n"
36 endif
Bram Moolenaar519cc552021-11-16 19:18:26 +000037 let b:undo_ftplugin ..= " | unlet! b:browsefilter"
38endif