annotate runtime/ftplugin/freebasic.vim @ 30511:98bef0149214 v9.0.0591

patch 9.0.0591: message window popup shows on only one tab page Commit: https://github.com/vim/vim/commit/4569020538f76cab588f723bd7243e3896937568 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 26 12:57:11 2022 +0100 patch 9.0.0591: message window popup shows on only one tab page Problem: Message window popup shows on only one tab page. (Naruhiko Nishino) Solution: Show the message window popup on all tab pages. (closes #11231)
author Bram Moolenaar <Bram@vim.org>
date Mon, 26 Sep 2022 14:00:08 +0200
parents 912224cab37f
children 8ae680be2a51
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23737
34b4eb3a8458 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim filetype plugin file
27459
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
2 " Language: FreeBASIC
23737
34b4eb3a8458 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
29352
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
4 " Last Change: 2022 Jun 24
23737
34b4eb3a8458 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5
27459
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
6 " Setup {{{1
23737
34b4eb3a8458 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 if exists("b:did_ftplugin")
34b4eb3a8458 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 finish
34b4eb3a8458 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 endif
27459
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
10
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
11 let s:cpo_save = &cpo
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
12 set cpo&vim
23737
34b4eb3a8458 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13
34b4eb3a8458 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 runtime! ftplugin/basic.vim
34b4eb3a8458 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15
27459
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
16 let s:dialect = freebasic#GetDialect()
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
17
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
18 " Comments {{{1
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
19 " add ''comments before 'comments
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
20 let &l:comments = "sO:*\ -,mO:*\ \ ,exO:*/,s1:/',mb:',ex:'/,:''," .. &l:comments
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
21
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
22 " Match words {{{1
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
23 if exists("loaded_matchit")
29352
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
24 let s:line_start = '\%(^\s*\)\@<='
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
25 let s:not_end = '\%(end\s\+\)\@<!'
27459
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
26
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
27 let b:match_words ..= ','
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
28
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
29 if s:dialect == 'fb'
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
30 let b:match_words ..= s:not_end .. '\<constructor\>:\<end\s\+constructor\>,' ..
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
31 \ s:not_end .. '\<destructor\>:\<end\s\+destructor\>,' ..
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
32 \ s:not_end .. '\<property\>:\<end\s\+property\>,' ..
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
33 \ s:not_end .. '\<operator\>:\<end\s\+operator\>,' ..
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
34 \ s:not_end .. '\<extern\%(\s\+"\)\@=:\<end\s\+extern\>,'
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
35 endif
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
36
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
37 if s:dialect == 'fb' || s:dialect == 'deprecated'
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
38 let b:match_words ..= s:not_end .. '\<scope\>:\<end\s\+scope\>,'
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
39 endif
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
40
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
41 if s:dialect == 'qb'
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
42 let b:match_words ..= s:not_end .. '\<__asm\>:\<end\s\+__asm\>,' ..
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
43 \ s:not_end .. '\<__union\>:\<end\s\+__union\>,' ..
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
44 \ s:not_end .. '\<__with\>:\<end\s\+__with\>,'
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
45 else
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
46 let b:match_words ..= s:not_end .. '\<asm\>:\<end\s\+asm\>,' ..
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
47 \ s:not_end .. '\<namespace\>:\<end\s\+namespace\>,' ..
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
48 \ s:not_end .. '\<union\>:\<end\s\+union\>,' ..
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
49 \ s:not_end .. '\<with\>:\<end\s\+with\>,'
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
50 endif
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
51
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
52 let b:match_words ..= s:not_end .. '\<enum\>:\<end\s\+enum\>,' ..
29352
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
53 \ s:line_start .. '#\s*\%(if\|ifdef\|ifndef\)\>:' ..
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
54 \ s:line_start .. '#\s*\%(else\|elseif\)\>:' ..
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
55 \ s:line_start .. '#\s*endif\>,' ..
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
56 \ s:line_start .. '#\s*macro\>:' .. s:line_start .. '#\s*endmacro\>,' ..
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
57 \ "/':'/"
27459
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
58
29352
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
59 " skip "function = <retval>" and "continue { do | for | while }"
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
60 if s:dialect == "qb"
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
61 let s:continue = "__continue"
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
62 else
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
63 let s:continue = "continue"
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
64 endif
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
65 let b:match_skip ..= ' || strpart(getline("."), col(".") - 1) =~? "^\\<function\\s\\+="' ..
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
66 \ ' || strpart(getline("."), 0, col(".") ) =~? "\\<' .. s:continue .. '\\s\\+"'
27459
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
67
29352
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
68 unlet s:not_end s:line_start
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
69 endif
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
70
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
71 if (has("gui_win32") || has("gui_gtk")) && exists("b:basic_set_browsefilter")
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
72 let b:browsefilter = "FreeBASIC Source Files (*.bas)\t*.bas\n" ..
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
73 \ "FreeBASIC Header Files (*.bi)\t*.bi\n" ..
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
74 \ "All Files (*.*)\t*.*\n"
27459
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
75 endif
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
76
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
77 " Cleanup {{{1
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
78 let &cpo = s:cpo_save
29352
912224cab37f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27459
diff changeset
79 unlet s:cpo_save s:dialect
27459
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
80
5825405e4e2c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
81 " vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker: