annotate runtime/ftplugin/pascal.vim @ 28353:8bc8071928ed v8.2.4702

patch 8.2.4702: C++ scope labels are hard-coded Commit: https://github.com/vim/vim/commit/3506cf34c17c5eae6c2d1317db1fcd5a8493c288 Author: Tom Praschan <13141438+tom-anders@users.noreply.github.com> Date: Thu Apr 7 12:39:08 2022 +0100 patch 8.2.4702: C++ scope labels are hard-coded Problem: C++ scope labels are hard-coded. Solution: Add 'cinscopedecls' to define the labels. (Rom Praschan, closes #10109)
author Bram Moolenaar <Bram@vim.org>
date Thu, 07 Apr 2022 13:45:04 +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: