vim

Fork of vim, an acceptable text editor
git clone git://git.laack.co/vim.git
Log | Files | Refs | README | LICENSE

algol68.vim (1322B)


      1 " Vim filetype plugin
      2 " Language:		Algol 68
      3 " Maintainer:		Doug Kearns <dougkearns@gmail.com>
      4 " Last Change:		2026 Apr 23
      5 
      6 if exists("b:did_ftplugin")
      7   finish
      8 endif
      9 let b:did_ftplugin = 1
     10 
     11 let s:cpo_save = &cpo
     12 set cpo&vim
     13 
     14 " TODO: 'comments'
     15 
     16 setlocal commentstring=#\ %s\ #
     17 
     18 let &l:include='\c\%(^\|;\)\s*\%(PR\|PRAGMAT\)\s\+\%(read\|include\)'
     19 
     20 let b:undo_ftplugin = "setl cms< inc<"
     21 
     22 if exists("loaded_matchit") && !exists("b:match_words")
     23   let b:match_ignorecase = 0
     24   let b:match_words = '\<BEGIN\>:\<END\>,' ..
     25 	\	      '\<IF\>:\<THEN\>:\<ELIF\>:\<ELSE\>:\<FI\>,' ..
     26 	\	      '\<CASE\>:\<IN\>:\<OUSE\>:\<OUT\>:\<ESAC\>,' ..
     27 	"\ TODO: loops have overlapping start and intermediate keywords like
     28 	"\ `TO` which are difficult to match with patterns alone.
     29 	\	      '\<DO\>:\<OD\>'
     30   let b:match_skip = 's:Comment\|String\|PreProc'
     31   let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_skip b:match_words"
     32 endif
     33 
     34 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
     35   let b:browsefilter = "Algol 68 Source Files (*.a68)\t*.a68\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