annotate runtime/ftplugin/lua.vim @ 29247:5f314b2ed494 v8.2.5142

patch 8.2.5142: startup test fails if there is a status bar Commit: https://github.com/vim/vim/commit/fa04eae5a5b9394079bde2d37ce6f9f8a5567d48 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 21 14:38:40 2022 +0100 patch 8.2.5142: startup test fails if there is a status bar Problem: Startup test fails if there is a status bar at the top of the screen. (Ernie Rael) Solution: Use a larger vertical offset in the test.
author Bram Moolenaar <Bram@vim.org>
date Tue, 21 Jun 2022 18:45:07 +0200
parents 624439a39432
children fee9eccee266
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.
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
2 " Language: Lua
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
4 " Previous Maintainer: Max Ischenko <mfi@ukr.net>
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
5 " Last Change: 2021 Nov 15
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " Only do this when not done yet for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if exists("b:did_ftplugin")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " Don't load another plugin for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3224
8b8ef1fed009 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1621
diff changeset
15 let s:cpo_save = &cpo
8b8ef1fed009 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1621
diff changeset
16 set cpo&vim
8b8ef1fed009 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1621
diff changeset
17
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " Set 'formatoptions' to break comment lines but not other lines, and insert
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " the comment leader when hitting <CR> or using "o".
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
20 setlocal formatoptions-=t formatoptions+=croql
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
22 setlocal comments=:--
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
23 setlocal commentstring=--%s
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 setlocal suffixesadd=.lua
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
26 let b:undo_ftplugin = "setlocal fo< com< cms< sua<"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
28 if exists("loaded_matchit") && !exists("b:match_words")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 let b:match_ignorecase = 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 let b:match_words =
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
31 \ '\<\%(do\|function\|if\)\>:' .
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
32 \ '\<\%(return\|else\|elseif\)\>:' .
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
33 \ '\<end\>,' .
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
34 \ '\<repeat\>:\<until\>,' .
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
35 \ '\%(--\)\=\[\(=*\)\[:]\1]'
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
36 let b:undo_ftplugin .= " | unlet! b:match_words b:match_ignorecase"
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
37 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
39 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
40 let b:browsefilter = "Lua Source Files (*.lua)\t*.lua\n" .
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
41 \ "All Files (*.*)\t*.*\n"
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
42 let b:undo_ftplugin .= " | unlet! b:browsefilter"
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
43 endif
3224
8b8ef1fed009 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1621
diff changeset
44
8b8ef1fed009 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1621
diff changeset
45 let &cpo = s:cpo_save
8b8ef1fed009 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1621
diff changeset
46 unlet s:cpo_save