annotate runtime/ftplugin/pascal.vim @ 29602:093466b0c903

Added tag v9.0.0141 for changeset 8f0ca93857a68e4783ef07ff161fe8621f46fc04
author Bram Moolenaar <Bram@vim.org>
date Fri, 05 Aug 2022 12:00:09 +0200
parents c968191a8557
children 8ae680be2a51
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim filetype plugin file
24569
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
2 " Language: Pascal
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
28010
c968191a8557 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 24569
diff changeset
4 " Previous Maintainer: Dan Sharp
24569
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
5 " Last Change: 2021 Apr 23
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 if exists("b:did_ftplugin") | finish | endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
24569
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
10 let s:cpo_save = &cpo
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
11 set cpo&vim
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
12
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
13 set comments=s:(*,m:\ ,e:*),s:{,m:\ ,e:}
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
14 set commentstring={%s}
2788
0877b8d6370e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
15
24569
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
16 if exists("pascal_delphi")
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
17 set comments+=:///
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
18 endif
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
19
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
20 if !exists("pascal_traditional")
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
21 set commentstring=//\ %s
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
22 set comments+=://
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
24569
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
25 setlocal formatoptions-=t formatoptions+=croql
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
26
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
27 if exists("loaded_matchit")
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
28 let b:match_ignorecase = 1 " (Pascal is case-insensitive)
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
29
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
30 let b:match_words = '\<\%(asm\|begin\|case\|\%(\%(=\|packed\)\s*\)\@<=\%(class\|object\)\|\%(=\s*\)\@<=interface\|record\|try\)\>'
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
31 let b:match_words .= ':\%(^\s*\)\@<=\%(except\|finally\|else\|otherwise\)\>'
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
32 let b:match_words .= ':\<end\>\.\@!'
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
33
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
34 let b:match_words .= ',\<repeat\>:\<until\>'
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
35 " let b:match_words .= ',\<if\>:\<else\>' " FIXME - else clashing with middle else. It seems like a debatable use anyway.
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
36 let b:match_words .= ',\<unit\>:\<\%(\%(^\s*\)\@<=interface\|implementation\|initialization\|finalization\)\>:\<end\.'
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
37 endif
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
38
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
39 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
40 let b:browsefilter = "Pascal Source Files (*.pas *.pp *.inc)\t*.pas;*.pp;*.inc\n" .
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
41 \ "All Files (*.*)\t*.*\n"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
42 endif
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
43
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
44 let b:undo_ftplugin = "setl fo< cms< com< " ..
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
45 \ "| unlet! b:browsefilter b:match_words b:match_ignorecase"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
46
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
47 let &cpo = s:cpo_save
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
48 unlet s:cpo_save
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
49
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
50 " vim: nowrap sw=2 sts=2 ts=8 noet: