robin/laufey

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

Christian Clasonvim-patch:9.1.0464: no whitespace padding in commentstring option in ftplugins2f5b8a0092

master
1.4 KiB47 linesraw
1" Vim filetype plugin file
2" Language:	Modula-3
3" Maintainer:	Doug Kearns <dougkearns@gmail.com>
4" Last Change:	2024 Jan 14
5" 		2024 May 24 by Riley Bruins <ribru17@gmail.com> ('commentstring')
6
7if exists("b:did_ftplugin")
8  finish
9endif
10let b:did_ftplugin = 1
11
12let s:cpo_save = &cpo
13set cpo&vim
14
15setlocal comments=s0:(*,mb:\ ,ex:*)
16setlocal commentstring=(*\ %s\ *)
17setlocal formatoptions-=t formatoptions+=croql
18setlocal suffixesadd+=.m3
19setlocal formatprg=m3pp
20
21let b:undo_ftplugin = "setlocal com< cms< fo< fp< sua<"
22
23if exists("loaded_matchit") && !exists("b:match_words")
24  let b:match_words = '\<REPEAT\>:\<UNTIL\>,' ..
25		    \ '\<\%(BEGIN\|CASE\|FOR\|IF\|LOCK\|LOOP\|TRY\|TYPECASE\|WHILE\|WITH\|RECORD\|OBJECT\)\>' ..
26		    \	':' ..
27		    \	'\<\%(ELSIF\|ELSE\|EXCEPT\|FINALLY\|METHODS\|OVERRIDES\)\>\|\%(^\s*\)\@<=\S.*=>' ..
28		    \	':' ..
29		    \ '\<END\>,' ..
30		    \ '(\*:\*),<\*:\*>'
31  let b:undo_ftplugin ..= " | unlet! b:match_words"
32endif
33
34if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
35  let b:browsefilter = "Modula-3 Source Files (*.m3, *.i3, *.mg, *ig)\t*.m3;*.i3;*.mg;*.ig\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
43
44let &cpo = s:cpo_save
45unlet s:cpo_save
46
47" vim: nowrap sw=2 sts=2 ts=8 noet: