1" Vim filetype plugin file 2" Language: meson 3" License: VIM License 4" Maintainer: Liam Beguin <[email protected]> 5" Original Author: Laurent Pinchart <[email protected]> 6" Last Change: 2018 Nov 27 7 8if exists("b:did_ftplugin") | finish | endif 9let b:did_ftplugin = 1 10let s:keepcpo= &cpo 11set cpo&vim 12 13setlocal commentstring=#\ %s 14setlocal comments=:# 15setlocal formatoptions+=croql formatoptions-=t 16 17let b:undo_ftplugin = "setl com< cms< fo<" 18 19if get(g:, "meson_recommended_style", 1) 20 setlocal expandtab 21 setlocal shiftwidth=2 22 setlocal softtabstop=2 23 let b:undo_ftplugin .= " | setl et< sts< sw<" 24endif 25 26if exists("loaded_matchit") && !exists("b:match_words") 27 let b:match_words = '\<if\>:\<elif\>:\<else\>:\<endif\>,' . 28 \ '\<foreach\>:\<break\>:\<continue\>:\<endforeach\>' 29 let b:undo_ftplugin .= " | unlet! b:match_words" 30endif 31 32if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") 33 let b:browsefilter = "Meson Build Files (meson.build)\tmeson.build\n" . 34 \ "All Files (*.*)\t*.*\n" 35 let b:undo_ftplugin .= " | unlet! b:browsefilter" 36endif 37 38let &cpo = s:keepcpo 39unlet s:keepcpo 40