neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

aap.vim (1154B)


      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 " Former Maintainer:	Bram Moolenaar <Bram@vim.org>
      6 
      7 " Only do this when not done yet for this buffer
      8 if exists("b:did_ftplugin")
      9  finish
     10 endif
     11 
     12 " Don't load another plugin for this buffer
     13 let b:did_ftplugin = 1
     14 
     15 " Reset 'formatoptions', 'comments', 'commentstring' and 'expandtab' to undo
     16 " this plugin.
     17 let b:undo_ftplugin = "setl fo< com< cms< et<"
     18 
     19 " Set 'formatoptions' to break comment lines but not other lines,
     20 " and insert the comment leader when hitting <CR> or using "o".
     21 setlocal fo-=t fo+=croql
     22 
     23 " Set 'comments' to format dashed lists in comments.
     24 setlocal comments=s:#\ -,m:#\ \ ,e:#,n:#,fb:-
     25 setlocal commentstring=#\ %s
     26 
     27 " Expand tabs to spaces to avoid trouble.
     28 setlocal expandtab
     29 
     30 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
     31  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
     37  let b:undo_ftplugin ..= " | unlet! b:browsefilter"
     38 endif