codekingpro/portable-devtools
114k
1" Vim filetype plugin file2" Language: Modula-23" Maintainer: Doug Kearns <dougkearns@gmail.com>4" Last Change: 2024 Jan 145" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')6 7if exists("b:did_ftplugin")8 finish9endif10let b:did_ftplugin = 111 12let s:cpo_save = &cpo13set cpo&vim14 15let s:dialect = modula2#GetDialect()16 17if s:dialect ==# "r10"18 setlocal comments=s:(*,m:\ ,e:*),:!19 setlocal commentstring=!\ %s20else21 setlocal commentstring=(*\ %s\ *)22 setlocal comments=s:(*,m:\ ,e:*)23endif24setlocal formatoptions-=t formatoptions+=croql25 26let b:undo_ftplugin = "setl com< cms< fo<"27 28if exists("loaded_matchit") && !exists("b:match_words")29 let b:match_ignorecase = 030 " the second branch of the middle pattern is intended to match CASE labels31 let b:match_words = '\<REPEAT\>:\<UNTIL\>,' ..32 \ '\<\%(BEGIN\|CASE\|FOR\|IF\|LOOP\|WHILE\|WITH\|RECORD\)\>' ..33 \ ':' ..34 \ '\<\%(ELSIF\|ELSE\)\>\|\%(^\s*\)\@<=\w\+\%(\s*\,\s*\w\+\)\=\s*\:=\@!' ..35 \ ':' ..36 \ '\<END\>,' ..37 \ '(\*:\*),<\*:\*>'38 let b:match_skip = 's:Comment\|Pragma'39 let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_skip b:match_words"40endif41 42if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")43 let b:browsefilter = "Modula-2 Source Files (*.def, *.mod)\t*.def;*.mod\n"44 if has("win32")45 let b:browsefilter ..= "All Files (*.*)\t*\n"46 else47 let b:browsefilter ..= "All Files (*)\t*\n"48 endif49 let b:undo_ftplugin ..= " | unlet! b:browsefilter"50endif51 52let &cpo = s:cpo_save53unlet s:cpo_save54 55" vim: nowrap sw=2 sts=2 ts=8 noet:56 