Compare commits
141 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e0cb8520c | ||
|
|
a9711b5395 | ||
|
|
ccb7b43365 | ||
|
|
27e5d95edf | ||
|
|
cf8e378f4e | ||
|
|
a3d4b895ae | ||
|
|
63d53de72d | ||
|
|
335aecd98f | ||
|
|
e80a4ed845 | ||
|
|
8e079085d2 | ||
|
|
4936e761a5 | ||
|
|
a71e52a0b1 | ||
|
|
d8558fdf4f | ||
|
|
7d632a0a77 | ||
|
|
aa58f1fe44 | ||
|
|
9179ddc060 | ||
|
|
4895ae8c0c | ||
|
|
0084e4bd16 | ||
|
|
536ee91189 | ||
|
|
4ba3dadd68 | ||
|
|
5eb10c5359 | ||
|
|
c45e16a939 | ||
|
|
46cc91ecbf | ||
|
|
5e37e31496 | ||
|
|
da1c431309 | ||
|
|
e7bb907c24 | ||
|
|
08953f7113 | ||
|
|
6c30628392 | ||
|
|
8d0fcff002 | ||
|
|
969a4a0ba5 | ||
|
|
b084b8f1db | ||
|
|
88f3ac34ea | ||
|
|
ac5c8ab6cc | ||
|
|
4157787be8 | ||
|
|
254f844dda | ||
|
|
d5560fd395 | ||
|
|
416d1a5e28 | ||
|
|
a735e44b3c | ||
|
|
3ac486b8a6 | ||
|
|
1aa5ca4ecb | ||
|
|
0ed8ba3079 | ||
|
|
77a59be594 | ||
|
|
eb577f9206 | ||
|
|
2a3b608355 | ||
|
|
a5b19603e4 | ||
|
|
679c2c01fa | ||
|
|
6625ba359e | ||
|
|
4a9967bddf | ||
|
|
997952a512 | ||
|
|
bfd4f75b5a | ||
|
|
8be4610588 | ||
|
|
93eb081eee | ||
|
|
57352b279d | ||
|
|
0115da33b4 | ||
|
|
5beb6b58c9 | ||
|
|
bc12a938d9 | ||
|
|
a7e671fbb9 | ||
|
|
96a1caac6b | ||
|
|
0f93c988e9 | ||
|
|
7f5c60b31e | ||
|
|
19442ad118 | ||
|
|
cc71684ab0 | ||
|
|
871d2cc2ef | ||
|
|
4fe7301df9 | ||
|
|
62d8f3dab5 | ||
|
|
a722da29c1 | ||
|
|
eea85983cb | ||
|
|
a025a46d41 | ||
|
|
2f689d5abd | ||
|
|
6b652a7850 | ||
|
|
ea189a6f4d | ||
|
|
9c87af5c3c | ||
|
|
9d71fdaf3a | ||
|
|
83fc7c4d8e | ||
|
|
10dc693ea0 | ||
|
|
5c2b594d0e | ||
|
|
d09be15847 | ||
|
|
ce1636548d | ||
|
|
7a6d9454c8 | ||
|
|
1bc3610b0a | ||
|
|
6df5360691 | ||
|
|
32b801abc3 | ||
|
|
1dd301a4b3 | ||
|
|
e74e40dc43 | ||
|
|
ea2b98b9e9 | ||
|
|
e426245bb3 | ||
|
|
f99de42a9f | ||
|
|
ee3f10af87 | ||
|
|
dab78ec4a2 | ||
|
|
a7f703c215 | ||
|
|
4e722fdfdd | ||
|
|
78046cc539 | ||
|
|
9f5b09ea1f | ||
|
|
4d5b303726 | ||
|
|
9266a2a197 | ||
|
|
1ff2239053 | ||
|
|
08aaa7ae19 | ||
|
|
43b87938f5 | ||
|
|
538da34ad3 | ||
|
|
ffd5c52d23 | ||
|
|
b91b30643a | ||
|
|
c721b69e88 | ||
|
|
a8a0ee5004 | ||
|
|
491f0fa457 | ||
|
|
eb3007b417 | ||
|
|
e6a11d45e5 | ||
|
|
2006415016 | ||
|
|
6d211bc4f0 | ||
|
|
519dc391d8 | ||
|
|
aded55463a | ||
|
|
8ea0e7205c | ||
|
|
9d661b057e | ||
|
|
60c87056b4 | ||
|
|
11c3c62aa8 | ||
|
|
90e17110c4 | ||
|
|
cbcc5babba | ||
|
|
5e577c7aa8 | ||
|
|
bb10f71402 | ||
|
|
a90e80411a | ||
|
|
7982966f3e | ||
|
|
de37e7430a | ||
|
|
9c9982240a | ||
|
|
b571034a8f | ||
|
|
f2814754c0 | ||
|
|
86855ea8ee | ||
|
|
3913f13a7d | ||
|
|
49e0f833dd | ||
|
|
bd686d85dc | ||
|
|
e09ff34129 | ||
|
|
fa2fca1ebf | ||
|
|
c1d77520b8 | ||
|
|
8de7fd0c20 | ||
|
|
3255b8a556 | ||
|
|
d57b4a3681 | ||
|
|
83fd754150 | ||
|
|
2387c49f6e | ||
|
|
6ec7d40b7c | ||
|
|
a820a4540d | ||
|
|
b43f9ded7e | ||
|
|
64799a5080 | ||
|
|
1a4a1b9fa6 |
13
.gitattributes
vendored
13
.gitattributes
vendored
@@ -1,4 +1,13 @@
|
||||
src/testdir/test42.in diff
|
||||
# The old test .ok files are expected to use LF line endings, even on Windows.
|
||||
# In src/testdir/Make_mvc.mak and src/testdir/Make_ming.mak, the test result
|
||||
# files .out are converted to LF line endings before being compared.
|
||||
# Therefore, if the .ok files' line endings are not specified and are
|
||||
# converted to CRLF, the comparison between .ok and .out will fail.
|
||||
src/testdir/test*.ok text eol=lf
|
||||
|
||||
# This ok file contains literal CR LF endings. Should not be touched by git,
|
||||
# so handle as binary
|
||||
src/testdir/test21.ok -text
|
||||
|
||||
# `vim.pot` is updated every time any of the *.c files are modified. And as it
|
||||
# contains line numbers for strings from *.c files, inserting a line into a
|
||||
@@ -24,7 +33,7 @@ src/po/vim.pot -diff
|
||||
src/po/vim.pot diff=ignore_vim_pot
|
||||
|
||||
# GitHub reacts to the `linguist-generated` attribute, by ignoring marked files
|
||||
# for the repository's language statistics and hiddning changes in these files
|
||||
# for the repository's language statistics and hiding changes in these files
|
||||
# by default in diffs.
|
||||
#
|
||||
# https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github
|
||||
|
||||
8
.github/MAINTAINERS
vendored
8
.github/MAINTAINERS
vendored
@@ -127,6 +127,8 @@ runtime/ftplugin/asy.vim @avidseeker
|
||||
runtime/ftplugin/autohotkey.vim @telemachus
|
||||
runtime/ftplugin/awk.vim @dkearns
|
||||
runtime/ftplugin/basic.vim @dkearns
|
||||
runtime/ftplugin/bicep.vim @scottmckendry
|
||||
runtime/ftplugin/bicep-params.vim @scottmckendry
|
||||
runtime/ftplugin/brighterscript.vim @ribru17
|
||||
runtime/ftplugin/brightscript.vim @ribru17
|
||||
runtime/ftplugin/bst.vim @tpope
|
||||
@@ -228,6 +230,8 @@ runtime/ftplugin/less.vim @genoma
|
||||
runtime/ftplugin/lex.vim @ribru17
|
||||
runtime/ftplugin/lf.vim @andis-sprinkis
|
||||
runtime/ftplugin/liquid.vim @tpope
|
||||
runtime/ftplugin/logtalk.dict @pmoura
|
||||
runtime/ftplugin/logtalk.vim @pmoura
|
||||
runtime/ftplugin/lua.vim @dkearns
|
||||
runtime/ftplugin/lynx.vim @dkearns
|
||||
runtime/ftplugin/m17ndb.vim @dseomn
|
||||
@@ -336,6 +340,7 @@ runtime/import/dist/vimhighlight.vim @lacygoill
|
||||
runtime/indent/arduino.vim @k-takata
|
||||
runtime/indent/astro.vim @wuelnerdotexe
|
||||
runtime/indent/basic.vim @dkearns
|
||||
runtime/indent/bpftrace.vim @sgruszka
|
||||
runtime/indent/bst.vim @tpope
|
||||
runtime/indent/cdl.vim @dkearns
|
||||
runtime/indent/chatito.vim @ObserverOfTime
|
||||
@@ -382,6 +387,7 @@ runtime/indent/ld.vim @dkearns
|
||||
runtime/indent/lf.vim @andis-sprinkis
|
||||
runtime/indent/less.vim @genoma
|
||||
runtime/indent/liquid.vim @tpope
|
||||
runtime/indent/logtalk.vim @pmoura
|
||||
runtime/indent/lua.vim @marcuscf
|
||||
runtime/indent/m17ndb.vim @dseomn
|
||||
runtime/indent/make.vim @dkearns
|
||||
@@ -454,6 +460,7 @@ runtime/syntax/asy.vim @avidseeker
|
||||
runtime/syntax/autohotkey.vim @mmikeww
|
||||
runtime/syntax/awk.vim @dkearns
|
||||
runtime/syntax/basic.vim @dkearns
|
||||
runtime/syntax/bpftrace.vim @sgruszka
|
||||
runtime/syntax/bst.vim @tpope
|
||||
runtime/syntax/bzl.vim @dbarnett
|
||||
runtime/syntax/bzr.vim @hdima
|
||||
@@ -558,6 +565,7 @@ runtime/syntax/less.vim @genoma
|
||||
runtime/syntax/lf.vim @andis-sprinkis
|
||||
runtime/syntax/liquid.vim @tpope
|
||||
runtime/syntax/log.vim @mao-yining
|
||||
runtime/syntax/logtalk.vim @pmoura
|
||||
runtime/syntax/lua.vim @marcuscf
|
||||
runtime/syntax/lynx.vim @dkearns
|
||||
runtime/syntax/lyrics.vim @ObserverOfTime
|
||||
|
||||
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
@@ -522,6 +522,7 @@ jobs:
|
||||
- { features: HUGE, toolchain: mingw, VIMDLL: yes, GUI: yes, arch: x86, python3: stable, coverage: yes }
|
||||
- { features: HUGE, toolchain: msvc, VIMDLL: no, GUI: yes, arch: x86 }
|
||||
- { features: HUGE, toolchain: mingw, VIMDLL: yes, GUI: no, arch: x64, coverage: yes }
|
||||
- { features: HUGE, toolchain: msvc, VIMDLL: no, GUI: no, arch: x64, ttytype: conpty }
|
||||
- { features: NORMAL, toolchain: msvc, VIMDLL: yes, GUI: no, arch: x86 }
|
||||
- { features: NORMAL, toolchain: mingw, VIMDLL: no, GUI: yes, arch: x64 }
|
||||
- { features: TINY, toolchain: msvc, VIMDLL: yes, GUI: yes, arch: x64 }
|
||||
@@ -535,8 +536,6 @@ jobs:
|
||||
# Show Windows version
|
||||
cmd /c ver
|
||||
|
||||
git config --global core.autocrlf input
|
||||
|
||||
if ${{ matrix.arch == 'x64' }}; then
|
||||
cygreg=registry
|
||||
pyreg=
|
||||
@@ -616,11 +615,13 @@ jobs:
|
||||
call :downloadfile %LUA${{ env.BITS }}_URL% downloads\lua.zip
|
||||
7z x downloads\lua.zip -o%LUA_DIR% > nul || exit 1
|
||||
|
||||
echo %COL_GREEN%Download winpty%COL_RESET%
|
||||
call :downloadfile %WINPTY_URL% downloads\winpty.zip
|
||||
7z x -y downloads\winpty.zip -oD:\winpty > nul || exit 1
|
||||
copy /Y D:\winpty\%WARCH%\bin\winpty.dll src\winpty%BITS%.dll
|
||||
copy /Y D:\winpty\%WARCH%\bin\winpty-agent.exe src\
|
||||
if not "${{ matrix.ttytype }}" == "conpty" (
|
||||
echo %COL_GREEN%Download winpty%COL_RESET%
|
||||
call :downloadfile %WINPTY_URL% downloads\winpty.zip
|
||||
7z x -y downloads\winpty.zip -oD:\winpty > nul || exit 1
|
||||
copy /Y D:\winpty\%WARCH%\bin\winpty.dll src\winpty%BITS%.dll
|
||||
copy /Y D:\winpty\%WARCH%\bin\winpty-agent.exe src\
|
||||
)
|
||||
|
||||
echo %COL_GREEN%Download libsodium%COL_RESET%
|
||||
if "${{ matrix.toolchain }}"=="msvc" (
|
||||
|
||||
@@ -12,10 +12,10 @@ A pull request has the advantage that it will trigger the Continuous
|
||||
Integration tests, you will be warned of problems (you can ignore the coverage
|
||||
warning, it's noisy).
|
||||
|
||||
Please consider adding a test. All new functionality should be tested and bug
|
||||
fixes should be tested for regressions: the test should fail before the fix and
|
||||
pass after the fix. Look through recent patches for examples and find help
|
||||
with ":help testing". The tests are located under "src/testdir".
|
||||
Please always add a test, if possible. All new functionality should be tested
|
||||
and bug fixes should be tested for regressions: the test should fail before the
|
||||
fix and pass after the fix. Look through recent patches for examples and find
|
||||
help with ":help testing". The tests are located under "src/testdir".
|
||||
|
||||
Contributions will be distributed with Vim under the Vim license. Providing a
|
||||
change to be included implies that you agree with this and your contribution
|
||||
@@ -46,6 +46,15 @@ When merging PRs into Vim, the current maintainer @chrisbra usually adds missing
|
||||
anybody that explicitly *ACK*s a pull request as a statement that those
|
||||
approvers are happy with that particular change.
|
||||
|
||||
## Using AI
|
||||
|
||||
When using AI for contributions, please disclose this. Any AI-generated code
|
||||
must follow the Vim code style. In particular, [test_codestyle.vim][18]
|
||||
must not report any failures. Check the CI output for any test failures.
|
||||
|
||||
Ensure that changes are properly tested. Do not submit a single PR that
|
||||
addresses multiple unrelated issues.
|
||||
|
||||
# Reporting issues
|
||||
|
||||
We use GitHub [issues][17], but that is not a requirement. Writing to the Vim
|
||||
@@ -160,3 +169,4 @@ mailing list. For other questions please use the [Vi Stack Exchange][8] website,
|
||||
[15]: https://en.wikipedia.org/wiki/Developer_Certificate_of_Origin
|
||||
[16]: https://github.com/vim/vim/blob/master/runtime/doc/helphelp.txt
|
||||
[17]: https://github.com/vim/vim/issues
|
||||
[18]: https://github.com/vim/vim/blob/master/src/testdir/test_codestyle.vim
|
||||
|
||||
13
README.md
13
README.md
@@ -1,16 +1,3 @@
|
||||
<div align="center" markdown="1">
|
||||
<sup>Special thanks for supporting Vim by donating to the <a href="https://iccf-holland.org/">ICCF</a>:</sup>
|
||||
<br>
|
||||
<br>
|
||||
<a href="https://go.warp.dev/vim">
|
||||
<img alt="Warp sponsorship" width="400" src="https://raw.githubusercontent.com/warpdotdev/brand-assets/refs/heads/main/Github/Sponsor/Warp-Github-LG-03.png">
|
||||
</a>
|
||||
|
||||
### [Warp, built for coding with multiple AI agents.](https://www.warp.dev/vim)
|
||||
[Available for MacOS, Linux, & Windows](https://www.warp.dev/vim)<br>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
# [](https://www.vim.org)
|
||||
|
||||
[](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Werror -Wno-deprecated-declarations/
|
||||
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function -Wno-shadow/
|
||||
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function -Wno-strict-prototypes -Wno-shadow/
|
||||
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter -Wno-strict-prototypes/
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
Примечание. Данный текст перевода лицензии Vim предоставляется с целью
|
||||
ознакомления и не является юридически значимым. Переводчик не несёт
|
||||
ответственности за возможные неточности и ошибки при переводе лицензии.
|
||||
Единственно юридически значимым является текст лицензии Vim на английском языке.
|
||||
|
||||
ЛИЦЕНЗИЯ VIM
|
||||
|
||||
I) Неизменённые копии программы Vim могут распространяться без ограничения
|
||||
@@ -29,15 +34,15 @@ II) Изменённую (или дополненную) версию прогр
|
||||
будут распространяться на условиях настоящей лицензии или более
|
||||
поздней её версии. Лица, в данное время являющиеся ответственными
|
||||
за разработку, указаны в перечне, размещённом по адресу:
|
||||
https://github.com/orgs/vim/people. В случае изменения этой
|
||||
информации, актуальные данные будут опубликованы на
|
||||
соответствующих ресурсах (вероятнее всего по интернет‐адресам
|
||||
vim.sf.net, www.vim.org и/или comp.editors). В случае полной
|
||||
невозможности установить контакт с ответственным разработчиком,
|
||||
обязательства по отправке изменений утрачивают силу. После
|
||||
передачи подтверждения о получении изменений от ответственного
|
||||
разработчика, необходимость в повторной отправке копии изменённой
|
||||
программы Vim неприменима.
|
||||
https://github.com/orgs/vim/people.
|
||||
При изменении этой информации, актуальные данные будут
|
||||
опубликованы на соответствующих ресурсах (вероятнее всего
|
||||
по интернет‐адресам vim.sf.net, www.vim.org и/или comp.editors).
|
||||
В случае полной невозможности связаться с ответственным
|
||||
разработчиком, обязательства по отправке изменений утрачивают
|
||||
силу. После передачи подтверждения о получении изменений
|
||||
от ответственного разработчика, необходимость в повторной
|
||||
отправке копии изменённой программы Vim неприменима.
|
||||
b) Если лицом получена изменённая версия программа Vim,
|
||||
распространяющаяся на условиях, указанных в ч. II) п. 2) пп. а)
|
||||
допускается дальнейшее её распространение этим лицом без внесения
|
||||
|
||||
@@ -1,52 +1,60 @@
|
||||
VIM 使用许可协议
|
||||
注意: 本译文仅供参考。若因译文错漏引发任何问题,译者概不承担责任。VIM 许可证的
|
||||
完整英文版本为唯一法律依据。如有任何疑问,以英文原文为准。
|
||||
|
||||
I) 任何人均可不受限制地分发未经修改的 Vim 软件完整副本,但须在该等副本中包含本
|
||||
许可协议全文。您亦可分发未经修改的 Vim 软件组成部分,该等分发行为同样不受限
|
||||
制,惟仍须包含本许可协议全文。您还可随附基于未经修改的 Vim 源代码编译而成的
|
||||
可执行文件、您自行编写的使用范例以及 Vim 脚本文件。
|
||||
VIM 许可证
|
||||
|
||||
II) 在同时满足下列四项条件的前提下,(或扩展)的 Vim 软件版本(包括可执行文件、
|
||||
源代码或二者兼具):
|
||||
1) 必须完整包含未经任何改动的本许可协议文本。
|
||||
2) 经修改的 Vim 软件必须通过以下五种方式之一进行分发:
|
||||
a) 如您对 Vim 软件自行实施修改,必须在分发材料中明确标注有效的联系方式。
|
||||
当 Vim 维护者以任何形式向您索要您所分发的修改版副本时,您必须无偿向该
|
||||
维护者提供全部修改内容(含源代码)。维护者保留将您的修改成果纳入 Vim
|
||||
官方版本的权利。维护者将如何处置您的修改成果以及该等成果遵循何种许可协
|
||||
议进行分发,均属可协商事项。若双方未达成特别约定,则您的修改内容自动适
|
||||
用本协议或其后续版本。当前维护团队名单载于:https://github.com/orgs/vim/people。
|
||||
若前述信息发生变更,将通过适当渠道(通常为 vim.sf.net、www.vim.org 及/
|
||||
或 comp.editors)予以公告。当客观上完全无法联系到维护者时,您向其提交
|
||||
修改成果的义务即告终止。维护者确认收到修改成果后,您无需重复提交。
|
||||
b) 如您获得依据本条第 a) 款方式分发的修改版 Vim,可依照 I) 之规定继续分发
|
||||
其未经改动的版本。若您在该版本基础上实施新的修改,则 a) 款相关规定对该
|
||||
等新增修改同样适用。
|
||||
c) 在您分发的每一份修改版 Vim 副本中,均需提供所有修改内容,包括源代码。
|
||||
可采取上下文差异补丁等形式提供。您可自主选择适用于新增代码的许可协议。
|
||||
该等修改内容及其所附许可协议不得限制其他使用者对 Vim 官方版本进行自主
|
||||
修改。
|
||||
d) 若您持有的修改版 Vim 包含符合本条第 c) 款特征的修改内容,在同时满足下
|
||||
列三项条件时,可不提供修改部分的源代码进行分发:
|
||||
- 适用于该修改内容的许可协议明确允许您无偿且无限制地向 Vim 维护者分发
|
||||
该修改,并允许维护者无偿且无限制地将其纳入 Vim 官方版本;
|
||||
- 您需自最后一次分发对应修改版 Vim 之日起,将修改内容至少保存三年。在
|
||||
此期间,若维护者或任何从您处获得该修改版的人员向您索要修改内容,您必
|
||||
须及时提供;
|
||||
- 您必须在分发材料中明确标注有效的联系方式。该联系方式自最后一次分发对
|
||||
应的修改版 Vim 后至少三年内保持有效,并应尽可能长期维持。
|
||||
e) 若 GNU 通用公共许可证(GPL)适用于修改内容,您可依据 GNU GPL 第二版或
|
||||
其任何后续版本的规定分发修改后的 Vim 软件。
|
||||
3) 必须至少在 ":version" 命令输出界面及软件启动画面中添加显著声明,以确保修
|
||||
改版 Vim 的用户能够知悉该软件已被修改。依据本条第 2 款 e) 项规定进行分发
|
||||
时,仅在所添加声明不与修改内容所适用许可协议相冲突的前提下,方须履行此项
|
||||
声明添加义务。
|
||||
4) 本条第 2 款 a) 项与 d) 项要求的联系方式不得被删除或篡改,但联系人本人可对
|
||||
其进行修正更新。
|
||||
I) 可以任意发布没有修改的 Vim 的拷贝,但是必须保证包含本许可证。您也可以发布
|
||||
未经修改的部分 Vim,同样也必须包含这份许可证。发布由未经修改的 Vim 源代码
|
||||
所编译出的 Vim 可执行文件,外加您自己的应用实例和 Vim 脚本也是允许的。
|
||||
|
||||
III) 如果您分发修改版的 Vim,采用本协议作为其修改内容的许可依据,并将其(包括源
|
||||
代码)提供给维护者。首选方式是通过电子邮件或将文件上传至服务器并通过电子邮
|
||||
件发送 URL 地址。如果修改量较小(例如,修改过的 Makefile),通过电子邮件发
|
||||
送上下文差异补丁即可。应使用的电子邮件地址为 <maintainer@vim.org>。
|
||||
II) 在满足以下全部四个条件的前提下,您可以发布经过修改 (或扩充) 的 Vim 版本,
|
||||
包括可执行文件 和/或 源代码:
|
||||
1) 本许可证必须包含在内,并且不能被修改。
|
||||
2) 经过修改的 Vim 必须以下述五种方式之一发布:
|
||||
a) 如果您本人对 Vim 做了改动,您必须在发布版本里清楚地说明如何与您联系。
|
||||
当 Vim 的维护者 (以任何方式) 向您索取您所发布的 Vim 时,您必须把所做
|
||||
的改动包括源代码无偿地提供出来。维护者保留把这些改动加入 Vim 正式版本
|
||||
的权利。至于维护者怎样处理这些改动,以及用什么许可证发布,可以协商。
|
||||
如果没有协商,那么,本许可证,或者它更新的版本,同样适用于您做出的改
|
||||
动。Vim 现在的几位维护者可见:
|
||||
https://github.com/orgs/vim/people
|
||||
如果维护者发生变动,会在合适的地方 (很可能是 vim.sf.net、www.vim.org
|
||||
和/或 comp.editors) 公布,当完全不能与维护者联系时,发送变更的约定自
|
||||
动终止。一旦维护者确认收到了您所做的修改,您就不必再次发送了。
|
||||
|
||||
IV) 严禁从 Vim 源代码及其组成部分或任何修改版本的分发材料中移除本许可协议。您有
|
||||
权选择将本协议适用于既往发布的 Vim 版本,以替代其原始随附的许可协议。
|
||||
b) 如果您得到的是一个修改过的 Vim,并且它是在条件 a) 下发布的,那么您可
|
||||
以不加改动地在条件 I) 下发布它;如果您又做了额外的改动,则这些改动受
|
||||
到 a) 款条文的约束。
|
||||
|
||||
c) 在您发布的经过修改的 Vim 的每一份拷贝里,提供所有的变更部分,包括源代
|
||||
码。提供的形式可以采用上下文风格的差异比较记录 (context diff)。您可以
|
||||
为添加的新代码选择许可证,但是这些更改和为其选择的许可证不能限制他人
|
||||
对 Vim 正式版本作出自己的改动。
|
||||
|
||||
d) 在满足以下全部三个条件的前提下,您可以继续发布带有条件 c) 所提及之变
|
||||
更的经过修改的 Vim,而不必在发布时提供更改部分的源代码:
|
||||
- 这些变更所附带的许可证允许您把这些变更无偿地并且没有任何限制地提供
|
||||
给 Vim 的维护者,而且允许 Vim 的维护者无偿地并且没有任何限制地把这
|
||||
些更改加入到 Vim 的正式版本中。
|
||||
- 从您最后一次发布更改的 Vim 之日起,您要保存这些改动至少三年时间。在
|
||||
这期间,维护者或别人 (以任何方式) 向您要求提供这些变更时,您必须提
|
||||
供给他。
|
||||
- 您要在发布版本中清楚地说明如何与您联系,这个联系方式必须保证自最后
|
||||
一次发布相应的经过修改的 Vim 之日起至少三年有效,或尽可能长。
|
||||
e) 当这些变更以 GPL (GNU General Public License,GNU 通用公共许可证) 发
|
||||
布时,您可以在 GPL 版本 2,或更高版本的 GPL 下发布修改过的 Vim。
|
||||
3) 必须添加一条改动的信息。至少要放在 "version" 命令的输出和启动画面里,好
|
||||
让用户知道自己用的是一个修改过的 Vim。当以 2)e) 条件发布时,只有不与变
|
||||
更适用的许可证冲突,这个信息的添加才是必要的。
|
||||
4) 在 2)a) 和 2)d) 条件里要求的联系方式不能随便更改或删除,除非是作者自己
|
||||
作出的更正。
|
||||
|
||||
III) 如果您发布一个更改过的 Vim,强烈建议您对变更部分使用 Vim 的许可证,并且对
|
||||
维护者提供变更部分并开放源代码。最好的方式是通过电子邮件或者把文件放到服
|
||||
务器上,通过电子邮件传送 URL。如果只修改了很少的部分 (例如,只是一个修改
|
||||
过的 Makefile),那么传送一个上下文风格的差异比较记录 (context diff) 就可
|
||||
以了。电子邮件的地址是 <maintainer@vim.org>
|
||||
|
||||
IV) 不允许从 Vim 的源代码的发行版本或其中部分的源代码里删除本许可证,即使来自
|
||||
更改过的版本也是如此。您可能想用这份许可证代替以前版本的 Vim 里的许可证,
|
||||
这可以由您自行决定。
|
||||
|
||||
21
runtime/autoload/dist/ft.vim
vendored
21
runtime/autoload/dist/ft.vim
vendored
@@ -3,7 +3,7 @@ vim9script
|
||||
# Vim functions for file type detection
|
||||
#
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2025 Dec 14
|
||||
# Last Change: 2026 Jan 06
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
# These functions are moved here from runtime/filetype.vim to make startup
|
||||
@@ -1746,7 +1746,7 @@ const ft_from_ext = {
|
||||
"bst": "bst",
|
||||
# Bicep
|
||||
"bicep": "bicep",
|
||||
"bicepparam": "bicep",
|
||||
"bicepparam": "bicep-params",
|
||||
# BIND zone
|
||||
"zone": "bindzone",
|
||||
# Blank
|
||||
@@ -1876,6 +1876,9 @@ const ft_from_ext = {
|
||||
"elv": "elvish",
|
||||
# Faust
|
||||
"lib": "faust",
|
||||
# Fennel
|
||||
"fnl": "fennel",
|
||||
"fnlm": "fennel",
|
||||
# Libreoffice config files
|
||||
"xcu": "xml",
|
||||
"xlb": "xml",
|
||||
@@ -1914,6 +1917,9 @@ const ft_from_ext = {
|
||||
# Diff files
|
||||
"diff": "diff",
|
||||
"rej": "diff",
|
||||
# Djot
|
||||
"dj": "djot",
|
||||
"djot": "djot",
|
||||
# DOT
|
||||
"dot": "dot",
|
||||
"gv": "dot",
|
||||
@@ -1976,6 +1982,8 @@ const ft_from_ext = {
|
||||
"fish": "fish",
|
||||
# Flix
|
||||
"flix": "flix",
|
||||
# Fluent
|
||||
"ftl": "fluent",
|
||||
# Focus Executable
|
||||
"fex": "focexec",
|
||||
"focexec": "focexec",
|
||||
@@ -2118,6 +2126,8 @@ const ft_from_ext = {
|
||||
"tmpl": "template",
|
||||
# Hurl
|
||||
"hurl": "hurl",
|
||||
# Hylo
|
||||
"hylo": "hylo",
|
||||
# Hyper Builder
|
||||
"hb": "hb",
|
||||
# Httest
|
||||
@@ -2227,6 +2237,10 @@ const ft_from_ext = {
|
||||
"k": "kwt",
|
||||
# Kivy
|
||||
"kv": "kivy",
|
||||
# Koka
|
||||
"kk": "koka",
|
||||
# Kos
|
||||
"kos": "kos",
|
||||
# Kotlin
|
||||
"kt": "kotlin",
|
||||
"ktm": "kotlin",
|
||||
@@ -2359,6 +2373,8 @@ const ft_from_ext = {
|
||||
# N1QL
|
||||
"n1ql": "n1ql",
|
||||
"nql": "n1ql",
|
||||
# Nickel
|
||||
"ncl": "nickel",
|
||||
# Nim file
|
||||
"nim": "nim",
|
||||
"nims": "nim",
|
||||
@@ -3000,6 +3016,7 @@ const ft_from_ext = {
|
||||
"usd": "usd",
|
||||
# Rofi stylesheet
|
||||
"rasi": "rasi",
|
||||
"rasinc": "rasi",
|
||||
# Zsh module
|
||||
# mdd: https://github.com/zsh-users/zsh/blob/57248b88830ce56adc243a40c7773fb3825cab34/Etc/zsh-development-guide#L285-L288
|
||||
# mdh, pro: https://github.com/zsh-users/zsh/blob/57248b88830ce56adc243a40c7773fb3825cab34/Etc/zsh-development-guide#L268-L271
|
||||
|
||||
6
runtime/autoload/dist/script.vim
vendored
6
runtime/autoload/dist/script.vim
vendored
@@ -4,7 +4,7 @@ vim9script
|
||||
# Invoked from "scripts.vim" in 'runtimepath'
|
||||
#
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2025 Aug 09
|
||||
# Last Change: 2025 Dec 22
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
export def DetectFiletype()
|
||||
@@ -233,6 +233,10 @@ export def Exe2filetype(name: string, line1: string): string
|
||||
elseif name =~ '^execlineb\>'
|
||||
return 'execline'
|
||||
|
||||
# Bpftrace
|
||||
elseif name =~ '^bpftrace\>'
|
||||
return 'bpftrace'
|
||||
|
||||
# Vim
|
||||
elseif name =~ '^vim\>'
|
||||
return 'vim'
|
||||
|
||||
24
runtime/autoload/dist/vim9.vim
vendored
24
runtime/autoload/dist/vim9.vim
vendored
@@ -3,7 +3,7 @@ vim9script
|
||||
# Vim runtime support library
|
||||
#
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2025 Aug 15
|
||||
# Last Change: 2025 Dec 21
|
||||
|
||||
export def IsSafeExecutable(filetype: string, executable: string): bool
|
||||
if empty(exepath(executable))
|
||||
@@ -60,15 +60,19 @@ if has('unix')
|
||||
enddef
|
||||
else
|
||||
export def Launch(args: string)
|
||||
const fork = has('gui_running') ? '' : '&'
|
||||
const fork = has('gui_running') ? '&' : ''
|
||||
execute $':silent ! nohup {args} {Redir()} {fork}' | redraw!
|
||||
enddef
|
||||
endif
|
||||
elseif has('win32')
|
||||
export def Launch(args: string)
|
||||
const shell = (&shell =~? '\<cmd\.exe\>') ? '' : 'cmd.exe /c'
|
||||
const quotes = empty(shell) ? '' : '""'
|
||||
execute $'silent ! {shell} start {quotes} /b {args} {Redir()}' | redraw!
|
||||
try
|
||||
execute ':silent !start' args | redraw!
|
||||
catch /^Vim(!):E371:/
|
||||
echohl ErrorMsg
|
||||
echom "dist#vim9#Launch(): can not start" args
|
||||
echohl None
|
||||
endtry
|
||||
enddef
|
||||
else
|
||||
export def Launch(dummy: string)
|
||||
@@ -81,7 +85,10 @@ var os_viewer = null_string
|
||||
if has('win32unix')
|
||||
# (cyg)start suffices
|
||||
os_viewer = ''
|
||||
# Windows / WSL
|
||||
# Windows
|
||||
elseif has('win32')
|
||||
os_viewer = '' # Use :!start
|
||||
# WSL
|
||||
elseif executable('explorer.exe')
|
||||
os_viewer = 'explorer.exe'
|
||||
# Linux / BSD
|
||||
@@ -126,6 +133,11 @@ export def Open(file: string)
|
||||
&shellslash = false
|
||||
defer setbufvar('%', '&shellslash', true)
|
||||
endif
|
||||
if &shell == 'pwsh' || &shell == 'powershell'
|
||||
const shell = &shell
|
||||
setlocal shell&
|
||||
defer setbufvar('%', '&shell', shell)
|
||||
endif
|
||||
Launch($"{Viewer()} {shellescape(file, 1)}")
|
||||
enddef
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
" 2024 Nov 12 by Vim Project: fix problems on Windows (#16036)
|
||||
" 2025 Feb 28 by Vim Project: add support for bzip3 (#16755)
|
||||
" 2025 May 11 by Vim Project: check network connectivity (#17249)
|
||||
" 2025 Dec 21 by Vim Project: make the wget check more robust (#18987)
|
||||
" }}}
|
||||
"
|
||||
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
|
||||
@@ -58,7 +59,10 @@ endif
|
||||
|
||||
" wget vs curl {{{2
|
||||
if !exists("g:GetLatestVimScripts_wget")
|
||||
if executable("wget")
|
||||
if executable("wget.exe")
|
||||
" enforce extension: windows powershell desktop version has a wget alias that hides wget.exe
|
||||
let g:GetLatestVimScripts_wget= "wget.exe"
|
||||
elseif executable("wget")
|
||||
let g:GetLatestVimScripts_wget= "wget"
|
||||
elseif executable("curl.exe")
|
||||
" enforce extension: windows powershell desktop version has a curl alias that hides curl.exe
|
||||
@@ -73,7 +77,7 @@ endif
|
||||
|
||||
" options that wget and curl require:
|
||||
if !exists("g:GetLatestVimScripts_options")
|
||||
if g:GetLatestVimScripts_wget == "wget"
|
||||
if g:GetLatestVimScripts_wget =~ "wget"
|
||||
let g:GetLatestVimScripts_options= "-q -O"
|
||||
elseif g:GetLatestVimScripts_wget =~ "curl"
|
||||
let g:GetLatestVimScripts_options= "-s -o"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Language: Ada (GNAT)
|
||||
" $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $
|
||||
" Copyright: Copyright (C) 2006 Martin Krischik
|
||||
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>k
|
||||
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>
|
||||
" Ned Okie <nokie@radford.edu>
|
||||
" $Author: krischik $
|
||||
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" Vim plugin for formatting XML
|
||||
" Last Change: 2020 Jan 06
|
||||
" Last Change: 2023 March 15th
|
||||
" Version: 0.3
|
||||
" Author: Christian Brabandt <cb@256bit.org>
|
||||
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
|
||||
@@ -37,13 +37,17 @@ func! xmlformat#Format() abort
|
||||
" Keep empty input lines?
|
||||
if empty(line)
|
||||
call add(result, '')
|
||||
let current += 1
|
||||
continue
|
||||
elseif line !~# '<[/]\?[^>]*>'
|
||||
let nextmatch = match(list, '<[/]\?[^>]*>', current)
|
||||
if nextmatch > -1
|
||||
let line .= ' '. join(list[(current + 1):(nextmatch-1)], " ")
|
||||
call remove(list, current+1, nextmatch-1)
|
||||
let nextmatch = match(list, '^\s*$\|<[/]\?[^>]*>', current)
|
||||
if nextmatch > -1
|
||||
let lineEnd = nextmatch
|
||||
else
|
||||
let lineEnd = len(list)
|
||||
endif
|
||||
let line .= ' '. join(list[(current + 1):(lineEnd-1)], " ")
|
||||
call remove(list, current+1, lineEnd-1)
|
||||
endif
|
||||
" split on `>`, but don't split on very first opening <
|
||||
" this means, items can be like ['<tag>', 'tag content</tag>']
|
||||
@@ -79,9 +83,13 @@ func! xmlformat#Format() abort
|
||||
if s:EndTag(t[1])
|
||||
call s:DecreaseIndent()
|
||||
endif
|
||||
"for y in t[1:]
|
||||
let result+=s:FormatContent(t[1:])
|
||||
"endfor
|
||||
let result+=s:FormatContent(t[1:])
|
||||
if s:IsTag(t[1])
|
||||
let lastitem = t[1]
|
||||
continue
|
||||
endif
|
||||
elseif s:IsComment(item)
|
||||
let result+=s:FormatContent([item])
|
||||
else
|
||||
call add(result, s:Indent(item))
|
||||
endif
|
||||
@@ -94,7 +102,7 @@ func! xmlformat#Format() abort
|
||||
if !empty(result)
|
||||
let lastprevline = getline(v:lnum + count_orig)
|
||||
let delete_lastline = v:lnum + count_orig - 1 == line('$')
|
||||
exe v:lnum. ",". (v:lnum + count_orig - 1). 'd'
|
||||
exe 'silent ' .. v:lnum. ",". (v:lnum + count_orig - 1). 'd'
|
||||
call append(v:lnum - 1, result)
|
||||
" Might need to remove the last line, if it became empty because of the
|
||||
" append() call
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
" 2025 Mar 11 by Vim Project: handle filenames with leading '-' correctly
|
||||
" 2025 Jul 12 by Vim Project: drop ../ on write to prevent path traversal attacks
|
||||
" 2025 Sep 22 by Vim Project: support PowerShell Core
|
||||
" 2025 Dec 20 by Vim Project: use :lcd instead of :cd
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
@@ -371,7 +372,7 @@ fun! zip#Write(fname)
|
||||
call mkdir(tmpdir,"p")
|
||||
|
||||
" attempt to change to the indicated directory
|
||||
if s:ChgDir(tmpdir,s:ERROR,"(zip#Write) cannot cd to temporary directory")
|
||||
if s:ChgDir(tmpdir,s:ERROR,"(zip#Write) cannot lcd to temporary directory")
|
||||
return
|
||||
endif
|
||||
|
||||
@@ -380,7 +381,7 @@ fun! zip#Write(fname)
|
||||
call delete("_ZIPVIM_", "rf")
|
||||
endif
|
||||
call mkdir("_ZIPVIM_")
|
||||
cd _ZIPVIM_
|
||||
lcd _ZIPVIM_
|
||||
|
||||
if has("unix")
|
||||
let zipfile = substitute(a:fname,'zipfile://\(.\{-}\)::[^\\].*$','\1','')
|
||||
@@ -455,7 +456,7 @@ fun! zip#Write(fname)
|
||||
endif
|
||||
|
||||
" cleanup and restore current directory
|
||||
cd ..
|
||||
lcd ..
|
||||
call delete("_ZIPVIM_", "rf")
|
||||
call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
|
||||
call delete(tmpdir, "rf")
|
||||
@@ -536,7 +537,7 @@ endfun
|
||||
" s:ChgDir: {{{2
|
||||
fun! s:ChgDir(newdir,errlvl,errmsg)
|
||||
try
|
||||
exe "cd ".fnameescape(a:newdir)
|
||||
exe "lcd ".fnameescape(a:newdir)
|
||||
catch /^Vim\%((\a\+)\)\=:E344/
|
||||
redraw!
|
||||
if a:errlvl == s:NOTE
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Language: Ada (GNAT)
|
||||
" $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $
|
||||
" Copyright: Copyright (C) 2006 Martin Krischik
|
||||
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>k
|
||||
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>
|
||||
" Ned Okie <nokie@radford.edu>
|
||||
" $Author: krischik $
|
||||
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Perl syntax checks (perl -Wc)
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Author: Christian J. Robinson <heptite@gmail.com>
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim compiler file
|
||||
" Compiler: perlcritic
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Author: Doug Kearns <dougkearns@gmail.com>
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim compiler file
|
||||
" Compiler: podchecker
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Author: Doug Kearns <dougkearns@gmail.com>
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
|
||||
25
runtime/compiler/pyright.vim
Normal file
25
runtime/compiler/pyright.vim
Normal file
@@ -0,0 +1,25 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Pyright (Python Type Checker)
|
||||
" Maintainer: @konfekt
|
||||
" Last Change: 2025 Dec 26
|
||||
|
||||
if exists("current_compiler") | finish | endif
|
||||
let current_compiler = "pyright"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" CompilerSet makeprg=pyright
|
||||
" CompilerSet makeprg=basedpyright
|
||||
exe 'CompilerSet makeprg=' .. escape(
|
||||
\ get(b:, 'pyright_makeprg', get(g:, 'pyright_makeprg', 'pyright')),
|
||||
\ ' \|"')
|
||||
CompilerSet errorformat=
|
||||
\%E%f:%l:%c\ -\ error:\ %m,
|
||||
\%W%f:%l:%c\ -\ warning:\ %m,
|
||||
\%N%f:%l:%c\ -\ note:\ %m,
|
||||
\%C[ \t]\ %.%#,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -4,6 +4,7 @@
|
||||
" Last Change: 2024 Nov 07
|
||||
" 2024 Nov 19 by the Vim Project (properly escape makeprg setting)
|
||||
" 2025 Nov 06 by the Vim Project (do not set buffer-local makeprg)
|
||||
" 2024 Dec 24 by the Vim Project (mute Found messages)
|
||||
|
||||
if exists("current_compiler") | finish | endif
|
||||
let current_compiler = "ruff"
|
||||
@@ -16,6 +17,7 @@ exe 'CompilerSet makeprg=' .. escape('ruff check --output-format=concise '
|
||||
\ ..get(b:, 'ruff_makeprg_params', get(g:, 'ruff_makeprg_params', '--preview')),
|
||||
\ ' \|"')
|
||||
CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,%f:%l:%c\ -\ %m,%f:
|
||||
CompilerSet errorformat+=%-GFound\ %.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
20
runtime/compiler/ty.vim
Normal file
20
runtime/compiler/ty.vim
Normal file
@@ -0,0 +1,20 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Ty (Python Type Checker)
|
||||
" Maintainer: @konfekt
|
||||
" Last Change: 2024 Dec 24
|
||||
|
||||
if exists("current_compiler") | finish | endif
|
||||
let current_compiler = "ty"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" CompilerSet makeprg=ty
|
||||
exe 'CompilerSet makeprg=' .. escape(
|
||||
\ get(b:, 'ty_makeprg', get(g:, 'ty_makeprg', 'ty check --no-progress --color=never'))
|
||||
\ ..' --output-format=concise', ' \|"')
|
||||
CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,%f:%l:%c\ -\ %m,%f:
|
||||
CompilerSet errorformat+=%-GFound\ %.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2025 Dec 13
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2026 Jan 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -23,9 +23,11 @@ Use CTRL-] on the function name to jump to the full explanation.
|
||||
|
||||
USAGE RESULT DESCRIPTION ~
|
||||
|
||||
abs({expr}) Float or Number absolute value of {expr}
|
||||
abs({expr}) Float/Number
|
||||
absolute value of {expr}
|
||||
acos({expr}) Float arc cosine of {expr}
|
||||
add({object}, {item}) List/Blob append {item} to {object}
|
||||
add({object}, {item}) List/Blob
|
||||
append {item} to {object}
|
||||
and({expr}, {expr}) Number bitwise AND
|
||||
append({lnum}, {text}) Number append {text} below line {lnum}
|
||||
appendbufline({buf}, {lnum}, {text})
|
||||
@@ -33,7 +35,8 @@ appendbufline({buf}, {lnum}, {text})
|
||||
in buffer {buf}
|
||||
argc([{winid}]) Number number of files in the argument list
|
||||
argidx() Number current index in the argument list
|
||||
arglistid([{winnr} [, {tabnr}]]) Number argument list id
|
||||
arglistid([{winnr} [, {tabnr}]])
|
||||
Number argument list id
|
||||
argv({nr} [, {winid}]) String {nr} entry of the argument list
|
||||
argv([-1, {winid}]) List the argument list
|
||||
asin({expr}) Float arc sine of {expr}
|
||||
@@ -43,7 +46,7 @@ assert_equal({exp}, {act} [, {msg}])
|
||||
assert_equalfile({fname-one}, {fname-two} [, {msg}])
|
||||
Number assert file contents are equal
|
||||
assert_exception({error} [, {msg}])
|
||||
Number assert {error} is in v:exception
|
||||
Number assert {error} is in |v:exception|
|
||||
assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]])
|
||||
Number assert {cmd} fails
|
||||
assert_false({actual} [, {msg}])
|
||||
@@ -81,8 +84,8 @@ bufexists({buf}) Number |TRUE| if buffer {buf} exists
|
||||
buflisted({buf}) Number |TRUE| if buffer {buf} is listed
|
||||
bufload({buf}) Number load buffer {buf} if not loaded yet
|
||||
bufloaded({buf}) Number |TRUE| if buffer {buf} is loaded
|
||||
bufname([{buf}]) String Name of the buffer {buf}
|
||||
bufnr([{buf} [, {create}]]) Number Number of the buffer {buf}
|
||||
bufname([{buf}]) String name of the buffer {buf}
|
||||
bufnr([{buf} [, {create}]]) Number number of the buffer {buf}
|
||||
bufwinid({buf}) Number window ID of buffer {buf}
|
||||
bufwinnr({buf}) Number window number of buffer {buf}
|
||||
byte2line({byte}) Number line number at byte count {byte}
|
||||
@@ -121,7 +124,8 @@ ch_setoptions({handle}, {options})
|
||||
ch_status({handle} [, {options}])
|
||||
String status of channel {handle}
|
||||
changenr() Number current change number
|
||||
char2nr({expr} [, {utf8}]) Number ASCII/UTF-8 value of first char in {expr}
|
||||
char2nr({expr} [, {utf8}]) Number ASCII/UTF-8 value of first char in
|
||||
{expr}
|
||||
charclass({string}) Number character class of {string}
|
||||
charcol({expr} [, {winid}]) Number column number of cursor or mark
|
||||
charidx({string}, {idx} [, {countcc} [, {utf16}]])
|
||||
@@ -180,10 +184,12 @@ expand({expr} [, {nosuf} [, {list}]])
|
||||
expandcmd({string} [, {options}])
|
||||
String expand {string} like with `:edit`
|
||||
extend({expr1}, {expr2} [, {expr3}])
|
||||
List/Dict insert items of {expr2} into {expr1}
|
||||
List/Dict
|
||||
insert items of {expr2} into {expr1}
|
||||
extendnew({expr1}, {expr2} [, {expr3}])
|
||||
List/Dict like |extend()| but creates a new
|
||||
List or Dictionary
|
||||
List/Dict
|
||||
like |extend()| but creates a new List
|
||||
or Dictionary
|
||||
feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
|
||||
filecopy({from}, {to}) Number |TRUE| if copying file {from} to {to}
|
||||
worked
|
||||
@@ -194,7 +200,8 @@ filter({expr1}, {expr2}) List/Dict/Blob/String
|
||||
{expr2} is 0
|
||||
finddir({name} [, {path} [, {count}]])
|
||||
findfile({name} [, {path} [, {count}]])
|
||||
String/List find dir/file {name} in {path}
|
||||
String/List
|
||||
find dir/file {name} in {path}
|
||||
flatten({list} [, {maxdepth}]) List flatten {list} up to {maxdepth} levels
|
||||
flattennew({list} [, {maxdepth}])
|
||||
List flatten a copy of {list}
|
||||
@@ -216,7 +223,8 @@ funcref({name} [, {arglist}] [, {dict}])
|
||||
Funcref reference to function {name}
|
||||
function({name} [, {arglist}] [, {dict}])
|
||||
Funcref named reference to function {name}
|
||||
garbagecollect([{atexit}]) none free memory, breaking cyclic references
|
||||
garbagecollect([{atexit}]) none free memory, breaking cyclic
|
||||
references
|
||||
get({list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
|
||||
get({dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
|
||||
get({func}, {what}) any get property of funcref/partial {func}
|
||||
@@ -229,7 +237,7 @@ getbufvar({buf}, {varname} [, {def}])
|
||||
getcellpixels() List get character cell pixel size
|
||||
getcellwidths() List get character cell width overrides
|
||||
getchangelist([{buf}]) List list of change list items
|
||||
getchar([{expr} [, {opts}]]) Number or String
|
||||
getchar([{expr} [, {opts}]]) Number/String
|
||||
get one character from the user
|
||||
getcharmod() Number modifiers for the last typed character
|
||||
getcharpos({expr}) List position of cursor, mark, etc.
|
||||
@@ -245,7 +253,8 @@ getcmdprompt() String return the current command-line prompt
|
||||
getcmdscreenpos() Number return cursor screen position in
|
||||
command-line
|
||||
getcmdtype() String return current command-line type
|
||||
getcmdwintype() String return current command-line window type
|
||||
getcmdwintype() String return current command-line window
|
||||
type
|
||||
getcompletion({pat}, {type} [, {filtered}])
|
||||
List list of cmdline completion matches
|
||||
getcompletiontype({pat}) String return the type of the command-line
|
||||
@@ -263,7 +272,8 @@ getimstatus() Number |TRUE| if the IME status is active
|
||||
getjumplist([{winnr} [, {tabnr}]])
|
||||
List list of jump list items
|
||||
getline({lnum}) String line {lnum} of current buffer
|
||||
getline({lnum}, {end}) List lines {lnum} to {end} of current buffer
|
||||
getline({lnum}, {end}) List lines {lnum} to {end} of current
|
||||
buffer
|
||||
getloclist({nr}) List list of location list items
|
||||
getloclist({nr}, {what}) Dict get specific location list properties
|
||||
getmarklist([{buf}]) List list of global/local marks
|
||||
@@ -275,7 +285,8 @@ getpos({expr}) List position of cursor, mark, etc.
|
||||
getqflist() List list of quickfix items
|
||||
getqflist({what}) Dict get specific quickfix list properties
|
||||
getreg([{regname} [, 1 [, {list}]]])
|
||||
String or List contents of a register
|
||||
String/List
|
||||
contents of a register
|
||||
getreginfo([{regname}]) Dict information about a register
|
||||
getregion({pos1}, {pos2} [, {opts}])
|
||||
List get the text from {pos1} to {pos2}
|
||||
@@ -286,7 +297,8 @@ getscriptinfo([{opts}]) List list of sourced scripts
|
||||
getstacktrace() List get current stack trace of Vim scripts
|
||||
gettabinfo([{expr}]) List list of tab pages
|
||||
gettabvar({nr}, {varname} [, {def}])
|
||||
any variable {varname} in tab {nr} or {def}
|
||||
any variable {varname} in tab {nr} or
|
||||
{def}
|
||||
gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
|
||||
any {name} in {winnr} in tab page {tabnr}
|
||||
gettagstack([{nr}]) Dict get the tag stack of window {nr}
|
||||
@@ -305,8 +317,8 @@ globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
|
||||
has({feature} [, {check}]) Number |TRUE| if feature {feature} supported
|
||||
has_key({dict}, {key}) Number |TRUE| if {dict} has entry {key}
|
||||
haslocaldir([{winnr} [, {tabnr}]])
|
||||
Number |TRUE| if the window executed |:lcd|
|
||||
or |:tcd|
|
||||
Number |TRUE| if the window executed `:lcd` or
|
||||
`:tcd`
|
||||
hasmapto({what} [, {mode} [, {abbr}]])
|
||||
Number |TRUE| if mapping to {what} exists
|
||||
histadd({history}, {item}) Number add an item to a history
|
||||
@@ -332,9 +344,13 @@ inputdialog({prompt} [, {text} [, {cancelreturn}]])
|
||||
inputlist({textlist}) Number let the user pick from a choice list
|
||||
inputrestore() Number restore typeahead
|
||||
inputsave() Number save and clear typeahead
|
||||
inputsecret({prompt} [, {text}]) String like input() but hiding the text
|
||||
insert({object}, {item} [, {idx}]) List insert {item} in {object} [before {idx}]
|
||||
instanceof({object}, {class}) Number |TRUE| if {object} is an instance of {class}
|
||||
inputsecret({prompt} [, {text}])
|
||||
String like input() but hiding the text
|
||||
insert({object}, {item} [, {idx}])
|
||||
List insert {item} in {object}
|
||||
[before {idx}]
|
||||
instanceof({object}, {class}) Number |TRUE| if {object} is an instance of
|
||||
{class}
|
||||
interrupt() none interrupt script execution
|
||||
invert({expr}) Number bitwise invert
|
||||
isabsolutepath({path}) Number |TRUE| if {path} is an absolute path
|
||||
@@ -346,7 +362,8 @@ isnan({expr}) Number |TRUE| if {expr} is NaN
|
||||
items({expr}) List key/index-value pairs in {expr}
|
||||
job_getchannel({job}) Channel get the channel handle for {job}
|
||||
job_info([{job}]) Dict get information about {job}
|
||||
job_setoptions({job}, {options}) none set options for {job}
|
||||
job_setoptions({job}, {options})
|
||||
none set options for {job}
|
||||
job_start({command} [, {options}])
|
||||
Job start a job
|
||||
job_status({job}) String get the status of {job}
|
||||
@@ -358,9 +375,10 @@ json_decode({string}) any decode JSON
|
||||
json_encode({expr}) String encode JSON
|
||||
keys({dict}) List keys in {dict}
|
||||
keytrans({string}) String translate internal keycodes to a form
|
||||
that can be used by |:map|
|
||||
that can be used by `:map`
|
||||
len({expr}) Number the length of {expr}
|
||||
libcall({lib}, {func}, {arg}) String call {func} in library {lib} with {arg}
|
||||
libcall({lib}, {func}, {arg}) String call {func} in library {lib} with
|
||||
{arg}
|
||||
libcallnr({lib}, {func}, {arg}) Number idem, but return a Number
|
||||
line({expr} [, {winid}]) Number line nr of cursor, last line or mark
|
||||
line2byte({lnum}) Number byte count of line {lnum}
|
||||
@@ -379,7 +397,7 @@ luaeval({expr} [, {expr}]) any evaluate |Lua| expression
|
||||
map({expr1}, {expr2}) List/Dict/Blob/String
|
||||
change each item in {expr1} to {expr2}
|
||||
maparg({name} [, {mode} [, {abbr} [, {dict}]]])
|
||||
String or Dict
|
||||
String/Dict
|
||||
rhs of mapping {name} in mode {mode}
|
||||
mapcheck({name} [, {mode} [, {abbr}]])
|
||||
String check for mappings matching {name}
|
||||
@@ -394,7 +412,7 @@ matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
|
||||
Number highlight {pattern} with {group}
|
||||
matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
|
||||
Number highlight positions with {group}
|
||||
matcharg({nr}) List arguments of |:match|
|
||||
matcharg({nr}) List arguments of `:match`
|
||||
matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict})
|
||||
List all the {pat} matches in buffer {buf}
|
||||
matchdelete({id} [, {win}]) Number delete match identified by {id}
|
||||
@@ -405,7 +423,8 @@ matchfuzzy({list}, {str} [, {dict}])
|
||||
matchfuzzypos({list}, {str} [, {dict}])
|
||||
List fuzzy match {str} in {list}
|
||||
matchlist({expr}, {pat} [, {start} [, {count}]])
|
||||
List match and submatches of {pat} in {expr}
|
||||
List match and submatches of {pat} in
|
||||
{expr}
|
||||
matchstr({expr}, {pat} [, {start} [, {count}]])
|
||||
String {count}'th match of {pat} in {expr}
|
||||
matchstrlist({list}, {pat} [, {dict})
|
||||
@@ -422,11 +441,13 @@ mzeval({expr}) any evaluate |MzScheme| expression
|
||||
nextnonblank({lnum}) Number line nr of non-blank line >= {lnum}
|
||||
ngettext({single}, {plural}, {number}[, {domain}])
|
||||
String translate text based on {number}
|
||||
nr2char({expr} [, {utf8}]) String single char with ASCII/UTF-8 value {expr}
|
||||
nr2char({expr} [, {utf8}]) String single char with ASCII/UTF-8 value
|
||||
{expr}
|
||||
or({expr}, {expr}) Number bitwise OR
|
||||
pathshorten({expr} [, {len}]) String shorten directory names in a path
|
||||
perleval({expr}) any evaluate |Perl| expression
|
||||
popup_atcursor({what}, {options}) Number create popup window near the cursor
|
||||
popup_atcursor({what}, {options})
|
||||
Number create popup window near the cursor
|
||||
popup_beval({what}, {options}) Number create popup window for 'ballooneval'
|
||||
popup_clear() none close all popup windows
|
||||
popup_close({id} [, {result}]) none close popup window {id}
|
||||
@@ -446,7 +467,8 @@ popup_menu({what}, {options}) Number create a popup window used as a menu
|
||||
popup_move({id}, {options}) none set position of popup window {id}
|
||||
popup_notification({what}, {options})
|
||||
Number create a notification popup window
|
||||
popup_setbuf({id}, {buf}) Bool set the buffer for the popup window {id}
|
||||
popup_setbuf({id}, {buf}) Bool set the buffer for the popup window
|
||||
{id}
|
||||
popup_setoptions({id}, {options})
|
||||
none set options for popup window {id}
|
||||
popup_settext({id}, {text}) none set the text of popup window {id}
|
||||
@@ -456,10 +478,13 @@ preinserted() Number whether text is inserted after cursor
|
||||
prevnonblank({lnum}) Number line nr of non-blank line <= {lnum}
|
||||
printf({fmt}, {expr1}...) String format text
|
||||
prompt_getprompt({buf}) String get prompt text
|
||||
prompt_setcallback({buf}, {expr}) none set prompt callback function
|
||||
prompt_setinterrupt({buf}, {text}) none set prompt interrupt function
|
||||
prompt_setcallback({buf}, {expr})
|
||||
none set prompt callback function
|
||||
prompt_setinterrupt({buf}, {text})
|
||||
none set prompt interrupt function
|
||||
prompt_setprompt({buf}, {text}) none set prompt text
|
||||
prop_add({lnum}, {col}, {props}) none add one text property
|
||||
prop_add({lnum}, {col}, {props})
|
||||
none add one text property
|
||||
prop_add_list({props}, [[{lnum}, {col}, {end-lnum}, {end-col}], ...])
|
||||
none add multiple text properties
|
||||
prop_clear({lnum} [, {lnum-end} [, {props}]])
|
||||
@@ -527,9 +552,10 @@ round({expr}) Float round off {expr}
|
||||
rubyeval({expr}) any evaluate |Ruby| expression
|
||||
screenattr({row}, {col}) Number attribute at screen position
|
||||
screenchar({row}, {col}) Number character at screen position
|
||||
screenchars({row}, {col}) List List of characters at screen position
|
||||
screenchars({row}, {col}) List list of characters at screen position
|
||||
screencol() Number current cursor column
|
||||
screenpos({winid}, {lnum}, {col}) Dict screen row and col of a text character
|
||||
screenpos({winid}, {lnum}, {col})
|
||||
Dict screen row and col of a text character
|
||||
screenrow() Number current cursor row
|
||||
screenstring({row}, {col}) String characters at screen position
|
||||
search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])
|
||||
@@ -570,7 +596,9 @@ setqflist({list} [, {action}]) Number modify quickfix list using {list}
|
||||
setqflist({list}, {action}, {what})
|
||||
Number modify specific quickfix list props
|
||||
setreg({n}, {v} [, {opt}]) Number set register to value and type
|
||||
settabvar({nr}, {varname}, {val}) none set {varname} in tab page {nr} to {val}
|
||||
settabvar({nr}, {varname}, {val})
|
||||
none set {varname} in tab page {nr} to
|
||||
{val}
|
||||
settabwinvar({tabnr}, {winnr}, {varname}, {val})
|
||||
none set {varname} in window {winnr} in tab
|
||||
page {tabnr} to {val}
|
||||
@@ -600,7 +628,8 @@ sign_unplacelist({list}) List unplace a list of signs
|
||||
simplify({filename}) String simplify filename as much as possible
|
||||
sin({expr}) Float sine of {expr}
|
||||
sinh({expr}) Float hyperbolic sine of {expr}
|
||||
slice({expr}, {start} [, {end}]) String, List or Blob
|
||||
slice({expr}, {start} [, {end}])
|
||||
String/List/Blob
|
||||
slice of a String, List or Blob
|
||||
sort({list} [, {how} [, {dict}]])
|
||||
List sort {list}, compare with {how}
|
||||
@@ -630,7 +659,8 @@ strcharpart({str}, {start} [, {len} [, {skipcc}]])
|
||||
String {len} characters of {str} at
|
||||
character {start}
|
||||
strchars({expr} [, {skipcc}]) Number character count of the String {expr}
|
||||
strdisplaywidth({expr} [, {col}]) Number display length of the String {expr}
|
||||
strdisplaywidth({expr} [, {col}])
|
||||
Number display length of the String {expr}
|
||||
strftime({format} [, {time}]) String format time with a specified format
|
||||
strgetchar({str}, {index}) Number get char {index} from {str}
|
||||
stridx({haystack}, {needle} [, {start}])
|
||||
@@ -638,20 +668,24 @@ stridx({haystack}, {needle} [, {start}])
|
||||
string({expr}) String String representation of {expr} value
|
||||
strlen({expr}) Number length of the String {expr}
|
||||
strpart({str}, {start} [, {len} [, {chars}]])
|
||||
String {len} bytes/chars of {str} at
|
||||
byte {start}
|
||||
String {len} bytes/chars of {str} at byte
|
||||
{start}
|
||||
strptime({format}, {timestring})
|
||||
Number Convert {timestring} to unix timestamp
|
||||
Number convert {timestring} to unix timestamp
|
||||
strridx({haystack}, {needle} [, {start}])
|
||||
Number last index of {needle} in {haystack}
|
||||
strtrans({expr}) String translate string to make it printable
|
||||
strutf16len({string} [, {countcc}])
|
||||
Number number of UTF-16 code units in {string}
|
||||
strwidth({expr}) Number display cell length of the String {expr}
|
||||
submatch({nr} [, {list}]) String or List
|
||||
specific match in ":s" or substitute()
|
||||
Number number of UTF-16 code units in
|
||||
{string}
|
||||
strwidth({expr}) Number display cell length of the String
|
||||
{expr}
|
||||
submatch({nr} [, {list}]) String/List
|
||||
specific match in `:substitute` or
|
||||
substitute()
|
||||
substitute({expr}, {pat}, {sub}, {flags})
|
||||
String all {pat} in {expr} replaced with {sub}
|
||||
String all {pat} in {expr} replaced with
|
||||
{sub}
|
||||
swapfilelist() List swap files found in 'directory'
|
||||
swapinfo({fname}) Dict information about swap file {fname}
|
||||
swapname({buf}) String swap file of buffer {buf}
|
||||
@@ -660,12 +694,14 @@ synIDattr({synID}, {what} [, {mode}])
|
||||
String attribute {what} of syntax ID {synID}
|
||||
synIDtrans({synID}) Number translated syntax ID of {synID}
|
||||
synconcealed({lnum}, {col}) List info about concealing
|
||||
synstack({lnum}, {col}) List stack of syntax IDs at {lnum} and {col}
|
||||
synstack({lnum}, {col}) List stack of syntax IDs at {lnum} and
|
||||
{col}
|
||||
system({expr} [, {input}]) String output of shell command/filter {expr}
|
||||
systemlist({expr} [, {input}]) List output of shell command/filter {expr}
|
||||
tabpagebuflist([{arg}]) List list of buffer numbers in tab page
|
||||
tabpagenr([{arg}]) Number number of current or last tab page
|
||||
tabpagewinnr({tabarg} [, {arg}]) Number number of current window in tab page
|
||||
tabpagewinnr({tabarg} [, {arg}])
|
||||
Number number of current window in tab page
|
||||
tagfiles() List tags files used
|
||||
taglist({expr} [, {filename}]) List list of tags matching {expr}
|
||||
tan({expr}) Float tangent of {expr}
|
||||
@@ -695,7 +731,8 @@ term_setansicolors({buf}, {colors})
|
||||
none set ANSI palette in GUI color mode
|
||||
term_setapi({buf}, {expr}) none set |terminal-api| function name prefix
|
||||
term_setkill({buf}, {how}) none set signal to stop job in terminal
|
||||
term_setrestore({buf}, {command}) none set command to restore terminal
|
||||
term_setrestore({buf}, {command})
|
||||
none set command to restore terminal
|
||||
term_setsize({buf}, {rows}, {cols})
|
||||
none set the size of a terminal
|
||||
term_start({cmd} [, {options}]) Number open a terminal window and run a job
|
||||
@@ -735,8 +772,10 @@ timer_start({time}, {callback} [, {options}])
|
||||
Number create a timer
|
||||
timer_stop({timer}) none stop a timer
|
||||
timer_stopall() none stop all timers
|
||||
tolower({expr}) String the String {expr} switched to lowercase
|
||||
toupper({expr}) String the String {expr} switched to uppercase
|
||||
tolower({expr}) String the String {expr} switched to
|
||||
lowercase
|
||||
toupper({expr}) String the String {expr} switched to
|
||||
uppercase
|
||||
tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
|
||||
to chars in {tostr}
|
||||
trim({text} [, {mask} [, {dir}]])
|
||||
@@ -755,7 +794,7 @@ utf16idx({string}, {idx} [, {countcc} [, {charidx}]])
|
||||
Number UTF-16 index of byte {idx} in {string}
|
||||
values({dict}) List values in {dict}
|
||||
virtcol({expr} [, {list} [, {winid}])
|
||||
Number or List
|
||||
Number/List
|
||||
screen column of cursor or mark
|
||||
virtcol2col({winid}, {lnum}, {col})
|
||||
Number byte index of a character on screen
|
||||
@@ -782,7 +821,8 @@ winheight({nr}) Number height of window {nr}
|
||||
winlayout([{tabnr}]) List layout of windows in tab {tabnr}
|
||||
winline() Number window line of the cursor
|
||||
winnr([{expr}]) Number number of current window
|
||||
winrestcmd() String returns command to restore window sizes
|
||||
winrestcmd() String returns command to restore window
|
||||
sizes
|
||||
winrestview({dict}) none restore view of current window
|
||||
winsaveview() Dict save view of current window
|
||||
winwidth({nr}) Number width of window {nr}
|
||||
@@ -4839,6 +4879,11 @@ getpos({expr}) *getpos()*
|
||||
within the line. To get the character position in the line,
|
||||
use |getcharpos()|.
|
||||
|
||||
The visual marks |'<| and |'>| refer to the beginning and end
|
||||
of the visual selection relative to the buffer. Note that
|
||||
this differs from |setpos()|, where they are relative to the
|
||||
cursor position.
|
||||
|
||||
Note that for '< and '> Visual mode matters: when it is "V"
|
||||
(visual line mode) the column of '< is zero and the column of
|
||||
'> is a large number equal to |v:maxcol|.
|
||||
@@ -10112,9 +10157,14 @@ setpos({expr}, {list}) *setpos()*
|
||||
preferred column is not set. When it is present and setting a
|
||||
mark position it is not used.
|
||||
|
||||
Note that for '< and '> changing the line number may result in
|
||||
the marks to be effectively be swapped, so that '< is always
|
||||
before '>.
|
||||
Note that for |'<| and |'>| changing the line number may
|
||||
result in the marks to be effectively swapped, so that |'<| is
|
||||
always before |'>|.
|
||||
|
||||
The visual marks |'<| and |'>| refer to the beginning and end
|
||||
of the visual selection relative to the cursor position.
|
||||
Note that this differs from |getpos()|, where they are
|
||||
relative to the buffer.
|
||||
|
||||
Returns 0 when the position could be set, -1 otherwise.
|
||||
An error message is given if {expr} is invalid.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 9.1. Last change: 2025 Dec 18
|
||||
*change.txt* For Vim version 9.1. Last change: 2026 Jan 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1777,7 +1777,9 @@ l Long lines are not broken in insert mode: When a line was longer than
|
||||
automatically format it.
|
||||
*fo-m*
|
||||
m Also break at a multibyte character above 255. This is useful for
|
||||
Asian text where every character is a word on its own.
|
||||
Asian text where every character is a word on its own. Note that
|
||||
line breaks may also be added after punctuation characters such as
|
||||
colons to match the CJK linebreaking rules.
|
||||
*fo-M*
|
||||
M When joining lines, don't insert a space before or after a multibyte
|
||||
character. Overrules the 'B' flag.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 9.1. Last change: 2025 Dec 18
|
||||
*eval.txt* For Vim version 9.1. Last change: 2025 Dec 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -3718,13 +3718,16 @@ text...
|
||||
matching {pattern} is being thrown and has not yet
|
||||
been caught by a previous `:catch`. Otherwise, these
|
||||
commands are skipped.
|
||||
When {pattern} is omitted all errors are caught.
|
||||
Examples: >
|
||||
Pattern can start with "Vim({cmd})" to indicate an
|
||||
exception that occurred when executing the Ex command
|
||||
{cmd}. When {pattern} is omitted all errors are
|
||||
caught. Examples: >
|
||||
:catch /^Vim:Interrupt$/ " catch interrupts (CTRL-C)
|
||||
:catch /^Vim\%((\a\+)\)\=:E/ " catch all Vim errors
|
||||
:catch /^Vim\%((\a\+)\)\=:/ " catch errors and interrupts
|
||||
:catch /^Vim\%((\S\+)\)\=:E/ " catch all Vim errors
|
||||
:catch /^Vim\%((\S\+)\)\=:/ " catch errors and interrupts
|
||||
:catch /^Vim(write):/ " catch all errors in :write
|
||||
:catch /^Vim\%((\a\+)\)\=:E123:/ " catch error E123
|
||||
:catch /^Vim(!):/ " catch all errors in :!
|
||||
:catch /^Vim\%((\S\+)\)\=:E123:/ " catch error E123
|
||||
:catch /my-exception/ " catch user exception
|
||||
:catch /.*/ " catch everything
|
||||
:catch " same as /.*/
|
||||
@@ -5231,7 +5234,7 @@ $VIMRUNTIME/plugin/openPlugin.vim
|
||||
dist#vim9#Open(file: string) ~
|
||||
|
||||
Opens `path` with the system default handler (macOS `open`, Windows
|
||||
`explorer.exe`, Linux `xdg-open`, …). If the variable |g:Openprg| exists the
|
||||
`start`, Linux `xdg-open`, …). If the variable |g:Openprg| exists the
|
||||
string specified in the variable is used instead.
|
||||
|
||||
The |:Open| user command uses file completion for its argument.
|
||||
@@ -5284,7 +5287,7 @@ Usage: >vim
|
||||
15. Clipboard providers *clipboard-providers*
|
||||
|
||||
The clipboard provider feature allows the "+" |quoteplus| and "*" |quotestar|
|
||||
registers to be overridden by custom Vimscript functions. There can be
|
||||
registers to be overridden by custom Vim script functions. There can be
|
||||
multiple providers, and Vim chooses which one to use based on 'clipmethod'.
|
||||
|
||||
Despite the name, it should be treated separate from the clipboard
|
||||
@@ -5295,7 +5298,7 @@ clipboard registers.
|
||||
The clipboard provider feature will respect the "unnamed" and "unnamedplus"
|
||||
values in the 'clipboard' option. Any other value will be ignored.
|
||||
|
||||
*clipboard-providers-no-clipboard*
|
||||
*clipboard-providers-no-clipboard*
|
||||
If the |+clipboard| feature is not enabled, then the "+" and "*" registers
|
||||
will not be enabled/available unless |v:clipmethod| is set to a provider. If
|
||||
it is set to a provider, then the clipboard registers will be exposed despite
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_w32.txt* For Vim version 9.1. Last change: 2025 Nov 09
|
||||
*gui_w32.txt* For Vim version 9.1. Last change: 2025 Dec 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -504,4 +504,25 @@ To use the system's default title bar colors, set highlighting groups to
|
||||
hi TitleBar guibg=NONE guifg=NONE
|
||||
hi TitleBarNC guibg=NONE guifg=NONE
|
||||
<
|
||||
|
||||
Full Screen *gui-w32-fullscreen*
|
||||
|
||||
To enable fullscreen mode in the Windows GUI version of Vim, add the 's' flag
|
||||
to the 'guioptions' setting.
|
||||
|
||||
For convenience, you can define a command or mapping to toggle fullscreen mode:
|
||||
>
|
||||
command! ToggleFullscreen {
|
||||
if &guioptions =~# 's'
|
||||
set guioptions-=s
|
||||
else
|
||||
set guioptions+=s
|
||||
endif
|
||||
}
|
||||
|
||||
map <expr> <F11> &go =~# 's' ? ":se go-=s<CR>" : ":se go+=s<CR>"
|
||||
|
||||
The fullscreen mode will occupy the entire screen area while hiding window
|
||||
decorations such as the title bar and borders.
|
||||
|
||||
vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 9.1. Last change: 2025 Nov 09
|
||||
*insert.txt* For Vim version 9.1. Last change: 2026 Jan 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1720,7 +1720,7 @@ Complete:
|
||||
Notes
|
||||
|
||||
- It doesn't complete command arguments that rely on 'shellcmd' completion
|
||||
type in Windows and WSL due to general slowness of canditate gathering,
|
||||
type in Windows and WSL due to general slowness of candidate gathering,
|
||||
e.g.
|
||||
>
|
||||
terminal dir
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.1. Last change: 2025 Dec 18
|
||||
*options.txt* For Vim version 9.1. Last change: 2026 Jan 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1823,7 +1823,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
prepend, e.g.: >
|
||||
set clipboard^=unnamed
|
||||
< When using the GUI see |'go-A'|.
|
||||
When using the |clipboard-providers| feature, only the "unamed" and
|
||||
When using the |clipboard-providers| feature, only the "unnamed" and
|
||||
"unnamedplus" features will be recognized If compiled without the
|
||||
|+clipboard| feature but compiled with the |+clipboard_provider|
|
||||
feature, then they will be the only values allowed and the other
|
||||
@@ -4274,7 +4274,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'fsync'* *'fs'* *'nofsync'* *'nofs'*
|
||||
'fsync' 'fs' boolean (default on)
|
||||
global
|
||||
global or local to buffer |global-local|
|
||||
When on, the library function fsync() will be called after writing a
|
||||
file. This will flush a file to disk, ensuring that it is safely
|
||||
written even on filesystems which do metadata-only journaling. This
|
||||
@@ -4283,6 +4283,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
turning this off increases the chances of data loss after a crash. On
|
||||
systems without an fsync() implementation, this variable is always
|
||||
off.
|
||||
This is a |global-local| option, so it can be set per buffer, for
|
||||
example when writing to a slow filesystem.
|
||||
Also see 'swapsync' for controlling fsync() on swap files.
|
||||
'fsync' also applies to |writefile()| (unless a flag is used to
|
||||
overrule it) and when writing undo files (see |undo-persistence|).
|
||||
@@ -4572,6 +4574,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'go-T'*
|
||||
'T' Include Toolbar. Currently only in Win32, GTK+, Motif and
|
||||
Photon GUIs.
|
||||
*'go-s'*
|
||||
's' Enable fullscreen mode. Currently only supported in the
|
||||
MS-Windows GUI version. When set, the window will occupy the
|
||||
entire screen and remove window decorations. Define custom
|
||||
mappings to toggle this mode conveniently. For detailed usage
|
||||
instructions, see |gui-w32-fullscreen|.
|
||||
*'go-r'*
|
||||
'r' Right-hand scrollbar is always present.
|
||||
*'go-R'*
|
||||
@@ -6033,7 +6041,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When the number of matches exceeds this value, Vim shows ">" instead
|
||||
of the exact count to keep searching fast.
|
||||
Note: larger values may impact performance.
|
||||
The value must be between 1 and 9999.
|
||||
The value must be between 1 and 9999. See also the |searchcount()|
|
||||
function.
|
||||
|
||||
*'menuitems'* *'mis'*
|
||||
'menuitems' 'mis' number (default 25)
|
||||
@@ -7854,7 +7863,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"search hit TOP, continuing at BOTTOM" messages are only
|
||||
indicated by a "W" (Mnemonic: Wrapped) letter before the
|
||||
search count statistics. The maximum limit can be set with
|
||||
the 'maxsearchcount' option.
|
||||
the 'maxsearchcount' option, see also |searchcount()|
|
||||
function.
|
||||
|
||||
This gives you the opportunity to avoid that a change between buffers
|
||||
requires you to hit <Enter>, but still gives as useful a message as
|
||||
@@ -8131,7 +8141,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
when it is turned off. It is also reset when 'compatible' is set.
|
||||
|
||||
The 'L' flag in 'cpoptions' alters tab behavior when 'list' is
|
||||
enabled. See also |ins-expandtab| ans user manual section |30.5| for
|
||||
enabled. See also |ins-expandtab| and user manual section |30.5| for
|
||||
in-depth explanations.
|
||||
|
||||
If Vim is compiled with the |+vartabs| feature then the value of
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
*popup.txt* For Vim version 9.1. Last change: 2025 Nov 09
|
||||
*popup.txt* For Vim version 9.1. Last change: 2026 Jan 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
|
||||
Displaying text in a floating window. *popup* *popup-window* *popupwin*
|
||||
Displaying text in a popup window. *popup* *popup-window* *popupwin*
|
||||
|
||||
|
||||
1. Introduction |popup-intro|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 9.1. Last change: 2025 Nov 09
|
||||
*quickfix.txt* For Vim version 9.1. Last change: 2025 Dec 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1654,6 +1654,22 @@ b/g:mypy_makeprg_params variable. For example: >
|
||||
|
||||
The global default is "--strict --ignore-missing-imports".
|
||||
|
||||
PYRIGHT TYPE CHECKER *compiler-pyright*
|
||||
|
||||
Commonly used compiler options can be added to 'makeprg' by setting the
|
||||
b/g:pyright_makeprg_params variable.
|
||||
|
||||
The global default is "pyright".
|
||||
|
||||
TY TYPE CHECKER *compiler-ty*
|
||||
|
||||
Commonly used compiler options and executable can be set by the
|
||||
b/g:ty_makeprg variable. For example: >
|
||||
|
||||
let b:ty_makeprg = "uv run ty"
|
||||
|
||||
The global default is "ty --no-progress --color=never".
|
||||
|
||||
RUFF LINTER *compiler-ruff*
|
||||
|
||||
Commonly used compiler options can be added to 'makeprg' by setting the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 9.1. Last change: 2025 Nov 09
|
||||
*starting.txt* For Vim version 9.1. Last change: 2025 Dec 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1287,7 +1287,7 @@ CTRL-Z Suspend Vim, like ":stop".
|
||||
Works in Normal and in Visual mode. In Insert and
|
||||
Command-line mode, the CTRL-Z is inserted as a normal
|
||||
character. In Visual mode Vim goes back to Normal
|
||||
mode.
|
||||
mode before suspending.
|
||||
Note: if CTRL-Z undoes a change see |mswin.vim|.
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Oct 14
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2026 Jan 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1125,6 +1125,7 @@ new-generation language oriented to full-scenario intelligence.
|
||||
All highlighting is enabled by default. To disable highlighting for a
|
||||
specific group, set the corresponding variable to 0 in your |vimrc|.
|
||||
All options to disable highlighting are: >
|
||||
:let g:cangjie_builtin_color = 0
|
||||
:let g:cangjie_comment_color = 0
|
||||
:let g:cangjie_identifier_color = 0
|
||||
:let g:cangjie_keyword_color = 0
|
||||
|
||||
@@ -377,6 +377,7 @@ $quote eval.txt /*$quote*
|
||||
'go-m' options.txt /*'go-m'*
|
||||
'go-p' options.txt /*'go-p'*
|
||||
'go-r' options.txt /*'go-r'*
|
||||
'go-s' options.txt /*'go-s'*
|
||||
'go-t' options.txt /*'go-t'*
|
||||
'go-v' options.txt /*'go-v'*
|
||||
'gp' options.txt /*'gp'*
|
||||
@@ -6771,6 +6772,7 @@ compiler-mypy quickfix.txt /*compiler-mypy*
|
||||
compiler-pandoc quickfix.txt /*compiler-pandoc*
|
||||
compiler-perl quickfix.txt /*compiler-perl*
|
||||
compiler-pylint quickfix.txt /*compiler-pylint*
|
||||
compiler-pyright quickfix.txt /*compiler-pyright*
|
||||
compiler-pytest quickfix.txt /*compiler-pytest*
|
||||
compiler-pyunit quickfix.txt /*compiler-pyunit*
|
||||
compiler-ruff quickfix.txt /*compiler-ruff*
|
||||
@@ -6779,6 +6781,7 @@ compiler-spotbugs quickfix.txt /*compiler-spotbugs*
|
||||
compiler-tex quickfix.txt /*compiler-tex*
|
||||
compiler-tombi quickfix.txt /*compiler-tombi*
|
||||
compiler-tsc quickfix.txt /*compiler-tsc*
|
||||
compiler-ty quickfix.txt /*compiler-ty*
|
||||
compiler-typst quickfix.txt /*compiler-typst*
|
||||
compiler-vaxada ft_ada.txt /*compiler-vaxada*
|
||||
compl-current insert.txt /*compl-current*
|
||||
@@ -8248,6 +8251,7 @@ gui-vert-scroll gui.txt /*gui-vert-scroll*
|
||||
gui-w32 gui_w32.txt /*gui-w32*
|
||||
gui-w32-cmdargs gui_w32.txt /*gui-w32-cmdargs*
|
||||
gui-w32-dialogs gui_w32.txt /*gui-w32-dialogs*
|
||||
gui-w32-fullscreen gui_w32.txt /*gui-w32-fullscreen*
|
||||
gui-w32-printing gui_w32.txt /*gui-w32-printing*
|
||||
gui-w32-start gui_w32.txt /*gui-w32-start*
|
||||
gui-w32-title-bar gui_w32.txt /*gui-w32-title-bar*
|
||||
@@ -10972,6 +10976,7 @@ termcap-cursor-shape term.txt /*termcap-cursor-shape*
|
||||
termcap-options term.txt /*termcap-options*
|
||||
termcap-title term.txt /*termcap-title*
|
||||
termda1-variable eval.txt /*termda1-variable*
|
||||
termdebug terminal.txt /*termdebug*
|
||||
termdebug-commands terminal.txt /*termdebug-commands*
|
||||
termdebug-communication terminal.txt /*termdebug-communication*
|
||||
termdebug-customizing terminal.txt /*termdebug-customizing*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 9.1. Last change: 2025 Nov 28
|
||||
*terminal.txt* For Vim version 9.1. Last change: 2026 Jan 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1263,7 +1263,7 @@ Alternatively, press "s" to swap the first and second dump. Do this several
|
||||
times so that you can spot the difference in the context of the text.
|
||||
|
||||
==============================================================================
|
||||
6. Debugging *terminal-debug* *terminal-debugger* *package-termdebug*
|
||||
6. Debugging *terminal-debug* *terminal-debugger* *package-termdebug* *termdebug*
|
||||
|
||||
The Terminal debugging plugin can be used to debug a program with gdb and view
|
||||
the source code in a Vim window. Since this is completely contained inside
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 9.1. Last change: 2025 Dec 09
|
||||
*todo.txt* For Vim version 9.1. Last change: 2025 Dec 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -205,11 +205,8 @@ Popup windows:
|
||||
positioned? PopupNew? Could be used to set some options or move it out of
|
||||
the way. (#5737)
|
||||
However, it may also cause trouble, changing the popup of another plugin.
|
||||
- Should popup_getoptions() also return the mask? #7774
|
||||
- Add a way to use popup_menu() synchronously: instead of invoking the
|
||||
callback, return the choice. (Ben Jackson, #6534)
|
||||
- When using a popup for the info of a completion menu, and there is not
|
||||
enough space, let the popup overlap with the menu. (#4544)
|
||||
- Implement flip option.
|
||||
- Make redrawing more efficient and avoid flicker:
|
||||
- put popup menu also in popup_mask?
|
||||
@@ -368,9 +365,6 @@ Can we not request XT key sequences, or reduce them drastically?
|
||||
Issue #10512: Dynamic loading broken with Perl 5.36
|
||||
Damien has a patch (2022 Dec 4)
|
||||
|
||||
Request #11965: Allow several "%=" items in 'statusline', makes it possible
|
||||
to have text in the center.
|
||||
|
||||
Add some kind of ":whathappend" command and functions to make visible what the
|
||||
last few typed keys and executed commands are. To be used when the user
|
||||
wonders what went wrong. Could also be used for statistics #12046.
|
||||
@@ -380,10 +374,6 @@ wonders what went wrong. Could also be used for statistics #12046.
|
||||
- executed command lines
|
||||
- with more verbosity: what scripts/functions/autocommands were executed
|
||||
|
||||
NFA regexp does not handle composing characters well: #10286
|
||||
[ɔ̃] matches both ɔ and ɔ̃
|
||||
\(ɔ\|ɔ̃\) matches ɔ and not ɔ̃
|
||||
|
||||
Is there a way to make 'autowriteall' make a clean exit when the xterm is
|
||||
closed? (Dennis Nazic says files are preserved, okt 28). Perhaps handle TERM
|
||||
like HUP?
|
||||
@@ -417,8 +407,6 @@ In a timer callback, when using ":echo" and then input() the message is
|
||||
overwritten. Could use ":echowin" and call redraw_cmd() in get_user_input().
|
||||
#11299
|
||||
|
||||
Syntax include problem: #11277. Related to Patch 8.2.2761
|
||||
|
||||
To avoid flicker: add an option that when a screen clear is requested, instead
|
||||
of clearing it draws everything and uses "clear to end of line" for every line.
|
||||
Resetting 't_ut' already causes this?
|
||||
@@ -517,8 +505,6 @@ there is a match do not scan the directory (possibly speeds up :find a lot).
|
||||
|
||||
globpath() does not use 'wildignorecase' at all? (related to #8350)
|
||||
|
||||
mksession uses :buffer instead of :edit in one place but not another. #10629
|
||||
|
||||
Add 'termguiattr' option, use "gui=" attributes in the terminal? Would work
|
||||
with 'termguicolors'. #1740
|
||||
|
||||
@@ -5781,7 +5767,6 @@ Argument list:
|
||||
|
||||
|
||||
Registers:
|
||||
8 Don't display empty registers with ":display". (Etienne)
|
||||
8 Add put command that overwrites existing text. Should also work for
|
||||
blocks. Useful to move text around in a table. Works like using "R ^R r"
|
||||
for every line.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*uganda.txt* For Vim version 9.1. Last change: 2025 Nov 13
|
||||
*uganda.txt* For Vim version 9.1. Last change: 2026 Jan 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -21,7 +21,7 @@ ICCF Holland and Kuwasha~
|
||||
|
||||
|Bram| Moolenaar's charity, ICCF Holland, has long supported the education of
|
||||
children in Uganda through the Kibaale Children's Centre. Following Bram's
|
||||
passing in 2023, ICCF Holland transfered all activities to its sister charity
|
||||
passing in 2023, ICCF Holland transferred all activities to its sister charity
|
||||
Kuwasha in Canada and dissolved at the end of 2025.
|
||||
|
||||
Donations from Vim users are still welcome and will continue to go directly to
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version9.txt* For Vim version 9.1. Last change: 2025 Dec 15
|
||||
*version9.txt* For Vim version 9.1. Last change: 2026 Jan 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -41724,7 +41724,10 @@ Options: ~
|
||||
(see also the below platform specific change).
|
||||
- 'guioptions': Support darkmode on MS-Windows for menu and title bar using
|
||||
|'go-d'| (see also the below platform specific change).
|
||||
- 'guioptions': New value |'go-s'| to support fullscreen on MS-Windows GUI
|
||||
(see also the below platform specific change).
|
||||
- 'completepopup': Add more values to style popup windows.
|
||||
- 'fsync' is now a |global-local| option.
|
||||
|
||||
Ex commands: ~
|
||||
- allow to specify a priority when defining a new sign |:sign-define|
|
||||
@@ -41768,6 +41771,7 @@ Platform specific ~
|
||||
- MS-Windows: Vim no longer searches the current directory for
|
||||
executables when running external commands; prefix a relative or absolute
|
||||
path if you want the old behavior |$NoDefaultCurrentDirectoryInExePath|.
|
||||
- MS-Windows: New value |'go-s'| to support fullscreen on MS-Windows GUI
|
||||
|
||||
- macOS: increase default scheduler priority to TASK_DEFAULT_APPLICATION.
|
||||
|
||||
@@ -41827,6 +41831,7 @@ Functions: ~
|
||||
|id()| get unique identifier for a Dict, List, Object,
|
||||
Channel or Blob variable
|
||||
|list2tuple()| turn a List of items into a Tuple
|
||||
|listener_add()| add a callback to listen to changes
|
||||
|matchbufline()| all the matches of a pattern in a buffer
|
||||
|matchstrlist()| all the matches of a pattern in a List of strings
|
||||
|ngettext()| lookup single/plural message translation
|
||||
@@ -41878,11 +41883,13 @@ Commands: ~
|
||||
|
||||
Ex-Commands: ~
|
||||
|
||||
|:clipreset| choose a new method for accessing the clipboard
|
||||
|:iput| like |:put| but adjust indent
|
||||
|:pbuffer| Edit buffer [N] from the buffer list in the preview
|
||||
window
|
||||
|:redrawtabpanel| Force updating the 'tabpanel'.
|
||||
|:uniq| Deduplicate text in the current buffer.
|
||||
|:wlrestore| reinitialize the wayland compositor connection
|
||||
|
||||
Options: ~
|
||||
|
||||
@@ -41901,6 +41908,7 @@ Options: ~
|
||||
'lhistory' Size of the location list stack |quickfix-stack|
|
||||
'maxsearchcount' Set the maximum number for search-stat |shm-S|
|
||||
'messagesopt' configure |:messages| and |hit-enter| prompt
|
||||
'osctimeoutlen' OSC terminator receive timeout
|
||||
'pumborder' define popup border and decorations
|
||||
'pummaxwidth' maximum width for the completion popup menu
|
||||
'showtabpanel' When to show the |tabpanel|
|
||||
@@ -41908,12 +41916,12 @@ Options: ~
|
||||
'tabpanel' Optional vertical panel for displaying tabpages
|
||||
|tabpanel|
|
||||
'tabpanelopt' Optional settings for the |tabpanel|
|
||||
't_xo' Terminal uses XON/XOFF handshaking (e.g. vt420)
|
||||
't_CF' Support for alternate font highlighting terminal code
|
||||
't_xo' Terminal uses XON/XOFF handshaking (e.g. vt420)
|
||||
'winfixbuf' Keep buffer focused in a window
|
||||
'wlseat' Specify Wayland seat to use for the |wayland| feature
|
||||
'wlsteal' Steal focus to access the |wayland| clipboard
|
||||
'wltimeout' Specify the connection timeout for the |wayland|
|
||||
'wltimeoutlen' Specify the connection timeout for the |wayland|
|
||||
compositor
|
||||
|
||||
Vim Variables: ~
|
||||
@@ -41921,8 +41929,8 @@ Vim Variables: ~
|
||||
|v:clipproviders| A dictionary containing clipboard providers
|
||||
configuration |clipboard-providers|.
|
||||
|v:stacktrace| The most recent caught exception.
|
||||
|v:t_enumvalue| Value of |enumvalue|.
|
||||
|v:t_enum| Value of |enum| type.
|
||||
|v:t_enumvalue| Value of |enumvalue|.
|
||||
|v:t_tuple| Value of |Tuple| type.
|
||||
|v:termda1| The escape sequence returned for the primary device
|
||||
attribute query (DA1).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2025 Nov 11
|
||||
" Last Change: 2026 Jan 02
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" If the filetype can be detected from extension or file name(the final path component),
|
||||
@@ -435,7 +435,7 @@ au BufNewFile,BufRead *.app call dist#ft#FTapp()
|
||||
au BufNewFile,BufRead *esmtprc setf esmtprc
|
||||
|
||||
" Fennel
|
||||
au BufNewFile,BufRead *.fnl,{,.}fennelrc setf fennel
|
||||
au BufNewFile,BufRead {,.}fennelrc setf fennel
|
||||
|
||||
" Flatpak config
|
||||
au BufNewFile,BufRead */flatpak/repo/config setf dosini
|
||||
@@ -1127,6 +1127,15 @@ au BufNewFile,BufRead */etc/systemd/system/*.d/.#* setf systemd
|
||||
au BufNewFile,BufRead */etc/systemd/system/.#* setf systemd
|
||||
au BufNewFile,BufRead */.config/systemd/user/*.d/.#* setf systemd
|
||||
au BufNewFile,BufRead */.config/systemd/user/.#* setf systemd
|
||||
" Podman Quadlet files
|
||||
au BufNewFile,BufRead */containers/systemd/*.{artifact,build,container,image,kube,network,pod,volume} setf systemd
|
||||
" Podman Quadlet rootless files not already captured by previous line
|
||||
au BufNewFile,BufRead */etc/containers/systemd/users/*/*.{artifact,build,container,image,kube,network,pod,volume} setf systemd
|
||||
au BufNewFile,BufRead */etc/containers/systemd/users/*.{artifact,build,container,image,kube,network,pod,volume} setf systemd
|
||||
" Podman Quadlet overrides
|
||||
au BufNewFile,BufRead */containers/systemd/*.d/*.conf setf systemd
|
||||
au BufNewFile,BufRead */etc/containers/systemd/users/*/*.d/*.conf setf systemd
|
||||
au BufNewFile,BufRead */etc/containers/systemd/users/*.d/*.conf setf systemd
|
||||
|
||||
" Sudoers
|
||||
au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers
|
||||
|
||||
3
runtime/ftplugin/bicep-params.vim
Normal file
3
runtime/ftplugin/bicep-params.vim
Normal file
@@ -0,0 +1,3 @@
|
||||
" Placeholder for maximum compatibility. While bicepparam files are treated as distinct filetypes,
|
||||
" they are should share the same ftplugin settings as bicep files.
|
||||
runtime! ftplugin/bicep.vim
|
||||
14
runtime/ftplugin/bicep.vim
Normal file
14
runtime/ftplugin/bicep.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Bicep
|
||||
" Maintainer: Scott McKendry <me@scottmckendry.tech>
|
||||
" Last Change: 2025 Dec 27
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,://
|
||||
setlocal commentstring=//\ %s
|
||||
|
||||
let b:undo_ftplugin = "setlocal comments< commentstring<"
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin
|
||||
" Language: bpftrace
|
||||
" Maintainer: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
" Last Change: 2025 Dec 05
|
||||
" Last Change: 2025 Dec 23
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
@@ -11,4 +11,6 @@ let b:did_ftplugin = 1
|
||||
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
|
||||
setlocal commentstring=//\ %s
|
||||
|
||||
let b:undo_ftplugin = "setlocal comments< commentstring<"
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
let b:undo_ftplugin = "setlocal comments< commentstring< formatoptions<"
|
||||
|
||||
@@ -72,6 +72,7 @@ deprecated
|
||||
discontiguous
|
||||
div
|
||||
domain_error
|
||||
consistency_error
|
||||
duplicated_directives
|
||||
dynamic
|
||||
dynamic_declarations
|
||||
@@ -144,6 +145,7 @@ min
|
||||
missing_directives
|
||||
mod
|
||||
mode
|
||||
mode_non_terminal
|
||||
modules
|
||||
multifile
|
||||
nl
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Perl
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
" License: Vim License (see :help license)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Perl POD format
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Author: Doug Kearns <dougkearns@gmail.com>
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Raku
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Homepage: https://github.com/Raku/vim-raku
|
||||
" Bugs/requests: https://github.com/Raku/vim-raku/issues
|
||||
" Last Change: 2021 Apr 16
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Verbose TAP Output
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
" License: Vim License (see :help license)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: TT2 embedded with HTML
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
" License: Vim License (see :help license)
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: xml
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Last Changed: Dec 07th, 2018
|
||||
" 2024 Jan 14 by Vim Project (browsefilter)
|
||||
" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
|
||||
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
|
||||
" Previous Maintainer: Dan Sharp
|
||||
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
|
||||
" Last Changed: 2024 May 24
|
||||
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
|
||||
" Previously
|
||||
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
|
||||
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
let b:did_ftplugin = 1
|
||||
@@ -54,12 +53,8 @@ command! -nargs=? XMLent call xmlcomplete#CreateEntConnection(<f-args>)
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter="XML Files (*.xml)\t*.xml\n" .
|
||||
\ "DTD Files (*.dtd)\t*.dtd\n" .
|
||||
\ "XSD Files (*.xsd)\t*.xsd\n"
|
||||
if has("win32")
|
||||
let b:browsefilter .= "All Files (*.*)\t*\n"
|
||||
else
|
||||
let b:browsefilter .= "All Files (*)\t*\n"
|
||||
endif
|
||||
\ "XSD Files (*.xsd)\t*.xsd\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
" Undo the stuff we changed.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: XS (Perl extension interface language)
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
" License: Vim License (see :help license)
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2024 Sep 19
|
||||
" Latest Revision: 2025 Jul 23
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-zsh
|
||||
" Last Change:
|
||||
" 2025 Jul 23 by Vim Project (use :hor term #17822)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -20,9 +18,14 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo< "
|
||||
|
||||
if get(g:, 'zsh_fold_enable', 0)
|
||||
setlocal foldmethod=syntax
|
||||
let b:undo_ftplugin .= "fdm< "
|
||||
endif
|
||||
|
||||
if executable('zsh') && &shell !~# '/\%(nologin\|false\)$'
|
||||
if exists(':terminal') == 2
|
||||
command! -buffer -nargs=1 ZshKeywordPrg silent exe ':hor term zsh -c "autoload -Uz run-help; run-help <args>"'
|
||||
command! -buffer -nargs=1 ZshKeywordPrg silent exe ':hor :term zsh -c "autoload -Uz run-help; run-help <args>"'
|
||||
else
|
||||
command! -buffer -nargs=1 ZshKeywordPrg echo system('MANPAGER= zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null"')
|
||||
endif
|
||||
|
||||
19
runtime/indent/bpftrace.vim
Normal file
19
runtime/indent/bpftrace.vim
Normal file
@@ -0,0 +1,19 @@
|
||||
" Vim indent file
|
||||
" Language: bpftrace
|
||||
" Author: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
" Last Change: 2025 Dec 27
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal noautoindent nosmartindent
|
||||
|
||||
setlocal cindent
|
||||
setlocal cinoptions=+0,(0,[0,Ws,J1,j1,m1,>s
|
||||
setlocal cinkeys=0{,0},!^F,o,O,#0
|
||||
setlocal cinwords=
|
||||
|
||||
let b:undo_indent = "setlocal autoindent< smartindent< cindent< cinoptions< cinkeys< cinwords<"
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim indent file
|
||||
" Language: Perl
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
" License: Vim License (see :help license)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim indent file
|
||||
" Language: Perl 6
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
" Last Change: 2020 Apr 15
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
" Language: Rust
|
||||
" Author: Chris Morgan <me@chrismorgan.info>
|
||||
" Last Change: 2023-09-11
|
||||
" 2024 Jul 04 by Vim Project: use shiftwidth() instead of hard-coding shifted values (#15138)
|
||||
" 2024 Jul 04 by Vim Project: use shiftwidth() instead of hard-coding shifted values #15138
|
||||
" 2025 Dec 29 by Vim Project: clean up
|
||||
" 2025 Dec 31 by Vim Project: correcly indent after nested array literal #19042
|
||||
|
||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||
" Note: upstream seems umaintained: https://github.com/rust-lang/rust.vim/issues/502
|
||||
@@ -86,16 +88,6 @@ function! s:is_string_comment(lnum, col)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
if exists('*shiftwidth')
|
||||
function! s:shiftwidth()
|
||||
return shiftwidth()
|
||||
endfunc
|
||||
else
|
||||
function! s:shiftwidth()
|
||||
return &shiftwidth
|
||||
endfunc
|
||||
endif
|
||||
|
||||
function GetRustIndent(lnum)
|
||||
" Starting assumption: cindent (called at the end) will do it right
|
||||
" normally. We just want to fix up a few cases.
|
||||
@@ -204,6 +196,22 @@ function GetRustIndent(lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
" Prevent cindent from becoming confused when pairing square brackets, as
|
||||
" in
|
||||
"
|
||||
" let arr = [[u8; 4]; 2] = [
|
||||
" [0; 4],
|
||||
" [1, 3, 5, 9],
|
||||
" ];
|
||||
" | ← indentation placed here
|
||||
"
|
||||
" for which it calculates too much indentation in the line following the
|
||||
" close of the array.
|
||||
if prevline =~# '^\s*\]' && l:last_prevline_character ==# ';'
|
||||
\ && line !~# '^\s*}'
|
||||
return indent(prevlinenum)
|
||||
endif
|
||||
|
||||
if l:last_prevline_character ==# ","
|
||||
\ && s:get_line_trimmed(a:lnum) !~# '^\s*[\[\]{})]'
|
||||
\ && prevline !~# '^\s*fn\s'
|
||||
@@ -240,43 +248,6 @@ function GetRustIndent(lnum)
|
||||
return indent(prevlinenum)
|
||||
endif
|
||||
|
||||
if !has("patch-7.4.355")
|
||||
" cindent before 7.4.355 doesn't do the module scope well at all; e.g.::
|
||||
"
|
||||
" static FOO : &'static [bool] = [
|
||||
" true,
|
||||
" false,
|
||||
" false,
|
||||
" true,
|
||||
" ];
|
||||
"
|
||||
" uh oh, next statement is indented further!
|
||||
|
||||
" Note that this does *not* apply the line continuation pattern properly;
|
||||
" that's too hard to do correctly for my liking at present, so I'll just
|
||||
" start with these two main cases (square brackets and not returning to
|
||||
" column zero)
|
||||
|
||||
call cursor(a:lnum, 1)
|
||||
if searchpair('{\|(', '', '}\|)', 'nbW',
|
||||
\ 's:is_string_comment(line("."), col("."))') == 0
|
||||
if searchpair('\[', '', '\]', 'nbW',
|
||||
\ 's:is_string_comment(line("."), col("."))') == 0
|
||||
" Global scope, should be zero
|
||||
return 0
|
||||
else
|
||||
" At the module scope, inside square brackets only
|
||||
"if getline(a:lnum)[0] == ']' || search('\[', '', '\]', 'nW') == a:lnum
|
||||
if line =~# "^\\s*]"
|
||||
" It's the closing line, dedent it
|
||||
return 0
|
||||
else
|
||||
return shiftwidth()
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" Fall back on cindent, which does it mostly right
|
||||
return cindent(a:lnum)
|
||||
endfunction
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-sh-indent
|
||||
" Changelog:
|
||||
" 20250906 - indent function closing properly on multiline commands
|
||||
" 20250318 - Detect local arrays in functions
|
||||
" 20241411 - Detect dash character in function keyword for
|
||||
" bash mode (issue #16049)
|
||||
@@ -186,6 +187,15 @@ function! GetShIndent()
|
||||
endif
|
||||
endif
|
||||
|
||||
" Special case: if the current line is a closing '}', align with matching '{'
|
||||
if curline =~ '^\s*}\s*$'
|
||||
let match_lnum = searchpair('{', '', '}', 'bnW',
|
||||
\ 'synIDattr(synID(line("."),col("."), 1),"name") =~? "comment\\|quote"')
|
||||
if match_lnum > 0
|
||||
return indent(match_lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
return ind > 0 ? ind : 0
|
||||
endfunction
|
||||
|
||||
|
||||
42
runtime/indent/testdir/rust.in
Normal file
42
runtime/indent/testdir/rust.in
Normal file
@@ -0,0 +1,42 @@
|
||||
// vim: set ft=rust ts=8 sw=4 sts=4 et :
|
||||
// START_INDENT
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
// Create a path to the desired file
|
||||
let path = Path::new("hello.txt");
|
||||
let display = path.display();
|
||||
|
||||
// Open the path in read-only mode, returns `io::Result<File>`
|
||||
let mut file = match File::open(&path) {
|
||||
Err(why) => panic!("couldn't open {}: {}", display, why),
|
||||
Ok(file) => file,
|
||||
};
|
||||
|
||||
// Start doing nothing forever
|
||||
loop {
|
||||
let arr1 = [[u8; 4]; 2] = [
|
||||
[0; 4],
|
||||
[1, 3, 5, 9],
|
||||
];
|
||||
}
|
||||
|
||||
// Plan for a future that will never come
|
||||
let arr2 = [[u8; 4]; 2] = [
|
||||
[1; 4],
|
||||
[2, 4, 6, 8],
|
||||
];
|
||||
let arr2_ref = &arr2;
|
||||
|
||||
// Read the file contents into a string, returns `io::Result<usize>`
|
||||
let mut s = String::new();
|
||||
match file.read_to_string(&mut s) {
|
||||
Err(why) => panic!("couldn't read {}: {}", display, why),
|
||||
Ok(_) => print!("{} contains:\n{}", display, s),
|
||||
}
|
||||
|
||||
// file goes out of scope, and the "hello.txt" file gets closed
|
||||
}
|
||||
// END_INDENT
|
||||
42
runtime/indent/testdir/rust.ok
Normal file
42
runtime/indent/testdir/rust.ok
Normal file
@@ -0,0 +1,42 @@
|
||||
// vim: set ft=rust ts=8 sw=4 sts=4 et :
|
||||
// START_INDENT
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
// Create a path to the desired file
|
||||
let path = Path::new("hello.txt");
|
||||
let display = path.display();
|
||||
|
||||
// Open the path in read-only mode, returns `io::Result<File>`
|
||||
let mut file = match File::open(&path) {
|
||||
Err(why) => panic!("couldn't open {}: {}", display, why),
|
||||
Ok(file) => file,
|
||||
};
|
||||
|
||||
// Start doing nothing forever
|
||||
loop {
|
||||
let arr1 = [[u8; 4]; 2] = [
|
||||
[0; 4],
|
||||
[1, 3, 5, 9],
|
||||
];
|
||||
}
|
||||
|
||||
// Plan for a future that will never come
|
||||
let arr2 = [[u8; 4]; 2] = [
|
||||
[1; 4],
|
||||
[2, 4, 6, 8],
|
||||
];
|
||||
let arr2_ref = &arr2;
|
||||
|
||||
// Read the file contents into a string, returns `io::Result<usize>`
|
||||
let mut s = String::new();
|
||||
match file.read_to_string(&mut s) {
|
||||
Err(why) => panic!("couldn't read {}: {}", display, why),
|
||||
Ok(_) => print!("{} contains:\n{}", display, s),
|
||||
}
|
||||
|
||||
// file goes out of scope, and the "hello.txt" file gets closed
|
||||
}
|
||||
// END_INDENT
|
||||
@@ -18,3 +18,11 @@ map: |
|
||||
line1
|
||||
line2
|
||||
# END_INDENT
|
||||
|
||||
# START_INDENT
|
||||
list:
|
||||
- element1:
|
||||
foo: bar
|
||||
- element2:
|
||||
foo: bar
|
||||
# END_INDENT
|
||||
|
||||
@@ -18,3 +18,11 @@ map: |
|
||||
line1
|
||||
line2
|
||||
# END_INDENT
|
||||
|
||||
# START_INDENT
|
||||
list:
|
||||
- element1:
|
||||
foo: bar
|
||||
- element2:
|
||||
foo: bar
|
||||
# END_INDENT
|
||||
|
||||
@@ -88,7 +88,9 @@ endfun
|
||||
|
||||
" [-- return the sum of indents of a:lnum --]
|
||||
fun! <SID>XmlIndentSum(line, style, add)
|
||||
if <SID>IsXMLContinuation(a:line) && a:style == 0 && !<SID>IsXMLEmptyClosingTag(a:line)
|
||||
if <SID>IsXMLContinuation(a:line) &&
|
||||
\ a:style == 0 &&
|
||||
\ !<SID>IsXMLEmptyClosingTag(a:line)
|
||||
" no complete tag, add one additional indent level
|
||||
" but only for the current line
|
||||
return a:add + shiftwidth()
|
||||
@@ -157,6 +159,17 @@ fun! XmlIndentGet(lnum, use_syntax_check)
|
||||
" no extra indent, looks like a text continuation line
|
||||
return pind
|
||||
endif
|
||||
elseif empty(syn_name_start) && syn_name_end =~? 'xmlTag'
|
||||
" Special case: such a line, shouldn't be indented, just because it
|
||||
" ends with a tag
|
||||
" 'foobar <i>inline tags</i>'
|
||||
if (match(curline, '<\([:a-zA-Z_]\+\)[^>]*>.*</\1>') > -1)
|
||||
return pind
|
||||
endif
|
||||
endif
|
||||
|
||||
if curline =~ '^\s*</[a-zA-Z_]>'
|
||||
return <SID>ReturnIndentForMatchingTag(curline)
|
||||
endif
|
||||
|
||||
" Get indent from previous tag line
|
||||
@@ -181,6 +194,21 @@ func! <SID>IsXMLEmptyClosingTag(line)
|
||||
return a:line =~? '<[^>]*/>\s*$'
|
||||
endfunc
|
||||
|
||||
func! <SID>ReturnIndentForMatchingTag(line)
|
||||
" For a line with just a simple closing tag
|
||||
" get the indent from a matching opening tag
|
||||
if a:line =~? '^\s*</[a-z_]*>'
|
||||
let _c = getcursorpos()
|
||||
let pat = matchstr(a:line, '^\s*</\zs[a-z_]\+\ze>')
|
||||
" position cursor before the opening tag
|
||||
norm! 0
|
||||
" get the indent from the matching opening tag
|
||||
let match_line = searchpair('<' .. pat .. '>', '', '</' .. pat .. '>', 'bn')
|
||||
call setpos('.', _c)
|
||||
return indent(match_line)
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" return indent for a commented line,
|
||||
" the middle part might be indented one additional level
|
||||
func! <SID>XmlIndentComment(lnum)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
" Last Change: 2022 Jun 17
|
||||
" 2024 Feb 29 by Vim project: disable mulitline indent by default
|
||||
" 2024 Aug 14 by Vim project: fix re-indenting when commenting out lines
|
||||
" 2026 Jan 08 by Vim project: fix object indentation in array
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists('b:did_indent')
|
||||
@@ -114,7 +115,13 @@ function GetYAMLIndent(lnum)
|
||||
"
|
||||
" - |-
|
||||
" Block scalar without indentation indicator
|
||||
return previndent+shiftwidth()
|
||||
if prevline =~# '^\s*-\s.*:$'
|
||||
" Special case: list item with mapping key (- key:)
|
||||
" Need to account for the "- " prefix
|
||||
return previndent + 2 + shiftwidth()
|
||||
else
|
||||
return previndent+shiftwidth()
|
||||
endif
|
||||
elseif prevline =~# '\v[:-]\ [|>]%(\d+[+\-]?|[+\-]?\d+)%(\#.*|\s*)$'
|
||||
" - |+2
|
||||
" block scalar with indentation indicator
|
||||
@@ -136,7 +143,10 @@ function GetYAMLIndent(lnum)
|
||||
let prevmapline = s:FindPrevLEIndentedLineMatchingRegex(a:lnum,
|
||||
\ s:mapkeyregex)
|
||||
if getline(prevmapline) =~# '^\s*- '
|
||||
return indent(prevmapline) + 2
|
||||
" Previous mapping key is in a list item (- key:)
|
||||
" The key effectively starts at indent + 2 (after "- ")
|
||||
" Content under it should be indented relative to the key position
|
||||
return indent(prevmapline) + 2 + shiftwidth()
|
||||
else
|
||||
return indent(prevmapline)
|
||||
endif
|
||||
|
||||
@@ -2,15 +2,14 @@
|
||||
" Maintainer: Restorer, <restorer@mail2k.ru>
|
||||
" Previous Maintainer: Sergey Alyoshin, <alyoshin.s@gmail.com>
|
||||
" vassily ragosin, <vrr[at]users.sourceforge.net>
|
||||
" Last Change: 23 Aug 2023
|
||||
" Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT
|
||||
" Last Change: 28 Dec 2025
|
||||
" URL: https://github.com/RestorerZ/RuVim
|
||||
"
|
||||
"
|
||||
" Adopted for RuVim project by Vassily Ragosin.
|
||||
" First translation: Tim Alexeevsky, <realtim [at] mail.ru>,
|
||||
" based on ukrainian translation by Bohdan Vlasyuk, <bohdan@vstu.edu.ua>
|
||||
"
|
||||
" Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT
|
||||
"
|
||||
" Quit when menu translations have already been done.
|
||||
"
|
||||
@@ -44,7 +43,7 @@ menutrans &Find\.\.\. &
|
||||
"--------------------
|
||||
menutrans &Credits Ñî&àâòîðû
|
||||
menutrans Co&pying &Ëèöåíçèÿ
|
||||
menutrans &Sponsor/Register Ñîä&åéñòâèå\ è\ ðåãèñòðàöèÿ
|
||||
menutrans &Sponsor Ñîä&åéñòâèå\ ïðîåêòó
|
||||
menutrans O&rphans &Áëàãîòâîðèòåëüíîñòü
|
||||
"--------------------
|
||||
menutrans &Version &Òåêóùàÿ\ âåðñèÿ
|
||||
@@ -264,7 +263,7 @@ menutrans Cu&t &
|
||||
menutrans &Copy &Êîïèðîâàòü
|
||||
menutrans &Paste Âñò&àâèòü
|
||||
menutrans &Delete &Óäàëèòü
|
||||
menutrans Select\ Blockwise Áëîêîâîå\ âûäåëåíèå
|
||||
menutrans Select\ Blockwise Áëî÷íîå\ âûäåëåíèå
|
||||
menutrans Select\ &Word Âûäåëèòü\ ñ&ëîâî
|
||||
menutrans Select\ &Line Âûäåëèòü\ ñ&òðîêó
|
||||
menutrans Select\ &Block Âûäåëèòü\ &áëîê
|
||||
@@ -347,7 +346,7 @@ let menutrans_no_file = "[
|
||||
|
||||
" Menus to handle Russian encodings
|
||||
" Thanks to Pavlo Bohmat for the idea
|
||||
" vassily ragosin <vrr[at]users.sourceforge.net>
|
||||
" vassily ragosin, <vrr[at]users.sourceforge.net>
|
||||
"
|
||||
an 10.355 &File.-SEP- <Nop>
|
||||
an 10.360.20 &File.Îòêðûòü\ â\ êîäèðîâêå\.\.\..CP1251 :browse e ++enc=cp1251<CR>
|
||||
|
||||
@@ -2,15 +2,14 @@
|
||||
" Maintainer: Restorer, <restorer@mail2k.ru>
|
||||
" Previous Maintainer: Sergey Alyoshin, <alyoshin.s@gmail.com>
|
||||
" vassily ragosin, <vrr[at]users.sourceforge.net>
|
||||
" Last Change: 23 Aug 2023
|
||||
" Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT
|
||||
" Last Change: 28 Dec 2025
|
||||
" URL: https://github.com/RestorerZ/RuVim
|
||||
"
|
||||
"
|
||||
" Adopted for RuVim project by Vassily Ragosin.
|
||||
" First translation: Tim Alexeevsky, <realtim [at] mail.ru>,
|
||||
" based on ukrainian translation by Bohdan Vlasyuk, <bohdan@vstu.edu.ua>
|
||||
"
|
||||
" Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT
|
||||
"
|
||||
" Quit when menu translations have already been done.
|
||||
"
|
||||
@@ -44,7 +43,7 @@ menutrans &Find\.\.\. &
|
||||
"--------------------
|
||||
menutrans &Credits óÏ&Á×ÔÏÒÙ
|
||||
menutrans Co&pying &ìÉÃÅÎÚÉÑ
|
||||
menutrans &Sponsor/Register óÏÄ&ÅÊÓÔ×ÉÅ\ É\ ÒÅÇÉÓÔÒÁÃÉÑ
|
||||
menutrans &Sponsor óÏÄ&ÅÊÓÔ×ÉÅ\ ÐÒÏÅËÔÕ
|
||||
menutrans O&rphans &âÌÁÇÏÔ×ÏÒÉÔÅÌØÎÏÓÔØ
|
||||
"--------------------
|
||||
menutrans &Version &ôÅËÕÝÁÑ\ ×ÅÒÓÉÑ
|
||||
@@ -264,7 +263,7 @@ menutrans Cu&t &
|
||||
menutrans &Copy &ëÏÐÉÒÏ×ÁÔØ
|
||||
menutrans &Paste ÷ÓÔ&Á×ÉÔØ
|
||||
menutrans &Delete &õÄÁÌÉÔØ
|
||||
menutrans Select\ Blockwise âÌÏËÏ×ÏÅ\ ×ÙÄÅÌÅÎÉÅ
|
||||
menutrans Select\ Blockwise âÌÏÞÎÏÅ\ ×ÙÄÅÌÅÎÉÅ
|
||||
menutrans Select\ &Word ÷ÙÄÅÌÉÔØ\ Ó&ÌÏ×Ï
|
||||
menutrans Select\ &Line ÷ÙÄÅÌÉÔØ\ Ó&ÔÒÏËÕ
|
||||
menutrans Select\ &Block ÷ÙÄÅÌÉÔØ\ &ÂÌÏË
|
||||
@@ -347,7 +346,7 @@ let menutrans_no_file = "[
|
||||
|
||||
" Menus to handle Russian encodings
|
||||
" Thanks to Pavlo Bohmat for the idea
|
||||
" vassily ragosin <vrr[at]users.sourceforge.net>
|
||||
" vassily ragosin, <vrr[at]users.sourceforge.net>
|
||||
"
|
||||
an 10.355 &File.-SEP- <Nop>
|
||||
an 10.360.20 &File.ïÔËÒÙÔØ\ ×\ ËÏÄÉÒÏ×ËÅ\.\.\..CP1251 :browse e ++enc=cp1251<CR>
|
||||
|
||||
@@ -2,15 +2,14 @@
|
||||
" Maintainer: Restorer, <restorer@mail2k.ru>
|
||||
" Previous Maintainer: Sergey Alyoshin, <alyoshin.s@gmail.com>
|
||||
" vassily ragosin, <vrr[at]users.sourceforge.net>
|
||||
" Last Change: 23 Aug 2023
|
||||
" Original translations
|
||||
" Last Change: 28 Dec 2025
|
||||
" URL: https://github.com/RestorerZ/RuVim
|
||||
"
|
||||
"
|
||||
" Adopted for RuVim project by Vassily Ragosin.
|
||||
" First translation: Tim Alexeevsky, <realtim [at] mail.ru>,
|
||||
" based on ukrainian translation by Bohdan Vlasyuk, <bohdan@vstu.edu.ua>
|
||||
"
|
||||
" Original translations
|
||||
"
|
||||
" Quit when menu translations have already been done.
|
||||
"
|
||||
@@ -44,7 +43,7 @@ menutrans &Find\.\.\. &Найти\.\.\.
|
||||
"--------------------
|
||||
menutrans &Credits Со&авторы
|
||||
menutrans Co&pying &Лицензия
|
||||
menutrans &Sponsor/Register Сод&ействие\ и\ регистрация
|
||||
menutrans &Sponsor Сод&ействие\ проекту
|
||||
menutrans O&rphans &Благотворительность
|
||||
"--------------------
|
||||
menutrans &Version &Текущая\ версия
|
||||
@@ -264,7 +263,7 @@ menutrans Cu&t &Вырезать
|
||||
menutrans &Copy &Копировать
|
||||
menutrans &Paste Вст&авить
|
||||
menutrans &Delete &Удалить
|
||||
menutrans Select\ Blockwise Блоковое\ выделение
|
||||
menutrans Select\ Blockwise Блочное\ выделение
|
||||
menutrans Select\ &Word Выделить\ с&лово
|
||||
menutrans Select\ &Line Выделить\ с&троку
|
||||
menutrans Select\ &Block Выделить\ &блок
|
||||
@@ -347,7 +346,7 @@ let menutrans_no_file = "[Безымянный]"
|
||||
|
||||
" Menus to handle Russian encodings
|
||||
" Thanks to Pavlo Bohmat for the idea
|
||||
" vassily ragosin <vrr[at]users.sourceforge.net>
|
||||
" vassily ragosin, <vrr[at]users.sourceforge.net>
|
||||
"
|
||||
an 10.355 &File.-SEP- <Nop>
|
||||
an 10.360.20 &File.Открыть\ в\ кодировке\.\.\..CP1251 :browse e ++enc=cp1251<CR>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" matchit.vim: (global plugin) Extended "%" matching
|
||||
" autload script of matchit plugin, see ../plugin/matchit.vim
|
||||
" Last Change: May 20, 2024
|
||||
" Last Change: Jan 06, 2025
|
||||
|
||||
" Neovim does not support scriptversion
|
||||
if has("vimscript-4")
|
||||
@@ -69,6 +69,26 @@ function matchit#Match_wrapper(word, forward, mode) range
|
||||
let startpos = [line("."), col(".")]
|
||||
endif
|
||||
|
||||
" Check for custom match function hook
|
||||
if exists("b:match_function")
|
||||
let MatchFunc = b:match_function
|
||||
try
|
||||
let result = call(MatchFunc, [a:forward])
|
||||
if !empty(result)
|
||||
call cursor(result)
|
||||
return s:CleanUp(restore_options, a:mode, startpos)
|
||||
endif
|
||||
catch /.*/
|
||||
if exists("b:match_debug")
|
||||
echohl WarningMsg
|
||||
echom 'matchit: b:match_function error: ' .. v:exception
|
||||
echohl NONE
|
||||
endif
|
||||
return s:CleanUp(restore_options, a:mode, startpos)
|
||||
endtry
|
||||
" Empty result: fall through to regular matching
|
||||
endif
|
||||
|
||||
" First step: if not already done, set the script variables
|
||||
" s:do_BR flag for whether there are backrefs
|
||||
" s:pat parsed version of b:match_words
|
||||
@@ -91,7 +111,7 @@ function matchit#Match_wrapper(word, forward, mode) range
|
||||
let default = escape(&mps, '[$^.*~\\/?]') .. (strlen(&mps) ? "," : "") ..
|
||||
\ '\/\*:\*\/,#\s*if\%(n\=def\)\=:#\s*else\>:#\s*elif\%(n\=def\)\=\>:#\s*endif\>'
|
||||
" s:all = pattern with all the keywords
|
||||
let match_words = match_words .. (strlen(match_words) ? "," : "") .. default
|
||||
let match_words = s:Append(match_words, default)
|
||||
let s:last_words = match_words
|
||||
if match_words !~ s:notslash .. '\\\d'
|
||||
let s:do_BR = 0
|
||||
@@ -101,8 +121,8 @@ function matchit#Match_wrapper(word, forward, mode) range
|
||||
let s:pat = s:ParseWords(match_words)
|
||||
endif
|
||||
let s:all = substitute(s:pat, s:notslash .. '\zs[,:]\+', '\\|', 'g')
|
||||
" un-escape \, to ,
|
||||
let s:all = substitute(s:all, '\\,', ',', 'g')
|
||||
" un-escape \, and \: to , and :
|
||||
let s:all = substitute(s:all, s:notslash .. '\zs\\\(:\|,\)', '\1', 'g')
|
||||
" Just in case there are too many '\(...)' groups inside the pattern, make
|
||||
" sure to use \%(...) groups, so that error E872 can be avoided
|
||||
let s:all = substitute(s:all, '\\(', '\\%(', 'g')
|
||||
@@ -341,6 +361,18 @@ fun! s:InsertRefs(groupBR, prefix, group, suffix, matchline)
|
||||
return ini .. ":" .. tailBR
|
||||
endfun
|
||||
|
||||
" String append item2 to item and add ',' in between items
|
||||
fun! s:Append(item, item2)
|
||||
if a:item == ''
|
||||
return a:item2
|
||||
endif
|
||||
" there is already a trailing comma, don't add another one
|
||||
if a:item[-1:] == ','
|
||||
return a:item .. a:item2
|
||||
endif
|
||||
return a:item .. ',' .. a:item2
|
||||
endfun
|
||||
|
||||
" Input a comma-separated list of groups with backrefs, such as
|
||||
" a:groups = '\(foo\):end\1,\(bar\):end\1'
|
||||
" and return a comma-separated list of groups with backrefs replaced:
|
||||
@@ -538,8 +570,8 @@ fun! s:Choose(patterns, string, comma, branch, prefix, suffix, ...)
|
||||
else
|
||||
let currpat = substitute(current, s:notslash .. a:branch, '\\|', 'g')
|
||||
endif
|
||||
" un-escape \, to ,
|
||||
let currpat = substitute(currpat, '\\,', ',', 'g')
|
||||
" un-escape \, and \: to , and :
|
||||
let currpat = substitute(currpat, s:notslash .. '\zs\\\(:\|,\)', '\1', 'g')
|
||||
while a:string !~ a:prefix .. currpat .. a:suffix
|
||||
let tail = strpart(tail, i)
|
||||
let i = matchend(tail, s:notslash .. a:comma)
|
||||
@@ -552,6 +584,8 @@ fun! s:Choose(patterns, string, comma, branch, prefix, suffix, ...)
|
||||
else
|
||||
let currpat = substitute(current, s:notslash .. a:branch, '\\|', 'g')
|
||||
endif
|
||||
" un-escape \, and \: to , and :
|
||||
let currpat = substitute(currpat, s:notslash .. '\zs\\\(:\|,\)', '\1', 'g')
|
||||
if a:0
|
||||
let alttail = strpart(alttail, j)
|
||||
let j = matchend(alttail, s:notslash .. a:comma)
|
||||
@@ -621,7 +655,7 @@ fun! matchit#MultiMatch(spflag, mode)
|
||||
let default = escape(&mps, '[$^.*~\\/?]') .. (strlen(&mps) ? "," : "") ..
|
||||
\ '\/\*:\*\/,#\s*if\%(n\=def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
|
||||
let s:last_mps = &mps
|
||||
let match_words = match_words .. (strlen(match_words) ? "," : "") .. default
|
||||
let match_words = s:Append(match_words, default)
|
||||
let s:last_words = match_words
|
||||
if match_words !~ s:notslash .. '\\\d'
|
||||
let s:do_BR = 0
|
||||
|
||||
59
runtime/pack/dist/opt/matchit/doc/matchit.txt
vendored
59
runtime/pack/dist/opt/matchit/doc/matchit.txt
vendored
@@ -1,13 +1,7 @@
|
||||
*matchit.txt* Extended "%" matching
|
||||
*matchit.txt* Extended "%" matching Last change: 2026 Jan 06
|
||||
|
||||
For instructions on installing this file, type
|
||||
`:help matchit-install`
|
||||
inside Vim.
|
||||
VIM REFERENCE MANUAL by Benji Fisher et al
|
||||
|
||||
For Vim version 9.1. Last change: 2024 May 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Benji Fisher et al
|
||||
|
||||
*matchit* *matchit.vim*
|
||||
|
||||
@@ -174,7 +168,7 @@ defined automatically.
|
||||
|
||||
2.1 Temporarily disable the matchit plugin *matchit-disable* *:MatchDisable*
|
||||
|
||||
To temporarily disable the matchit plugin, after it hat been loaded,
|
||||
To temporarily disable the matchit plugin, after it has been loaded,
|
||||
execute this command: >
|
||||
:MatchDisable
|
||||
|
||||
@@ -259,6 +253,45 @@ Examples:
|
||||
See the $VIMRUNTIME/ftplugin/vim.vim for an example that uses both
|
||||
syntax and a regular expression.
|
||||
|
||||
*b:match_function*
|
||||
If b:match_function is defined, matchit.vim will first call this function to
|
||||
perform matching. This is useful for languages with an indentation-based block
|
||||
structure (such as Python) or other complex matching requirements that cannot
|
||||
be expressed with regular expression patterns.
|
||||
|
||||
The function should accept one argument:
|
||||
forward - 1 for forward search (% command)
|
||||
0 for backward search (g% command)
|
||||
|
||||
The function should return a list with one of these values:
|
||||
[line, col] - Match found at the specified position
|
||||
[] - No match found; fall through to regular matching
|
||||
(|b:match_words|, matchpairs, etc.)
|
||||
|
||||
The cursor position is not changed by the function; matchit handles cursor
|
||||
movement based on the returned position.
|
||||
|
||||
If the function throws an error, matchit gives up and doesn't continue.
|
||||
Enable |b:match_debug| to see error messages from custom match functions.
|
||||
|
||||
Python example (simplified): >
|
||||
let s:keywords = {'if': 'elif\|else', 'elif': 'elif\|else'}
|
||||
|
||||
function! s:PythonMatch(forward) abort
|
||||
let keyword = matchstr(getline('.'), '^\s*\zs\w\+')
|
||||
let pattern = get(s:keywords, keyword, '')
|
||||
if empty(pattern) | return [] | endif
|
||||
|
||||
let flags = a:forward ? 'nW' : 'nbW'
|
||||
let [lnum, col] = searchpos('^\s*\%(' . pattern . '\)\>', flags, 0, 0,
|
||||
\ 'indent(".") != ' . indent('.'))
|
||||
return lnum > 0 ? [lnum, col] : []
|
||||
endfunction
|
||||
|
||||
let b:match_function = function('s:PythonMatch')
|
||||
<
|
||||
See |matchit-newlang| below for more details on supporting new languages.
|
||||
|
||||
==============================================================================
|
||||
4. Supporting a New Language *matchit-newlang*
|
||||
*b:match_words*
|
||||
@@ -270,9 +303,9 @@ Vim's |regular-expression|s.
|
||||
|
||||
The format for |b:match_words| is similar to that of the 'matchpairs' option:
|
||||
it is a comma (,)-separated list of groups; each group is a colon(:)-separated
|
||||
list of patterns (regular expressions). Commas and backslashes that are part
|
||||
of a pattern should be escaped with backslashes ('\:' and '\,'). It is OK to
|
||||
have only one group; the effect is undefined if a group has only one pattern.
|
||||
list of patterns (regular expressions). Commas and colons that are part of a
|
||||
pattern should be escaped with backslashes ('\:' and '\,'). It is OK to have
|
||||
only one group; the effect is undefined if a group has only one pattern.
|
||||
A simple example is >
|
||||
:let b:match_words = '\<if\>:\<endif\>,'
|
||||
\ . '\<while\>:\<continue\>:\<break\>:\<endwhile\>'
|
||||
@@ -315,7 +348,7 @@ expression >
|
||||
if keywords are only recognized after the start of a line or after a
|
||||
semicolon (;), with optional white space.
|
||||
|
||||
*matchit-backref* *matchit-\1*
|
||||
*matchit-backref*
|
||||
In any group, the expressions |\1|, |\2|, ..., |\9| refer to parts of the
|
||||
INITIAL pattern enclosed in |\(|escaped parentheses|\)|. These are referred
|
||||
to as back references, or backrefs. For example, >
|
||||
|
||||
2
runtime/pack/dist/opt/matchit/doc/tags
vendored
2
runtime/pack/dist/opt/matchit/doc/tags
vendored
@@ -6,6 +6,7 @@ MatchError matchit.txt /*MatchError*
|
||||
]% matchit.txt /*]%*
|
||||
b:match_col matchit.txt /*b:match_col*
|
||||
b:match_debug matchit.txt /*b:match_debug*
|
||||
b:match_function matchit.txt /*b:match_function*
|
||||
b:match_ignorecase matchit.txt /*b:match_ignorecase*
|
||||
b:match_ini matchit.txt /*b:match_ini*
|
||||
b:match_iniBR matchit.txt /*b:match_iniBR*
|
||||
@@ -20,7 +21,6 @@ b:match_words matchit.txt /*b:match_words*
|
||||
g% matchit.txt /*g%*
|
||||
matchit matchit.txt /*matchit*
|
||||
matchit-% matchit.txt /*matchit-%*
|
||||
matchit-\1 matchit.txt /*matchit-\\1*
|
||||
matchit-activate matchit.txt /*matchit-activate*
|
||||
matchit-backref matchit.txt /*matchit-backref*
|
||||
matchit-bugs matchit.txt /*matchit-bugs*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" matchit.vim: (global plugin) Extended "%" matching
|
||||
" Maintainer: Christian Brabandt
|
||||
" Version: 1.20
|
||||
" Version: 1.21
|
||||
" Last Change: 2024 May 20
|
||||
" Repository: https://github.com/chrisbra/matchit
|
||||
" Previous URL:http://www.vim.org/script.php?script_id=39
|
||||
|
||||
11
runtime/pack/dist/opt/netrw/autoload/netrw.vim
vendored
11
runtime/pack/dist/opt/netrw/autoload/netrw.vim
vendored
@@ -16,6 +16,7 @@
|
||||
" 2025 Nov 13 by Vim Project don't wipe unnamed buffers #18740
|
||||
" 2025 Nov 18 by Vim Project use UNC paths when using scp and Windows paths #18764
|
||||
" 2025 Nov 28 by Vim Project fix undefined variable in *NetrwMenu #18829
|
||||
" 2025 Dec 26 by Vim Project fix use of g:netrw_cygwin #19015
|
||||
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
@@ -213,7 +214,7 @@ call s:NetrwInit("g:netrw_dirhistmax" , 10)
|
||||
call s:NetrwInit("g:netrw_fastbrowse" , 1)
|
||||
call s:NetrwInit("g:netrw_ftp_browse_reject", '^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not\|No such file\|: connect to address [0-9a-fA-F:]*: No route to host$')
|
||||
if !exists("g:netrw_ftp_list_cmd")
|
||||
if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)
|
||||
if has("unix") || g:netrw_cygwin
|
||||
let g:netrw_ftp_list_cmd = "ls -lF"
|
||||
let g:netrw_ftp_timelist_cmd = "ls -tlF"
|
||||
let g:netrw_ftp_sizelist_cmd = "ls -slF"
|
||||
@@ -320,7 +321,7 @@ call s:NetrwInit("g:netrw_menu" , 1)
|
||||
call s:NetrwInit("g:netrw_mkdir_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME mkdir")
|
||||
call s:NetrwInit("g:netrw_mousemaps" , (exists("+mouse") && &mouse =~# '[anh]'))
|
||||
call s:NetrwInit("g:netrw_retmap" , 0)
|
||||
if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)
|
||||
if has("unix") || g:netrw_cygwin
|
||||
call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME")
|
||||
elseif has("win32")
|
||||
call s:NetrwInit("g:netrw_chgperm" , "cacls FILENAME /e /p PERM")
|
||||
@@ -442,7 +443,7 @@ function netrw#Explore(indx,dosplit,style,...)
|
||||
|
||||
" record current directory
|
||||
let curdir = simplify(b:netrw_curdir)
|
||||
if !exists("g:netrw_cygwin") && has("win32")
|
||||
if !g:netrw_cygwin && has("win32")
|
||||
let curdir= substitute(curdir,'\','/','g')
|
||||
endif
|
||||
let curfiledir = substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e')
|
||||
@@ -520,7 +521,7 @@ function netrw#Explore(indx,dosplit,style,...)
|
||||
NetrwKeepj norm! 0
|
||||
|
||||
if a:0 > 0
|
||||
if a:1 =~ '^\~' && (has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin))
|
||||
if a:1 =~ '^\~' && (has("unix") || g:netrw_cygwin)
|
||||
let dirname= simplify(substitute(a:1,'\~',expand("$HOME"),''))
|
||||
elseif a:1 == '.'
|
||||
let dirname= simplify(exists("b:netrw_curdir")? b:netrw_curdir : getcwd())
|
||||
@@ -3234,7 +3235,7 @@ function s:NetrwFile(fname)
|
||||
let b:netrw_curdir= getcwd()
|
||||
endif
|
||||
|
||||
if !exists("g:netrw_cygwin") && has("win32")
|
||||
if !g:netrw_cygwin && has("win32")
|
||||
if fname =~ '^\' || fname =~ '^\a:\'
|
||||
" windows, but full path given
|
||||
let ret= fname
|
||||
|
||||
@@ -12,7 +12,7 @@ enddef
|
||||
var sent_message: bool = false
|
||||
|
||||
def OSCMessage(id: number)
|
||||
echom "Waiting for OSC52 response... Press CTRL-C to cancel"
|
||||
echo "Waiting for OSC52 response... Press CTRL-C to cancel"
|
||||
sent_message = true
|
||||
enddef
|
||||
|
||||
@@ -20,7 +20,7 @@ export def Paste(reg: string): tuple<string, list<string>>
|
||||
# Check if user has indicated that the terminal does not support OSC 52 paste
|
||||
# (or has disabled it)
|
||||
if get(g:, 'osc52_disable_paste', 0)
|
||||
return ("c", [""])
|
||||
return ("c", [])
|
||||
endif
|
||||
|
||||
# Some terminals like Kitty respect the selection type parameter on both X11
|
||||
|
||||
@@ -4,7 +4,7 @@ vim9script
|
||||
|
||||
# Author: Bram Moolenaar
|
||||
# Copyright: Vim license applies, see ":help license"
|
||||
# Last Change: 2025 Oct 08
|
||||
# Last Change: 2025 Dec 26
|
||||
# Converted to Vim9: Ubaldo Tiberi <ubaldo.tiberi@gmail.com>
|
||||
|
||||
# WORK IN PROGRESS - The basics works stable, more to come
|
||||
@@ -454,7 +454,7 @@ def GetRemotePtyCmd(gdb_cmd: list<string>): list<string>
|
||||
term_cmd = gdb_cmd[0 : gdb_pos - 1]
|
||||
# roundtrip to check if socat is available on the remote side
|
||||
silent call system(join(term_cmd, ' ') .. ' socat -h')
|
||||
if v:shell_error
|
||||
if v:shell_error != 0
|
||||
Echowarn('Install socat on the remote machine for a program window better experience')
|
||||
else
|
||||
# create a devoted tty slave device and link to stdin/stdout
|
||||
|
||||
66
runtime/syntax/bpftrace.vim
Normal file
66
runtime/syntax/bpftrace.vim
Normal file
@@ -0,0 +1,66 @@
|
||||
" Vim syntax file
|
||||
" Language: bpftrace
|
||||
" Maintainer: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
" Last Change: 2025 Dec 22
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn keyword bpftraceConditional if else
|
||||
syn keyword bpftraceRepeat while for unroll
|
||||
syn keyword bpftraceStatement break continue return
|
||||
syn keyword bpftraceKeyword let macro import config
|
||||
syn keyword bpftraceOperator sizeof offsetof
|
||||
|
||||
syn keyword bpftraceProbe BEGIN END begin end
|
||||
syn match bpftraceProbe "\v<(bench|self|test)\ze:"
|
||||
syn match bpftraceProbe "\v<(fentry|fexit|kfunc|kretfunc|kprobe|kretprobe)\ze:"
|
||||
syn match bpftraceProbe "\v<(profile|interval|iterator|hardware|software|uprobe|uretprobe)\ze:"
|
||||
syn match bpftraceProbe "\v<(usdt|tracepoint|rawtracepoint|watchpoint|asyncwatchpoint)\ze:"
|
||||
syn match bpftraceProbe "\v(^|[^:])<\zs(h|i|it|f|fr|k|kr|p|rt|s|t|u|ur|U|w|aw)\ze:"
|
||||
|
||||
syn keyword bpftraceType bool int8 int16 int32 int64
|
||||
syn keyword bpftraceType uint8 uint16 uint32 uint64
|
||||
syn keyword bpftraceType struct
|
||||
|
||||
syn match bpftraceMacro "\<\h\w*\ze\_s*("
|
||||
|
||||
syn match bpftraceNumber display "[+-]\=\<\d\+\>"
|
||||
syn match bpftraceNumber display "\<0x\x\+\>"
|
||||
|
||||
syn keyword bpftraceBoolean true false
|
||||
|
||||
syn region bpftraceString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell extend
|
||||
|
||||
syn keyword bpftraceTodo contained TODO FIXME XXX
|
||||
syn match bpftraceShebang /\%^#![^[].*/
|
||||
syn region bpftraceCommentLine start="//" end="$" contains=bpftraceTodo,@Spell
|
||||
syn region bpftraceCommentBlock matchgroup=bpftraceCommentBlock start="/\*" end="\*/" contains=bpftraceTodo,@Spell
|
||||
|
||||
" Define the default highlighting.
|
||||
hi def link bpftraceConditional Conditional
|
||||
hi def link bpftraceMacro Macro
|
||||
hi def link bpftraceRepeat Repeat
|
||||
hi def link bpftraceKeyword Keyword
|
||||
hi def link bpftraceNumber Number
|
||||
hi def link bpftraceBoolean Boolean
|
||||
hi def link bpftraceShebang Comment
|
||||
hi def link bpftraceCommentLine Comment
|
||||
hi def link bpftraceCommentBlock Comment
|
||||
hi def link bpftraceString String
|
||||
hi def link bpftraceType Type
|
||||
hi def link bpftraceProbe Identifier
|
||||
|
||||
syn sync minlines=100
|
||||
|
||||
let b:current_syntax = "bpftrace"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: ts=8 sw=8 noexpandtab
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Cangjie
|
||||
" Maintainer: Wu Junkai <wu.junkai@qq.com>
|
||||
" URL: https://github.com/WuJunkai2004/cangjie.vim
|
||||
" Last Change: 2025 Oct 12
|
||||
" Last Change: 2026 Jan 5
|
||||
"
|
||||
" The Cangjie programming language is a new-generation programming
|
||||
" language oriented to full-scenario intelligence. It features
|
||||
@@ -33,9 +33,13 @@ endfunction
|
||||
syn case match
|
||||
|
||||
" 1. comments
|
||||
syn keyword cangjieTodo TODO FIXME XXX NOTE BUG contained
|
||||
syn match cangjieComment /\v\/\/.*/ contains=cangjieTodo
|
||||
syn region cangjieComment start=/\/\*/ end=/\*\// contains=cangjieTodo,@Spell
|
||||
syn keyword cangjieTodo TODO FIXME XXX NOTE BUG contained
|
||||
syn match cangjieDocKeyword /\v\c\@(brief|param|return|note|warning|deprecated)/ contained
|
||||
syn match cangjieDocKeyword /\v\c\@(author|version|date|since|file|copyright)/ contained
|
||||
syn match cangjieDocKeyword /\v\c\@(details|link|see|throws|exception|example)/ contained
|
||||
syn match cangjieDocKeyword /\v\c\@(private|protected|public|internal)/ contained
|
||||
syn match cangjieComment /\v\/\/.*/ contains=cangjieTodo,cangjieDocKeyword
|
||||
syn region cangjieComment start=/\/\*/ end=/\*\// contains=cangjieTodo,cangjieDocKeyword,@spell
|
||||
|
||||
" 2. keywords
|
||||
syn keyword cangjieDeclaration abstract extend macro foreign
|
||||
@@ -65,27 +69,48 @@ syn match cangjieTypeName /\h\w*/ contained
|
||||
syn region cangjieSpIdentifier start=/`/ end=/`/ oneline
|
||||
|
||||
" 6. types
|
||||
syn keyword cangjieSpType Any Nothing Range Unit Iterable
|
||||
syn keyword cangjieArrayType Array ArrayList VArray
|
||||
syn keyword cangjieHashType HashMap HashSet
|
||||
syn keyword cangjieSpType Nothing Range Unit LibC Duration DefaultHasher
|
||||
syn keyword cangjieArrayType Array VArray
|
||||
syn keyword cangjieCommonType Bool Byte Rune String
|
||||
syn keyword cangjieFloatType Float16 Float32 Float64
|
||||
syn keyword cangjieIntType Int8 Int16 Int32 Int64 IntNative
|
||||
syn keyword cangjieUIntType UInt8 UInt16 UInt32 UInt64 UIntNative
|
||||
syn keyword cangjieIntType Int Int8 Int16 Int32 Int64 IntNative
|
||||
syn keyword cangjieUIntType UInt UInt8 UInt16 UInt32 UInt64 UIntNative
|
||||
syn keyword cangjieFFIType CPointer CPointerHandle CPointerResource CString CStringResource
|
||||
syn cluster cangjieTypeCluster contains=
|
||||
\ cangjieSpType,
|
||||
\ cangjieArrayType,
|
||||
\ cangjieHashType,
|
||||
\ cangjieCommonType,
|
||||
\ cangjieFloatType,
|
||||
\ cangjieIntType,
|
||||
\ cangjieUIntType
|
||||
\ cangjieUIntType,
|
||||
\ cangjieFFIType
|
||||
|
||||
" 6.1. builtin function/interface/class
|
||||
syn keyword cangjieCoreFunc acquireArrayRawData alignOf eprint eprintln ifNone ifSome max min
|
||||
syn keyword cangjieCoreFunc print println readln refEq releaseArrayRawData sizeOf sleep zeroValue
|
||||
syn keyword cangjieCoreItf Any Hasher ThreadContext Countable Collection Less Greater
|
||||
syn keyword cangjieCoreItf LessOrEqual GreaterOrEqual Comparable Equal NotEqual Equatable
|
||||
syn keyword cangjieCoreItf Hashable Iterable Resource ToString CType
|
||||
syn keyword cangjieCoreClass ArrayIterator Box Future Iterator Object RangeIterator
|
||||
syn keyword cangjieCoreClass StackTraceElement StringBuilder Thread ThreadLocal
|
||||
syn keyword cangjieCoreError ArithmeticException Error Exception IllegalArgumentException
|
||||
syn keyword cangjieCoreError IllegalFormatException IllegalMemoryException IllegalStateException
|
||||
syn keyword cangjieCoreError IncompatiblePackageException IndexOutOfBoundsException InternalError
|
||||
syn keyword cangjieCoreError NegativeArraySizeException NoneValueException OutOfMemoryError
|
||||
syn keyword cangjieCoreError OverflowException SpawnException StackOverflowError
|
||||
syn keyword cangjieCoreError TimeoutException UnsupportedException
|
||||
syn cluster cangjieBuiltinCluster contains=
|
||||
\ cangjieCoreFunc,
|
||||
\ cangjieCoreItf,
|
||||
\ cangjieCoreClass,
|
||||
\ cangjieCoreError
|
||||
|
||||
" 7. character and strings
|
||||
syn cluster cangjieInterpolatedPart contains=
|
||||
\ @cangjieKeywordCluster,
|
||||
\ cangjieSpIdentifier,
|
||||
\ @cangjieTypeCluster,
|
||||
\ @cangjieBuiltinCluster,
|
||||
\ @cangjieNumberCluster,
|
||||
\ cangjieOperator
|
||||
syn region cangjieInterpolation contained keepend start=/\${/ end=/}/ contains=@cangjieInterpolatedPart
|
||||
@@ -139,6 +164,7 @@ syn region cangjieFoldBrackets transparent fold start='\[' end='\]' contains=ALL
|
||||
" finally, link the syntax groups to the highlight groups
|
||||
if s:enabled('comment')
|
||||
hi def link cangjieTodo Todo
|
||||
hi def link cangjieDocKeyword SpecialComment
|
||||
hi def link cangjieComment Comment
|
||||
endif
|
||||
if s:enabled('identifier')
|
||||
@@ -151,6 +177,12 @@ if s:enabled('keyword')
|
||||
hi def link cangjieVariable Keyword
|
||||
hi def link cangjieOption Keyword
|
||||
endif
|
||||
if s:enabled('builtin')
|
||||
hi def link cangjieCoreFunc Function
|
||||
hi def link cangjieCoreItf Type
|
||||
hi def link cangjieCoreClass Type
|
||||
hi def link cangjieCoreError Structure
|
||||
endif
|
||||
if s:enabled('macro')
|
||||
hi def link cangjieMacro PreProc
|
||||
endif
|
||||
@@ -178,11 +210,11 @@ if s:enabled('type')
|
||||
hi def link cangjieTypeName Type
|
||||
hi def link cangjieSpType Type
|
||||
hi def link cangjieArrayType Type
|
||||
hi def link cangjieHashType Type
|
||||
hi def link cangjieCommonType Type
|
||||
hi def link cangjieFloatType Type
|
||||
hi def link cangjieIntType Type
|
||||
hi def link cangjieUIntType Type
|
||||
hi def link cangjieFFIType Type
|
||||
endif
|
||||
|
||||
let b:current_syntax = "cangjie"
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
" Vim syntax file
|
||||
" Language: C++
|
||||
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
|
||||
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Previous Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
|
||||
" Ken Shan <ccshan@post.harvard.edu>
|
||||
" Last Change: 2024 May 04
|
||||
" 2024 May 04 by Vim Project (fix digit separator in octals and floats)
|
||||
" 2024 May 04 by Vim Project fix digit separator in octals and floats
|
||||
" 2026 Jan 06 by Vim Project orphaning announcement
|
||||
" 2026 Jan 08 by Vim Project highlight capital letter prefixes for numbers
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -57,11 +60,11 @@ if !exists("cpp_no_cpp14")
|
||||
syn match cppNumber display contained "\<0\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppNumber display contained "\<[1-9]\('\=\d\+\)*\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppNumber display contained "\<0\('\=\o\+\)\+\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppNumber display contained "\<0b[01]\('\=[01]\+\)*\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppNumber display contained "\<0x\x\('\=\x\+\)*\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppFloat display contained "\<\d\('\=\d\+\)*\.\(\d\('\=\d\+\)*\)\=\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppFloat display contained "\.\d\('\=\d\+\)*\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppFloat display contained "\<\d\+e[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppNumber display contained "\<0[Bb][01]\('\=[01]\+\)*\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppNumber display contained "\<0[Xx]\x\('\=\x\+\)*\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppFloat display contained "\<\d\('\=\d\+\)*\.\(\d\('\=\d\+\)*\)\=\([Ee][-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppFloat display contained "\.\d\('\=\d\+\)*\([Ee][-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppFloat display contained "\<\d\+[Ee][-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn region cppString start=+\(L\|u\|u8\|U\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"\(sv\|s\|_\i*\)\=+ end='$' contains=cSpecial,cFormat,@Spell
|
||||
endif
|
||||
|
||||
@@ -69,8 +72,8 @@ endif
|
||||
if !exists("cpp_no_cpp17")
|
||||
syn match cppCast "\<reinterpret_pointer_cast\s*<"me=e-1
|
||||
syn match cppCast "\<reinterpret_pointer_cast\s*$"
|
||||
syn match cppFloat display contained "\<0x\x*\.\x\+p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppFloat display contained "\<0x\x\+\.\=p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppFloat display contained "\<0[Xx]\x*\.\x\+p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppFloat display contained "\<0[Xx]\x\+\.\=p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
|
||||
" TODO: push this up to c.vim if/when supported in C23
|
||||
syn match cppCharacter "u8'[^\\]'"
|
||||
@@ -92,8 +95,8 @@ if !exists("cpp_no_cpp20")
|
||||
syn match cppNumber display contained "\<0\(y\|d\)\>"
|
||||
syn match cppNumber display contained "\<[1-9]\('\=\d\+\)*\(y\|d\)\>"
|
||||
syn match cppNumber display contained "\<0\o\+\(y\|d\)\>"
|
||||
syn match cppNumber display contained "\<0b[01]\('\=[01]\+\)*\(y\|d\)\>"
|
||||
syn match cppNumber display contained "\<0x\x\('\=\x\+\)*\(y\|d\)\>"
|
||||
syn match cppNumber display contained "\<0[Bb][01]\('\=[01]\+\)*\(y\|d\)\>"
|
||||
syn match cppNumber display contained "\<0[Xx]\x\('\=\x\+\)*\(y\|d\)\>"
|
||||
syn keyword cppStatement co_await co_return co_yield requires
|
||||
syn keyword cppStorageClass consteval constinit
|
||||
syn keyword cppStructure concept
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Haskell
|
||||
" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org>
|
||||
" (need to be subscribed to post)
|
||||
" Last Change: 2024 Mar 28 by Enrico Maria De Angelis <enricomaria.dean6elis@gmail.com>
|
||||
" 2025 Nov 20 by Vim Project: Allow spaces in backticks #18776
|
||||
" Original Author: John Williams <jrw@pobox.com>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
" Markdown style, TeX style and plain text surrounding
|
||||
" \begin{code} \end{code} blocks
|
||||
" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org>
|
||||
" (need to be subscribed to post)
|
||||
" Original Author: Arthur van Leeuwen <arthurvl@cs.uu.nl>
|
||||
" Last Change: 2020 Feb 25
|
||||
" Version: 1.05
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"
|
||||
" Language: Logtalk
|
||||
" Maintainer: Paulo Moura <pmoura@logtalk.org>
|
||||
" Last Change: December 16, 2023
|
||||
" Last Change: October 6, 2025
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ syn region logtalkAtom start=+'+ skip=+\\'+ end=+'+ contains=logtalkEscapeSequ
|
||||
syn match logtalkEscapeSequence contained "\\\([\\abfnrtv\"\']\|\(x[a-fA-F0-9]\+\|[0-7]\+\)\\\)"
|
||||
|
||||
|
||||
" Logtalk message sending operators
|
||||
" Logtalk message-sending operators
|
||||
|
||||
syn match logtalkOperator "::"
|
||||
syn match logtalkOperator "\(0'\)\@<!:"
|
||||
@@ -85,6 +85,7 @@ syn region logtalkDir matchgroup=logtalkDirTag start=":- encoding(" matchgroup
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- initialization(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- info(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- mode(" matchgroup=logtalkDirTag end=")\." contains=logtalkOperator, logtalkAtom
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- mode_non_terminal(" matchgroup=logtalkDirTag end=")\." contains=logtalkOperator, logtalkAtom
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- dynamic(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn match logtalkDirTag ":- built_in\."
|
||||
syn match logtalkDirTag ":- dynamic\."
|
||||
@@ -189,7 +190,7 @@ syn match logtalkOperator "-->"
|
||||
syn match logtalkOperator "->"
|
||||
syn match logtalkKeyword "\<throw\ze("
|
||||
syn match logtalkKeyword "\<\(instantiation\|system\)_error\>"
|
||||
syn match logtalkKeyword "\<\(uninstantiation\|type\|domain\|existence\|permission\|representation\|evaluation\|resource\|syntax\)_error\ze("
|
||||
syn match logtalkKeyword "\<\(uninstantiation\|type\|domain\|consistency\|existence\|permission\|representation\|evaluation\|resource\|syntax\)_error\ze("
|
||||
|
||||
|
||||
" Term unification
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: Lynx Web Browser Configuration (lynx.cfg)
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2023 Nov 09
|
||||
" Last Change: 2026 Jan 08
|
||||
|
||||
" Lynx 2.8.9
|
||||
" Lynx 2.9.2
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -18,7 +18,8 @@ syn match lynxComment "\%(^\|\s\+\)#.*" contains=lynxTodo
|
||||
|
||||
syn keyword lynxTodo TODO NOTE FIXME XXX contained
|
||||
|
||||
syn match lynxDelimiter ":" skipwhite nextgroup=lynxBoolean,lynxHttpProtocol,lynxNumber,lynxNone,lynxRCOption
|
||||
syn match lynxDelimiter ":" contained
|
||||
\ skipwhite nextgroup=lynxBoolean,lynxHttpProtocol,lynxNumber,lynxNone,lynxRCOption
|
||||
|
||||
syn case ignore
|
||||
syn keyword lynxBoolean TRUE FALSE ON OFF contained
|
||||
@@ -30,99 +31,93 @@ syn match lynxHttpProtocol "\<1\.[01]\>" contained
|
||||
|
||||
"{{{ Options
|
||||
syn case ignore
|
||||
syn keyword lynxOption ACCEPT_ALL_COOKIES ALERTSECS
|
||||
\ ALWAYS_RESUBMIT_POSTS ALWAYS_TRUSTED_EXEC ANONFTP_PASSWORD
|
||||
\ ASSUMED_COLOR ASSUMED_DOC_CHARSET_CHOICE ASSUME_CHARSET
|
||||
\ ASSUME_LOCAL_CHARSET ASSUME_UNREC_CHARSET AUTO_SESSION
|
||||
\ AUTO_UNCACHE_DIRLISTS BAD_HTML BIBP_BIBHOST BIBP_GLOBAL_SERVER
|
||||
\ BLOCK_MULTI_BOOKMARKS BOLD_H1 BOLD_HEADERS BOLD_NAME_ANCHORS
|
||||
\ BOOKMARK_FILE BROKEN_FTP_EPSV BROKEN_FTP_RETR BZIP2_PATH
|
||||
\ CASE_SENSITIVE_ALWAYS_ON CASE_SENSITIVE_SEARCHING CHARACTER_SET
|
||||
\ CHARSETS_DIRECTORY CHARSET_SWITCH_RULES CHECKMAIL CHMOD_PATH
|
||||
\ COLLAPSE_BR_TAGS COLOR COLOR_STYLE COMPRESS_PATH CONNECT_TIMEOUT
|
||||
\ COOKIE_ACCEPT_DOMAINS COOKIE_FILE COOKIE_LOOSE_INVALID_DOMAINS
|
||||
\ COOKIE_QUERY_INVALID_DOMAINS COOKIE_REJECT_DOMAINS COOKIE_SAVE_FILE
|
||||
\ COOKIE_STRICT_INVALID_DOMAINS COPY_PATH CSO_PROXY CSWING_PATH
|
||||
\ DEBUGSECS DEFAULT_BOOKMARK_FILE DEFAULT_CACHE_SIZE DEFAULT_COLORS
|
||||
\ DEFAULT_EDITOR DEFAULT_INDEX_FILE DEFAULT_KEYPAD_MODE
|
||||
\ DEFAULT_KEYPAD_MODE_IS_NUMBERS_AS_ARROWS DEFAULT_USER_MODE
|
||||
\ DEFAULT_VIRTUAL_MEMORY_SIZE DELAYSECS DIRED_MENU DIR_LIST_ORDER
|
||||
\ DIR_LIST_STYLE DISPLAY DISPLAY_CHARSET_CHOICE DOWNLOADER EMACS_KEYS
|
||||
\ EMACS_KEYS_ALWAYS_ON ENABLE_LYNXRC ENABLE_SCROLLBACK EXTERNAL
|
||||
\ FILE_EDITOR FILE_SORTING_METHOD FINGER_PROXY FOCUS_WINDOW
|
||||
\ FORCE_8BIT_TOUPPER FORCE_COOKIE_PROMPT FORCE_EMPTY_HREFLESS_A
|
||||
\ FORCE_SSL_COOKIES_SECURE FORCE_SSL_PROMPT FORMS_OPTIONS FTP_FORMAT
|
||||
\ FTP_PASSIVE FTP_PROXY GLOBAL_EXTENSION_MAP GLOBAL_MAILCAP
|
||||
\ GOPHER_PROXY GOTOBUFFER GZIP_PATH HELPFILE HIDDEN_LINK_MARKER
|
||||
\ HISTORICAL_COMMENTS HTMLSRC_ATTRNAME_XFORM HTMLSRC_TAGNAME_XFORM
|
||||
\ HTTPS_PROXY HTTP_PROXY INCLUDE INFLATE_PATH INFOSECS INSTALL_PATH
|
||||
\ JUMPBUFFER JUMPFILE JUMP_PROMPT JUSTIFY JUSTIFY_MAX_VOID_PERCENT
|
||||
\ KBLAYOUT KEYBOARD_LAYOUT KEYMAP KEYPAD_MODE
|
||||
\ LEFTARROW_IN_TEXTFIELD_PROMPT LINEEDIT_MODE LIST_FORMAT
|
||||
\ LIST_NEWS_DATES LIST_NEWS_NUMBERS LOCALE_CHARSET LOCALHOST_ALIAS
|
||||
\ LOCAL_DOMAIN LOCAL_EXECUTION_LINKS_ALWAYS_ON
|
||||
\ LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE LYNXCGI_DOCUMENT_ROOT
|
||||
\ LYNXCGI_ENVIRONMENT LYNX_HOST_NAME LYNX_SIG_FILE MAIL_ADRS
|
||||
\ MAIL_SYSTEM_ERROR_LOGGING MAKE_LINKS_FOR_ALL_IMAGES
|
||||
\ MAKE_PSEUDO_ALTS_FOR_INLINES MAX_COOKIES_BUFFER MAX_COOKIES_DOMAIN
|
||||
\ MAX_COOKIES_GLOBAL MESSAGESECS MINIMAL_COMMENTS MKDIR_PATH
|
||||
\ MULTI_BOOKMARK MULTI_BOOKMARK_SUPPORT MV_PATH NCR_IN_BOOKMARKS
|
||||
\ NESTED_TABLES NEWSPOST_PROXY NEWSREPLY_PROXY NEWS_CHUNK_SIZE
|
||||
\ NEWS_MAX_CHUNK NEWS_POSTING NEWS_PROXY NNTPSERVER NNTP_PROXY
|
||||
\ NONRESTARTING_SIGWINCH NO_DOT_FILES NO_FILE_REFERER
|
||||
\ NO_FORCED_CORE_DUMP NO_FROM_HEADER NO_ISMAP_IF_USEMAP NO_MARGINS
|
||||
\ NO_PAUSE NO_PROXY NO_REFERER_HEADER NO_TABLE_CENTER NO_TITLE
|
||||
\ NUMBER_FIELDS_ON_LEFT NUMBER_LINKS_ON_LEFT OUTGOING_MAIL_CHARSET
|
||||
\ PARTIAL PARTIAL_THRES PERSISTENT_COOKIES PERSONAL_EXTENSION_MAP
|
||||
\ PERSONAL_MAILCAP PERSONAL_MAIL_ADDRESS POSITIONABLE_EDITOR
|
||||
\ PREFERRED_CHARSET PREFERRED_ENCODING PREFERRED_LANGUAGE
|
||||
\ PREFERRED_MEDIA_TYPES PREPEND_BASE_TO_SOURCE
|
||||
\ PREPEND_CHARSET_TO_SOURCE PRETTYSRC PRETTYSRC_SPEC
|
||||
\ PRETTYSRC_VIEW_NO_ANCHOR_NUMBERING PRINTER QUIT_DEFAULT_YES RAW_MODE
|
||||
\ READ_TIMEOUT REFERER_WITH_QUERY REPLAYSECS REUSE_TEMPFILES
|
||||
\ RLOGIN_PATH RM_PATH RMDIR_PATH RULE RULESFILE
|
||||
\ RUN_ALL_EXECUTION_LINKS RUN_EXECUTION_LINKS_LOCAL SAVE_SPACE
|
||||
\ SCAN_FOR_BURIED_NEWS_REFS SCREEN_SIZE SCROLLBAR SCROLLBAR_ARROW
|
||||
\ SEEK_FRAG_AREA_IN_CUR SEEK_FRAG_MAP_IN_CUR SELECT_POPUPS
|
||||
\ SEND_USERAGENT SESSION_FILE SESSION_LIMIT SET_COOKIES SETFONT_PATH
|
||||
\ SHOW_COLOR SHOW_CURSOR SHOW_DOTFILES SHOW_KB_NAME SHOW_KB_RATE
|
||||
\ SNEWSPOST_PROXY SNEWSREPLY_PROXY SNEWS_PROXY SOFT_DQUOTES
|
||||
\ SOURCE_CACHE SOURCE_CACHE_FOR_ABORTED SSL_CERT_FILE STARTFILE
|
||||
\ STATUS_BUFFER_SIZE STRIP_DOTDOT_URLS SUBSTITUTE_UNDERSCORES
|
||||
\ SUB_BOOKMARKS SUFFIX SUFFIX_ORDER SYSLOG_REQUESTED_URLS SYSLOG_TEXT
|
||||
\ SYSTEM_EDITOR SYSTEM_MAIL SYSTEM_MAIL_FLAGS TAGSOUP TAR_PATH
|
||||
\ TELNET_PATH TEXTFIELDS_NEED_ACTIVATION TIMEOUT TN3270_PATH
|
||||
\ TOUCH_PATH TRIM_INPUT_FIELDS TRUSTED_EXEC TRUSTED_LYNXCGI
|
||||
\ UNCOMPRESS_PATH UNDERLINE_LINKS UNZIP_PATH UPLOADER
|
||||
\ URL_DOMAIN_PREFIXES URL_DOMAIN_SUFFIXES USERAGENT USER_MODE
|
||||
\ USE_FIXED_RECORDS USE_MOUSE USE_SELECT_POPUPS UUDECODE_PATH
|
||||
\ VERBOSE_IMAGES VIEWER VISITED_LINKS VI_KEYS VI_KEYS_ALWAYS_ON
|
||||
\ WAIS_PROXY XHTML_PARSING XLOADIMAGE_COMMAND ZCAT_PATH ZIP_PATH
|
||||
\ TRIM_BLANK_LINES GUESS_SCHEME HTTP_PROTOCOL HTML5_CHARSETS
|
||||
\ TRIM_BLANK_LINES PREFERRED_CONTENT_TYPE SSL_CLIENT_CERT_FILE
|
||||
\ SSL_CLIENT_KEY_FILE MAX_URI_SIZE UNIQUE_URLS MESSAGE_LANGUAGE
|
||||
\ CONV_JISX0201KANA WAIT_VIEWER_TERMINATION BLAT_MAIL ALT_BLAT_MAIL
|
||||
\ DONT_WRAP_PRE TRACK_INTERNAL_LINKS FORCE_HTML HIDDENLINKS SHORT_URL
|
||||
\ LISTONLY LIST_INLINE LOCALHOST WITH_BACKSPACES
|
||||
\ contained nextgroup=lynxDelimiter
|
||||
syn keyword lynxRCOption accept_all_cookies assume_charset auto_session
|
||||
\ bookmark_file case_sensitive_searching character_set
|
||||
\ collapse_br_tags cookie_accept_domains cookie_file
|
||||
\ cookie_loose_invalid_domains cookie_query_invalid_domains
|
||||
\ cookie_reject_domains cookie_strict_invalid_domain
|
||||
\ cookie_strict_invalid_domains dir_list_style display emacs_keys
|
||||
\ file_editor file_sorting_method force_cookie_prompt force_ssl_prompt
|
||||
\ ftp_passive html5_charsets http_protocol kblayout keypad_mode
|
||||
\ lineedit_mode locale_charset make_links_for_all_images
|
||||
\ make_pseudo_alts_for_inlines multi_bookmark no_pause
|
||||
\ personal_mail_address preferred_charset preferred_encoding
|
||||
\ preferred_language preferred_media_types raw_mode
|
||||
\ run_all_execution_links run_execution_links_local
|
||||
\ run_execution_links_on_local_files scrollbar select_popups
|
||||
\ send_useragent session_file set_cookies show_color show_cursor
|
||||
\ show_dotfiles show_kb_rate sub_bookmarks tagsoup underline_links
|
||||
\ useragent user_mode verbose_images vi_keys visited_links
|
||||
\ contained nextgroup=lynxDelimiter
|
||||
|
||||
syn keyword lynxOption ACCEPT_ALL_COOKIES ALERTSECS ALT_BLAT_MAIL
|
||||
\ ALWAYS_RESUBMIT_POSTS ALWAYS_TRUSTED_EXEC ASSUME_CHARSET ASSUMED_COLOR
|
||||
\ ASSUMED_DOC_CHARSET_CHOICE ASSUME_LOCAL_CHARSET ASSUME_UNREC_CHARSET
|
||||
\ AUTO_SESSION AUTO_UNCACHE_DIRLISTS BIBP_BIBHOST BIBP_GLOBAL_SERVER
|
||||
\ BLAT_MAIL BLOCK_MULTI_BOOKMARKS BOLD_H1 BOLD_HEADERS BOLD_NAME_ANCHORS
|
||||
\ BROKEN_FTP_EPSV BROKEN_FTP_RETR BZIP2_PATH CASE_SENSITIVE_ALWAYS_ON
|
||||
\ CHARACTER_SET CHARSETS_DIRECTORY CHARSET_SWITCH_RULES CHECKMAIL
|
||||
\ CHMOD_PATH COLLAPSE_BR_TAGS COLOR COLOR_STYLE COMPRESS_PATH
|
||||
\ CONNECT_TIMEOUT CONV_JISX0201KANA COOKIE_ACCEPT_DOMAINS COOKIE_FILE
|
||||
\ COOKIE_LOOSE_INVALID_DOMAINS COOKIE_QUERY_INVALID_DOMAINS
|
||||
\ COOKIE_REJECT_DOMAINS COOKIE_SAVE_FILE COOKIE_STRICT_INVALID_DOMAINS
|
||||
\ COOKIE_VERSION COPY_PATH CSO_PROXY CSWING_PATH DEBUGSECS
|
||||
\ DEFAULT_BOOKMARK_FILE DEFAULT_CACHE_SIZE DEFAULT_COLORS DEFAULT_EDITOR
|
||||
\ DEFAULT_INDEX_FILE DEFAULT_KEYPAD_MODE
|
||||
\ DEFAULT_KEYPAD_MODE_IS_NUMBERS_AS_ARROWS DEFAULT_USER_MODE
|
||||
\ DEFAULT_VIRTUAL_MEMORY_SIZE DIRED_MENU DISPLAY_CHARSET_CHOICE
|
||||
\ DONT_WRAP_PRE DOWNLOADER EMACS_KEYS_ALWAYS_ON ENABLE_LYNXRC
|
||||
\ ENABLE_SCROLLBACK EXTERNAL EXTERNAL_MENU FINGER_PROXY
|
||||
\ FORCE_8BIT_TOUPPER FORCE_COOKIE_PROMPT FORCE_EMPTY_HREFLESS_A
|
||||
\ FORCE_HTML FORCE_SSL_COOKIES_SECURE FORCE_SSL_PROMPT FORMS_OPTIONS
|
||||
\ FTP_FORMAT FTP_PASSIVE FTP_PROXY GLOBAL_EXTENSION_MAP GLOBAL_MAILCAP
|
||||
\ GOPHER_PROXY GOTOBUFFER GUESS_SCHEME GZIP_PATH HELPFILE
|
||||
\ HIDDEN_LINK_MARKER HIDDENLINKS HISTORICAL_COMMENTS HTML5_CHARSETS
|
||||
\ HTMLSRC_ATTRNAME_XFORM HTMLSRC_TAGNAME_XFORM HTTP_PROTOCOL HTTP_PROXY
|
||||
\ HTTPS_PROXY INCLUDE INFLATE_PATH INFOSECS INSTALL_PATH JUMPBUFFER
|
||||
\ JUMPFILE JUMP_PROMPT JUSTIFY JUSTIFY_MAX_VOID_PERCENT KEYBOARD_LAYOUT
|
||||
\ KEYMAP LEFTARROW_IN_TEXTFIELD_PROMPT LIST_DECODED LIST_FORMAT
|
||||
\ LIST_INLINE LIST_NEWS_DATES LIST_NEWS_NUMBERS LISTONLY LOCAL_DOMAIN
|
||||
\ LOCALE_CHARSET LOCAL_EXECUTION_LINKS_ALWAYS_ON
|
||||
\ LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE LOCALHOST LOCALHOST_ALIAS
|
||||
\ LYNXCGI_DOCUMENT_ROOT LYNXCGI_ENVIRONMENT LYNX_HOST_NAME LYNX_SIG_FILE
|
||||
\ MAIL_ADRS MAIL_SYSTEM_ERROR_LOGGING MAKE_LINKS_FOR_ALL_IMAGES
|
||||
\ MAKE_PSEUDO_ALTS_FOR_INLINES MAX_COOKIES_BUFFER MAX_COOKIES_DOMAIN
|
||||
\ MAX_COOKIES_GLOBAL MAX_URI_SIZE MESSAGE_LANGUAGE MESSAGESECS
|
||||
\ MINIMAL_COMMENTS MKDIR_PATH MULTI_BOOKMARK_SUPPORT MV_PATH
|
||||
\ NCR_IN_BOOKMARKS NESTED_TABLES NEWS_CHUNK_SIZE NEWS_MAX_CHUNK
|
||||
\ NEWS_POSTING NEWSPOST_PROXY NEWS_PROXY NEWSREPLY_PROXY NNTP_PROXY
|
||||
\ NNTPSERVER NO_DOT_FILES NO_FILE_REFERER NO_FORCED_CORE_DUMP
|
||||
\ NO_FROM_HEADER NO_ISMAP_IF_USEMAP NO_MARGINS NONRESTARTING_SIGWINCH
|
||||
\ NO_PAUSE NO_PROXY NO_REFERER_HEADER NO_TABLE_CENTER NO_TITLE
|
||||
\ NUMBER_FIELDS_ON_LEFT NUMBER_LINKS_ON_LEFT OUTGOING_MAIL_CHARSET
|
||||
\ PARTIAL PARTIAL_THRES PERSISTENT_COOKIES PERSONAL_EXTENSION_MAP
|
||||
\ PERSONAL_MAILCAP PREFERRED_CHARSET PREFERRED_CONTENT_TYPE
|
||||
\ PREFERRED_ENCODING PREFERRED_LANGUAGE PREFERRED_MEDIA_TYPES
|
||||
\ PREPEND_BASE_TO_SOURCE PREPEND_CHARSET_TO_SOURCE PRETTYSRC
|
||||
\ PRETTYSRC_SPEC PRETTYSRC_VIEW_NO_ANCHOR_NUMBERING PRINTER
|
||||
\ QUIT_DEFAULT_YES READ_TIMEOUT REDIRECTION_LIMIT REFERER_WITH_QUERY
|
||||
\ REPLAYSECS REUSE_TEMPFILES RLOGIN_PATH RMDIR_PATH RM_PATH RULE
|
||||
\ RULESFILE SAVE_SPACE SCAN_FOR_BURIED_NEWS_REFS SCREEN_SIZE SCROLLBAR
|
||||
\ SCROLLBAR_ARROW SEEK_FRAG_AREA_IN_CUR SEEK_FRAG_MAP_IN_CUR
|
||||
\ SESSION_FILE SESSION_LIMIT SET_COOKIES SETFONT_PATH SHORT_URL
|
||||
\ SHOW_CURSOR SHOW_KB_NAME SHOW_KB_RATE SNEWSPOST_PROXY SNEWS_PROXY
|
||||
\ SNEWSREPLY_PROXY SOFT_DQUOTES SOURCE_CACHE SOURCE_CACHE_FOR_ABORTED
|
||||
\ SSL_CERT_FILE SSL_CLIENT_CERT_FILE SSL_CLIENT_KEY_FILE STARTFILE
|
||||
\ STATUS_BUFFER_SIZE STRIP_DOTDOT_URLS SUBSTITUTE_UNDERSCORES SUFFIX
|
||||
\ SUFFIX_ORDER SYSLOG_REQUESTED_URLS SYSLOG_TEXT SYSTEM_EDITOR
|
||||
\ SYSTEM_MAIL SYSTEM_MAIL_FLAGS TAGSOUP TAR_PATH TELNET_PATH
|
||||
\ TEXTFIELDS_NEED_ACTIVATION TN3270_PATH TOUCH_PATH TRACK_INTERNAL_LINKS
|
||||
\ TRIM_BLANK_LINES TRIM_INPUT_FIELDS TRUSTED_EXEC TRUSTED_LYNXCGI
|
||||
\ UNCOMPRESS_PATH UNDERLINE_LINKS UNIQUE_URLS UNZIP_PATH
|
||||
\ UPDATE_TERM_TITLE UPLOADER URL_DOMAIN_PREFIXES URL_DOMAIN_SUFFIXES
|
||||
\ USE_FIXED_RECORDS USE_MOUSE USE_SELECT_POPUPS UUDECODE_PATH
|
||||
\ VERBOSE_IMAGES VIEWER VI_KEYS_ALWAYS_ON WAIS_PROXY
|
||||
\ WAIT_VIEWER_TERMINATION WITH_BACKSPACES XHTML_PARSING
|
||||
\ XLOADIMAGE_COMMAND ZCAT_PATH ZIP_PATH
|
||||
\ contained nextgroup=lynxDelimiter
|
||||
|
||||
syn keyword lynxRCOption accept_all_cookies anonftp_password assume_charset
|
||||
\ auto_session bad_html bookmark_file case_sensitive_searching
|
||||
\ character_set collapse_br_tags cookie_accept_domains cookie_file
|
||||
\ cookie_loose_invalid_domains cookie_query_invalid_domains
|
||||
\ cookie_reject_domains cookie_strict_invalid_domain cookie_version
|
||||
\ dir_list_order dir_list_style display emacs_keys file_editor
|
||||
\ file_sorting_method force_cookie_prompt force_ssl_prompt ftp_passive
|
||||
\ html5_charsets http_protocol idna_mode kblayout keypad_mode
|
||||
\ lineedit_mode locale_charset make_links_for_all_images
|
||||
\ make_pseudo_alts_for_inlines multi_bookmark no_pause
|
||||
\ personal_mail_address personal_mail_name preferred_charset
|
||||
\ preferred_content_type preferred_encoding preferred_language
|
||||
\ preferred_media_types raw_mode run_all_execution_links
|
||||
\ run_execution_links_local scrollbar select_popups send_useragent
|
||||
\ session_file set_cookies show_color show_cursor show_dotfiles
|
||||
\ show_kb_rate sub_bookmarks tagsoup trim_blank_lines underline_links
|
||||
\ useragent user_mode verbose_images vi_keys visited_links
|
||||
\ contained nextgroup=lynxDelimiter
|
||||
|
||||
syn case match
|
||||
" }}}
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
" 2025 Apr 15 by Vim project: rework Make flavor detection (#17089)
|
||||
" 2025 Oct 12 by Vim project: update makeDefine highlighting (#18403)
|
||||
" 2025 Oct 25 by Vim project: update makeTargetinDefine highlighting (#18570)
|
||||
" 2025 Dec 23 by Vim project: fix too greedy match (#18938)
|
||||
" 2025 Dec 23 by Vim project: wrong highlight with paranthesis inside quotes (#18818)
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -40,21 +42,21 @@ syn match makeIdent "\$\$\w*"
|
||||
syn match makeIdent "\$\$\$\$\w*" containedin=makeDefine
|
||||
syn match makeIdent "\$[^({]"
|
||||
syn match makeIdent "\$\$[^({]" containedin=makeDefine
|
||||
if get(b:, 'make_flavor', s:make_flavor) == 'microsoft'
|
||||
syn region makeIdent start="\$(" end=")" contains=makeStatement,makeIdent,makeDString,makeSString
|
||||
syn region makeIdent start="\${" end="}" contains=makeStatement,makeIdent,makeDString,makeSString
|
||||
syn region makeIdent start="\$\$(" end=")" containedin=makeDefine contains=makeStatement,makeIdent,makeDString,makeSString
|
||||
syn region makeIdent start="\$\${" end="}" containedin=makeDefine contains=makeStatement,makeIdent,makeDString,makeSString
|
||||
else
|
||||
syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent,makeDString,makeSString
|
||||
syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent,makeDString,makeSString
|
||||
syn region makeIdent start="\$\$(" skip="\\)\|\\\\" end=")" containedin=makeDefine contains=makeStatement,makeIdent,makeDString,makeSString
|
||||
syn region makeIdent start="\$\${" skip="\\}\|\\\\" end="}" containedin=makeDefine contains=makeStatement,makeIdent,makeDString,makeSString
|
||||
endif
|
||||
syn match makeIdent "^ *[^:#= \t]*\s*[:+?!*]="me=e-2
|
||||
syn match makeIdent "^ *[^:#= \t]*\s*::="me=e-3
|
||||
syn match makeIdent "^ *[^:#= \t]*\s*="me=e-1
|
||||
syn match makeIdent "%"
|
||||
if get(b:, 'make_flavor', s:make_flavor) == 'microsoft'
|
||||
syn region makeIdent start="\$(" end=")" contains=makeStatement,makeIdent
|
||||
syn region makeIdent start="\${" end="}" contains=makeStatement,makeIdent
|
||||
syn region makeIdent start="\$\$(" end=")" containedin=makeDefine contains=makeStatement,makeIdent
|
||||
syn region makeIdent start="\$\${" end="}" containedin=makeDefine contains=makeStatement,makeIdent
|
||||
else
|
||||
syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent
|
||||
syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent
|
||||
syn region makeIdent start="\$\$(" skip="\\)\|\\\\" end=")" containedin=makeDefine contains=makeStatement,makeIdent
|
||||
syn region makeIdent start="\$\${" skip="\\}\|\\\\" end="}" containedin=makeDefine contains=makeStatement,makeIdent
|
||||
endif
|
||||
|
||||
" Makefile.in variables
|
||||
syn match makeConfig "@[A-Za-z0-9_]\+@"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim syntax file
|
||||
" Language: Mason (Perl embedded in HTML)
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
" License: Vim License (see :help license)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim syntax file
|
||||
" Language: Perl
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
" License: Vim License (see :help license)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim syntax file
|
||||
" Language: Perl POD format
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Previously: Scott Bigham <dsb@killerbunnies.org>
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: Privoxy actions file
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/privoxy.vim
|
||||
" Last Change: 2007 Mar 30
|
||||
" Last Change: 2026 Jan 07
|
||||
|
||||
" Privoxy 3.0.6
|
||||
" Privoxy 4.1.0
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -13,59 +12,172 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal iskeyword=@,48-57,_,-
|
||||
syn region privoxyActionsBlock matchgroup=privoxyBraces start="^\s*\zs{" end="}"
|
||||
\ contains=@privoxyActionPrefix,privoxyLineContinuation
|
||||
|
||||
syn keyword privoxyTodo contained TODO FIXME XXX NOTE
|
||||
" Actions {{{
|
||||
let s:actions =<< trim END
|
||||
add-header
|
||||
block
|
||||
change-x-forwarded-for
|
||||
client-header-filter
|
||||
client-body-filter
|
||||
client-body-tagger
|
||||
client-header-tagger
|
||||
content-type-overwrite
|
||||
crunch-client-header
|
||||
crunch-if-none-match
|
||||
crunch-incoming-cookies
|
||||
crunch-outgoing-cookies
|
||||
crunch-server-header
|
||||
deanimate-gifs
|
||||
delay-response
|
||||
downgrade-http-version
|
||||
external-filter
|
||||
fast-redirects
|
||||
filter
|
||||
filter-client-headers
|
||||
filter-server-headers
|
||||
force-text-mode
|
||||
forward-override
|
||||
handle-as-empty-document
|
||||
handle-as-image
|
||||
hide-accept-language
|
||||
hide-content-disposition
|
||||
hide-forwarded-for-headers
|
||||
hide-from-header
|
||||
hide-if-modified-since
|
||||
hide-referrer
|
||||
hide-referer
|
||||
hide-user-agent
|
||||
https-inspection
|
||||
ignore-certificate-errors
|
||||
limit-connect
|
||||
limit-cookie-lifetime
|
||||
prevent-compression
|
||||
prevent-keeping-cookies
|
||||
overwrite-last-modified
|
||||
redirect
|
||||
server-header-filter
|
||||
server-header-tagger
|
||||
suppress-tag
|
||||
session-cookies-only
|
||||
set-image-blocker
|
||||
END
|
||||
|
||||
for s:action in s:actions
|
||||
exe 'syn match privoxyAction "\<' .. s:action .. '\>" contained nextgroup=privoxyParams'
|
||||
endfor
|
||||
unlet s:action s:actions
|
||||
|
||||
syn region privoxyParams matchgroup=privoxyParamBraces start="{" end="}" contained
|
||||
|
||||
syn match privoxyFilterAction "\<filter\>-\@!" contained nextgroup=privoxyFilterParams
|
||||
syn region privoxyFilterParams matchgroup=privoxyParamBraces start="{" end="}" contained contains=privoxyFilterArg
|
||||
|
||||
syn cluster privoxyAction contains=privoxyAction,privoxyFilterAction
|
||||
" }}}
|
||||
|
||||
" Filters {{{
|
||||
let s:filters =<< trim END
|
||||
allow-autocompletion
|
||||
all-popups
|
||||
banners-by-link
|
||||
banners-by-size
|
||||
blogspot
|
||||
bundeswehr
|
||||
content-cookies
|
||||
crude-parental
|
||||
demoronizer
|
||||
frameset-borders
|
||||
fun
|
||||
github
|
||||
google
|
||||
html-annoyances
|
||||
ie-exploits
|
||||
iframes
|
||||
imdb
|
||||
img-reorder
|
||||
js-annoyances
|
||||
js-events
|
||||
jumping-windows
|
||||
msn
|
||||
no-ping
|
||||
quicktime-kioskmode
|
||||
refresh-tags
|
||||
shockwave-flash
|
||||
site-specifics
|
||||
sourceforge
|
||||
tiny-textforms
|
||||
unsolicited-popups
|
||||
webbugs
|
||||
yahoo
|
||||
x-httpd-php-to-html
|
||||
html-to-xml
|
||||
xml-to-html
|
||||
less-download-windows
|
||||
privoxy-control
|
||||
hide-tor-exit-notation
|
||||
no-brotli-accepted
|
||||
privoxy-control
|
||||
remove-first-byte
|
||||
remove-test
|
||||
overwrite-test-value
|
||||
END
|
||||
|
||||
for s:filter in s:filters
|
||||
exe 'syn match privoxyFilterArg "\<' .. s:filter .. '\>" contained"'
|
||||
endfor
|
||||
unlet s:filter s:filters
|
||||
" }}}
|
||||
|
||||
syn match privoxyEnablePrefix "\%(^\|\s\|{\)\@1<=+\l\@=" nextgroup=privoxy.*Action contained
|
||||
syn match privoxyDisablePrefix "\%(^\|\s\|{\)\@1<=-\l\@=" nextgroup=privoxy.*Action contained
|
||||
syn cluster privoxyActionPrefix contains=privoxyDisablePrefix,privoxyEnablePrefix
|
||||
|
||||
syn match privoxySettingsHeader "^\s*\zs{{settings\}}" contains=privoxyBraces nextgroup=privoxySettingsSection skipnl skipwhite
|
||||
syn match privoxyDescriptionHeader "^\s*\zs{{description\}}" contains=privoxyBraces nextgroup=privoxyDescriptionSection skipnl
|
||||
syn match privoxyAliasHeader "^\s*\zs{{alias\}}" contains=privoxyBraces nextgroup=privoxyAliasSection skipnl
|
||||
|
||||
syn region privoxySettingsSection start="." end="^\s*\ze{" contained contains=privoxyComment,privoxySettingName
|
||||
syn region privoxyDescriptionSection start="." end="^\s*\ze{" contained
|
||||
syn region privoxyAliasSection start="." end="^\s*\ze{" contained contains=privoxyComment,privoxyAliasName
|
||||
|
||||
syn match privoxySettingName "\<[a-z][a-z-]*" contained nextgroup=privoxySettingEqual
|
||||
syn match privoxySettingEqual "=" contained nextgroup=privoxySettingValue
|
||||
syn match privoxySettingValue ".*" contained
|
||||
|
||||
syn match privoxyAliasName "[+-]\<[a-z][a-z-]*" contained nextgroup=privoxyAliasEqual skipwhite
|
||||
syn match privoxyAliasEqual "=" contained nextgroup=privoxyAliasValue skipwhite
|
||||
syn region privoxyAliasValue start="\S" skip="\\$" end="$" contained contains=@privoxyAction,@privoxyActionPrefix,privoxyLineContinuation
|
||||
|
||||
syn match privoxyBraces "[{}]" contained
|
||||
syn match privoxyLineContinuation "\\$" contained
|
||||
|
||||
syn keyword privoxyTodo TODO FIXME XXX NOTE contained
|
||||
syn match privoxyComment "#.*" contains=privoxyTodo,@Spell
|
||||
|
||||
syn region privoxyActionLine matchgroup=privoxyActionLineDelimiter start="^\s*\zs{" end="}\ze\s*$"
|
||||
\ contains=privoxyEnabledPrefix,privoxyDisabledPrefix
|
||||
|
||||
syn match privoxyEnabledPrefix "\%(^\|\s\|{\)\@<=+\l\@=" nextgroup=privoxyAction,privoxyFilterAction contained
|
||||
syn match privoxyDisabledPrefix "\%(^\|\s\|{\)\@<=-\l\@=" nextgroup=privoxyAction,privoxyFilterAction contained
|
||||
|
||||
syn match privoxyAction "\%(add-header\|block\|content-type-overwrite\|crunch-client-header\|crunch-if-none-match\)\>" contained
|
||||
syn match privoxyAction "\%(crunch-incoming-cookies\|crunch-outgoing-cookies\|crunch-server-header\|deanimate-gifs\)\>" contained
|
||||
syn match privoxyAction "\%(downgrade-http-version\|fast-redirects\|filter-client-headers\|filter-server-headers\)\>" contained
|
||||
syn match privoxyAction "\%(filter\|force-text-mode\|handle-as-empty-document\|handle-as-image\)\>" contained
|
||||
syn match privoxyAction "\%(hide-accept-language\|hide-content-disposition\|hide-forwarded-for-headers\)\>" contained
|
||||
syn match privoxyAction "\%(hide-from-header\|hide-if-modified-since\|hide-referrer\|hide-user-agent\|inspect-jpegs\)\>" contained
|
||||
syn match privoxyAction "\%(kill-popups\|limit-connect\|overwrite-last-modified\|prevent-compression\|redirect\)\>" contained
|
||||
syn match privoxyAction "\%(send-vanilla-wafer\|send-wafer\|session-cookies-only\|set-image-blocker\)\>" contained
|
||||
syn match privoxyAction "\%(treat-forbidden-connects-like-blocks\)\>"
|
||||
|
||||
syn match privoxyFilterAction "filter{[^}]*}" contained contains=privoxyFilterArg,privoxyActionBraces
|
||||
syn match privoxyActionBraces "[{}]" contained
|
||||
syn keyword privoxyFilterArg js-annoyances js-events html-annoyances content-cookies refresh-tags unsolicited-popups all-popups
|
||||
\ img-reorder banners-by-size banners-by-link webbugs tiny-textforms jumping-windows frameset-borders demoronizer
|
||||
\ shockwave-flash quicktime-kioskmode fun crude-parental ie-exploits site-specifics no-ping google yahoo msn blogspot
|
||||
\ x-httpd-php-to-html html-to-xml xml-to-html hide-tor-exit-notation contained
|
||||
|
||||
" Alternative spellings
|
||||
syn match privoxyAction "\%(kill-popup\|hide-referer\|prevent-keeping-cookies\)\>" contained
|
||||
|
||||
" Pre-3.0 compatibility
|
||||
syn match privoxyAction "\%(no-cookie-read\|no-cookie-set\|prevent-reading-cookies\|prevent-setting-cookies\)\>" contained
|
||||
syn match privoxyAction "\%(downgrade\|hide-forwarded\|hide-from\|image\|image-blocker\|no-compression\)\>" contained
|
||||
syn match privoxyAction "\%(no-cookies-keep\|no-cookies-read\|no-cookies-set\|no-popups\|vanilla-wafer\|wafer\)\>" contained
|
||||
|
||||
syn match privoxySetting "\<for-privoxy-version\>"
|
||||
|
||||
syn match privoxyHeader "^\s*\zs{{\%(alias\|settings\)}}\ze\s*$"
|
||||
|
||||
hi def link privoxyAction Identifier
|
||||
hi def link privoxyFilterAction Identifier
|
||||
hi def link privoxyActionLineDelimiter Delimiter
|
||||
hi def link privoxyDisabledPrefix SpecialChar
|
||||
hi def link privoxyEnabledPrefix SpecialChar
|
||||
hi def link privoxyHeader PreProc
|
||||
hi def link privoxySetting Identifier
|
||||
hi def link privoxyFilterArg Constant
|
||||
|
||||
hi def link privoxyAliasEqual Operator
|
||||
hi def link privoxyAliasHeader Title
|
||||
hi def link privoxyBraces Delimiter
|
||||
hi def link privoxyComment Comment
|
||||
hi def link privoxyDescriptionHeader Title
|
||||
hi def link privoxyDisablePrefix Added
|
||||
hi def link privoxyEnablePrefix Removed
|
||||
hi def link privoxyFilterAction privoxyAction
|
||||
hi def link privoxyFilterArg Constant
|
||||
hi def link privoxyLineContinuation Special
|
||||
hi def link privoxyParamBraces privoxyBraces
|
||||
hi def link privoxySettingEqual Operator
|
||||
hi def link privoxySettingName Keyword
|
||||
hi def link privoxySettingsHeader Title
|
||||
hi def link privoxySettingValue Constant
|
||||
hi def link privoxyTodo Todo
|
||||
|
||||
let b:current_syntax = "privoxy"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: ts=8 fdm=marker
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
" Previous Maintainer: Will Langstroth <will@langstroth.com>
|
||||
" URL: https://github.com/benknoble/vim-racket
|
||||
" Description: Contains all of the keywords in #lang racket
|
||||
" Last Change: 2025 Aug 09
|
||||
" Last Change: 2026 Jan 07
|
||||
|
||||
" Initializing:
|
||||
if exists("b:current_syntax")
|
||||
@@ -605,13 +605,21 @@ syntax match racketUnquote ",@"
|
||||
" Comments
|
||||
syntax match racketSharpBang "\%^#![ /].*" display
|
||||
syntax match racketComment /;.*$/ contains=racketTodo,racketNote,@Spell
|
||||
syntax region racketMultilineComment start=/#|/ end=/|#/ contains=racketMultilineComment,racketTodo,racketNote,@Spell
|
||||
syntax match racketFormComment "#;" nextgroup=@racketTop
|
||||
syntax cluster racketTop add=racketFormComment
|
||||
|
||||
if exists("racket_no_comment_fold")
|
||||
syntax region racketBlockComment start=/#|/ end=/|#/ contains=racketBlockComment,racketTodo,racketNote,@Spell
|
||||
else
|
||||
syntax region racketBlockComment start=/#|/ end=/|#/ contains=racketBlockComment,racketTodo,racketNote,@Spell fold
|
||||
syntax region racketMultilineComment start="^\s*;" end="^\%(\s*;\)\@!" contains=racketComment transparent keepend fold
|
||||
endif
|
||||
|
||||
syntax match racketTodo /\C\<\(FIXME\|TODO\|XXX\)\ze:\?\>/ contained
|
||||
syntax match racketNote /\CNOTE\ze:\?/ contained
|
||||
|
||||
syntax cluster racketTop add=racketQuote,racketUnquote,racketComment,racketMultilineComment,racketFormComment
|
||||
syntax cluster racketComments contains=racketComment,racketBlockComment,racketMultilineComment
|
||||
syntax cluster racketTop add=racketQuote,racketUnquote,@racketComments
|
||||
|
||||
" Synchronization and the wrapping up...
|
||||
syntax sync match matchPlace grouphere NONE "^[^ \t]"
|
||||
@@ -644,7 +652,7 @@ highlight default link racketLit Type
|
||||
highlight default link racketRe Type
|
||||
|
||||
highlight default link racketComment Comment
|
||||
highlight default link racketMultilineComment Comment
|
||||
highlight default link racketBlockComment Comment
|
||||
highlight default link racketFormComment SpecialChar
|
||||
highlight default link racketSharpBang Comment
|
||||
highlight default link racketTodo Todo
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim syntax file
|
||||
" Language: Raku
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Homepage: https://github.com/Raku/vim-raku
|
||||
" Bugs/requests: https://github.com/Raku/vim-raku/issues
|
||||
" Last Change: 2021-04-16
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
" Repository: https://github.com/chrisbra/vim-sqloracle-syntax
|
||||
" License: Vim
|
||||
" Previous Maintainer: Paul Moore
|
||||
" Last Change: 2018 June 24
|
||||
" Last Change: 2022 February 10
|
||||
|
||||
" Changes:
|
||||
" 02.04.2016: Support for when keyword
|
||||
@@ -12,6 +12,7 @@
|
||||
" 22.07.2016: Support Oracle Q-Quote-Syntax
|
||||
" 25.07.2016: Support for Oracle N'-Quote syntax
|
||||
" 22.06.2018: Remove skip part for sqlString (do not escape strings)
|
||||
" 10.02.2022: Add some more Oracle SQLKeywords https://github.com/vim/vim/issues/9737
|
||||
" (https://web.archive.org/web/20150922065035/https://mariadb.com/kb/en/sql-99/character-string-literals/)
|
||||
|
||||
if exists("b:current_syntax")
|
||||
@@ -33,7 +34,7 @@ syn keyword sqlKeyword maxextents maxtrans mode modify monitoring
|
||||
syn keyword sqlKeyword nocache nocompress nologging noparallel nowait of offline on online start
|
||||
syn keyword sqlKeyword parallel successful synonym table tablespace then to trigger uid
|
||||
syn keyword sqlKeyword unique user validate values view when whenever
|
||||
syn keyword sqlKeyword where with option order pctfree pctused privileges procedure
|
||||
syn keyword sqlKeyword where with within option order pctfree pctused privileges procedure
|
||||
syn keyword sqlKeyword public resource return row rowlabel rownum rows
|
||||
syn keyword sqlKeyword session share size smallint type using
|
||||
syn keyword sqlKeyword join cross inner outer left right
|
||||
@@ -86,7 +87,7 @@ syn sync ccomment sqlComment
|
||||
" (Oracle 11g)
|
||||
" Aggregate Functions
|
||||
syn keyword sqlFunction avg collect corr corr_s corr_k count covar_pop covar_samp cume_dist dense_rank first
|
||||
syn keyword sqlFunction group_id grouping grouping_id last max median min percentile_cont percentile_disc percent_rank rank
|
||||
syn keyword sqlFunction group_id grouping grouping_id last listagg max median min percentile_cont percentile_disc percent_rank rank
|
||||
syn keyword sqlFunction regr_slope regr_intercept regr_count regr_r2 regr_avgx regr_avgy regr_sxx regr_syy regr_sxy
|
||||
syn keyword sqlFunction stats_binomial_test stats_crosstab stats_f_test stats_ks_test stats_mode stats_mw_test
|
||||
syn keyword sqlFunction stats_one_way_anova stats_t_test_one stats_t_test_paired stats_t_test_indep stats_t_test_indepu
|
||||
@@ -95,7 +96,7 @@ syn keyword sqlFunction sys_xmlagg var_pop var_samp variance xmlagg
|
||||
" Char Functions
|
||||
syn keyword sqlFunction ascii chr concat initcap instr length lower lpad ltrim
|
||||
syn keyword sqlFunction nls_initcap nls_lower nlssort nls_upper regexp_instr regexp_replace
|
||||
syn keyword sqlFunction regexp_substr replace rpad rtrim soundex substr translate treat trim upper
|
||||
syn keyword sqlFunction regexp_substr replace rpad rtrim soundex substr translate treat trim upper wm_concat
|
||||
" Comparison Functions
|
||||
syn keyword sqlFunction greatest least
|
||||
" Conversion Functions
|
||||
|
||||
20
runtime/syntax/testdir/dumps/cpp_numbers_00.dump
Normal file
20
runtime/syntax/testdir/dumps/cpp_numbers_00.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
>v+0#00e0003#ffffff0|o|i|d| +0#0000000&|f|o@1|(|)| @64
|
||||
|{| @73
|
||||
@4|{| @69
|
||||
@8|/+0#0000e05&@1| |S|e@1| |h|t@1|p|s|:|/@1|e|n|.|c|p@1|r|e|f|e|r|e|n|c|e|.|c|o|m|/|w|/|c|p@1|/|l|a|n|g|u|a|g|e|/|f|l|o|a|t|i|n|g|_|l|i|t|e|r|a|l| +0#0000000&
|
||||
@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|a| |=| |1+0#e000002&|.|0|E|2|;+0#0000000&| @49
|
||||
@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|b| |=| |1+0#e000002&|.|0|e|2|;+0#0000000&| @49
|
||||
@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|c| |=| |1+0#e000002&|E|2|;+0#0000000&| @51
|
||||
@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|d| |=| |1+0#e000002&|e|2|;+0#0000000&| @51
|
||||
@75
|
||||
@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|e| |=| |0+0#e000002&|X|1|f@1|p|1|0|;+0#0000000&| @46
|
||||
@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|f| |=| |0+0#e000002&|x|1|f@1|p|1|0|;+0#0000000&| @46
|
||||
@4|}| @69
|
||||
@75
|
||||
@4|/+0#0000e05&@1| |S|e@1|:| |h|t@1|p|s|:|/@1|e|n|.|c|p@1|r|e|f|e|r|e|n|c|e|.|c|o|m|/|w|/|c|p@1|/|l|a|n|g|u|a|g|e|/|i|n|t|e|g|e|r|_|l|i|t|e|r|a|l| +0#0000000&@4
|
||||
@4|i+0#00e0003&|n|t| +0#0000000&|a| |=| |0+0#e000002&|X|1|2|3|;+0#0000000&| @56
|
||||
@4|i+0#00e0003&|n|t| +0#0000000&|b| |=| |0+0#e000002&|x|1|2|3|;+0#0000000&| @56
|
||||
@75
|
||||
@4|i+0#00e0003&|n|t| +0#0000000&|c| |=| |0+0#e000002&|B|1|0|1|;+0#0000000&| @56
|
||||
@4|i+0#00e0003&|n|t| +0#0000000&|d| |=| |0+0#e000002&|b|1|0|1|;+0#0000000&| @56
|
||||
@57|1|,|1| @10|T|o|p|
|
||||
20
runtime/syntax/testdir/dumps/cpp_numbers_01.dump
Normal file
20
runtime/syntax/testdir/dumps/cpp_numbers_01.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
| +0&#ffffff0@3|/+0#0000e05&@1| |S|e@1|:| |h|t@1|p|s|:|/@1|e|n|.|c|p@1|r|e|f|e|r|e|n|c|e|.|c|o|m|/|w|/|c|p@1|/|l|a|n|g|u|a|g|e|/|i|n|t|e|g|e|r|_|l|i|t|e|r|a|l| +0#0000000&@4
|
||||
@4|i+0#00e0003&|n|t| +0#0000000&|a| |=| |0+0#e000002&|X|1|2|3|;+0#0000000&| @56
|
||||
@4|i+0#00e0003&|n|t| +0#0000000&|b| |=| |0+0#e000002&|x|1|2|3|;+0#0000000&| @56
|
||||
@75
|
||||
@4|i+0#00e0003&|n|t| +0#0000000&|c| |=| |0+0#e000002&|B|1|0|1|;+0#0000000&| @56
|
||||
@4>i+0#00e0003&|n|t| +0#0000000&|d| |=| |0+0#e000002&|b|1|0|1|;+0#0000000&| @56
|
||||
|}| @73
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|1|9|,|5| @9|B|o|t|
|
||||
20
runtime/syntax/testdir/dumps/make_01_00.dump
Normal file
20
runtime/syntax/testdir/dumps/make_01_00.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
>#+0#0000e05#ffffff0| |c|o|m@1|e|n|t| +0#0000000&@65
|
||||
@75
|
||||
|a+0#00e0e07&| |=+0#0000000&| |b| @69
|
||||
|$+0#00e0e07&|(|a|)| |=+0#0000000&| |1| @66
|
||||
@75
|
||||
|$+0#00e0e07&|(|a|)|:@1| +0#0000000&@68
|
||||
| +0#e000e06&@7|@|e+0#e000002&|c|h|o| |d|o|u|b|l|e|-|c|o|l|o|n| |r|u|l|e| +0#0000000&@43
|
||||
@75
|
||||
|$+0#00e0e07&|(|a|)| |++0#0000000&|=| |o|u|t|p|u|t| @60
|
||||
@75
|
||||
|d+0#e000e06&|e|f|i|n|e| |s|a|y| +0#0000000&@64
|
||||
| +0#e000e06&@7|e|c|h|o| |$+0#00e0e07&|1| +0#0000000&@59
|
||||
|e+0#e000e06&|n|d|e|f| +0#0000000&@69
|
||||
@75
|
||||
|d+0#00e0e07&|e|f|a|u|l|t|:| +0#0000000&@66
|
||||
| +0#e000002&@7|$+0#00e0e07&|(|c+0#af5f00255&|a|l@1| +0#00e0e07&|s|a|y|,|"+0#e000002&|H|e|l@1|o| |(|w|o|r|l|d|)|!|"|)+0#00e0e07&| +0#0000000&@38
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|1|,|1| @10|A|l@1|
|
||||
20
runtime/syntax/testdir/input/cpp_numbers.cpp
Normal file
20
runtime/syntax/testdir/input/cpp_numbers.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
void foo()
|
||||
{
|
||||
{
|
||||
// See https://en.cppreference.com/w/cpp/language/floating_literal
|
||||
double a = 1.0E2;
|
||||
double b = 1.0e2;
|
||||
double c = 1E2;
|
||||
double d = 1e2;
|
||||
|
||||
double e = 0X1ffp10;
|
||||
double f = 0x1ffp10;
|
||||
}
|
||||
|
||||
// See: https://en.cppreference.com/w/cpp/language/integer_literal
|
||||
int a = 0X123;
|
||||
int b = 0x123;
|
||||
|
||||
int c = 0B101;
|
||||
int d = 0b101;
|
||||
}
|
||||
16
runtime/syntax/testdir/input/make_01.mak
Normal file
16
runtime/syntax/testdir/input/make_01.mak
Normal file
@@ -0,0 +1,16 @@
|
||||
# comment
|
||||
|
||||
a = b
|
||||
$(a) = 1
|
||||
|
||||
$(a)::
|
||||
@echo double-colon rule
|
||||
|
||||
$(a) += output
|
||||
|
||||
define say
|
||||
echo $1
|
||||
endef
|
||||
|
||||
default:
|
||||
$(call say,"Hello (world)!")
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim syntax file
|
||||
" Language: TT2 (Perl Template Toolkit)
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Author: Moriki, Atsushi <4woods+vim@gmail.com>
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim syntax file
|
||||
" Language: TT2 embedded with HTML
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Author: Moriki, Atsushi <4woods+vim@gmail.com>
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: Wget configuration file (/etc/wgetrc ~/.wgetrc)
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2023 Nov 05
|
||||
" Last Change: 2026 Jan 07
|
||||
|
||||
" GNU Wget 1.21 built on linux-gnu.
|
||||
" GNU Wget 1.25 built on linux-gnu.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: Wget2 configuration file (/etc/wget2rc ~/.wget2rc)
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2023 Nov 05
|
||||
" Last Change: 2026 Jan 07
|
||||
|
||||
" GNU Wget2 2.1.0 - multithreaded metalink/file/website downloader
|
||||
" GNU Wget2 2.2.1 - multithreaded metalink/file/website downloader
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -189,6 +189,7 @@ let s:commands =<< trim EOL
|
||||
save-headers
|
||||
secure-protocol
|
||||
server-response
|
||||
show-progress
|
||||
signature-extensions
|
||||
span-hosts
|
||||
spider
|
||||
@@ -223,7 +224,7 @@ EOL
|
||||
"}}}
|
||||
|
||||
for cmd in s:commands
|
||||
exe 'syn match wget2Command "\<' .. substitute(cmd, '-', '[-_]\\=', "g") .. '\>" nextgroup=wget2AssignmentOperator skipwhite contained'
|
||||
exe 'syn match wget2Command "\<\%(no[-_]\)\=' .. substitute(cmd, '-', '[-_]\\=', "g") .. '\>" nextgroup=wget2AssignmentOperator skipwhite contained'
|
||||
endfor
|
||||
unlet s:commands
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: XS (Perl extension interface language)
|
||||
" Author: Autogenerated from perl headers, on an original basis of Michael W. Dodge <sarge@pobox.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
|
||||
" Previous: Vincent Pit <perl@profvince.com>
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2024 Jan 04
|
||||
" Latest Revision: 2025 Feb 18
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-zsh
|
||||
|
||||
@@ -37,9 +37,6 @@ endfunction
|
||||
let s:contained=s:ContainedGroup()
|
||||
|
||||
syn iskeyword @,48-57,_,192-255,#,-
|
||||
if get(g:, 'zsh_fold_enable', 0)
|
||||
setlocal foldmethod=syntax
|
||||
endif
|
||||
|
||||
syn match zshQuoted '\\.'
|
||||
syn match zshPOSIXQuoted '\\[xX][0-9a-fA-F]\{1,2}'
|
||||
@@ -157,6 +154,8 @@ syn case ignore
|
||||
syn match zshOptStart
|
||||
\ /\v^\s*%(%(un)?setopt|set\s+[-+]o)/
|
||||
\ nextgroup=zshOption skipwhite
|
||||
|
||||
" this list is generated using the make-options.zsh script and the zsh source repository
|
||||
syn keyword zshOption nextgroup=zshOption,zshComment skipwhite contained
|
||||
\ auto_cd no_auto_cd autocd noautocd auto_pushd no_auto_pushd autopushd noautopushd cdable_vars
|
||||
\ no_cdable_vars cdablevars nocdablevars cd_silent no_cd_silent cdsilent nocdsilent chase_dots
|
||||
@@ -193,16 +192,16 @@ syn keyword zshOption nextgroup=zshOption,zshComment skipwhite contained
|
||||
\ nonumericglobsort rc_expand_param no_rc_expand_param rcexpandparam norcexpandparam rematch_pcre
|
||||
\ no_rematch_pcre rematchpcre norematchpcre sh_glob no_sh_glob shglob noshglob unset no_unset nounset
|
||||
\ warn_create_global no_warn_create_global warncreateglobal nowarncreateglobal warn_nested_var
|
||||
\ no_warn_nested_var warnnestedvar no_warnnestedvar append_history no_append_history appendhistory
|
||||
\ noappendhistory bang_hist no_bang_hist banghist nobanghist extended_history no_extended_history
|
||||
\ extendedhistory noextendedhistory hist_allow_clobber no_hist_allow_clobber histallowclobber
|
||||
\ nohistallowclobber hist_beep no_hist_beep histbeep nohistbeep hist_expire_dups_first
|
||||
\ no_hist_expire_dups_first histexpiredupsfirst nohistexpiredupsfirst hist_fcntl_lock
|
||||
\ no_hist_fcntl_lock histfcntllock nohistfcntllock hist_find_no_dups no_hist_find_no_dups
|
||||
\ histfindnodups nohistfindnodups hist_ignore_all_dups no_hist_ignore_all_dups histignorealldups
|
||||
\ nohistignorealldups hist_ignore_dups no_hist_ignore_dups histignoredups nohistignoredups
|
||||
\ hist_ignore_space no_hist_ignore_space histignorespace nohistignorespace hist_lex_words
|
||||
\ no_hist_lex_words histlexwords nohistlexwords hist_no_functions no_hist_no_functions
|
||||
\ no_warn_nested_var warnnestedvar no_warnnestedvar nowarnnestedvar append_history no_append_history
|
||||
\ appendhistory noappendhistory bang_hist no_bang_hist banghist nobanghist extended_history
|
||||
\ no_extended_history extendedhistory noextendedhistory hist_allow_clobber no_hist_allow_clobber
|
||||
\ histallowclobber nohistallowclobber hist_beep no_hist_beep histbeep nohistbeep
|
||||
\ hist_expire_dups_first no_hist_expire_dups_first histexpiredupsfirst nohistexpiredupsfirst
|
||||
\ hist_fcntl_lock no_hist_fcntl_lock histfcntllock nohistfcntllock hist_find_no_dups
|
||||
\ no_hist_find_no_dups histfindnodups nohistfindnodups hist_ignore_all_dups no_hist_ignore_all_dups
|
||||
\ histignorealldups nohistignorealldups hist_ignore_dups no_hist_ignore_dups histignoredups
|
||||
\ nohistignoredups hist_ignore_space no_hist_ignore_space histignorespace nohistignorespace
|
||||
\ hist_lex_words no_hist_lex_words histlexwords nohistlexwords hist_no_functions no_hist_no_functions
|
||||
\ histnofunctions nohistnofunctions hist_no_store no_hist_no_store histnostore nohistnostore
|
||||
\ hist_reduce_blanks no_hist_reduce_blanks histreduceblanks nohistreduceblanks hist_save_by_copy
|
||||
\ no_hist_save_by_copy histsavebycopy nohistsavebycopy hist_save_no_dups no_hist_save_no_dups
|
||||
@@ -334,7 +333,7 @@ hi def link zshKeyword Keyword
|
||||
hi def link zshFunction None
|
||||
hi def link zshKSHFunction zshFunction
|
||||
hi def link zshHereDoc String
|
||||
hi def link zshOperator None
|
||||
hi def link zshOperator Operator
|
||||
hi def link zshRedir Operator
|
||||
hi def link zshVariable None
|
||||
hi def link zshVariableDef zshVariable
|
||||
|
||||
@@ -59,7 +59,7 @@ Final exercise: (Modify "this" text) by [applying {various} operations]<
|
||||
|
||||
**MNEMONIC**: *into register(") named (a) (y)ank (i)nner (w)ord*
|
||||
|
||||
3. Navigate forward to the word 'cookie' (`fk`{normal} or `2fc`{normal}
|
||||
3. Navigate forward to the word 'cookie' (`fk`{normal} or `3fc`{normal}
|
||||
or `$2b`{normal} or `/co`{normal} `<ENTER>`{normal}) and type `"byiw`{normal}
|
||||
|
||||
4. Navigate to any point on the word 'Vince' and type `ciw<CTRL-R>a<ESC>`{normal}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# ДОБРО ПОЖАЛОВАТЬ НА ЗАНЯТИЯ ПО РЕДАКТОРУ Vim
|
||||
|
||||
## ГЛАВА ПЕРВАЯ
|
||||
# ГЛАВА ПЕРВАЯ
|
||||
|
||||
Программа Vim — это очень мощный текстовый редактор, имеющий множество
|
||||
команд, и все их просто невозможно описать в рамках этого учебника.
|
||||
@@ -53,11 +53,11 @@
|
||||
** Чтобы перемещать каретку в указанных направлениях, нажмите клавиши
|
||||
`h`, `j`, `k`, `l`**
|
||||
|
||||
↑ *Подсказка.*
|
||||
k Клавиша `h`{normal} слева и удобна для перемещения влево.
|
||||
↑ *Подсказка.*
|
||||
k Клавиша `h`{normal} слева и удобна для перемещения влево.
|
||||
← h l → Клавиша `l`{normal} справа и удобна для перемещения вправо.
|
||||
j Клавиша `j`{normal} похожа на стрелку »вниз».
|
||||
↓
|
||||
j Клавиша `j`{normal} похожа на стрелку »вниз».
|
||||
↓
|
||||
1. Перемещайте каретку в разных направлениях, пока не ощутите уверенность.
|
||||
|
||||
2. Удерживайте нажатой клавишу «вниз» (`j`{normal}) для беспрерывного
|
||||
@@ -281,9 +281,9 @@
|
||||
этот оператор.
|
||||
Так, например, формат команды удаления с оператором [d](d) следующий:
|
||||
|
||||
d объект
|
||||
d объект
|
||||
где
|
||||
d - оператор удаления;
|
||||
d - оператор удаления;
|
||||
объект - область текста (указаны ниже), к которой будет применён оператор.
|
||||
|
||||
Краткий перечень объектов:
|
||||
@@ -410,7 +410,7 @@
|
||||
укажите их число, например, `2w`{normal}
|
||||
|
||||
6. Формат команд изменения:
|
||||
оператор [число] объект
|
||||
оператор [число] объект
|
||||
где
|
||||
оператор - необходимые действия, например, [d](d) для удаления;
|
||||
[число] - количество подпадающих под действие оператора объектов,
|
||||
@@ -539,7 +539,7 @@
|
||||
|
||||
где c - оператор изменения;
|
||||
[число] - количество изменяемых объектов (необязательная часть);
|
||||
объект - объект текста, который будет изменён.
|
||||
объект - объект текста, который будет изменён.
|
||||
|
||||
Теперь переходите к следующему уроку.
|
||||
|
||||
@@ -836,7 +836,7 @@
|
||||
|
||||
Некоторые полезные примеры:
|
||||
(Windows) (UNIX)
|
||||
`:!dir`{vim} `:!ls`{vim} - вывести перечень файлов в каталоге;
|
||||
`:!dir`{vim} `:!ls`{vim} - вывести перечень файлов в каталоге;
|
||||
`:!del ФАЙЛ`{vim} `:!rm ФАЙЛ`{vim} - удалить файл с указанным названием.
|
||||
|
||||
2. По команде [:w](:w) ФАЙЛ — текущий редактируемый файл будет записан
|
||||
@@ -1099,13 +1099,21 @@
|
||||
4. Нажмите клавиши `<CTRL-D>`{normal}, и будет показан перечень команд
|
||||
редактора Vim начинающихся с буквы «e».
|
||||
|
||||
5. Нажмите клавиши `d<TAB>`{normal}, и будет подставлено полное название
|
||||
команды `:edit`{vim}.
|
||||
5. Нажмите клавиши `d<TAB>`{normal}, и будет отображено меню с возожными
|
||||
наименованиями команд для подстановки (или подставлено соответствующее
|
||||
наименование, если введёная команда достаточно уникально, например, для
|
||||
`:ed`{vim}<TAB> будет подставлена команда `:edit`{vim}).
|
||||
|
||||
6. Теперь напечатайте пробел и начало наименования существующего файла
|
||||
6. Используйте <TAB> или <CTRL-N> для перехода к следующему соответствию.
|
||||
Или <SHIFT-TAB> либо CTRL-P> для перехода к предыдущему соответствию.
|
||||
|
||||
7. Выберите пункт edit. И команда `edit`{vim} будет автоматически подставлена
|
||||
в командную строку.
|
||||
|
||||
8. Теперь напечатайте пробел и начало наименования существующего файла
|
||||
`:edit TE`{vim}
|
||||
|
||||
7. Нажмите клавишу `<TAB>`{normal} и будет подставлено наименование файла,
|
||||
9. Нажмите клавишу `<TAB>`{normal} и будет подставлено наименование файла,
|
||||
если оно уникальное.
|
||||
|
||||
**Примечание.**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# ДОБРО ПОЖАЛОВАТЬ НА ЗАНЯТИЯ ПО РЕДАКТОРУ Vim
|
||||
|
||||
## ГЛАВА ВТОРАЯ
|
||||
# ГЛАВА ВТОРАЯ
|
||||
|
||||
Что‐то неожиданное и непонятное?
|
||||
Если это ваше первое знакомство с редактором Vim и вы планировали начать
|
||||
@@ -11,12 +11,54 @@
|
||||
~~~
|
||||
Или просто откройте по ссылке [первую главу](@tutor:vim-01-beginner) учебника.
|
||||
|
||||
Приблизительное время, необходимое для изучения второй главы учебника
|
||||
Приблизительное время, необходимое для изучения второй главы учебника,
|
||||
составляет около 8–10 минут, и зависит от того, сколько времени вы посвятите
|
||||
выполнению заданий.
|
||||
|
||||
|
||||
# Урок 2.1.1. ИМЕНОВАННЫЕ РЕГИСТРЫ В РЕДАКТОРЕ Vim
|
||||
# Урок 2.1.1. ОСВОЕНИЕ ТЕКСТОВЫХ ОБЪЕКТОВ
|
||||
|
||||
** Точечные операции с логическими частями текста используя текстовые объекты **
|
||||
|
||||
1. Попрактикуйтесь в аккуратной работе со словами:
|
||||
- Поместите каретку на любое слово в строке почеченной ✓
|
||||
- Наберите `diw`{normal}, чтобы удалить ТОЛЬКО слово
|
||||
(слово без окружающих пробелов)
|
||||
- Наберите `daw`{normal}, чтобы удалить СЛОВО (включая конечные пробелы)
|
||||
- Попробуйте другие операторы: `ciw`{normal} (изменить),
|
||||
`yiw`{normal} (копировать), `gqiw`{normal} (форматировать)
|
||||
|
||||
Потренируйтесь здесь на словах: «Vim'овский», (text_object) и 'мощный'.
|
||||
|
||||
2. Работа с содержимым скобок:
|
||||
- Поместите каретку внутри любой пары () {} [] <> в строке помеченной ✓
|
||||
- Наберите `di(`{normal} или `dib`{normal}
|
||||
(удалить всё, что внутри круглых скобок)
|
||||
- Наберите `da(`{normal} или `dab`{normal}
|
||||
(удалить внутри круглых скобок и сами скобки)
|
||||
- Попробуйте то же самое с `i"`{normal} и `a"`{normal} для машинописных
|
||||
кавычек или `it`{normal} и `at`{normal} для тегов HTML и XML.
|
||||
|
||||
Примеры: {фигурные}, [прямоугольные], <угловые>, (круглые) и "quoted".
|
||||
|
||||
3. Операции с абзацами и предложениями:
|
||||
- Наберите `dip`{normal} для удаления ТОЛЬКО абзаца
|
||||
(каретка может быть в любом месте абзаца)
|
||||
- Наберите `vap`{normal} для визуального выделения всего абзаца
|
||||
- Попробуйте `das`{normal} для удаления предложения
|
||||
(работает при наличии знаков препинания .!? )
|
||||
|
||||
4. Расширенные комбинации:
|
||||
- `ciwnew<ESC>`{normal} — изменить текущее слово на «new»
|
||||
- `ciw"<CTRL-R>-"<ESC>`{normal} — обернуть всю строку в кавычки
|
||||
- `gUit`{normal} — преобразовать внутреннее содержимое HTML-тега в верхний
|
||||
регистр
|
||||
- `va"p`{normal} — выделить текст в кавычках и вставить поверх него
|
||||
|
||||
Итоговое задание: (Измените "этот" текст) [применив {различные} операции]<
|
||||
|
||||
|
||||
# Урок 2.1.2. ИМЕНОВАННЫЕ РЕГИСТРЫ В РЕДАКТОРЕ Vim
|
||||
|
||||
** Копирование с сохранением двух разных слов и последующая их вставка в текст **
|
||||
|
||||
@@ -35,13 +77,13 @@
|
||||
`"byiw`{normal}
|
||||
|
||||
4. Переместите каретку на любой символ слова «Виктор» и наберите на клавиатуре
|
||||
`ciw<CTRL-r>a<ESC>`{normal}
|
||||
`ciw<CTRL-R>a<ESC>`{normal}
|
||||
|
||||
Эта команда означает следующее:
|
||||
*изменить(c) только(i) слово(w) на <содержимое регистра(r)> с названием(a)*
|
||||
|
||||
5. Установите каретку на любой символ слова «тортов» и наберите
|
||||
`ciw<CTRL-r>b<ESC>`{normal}
|
||||
`ciw<CTRL-R>b<ESC>`{normal}
|
||||
|
||||
а) Отныне Эдуард будет отвечать за раздачу печенья
|
||||
б) Таким образом Виктор имеет единоличные права по распределению тортов
|
||||
@@ -58,7 +100,7 @@
|
||||
[CTRL-R](i_CTRL-R)
|
||||
|
||||
|
||||
# Урок 2.1.2. РЕГИСТР РЕЗУЛЬТАТА ВЫЧИСЛЕНИЙ
|
||||
# Урок 2.1.3. РЕГИСТР РЕЗУЛЬТАТА ВЫЧИСЛЕНИЙ
|
||||
|
||||
** Вставка результатов вычислений напрямую в текст **
|
||||
|
||||
@@ -66,11 +108,11 @@
|
||||
|
||||
2. Установите каретку на любой цифре приведённого числа
|
||||
|
||||
3. Наберите на клавиатуре `ciw<CTRL-r>=60*60*24`{normal} `<ENTER>`{normal}
|
||||
3. Наберите на клавиатуре `ciw<CTRL-R>=60*60*24`{normal} `<ENTER>`{normal}
|
||||
|
||||
4. Переместите каретку в конец следующей строки, переключите редактор в режим
|
||||
вставки, и добавьте сегодняшнюю дату с помощью следующей команды
|
||||
`<CTRL-r>=`{normal}`system('date')`{vim} `<ENTER>`{normal}
|
||||
`<CTRL-R>=`{normal}`system('date')`{vim} `<ENTER>`{normal}
|
||||
|
||||
Примечание.
|
||||
Результат вызова функции `system()`{vim} зависит от текущей операционной
|
||||
@@ -88,14 +130,14 @@
|
||||
[регистр результата вычислений](quote=)
|
||||
|
||||
|
||||
# Урок 2.1.3. НУМЕРОВАННЫЕ РЕГИСТРЫ В РЕДАКТОРЕ Vim
|
||||
# Урок 2.1.4. НУМЕРОВАННЫЕ РЕГИСТРЫ В РЕДАКТОРЕ Vim
|
||||
|
||||
** Как команды `yy`{normal} и `dd`{normal} влияют на содержимое регистров **
|
||||
|
||||
1. Переместите каретку к строке помеченной ✓
|
||||
|
||||
2. Скопируйте эту строку и проверьте состояние регистров с помощью команды
|
||||
`:reg`{vim} `<ENTER>`{normal}
|
||||
2. Скопируйте строку, начинающуюся с цифры 0, и проверьте состояние регистров
|
||||
с помощью команды `:reg`{vim} `<ENTER>`{normal}
|
||||
|
||||
3. Удалите строку, начинающуюся с цифры 0, с помощью команды `"cdd`{normal}
|
||||
и ещё раз проверьте состояние регистров (где будет строка, начинающаяся
|
||||
@@ -132,7 +174,58 @@
|
||||
[нумерованные регистры](quote_number)
|
||||
|
||||
|
||||
# Урок 2.1.4. ИЗЯЩЕСТВО ЗАКЛАДОК
|
||||
# Урок 2.1.5. СПЕЦИАЛЬНЫЕ РЕГИСТРЫ
|
||||
|
||||
** Применение регистров буфера обмена и «чёрная дыра» для расширенной правки **
|
||||
|
||||
Примечание.
|
||||
Для использования системного буфера обмена в системе Linux требуются
|
||||
библиотеки X11 или Wayland, и сам редактор Vim должен быть скомпилирован
|
||||
с включённым компонентом «+clipboard» (обычно это максимальная версия).
|
||||
Это можно проверить с помощью следующих команд редактора Vim:
|
||||
`:version`{vim} и `:echo has('clipboard_working')`{vim}
|
||||
|
||||
1. Регистры буфера обмена `+`{normal} и `*`{normal}:
|
||||
- `"+y`{normal} — копирование в системный буфер обмена
|
||||
(например, по команде `"+yy`{normal} будет скопирована текущая строка)
|
||||
- `"+p`{normal} — вставка из системного буфера обмена
|
||||
- `"*`{normal} — основной выбор в X11 (средняя кнопка «мыши»),
|
||||
а `"+`{normal} — буфер обмена
|
||||
|
||||
"+yy в этой строке, затем вставьте в другое приложение по Ctrl+V или Cmd+V
|
||||
|
||||
2. Регистр «чёрная дыра» `_`{normal} стирает текст:
|
||||
- `"_daw`{normal} — сотрёт слово без сохранения в регистре
|
||||
- Полезно, когда вы не хотите перезаписывать регистр по умолчанию `"`{normal}
|
||||
- Обратите внимание, что здесь используется текстовый объект «a Word»,
|
||||
описанный в предыдущем уроке
|
||||
- `"_dd`{normal} — сотрёт строку без сохранения
|
||||
- `"_dap`{normal} — сотрёт абзац без сохранения
|
||||
- Комбинируйте со счётчиками: `3"_dw`{normal}
|
||||
|
||||
"_diw на любом слове, чтобы удалить его, не затрагивая историю копирования
|
||||
|
||||
3. Совместите с визуальным выделением:
|
||||
- Выделите текст с помощью <SHIFT-V>, a затем `"+y`{normal}
|
||||
- Чтобы вставить из буфера обмена в режиме вставки — `<CTRL-R>+`{normal}
|
||||
- Попробуйте открыть другое приложение и вставить из системного буфера обмена
|
||||
|
||||
4. Запомните:
|
||||
- Регистры буфера обмена доступны между разными экземплярами редактора Vim
|
||||
- Регистр буфера обмена не всегда работает
|
||||
- Регистр «чёрная дыра» предотвращает случайную перезапись других регистров
|
||||
- Регистр `"`{normal} по-прежнему доступен для копирования и вставки
|
||||
- Именованные регистры (a-z) остаются частными для каждой сессии Vim
|
||||
|
||||
5. Устранение неполадок с буфером обмена:
|
||||
- Проверьте доступность с помощью команды
|
||||
`:echo has('clipboard_working')`{vim}
|
||||
- При выводе 1 — означает доступно, 0 — означает, что компонент не включен
|
||||
- В систме Linux может потребоваться пакет vim-gtk или vim-x11
|
||||
(посмотрите вывод команды `:version`{vim})
|
||||
|
||||
|
||||
# Урок 2.1.6. ИЗЯЩЕСТВО ЗАКЛАДОК
|
||||
|
||||
** Избегайте действий, свойственных для дятлокодеров **
|
||||
|
||||
@@ -140,7 +233,7 @@
|
||||
При написании программ часто возникает необходимость перемещения больших
|
||||
фрагментов кода. Приём, приведённый далее, поможет избежать подсчёта номеров
|
||||
строк, требуемых для операций вроде `"a147d`{normal} или `:945,1091d a`{vim},
|
||||
или даже хуже — `i<CTRL-r>=1091-935<ENTER>`{normal}, как первое действие.
|
||||
или даже хуже — `i<CTRL-R>=1091-935<ENTER>`{normal}, как первое действие.
|
||||
|
||||
1. Переместите каретку к строке помеченной ✓
|
||||
|
||||
@@ -165,7 +258,7 @@
|
||||
|
||||
~~~ cmd
|
||||
AAA
|
||||
function itGotRealBigRealFast() {
|
||||
function ItGotRealBigRealFast() {
|
||||
if ( somethingIsTrue ) {
|
||||
doIt()
|
||||
}
|
||||
@@ -193,33 +286,47 @@ CCC
|
||||
|
||||
# РЕЗЮМЕ УРОКА 2.1
|
||||
|
||||
1. Чтобы сохранить (при удалении или копировании) текст для последующей
|
||||
1. Текстовые объекты обеспечивают точное редактирование:
|
||||
- `iw`{normal} или `aw`{normal} — только или включая слово
|
||||
- `i[`{normal} или `a[`{normal} — внутри или включая скобки
|
||||
- `i"`{normal} или `a"`{normal} — внутри или включая кавычки
|
||||
- `it`{normal} или `at`{normal} — внутри или включая теги
|
||||
- `ip`{normal} или `ap`{normal} — только или включая абзаца
|
||||
- `is`{normal} или `as`{normal} — только или включая предложения
|
||||
|
||||
2. Чтобы сохранить (при удалении или копировании) текст для последующей
|
||||
вставки, используйте имеющиеся 26 именованных регистра (a-z).
|
||||
2. Чтобы скопировать целое слово при нахождении каретки на любом символе
|
||||
3. Чтобы скопировать целое слово при нахождении каретки на любом символе
|
||||
в этом слове, воспользуйтесь командой `yiw`{normal}
|
||||
3. Чтобы изменить целое слово при нахождении каретки на любом символе в этом
|
||||
4. Чтобы изменить целое слово при нахождении каретки на любом символе в этом
|
||||
слове, воспользуйтесь командой `ciw`{normal}
|
||||
4. Чтобы в режиме вставки вставить текст непосредственно из регистра,
|
||||
воспользуйтесь командой `<CTRL-r>a`{normal}
|
||||
5. Чтобы в режиме вставки вставить текст непосредственно из регистра,
|
||||
воспользуйтесь командой `<CTRL-R>a`{normal}
|
||||
|
||||
5. Чтобы в режиме вставки вставить результат вычисления простых математических
|
||||
операций, воспользуйтесь командой `<CTRL-r>=60*60`{normal} `<ENTER>`{normal}
|
||||
6. Чтобы в режиме вставки вставить результат выполнения команд системы,
|
||||
воспользуйтесь командой `<CTRL-r>=`{normal}`system('ls -l')`{vim}
|
||||
6. Чтобы в режиме вставки вставить результат вычисления простых математических
|
||||
операций, воспользуйтесь командой `<CTRL-R>=60*60<ENTER>`{normal}
|
||||
7. Чтобы в режиме вставки вставить результат выполнения команд системы,
|
||||
воспользуйтесь командой `<CTRL-R>=`{normal}`system('ls -l')`{vim}
|
||||
|
||||
7. Чтобы просмотреть содержимое регистров, воспользуйтесь командой `:reg`{vim}
|
||||
8. Учитывайте распределение удалённых целиком строк по команде `dd`{normal} —
|
||||
8. Чтобы просмотреть содержимое регистров, воспользуйтесь командой `:reg`{vim}
|
||||
9. Учитывайте распределение удалённых целиком строк по команде `dd`{normal} —
|
||||
это нумерованные регистры в порядке убывания, т. е. от 1 до 9.
|
||||
Помните, что в нумерованных регистрах дольше хранятся те строки, которые
|
||||
были уделены целиком, в отличие от любых других операций
|
||||
9. Учитывайте, что в нумерованных регистрах кратковременно сохраняется всё
|
||||
10. Учитывайте, что в нумерованных регистрах кратковременно сохраняется всё
|
||||
что скопировано.
|
||||
|
||||
10. Чтобы установить закладку в режиме команд, воспользуйтесь командой
|
||||
11. Чтобы установить закладку в режиме команд, воспользуйтесь командой
|
||||
`m[a-zA-Z0-9]`{normal}
|
||||
11. Чтобы переместить каретку на строку в которой установлена закладка,
|
||||
12. Чтобы переместить каретку на строку в которой установлена закладка,
|
||||
воспользуйтесь командой `'`{normal}
|
||||
|
||||
13. Специальные регистры:
|
||||
- `"+`{normal} и `"*`{normal} — системный буфер обмена (зависит от ОС)
|
||||
- `"_`{normal} — «чёрная дыра» (стирание удалённого или скопированного текста)
|
||||
- `"=`{normal} — регистр результата вычислений
|
||||
- `"-`{normal} — регистр малых удалений
|
||||
|
||||
|
||||
# ЗАКЛЮЧЕНИЕ
|
||||
|
||||
@@ -227,5 +334,6 @@ CCC
|
||||
Работа над этой главой будет продолжена.
|
||||
|
||||
Вторая глава учебника была написана Полом Д. Паркером (Paul D. Parker).
|
||||
и Кристианом Брабандт (Christian Brabandt).
|
||||
|
||||
Restorer, перевод на русский язык, 2025, restorer@mail2k.ru
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user