annotate runtime/ftplugin/pascal.vim @ 26994:8d9506f3542e v8.2.4026

patch 8.2.4026: ml_get error with specific win_execute() command Commit: https://github.com/vim/vim/commit/e664a327014f4aa8baf8549a34a4caab2f3116a3 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jan 7 14:08:03 2022 +0000 patch 8.2.4026: ml_get error with specific win_execute() command Problem: ml_get error with specific win_execute() command. (Sean Dewar) Solution: Check cursor and Visual area are OK.
author Bram Moolenaar <Bram@vim.org>
date Fri, 07 Jan 2022 15:15:03 +0100
parents e3ec2ec8841a
children c968191a8557
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>
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 2788
diff changeset
4 " Previous Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
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: