robin/laufey

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

zeertzjqMerge pull request #39435 from zeertzjq/vim-0ca1121f69aadd2b4

master
1.3 KiB47 linesraw
1" Vim filetype plugin
2" Language:		Algol 68
3" Maintainer:		Doug Kearns <dougkearns@gmail.com>
4" Last Change:		2026 Apr 23
5
6if exists("b:did_ftplugin")
7  finish
8endif
9let b:did_ftplugin = 1
10
11let s:cpo_save = &cpo
12set cpo&vim
13
14" TODO: 'comments'
15
16setlocal commentstring=#\ %s\ #
17
18let &l:include='\c\%(^\|;\)\s*\%(PR\|PRAGMAT\)\s\+\%(read\|include\)'
19
20let b:undo_ftplugin = "setl cms< inc<"
21
22if 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"
32endif
33
34if (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"
42endif
43
44let &cpo = s:cpo_save
45unlet s:cpo_save
46
47" vim: nowrap sw=2 sts=2 ts=8