robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

zeertzjqMerge pull request #40472 from zeertzjq/vim-1f337327945732ed7

master
1.3 KiB42 linesraw
1" Vim filetype plugin file
2" Language:	Aap recipe
3" Maintainer:	The Vim Project <https://github.com/vim/vim>
4" Last Change:	2024 Jan 14
5"		2026 Jun 27 by Vim Project (add recommended style guard)
6" Former Maintainer:	Bram Moolenaar <Bram@vim.org>
7
8" Only do this when not done yet for this buffer
9if exists("b:did_ftplugin")
10  finish
11endif
12
13" Don't load another plugin for this buffer
14let b:did_ftplugin = 1
15
16" Reset 'formatoptions', 'comments', 'commentstring' and 'expandtab' to undo
17" this plugin.
18let b:undo_ftplugin = "setl fo< com< cms< et<"
19
20" Set 'formatoptions' to break comment lines but not other lines,
21" and insert the comment leader when hitting <CR> or using "o".
22setlocal fo-=t fo+=croql
23
24" Set 'comments' to format dashed lists in comments.
25setlocal comments=s:#\ -,m:#\ \ ,e:#,n:#,fb:-
26setlocal commentstring=#\ %s
27
28" Expand tabs to spaces to avoid trouble.
29if get(g:, 'aap_recommended_style',
30      \ get(g:, 'filetype_recommended_style', 1))
31  setlocal expandtab
32endif
33
34if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
35  let b:browsefilter = "Aap Recipe Files (*.aap)\t*.aap\n"
36  if has("win32")
37    let b:browsefilter ..= "All Files (*.*)\t*\n"
38  else
39    let b:browsefilter ..= "All Files (*)\t*\n"
40  endif
41  let b:undo_ftplugin ..= " | unlet! b:browsefilter"
42endif