neovim

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

modula3.vim (1385B)


      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 
      7 if exists("b:did_ftplugin")
      8  finish
      9 endif
     10 let b:did_ftplugin = 1
     11 
     12 let s:cpo_save = &cpo
     13 set cpo&vim
     14 
     15 setlocal comments=s0:(*,mb:\ ,ex:*)
     16 setlocal commentstring=(*\ %s\ *)
     17 setlocal formatoptions-=t formatoptions+=croql
     18 setlocal suffixesadd+=.m3
     19 setlocal formatprg=m3pp
     20 
     21 let b:undo_ftplugin = "setlocal com< cms< fo< fp< sua<"
     22 
     23 if 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"
     32 endif
     33 
     34 if (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"
     42 endif
     43 
     44 let &cpo = s:cpo_save
     45 unlet s:cpo_save
     46 
     47 " vim: nowrap sw=2 sts=2 ts=8 noet: