vim

Fork of vim, an acceptable text editor
git clone git://git.laack.co/vim.git
Log | Files | Refs | README | LICENSE

aap.vim (1308B)


      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
      9 if exists("b:did_ftplugin")
     10   finish
     11 endif
     12 
     13 " Don't load another plugin for this buffer
     14 let b:did_ftplugin = 1
     15 
     16 " Reset 'formatoptions', 'comments', 'commentstring' and 'expandtab' to undo
     17 " this plugin.
     18 let 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".
     22 setlocal fo-=t fo+=croql
     23 
     24 " Set 'comments' to format dashed lists in comments.
     25 setlocal comments=s:#\ -,m:#\ \ ,e:#,n:#,fb:-
     26 setlocal commentstring=#\ %s
     27 
     28 " Expand tabs to spaces to avoid trouble.
     29 if get(g:, 'aap_recommended_style',
     30       \ get(g:, 'filetype_recommended_style', 1))
     31   setlocal expandtab
     32 endif
     33 
     34 if (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"
     42 endif