Mercurial > vim
comparison runtime/ftplugin/pascal.vim @ 24569:e3ec2ec8841a
Update runtime files
Commit: https://github.com/vim/vim/commit/4c295027a426986566cd7a76c47a6d3a529727e7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 2 17:19:11 2021 +0200
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 02 May 2021 17:30:05 +0200 |
parents | 0877b8d6370e |
children | c968191a8557 |
comparison
equal
deleted
inserted
replaced
24568:3671ff322103 | 24569:e3ec2ec8841a |
---|---|
1 " Vim filetype plugin file | 1 " Vim filetype plugin file |
2 " Language: pascal | 2 " Language: Pascal |
3 " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> | 3 " Maintainer: Doug Kearns <dougkearns@gmail.com> |
4 " Last Changed: 11 Apr 2011 | 4 " Previous Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> |
5 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin | 5 " Last Change: 2021 Apr 23 |
6 | 6 |
7 if exists("b:did_ftplugin") | finish | endif | 7 if exists("b:did_ftplugin") | finish | endif |
8 let b:did_ftplugin = 1 | 8 let b:did_ftplugin = 1 |
9 | 9 |
10 if exists("loaded_matchit") | 10 let s:cpo_save = &cpo |
11 let b:match_ignorecase = 1 " (pascal is case-insensitive) | 11 set cpo&vim |
12 | 12 |
13 let b:match_words = '\<\%(begin\|case\|record\|object\|try\)\>' | 13 set comments=s:(*,m:\ ,e:*),s:{,m:\ ,e:} |
14 let b:match_words .= ':\<^\s*\%(except\|finally\)\>:\<end\>' | 14 set commentstring={%s} |
15 let b:match_words .= ',\<repeat\>:\<until\>' | 15 |
16 let b:match_words .= ',\<if\>:\<else\>' | 16 if exists("pascal_delphi") |
17 set comments+=:/// | |
17 endif | 18 endif |
18 | 19 |
19 " Undo the stuff we changed. | 20 if !exists("pascal_traditional") |
20 let b:undo_ftplugin = "unlet! b:match_words" | 21 set commentstring=//\ %s |
22 set comments+=:// | |
23 endif | |
24 | |
25 setlocal formatoptions-=t formatoptions+=croql | |
26 | |
27 if exists("loaded_matchit") | |
28 let b:match_ignorecase = 1 " (Pascal is case-insensitive) | |
29 | |
30 let b:match_words = '\<\%(asm\|begin\|case\|\%(\%(=\|packed\)\s*\)\@<=\%(class\|object\)\|\%(=\s*\)\@<=interface\|record\|try\)\>' | |
31 let b:match_words .= ':\%(^\s*\)\@<=\%(except\|finally\|else\|otherwise\)\>' | |
32 let b:match_words .= ':\<end\>\.\@!' | |
33 | |
34 let b:match_words .= ',\<repeat\>:\<until\>' | |
35 " let b:match_words .= ',\<if\>:\<else\>' " FIXME - else clashing with middle else. It seems like a debatable use anyway. | |
36 let b:match_words .= ',\<unit\>:\<\%(\%(^\s*\)\@<=interface\|implementation\|initialization\|finalization\)\>:\<end\.' | |
37 endif | |
38 | |
39 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") | |
40 let b:browsefilter = "Pascal Source Files (*.pas *.pp *.inc)\t*.pas;*.pp;*.inc\n" . | |
41 \ "All Files (*.*)\t*.*\n" | |
42 endif | |
43 | |
44 let b:undo_ftplugin = "setl fo< cms< com< " .. | |
45 \ "| unlet! b:browsefilter b:match_words b:match_ignorecase" | |
46 | |
47 let &cpo = s:cpo_save | |
48 unlet s:cpo_save | |
49 | |
50 " vim: nowrap sw=2 sts=2 ts=8 noet: |