blob: b5065e5157ceab4b2810e1bbe45d3d81dd214f64 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim filetype plugin file
2" Language: Aap recipe
3" Maintainer: Bram Moolenaar <Bram@vim.org>
Bram Moolenaar519cc552021-11-16 19:18:26 +00004" Last Change: 2021 Nov 14
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
10
11" Don't load another plugin for this buffer
12let b:did_ftplugin = 1
13
Bram Moolenaar519cc552021-11-16 19:18:26 +000014" Reset 'formatoptions', 'comments', 'commentstring' and 'expandtab' to undo
15" this plugin.
16let b:undo_ftplugin = "setl fo< com< cms< et<"
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.
Bram Moolenaarbf884932013-04-05 22:26:15 +020023setlocal comments=s:#\ -,m:#\ \ ,e:#,n:#,fb:-
Bram Moolenaar519cc552021-11-16 19:18:26 +000024setlocal commentstring=#\ %s
Bram Moolenaar071d4272004-06-13 20:20:40 +000025
26" Expand tabs to spaces to avoid trouble.
27setlocal expandtab
Bram Moolenaar519cc552021-11-16 19:18:26 +000028
29if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
30 let b:browsefilter = "Aap Recipe Files (*.aap)\t*.aap\nAll Files (*.*)\t*.*\n"
31 let b:undo_ftplugin ..= " | unlet! b:browsefilter"
32endif