Mercurial > vim
comparison runtime/ftplugin/freebasic.vim @ 27459:5825405e4e2c
Update runtime files
Commit: https://github.com/vim/vim/commit/f10911e5db16f1fe6ab519c5d091ad0c1df0d063
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 29 22:20:48 2022 +0000
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 29 Jan 2022 23:30:04 +0100 |
parents | 34b4eb3a8458 |
children | 912224cab37f |
comparison
equal
deleted
inserted
replaced
27458:2a7fc102cb91 | 27459:5825405e4e2c |
---|---|
1 " Vim filetype plugin file | 1 " Vim filetype plugin file |
2 " Language: FreeBasic | 2 " Language: FreeBASIC |
3 " Maintainer: Doug Kearns <dougkearns@gmail.com> | 3 " Maintainer: Doug Kearns <dougkearns@gmail.com> |
4 " Last Change: 2015 Jan 10 | 4 " Last Change: 2021 Mar 16 |
5 | 5 |
6 " Setup {{{1 | |
6 if exists("b:did_ftplugin") | 7 if exists("b:did_ftplugin") |
7 finish | 8 finish |
8 endif | 9 endif |
9 let b:did_ftplugin = 1 | 10 |
11 let s:cpo_save = &cpo | |
12 set cpo&vim | |
10 | 13 |
11 runtime! ftplugin/basic.vim | 14 runtime! ftplugin/basic.vim |
12 | 15 |
13 " vim: ts=8 | 16 let s:dialect = freebasic#GetDialect() |
17 | |
18 " Comments {{{1 | |
19 " add ''comments before 'comments | |
20 let &l:comments = "sO:*\ -,mO:*\ \ ,exO:*/,s1:/',mb:',ex:'/,:''," .. &l:comments | |
21 | |
22 " Match words {{{1 | |
23 if exists("loaded_matchit") | |
24 let s:not_end = '\%(end\s\+\)\@<!' | |
25 | |
26 let b:match_words ..= ',' | |
27 | |
28 if s:dialect == 'fb' | |
29 let b:match_words ..= s:not_end .. '\<constructor\>:\<end\s\+constructor\>,' .. | |
30 \ s:not_end .. '\<destructor\>:\<end\s\+destructor\>,' .. | |
31 \ s:not_end .. '\<property\>:\<end\s\+property\>,' .. | |
32 \ s:not_end .. '\<operator\>:\<end\s\+operator\>,' .. | |
33 \ s:not_end .. '\<extern\%(\s\+"\)\@=:\<end\s\+extern\>,' | |
34 endif | |
35 | |
36 if s:dialect == 'fb' || s:dialect == 'deprecated' | |
37 let b:match_words ..= s:not_end .. '\<scope\>:\<end\s\+scope\>,' | |
38 endif | |
39 | |
40 if s:dialect == 'qb' | |
41 let b:match_words ..= s:not_end .. '\<__asm\>:\<end\s\+__asm\>,' .. | |
42 \ s:not_end .. '\<__union\>:\<end\s\+__union\>,' .. | |
43 \ s:not_end .. '\<__with\>:\<end\s\+__with\>,' | |
44 else | |
45 let b:match_words ..= s:not_end .. '\<asm\>:\<end\s\+asm\>,' .. | |
46 \ s:not_end .. '\<namespace\>:\<end\s\+namespace\>,' .. | |
47 \ s:not_end .. '\<union\>:\<end\s\+union\>,' .. | |
48 \ s:not_end .. '\<with\>:\<end\s\+with\>,' | |
49 endif | |
50 | |
51 let b:match_words ..= s:not_end .. '\<enum\>:\<end\s\+enum\>,' .. | |
52 \ '^#\s*\%(if\|ifdef\|ifndef\)\>:^#\s*\%(else\|elseif\)\>:^#\s*endif\>,' .. | |
53 \ '^#\s*macro\>:^#\s*endmacro\>' | |
54 | |
55 " skip "function = <retval>" | |
56 let b:match_skip ..= '|| strpart(getline("."), col(".") - 1) =~? "^\\<function\\s\\+="' | |
57 | |
58 unlet s:not_end | |
59 endif | |
60 | |
61 " Cleanup {{{1 | |
62 let &cpo = s:cpo_save | |
63 unlet s:cpo_save | |
64 | |
65 " vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker: |