mirror of
https://github.com/zoriya/vim.git
synced 2025-12-08 16:26:16 +00:00
Compare commits
288 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0917e86763 | ||
|
|
9de960ace0 | ||
|
|
f2017f255d | ||
|
|
552bdca781 | ||
|
|
eea0a00811 | ||
|
|
c3a26c6bff | ||
|
|
1d87e11a1e | ||
|
|
ce3189d56e | ||
|
|
bc3dc298b3 | ||
|
|
339e114d70 | ||
|
|
fdbd14e892 | ||
|
|
1d6539cf36 | ||
|
|
1a6476428f | ||
|
|
32ff96ef01 | ||
|
|
5ceb8157bc | ||
|
|
55a27d8ea7 | ||
|
|
234c3fab28 | ||
|
|
094b8473ed | ||
|
|
aab2ead008 | ||
|
|
9d9a20ee87 | ||
|
|
3ec78f973f | ||
|
|
412e0e4ed9 | ||
|
|
c4b7dec382 | ||
|
|
962d916435 | ||
|
|
094cf9f4d5 | ||
|
|
6c41bedeed | ||
|
|
80b817b749 | ||
|
|
0caaf1e465 | ||
|
|
313e4724c3 | ||
|
|
6642982bea | ||
|
|
af9e28a5b8 | ||
|
|
43e234e8b4 | ||
|
|
91deac4539 | ||
|
|
0261e3978e | ||
|
|
546933f497 | ||
|
|
a9a6b0323e | ||
|
|
40b4872966 | ||
|
|
c72078b631 | ||
|
|
c8ef30bc2e | ||
|
|
cb626a4692 | ||
|
|
7a1bdaecf2 | ||
|
|
61fdbfa1e3 | ||
|
|
4ad8ae8465 | ||
|
|
49f0524fb5 | ||
|
|
4be18e77ff | ||
|
|
78012f55fa | ||
|
|
be4e01637e | ||
|
|
685bf83b73 | ||
|
|
8f531662e2 | ||
|
|
e8d4ae0d11 | ||
|
|
1b438a8228 | ||
|
|
a7d36b7320 | ||
|
|
b40c1de384 | ||
|
|
9c51798a1f | ||
|
|
d6e4c75af2 | ||
|
|
ce93d162da | ||
|
|
b8bebd0cd7 | ||
|
|
eb45ad25ab | ||
|
|
907349a743 | ||
|
|
f2e30d0c44 | ||
|
|
2a99fe6c41 | ||
|
|
836137d89a | ||
|
|
492324e588 | ||
|
|
755bf2b3d2 | ||
|
|
94722c5107 | ||
|
|
04e4f1d985 | ||
|
|
8fe5b9c8c1 | ||
|
|
d0200c8631 | ||
|
|
192e24d974 | ||
|
|
f75a2cb3c7 | ||
|
|
fadc02a2a5 | ||
|
|
8dbab1d8ce | ||
|
|
657aea7fc4 | ||
|
|
53f54e49b7 | ||
|
|
870219c58c | ||
|
|
142ed77898 | ||
|
|
032713f829 | ||
|
|
0f843ef091 | ||
|
|
01d4efe2e8 | ||
|
|
b0d45ec67f | ||
|
|
b582010350 | ||
|
|
62a6923470 | ||
|
|
b149d22796 | ||
|
|
5c8771bc5a | ||
|
|
6ec6666047 | ||
|
|
9cbf791995 | ||
|
|
dc7179f9a4 | ||
|
|
ebfec1c531 | ||
|
|
3d79f0a430 | ||
|
|
d343c60df4 | ||
|
|
3770f4c9cd | ||
|
|
f3da4c8427 | ||
|
|
040e795e8d | ||
|
|
145a6afe3a | ||
|
|
a6759381a5 | ||
|
|
51b2fc2ef5 | ||
|
|
11977f9175 | ||
|
|
47bba53bdb | ||
|
|
7193323b77 | ||
|
|
e446a017ff | ||
|
|
f97a295cca | ||
|
|
4aecaa168e | ||
|
|
4219698603 | ||
|
|
90c2353365 | ||
|
|
486fc25a29 | ||
|
|
64f1c4152e | ||
|
|
0ef9a5c094 | ||
|
|
541c87c808 | ||
|
|
da3dd7d857 | ||
|
|
66bb9ae70f | ||
|
|
f7d1c6e188 | ||
|
|
b391e1f805 | ||
|
|
29ac5df37b | ||
|
|
a41e221935 | ||
|
|
450c7a97d1 | ||
|
|
5a57a5e209 | ||
|
|
ae3205aa55 | ||
|
|
912bfee710 | ||
|
|
32517c4c14 | ||
|
|
f450804e14 | ||
|
|
4cae845ce3 | ||
|
|
474f226582 | ||
|
|
584b853ee0 | ||
|
|
24a8d06d7f | ||
|
|
034c350207 | ||
|
|
e857598896 | ||
|
|
378e6c03f9 | ||
|
|
b40a2fb3b3 | ||
|
|
32030a9f3b | ||
|
|
d40f00cb43 | ||
|
|
3213952966 | ||
|
|
60908c4922 | ||
|
|
232bdaaca9 | ||
|
|
c0c2c26265 | ||
|
|
3ce33b120c | ||
|
|
4059400993 | ||
|
|
a86655af84 | ||
|
|
a94bd9d939 | ||
|
|
0233bdfa2b | ||
|
|
043d7b2c84 | ||
|
|
6481accd40 | ||
|
|
bcbfaf32e0 | ||
|
|
6aa0937fb8 | ||
|
|
58b40092e6 | ||
|
|
ad15a39fdb | ||
|
|
f68cddabff | ||
|
|
ea125393af | ||
|
|
9a9432d3a2 | ||
|
|
a47c0fb4ad | ||
|
|
79c11e399b | ||
|
|
2bc849ff81 | ||
|
|
523f22d577 | ||
|
|
566f76e656 | ||
|
|
06cd14d0bf | ||
|
|
1b5f03ec9c | ||
|
|
d41262ed06 | ||
|
|
1cfb14aa97 | ||
|
|
765d82a657 | ||
|
|
01c5f2addf | ||
|
|
dda3053121 | ||
|
|
870cd76283 | ||
|
|
c8ab30a349 | ||
|
|
e01e5215f9 | ||
|
|
8367716a6e | ||
|
|
7f8b2559a3 | ||
|
|
df8f947359 | ||
|
|
0cb3ca9f7a | ||
|
|
eca2c5fff6 | ||
|
|
2c01131c2a | ||
|
|
7d4d87ba89 | ||
|
|
94674f2223 | ||
|
|
5bcd29b84e | ||
|
|
554d031302 | ||
|
|
cf760d50dc | ||
|
|
2468add0b8 | ||
|
|
3259ff3b3b | ||
|
|
c8b204952f | ||
|
|
3ac1d97a1d | ||
|
|
c32949b077 | ||
|
|
7b17eb4b06 | ||
|
|
f057171d8b | ||
|
|
aaa16b0918 | ||
|
|
574950dfb1 | ||
|
|
46ab925937 | ||
|
|
36818a9daa | ||
|
|
ea720aea85 | ||
|
|
e83c133eb9 | ||
|
|
03ff0c6681 | ||
|
|
bcf31ec36b | ||
|
|
a9fa8c58fb | ||
|
|
dc4daa3a39 | ||
|
|
a2942c7468 | ||
|
|
39c82ea656 | ||
|
|
7bdcba08bb | ||
|
|
993dbc33a8 | ||
|
|
6acf757c6a | ||
|
|
fc966c19f8 | ||
|
|
ec8b74f7ab | ||
|
|
1aeb3eb092 | ||
|
|
6bafdd41cb | ||
|
|
9f2d97efe2 | ||
|
|
f1dcd14fc5 | ||
|
|
db4d88c2ad | ||
|
|
c55e8f2c6f | ||
|
|
0d89d8ae89 | ||
|
|
dbe6ef1036 | ||
|
|
7b8db111e8 | ||
|
|
770713794a | ||
|
|
ed0c1d5d4b | ||
|
|
ef91ae4557 | ||
|
|
0a657124a5 | ||
|
|
7b0afc1d76 | ||
|
|
96dd34e534 | ||
|
|
254480736f | ||
|
|
c4b3f6477c | ||
|
|
c6951a76a5 | ||
|
|
73ade49c4b | ||
|
|
09ce0b8e11 | ||
|
|
87c1cbbe98 | ||
|
|
56310d38d8 | ||
|
|
b9a1edfc54 | ||
|
|
a7fbaa43b7 | ||
|
|
b536540ab3 | ||
|
|
d0883faac6 | ||
|
|
81b7ecc5cb | ||
|
|
465de3a57b | ||
|
|
b3d614369f | ||
|
|
71d53e7c57 | ||
|
|
6ef5471afa | ||
|
|
9b99411b93 | ||
|
|
590162cae0 | ||
|
|
e86190e7c1 | ||
|
|
f54cedd676 | ||
|
|
c9207d5d79 | ||
|
|
c53e7904b9 | ||
|
|
9fca133eb7 | ||
|
|
ff3d537704 | ||
|
|
c8b126d70d | ||
|
|
9b8a365d01 | ||
|
|
20b795e0eb | ||
|
|
418b547881 | ||
|
|
104b2ff4d0 | ||
|
|
34820944ed | ||
|
|
afa3f1cc72 | ||
|
|
33e543038b | ||
|
|
07146ad1d3 | ||
|
|
4ce1f99a2d | ||
|
|
8efdcee02e | ||
|
|
c336ae3ce6 | ||
|
|
d505d17885 | ||
|
|
731d00770d | ||
|
|
ba2d191932 | ||
|
|
b5328b46a7 | ||
|
|
b26461715b | ||
|
|
417e88bb75 | ||
|
|
8d754fada8 | ||
|
|
d097af7779 | ||
|
|
67f3094397 | ||
|
|
9d1184cd1d | ||
|
|
9aee8ec400 | ||
|
|
4ab1f4a32f | ||
|
|
4cd45f1408 | ||
|
|
ba936f6f4e | ||
|
|
3d473ee1a6 | ||
|
|
f94178db8d | ||
|
|
91c9d6d772 | ||
|
|
70ef3f546b | ||
|
|
eb53350c02 | ||
|
|
f593fc891c | ||
|
|
74e1274edf | ||
|
|
65b0d16768 | ||
|
|
692fe0889c | ||
|
|
cb94c91070 | ||
|
|
6342e2c5a6 | ||
|
|
67578e5bcf | ||
|
|
b7acea1806 | ||
|
|
7db29e4b5c | ||
|
|
79336e19cb | ||
|
|
3ea8a1b129 | ||
|
|
7ce7daf6cd | ||
|
|
6c87bbb4e4 | ||
|
|
c51a376265 | ||
|
|
4ae0057308 | ||
|
|
ffdaca9e6f | ||
|
|
148bcd3610 | ||
|
|
bb393d8259 | ||
|
|
ffa4e9b43a | ||
|
|
98aeb2100c |
@@ -1,10 +1,31 @@
|
||||
version: "{build}"
|
||||
|
||||
image: Visual Studio 2015
|
||||
|
||||
skip_tags: true
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- FEATURE: HUGE
|
||||
|
||||
# Alternate environments, not used right now. 2022 is a lot slower.
|
||||
#
|
||||
# - job_name: VS-2015
|
||||
# appveyor_build_worker_image: Visual Studio 2015
|
||||
# FEATURE: HUGE
|
||||
|
||||
# - job_name: VS-2017
|
||||
# appveyor_build_worker_image: Visual Studio 2017
|
||||
# FEATURE: HUGE
|
||||
|
||||
# - job_name: VS-2019
|
||||
# appveyor_build_worker_image: Visual Studio 2019
|
||||
# FEATURE: HUGE
|
||||
|
||||
# - job_name: VS-2022
|
||||
# appveyor_build_worker_image: Visual Studio 2022
|
||||
# FEATURE: HUGE
|
||||
|
||||
# disabled
|
||||
# - FEATURE: TINY
|
||||
# - FEATURE: NORMAL
|
||||
@@ -14,19 +35,19 @@ matrix:
|
||||
fast_finish: true
|
||||
|
||||
before_build:
|
||||
# Use Visual Studio 2015 compiler tools (default is 2012)
|
||||
- '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64'
|
||||
- call ver
|
||||
- ci\appveyor.bat install
|
||||
|
||||
build_script:
|
||||
- ci/appveyor.bat
|
||||
- ci\appveyor.bat build
|
||||
|
||||
test_script:
|
||||
- cd src/testdir
|
||||
# Testing with MSVC gvim
|
||||
- path C:\Python35-x64;%PATH%
|
||||
- nmake -f Make_mvc.mak VIMPROG=..\gvim
|
||||
- nmake -f Make_mvc.mak clean
|
||||
# Testing with MSVC console version
|
||||
- nmake -f Make_mvc.mak VIMPROG=..\vim
|
||||
- ci\appveyor.bat test
|
||||
|
||||
artifacts:
|
||||
- path: src/vim.exe
|
||||
name: vim
|
||||
- path: src/gvim.exe
|
||||
name: gvim
|
||||
|
||||
# vim: sw=2 sts=2 et ts=8 sr
|
||||
|
||||
7
.github/CODEOWNERS
vendored
7
.github/CODEOWNERS
vendored
@@ -51,6 +51,7 @@ runtime/compiler/dartanalyser.vim @dkearns
|
||||
runtime/compiler/dartdevc.vim @dkearns
|
||||
runtime/compiler/dartdoc.vim @dkearns
|
||||
runtime/compiler/dartfmt.vim @dkearns
|
||||
runtime/compiler/dotnet.vim @nickspoons
|
||||
runtime/compiler/eruby.vim @dkearns
|
||||
runtime/compiler/fbc.vim @dkearns
|
||||
runtime/compiler/gawk.vim @dkearns
|
||||
@@ -181,6 +182,7 @@ runtime/ftplugin/python.vim @tpict
|
||||
runtime/ftplugin/qb64.vim @dkearns
|
||||
runtime/ftplugin/r.vim @jalvesaq
|
||||
runtime/ftplugin/racket.vim @benknoble
|
||||
runtime/ftplugin/readline.vim @dkearns
|
||||
runtime/ftplugin/rhelp.vim @jalvesaq
|
||||
runtime/ftplugin/rmd.vim @jalvesaq
|
||||
runtime/ftplugin/rnoweb.vim @jalvesaq
|
||||
@@ -297,6 +299,7 @@ runtime/plugin/tarPlugin.vim @cecamp
|
||||
runtime/plugin/vimballPlugin.vim @cecamp
|
||||
runtime/plugin/zipPlugin.vim @cecamp
|
||||
runtime/plugin/manpager.vim @Konfekt
|
||||
runtime/syntax/shared/hgcommitDiff.vim @vegerot
|
||||
runtime/syntax/abaqus.vim @costerwi
|
||||
runtime/syntax/aidl.vim @dpelle
|
||||
runtime/syntax/amiga.vim @cecamp
|
||||
@@ -331,6 +334,7 @@ runtime/syntax/dot.vim @mmottl
|
||||
runtime/syntax/doxygen.vim @frogonwheels
|
||||
runtime/syntax/dtd.vim @chrisbra
|
||||
runtime/syntax/dts.vim @zonque
|
||||
runtime/syntax/editorconfig.vim @gpanders
|
||||
runtime/syntax/eiffel.vim @jocelyn
|
||||
runtime/syntax/elmfilt.vim @cecamp
|
||||
runtime/syntax/erlang.vim @hcs42
|
||||
@@ -371,6 +375,7 @@ runtime/syntax/indent.vim @dkearns
|
||||
runtime/syntax/j.vim @glts
|
||||
runtime/syntax/jargon.vim @h3xx
|
||||
runtime/syntax/java.vim @fleiner
|
||||
runtime/syntax/javascript.vim @fleiner
|
||||
runtime/syntax/jsonc.vim @izhakjakov
|
||||
runtime/syntax/julia.vim @carlobaldassi
|
||||
runtime/syntax/kconfig.vim @chrisbra
|
||||
@@ -394,6 +399,7 @@ runtime/syntax/n1ql.vim @pr3d4t0r
|
||||
runtime/syntax/netrw.vim @cecamp
|
||||
runtime/syntax/nginx.vim @chr4
|
||||
runtime/syntax/ninja.vim @nico
|
||||
runtime/syntax/nix.vim @equill
|
||||
runtime/syntax/nroff.vim @jmarshall
|
||||
runtime/syntax/nsis.vim @k-takata
|
||||
runtime/syntax/openvpn.vim @ObserverOfTime
|
||||
@@ -464,6 +470,7 @@ runtime/syntax/vdf.vim @ObserverOfTime
|
||||
runtime/syntax/vim.vim @cecamp
|
||||
runtime/syntax/vroom.vim @dbarnett
|
||||
runtime/syntax/wast.vim @rhysd
|
||||
runtime/syntax/wdl.vim @zenmatic
|
||||
runtime/syntax/wget.vim @dkearns
|
||||
runtime/syntax/wget2.vim @dkearns
|
||||
runtime/syntax/xbl.vim @dkearns
|
||||
|
||||
23
.github/workflows/ci.yml
vendored
23
.github/workflows/ci.yml
vendored
@@ -96,22 +96,21 @@ jobs:
|
||||
- name: Install gcc-11
|
||||
if: matrix.compiler == 'gcc'
|
||||
run: |
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
sudo apt install -y gcc-11
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
|
||||
sudo update-alternatives --set gcc /usr/bin/gcc-11
|
||||
|
||||
- name: Install clang-15
|
||||
- name: Install clang-16
|
||||
if: matrix.compiler == 'clang'
|
||||
run: |
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
. /etc/lsb-release
|
||||
sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-15 main"
|
||||
sudo apt install -y clang-15 llvm-15
|
||||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100
|
||||
sudo update-alternatives --set clang /usr/bin/clang-15
|
||||
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-15 100
|
||||
sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-15 100
|
||||
sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-16 main"
|
||||
sudo apt install -y clang-16 llvm-16
|
||||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 100
|
||||
sudo update-alternatives --set clang /usr/bin/clang-16
|
||||
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-16 100
|
||||
sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-16 100
|
||||
|
||||
- name: Set up environment
|
||||
run: |
|
||||
@@ -254,7 +253,7 @@ jobs:
|
||||
|
||||
- name: Codecov
|
||||
if: matrix.coverage
|
||||
uses: codecov/codecov-action@v3.1.1
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
|
||||
|
||||
@@ -373,8 +372,8 @@ jobs:
|
||||
PYTHON_VER_DOT: '2.7'
|
||||
PYTHON_DIR: 'C:\Python27'
|
||||
# Python 3
|
||||
PYTHON3_VER: 310
|
||||
PYTHON3_VER_DOT: '3.10'
|
||||
PYTHON3_VER: 311
|
||||
PYTHON3_VER_DOT: '3.11'
|
||||
# Other dependencies
|
||||
# winpty
|
||||
WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
|
||||
@@ -613,7 +612,7 @@ jobs:
|
||||
|
||||
- name: Codecov
|
||||
if: matrix.coverage
|
||||
uses: codecov/codecov-action@v3.1.1
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
directory: src
|
||||
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[](https://www.vim.org)
|
||||
|
||||
[](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [](https://ci.appveyor.com/project/chrisbra/vim) [](https://cirrus-ci.com/github/vim/vim) [](https://codecov.io/gh/vim/vim?branch=master) [](https://scan.coverity.com/projects/vim) [](https://lgtm.com/projects/g/vim/vim/context:cpp) [](https://buildd.debian.org/vim) [](https://repology.org/metapackage/vim) [](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html)
|
||||
[](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [](https://ci.appveyor.com/project/chrisbra/vim) [](https://cirrus-ci.com/github/vim/vim) [](https://codecov.io/gh/vim/vim?branch=master) [](https://scan.coverity.com/projects/vim) [](https://buildd.debian.org/vim) [](https://repology.org/metapackage/vim) [](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html)
|
||||
|
||||
<sub>For translations of this README see the end.</sub>
|
||||
|
||||
@@ -101,7 +101,7 @@ for details (do `:help uganda` inside Vim).
|
||||
|
||||
Summary of the license: There are no restrictions on using or distributing an
|
||||
unmodified copy of Vim. Parts of Vim may also be distributed, but the license
|
||||
text must always be included. For modified versions a few restrictions apply.
|
||||
text must always be included. For modified versions, a few restrictions apply.
|
||||
The license is GPL compatible, you may compile Vim with GPL libraries and
|
||||
distribute it.
|
||||
|
||||
@@ -122,7 +122,7 @@ For the most recent information about sponsoring look on the Vim web site:
|
||||
|
||||
## Contributing ##
|
||||
|
||||
If you would like to help making Vim better, see the
|
||||
If you would like to help make Vim better, see the
|
||||
[CONTRIBUTING.md](/CONTRIBUTING.md) file.
|
||||
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ encouraged to make a donation to help orphans in Uganda. Please read the file
|
||||
|
||||
Summary of the license: There are no restrictions on using or distributing an
|
||||
unmodified copy of Vim. Parts of Vim may also be distributed, but the license
|
||||
text must always be included. For modified versions a few restrictions apply.
|
||||
text must always be included. For modified versions, a few restrictions apply.
|
||||
The license is GPL compatible, you may compile Vim with GPL libraries and
|
||||
distribute it.
|
||||
|
||||
@@ -106,7 +106,7 @@ For the most recent information about sponsoring look on the Vim web site:
|
||||
|
||||
CONTRIBUTING
|
||||
|
||||
If you would like to help making Vim better, see the CONTRIBUTING.md file.
|
||||
If you would like to help make Vim better, see the CONTRIBUTING.md file.
|
||||
|
||||
|
||||
INFORMATION
|
||||
|
||||
@@ -2,18 +2,17 @@
|
||||
|
||||
# What is Vim9?
|
||||
|
||||
This is an experimental side of [Vim](https://github.com/vim/vim).
|
||||
It explores ways of making Vim script faster and better.
|
||||
This is a new syntax for Vim script that was introduced with Vim 9.0.
|
||||
It intends making Vim script faster and better.
|
||||
|
||||
WARNING: The Vim9 script features are still under development, anything can
|
||||
break!
|
||||
|
||||
# Why Vim9?
|
||||
|
||||
## 1. FASTER VIM SCRIPT
|
||||
|
||||
The third item on the poll results of 2018, after popup windows and text
|
||||
properties, is faster Vim script. So how do we do that?
|
||||
properties, both of which have been implemented, is faster Vim script.
|
||||
So how do we do that?
|
||||
|
||||
I have been throwing some ideas around, and soon came to the conclusion
|
||||
that the current way functions are called and executed, with
|
||||
@@ -53,7 +52,7 @@ we can gain, and also that Vim script can be faster than builtin
|
||||
interfaces.
|
||||
|
||||
LuaJit is much faster at Lua-only instructions. In practice the script would
|
||||
not do something useless as counting but change the text. For example,
|
||||
not do something useless counting, but change the text. For example,
|
||||
reindent all the lines:
|
||||
|
||||
``` vim
|
||||
|
||||
@@ -1,9 +1,54 @@
|
||||
@echo off
|
||||
:: Batch file for building/testing Vim on AppVeyor
|
||||
set target=%1
|
||||
|
||||
setlocal ENABLEDELAYEDEXPANSION
|
||||
cd %APPVEYOR_BUILD_FOLDER%
|
||||
|
||||
:: Python3
|
||||
set PYTHON3_VER=311
|
||||
set PYTHON3_RELEASE=3.11.1
|
||||
set PYTHON3_URL=https://www.python.org/ftp/python/%PYTHON3_RELEASE%/python-%PYTHON3_RELEASE%-amd64.exe
|
||||
set PYTHON3_DIR=C:\python%PYTHON3_VER%-x64
|
||||
|
||||
set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
|
||||
|
||||
if exist "%VSWHERE%" (
|
||||
for /f "usebackq delims=" %%i in (
|
||||
`"%VSWHERE%" -products * -latest -property installationPath`
|
||||
) do (
|
||||
set "VCVARSALL=%%i\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
)
|
||||
)
|
||||
|
||||
if not exist "%VCVARSALL%" (
|
||||
set "VCVARSALL=%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
|
||||
)
|
||||
call "%VCVARSALL%" x64
|
||||
|
||||
goto %target%
|
||||
echo Unknown build target.
|
||||
exit 1
|
||||
|
||||
:: ----------------------------------------------------------------------------
|
||||
:install
|
||||
@echo on
|
||||
if not exist downloads mkdir downloads
|
||||
|
||||
:: Python 3
|
||||
if not exist %PYTHON3_DIR% (
|
||||
call :downloadfile %PYTHON3_URL% downloads\python3.exe
|
||||
cmd /c start /wait downloads\python3.exe /quiet TargetDir=%PYTHON3_DIR% ^
|
||||
Include_pip=0 Include_tcltk=0 Include_test=0 Include_tools=0 ^
|
||||
AssociateFiles=0 Shortcuts=0 Include_doc=0 Include_launcher=0 ^
|
||||
InstallLauncherAllUsers=0
|
||||
)
|
||||
@echo off
|
||||
goto :eof
|
||||
|
||||
:: ----------------------------------------------------------------------------
|
||||
:build
|
||||
|
||||
cd src
|
||||
|
||||
echo "Building MSVC 64bit console Version"
|
||||
@@ -22,7 +67,7 @@ if "%FEATURE%" == "HUGE" (
|
||||
nmake -f Make_mvc.mak CPU=AMD64 ^
|
||||
OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no POSTSCRIPT=yes ^
|
||||
PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 ^
|
||||
PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35-x64 ^
|
||||
PYTHON3_VER=%PYTHON3_VER% DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR% ^
|
||||
FEATURES=%FEATURE%
|
||||
) ELSE (
|
||||
nmake -f Make_mvc.mak CPU=AMD64 ^
|
||||
@@ -39,4 +84,31 @@ echo "version output MSVC console"
|
||||
.\vim --version || exit 1
|
||||
echo "version output MSVC GUI"
|
||||
type ver_msvc.txt || exit 1
|
||||
cd ..
|
||||
|
||||
goto :eof
|
||||
|
||||
:: ----------------------------------------------------------------------------
|
||||
:test
|
||||
@echo on
|
||||
cd src/testdir
|
||||
:: Testing with MSVC gvim
|
||||
path %PYTHON3_DIR%;%PATH%
|
||||
nmake -f Make_mvc.mak VIMPROG=..\gvim
|
||||
nmake -f Make_mvc.mak clean
|
||||
:: Testing with MSVC console version
|
||||
nmake -f Make_mvc.mak VIMPROG=..\vim
|
||||
|
||||
@echo off
|
||||
goto :eof
|
||||
|
||||
:: ----------------------------------------------------------------------------
|
||||
:downloadfile
|
||||
:: call :downloadfile <URL> <localfile>
|
||||
if not exist %2 (
|
||||
curl -f -L %1 -o %2
|
||||
)
|
||||
if ERRORLEVEL 1 (
|
||||
rem Retry once.
|
||||
curl -f -L %1 -o %2 || exit 1
|
||||
)
|
||||
@goto :eof
|
||||
|
||||
@@ -29,12 +29,12 @@ To build the installable .exe:
|
||||
|
||||
4. Get a "diff.exe" program. If you skip this the built-in diff will always
|
||||
be used (which is fine for most users). If you do have your own
|
||||
"diff.exe" put it in the "../.." directory (above the "vim82" directory,
|
||||
"diff.exe" put it in the "../.." directory (above the "vim90" directory,
|
||||
it's the same for all Vim versions).
|
||||
You can find one in previous Vim versions or in this archive:
|
||||
http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz
|
||||
|
||||
5 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim82"
|
||||
5 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim90"
|
||||
directory). This is required for the terminal window.
|
||||
|
||||
6. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have
|
||||
|
||||
@@ -228,6 +228,28 @@ FunctionEnd
|
||||
!insertmacro GetParent ""
|
||||
!insertmacro GetParent "un."
|
||||
|
||||
# Get home directory
|
||||
!macro GetHomeDir un
|
||||
Function ${un}GetHomeDir
|
||||
Push $0
|
||||
Push $1
|
||||
ReadEnvStr $0 "HOME"
|
||||
${If} $0 == ""
|
||||
ReadEnvStr $0 "HOMEDRIVE"
|
||||
ReadEnvStr $1 "HOMEPATH"
|
||||
StrCpy $0 "$0$1"
|
||||
${If} $0 == ""
|
||||
ReadEnvStr $0 "USERPROFILE"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
Pop $1
|
||||
Exch $0 # put $0 on top of stack, restore $0 to original value
|
||||
FunctionEnd
|
||||
!macroend
|
||||
|
||||
!insertmacro GetHomeDir ""
|
||||
!insertmacro GetHomeDir "un."
|
||||
|
||||
# Check if Vim is already installed.
|
||||
# return: Installed directory. If not found, it will be empty.
|
||||
Function CheckOldVim
|
||||
@@ -520,7 +542,8 @@ SectionGroup $(str_group_plugin) id_group_plugin
|
||||
Section "$(str_section_plugin_home)" id_section_pluginhome
|
||||
SectionIn 1 3
|
||||
|
||||
StrCpy $1 "$1 -create-directories home"
|
||||
# use ShellExecAsUser below instead
|
||||
# StrCpy $1 "$1 -create-directories home"
|
||||
SectionEnd
|
||||
|
||||
Section "$(str_section_plugin_vim)" id_section_pluginvim
|
||||
@@ -594,6 +617,13 @@ Section -call_install_exe
|
||||
DetailPrint "$(str_msg_registering)"
|
||||
nsExec::Exec "$0\install.exe $1"
|
||||
Pop $3
|
||||
|
||||
${If} ${SectionIsSelected} ${id_section_pluginhome}
|
||||
ReadEnvStr $3 "COMSPEC"
|
||||
Call GetHomeDir
|
||||
Pop $4
|
||||
ShellExecAsUser::ShellExecAsUser "" "$3" '/c "cd /d "$4" & mkdir vimfiles & cd vimfiles & mkdir colors compiler doc ftdetect ftplugin indent keymap plugin syntax"' SW_HIDE
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
|
||||
##########################################################
|
||||
@@ -1042,15 +1072,8 @@ SectionEnd
|
||||
SectionGroup "un.$(str_ungroup_plugin)" id_ungroup_plugin
|
||||
Section /o "un.$(str_unsection_plugin_home)" id_unsection_plugin_home
|
||||
# get the home dir
|
||||
ReadEnvStr $0 "HOME"
|
||||
${If} $0 == ""
|
||||
ReadEnvStr $0 "HOMEDRIVE"
|
||||
ReadEnvStr $1 "HOMEPATH"
|
||||
StrCpy $0 "$0$1"
|
||||
${If} $0 == ""
|
||||
ReadEnvStr $0 "USERPROFILE"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
Call un.GetHomeDir
|
||||
Pop $0
|
||||
|
||||
${If} $0 != ""
|
||||
!insertmacro RemoveVimfiles $0
|
||||
|
||||
9
runtime/autoload/dist/ft.vim
vendored
9
runtime/autoload/dist/ft.vim
vendored
@@ -3,7 +3,7 @@ vim9script
|
||||
# Vim functions for file type detection
|
||||
#
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2022 Nov 24
|
||||
# Last Change: 2022 Dec 14
|
||||
|
||||
# These functions are moved here from runtime/filetype.vim to make startup
|
||||
# faster.
|
||||
@@ -810,10 +810,13 @@ export def SQL()
|
||||
enddef
|
||||
|
||||
# This function checks the first 25 lines of file extension "sc" to resolve
|
||||
# detection between scala and SuperCollider
|
||||
# detection between scala and SuperCollider.
|
||||
# NOTE: We don't check for 'Class : Method', as this can easily be confused
|
||||
# with valid Scala like `val x : Int = 3`. So we instead only rely on
|
||||
# checks that can't be confused.
|
||||
export def FTsc()
|
||||
for lnum in range(1, min([line("$"), 25]))
|
||||
if getline(lnum) =~# '[A-Za-z0-9]*\s:\s[A-Za-z0-9]\|var\s<\|classvar\s<\|\^this.*\||\w*|\|+\s\w*\s{\|\*ar\s'
|
||||
if getline(lnum) =~# 'var\s<\|classvar\s<\|\^this.*\||\w\+|\|+\s\w*\s{\|\*ar\s'
|
||||
setf supercollider
|
||||
return
|
||||
endif
|
||||
|
||||
309
runtime/autoload/dist/vimindent.vim
vendored
309
runtime/autoload/dist/vimindent.vim
vendored
@@ -2,12 +2,12 @@ vim9script
|
||||
|
||||
# Language: Vim script
|
||||
# Maintainer: github user lacygoill
|
||||
# Last Change: 2022 Oct 15
|
||||
# Last Change: 2023 Feb 01
|
||||
|
||||
# NOTE: Whenever you change the code, make sure the tests are still passing:
|
||||
#
|
||||
# $ cd runtime/indent/
|
||||
# $ make clean; make test || vimdiff testdir/vim.{fail,ok}
|
||||
# $ make clean; make test || vimdiff testdir/vim.{ok,fail}
|
||||
|
||||
# Config {{{1
|
||||
|
||||
@@ -112,6 +112,10 @@ const DICT_KEY: string = '^\s*\%('
|
||||
.. '\)'
|
||||
.. ':\%(\s\|$\)'
|
||||
|
||||
# NOT_A_DICT_KEY {{{3
|
||||
|
||||
const NOT_A_DICT_KEY: string = ':\@!'
|
||||
|
||||
# END_OF_COMMAND {{{3
|
||||
|
||||
const END_OF_COMMAND: string = $'\s*\%($\|||\@!\|{INLINE_COMMENT}\)'
|
||||
@@ -144,19 +148,43 @@ const HEREDOC_OPERATOR: string = '\s=<<\s\@=\%(\s\+\%(trim\|eval\)\)\{,2}'
|
||||
#
|
||||
# But sometimes, it can be too costly and cause `E363` to be given.
|
||||
const PATTERN_DELIMITER: string = '[-+*/%]\%(=\s\)\@!'
|
||||
|
||||
# QUOTE {{{3
|
||||
|
||||
const QUOTE: string = '["'']'
|
||||
# }}}2
|
||||
# Syntaxes {{{2
|
||||
# ASSIGNS_HEREDOC {{{3
|
||||
# BLOCKS {{{3
|
||||
|
||||
const ASSIGNS_HEREDOC: string = $'^\%({COMMENT}\)\@!.*\%({HEREDOC_OPERATOR}\)\s\+\zs[A-Z]\+{END_OF_LINE}'
|
||||
const BLOCKS: list<list<string>> = [
|
||||
['if', 'el\%[se]', 'elseif\=', 'en\%[dif]'],
|
||||
['for', 'endfor\='],
|
||||
['wh\%[ile]', 'endw\%[hile]'],
|
||||
['try', 'cat\%[ch]', 'fina\|finally\=', 'endt\%[ry]'],
|
||||
['def', 'enddef'],
|
||||
['fu\%[nction](\@!', 'endf\%[unction]'],
|
||||
['class', 'endclass'],
|
||||
['interface', 'endinterface'],
|
||||
['enum', 'endenum'],
|
||||
['aug\%[roup]\%(\s\+[eE][nN][dD]\)\@!\s\+\S\+', 'aug\%[roup]\s\+[eE][nN][dD]'],
|
||||
]
|
||||
|
||||
# CD_COMMAND {{{3
|
||||
# MODIFIERS {{{3
|
||||
|
||||
const CD_COMMAND: string = $'\<[lt]\=cd!\=\s\+-{END_OF_COMMAND}'
|
||||
# some keywords can be prefixed by modifiers (e.g. `def` can be prefixed by `export`)
|
||||
const MODIFIERS: dict<string> = {
|
||||
def: ['export', 'static'],
|
||||
class: ['export', 'abstract', 'export abstract'],
|
||||
interface: ['export'],
|
||||
}
|
||||
# ...
|
||||
# class: ['export', 'abstract', 'export abstract'],
|
||||
# ...
|
||||
# →
|
||||
# ...
|
||||
# class: '\%(export\|abstract\|export\s\+abstract\)\s\+',
|
||||
# ...
|
||||
->map((_, mods: list<string>): string =>
|
||||
'\%(' .. mods
|
||||
->join('\|')
|
||||
->substitute('\s\+', '\\s\\+', 'g')
|
||||
.. '\)' .. '\s\+')
|
||||
|
||||
# HIGHER_ORDER_COMMAND {{{3
|
||||
|
||||
@@ -174,56 +202,102 @@ patterns =<< trim eval END
|
||||
g\%[lobal]!\={PATTERN_DELIMITER}.*
|
||||
v\%[global]!\={PATTERN_DELIMITER}.*
|
||||
END
|
||||
const HIGHER_ORDER_COMMAND: string = $'\%(^\|{BAR_SEPARATION}\)\s*\<\%(' .. patterns->join('\|') .. '\):\@!'
|
||||
|
||||
# MAPPING_COMMAND {{{3
|
||||
const HIGHER_ORDER_COMMAND: string = $'\%(^\|{BAR_SEPARATION}\)\s*\<\%({patterns->join('\|')}\){NOT_A_DICT_KEY}'
|
||||
|
||||
const MAPPING_COMMAND: string = '\%(\<sil\%[ent]!\=\s\+\)\=\<[nvxsoilct]\=\%(nore\|un\)map!\=\s'
|
||||
# START_MIDDLE_END {{{3
|
||||
|
||||
# NORMAL_COMMAND {{{3
|
||||
# Let's derive this constant from `BLOCKS`:
|
||||
#
|
||||
# [['if', 'el\%[se]', 'elseif\=', 'en\%[dif]'],
|
||||
# ['for', 'endfor\='],
|
||||
# ...,
|
||||
# [...]]
|
||||
# →
|
||||
# {
|
||||
# 'for': ['for', '', 'endfor\='],
|
||||
# 'endfor': ['for', '', 'endfor\='],
|
||||
# 'if': ['if', 'el\%[se]\|elseif\=', 'en\%[dif]'],
|
||||
# 'else': ['if', 'el\%[se]\|elseif\=', 'en\%[dif]'],
|
||||
# 'elseif': ['if', 'el\%[se]\|elseif\=', 'en\%[dif]'],
|
||||
# 'endif': ['if', 'el\%[se]\|elseif\=', 'en\%[dif]'],
|
||||
# ...
|
||||
# }
|
||||
var START_MIDDLE_END: dict<list<string>>
|
||||
|
||||
const NORMAL_COMMAND: string = '\<norm\%[al]!\=\s*\S\+$'
|
||||
def Unshorten(kwd: string): string
|
||||
return BlockStartKeyword(kwd)
|
||||
enddef
|
||||
|
||||
# PLUS_MINUS_COMMAND {{{3
|
||||
def BlockStartKeyword(line: string): string
|
||||
var kwd: string = line->matchstr('\l\+')
|
||||
return fullcommand(kwd, false)
|
||||
enddef
|
||||
|
||||
# In legacy, the `:+` and `:-` commands are not required to be preceded by a colon.
|
||||
# As a result, when `+` or `-` is alone on a line, there is ambiguity.
|
||||
# It might be an operator or a command.
|
||||
# To not break the indentation in legacy scripts, we might need to consider such
|
||||
# lines as commands.
|
||||
const PLUS_MINUS_COMMAND: string = '^\s*[+-]\s*$'
|
||||
{
|
||||
for kwds: list<string> in BLOCKS
|
||||
var [start: string, middle: string, end: string] = [kwds[0], '', kwds[-1]]
|
||||
if MODIFIERS->has_key(start->Unshorten())
|
||||
start = $'\%({MODIFIERS[start]}\)\={start}'
|
||||
endif
|
||||
if kwds->len() > 2
|
||||
middle = kwds[1 : -2]->join('\|')
|
||||
endif
|
||||
for kwd: string in kwds
|
||||
START_MIDDLE_END->extend({[kwd->Unshorten()]: [start, middle, end]})
|
||||
endfor
|
||||
endfor
|
||||
}
|
||||
|
||||
START_MIDDLE_END = START_MIDDLE_END
|
||||
->map((_, kwds: list<string>) =>
|
||||
kwds->map((_, kwd: string) => kwd == ''
|
||||
? ''
|
||||
: $'\%(^\|{BAR_SEPARATION}\|\<sil\%[ent]\|{HIGHER_ORDER_COMMAND}\)\s*'
|
||||
.. $'\<\%({kwd}\)\>\%(\s*{OPERATOR}\)\@!'))
|
||||
|
||||
lockvar! START_MIDDLE_END
|
||||
|
||||
# ENDS_BLOCK {{{3
|
||||
|
||||
const ENDS_BLOCK: string = '^\s*\%('
|
||||
.. 'en\%[dif]'
|
||||
.. '\|' .. 'endfor\='
|
||||
.. '\|' .. 'endw\%[hile]'
|
||||
.. '\|' .. 'endt\%[ry]'
|
||||
.. '\|' .. 'enddef'
|
||||
.. '\|' .. 'endf\%[unction]'
|
||||
.. '\|' .. 'aug\%[roup]\s\+[eE][nN][dD]'
|
||||
.. BLOCKS
|
||||
->copy()
|
||||
->map((_, kwds: list<string>): string => kwds[-1])
|
||||
->join('\|')
|
||||
.. '\|' .. CLOSING_BRACKET
|
||||
.. $'\){END_OF_COMMAND}'
|
||||
|
||||
# ENDS_BLOCK_OR_CLAUSE {{{3
|
||||
|
||||
patterns =<< trim END
|
||||
en\%[dif]
|
||||
el\%[se]
|
||||
endfor\=
|
||||
endw\%[hile]
|
||||
endt\%[ry]
|
||||
fina\|finally\=
|
||||
enddef
|
||||
endf\%[unction]
|
||||
aug\%[roup]\s\+[eE][nN][dD]
|
||||
END
|
||||
patterns = BLOCKS
|
||||
->copy()
|
||||
->map((_, kwds: list<string>) => kwds[1 :])
|
||||
->flattennew()
|
||||
# `catch` and `elseif` need to be handled as special cases
|
||||
->filter((_, pat: string): bool => pat->Unshorten() !~ '^\%(catch\|elseif\)\>')
|
||||
|
||||
const ENDS_BLOCK_OR_CLAUSE: string = '^\s*\%(' .. patterns->join('\|') .. $'\){END_OF_COMMAND}'
|
||||
.. $'\|^\s*cat\%[ch]\%(\s\+\({PATTERN_DELIMITER}\).*\1\)\={END_OF_COMMAND}'
|
||||
.. $'\|^\s*elseif\=\>\%({OPERATOR}\)\@!'
|
||||
|
||||
# STARTS_NAMED_BLOCK {{{3
|
||||
|
||||
patterns = []
|
||||
{
|
||||
for kwds: list<string> in BLOCKS
|
||||
for kwd: string in kwds[0 : -2]
|
||||
if MODIFIERS->has_key(kwd->Unshorten())
|
||||
patterns += [$'\%({MODIFIERS[kwd]}\)\={kwd}']
|
||||
else
|
||||
patterns += [kwd]
|
||||
endif
|
||||
endfor
|
||||
endfor
|
||||
}
|
||||
|
||||
const STARTS_NAMED_BLOCK: string = $'^\s*\%(sil\%[ent]\s\+\)\=\%({patterns->join('\|')}\)\>{NOT_A_DICT_KEY}'
|
||||
|
||||
# STARTS_CURLY_BLOCK {{{3
|
||||
|
||||
# TODO: `{` alone on a line is not necessarily the start of a block.
|
||||
@@ -236,70 +310,57 @@ const STARTS_CURLY_BLOCK: string = '\%('
|
||||
.. '\|' .. $'^\%(\s*\|.*{BAR_SEPARATION}\s*\)\%(com\%[mand]\|au\%[tocmd]\).*\zs\s{{'
|
||||
.. '\)' .. END_OF_COMMAND
|
||||
|
||||
# STARTS_NAMED_BLOCK {{{3
|
||||
|
||||
# All of these will be used at the start of a line (or after a bar).
|
||||
# NOTE: Don't replace `\%x28` with `(`.{{{
|
||||
#
|
||||
# Otherwise, the paren would be unbalanced which might cause syntax highlighting
|
||||
# issues much later in the code of the current script (sometimes, the syntax
|
||||
# highlighting plugin fails to correctly recognize a heredoc which is far away
|
||||
# and/or not displayed because inside a fold).
|
||||
# }}}
|
||||
patterns =<< trim END
|
||||
if
|
||||
el\%[se]
|
||||
elseif\=
|
||||
for
|
||||
wh\%[ile]
|
||||
try
|
||||
cat\%[ch]
|
||||
fina\|finally\=
|
||||
fu\%[nction]\%x28\@!
|
||||
\%(export\s\+\)\=def
|
||||
aug\%[roup]\%(\s\+[eE][nN][dD]\)\@!\s\+\S\+
|
||||
END
|
||||
const STARTS_NAMED_BLOCK: string = '^\s*\%(sil\%[ent]\s\+\)\=\%(' .. patterns->join('\|') .. '\)\>:\@!'
|
||||
|
||||
# STARTS_FUNCTION {{{3
|
||||
|
||||
const STARTS_FUNCTION: string = '^\s*\%(export\s\+\)\=def\>:\@!'
|
||||
const STARTS_FUNCTION: string = $'^\s*\%({MODIFIERS.def}\)\=def\>{NOT_A_DICT_KEY}'
|
||||
|
||||
# ENDS_FUNCTION {{{3
|
||||
|
||||
const ENDS_FUNCTION: string = $'^\s*enddef\>:\@!{END_OF_COMMAND}'
|
||||
const ENDS_FUNCTION: string = $'^\s*enddef\>{END_OF_COMMAND}'
|
||||
|
||||
# START_MIDDLE_END {{{3
|
||||
# ASSIGNS_HEREDOC {{{3
|
||||
|
||||
const START_MIDDLE_END: dict<list<string>> = {
|
||||
if: ['if', 'el\%[se]\|elseif\=', 'en\%[dif]'],
|
||||
else: ['if', 'el\%[se]\|elseif\=', 'en\%[dif]'],
|
||||
elseif: ['if', 'el\%[se]\|elseif\=', 'en\%[dif]'],
|
||||
endif: ['if', 'el\%[se]\|elseif\=', 'en\%[dif]'],
|
||||
for: ['for', '', 'endfor\='],
|
||||
endfor: ['for', '', 'endfor\='],
|
||||
while: ['wh\%[ile]', '', 'endw\%[hile]'],
|
||||
endwhile: ['wh\%[ile]', '', 'endw\%[hile]'],
|
||||
try: ['try', 'cat\%[ch]\|fina\|finally\=', 'endt\%[ry]'],
|
||||
catch: ['try', 'cat\%[ch]\|fina\|finally\=', 'endt\%[ry]'],
|
||||
finally: ['try', 'cat\%[ch]\|fina\|finally\=', 'endt\%[ry]'],
|
||||
endtry: ['try', 'cat\%[ch]\|fina\|finally\=', 'endt\%[ry]'],
|
||||
def: ['\%(export\s\+\)\=def', '', 'enddef'],
|
||||
enddef: ['\%(export\s\+\)\=def', '', 'enddef'],
|
||||
function: ['fu\%[nction]', '', 'endf\%[unction]'],
|
||||
endfunction: ['fu\%[nction]', '', 'endf\%[unction]'],
|
||||
augroup: ['aug\%[roup]\%(\s\+[eE][nN][dD]\)\@!\s\+\S\+', '', 'aug\%[roup]\s\+[eE][nN][dD]'],
|
||||
}->map((_, kwds: list<string>) =>
|
||||
kwds->map((_, kwd: string) => kwd == ''
|
||||
? ''
|
||||
: $'\%(^\|{BAR_SEPARATION}\|\<sil\%[ent]\|{HIGHER_ORDER_COMMAND}\)\s*'
|
||||
.. $'\%({printf('\C\<\%%(%s\)\>:\@!\%%(\s*%s\)\@!', kwd, OPERATOR)}\)'))
|
||||
const ASSIGNS_HEREDOC: string = $'^\%({COMMENT}\)\@!.*\%({HEREDOC_OPERATOR}\)\s\+\zs[A-Z]\+{END_OF_LINE}'
|
||||
|
||||
# PLUS_MINUS_COMMAND {{{3
|
||||
|
||||
# In legacy, the `:+` and `:-` commands are not required to be preceded by a colon.
|
||||
# As a result, when `+` or `-` is alone on a line, there is ambiguity.
|
||||
# It might be an operator or a command.
|
||||
# To not break the indentation in legacy scripts, we might need to consider such
|
||||
# lines as commands.
|
||||
const PLUS_MINUS_COMMAND: string = '^\s*[+-]\s*$'
|
||||
|
||||
# TRICKY_COMMANDS {{{3
|
||||
|
||||
# Some commands are tricky because they accept an argument which can be
|
||||
# conflated with an operator. Examples:
|
||||
#
|
||||
# argdelete *
|
||||
# cd -
|
||||
# normal! ==
|
||||
# nunmap <buffer> (
|
||||
#
|
||||
# TODO: Other commands might accept operators as argument. Handle them too.
|
||||
patterns =<< trim eval END
|
||||
{'\'}<argd\%[elete]\s\+\*\s*$
|
||||
\<[lt]\=cd!\=\s\+-\s*$
|
||||
\<norm\%[al]!\=\s*\S\+$
|
||||
\%(\<sil\%[ent]!\=\s\+\)\=\<[nvxsoilct]\=\%(nore\|un\)map!\=\s
|
||||
{PLUS_MINUS_COMMAND}
|
||||
END
|
||||
|
||||
const TRICKY_COMMANDS: string = patterns->join('\|')
|
||||
# }}}2
|
||||
# EOL {{{2
|
||||
# OPENING_BRACKET_AT_EOL {{{3
|
||||
|
||||
const OPENING_BRACKET_AT_EOL: string = OPENING_BRACKET .. END_OF_VIM9_LINE
|
||||
|
||||
# CLOSING_BRACKET_AT_EOL {{{3
|
||||
|
||||
const CLOSING_BRACKET_AT_EOL: string = CLOSING_BRACKET .. END_OF_VIM9_LINE
|
||||
|
||||
# COMMA_AT_EOL {{{3
|
||||
|
||||
const COMMA_AT_EOL: string = $',{END_OF_VIM9_LINE}'
|
||||
@@ -387,6 +448,7 @@ export def Expr(lnum = v:lnum): number # {{{2
|
||||
endif
|
||||
|
||||
if line_A->AtStartOf('FuncHeader')
|
||||
&& !IsInInterface()
|
||||
line_A.lnum->CacheFuncHeader()
|
||||
elseif line_A.lnum->IsInside('FuncHeader')
|
||||
return b:vimindent.startindent + 2 * shiftwidth()
|
||||
@@ -425,6 +487,7 @@ export def Expr(lnum = v:lnum): number # {{{2
|
||||
if line_A.text->ContinuesBelowBracketBlock(line_B, past_bracket_block)
|
||||
&& line_A.text !~ CLOSING_BRACKET_AT_SOL
|
||||
return past_bracket_block.startindent
|
||||
+ (past_bracket_block.startline =~ STARTS_NAMED_BLOCK ? 2 * shiftwidth() : 0)
|
||||
endif
|
||||
|
||||
# Problem: If we press `==` on the line right below the start of a multiline
|
||||
@@ -433,6 +496,18 @@ export def Expr(lnum = v:lnum): number # {{{2
|
||||
if line_B->EndsWithLambdaArrow()
|
||||
return Indent(line_B.lnum) + shiftwidth() + IndentMoreInBracketBlock()
|
||||
endif
|
||||
# FIXME: Similar issue here:
|
||||
#
|
||||
# var x = []
|
||||
# ->filter((_, _) =>
|
||||
# true)
|
||||
# ->items()
|
||||
#
|
||||
# Press `==` on last line.
|
||||
# Expected: The `->items()` line is indented like `->filter(...)`.
|
||||
# Actual: It's indented like `true)`.
|
||||
# Is it worth fixing? `=ip` gives the correct indentation, because then the
|
||||
# cache is used.
|
||||
|
||||
# Don't move this block before the heredoc one.{{{
|
||||
#
|
||||
@@ -531,8 +606,13 @@ def Offset( # {{{2
|
||||
line_B: dict<any>,
|
||||
): number
|
||||
|
||||
if line_B->AtStartOf('FuncHeader')
|
||||
&& IsInInterface()
|
||||
return 0
|
||||
|
||||
# increase indentation inside a block
|
||||
if line_B.text =~ STARTS_NAMED_BLOCK || line_B->EndsWithCurlyBlock()
|
||||
elseif line_B.text =~ STARTS_NAMED_BLOCK
|
||||
|| line_B->EndsWithCurlyBlock()
|
||||
# But don't indent if the line starting the block also closes it.
|
||||
if line_B->AlsoClosesBlock()
|
||||
return 0
|
||||
@@ -802,11 +882,6 @@ def Indent(lnum: number): number # {{{3
|
||||
return indent(lnum)
|
||||
enddef
|
||||
|
||||
def BlockStartKeyword(line: string): string # {{{3
|
||||
var kwd: string = line->matchstr('\l\+')
|
||||
return fullcommand(kwd, false)
|
||||
enddef
|
||||
|
||||
def MatchingOpenBracket(line: dict<any>): number # {{{3
|
||||
var end: string = line.text->matchstr(CLOSING_BRACKET)
|
||||
var start: string = {']': '[', '}': '{', ')': '('}[end]
|
||||
@@ -903,7 +978,8 @@ def SearchPair( # {{{3
|
||||
if end == '[' || end == ']'
|
||||
e = e->escape('[]')
|
||||
endif
|
||||
return searchpair(s, middle, e, flags, (): bool => InCommentOrString(), stopline, TIMEOUT)
|
||||
return searchpair('\C' .. s, (middle == '' ? '' : '\C' .. middle), '\C' .. e,
|
||||
flags, (): bool => InCommentOrString(), stopline, TIMEOUT)
|
||||
enddef
|
||||
|
||||
def SearchPairStart( # {{{3
|
||||
@@ -1011,6 +1087,10 @@ def IsInThisBlock(line_A: dict<any>, lnum: number): bool # {{{3
|
||||
return line_A.lnum <= end
|
||||
enddef
|
||||
|
||||
def IsInInterface(): bool # {{{3
|
||||
return SearchPair('interface', '', 'endinterface', 'nW') > 0
|
||||
enddef
|
||||
|
||||
def IsFirstLineOfCommand(line_1: dict<any>, line_2: dict<any>): bool # {{{3
|
||||
if line_1.text->Is_IN_KeywordForLoop(line_2.text)
|
||||
return false
|
||||
@@ -1091,6 +1171,10 @@ def EndsWithOpeningBracket(line: dict<any>): bool # {{{3
|
||||
return NonCommentedMatch(line, OPENING_BRACKET_AT_EOL)
|
||||
enddef
|
||||
|
||||
def EndsWithClosingBracket(line: dict<any>): bool # {{{3
|
||||
return NonCommentedMatch(line, CLOSING_BRACKET_AT_EOL)
|
||||
enddef
|
||||
|
||||
def NonCommentedMatch(line: dict<any>, pat: string): bool # {{{3
|
||||
# Could happen if there is no code above us, and we're not on the 1st line.
|
||||
# In that case, `PrevCodeLine()` returns `{lnum: 0, line: ''}`.
|
||||
@@ -1098,16 +1182,6 @@ def NonCommentedMatch(line: dict<any>, pat: string): bool # {{{3
|
||||
return false
|
||||
endif
|
||||
|
||||
if line.text =~ PLUS_MINUS_COMMAND
|
||||
return false
|
||||
endif
|
||||
|
||||
# In `argdelete *`, `*` is not a multiplication operator.
|
||||
# TODO: Other commands can accept `*` as an argument. Handle them too.
|
||||
if line.text =~ '\<argd\%[elete]\s\+\*\s*$'
|
||||
return false
|
||||
endif
|
||||
|
||||
# Technically, that's wrong. A line might start with a range and end with a
|
||||
# line continuation symbol. But it's unlikely. And it's useful to assume the
|
||||
# opposite because it prevents us from conflating a mark with an operator or
|
||||
@@ -1174,24 +1248,7 @@ def NonCommentedMatch(line: dict<any>, pat: string): bool # {{{3
|
||||
return false
|
||||
endif
|
||||
|
||||
# `:help cd-`
|
||||
if line.text =~ CD_COMMAND
|
||||
return false
|
||||
endif
|
||||
|
||||
# At the end of a mapping, any character might appear; e.g. a paren:
|
||||
#
|
||||
# nunmap <buffer> (
|
||||
#
|
||||
# Don't conflate this with a line continuation symbol.
|
||||
if line.text =~ MAPPING_COMMAND
|
||||
return false
|
||||
endif
|
||||
|
||||
# not a comparison operator
|
||||
# vv
|
||||
# normal! ==
|
||||
if line.text =~ NORMAL_COMMAND
|
||||
if line.text =~ TRICKY_COMMANDS
|
||||
return false
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim autoload file for the tohtml plugin.
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2019 Aug 16
|
||||
" Last Change: 2023 Jan 01
|
||||
"
|
||||
" Additional contributors:
|
||||
"
|
||||
@@ -351,63 +351,65 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
let s:old_magic = &magic
|
||||
set magic
|
||||
|
||||
if s:settings.use_xhtml
|
||||
if s:settings.encoding != ""
|
||||
let xml_line = "<?xml version=\"1.0\" encoding=\"" . s:settings.encoding . "\"?>"
|
||||
else
|
||||
let xml_line = "<?xml version=\"1.0\"?>"
|
||||
endif
|
||||
let tag_close = ' />'
|
||||
endif
|
||||
|
||||
let style = [s:settings.use_xhtml ? "" : '-->']
|
||||
let body_line = ''
|
||||
|
||||
let html = []
|
||||
let s:html5 = 0
|
||||
if s:settings.use_xhtml
|
||||
call add(html, xml_line)
|
||||
endif
|
||||
if s:settings.use_xhtml
|
||||
call add(html, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">")
|
||||
call add(html, '<html xmlns="http://www.w3.org/1999/xhtml">')
|
||||
elseif s:settings.use_css && !s:settings.no_pre
|
||||
call add(html, "<!DOCTYPE html>")
|
||||
call add(html, '<html>')
|
||||
let s:html5 = 1
|
||||
else
|
||||
call add(html, '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"')
|
||||
call add(html, ' "http://www.w3.org/TR/html4/loose.dtd">')
|
||||
call add(html, '<html>')
|
||||
endif
|
||||
call add(html, '<head>')
|
||||
|
||||
" include encoding as close to the top as possible, but only if not already
|
||||
" contained in XML information
|
||||
if s:settings.encoding != "" && !s:settings.use_xhtml
|
||||
if s:html5
|
||||
call add(html, '<meta charset="' . s:settings.encoding . '"' . tag_close)
|
||||
else
|
||||
call add(html, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . tag_close)
|
||||
if !s:settings.no_doc
|
||||
if s:settings.use_xhtml
|
||||
if s:settings.encoding != ""
|
||||
let xml_line = "<?xml version=\"1.0\" encoding=\"" . s:settings.encoding . "\"?>"
|
||||
else
|
||||
let xml_line = "<?xml version=\"1.0\"?>"
|
||||
endif
|
||||
let tag_close = ' />'
|
||||
endif
|
||||
|
||||
let style = [s:settings.use_xhtml ? "" : '-->']
|
||||
let body_line = ''
|
||||
|
||||
let s:html5 = 0
|
||||
if s:settings.use_xhtml
|
||||
call add(html, xml_line)
|
||||
endif
|
||||
if s:settings.use_xhtml
|
||||
call add(html, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">")
|
||||
call add(html, '<html xmlns="http://www.w3.org/1999/xhtml">')
|
||||
elseif s:settings.use_css && !s:settings.no_pre
|
||||
call add(html, "<!DOCTYPE html>")
|
||||
call add(html, '<html>')
|
||||
let s:html5 = 1
|
||||
else
|
||||
call add(html, '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"')
|
||||
call add(html, ' "http://www.w3.org/TR/html4/loose.dtd">')
|
||||
call add(html, '<html>')
|
||||
endif
|
||||
call add(html, '<head>')
|
||||
|
||||
" include encoding as close to the top as possible, but only if not already
|
||||
" contained in XML information
|
||||
if s:settings.encoding != "" && !s:settings.use_xhtml
|
||||
if s:html5
|
||||
call add(html, '<meta charset="' . s:settings.encoding . '"' . tag_close)
|
||||
else
|
||||
call add(html, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . tag_close)
|
||||
endif
|
||||
endif
|
||||
|
||||
call add(html, '<title>diff</title>')
|
||||
call add(html, '<meta name="Generator" content="Vim/'.v:version/100.'.'.v:version%100.'"'.tag_close)
|
||||
call add(html, '<meta name="plugin-version" content="'.g:loaded_2html_plugin.'"'.tag_close)
|
||||
call add(html, '<meta name="settings" content="'.
|
||||
\ join(filter(keys(s:settings),'s:settings[v:val]'),',').
|
||||
\ ',prevent_copy='.s:settings.prevent_copy.
|
||||
\ ',use_input_for_pc='.s:settings.use_input_for_pc.
|
||||
\ '"'.tag_close)
|
||||
call add(html, '<meta name="colorscheme" content="'.
|
||||
\ (exists('g:colors_name')
|
||||
\ ? g:colors_name
|
||||
\ : 'none'). '"'.tag_close)
|
||||
|
||||
call add(html, '</head>')
|
||||
let body_line_num = len(html)
|
||||
call add(html, '<body'.(s:settings.line_ids ? ' onload="JumpToLine();"' : '').'>')
|
||||
endif
|
||||
|
||||
call add(html, '<title>diff</title>')
|
||||
call add(html, '<meta name="Generator" content="Vim/'.v:version/100.'.'.v:version%100.'"'.tag_close)
|
||||
call add(html, '<meta name="plugin-version" content="'.g:loaded_2html_plugin.'"'.tag_close)
|
||||
call add(html, '<meta name="settings" content="'.
|
||||
\ join(filter(keys(s:settings),'s:settings[v:val]'),',').
|
||||
\ ',prevent_copy='.s:settings.prevent_copy.
|
||||
\ ',use_input_for_pc='.s:settings.use_input_for_pc.
|
||||
\ '"'.tag_close)
|
||||
call add(html, '<meta name="colorscheme" content="'.
|
||||
\ (exists('g:colors_name')
|
||||
\ ? g:colors_name
|
||||
\ : 'none'). '"'.tag_close)
|
||||
|
||||
call add(html, '</head>')
|
||||
let body_line_num = len(html)
|
||||
call add(html, '<body'.(s:settings.line_ids ? ' onload="JumpToLine();"' : '').'>')
|
||||
call add(html, "<table ".(s:settings.use_css? "" : "border='1' width='100%' ")."id='vimCodeElement".s:settings.id_suffix."'>")
|
||||
|
||||
call add(html, '<tr>')
|
||||
@@ -430,47 +432,53 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
" When not using CSS or when using xhtml, the <body> line can be important.
|
||||
" Assume it will be the same for all buffers and grab it from the first
|
||||
" buffer. Similarly, need to grab the body end line as well.
|
||||
if body_line == ''
|
||||
if !s:settings.no_doc
|
||||
if body_line == ''
|
||||
1
|
||||
call search('<body')
|
||||
let body_line = getline('.')
|
||||
$
|
||||
call search('</body>', 'b')
|
||||
let s:body_end_line = getline('.')
|
||||
endif
|
||||
|
||||
" Grab the style information. Some of this will be duplicated so only insert
|
||||
" it if it's not already there. {{{
|
||||
1
|
||||
call search('<body')
|
||||
let body_line = getline('.')
|
||||
$
|
||||
call search('</body>', 'b')
|
||||
let s:body_end_line = getline('.')
|
||||
endif
|
||||
|
||||
" Grab the style information. Some of this will be duplicated so only insert
|
||||
" it if it's not already there. {{{
|
||||
1
|
||||
let style_start = search('^<style\( type="text/css"\)\?>')
|
||||
1
|
||||
let style_end = search('^</style>')
|
||||
if style_start > 0 && style_end > 0
|
||||
let buf_styles = getline(style_start + 1, style_end - 1)
|
||||
for a_style in buf_styles
|
||||
if index(style, a_style) == -1
|
||||
if diff_style_start == 0
|
||||
if a_style =~ '\<Diff\(Change\|Text\|Add\|Delete\)'
|
||||
let diff_style_start = len(style)-1
|
||||
let style_start = search('^<style\( type="text/css"\)\?>')
|
||||
1
|
||||
let style_end = search('^</style>')
|
||||
if style_start > 0 && style_end > 0
|
||||
let buf_styles = getline(style_start + 1, style_end - 1)
|
||||
for a_style in buf_styles
|
||||
if index(style, a_style) == -1
|
||||
if diff_style_start == 0
|
||||
if a_style =~ '\<Diff\(Change\|Text\|Add\|Delete\)'
|
||||
let diff_style_start = len(style)-1
|
||||
endif
|
||||
endif
|
||||
call insert(style, a_style, insert_index)
|
||||
let insert_index += 1
|
||||
endif
|
||||
call insert(style, a_style, insert_index)
|
||||
let insert_index += 1
|
||||
endif
|
||||
endfor
|
||||
endif " }}}
|
||||
endfor
|
||||
endif " }}}
|
||||
|
||||
" everything new will get added before the diff styles so diff highlight
|
||||
" properly overrides normal highlight
|
||||
if diff_style_start != 0
|
||||
let insert_index = diff_style_start
|
||||
" everything new will get added before the diff styles so diff highlight
|
||||
" properly overrides normal highlight
|
||||
if diff_style_start != 0
|
||||
let insert_index = diff_style_start
|
||||
endif
|
||||
|
||||
" Delete those parts that are not needed so we can include the rest into the
|
||||
" resulting table.
|
||||
1,/^<body.*\%(\n<!--.*-->\_s\+.*id='oneCharWidth'.*\_s\+.*id='oneInputWidth'.*\_s\+.*id='oneEmWidth'\)\?\zs/d_
|
||||
$
|
||||
?</body>?,$d_
|
||||
elseif !s:settings.no_modeline
|
||||
" remove modeline from source files if it is included and we haven't deleted
|
||||
" due to removing html footer already
|
||||
$d
|
||||
endif
|
||||
|
||||
" Delete those parts that are not needed so we can include the rest into the
|
||||
" resulting table.
|
||||
1,/^<body.*\%(\n<!--.*-->\_s\+.*id='oneCharWidth'.*\_s\+.*id='oneInputWidth'.*\_s\+.*id='oneEmWidth'\)\?\zs/d_
|
||||
$
|
||||
?</body>?,$d_
|
||||
let temp = getline(1,'$')
|
||||
" clean out id on the main content container because we already set it on
|
||||
" the table
|
||||
@@ -478,7 +486,11 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
" undo deletion of start and end part
|
||||
" so we can later save the file as valid html
|
||||
" TODO: restore using grabbed lines if undolevel is 1?
|
||||
normal! 2u
|
||||
if !s:settings.no_doc
|
||||
normal! 2u
|
||||
elseif !s:settings.no_modeline
|
||||
normal! u
|
||||
endif
|
||||
if s:settings.use_css
|
||||
call add(html, '<td><div>')
|
||||
elseif s:settings.use_xhtml
|
||||
@@ -495,17 +507,23 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
quit!
|
||||
endfor
|
||||
|
||||
let html[body_line_num] = body_line
|
||||
if !s:settings.no_doc
|
||||
let html[body_line_num] = body_line
|
||||
endif
|
||||
|
||||
call add(html, '</tr>')
|
||||
call add(html, '</table>')
|
||||
call add(html, s:body_end_line)
|
||||
call add(html, '</html>')
|
||||
if !s:settings.no_doc
|
||||
call add(html, s:body_end_line)
|
||||
call add(html, '</html>')
|
||||
endif
|
||||
|
||||
" The generated HTML is admittedly ugly and takes a LONG time to fold.
|
||||
" Make sure the user doesn't do syntax folding when loading a generated file,
|
||||
" using a modeline.
|
||||
call add(html, '<!-- vim: set foldmethod=manual : -->')
|
||||
if !s:settings.no_modeline
|
||||
call add(html, '<!-- vim: set foldmethod=manual : -->')
|
||||
endif
|
||||
|
||||
let i = 1
|
||||
let name = "Diff" . (s:settings.use_xhtml ? ".xhtml" : ".html")
|
||||
@@ -542,129 +560,131 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
|
||||
call append(0, html)
|
||||
|
||||
if len(style) > 0
|
||||
1
|
||||
let style_start = search('^</head>')-1
|
||||
if !s:settings.no_doc
|
||||
if len(style) > 0
|
||||
1
|
||||
let style_start = search('^</head>')-1
|
||||
|
||||
" add required javascript in reverse order so we can just call append again
|
||||
" and again without adjusting {{{
|
||||
" add required javascript in reverse order so we can just call append again
|
||||
" and again without adjusting {{{
|
||||
|
||||
let s:uses_script = s:settings.dynamic_folds || s:settings.line_ids
|
||||
let s:uses_script = s:settings.dynamic_folds || s:settings.line_ids
|
||||
|
||||
" insert script closing tag if needed
|
||||
if s:uses_script
|
||||
call append(style_start, [
|
||||
\ '',
|
||||
\ s:settings.use_xhtml ? '//]]>' : '-->',
|
||||
\ "</script>"
|
||||
\ ])
|
||||
endif
|
||||
|
||||
" insert javascript to get IDs from line numbers, and to open a fold before
|
||||
" jumping to any lines contained therein
|
||||
if s:settings.line_ids
|
||||
call append(style_start, [
|
||||
\ " /* Always jump to new location even if the line was hidden inside a fold, or",
|
||||
\ " * we corrected the raw number to a line ID.",
|
||||
\ " */",
|
||||
\ " if (lineElem) {",
|
||||
\ " lineElem.scrollIntoView(true);",
|
||||
\ " }",
|
||||
\ " return true;",
|
||||
\ "}",
|
||||
\ "if ('onhashchange' in window) {",
|
||||
\ " window.onhashchange = JumpToLine;",
|
||||
\ "}"
|
||||
\ ])
|
||||
|
||||
if s:settings.dynamic_folds
|
||||
" insert script closing tag if needed
|
||||
if s:uses_script
|
||||
call append(style_start, [
|
||||
\ "",
|
||||
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
|
||||
\ " var node = lineElem;",
|
||||
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
|
||||
\ " {",
|
||||
\ " if (node.className == 'closed-fold')",
|
||||
\ " {",
|
||||
\ " /* toggle open the fold ID (remove window ID) */",
|
||||
\ " toggleFold(node.id.substr(4));",
|
||||
\ " }",
|
||||
\ " node = node.parentNode;",
|
||||
\ " }",
|
||||
\ '',
|
||||
\ s:settings.use_xhtml ? '//]]>' : '-->',
|
||||
\ "</script>"
|
||||
\ ])
|
||||
endif
|
||||
endif
|
||||
|
||||
if s:settings.line_ids
|
||||
call append(style_start, [
|
||||
\ "",
|
||||
\ "/* function to open any folds containing a jumped-to line before jumping to it */",
|
||||
\ "function JumpToLine()",
|
||||
\ "{",
|
||||
\ " var lineNum;",
|
||||
\ " lineNum = window.location.hash;",
|
||||
\ " lineNum = lineNum.substr(1); /* strip off '#' */",
|
||||
\ "",
|
||||
\ " if (lineNum.indexOf('L') == -1) {",
|
||||
\ " lineNum = 'L'+lineNum;",
|
||||
\ " }",
|
||||
\ " if (lineNum.indexOf('W') == -1) {",
|
||||
\ " lineNum = 'W1'+lineNum;",
|
||||
\ " }",
|
||||
\ " var lineElem = document.getElementById(lineNum);"
|
||||
\ ])
|
||||
endif
|
||||
" insert javascript to get IDs from line numbers, and to open a fold before
|
||||
" jumping to any lines contained therein
|
||||
if s:settings.line_ids
|
||||
call append(style_start, [
|
||||
\ " /* Always jump to new location even if the line was hidden inside a fold, or",
|
||||
\ " * we corrected the raw number to a line ID.",
|
||||
\ " */",
|
||||
\ " if (lineElem) {",
|
||||
\ " lineElem.scrollIntoView(true);",
|
||||
\ " }",
|
||||
\ " return true;",
|
||||
\ "}",
|
||||
\ "if ('onhashchange' in window) {",
|
||||
\ " window.onhashchange = JumpToLine;",
|
||||
\ "}"
|
||||
\ ])
|
||||
|
||||
" Insert javascript to toggle matching folds open and closed in all windows,
|
||||
" if dynamic folding is active.
|
||||
if s:settings.dynamic_folds
|
||||
call append(style_start, [
|
||||
\ " function toggleFold(objID)",
|
||||
\ " {",
|
||||
\ " for (win_num = 1; win_num <= ".len(a:buf_list)."; win_num++)",
|
||||
\ " {",
|
||||
\ " var fold;",
|
||||
\ ' fold = document.getElementById("win"+win_num+objID);',
|
||||
\ " if(fold.className == 'closed-fold')",
|
||||
\ " {",
|
||||
\ " fold.className = 'open-fold';",
|
||||
\ " }",
|
||||
\ " else if (fold.className == 'open-fold')",
|
||||
\ " {",
|
||||
\ " fold.className = 'closed-fold';",
|
||||
\ " }",
|
||||
\ " }",
|
||||
\ " }",
|
||||
\ ])
|
||||
endif
|
||||
if s:settings.dynamic_folds
|
||||
call append(style_start, [
|
||||
\ "",
|
||||
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
|
||||
\ " var node = lineElem;",
|
||||
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
|
||||
\ " {",
|
||||
\ " if (node.className == 'closed-fold')",
|
||||
\ " {",
|
||||
\ " /* toggle open the fold ID (remove window ID) */",
|
||||
\ " toggleFold(node.id.substr(4));",
|
||||
\ " }",
|
||||
\ " node = node.parentNode;",
|
||||
\ " }",
|
||||
\ ])
|
||||
endif
|
||||
endif
|
||||
|
||||
if s:uses_script
|
||||
" insert script tag if needed
|
||||
call append(style_start, [
|
||||
\ "<script" . (s:html5 ? "" : " type='text/javascript'") . ">",
|
||||
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
|
||||
endif
|
||||
if s:settings.line_ids
|
||||
call append(style_start, [
|
||||
\ "",
|
||||
\ "/* function to open any folds containing a jumped-to line before jumping to it */",
|
||||
\ "function JumpToLine()",
|
||||
\ "{",
|
||||
\ " var lineNum;",
|
||||
\ " lineNum = window.location.hash;",
|
||||
\ " lineNum = lineNum.substr(1); /* strip off '#' */",
|
||||
\ "",
|
||||
\ " if (lineNum.indexOf('L') == -1) {",
|
||||
\ " lineNum = 'L'+lineNum;",
|
||||
\ " }",
|
||||
\ " if (lineNum.indexOf('W') == -1) {",
|
||||
\ " lineNum = 'W1'+lineNum;",
|
||||
\ " }",
|
||||
\ " var lineElem = document.getElementById(lineNum);"
|
||||
\ ])
|
||||
endif
|
||||
|
||||
" Insert styles from all the generated html documents and additional styles
|
||||
" for the table-based layout of the side-by-side diff. The diff should take
|
||||
" up the full browser window (but not more), and be static in size,
|
||||
" horizontally scrollable when the lines are too long. Otherwise, the diff
|
||||
" is pretty useless for really long lines. {{{
|
||||
if s:settings.use_css
|
||||
call append(style_start,
|
||||
\ ['<style' . (s:html5 ? '' : 'type="text/css"') . '>']+
|
||||
\ style+
|
||||
\ [ s:settings.use_xhtml ? '' : '<!--',
|
||||
\ 'table { table-layout: fixed; }',
|
||||
\ 'html, body, table, tbody { width: 100%; margin: 0; padding: 0; }',
|
||||
\ 'table, td, th { border: 1px solid; }',
|
||||
\ 'td { vertical-align: top; }',
|
||||
\ 'th, td { width: '.printf("%.1f",100.0/len(a:win_list)).'%; }',
|
||||
\ 'td div { overflow: auto; }',
|
||||
\ s:settings.use_xhtml ? '' : '-->',
|
||||
\ '</style>'
|
||||
\])
|
||||
endif "}}}
|
||||
" Insert javascript to toggle matching folds open and closed in all windows,
|
||||
" if dynamic folding is active.
|
||||
if s:settings.dynamic_folds
|
||||
call append(style_start, [
|
||||
\ " function toggleFold(objID)",
|
||||
\ " {",
|
||||
\ " for (win_num = 1; win_num <= ".len(a:buf_list)."; win_num++)",
|
||||
\ " {",
|
||||
\ " var fold;",
|
||||
\ ' fold = document.getElementById("win"+win_num+objID);',
|
||||
\ " if(fold.className == 'closed-fold')",
|
||||
\ " {",
|
||||
\ " fold.className = 'open-fold';",
|
||||
\ " }",
|
||||
\ " else if (fold.className == 'open-fold')",
|
||||
\ " {",
|
||||
\ " fold.className = 'closed-fold';",
|
||||
\ " }",
|
||||
\ " }",
|
||||
\ " }",
|
||||
\ ])
|
||||
endif
|
||||
|
||||
if s:uses_script
|
||||
" insert script tag if needed
|
||||
call append(style_start, [
|
||||
\ "<script" . (s:html5 ? "" : " type='text/javascript'") . ">",
|
||||
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
|
||||
endif
|
||||
|
||||
" Insert styles from all the generated html documents and additional styles
|
||||
" for the table-based layout of the side-by-side diff. The diff should take
|
||||
" up the full browser window (but not more), and be static in size,
|
||||
" horizontally scrollable when the lines are too long. Otherwise, the diff
|
||||
" is pretty useless for really long lines. {{{
|
||||
if s:settings.use_css
|
||||
call append(style_start,
|
||||
\ ['<style' . (s:html5 ? '' : 'type="text/css"') . '>']+
|
||||
\ style+
|
||||
\ [ s:settings.use_xhtml ? '' : '<!--',
|
||||
\ 'table { table-layout: fixed; }',
|
||||
\ 'html, body, table, tbody { width: 100%; margin: 0; padding: 0; }',
|
||||
\ 'table, td, th { border: 1px solid; }',
|
||||
\ 'td { vertical-align: top; }',
|
||||
\ 'th, td { width: '.printf("%.1f",100.0/len(a:win_list)).'%; }',
|
||||
\ 'td div { overflow: auto; }',
|
||||
\ s:settings.use_xhtml ? '' : '-->',
|
||||
\ '</style>'
|
||||
\])
|
||||
endif "}}}
|
||||
endif
|
||||
endif
|
||||
|
||||
let &paste = s:old_paste
|
||||
|
||||
100
runtime/autoload/zig/fmt.vim
Normal file
100
runtime/autoload/zig/fmt.vim
Normal file
@@ -0,0 +1,100 @@
|
||||
" Adapted from fatih/vim-go: autoload/go/fmt.vim
|
||||
"
|
||||
" Copyright 2011 The Go Authors. All rights reserved.
|
||||
" Use of this source code is governed by a BSD-style
|
||||
" license that can be found in the LICENSE file.
|
||||
"
|
||||
" Upstream: https://github.com/ziglang/zig.vim
|
||||
|
||||
function! zig#fmt#Format() abort
|
||||
" Save cursor position and many other things.
|
||||
let view = winsaveview()
|
||||
|
||||
if !executable('zig')
|
||||
echohl Error | echomsg "no zig binary found in PATH" | echohl None
|
||||
return
|
||||
endif
|
||||
|
||||
let cmdline = 'zig fmt --stdin --ast-check'
|
||||
let current_buf = bufnr('')
|
||||
|
||||
" The formatted code is output on stdout, the errors go on stderr.
|
||||
if exists('*systemlist')
|
||||
silent let out = systemlist(cmdline, current_buf)
|
||||
else
|
||||
silent let out = split(system(cmdline, current_buf))
|
||||
endif
|
||||
if len(out) == 1
|
||||
if out[0] == "error: unrecognized parameter: '--ast-check'"
|
||||
let cmdline = 'zig fmt --stdin'
|
||||
if exists('*systemlist')
|
||||
silent let out = systemlist(cmdline, current_buf)
|
||||
else
|
||||
silent let out = split(system(cmdline, current_buf))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
let err = v:shell_error
|
||||
|
||||
|
||||
if err == 0
|
||||
" remove undo point caused via BufWritePre.
|
||||
try | silent undojoin | catch | endtry
|
||||
|
||||
" Replace the file content with the formatted version.
|
||||
if exists('*deletebufline')
|
||||
call deletebufline(current_buf, len(out), line('$'))
|
||||
else
|
||||
silent execute ':' . len(out) . ',' . line('$') . ' delete _'
|
||||
endif
|
||||
call setline(1, out)
|
||||
|
||||
" No errors detected, close the loclist.
|
||||
call setloclist(0, [], 'r')
|
||||
lclose
|
||||
elseif get(g:, 'zig_fmt_parse_errors', 1)
|
||||
let errors = s:parse_errors(expand('%'), out)
|
||||
|
||||
call setloclist(0, [], 'r', {
|
||||
\ 'title': 'Errors',
|
||||
\ 'items': errors,
|
||||
\ })
|
||||
|
||||
let max_win_height = get(g:, 'zig_fmt_max_window_height', 5)
|
||||
" Prevent the loclist from becoming too long.
|
||||
let win_height = min([max_win_height, len(errors)])
|
||||
" Open the loclist, but only if there's at least one error to show.
|
||||
execute 'silent! lwindow ' . win_height
|
||||
endif
|
||||
|
||||
call winrestview(view)
|
||||
|
||||
if err != 0
|
||||
echohl Error | echomsg "zig fmt returned error" | echohl None
|
||||
return
|
||||
endif
|
||||
|
||||
" Run the syntax highlighter on the updated content and recompute the folds if
|
||||
" needed.
|
||||
syntax sync fromstart
|
||||
endfunction
|
||||
|
||||
" parse_errors parses the given errors and returns a list of parsed errors
|
||||
function! s:parse_errors(filename, lines) abort
|
||||
" list of errors to be put into location list
|
||||
let errors = []
|
||||
for line in a:lines
|
||||
let tokens = matchlist(line, '^\(.\{-}\):\(\d\+\):\(\d\+\)\s*\(.*\)')
|
||||
if !empty(tokens)
|
||||
call add(errors,{
|
||||
\"filename": a:filename,
|
||||
\"lnum": tokens[2],
|
||||
\"col": tokens[3],
|
||||
\"text": tokens[4],
|
||||
\ })
|
||||
endif
|
||||
endfor
|
||||
|
||||
return errors
|
||||
endfunction
|
||||
" vim: sw=2 ts=2 et
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 9.0. Last change: 2022 Nov 22
|
||||
*autocmd.txt* For Vim version 9.0. Last change: 2022 Dec 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -97,7 +97,7 @@ If the `:autocmd` is in Vim9 script (a script that starts with `:vim9script`
|
||||
and in a `:def` function) then {cmd} will be executed as in Vim9
|
||||
script. Thus this depends on where the autocmd is defined, not where it is
|
||||
triggered.
|
||||
|
||||
*:autocmd-block*
|
||||
{cmd} can be a block, like with `:command`, see |:command-repl|. Example: >
|
||||
au BufReadPost *.xml {
|
||||
setlocal matchpairs+=<:>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2022 Dec 05
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2023 Jan 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -211,6 +211,7 @@ getbufline({buf}, {lnum} [, {end}])
|
||||
getbufoneline({buf}, {lnum}) String line {lnum} of buffer {buf}
|
||||
getbufvar({buf}, {varname} [, {def}])
|
||||
any variable {varname} in buffer {buf}
|
||||
getcellwidths() List get character cell width overrides
|
||||
getchangelist([{buf}]) List list of change list items
|
||||
getchar([expr]) Number or String
|
||||
get one character from the user
|
||||
@@ -666,6 +667,8 @@ test_garbagecollect_soon() none free memory soon for testing
|
||||
test_getvalue({string}) any get value of an internal variable
|
||||
test_gui_event({event}, {args}) bool generate a GUI event for testing
|
||||
test_ignore_error({expr}) none ignore a specific error
|
||||
test_mswin_event({event}, {args})
|
||||
bool generate MS-Windows event for testing
|
||||
test_null_blob() Blob null value for testing
|
||||
test_null_channel() Channel null value for testing
|
||||
test_null_dict() Dict null value for testing
|
||||
@@ -3260,6 +3263,13 @@ getbufvar({buf}, {varname} [, {def}]) *getbufvar()*
|
||||
< Can also be used as a |method|: >
|
||||
GetBufnr()->getbufvar(varname)
|
||||
<
|
||||
getcellwidths() *getcellwidths()*
|
||||
Returns a |List| of cell widths of character ranges overridden
|
||||
by |setcellwidths()|. The format is equal to the argument of
|
||||
|setcellwidths()|. If no character ranges have their cell
|
||||
widths overridden, an empty List is returned.
|
||||
|
||||
|
||||
getchangelist([{buf}]) *getchangelist()*
|
||||
Returns the |changelist| for the buffer {buf}. For the use
|
||||
of {buf}, see |bufname()| above. If buffer {buf} doesn't
|
||||
@@ -3518,6 +3528,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
|
||||
messages |:messages| suboptions
|
||||
option options
|
||||
packadd optional package |pack-add| names
|
||||
runtime |:runtime| completion
|
||||
scriptnames sourced script names |:scriptnames|
|
||||
shellcmd Shell command
|
||||
sign |:sign| suboptions
|
||||
@@ -4135,7 +4146,7 @@ getscriptinfo([{opts}) *getscriptinfo()*
|
||||
this script name links to, if any, otherwise
|
||||
zero
|
||||
variables A dictionary with the script-local variables.
|
||||
Present only when the a particular script is
|
||||
Present only when a particular script is
|
||||
specified using the "sid" item in {opts}.
|
||||
Note that this is a copy, the value of
|
||||
script-local variables cannot be changed using
|
||||
@@ -7956,7 +7967,7 @@ setcellwidths({list}) *setcellwidths()*
|
||||
{low} and {high} can be the same, in which case this refers to
|
||||
one character. Otherwise it is the range of characters from
|
||||
{low} to {high} (inclusive). *E1111* *E1114*
|
||||
Only characters with value 0x100 and higher can be used.
|
||||
Only characters with value 0x80 and higher can be used.
|
||||
|
||||
{width} must be either 1 or 2, indicating the character width
|
||||
in screen cells. *E1112*
|
||||
@@ -9111,6 +9122,8 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
|
||||
Blob 0z00112233.44556677.8899
|
||||
List [item, item]
|
||||
Dictionary {key: value, key: value}
|
||||
Class class SomeName
|
||||
Object object of SomeName {lnum: 1, col: 3}
|
||||
|
||||
When a |List| or |Dictionary| has a recursive reference it is
|
||||
replaced by "[...]" or "{...}". Using eval() on the result
|
||||
@@ -9943,6 +9956,8 @@ type({expr}) The result is a Number representing the type of {expr}.
|
||||
Job: 8 |v:t_job|
|
||||
Channel: 9 |v:t_channel|
|
||||
Blob: 10 |v:t_blob|
|
||||
Class 12 |v:t_class|
|
||||
Object 13 |v:t_object|
|
||||
For backward compatibility, this method can be used: >
|
||||
:if type(myvar) == type(0)
|
||||
:if type(myvar) == type("")
|
||||
@@ -9963,7 +9978,7 @@ typename({expr}) *typename()*
|
||||
Return a string representation of the type of {expr}.
|
||||
Example: >
|
||||
echo typename([1, 2, 3])
|
||||
list<number>
|
||||
< list<number> ~
|
||||
|
||||
|
||||
undofile({name}) *undofile()*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 9.0. Last change: 2022 Oct 01
|
||||
*diff.txt* For Vim version 9.0. Last change: 2023 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -136,7 +136,7 @@ file for a moment and come back to the same file and be in diff mode again.
|
||||
buffers.
|
||||
|
||||
The `:diffoff` command resets the relevant options to the values they had when
|
||||
using `:diffsplit`, `:diffpatch` , `:diffthis`. or starting Vim in diff mode.
|
||||
using `:diffsplit`, `:diffpatch`, `:diffthis`. or starting Vim in diff mode.
|
||||
When using `:diffoff` twice the last saved values are restored.
|
||||
Otherwise they are set to their default value:
|
||||
|
||||
@@ -148,6 +148,10 @@ Otherwise they are set to their default value:
|
||||
'foldmethod' "manual"
|
||||
'foldcolumn' 0
|
||||
|
||||
'foldenable' will most-likely be reset to off. That is when 'foldmethod' is
|
||||
is restored to "manual". The folds themselves are not cleared but they should
|
||||
not show up, resetting 'foldenable' is the best way to do that.
|
||||
|
||||
==============================================================================
|
||||
2. Viewing diffs *view-diffs*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 9.0. Last change: 2022 Dec 03
|
||||
*eval.txt* For Vim version 9.0. Last change: 2023 Jan 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -163,9 +163,10 @@ Note that " " and "0" are also non-empty strings, thus considered to be TRUE.
|
||||
A List, Dictionary or Float is not a Number or String, thus evaluate to FALSE.
|
||||
|
||||
*E611* *E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910*
|
||||
*E913* *E974* *E975* *E976*
|
||||
|List|, |Dictionary|, |Funcref|, |Job|, |Channel| and |Blob| types are not
|
||||
automatically converted.
|
||||
*E913* *E974* *E975* *E976* *E1319* *E1320* *E1321* *E1322*
|
||||
*E1323* *E1324*
|
||||
|List|, |Dictionary|, |Funcref|, |Job|, |Channel|, |Blob|, |Class| and
|
||||
|object| types are not automatically converted.
|
||||
|
||||
*E805* *E806* *E808*
|
||||
When mixing Number and Float the Number is converted to Float. Otherwise
|
||||
@@ -2503,6 +2504,10 @@ v:t_number Value of |Number| type. Read-only. See: |type()|
|
||||
v:t_string Value of |String| type. Read-only. See: |type()|
|
||||
*v:t_blob* *t_blob-variable*
|
||||
v:t_blob Value of |Blob| type. Read-only. See: |type()|
|
||||
*v:t_class* *t_class-variable*
|
||||
v:t_class Value of |class| type. Read-only. See: |type()|
|
||||
*v:t_object* *t_object-variable*
|
||||
v:t_object Value of |object| type. Read-only. See: |type()|
|
||||
|
||||
*v:termresponse* *termresponse-variable*
|
||||
v:termresponse The escape sequence returned by the terminal for the |t_RV|
|
||||
@@ -2969,6 +2974,8 @@ text...
|
||||
deleted when the script ends). Function-local
|
||||
variables are automatically deleted when the function
|
||||
ends.
|
||||
In |Vim9| script variables declared in a function or
|
||||
script cannot be removed.
|
||||
|
||||
:unl[et] ${env-name} ... *:unlet-environment* *:unlet-$*
|
||||
Remove environment variable {env-name}.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*fold.txt* For Vim version 9.0. Last change: 2022 Nov 26
|
||||
*fold.txt* For Vim version 9.0. Last change: 2023 Jan 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -202,7 +202,7 @@ non-matching marker pairs. Example: >
|
||||
|
||||
/* funcB() {{{2 */
|
||||
void funcB() {}
|
||||
|
||||
< *{{{* *}}}*
|
||||
A fold starts at a "{{{" marker. The following number specifies the fold
|
||||
level. What happens depends on the difference between the current fold level
|
||||
and the level given by the marker:
|
||||
|
||||
@@ -48,7 +48,7 @@ typesetting command. That must be a function that takes a path and returns the
|
||||
command as a List. For example:
|
||||
>
|
||||
def ConTeXtCustomCommand(path: string): list<string>
|
||||
return ['mtxrun', '--script', 'context', '--nonstopmode, path]
|
||||
return ['mtxrun', '--script', 'context', '--nonstopmode', path]
|
||||
enddef
|
||||
|
||||
context.ConTeXtTypeset("%", v:none, ConTeXtCustomCommand)
|
||||
|
||||
@@ -84,7 +84,7 @@ METAFONT buffers, and it is set to 0 by default in MetaPost buffers.
|
||||
Define additional keywords that end indented blocks. For instance, if you
|
||||
define:
|
||||
>
|
||||
g:mp_end_tag = ['\<endfoo\>']
|
||||
g:mp_close_tag = ['\<endfoo\>']
|
||||
<
|
||||
any line starting with `endfoo` will be de-indented compared to its previous
|
||||
line.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 9.0. Last change: 2022 Oct 15
|
||||
*index.txt* For Vim version 9.0. Last change: 2023 Jan 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1239,6 +1239,7 @@ tag command action ~
|
||||
|:checkpath| :che[ckpath] list included files
|
||||
|:checktime| :checkt[ime] check timestamp of loaded buffers
|
||||
|:chistory| :chi[story] list the error lists
|
||||
|:class| :class start of a class specification
|
||||
|:clast| :cla[st] go to the specified error, default last one
|
||||
|:clearjumps| :cle[arjumps] clear the jump list
|
||||
|:clist| :cl[ist] list all errors
|
||||
@@ -1313,6 +1314,7 @@ tag command action ~
|
||||
|:else| :el[se] part of an :if command
|
||||
|:elseif| :elsei[f] part of an :if command
|
||||
|:emenu| :em[enu] execute a menu by name
|
||||
|:endclass| :endclass end of a class specification
|
||||
|:enddef| :enddef end of a user function started with :def
|
||||
|:endif| :en[dif] end previous :if
|
||||
|:endfor| :endfo[r] end previous :for
|
||||
@@ -1529,6 +1531,7 @@ tag command action ~
|
||||
|:ptprevious| :ptp[revious] |:tprevious| in preview window
|
||||
|:ptrewind| :ptr[ewind] |:trewind| in preview window
|
||||
|:ptselect| :pts[elect] |:tselect| and show tag in preview window
|
||||
|:public| :public prefix for a class or object member
|
||||
|:put| :pu[t] insert contents of register in the text
|
||||
|:pwd| :pw[d] print current directory
|
||||
|:py3| :py3 execute Python 3 command
|
||||
@@ -1639,6 +1642,7 @@ tag command action ~
|
||||
|:startinsert| :star[tinsert] start Insert mode
|
||||
|:startgreplace| :startg[replace] start Virtual Replace mode
|
||||
|:startreplace| :startr[eplace] start Replace mode
|
||||
|:static| :static prefix for a class member or function
|
||||
|:stopinsert| :stopi[nsert] stop Insert mode
|
||||
|:stjump| :stj[ump] do ":tjump" and split window
|
||||
|:stselect| :sts[elect] do ":tselect" and split window
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 9.0. Last change: 2022 Dec 01
|
||||
*map.txt* For Vim version 9.0. Last change: 2023 Jan 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -20,9 +20,10 @@ manual.
|
||||
1.8 Examples |map-examples|
|
||||
1.9 Using mappings |map-typing|
|
||||
1.10 Mapping alt-keys |:map-alt-keys|
|
||||
1.11 Mapping in modifyOtherKeys mode |modifyOtherKeys|
|
||||
1.12 Mapping with Kitty keyboard protocol |kitty-keyboard-protocol|
|
||||
1.13 Mapping an operator |:map-operator|
|
||||
1.11 Mapping meta-keys |:map-meta-keys|
|
||||
1.12 Mapping in modifyOtherKeys mode |modifyOtherKeys|
|
||||
1.13 Mapping with Kitty keyboard protocol |kitty-keyboard-protocol|
|
||||
1.14 Mapping an operator |:map-operator|
|
||||
2. Abbreviations |abbreviations|
|
||||
3. Local mappings and functions |script-local|
|
||||
4. User-defined commands |user-commands|
|
||||
@@ -777,8 +778,8 @@ To avoid mapping of the characters you type in insert or Command-line mode,
|
||||
type a CTRL-V first. The mapping in Insert mode is disabled if the 'paste'
|
||||
option is on.
|
||||
*map-error*
|
||||
Note that when an error is encountered (that causes an error message or beep)
|
||||
the rest of the mapping is not executed. This is Vi-compatible.
|
||||
Note that when an error is encountered (that causes an error message or might
|
||||
cause a beep) the rest of the mapping is not executed. This is Vi-compatible.
|
||||
|
||||
Note that the second character (argument) of the commands @zZtTfF[]rm'`"v
|
||||
and CTRL-X is not mapped. This was done to be able to use all the named
|
||||
@@ -794,8 +795,8 @@ otherwise you would not be able to use those commands anymore. Here are a few
|
||||
suggestions:
|
||||
- Function keys <F2>, <F3>, etc.. Also the shifted function keys <S-F1>,
|
||||
<S-F2>, etc. Note that <F1> is already used for the help command.
|
||||
- Meta-keys (with the ALT key pressed). Depending on your keyboard accented
|
||||
characters may be used as well. |:map-alt-keys|
|
||||
- Any key with the Alt or Meta key pressed. Depending on your keyboard
|
||||
accented characters may be used as well. |:map-alt-keys|
|
||||
- Use the '_' or ',' character and then any other character. The "_" and ","
|
||||
commands do exist in Vim (see |_| and |,|), but you probably never use them.
|
||||
- Use a key that is a synonym for another command. For example: CTRL-P and
|
||||
@@ -928,6 +929,8 @@ out whether ALT was pressed or not.
|
||||
|
||||
If the terminal supports the modifyOtherKeys mode and it has been enabled,
|
||||
then Vim can recognize more key combinations, see |modifyOtherKeys| below.
|
||||
The Kitty keyboard protocol works in a similar way, see
|
||||
|kitty-keyboard-protocol|.
|
||||
|
||||
By default Vim assumes that pressing the ALT key sets the 8th bit of a typed
|
||||
character. Most decent terminals can work that way, such as xterm, aterm and
|
||||
@@ -966,7 +969,21 @@ on the terminal; that's a good last resource in case you want to send ESC when
|
||||
using other applications but not when inside Vim.
|
||||
|
||||
|
||||
1.11 MAPPING IN modifyOtherKeys mode *modifyOtherKeys*
|
||||
1.11 MAPPING META-KEYS *:map-meta-keys*
|
||||
|
||||
Mapping keys with the Meta modifier works very similar to using the Alt key.
|
||||
What key on your keyboard produces the Meta modifier depends on your keyboard
|
||||
and configuration.
|
||||
|
||||
Note that mapping <M-a> actually is for using the Alt key. That can be
|
||||
confusing! It cannot be changed, it would not be backwards compatible.
|
||||
|
||||
For the Meta modifier the "T" character is used. For example, to map Meta-b
|
||||
in Insert mode: >
|
||||
:imap <T-b> terrible
|
||||
|
||||
|
||||
1.12 MAPPING IN modifyOtherKeys mode *modifyOtherKeys*
|
||||
|
||||
Xterm and a few other terminals can be put in a mode where keys with modifiers
|
||||
are sent with a special escape code. Vim recognizes these codes and can then
|
||||
@@ -1028,7 +1045,7 @@ When the 'esckeys' option is off, then modifyOtherKeys will be disabled in
|
||||
Insert mode to avoid every key with a modifier causing Insert mode to end.
|
||||
|
||||
|
||||
1.12 MAPPING WITH KITTY KEYBOARD PROTOCOL *kitty-keyboard-protocol*
|
||||
1.13 MAPPING WITH KITTY KEYBOARD PROTOCOL *kitty-keyboard-protocol*
|
||||
|
||||
If the value of 'term' contains "kitty" then Vim will send out an escape
|
||||
sequence to enable the Kitty keyboard protocol. This can be changed with the
|
||||
@@ -1055,7 +1072,7 @@ translated). The meaning of {value}:
|
||||
previous state is unknown
|
||||
|
||||
|
||||
1.13 MAPPING AN OPERATOR *:map-operator*
|
||||
1.14 MAPPING AN OPERATOR *:map-operator*
|
||||
|
||||
An operator is used before a {motion} command. To define your own operator
|
||||
you must create a mapping that first sets the 'operatorfunc' option and then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.0. Last change: 2022 Nov 30
|
||||
*options.txt* For Vim version 9.0. Last change: 2023 Feb 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -34,6 +34,8 @@ achieve special effects. These options come in three forms:
|
||||
key codes are not shown, because they are generated
|
||||
internally and can't be changed. Changing the terminal
|
||||
codes in the GUI is not useful either...
|
||||
The options have the form t_AB, see
|
||||
|terminal-options|.
|
||||
|
||||
:se[t]! termcap Idem, but don't use multiple columns.
|
||||
|
||||
@@ -1249,7 +1251,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
\ ' on word "' .. v:beval_text .. '"'
|
||||
endfunction
|
||||
set bexpr=MyBalloonExpr()
|
||||
set ballooneval
|
||||
set ballooneval balloonevalterm
|
||||
<
|
||||
Also see |balloon_show()|, it can be used if the content of the balloon
|
||||
is to be fetched asynchronously. In that case evaluating
|
||||
@@ -1897,7 +1899,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
'allowrevins' + off no CTRL-_ command
|
||||
'antialias' + off don't use antialiased fonts
|
||||
'arabic' + off reset arabic-related options
|
||||
'arabic' + off reset arabic-related options
|
||||
'arabicshape' + on correct character shapes
|
||||
'backspace' + "" normal backspace
|
||||
'backup' + off no backup file
|
||||
@@ -4936,6 +4938,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
CSI ?u request kitty keyboard protocol state
|
||||
CSI >c request the termresponse
|
||||
|
||||
If you notice problems, such as characters being displayed that
|
||||
disappear after `CTRL-L`, you might want to try making this option
|
||||
empty. Then set the 'term' option to have it take effect: >
|
||||
set keyprotocol=
|
||||
let &term = &term
|
||||
<
|
||||
|
||||
*'keywordprg'* *'kp'*
|
||||
'keywordprg' 'kp' string (default "man" or "man -s", DOS: ":help",
|
||||
@@ -5193,8 +5201,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
are left blank.
|
||||
*lcs-multispace*
|
||||
multispace:c...
|
||||
One or more characters to use cyclically to show for
|
||||
multiple consecutive spaces. Overrides the "space"
|
||||
One or more characters to use cyclically to show for
|
||||
multiple consecutive spaces. Overrides the "space"
|
||||
setting, except for single spaces. When omitted, the
|
||||
"space" setting is used. For example,
|
||||
`:set listchars=multispace:---+` shows ten consecutive
|
||||
@@ -7112,50 +7120,54 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'shortmess'* *'shm'*
|
||||
'shortmess' 'shm' string (Vim default "filnxtToOS", Vi default: "S",
|
||||
POSIX default: "AS")
|
||||
global
|
||||
global *E1336*
|
||||
This option helps to avoid all the |hit-enter| prompts caused by file
|
||||
messages, for example with CTRL-G, and to avoid some other messages.
|
||||
It is a list of flags:
|
||||
flag meaning when present ~
|
||||
f use "(3 of 5)" instead of "(file 3 of 5)"
|
||||
i use "[noeol]" instead of "[Incomplete last line]"
|
||||
l use "999L, 888B" instead of "999 lines, 888 bytes"
|
||||
m use "[+]" instead of "[Modified]"
|
||||
n use "[New]" instead of "[New File]"
|
||||
r use "[RO]" instead of "[readonly]"
|
||||
w use "[w]" instead of "written" for file write message
|
||||
f use "(3 of 5)" instead of "(file 3 of 5)" *shm-f*
|
||||
i use "[noeol]" instead of "[Incomplete last line]" *shm-i*
|
||||
l use "999L, 888B" instead of "999 lines, 888 bytes" *shm-l*
|
||||
m use "[+]" instead of "[Modified]" *shm-m*
|
||||
n use "[New]" instead of "[New File]" *shm-n*
|
||||
r use "[RO]" instead of "[readonly]" *shm-r*
|
||||
w use "[w]" instead of "written" for file write message *shm-w*
|
||||
and "[a]" instead of "appended" for ':w >> file' command
|
||||
x use "[dos]" instead of "[dos format]", "[unix]" instead of
|
||||
"[unix format]" and "[mac]" instead of "[mac format]".
|
||||
a all of the above abbreviations
|
||||
x use "[dos]" instead of "[dos format]", "[unix]" *shm-x*
|
||||
instead of "[unix format]" and "[mac]" instead of "[mac
|
||||
format]"
|
||||
a all of the above abbreviations *shm-a*
|
||||
|
||||
o overwrite message for writing a file with subsequent message
|
||||
for reading a file (useful for ":wn" or when 'autowrite' on)
|
||||
O message for reading a file overwrites any previous message.
|
||||
Also for quickfix message (e.g., ":cn").
|
||||
s don't give "search hit BOTTOM, continuing at TOP" or "search
|
||||
hit TOP, continuing at BOTTOM" messages; when using the search
|
||||
count do not show "W" after the count message (see S below)
|
||||
t truncate file message at the start if it is too long to fit
|
||||
on the command-line, "<" will appear in the left most column.
|
||||
Ignored in Ex mode.
|
||||
T truncate other messages in the middle if they are too long to
|
||||
fit on the command line. "..." will appear in the middle.
|
||||
Ignored in Ex mode.
|
||||
W don't give "written" or "[w]" when writing a file
|
||||
A don't give the "ATTENTION" message when an existing swap file
|
||||
is found.
|
||||
I don't give the intro message when starting Vim |:intro|.
|
||||
c don't give |ins-completion-menu| messages. For example,
|
||||
"-- XXX completion (YYY)", "match 1 of 2", "The only match",
|
||||
"Pattern not found", "Back at original", etc.
|
||||
C don't give messages while scanning for ins-completion items,
|
||||
for instance "scanning tags"
|
||||
q use "recording" instead of "recording @a"
|
||||
F don't give the file info when editing a file, like `:silent`
|
||||
was used for the command; note that this also affects messages
|
||||
from autocommands
|
||||
S do not show search count message when searching, e.g.
|
||||
o overwrite message for writing a file with subsequent *shm-o*
|
||||
message for reading a file (useful for ":wn" or when
|
||||
'autowrite' on)
|
||||
O message for reading a file overwrites any previous *shm-O*
|
||||
message; also for quickfix message (e.g., ":cn")
|
||||
s don't give "search hit BOTTOM, continuing at TOP" or *shm-s*
|
||||
"search hit TOP, continuing at BOTTOM" messages; when using
|
||||
the search count do not show "W" after the count message (see
|
||||
S below)
|
||||
t truncate file message at the start if it is too long *shm-t*
|
||||
to fit on the command-line, "<" will appear in the left most
|
||||
column; ignored in Ex mode
|
||||
T truncate other messages in the middle if they are too *shm-T*
|
||||
long to fit on the command line; "..." will appear in the
|
||||
middle; ignored in Ex mode
|
||||
W don't give "written" or "[w]" when writing a file *shm-W*
|
||||
A don't give the "ATTENTION" message when an existing *shm-A*
|
||||
swap file is found
|
||||
I don't give the intro message when starting Vim, *shm-I*
|
||||
see |:intro|
|
||||
c don't give |ins-completion-menu| messages; for *shm-c*
|
||||
example, "-- XXX completion (YYY)", "match 1 of 2", "The only
|
||||
match", "Pattern not found", "Back at original", etc.
|
||||
C don't give messages while scanning for ins-completion *shm-C*
|
||||
items, for instance "scanning tags"
|
||||
q use "recording" instead of "recording @a" *shm-q*
|
||||
F don't give the file info when editing a file, like *shm-F*
|
||||
`:silent` was used for the command; note that this also
|
||||
affects messages from autocommands
|
||||
S do not show search count message when searching, e.g. *shm-S*
|
||||
"[1/5]"
|
||||
|
||||
This gives you the opportunity to avoid that a change between buffers
|
||||
@@ -7216,9 +7228,26 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
- When selecting more than one line, the number of lines.
|
||||
- When selecting a block, the size in screen characters:
|
||||
{lines}x{columns}.
|
||||
This information can be displayed in an alternative location using the
|
||||
'showcmdloc' option.
|
||||
NOTE: This option is set to the Vi default value when 'compatible' is
|
||||
set and to the Vim default value when 'compatible' is reset.
|
||||
|
||||
*'showcmdloc'* *'sloc'*
|
||||
'showcmdloc' 'sloc' string (default "last")
|
||||
global
|
||||
This option can be used to display the (partially) entered command in
|
||||
another location. Possible values are:
|
||||
last Last line of the screen (default).
|
||||
statusline Status line of the current window.
|
||||
tabline First line of the screen if 'showtabline' is enabled.
|
||||
Setting this option to "statusline" or "tabline" means that these will
|
||||
be redrawn whenever the command changes, which can be on every key
|
||||
pressed.
|
||||
The %S 'statusline' item can be used in 'statusline' or 'tabline' to
|
||||
place the text. Without a custom 'statusline' or 'tabline' it will be
|
||||
displayed in a convenient location.
|
||||
|
||||
*'showfulltag'* *'sft'* *'noshowfulltag'* *'nosft'*
|
||||
'showfulltag' 'sft' boolean (default off)
|
||||
global
|
||||
@@ -7657,6 +7686,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
When there is error while evaluating the option then it will be made
|
||||
empty to avoid further errors. Otherwise screen updating would loop.
|
||||
When the result contains unprintable characters the result is
|
||||
unpredictable.
|
||||
|
||||
Note that the only effect of 'ruler' when this option is set (and
|
||||
'laststatus' is 2) is controlling the output of |CTRL-G|.
|
||||
@@ -7716,6 +7747,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
P S Percentage through file of displayed window. This is like the
|
||||
percentage described for 'ruler'. Always 3 in length, unless
|
||||
translated.
|
||||
S S 'showcmd' content, see 'showcmdloc'.
|
||||
a S Argument list status as in default title. ({current} of {max})
|
||||
Empty if the argument file count is zero or one.
|
||||
{ NF Evaluate expression between '%{' and '}' and substitute result.
|
||||
@@ -7744,7 +7776,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
mark. This information is used for mouse clicks.
|
||||
< - Where to truncate line if too long. Default is at the start.
|
||||
No width fields allowed.
|
||||
= - Separation point between left and right aligned items.
|
||||
= - Separation point between alignment sections. Each section will
|
||||
be separated by an equal number of spaces. With one %= what
|
||||
comes after it will be right-aligned. With two %= there is a
|
||||
middle part, with white space left and right of it.
|
||||
No width fields allowed.
|
||||
# - Set highlight group. The name must follow and then a # again.
|
||||
Thus use %#HLname# for highlight group HLname. The same
|
||||
@@ -7752,8 +7787,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
windows.
|
||||
* - Set highlight group to User{N}, where {N} is taken from the
|
||||
minwid field, e.g. %1*. Restore normal highlight with %* or %0*.
|
||||
The difference between User{N} and StatusLine will be applied
|
||||
to StatusLineNC for the statusline of non-current windows.
|
||||
The difference between User{N} and StatusLine will be applied to
|
||||
StatusLineNC for the statusline of non-current windows.
|
||||
The number N must be between 1 and 9. See |hl-User1..9|
|
||||
|
||||
When displaying a flag, Vim removes the leading comma, if any, when
|
||||
@@ -8647,6 +8682,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
set to a name that starts with "xterm", "mlterm", "screen", "tmux",
|
||||
"st" (full match only), "st-" or "stterm", and 'ttymouse' is not set
|
||||
already.
|
||||
If the terminfo/termcap entry "XM" exists and the first number is
|
||||
"1006" then 'ttymouse' will be set to "sgr". This works for many
|
||||
modern terminals.
|
||||
Additionally, if vim is compiled with the |+termresponse| feature and
|
||||
|t_RV| is set to the escape sequence to request the xterm version
|
||||
number, more intelligent detection is done.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 9.0. Last change: 2022 Sep 26
|
||||
*quickfix.txt* For Vim version 9.0. Last change: 2023 Jan 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -365,8 +365,6 @@ processing a quickfix or location list command, it will be aborted.
|
||||
If numbers [from] and/or [to] are given, the respective
|
||||
range of errors is listed. A negative number counts
|
||||
from the last error backwards, -1 being the last error.
|
||||
The 'switchbuf' settings are respected when jumping
|
||||
to a buffer.
|
||||
The |:filter| command can be used to display only the
|
||||
quickfix entries matching a supplied pattern. The
|
||||
pattern is matched against the filename, module name,
|
||||
@@ -1273,6 +1271,21 @@ not "b:current_compiler". What the command actually does is the following:
|
||||
For writing a compiler plugin, see |write-compiler-plugin|.
|
||||
|
||||
|
||||
DOTNET *compiler-dotnet*
|
||||
|
||||
The .NET CLI compiler outputs both errors and warnings by default. The output
|
||||
may be limited to include only errors, by setting the g:dotnet_errors_only
|
||||
variable to |v:true|.
|
||||
|
||||
The associated project name is included in each error and warning. To supress
|
||||
the project name, set the g:dotnet_show_project_file variable to |v:false|.
|
||||
|
||||
Example: limit output to only display errors, and suppress the project name: >
|
||||
let dotnet_errors_only = v:true
|
||||
let dotnet_show_project_file = v:false
|
||||
compiler dotnet
|
||||
<
|
||||
|
||||
GCC *quickfix-gcc* *compiler-gcc*
|
||||
|
||||
There's one variable you can set for the GCC compiler:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 9.0. Last change: 2022 Nov 23
|
||||
*quickref.txt* For Vim version 9.0. Last change: 2022 Dec 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -902,7 +902,8 @@ Short explanation of each option: *option-list*
|
||||
'shortmess' 'shm' list of flags, reduce length of messages
|
||||
'shortname' 'sn' Filenames assumed to be 8.3 chars
|
||||
'showbreak' 'sbr' string to use at the start of wrapped lines
|
||||
'showcmd' 'sc' show (partial) command in status line
|
||||
'showcmd' 'sc' show (partial) command somewhere
|
||||
'showcmdloc' 'sloc' where to show (partial) command
|
||||
'showfulltag' 'sft' show full tag pattern when completing tag
|
||||
'showmatch' 'sm' briefly jump to matching bracket if insert one
|
||||
'showmode' 'smd' message on status line to show current mode
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*sign.txt* For Vim version 9.0. Last change: 2021 Dec 05
|
||||
*sign.txt* For Vim version 9.0. Last change: 2022 Dec 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur
|
||||
@@ -625,9 +625,9 @@ sign_placelist({list})
|
||||
then a new unique identifier is allocated.
|
||||
Otherwise the specified number is used. See
|
||||
|sign-identifier| for more information.
|
||||
lnum line number in the buffer {expr} where the
|
||||
sign is to be placed. For the accepted values,
|
||||
see |line()|.
|
||||
lnum line number in the buffer where the sign is to
|
||||
be placed. For the accepted values, see
|
||||
|line()|.
|
||||
name name of the sign to place. See |sign_define()|
|
||||
for more information.
|
||||
priority priority of the sign. When multiple signs are
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.0. Last change: 2022 Nov 24
|
||||
*syntax.txt* For Vim version 9.0. Last change: 2022 Dec 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -5003,7 +5003,7 @@ in their own color.
|
||||
|
||||
*highlight-clear* *:hi-clear*
|
||||
:hi[ghlight] clear Reset all highlighting to the defaults. Removes all
|
||||
highlighting for groups added by the user!
|
||||
highlighting for groups added by the user.
|
||||
Uses the current value of 'background' to decide which
|
||||
default colors to use.
|
||||
If there was a default link, restore it. |:hi-link|
|
||||
|
||||
102
runtime/doc/tags
102
runtime/doc/tags
@@ -926,6 +926,7 @@ $quote eval.txt /*$quote*
|
||||
'shortname' options.txt /*'shortname'*
|
||||
'showbreak' options.txt /*'showbreak'*
|
||||
'showcmd' options.txt /*'showcmd'*
|
||||
'showcmdloc' options.txt /*'showcmdloc'*
|
||||
'showfulltag' options.txt /*'showfulltag'*
|
||||
'showmatch' options.txt /*'showmatch'*
|
||||
'showmode' options.txt /*'showmode'*
|
||||
@@ -938,6 +939,7 @@ $quote eval.txt /*$quote*
|
||||
'siso' options.txt /*'siso'*
|
||||
'sj' options.txt /*'sj'*
|
||||
'slm' options.txt /*'slm'*
|
||||
'sloc' options.txt /*'sloc'*
|
||||
'slow' vi_diff.txt /*'slow'*
|
||||
'slowopen' vi_diff.txt /*'slowopen'*
|
||||
'sm' options.txt /*'sm'*
|
||||
@@ -1082,6 +1084,7 @@ $quote eval.txt /*$quote*
|
||||
't_VS' term.txt /*'t_VS'*
|
||||
't_WP' term.txt /*'t_WP'*
|
||||
't_WS' term.txt /*'t_WS'*
|
||||
't_XM' term.txt /*'t_XM'*
|
||||
't_ZH' term.txt /*'t_ZH'*
|
||||
't_ZR' term.txt /*'t_ZR'*
|
||||
't_al' term.txt /*'t_al'*
|
||||
@@ -2201,6 +2204,7 @@ $quote eval.txt /*$quote*
|
||||
:aun gui.txt /*:aun*
|
||||
:aunmenu gui.txt /*:aunmenu*
|
||||
:autocmd autocmd.txt /*:autocmd*
|
||||
:autocmd-block autocmd.txt /*:autocmd-block*
|
||||
:autocmd-verbose autocmd.txt /*:autocmd-verbose*
|
||||
:b windows.txt /*:b*
|
||||
:bN windows.txt /*:bN*
|
||||
@@ -3017,6 +3021,7 @@ $quote eval.txt /*$quote*
|
||||
:pts tagsrch.txt /*:pts*
|
||||
:ptselect tagsrch.txt /*:ptselect*
|
||||
:pu change.txt /*:pu*
|
||||
:public vim9class.txt /*:public*
|
||||
:put change.txt /*:put*
|
||||
:pw editing.txt /*:pw*
|
||||
:pwd editing.txt /*:pwd*
|
||||
@@ -3988,6 +3993,7 @@ CTRL-{char} intro.txt /*CTRL-{char}*
|
||||
Channel eval.txt /*Channel*
|
||||
Channels eval.txt /*Channels*
|
||||
Chinese mbyte.txt /*Chinese*
|
||||
Class vim9class.txt /*Class*
|
||||
Cmd-event autocmd.txt /*Cmd-event*
|
||||
CmdUndefined autocmd.txt /*CmdUndefined*
|
||||
Cmdline cmdline.txt /*Cmdline*
|
||||
@@ -4368,10 +4374,55 @@ E1311 map.txt /*E1311*
|
||||
E1312 windows.txt /*E1312*
|
||||
E1313 eval.txt /*E1313*
|
||||
E1314 vim9class.txt /*E1314*
|
||||
E1315 vim9class.txt /*E1315*
|
||||
E1316 vim9class.txt /*E1316*
|
||||
E1317 vim9class.txt /*E1317*
|
||||
E1318 vim9class.txt /*E1318*
|
||||
E1319 eval.txt /*E1319*
|
||||
E132 userfunc.txt /*E132*
|
||||
E1320 eval.txt /*E1320*
|
||||
E1321 eval.txt /*E1321*
|
||||
E1322 eval.txt /*E1322*
|
||||
E1323 eval.txt /*E1323*
|
||||
E1324 eval.txt /*E1324*
|
||||
E1325 vim9class.txt /*E1325*
|
||||
E1326 vim9class.txt /*E1326*
|
||||
E1327 vim9class.txt /*E1327*
|
||||
E1328 vim9class.txt /*E1328*
|
||||
E1329 vim9class.txt /*E1329*
|
||||
E133 userfunc.txt /*E133*
|
||||
E1330 vim9class.txt /*E1330*
|
||||
E1331 vim9class.txt /*E1331*
|
||||
E1332 vim9class.txt /*E1332*
|
||||
E1333 vim9class.txt /*E1333*
|
||||
E1334 vim9class.txt /*E1334*
|
||||
E1335 vim9class.txt /*E1335*
|
||||
E1336 options.txt /*E1336*
|
||||
E1337 vim9class.txt /*E1337*
|
||||
E1338 vim9class.txt /*E1338*
|
||||
E1339 textprop.txt /*E1339*
|
||||
E134 change.txt /*E134*
|
||||
E1340 vim9class.txt /*E1340*
|
||||
E1341 vim9class.txt /*E1341*
|
||||
E1342 vim9class.txt /*E1342*
|
||||
E1343 vim9class.txt /*E1343*
|
||||
E1344 vim9class.txt /*E1344*
|
||||
E1345 vim9class.txt /*E1345*
|
||||
E1346 vim9class.txt /*E1346*
|
||||
E1347 vim9class.txt /*E1347*
|
||||
E1348 vim9class.txt /*E1348*
|
||||
E1349 vim9class.txt /*E1349*
|
||||
E135 autocmd.txt /*E135*
|
||||
E1350 vim9class.txt /*E1350*
|
||||
E1351 vim9class.txt /*E1351*
|
||||
E1352 vim9class.txt /*E1352*
|
||||
E1353 vim9class.txt /*E1353*
|
||||
E1354 vim9class.txt /*E1354*
|
||||
E1355 vim9class.txt /*E1355*
|
||||
E1356 vim9class.txt /*E1356*
|
||||
E1357 vim9class.txt /*E1357*
|
||||
E1358 vim9class.txt /*E1358*
|
||||
E1359 vim9class.txt /*E1359*
|
||||
E136 starting.txt /*E136*
|
||||
E137 starting.txt /*E137*
|
||||
E138 starting.txt /*E138*
|
||||
@@ -5427,6 +5478,7 @@ OS390-bugs os_390.txt /*OS390-bugs*
|
||||
OS390-has-ebcdic os_390.txt /*OS390-has-ebcdic*
|
||||
OS390-limitations os_390.txt /*OS390-limitations*
|
||||
OS390-open-source os_390.txt /*OS390-open-source*
|
||||
Object vim9class.txt /*Object*
|
||||
OffTheSpot mbyte.txt /*OffTheSpot*
|
||||
OnTheSpot mbyte.txt /*OnTheSpot*
|
||||
Operator-pending intro.txt /*Operator-pending*
|
||||
@@ -5588,6 +5640,7 @@ View starting.txt /*View*
|
||||
Vim9 vim9.txt /*Vim9*
|
||||
Vim9-abstract-class vim9class.txt /*Vim9-abstract-class*
|
||||
Vim9-class vim9class.txt /*Vim9-class*
|
||||
Vim9-class-member vim9class.txt /*Vim9-class-member*
|
||||
Vim9-class-overview vim9class.txt /*Vim9-class-overview*
|
||||
Vim9-enum vim9class.txt /*Vim9-enum*
|
||||
Vim9-script vim9.txt /*Vim9-script*
|
||||
@@ -6264,8 +6317,8 @@ cino-w indent.txt /*cino-w*
|
||||
cino-{ indent.txt /*cino-{*
|
||||
cino-} indent.txt /*cino-}*
|
||||
cinoptions-values indent.txt /*cinoptions-values*
|
||||
class-member vim9class.txt /*class-member*
|
||||
class-method vim9class.txt /*class-method*
|
||||
class vim9class.txt /*class*
|
||||
class-function vim9class.txt /*class-function*
|
||||
clear-undo undo.txt /*clear-undo*
|
||||
clearmatches() builtin.txt /*clearmatches()*
|
||||
client-server remote.txt /*client-server*
|
||||
@@ -6322,6 +6375,7 @@ compile-changes-8 version8.txt /*compile-changes-8*
|
||||
compile-changes-9 version9.txt /*compile-changes-9*
|
||||
compiler-compaqada ft_ada.txt /*compiler-compaqada*
|
||||
compiler-decada ft_ada.txt /*compiler-decada*
|
||||
compiler-dotnet quickfix.txt /*compiler-dotnet*
|
||||
compiler-gcc quickfix.txt /*compiler-gcc*
|
||||
compiler-gnat ft_ada.txt /*compiler-gnat*
|
||||
compiler-hpada ft_ada.txt /*compiler-hpada*
|
||||
@@ -7511,6 +7565,7 @@ getbufinfo() builtin.txt /*getbufinfo()*
|
||||
getbufline() builtin.txt /*getbufline()*
|
||||
getbufoneline() builtin.txt /*getbufoneline()*
|
||||
getbufvar() builtin.txt /*getbufvar()*
|
||||
getcellwidths() builtin.txt /*getcellwidths()*
|
||||
getchangelist() builtin.txt /*getchangelist()*
|
||||
getchar() builtin.txt /*getchar()*
|
||||
getcharmod() builtin.txt /*getcharmod()*
|
||||
@@ -8183,6 +8238,7 @@ keypad-point intro.txt /*keypad-point*
|
||||
keys() builtin.txt /*keys()*
|
||||
keytrans() builtin.txt /*keytrans()*
|
||||
kitty-keyboard-protocol map.txt /*kitty-keyboard-protocol*
|
||||
kitty-terminal term.txt /*kitty-terminal*
|
||||
known-bugs todo.txt /*known-bugs*
|
||||
l motion.txt /*l*
|
||||
l: eval.txt /*l:*
|
||||
@@ -8460,6 +8516,7 @@ motion-count-multiplied motion.txt /*motion-count-multiplied*
|
||||
motion.txt motion.txt /*motion.txt*
|
||||
mouse-mode-table term.txt /*mouse-mode-table*
|
||||
mouse-overview term.txt /*mouse-overview*
|
||||
mouse-reporting term.txt /*mouse-reporting*
|
||||
mouse-scrolling-off scroll.txt /*mouse-scrolling-off*
|
||||
mouse-swap-buttons term.txt /*mouse-swap-buttons*
|
||||
mouse-using term.txt /*mouse-using*
|
||||
@@ -8878,6 +8935,14 @@ nr2char() builtin.txt /*nr2char()*
|
||||
nroff.vim syntax.txt /*nroff.vim*
|
||||
null vim9.txt /*null*
|
||||
null-variable eval.txt /*null-variable*
|
||||
null_blob vim9.txt /*null_blob*
|
||||
null_channel vim9.txt /*null_channel*
|
||||
null_dict vim9.txt /*null_dict*
|
||||
null_function vim9.txt /*null_function*
|
||||
null_job vim9.txt /*null_job*
|
||||
null_list vim9.txt /*null_list*
|
||||
null_partial vim9.txt /*null_partial*
|
||||
null_string vim9.txt /*null_string*
|
||||
number_relativenumber options.txt /*number_relativenumber*
|
||||
numbered-function eval.txt /*numbered-function*
|
||||
numbermax-variable eval.txt /*numbermax-variable*
|
||||
@@ -8887,6 +8952,7 @@ o insert.txt /*o*
|
||||
o_CTRL-V motion.txt /*o_CTRL-V*
|
||||
o_V motion.txt /*o_V*
|
||||
o_v motion.txt /*o_v*
|
||||
object vim9class.txt /*object*
|
||||
object-motions motion.txt /*object-motions*
|
||||
object-select motion.txt /*object-select*
|
||||
objects index.txt /*objects*
|
||||
@@ -9545,6 +9611,28 @@ shellescape() builtin.txt /*shellescape()*
|
||||
shift intro.txt /*shift*
|
||||
shift-left-right change.txt /*shift-left-right*
|
||||
shiftwidth() builtin.txt /*shiftwidth()*
|
||||
shm-A options.txt /*shm-A*
|
||||
shm-C options.txt /*shm-C*
|
||||
shm-F options.txt /*shm-F*
|
||||
shm-I options.txt /*shm-I*
|
||||
shm-O options.txt /*shm-O*
|
||||
shm-S options.txt /*shm-S*
|
||||
shm-T options.txt /*shm-T*
|
||||
shm-W options.txt /*shm-W*
|
||||
shm-a options.txt /*shm-a*
|
||||
shm-c options.txt /*shm-c*
|
||||
shm-f options.txt /*shm-f*
|
||||
shm-i options.txt /*shm-i*
|
||||
shm-l options.txt /*shm-l*
|
||||
shm-m options.txt /*shm-m*
|
||||
shm-n options.txt /*shm-n*
|
||||
shm-o options.txt /*shm-o*
|
||||
shm-q options.txt /*shm-q*
|
||||
shm-r options.txt /*shm-r*
|
||||
shm-s options.txt /*shm-s*
|
||||
shm-t options.txt /*shm-t*
|
||||
shm-w options.txt /*shm-w*
|
||||
shm-x options.txt /*shm-x*
|
||||
short-name-changed version4.txt /*short-name-changed*
|
||||
showing-menus gui.txt /*showing-menus*
|
||||
sign-column sign.txt /*sign-column*
|
||||
@@ -9948,6 +10036,7 @@ t_Us term.txt /*t_Us*
|
||||
t_VS term.txt /*t_VS*
|
||||
t_WP term.txt /*t_WP*
|
||||
t_WS term.txt /*t_WS*
|
||||
t_XM term.txt /*t_XM*
|
||||
t_ZH term.txt /*t_ZH*
|
||||
t_ZR term.txt /*t_ZR*
|
||||
t_al term.txt /*t_al*
|
||||
@@ -9961,6 +10050,7 @@ t_channel-variable eval.txt /*t_channel-variable*
|
||||
t_ci version4.txt /*t_ci*
|
||||
t_cil version4.txt /*t_cil*
|
||||
t_cl term.txt /*t_cl*
|
||||
t_class-variable eval.txt /*t_class-variable*
|
||||
t_cm term.txt /*t_cm*
|
||||
t_cri version4.txt /*t_cri*
|
||||
t_cs term.txt /*t_cs*
|
||||
@@ -10025,6 +10115,7 @@ t_ms term.txt /*t_ms*
|
||||
t_nd term.txt /*t_nd*
|
||||
t_none-variable eval.txt /*t_none-variable*
|
||||
t_number-variable eval.txt /*t_number-variable*
|
||||
t_object-variable eval.txt /*t_object-variable*
|
||||
t_op term.txt /*t_op*
|
||||
t_se term.txt /*t_se*
|
||||
t_sf1 version4.txt /*t_sf1*
|
||||
@@ -10264,6 +10355,7 @@ test_garbagecollect_soon() testing.txt /*test_garbagecollect_soon()*
|
||||
test_getvalue() testing.txt /*test_getvalue()*
|
||||
test_gui_event() testing.txt /*test_gui_event()*
|
||||
test_ignore_error() testing.txt /*test_ignore_error()*
|
||||
test_mswin_event() testing.txt /*test_mswin_event()*
|
||||
test_null_blob() testing.txt /*test_null_blob()*
|
||||
test_null_channel() testing.txt /*test_null_channel()*
|
||||
test_null_dict() testing.txt /*test_null_dict()*
|
||||
@@ -10532,6 +10624,7 @@ v:t_TYPE eval.txt /*v:t_TYPE*
|
||||
v:t_blob eval.txt /*v:t_blob*
|
||||
v:t_bool eval.txt /*v:t_bool*
|
||||
v:t_channel eval.txt /*v:t_channel*
|
||||
v:t_class eval.txt /*v:t_class*
|
||||
v:t_dict eval.txt /*v:t_dict*
|
||||
v:t_float eval.txt /*v:t_float*
|
||||
v:t_func eval.txt /*v:t_func*
|
||||
@@ -10539,6 +10632,7 @@ v:t_job eval.txt /*v:t_job*
|
||||
v:t_list eval.txt /*v:t_list*
|
||||
v:t_none eval.txt /*v:t_none*
|
||||
v:t_number eval.txt /*v:t_number*
|
||||
v:t_object eval.txt /*v:t_object*
|
||||
v:t_string eval.txt /*v:t_string*
|
||||
v:termblinkresp eval.txt /*v:termblinkresp*
|
||||
v:termrbgresp eval.txt /*v:termrbgresp*
|
||||
@@ -11020,6 +11114,7 @@ xterm-cursor-keys term.txt /*xterm-cursor-keys*
|
||||
xterm-end-home-keys term.txt /*xterm-end-home-keys*
|
||||
xterm-focus-event term.txt /*xterm-focus-event*
|
||||
xterm-function-keys term.txt /*xterm-function-keys*
|
||||
xterm-kitty term.txt /*xterm-kitty*
|
||||
xterm-modifier-keys term.txt /*xterm-modifier-keys*
|
||||
xterm-mouse options.txt /*xterm-mouse*
|
||||
xterm-mouse-wheel scroll.txt /*xterm-mouse-wheel*
|
||||
@@ -11028,6 +11123,7 @@ xterm-save-screen tips.txt /*xterm-save-screen*
|
||||
xterm-screens tips.txt /*xterm-screens*
|
||||
xterm-scroll-region term.txt /*xterm-scroll-region*
|
||||
xterm-shifted-keys term.txt /*xterm-shifted-keys*
|
||||
xterm-terminfo-entries term.txt /*xterm-terminfo-entries*
|
||||
xterm-true-color term.txt /*xterm-true-color*
|
||||
y change.txt /*y*
|
||||
yaml.vim syntax.txt /*yaml.vim*
|
||||
@@ -11124,6 +11220,8 @@ zz scroll.txt /*zz*
|
||||
{rhs} map.txt /*{rhs}*
|
||||
{server} remote.txt /*{server}*
|
||||
{subject} helphelp.txt /*{subject}*
|
||||
{{{ fold.txt /*{{{*
|
||||
{} intro.txt /*{}*
|
||||
} motion.txt /*}*
|
||||
}}} fold.txt /*}}}*
|
||||
~ change.txt /*~*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 9.0. Last change: 2022 Dec 01
|
||||
*term.txt* For Vim version 9.0. Last change: 2023 Jan 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -88,7 +88,8 @@ Output resumes when you hit <BS>.
|
||||
|
||||
Note: When 't_ti' is not empty, Vim assumes that it causes switching to the
|
||||
alternate screen. This may slightly change what happens when executing a
|
||||
shell command or exiting Vim. To avoid this use 't_TI' and 't_TE'.
|
||||
shell command or exiting Vim. To avoid this use 't_TI' and 't_TE' (but make
|
||||
sure to add to them, not overwrite).
|
||||
|
||||
Vim will try to detect what keyboard protocol the terminal is using with the
|
||||
't_RK' termcap entry. This is sent after 't_TI', but only when there is no
|
||||
@@ -117,6 +118,10 @@ have a problem with this, disable bracketed paste by putting this in your
|
||||
If this is done while Vim is running the 't_BD' will be sent to the terminal
|
||||
to disable bracketed paste.
|
||||
|
||||
If |t_PS| or |t_PE| is not set, then |t_BE| will not be used. This is to make
|
||||
sure that bracketed paste is not enabled when the escape codes surrounding
|
||||
pasted text cannot be recognized.
|
||||
|
||||
If your terminal supports bracketed paste, but the options are not set
|
||||
automatically, you can try using something like this: >
|
||||
|
||||
@@ -126,7 +131,11 @@ automatically, you can try using something like this: >
|
||||
exec "set t_PS=\e[200~"
|
||||
exec "set t_PE=\e[201~"
|
||||
endif
|
||||
<
|
||||
|
||||
The terminfo entries "BE", "BD", "PS" and "PE" were added in ncurses version
|
||||
6.4, early 2023, for some terminals. If you have this version then you may
|
||||
not have to manually configure your terminal.
|
||||
|
||||
*tmux-integration*
|
||||
If you experience issues when running Vim inside tmux, here are a few hints.
|
||||
You can comment-out parts if something doesn't work (it may depend on the
|
||||
@@ -294,6 +303,58 @@ When Vim receives a response to the |t_RV| (request version) sequence and it
|
||||
starts with CSI, it assumes that the terminal is in 8-bit mode and will
|
||||
convert all key sequences to their 8-bit variants.
|
||||
|
||||
*xterm-terminfo-entries*
|
||||
For some time the terminfo entries were insufficient to describe all the
|
||||
features tht Vim can use. The builtin xterm termcap entries did have these,
|
||||
with the result that several terminals that were similar enough to xterm took
|
||||
advantage of these by prefixing "xterm-" to the terminal name in $TERM.
|
||||
|
||||
This leads to problems, because quite often these terminals are not 100%
|
||||
compatible with xterm. At the start of 2023 several entries have been added
|
||||
to the terminfo database to make it possible to use these features without
|
||||
using the "xterm" workaround. These are the relevant entries (so far):
|
||||
|
||||
name xterm value description ~
|
||||
RV "\033[>c" Request version |t_RV|
|
||||
|
||||
BE "\033[?2004h" enable bracketed paste mode |t_BE|
|
||||
BD "\033[?2004l" disable bracketed paste mode |t_BD|
|
||||
PS "\033[200~" pasted text start |t_PS|
|
||||
PE "\033[201~" pasted text end |t_PE|
|
||||
|
||||
XM "\033[?1006;1004;1000%?%p1%{1}%=%th%el%;"
|
||||
mouse enable / disable |t_XM|
|
||||
|
||||
The "XM" entry includes "1006" to enable SGR style mouse reporting. This
|
||||
supports columns above 223. It also includes "1004" which enables focus
|
||||
reporting. The t_fe and t_fd entries can be left empty (they don't have
|
||||
entries in terminfo/termcap anyway).
|
||||
|
||||
*xterm-kitty* *kitty-terminal*
|
||||
The Kitty terminal is a special case. Mainly because it works differently
|
||||
from most other terminals, but also because, instead of trying the fit in and
|
||||
make it behave like other terminals by default, it dictates how applications
|
||||
need to work when using Kitty. This makes it very difficult for Vim to work
|
||||
in a Kitty terminal. Some exceptions have been hard coded, but it is not at
|
||||
all nice to have to make exceptions for one specific terminal.
|
||||
|
||||
One of the problems is that the value for $TERM is set to "xterm-kitty". For
|
||||
Vim this is an indication that the terminal is xterm-compatible and the
|
||||
builtin xterm termcap entries should be used. Many other terminals depend on
|
||||
this. However, Kitty is not fully xterm compatible. The author suggested to
|
||||
ignore the "xterm-" prefix and use the terminfo entry anyway, so that is what
|
||||
happens now, the builtin xterm termcap entries are not used. However, the
|
||||
t_RV is set, otherwise other things would not work, such as automatically
|
||||
setting 'ttymouse' to "sgr" (at least until |t_XM| is being used for this).
|
||||
|
||||
It is not clear why kitty sets $TERM to "xterm-kitty", the terminal isn't
|
||||
really xterm compatible. "kitty" would be more appropriate, but a terminfo
|
||||
entry with that name is not widespread.
|
||||
|
||||
Note that using the kitty keyboard protocol is a separate feature, see
|
||||
|kitty-keyboard-protocol|.
|
||||
|
||||
|
||||
==============================================================================
|
||||
2. Terminal options *terminal-options* *termcap-options* *E436*
|
||||
|
||||
@@ -393,6 +454,8 @@ Added by Vim (there are no standard codes for these):
|
||||
xterm and other terminal emulators) The
|
||||
response is stored in |v:termresponse| |xterm-8bit|
|
||||
|'ttymouse'| |xterm-codes|
|
||||
t_XM enable/disable mouse reporting, *t_XM* *'t_XM'*
|
||||
see |mouse-reporting| below
|
||||
t_RK request terminal keyboard protocol state; *t_RK* *'t_RK'*
|
||||
sent after |t_TI|
|
||||
t_u7 request cursor position (for xterm) *t_u7* *'t_u7'*
|
||||
@@ -423,10 +486,10 @@ Added by Vim (there are no standard codes for these):
|
||||
t_Si save icon text to stack *t_Si* *'t_Si'*
|
||||
t_Ri restore icon text from stack *t_Ri* *'t_Ri'*
|
||||
t_TE end of "raw" mode *t_TE* *'t_TE'*
|
||||
t_TI put terminal into "raw" mode *t_TI* *'t_TI'*
|
||||
t_fe enable focus-event tracking *t_fe* *'t_fe'*
|
||||
t_TI put terminal into "raw" mode *t_TI* *'t_TI'*
|
||||
t_fe enable focus-event tracking *t_fe* *'t_fe'*
|
||||
|xterm-focus-event|
|
||||
t_fd disable focus-event tracking *t_fd* *'t_fd'*
|
||||
t_fd disable focus-event tracking *t_fd* *'t_fd'*
|
||||
|xterm-focus-event|
|
||||
|
||||
Some codes have a start, middle and end part. The start and end are defined
|
||||
@@ -436,8 +499,8 @@ by the termcap option, the middle part is text.
|
||||
set cursor color: t_SC {color name} t_EC
|
||||
|
||||
t_SH must take one argument:
|
||||
0, 1 or none blinking block cursor
|
||||
2 block cursor
|
||||
0, 1 or none blinking block cursor
|
||||
2 block cursor
|
||||
3 blinking underline cursor
|
||||
4 underline cursor
|
||||
5 blinking vertical bar cursor
|
||||
@@ -446,6 +509,21 @@ t_SH must take one argument:
|
||||
t_RS is sent only if the response to t_RV has been received. It is not used
|
||||
on Mac OS when Terminal.app could be recognized from the termresponse.
|
||||
|
||||
*mouse-reporting*
|
||||
Many terminals can report mouse clicks and some can report mouse movement and
|
||||
dragging. Vim needs to know what codes are being used for this.
|
||||
|
||||
The "XM" terminfo/termcap entry is used for this. Vim also has the 'ttymouse'
|
||||
option to specify the mouse protocol being used. See the option for the
|
||||
possible values.
|
||||
|
||||
If Vim can read the "XM" terminfo/termcap entry then it will be used for
|
||||
enabling and disabling the mouse reporting. If it is missing, then the value
|
||||
from 'ttymouse' is used to decide how to do this.
|
||||
|
||||
If the "XM" entry exists and the first number is "1006" then 'ttymouse' will
|
||||
be set to "sgr", unless it was already set earlier.
|
||||
|
||||
|
||||
KEY CODES *terminal-key-codes*
|
||||
Note: Use the <> form if possible
|
||||
@@ -506,6 +584,7 @@ Note: Use the <> form if possible
|
||||
t_%1 <Help> help key *t_%1* *'t_%1'*
|
||||
t_&8 <Undo> undo key *t_&8* *'t_&8'*
|
||||
t_kI <Insert> insert key *t_kI* *'t_kI'*
|
||||
<kInsert> keypad insert key
|
||||
t_kD <Del> delete key *t_kD* *'t_kD'*
|
||||
t_kb <BS> backspace key *t_kb* *'t_kb'*
|
||||
t_kB <S-Tab> back-tab (shift-tab) *<S-Tab>* *t_kB* *'t_kB'*
|
||||
@@ -538,9 +617,13 @@ Note: Use the <> form if possible
|
||||
t_KK <k8> keypad 8 *<k8>* *t_KK* *'t_KK'*
|
||||
t_KL <k9> keypad 9 *<k9>* *t_KL* *'t_KL'*
|
||||
<Mouse> leader of mouse code *<Mouse>*
|
||||
*t_PS* *'t_PS'*
|
||||
t_PS start of bracketed paste |xterm-bracketed-paste|
|
||||
t_PE end of bracketed paste |xterm-bracketed-paste| *t_PE* *'t_PE'*
|
||||
|
||||
t_PS <PasteStart> start of bracketed paste *t_PS* *'t_PS'*
|
||||
|xterm-bracketed-paste|
|
||||
t_PE <PasteEnd> end of bracketed paste *t_PE* *'t_PE'*
|
||||
|xterm-bracketed-paste|
|
||||
<FocusGained> Vim window got focus (internal only)
|
||||
<FocusLost> Vim window lost focus (internal only)
|
||||
|
||||
Note about t_so and t_mr: When the termcap entry "so" is not present the
|
||||
entry for "mr" is used. And vice versa. The same is done for "se" and "me".
|
||||
@@ -579,12 +662,15 @@ work the 'termguicolors' option needs to be set.
|
||||
See https://github.com/termstandard/colors for a list of terminals that
|
||||
support true colors.
|
||||
|
||||
Sometimes setting 'termguicolors' is not enough and one has to set the |t_8f|
|
||||
and |t_8b| options explicitly. Default values of these options are
|
||||
"^[[38;2;%lu;%lu;%lum" and "^[[48;2;%lu;%lu;%lum" respectively, but it is only
|
||||
set when `$TERM` is `xterm`. Some terminals accept the same sequences, but
|
||||
with all semicolons replaced by colons (this is actually more compatible, but
|
||||
less widely supported): >
|
||||
For telling the terminal what RGB color to use the |t_8f| and |t_8b| termcap
|
||||
entries are used. These are set by default to values that work for most
|
||||
terminals. If that does not work for your terminal you can set them manually.
|
||||
The default values are set like this: >
|
||||
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||
|
||||
Some terminals accept the same sequences, but with all semicolons replaced by
|
||||
colons (this is actually more compatible, but less widely supported): >
|
||||
let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
|
||||
let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
|
||||
|
||||
@@ -602,7 +688,7 @@ is actually the case.
|
||||
To overrule the default, put this line in your ~/.Xdefaults or
|
||||
~/.Xresources:
|
||||
>
|
||||
XTerm*allowWindowOps: true
|
||||
XTerm*allowWindowOps: true
|
||||
|
||||
And run "xrdb -merge .Xresources" to make it effective. You can check the
|
||||
value with the context menu (right mouse button while CTRL key is pressed),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*testing.txt* For Vim version 9.0. Last change: 2022 Nov 28
|
||||
*testing.txt* For Vim version 9.0. Last change: 2022 Dec 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -94,7 +94,7 @@ test_gui_event({event}, {args})
|
||||
"findrepl" search and replace text.
|
||||
"mouse" mouse button click event.
|
||||
"scrollbar" move or drag the scrollbar.
|
||||
"sendevent" send a low-level GUI event.
|
||||
"key" send a low-level keyboard event.
|
||||
"tabline" select a tab page by mouse click.
|
||||
"tabmenu" select a tabline menu entry.
|
||||
|
||||
@@ -178,8 +178,8 @@ test_gui_event({event}, {args})
|
||||
dragging: 1 to drag the scrollbar and 0 to click in the
|
||||
scrollbar.
|
||||
|
||||
"sendevent":
|
||||
Send a low-level GUI event (e.g. key-up or down).
|
||||
"key":
|
||||
Send a low-level keyboard event (e.g. key-up or down).
|
||||
Currently only supported on MS-Windows.
|
||||
The supported items in {args} are:
|
||||
event: The supported string values are:
|
||||
@@ -224,6 +224,77 @@ test_ignore_error({expr}) *test_ignore_error()*
|
||||
GetErrorText()->test_ignore_error()
|
||||
|
||||
|
||||
test_mswin_event({event}, {args}) *test_mswin_event()*
|
||||
Generate a low-level MS-Windows {event} with arguments {args}
|
||||
for testing Vim functionality. It works for MS-Windows GUI
|
||||
and for the console.
|
||||
|
||||
{event} is a String and the supported values are:
|
||||
"mouse" mouse event.
|
||||
"key" keyboard event.
|
||||
|
||||
"mouse":
|
||||
Inject either a mouse button click, or a mouse move, event.
|
||||
The supported items in {args} are:
|
||||
button: mouse button. The supported values are:
|
||||
0 right mouse button
|
||||
1 middle mouse button
|
||||
2 left mouse button
|
||||
3 mouse button release
|
||||
4 scroll wheel down
|
||||
5 scroll wheel up
|
||||
6 scroll wheel left
|
||||
7 scroll wheel right
|
||||
row: mouse click row number. The first row of the
|
||||
Vim window is 1 and the last row is 'lines'.
|
||||
col: mouse click column number. The maximum value
|
||||
of {col} is 'columns'.
|
||||
Note: row and col are always interpreted as
|
||||
screen cells for the console application.
|
||||
But, they may be interpreted as pixels
|
||||
for the GUI, depending on "cell".
|
||||
multiclick: set to 1 to inject a double-click mouse event.
|
||||
modifiers: key modifiers. The supported values are:
|
||||
4 shift is pressed
|
||||
8 alt is pressed
|
||||
16 ctrl is pressed
|
||||
move: Optional; if used and TRUE then a mouse move
|
||||
event can be generated.
|
||||
Only {args} row: and col: are used and
|
||||
required.
|
||||
Only results in an event when 'mousemoveevent'
|
||||
is set or a popup uses mouse move events.
|
||||
cell: Optional for the GUI: when present and TRUE
|
||||
then "move" uses screen cells instead of pixel
|
||||
positions. Not used by the console.
|
||||
|
||||
"key":
|
||||
Send a low-level keyboard event (e.g. keyup or keydown).
|
||||
The supported items in {args} are:
|
||||
event: The supported string values are:
|
||||
keyup generate a keyup event
|
||||
keydown generate a keydown event
|
||||
keycode: Keycode to use for a keyup or a keydown event.
|
||||
modifiers: Optional; key modifiers.
|
||||
The supported values are:
|
||||
2 shift is pressed
|
||||
4 ctrl is pressed
|
||||
8 alt is pressed
|
||||
Note: These values are different from the
|
||||
mouse modifiers.
|
||||
execute: Optional. Similar to |feedkeys()| mode x.
|
||||
When this is included and set to true
|
||||
(non-zero) then Vim will process any buffered
|
||||
unprocessed key events. All other {args}
|
||||
items are optional when this is set and true.
|
||||
|
||||
Returns TRUE if the event is successfully added or executed,
|
||||
FALSE if there is a failure.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetEvent()->test_mswin_event({args})
|
||||
<
|
||||
|
||||
test_null_blob() *test_null_blob()*
|
||||
Return a |Blob| that is null. Only useful for testing.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*textprop.txt* For Vim version 9.0. Last change: 2022 Nov 18
|
||||
*textprop.txt* For Vim version 9.0. Last change: 2022 Dec 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -108,7 +108,7 @@ prop_type_list([{props}]) get list of property types
|
||||
Manipulating text properties:
|
||||
|
||||
prop_add({lnum}, {col}, {props}) add a text property
|
||||
prop_add_list({props}, [[{lnum}, {col}, {end-lnum}, {end-col}], ...])
|
||||
prop_add_list({props}, [{item}, ...])
|
||||
add a text property at multiple
|
||||
positions.
|
||||
prop_clear({lnum} [, {lnum-end} [, {bufnr}]])
|
||||
@@ -220,10 +220,16 @@ prop_add({lnum}, {col}, {props})
|
||||
Any Tab and other control character in the text will be
|
||||
changed to a space (Rationale: otherwise the size of the text
|
||||
is difficult to compute).
|
||||
A negative "id" will be chosen and is returned. Once a
|
||||
property with "text" has been added for a buffer then using a
|
||||
negative "id" for any other property will give an error:
|
||||
*E1293*
|
||||
A negative "id" will be chosen and is returned.
|
||||
|
||||
Before text properties with text were supported it was
|
||||
possible to use a negative "id", even though this was very
|
||||
rare. Now that negative "id"s are reserved for text
|
||||
properties with text an error is given when using a negative
|
||||
"id". When a text property with text already exists using a
|
||||
negative "id" results in *E1293* . If a negative "id" was
|
||||
used and later a text property with text is added results in
|
||||
*E1339* .
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetLnum()->prop_add(col, props)
|
||||
@@ -257,12 +263,12 @@ prop_add_list({props}, [{item}, ...])
|
||||
It is not possible to add a text property with a "text" field
|
||||
here.
|
||||
|
||||
Example:
|
||||
Example: >
|
||||
call prop_add_list(#{type: 'MyProp', id: 2},
|
||||
\ [[1, 4, 1, 7],
|
||||
\ [1, 15, 1, 20],
|
||||
\ [2, 30, 3, 30]]
|
||||
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetProp()->prop_add_list([[1, 1, 1, 2], [1, 4, 1, 8]])
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 9.0. Last change: 2022 Dec 05
|
||||
*todo.txt* For Vim version 9.0. Last change: 2023 Feb 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -38,6 +38,13 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Errors when running tests with valgrind:
|
||||
- test_codestyle.vim: e.g.:
|
||||
command line..script /home/mool/vim/vim90/src/testdir/runtest.vim[569]..function RunTheTest[52]..Test_test_files line 6: keycode_check.vim: space before tab: Expected 0 but got 7
|
||||
command line..script /home/mool/vim/vim90/src/testdir/runtest.vim[569]..function RunTheTest[52]..Test_test_files line 10: setup.vim: trailing white space: Expected 0 but got 23
|
||||
- test_gui.vim:
|
||||
Found errors in Test_gui_mouse_event():
|
||||
|
||||
Upcoming larger works:
|
||||
- Make spell checking work with recent .dic/.aff files, e.g. French. #4916
|
||||
Make Vim understand the format somehow? Search for "spell" below.
|
||||
@@ -53,15 +60,94 @@ Upcoming larger works:
|
||||
|
||||
|
||||
Further Vim9 improvements, possibly after launch:
|
||||
- implement :class and :interface: See |vim9-classes| #11544
|
||||
- implement :class and :interface: See |vim9-classes
|
||||
- Change access: public by default, private by prefixing "_".
|
||||
Check for error: can't have same name twice (ignoring "_" prefix).
|
||||
- Private methods?
|
||||
either: private def Func()
|
||||
or: def _Func()
|
||||
Perhaps use "private" keyword instead of "_" prefix?
|
||||
- "final" object members - can only be set in the constructor.
|
||||
- object empty(), len() - can class define a method to be used for them?
|
||||
- how about lock/unlock?
|
||||
- When checking "implements" also check types of members and function args.
|
||||
- For chaining, allow using the class name as type for function return
|
||||
value.
|
||||
- Implement generics
|
||||
- Add "instanceof"
|
||||
- More efficient way for interface member index than iterating over list?
|
||||
- a variant of type() that returns a different type for each class?
|
||||
list<number> and list<string> should also differ.
|
||||
- Issue #11822: any.Func() can be a dict or an object call, need to handle
|
||||
this at runtime.
|
||||
- implement :type
|
||||
- implement :enum
|
||||
- class local to a function
|
||||
- Use Vim9 for more runtime files.
|
||||
- Inline call to map() and filter(), better type checking.
|
||||
- When evaluating constants for script variables, some functions could work:
|
||||
has(featureName), len(someString)
|
||||
- Implement as part of an expression: ++expr, --expr, expr++, expr--.
|
||||
|
||||
Information missing in terminfo:
|
||||
- t_RV request terminal version string; xterm: "\033[>c"
|
||||
change in terminfo for "RV" uses the wrong escape sequence 7 - 14 Jan only
|
||||
Codes used for focus gained and lost (currently using use_xterm_like_mouse())
|
||||
termcodes are hard-coded in set_termname(), not named.
|
||||
Use the XF flag? enables recognizing the focus in/out events.
|
||||
Check if t_fe is not empty.
|
||||
Check for "1004" in t_XM. (disadvantage: only focus events when mouse is
|
||||
used)
|
||||
- t_fe enable focus-event tracking
|
||||
- t_fd disable focus-event tracking
|
||||
Modifiers for various keys
|
||||
- Decode kitty key protocol Meta and use MOD_MASK_META. Document <T-k>
|
||||
- flag to indicate "xterm compatible modifiers" ?
|
||||
Underline and similar:
|
||||
- t_AU - Set underline color: like "AF" and "AB" entries.
|
||||
- t_Ce undercurl and underline end
|
||||
- t_Cs undercurl (curly underline) mode
|
||||
- t_Us double underline mode
|
||||
- t_ds dotted underline mode
|
||||
- t_Ds dashed underline mode
|
||||
- t_Te strikethrough end
|
||||
- t_Ts strikethrough mode
|
||||
Cursor codes: |termcap-cursor-shape|
|
||||
- t_RC request terminal cursor blinking
|
||||
- t_RS request terminal cursor style
|
||||
- t_VS cursor normally visible (no blink)
|
||||
- t_SI start insert mode (bar cursor shape)
|
||||
- t_SR start replace mode (underline cursor shape)
|
||||
- t_EI end insert or replace mode (block cursor shape)
|
||||
- t_SC set cursor color start
|
||||
- t_EC set cursor color end
|
||||
- t_SH set cursor shape
|
||||
State requests:
|
||||
- t_RF request terminal foreground color
|
||||
- t_RB request terminal background color
|
||||
Less important (not needed for regular editing):
|
||||
- t_IS set icon text start
|
||||
- t_IE set icon text end
|
||||
- t_ST save window title to stack
|
||||
- t_RT restore window title from stack
|
||||
- t_Si save icon text to stack
|
||||
- t_Ri restore icon text from stack
|
||||
- t_WP set window position (Y, X) in pixels
|
||||
- t_GP get window position (Y, X) in pixels
|
||||
- t_WS set window size (height, width in cells)
|
||||
Vim internal, but there should be a terminfo entry for these:
|
||||
- t_8f set foreground color (R, G, B) in printf() format
|
||||
- t_8b set background color (R, G, B) in printf() format
|
||||
- t_8u set underline color (R, G, B) in printf() format
|
||||
Probably Vim internal, not in terminfo:
|
||||
- t_TE end of "raw" mode
|
||||
- t_TI put terminal into "raw" mode
|
||||
- t_RK request terminal keyboard protocol state; sent after |t_TI|
|
||||
Already working, not properly documented:
|
||||
- t_u7 request cursor position
|
||||
Also, with Alt-b we get â, with Alt-Shift-b we should bet another character.
|
||||
That does not appear to work with Kitty. #11913
|
||||
|
||||
Popup windows:
|
||||
- Add a function to redraw a specific popup window. Esp. to be used when
|
||||
editing the command line, when screen updating doesn't happen. (Shougo)
|
||||
@@ -169,6 +255,8 @@ Terminal emulator window:
|
||||
- When 'encoding' is not utf-8, or the job is using another encoding, setup
|
||||
conversions.
|
||||
|
||||
Patch adds showcmd() function #11708
|
||||
|
||||
Crash when a variable is removed while listing variables (Issue #11435)
|
||||
|
||||
Autoconf: must use autoconf 2.69, later version generates lots of warnings
|
||||
@@ -204,6 +292,12 @@ https://github.com/vim/vim/pull/5566
|
||||
|
||||
PR #11579 to add visualtext(), return Visually selected text.
|
||||
|
||||
Stray characters in the shell #11719, caused by requesting a response for:
|
||||
- XT key sequences
|
||||
- Whether modifyOtherKeys is active
|
||||
- Whether kitty keyboard protocol is active
|
||||
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)
|
||||
|
||||
@@ -418,6 +512,10 @@ work.
|
||||
Using "au!" after "filetype on" is a bit slow. Can the matching of
|
||||
autocommands be made faster? (#7056)
|
||||
|
||||
Using a search pattern containing "\%V" and 'hlsearch' set keeps old matches
|
||||
when the Visual area changes. #11694. Do a redraw when starting a Visual
|
||||
selection?
|
||||
|
||||
Append in Visual block mode inserts the wrong character.
|
||||
Test_visual_block_mode() already has the proper check, which is commented out.
|
||||
(#8288)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*userfunc.txt* For Vim version 9.0. Last change: 2022 Nov 17
|
||||
*userfunc.txt* For Vim version 9.0. Last change: 2023 Jan 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -187,12 +187,21 @@ See |:verbose-cmd| for more information.
|
||||
If "[expr]" is not given, the number 0 is returned.
|
||||
When a function ends without an explicit ":return",
|
||||
the number 0 is returned.
|
||||
|
||||
In a :def function *E1095* is given if unreachable
|
||||
code follows after the `:return`.
|
||||
In legacy script there is no check for unreachable
|
||||
lines, thus there is no warning if commands follow
|
||||
`:return`.
|
||||
|
||||
`:return`. Also, there is no check if the following
|
||||
line contains a valid command. Forgetting the line
|
||||
continuation backslash may go unnoticed: >
|
||||
return 'some text'
|
||||
.. ' some more text'
|
||||
< Will happily return "some text" without an error. It
|
||||
should have been: >
|
||||
return 'some text'
|
||||
\ .. ' some more text'
|
||||
<
|
||||
If the ":return" is used after a |:try| but before the
|
||||
matching |:finally| (if present), the commands
|
||||
following the ":finally" up to the matching |:endtry|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 9.0. Last change: 2022 Dec 05
|
||||
*usr_41.txt* For Vim version 9.0. Last change: 2023 Jan 17
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -757,6 +757,7 @@ String manipulation: *string-functions*
|
||||
strwidth() size of string when displayed
|
||||
strdisplaywidth() size of string when displayed, deals with tabs
|
||||
setcellwidths() set character cell width overrides
|
||||
getcellwidths() get character cell width overrides
|
||||
substitute() substitute a pattern match with a string
|
||||
submatch() get a specific match in ":s" and substitute()
|
||||
strpart() get part of a string using byte index
|
||||
@@ -1186,6 +1187,7 @@ Testing: *test-functions*
|
||||
test_getvalue() get value of an internal variable
|
||||
test_gui_event() generate a GUI event for testing
|
||||
test_ignore_error() ignore a specific error message
|
||||
test_mswin_event() generate an MS-Windows event
|
||||
test_null_blob() return a null Blob
|
||||
test_null_channel() return a null Channel
|
||||
test_null_dict() return a null Dict
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 9.0. Last change: 2022 Nov 04
|
||||
*various.txt* For Vim version 9.0. Last change: 2022 Dec 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -496,7 +496,7 @@ T *+visualextra* extra Visual mode commands |blockwise-operators|
|
||||
T *+vreplace* |gR| and |gr|
|
||||
*+vtp* on MS-Windows console: support for 'termguicolors'
|
||||
T *+wildignore* |'wildignore'| Always enabled since 9.0.0278
|
||||
T *+wildmenu* |'wildmenu'|| Always enabled since 9.0.0279
|
||||
T *+wildmenu* |'wildmenu'| Always enabled since 9.0.0279
|
||||
T *+windows* more than one window; Always enabled since 8.0.1118.
|
||||
m *+writebackup* |'writebackup'| is default on
|
||||
m *+xim* X input method |xim|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 9.0. Last change: 2022 Dec 03
|
||||
*vim9.txt* For Vim version 9.0. Last change: 2022 Dec 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -105,7 +105,7 @@ script and `:def` functions; details are below:
|
||||
`:open`
|
||||
`:s` with only flags
|
||||
`:t`
|
||||
`:xit`
|
||||
`:xit`
|
||||
- Some commands, especially those used for flow control, cannot be shortened.
|
||||
E.g., `:throw` cannot be written as `:th`. *vim9-no-shorten*
|
||||
- You cannot use curly-braces names.
|
||||
@@ -265,7 +265,7 @@ Detail: this is because "Inner" will actually become a function reference to a
|
||||
function with a generated name.
|
||||
|
||||
It is not possible to define a script-local function in a function. You can
|
||||
define a local function and assign it to a script-local funcref (it must have
|
||||
define a local function and assign it to a script-local Funcref (it must have
|
||||
been declared at the script level). It is possible to define a global
|
||||
function by using the "g:" prefix.
|
||||
|
||||
@@ -388,7 +388,6 @@ used: >
|
||||
echo temp # Error!
|
||||
|
||||
This is especially useful in a user command: >
|
||||
|
||||
command -range Rename {
|
||||
var save = @a
|
||||
@a = 'some expression'
|
||||
@@ -397,7 +396,6 @@ This is especially useful in a user command: >
|
||||
}
|
||||
|
||||
And with autocommands: >
|
||||
|
||||
au BufWritePre *.go {
|
||||
var save = winsaveview()
|
||||
silent! exe ':%! some formatting command'
|
||||
@@ -746,7 +744,7 @@ continuation is used without a backslash and a line starts with a bar: >
|
||||
*E1050*
|
||||
To make it possible for the operator at the start of the line to be
|
||||
recognized, it is required to put a colon before a range. This example will
|
||||
add "start" and print: >
|
||||
add "start" and "print": >
|
||||
var result = start
|
||||
+ print
|
||||
Like this: >
|
||||
@@ -805,7 +803,7 @@ Notes:
|
||||
echo [1, 2]
|
||||
[3, 4]
|
||||
- In some cases it is difficult for Vim to parse a command, especially when
|
||||
commands are used as an argument to another command, such as `windo`. In
|
||||
commands are used as an argument to another command, such as `:windo`. In
|
||||
those cases the line continuation with a backslash has to be used.
|
||||
|
||||
|
||||
@@ -1023,7 +1021,9 @@ always converted to string: >
|
||||
|
||||
Simple types are Number, Float, Special and Bool. For other types |string()|
|
||||
should be used.
|
||||
*false* *true* *null* *E1034*
|
||||
*false* *true* *null* *null_blob* *null_channel*
|
||||
*null_dict* *null_function* *null_job* *null_list*
|
||||
*null_partial* *null_string* *E1034*
|
||||
In Vim9 script one can use the following predefined values: >
|
||||
true
|
||||
false
|
||||
@@ -1309,7 +1309,7 @@ Closures defined in a loop will share the same context. For example: >
|
||||
< *E1271*
|
||||
A closure must be compiled in the context that it is defined in, so that
|
||||
variables in that context can be found. This mostly happens correctly, except
|
||||
when a function is marked for debugging with `breakadd` after it was compiled.
|
||||
when a function is marked for debugging with `:breakadd` after it was compiled.
|
||||
Make sure to define the breakpoint before compiling the outer function.
|
||||
|
||||
The "inloop" variable will exist only once, all closures put in the list refer
|
||||
@@ -1351,7 +1351,7 @@ closure: >
|
||||
}
|
||||
endfor
|
||||
|
||||
Using `echowindow` is useful in a timer, the messages go into a popup and will
|
||||
Using `:echowindow` is useful in a timer, the messages go into a popup and will
|
||||
not interfere with what the user is doing when it triggers.
|
||||
|
||||
|
||||
@@ -1592,7 +1592,7 @@ That is because the declaration looks like a list of numbers, thus is
|
||||
equivalent to: >
|
||||
var ll: list<number> = [1, 2, 3]
|
||||
If you do want a more permissive list you need to declare the type: >
|
||||
var ll: list<any = [1, 2, 3]
|
||||
var ll: list<any> = [1, 2, 3]
|
||||
ll->extend(['x']) # OK
|
||||
|
||||
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
*vim9class.txt* For Vim version 9.0. Last change: 2022 Dec 04
|
||||
*vim9class.txt* For Vim version 9.0. Last change: 2023 Jan 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
|
||||
NOTE - This is under development, anything can still change! - NOTE
|
||||
NOTE - This is not finished yet, anything can still change! - NOTE
|
||||
|
||||
|
||||
Vim9 classes, objects, interfaces, types and enums.
|
||||
|
||||
1. Overview |Vim9-class-overview|
|
||||
2. A simple class |Vim9-simple-class|
|
||||
3. Using an abstract class |Vim9-abstract-class|
|
||||
4. Using an interface |Vim9-using-interface|
|
||||
5. More class details |Vim9-class|
|
||||
6. Type definition |Vim9-type|
|
||||
7. Enum |Vim9-enum|
|
||||
3. Class members and functions |Vim9-class-member|
|
||||
4. Using an abstract class |Vim9-abstract-class|
|
||||
5. Using an interface |Vim9-using-interface|
|
||||
6. More class details |Vim9-class|
|
||||
7. Type definition |Vim9-type|
|
||||
8. Enum |Vim9-enum|
|
||||
|
||||
9. Rationale
|
||||
10. To be done later
|
||||
@@ -25,25 +26,25 @@ Vim9 classes, objects, interfaces, types and enums.
|
||||
1. Overview *Vim9-class-overview*
|
||||
|
||||
The fancy term is "object-oriented programming". You can find lots of study
|
||||
material about this subject. Here we document what |Vim9| script provides,
|
||||
assuming you know the basics already. Added are helpful hints about how
|
||||
to use this functionality effectively.
|
||||
material on this subject. Here we document what |Vim9| script provides,
|
||||
assuming you know the basics already. Added are helpful hints about how to
|
||||
use this functionality effectively.
|
||||
|
||||
The basic item is an object:
|
||||
- An object stores state. It contains one or more variables that can each
|
||||
have a value.
|
||||
- An object usually provides functions that manipulate its state. These
|
||||
- An object provides functions that use and manipulate its state. These
|
||||
functions are invoked "on the object", which is what sets it apart from the
|
||||
traditional separation of data and code that manipulates the data.
|
||||
- An object has a well defined interface, with typed member variables and
|
||||
member functions.
|
||||
- Objects are created by a class and all objects have the same interface.
|
||||
This never changes, it is not dynamic.
|
||||
- Objects are created from a class and all objects have the same interface.
|
||||
This does not change at runtime, it is not dynamic.
|
||||
|
||||
An object can only be created by a class. A class provides:
|
||||
- A new() method, the constructor, which returns an object for the class.
|
||||
This method is invoked on the class name: MyClass.new().
|
||||
- State shared by all objects of the class: class variables and constants.
|
||||
- State shared by all objects of the class: class variables (class members).
|
||||
- A hierarchy of classes, with super-classes and sub-classes, inheritance.
|
||||
|
||||
An interface is used to specify properties of an object:
|
||||
@@ -62,17 +63,18 @@ teachers use real-world objects to explain class relations and you might think
|
||||
your model should therefore reflect the real world. It doesn't! The model
|
||||
should match your purpose.
|
||||
|
||||
You will soon find that composition is often better than inheritance. Don't
|
||||
waste time trying to find the optimal class model. Or waste time discussing
|
||||
whether a square is a rectangle or that a rectangle is a square. It doesn't
|
||||
matter.
|
||||
Keep in mind that composition (an object contains other objects) is often
|
||||
better than inheritance (an object extends another object). Don't waste time
|
||||
trying to find the optimal class model. Or waste time discussing whether a
|
||||
square is a rectangle or that a rectangle is a square. It doesn't matter.
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
2. A simple class *Vim9-simple-class*
|
||||
|
||||
Let's start with a simple example: a class that stores a text position: >
|
||||
Let's start with a simple example: a class that stores a text position (see
|
||||
below for how to do this more efficiently): >
|
||||
|
||||
class TextPosition
|
||||
this.lnum: number
|
||||
@@ -96,7 +98,7 @@ Let's start with a simple example: a class that stores a text position: >
|
||||
this.col = col
|
||||
enddef
|
||||
endclass
|
||||
|
||||
< *object* *Object*
|
||||
You can create an object from this class with the new() method: >
|
||||
|
||||
var pos = TextPosition.new(1, 1)
|
||||
@@ -104,10 +106,10 @@ You can create an object from this class with the new() method: >
|
||||
The object members "lnum" and "col" can be accessed directly: >
|
||||
|
||||
echo $'The text position is ({pos.lnum}, {pos.col})'
|
||||
|
||||
< *E1317* *E1327*
|
||||
If you have been using other object-oriented languages you will notice that
|
||||
in Vim the object members are consistently referred to with the "this."
|
||||
prefix. This is different from languages like Java and TypeScript. This
|
||||
prefix. This is different from languages like Java and TypeScript. The
|
||||
naming convention makes the object members easy to spot. Also, when a
|
||||
variable does not have the "this." prefix you know it is not an object member.
|
||||
|
||||
@@ -117,9 +119,9 @@ Member write access ~
|
||||
Now try to change an object member directly: >
|
||||
|
||||
pos.lnum = 9
|
||||
|
||||
< *E1335*
|
||||
This will give you an error! That is because by default object members can be
|
||||
read but not set. That's why the class provides a method for it: >
|
||||
read but not set. That's why the TextPosition class provides a method for it: >
|
||||
|
||||
pos.SetLnum(9)
|
||||
|
||||
@@ -128,19 +130,23 @@ way. Most often there is no problem using a value, while setting a value may
|
||||
have side effects that need to be taken care of. In this case, the SetLnum()
|
||||
method could check if the line number is valid and either give an error or use
|
||||
the closest valid value.
|
||||
|
||||
*:public* *E1331*
|
||||
If you don't care about side effects and want to allow the object member to be
|
||||
changed at any time, you can make it public: >
|
||||
|
||||
public this.lnum: number
|
||||
public this.col number
|
||||
public this.col: number
|
||||
|
||||
Now you don't need the SetLnum(), SetCol() and SetPosition() methods, setting
|
||||
"pos.lnum" directly above will no longer give an error.
|
||||
*E1334*
|
||||
If you try to set an object member that doesn't exist you get an error: >
|
||||
pos.other = 9
|
||||
< E1334: Object member not found: other ~
|
||||
|
||||
|
||||
Private members ~
|
||||
|
||||
*E1332* *E1333*
|
||||
On the other hand, if you do not want the object members to be read directly,
|
||||
you can make them private. This is done by prefixing an underscore to the
|
||||
name: >
|
||||
@@ -149,7 +155,7 @@ name: >
|
||||
this._col number
|
||||
|
||||
Now you need to provide methods to get the value of the private members.
|
||||
These are commonly call getters. We recommend using a name that starts with
|
||||
These are commonly called getters. We recommend using a name that starts with
|
||||
"Get": >
|
||||
|
||||
def GetLnum(): number
|
||||
@@ -177,6 +183,7 @@ Simplifying the new() method ~
|
||||
Many constructors take values for the object members. Thus you very often see
|
||||
this pattern: >
|
||||
|
||||
class SomeClass
|
||||
this.lnum: number
|
||||
this.col: number
|
||||
|
||||
@@ -184,6 +191,7 @@ this pattern: >
|
||||
this.lnum = lnum
|
||||
this.col = col
|
||||
enddef
|
||||
endclass
|
||||
|
||||
Not only is this text you need to write, it also has the type of each member
|
||||
twice. Since this is so common a shorter way to write new() is provided: >
|
||||
@@ -193,8 +201,24 @@ twice. Since this is so common a shorter way to write new() is provided: >
|
||||
|
||||
The semantics are easy to understand: Providing the object member name,
|
||||
including "this.", as the argument to new() means the value provided in the
|
||||
new() call is assigned to that object member. This mechanism is coming from
|
||||
the Dart language.
|
||||
new() call is assigned to that object member. This mechanism comes from the
|
||||
Dart language.
|
||||
|
||||
Putting together this way of using new() and making the members public results
|
||||
in a much shorter class definition as what we started with: >
|
||||
|
||||
class TextPosition
|
||||
public this.lnum: number
|
||||
public this.col: number
|
||||
|
||||
def new(this.lnum, this.col)
|
||||
enddef
|
||||
|
||||
def SetPosition(lnum: number, col: number)
|
||||
this.lnum = lnum
|
||||
this.col = col
|
||||
enddef
|
||||
endclass
|
||||
|
||||
The sequence of constructing a new object is:
|
||||
1. Memory is allocated and cleared. All values are zero/false/empty.
|
||||
@@ -204,22 +228,69 @@ The sequence of constructing a new object is:
|
||||
3. Arguments in the new() method in the "this.name" form are assigned.
|
||||
4. The body of the new() method is executed.
|
||||
|
||||
TODO: for a sub-class the constructor of the parent class will be invoked
|
||||
somewhere.
|
||||
|
||||
If the class extends a parent class, the same thing happens. In the second
|
||||
step the members of the parent class are done first. There is no need to call
|
||||
"super()" or "new()" on the parent.
|
||||
|
||||
==============================================================================
|
||||
|
||||
3. Using an abstract class *Vim9-abstract-class*
|
||||
3. class members and functions *Vim9-class-member*
|
||||
|
||||
*:static* *E1337* *E1338*
|
||||
Class members are declared with "static". They are used by the name without a
|
||||
prefix: >
|
||||
|
||||
class OtherThing
|
||||
this.size: number
|
||||
static totalSize: number
|
||||
|
||||
def new(this.size)
|
||||
totalSize += this.size
|
||||
enddef
|
||||
endclass
|
||||
< *E1340* *E1341*
|
||||
Since the name is used as-is, shadowing the name by a function argument name
|
||||
or local variable name is not allowed.
|
||||
|
||||
Just like object members the access can be made private by using an underscore
|
||||
as the first character in the name, and it can be made public by prefixing
|
||||
"public": >
|
||||
|
||||
class OtherThing
|
||||
static total: number # anybody can read, only class can write
|
||||
static _sum: number # only class can read and write
|
||||
public static result: number # anybody can read and write
|
||||
endclass
|
||||
<
|
||||
*class-function*
|
||||
Class functions are also declared with "static". They have no access to
|
||||
object members, they cannot use the "this" keyword. >
|
||||
|
||||
class OtherThing
|
||||
this.size: number
|
||||
static totalSize: number
|
||||
|
||||
# Clear the total size and return the value it had before.
|
||||
static def ClearTotalSize(): number
|
||||
var prev = totalSize
|
||||
totalSize = 0
|
||||
return prev
|
||||
enddef
|
||||
endclass
|
||||
|
||||
Inside the class the function can be called by name directly, outside the
|
||||
class the class name must be prefixed: `OtherThing.ClearTotalSize()`.
|
||||
|
||||
==============================================================================
|
||||
|
||||
4. Using an abstract class *Vim9-abstract-class*
|
||||
|
||||
An abstract class forms the base for at least one sub-class. In the class
|
||||
model one often finds that a few classes have the same properties that can be
|
||||
shared, but a class with those properties does not have enough state to create
|
||||
shared, but a class with these properties does not have enough state to create
|
||||
an object from. A sub-class must extend the abstract class and add the
|
||||
missing state and/or methods before it can be used to create objects for.
|
||||
|
||||
An abstract class does not have a new() method.
|
||||
|
||||
For example, a Shape class could store a color and thickness. You cannot
|
||||
create a Shape object, it is missing the information about what kind of shape
|
||||
it is. The Shape class functions as the base for a Square and a Triangle
|
||||
@@ -245,39 +316,13 @@ class, for which objects can be created. Example: >
|
||||
enddef
|
||||
endclass
|
||||
<
|
||||
*class-member* *:static*
|
||||
Class members are declared with "static". They are used by the name without a
|
||||
prefix: >
|
||||
|
||||
class OtherThing
|
||||
this.size: number
|
||||
static totalSize: number
|
||||
|
||||
def new(this.size)
|
||||
totalSize += this.size
|
||||
enddef
|
||||
endclass
|
||||
<
|
||||
*class-method*
|
||||
Class methods are also declared with "static". They have no access to object
|
||||
members, they cannot use the "this" keyword. >
|
||||
|
||||
class OtherThing
|
||||
this.size: number
|
||||
static totalSize: number
|
||||
|
||||
" Clear the total size and return the value it had before.
|
||||
static def ClearTotalSize(): number
|
||||
var prev = totalSize
|
||||
totalSize = 0
|
||||
return prev
|
||||
enddef
|
||||
endclass
|
||||
An abstract class is defined the same way as a normal class, except that it
|
||||
does not have any new() method. *E1359*
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
4. Using an interface *Vim9-using-interface*
|
||||
5. Using an interface *Vim9-using-interface*
|
||||
|
||||
The example above with Shape, Square and Triangle can be made more useful if
|
||||
we add a method to compute the surface of the object. For that we create the
|
||||
@@ -316,6 +361,9 @@ a number. This example extends the one above: >
|
||||
enddef
|
||||
endclass
|
||||
|
||||
If a class declares to implement an interface, all the items specified in the
|
||||
interface must appear in the class, with the same types. *E1348* *E1349*
|
||||
|
||||
The interface name can be used as a type: >
|
||||
|
||||
var shapes: list<HasSurface> = [
|
||||
@@ -329,14 +377,14 @@ The interface name can be used as a type: >
|
||||
|
||||
==============================================================================
|
||||
|
||||
5. More class details *Vim9-class*
|
||||
6. More class details *Vim9-class* *Class* *class*
|
||||
|
||||
Defining a class ~
|
||||
*:class* *:endclass* *:abstract*
|
||||
A class is defined between `:class` and `:endclass`. The whole class is
|
||||
defined in one script file. It is not possible to add to a class later.
|
||||
|
||||
A class can only be defined in a |Vim9| script file. *E1315*
|
||||
A class can only be defined in a |Vim9| script file. *E1316*
|
||||
A class cannot be defined inside a function.
|
||||
|
||||
It is possible to define more than one class in a script file. Although it
|
||||
@@ -361,22 +409,89 @@ these variants: >
|
||||
*E1314*
|
||||
The class name should be CamelCased. It must start with an uppercase letter.
|
||||
That avoids clashing with builtin types.
|
||||
|
||||
*E1315*
|
||||
After the class name these optional items can be used. Each can appear only
|
||||
once. They can appear in any order, although this order is recommended: >
|
||||
extends ClassName
|
||||
implements InterfaceName, OtherInterface
|
||||
specifies SomeInterface
|
||||
< *extends*
|
||||
A class can extend one other class.
|
||||
*implements*
|
||||
A class can implement one or more interfaces.
|
||||
< *E1355*
|
||||
Each member and function name can be used only once. It is not possible to
|
||||
define a function with the same name and different type of arguments.
|
||||
|
||||
|
||||
Extending a class ~
|
||||
*extends*
|
||||
A class can extend one other class. *E1352* *E1353* *E1354*
|
||||
The basic idea is to build on top of an existing class, add properties to it.
|
||||
|
||||
The extended class is called the "base class" or "super class". The new class
|
||||
is called the "child class".
|
||||
|
||||
Object members from the base class are all taken over by the child class. It
|
||||
is not possible to override them (unlike some other languages).
|
||||
|
||||
*E1356* *E1357* *E1358*
|
||||
Object methods of the base class can be overruled. The signature (arguments,
|
||||
argument types and return type) must be exactly the same. The method of the
|
||||
base class can be called by prefixing "super.".
|
||||
|
||||
Other object methods of the base class are taken over by the child class.
|
||||
|
||||
Class functions, including functions starting with "new", can be overruled,
|
||||
like with object methods. The function on the base class can be called by
|
||||
prefixing the name of the class (for class functions) or "super.".
|
||||
|
||||
Unlike other languages, the constructor of the base class does not need to be
|
||||
invoked. In fact, it cannot be invoked. If some initialization from the base
|
||||
class also needs to be done in a child class, put it in an object method and
|
||||
call that method from every constructor().
|
||||
|
||||
If the base class did not specify a new() function then one was automatically
|
||||
created. This function will not be taken over by the child class. The child
|
||||
class can define its own new() function, or, if there isn't one, a new()
|
||||
function will be added automatically.
|
||||
|
||||
|
||||
A class implementing an interface ~
|
||||
*implements* *E1346* *E1347*
|
||||
A class can implement one or more interfaces. The "implements" keyword can
|
||||
only appear once *E1350* . Multiple interfaces can be specified, separated by
|
||||
commas. Each interface name can appear only once. *E1351*
|
||||
|
||||
|
||||
A class defining an interface ~
|
||||
*specifies*
|
||||
A class can declare its interface, the object members and methods, with a
|
||||
named interface. This avoids the need for separately specifying the
|
||||
interface, which is often done in many languages, especially Java.
|
||||
|
||||
|
||||
Items in a class ~
|
||||
*E1318* *E1325* *E1326*
|
||||
Inside a class, in betweeen `:class` and `:endclass`, these items can appear:
|
||||
- An object member declaration: >
|
||||
this._memberName: memberType
|
||||
this.memberName: memberType
|
||||
public this.memberName: memberType
|
||||
- A constructor method: >
|
||||
def new(arguments)
|
||||
def newName(arguments)
|
||||
- An object method: >
|
||||
def SomeMethod(arguments)
|
||||
< *E1329*
|
||||
For the object member the type must be specified. The best way is to do this
|
||||
explicitly with ": {type}". For simple types you can also use an initializer,
|
||||
such as "= 123", and Vim will see that the type is a number. Avoid doing this
|
||||
for more complex types and when the type will be incomplete. For example: >
|
||||
this.nameList = []
|
||||
This specifies a list, but the item type is unknown. Better use: >
|
||||
this.nameList: list<string>
|
||||
The initialization isn't needed, the list is empty by default.
|
||||
*E1330*
|
||||
Some types cannot be used, such as "void", "null" and "v:none".
|
||||
|
||||
|
||||
Defining an interface ~
|
||||
*:interface* *:endinterface*
|
||||
An interface is defined between `:interface` and `:endinterface`. It may be
|
||||
@@ -387,10 +502,10 @@ prefixed with `:export`: >
|
||||
|
||||
export interface InterfaceName
|
||||
endinterface
|
||||
|
||||
< *E1344*
|
||||
An interface can declare object members, just like in a class but without any
|
||||
initializer.
|
||||
|
||||
*E1345*
|
||||
An interface can declare methods with `:def`, including the arguments and
|
||||
return type, but without the body and without `:enddef`. Example: >
|
||||
|
||||
@@ -399,8 +514,10 @@ return type, but without the body and without `:enddef`. Example: >
|
||||
def Surface(): number
|
||||
endinterface
|
||||
|
||||
An interface name must start with an uppercase letter. *E1343*
|
||||
The "Has" prefix can be used to make it easier to guess this is an interface
|
||||
name, with a hint about what it provides.
|
||||
An interface can only be defined in a |Vim9| script file. *E1342*
|
||||
|
||||
|
||||
Default constructor ~
|
||||
@@ -417,10 +534,35 @@ members, in the order they were specified. Thus if your class looks like: >
|
||||
|
||||
Then The default constructor will be: >
|
||||
|
||||
def new(this.name, this.age, this.gender)
|
||||
def new(this.name = v:none, this.age = v:none, this.gender = v:none)
|
||||
enddef
|
||||
|
||||
All object members will be used, also private access ones.
|
||||
The "= v:none" default values make the arguments optional. Thus you can also
|
||||
call `new()` without any arguments. No assignment will happen and the default
|
||||
value for the object members will be used. This is a more useful example,
|
||||
with default values: >
|
||||
|
||||
class TextPosition
|
||||
this.lnum: number = 1
|
||||
this.col: number = 1
|
||||
endclass
|
||||
|
||||
If you want the constructor to have mandatory arguments, you need to write it
|
||||
yourself. For example, if for the AutoNew class above you insist on getting
|
||||
the name, you can define the constructor like this: >
|
||||
|
||||
def new(this.name, this.age = v:none, this.gender = v:none)
|
||||
enddef
|
||||
< *E1328*
|
||||
Note that you cannot use another default value than "v:none" here. If you
|
||||
want to initialize the object members, do it where they are declared. This
|
||||
way you only need to look in one place for the default values.
|
||||
|
||||
All object members will be used in the default constructor, also private
|
||||
access ones.
|
||||
|
||||
If the class extends another one, the object members of that class will come
|
||||
first.
|
||||
|
||||
|
||||
Multiple constructors ~
|
||||
@@ -455,7 +597,7 @@ constructor methods.
|
||||
|
||||
==============================================================================
|
||||
|
||||
6. Type definition *Vim9-type* *:type*
|
||||
7. Type definition *Vim9-type* *:type*
|
||||
|
||||
A type definition is giving a name to a type specification. For Example: >
|
||||
|
||||
@@ -466,7 +608,7 @@ TODO: more explanation
|
||||
|
||||
==============================================================================
|
||||
|
||||
7. Enum *Vim9-enum* *:enum* *:endenum*
|
||||
8. Enum *Vim9-enum* *:enum* *:endenum*
|
||||
|
||||
An enum is a type that can have one of a list of values. Example: >
|
||||
|
||||
@@ -560,6 +702,22 @@ type checking will make sure it works as you intended. This rules out
|
||||
polymorphism, which we don't really need anyway.
|
||||
|
||||
|
||||
Single inheritance and interfaces ~
|
||||
|
||||
Some languages support multiple inheritance. Although that can be useful in
|
||||
some cases, it makes the rules of how a class works quite complicated.
|
||||
Instead, using interfaces to declare what is supported is much simpler. The
|
||||
very popular Java language does it this way, and it should be good enough for
|
||||
Vim. The "keep it simple" rule applies here.
|
||||
|
||||
Explicitly declaring that a class supports an interface makes it easy to see
|
||||
what a class is intended for. It also makes it possible to do proper type
|
||||
checking. When an interface is changed any class that declares to implement
|
||||
it will be checked if that change was also changed. The mechanism to assume a
|
||||
class implements an interface just because the methods happen to match is
|
||||
brittle and leads to obscure problems, let's not do that.
|
||||
|
||||
|
||||
Using "this.member" everywhere ~
|
||||
|
||||
The object members in various programming languages can often be accessed in
|
||||
@@ -578,22 +736,6 @@ also directly clear which variable references are object members and which
|
||||
aren't.
|
||||
|
||||
|
||||
Single inheritance and interfaces ~
|
||||
|
||||
Some languages support multiple inheritance. Although that can be useful in
|
||||
some cases, it makes the rules of how a class works quite complicated.
|
||||
Instead, using interfaces to declare what is supported is much simpler. The
|
||||
very popular Java language does it this way, and it should be good enough for
|
||||
Vim. The "keep it simple" rule applies here.
|
||||
|
||||
Explicitly declaring that a class supports an interface makes it easy to see
|
||||
what a class is intended for. It also makes it possible to do proper type
|
||||
checking. When an interface is changed any class that declares to implement
|
||||
it will be checked if that change was also changed. The mechanism to assume a
|
||||
class implements an interface just because the methods happen to match is
|
||||
brittle and leads to obscure problems, let's not do that.
|
||||
|
||||
|
||||
Using class members ~
|
||||
|
||||
Using "static member" to declare a class member is very common, nothing new
|
||||
@@ -608,6 +750,55 @@ quite a bit of space, and when the class is renamed all these places need to
|
||||
be changed too.
|
||||
|
||||
|
||||
Declaring object and class members ~
|
||||
|
||||
The main choice is whether to use "var" as with variable declarations.
|
||||
TypeScript does not use it: >
|
||||
class Point {
|
||||
x: number;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
Following that Vim object members could be declared like this: >
|
||||
class Point
|
||||
this.x: number
|
||||
this.y = 0
|
||||
endclass
|
||||
|
||||
Some users pointed out that this looks more like an assignment than a
|
||||
declaration. Adding "var" changes that: >
|
||||
class Point
|
||||
var this.x: number
|
||||
var this.y = 0
|
||||
endclass
|
||||
|
||||
We also need to be able to declare class members using the "static" keyword.
|
||||
There we can also choose to leave out "var": >
|
||||
class Point
|
||||
var this.x: number
|
||||
static count = 0
|
||||
endclass
|
||||
|
||||
Or do use it, before "static": >
|
||||
class Point
|
||||
var this.x: number
|
||||
var static count = 0
|
||||
endclass
|
||||
|
||||
Or after "static": >
|
||||
class Point
|
||||
var this.x: number
|
||||
static var count = 0
|
||||
endclass
|
||||
|
||||
This is more in line with "static def Func()".
|
||||
|
||||
There is no clear preference whether to use "var" or not. The two main
|
||||
reasons to leave it out are:
|
||||
1. TypeScript, Java and other popular languages do not use it.
|
||||
2. Less clutter.
|
||||
|
||||
|
||||
Using "ClassName.new()" to construct an object ~
|
||||
|
||||
Many languages use the "new" operator to create an object, which is actually
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Dec 05
|
||||
" Last Change: 2023 Feb 02
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -110,9 +110,11 @@ au BufNewFile,BufRead *.a65 setf a65
|
||||
" Applescript
|
||||
au BufNewFile,BufRead *.scpt setf applescript
|
||||
|
||||
" Automake (must be before the *.am pattern)
|
||||
au BufNewFile,BufRead [mM]akefile.am,GNUmakefile.am setf automake
|
||||
|
||||
" Applix ELF
|
||||
au BufNewFile,BufRead *.am
|
||||
\ if expand("<afile>") !~? 'Makefile.am\>' | setf elf | endif
|
||||
au BufNewFile,BufRead *.am setf elf
|
||||
|
||||
" ALSA configuration
|
||||
au BufNewFile,BufRead .asoundrc,*/usr/share/alsa/alsa.conf,*/etc/asound.conf setf alsaconf
|
||||
@@ -187,9 +189,6 @@ au BufNewFile,BufRead *.au3 setf autoit
|
||||
" Autohotkey
|
||||
au BufNewFile,BufRead *.ahk setf autohotkey
|
||||
|
||||
" Automake
|
||||
au BufNewFile,BufRead [mM]akefile.am,GNUmakefile.am setf automake
|
||||
|
||||
" Autotest .at files are actually m4
|
||||
au BufNewFile,BufRead *.at setf m4
|
||||
|
||||
@@ -265,7 +264,7 @@ au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
|
||||
au BufNewFile,BufRead *.bsd,*.bsdl setf bsdl
|
||||
|
||||
" Bazel (http://bazel.io)
|
||||
autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE setf bzl
|
||||
autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE,WORKSPACE.bzlmod setf bzl
|
||||
if has("fname_case")
|
||||
" There is another check for BUILD further below.
|
||||
autocmd BufRead,BufNewFile *.BUILD,BUILD setf bzl
|
||||
@@ -278,6 +277,9 @@ au BufNewFile,BufRead *.lpc,*.ulpc setf lpc
|
||||
" Calendar
|
||||
au BufNewFile,BufRead calendar setf calendar
|
||||
|
||||
" Cap'n Proto
|
||||
au BufNewFile,BufRead *.capnp setf capnp
|
||||
|
||||
" C#
|
||||
au BufNewFile,BufRead *.cs,*.csx setf cs
|
||||
|
||||
@@ -369,6 +371,9 @@ au BufNewFile,BufRead *.ch call dist#ft#FTchange()
|
||||
" ChordPro
|
||||
au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro setf chordpro
|
||||
|
||||
" Clangd
|
||||
au BufNewFile,BufRead .clangd setf yaml
|
||||
|
||||
" Clang-format
|
||||
au BufNewFile,BufRead .clang-format setf yaml
|
||||
|
||||
@@ -606,8 +611,8 @@ au BufNewFile,BufRead *.edn
|
||||
\ setf clojure |
|
||||
\ endif
|
||||
|
||||
" EditorConfig (close enough to dosini)
|
||||
au BufNewFile,BufRead .editorconfig setf dosini
|
||||
" EditorConfig
|
||||
au BufNewFile,BufRead .editorconfig setf editorconfig
|
||||
|
||||
" Embedix Component Description
|
||||
au BufNewFile,BufRead *.ecd setf ecd
|
||||
@@ -627,6 +632,9 @@ au BufNewFile,BufRead *.elm setf elm
|
||||
" Elm Filter Rules file
|
||||
au BufNewFile,BufRead filter-rules setf elmfilt
|
||||
|
||||
" Elsa - https://github.com/ucsd-progsys/elsa
|
||||
au BufNewFile,BufRead *.lc setf elsa
|
||||
|
||||
" ESMTP rc file
|
||||
au BufNewFile,BufRead *esmtprc setf esmtprc
|
||||
|
||||
@@ -663,6 +671,9 @@ autocmd BufRead,BufNewFile *.fnl setf fennel
|
||||
" Fetchmail RC file
|
||||
au BufNewFile,BufRead .fetchmailrc setf fetchmail
|
||||
|
||||
" FIRRTL - Flexible Internal Representation for RTL
|
||||
au BufNewFile,BufRead *.fir setf firrtl
|
||||
|
||||
" Fish shell
|
||||
au BufNewFile,BufRead *.fish setf fish
|
||||
|
||||
@@ -695,12 +706,18 @@ au BufNewFile,BufRead *.fsl setf framescript
|
||||
" FStab
|
||||
au BufNewFile,BufRead fstab,mtab setf fstab
|
||||
|
||||
" Func
|
||||
au BufNewFile,BufRead *.fc setf func
|
||||
|
||||
" Fusion
|
||||
au BufRead,BufNewFile *.fusion setf fusion
|
||||
|
||||
" F# or Forth
|
||||
au BufNewFile,BufRead *.fs call dist#ft#FTfs()
|
||||
|
||||
" FHIR Shorthand (FSH)
|
||||
au BufNewFile,BufRead *.fsh setf fsh
|
||||
|
||||
" F#
|
||||
au BufNewFile,BufRead *.fsi,*.fsx setf fsharp
|
||||
|
||||
@@ -847,6 +864,9 @@ au BufNewFile,BufRead *.htpp setf hastepreproc
|
||||
" HCL
|
||||
au BufRead,BufNewFile *.hcl setf hcl
|
||||
|
||||
" Go checksum file (must be before *.sum Hercules)
|
||||
au BufNewFile,BufRead go.sum,go.work.sum setf gosum
|
||||
|
||||
" Hercules
|
||||
au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum setf hercules
|
||||
|
||||
@@ -993,23 +1013,27 @@ au BufNewFile,BufRead *.jgr setf jgraph
|
||||
" Jovial
|
||||
au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
|
||||
|
||||
" JSON
|
||||
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
|
||||
" Jq
|
||||
au BufNewFile,BufRead *.jq setf jq
|
||||
|
||||
" JSON5
|
||||
au BufNewFile,BufRead *.json5 setf json5
|
||||
|
||||
" JSON Patch (RFC 6902)
|
||||
au BufNewFile,BufRead *.json-patch setf json
|
||||
au BufNewFile,BufRead *.json-patch setf json
|
||||
|
||||
" Jupyter Notebook is also json
|
||||
au BufNewFile,BufRead *.ipynb setf json
|
||||
au BufNewFile,BufRead *.ipynb setf json
|
||||
|
||||
" Other files that look like json
|
||||
au BufNewFile,BufRead .babelrc,.eslintrc,.prettierrc,.firebaserc setf json
|
||||
au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc setf json
|
||||
|
||||
" JSONC
|
||||
au BufNewFile,BufRead *.jsonc setf jsonc
|
||||
" JSONC (JSON with comments)
|
||||
au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc setf jsonc
|
||||
au BufNewFile,BufRead .jshintrc,.hintrc,.swrc,[jt]sconfig*.json setf jsonc
|
||||
|
||||
" JSON
|
||||
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
|
||||
|
||||
" Jsonnet
|
||||
au BufNewFile,BufRead *.jsonnet,*.libsonnet setf jsonnet
|
||||
@@ -1017,6 +1041,9 @@ au BufNewFile,BufRead *.jsonnet,*.libsonnet setf jsonnet
|
||||
" Julia
|
||||
au BufNewFile,BufRead *.jl setf julia
|
||||
|
||||
" KDL
|
||||
au BufNewFile,BufRead *.kdl setf kdl
|
||||
|
||||
" Kixtart
|
||||
au BufNewFile,BufRead *.kix setf kix
|
||||
|
||||
@@ -1240,6 +1267,9 @@ au BufNewFile,BufRead *.[mi][3g] setf modula3
|
||||
" Larch/Modula-3
|
||||
au BufNewFile,BufRead *.lm3 setf modula3
|
||||
|
||||
" Modconf
|
||||
au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf modconf
|
||||
|
||||
" Monk
|
||||
au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc setf monk
|
||||
|
||||
@@ -1249,8 +1279,8 @@ au BufNewFile,BufRead *.moo setf moo
|
||||
" Moonscript
|
||||
au BufNewFile,BufRead *.moon setf moonscript
|
||||
|
||||
" Modconf
|
||||
au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf modconf
|
||||
" Move language
|
||||
au BufNewFile,BufRead *.move setf move
|
||||
|
||||
" MPD is based on XML
|
||||
au BufNewFile,BufRead *.mpd setf xml
|
||||
@@ -1387,6 +1417,7 @@ au BufNewFile,BufRead pf.conf setf pf
|
||||
" ini style config files, using # comments
|
||||
au BufNewFile,BufRead */etc/pacman.conf,mpv.conf setf confini
|
||||
au BufNewFile,BufRead */.aws/config,*/.aws/credentials setf confini
|
||||
au BufNewFile,BufRead *.nmconnection setf confini
|
||||
|
||||
" Pacman hooks
|
||||
au BufNewFile,BufRead *.hook
|
||||
@@ -1491,7 +1522,7 @@ au BufNewFile,BufRead *.plp setf plp
|
||||
au BufNewFile,BufRead *.po,*.pot setf po
|
||||
|
||||
" Postfix main config
|
||||
au BufNewFile,BufRead main.cf setf pfmain
|
||||
au BufNewFile,BufRead main.cf,main.cf.proto setf pfmain
|
||||
|
||||
" PostScript (+ font files, encapsulated PostScript, Adobe Illustrator)
|
||||
au BufNewFile,BufRead *.ps,*.pfa,*.afm,*.eps,*.epsf,*.epsi,*.ai setf postscr
|
||||
@@ -1692,12 +1723,15 @@ au BufNewFile,BufRead *.robot,*.resource setf robot
|
||||
" Robots.txt
|
||||
au BufNewFile,BufRead robots.txt setf robots
|
||||
|
||||
" Rpcgen
|
||||
au BufNewFile,BufRead *.x setf rpcgen
|
||||
" RON (Rusty Object Notation)
|
||||
au BufNewFile,BufRead *.ron setf ron
|
||||
|
||||
" MikroTik RouterOS script
|
||||
au BufRead,BufNewFile *.rsc setf routeros
|
||||
|
||||
" Rpcgen
|
||||
au BufNewFile,BufRead *.x setf rpcgen
|
||||
|
||||
" reStructuredText Documentation Format
|
||||
au BufNewFile,BufRead *.rst setf rst
|
||||
|
||||
@@ -1886,10 +1920,16 @@ au BufNewFile,BufRead *.sst.meta,*.-sst.meta,*._sst.meta setf sisu
|
||||
" SKILL
|
||||
au BufNewFile,BufRead *.il,*.ils,*.cdf setf skill
|
||||
|
||||
" Cadence
|
||||
au BufNewFile,BufRead *.cdc setf cdc
|
||||
|
||||
" SLRN
|
||||
au BufNewFile,BufRead .slrnrc setf slrnrc
|
||||
au BufNewFile,BufRead *.score setf slrnsc
|
||||
|
||||
" Smali
|
||||
au BufNewFile,BufRead *.smali setf smali
|
||||
|
||||
" Smalltalk
|
||||
au BufNewFile,BufRead *.st setf st
|
||||
|
||||
@@ -1918,6 +1958,9 @@ au BufNewFile,BufRead *.smi
|
||||
" SMITH
|
||||
au BufNewFile,BufRead *.smt,*.smith setf smith
|
||||
|
||||
" Smithy
|
||||
au BufNewFile,BufRead *.smithy setf smithy
|
||||
|
||||
" Snobol4 and spitbol
|
||||
au BufNewFile,BufRead *.sno,*.spt setf snobol4
|
||||
|
||||
@@ -1965,6 +2008,9 @@ au BufNewFile,BufRead *.sql call dist#ft#SQL()
|
||||
" SQLJ
|
||||
au BufNewFile,BufRead *.sqlj setf sqlj
|
||||
|
||||
" PRQL
|
||||
au BufNewFile,BufRead *.prql setf prql
|
||||
|
||||
" SQR
|
||||
au BufNewFile,BufRead *.sqr,*.sqi setf sqr
|
||||
|
||||
@@ -2088,6 +2134,9 @@ au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
|
||||
" TeX configuration
|
||||
au BufNewFile,BufRead texmf.cnf setf texmf
|
||||
|
||||
" Thrift (Apache)
|
||||
au BufNewFile,BufRead *.thrift setf thrift
|
||||
|
||||
" Tidy config
|
||||
au BufNewFile,BufRead .tidyrc,tidyrc,tidy.conf setf tidy
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
" Maintainer: Debian Vim Maintainers <team+vim@tracker.debian.org>
|
||||
" Former Maintainers: Michael Piefel <piefel@informatik.hu-berlin.de>
|
||||
" Stefano Zacchiroli <zack@debian.org>
|
||||
" Last Change: 2022 Jul 25
|
||||
" Last Change: 2023 Jan 16
|
||||
" License: Vim License
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/debchangelog.vim
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/debchangelog.vim
|
||||
|
||||
" Bug completion requires apt-listbugs installed for Debian packages or
|
||||
" python-launchpadlib installed for Ubuntu packages
|
||||
@@ -35,14 +35,14 @@ if exists('g:did_changelog_ftplugin')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin (this is global)
|
||||
let g:did_changelog_ftplugin = 1
|
||||
|
||||
" Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise
|
||||
" <CR> would not be recognized. See ":help 'cpoptions'".
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Don't load another plugin (this is global)
|
||||
let g:did_changelog_ftplugin = 1
|
||||
|
||||
" {{{1 GUI menu
|
||||
|
||||
" Helper functions returning various data.
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: Debian control files
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainer: Pierre Habouzit <madcoder@debian.org>
|
||||
" Last Change: 2018-01-28
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/debcontrol.vim
|
||||
" Last Change: 2023 Jan 16
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/debcontrol.vim
|
||||
|
||||
" Do these settings once per buffer
|
||||
if exists('b:did_ftplugin')
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Logcheck
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Last Change: 2018 Dec 27
|
||||
" Last Change: 2023 Jan 16
|
||||
" License: Vim License
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/logcheck.vim
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/logcheck.vim
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: readline(3) configuration file
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Language: readline(3) configuration file
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Last Change: 2022 Dec 09
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -11,9 +12,25 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=:#
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
if exists("loaded_matchit") && !exists("b:match_words")
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words = '$if:$else:$endif'
|
||||
let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"
|
||||
endif
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Readline Intialization Files (inputrc .inputrc)\tinputrc;*.inputrc\n" ..
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||
|
||||
@@ -1,19 +1,78 @@
|
||||
" Vim indent file
|
||||
" Language: nginx.conf
|
||||
" Maintainer: Chris Aumann <me@chr4.org>
|
||||
" Last Change: 2022 Apr 06
|
||||
" Last Change: 2022 Dec 01
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=
|
||||
setlocal indentexpr=GetNginxIndent()
|
||||
|
||||
" cindent actually works for nginx' simple file structure
|
||||
setlocal cindent
|
||||
setlocal indentkeys=0{,0},0#,!^F,o,O
|
||||
|
||||
" Just make sure that the comments are not reset as defs would be.
|
||||
setlocal cinkeys-=0#
|
||||
let b:undo_indent = 'setl inde< indk<'
|
||||
|
||||
let b:undo_indent = "setl inde< cin< cink<"
|
||||
" Only define the function once.
|
||||
if exists('*GetNginxIndent')
|
||||
finish
|
||||
endif
|
||||
|
||||
function GetNginxIndent() abort
|
||||
let plnum = s:PrevNotAsBlank(v:lnum - 1)
|
||||
|
||||
" Hit the start of the file, use zero indent.
|
||||
if plnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ind = indent(plnum)
|
||||
|
||||
" Add a 'shiftwidth' after '{'
|
||||
if s:AsEndWith(getline(plnum), '{')
|
||||
let ind = ind + shiftwidth()
|
||||
end
|
||||
|
||||
" Subtract a 'shiftwidth' on '}'
|
||||
" This is the part that requires 'indentkeys'.
|
||||
if getline(v:lnum) =~ '^\s*}'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
|
||||
let pplnum = s:PrevNotAsBlank(plnum - 1)
|
||||
|
||||
if s:IsLineContinuation(plnum)
|
||||
if !s:IsLineContinuation(pplnum)
|
||||
let ind = ind + shiftwidth()
|
||||
end
|
||||
else
|
||||
if s:IsLineContinuation(pplnum)
|
||||
let ind = ind - shiftwidth()
|
||||
end
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
" Find the first line at or above {lnum} that is non-blank and not a comment.
|
||||
function s:PrevNotAsBlank(lnum) abort
|
||||
let lnum = prevnonblank(a:lnum)
|
||||
while lnum > 0
|
||||
if getline(lnum) !~ '^\s*#'
|
||||
break
|
||||
endif
|
||||
let lnum = prevnonblank(lnum - 1)
|
||||
endwhile
|
||||
return lnum
|
||||
endfunction
|
||||
|
||||
" Check whether {line} ends with {pat}, ignoring trailing comments.
|
||||
function s:AsEndWith(line, pat) abort
|
||||
return a:line =~ a:pat . '\m\s*\%(#.*\)\?$'
|
||||
endfunction
|
||||
|
||||
function s:IsLineContinuation(lnum) abort
|
||||
return a:lnum > 0 && !s:AsEndWith(getline(a:lnum), '[;{}]')
|
||||
endfunction
|
||||
|
||||
134
runtime/indent/testdir/vb.in
Normal file
134
runtime/indent/testdir/vb.in
Normal file
@@ -0,0 +1,134 @@
|
||||
' vim: filetype=vb shiftwidth=4 expandtab
|
||||
'
|
||||
' START_INDENT
|
||||
Public Type GEmployeeRecord ' Create user-defined type.
|
||||
ID As Integer ' Define elements of data type.
|
||||
Name As String * 20
|
||||
Address As String * 30
|
||||
Phone As Long
|
||||
HireDate As Date
|
||||
End Type
|
||||
|
||||
Public Enum InterfaceColors
|
||||
icMistyRose = &HE1E4FF&
|
||||
icSlateGray = &H908070&
|
||||
icDodgerBlue = &HFF901E&
|
||||
icDeepSkyBlue = &HFFBF00&
|
||||
icSpringGreen = &H7FFF00&
|
||||
icForestGreen = &H228B22&
|
||||
icGoldenrod = &H20A5DA&
|
||||
icFirebrick = &H2222B2&
|
||||
End Enum
|
||||
|
||||
Enum SecurityLevel
|
||||
IllegalEntry = -1
|
||||
SecurityLevel1 = 0
|
||||
SecurityLevel2 = 1
|
||||
End Enum
|
||||
|
||||
Public Function TestConditional (number As Integer, ext As String) As Boolean
|
||||
Dim inRange As Boolean
|
||||
|
||||
Select Case number
|
||||
Case <= 0
|
||||
inRange = False
|
||||
Case > 10
|
||||
inRange = False
|
||||
Case Else
|
||||
inRange = True
|
||||
End Select
|
||||
|
||||
' This is a special case identified in the indent script.
|
||||
Select Case number
|
||||
End Select
|
||||
|
||||
If ext = ".xlm" Then
|
||||
If inRange Then
|
||||
TestConditional = True
|
||||
Else
|
||||
TestConditional = False
|
||||
End If
|
||||
ElseIf ext = ".xlsx" Then
|
||||
If inRange Then
|
||||
TestConditional = False
|
||||
Else
|
||||
TestConditional = True
|
||||
End If
|
||||
Else
|
||||
TestConditional = False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub TestIterators (lLimit As Integer, uLimit As Integer)
|
||||
Dim a() As Variant
|
||||
Dim elmt As Variant
|
||||
Dim found As Boolean
|
||||
Dim indx As Integer
|
||||
Const specialValue As Integer = 5
|
||||
|
||||
If uLimit < lLimit Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
ReDim a(lLimit To uLimit)
|
||||
For indx=lLimit To Ulimit
|
||||
a(indx) = 2 * indx
|
||||
Next indx
|
||||
|
||||
found = False
|
||||
For Each elmt in a
|
||||
If elmt = specialValue Then
|
||||
found = True
|
||||
End If
|
||||
Next elmt
|
||||
|
||||
If found then
|
||||
indx = uLimit
|
||||
Do While indx >= lLimit
|
||||
indx = indx - 1
|
||||
Loop
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub TestMultiline (cellAddr As String, rowNbr As Long)
|
||||
Dim rng As Range
|
||||
|
||||
Set rng = Range(cellAddr)
|
||||
With rng
|
||||
.Cells(1,1).Value = _
|
||||
"Line 1 of multiline string; " & _
|
||||
"Line 2 of multiline string; " & _
|
||||
"Line 3 of multiline string"
|
||||
End With
|
||||
|
||||
' The following lines have whitespace after the underscore character
|
||||
' and therefore do not form a valid multiline statement. The indent
|
||||
' script correctly treats them as four single line statements contrary
|
||||
' to the author's obvious indent.
|
||||
rng..Cells(1,1).Value = _
|
||||
"Line 1 of multiline string; " & _
|
||||
"Line 2 of multiline string; " & _
|
||||
"Line 3 of multiline string"
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub TestStmtLabel()
|
||||
GoTo stmtLabel
|
||||
|
||||
' Statement labels are never indented
|
||||
stmtLabel:
|
||||
|
||||
End Sub
|
||||
|
||||
Sub TestTypeKeyword()
|
||||
Type EmployeeRecord ' Create user-defined type.
|
||||
ID As Integer ' Define elements of data type.
|
||||
Name As String * 20
|
||||
Address As String * 30
|
||||
Phone As Long
|
||||
HireDate As Date
|
||||
End Type
|
||||
Dim varType As EmployeeRecord
|
||||
End Sub
|
||||
' END_INDENT
|
||||
134
runtime/indent/testdir/vb.ok
Normal file
134
runtime/indent/testdir/vb.ok
Normal file
@@ -0,0 +1,134 @@
|
||||
' vim: filetype=vb shiftwidth=4 expandtab
|
||||
'
|
||||
' START_INDENT
|
||||
Public Type GEmployeeRecord ' Create user-defined type.
|
||||
ID As Integer ' Define elements of data type.
|
||||
Name As String * 20
|
||||
Address As String * 30
|
||||
Phone As Long
|
||||
HireDate As Date
|
||||
End Type
|
||||
|
||||
Public Enum InterfaceColors
|
||||
icMistyRose = &HE1E4FF&
|
||||
icSlateGray = &H908070&
|
||||
icDodgerBlue = &HFF901E&
|
||||
icDeepSkyBlue = &HFFBF00&
|
||||
icSpringGreen = &H7FFF00&
|
||||
icForestGreen = &H228B22&
|
||||
icGoldenrod = &H20A5DA&
|
||||
icFirebrick = &H2222B2&
|
||||
End Enum
|
||||
|
||||
Enum SecurityLevel
|
||||
IllegalEntry = -1
|
||||
SecurityLevel1 = 0
|
||||
SecurityLevel2 = 1
|
||||
End Enum
|
||||
|
||||
Public Function TestConditional (number As Integer, ext As String) As Boolean
|
||||
Dim inRange As Boolean
|
||||
|
||||
Select Case number
|
||||
Case <= 0
|
||||
inRange = False
|
||||
Case > 10
|
||||
inRange = False
|
||||
Case Else
|
||||
inRange = True
|
||||
End Select
|
||||
|
||||
' This is a special case identified in the indent script.
|
||||
Select Case number
|
||||
End Select
|
||||
|
||||
If ext = ".xlm" Then
|
||||
If inRange Then
|
||||
TestConditional = True
|
||||
Else
|
||||
TestConditional = False
|
||||
End If
|
||||
ElseIf ext = ".xlsx" Then
|
||||
If inRange Then
|
||||
TestConditional = False
|
||||
Else
|
||||
TestConditional = True
|
||||
End If
|
||||
Else
|
||||
TestConditional = False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub TestIterators (lLimit As Integer, uLimit As Integer)
|
||||
Dim a() As Variant
|
||||
Dim elmt As Variant
|
||||
Dim found As Boolean
|
||||
Dim indx As Integer
|
||||
Const specialValue As Integer = 5
|
||||
|
||||
If uLimit < lLimit Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
ReDim a(lLimit To uLimit)
|
||||
For indx=lLimit To Ulimit
|
||||
a(indx) = 2 * indx
|
||||
Next indx
|
||||
|
||||
found = False
|
||||
For Each elmt in a
|
||||
If elmt = specialValue Then
|
||||
found = True
|
||||
End If
|
||||
Next elmt
|
||||
|
||||
If found then
|
||||
indx = uLimit
|
||||
Do While indx >= lLimit
|
||||
indx = indx - 1
|
||||
Loop
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub TestMultiline (cellAddr As String, rowNbr As Long)
|
||||
Dim rng As Range
|
||||
|
||||
Set rng = Range(cellAddr)
|
||||
With rng
|
||||
.Cells(1,1).Value = _
|
||||
"Line 1 of multiline string; " & _
|
||||
"Line 2 of multiline string; " & _
|
||||
"Line 3 of multiline string"
|
||||
End With
|
||||
|
||||
' The following lines have whitespace after the underscore character
|
||||
' and therefore do not form a valid multiline statement. The indent
|
||||
' script correctly treats them as four single line statements contrary
|
||||
' to the author's obvious indent.
|
||||
rng..Cells(1,1).Value = _
|
||||
"Line 1 of multiline string; " & _
|
||||
"Line 2 of multiline string; " & _
|
||||
"Line 3 of multiline string"
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub TestStmtLabel()
|
||||
GoTo stmtLabel
|
||||
|
||||
' Statement labels are never indented
|
||||
stmtLabel:
|
||||
|
||||
End Sub
|
||||
|
||||
Sub TestTypeKeyword()
|
||||
Type EmployeeRecord ' Create user-defined type.
|
||||
ID As Integer ' Define elements of data type.
|
||||
Name As String * 20
|
||||
Address As String * 30
|
||||
Phone As Long
|
||||
HireDate As Date
|
||||
End Type
|
||||
Dim varType As EmployeeRecord
|
||||
End Sub
|
||||
' END_INDENT
|
||||
@@ -887,3 +887,55 @@ if true
|
||||
elseif
|
||||
endif
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
if (
|
||||
true)
|
||||
&& true
|
||||
echo
|
||||
endif
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
abstract class Shape
|
||||
this.color = Color.Black
|
||||
this.thickness = 10
|
||||
endclass
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
class OtherThing
|
||||
this.size: number
|
||||
static totalSize: number
|
||||
|
||||
static def ClearTotalSize(): number
|
||||
var prev = totalSize
|
||||
totalSize = 0
|
||||
return prev
|
||||
enddef
|
||||
endclass
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
interface HasSurface
|
||||
this.size: number
|
||||
def Surface(): number
|
||||
endinterface
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
interface EnterExit
|
||||
def Enter(): void
|
||||
def Exit(): void
|
||||
endinterface
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
enum Color
|
||||
White
|
||||
Red
|
||||
Green
|
||||
Blue
|
||||
Black
|
||||
endenum
|
||||
" END_INDENT
|
||||
|
||||
@@ -887,3 +887,55 @@ if true
|
||||
elseif
|
||||
endif
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
if (
|
||||
true)
|
||||
&& true
|
||||
echo
|
||||
endif
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
abstract class Shape
|
||||
this.color = Color.Black
|
||||
this.thickness = 10
|
||||
endclass
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
class OtherThing
|
||||
this.size: number
|
||||
static totalSize: number
|
||||
|
||||
static def ClearTotalSize(): number
|
||||
var prev = totalSize
|
||||
totalSize = 0
|
||||
return prev
|
||||
enddef
|
||||
endclass
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
interface HasSurface
|
||||
this.size: number
|
||||
def Surface(): number
|
||||
endinterface
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
interface EnterExit
|
||||
def Enter(): void
|
||||
def Exit(): void
|
||||
endinterface
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
enum Color
|
||||
White
|
||||
Red
|
||||
Green
|
||||
Blue
|
||||
Black
|
||||
endenum
|
||||
" END_INDENT
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
" Vim indent file
|
||||
" Language: VisualBasic (ft=vb) / Basic (ft=basic) / SaxBasic (ft=vb)
|
||||
" Author: Johannes Zellner <johannes@zellner.org>
|
||||
" Maintainer: Michael Soyka (mssr953@gmail.com)
|
||||
" Last Change: Fri, 18 Jun 2004 07:22:42 CEST
|
||||
" Small update 2010 Jul 28 by Maxim Kim
|
||||
" 2022/12/15: add support for multiline statements.
|
||||
" 2022/12/21: move VbGetIndent from global to script-local scope
|
||||
" 2022/12/26: recognize "Type" keyword
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -10,28 +14,33 @@ endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal autoindent
|
||||
setlocal indentexpr=VbGetIndent(v:lnum)
|
||||
setlocal indentexpr=s:VbGetIndent(v:lnum)
|
||||
setlocal indentkeys&
|
||||
setlocal indentkeys+==~else,=~elseif,=~end,=~wend,=~case,=~next,=~select,=~loop,<:>
|
||||
setlocal indentkeys+==~else,=~elseif,=~end,=~wend,=~case,=~next,=~select,=~loop
|
||||
|
||||
let b:undo_indent = "set ai< indentexpr< indentkeys<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*VbGetIndent")
|
||||
if exists("*s:VbGetIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
fun! VbGetIndent(lnum)
|
||||
function s:VbGetIndent(lnum)
|
||||
let this_lnum = a:lnum
|
||||
let this_line = getline(this_lnum)
|
||||
|
||||
" labels and preprocessor get zero indent immediately
|
||||
let this_line = getline(a:lnum)
|
||||
let LABELS_OR_PREPROC = '^\s*\(\<\k\+\>:\s*$\|#.*\)'
|
||||
if this_line =~? LABELS_OR_PREPROC
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Get the current value of "shiftwidth"
|
||||
let bShiftwidth = shiftwidth()
|
||||
|
||||
" Find a non-blank line above the current line.
|
||||
" Skip over labels and preprocessor directives.
|
||||
let lnum = a:lnum
|
||||
let lnum = this_lnum
|
||||
while lnum > 0
|
||||
let lnum = prevnonblank(lnum - 1)
|
||||
let previous_line = getline(lnum)
|
||||
@@ -45,34 +54,102 @@ fun! VbGetIndent(lnum)
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ind = indent(lnum)
|
||||
" Variable "previous_line" now contains the text in buffer line "lnum".
|
||||
|
||||
" Multi-line statements have the underscore character at end-of-line:
|
||||
"
|
||||
" object.method(arguments, _
|
||||
" arguments, _
|
||||
" arguments)
|
||||
"
|
||||
" and require extra logic to determine the correct indentation.
|
||||
"
|
||||
" Case 1: Line "lnum" is the first line of a multiline statement.
|
||||
" Line "lnum" will have a trailing underscore character
|
||||
" but the preceding non-blank line does not.
|
||||
" Line "this_lnum" will be indented relative to "lnum".
|
||||
"
|
||||
" Case 2: Line "lnum" is the last line of a multiline statement.
|
||||
" Line "lnum" will not have a trailing underscore character
|
||||
" but the preceding non-blank line will.
|
||||
" Line "this_lnum" will have the same indentation as the starting
|
||||
" line of the multiline statement.
|
||||
"
|
||||
" Case 3: Line "lnum" is neither the first nor last line.
|
||||
" Lines "lnum" and "lnum-1" will have a trailing underscore
|
||||
" character.
|
||||
" Line "this_lnum" will have the same indentation as the preceding
|
||||
" line.
|
||||
"
|
||||
" No matter which case it is, the starting line of the statement must be
|
||||
" found. It will be assumed that multiline statements cannot have
|
||||
" intermingled comments, statement labels, preprocessor directives or
|
||||
" blank lines.
|
||||
"
|
||||
let lnum_is_continued = (previous_line =~ '_$')
|
||||
if lnum > 1
|
||||
let before_lnum = prevnonblank(lnum-1)
|
||||
let before_previous_line = getline(before_lnum)
|
||||
else
|
||||
let before_lnum = 0
|
||||
let before_previous_line = ""
|
||||
endif
|
||||
|
||||
if before_previous_line !~ '_$'
|
||||
" Variable "previous_line" contains the start of a statement.
|
||||
"
|
||||
let ind = indent(lnum)
|
||||
if lnum_is_continued
|
||||
let ind += bShiftwidth
|
||||
endif
|
||||
elseif ! lnum_is_continued
|
||||
" Line "lnum" contains the last line of a multiline statement.
|
||||
" Need to find where this multiline statement begins
|
||||
"
|
||||
while before_lnum > 0
|
||||
let before_lnum -= 1
|
||||
if getline(before_lnum) !~ '_$'
|
||||
let before_lnum += 1
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
if before_lnum == 0
|
||||
let before_lnum = 1
|
||||
endif
|
||||
let previous_line = getline(before_lnum)
|
||||
let ind = indent(before_lnum)
|
||||
else
|
||||
" Line "lnum" is not the first or last line of a multiline statement.
|
||||
"
|
||||
let ind = indent(lnum)
|
||||
endif
|
||||
|
||||
" Add
|
||||
if previous_line =~? '^\s*\<\(begin\|\%(\%(private\|public\|friend\)\s\+\)\=\%(function\|sub\|property\)\|select\|case\|default\|if\|else\|elseif\|do\|for\|while\|enum\|with\)\>'
|
||||
let ind = ind + shiftwidth()
|
||||
if previous_line =~? '^\s*\<\(begin\|\%(\%(private\|public\|friend\)\s\+\)\=\%(function\|sub\|property\|enum\|type\)\|select\|case\|default\|if\|else\|elseif\|do\|for\|while\|with\)\>'
|
||||
let ind = ind + bShiftwidth
|
||||
endif
|
||||
|
||||
" Subtract
|
||||
if this_line =~? '^\s*\<end\>\s\+\<select\>'
|
||||
if previous_line !~? '^\s*\<select\>'
|
||||
let ind = ind - 2 * shiftwidth()
|
||||
let ind = ind - 2 * bShiftwidth
|
||||
else
|
||||
" this case is for an empty 'select' -- 'end select'
|
||||
" (w/o any case statements) like:
|
||||
"
|
||||
" select case readwrite
|
||||
" end select
|
||||
let ind = ind - shiftwidth()
|
||||
let ind = ind - bShiftwidth
|
||||
endif
|
||||
elseif this_line =~? '^\s*\<\(end\|else\|elseif\|until\|loop\|next\|wend\)\>'
|
||||
let ind = ind - shiftwidth()
|
||||
let ind = ind - bShiftwidth
|
||||
elseif this_line =~? '^\s*\<\(case\|default\)\>'
|
||||
if previous_line !~? '^\s*\<select\>'
|
||||
let ind = ind - shiftwidth()
|
||||
let ind = ind - bShiftwidth
|
||||
endif
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfun
|
||||
endfunction
|
||||
|
||||
" vim:sw=4
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
" Vim indent file placeholder
|
||||
" Language: Vue
|
||||
" Maintainer: None, please volunteer if you have a real Vue indent script
|
||||
" Last Change: 2022 Dec 24
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
" don't set b:did_indent, otherwise html indenting won't be activated
|
||||
" let b:did_indent = 1
|
||||
|
||||
" Html comes closest
|
||||
runtime! indent/html.vim
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Nov 23
|
||||
" Last Change: 2022 Dec 16
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
let buf = bufnr('option-window')
|
||||
@@ -743,10 +743,12 @@ call <SID>AddOption("terse", gettext("add 's' flag in 'shortmess' (don't show se
|
||||
call <SID>BinOptionG("terse", &terse)
|
||||
call <SID>AddOption("shortmess", gettext("list of flags to make messages shorter"))
|
||||
call <SID>OptionG("shm", &shm)
|
||||
call <SID>AddOption("showcmd", gettext("show (partial) command keys in the status line"))
|
||||
call <SID>AddOption("showcmd", gettext("show (partial) command keys in location given by 'showcmdloc'"))
|
||||
let &sc = s:old_sc
|
||||
call <SID>BinOptionG("sc", &sc)
|
||||
set nosc
|
||||
call <SID>AddOption("showcmdloc", gettext("location where to show the (partial) command keys for 'showcmd'"))
|
||||
call <SID>OptionG("sloc", &sloc)
|
||||
call <SID>AddOption("showmode", gettext("display the current mode in the status line"))
|
||||
call <SID>BinOptionG("smd", &smd)
|
||||
call <SID>AddOption("ruler", gettext("show cursor position below each window"))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim plugin for converting a syntax highlighted file to HTML.
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2019 Nov 13
|
||||
" Last Change: 2023 Jan 01
|
||||
"
|
||||
" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
|
||||
" $VIMRUNTIME/syntax/2html.vim
|
||||
@@ -8,11 +8,23 @@
|
||||
if exists('g:loaded_2html_plugin')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_2html_plugin = 'vim8.1_v2'
|
||||
let g:loaded_2html_plugin = 'vim9.0_v1'
|
||||
|
||||
"
|
||||
" Changelog: {{{
|
||||
" 8.1_v2 (this version): - Fix Bitbucket issue #19: fix calculation of tab
|
||||
" 9.0_v1 (this version): - Implement g:html_no_doc and g:html_no_modeline
|
||||
" for diff mode. Add tests.
|
||||
" (Vim 9.0.1122): NOTE: no version string update for this version!
|
||||
" - Bugfix for variable name in g:html_no_doc
|
||||
" (Vim 9.0.0819): NOTE: no version string update for this version!
|
||||
" - Add options g:html_no_doc, g:html_no_lines,
|
||||
" and g:html_no_modeline (partially included in Vim
|
||||
" runtime prior to version string update).
|
||||
" - Updates for new Vim9 string append style (i.e. use
|
||||
" ".." instead of ".")
|
||||
"
|
||||
" 8.1 updates: {{{
|
||||
" 8.1_v2 (Vim 8.1.2312): - Fix SourceForge issue #19: fix calculation of tab
|
||||
" stop position to use in expanding a tab, when that
|
||||
" tab occurs after a syntax match which in turn
|
||||
" comes after previously expanded tabs.
|
||||
@@ -20,17 +32,17 @@ let g:loaded_2html_plugin = 'vim8.1_v2'
|
||||
" destination file to ignore FileType events;
|
||||
" speeds up processing when the destination file
|
||||
" already exists and HTML highlight takes too long.
|
||||
" - Fix Bitbucket issue #20: progress bar could not be
|
||||
" - Fix SourceForge issue #20: progress bar could not be
|
||||
" seen when DiffDelete background color matched
|
||||
" StatusLine background color. Added TOhtmlProgress
|
||||
" highlight group for manual user override, but
|
||||
" calculate it to be visible compared to StatusLine
|
||||
" by default.
|
||||
" - Fix Bitbucket issue #1: Remove workaround for old
|
||||
" - Fix SourceForge issue #1: Remove workaround for old
|
||||
" browsers which don't support 'ch' CSS unit, since
|
||||
" all modern browsers, including IE>=9, support it.
|
||||
" - Fix Bitbucket issue #10: support termguicolors
|
||||
" - Fix Bitbucket issue #21: default to using
|
||||
" - Fix SourceForge issue #10: support termguicolors
|
||||
" - Fix SourceForge issue #21: default to using
|
||||
" generated content instead of <input> tags for
|
||||
" uncopyable text, so that text is correctly
|
||||
" prevented from being copied in chrome. Use
|
||||
@@ -41,13 +53,14 @@ let g:loaded_2html_plugin = 'vim8.1_v2'
|
||||
" - Fix fallback sizing of <input> tags for browsers
|
||||
" without "ch" support.
|
||||
" - Fix cursor on unselectable diff filler text.
|
||||
" 8.1_v1 (Vim 8.1.0528): - Fix Bitbucket issue #6: Don't generate empty
|
||||
" 8.1_v1 (Vim 8.1.0528): - Fix SourceForge issue #6: Don't generate empty
|
||||
" script tag.
|
||||
" - Fix Bitbucket issue #5: javascript should
|
||||
" - Fix SourceForge issue #5: javascript should
|
||||
" declare variables with "var".
|
||||
" - Fix Bitbucket issue #13: errors thrown sourcing
|
||||
" - Fix SourceForge issue #13: errors thrown sourcing
|
||||
" 2html.vim directly when plugins not loaded.
|
||||
" - Fix Bitbucket issue #16: support 'vartabstop'.
|
||||
" - Fix SourceForge issue #16: support 'vartabstop'.
|
||||
"}}}
|
||||
"
|
||||
" 7.4 updates: {{{
|
||||
" 7.4_v2 (Vim 7.4.0899): Fix error raised when converting a diff containing
|
||||
@@ -152,7 +165,7 @@ let g:loaded_2html_plugin = 'vim8.1_v2'
|
||||
|
||||
" TODO: {{{
|
||||
" * Check the issue tracker:
|
||||
" https://bitbucket.org/fritzophrenic/vim-tohtml/issues?status=new&status=open
|
||||
" https://sourceforge.net/p/vim-tohtml/issues/search/?q=%21status%3Aclosed
|
||||
" * Options for generating the CSS in external style sheets. New :TOcss
|
||||
" command to convert the current color scheme into a (mostly) generic CSS
|
||||
" stylesheet which can be re-used. Alternate stylesheet support? Good start
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim syntax support file
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2020 Jan 05
|
||||
" Last Change: 2023 Jan 01
|
||||
"
|
||||
" Additional contributors:
|
||||
"
|
||||
@@ -1881,7 +1881,7 @@ if s:settings.use_css && !s:settings.no_doc
|
||||
endif
|
||||
endif
|
||||
|
||||
if !s:settings.use_css && !s:settings_no_doc
|
||||
if !s:settings.use_css && !s:settings.no_doc
|
||||
" For Netscape 4, set <body> attributes too, though, strictly speaking, it's
|
||||
" incorrect.
|
||||
execute '%s:<body\([^>]*\):<body bgcolor="' . s:bgc . '" text="' . s:fgc . '"\1>\r<font face="'. s:htmlfont .'"'
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: automake Makefile.am
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainer: John Williams <jrw@pobox.com>
|
||||
" Last Change: 2018 Dec 27
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/automake.vim
|
||||
" Last Change: 2023 Jan 16
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/automake.vim
|
||||
"
|
||||
" XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain
|
||||
" it only because patches have been submitted for it by Debian users and the
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2022 Oct 29
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
|
||||
" Last Change: 2023 Jan 16
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debchangelog.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
if exists('b:current_syntax')
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2022 May 11
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcontrol.vim
|
||||
" Last Change: 2023 Jan 16
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debcontrol.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
if exists('b:current_syntax')
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Debian copyright file
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Last Change: 2019 Sep 07
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcopyright.vim
|
||||
" Last Change: 2023 Jan 16
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debcopyright.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
if exists('b:current_syntax')
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||
" Last Change: 2022 Oct 29
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
|
||||
" Last Change: 2023 Jan 16
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debsources.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
if exists('b:current_syntax')
|
||||
@@ -14,7 +14,7 @@ endif
|
||||
syn case match
|
||||
|
||||
" A bunch of useful keywords
|
||||
syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\|restricted\|universe\|multiverse\)/
|
||||
syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\|non-free-firmware\|restricted\|universe\|multiverse\)/
|
||||
|
||||
" Match comments
|
||||
syn match debsourcesComment /#.*/ contains=@Spell
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Debian DEP3 Patch headers
|
||||
" Maintainer: Gabriel Filion <gabster@lelutin.ca>
|
||||
" Last Change: 2022 Apr 06
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/dep3patch.vim
|
||||
" Last Change: 2023 Jan 16
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/dep3patch.vim
|
||||
"
|
||||
" Specification of the DEP3 patch header format is available at:
|
||||
" https://dep-team.pages.debian.net/deps/dep3/
|
||||
|
||||
21
runtime/syntax/editorconfig.vim
Normal file
21
runtime/syntax/editorconfig.vim
Normal file
@@ -0,0 +1,21 @@
|
||||
" Vim syntax file
|
||||
" Language: EditorConfig
|
||||
" Maintainer: Gregory Anders <greg@gpanders.com>
|
||||
" Last Change: 2023-01-03
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! syntax/dosini.vim
|
||||
unlet! b:current_syntax
|
||||
|
||||
syntax match editorconfigUnknownProperty "^\s*\zs\w\+\ze\s*="
|
||||
|
||||
syntax keyword editorconfigProperty root charset end_of_line indent_style
|
||||
syntax keyword editorconfigProperty indent_size tab_width max_line_length
|
||||
syntax keyword editorconfigProperty trim_trailing_whitespace insert_final_newline
|
||||
|
||||
hi def link editorconfigProperty dosiniLabel
|
||||
|
||||
let b:current_syntax = 'editorconfig'
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: FORTH
|
||||
" Current Maintainer: Johan Kotlinski <kotlinski@gmail.com>
|
||||
" Previous Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
|
||||
" Last Change: 2018-03-29
|
||||
" Previous Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de>
|
||||
" Last Change: 2023-01-12
|
||||
" Filenames: *.fs,*.ft
|
||||
" URL: https://github.com/jkotlinski/forth.vim
|
||||
|
||||
@@ -23,7 +23,6 @@ syn case ignore
|
||||
|
||||
" Some special, non-FORTH keywords
|
||||
syn keyword forthTodo contained TODO FIXME XXX
|
||||
syn match forthTodo contained 'Copyright\(\s([Cc])\)\=\(\s[0-9]\{2,4}\)\='
|
||||
|
||||
" Characters allowed in keywords
|
||||
" I don't know if 128-255 are allowed in ANS-FORTH
|
||||
@@ -98,13 +97,16 @@ syn keyword forthEndOfColonDef ; ;M ;m
|
||||
syn keyword forthEndOfClassDef ;class
|
||||
syn keyword forthEndOfObjectDef ;object
|
||||
syn keyword forthDefine CONSTANT 2CONSTANT FCONSTANT VARIABLE 2VARIABLE
|
||||
syn keyword forthDefine FVARIABLE CREATE USER VALUE TO DEFER IS DOES> IMMEDIATE
|
||||
syn keyword forthDefine FVARIABLE CREATE USER VALUE TO DEFER IS <BUILDS DOES> IMMEDIATE
|
||||
syn keyword forthDefine COMPILE-ONLY COMPILE RESTRICT INTERPRET POSTPONE EXECUTE
|
||||
syn keyword forthDefine LITERAL CREATE-INTERPRET/COMPILE INTERPRETATION>
|
||||
syn keyword forthDefine <INTERPRETATION COMPILATION> <COMPILATION ] LASTXT
|
||||
syn keyword forthDefine COMP' POSTPONE, FIND-NAME NAME>INT NAME?INT NAME>COMP
|
||||
syn keyword forthDefine NAME>STRING STATE C; CVARIABLE BUFFER: MARKER
|
||||
syn keyword forthDefine , 2, F, C, COMPILE,
|
||||
syn match forthDefine "\[DEFINED]"
|
||||
syn match forthDefine "\[UNDEFINED]"
|
||||
syn match forthDefine "\[IF]"
|
||||
syn match forthDefine "\[IFDEF]"
|
||||
syn match forthDefine "\[IFUNDEF]"
|
||||
syn match forthDefine "\[THEN]"
|
||||
@@ -180,6 +182,7 @@ syn keyword forthBlocks BLOCK-INCLUDED BLK
|
||||
syn keyword forthMath DECIMAL HEX BASE
|
||||
syn match forthInteger '\<-\=[0-9]\+.\=\>'
|
||||
syn match forthInteger '\<&-\=[0-9]\+.\=\>'
|
||||
syn match forthInteger '\<#-\=[0-9]\+.\=\>'
|
||||
" recognize hex and binary numbers, the '$' and '%' notation is for gforth
|
||||
syn match forthInteger '\<\$\x*\x\+\>' " *1* --- don't mess
|
||||
syn match forthInteger '\<\x*\d\x*\>' " *2* --- this order!
|
||||
@@ -192,18 +195,18 @@ syn match forthFloat '\<-\=\d*[.]\=\d\+[DdEe][-+]\d\+\>'
|
||||
syn region forthComment start='0 \[if\]' end='\[endif\]' end='\[then\]' contains=forthTodo
|
||||
|
||||
" Strings
|
||||
syn region forthString start=+\.*\"+ end=+"+ end=+$+
|
||||
syn region forthString start=+\.*\"+ end=+"+ end=+$+ contains=@Spell
|
||||
" XXX
|
||||
syn region forthString start=+s\"+ end=+"+ end=+$+
|
||||
syn region forthString start=+s\\\"+ end=+"+ end=+$+
|
||||
syn region forthString start=+c\"+ end=+"+ end=+$+
|
||||
syn region forthString start=+s\"+ end=+"+ end=+$+ contains=@Spell
|
||||
syn region forthString start=+s\\\"+ end=+"+ end=+$+ contains=@Spell
|
||||
syn region forthString start=+c\"+ end=+"+ end=+$+ contains=@Spell
|
||||
|
||||
" Comments
|
||||
syn match forthComment '\\\s.*$' contains=forthTodo,forthSpaceError
|
||||
syn region forthComment start='\\S\s' end='.*' contains=forthTodo,forthSpaceError
|
||||
syn match forthComment '\.(\s[^)]*)' contains=forthTodo,forthSpaceError
|
||||
syn region forthComment start='\(^\|\s\)\zs(\s' skip='\\)' end=')' contains=forthTodo,forthSpaceError
|
||||
syn region forthComment start='/\*' end='\*/' contains=forthTodo,forthSpaceError
|
||||
syn match forthComment '\\\%(\s.*\)\=$' contains=@Spell,forthTodo,forthSpaceError
|
||||
syn region forthComment start='\\S\s' end='.*' contains=@Spell,forthTodo,forthSpaceError
|
||||
syn match forthComment '\.(\s[^)]*)' contains=@Spell,forthTodo,forthSpaceError
|
||||
syn region forthComment start='\(^\|\s\)\zs(\s' skip='\\)' end=')' contains=@Spell,forthTodo,forthSpaceError
|
||||
syn region forthComment start='/\*' end='\*/' contains=@Spell,forthTodo,forthSpaceError
|
||||
|
||||
" Include files
|
||||
syn match forthInclude '^INCLUDE\s\+\k\+'
|
||||
@@ -260,3 +263,4 @@ let b:current_syntax = "forth"
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" vim:ts=8:sw=4:nocindent:smartindent:
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: fstab file
|
||||
" Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
|
||||
" URL: https://raw.github.com/rid9/vim-fstab/master/syntax/fstab.vim
|
||||
" Last Change: 2020 Dec 30
|
||||
" Version: 1.4
|
||||
" Last Change: 2022 Dec 11
|
||||
" Version: 1.6.2
|
||||
"
|
||||
" Credits:
|
||||
" David Necas (Yeti) <yeti@physics.muni.cz>
|
||||
@@ -56,71 +56,124 @@ syn keyword fsMountPointKeyword contained none swap
|
||||
" Type
|
||||
syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown
|
||||
syn match fsTypeUnknown /\s\+\zs\w\+/ contained
|
||||
syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 cfs cgroup cifs coda configfs cpuset cramfs devfs devpts devtmpfs e2compr efs ext2 ext2fs ext3 ext4 fdesc ffs filecore fuse fuseblk fusectl hfs hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfsd nilfs2 none ntfs null nwfs overlay ovlfs pipefs portal proc procfs pstore ptyfs qnx4 reiserfs ramfs romfs securityfs shm smbfs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xenfs xfs zisofs
|
||||
syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 ceph cfs cgroup cifs coda coherent configfs cpuset cramfs debugfs devfs devpts devtmpfs dlmfs e2compr ecryptfs efivarfs efs erofs exfat ext2 ext2fs ext3 ext4 f2fs fdesc ffs filecore fuse fuseblk fusectl gfs2 hfs hfsplus hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfs4 nfsd nilfs2 none ntfs ntfs3 null nwfs ocfs2 omfs overlay ovlfs pipefs portal proc procfs pstore ptyfs pvfs2 qnx4 qnx6 reiserfs ramfs romfs rpc_pipefs securityfs shm smbfs spufs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs ubifs udf ufs umap umsdos union usbfs userfs v9fs vfat virtiofs vs3fs vxfs wrapfs wvfs xenfs xenix xfs zisofs zonefs
|
||||
|
||||
" Options
|
||||
" -------
|
||||
" Options: General
|
||||
syn cluster fsOptionsCluster contains=fsOperator,fsOptionsGeneral,fsOptionsKeywords,fsTypeUnknown
|
||||
syn match fsOptionsNumber /\d\+/
|
||||
syn match fsOptionsNumberSigned /[-+]\?\d\+/
|
||||
syn match fsOptionsNumberOctal /[0-8]\+/
|
||||
syn match fsOptionsString /[a-zA-Z0-9_-]\+/
|
||||
syn keyword fsOptionsTrueFalse true false
|
||||
syn keyword fsOptionsYesNo yes no
|
||||
syn keyword fsOptionsYN y n
|
||||
syn keyword fsOptions01 0 1
|
||||
syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck
|
||||
syn keyword fsOptionsSize 512 1024 2048
|
||||
syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail failok
|
||||
syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop managed mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner pamconsole rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail failok lazytime
|
||||
syn match fsOptionsGeneral /_netdev/
|
||||
|
||||
syn match fsOptionsKeywords contained /\<x-systemd\.\%(requires\|before\|after\|wanted-by\|required-by\|requires-mounts-for\|idle-timeout\|device-timeout\|mount-timeout\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<x-systemd\.\%(device-bound\|automount\|makefs\|growfs\|rw-only\)/
|
||||
syn match fsOptionsKeywords contained /\<x-initrd\.mount/
|
||||
|
||||
syn match fsOptionsKeywords contained /\<cache=/ nextgroup=fsOptionsCache
|
||||
syn keyword fsOptionsCache yes no none strict loose fscache mmap
|
||||
|
||||
syn match fsOptionsKeywords contained /\<dax=/ nextgroup=fsOptionsDax
|
||||
syn keyword fsOptionsDax inode never always
|
||||
|
||||
syn match fsOptionsKeywords contained /\<errors=/ nextgroup=fsOptionsErrors
|
||||
syn keyword fsOptionsErrors contained continue panic withdraw remount-ro recover zone-ro zone-offline repair
|
||||
|
||||
syn match fsOptionsKeywords contained /\<\%(sec\)=/ nextgroup=fsOptionsSecurityMode
|
||||
syn keyword fsOptionsSecurityMode contained none krb5 krb5i ntlm ntlmi ntlmv2 ntlmv2i ntlmssp ntlmsspi sys lkey lkeyi lkeyp spkm spkmi spkmp
|
||||
|
||||
" Options: adfs
|
||||
syn match fsOptionsKeywords contained /\<\%([ug]id\|o\%(wn\|th\)mask\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<ftsuffix=/ nextgroup=fsOptions01
|
||||
|
||||
" Options: affs
|
||||
syn match fsOptionsKeywords contained /\<\%(set[ug]id\|mode\|reserved\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<mode=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(set[ug]id\|reserved\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<\%(prefix\|volume\|root\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<bs=/ nextgroup=fsOptionsSize
|
||||
syn keyword fsOptionsKeywords contained protect usemp verbose
|
||||
syn keyword fsOptionsKeywords contained protect usemp verbose nofilenametruncate mufs
|
||||
|
||||
" Options: btrfs
|
||||
syn match fsOptionsKeywords contained /\<\%(subvol\|subvolid\|subvolrootid\|device\|compress\|compress-force\|fatal_errors\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(subvol\|subvolid\|subvolrootid\|device\|compress\|compress-force\|check_int_print_mask\|space_cache\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(max_inline\|alloc_start\|thread_pool\|metadata_ratio\|check_int_print_mask\)=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsKeywords contained degraded nodatasum nodatacow nobarrier ssd ssd_spread noacl notreelog flushoncommit space_cache nospace_cache clear_cache user_subvol_rm_allowed autodefrag inode_cache enospc_debug recovery check_int check_int_data skip_balance discard
|
||||
syn match fsOptionsKeywords contained /\<discard=/ nextgroup=fsOptionsBtrfsDiscard
|
||||
syn keyword fsOptionsBtrfsDiscard sync async
|
||||
syn match fsOptionsKeywords contained /\<fatal_errors=/ nextgroup=fsOptionsBtrfsFatalErrors
|
||||
syn keyword fsOptionsBtrfsFatalErrors bug panic
|
||||
syn match fsOptionsKeywords contained /\<fragment=/ nextgroup=fsOptionsBtrfsFragment
|
||||
syn keyword fsOptionsBtrfsFragment data metadata all
|
||||
syn keyword fsOptionsKeywords contained degraded datasum nodatasum datacow nodatacow barrier nobarrier ssd ssd_spread nossd nossd_spread noacl treelog notreelog flushoncommit noflushoncommit space_cache nospace_cache clear_cache user_subvol_rm_allowed autodefrag noautodefrag inode_cache noinode_cache enospc_debug noenospc_debug recovery check_int check_int_data skip_balance discard nodiscard compress compress-force nologreplay rescan_uuid_tree rescue usebackuproot
|
||||
|
||||
" Options: cd9660
|
||||
syn keyword fsOptionsKeywords contained extatt gens norrip nostrictjoilet
|
||||
|
||||
" Options: ceph
|
||||
syn match fsOptionsKeywords contained /\<\%(mon_addr\|fsid\|rasize\|mount_timeout\|caps_max\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained rbytes norbytes nocrc dcache nodcache noasyncreaddir noquotadf nocopyfrom
|
||||
syn match fsOptionsKeywords contained /\<recover_session=/ nextgroup=fsOptionsCephRecoverSession
|
||||
syn keyword fsOptionsCephRecoverSession contained no clean
|
||||
|
||||
" Options: cifs
|
||||
syn match fsOptionsKeywords contained /\<\%(user\|password\|credentials\|servernetbiosname\|servern\|netbiosname\|file_mode\|dir_mode\|ip\|domain\|prefixpath\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(cruid\|backupuid\|backupgid\)=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsKeywords contained forceuid forcegid guest setuids nosetuids perm noperm dynperm strictcache rwpidforward mapchars nomapchars cifsacl nocase ignorecase nobrl sfu serverino noserverino nounix fsc multiuser posixpaths noposixpaths
|
||||
|
||||
" Options: devpts
|
||||
" -- everything already defined
|
||||
|
||||
" Options: ecryptfs
|
||||
syn match fsOptionsKeywords contained /\<\%(ecryptfs_\%(sig\|fnek_sig\|cipher\|key_bytes\)\|key\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained ecryptfs_passthrough no_sig_cache ecryptfs_encrypted_view ecryptfs_xattr
|
||||
syn match fsOptionsKeywords contained /\<ecryptfs_enable_filename_crypto=/ nextgroup=fsOptionsYN
|
||||
syn match fsOptionsKeywords contained /\<verbosity=/ nextgroup=fsOptions01
|
||||
|
||||
" Options: erofs
|
||||
syn match fsOptionsKeywords contained /\<cache_strategy=/ nextgroup=fsOptionsEroCacheStrategy
|
||||
syn keyword fsOptionsEroCacheStrategy contained disabled readahead readaround
|
||||
|
||||
" Options: ext2
|
||||
syn match fsOptionsKeywords contained /\<check=*/ nextgroup=@fsOptionsCheckCluster
|
||||
syn match fsOptionsKeywords contained /\<errors=/ nextgroup=fsOptionsExt2Errors
|
||||
syn match fsOptionsKeywords contained /\<\%(res[gu]id\|sb\)=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsExt2Check contained none normal strict
|
||||
syn keyword fsOptionsExt2Errors contained continue panic
|
||||
syn match fsOptionsExt2Errors contained /\<remount-ro\>/
|
||||
syn match fsOptionsErrors contained /\<remount-ro\>/
|
||||
syn keyword fsOptionsKeywords contained acl bsddf minixdf debug grpid bsdgroups minixdf nocheck nogrpid oldalloc orlov sysvgroups nouid32 nobh user_xattr nouser_xattr
|
||||
|
||||
" Options: ext3
|
||||
syn match fsOptionsKeywords contained /\<journal=/ nextgroup=fsOptionsExt3Journal
|
||||
syn match fsOptionsKeywords contained /\<data=/ nextgroup=fsOptionsExt3Data
|
||||
syn match fsOptionsKeywords contained /\<data_err=/ nextgroup=fsOptionsExt3DataErr
|
||||
syn match fsOptionsKeywords contained /\<commit=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<jqfmt=/ nextgroup=fsOptionsExt3Jqfmt
|
||||
syn match fsOptionsKeywords contained /\<\%(usrjquota\|grpjquota\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsExt3Journal contained update inum
|
||||
syn keyword fsOptionsExt3Data contained journal ordered writeback
|
||||
syn keyword fsOptionsExt3DataErr contained ignore abort
|
||||
syn keyword fsOptionsExt3Jqfmt contained vfsold vfsv0 vfsv1
|
||||
syn keyword fsOptionsKeywords contained noload user_xattr nouser_xattr acl
|
||||
|
||||
" Options: ext4
|
||||
syn match fsOptionsKeywords contained /\<journal=/ nextgroup=fsOptionsExt4Journal
|
||||
syn match fsOptionsKeywords contained /\<data=/ nextgroup=fsOptionsExt4Data
|
||||
syn match fsOptionsKeywords contained /\<barrier=/ nextgroup=fsOptionsExt4Barrier
|
||||
syn match fsOptionsKeywords contained /\<barrier=/ nextgroup=fsOptions01
|
||||
syn match fsOptionsKeywords contained /\<journal_dev=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<resuid=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<resgid=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<sb=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<commit=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<\%(commit\|inode_readahead_blks\|stripe\|max_batch_time\|min_batch_time\|init_itable\|max_dir_size_kb\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<journal_ioprio=/ nextgroup=fsOptionsExt4JournalIoprio
|
||||
syn keyword fsOptionsExt4Journal contained update inum
|
||||
syn keyword fsOptionsExt4Data contained journal ordered writeback
|
||||
syn match fsOptionsExt4Barrier /[0-1]/
|
||||
syn keyword fsOptionsKeywords contained noload extents orlov oldalloc user_xattr nouser_xattr acl noacl reservation noreservation bsddf minixdf check=none nocheck debug grpid nogroupid sysvgroups bsdgroups quota noquota grpquota usrquota bh nobh
|
||||
syn keyword fsOptionsExt4JournalIoprio contained 0 1 2 3 4 5 6 7
|
||||
syn keyword fsOptionsKeywords contained noload extents orlov oldalloc user_xattr nouser_xattr acl noacl reservation noreservation bsddf minixdf check=none nocheck debug grpid nogroupid sysvgroups bsdgroups quota noquota grpquota usrquota bh nobh journal_checksum nojournal_checksum journal_async_commit delalloc nodelalloc auto_da_alloc noauto_da_alloc noinit_itable block_validity noblock_validity dioread_lock dioread_nolock i_version nombcache prjquota
|
||||
|
||||
" Options: fat
|
||||
syn match fsOptionsKeywords contained /\<blocksize=/ nextgroup=fsOptionsSize
|
||||
@@ -135,39 +188,124 @@ syn keyword fsOptionsConv contained b t a binary text auto
|
||||
syn keyword fsOptionsFatType contained 12 16 32
|
||||
syn keyword fsOptionsKeywords contained quiet sys_immutable showexec dots nodots
|
||||
|
||||
" Options: fuse
|
||||
syn match fsOptionsKeywords contained /\<\%(fd\|user_id\|group_id\|blksize\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<\%(rootmode\)=/ nextgroup=fsOptionsString
|
||||
|
||||
" Options: hfs
|
||||
syn match fsOptionsKeywords contained /\<\%(creator|type\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(creator\|type\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(dir\|file\|\)_umask=/ nextgroup=fsOptionsNumberOctal
|
||||
syn match fsOptionsKeywords contained /\<\%(session\|part\)=/ nextgroup=fsOptionsNumber
|
||||
|
||||
" Options: hfsplus
|
||||
syn match fsOptionsKeywords contained /\<nls=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained decompose nodecompose
|
||||
|
||||
" Options: f2fs
|
||||
syn match fsOptionsKeywords contained /\<background_gc=/ nextgroup=fsOptionsF2fsBackgroundGc
|
||||
syn keyword fsOptionsF2fsBackgroundGc contained on off sync
|
||||
syn match fsOptionsKeywords contained /\<active_logs=/ nextgroup=fsOptionsF2fsActiveLogs
|
||||
syn keyword fsOptionsF2fsActiveLogs contained 2 4 6
|
||||
syn match fsOptionsKeywords contained /\<alloc_mode=/ nextgroup=fsOptionsF2fsAllocMode
|
||||
syn keyword fsOptionsF2fsAllocMode contained reuse default
|
||||
syn match fsOptionsKeywords contained /\<fsync_mode=/ nextgroup=fsOptionsF2fsFsyncMode
|
||||
syn keyword fsOptionsF2fsFsyncMode contained posix strict nobarrier
|
||||
syn match fsOptionsKeywords contained /\<compress_mode=/ nextgroup=fsOptionsF2fsCompressMode
|
||||
syn keyword fsOptionsF2fsCompressMode contained fs user
|
||||
syn match fsOptionsKeywords contained /\<discard_unit=/ nextgroup=fsOptionsF2fsDiscardUnit
|
||||
syn keyword fsOptionsF2fsDiscardUnit contained block segment section
|
||||
syn match fsOptionsKeywords contained /\<memory=/ nextgroup=fsOptionsF2fsMemory
|
||||
syn keyword fsOptionsF2fsMemory contained normal low
|
||||
syn match fsOptionsKeywords contained /\<\%(inline_xattr_size\|reserve_root\|fault_injection\|fault_type\|io_bits\|compress_log_size\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<\%(prjjquota\|test_dummy_encryption\|checkpoint\|compress_algorithm\|compress_extension\|nocompress_extension\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeyWords contained gc_merge nogc_merge disable_roll_forward no_heap disable_ext_identify inline_xattr noinline_xattr inline_data noinline_data inline_dentry noinline_dentry flush_merge fastboot extent_cache noextent_cache data_flush offusrjquota offgrpjquota offprjjquota test_dummy_encryption checkpoint_merge nocheckpoint_merge compress_chksum compress_cache inlinecrypt atgc
|
||||
|
||||
" Options: ffs
|
||||
syn keyword fsOptionsKeyWords contained noperm softdep
|
||||
|
||||
" Options: gfs2
|
||||
syn match fsOptionsKeywords contained /\<\%(lockproto\|locktable\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(quota_quantum\|statfs_quantum\|statfs_percent\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<quota=/ nextgroup=fsOptionsGfs2Quota
|
||||
syn keyword fsOptionsGfs2Quota contained off account on
|
||||
syn keyword fsOptionsKeywords contained localcaching localflocks ignore_local_fs upgrade spectator meta
|
||||
|
||||
" Options: hpfs
|
||||
syn match fsOptionsKeywords contained /\<case=/ nextgroup=fsOptionsHpfsCase
|
||||
syn keyword fsOptionsHpfsCase contained lower asis
|
||||
syn match fsOptionsKeywords contained /\<chkdsk=/ nextgroup=fsOptionsHpfsChkdsk
|
||||
syn keyword fsOptionsHpfsChkdsk contained no errors always
|
||||
syn match fsOptionsKeywords contained /\<eas=/ nextgroup=fsOptionsHpfsEas
|
||||
syn keyword fsOptionsHpfsEas contained no ro rw
|
||||
syn match fsOptionsKeywords contained /\<timeshift=/ nextgroup=fsOptionsNumberSigned
|
||||
|
||||
" Options: iso9660
|
||||
syn match fsOptionsKeywords contained /\<map=/ nextgroup=fsOptionsIsoMap
|
||||
syn match fsOptionsKeywords contained /\<block=/ nextgroup=fsOptionsSize
|
||||
syn match fsOptionsKeywords contained /\<\%(session\|sbsector\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<\%(session\|sbsector\|dmode\)=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsIsoMap contained n o a normal off acorn
|
||||
syn keyword fsOptionsKeywords contained norock nojoilet unhide cruft
|
||||
syn keyword fsOptionsKeywords contained norock nojoliet hide unhide cruft overriderockperm showassoc
|
||||
syn keyword fsOptionsConv contained m mtext
|
||||
|
||||
" Options: jfs
|
||||
syn keyword fsOptionsKeywords nointegrity integrity
|
||||
|
||||
" Options: nfs
|
||||
syn match fsOptionsKeywords contained /\<\%(rsize\|wsize\|timeo\|retrans\|acregmin\|acregmax\|acdirmin\|acdirmax\|actimeo\|retry\|port\|mountport\|mounthost\|mountprog\|mountvers\|nfsprog\|nfsvers\|namelen\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained bg fg soft hard intr cto ac tcp udp lock nobg nofg nosoft nohard nointr noposix nocto noac notcp noudp nolock
|
||||
syn match fsOptionsKeywords contained /\<lookupcache=/ nextgroup=fsOptionsNfsLookupCache
|
||||
syn keyword fsOptionsNfsLookupCache contained all none pos positive
|
||||
syn match fsOptionsKeywords contained /\<local_lock=/ nextgroup=fsOptionsNfsLocalLock
|
||||
syn keyword fsOptionsNfsLocalLock contained all flock posix none
|
||||
syn match fsOptionsKeywords contained /\<\%(mounthost\|mountprog\|nfsprog\|namelen\|proto\|mountproto\|clientaddr\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(timeo\|retrans\|[rw]size\|acregmin\|acregmax\|acdirmin\|acdirmax\|actimeo\|retry\|port\|mountport\|mountvers\|namlen\|nfsvers\|vers\|minorversion\)=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsKeywords contained bg fg soft hard intr cto ac tcp udp lock nobg nofg nosoft nohard nointr noposix nocto noac notcp noudp nolock sharecache nosharecache resvport noresvport rdirplus nordirplus
|
||||
|
||||
" Options: nilfs2
|
||||
syn match fsOptionsKeywords contained /\<order=/ nextgroup=fsOptionsNilfs2Order
|
||||
syn keyword fsOptionsNilfs2Order contained relaxed strict
|
||||
syn match fsOptionsKeywords contained /\<\%([cp]p\)=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsKeywords contained nogc
|
||||
|
||||
" Options: ntfs
|
||||
syn match fsOptionsKeywords contained /\<mft_zone_multiplier=/ nextgroup=fsOptionsNtfsMftZoneMultiplier
|
||||
syn keyword fsOptionsNtfsMftZoneMultiplier contained 1 2 3 4
|
||||
syn match fsOptionsKeywords contained /\<\%(posix=*\|uni_xlate=\)/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<\%(sloppy\|show_sys_files\|case_sensitive\|disable_sparse\)=/ nextgroup=fsOptionsTrueFalse
|
||||
syn keyword fsOptionsKeywords contained utf8
|
||||
|
||||
" Options: ntfs3
|
||||
syn keyword fsOptionsKeywords contained noacsrules nohidden sparse showmeta prealloc
|
||||
|
||||
" Options: ntfs-3g
|
||||
syn match fsOptionsKeywords contained /\<\%(usermapping\|locale\|streams_interface\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained permissions inherit recover norecover ignore_case remove_hiberfile hide_hid_files hide_dot_files windows_names silent no_def_opts efs_raw compression nocompression no_detach
|
||||
|
||||
" Options: ocfs2
|
||||
syn match fsOptionsKeywords contained /\<\%(resv_level\|dir_resv_level\)=/ nextgroup=fsOptionsOcfs2ResvLevel
|
||||
syn keyword fsOptionsOcfs2ResvLevel contained 0 1 2 3 4 5 6 7 8
|
||||
syn match fsOptionsKeywords contained /\<coherency=/ nextgroup=fsOptionsOcfs2Coherency
|
||||
syn keyword fsOptionsOcfs2Coherency contained full buffered
|
||||
syn match fsOptionsKeywords contained /\<\%(atime_quantum\|preferred_slot\|localalloc\)=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsKeywords contained strictatime inode64
|
||||
|
||||
" Options: overlay
|
||||
syn match fsOptionsKeywords contained /\<redirect_dir=/ nextgroup=fsOptionsOverlayRedirectDir
|
||||
syn keyword fsOptionsOverlayRedirectDir contained on follow off nofollow
|
||||
|
||||
" Options: proc
|
||||
" -- everything already defined
|
||||
syn match fsOptionsKeywords contained /\<\%(hidepid\|subset\)=/ nextgroup=fsOptionsString
|
||||
|
||||
" Options: qnx4
|
||||
syn match fsOptionsKeywords contained /\<bitmap=/ nextgroup=fsOptionsQnx4Bitmap
|
||||
syn keyword fsOptionsQnx4Bitmap contained always lazy nonrmv
|
||||
syn keyword fsOptionsKeywords contained grown noembed overalloc unbusy
|
||||
|
||||
" Options: qnx6
|
||||
syn match fsOptionsKeywords contained /\<hold=/ nextgroup=fsOptionsQnx6Hold
|
||||
syn keyword fsOptionsQnx6Hold contained allow root deny
|
||||
syn match fsOptionsKeywords contained /\<sync=/ nextgroup=fsOptionsQnx6Sync
|
||||
syn keyword fsOptionsQnx6Sync contained mandatory optional none
|
||||
syn match fsOptionsKeywords contained /\<snapshot=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsKeywords contained alignio
|
||||
|
||||
" Options: reiserfs
|
||||
syn match fsOptionsKeywords contained /\<hash=/ nextgroup=fsOptionsReiserHash
|
||||
@@ -176,7 +314,7 @@ syn keyword fsOptionsReiserHash contained rupasov tea r5 detect
|
||||
syn keyword fsOptionsKeywords contained hashed_relocation noborder nolog notail no_unhashed_relocation replayonly
|
||||
|
||||
" Options: sshfs
|
||||
syn match fsOptionsKeywords contained /\<\%(BatchMode\|ChallengeResponseAuthentication\|CheckHostIP\|ClearAllForwardings\|Compression\|EnableSSHKeysign\|ForwardAgent\|ForwardX11\|ForwardX11Trusted\|GatewayPorts\|GSSAPIAuthentication\|GSSAPIDelegateCredentials\|HashKnownHosts\|HostbasedAuthentication\|IdentitiesOnly\|NoHostAuthenticationForLocalhost\|PasswordAuthentication\|PubkeyAuthentication\|RhostsRSAAuthentication\|RSAAuthentication\|TCPKeepAlive\|UsePrivilegedPort\|cache\)=/ nextgroup=fsOptionsYesNo
|
||||
syn match fsOptionsKeywords contained /\<\%(BatchMode\|ChallengeResponseAuthentication\|CheckHostIP\|ClearAllForwardings\|Compression\|EnableSSHKeysign\|ForwardAgent\|ForwardX11\|ForwardX11Trusted\|GatewayPorts\|GSSAPIAuthentication\|GSSAPIDelegateCredentials\|HashKnownHosts\|HostbasedAuthentication\|IdentitiesOnly\|NoHostAuthenticationForLocalhost\|PasswordAuthentication\|PubkeyAuthentication\|RhostsRSAAuthentication\|RSAAuthentication\|TCPKeepAlive\|UsePrivilegedPort\)=/ nextgroup=fsOptionsYesNo
|
||||
syn match fsOptionsKeywords contained /\<\%(ControlMaster\|StrictHostKeyChecking\|VerifyHostKeyDNS\)=/ nextgroup=fsOptionsSshYesNoAsk
|
||||
syn match fsOptionsKeywords contained /\<\%(AddressFamily\|BindAddress\|Cipher\|Ciphers\|ControlPath\|DynamicForward\|EscapeChar\|GlobalKnownHostsFile\|HostKeyAlgorithms\|HostKeyAlias\|HostName\|IdentityFile\|KbdInteractiveDevices\|LocalForward\|LogLevel\|MACs\|PreferredAuthentications\|Protocol\|ProxyCommand\|RemoteForward\|RhostsAuthentication\|SendEnv\|SmartcardDevice\|User\|UserKnownHostsFile\|XAuthLocation\|comment\|workaround\|idmap\|ssh_command\|sftp_server\|fsname\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(CompressionLevel\|ConnectionAttempts\|ConnectTimeout\|NumberOfPasswordPrompts\|Port\|ServerAliveCountMax\|ServerAliveInterval\|cache_timeout\|cache_X_timeout\|ssh_protocol\|directport\|max_read\|umask\|uid\|gid\|entry_timeout\|negative_timeout\|attr_timeout\)=/ nextgroup=fsOptionsNumber
|
||||
@@ -190,12 +328,19 @@ syn keyword fsOptionsKeywords contained procuid
|
||||
" Options: swap
|
||||
syn match fsOptionsKeywords contained /\<pri=/ nextgroup=fsOptionsNumber
|
||||
|
||||
" Options: ubifs
|
||||
syn match fsOptionsKeywords contained /\<\%(compr\|auth_key\|auth_hash_name\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained bulk_read no_bulk_read chk_data_crc no_chk_data_crc
|
||||
|
||||
" Options: tmpfs
|
||||
syn match fsOptionsKeywords contained /\<huge=/ nextgroup=fsOptionsTmpfsHuge
|
||||
syn keyword fsOptionsTmpfsHuge contained never always within_size advise deny force
|
||||
syn match fsOptionsKeywords contained /\<\%(size\|mpol\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<nr_\%(blocks\|inodes\)=/ nextgroup=fsOptionsNumber
|
||||
|
||||
" Options: udf
|
||||
syn match fsOptionsKeywords contained /\<\%(anchor\|partition\|lastblock\|fileset\|rootdir\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained unhide undelete strict novrs
|
||||
syn keyword fsOptionsKeywords contained unhide undelete strict nostrict novrs adinicb noadinicb shortad longad
|
||||
|
||||
" Options: ufs
|
||||
syn match fsOptionsKeywords contained /\<ufstype=/ nextgroup=fsOptionsUfsType
|
||||
@@ -208,14 +353,32 @@ syn keyword fsOptionsUfsError contained panic lock umount repair
|
||||
syn match fsOptionsKeywords contained /\<\%(dev\|bus\|list\)\%(id\|gid\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<\%(dev\|bus\|list\)mode=/ nextgroup=fsOptionsNumberOctal
|
||||
|
||||
" Options: v9fs
|
||||
syn match fsOptionsKeywords contained /\<\%(trans\)=/ nextgroup=fsOptionsV9Trans
|
||||
syn keyword fsOptionsV9Trans unix tcp fd virtio rdma
|
||||
syn match fsOptionsKeywords contained /\<debug=/ nextgroup=fsOptionsV9Debug
|
||||
syn keyword fsOptionsV9Debug 0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 0x100 0x200 0x400 0x800
|
||||
syn match fsOptionsKeywords contained /\<version=/ nextgroup=fsOptionsV9Version
|
||||
syn keyword fsOptionsV9Version 9p2000 9p2000.u 9p2000.L
|
||||
syn match fsOptionsKeywords contained /\<\%([ua]name\|[rw]fdno\|access\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<msize=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsKeywords contained noextend dfltuid dfltgid afid nodevmap cachetag
|
||||
|
||||
" Options: vfat
|
||||
syn keyword fsOptionsKeywords contained nonumtail posix utf8
|
||||
syn match fsOptionsKeywords contained /shortname=/ nextgroup=fsOptionsVfatShortname
|
||||
syn match fsOptionsKeywords contained /\<shortname=/ nextgroup=fsOptionsVfatShortname
|
||||
syn keyword fsOptionsVfatShortname contained lower win95 winnt mixed
|
||||
syn match fsOptionsKeywords contained /\<nfs=/ nextgroup=fsOptionsVfatNfs
|
||||
syn keyword fsOptionsVfatNfs contained stale_rw nostale_ro
|
||||
syn match fsOptionsKeywords contained /\<\%(tz\|dos1xfloppy\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(allow_utime\|codepage\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<time_offset=/ nextgroup=fsOptionsNumberSigned
|
||||
syn keyword fsOptionsKeywords contained nonumtail posix utf8 usefree flush rodir
|
||||
|
||||
" Options: xfs
|
||||
syn match fsOptionsKeywords contained /\%(biosize\|logbufs\|logbsize\|logdev\|rtdev\|sunit\|swidth\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained dmapi xdsm noalign noatime noquota norecovery osyncisdsync quota usrquota uqnoenforce grpquota gqnoenforce
|
||||
syn match fsOptionsKeywords contained /\<logbufs=/ nextgroup=fsOptionsXfsLogBufs
|
||||
syn keyword fsOptionsXfsLogBufs contained 2 3 4 5 6 7 8
|
||||
syn match fsOptionsKeywords contained /\%(allocsize\|biosize\|logbsize\|logdev\|rtdev\|sunit\|swidth\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained dmapi xdsm noalign noatime noquota norecovery osyncisdsync quota usrquota uqnoenforce grpquota gqnoenforce attr2 noattr2 filestreams ikeep noikeep inode32 inode64 largeio nolargeio nouuid uquota qnoenforce gquota pquota pqnoenforce swalloc wsync
|
||||
|
||||
" Frequency / Pass No.
|
||||
syn cluster fsFreqPassCluster contains=fsFreqPassNumber,fsFreqPassError
|
||||
@@ -257,31 +420,71 @@ hi def link fsMountPointError Error
|
||||
hi def link fsMountPointKeyword Keyword
|
||||
hi def link fsFreqPassError Error
|
||||
|
||||
hi def link fsOptionsBtrfsDiscard String
|
||||
hi def link fsOptionsBtrfsFatalErrors String
|
||||
hi def link fsOptionsBtrfsFragment String
|
||||
hi def link fsOptionsCache String
|
||||
hi def link fsOptionsCephRecoverSession String
|
||||
hi def link fsOptionsConv String
|
||||
hi def link fsOptionsDax String
|
||||
hi def link fsOptionsEroCacheStrategy String
|
||||
hi def link fsOptionsErrors String
|
||||
hi def link fsOptionsExt2Check String
|
||||
hi def link fsOptionsExt3Data String
|
||||
hi def link fsOptionsExt3DataErr String
|
||||
hi def link fsOptionsExt3Journal String
|
||||
hi def link fsOptionsExt3Jqfmt String
|
||||
hi def link fsOptionsExt4Data String
|
||||
hi def link fsOptionsExt4Journal String
|
||||
hi def link fsOptionsExt4JournalIoprio Number
|
||||
hi def link fsOptionsF2fsActiveLogs Number
|
||||
hi def link fsOptionsF2fsAllocMode String
|
||||
hi def link fsOptionsF2fsBackgroundGc String
|
||||
hi def link fsOptionsF2fsCompressMode String
|
||||
hi def link fsOptionsF2fsDiscardUnit String
|
||||
hi def link fsOptionsF2fsFsyncMode String
|
||||
hi def link fsOptionsF2fsMemory String
|
||||
hi def link fsOptionsFatCheck String
|
||||
hi def link fsOptionsFatType Number
|
||||
hi def link fsOptionsGeneral Type
|
||||
hi def link fsOptionsGfs2Quota String
|
||||
hi def link fsOptionsHpfsCase String
|
||||
hi def link fsOptionsHpfsChkdsk String
|
||||
hi def link fsOptionsHpfsEas String
|
||||
hi def link fsOptionsIsoMap String
|
||||
hi def link fsOptionsKeywords Keyword
|
||||
hi def link fsOptionsNfsLocalLock String
|
||||
hi def link fsOptionsNfsLookupCache String
|
||||
hi def link fsOptionsNilfs2Order String
|
||||
hi def link fsOptionsNtfsMftZoneMultiplier Number
|
||||
hi def link fsOptionsNumber Number
|
||||
hi def link fsOptionsNumberOctal Number
|
||||
hi def link fsOptionsString String
|
||||
hi def link fsOptionsSize Number
|
||||
hi def link fsOptionsExt2Check String
|
||||
hi def link fsOptionsExt2Errors String
|
||||
hi def link fsOptionsExt3Journal String
|
||||
hi def link fsOptionsExt3Data String
|
||||
hi def link fsOptionsExt4Journal String
|
||||
hi def link fsOptionsExt4Data String
|
||||
hi def link fsOptionsExt4Barrier Number
|
||||
hi def link fsOptionsFatCheck String
|
||||
hi def link fsOptionsConv String
|
||||
hi def link fsOptionsFatType Number
|
||||
hi def link fsOptionsYesNo String
|
||||
hi def link fsOptionsHpfsCase String
|
||||
hi def link fsOptionsIsoMap String
|
||||
hi def link fsOptionsNumberSigned Number
|
||||
hi def link fsOptionsOcfs2Coherency String
|
||||
hi def link fsOptionsOcfs2ResvLevel Number
|
||||
hi def link fsOptionsOverlayRedirectDir String
|
||||
hi def link fsOptionsQnx4Bitmap String
|
||||
hi def link fsOptionsQnx6Hold String
|
||||
hi def link fsOptionsQnx6Sync String
|
||||
hi def link fsOptionsReiserHash String
|
||||
hi def link fsOptionsSecurityMode String
|
||||
hi def link fsOptionsSize Number
|
||||
hi def link fsOptionsSshYesNoAsk String
|
||||
hi def link fsOptionsUfsType String
|
||||
hi def link fsOptionsString String
|
||||
hi def link fsOptionsTmpfsHuge String
|
||||
hi def link fsOptionsUfsError String
|
||||
|
||||
hi def link fsOptionsUfsType String
|
||||
hi def link fsOptionsV9Debug String
|
||||
hi def link fsOptionsV9Trans String
|
||||
hi def link fsOptionsV9Version String
|
||||
hi def link fsOptionsVfatNfs String
|
||||
hi def link fsOptionsVfatShortname String
|
||||
hi def link fsOptionsXfsLogBufs Number
|
||||
|
||||
hi def link fsOptionsTrueFalse Boolean
|
||||
hi def link fsOptionsYesNo String
|
||||
hi def link fsOptionsYN String
|
||||
hi def link fsOptions01 Number
|
||||
|
||||
let b:current_syntax = "fstab"
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: gpg(1) configuration file
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2010-10-14
|
||||
" Language: gpg(1) configuration file
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2010-10-14
|
||||
" Updated: 2023-01-23 @ObserverOfTime: added a couple of keywords
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -12,91 +13,92 @@ set cpo&vim
|
||||
|
||||
setlocal iskeyword+=-
|
||||
|
||||
syn keyword gpgTodo contained FIXME TODO XXX NOTE
|
||||
syn keyword gpgTodo contained FIXME TODO XXX NOTE
|
||||
|
||||
syn region gpgComment contained display oneline start='#' end='$'
|
||||
\ contains=gpgTodo,gpgID,@Spell
|
||||
syn region gpgComment contained display oneline start='#' end='$'
|
||||
\ contains=gpgTodo,gpgID,@Spell
|
||||
|
||||
syn match gpgID contained display '\<\(0x\)\=\x\{8,}\>'
|
||||
syn match gpgID contained display '\<\(0x\)\=\x\{8,}\>'
|
||||
|
||||
syn match gpgBegin display '^' skipwhite nextgroup=gpgComment,gpgOption,gpgCommand
|
||||
syn match gpgBegin display '^' skipwhite nextgroup=gpgComment,gpgOption,gpgCommand
|
||||
|
||||
syn keyword gpgCommand contained skipwhite nextgroup=gpgArg
|
||||
\ check-sigs decrypt decrypt-files delete-key
|
||||
\ delete-secret-and-public-key delete-secret-key
|
||||
\ edit-key encrypt-files export export-all
|
||||
\ export-ownertrust export-secret-keys
|
||||
\ export-secret-subkeys fast-import fingerprint
|
||||
\ gen-prime gen-random import import-ownertrust
|
||||
\ list-keys list-public-keys list-secret-keys
|
||||
\ list-sigs lsign-key nrsign-key print-md print-mds
|
||||
\ recv-keys search-keys send-keys sign-key verify
|
||||
\ verify-files
|
||||
syn keyword gpgCommand contained skipwhite nextgroup=gpgArgError
|
||||
\ check-trustdb clearsign desig-revoke detach-sign
|
||||
\ encrypt gen-key gen-revoke help list-packets
|
||||
\ rebuild-keydb-caches sign store symmetric
|
||||
\ update-trustdb version warranty
|
||||
syn keyword gpgCommand contained skipwhite nextgroup=gpgArg
|
||||
\ check-sigs decrypt decrypt-files delete-key
|
||||
\ delete-secret-and-public-key delete-secret-key
|
||||
\ edit-key encrypt-files export export-all
|
||||
\ export-ownertrust export-secret-keys
|
||||
\ export-secret-subkeys fast-import fingerprint
|
||||
\ gen-prime gen-random import import-ownertrust
|
||||
\ list-keys list-public-keys list-secret-keys
|
||||
\ list-sigs lsign-key nrsign-key print-md print-mds
|
||||
\ recv-keys search-keys send-keys sign-key verify
|
||||
\ verify-files
|
||||
syn keyword gpgCommand contained skipwhite nextgroup=gpgArgError
|
||||
\ check-trustdb clearsign desig-revoke detach-sign
|
||||
\ encrypt gen-key gen-revoke help list-packets
|
||||
\ rebuild-keydb-caches sign store symmetric
|
||||
\ update-trustdb version warranty
|
||||
|
||||
syn keyword gpgOption contained skipwhite nextgroup=gpgArg
|
||||
\ attribute-fd cert-digest-algo charset cipher-algo
|
||||
\ command-fd comment completes-needed compress
|
||||
\ compress-algo debug default-cert-check-level
|
||||
\ default-key default-preference-list
|
||||
\ default-recipient digest-algo disable-cipher-algo
|
||||
\ disable-pubkey-algo encrypt-to exec-path
|
||||
\ export-options group homedir import-options
|
||||
\ keyring keyserver keyserver-options load-extension
|
||||
\ local-user logger-fd marginals-needed max-cert-depth
|
||||
\ notation-data options output override-session-key
|
||||
\ passphrase-fd personal-cipher-preferences
|
||||
\ personal-compress-preferences
|
||||
\ personal-digest-preferences photo-viewer
|
||||
\ recipient s2k-cipher-algo s2k-digest-algo s2k-mode
|
||||
\ secret-keyring set-filename set-policy-url status-fd
|
||||
\ trusted-key verify-options keyid-format list-options
|
||||
syn keyword gpgOption contained skipwhite nextgroup=gpgArgError
|
||||
\ allow-freeform-uid allow-non-selfsigned-uid
|
||||
\ allow-secret-key-import always-trust
|
||||
\ armor ask-cert-expire ask-sig-expire
|
||||
\ auto-check-trustdb batch debug-all default-comment
|
||||
\ default-recipient-self dry-run emit-version
|
||||
\ emulate-md-encode-bug enable-special-filenames
|
||||
\ escape-from-lines expert fast-list-mode
|
||||
\ fixed-list-mode for-your-eyes-only
|
||||
\ force-mdc force-v3-sigs force-v4-certs
|
||||
\ gpg-agent-info ignore-crc-error ignore-mdc-error
|
||||
\ ignore-time-conflict ignore-valid-from interactive
|
||||
\ list-only lock-multiple lock-never lock-once
|
||||
\ merge-only no no-allow-non-selfsigned-uid
|
||||
\ no-armor no-ask-cert-expire no-ask-sig-expire
|
||||
\ no-auto-check-trustdb no-batch no-comment
|
||||
\ no-default-keyring no-default-recipient
|
||||
\ no-encrypt-to no-expensive-trust-checks
|
||||
\ no-expert no-for-your-eyes-only no-force-v3-sigs
|
||||
\ no-force-v4-certs no-greeting no-literal
|
||||
\ no-mdc-warning no-options no-permission-warning
|
||||
\ no-pgp2 no-pgp6 no-pgp7 no-random-seed-file
|
||||
\ no-secmem-warning no-show-notation no-show-photos
|
||||
\ no-show-policy-url no-sig-cache no-sig-create-check
|
||||
\ no-sk-comments no-tty no-utf8-strings no-verbose
|
||||
\ no-version not-dash-escaped openpgp pgp2
|
||||
\ pgp6 pgp7 preserve-permissions quiet rfc1991
|
||||
\ set-filesize show-keyring show-notation show-photos
|
||||
\ show-policy-url show-session-key simple-sk-checksum
|
||||
\ sk-comments skip-verify textmode throw-keyid
|
||||
\ try-all-secrets use-agent use-embedded-filename
|
||||
\ utf8-strings verbose with-colons with-fingerprint
|
||||
\ with-key-data yes
|
||||
syn keyword gpgOption contained skipwhite nextgroup=gpgArg
|
||||
\ attribute-fd cert-digest-algo charset cipher-algo
|
||||
\ command-fd comment completes-needed compress
|
||||
\ compress-algo debug default-cert-check-level
|
||||
\ default-key default-preference-list
|
||||
\ default-recipient digest-algo disable-cipher-algo
|
||||
\ disable-pubkey-algo encrypt-to exec-path
|
||||
\ export-options group homedir import-options
|
||||
\ keyring keyserver keyserver-options load-extension
|
||||
\ local-user logger-fd marginals-needed max-cert-depth
|
||||
\ notation-data options output override-session-key
|
||||
\ passphrase-fd personal-cipher-preferences
|
||||
\ personal-compress-preferences
|
||||
\ personal-digest-preferences photo-viewer
|
||||
\ recipient s2k-cipher-algo s2k-digest-algo s2k-mode
|
||||
\ secret-keyring set-filename set-policy-url status-fd
|
||||
\ trusted-key verify-options keyid-format list-options
|
||||
\ default-new-key-algo weak-digest
|
||||
syn keyword gpgOption contained skipwhite nextgroup=gpgArgError
|
||||
\ allow-freeform-uid allow-non-selfsigned-uid
|
||||
\ allow-secret-key-import always-trust
|
||||
\ armor ask-cert-expire ask-sig-expire
|
||||
\ auto-check-trustdb batch debug-all default-comment
|
||||
\ default-recipient-self dry-run emit-version
|
||||
\ emulate-md-encode-bug enable-special-filenames
|
||||
\ escape-from-lines expert fast-list-mode
|
||||
\ fixed-list-mode for-your-eyes-only
|
||||
\ force-mdc force-v3-sigs force-v4-certs
|
||||
\ gpg-agent-info ignore-crc-error ignore-mdc-error
|
||||
\ ignore-time-conflict ignore-valid-from interactive
|
||||
\ list-only lock-multiple lock-never lock-once
|
||||
\ merge-only no no-allow-non-selfsigned-uid
|
||||
\ no-armor no-ask-cert-expire no-ask-sig-expire
|
||||
\ no-auto-check-trustdb no-batch no-comment
|
||||
\ no-default-keyring no-default-recipient
|
||||
\ no-encrypt-to no-expensive-trust-checks
|
||||
\ no-expert no-for-your-eyes-only no-force-v3-sigs
|
||||
\ no-force-v4-certs no-greeting no-literal
|
||||
\ no-mdc-warning no-options no-permission-warning
|
||||
\ no-pgp2 no-pgp6 no-pgp7 no-random-seed-file
|
||||
\ no-secmem-warning no-show-notation no-show-photos
|
||||
\ no-show-policy-url no-sig-cache no-sig-create-check
|
||||
\ no-sk-comments no-tty no-utf8-strings no-verbose
|
||||
\ no-version not-dash-escaped openpgp pgp2
|
||||
\ pgp6 pgp7 preserve-permissions quiet rfc1991
|
||||
\ set-filesize show-keyring show-notation show-photos
|
||||
\ show-policy-url show-session-key simple-sk-checksum
|
||||
\ sk-comments skip-verify textmode throw-keyid
|
||||
\ try-all-secrets use-agent use-embedded-filename
|
||||
\ utf8-strings verbose with-colons with-fingerprint
|
||||
\ with-key-data yes
|
||||
|
||||
syn match gpgArg contained display '\S\+\(\s\+\S\+\)*' contains=gpgID
|
||||
syn match gpgArg contained display '\S\+\(\s\+\S\+\)*' contains=gpgID
|
||||
syn match gpgArgError contained display '\S\+\(\s\+\S\+\)*'
|
||||
|
||||
hi def link gpgComment Comment
|
||||
hi def link gpgTodo Todo
|
||||
hi def link gpgID Number
|
||||
hi def link gpgOption Keyword
|
||||
hi def link gpgCommand Error
|
||||
hi def link gpgComment Comment
|
||||
hi def link gpgTodo Todo
|
||||
hi def link gpgID Number
|
||||
hi def link gpgOption Keyword
|
||||
hi def link gpgCommand Error
|
||||
hi def link gpgArgError Error
|
||||
|
||||
let b:current_syntax = "gpg"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: hg (Mercurial) commit file
|
||||
" Language: hg/sl (Mercurial / Sapling) commit file
|
||||
" Maintainer: Ken Takata <kentkt at csc dot jp>
|
||||
" Last Change: 2012 Aug 23
|
||||
" Filenames: hg-editor-*.txt
|
||||
" Max Coplan <mchcopl@gmail.com>
|
||||
" Last Change: 2022-12-08
|
||||
" License: VIM License
|
||||
" URL: https://github.com/k-takata/hg-vim
|
||||
|
||||
@@ -10,12 +10,15 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match hgcommitComment "^HG:.*$" contains=@NoSpell
|
||||
syn match hgcommitUser "^HG: user: \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitBranch "^HG: branch \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitAdded "^HG: \zsadded .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitChanged "^HG: \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitRemoved "^HG: \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitComment "^\%(SL\|HG\): .*$" contains=@NoSpell
|
||||
syn match hgcommitUser "^\%(SL\|HG\): user: \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitBranch "^\%(SL\|HG\): branch \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitAdded "^\%(SL\|HG\): \zsadded .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitChanged "^\%(SL\|HG\): \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitRemoved "^\%(SL\|HG\): \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
|
||||
syn region hgcommitDiff start=/\%(^\(SL\|HG\): diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@hgcommitDiff
|
||||
syn include @hgcommitDiff syntax/shared/hgcommitDiff.vim
|
||||
|
||||
hi def link hgcommitComment Comment
|
||||
hi def link hgcommitUser String
|
||||
|
||||
31
runtime/syntax/lc.vim
Normal file
31
runtime/syntax/lc.vim
Normal file
@@ -0,0 +1,31 @@
|
||||
" Vim syntax file
|
||||
" Language: Elsa
|
||||
" Maintainer: Miles Glapa-Grossklag <miles@glapa-grossklag.com>
|
||||
" Last Change: 2023-01-29
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Keywords
|
||||
syntax keyword elsaKeyword let eval
|
||||
syntax match elsaKeyword "\v:"
|
||||
highlight link elsaKeyword Keyword
|
||||
|
||||
" Comments
|
||||
setlocal commentstring=--%s
|
||||
syntax match elsaComment "\v--.*$"
|
||||
highlight link elsaComment Comment
|
||||
|
||||
" Operators
|
||||
syntax match elsaOperator "\v\="
|
||||
syntax match elsaOperator "\v\=[abd*~]\>"
|
||||
syntax match elsaOperator "\v-\>"
|
||||
syntax match elsaOperator "\v\\"
|
||||
highlight link elsaOperator Operator
|
||||
|
||||
" Definitions
|
||||
syntax match elsaConstant "\v[A-Z]+[A-Z_0-9]*"
|
||||
highlight link elsaConstant Constant
|
||||
|
||||
let b:current_syntax = 'elsa'
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: nginx.conf
|
||||
" Maintainer: Chris Aumann <me@chr4.org>
|
||||
" Last Change: Apr 15, 2017
|
||||
" Last Change: Jan 25, 2023
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -84,6 +84,8 @@ syn keyword ngxListenOptions default_server contained
|
||||
syn keyword ngxListenOptions ssl contained
|
||||
syn keyword ngxListenOptions http2 contained
|
||||
syn keyword ngxListenOptions spdy contained
|
||||
syn keyword ngxListenOptions http3 contained
|
||||
syn keyword ngxListenOptions quic contained
|
||||
syn keyword ngxListenOptions proxy_protocol contained
|
||||
syn keyword ngxListenOptions setfib contained
|
||||
syn keyword ngxListenOptions fastopen contained
|
||||
@@ -265,8 +267,16 @@ syn keyword ngxDirective http2_max_concurrent_streams
|
||||
syn keyword ngxDirective http2_max_field_size
|
||||
syn keyword ngxDirective http2_max_header_size
|
||||
syn keyword ngxDirective http2_max_requests
|
||||
syn keyword ngxDirective http2_push
|
||||
syn keyword ngxDirective http2_push_preload
|
||||
syn keyword ngxDirective http2_recv_buffer_size
|
||||
syn keyword ngxDirective http2_recv_timeout
|
||||
syn keyword ngxDirective http3_hq
|
||||
syn keyword ngxDirective http3_max_concurrent_pushes
|
||||
syn keyword ngxDirective http3_max_concurrent_streams
|
||||
syn keyword ngxDirective http3_push
|
||||
syn keyword ngxDirective http3_push_preload
|
||||
syn keyword ngxDirective http3_stream_buffer_size
|
||||
syn keyword ngxDirective if_modified_since
|
||||
syn keyword ngxDirective ignore_invalid_headers
|
||||
syn keyword ngxDirective image_filter
|
||||
@@ -444,6 +454,10 @@ syn keyword ngxDirective proxy_temp_path
|
||||
syn keyword ngxDirective proxy_timeout
|
||||
syn keyword ngxDirective proxy_upload_rate
|
||||
syn keyword ngxDirective queue
|
||||
syn keyword ngxDirective quic_gso
|
||||
syn keyword ngxDirective quic_host_key
|
||||
syn keyword ngxDirective quic_mtu
|
||||
syn keyword ngxDirective quic_retry
|
||||
syn keyword ngxDirective random_index
|
||||
syn keyword ngxDirective read_ahead
|
||||
syn keyword ngxDirective real_ip_header
|
||||
@@ -545,8 +559,10 @@ syn keyword ngxDirective ssl_certificate
|
||||
syn keyword ngxDirective ssl_certificate_key
|
||||
syn keyword ngxDirective ssl_ciphers
|
||||
syn keyword ngxDirective ssl_client_certificate
|
||||
syn keyword ngxDirective ssl_conf_command
|
||||
syn keyword ngxDirective ssl_crl
|
||||
syn keyword ngxDirective ssl_dhparam
|
||||
syn keyword ngxDirective ssl_early_data
|
||||
syn keyword ngxDirective ssl_ecdh_curve
|
||||
syn keyword ngxDirective ssl_engine
|
||||
syn keyword ngxDirective ssl_handshake_timeout
|
||||
@@ -556,6 +572,7 @@ syn keyword ngxSSLPreferServerCiphersOn on contained
|
||||
syn keyword ngxSSLPreferServerCiphersOff off contained
|
||||
syn keyword ngxDirective ssl_preread
|
||||
syn keyword ngxDirective ssl_protocols nextgroup=ngxSSLProtocol,ngxSSLProtocolDeprecated skipwhite
|
||||
syn keyword ngxDirective ssl_reject_handshake
|
||||
syn match ngxSSLProtocol 'TLSv1' contained nextgroup=ngxSSLProtocol,ngxSSLProtocolDeprecated skipwhite
|
||||
syn match ngxSSLProtocol 'TLSv1\.1' contained nextgroup=ngxSSLProtocol,ngxSSLProtocolDeprecated skipwhite
|
||||
syn match ngxSSLProtocol 'TLSv1\.2' contained nextgroup=ngxSSLProtocol,ngxSSLProtocolDeprecated skipwhite
|
||||
@@ -622,6 +639,7 @@ syn keyword ngxDirective uwsgi_buffering
|
||||
syn keyword ngxDirective uwsgi_buffers
|
||||
syn keyword ngxDirective uwsgi_busy_buffers_size
|
||||
syn keyword ngxDirective uwsgi_cache
|
||||
syn keyword ngxDirective uwsgi_cache_background_update
|
||||
syn keyword ngxDirective uwsgi_cache_bypass
|
||||
syn keyword ngxDirective uwsgi_cache_key
|
||||
syn keyword ngxDirective uwsgi_cache_lock
|
||||
@@ -2225,6 +2243,19 @@ syn keyword ngxDirectiveThirdParty xss_override_status
|
||||
syn keyword ngxDirectiveThirdParty xss_check_status
|
||||
syn keyword ngxDirectiveThirdParty xss_input_types
|
||||
|
||||
" CT Module <https://github.com/grahamedgecombe/nginx-ct>
|
||||
" Certificate Transparency module for nginx
|
||||
syn keyword ngxDirectiveThirdParty ssl_ct
|
||||
syn keyword ngxDirectiveThirdParty ssl_ct_static_scts
|
||||
|
||||
" Dynamic TLS records patch <https://github.com/cloudflare/sslconfig/blob/master/patches/nginx__dynamic_tls_records.patch>
|
||||
" TLS Dynamic Record Resizing
|
||||
syn keyword ngxDirectiveThirdParty ssl_dyn_rec_enable
|
||||
syn keyword ngxDirectiveThirdParty ssl_dyn_rec_size_hi
|
||||
syn keyword ngxDirectiveThirdParty ssl_dyn_rec_size_lo
|
||||
syn keyword ngxDirectiveThirdParty ssl_dyn_rec_threshold
|
||||
syn keyword ngxDirectiveThirdParty ssl_dyn_rec_timeout
|
||||
|
||||
" ZIP Module <https://www.nginx.com/resources/wiki/modules/zip/>
|
||||
" ZIP archiver for nginx
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: shell (sh) Korn shell (ksh) bash (sh)
|
||||
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
||||
" Last Change: Nov 25, 2022
|
||||
" Version: 204
|
||||
" Last Change: Dec 20, 2022
|
||||
" Version: 205
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
|
||||
" For options and settings, please use: :help ft-sh-syntax
|
||||
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) and heredoc fixes from Felipe Contreras
|
||||
@@ -190,8 +190,10 @@ syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" ski
|
||||
" =====
|
||||
if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
|
||||
syn match shStatement "\<alias\>"
|
||||
syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`"
|
||||
syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="="
|
||||
syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]*\)\@=" skip="\\$" end="\>\|`"
|
||||
syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]*=\)\@=" skip="\\$" end="="
|
||||
" syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`"
|
||||
" syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="="
|
||||
|
||||
" Touch: {{{1
|
||||
" =====
|
||||
@@ -333,7 +335,7 @@ syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' nextgroup=shComment
|
||||
" systems too, however, so the following syntax will flag $(..) as
|
||||
" an Error under /bin/sh. By consensus of vimdev'ers!
|
||||
if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
|
||||
syn region shCommandSub matchgroup=shCmdSubRegion start="\$(\ze[^(]" skip='\\\\\|\\.' end=")" contains=@shCommandSubList
|
||||
syn region shCommandSub matchgroup=shCmdSubRegion start="\$(\ze[^(]\|$" skip='\\\\\|\\.' end=")" contains=@shCommandSubList
|
||||
syn region shArithmetic matchgroup=shArithRegion start="\$((" skip='\\\\\|\\.' end="))" contains=@shArithList
|
||||
syn region shArithmetic matchgroup=shArithRegion start="\$\[" skip='\\\\\|\\.' end="\]" contains=@shArithList
|
||||
syn match shSkipInitWS contained "^\s\+"
|
||||
@@ -483,7 +485,9 @@ endif
|
||||
|
||||
" Parameter Dereferencing: {{{1
|
||||
" ========================
|
||||
if !exists("g:sh_no_error") && !(exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix"))
|
||||
" Note: sh04 failure with following line
|
||||
"if !exists("g:sh_no_error") && !(exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix"))
|
||||
if !exists("g:sh_no_error")
|
||||
syn match shDerefWordError "[^}$[~]" contained
|
||||
endif
|
||||
syn match shDerefSimple "\$\%(\h\w*\|\d\)" nextgroup=@shNoZSList
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
This directory "runtime/syntax/shared" contains Vim script files that are
|
||||
generated or used by more then one syntax file.
|
||||
generated or used by more than one syntax file.
|
||||
|
||||
390
runtime/syntax/shared/hgcommitDiff.vim
Normal file
390
runtime/syntax/shared/hgcommitDiff.vim
Normal file
@@ -0,0 +1,390 @@
|
||||
" Vim syntax file
|
||||
" Language: Sapling / Mecurial Diff (context or unified)
|
||||
" Maintainer: Max Coplan <mchcopl@gmail.com>
|
||||
" Translations by Jakson Alves de Aquino.
|
||||
" Last Change: 2022-12-08
|
||||
" Copied from: runtime/syntax/diff.vim
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
scriptencoding utf-8
|
||||
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Only in .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Files .* and .* are identical$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Files .* and .* differ$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binary files .* and .* differ$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): File .* is a .* while file .* is a .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ No newline at end of file .*"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Common subdirectories: .*"
|
||||
|
||||
" Disable the translations by setting diff_translations to zero.
|
||||
if !exists("diff_translations") || diff_translations
|
||||
|
||||
" ca
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Només a .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Els fitxers .* i .* són idèntics$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Els fitxers .* i .* difereixen$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Els fitxers .* i .* difereixen$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): El fitxer .* és un .* mentre que el fitxer .* és un .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ No hi ha cap caràcter de salt de línia al final del fitxer"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Subdirectoris comuns: .* i .*"
|
||||
|
||||
" cs
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Pouze v .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Soubory .* a .* jsou identické$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Soubory .* a .* jsou různé$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binární soubory .* a .* jsou rozdílné$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Soubory .* a .* jsou různé$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Soubor .* je .* pokud soubor .* je .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Chybí znak konce řádku na konci souboru"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Společné podadresáře: .* a .*"
|
||||
|
||||
" da
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Kun i .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Filerne .* og .* er identiske$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Filerne .* og .* er forskellige$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binære filer .* og .* er forskellige$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Filen .* er en .* mens filen .* er en .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Intet linjeskift ved filafslutning"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Identiske underkataloger: .* og .*"
|
||||
|
||||
" de
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Nur in .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Dateien .* und .* sind identisch.$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Dateien .* und .* sind verschieden.$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binärdateien .* and .* sind verschieden.$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binärdateien .* und .* sind verschieden.$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Datei .* ist ein .* während Datei .* ein .* ist.$"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Kein Zeilenumbruch am Dateiende."
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Gemeinsame Unterverzeichnisse: .* und .*.$"
|
||||
|
||||
" el
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Μόνο στο .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Τα αρχεία .* καί .* είναι πανομοιότυπα$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Τα αρχεία .* και .* διαφέρουν$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Τα αρχεία .* και .* διαφέρουν$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Το αρχείο .* είναι .* ενώ το αρχείο .* είναι .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Δεν υπάρχει χαρακτήρας νέας γραμμής στο τέλος του αρχείου"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Οι υποκατάλογοι .* και .* είναι ταυτόσημοι$"
|
||||
|
||||
" eo
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Nur en .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Dosieroj .* kaj .* estas samaj$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Dosieroj .* kaj .* estas malsamaj$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Dosieroj .* kaj .* estas malsamaj$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Dosiero .* estas .*, dum dosiero .* estas .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Mankas linifino ĉe fino de dosiero"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Komunaj subdosierujoj: .* kaj .*"
|
||||
|
||||
" es
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Sólo en .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Los ficheros .* y .* son idénticos$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Los ficheros .* y .* son distintos$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Los ficheros binarios .* y .* son distintos$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): El fichero .* es un .* mientras que el .* es un .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ No hay ningún carácter de nueva línea al final del fichero"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Subdirectorios comunes: .* y .*"
|
||||
|
||||
" fi
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Vain hakemistossa .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Tiedostot .* ja .* ovat identtiset$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Tiedostot .* ja .* eroavat$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binääritiedostot .* ja .* eroavat$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Tiedosto .* on .*, kun taas tiedosto .* on .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Ei rivinvaihtoa tiedoston lopussa"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Yhteiset alihakemistot: .* ja .*"
|
||||
|
||||
" fr
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Seulement dans .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Les fichiers .* et .* sont identiques.*"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Les fichiers .* et .* sont différents.*"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Les fichiers binaires .* et .* sont différents.*"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Le fichier .* est un .* alors que le fichier .* est un .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Pas de fin de ligne à la fin du fichier.*"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Les sous-répertoires .* et .* sont identiques.*"
|
||||
|
||||
" ga
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): I .* amháin: .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Is comhionann iad na comhaid .* agus .*"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Tá difríocht idir na comhaid .* agus .*"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Tá difríocht idir na comhaid .* agus .*"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Tá comhad .* ina .* ach tá comhad .* ina .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Gan líne nua ag an chomhadchríoch"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Fochomhadlanna i gcoitianta: .* agus .*"
|
||||
|
||||
" gl
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Só en .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Os ficheiros .* e .* son idénticos$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Os ficheiros .* e .* son diferentes$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Os ficheiros binarios .* e .* son diferentes$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): O ficheiro .* é un .* mentres que o ficheiro .* é un .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Non hai un salto de liña na fin da liña"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Subdirectorios comúns: .* e .*"
|
||||
|
||||
" he
|
||||
" ^\%(SL\|HG\): .* are expansive patterns for long lines, so disabled unless we can match
|
||||
" some specific hebrew chars
|
||||
if search('\%u05d5\|\%u05d1', 'nw', '', 100)
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): .*-ב קר אצמנ .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): םיהז םניה .*-ו .* םיצבקה$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): הזמ הז םינוש `.*'-ו `.*' םיצבקה$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): הזמ הז םינוש `.*'-ו `.*' םיירניב םיצבק$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): .* .*-ל .* .* תוושהל ןתינ אל$"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ ץבוקה ףוסב השד.-הרוש ות רס."
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): .*-ו .* :תוהז תויקית-תת$"
|
||||
endif
|
||||
|
||||
" hr
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Samo u .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Datoteke .* i .* su identične$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Datoteke .* i .* se razlikuju$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binarne datoteke .* i .* se razlikuju$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Datoteka .* je .*, a datoteka .* je .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nema novog retka na kraju datoteke"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Uobičajeni poddirektoriji: .* i .*"
|
||||
|
||||
" hu
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Csak .* -ben: .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): .* és .* fájlok azonosak$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): A(z) .* és a(z) .* fájlok különböznek$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): A(z) .* és a(z) .* fájlok különböznek$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): A(z) .* fájl egy .*, viszont a(z) .* fájl egy .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nincs újsor a fájl végén"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Közös alkönyvtárak: .* és .*"
|
||||
|
||||
" id
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Hanya dalam .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): File .* dan .* identik$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Berkas .* dan .* berbeda$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): File biner .* dan .* berbeda$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): File .* adalah .* sementara file .* adalah .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Tidak ada baris-baru di akhir dari berkas"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Subdirektori sama: .* dan .*"
|
||||
|
||||
" it
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Solo in .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): I file .* e .* sono identici$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): I file .* e .* sono diversi$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): I file .* e .* sono diversi$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): I file binari .* e .* sono diversi$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): File .* è un .* mentre file .* è un .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Manca newline alla fine del file"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Sottodirectory in comune: .* e .*"
|
||||
|
||||
" ja
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): .*だけに発見: .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): ファイル.*と.*は同一$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): ファイル.*と.*は違います$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): バイナリー・ファイル.*と.*は違います$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): ファイル.*は.*、ファイル.*は.*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ ファイル末尾に改行がありません"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): 共通の下位ディレクトリー: .*と.*"
|
||||
|
||||
" ja DiffUtils 3.3
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): .* のみに存在: .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): ファイル .* と .* は同一です$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): ファイル .* と .* は異なります$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): バイナリーファイル .* と.* は異なります$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): ファイル .* は .* です。一方、ファイル .* は .* です$"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ ファイル末尾に改行がありません"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): 共通のサブディレクトリー: .* と .*"
|
||||
|
||||
" lv
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Tikai iekš .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Fails .* un .* ir identiski$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Faili .* un .* atšķiras$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Faili .* un .* atšķiras$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binārie faili .* un .* atšķiras$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Fails .* ir .* kamēr fails .* ir .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nav jaunu rindu faila beigās"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Kopējās apakšdirektorijas: .* un .*"
|
||||
|
||||
" ms
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Hanya dalam .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Fail .* dan .* adalah serupa$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Fail .* dan .* berbeza$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Fail .* dan .* berbeza$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Fail .* adalah .* manakala fail .* adalah .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Tiada baris baru pada penghujung fail"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Subdirektori umum: .* dan .*"
|
||||
|
||||
" nl
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Alleen in .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Bestanden .* en .* zijn identiek$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Bestanden .* en .* zijn verschillend$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Bestanden .* en .* zijn verschillend$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binaire bestanden .* en .* zijn verschillend$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Bestand .* is een .* terwijl bestand .* een .* is$"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Geen regeleindeteken (LF) aan einde van bestand"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Gemeenschappelijke submappen: .* en .*"
|
||||
|
||||
" pl
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Tylko w .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Pliki .* i .* są identyczne$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Pliki .* i .* różnią się$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Pliki .* i .* różnią się$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binarne pliki .* i .* różnią się$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Plik .* jest .*, podczas gdy plik .* jest .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Brak znaku nowej linii na końcu pliku"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Wspólne podkatalogi: .* i .*"
|
||||
|
||||
" pt_BR
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Somente em .*"
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Apenas em .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Os aquivos .* e .* são idênticos$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Os arquivos .* e .* são diferentes$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Os arquivos binários .* e .* são diferentes$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): O arquivo .* é .* enquanto o arquivo .* é .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Falta o caracter nova linha no final do arquivo"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Subdiretórios idênticos: .* e .*"
|
||||
|
||||
" ro
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Doar în .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Fişierele .* şi .* sunt identice$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Fişierele .* şi .* diferă$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Fişierele binare .* şi .* diferă$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Fişierul .* este un .* pe când fişierul .* este un .*.$"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nici un element de linie nouă la sfârşitul fişierului"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Subdirectoare comune: .* şi .*.$"
|
||||
|
||||
" ru
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Только в .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Файлы .* и .* идентичны$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Файлы .* и .* различаются$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Файлы .* и .* различаются$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Файл .* это .*, тогда как файл .* -- .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ В конце файла нет новой строки"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Общие подкаталоги: .* и .*"
|
||||
|
||||
" sr
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Само у .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Датотеке „.*“ и „.*“ се подударају$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Датотеке .* и .* различите$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Бинарне датотеке .* и .* различите$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Датотека „.*“ је „.*“ док је датотека „.*“ „.*“$"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Без новог реда на крају датотеке"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Заједнички поддиректоријуми: .* и .*"
|
||||
|
||||
" sv
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Endast i .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Filerna .* och .* är lika$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Filerna .* och .* skiljer$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Filerna .* och .* skiljer$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Fil .* är en .* medan fil .* är en .*"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): De binära filerna .* och .* skiljer$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Filen .* är .* medan filen .* är .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Ingen nyrad vid filslut"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Lika underkataloger: .* och .*"
|
||||
|
||||
" tr
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Yalnızca .*'da: .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): .* ve .* dosyaları birbirinin aynı$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): .* ve .* dosyaları birbirinden farklı$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): .* ve .* dosyaları birbirinden farklı$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): İkili .* ve .* birbirinden farklı$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): .* dosyası, bir .*, halbuki .* dosyası bir .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Dosya sonunda yenisatır yok."
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Ortak alt dizinler: .* ve .*"
|
||||
|
||||
" uk
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Лише у .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Файли .* та .* ідентичні$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Файли .* та .* відрізняються$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Файли .* та .* відрізняються$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Двійкові файли .* та .* відрізняються$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Файл .* це .*, тоді як файл .* -- .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Наприкінці файлу немає нового рядка"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Спільні підкаталоги: .* та .*"
|
||||
|
||||
" vi
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Chỉ trong .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Hai tập tin .* và .* là bằng nhau.$"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Cả .* và .* là cùng một tập tin$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Hai tập tin .* và .* là khác nhau.$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Hai tập tin nhị phân .* và .* khác nhau$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Tập tin .* là một .* trong khi tập tin .* là một .*.$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Hai tập tin .* và .* là khác nhau.$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Tập tin .* là một .* còn tập tin .* là một .*.$"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Không có ký tự dòng mới tại kêt thức tập tin."
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Thư mục con chung: .* và .*"
|
||||
|
||||
" zh_CN
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): 只在 .* 存在:.*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): 檔案 .* 和 .* 相同$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): 文件 .* 和 .* 不同$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): 文件 .* 和 .* 不同$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): 文件 .* 是.*而文件 .* 是.*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ 文件尾没有 newline 字符"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): .* 和 .* 有共同的子目录$"
|
||||
|
||||
" zh_TW
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): 只在 .* 存在:.*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): 檔案 .* 和 .* 相同$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): 檔案 .* 與 .* 不同$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): 二元碼檔 .* 與 .* 不同$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): 檔案 .* 是.*而檔案 .* 是.*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ 檔案末沒有 newline 字元"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): .* 和 .* 有共同的副目錄$"
|
||||
|
||||
endif
|
||||
|
||||
|
||||
syn match hgDiffRemoved "^\%(SL\|HG\): -.*"
|
||||
syn match hgDiffRemoved "^\%(SL\|HG\): <.*"
|
||||
syn match hgDiffAdded "^\%(SL\|HG\): +.*"
|
||||
syn match hgDiffAdded "^\%(SL\|HG\): >.*"
|
||||
syn match hgDiffChanged "^\%(SL\|HG\): ! .*"
|
||||
|
||||
syn match hgDiffSubname " @@..*"ms=s+3 contained
|
||||
syn match hgDiffLine "^\%(SL\|HG\): @.*" contains=hgDiffSubname
|
||||
syn match hgDiffLine "^\%(SL\|HG\): \<\d\+\>.*"
|
||||
syn match hgDiffLine "^\%(SL\|HG\): \*\*\*\*.*"
|
||||
syn match hgDiffLine "^\%(SL\|HG\): ---$"
|
||||
|
||||
" Some versions of diff have lines like "#c#" and "#d#" (where # is a number)
|
||||
syn match hgDiffLine "^\%(SL\|HG\): \d\+\(,\d\+\)\=[cda]\d\+\>.*"
|
||||
|
||||
syn match hgDiffFile "^\%(SL\|HG\): diff\>.*"
|
||||
syn match hgDiffFile "^\%(SL\|HG\): Index: .*"
|
||||
syn match hgDiffFile "^\%(SL\|HG\): ==== .*"
|
||||
|
||||
if search('^\%(SL\|HG\): @@ -\S\+ +\S\+ @@', 'nw', '', 100)
|
||||
" unified
|
||||
syn match hgDiffOldFile "^\%(SL\|HG\): --- .*"
|
||||
syn match hgDiffNewFile "^\%(SL\|HG\): +++ .*"
|
||||
else
|
||||
" context / old style
|
||||
syn match hgDiffOldFile "^\%(SL\|HG\): \*\*\* .*"
|
||||
syn match hgDiffNewFile "^\%(SL\|HG\): --- .*"
|
||||
endif
|
||||
|
||||
" Used by git
|
||||
syn match hgDiffIndexLine "^\%(SL\|HG\): index \x\x\x\x.*"
|
||||
|
||||
syn match hgDiffComment "^\%(SL\|HG\): #.*"
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only used when an item doesn't have highlighting yet
|
||||
hi def link hgDiffOldFile hgDiffFile
|
||||
hi def link hgDiffNewFile hgDiffFile
|
||||
hi def link hgDiffIndexLine PreProc
|
||||
hi def link hgDiffFile Type
|
||||
hi def link hgDiffOnly Constant
|
||||
hi def link hgDiffIdentical Constant
|
||||
hi def link hgDiffDiffer Constant
|
||||
hi def link hgDiffBDiffer Constant
|
||||
hi def link hgDiffIsA Constant
|
||||
hi def link hgDiffNoEOL Constant
|
||||
hi def link hgDiffCommon Constant
|
||||
hi def link hgDiffRemoved Special
|
||||
hi def link hgDiffChanged PreProc
|
||||
hi def link hgDiffAdded Identifier
|
||||
hi def link hgDiffLine Statement
|
||||
hi def link hgDiffSubname PreProc
|
||||
hi def link hgDiffComment Comment
|
||||
|
||||
let b:current_syntax = "hgcommitDiff"
|
||||
|
||||
" vim: ts=8 sw=2
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: tpp - Text Presentation Program
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainer: Gerfried Fuchs <alfie@ist.org>
|
||||
" Last Change: 2018 Dec 27
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/master/syntax/tpp.vim
|
||||
" Last Change: 2023 Jan 16
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/tpp.vim
|
||||
" Filenames: *.tpp
|
||||
" License: BSD
|
||||
"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 9.0 script
|
||||
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" Last Change: December 06, 2022
|
||||
" Version: 9.0-14
|
||||
" Last Change: January 18, 2023
|
||||
" Version: 9.0-21
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
@@ -19,24 +19,25 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
|
||||
syn cluster vimCommentGroup contains=vimTodo,@Spell
|
||||
|
||||
" regular vim commands {{{2
|
||||
syn keyword vimCommand contained a ar[gs] argg[lobal] b[uffer] bf[irst] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec el[se] endfun eval f[ile] fina[lly] foldd[oopen] function h[elp] hi iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] sts[elect] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] v vie[w] vne[w] win[size] wq xmapc[lear] xr[estore]
|
||||
syn keyword vimCommand contained ab arga[dd] argl[ocal] ba[ll] bl[ast] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delel delfunction dif[fupdate] difft[his] dli[st] ds[earch] echoc[onsole] elsei[f] endfunc ex files fini[sh] folddoc[losed] go[to] ha[rdcopy] hid[e] if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes[sages] mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] py3f[ile] pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoremenu spelli[nfo] spr[evious] sri star[tinsert] substitutepattern sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] var vim9[cmd] vs[plit] winc[md] wqa[ll] xme xunme
|
||||
syn keyword vimCommand contained abc[lear] argd[elete] argu[ment] bad[d] bm[odified] breaka[dd] bun[load] cabc[lear] call cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delep dell diffg[et] dig[raphs] do dsp[lit] echoe[rr] em[enu] endfunction exi[t] filet fir[st] foldo[pen] gr[ep] helpc[lose] his[tory] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir smenu so[urce] spellr[are] sr srl startg[replace] substituterepeat sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type unl ve[rsion] vim9s[cript] wN[ext] windo wundo xmenu xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] argded[upe] as[cii] balt bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] class cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] deletel delm[arks] diffo[ff] dir doau e[dit] echom[sg] en[dif] endt[ry] exp filetype fix[del] for grepa[dd] helpf[ind] hor[izontal] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] sun[hide] sy tN[ext] tabe[dit] tabnew tc[d] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unlo[ckvar] verb[ose] vim[grep] w[rite] winp[os] wv[iminfo] xnoreme xwininfo
|
||||
syn keyword vimCommand contained addd argdo au bd[elete] bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletep delp diffp[atch] disa[ssemble] doaut ea echon enddef endw[hile] export filt[er] fo[ld] fun gui helpg[rep] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] leg[acy] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp stj[ump] sunme syn ta[g] tabf[ind] tabo[nly] tch[dir] tf[irst] tln tmapc[lear] try una[bbreviate] uns[ilent] vert[ical] vimgrepa[dd] wa[ll] wn[ext] x[it] xnoremenu y[ank]
|
||||
syn keyword vimCommand contained al[l] arge[dit] bN[ext] bel[owright] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletl dep diffpu[t] dj[ump] dp earlier echow[indow] endfo[r] ene[w] exu[sage] fin[d] foldc[lose] func gvim helpt[ags] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3do python3 qa[ll] redr[aw] return rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stopi[nsert] sunmenu sync tab tabfir[st] tabp[revious] tcl th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] up[date] vi[sual] viu[sage] wh[ile] wp[revious] xa[ll] xprop z[^.=]
|
||||
syn keyword vimCommand contained a ar[gs] argl[ocal] bad[d] bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] class cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] delep dell diffg[et] dig[raphs] do dsp[lit] echoe[rr] em[enu] endfo[r] eval f[ile] fina[lly] foldd[oopen] gr[ep] helpc[lose] his[tory] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] py3f[ile] pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoremenu spelli[nfo] spr[evious] sri star[tinsert] sts[elect] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] v vie[w] vne[w] win[size] wq xmapc[lear] xr[estore]
|
||||
syn keyword vimCommand contained ab arga[dd] argu[ment] balt bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletel delm[arks] diffo[ff] dir doau e[dit] echom[sg] en[dif] endinterface ex files fini[sh] folddoc[losed] grepa[dd] helpf[ind] hor[izontal] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] public py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir smenu so[urce] spellr[are] sr srl startg[replace] substitutepattern sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] var vim9[cmd] vs[plit] winc[md] wqa[ll] xme xunme
|
||||
syn keyword vimCommand contained abc[lear] argd[elete] as[cii] bd[elete] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletep delp diffp[atch] disa[ssemble] doaut ea echon endclass endt[ry] exi[t] filet fir[st] foldo[pen] gui helpg[rep] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] leg[acy] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] substituterepeat sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type unl ve[rsion] vim9s[cript] wN[ext] windo wundo xmenu xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] argded[upe] au bel[owright] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] defer deletl dep diffpu[t] dj[ump] dp earlier echow[indow] enddef endw[hile] exp filetype fix[del] for gvim helpt[ags] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp static sun[hide] sy tN[ext] tabe[dit] tabnew tc[d] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unlo[ckvar] verb[ose] vim[grep] w[rite] winp[os] wv[iminfo] xnoreme xwininfo
|
||||
syn keyword vimCommand contained abstract argdo bN[ext] bf[irst] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec el[se] endenum ene[w] export filt[er] fo[ld] fu[nction] h[elp] hi iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3do python3 qa[ll] redr[aw] retu[rn] rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stj[ump] sunme syn ta[g] tabf[ind] tabo[nly] tch[dir] tf[irst] tln tmapc[lear] try una[bbreviate] uns[ilent] vert[ical] vimgrepa[dd] wa[ll] wn[ext] x[it] xnoremenu y[ank]
|
||||
syn keyword vimCommand contained addd arge[dit] b[uffer] bl[ast] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delel delf[unction] dif[fupdate] difft[his] dli[st] ds[earch] echoc[onsole] elsei[f] endf[unction] enum exu[sage] fin[d] foldc[lose] go[to] ha[rdcopy] hid[e] if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes[sages] mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] stopi[nsert] sunmenu sync tab tabfir[st] tabp[revious] tcl th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] up[date] vi[sual] viu[sage] wh[ile] wp[revious] xa[ll] xprop z[^.=]
|
||||
syn keyword vimCommand contained al[l] argg[lobal] ba[ll] bm[odified]
|
||||
syn match vimCommand contained "\<z[-+^.=]\=\>"
|
||||
syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Until Winbar XMLent XMLns
|
||||
|
||||
" vimOptions are caught only when contained in a vimSet {{{2
|
||||
syn keyword vimOption contained acd ambw arshape aw backupskip beval bk bri bufhidden cdh ci cinsd cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr gli guifont guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langmap linebreak lm lsp makeencoding maxmem mh mmp more mousemoveevent mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome re restorescreen ro rulerformat scl scs sft shellslash shortmess shq sm sn spellfile splitkeep ssl stmp swapsync synmaxcol tagcase tbi termbidi textauto thesaurusfunc tl ts ttybuiltin tws undodir varsofttabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write
|
||||
syn keyword vimOption contained ai anti asd awa balloondelay bevalterm bkc briopt buflisted cdhome cin cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd go guifontset helpfile highlight hls imactivatekey iminsert include inf isk keymodel langmenu lines lmap luadll makeprg maxmempattern mis mmt mouse mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx readonly revins rop runtimepath scr sect sh shelltemp shortname si smartcase so spelllang splitright ssop sts swb syntax tagfunc tbidi termencoding textmode tildeop tm tsl ttyfast twsl undofile vartabstop vi visualbell wb wfw wildcharm winaltkeys winminwidth wmnu writeany
|
||||
syn keyword vimOption contained akm antialias autochdir background ballooneval bex bl brk buftype cdpath cindent cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endoffile errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault gp guifontwide helpheight history hlsearch imaf ims includeexpr infercase iskeyword keyprotocol langnoremap linespace lnr lw mat maxmemtot mkspellmem mod mousef mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion redrawtime ri rs sb scroll sections shcf shelltype showbreak sidescroll smartindent softtabstop spelloptions spo st su swf ta taglength tbis termguicolors textwidth timeout to tsr ttym twt undolevels vb viewdir vop wc wh wildignore wincolor winptydll wmw writebackup
|
||||
syn keyword vimOption contained al ar autoindent backspace balloonevalterm bexpr bo browsedir casemap cedit cink clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm endofline errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepformat guiheadroom helplang hk ic imak imsearch incsearch insertmode isp keywordprg langremap lisp loadplugins lz matchpairs mco ml modeline mousefocus mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe regexpengine rightleft rtp sbo scrollbind secure shell shellxescape showcmd sidescrolloff smarttab sol spellsuggest spr sta sua switchbuf tabline tagrelative tbs termwinkey tf timeoutlen toolbar tsrfu ttymouse tx undoreload vbs viewoptions vsts wcm whichwrap wildignorecase window winwidth wop writedelay
|
||||
syn keyword vimOption contained aleph arab autoread backup balloonexpr bg bomb bs cb cf cinkeys cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei eof esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn grepprg guiligatures hf hkmap icon imc imsf inde is isprint km laststatus lispoptions lop ma matchtime mef mle modelineexpr mousehide mousetime nf ofu para penc pm previewwindow printoptions pw qftf relativenumber rightleftcmd ru sbr scrollfocus sel shellcmdflag shellxquote showfulltag signcolumn smc sp spf sps stal suffixes sws tabpagemax tags tc termwinscroll tfu title toolbariconsize ttimeout ttyscroll uc updatecount vdir vif vts wcr wi wildmenu winfixheight wiv wrap ws
|
||||
syn keyword vimOption contained allowrevins arabic autoshelldir backupcopy bdir bh breakat bsdir cc cfu cino cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtl guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kmp lazyredraw lispwords lpl macatsui maxcombine menc mls modelines mousem mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shiftround showmatch siso smd spc spk sr startofline suffixesadd sxe tabstop tagstack tcldll termwinsize tgc titlelen top ttimeoutlen ttytype udf updatetime ve viminfo wa wd wic wildmode winfixwidth wiw wrapmargin ww
|
||||
syn keyword vimOption contained altkeymap arabicshape autowrite backupdir bdlay bin breakindent bsk ccv ch cinoptions cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw gtt guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js kp lbr list lrm magic maxfuncdepth menuitems mm modifiable mousemev mps nu opendevice paste pex pmbfn printencoding pt pythonhome quoteescape renderoptions rlc ruf scb scrolloff selectmode shellquote shiftwidth showmode sj smoothscroll spell spl srr statusline sw sxq tag tal tenc termwintype tgst titleold tpm ttm tw udir ur verbose viminfofile wak weirdinvert wig wildoptions winheight wm wrapscan xtermcodes
|
||||
syn keyword vimOption contained ambiwidth ari autowriteall backupext belloff binary breakindentopt bt cd charconvert cinscopedecls cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guicursor guitablabel hid hl im imdisable imstyle indk isi key kpc lcs listchars ls makeef maxmapdepth mfd mmd modified mousemodel msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll rdt report rnu ruler scf scrollopt sessionoptions shellredir shm showtabline slm sms spellcapcheck splitbelow ss stl swapfile syn tagbsearch tb term terse thesaurus titlestring tr tty twk ul ut verbosefile
|
||||
syn keyword vimOption contained acd ambw arshape aw backupskip beval bk bri bufhidden cdh ci cinsd cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr gli guifont guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langmap linebreak lm lsp makeencoding maxmem mh mmp more mousemoveevent mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome re restorescreen ro rulerformat scl scs sft shellslash shortmess showtabline slm smoothscroll spell spl srr statusline sw sxq tag tal tenc termwintype tgst titleold tpm ttm tw udir ur verbose viminfofile warn wfh wildchar wim winminheight wmh write
|
||||
syn keyword vimOption contained ai anti asd awa balloondelay bevalterm bkc briopt buflisted cdhome cin cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd go guifontset helpfile highlight hls imactivatekey iminsert include inf isk keymodel langmenu lines lmap luadll makeprg maxmempattern mis mmt mouse mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx readonly revins rop runtimepath scr sect sh shelltemp shortname shq sloc sms spellcapcheck splitbelow ss stl swapfile syn tagbsearch tb term terse thesaurus titlestring tr tty twk ul ut verbosefile virtualedit wb wfw wildcharm winaltkeys winminwidth wmnu writeany
|
||||
syn keyword vimOption contained akm antialias autochdir background ballooneval bex bl brk buftype cdpath cindent cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endoffile errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault gp guifontwide helpheight history hlsearch imaf ims includeexpr infercase iskeyword keyprotocol langnoremap linespace lnr lw mat maxmemtot mkspellmem mod mousef mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion redrawtime ri rs sb scroll sections shcf shelltype showbreak si sm sn spellfile splitkeep ssl stmp swapsync synmaxcol tagcase tbi termbidi textauto thesaurusfunc tl ts ttybuiltin tws undodir varsofttabstop vfile visualbell wc wh wildignore wincolor winptydll wmw writebackup
|
||||
syn keyword vimOption contained al ar autoindent backspace balloonevalterm bexpr bo browsedir casemap cedit cink clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm endofline errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepformat guiheadroom helplang hk ic imak imsearch incsearch insertmode isp keywordprg langremap lisp loadplugins lz matchpairs mco ml modeline mousefocus mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe regexpengine rightleft rtp sbo scrollbind secure shell shellxescape showcmd sidescroll smartcase so spelllang splitright ssop sts swb syntax tagfunc tbidi termencoding textmode tildeop tm tsl ttyfast twsl undofile vartabstop vi vop wcm whichwrap wildignorecase window winwidth wop writedelay
|
||||
syn keyword vimOption contained aleph arab autoread backup balloonexpr bg bomb bs cb cf cinkeys cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei eof esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn grepprg guiligatures hf hkmap icon imc imsf inde is isprint km laststatus lispoptions lop ma matchtime mef mle modelineexpr mousehide mousetime nf ofu para penc pm previewwindow printoptions pw qftf relativenumber rightleftcmd ru sbr scrollfocus sel shellcmdflag shellxquote showcmdloc sidescrolloff smartindent softtabstop spelloptions spo st su swf ta taglength tbis termguicolors textwidth timeout to tsr ttym twt undolevels vb viewdir vsts wcr wi wildmenu winfixheight wiv wrap ws
|
||||
syn keyword vimOption contained allowrevins arabic autoshelldir backupcopy bdir bh breakat bsdir cc cfu cino cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtl guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kmp lazyredraw lispwords lpl macatsui maxcombine menc mls modelines mousem mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shiftround showfulltag signcolumn smarttab sol spellsuggest spr sta sua switchbuf tabline tagrelative tbs termwinkey tf timeoutlen toolbar tsrfu ttymouse tx undoreload vbs viewoptions vts wd wic wildmode winfixwidth wiw wrapmargin ww
|
||||
syn keyword vimOption contained altkeymap arabicshape autowrite backupdir bdlay bin breakindent bsk ccv ch cinoptions cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw gtt guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js kp lbr list lrm magic maxfuncdepth menuitems mm modifiable mousemev mps nu opendevice paste pex pmbfn printencoding pt pythonhome quoteescape renderoptions rlc ruf scb scrolloff selectmode shellquote shiftwidth showmatch siso smc sp spf sps stal suffixes sws tabpagemax tags tc termwinscroll tfu title toolbariconsize ttimeout ttyscroll uc updatecount vdir vif wa weirdinvert wig wildoptions winheight wm wrapscan xtermcodes
|
||||
syn keyword vimOption contained ambiwidth ari autowriteall backupext belloff binary breakindentopt bt cd charconvert cinscopedecls cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guicursor guitablabel hid hl im imdisable imstyle indk isi key kpc lcs listchars ls makeef maxmapdepth mfd mmd modified mousemodel msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll rdt report rnu ruler scf scrollopt sessionoptions shellredir shm showmode sj smd spc spk sr startofline suffixesadd sxe tabstop tagstack tcldll termwinsize tgc titlelen top ttimeoutlen ttytype udf updatetime ve viminfo wak
|
||||
|
||||
" vimOptions: These are the turn-off setting variants {{{2
|
||||
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoindent noautowrite noawa noballoonevalterm nobin nobl nobri noci nocompatible nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noemoji noeof noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf nois nolangnoremap nolbr nolist nolpl noma nomh nomod nomodifiable nomousef nonu noopendevice nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscf noscrollfocus nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosmoothscroll nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
|
||||
@@ -49,8 +50,8 @@ syn keyword vimOption contained invai invaltkeymap invar invarabicshape invasd i
|
||||
syn keyword vimOption contained invakm invanti invarab invari invautochdir invautoshelldir invaw invballooneval invbevalterm invbk invbreakindent invcf invcindent invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invemo invendofline invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs invlazyredraw invlisp invloadplugins invlz invmagic invmle invmodelineexpr invmore invmousehide invodev invpi
|
||||
|
||||
" termcap codes (which can also be set) {{{2
|
||||
syn keyword vimOption contained t_8b t_8u t_AF t_AL t_bc t_BE t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_Ds t_EI t_F2 t_F4 t_F6 t_F8 t_fd t_fs t_IE t_k1 t_k2 t_K3 t_K4 t_K5 t_K6 t_K7 t_K8 t_K9 t_kb t_KB t_kd t_KD t_KE t_KG t_KH t_KI t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_PE t_PS t_RB t_RC t_RF t_Ri t_RI t_RK t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_Si t_SI t_so t_sr t_SR t_ST t_te t_Te t_TE t_ti t_TI t_ts t_Ts t_u7 t_ue t_us t_Us t_ut t_vb t_ve t_vi t_vs t_VS t_WP t_WS t_xn t_xs t_ZH t_ZR
|
||||
syn keyword vimOption contained t_8f t_AB t_al t_AU t_BD t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_ds t_EC t_F1 t_F3 t_F5 t_F7 t_F9 t_fe t_GP t_IS t_K1 t_k3 t_k4 t_k5 t_k6 t_k7 t_k8 t_k9 t_KA t_kB t_KC t_kD t_ke t_KF t_kh t_kI t_KJ
|
||||
syn keyword vimOption contained t_8b t_8u t_AF t_AL t_bc t_BE t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_Ds t_EI t_F2 t_F4 t_F6 t_F8 t_fd t_fs t_IE t_k1 t_k2 t_K3 t_K4 t_K5 t_K6 t_K7 t_K8 t_K9 t_kb t_KB t_kd t_KD t_KE t_KG t_KH t_KI t_KK t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_PE t_PS t_RB t_RC t_RF t_Ri t_RI t_RK t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_Si t_SI t_so t_sr t_SR t_ST t_te t_Te t_TE t_ti t_TI t_ts t_Ts t_u7 t_ue t_us t_Us t_ut t_vb t_ve t_vi t_vs t_VS t_WP t_WS t_XM t_xn t_xs t_ZH t_ZR
|
||||
syn keyword vimOption contained t_8f t_AB t_al t_AU t_BD t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_ds t_EC t_F1 t_F3 t_F5 t_F7 t_F9 t_fe t_GP t_IS t_K1 t_k3 t_k4 t_k5 t_k6 t_k7 t_k8 t_k9 t_KA t_kB t_KC t_kD t_ke t_KF t_kh t_kI t_KJ t_kl
|
||||
syn match vimOption contained "t_%1"
|
||||
syn match vimOption contained "t_#2"
|
||||
syn match vimOption contained "t_#4"
|
||||
@@ -78,12 +79,12 @@ syn match vimHLGroup contained "Conceal"
|
||||
syn case match
|
||||
|
||||
" Function Names {{{2
|
||||
syn keyword vimFuncName contained abs argc assert_equal assert_match atan balloon_show bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline digraph_set eval exists_compiled extendnew findfile fnameescape foldtextresult get getchar getcmdline getcurpos getfsize getloclist getpos gettabinfo getwinpos globpath histdel hlset input insert islocked job_start json_decode libcallnr listener_add luaeval mapset matchend max mzeval perleval popup_create popup_findinfo popup_list popup_setoptions printf prop_add prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strwidth swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_channel test_null_partial test_setmouse timer_info tolower type values winbufnr win_getid win_id2win winnr win_splitmove
|
||||
syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 balloon_split buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype digraph_setlist eventhandler exp feedkeys flatten fnamemodify foreground getbufinfo getcharmod getcmdpos getcursorcharpos getftime getmarklist getqflist gettabvar getwinposx has histget hostname inputdialog interrupt isnan job_status json_encode line listener_flush map match matchfuzzy menu_info nextnonblank popup_atcursor popup_dialog popup_findpreview popup_locate popup_settext prompt_getprompt prop_add_list prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdline setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart submatch synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_dict test_null_string test_settime timer_pause toupper typename virtcol wincol win_gettype winlayout winrestcmd winwidth
|
||||
syn keyword vimFuncName contained add arglistid assert_exception assert_notequal autocmd_add blob2list bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler echoraw executable expand filereadable flattennew foldclosed fullcommand getbufline getcharpos getcmdscreenpos getcwd getftype getmatches getreg gettabwinvar getwinposy has_key histnr iconv inputlist invert items job_stop keys line2byte listener_remove maparg matchadd matchfuzzypos min nr2char popup_beval popup_filter_menu popup_getoptions popup_menu popup_show prompt_setcallback prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime substitute synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_gui_event test_null_function test_option_not_set test_srand_seed timer_start tr undofile virtcol2col windowsversion win_gotoid winline winrestview wordcount
|
||||
syn keyword vimFuncName contained and argv assert_fails assert_notmatch autocmd_delete browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID empty execute expandcmd filewritable float2nr foldclosedend funcref getbufoneline getcharsearch getcmdtype getenv getimstatus getmousepos getreginfo gettagstack getwinvar haslocaldir hlexists indent inputrestore isabsolutepath job_getchannel join keytrans lispindent localtime mapcheck matchaddpos matchlist mkdir or popup_clear popup_filter_yesno popup_getpos popup_move pow prompt_setinterrupt prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx swapfilelist synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_ignore_error test_null_job test_override test_unknown timer_stop trim undotree visualmode win_execute winheight win_move_separator winsaveview writefile
|
||||
syn keyword vimFuncName contained append asin assert_false assert_report autocmd_get browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy digraph_get environ exepath expr10 filter floor foldlevel function getbufvar getcharstr getcmdwintype getfontname getjumplist getmouseshape getregtype gettext glob hasmapto hlget index inputsave isdirectory job_info js_decode len list2blob log maplist matcharg matchstr mode pathshorten popup_close popup_findecho popup_hide popup_notification prevnonblank prompt_setprompt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_null_blob test_null_list test_refcount test_void timer_stopall trunc uniq wildmenumode win_findbuf win_id2tabwin win_move_statusline win_screenpos xor
|
||||
syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true balloon_gettext bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete digraph_getlist escape exists extend finddir fmod foldtext garbagecollect getchangelist getcmdcompltype getcompletion getfperm getline getpid getscriptinfo getwininfo glob2regpat histadd hlID indexof inputsecret isinf job_setoptions js_encode libcall list2str log10 mapnew matchdelete matchstrpos
|
||||
syn keyword vimFuncName contained abs argc assert_equal assert_match atan balloon_show bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline digraph_set eval exists_compiled extendnew findfile fnameescape foldtextresult get getchangelist getcmdcompltype getcompletion getfperm getline getpid getscriptinfo getwininfo glob2regpat histadd hlID indexof inputsecret isinf job_setoptions js_encode libcall list2str log10 mapnew matchdelete matchstrpos mzeval popup_atcursor popup_dialog popup_findpreview popup_locate popup_settext prompt_getprompt prop_add_list prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdline setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart submatch synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_channel test_null_partial test_setmouse timer_info tolower type values winbufnr win_getid win_id2win winnr win_splitmove
|
||||
syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 balloon_split buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype digraph_setlist eventhandler exp feedkeys flatten fnamemodify foreground getbufinfo getchar getcmdline getcurpos getfsize getloclist getpos gettabinfo getwinpos globpath histdel hlset input insert islocked job_start json_decode libcallnr listener_add luaeval mapset matchend max nextnonblank popup_beval popup_filter_menu popup_getoptions popup_menu popup_show prompt_setcallback prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime substitute synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_gui_event test_null_dict test_null_string test_settime timer_pause toupper typename virtcol wincol win_gettype winlayout winrestcmd winwidth
|
||||
syn keyword vimFuncName contained add arglistid assert_exception assert_notequal autocmd_add blob2list bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler echoraw executable expand filereadable flattennew foldclosed fullcommand getbufline getcharmod getcmdpos getcursorcharpos getftime getmarklist getqflist gettabvar getwinposx has histget hostname inputdialog interrupt isnan job_status json_encode line listener_flush map match matchfuzzy menu_info nr2char popup_clear popup_filter_yesno popup_getpos popup_move pow prompt_setinterrupt prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx swapfilelist synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_ignore_error test_null_function test_option_not_set test_srand_seed timer_start tr undofile virtcol2col windowsversion win_gotoid winline winrestview wordcount
|
||||
syn keyword vimFuncName contained and argv assert_fails assert_notmatch autocmd_delete browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID empty execute expandcmd filewritable float2nr foldclosedend funcref getbufoneline getcharpos getcmdscreenpos getcwd getftype getmatches getreg gettabwinvar getwinposy has_key histnr iconv inputlist invert items job_stop keys line2byte listener_remove maparg matchadd matchfuzzypos min or popup_close popup_findecho popup_hide popup_notification prevnonblank prompt_setprompt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_mswin_event test_null_job test_override test_unknown timer_stop trim undotree visualmode win_execute winheight win_move_separator winsaveview writefile
|
||||
syn keyword vimFuncName contained append asin assert_false assert_report autocmd_get browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy digraph_get environ exepath expr10 filter floor foldlevel function getbufvar getcharsearch getcmdtype getenv getimstatus getmousepos getreginfo gettagstack getwinvar haslocaldir hlexists indent inputrestore isabsolutepath job_getchannel join keytrans lispindent localtime mapcheck matchaddpos matchlist mkdir pathshorten popup_create popup_findinfo popup_list popup_setoptions printf prop_add prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strwidth swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_blob test_null_list test_refcount test_void timer_stopall trunc uniq wildmenumode win_findbuf win_id2tabwin win_move_statusline win_screenpos xor
|
||||
syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true balloon_gettext bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete digraph_getlist escape exists extend finddir fmod foldtext garbagecollect getcellwidths getcharstr getcmdwintype getfontname getjumplist getmouseshape getregtype gettext glob hasmapto hlget index inputsave isdirectory job_info js_decode len list2blob log maplist matcharg matchstr mode perleval
|
||||
|
||||
"--- syntax here and above generated by mkvimvim ---
|
||||
" Special Vim Highlighting (not automatic) {{{1
|
||||
@@ -244,7 +245,8 @@ endif
|
||||
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
|
||||
syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimEnvvar,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLetHereDoc,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
|
||||
syn match vimFunction "\<\(fu\%[nction]\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
syn match vimFunction "\<def!\=\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
syn match vimFunction "\<def!\=\s\+\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
"syn match vimFunction "\<def!\=\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
|
||||
syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList
|
||||
@@ -353,7 +355,7 @@ syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([^a-zA-Z
|
||||
syn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline
|
||||
syn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass
|
||||
syn match vimCollClassErr contained "\[:.\{-\}:\]"
|
||||
syn match vimCollClass contained transparent "\%#=1\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|return\|tab\|escape\|backspace\):\]"
|
||||
syn match vimCollClass contained transparent "\%#=1\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|retu\%[rn]\|tab\|escape\|backspace\):\]"
|
||||
syn match vimSubstSubstr contained "\\z\=\d"
|
||||
syn match vimSubstTwoBS contained "\\\\"
|
||||
syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags
|
||||
@@ -453,7 +455,7 @@ syn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList
|
||||
" Angle-Bracket Notation: (tnx to Michael Geddes) {{{2
|
||||
" ======================
|
||||
syn case ignore
|
||||
syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cmd\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|mouse\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket
|
||||
syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cmd\|cr\|lf\|linefeed\|retu\%[rn]\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|mouse\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket
|
||||
syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket
|
||||
syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket
|
||||
syn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
|
||||
@@ -481,7 +483,7 @@ if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
|
||||
syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/
|
||||
endif
|
||||
|
||||
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<return\>\|\<while\>" skipwhite nextgroup=vimOper,vimOperParen,vimVar,vimFunc,vimNotation
|
||||
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<retu\%[rn]\>\|\<while\>" skipwhite nextgroup=vimOper,vimOperParen,vimVar,vimFunc,vimNotation
|
||||
|
||||
" Norm: {{{2
|
||||
" ====
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
" Vim syntax file
|
||||
" This is a GENERATED FILE. Please always refer to source file at the URI below.
|
||||
" Language: XF86Config (XFree86 configuration file)
|
||||
" Former Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
|
||||
" Last Change: 2010 Nov 01
|
||||
" URL: http://trific.ath.cx/Ftp/vim/syntax/xf86conf.vim
|
||||
" Last Change By David: 2010 Nov 01
|
||||
" Last Change: 2023 Jan 23
|
||||
" Required Vim Version: 6.0
|
||||
"
|
||||
" Options: let xf86conf_xfree86_version = 3 or 4
|
||||
" to force XFree86 3.x or 4.x XF86Config syntax
|
||||
" to force XFree86 3.x or 4.x XF86Config syntax
|
||||
|
||||
" Setup
|
||||
" quit when a syntax file was already loaded
|
||||
@@ -147,6 +146,8 @@ syn keyword xf86confKeyword Hskew HTimings InputDevice IOBase MemBase Mode nextg
|
||||
syn keyword xf86confKeyword Modes Ramdac Screen TextClockFreq UseModes VendorName nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword VertRefresh VideoRam ViewPort Virtual VScan VTimings nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword Weight White nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confMatch MatchDevicePath MatchDriver MatchLayout MatchOS MatchPnPID MatchProduct MatchTag MatchUSBID MatchVendor nextgroup=xf86confComment,xf86confString skipwhite
|
||||
syn keyword xf86confMatch MatchIsPointer MatchIsKeyboard MatchIsTouchpad MatchIsTouchscreen MatchIsJoystick nextgroup=xf86confComment,xf86confValue skipwhite
|
||||
syn keyword xf86confModeLine ModeLine nextgroup=xf86confComment,xf86confModeLineValue skipwhite skipnl
|
||||
|
||||
" Constants
|
||||
@@ -185,6 +186,7 @@ hi def link xf86confOctalNumberError xf86confError
|
||||
hi def link xf86confError Error
|
||||
|
||||
hi def link xf86confOption xf86confKeyword
|
||||
hi def link xf86confMatch xf86confKeyword
|
||||
hi def link xf86confModeLine xf86confKeyword
|
||||
hi def link xf86confKeyword Type
|
||||
|
||||
|
||||
@@ -335,7 +335,7 @@ Doubling to operate on a line also works for operators mentioned below.
|
||||
5. Now type a capital U to return the line to its original state.
|
||||
6. Now type u a few times to undo the U and preceding commands.
|
||||
7. Now type CTRL-R (keeping CTRL key pressed while hitting R) a few times
|
||||
to redo the commands (undo the undo's).
|
||||
to redo the commands (undo the undos).
|
||||
|
||||
---> Fiix the errors oon thhis line and reeplace them witth undo.
|
||||
|
||||
@@ -365,7 +365,7 @@ Doubling to operate on a line also works for operators mentioned below.
|
||||
|
||||
8. To undo previous actions, type: u (lowercase u)
|
||||
To undo all the changes on a line, type: U (capital U)
|
||||
To undo the undo's, type: CTRL-R
|
||||
To undo the undos, type: CTRL-R
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lesson 3.1: THE PUT COMMAND
|
||||
|
||||
@@ -335,7 +335,7 @@ Doubling to operate on a line also works for operators mentioned below.
|
||||
5. Now type a capital U to return the line to its original state.
|
||||
6. Now type u a few times to undo the U and preceding commands.
|
||||
7. Now type CTRL-R (keeping CTRL key pressed while hitting R) a few times
|
||||
to redo the commands (undo the undo's).
|
||||
to redo the commands (undo the undos).
|
||||
|
||||
---> Fiix the errors oon thhis line and reeplace them witth undo.
|
||||
|
||||
@@ -365,7 +365,7 @@ Doubling to operate on a line also works for operators mentioned below.
|
||||
|
||||
8. To undo previous actions, type: u (lowercase u)
|
||||
To undo all the changes on a line, type: U (capital U)
|
||||
To undo the undo's, type: CTRL-R
|
||||
To undo the undos, type: CTRL-R
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lesson 3.1: THE PUT COMMAND
|
||||
|
||||
@@ -42,26 +42,30 @@ Contents:
|
||||
|
||||
|
||||
The currently recommended way (that means it has been verified to work) is
|
||||
using the "Visual Studio Community 2015" installation. This doesn't include
|
||||
the SDK for older Windows versions (95, 98), see "OLDER VERSIONS" below for
|
||||
that.
|
||||
using the "Visual Studio 2022 Community Edition" installation. This doesn't
|
||||
include the SDK for older Windows versions (95 - XP), see "OLDER VERSIONS"
|
||||
below for that.
|
||||
|
||||
|
||||
1. Microsoft Visual C++
|
||||
=======================
|
||||
|
||||
We do not provide download links, since Microsoft keeps changing them. You
|
||||
can search for "Visual Studio Community 2015", for example. You will need to
|
||||
create a Microsoft account (it's free). You need to download the "DVD", and
|
||||
execute the installer from it.
|
||||
can search for "Visual Studio 2022 Community Edition", for example. You will
|
||||
need to create a Microsoft account (it's free). You need to download the
|
||||
"DVD", and execute the installer from it.
|
||||
|
||||
When installing "Visual Studio Community 2015 with Update 3" or "Visual C++
|
||||
Build Tools for Visual Studio 2015 with Update 3" make sure to
|
||||
select "custom" and check all checkboxes under "Universal Windows App
|
||||
Development Tools". Or whatever they are called now.
|
||||
(If you still want to target Windows XP, check also "Windows XP Support for
|
||||
C++". Note that with the current source code this is no longer supported, you
|
||||
will have to check out an older version).
|
||||
When installing "Visual Studio 2022 Community Edition" or "Build Tools for
|
||||
Visual Studio 2022" make sure to select "custom" and check all checkboxes
|
||||
under "Universal Windows App Development Tools". Or whatever they are called
|
||||
now.
|
||||
|
||||
Note: Vim source code no longer supports Windows XP since Patch 9.0.0496.
|
||||
Also, Visual Studio 2017 was the last version to support a Windows XP target.
|
||||
If you still want to target Windows XP, you can check out an older version of
|
||||
vim source code and install Visual Studio 2017 or 2015 - making sure to check
|
||||
the checkbox for "Windows XP Support for C++". Additional build instructions
|
||||
for Windows XP are provided below. |new-msvc-windows-xp|
|
||||
|
||||
|
||||
Visual Studio
|
||||
@@ -70,6 +74,18 @@ Visual Studio
|
||||
Building with Visual Studio (VS2015, VS2017, VS2019 and VS2022) is
|
||||
straightforward. Older versions probably don't work.
|
||||
|
||||
Vim versions built with VS2015 and VS2017 are systematically tested and known
|
||||
to work well on Windows versions 7, 8 and 8.1.
|
||||
|
||||
Vim versions built with VS2015 and VS2017 are also known to work well on all
|
||||
early versions of Windows 10. However, Vim versions built with VS2015 and
|
||||
VS2017 may run into a known issue on the latest versions of Windows 10 and 11.
|
||||
Building Vim with VS2019 or VS2022 resolves the issue.
|
||||
|
||||
Vim versions built with VS2019 and VS2022 are systematically tested and
|
||||
known to work on Windows versions 7, 8, 8.1, 10, 11 and all respective server
|
||||
variants.
|
||||
|
||||
Visual Studio installed a batch file called vcvarsall.bat, which you must
|
||||
run to set up paths for nmake and MSVC. We provide a batch file
|
||||
"msvc2015.bat" for this. You may need to edit it if you didn't install Visual
|
||||
@@ -100,8 +116,8 @@ These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and
|
||||
Ron Aaron; they have been tested. But several things changed after that...
|
||||
|
||||
|
||||
Targeting Windows XP with MSVC 2015 and later *new-msvc-windows-xp*
|
||||
---------------------------------------------
|
||||
Targeting Windows XP with MSVC 2015 or 2017 *new-msvc-windows-xp*
|
||||
-------------------------------------------
|
||||
|
||||
(The support for pre-Vista was removed in patch 9.0.0496. If you want to
|
||||
target Windows XP, use the source code before that.)
|
||||
@@ -155,9 +171,9 @@ The ARM64 support was provided by Leendert van Doorn.
|
||||
|
||||
OLDER VERSIONS
|
||||
|
||||
The minimal supported version is Windows 7. Building with compilers
|
||||
older than 2015 most likely doesn't work. Since MSVC 2015 can be obtained for
|
||||
free there is no point in supporting older versions.
|
||||
The minimal supported version is Windows 7. Building with compilers older than
|
||||
2015 most likely doesn't work. Since MSVC 2022 can be obtained for free there
|
||||
is no point in supporting older versions.
|
||||
|
||||
If you need the executable to run on Windows 98 or ME, use the 2005 one
|
||||
|msvc-2005-express|, and use the source code before 8.0.0029. See the
|
||||
|
||||
@@ -813,7 +813,7 @@ ga_copy_string(garray_T *gap, char_u *p)
|
||||
|
||||
/*
|
||||
* Add string "p" to "gap".
|
||||
* When out of memory "p" is freed and FAIL is returned.
|
||||
* When out of memory FAIL is returned (caller may want to free "p").
|
||||
*/
|
||||
int
|
||||
ga_add_string(garray_T *gap, char_u *p)
|
||||
|
||||
@@ -693,56 +693,56 @@ do_argfile(exarg_T *eap, int argn)
|
||||
emsg(_(e_cannot_go_before_first_file));
|
||||
else
|
||||
emsg(_(e_cannot_go_beyond_last_file));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
setpcmark();
|
||||
#ifdef FEAT_GUI
|
||||
need_mouse_correct = TRUE;
|
||||
#endif
|
||||
|
||||
// split window or create new tab page first
|
||||
if (*eap->cmd == 's' || cmdmod.cmod_tab != 0)
|
||||
{
|
||||
if (win_split(0, 0) == FAIL)
|
||||
return;
|
||||
RESET_BINDING(curwin);
|
||||
}
|
||||
else
|
||||
{
|
||||
setpcmark();
|
||||
#ifdef FEAT_GUI
|
||||
need_mouse_correct = TRUE;
|
||||
#endif
|
||||
|
||||
// split window or create new tab page first
|
||||
if (*eap->cmd == 's' || cmdmod.cmod_tab != 0)
|
||||
// if 'hidden' set, only check for changed file when re-editing
|
||||
// the same buffer
|
||||
other = TRUE;
|
||||
if (buf_hide(curbuf))
|
||||
{
|
||||
if (win_split(0, 0) == FAIL)
|
||||
return;
|
||||
RESET_BINDING(curwin);
|
||||
p = fix_fname(alist_name(&ARGLIST[argn]));
|
||||
other = otherfile(p);
|
||||
vim_free(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
// if 'hidden' set, only check for changed file when re-editing
|
||||
// the same buffer
|
||||
other = TRUE;
|
||||
if (buf_hide(curbuf))
|
||||
{
|
||||
p = fix_fname(alist_name(&ARGLIST[argn]));
|
||||
other = otherfile(p);
|
||||
vim_free(p);
|
||||
}
|
||||
if ((!buf_hide(curbuf) || !other)
|
||||
&& check_changed(curbuf, CCGD_AW
|
||||
| (other ? 0 : CCGD_MULTWIN)
|
||||
| (eap->forceit ? CCGD_FORCEIT : 0)
|
||||
| CCGD_EXCMD))
|
||||
return;
|
||||
}
|
||||
|
||||
curwin->w_arg_idx = argn;
|
||||
if (argn == ARGCOUNT - 1 && curwin->w_alist == &global_alist)
|
||||
arg_had_last = TRUE;
|
||||
|
||||
// Edit the file; always use the last known line number.
|
||||
// When it fails (e.g. Abort for already edited file) restore the
|
||||
// argument index.
|
||||
if (do_ecmd(0, alist_name(&ARGLIST[curwin->w_arg_idx]), NULL,
|
||||
eap, ECMD_LAST,
|
||||
(buf_hide(curwin->w_buffer) ? ECMD_HIDE : 0)
|
||||
+ (eap->forceit ? ECMD_FORCEIT : 0), curwin) == FAIL)
|
||||
curwin->w_arg_idx = old_arg_idx;
|
||||
// like Vi: set the mark where the cursor is in the file.
|
||||
else if (eap->cmdidx != CMD_argdo)
|
||||
setmark('\'');
|
||||
if ((!buf_hide(curbuf) || !other)
|
||||
&& check_changed(curbuf, CCGD_AW
|
||||
| (other ? 0 : CCGD_MULTWIN)
|
||||
| (eap->forceit ? CCGD_FORCEIT : 0)
|
||||
| CCGD_EXCMD))
|
||||
return;
|
||||
}
|
||||
|
||||
curwin->w_arg_idx = argn;
|
||||
if (argn == ARGCOUNT - 1 && curwin->w_alist == &global_alist)
|
||||
arg_had_last = TRUE;
|
||||
|
||||
// Edit the file; always use the last known line number.
|
||||
// When it fails (e.g. Abort for already edited file) restore the
|
||||
// argument index.
|
||||
if (do_ecmd(0, alist_name(&ARGLIST[curwin->w_arg_idx]), NULL,
|
||||
eap, ECMD_LAST,
|
||||
(buf_hide(curwin->w_buffer) ? ECMD_HIDE : 0)
|
||||
+ (eap->forceit ? ECMD_FORCEIT : 0), curwin) == FAIL)
|
||||
curwin->w_arg_idx = old_arg_idx;
|
||||
// like Vi: set the mark where the cursor is in the file.
|
||||
else if (eap->cmdidx != CMD_argdo)
|
||||
setmark('\'');
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
17
src/auto/configure
vendored
17
src/auto/configure
vendored
@@ -4816,6 +4816,19 @@ fi
|
||||
|
||||
done
|
||||
|
||||
# 10.5 and earlier lack dispatch
|
||||
for ac_header in dispatch/dispatch.h
|
||||
do :
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "dispatch/dispatch.h" "ac_cv_header_dispatch_dispatch_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_dispatch_dispatch_h" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DISPATCH_DISPATCH_H 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15041,8 +15054,8 @@ $as_echo "no" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
|
||||
$as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
|
||||
if test "$gccmajor" -gt "3"; then
|
||||
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
|
||||
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'`
|
||||
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
|
||||
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g'`
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
|
||||
@@ -1063,18 +1063,18 @@ au_get_grouparg(char_u **argp)
|
||||
|
||||
for (p = arg; *p && !VIM_ISWHITE(*p) && *p != '|'; ++p)
|
||||
;
|
||||
if (p > arg)
|
||||
{
|
||||
group_name = vim_strnsave(arg, p - arg);
|
||||
if (group_name == NULL) // out of memory
|
||||
return AUGROUP_ERROR;
|
||||
group = au_find_group(group_name);
|
||||
if (group == AUGROUP_ERROR)
|
||||
group = AUGROUP_ALL; // no match, use all groups
|
||||
else
|
||||
*argp = skipwhite(p); // match, skip over group name
|
||||
vim_free(group_name);
|
||||
}
|
||||
if (p <= arg)
|
||||
return AUGROUP_ALL;
|
||||
|
||||
group_name = vim_strnsave(arg, p - arg);
|
||||
if (group_name == NULL) // out of memory
|
||||
return AUGROUP_ERROR;
|
||||
group = au_find_group(group_name);
|
||||
if (group == AUGROUP_ERROR)
|
||||
group = AUGROUP_ALL; // no match, use all groups
|
||||
else
|
||||
*argp = skipwhite(p); // match, skip over group name
|
||||
vim_free(group_name);
|
||||
return group;
|
||||
}
|
||||
|
||||
@@ -1695,6 +1695,7 @@ win_found:
|
||||
globaldir = aco->globaldir;
|
||||
|
||||
// the buffer contents may have changed
|
||||
VIsual_active = aco->save_VIsual_active;
|
||||
check_cursor();
|
||||
if (curwin->w_topline > curbuf->b_ml.ml_line_count)
|
||||
{
|
||||
@@ -1741,14 +1742,16 @@ win_found:
|
||||
curwin = save_curwin;
|
||||
curbuf = curwin->w_buffer;
|
||||
prevwin = win_find_by_id(aco->save_prevwin_id);
|
||||
|
||||
// In case the autocommand moves the cursor to a position that
|
||||
// does not exist in curbuf.
|
||||
VIsual_active = aco->save_VIsual_active;
|
||||
check_cursor();
|
||||
}
|
||||
}
|
||||
|
||||
check_cursor(); // just in case lines got deleted
|
||||
VIsual_active = aco->save_VIsual_active;
|
||||
check_cursor(); // just in case lines got deleted
|
||||
if (VIsual_active)
|
||||
check_pos(curbuf, &VIsual);
|
||||
}
|
||||
@@ -2068,6 +2071,9 @@ apply_autocmds_group(
|
||||
&& (event == EVENT_WINLEAVE || event == EVENT_BUFLEAVE)))
|
||||
goto BYPASS_AU;
|
||||
|
||||
if (event == EVENT_CMDLINECHANGED)
|
||||
++aucmd_cmdline_changed_count;
|
||||
|
||||
/*
|
||||
* Save the autocmd_* variables and info about the current buffer.
|
||||
*/
|
||||
@@ -2088,8 +2094,8 @@ apply_autocmds_group(
|
||||
if (fname_io == NULL)
|
||||
{
|
||||
if (event == EVENT_COLORSCHEME || event == EVENT_COLORSCHEMEPRE
|
||||
|| event == EVENT_OPTIONSET
|
||||
|| event == EVENT_MODECHANGED)
|
||||
|| event == EVENT_OPTIONSET
|
||||
|| event == EVENT_MODECHANGED)
|
||||
autocmd_fname = NULL;
|
||||
else if (fname != NULL && !ends_excmd(*fname))
|
||||
autocmd_fname = fname;
|
||||
|
||||
@@ -517,7 +517,8 @@ bf_self_test(void)
|
||||
|
||||
// We can't simply use sizeof(UINT32_T), it would generate a compiler
|
||||
// warning.
|
||||
if (ui != 0xffffffffUL || ui + 1 != 0) {
|
||||
if (ui != 0xffffffffUL || ui + 1 != 0)
|
||||
{
|
||||
err++;
|
||||
emsg(_(e_sizeof_uint32_isnot_four));
|
||||
}
|
||||
@@ -573,13 +574,15 @@ bf_cfb_init(
|
||||
}
|
||||
}
|
||||
|
||||
#define BF_CFB_UPDATE(bfs, c) { \
|
||||
#define BF_CFB_UPDATE(bfs, c) \
|
||||
{ \
|
||||
bfs->cfb_buffer[bfs->update_offset] ^= (char_u)c; \
|
||||
if (++bfs->update_offset == bfs->cfb_len) \
|
||||
bfs->update_offset = 0; \
|
||||
}
|
||||
|
||||
#define BF_RANBYTE(bfs, t) { \
|
||||
#define BF_RANBYTE(bfs, t) \
|
||||
{ \
|
||||
if ((bfs->randbyte_offset & BF_BLOCK_MASK) == 0) \
|
||||
bf_e_cblock(bfs, &(bfs->cfb_buffer[bfs->randbyte_offset])); \
|
||||
t = bfs->cfb_buffer[bfs->randbyte_offset]; \
|
||||
|
||||
267
src/buffer.c
267
src/buffer.c
@@ -146,19 +146,19 @@ read_buffer(
|
||||
void
|
||||
buffer_ensure_loaded(buf_T *buf)
|
||||
{
|
||||
if (buf->b_ml.ml_mfp == NULL)
|
||||
{
|
||||
aco_save_T aco;
|
||||
if (buf->b_ml.ml_mfp != NULL)
|
||||
return;
|
||||
|
||||
// Make sure the buffer is in a window. If not then skip it.
|
||||
aucmd_prepbuf(&aco, buf);
|
||||
if (curbuf == buf)
|
||||
{
|
||||
if (swap_exists_action != SEA_READONLY)
|
||||
swap_exists_action = SEA_NONE;
|
||||
open_buffer(FALSE, NULL, 0);
|
||||
aucmd_restbuf(&aco);
|
||||
}
|
||||
aco_save_T aco;
|
||||
|
||||
// Make sure the buffer is in a window. If not then skip it.
|
||||
aucmd_prepbuf(&aco, buf);
|
||||
if (curbuf == buf)
|
||||
{
|
||||
if (swap_exists_action != SEA_READONLY)
|
||||
swap_exists_action = SEA_NONE;
|
||||
open_buffer(FALSE, NULL, 0);
|
||||
aucmd_restbuf(&aco);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -357,34 +357,34 @@ open_buffer(
|
||||
apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf);
|
||||
#endif
|
||||
|
||||
if (retval == OK)
|
||||
if (retval != OK)
|
||||
return retval;
|
||||
|
||||
// The autocommands may have changed the current buffer. Apply the
|
||||
// modelines to the correct buffer, if it still exists and is loaded.
|
||||
if (bufref_valid(&old_curbuf) && old_curbuf.br_buf->b_ml.ml_mfp != NULL)
|
||||
{
|
||||
// The autocommands may have changed the current buffer. Apply the
|
||||
// modelines to the correct buffer, if it still exists and is loaded.
|
||||
if (bufref_valid(&old_curbuf) && old_curbuf.br_buf->b_ml.ml_mfp != NULL)
|
||||
aco_save_T aco;
|
||||
|
||||
// Go to the buffer that was opened, make sure it is in a window.
|
||||
// If not then skip it.
|
||||
aucmd_prepbuf(&aco, old_curbuf.br_buf);
|
||||
if (curbuf == old_curbuf.br_buf)
|
||||
{
|
||||
aco_save_T aco;
|
||||
do_modelines(0);
|
||||
curbuf->b_flags &= ~(BF_CHECK_RO | BF_NEVERLOADED);
|
||||
|
||||
// Go to the buffer that was opened, make sure it is in a window.
|
||||
// If not then skip it.
|
||||
aucmd_prepbuf(&aco, old_curbuf.br_buf);
|
||||
if (curbuf == old_curbuf.br_buf)
|
||||
{
|
||||
do_modelines(0);
|
||||
curbuf->b_flags &= ~(BF_CHECK_RO | BF_NEVERLOADED);
|
||||
|
||||
if ((flags & READ_NOWINENTER) == 0)
|
||||
if ((flags & READ_NOWINENTER) == 0)
|
||||
#ifdef FEAT_EVAL
|
||||
apply_autocmds_retval(EVENT_BUFWINENTER, NULL, NULL,
|
||||
FALSE, curbuf, &retval);
|
||||
apply_autocmds_retval(EVENT_BUFWINENTER, NULL, NULL,
|
||||
FALSE, curbuf, &retval);
|
||||
#else
|
||||
apply_autocmds(EVENT_BUFWINENTER, NULL, NULL,
|
||||
FALSE, curbuf);
|
||||
apply_autocmds(EVENT_BUFWINENTER, NULL, NULL,
|
||||
FALSE, curbuf);
|
||||
#endif
|
||||
|
||||
// restore curwin/curbuf and a few other things
|
||||
aucmd_restbuf(&aco);
|
||||
}
|
||||
// restore curwin/curbuf and a few other things
|
||||
aucmd_restbuf(&aco);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1761,7 +1761,6 @@ do_bufdel(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return errormsg;
|
||||
}
|
||||
|
||||
@@ -1954,7 +1953,7 @@ enter_buffer(buf_T *buf)
|
||||
maketitle();
|
||||
// when autocmds didn't change it
|
||||
if (curwin->w_topline == 1 && !curwin->w_topline_was_set)
|
||||
scroll_cursor_halfway(FALSE); // redisplay at correct position
|
||||
scroll_cursor_halfway(FALSE, FALSE); // redisplay at correct position
|
||||
|
||||
#ifdef FEAT_NETBEANS_INTG
|
||||
// Send fileOpened event because we've changed buffers.
|
||||
@@ -3019,20 +3018,20 @@ fname_match(
|
||||
char_u *p;
|
||||
|
||||
// extra check for valid arguments
|
||||
if (name != NULL && rmp->regprog != NULL)
|
||||
if (name == NULL || rmp->regprog == NULL)
|
||||
return NULL;
|
||||
|
||||
// Ignore case when 'fileignorecase' or the argument is set.
|
||||
rmp->rm_ic = p_fic || ignore_case;
|
||||
if (vim_regexec(rmp, name, (colnr_T)0))
|
||||
match = name;
|
||||
else if (rmp->regprog != NULL)
|
||||
{
|
||||
// Ignore case when 'fileignorecase' or the argument is set.
|
||||
rmp->rm_ic = p_fic || ignore_case;
|
||||
if (vim_regexec(rmp, name, (colnr_T)0))
|
||||
// Replace $(HOME) with '~' and try matching again.
|
||||
p = home_replace_save(NULL, name);
|
||||
if (p != NULL && vim_regexec(rmp, p, (colnr_T)0))
|
||||
match = name;
|
||||
else if (rmp->regprog != NULL)
|
||||
{
|
||||
// Replace $(HOME) with '~' and try matching again.
|
||||
p = home_replace_save(NULL, name);
|
||||
if (p != NULL && vim_regexec(rmp, p, (colnr_T)0))
|
||||
match = name;
|
||||
vim_free(p);
|
||||
}
|
||||
vim_free(p);
|
||||
}
|
||||
|
||||
return match;
|
||||
@@ -3160,16 +3159,15 @@ wininfo_other_tab_diff(wininfo_T *wip)
|
||||
{
|
||||
win_T *wp;
|
||||
|
||||
if (wip->wi_opt.wo_diff)
|
||||
{
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
// return FALSE when it's a window in the current tab page, thus
|
||||
// the buffer was in diff mode here
|
||||
if (wip->wi_win == wp)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
if (!wip->wi_opt.wo_diff)
|
||||
return FALSE;
|
||||
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
// return FALSE when it's a window in the current tab page, thus
|
||||
// the buffer was in diff mode here
|
||||
if (wip->wi_win == wp)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3198,27 +3196,27 @@ find_wininfo(
|
||||
&& (!need_options || wip->wi_optset))
|
||||
break;
|
||||
|
||||
if (wip != NULL)
|
||||
return wip;
|
||||
|
||||
// If no wininfo for curwin, use the first in the list (that doesn't have
|
||||
// 'diff' set and is in another tab page).
|
||||
// If "need_options" is TRUE skip entries that don't have options set,
|
||||
// unless the window is editing "buf", so we can copy from the window
|
||||
// itself.
|
||||
if (wip == NULL)
|
||||
{
|
||||
#ifdef FEAT_DIFF
|
||||
if (skip_diff_buffer)
|
||||
{
|
||||
FOR_ALL_BUF_WININFO(buf, wip)
|
||||
if (!wininfo_other_tab_diff(wip)
|
||||
&& (!need_options || wip->wi_optset
|
||||
|| (wip->wi_win != NULL
|
||||
&& wip->wi_win->w_buffer == buf)))
|
||||
break;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
wip = buf->b_wininfo;
|
||||
if (skip_diff_buffer)
|
||||
{
|
||||
FOR_ALL_BUF_WININFO(buf, wip)
|
||||
if (!wininfo_other_tab_diff(wip)
|
||||
&& (!need_options || wip->wi_optset
|
||||
|| (wip->wi_win != NULL
|
||||
&& wip->wi_win->w_buffer == buf)))
|
||||
break;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
wip = buf->b_wininfo;
|
||||
return wip;
|
||||
}
|
||||
|
||||
@@ -3582,18 +3580,18 @@ buf_set_name(int fnum, char_u *name)
|
||||
buf_T *buf;
|
||||
|
||||
buf = buflist_findnr(fnum);
|
||||
if (buf != NULL)
|
||||
{
|
||||
if (buf->b_sfname != buf->b_ffname)
|
||||
vim_free(buf->b_sfname);
|
||||
vim_free(buf->b_ffname);
|
||||
buf->b_ffname = vim_strsave(name);
|
||||
buf->b_sfname = NULL;
|
||||
// Allocate ffname and expand into full path. Also resolves .lnk
|
||||
// files on Win32.
|
||||
fname_expand(buf, &buf->b_ffname, &buf->b_sfname);
|
||||
buf->b_fname = buf->b_sfname;
|
||||
}
|
||||
if (buf == NULL)
|
||||
return;
|
||||
|
||||
if (buf->b_sfname != buf->b_ffname)
|
||||
vim_free(buf->b_sfname);
|
||||
vim_free(buf->b_ffname);
|
||||
buf->b_ffname = vim_strsave(name);
|
||||
buf->b_sfname = NULL;
|
||||
// Allocate ffname and expand into full path. Also resolves .lnk
|
||||
// files on Win32.
|
||||
fname_expand(buf, &buf->b_ffname, &buf->b_sfname);
|
||||
buf->b_fname = buf->b_sfname;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -4181,7 +4179,7 @@ typedef struct
|
||||
Normal,
|
||||
Empty,
|
||||
Group,
|
||||
Middle,
|
||||
Separate,
|
||||
Highlight,
|
||||
TabPage,
|
||||
Trunc
|
||||
@@ -4193,6 +4191,7 @@ static stl_item_T *stl_items = NULL;
|
||||
static int *stl_groupitem = NULL;
|
||||
static stl_hlrec_T *stl_hltab = NULL;
|
||||
static stl_hlrec_T *stl_tabtab = NULL;
|
||||
static int *stl_separator_locations = NULL;
|
||||
|
||||
/*
|
||||
* Build a string from the status line items in "fmt".
|
||||
@@ -4202,7 +4201,7 @@ static stl_hlrec_T *stl_tabtab = NULL;
|
||||
* is "curwin".
|
||||
*
|
||||
* Items are drawn interspersed with the text that surrounds it
|
||||
* Specials: %-<wid>(xxx%) => group, %= => middle marker, %< => truncation
|
||||
* Specials: %-<wid>(xxx%) => group, %= => separation marker, %< => truncation
|
||||
* Item: %-<minwid>.<maxwid><itemch> All but <itemch> are optional
|
||||
*
|
||||
* If maxwidth is not zero, the string will be filled at any middle marker
|
||||
@@ -4284,6 +4283,8 @@ build_stl_str_hl(
|
||||
// end of the list.
|
||||
stl_hltab = ALLOC_MULT(stl_hlrec_T, stl_items_len + 1);
|
||||
stl_tabtab = ALLOC_MULT(stl_hlrec_T, stl_items_len + 1);
|
||||
|
||||
stl_separator_locations = ALLOC_MULT(int, stl_items_len);
|
||||
}
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
@@ -4352,19 +4353,20 @@ build_stl_str_hl(
|
||||
if (curitem == (int)stl_items_len)
|
||||
{
|
||||
size_t new_len = stl_items_len * 3 / 2;
|
||||
stl_item_T *new_items;
|
||||
int *new_groupitem;
|
||||
stl_hlrec_T *new_hlrec;
|
||||
|
||||
new_items = vim_realloc(stl_items, sizeof(stl_item_T) * new_len);
|
||||
stl_item_T *new_items =
|
||||
vim_realloc(stl_items, sizeof(stl_item_T) * new_len);
|
||||
if (new_items == NULL)
|
||||
break;
|
||||
stl_items = new_items;
|
||||
new_groupitem = vim_realloc(stl_groupitem, sizeof(int) * new_len);
|
||||
|
||||
int *new_groupitem =
|
||||
vim_realloc(stl_groupitem, sizeof(int) * new_len);
|
||||
if (new_groupitem == NULL)
|
||||
break;
|
||||
stl_groupitem = new_groupitem;
|
||||
new_hlrec = vim_realloc(stl_hltab,
|
||||
|
||||
stl_hlrec_T *new_hlrec = vim_realloc(stl_hltab,
|
||||
sizeof(stl_hlrec_T) * (new_len + 1));
|
||||
if (new_hlrec == NULL)
|
||||
break;
|
||||
@@ -4374,6 +4376,13 @@ build_stl_str_hl(
|
||||
if (new_hlrec == NULL)
|
||||
break;
|
||||
stl_tabtab = new_hlrec;
|
||||
|
||||
int *new_separator_locs = vim_realloc(stl_separator_locations,
|
||||
sizeof(int) * new_len);
|
||||
if (new_separator_locs == NULL)
|
||||
break;
|
||||
stl_separator_locations = new_separator_locs;;
|
||||
|
||||
stl_items_len = new_len;
|
||||
}
|
||||
|
||||
@@ -4402,12 +4411,13 @@ build_stl_str_hl(
|
||||
prevchar_isflag = prevchar_isitem = FALSE;
|
||||
continue;
|
||||
}
|
||||
if (*s == STL_MIDDLEMARK)
|
||||
// STL_SEPARATE: Separation between items, filled with white space.
|
||||
if (*s == STL_SEPARATE)
|
||||
{
|
||||
s++;
|
||||
if (groupdepth > 0)
|
||||
continue;
|
||||
stl_items[curitem].stl_type = Middle;
|
||||
stl_items[curitem].stl_type = Separate;
|
||||
stl_items[curitem++].stl_start = p;
|
||||
continue;
|
||||
}
|
||||
@@ -4617,6 +4627,8 @@ build_stl_str_hl(
|
||||
#endif
|
||||
if (vim_strchr(STL_ALL, *s) == NULL)
|
||||
{
|
||||
if (*s == NUL) // can happen with "%0"
|
||||
break;
|
||||
s++;
|
||||
continue;
|
||||
}
|
||||
@@ -4775,6 +4787,11 @@ build_stl_str_hl(
|
||||
get_rel_pos(wp, str, TMPLEN);
|
||||
break;
|
||||
|
||||
case STL_SHOWCMD:
|
||||
if (p_sc && STRCMP(opt_name, p_sloc) == 0)
|
||||
str = showcmd_buf;
|
||||
break;
|
||||
|
||||
case STL_ARGLISTSTAT:
|
||||
fillable = FALSE;
|
||||
buf_tmp[0] = 0;
|
||||
@@ -5116,19 +5133,45 @@ build_stl_str_hl(
|
||||
}
|
||||
else if (width < maxwidth && STRLEN(out) + maxwidth - width + 1 < outlen)
|
||||
{
|
||||
// Apply STL_MIDDLE if any
|
||||
// Find how many separators there are, which we will use when
|
||||
// figuring out how many groups there are.
|
||||
int num_separators = 0;
|
||||
|
||||
for (l = 0; l < itemcnt; l++)
|
||||
if (stl_items[l].stl_type == Middle)
|
||||
break;
|
||||
if (l < itemcnt)
|
||||
{
|
||||
int middlelength = (maxwidth - width) * MB_CHAR2LEN(fillchar);
|
||||
p = stl_items[l].stl_start + middlelength;
|
||||
STRMOVE(p, stl_items[l].stl_start);
|
||||
for (s = stl_items[l].stl_start; s < p;)
|
||||
MB_CHAR2BYTES(fillchar, s);
|
||||
for (l++; l < itemcnt; l++)
|
||||
stl_items[l].stl_start += middlelength;
|
||||
if (stl_items[l].stl_type == Separate)
|
||||
{
|
||||
// Create an array of the start location for each separator
|
||||
// mark.
|
||||
stl_separator_locations[num_separators] = l;
|
||||
num_separators++;
|
||||
}
|
||||
}
|
||||
|
||||
// If we have separated groups, then we deal with it now
|
||||
if (num_separators)
|
||||
{
|
||||
int standard_spaces;
|
||||
int final_spaces;
|
||||
|
||||
standard_spaces = (maxwidth - width) / num_separators;
|
||||
final_spaces = (maxwidth - width) -
|
||||
standard_spaces * (num_separators - 1);
|
||||
for (l = 0; l < num_separators; l++)
|
||||
{
|
||||
int dislocation = (l == (num_separators - 1)) ?
|
||||
final_spaces : standard_spaces;
|
||||
dislocation *= MB_CHAR2LEN(fillchar);
|
||||
char_u *start = stl_items[stl_separator_locations[l]].stl_start;
|
||||
char_u *seploc = start + dislocation;
|
||||
STRMOVE(seploc, start);
|
||||
for (s = start; s < seploc;)
|
||||
MB_CHAR2BYTES(fillchar, s);
|
||||
|
||||
for (int i = stl_separator_locations[l] + 1; i < itemcnt; i++)
|
||||
stl_items[i].stl_start += dislocation;
|
||||
}
|
||||
|
||||
width = maxwidth;
|
||||
}
|
||||
}
|
||||
@@ -5916,14 +5959,14 @@ buf_get_fname(buf_T *buf)
|
||||
void
|
||||
set_buflisted(int on)
|
||||
{
|
||||
if (on != curbuf->b_p_bl)
|
||||
{
|
||||
curbuf->b_p_bl = on;
|
||||
if (on)
|
||||
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, curbuf);
|
||||
else
|
||||
apply_autocmds(EVENT_BUFDELETE, NULL, NULL, FALSE, curbuf);
|
||||
}
|
||||
if (on == curbuf->b_p_bl)
|
||||
return;
|
||||
|
||||
curbuf->b_p_bl = on;
|
||||
if (on)
|
||||
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, curbuf);
|
||||
else
|
||||
apply_autocmds(EVENT_BUFDELETE, NULL, NULL, FALSE, curbuf);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
22
src/change.c
22
src/change.c
@@ -611,7 +611,9 @@ changed_common(
|
||||
{
|
||||
if (wp->w_lines[i].wl_lnum >= lnum)
|
||||
{
|
||||
if (wp->w_lines[i].wl_lnum < lnume)
|
||||
// Do not change wl_lnum at index zero, it is used to
|
||||
// compare with w_topline. Invalidate it instead.
|
||||
if (wp->w_lines[i].wl_lnum < lnume || i == 0)
|
||||
{
|
||||
// line included in change
|
||||
wp->w_lines[i].wl_valid = FALSE;
|
||||
@@ -772,14 +774,7 @@ appended_lines(linenr_T lnum, long count)
|
||||
void
|
||||
appended_lines_mark(linenr_T lnum, long count)
|
||||
{
|
||||
// Skip mark_adjust when adding a line after the last one, there can't
|
||||
// be marks there. But it's still needed in diff mode.
|
||||
if (lnum + count < curbuf->b_ml.ml_line_count
|
||||
#ifdef FEAT_DIFF
|
||||
|| curwin->w_p_diff
|
||||
#endif
|
||||
)
|
||||
mark_adjust(lnum + 1, (linenr_T)MAXLNUM, count, 0L);
|
||||
mark_adjust(lnum + 1, (linenr_T)MAXLNUM, count, 0L);
|
||||
changed_lines(lnum + 1, 0, lnum + 1, count);
|
||||
}
|
||||
|
||||
@@ -2142,14 +2137,7 @@ open_line(
|
||||
goto theend;
|
||||
// Postpone calling changed_lines(), because it would mess up folding
|
||||
// with markers.
|
||||
// Skip mark_adjust when adding a line after the last one, there can't
|
||||
// be marks there. But still needed in diff mode.
|
||||
if (curwin->w_cursor.lnum + 1 < curbuf->b_ml.ml_line_count
|
||||
#ifdef FEAT_DIFF
|
||||
|| curwin->w_p_diff
|
||||
#endif
|
||||
)
|
||||
mark_adjust(curwin->w_cursor.lnum + 1, (linenr_T)MAXLNUM, 1L, 0L);
|
||||
mark_adjust(curwin->w_cursor.lnum + 1, (linenr_T)MAXLNUM, 1L, 0L);
|
||||
did_append = TRUE;
|
||||
#ifdef FEAT_PROP_POPUP
|
||||
if ((State & MODE_INSERT) && (State & VREPLACE_FLAG) == 0)
|
||||
|
||||
@@ -979,11 +979,13 @@ channel_open(
|
||||
|
||||
ch_log(channel, "Trying to connect to %s port %d", dst, port);
|
||||
|
||||
// On Mac and Solaris a zero timeout almost never works. At least wait
|
||||
// one millisecond. Let's do it for all systems, because we don't know
|
||||
// why this is needed.
|
||||
// On Mac and Solaris a zero timeout almost never works. Waiting for
|
||||
// one millisecond already helps a lot. Later Mac systems (using IPv6)
|
||||
// need more time, 15 milliseconds appears to work well.
|
||||
// Let's do it for all systems, because we don't know why this is
|
||||
// needed.
|
||||
if (waittime == 0)
|
||||
waittime = 1;
|
||||
waittime = 15;
|
||||
|
||||
sd = channel_connect(channel, addr->ai_addr, (int)addr->ai_addrlen,
|
||||
&waittime);
|
||||
|
||||
@@ -345,24 +345,25 @@ transstr(char_u *s)
|
||||
}
|
||||
else
|
||||
res = alloc(vim_strsize(s) + 1);
|
||||
if (res != NULL)
|
||||
|
||||
if (res == NULL)
|
||||
return NULL;
|
||||
|
||||
*res = NUL;
|
||||
p = s;
|
||||
while (*p != NUL)
|
||||
{
|
||||
*res = NUL;
|
||||
p = s;
|
||||
while (*p != NUL)
|
||||
if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
|
||||
{
|
||||
if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
|
||||
{
|
||||
c = (*mb_ptr2char)(p);
|
||||
if (vim_isprintc(c))
|
||||
STRNCAT(res, p, l); // append printable multi-byte char
|
||||
else
|
||||
transchar_hex(res + STRLEN(res), c);
|
||||
p += l;
|
||||
}
|
||||
c = (*mb_ptr2char)(p);
|
||||
if (vim_isprintc(c))
|
||||
STRNCAT(res, p, l); // append printable multi-byte char
|
||||
else
|
||||
STRCAT(res, transchar_byte(*p++));
|
||||
transchar_hex(res + STRLEN(res), c);
|
||||
p += l;
|
||||
}
|
||||
else
|
||||
STRCAT(res, transchar_byte(*p++));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -522,22 +523,31 @@ transchar_buf(buf_T *buf, int c)
|
||||
|
||||
/*
|
||||
* Like transchar(), but called with a byte instead of a character. Checks
|
||||
* for an illegal UTF-8 byte.
|
||||
* for an illegal UTF-8 byte. Uses 'fileformat' of the current buffer.
|
||||
*/
|
||||
char_u *
|
||||
transchar_byte(int c)
|
||||
{
|
||||
if (enc_utf8 && c >= 0x80)
|
||||
{
|
||||
transchar_nonprint(curbuf, transchar_charbuf, c);
|
||||
return transchar_charbuf;
|
||||
}
|
||||
return transchar(c);
|
||||
return transchar_byte_buf(curbuf, c);
|
||||
}
|
||||
|
||||
/*
|
||||
* Like transchar_buf(), but called with a byte instead of a character. Checks
|
||||
* for an illegal UTF-8 byte. Uses 'fileformat' of "buf", unless it is NULL.
|
||||
*/
|
||||
char_u *
|
||||
transchar_byte_buf(buf_T *buf, int c)
|
||||
{
|
||||
if (enc_utf8 && c >= 0x80)
|
||||
{
|
||||
transchar_nonprint(buf, transchar_charbuf, c);
|
||||
return transchar_charbuf;
|
||||
}
|
||||
return transchar_buf(buf, c);
|
||||
}
|
||||
/*
|
||||
* Convert non-printable character to two or more printable characters in
|
||||
* "buf[]". "charbuf" needs to be able to hold five bytes.
|
||||
* "charbuf[]". "charbuf" needs to be able to hold five bytes.
|
||||
* Does NOT work for multi-byte characters, c must be <= 255.
|
||||
*/
|
||||
void
|
||||
@@ -545,7 +555,7 @@ transchar_nonprint(buf_T *buf, char_u *charbuf, int c)
|
||||
{
|
||||
if (c == NL)
|
||||
c = NUL; // we use newline in place of a NUL
|
||||
else if (c == CAR && get_fileformat(buf) == EOL_MAC)
|
||||
else if (buf != NULL && c == CAR && get_fileformat(buf) == EOL_MAC)
|
||||
c = NL; // we use CR in place of NL in this case
|
||||
|
||||
if (dy_flags & DY_UHEX) // 'display' has "uhex"
|
||||
@@ -812,6 +822,11 @@ win_linetabsize_cts(chartabsize_T *cts, colnr_T len)
|
||||
{
|
||||
(void)win_lbr_chartabsize(cts, NULL);
|
||||
cts->cts_vcol += cts->cts_cur_text_width;
|
||||
|
||||
// when properties are above or below the empty line must also be
|
||||
// counted
|
||||
if (cts->cts_prop_lines > 0)
|
||||
++cts->cts_vcol;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1151,6 +1166,8 @@ win_lbr_chartabsize(
|
||||
* First get the normal size, without 'linebreak' or text properties
|
||||
*/
|
||||
size = win_chartabsize(wp, s, vcol);
|
||||
if (*s == NUL)
|
||||
size = 0; // NUL is not displayed
|
||||
|
||||
# ifdef FEAT_PROP_POPUP
|
||||
if (cts->cts_has_prop_with_text)
|
||||
@@ -1181,7 +1198,7 @@ win_lbr_chartabsize(
|
||||
? col == 0
|
||||
: (s[0] == NUL || s[1] == NUL)
|
||||
&& cts->cts_with_trailing)))
|
||||
&& tp->tp_id - 1 < gap->ga_len)
|
||||
&& -tp->tp_id - 1 < gap->ga_len)
|
||||
{
|
||||
char_u *p = ((char_u **)gap->ga_data)[-tp->tp_id - 1];
|
||||
|
||||
@@ -1214,6 +1231,10 @@ win_lbr_chartabsize(
|
||||
tab_size = win_chartabsize(wp, s, vcol + size);
|
||||
size += tab_size;
|
||||
}
|
||||
if (tp->tp_col == MAXCOL && (tp->tp_flags
|
||||
& (TP_FLAG_ALIGN_ABOVE | TP_FLAG_ALIGN_BELOW)))
|
||||
// count extra line for property above/below
|
||||
++cts->cts_prop_lines;
|
||||
}
|
||||
}
|
||||
if (tp->tp_col != MAXCOL && tp->tp_col - 1 > col)
|
||||
|
||||
113
src/cindent.c
113
src/cindent.c
@@ -46,21 +46,21 @@ cin_is_cinword(char_u *line)
|
||||
|
||||
cinw_len = (int)STRLEN(curbuf->b_p_cinw) + 1;
|
||||
cinw_buf = alloc(cinw_len);
|
||||
if (cinw_buf != NULL)
|
||||
if (cinw_buf == NULL)
|
||||
return FALSE;
|
||||
|
||||
line = skipwhite(line);
|
||||
for (cinw = curbuf->b_p_cinw; *cinw; )
|
||||
{
|
||||
line = skipwhite(line);
|
||||
for (cinw = curbuf->b_p_cinw; *cinw; )
|
||||
len = copy_option_part(&cinw, cinw_buf, cinw_len, ",");
|
||||
if (STRNCMP(line, cinw_buf, len) == 0
|
||||
&& (!vim_iswordc(line[len]) || !vim_iswordc(line[len - 1])))
|
||||
{
|
||||
len = copy_option_part(&cinw, cinw_buf, cinw_len, ",");
|
||||
if (STRNCMP(line, cinw_buf, len) == 0
|
||||
&& (!vim_iswordc(line[len]) || !vim_iswordc(line[len - 1])))
|
||||
{
|
||||
retval = TRUE;
|
||||
break;
|
||||
}
|
||||
retval = TRUE;
|
||||
break;
|
||||
}
|
||||
vim_free(cinw_buf);
|
||||
}
|
||||
vim_free(cinw_buf);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -644,43 +644,42 @@ cin_islabel(void) // XXX
|
||||
if (cin_isscopedecl(s))
|
||||
return FALSE;
|
||||
|
||||
if (cin_islabel_skip(&s))
|
||||
if (!cin_islabel_skip(&s))
|
||||
return FALSE;
|
||||
|
||||
// Only accept a label if the previous line is terminated or is a case
|
||||
// label.
|
||||
pos_T cursor_save;
|
||||
pos_T *trypos;
|
||||
char_u *line;
|
||||
|
||||
cursor_save = curwin->w_cursor;
|
||||
while (curwin->w_cursor.lnum > 1)
|
||||
{
|
||||
// Only accept a label if the previous line is terminated or is a case
|
||||
// label.
|
||||
pos_T cursor_save;
|
||||
pos_T *trypos;
|
||||
char_u *line;
|
||||
--curwin->w_cursor.lnum;
|
||||
|
||||
cursor_save = curwin->w_cursor;
|
||||
while (curwin->w_cursor.lnum > 1)
|
||||
{
|
||||
--curwin->w_cursor.lnum;
|
||||
// If we're in a comment or raw string now, skip to the start of
|
||||
// it.
|
||||
curwin->w_cursor.col = 0;
|
||||
if ((trypos = ind_find_start_CORS(NULL)) != NULL) // XXX
|
||||
curwin->w_cursor = *trypos;
|
||||
|
||||
// If we're in a comment or raw string now, skip to the start of
|
||||
// it.
|
||||
curwin->w_cursor.col = 0;
|
||||
if ((trypos = ind_find_start_CORS(NULL)) != NULL) // XXX
|
||||
curwin->w_cursor = *trypos;
|
||||
line = ml_get_curline();
|
||||
if (cin_ispreproc(line)) // ignore #defines, #if, etc.
|
||||
continue;
|
||||
if (*(line = cin_skipcomment(line)) == NUL)
|
||||
continue;
|
||||
|
||||
line = ml_get_curline();
|
||||
if (cin_ispreproc(line)) // ignore #defines, #if, etc.
|
||||
continue;
|
||||
if (*(line = cin_skipcomment(line)) == NUL)
|
||||
continue;
|
||||
|
||||
curwin->w_cursor = cursor_save;
|
||||
if (cin_isterminated(line, TRUE, FALSE)
|
||||
|| cin_isscopedecl(line)
|
||||
|| cin_iscase(line, TRUE)
|
||||
|| (cin_islabel_skip(&line) && cin_nocode(line)))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
curwin->w_cursor = cursor_save;
|
||||
return TRUE; // label at start of file???
|
||||
if (cin_isterminated(line, TRUE, FALSE)
|
||||
|| cin_isscopedecl(line)
|
||||
|| cin_iscase(line, TRUE)
|
||||
|| (cin_islabel_skip(&line) && cin_nocode(line)))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
return FALSE;
|
||||
curwin->w_cursor = cursor_save;
|
||||
return TRUE; // label at start of file???
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1688,18 +1687,18 @@ find_match_paren_after_brace (int ind_maxparen) // XXX
|
||||
{
|
||||
pos_T *trypos = find_match_paren(ind_maxparen);
|
||||
|
||||
if (trypos != NULL)
|
||||
{
|
||||
pos_T *tryposBrace = find_start_brace();
|
||||
if (trypos == NULL)
|
||||
return NULL;
|
||||
|
||||
// If both an unmatched '(' and '{' is found. Ignore the '('
|
||||
// position if the '{' is further down.
|
||||
if (tryposBrace != NULL
|
||||
&& (trypos->lnum != tryposBrace->lnum
|
||||
? trypos->lnum < tryposBrace->lnum
|
||||
: trypos->col < tryposBrace->col))
|
||||
trypos = NULL;
|
||||
}
|
||||
pos_T *tryposBrace = find_start_brace();
|
||||
|
||||
// If both an unmatched '(' and '{' is found. Ignore the '('
|
||||
// position if the '{' is further down.
|
||||
if (tryposBrace != NULL
|
||||
&& (trypos->lnum != tryposBrace->lnum
|
||||
? trypos->lnum < tryposBrace->lnum
|
||||
: trypos->col < tryposBrace->col))
|
||||
trypos = NULL;
|
||||
return trypos;
|
||||
}
|
||||
|
||||
@@ -2642,7 +2641,7 @@ get_c_indent(void)
|
||||
|
||||
// It could have been something like
|
||||
// case 1: if (asdf &&
|
||||
// ldfd) {
|
||||
// condition) {
|
||||
// }
|
||||
if ((curbuf->b_ind_js || curbuf->b_ind_keep_case_label)
|
||||
&& cin_iscase(skipwhite(ml_get_curline()), FALSE))
|
||||
@@ -3276,7 +3275,7 @@ get_c_indent(void)
|
||||
}
|
||||
|
||||
// Check if we are after an "if", "while", etc.
|
||||
// Also allow " } else".
|
||||
// Also allow "} else".
|
||||
if (cin_is_cinword(l) || cin_iselse(skipwhite(l)))
|
||||
{
|
||||
// Found an unterminated line after an if (), line up
|
||||
@@ -3336,7 +3335,7 @@ get_c_indent(void)
|
||||
{
|
||||
// If we're looking at "} else", let's make sure we
|
||||
// find the opening brace of the enclosing scope,
|
||||
// not the one from "if () {".
|
||||
// not the one from "if (condition) {".
|
||||
if (*l == '}')
|
||||
curwin->w_cursor.col =
|
||||
(colnr_T)(l - ml_get_curline()) + 1;
|
||||
@@ -3681,7 +3680,7 @@ term_again:
|
||||
// line needs to be indented as a function type spec.
|
||||
// Don't do this if the current line looks like a comment or if the
|
||||
// current line is terminated, ie. ends in ';', or if the current line
|
||||
// contains { or }: "void f() {\n if (1)"
|
||||
// contains { or }: "void f(condition) {\n if (1)"
|
||||
if (cur_curpos.lnum < curbuf->b_ml.ml_line_count
|
||||
&& !cin_nocode(theline)
|
||||
&& vim_strchr(theline, '{') == NULL
|
||||
|
||||
@@ -157,22 +157,22 @@ serverConvert(
|
||||
char_u *res = data;
|
||||
|
||||
*tofree = NULL;
|
||||
if (client_enc != NULL && p_enc != NULL)
|
||||
{
|
||||
vimconv_T vimconv;
|
||||
if (client_enc == NULL || p_enc == NULL)
|
||||
return res;
|
||||
|
||||
vimconv.vc_type = CONV_NONE;
|
||||
if (convert_setup(&vimconv, client_enc, p_enc) != FAIL
|
||||
&& vimconv.vc_type != CONV_NONE)
|
||||
{
|
||||
res = string_convert(&vimconv, data, NULL);
|
||||
if (res == NULL)
|
||||
res = data;
|
||||
else
|
||||
*tofree = res;
|
||||
}
|
||||
convert_setup(&vimconv, NULL, NULL);
|
||||
vimconv_T vimconv;
|
||||
|
||||
vimconv.vc_type = CONV_NONE;
|
||||
if (convert_setup(&vimconv, client_enc, p_enc) != FAIL
|
||||
&& vimconv.vc_type != CONV_NONE)
|
||||
{
|
||||
res = string_convert(&vimconv, data, NULL);
|
||||
if (res == NULL)
|
||||
res = data;
|
||||
else
|
||||
*tofree = res;
|
||||
}
|
||||
convert_setup(&vimconv, NULL, NULL);
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
@@ -191,38 +191,38 @@ static char_u *build_drop_cmd(int filec, char **filev, int tabs, int sendReply);
|
||||
void
|
||||
exec_on_server(mparm_T *parmp)
|
||||
{
|
||||
if (parmp->serverName_arg == NULL || *parmp->serverName_arg != NUL)
|
||||
if (parmp->serverName_arg != NULL && *parmp->serverName_arg == NUL)
|
||||
return;
|
||||
|
||||
# ifdef MSWIN
|
||||
// Initialise the client/server messaging infrastructure.
|
||||
serverInitMessaging();
|
||||
# endif
|
||||
|
||||
/*
|
||||
* When a command server argument was found, execute it. This may
|
||||
* exit Vim when it was successful. Otherwise it's executed further
|
||||
* on. Remember the encoding used here in "serverStrEnc".
|
||||
*/
|
||||
if (parmp->serverArg)
|
||||
{
|
||||
# ifdef MSWIN
|
||||
// Initialise the client/server messaging infrastructure.
|
||||
serverInitMessaging();
|
||||
# endif
|
||||
|
||||
/*
|
||||
* When a command server argument was found, execute it. This may
|
||||
* exit Vim when it was successful. Otherwise it's executed further
|
||||
* on. Remember the encoding used here in "serverStrEnc".
|
||||
*/
|
||||
if (parmp->serverArg)
|
||||
{
|
||||
cmdsrv_main(&parmp->argc, parmp->argv,
|
||||
parmp->serverName_arg, &parmp->serverStr);
|
||||
parmp->serverStrEnc = vim_strsave(p_enc);
|
||||
}
|
||||
|
||||
// If we're still running, get the name to register ourselves.
|
||||
// On Win32 can register right now, for X11 need to setup the
|
||||
// clipboard first, it's further down.
|
||||
parmp->servername = serverMakeName(parmp->serverName_arg,
|
||||
parmp->argv[0]);
|
||||
# ifdef MSWIN
|
||||
if (parmp->servername != NULL)
|
||||
{
|
||||
serverSetName(parmp->servername);
|
||||
vim_free(parmp->servername);
|
||||
}
|
||||
# endif
|
||||
cmdsrv_main(&parmp->argc, parmp->argv,
|
||||
parmp->serverName_arg, &parmp->serverStr);
|
||||
parmp->serverStrEnc = vim_strsave(p_enc);
|
||||
}
|
||||
|
||||
// If we're still running, get the name to register ourselves.
|
||||
// On Win32 can register right now, for X11 need to setup the
|
||||
// clipboard first, it's further down.
|
||||
parmp->servername = serverMakeName(parmp->serverName_arg,
|
||||
parmp->argv[0]);
|
||||
# ifdef MSWIN
|
||||
if (parmp->servername != NULL)
|
||||
{
|
||||
serverSetName(parmp->servername);
|
||||
vim_free(parmp->servername);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -35,7 +35,7 @@ static int compl_match_arraysize;
|
||||
static int compl_startcol;
|
||||
static int compl_selected;
|
||||
|
||||
#define SHOW_FILE_TEXT(m) (showtail ? showmatches_gettail(matches[m]) : matches[m])
|
||||
#define SHOW_MATCH(m) (showtail ? showmatches_gettail(matches[m]) : matches[m])
|
||||
|
||||
/*
|
||||
* Returns TRUE if fuzzy completion is supported for a given cmdline completion
|
||||
@@ -56,6 +56,7 @@ cmdline_fuzzy_completion_supported(expand_T *xp)
|
||||
&& xp->xp_context != EXPAND_OLD_SETTING
|
||||
&& xp->xp_context != EXPAND_OWNSYNTAX
|
||||
&& xp->xp_context != EXPAND_PACKADD
|
||||
&& xp->xp_context != EXPAND_RUNTIME
|
||||
&& xp->xp_context != EXPAND_SHELLCMD
|
||||
&& xp->xp_context != EXPAND_TAGS
|
||||
&& xp->xp_context != EXPAND_TAGS_LISTFILES
|
||||
@@ -339,7 +340,7 @@ cmdline_pum_create(
|
||||
compl_match_array = ALLOC_MULT(pumitem_T, compl_match_arraysize);
|
||||
for (i = 0; i < numMatches; i++)
|
||||
{
|
||||
compl_match_array[i].pum_text = SHOW_FILE_TEXT(i);
|
||||
compl_match_array[i].pum_text = SHOW_MATCH(i);
|
||||
compl_match_array[i].pum_info = NULL;
|
||||
compl_match_array[i].pum_extra = NULL;
|
||||
compl_match_array[i].pum_kind = NULL;
|
||||
@@ -489,7 +490,6 @@ win_redr_status_matches(
|
||||
int match,
|
||||
int showtail)
|
||||
{
|
||||
#define L_MATCH(m) (showtail ? showmatches_gettail(matches[m]) : matches[m])
|
||||
int row;
|
||||
char_u *buf;
|
||||
int len;
|
||||
@@ -525,7 +525,7 @@ win_redr_status_matches(
|
||||
highlight = FALSE;
|
||||
}
|
||||
// count 1 for the ending ">"
|
||||
clen = status_match_len(xp, L_MATCH(match)) + 3;
|
||||
clen = status_match_len(xp, SHOW_MATCH(match)) + 3;
|
||||
if (match == 0)
|
||||
first_match = 0;
|
||||
else if (match < first_match)
|
||||
@@ -538,7 +538,7 @@ win_redr_status_matches(
|
||||
{
|
||||
// check if match fits on the screen
|
||||
for (i = first_match; i < match; ++i)
|
||||
clen += status_match_len(xp, L_MATCH(i)) + 2;
|
||||
clen += status_match_len(xp, SHOW_MATCH(i)) + 2;
|
||||
if (first_match > 0)
|
||||
clen += 2;
|
||||
// jumping right, put match at the left
|
||||
@@ -549,7 +549,7 @@ win_redr_status_matches(
|
||||
clen = 2;
|
||||
for (i = match; i < num_matches; ++i)
|
||||
{
|
||||
clen += status_match_len(xp, L_MATCH(i)) + 2;
|
||||
clen += status_match_len(xp, SHOW_MATCH(i)) + 2;
|
||||
if ((long)clen >= Columns)
|
||||
break;
|
||||
}
|
||||
@@ -560,7 +560,7 @@ win_redr_status_matches(
|
||||
if (add_left)
|
||||
while (first_match > 0)
|
||||
{
|
||||
clen += status_match_len(xp, L_MATCH(first_match - 1)) + 2;
|
||||
clen += status_match_len(xp, SHOW_MATCH(first_match - 1)) + 2;
|
||||
if ((long)clen >= Columns)
|
||||
break;
|
||||
--first_match;
|
||||
@@ -581,7 +581,7 @@ win_redr_status_matches(
|
||||
clen = len;
|
||||
|
||||
i = first_match;
|
||||
while ((long)(clen + status_match_len(xp, L_MATCH(i)) + 2) < Columns)
|
||||
while ((long)(clen + status_match_len(xp, SHOW_MATCH(i)) + 2) < Columns)
|
||||
{
|
||||
if (i == match)
|
||||
{
|
||||
@@ -589,7 +589,7 @@ win_redr_status_matches(
|
||||
selstart_col = clen;
|
||||
}
|
||||
|
||||
s = L_MATCH(i);
|
||||
s = SHOW_MATCH(i);
|
||||
// Check for menu separators - replace with '|'
|
||||
#ifdef FEAT_MENU
|
||||
emenu = (xp->xp_context == EXPAND_MENUS
|
||||
@@ -1129,7 +1129,7 @@ showmatches_oneline(
|
||||
// Expansion was done here, file names are literal.
|
||||
isdir = mch_isdir(matches[j]);
|
||||
if (showtail)
|
||||
p = SHOW_FILE_TEXT(j);
|
||||
p = SHOW_MATCH(j);
|
||||
else
|
||||
{
|
||||
home_replace(NULL, matches[j], NameBuff, MAXPATHL,
|
||||
@@ -1140,7 +1140,7 @@ showmatches_oneline(
|
||||
else
|
||||
{
|
||||
isdir = FALSE;
|
||||
p = SHOW_FILE_TEXT(j);
|
||||
p = SHOW_MATCH(j);
|
||||
}
|
||||
lastlen = msg_outtrans_attr(p, isdir ? dir_attr : 0);
|
||||
}
|
||||
@@ -1219,7 +1219,7 @@ showmatches(expand_T *xp, int wildmenu UNUSED)
|
||||
j = vim_strsize(NameBuff);
|
||||
}
|
||||
else
|
||||
j = vim_strsize(SHOW_FILE_TEXT(i));
|
||||
j = vim_strsize(SHOW_MATCH(i));
|
||||
if (j > maxlen)
|
||||
maxlen = j;
|
||||
}
|
||||
@@ -1367,6 +1367,7 @@ addstar(
|
||||
|| context == EXPAND_OWNSYNTAX
|
||||
|| context == EXPAND_FILETYPE
|
||||
|| context == EXPAND_PACKADD
|
||||
|| context == EXPAND_RUNTIME
|
||||
|| ((context == EXPAND_TAGS_LISTFILES
|
||||
|| context == EXPAND_TAGS)
|
||||
&& fname[0] == '/'))
|
||||
@@ -1851,21 +1852,22 @@ find_cmd_after_substitute_cmd(char_u *arg)
|
||||
find_cmd_after_isearch_cmd(expand_T *xp, char_u *arg)
|
||||
{
|
||||
arg = skipwhite(skipdigits(arg)); // skip count
|
||||
if (*arg == '/') // Match regexp, not just whole words
|
||||
{
|
||||
for (++arg; *arg && *arg != '/'; arg++)
|
||||
if (*arg == '\\' && arg[1] != NUL)
|
||||
arg++;
|
||||
if (*arg)
|
||||
{
|
||||
arg = skipwhite(arg + 1);
|
||||
if (*arg != '/')
|
||||
return NULL;
|
||||
|
||||
// Check for trailing illegal characters
|
||||
if (*arg == NUL || vim_strchr((char_u *)"|\"\n", *arg) == NULL)
|
||||
xp->xp_context = EXPAND_NOTHING;
|
||||
else
|
||||
return arg;
|
||||
}
|
||||
// Match regexp, not just whole words
|
||||
for (++arg; *arg && *arg != '/'; arg++)
|
||||
if (*arg == '\\' && arg[1] != NUL)
|
||||
arg++;
|
||||
if (*arg)
|
||||
{
|
||||
arg = skipwhite(arg + 1);
|
||||
|
||||
// Check for trailing illegal characters
|
||||
if (*arg == NUL || vim_strchr((char_u *)"|\"\n", *arg) == NULL)
|
||||
xp->xp_context = EXPAND_NOTHING;
|
||||
else
|
||||
return arg;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -2332,6 +2334,10 @@ set_context_by_cmdname(
|
||||
xp->xp_pattern = arg;
|
||||
break;
|
||||
|
||||
case CMD_runtime:
|
||||
set_context_in_runtime_cmd(xp, arg);
|
||||
break;
|
||||
|
||||
#if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
|
||||
case CMD_language:
|
||||
return set_context_in_lang_cmd(xp, arg);
|
||||
@@ -2781,7 +2787,7 @@ get_breakadd_arg(expand_T *xp UNUSED, int idx)
|
||||
{
|
||||
char *opts[] = {"expr", "file", "func", "here"};
|
||||
|
||||
if (idx >=0 && idx <= 3)
|
||||
if (idx >= 0 && idx <= 3)
|
||||
{
|
||||
// breakadd {expr, file, func, here}
|
||||
if (breakpt_expand_what == EXP_BREAKPT_ADD)
|
||||
@@ -3040,6 +3046,8 @@ ExpandFromContext(
|
||||
#endif
|
||||
if (xp->xp_context == EXPAND_PACKADD)
|
||||
return ExpandPackAddDir(pat, numMatches, matches);
|
||||
if (xp->xp_context == EXPAND_RUNTIME)
|
||||
return expand_runtime_cmd(pat, numMatches, matches);
|
||||
|
||||
// When expanding a function name starting with s:, match the <SNR>nr_
|
||||
// prefix.
|
||||
@@ -3599,13 +3607,15 @@ ExpandUserList(
|
||||
/*
|
||||
* Expand "file" for all comma-separated directories in "path".
|
||||
* Adds the matches to "ga". Caller must init "ga".
|
||||
* If "dirs" is TRUE only expand directory names.
|
||||
*/
|
||||
void
|
||||
globpath(
|
||||
char_u *path,
|
||||
char_u *file,
|
||||
garray_T *ga,
|
||||
int expand_options)
|
||||
int expand_options,
|
||||
int dirs)
|
||||
{
|
||||
expand_T xpc;
|
||||
char_u *buf;
|
||||
@@ -3618,7 +3628,7 @@ globpath(
|
||||
return;
|
||||
|
||||
ExpandInit(&xpc);
|
||||
xpc.xp_context = EXPAND_FILES;
|
||||
xpc.xp_context = dirs ? EXPAND_DIRECTORIES : EXPAND_FILES;
|
||||
|
||||
// Loop over all entries in {path}.
|
||||
while (*path != NUL)
|
||||
@@ -4025,6 +4035,11 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
|
||||
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
|
||||
}
|
||||
# endif
|
||||
if (xpc.xp_context == EXPAND_RUNTIME)
|
||||
{
|
||||
set_context_in_runtime_cmd(&xpc, xpc.xp_pattern);
|
||||
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
|
||||
}
|
||||
}
|
||||
|
||||
if (cmdline_fuzzy_completion_supported(&xpc))
|
||||
|
||||
@@ -460,44 +460,46 @@ del_history_entry(int histype, char_u *str)
|
||||
int last;
|
||||
int found = FALSE;
|
||||
|
||||
regmatch.regprog = NULL;
|
||||
if (hislen == 0 || histype < 0 || histype >= HIST_COUNT || *str == NUL
|
||||
|| hisidx[histype] < 0)
|
||||
return FALSE;
|
||||
|
||||
idx = hisidx[histype];
|
||||
regmatch.regprog = vim_regcomp(str, RE_MAGIC + RE_STRING);
|
||||
if (regmatch.regprog == NULL)
|
||||
return FALSE;
|
||||
|
||||
regmatch.rm_ic = FALSE; // always match case
|
||||
if (hislen != 0
|
||||
&& histype >= 0
|
||||
&& histype < HIST_COUNT
|
||||
&& *str != NUL
|
||||
&& (idx = hisidx[histype]) >= 0
|
||||
&& (regmatch.regprog = vim_regcomp(str, RE_MAGIC + RE_STRING))
|
||||
!= NULL)
|
||||
|
||||
i = last = idx;
|
||||
do
|
||||
{
|
||||
i = last = idx;
|
||||
do
|
||||
hisptr = &history[histype][i];
|
||||
if (hisptr->hisstr == NULL)
|
||||
break;
|
||||
if (vim_regexec(®match, hisptr->hisstr, (colnr_T)0))
|
||||
{
|
||||
hisptr = &history[histype][i];
|
||||
if (hisptr->hisstr == NULL)
|
||||
break;
|
||||
if (vim_regexec(®match, hisptr->hisstr, (colnr_T)0))
|
||||
found = TRUE;
|
||||
vim_free(hisptr->hisstr);
|
||||
clear_hist_entry(hisptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i != last)
|
||||
{
|
||||
found = TRUE;
|
||||
vim_free(hisptr->hisstr);
|
||||
history[histype][last] = *hisptr;
|
||||
clear_hist_entry(hisptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i != last)
|
||||
{
|
||||
history[histype][last] = *hisptr;
|
||||
clear_hist_entry(hisptr);
|
||||
}
|
||||
if (--last < 0)
|
||||
last += hislen;
|
||||
}
|
||||
if (--i < 0)
|
||||
i += hislen;
|
||||
} while (i != idx);
|
||||
if (history[histype][idx].hisstr == NULL)
|
||||
hisidx[histype] = -1;
|
||||
}
|
||||
if (--last < 0)
|
||||
last += hislen;
|
||||
}
|
||||
if (--i < 0)
|
||||
i += hislen;
|
||||
} while (i != idx);
|
||||
|
||||
if (history[histype][idx].hisstr == NULL)
|
||||
hisidx[histype] = -1;
|
||||
|
||||
vim_regfree(regmatch.regprog);
|
||||
return found;
|
||||
}
|
||||
|
||||
@@ -236,6 +236,7 @@
|
||||
|
||||
/* Define if you have the header file: */
|
||||
#undef HAVE_DIRENT_H
|
||||
#undef HAVE_DISPATCH_DISPATCH_H
|
||||
#undef HAVE_ERRNO_H
|
||||
#undef HAVE_FCNTL_H
|
||||
#undef HAVE_FRAME_H
|
||||
|
||||
@@ -314,6 +314,8 @@ fi
|
||||
dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon
|
||||
dnl so we need to include it to have access to version macros.
|
||||
AC_CHECK_HEADERS(AvailabilityMacros.h)
|
||||
# 10.5 and earlier lack dispatch
|
||||
AC_CHECK_HEADERS(dispatch/dispatch.h)
|
||||
|
||||
AC_SUBST(OS_EXTRA_SRC)
|
||||
AC_SUBST(OS_EXTRA_OBJ)
|
||||
@@ -4586,8 +4588,8 @@ if test "$GCC" = yes; then
|
||||
dnl And undefine it first to avoid a warning.
|
||||
AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1)
|
||||
if test "$gccmajor" -gt "3"; then
|
||||
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
|
||||
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'`
|
||||
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
|
||||
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g'`
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
|
||||
@@ -60,7 +60,8 @@ make_crc_tab(void)
|
||||
/*
|
||||
* Return the next byte in the pseudo-random sequence.
|
||||
*/
|
||||
#define DECRYPT_BYTE_ZIP(keys, t) { \
|
||||
#define DECRYPT_BYTE_ZIP(keys, t) \
|
||||
{ \
|
||||
short_u temp = (short_u)keys[2] | 2; \
|
||||
t = (int)(((unsigned)(temp * (temp ^ 1U)) >> 8) & 0xff); \
|
||||
}
|
||||
|
||||
187
src/debugger.c
187
src/debugger.c
@@ -315,14 +315,14 @@ get_maxbacktrace_level(char_u *sname)
|
||||
char *p, *q;
|
||||
int maxbacktrace = 0;
|
||||
|
||||
if (sname != NULL)
|
||||
if (sname == NULL)
|
||||
return 0;
|
||||
|
||||
p = (char *)sname;
|
||||
while ((q = strstr(p, "..")) != NULL)
|
||||
{
|
||||
p = (char *)sname;
|
||||
while ((q = strstr(p, "..")) != NULL)
|
||||
{
|
||||
p = q + 2;
|
||||
maxbacktrace++;
|
||||
}
|
||||
p = q + 2;
|
||||
maxbacktrace++;
|
||||
}
|
||||
return maxbacktrace;
|
||||
}
|
||||
@@ -486,21 +486,20 @@ dbg_check_skipped(exarg_T *eap)
|
||||
{
|
||||
int prev_got_int;
|
||||
|
||||
if (debug_skipped)
|
||||
{
|
||||
// Save the value of got_int and reset it. We don't want a previous
|
||||
// interruption cause flushing the input buffer.
|
||||
prev_got_int = got_int;
|
||||
got_int = FALSE;
|
||||
debug_breakpoint_name = debug_skipped_name;
|
||||
// eap->skip is TRUE
|
||||
eap->skip = FALSE;
|
||||
(void)dbg_check_breakpoint(eap);
|
||||
eap->skip = TRUE;
|
||||
got_int |= prev_got_int;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
if (!debug_skipped)
|
||||
return FALSE;
|
||||
|
||||
// Save the value of got_int and reset it. We don't want a previous
|
||||
// interruption cause flushing the input buffer.
|
||||
prev_got_int = got_int;
|
||||
got_int = FALSE;
|
||||
debug_breakpoint_name = debug_skipped_name;
|
||||
// eap->skip is TRUE
|
||||
eap->skip = FALSE;
|
||||
(void)dbg_check_breakpoint(eap);
|
||||
eap->skip = TRUE;
|
||||
got_int |= prev_got_int;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -682,44 +681,44 @@ ex_breakadd(exarg_T *eap)
|
||||
gap = &prof_ga;
|
||||
#endif
|
||||
|
||||
if (dbg_parsearg(eap->arg, gap) == OK)
|
||||
{
|
||||
bp = &DEBUGGY(gap, gap->ga_len);
|
||||
bp->dbg_forceit = eap->forceit;
|
||||
if (dbg_parsearg(eap->arg, gap) != OK)
|
||||
return;
|
||||
|
||||
if (bp->dbg_type != DBG_EXPR)
|
||||
bp = &DEBUGGY(gap, gap->ga_len);
|
||||
bp->dbg_forceit = eap->forceit;
|
||||
|
||||
if (bp->dbg_type != DBG_EXPR)
|
||||
{
|
||||
pat = file_pat_to_reg_pat(bp->dbg_name, NULL, NULL, FALSE);
|
||||
if (pat != NULL)
|
||||
{
|
||||
pat = file_pat_to_reg_pat(bp->dbg_name, NULL, NULL, FALSE);
|
||||
if (pat != NULL)
|
||||
{
|
||||
bp->dbg_prog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
|
||||
vim_free(pat);
|
||||
}
|
||||
if (pat == NULL || bp->dbg_prog == NULL)
|
||||
vim_free(bp->dbg_name);
|
||||
else
|
||||
{
|
||||
if (bp->dbg_lnum == 0) // default line number is 1
|
||||
bp->dbg_lnum = 1;
|
||||
#ifdef FEAT_PROFILE
|
||||
if (eap->cmdidx != CMD_profile)
|
||||
#endif
|
||||
{
|
||||
DEBUGGY(gap, gap->ga_len).dbg_nr = ++last_breakp;
|
||||
++debug_tick;
|
||||
}
|
||||
++gap->ga_len;
|
||||
}
|
||||
bp->dbg_prog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
|
||||
vim_free(pat);
|
||||
}
|
||||
if (pat == NULL || bp->dbg_prog == NULL)
|
||||
vim_free(bp->dbg_name);
|
||||
else
|
||||
{
|
||||
// DBG_EXPR
|
||||
DEBUGGY(gap, gap->ga_len++).dbg_nr = ++last_breakp;
|
||||
++debug_tick;
|
||||
if (gap == &dbg_breakp)
|
||||
has_expr_breakpoint = TRUE;
|
||||
if (bp->dbg_lnum == 0) // default line number is 1
|
||||
bp->dbg_lnum = 1;
|
||||
#ifdef FEAT_PROFILE
|
||||
if (eap->cmdidx != CMD_profile)
|
||||
#endif
|
||||
{
|
||||
DEBUGGY(gap, gap->ga_len).dbg_nr = ++last_breakp;
|
||||
++debug_tick;
|
||||
}
|
||||
++gap->ga_len;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// DBG_EXPR
|
||||
DEBUGGY(gap, gap->ga_len++).dbg_nr = ++last_breakp;
|
||||
++debug_tick;
|
||||
if (gap == &dbg_breakp)
|
||||
has_expr_breakpoint = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -822,36 +821,37 @@ ex_breakdel(exarg_T *eap)
|
||||
}
|
||||
|
||||
if (todel < 0)
|
||||
semsg(_(e_breakpoint_not_found_str), eap->arg);
|
||||
else
|
||||
{
|
||||
while (gap->ga_len > 0)
|
||||
{
|
||||
vim_free(DEBUGGY(gap, todel).dbg_name);
|
||||
#ifdef FEAT_EVAL
|
||||
if (DEBUGGY(gap, todel).dbg_type == DBG_EXPR
|
||||
&& DEBUGGY(gap, todel).dbg_val != NULL)
|
||||
free_tv(DEBUGGY(gap, todel).dbg_val);
|
||||
#endif
|
||||
vim_regfree(DEBUGGY(gap, todel).dbg_prog);
|
||||
--gap->ga_len;
|
||||
if (todel < gap->ga_len)
|
||||
mch_memmove(&DEBUGGY(gap, todel), &DEBUGGY(gap, todel + 1),
|
||||
(gap->ga_len - todel) * sizeof(struct debuggy));
|
||||
#ifdef FEAT_PROFILE
|
||||
if (eap->cmdidx == CMD_breakdel)
|
||||
#endif
|
||||
++debug_tick;
|
||||
if (!del_all)
|
||||
break;
|
||||
}
|
||||
|
||||
// If all breakpoints were removed clear the array.
|
||||
if (gap->ga_len == 0)
|
||||
ga_clear(gap);
|
||||
if (gap == &dbg_breakp)
|
||||
update_has_expr_breakpoint();
|
||||
semsg(_(e_breakpoint_not_found_str), eap->arg);
|
||||
return;
|
||||
}
|
||||
|
||||
while (gap->ga_len > 0)
|
||||
{
|
||||
vim_free(DEBUGGY(gap, todel).dbg_name);
|
||||
#ifdef FEAT_EVAL
|
||||
if (DEBUGGY(gap, todel).dbg_type == DBG_EXPR
|
||||
&& DEBUGGY(gap, todel).dbg_val != NULL)
|
||||
free_tv(DEBUGGY(gap, todel).dbg_val);
|
||||
#endif
|
||||
vim_regfree(DEBUGGY(gap, todel).dbg_prog);
|
||||
--gap->ga_len;
|
||||
if (todel < gap->ga_len)
|
||||
mch_memmove(&DEBUGGY(gap, todel), &DEBUGGY(gap, todel + 1),
|
||||
(gap->ga_len - todel) * sizeof(struct debuggy));
|
||||
#ifdef FEAT_PROFILE
|
||||
if (eap->cmdidx == CMD_breakdel)
|
||||
#endif
|
||||
++debug_tick;
|
||||
if (!del_all)
|
||||
break;
|
||||
}
|
||||
|
||||
// If all breakpoints were removed clear the array.
|
||||
if (gap->ga_len == 0)
|
||||
ga_clear(gap);
|
||||
if (gap == &dbg_breakp)
|
||||
update_has_expr_breakpoint();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -864,23 +864,26 @@ ex_breaklist(exarg_T *eap UNUSED)
|
||||
int i;
|
||||
|
||||
if (dbg_breakp.ga_len == 0)
|
||||
{
|
||||
msg(_("No breakpoints defined"));
|
||||
else
|
||||
for (i = 0; i < dbg_breakp.ga_len; ++i)
|
||||
{
|
||||
bp = &BREAKP(i);
|
||||
if (bp->dbg_type == DBG_FILE)
|
||||
home_replace(NULL, bp->dbg_name, NameBuff, MAXPATHL, TRUE);
|
||||
if (bp->dbg_type != DBG_EXPR)
|
||||
smsg(_("%3d %s %s line %ld"),
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < dbg_breakp.ga_len; ++i)
|
||||
{
|
||||
bp = &BREAKP(i);
|
||||
if (bp->dbg_type == DBG_FILE)
|
||||
home_replace(NULL, bp->dbg_name, NameBuff, MAXPATHL, TRUE);
|
||||
if (bp->dbg_type != DBG_EXPR)
|
||||
smsg(_("%3d %s %s line %ld"),
|
||||
bp->dbg_nr,
|
||||
bp->dbg_type == DBG_FUNC ? "func" : "file",
|
||||
bp->dbg_type == DBG_FUNC ? bp->dbg_name : NameBuff,
|
||||
(long)bp->dbg_lnum);
|
||||
else
|
||||
smsg(_("%3d expr %s"),
|
||||
else
|
||||
smsg(_("%3d expr %s"),
|
||||
bp->dbg_nr, bp->dbg_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
222
src/dict.c
222
src/dict.c
@@ -30,21 +30,21 @@ dict_alloc(void)
|
||||
dict_T *d;
|
||||
|
||||
d = ALLOC_CLEAR_ONE(dict_T);
|
||||
if (d != NULL)
|
||||
{
|
||||
// Add the dict to the list of dicts for garbage collection.
|
||||
if (first_dict != NULL)
|
||||
first_dict->dv_used_prev = d;
|
||||
d->dv_used_next = first_dict;
|
||||
d->dv_used_prev = NULL;
|
||||
first_dict = d;
|
||||
if (d == NULL)
|
||||
return NULL;
|
||||
|
||||
hash_init(&d->dv_hashtab);
|
||||
d->dv_lock = 0;
|
||||
d->dv_scope = 0;
|
||||
d->dv_refcount = 0;
|
||||
d->dv_copyID = 0;
|
||||
}
|
||||
// Add the dict to the list of dicts for garbage collection.
|
||||
if (first_dict != NULL)
|
||||
first_dict->dv_used_prev = d;
|
||||
d->dv_used_next = first_dict;
|
||||
d->dv_used_prev = NULL;
|
||||
first_dict = d;
|
||||
|
||||
hash_init(&d->dv_hashtab);
|
||||
d->dv_lock = 0;
|
||||
d->dv_scope = 0;
|
||||
d->dv_refcount = 0;
|
||||
d->dv_copyID = 0;
|
||||
return d;
|
||||
}
|
||||
|
||||
@@ -228,13 +228,13 @@ dictitem_alloc(char_u *key)
|
||||
size_t len = STRLEN(key);
|
||||
|
||||
di = alloc(offsetof(dictitem_T, di_key) + len + 1);
|
||||
if (di != NULL)
|
||||
{
|
||||
mch_memmove(di->di_key, key, len + 1);
|
||||
di->di_flags = DI_FLAGS_ALLOC;
|
||||
di->di_tv.v_lock = 0;
|
||||
di->di_tv.v_type = VAR_UNKNOWN;
|
||||
}
|
||||
if (di == NULL)
|
||||
return NULL;
|
||||
|
||||
mch_memmove(di->di_key, key, len + 1);
|
||||
di->di_flags = DI_FLAGS_ALLOC;
|
||||
di->di_tv.v_lock = 0;
|
||||
di->di_tv.v_type = VAR_UNKNOWN;
|
||||
return di;
|
||||
}
|
||||
|
||||
@@ -248,12 +248,12 @@ dictitem_copy(dictitem_T *org)
|
||||
size_t len = STRLEN(org->di_key);
|
||||
|
||||
di = alloc(offsetof(dictitem_T, di_key) + len + 1);
|
||||
if (di != NULL)
|
||||
{
|
||||
mch_memmove(di->di_key, org->di_key, len + 1);
|
||||
di->di_flags = DI_FLAGS_ALLOC;
|
||||
copy_tv(&org->di_tv, &di->di_tv);
|
||||
}
|
||||
if (di == NULL)
|
||||
return NULL;
|
||||
|
||||
mch_memmove(di->di_key, org->di_key, len + 1);
|
||||
di->di_flags = DI_FLAGS_ALLOC;
|
||||
copy_tv(&org->di_tv, &di->di_tv);
|
||||
return di;
|
||||
}
|
||||
|
||||
@@ -303,53 +303,53 @@ dict_copy(dict_T *orig, int deep, int top, int copyID)
|
||||
return NULL;
|
||||
|
||||
copy = dict_alloc();
|
||||
if (copy != NULL)
|
||||
if (copy == NULL)
|
||||
return NULL;
|
||||
|
||||
if (copyID != 0)
|
||||
{
|
||||
if (copyID != 0)
|
||||
{
|
||||
orig->dv_copyID = copyID;
|
||||
orig->dv_copydict = copy;
|
||||
}
|
||||
if (orig->dv_type == NULL || top || deep)
|
||||
copy->dv_type = NULL;
|
||||
else
|
||||
copy->dv_type = alloc_type(orig->dv_type);
|
||||
orig->dv_copyID = copyID;
|
||||
orig->dv_copydict = copy;
|
||||
}
|
||||
if (orig->dv_type == NULL || top || deep)
|
||||
copy->dv_type = NULL;
|
||||
else
|
||||
copy->dv_type = alloc_type(orig->dv_type);
|
||||
|
||||
todo = (int)orig->dv_hashtab.ht_used;
|
||||
for (hi = orig->dv_hashtab.ht_array; todo > 0 && !got_int; ++hi)
|
||||
todo = (int)orig->dv_hashtab.ht_used;
|
||||
for (hi = orig->dv_hashtab.ht_array; todo > 0 && !got_int; ++hi)
|
||||
{
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
{
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
--todo;
|
||||
|
||||
di = dictitem_alloc(hi->hi_key);
|
||||
if (di == NULL)
|
||||
break;
|
||||
if (deep)
|
||||
{
|
||||
--todo;
|
||||
|
||||
di = dictitem_alloc(hi->hi_key);
|
||||
if (di == NULL)
|
||||
break;
|
||||
if (deep)
|
||||
if (item_copy(&HI2DI(hi)->di_tv, &di->di_tv,
|
||||
deep, FALSE, copyID) == FAIL)
|
||||
{
|
||||
if (item_copy(&HI2DI(hi)->di_tv, &di->di_tv,
|
||||
deep, FALSE, copyID) == FAIL)
|
||||
{
|
||||
vim_free(di);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
copy_tv(&HI2DI(hi)->di_tv, &di->di_tv);
|
||||
if (dict_add(copy, di) == FAIL)
|
||||
{
|
||||
dictitem_free(di);
|
||||
vim_free(di);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
copy_tv(&HI2DI(hi)->di_tv, &di->di_tv);
|
||||
if (dict_add(copy, di) == FAIL)
|
||||
{
|
||||
dictitem_free(di);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
++copy->dv_refcount;
|
||||
if (todo > 0)
|
||||
{
|
||||
dict_unref(copy);
|
||||
copy = NULL;
|
||||
}
|
||||
++copy->dv_refcount;
|
||||
if (todo > 0)
|
||||
{
|
||||
dict_unref(copy);
|
||||
copy = NULL;
|
||||
}
|
||||
|
||||
return copy;
|
||||
@@ -982,7 +982,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
|
||||
if (*skipwhite(*arg) == ':')
|
||||
semsg(_(e_no_white_space_allowed_before_str_str), ":", *arg);
|
||||
else
|
||||
semsg(_(e_missing_colon_in_dictionary), *arg);
|
||||
semsg(_(e_missing_colon_in_dictionary_str), *arg);
|
||||
clear_tv(&tvkey);
|
||||
goto failret;
|
||||
}
|
||||
@@ -1020,7 +1020,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
|
||||
item = dict_find(d, key, -1);
|
||||
if (item != NULL)
|
||||
{
|
||||
semsg(_(e_duplicate_key_in_dictionary), key);
|
||||
semsg(_(e_duplicate_key_in_dictionary_str), key);
|
||||
clear_tv(&tvkey);
|
||||
clear_tv(&tv);
|
||||
goto failret;
|
||||
@@ -1060,7 +1060,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
|
||||
if (**arg == ',')
|
||||
semsg(_(e_no_white_space_allowed_before_str_str), ",", *arg);
|
||||
else
|
||||
semsg(_(e_missing_comma_in_dictionary), *arg);
|
||||
semsg(_(e_missing_comma_in_dictionary_str), *arg);
|
||||
goto failret;
|
||||
}
|
||||
}
|
||||
@@ -1068,7 +1068,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
|
||||
if (**arg != '}')
|
||||
{
|
||||
if (evalarg != NULL)
|
||||
semsg(_(e_missing_dict_end), *arg);
|
||||
semsg(_(e_missing_dict_end_str), *arg);
|
||||
failret:
|
||||
if (d != NULL)
|
||||
dict_free(d);
|
||||
@@ -1270,50 +1270,52 @@ dict_extend_func(
|
||||
return;
|
||||
}
|
||||
d2 = argvars[1].vval.v_dict;
|
||||
if ((is_new || !value_check_lock(d1->dv_lock, arg_errmsg, TRUE))
|
||||
&& d2 != NULL)
|
||||
if (d2 == NULL)
|
||||
return;
|
||||
|
||||
if (!is_new && value_check_lock(d1->dv_lock, arg_errmsg, TRUE))
|
||||
return;
|
||||
|
||||
if (is_new)
|
||||
{
|
||||
if (is_new)
|
||||
{
|
||||
d1 = dict_copy(d1, FALSE, TRUE, get_copyID());
|
||||
if (d1 == NULL)
|
||||
return;
|
||||
}
|
||||
|
||||
// Check the third argument.
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
static char *(av[]) = {"keep", "force", "error"};
|
||||
|
||||
action = tv_get_string_chk(&argvars[2]);
|
||||
if (action == NULL)
|
||||
return;
|
||||
for (i = 0; i < 3; ++i)
|
||||
if (STRCMP(action, av[i]) == 0)
|
||||
break;
|
||||
if (i == 3)
|
||||
{
|
||||
semsg(_(e_invalid_argument_str), action);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
action = (char_u *)"force";
|
||||
|
||||
if (type != NULL && check_typval_arg_type(type, &argvars[1],
|
||||
func_name, 2) == FAIL)
|
||||
d1 = dict_copy(d1, FALSE, TRUE, get_copyID());
|
||||
if (d1 == NULL)
|
||||
return;
|
||||
dict_extend(d1, d2, action, func_name);
|
||||
|
||||
if (is_new)
|
||||
{
|
||||
rettv->v_type = VAR_DICT;
|
||||
rettv->vval.v_dict = d1;
|
||||
rettv->v_lock = FALSE;
|
||||
}
|
||||
else
|
||||
copy_tv(&argvars[0], rettv);
|
||||
}
|
||||
|
||||
// Check the third argument.
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
static char *(av[]) = {"keep", "force", "error"};
|
||||
|
||||
action = tv_get_string_chk(&argvars[2]);
|
||||
if (action == NULL)
|
||||
return;
|
||||
for (i = 0; i < 3; ++i)
|
||||
if (STRCMP(action, av[i]) == 0)
|
||||
break;
|
||||
if (i == 3)
|
||||
{
|
||||
semsg(_(e_invalid_argument_str), action);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
action = (char_u *)"force";
|
||||
|
||||
if (type != NULL && check_typval_arg_type(type, &argvars[1],
|
||||
func_name, 2) == FAIL)
|
||||
return;
|
||||
dict_extend(d1, d2, action, func_name);
|
||||
|
||||
if (is_new)
|
||||
{
|
||||
rettv->v_type = VAR_DICT;
|
||||
rettv->vval.v_dict = d1;
|
||||
rettv->v_lock = FALSE;
|
||||
}
|
||||
else
|
||||
copy_tv(&argvars[0], rettv);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1454,7 +1456,7 @@ dict_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg)
|
||||
di = dict_find(d, key, -1);
|
||||
if (di == NULL)
|
||||
{
|
||||
semsg(_(e_key_not_present_in_dictionary), key);
|
||||
semsg(_(e_key_not_present_in_dictionary_str), key);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
123
src/diff.c
123
src/diff.c
@@ -559,14 +559,14 @@ diff_alloc_new(tabpage_T *tp, diff_T *dprev, diff_T *dp)
|
||||
diff_T *dnew;
|
||||
|
||||
dnew = ALLOC_ONE(diff_T);
|
||||
if (dnew != NULL)
|
||||
{
|
||||
dnew->df_next = dp;
|
||||
if (dprev == NULL)
|
||||
tp->tp_first_diff = dnew;
|
||||
else
|
||||
dprev->df_next = dnew;
|
||||
}
|
||||
if (dnew == NULL)
|
||||
return NULL;
|
||||
|
||||
dnew->df_next = dp;
|
||||
if (dprev == NULL)
|
||||
tp->tp_first_diff = dnew;
|
||||
else
|
||||
dprev->df_next = dnew;
|
||||
return dnew;
|
||||
}
|
||||
|
||||
@@ -1180,44 +1180,40 @@ diff_file(diffio_T *dio)
|
||||
#endif
|
||||
// Use xdiff for generating the diff.
|
||||
if (dio->dio_internal)
|
||||
{
|
||||
return diff_file_internal(dio);
|
||||
}
|
||||
else
|
||||
{
|
||||
len = STRLEN(tmp_orig) + STRLEN(tmp_new)
|
||||
+ STRLEN(tmp_diff) + STRLEN(p_srr) + 27;
|
||||
cmd = alloc(len);
|
||||
if (cmd == NULL)
|
||||
return FAIL;
|
||||
|
||||
// We don't want $DIFF_OPTIONS to get in the way.
|
||||
if (getenv("DIFF_OPTIONS"))
|
||||
vim_setenv((char_u *)"DIFF_OPTIONS", (char_u *)"");
|
||||
len = STRLEN(tmp_orig) + STRLEN(tmp_new)
|
||||
+ STRLEN(tmp_diff) + STRLEN(p_srr) + 27;
|
||||
cmd = alloc(len);
|
||||
if (cmd == NULL)
|
||||
return FAIL;
|
||||
|
||||
// Build the diff command and execute it. Always use -a, binary
|
||||
// differences are of no use. Ignore errors, diff returns
|
||||
// non-zero when differences have been found.
|
||||
vim_snprintf((char *)cmd, len, "diff %s%s%s%s%s%s%s%s %s",
|
||||
diff_a_works == FALSE ? "" : "-a ",
|
||||
// We don't want $DIFF_OPTIONS to get in the way.
|
||||
if (getenv("DIFF_OPTIONS"))
|
||||
vim_setenv((char_u *)"DIFF_OPTIONS", (char_u *)"");
|
||||
|
||||
// Build the diff command and execute it. Always use -a, binary
|
||||
// differences are of no use. Ignore errors, diff returns
|
||||
// non-zero when differences have been found.
|
||||
vim_snprintf((char *)cmd, len, "diff %s%s%s%s%s%s%s%s %s",
|
||||
diff_a_works == FALSE ? "" : "-a ",
|
||||
#if defined(MSWIN)
|
||||
diff_bin_works == TRUE ? "--binary " : "",
|
||||
diff_bin_works == TRUE ? "--binary " : "",
|
||||
#else
|
||||
"",
|
||||
"",
|
||||
#endif
|
||||
(diff_flags & DIFF_IWHITE) ? "-b " : "",
|
||||
(diff_flags & DIFF_IWHITEALL) ? "-w " : "",
|
||||
(diff_flags & DIFF_IWHITEEOL) ? "-Z " : "",
|
||||
(diff_flags & DIFF_IBLANK) ? "-B " : "",
|
||||
(diff_flags & DIFF_ICASE) ? "-i " : "",
|
||||
tmp_orig, tmp_new);
|
||||
append_redir(cmd, (int)len, p_srr, tmp_diff);
|
||||
block_autocmds(); // avoid ShellCmdPost stuff
|
||||
(void)call_shell(cmd, SHELL_FILTER|SHELL_SILENT|SHELL_DOOUT);
|
||||
unblock_autocmds();
|
||||
vim_free(cmd);
|
||||
return OK;
|
||||
}
|
||||
(diff_flags & DIFF_IWHITE) ? "-b " : "",
|
||||
(diff_flags & DIFF_IWHITEALL) ? "-w " : "",
|
||||
(diff_flags & DIFF_IWHITEEOL) ? "-Z " : "",
|
||||
(diff_flags & DIFF_IBLANK) ? "-B " : "",
|
||||
(diff_flags & DIFF_ICASE) ? "-i " : "",
|
||||
tmp_orig, tmp_new);
|
||||
append_redir(cmd, (int)len, p_srr, tmp_diff);
|
||||
block_autocmds(); // avoid ShellCmdPost stuff
|
||||
(void)call_shell(cmd, SHELL_FILTER|SHELL_SILENT|SHELL_DOOUT);
|
||||
unblock_autocmds();
|
||||
vim_free(cmd);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1432,31 +1428,31 @@ ex_diffsplit(exarg_T *eap)
|
||||
// don't use a new tab page, each tab page has its own diffs
|
||||
cmdmod.cmod_tab = 0;
|
||||
|
||||
if (win_split(0, (diff_flags & DIFF_VERTICAL) ? WSP_VERT : 0) != FAIL)
|
||||
if (win_split(0, (diff_flags & DIFF_VERTICAL) ? WSP_VERT : 0) == FAIL)
|
||||
return;
|
||||
|
||||
// Pretend it was a ":split fname" command
|
||||
eap->cmdidx = CMD_split;
|
||||
curwin->w_p_diff = TRUE;
|
||||
do_exedit(eap, old_curwin);
|
||||
|
||||
if (curwin == old_curwin) // split didn't work
|
||||
return;
|
||||
|
||||
// Set 'diff', 'scrollbind' on and 'wrap' off.
|
||||
diff_win_options(curwin, TRUE);
|
||||
if (win_valid(old_curwin))
|
||||
{
|
||||
// Pretend it was a ":split fname" command
|
||||
eap->cmdidx = CMD_split;
|
||||
curwin->w_p_diff = TRUE;
|
||||
do_exedit(eap, old_curwin);
|
||||
diff_win_options(old_curwin, TRUE);
|
||||
|
||||
if (curwin != old_curwin) // split must have worked
|
||||
{
|
||||
// Set 'diff', 'scrollbind' on and 'wrap' off.
|
||||
diff_win_options(curwin, TRUE);
|
||||
if (win_valid(old_curwin))
|
||||
{
|
||||
diff_win_options(old_curwin, TRUE);
|
||||
|
||||
if (bufref_valid(&old_curbuf))
|
||||
// Move the cursor position to that of the old window.
|
||||
curwin->w_cursor.lnum = diff_get_corresponding_line(
|
||||
old_curbuf.br_buf, old_curwin->w_cursor.lnum);
|
||||
}
|
||||
// Now that lines are folded scroll to show the cursor at the same
|
||||
// relative position.
|
||||
scroll_to_fraction(curwin, curwin->w_height);
|
||||
}
|
||||
if (bufref_valid(&old_curbuf))
|
||||
// Move the cursor position to that of the old window.
|
||||
curwin->w_cursor.lnum = diff_get_corresponding_line(
|
||||
old_curbuf.br_buf, old_curwin->w_cursor.lnum);
|
||||
}
|
||||
// Now that lines are folded scroll to show the cursor at the same
|
||||
// relative position.
|
||||
scroll_to_fraction(curwin, curwin->w_height);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1684,9 +1680,8 @@ diff_read(
|
||||
{
|
||||
if (dio->dio_internal)
|
||||
{
|
||||
if (line_idx >= dout->dout_ga.ga_len) {
|
||||
if (line_idx >= dout->dout_ga.ga_len)
|
||||
break; // did last line
|
||||
}
|
||||
hunk = ((diffhunk_T **)dout->dout_ga.ga_data)[line_idx++];
|
||||
}
|
||||
else
|
||||
|
||||
148
src/digraph.c
148
src/digraph.c
@@ -1533,29 +1533,30 @@ get_digraph(
|
||||
c = plain_vgetc();
|
||||
--no_mapping;
|
||||
--allow_keys;
|
||||
if (c != ESC) // ESC cancels CTRL-K
|
||||
|
||||
if (c == ESC) // ESC cancels CTRL-K
|
||||
return NUL;
|
||||
|
||||
if (IS_SPECIAL(c)) // insert special key code
|
||||
return c;
|
||||
if (cmdline)
|
||||
{
|
||||
if (IS_SPECIAL(c)) // insert special key code
|
||||
return c;
|
||||
if (cmdline)
|
||||
{
|
||||
if (char2cells(c) == 1
|
||||
if (char2cells(c) == 1
|
||||
#if defined(FEAT_CRYPT) || defined(FEAT_EVAL)
|
||||
&& cmdline_star == 0
|
||||
&& cmdline_star == 0
|
||||
#endif
|
||||
)
|
||||
putcmdline(c, TRUE);
|
||||
}
|
||||
else
|
||||
add_to_showcmd(c);
|
||||
++no_mapping;
|
||||
++allow_keys;
|
||||
cc = plain_vgetc();
|
||||
--no_mapping;
|
||||
--allow_keys;
|
||||
if (cc != ESC) // ESC cancels CTRL-K
|
||||
return digraph_get(c, cc, TRUE);
|
||||
)
|
||||
putcmdline(c, TRUE);
|
||||
}
|
||||
else
|
||||
add_to_showcmd(c);
|
||||
++no_mapping;
|
||||
++allow_keys;
|
||||
cc = plain_vgetc();
|
||||
--no_mapping;
|
||||
--allow_keys;
|
||||
if (cc != ESC) // ESC cancels CTRL-K
|
||||
return digraph_get(c, cc, TRUE);
|
||||
return NUL;
|
||||
}
|
||||
|
||||
@@ -1681,14 +1682,14 @@ registerdigraph(int char1, int char2, int n)
|
||||
}
|
||||
|
||||
// Add a new digraph to the table.
|
||||
if (ga_grow(&user_digraphs, 1) == OK)
|
||||
{
|
||||
dp = (digr_T *)user_digraphs.ga_data + user_digraphs.ga_len;
|
||||
dp->char1 = char1;
|
||||
dp->char2 = char2;
|
||||
dp->result = n;
|
||||
++user_digraphs.ga_len;
|
||||
}
|
||||
if (ga_grow(&user_digraphs, 1) == FAIL)
|
||||
return;
|
||||
|
||||
dp = (digr_T *)user_digraphs.ga_data + user_digraphs.ga_len;
|
||||
dp->char1 = char1;
|
||||
dp->char2 = char2;
|
||||
dp->result = n;
|
||||
++user_digraphs.ga_len;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1948,54 +1949,54 @@ printdigraph(digr_T *dp, result_T *previous)
|
||||
else
|
||||
list_width = 11;
|
||||
|
||||
if (dp->result != 0)
|
||||
{
|
||||
if (dp->result == 0)
|
||||
return;
|
||||
|
||||
#if defined(USE_UNICODE_DIGRAPHS)
|
||||
if (previous != NULL)
|
||||
{
|
||||
int i;
|
||||
if (previous != NULL)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; header_table[i].dg_header != NULL; ++i)
|
||||
if (*previous < header_table[i].dg_start
|
||||
&& dp->result >= header_table[i].dg_start
|
||||
&& dp->result < header_table[i + 1].dg_start)
|
||||
{
|
||||
digraph_header(_(header_table[i].dg_header));
|
||||
break;
|
||||
}
|
||||
*previous = dp->result;
|
||||
}
|
||||
#endif
|
||||
if (msg_col > Columns - list_width)
|
||||
msg_putchar('\n');
|
||||
if (msg_col)
|
||||
while (msg_col % list_width != 0)
|
||||
msg_putchar(' ');
|
||||
|
||||
p = buf;
|
||||
*p++ = dp->char1;
|
||||
*p++ = dp->char2;
|
||||
*p++ = ' ';
|
||||
*p = NUL;
|
||||
msg_outtrans(buf);
|
||||
p = buf;
|
||||
if (has_mbyte)
|
||||
{
|
||||
// add a space to draw a composing char on
|
||||
if (enc_utf8 && utf_iscomposing(dp->result))
|
||||
*p++ = ' ';
|
||||
p += (*mb_char2bytes)(dp->result, p);
|
||||
}
|
||||
else
|
||||
*p++ = (char_u)dp->result;
|
||||
*p = NUL;
|
||||
msg_outtrans_attr(buf, HL_ATTR(HLF_8));
|
||||
p = buf;
|
||||
if (char2cells(dp->result) == 1)
|
||||
*p++ = ' ';
|
||||
vim_snprintf((char *)p, sizeof(buf) - (p - buf), " %3d", dp->result);
|
||||
msg_outtrans(buf);
|
||||
for (i = 0; header_table[i].dg_header != NULL; ++i)
|
||||
if (*previous < header_table[i].dg_start
|
||||
&& dp->result >= header_table[i].dg_start
|
||||
&& dp->result < header_table[i + 1].dg_start)
|
||||
{
|
||||
digraph_header(_(header_table[i].dg_header));
|
||||
break;
|
||||
}
|
||||
*previous = dp->result;
|
||||
}
|
||||
#endif
|
||||
if (msg_col > Columns - list_width)
|
||||
msg_putchar('\n');
|
||||
if (msg_col)
|
||||
while (msg_col % list_width != 0)
|
||||
msg_putchar(' ');
|
||||
|
||||
p = buf;
|
||||
*p++ = dp->char1;
|
||||
*p++ = dp->char2;
|
||||
*p++ = ' ';
|
||||
*p = NUL;
|
||||
msg_outtrans(buf);
|
||||
p = buf;
|
||||
if (has_mbyte)
|
||||
{
|
||||
// add a space to draw a composing char on
|
||||
if (enc_utf8 && utf_iscomposing(dp->result))
|
||||
*p++ = ' ';
|
||||
p += (*mb_char2bytes)(dp->result, p);
|
||||
}
|
||||
else
|
||||
*p++ = (char_u)dp->result;
|
||||
*p = NUL;
|
||||
msg_outtrans_attr(buf, HL_ATTR(HLF_8));
|
||||
p = buf;
|
||||
if (char2cells(dp->result) == 1)
|
||||
*p++ = ' ';
|
||||
vim_snprintf((char *)p, sizeof(buf) - (p - buf), " %3d", dp->result);
|
||||
msg_outtrans(buf);
|
||||
}
|
||||
|
||||
# ifdef FEAT_EVAL
|
||||
@@ -2092,7 +2093,8 @@ f_digraph_get(typval_T *argvars, typval_T *rettv)
|
||||
|
||||
if (has_mbyte)
|
||||
buf[(*mb_char2bytes)(code, buf)] = NUL;
|
||||
else {
|
||||
else
|
||||
{
|
||||
buf[0] = code;
|
||||
buf[1] = NUL;
|
||||
}
|
||||
|
||||
159
src/dosinst.c
159
src/dosinst.c
@@ -830,87 +830,88 @@ install_bat_choice(int idx)
|
||||
char *vimarg = targets[choices[idx].arg].exearg;
|
||||
FILE *fd;
|
||||
|
||||
if (*batpath != NUL)
|
||||
if (*batpath == NUL)
|
||||
return;
|
||||
|
||||
fd = fopen(batpath, "w");
|
||||
if (fd == NULL)
|
||||
{
|
||||
fd = fopen(batpath, "w");
|
||||
if (fd == NULL)
|
||||
printf("\nERROR: Cannot open \"%s\" for writing.\n", batpath);
|
||||
else
|
||||
{
|
||||
need_uninstall_entry = 1;
|
||||
|
||||
fprintf(fd, "@echo off\n");
|
||||
fprintf(fd, "rem -- Run Vim --\n");
|
||||
fprintf(fd, VIMBAT_UNINSTKEY "\n");
|
||||
fprintf(fd, "\n");
|
||||
fprintf(fd, "setlocal\n");
|
||||
|
||||
/*
|
||||
* Don't use double quotes for the "set" argument, also when it
|
||||
* contains a space. The quotes would be included in the value.
|
||||
* The order of preference is:
|
||||
* 1. $VIMRUNTIME/vim.exe (user preference)
|
||||
* 2. $VIM/vim81/vim.exe (hard coded version)
|
||||
* 3. installdir/vim.exe (hard coded install directory)
|
||||
*/
|
||||
fprintf(fd, "set VIM_EXE_DIR=%s\n", installdir);
|
||||
fprintf(fd, "if exist \"%%VIM%%\\%s\\%s\" set VIM_EXE_DIR=%%VIM%%\\%s\n",
|
||||
VIM_VERSION_NODOT, exename, VIM_VERSION_NODOT);
|
||||
fprintf(fd, "if exist \"%%VIMRUNTIME%%\\%s\" set VIM_EXE_DIR=%%VIMRUNTIME%%\n", exename);
|
||||
fprintf(fd, "\n");
|
||||
|
||||
// Give an error message when the executable could not be found.
|
||||
fprintf(fd, "if not exist \"%%VIM_EXE_DIR%%\\%s\" (\n", exename);
|
||||
fprintf(fd, " echo \"%%VIM_EXE_DIR%%\\%s\" not found\n", exename);
|
||||
fprintf(fd, " goto :eof\n");
|
||||
fprintf(fd, ")\n");
|
||||
fprintf(fd, "\n");
|
||||
|
||||
if (*exename == 'g')
|
||||
{
|
||||
fprintf(fd, "rem check --nofork argument\n");
|
||||
fprintf(fd, "set VIMNOFORK=\n");
|
||||
fprintf(fd, ":loopstart\n");
|
||||
fprintf(fd, "if .%%1==. goto loopend\n");
|
||||
fprintf(fd, "if .%%1==.--nofork (\n");
|
||||
fprintf(fd, " set VIMNOFORK=1\n");
|
||||
fprintf(fd, ") else if .%%1==.-f (\n");
|
||||
fprintf(fd, " set VIMNOFORK=1\n");
|
||||
fprintf(fd, ")\n");
|
||||
fprintf(fd, "shift\n");
|
||||
fprintf(fd, "goto loopstart\n");
|
||||
fprintf(fd, ":loopend\n");
|
||||
fprintf(fd, "\n");
|
||||
}
|
||||
|
||||
if (*exename == 'g')
|
||||
{
|
||||
// For gvim.exe use "start /b" to avoid that the console window
|
||||
// stays open.
|
||||
fprintf(fd, "if .%%VIMNOFORK%%==.1 (\n");
|
||||
fprintf(fd, " start \"dummy\" /b /wait ");
|
||||
// Always use quotes, $VIM or $VIMRUNTIME might have a space.
|
||||
fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%*\n",
|
||||
exename, vimarg);
|
||||
fprintf(fd, ") else (\n");
|
||||
fprintf(fd, " start \"dummy\" /b ");
|
||||
// Always use quotes, $VIM or $VIMRUNTIME might have a space.
|
||||
fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%*\n",
|
||||
exename, vimarg);
|
||||
fprintf(fd, ")\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Always use quotes, $VIM or $VIMRUNTIME might have a space.
|
||||
fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%*\n",
|
||||
exename, vimarg);
|
||||
}
|
||||
|
||||
fclose(fd);
|
||||
printf("%s has been %s\n", batpath,
|
||||
oldname == NULL ? "created" : "overwritten");
|
||||
}
|
||||
printf("\nERROR: Cannot open \"%s\" for writing.\n", batpath);
|
||||
return;
|
||||
}
|
||||
|
||||
need_uninstall_entry = 1;
|
||||
|
||||
fprintf(fd, "@echo off\n");
|
||||
fprintf(fd, "rem -- Run Vim --\n");
|
||||
fprintf(fd, VIMBAT_UNINSTKEY "\n");
|
||||
fprintf(fd, "\n");
|
||||
fprintf(fd, "setlocal\n");
|
||||
|
||||
/*
|
||||
* Don't use double quotes for the "set" argument, also when it
|
||||
* contains a space. The quotes would be included in the value.
|
||||
* The order of preference is:
|
||||
* 1. $VIMRUNTIME/vim.exe (user preference)
|
||||
* 2. $VIM/vim81/vim.exe (hard coded version)
|
||||
* 3. installdir/vim.exe (hard coded install directory)
|
||||
*/
|
||||
fprintf(fd, "set VIM_EXE_DIR=%s\n", installdir);
|
||||
fprintf(fd, "if exist \"%%VIM%%\\%s\\%s\" set VIM_EXE_DIR=%%VIM%%\\%s\n",
|
||||
VIM_VERSION_NODOT, exename, VIM_VERSION_NODOT);
|
||||
fprintf(fd, "if exist \"%%VIMRUNTIME%%\\%s\" set VIM_EXE_DIR=%%VIMRUNTIME%%\n", exename);
|
||||
fprintf(fd, "\n");
|
||||
|
||||
// Give an error message when the executable could not be found.
|
||||
fprintf(fd, "if not exist \"%%VIM_EXE_DIR%%\\%s\" (\n", exename);
|
||||
fprintf(fd, " echo \"%%VIM_EXE_DIR%%\\%s\" not found\n", exename);
|
||||
fprintf(fd, " goto :eof\n");
|
||||
fprintf(fd, ")\n");
|
||||
fprintf(fd, "\n");
|
||||
|
||||
if (*exename == 'g')
|
||||
{
|
||||
fprintf(fd, "rem check --nofork argument\n");
|
||||
fprintf(fd, "set VIMNOFORK=\n");
|
||||
fprintf(fd, ":loopstart\n");
|
||||
fprintf(fd, "if .%%1==. goto loopend\n");
|
||||
fprintf(fd, "if .%%1==.--nofork (\n");
|
||||
fprintf(fd, " set VIMNOFORK=1\n");
|
||||
fprintf(fd, ") else if .%%1==.-f (\n");
|
||||
fprintf(fd, " set VIMNOFORK=1\n");
|
||||
fprintf(fd, ")\n");
|
||||
fprintf(fd, "shift\n");
|
||||
fprintf(fd, "goto loopstart\n");
|
||||
fprintf(fd, ":loopend\n");
|
||||
fprintf(fd, "\n");
|
||||
}
|
||||
|
||||
if (*exename == 'g')
|
||||
{
|
||||
// For gvim.exe use "start /b" to avoid that the console window
|
||||
// stays open.
|
||||
fprintf(fd, "if .%%VIMNOFORK%%==.1 (\n");
|
||||
fprintf(fd, " start \"dummy\" /b /wait ");
|
||||
// Always use quotes, $VIM or $VIMRUNTIME might have a space.
|
||||
fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%*\n",
|
||||
exename, vimarg);
|
||||
fprintf(fd, ") else (\n");
|
||||
fprintf(fd, " start \"dummy\" /b ");
|
||||
// Always use quotes, $VIM or $VIMRUNTIME might have a space.
|
||||
fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%*\n",
|
||||
exename, vimarg);
|
||||
fprintf(fd, ")\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Always use quotes, $VIM or $VIMRUNTIME might have a space.
|
||||
fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%*\n",
|
||||
exename, vimarg);
|
||||
}
|
||||
|
||||
fclose(fd);
|
||||
printf("%s has been %s\n", batpath,
|
||||
oldname == NULL ? "created" : "overwritten");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
203
src/drawline.c
203
src/drawline.c
@@ -225,19 +225,19 @@ handle_foldcolumn(win_T *wp, winlinevars_T *wlv)
|
||||
// Allocate a buffer, "wlv->extra[]" may already be in use.
|
||||
vim_free(wlv->p_extra_free);
|
||||
wlv->p_extra_free = alloc(MAX_MCO * fdc + 1);
|
||||
if (wlv->p_extra_free != NULL)
|
||||
{
|
||||
wlv->n_extra = (int)fill_foldcolumn(wlv->p_extra_free,
|
||||
wp, FALSE, wlv->lnum);
|
||||
wlv->p_extra_free[wlv->n_extra] = NUL;
|
||||
wlv->p_extra = wlv->p_extra_free;
|
||||
wlv->c_extra = NUL;
|
||||
wlv->c_final = NUL;
|
||||
if (use_cursor_line_highlight(wp, wlv->lnum))
|
||||
wlv->char_attr = hl_combine_attr(wlv->wcr_attr, HL_ATTR(HLF_CLF));
|
||||
else
|
||||
wlv->char_attr = hl_combine_attr(wlv->wcr_attr, HL_ATTR(HLF_FC));
|
||||
}
|
||||
if (wlv->p_extra_free == NULL)
|
||||
return;
|
||||
|
||||
wlv->n_extra = (int)fill_foldcolumn(wlv->p_extra_free,
|
||||
wp, FALSE, wlv->lnum);
|
||||
wlv->p_extra_free[wlv->n_extra] = NUL;
|
||||
wlv->p_extra = wlv->p_extra_free;
|
||||
wlv->c_extra = NUL;
|
||||
wlv->c_final = NUL;
|
||||
if (use_cursor_line_highlight(wp, wlv->lnum))
|
||||
wlv->char_attr = hl_combine_attr(wlv->wcr_attr, HL_ATTR(HLF_CLF));
|
||||
else
|
||||
wlv->char_attr = hl_combine_attr(wlv->wcr_attr, HL_ATTR(HLF_FC));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -643,7 +643,7 @@ text_prop_position(
|
||||
int right = (tp->tp_flags & TP_FLAG_ALIGN_RIGHT);
|
||||
int above = (tp->tp_flags & TP_FLAG_ALIGN_ABOVE);
|
||||
int below = (tp->tp_flags & TP_FLAG_ALIGN_BELOW);
|
||||
int wrap = (tp->tp_flags & TP_FLAG_WRAP);
|
||||
int wrap = tp->tp_col < MAXCOL || (tp->tp_flags & TP_FLAG_WRAP);
|
||||
int padding = tp->tp_col == MAXCOL && tp->tp_len > 1
|
||||
? tp->tp_len - 1 : 0;
|
||||
int col_with_padding = scr_col + (below ? 0 : padding);
|
||||
@@ -985,6 +985,36 @@ win_line_continue(winlinevars_T *wlv)
|
||||
wlv->char_attr = wlv->win_attr;
|
||||
}
|
||||
|
||||
#ifdef FEAT_SYN_HL
|
||||
static void
|
||||
apply_cursorline_highlight(
|
||||
winlinevars_T *wlv,
|
||||
int sign_present UNUSED)
|
||||
{
|
||||
wlv->cul_attr = HL_ATTR(HLF_CUL);
|
||||
# ifdef FEAT_SIGNS
|
||||
// Combine the 'cursorline' and sign highlighting, depending on
|
||||
// the sign priority.
|
||||
if (sign_present && wlv->sattr.sat_linehl > 0)
|
||||
{
|
||||
if (wlv->sattr.sat_priority >= 100)
|
||||
wlv->line_attr = hl_combine_attr(wlv->cul_attr, wlv->line_attr);
|
||||
else
|
||||
wlv->line_attr = hl_combine_attr(wlv->line_attr, wlv->cul_attr);
|
||||
}
|
||||
else
|
||||
# endif
|
||||
# if defined(FEAT_QUICKFIX)
|
||||
// let the line attribute overrule 'cursorline', otherwise
|
||||
// it disappears when both have background set;
|
||||
// 'cursorline' can use underline or bold to make it show
|
||||
wlv->line_attr = hl_combine_attr(wlv->cul_attr, wlv->line_attr);
|
||||
# else
|
||||
wlv->line_attr = wlv->cul_attr;
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Display line "lnum" of window 'wp' on the screen.
|
||||
* Start at row "startrow", stop when "endrow" is reached.
|
||||
@@ -1055,6 +1085,7 @@ win_line(
|
||||
int save_did_emsg;
|
||||
#endif
|
||||
#ifdef FEAT_PROP_POPUP
|
||||
int did_line = FALSE; // set to TRUE when line text done
|
||||
int text_prop_count;
|
||||
int text_prop_next = 0; // next text property to use
|
||||
textprop_T *text_props = NULL;
|
||||
@@ -1728,35 +1759,10 @@ win_line(
|
||||
wlv.cul_screenline = (wp->w_p_wrap
|
||||
&& (wp->w_p_culopt_flags & CULOPT_SCRLINE));
|
||||
|
||||
// Only set wlv.line_attr here when "screenline" is not present in
|
||||
// 'cursorlineopt'. Otherwise it's done later.
|
||||
// Only apply CursorLine highlight here when "screenline" is not
|
||||
// present in 'cursorlineopt'. Otherwise it's done later.
|
||||
if (!wlv.cul_screenline)
|
||||
{
|
||||
wlv.cul_attr = HL_ATTR(HLF_CUL);
|
||||
# ifdef FEAT_SIGNS
|
||||
// Combine the 'cursorline' and sign highlighting, depending on
|
||||
// the sign priority.
|
||||
if (sign_present && wlv.sattr.sat_linehl > 0)
|
||||
{
|
||||
if (wlv.sattr.sat_priority >= 100)
|
||||
wlv.line_attr = hl_combine_attr(
|
||||
wlv.cul_attr, wlv.line_attr);
|
||||
else
|
||||
wlv.line_attr = hl_combine_attr(
|
||||
wlv.line_attr, wlv.cul_attr);
|
||||
}
|
||||
else
|
||||
# endif
|
||||
# if defined(FEAT_QUICKFIX)
|
||||
// let the line attribute overrule 'cursorline', otherwise
|
||||
// it disappears when both have background set;
|
||||
// 'cursorline' can use underline or bold to make it show
|
||||
wlv.line_attr = hl_combine_attr(
|
||||
wlv.cul_attr, wlv.line_attr);
|
||||
# else
|
||||
wlv.line_attr = wlv.cul_attr;
|
||||
# endif
|
||||
}
|
||||
apply_cursorline_highlight(&wlv, sign_present);
|
||||
else
|
||||
{
|
||||
line_attr_save = wlv.line_attr;
|
||||
@@ -1850,8 +1856,7 @@ win_line(
|
||||
&& wlv.vcol >= left_curline_col
|
||||
&& wlv.vcol < right_curline_col)
|
||||
{
|
||||
wlv.cul_attr = HL_ATTR(HLF_CUL);
|
||||
wlv.line_attr = wlv.cul_attr;
|
||||
apply_cursorline_highlight(&wlv, sign_present);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1910,17 +1915,20 @@ win_line(
|
||||
// Check if any active property ends.
|
||||
for (pi = 0; pi < text_props_active; ++pi)
|
||||
{
|
||||
int tpi = text_prop_idxs[pi];
|
||||
int tpi = text_prop_idxs[pi];
|
||||
textprop_T *tp = &text_props[tpi];
|
||||
|
||||
if (text_props[tpi].tp_col != MAXCOL
|
||||
&& bcol >= text_props[tpi].tp_col - 1
|
||||
+ text_props[tpi].tp_len)
|
||||
// An inline property ends when after the start column plus
|
||||
// length. An "above" property ends when used and n_extra
|
||||
// is zero.
|
||||
if ((tp->tp_col != MAXCOL
|
||||
&& bcol >= tp->tp_col - 1 + tp->tp_len))
|
||||
{
|
||||
if (pi + 1 < text_props_active)
|
||||
mch_memmove(text_prop_idxs + pi,
|
||||
text_prop_idxs + pi + 1,
|
||||
sizeof(int)
|
||||
* (text_props_active - (pi + 1)));
|
||||
* (text_props_active - (pi + 1)));
|
||||
--text_props_active;
|
||||
--pi;
|
||||
# ifdef FEAT_LINEBREAK
|
||||
@@ -1936,6 +1944,8 @@ win_line(
|
||||
// not on the next char yet, don't start another prop
|
||||
--bcol;
|
||||
# endif
|
||||
int display_text_first = FALSE;
|
||||
|
||||
// Add any text property that starts in this column.
|
||||
// With 'nowrap' and not in the first screen line only "below"
|
||||
// text prop can show.
|
||||
@@ -1946,18 +1956,11 @@ win_line(
|
||||
|| wlv.row == startrow
|
||||
|| (text_props[text_prop_next].tp_flags
|
||||
& TP_FLAG_ALIGN_BELOW)))
|
||||
|| (bcol == 0 &&
|
||||
(text_props[text_prop_next].tp_flags
|
||||
|| (bcol == 0
|
||||
&& (text_props[text_prop_next].tp_flags
|
||||
& TP_FLAG_ALIGN_ABOVE)))
|
||||
: bcol >= text_props[text_prop_next].tp_col - 1))
|
||||
{
|
||||
if (text_props[text_prop_next].tp_col == MAXCOL
|
||||
&& *ptr == NUL && wp->w_p_list && lcs_eol_one > 0)
|
||||
{
|
||||
// first display the '$' after the line
|
||||
text_prop_follows = TRUE;
|
||||
break;
|
||||
}
|
||||
if (text_props[text_prop_next].tp_col == MAXCOL
|
||||
|| bcol <= text_props[text_prop_next].tp_col - 1
|
||||
+ text_props[text_prop_next].tp_len)
|
||||
@@ -1974,16 +1977,18 @@ win_line(
|
||||
text_prop_id = 0;
|
||||
reset_extra_attr = FALSE;
|
||||
}
|
||||
if (text_props_active > 0 && wlv.n_extra == 0)
|
||||
if (text_props_active > 0 && wlv.n_extra == 0
|
||||
&& !display_text_first)
|
||||
{
|
||||
int used_tpi = -1;
|
||||
int used_attr = 0;
|
||||
int other_tpi = -1;
|
||||
|
||||
// Sort the properties on priority and/or starting last.
|
||||
// Then combine the attributes, highest priority last.
|
||||
text_prop_above = FALSE;
|
||||
text_prop_follows = FALSE;
|
||||
|
||||
// Sort the properties on priority and/or starting last.
|
||||
// Then combine the attributes, highest priority last.
|
||||
sort_text_props(wp->w_buffer, text_props,
|
||||
text_prop_idxs, text_props_active);
|
||||
|
||||
@@ -2007,15 +2012,35 @@ win_line(
|
||||
| TP_FLAG_ALIGN_BELOW)) == 0
|
||||
&& wlv.col >= wp->w_width))
|
||||
{
|
||||
if (tp->tp_col == MAXCOL
|
||||
&& *ptr == NUL
|
||||
&& ((wp->w_p_list && lcs_eol_one > 0
|
||||
&& (tp->tp_flags
|
||||
& TP_FLAG_ALIGN_ABOVE) == 0)
|
||||
|| (ptr == line
|
||||
&& !did_line
|
||||
&& (tp->tp_flags
|
||||
& TP_FLAG_ALIGN_BELOW))))
|
||||
{
|
||||
// skip this prop, first display the '$' after
|
||||
// the line or display an empty line
|
||||
text_prop_follows = TRUE;
|
||||
if (used_tpi < 0)
|
||||
display_text_first = TRUE;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pt->pt_hl_id > 0)
|
||||
used_attr = syn_id2attr(pt->pt_hl_id);
|
||||
text_prop_type = pt;
|
||||
text_prop_attr =
|
||||
hl_combine_attr(text_prop_attr, used_attr);
|
||||
other_tpi = used_tpi;
|
||||
if (used_tpi >= 0 && text_props[used_tpi].tp_id < 0)
|
||||
other_tpi = used_tpi;
|
||||
text_prop_flags = pt->pt_flags;
|
||||
text_prop_id = tp->tp_id;
|
||||
used_tpi = tpi;
|
||||
display_text_first = FALSE;
|
||||
}
|
||||
}
|
||||
if (text_prop_id < 0 && used_tpi >= 0
|
||||
@@ -2154,8 +2179,8 @@ win_line(
|
||||
// must wrap anyway.
|
||||
text_prop_above = above;
|
||||
text_prop_follows |= other_tpi != -1
|
||||
&& (wp->w_p_wrap
|
||||
|| (text_props[other_tpi].tp_flags
|
||||
&& (wp->w_p_wrap
|
||||
|| (text_props[other_tpi].tp_flags
|
||||
& (TP_FLAG_ALIGN_BELOW | TP_FLAG_ALIGN_RIGHT)));
|
||||
|
||||
if (bail_out)
|
||||
@@ -2202,11 +2227,14 @@ win_line(
|
||||
#ifdef FEAT_DIFF
|
||||
if (wlv.diff_hlf != (hlf_T)0)
|
||||
{
|
||||
// When there is extra text (e.g. virtual text) it gets the
|
||||
// diff highlighting for the line, but not for changed text.
|
||||
if (wlv.diff_hlf == HLF_CHD && ptr - line >= change_start
|
||||
&& wlv.n_extra == 0)
|
||||
wlv.diff_hlf = HLF_TXD; // changed text
|
||||
if (wlv.diff_hlf == HLF_TXD && ptr - line > change_end
|
||||
&& wlv.n_extra == 0)
|
||||
if (wlv.diff_hlf == HLF_TXD
|
||||
&& ((ptr - line > change_end && wlv.n_extra == 0)
|
||||
|| (wlv.n_extra > 0 && wlv.extra_for_textprop)))
|
||||
wlv.diff_hlf = HLF_CHD; // changed line
|
||||
wlv.line_attr = HL_ATTR(wlv.diff_hlf);
|
||||
if (wp->w_p_cul && lnum == wp->w_cursor.lnum
|
||||
@@ -2487,6 +2515,12 @@ win_line(
|
||||
#ifdef FEAT_LINEBREAK
|
||||
c0 = *ptr;
|
||||
#endif
|
||||
#ifdef FEAT_PROP_POPUP
|
||||
if (c == NUL)
|
||||
// text is finished, may display a "below" virtual text
|
||||
did_line = TRUE;
|
||||
#endif
|
||||
|
||||
if (has_mbyte)
|
||||
{
|
||||
mb_c = c;
|
||||
@@ -3073,6 +3107,7 @@ win_line(
|
||||
}
|
||||
}
|
||||
else if (c == NUL
|
||||
&& wlv.n_extra == 0
|
||||
&& (wp->w_p_list
|
||||
|| ((wlv.fromcol >= 0 || fromcol_prev >= 0)
|
||||
&& wlv.tocol > wlv.vcol
|
||||
@@ -3568,20 +3603,31 @@ win_line(
|
||||
// At end of the text line.
|
||||
if (c == NUL)
|
||||
{
|
||||
draw_screen_line(wp, &wlv);
|
||||
|
||||
// Update w_cline_height and w_cline_folded if the cursor line was
|
||||
// updated (saves a call to plines() later).
|
||||
if (wp == curwin && lnum == curwin->w_cursor.lnum)
|
||||
#ifdef FEAT_PROP_POPUP
|
||||
if (text_prop_follows)
|
||||
{
|
||||
curwin->w_cline_row = startrow;
|
||||
curwin->w_cline_height = wlv.row - startrow;
|
||||
#ifdef FEAT_FOLDING
|
||||
curwin->w_cline_folded = FALSE;
|
||||
#endif
|
||||
curwin->w_valid |= (VALID_CHEIGHT|VALID_CROW);
|
||||
// Put the pointer back to the NUL.
|
||||
--ptr;
|
||||
c = ' ';
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
draw_screen_line(wp, &wlv);
|
||||
|
||||
// Update w_cline_height and w_cline_folded if the cursor line
|
||||
// was updated (saves a call to plines() later).
|
||||
if (wp == curwin && lnum == curwin->w_cursor.lnum)
|
||||
{
|
||||
curwin->w_cline_row = startrow;
|
||||
curwin->w_cline_height = wlv.row - startrow;
|
||||
#ifdef FEAT_FOLDING
|
||||
curwin->w_cline_folded = FALSE;
|
||||
#endif
|
||||
curwin->w_valid |= (VALID_CHEIGHT|VALID_CROW);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Show "extends" character from 'listchars' if beyond the line end and
|
||||
@@ -3886,6 +3932,7 @@ win_line(
|
||||
wlv_screen_line(wp, &wlv, FALSE);
|
||||
wlv.col += wlv.boguscols;
|
||||
wlv.boguscols = 0;
|
||||
wlv.vcol_off = 0;
|
||||
#else
|
||||
wlv_screen_line(wp, &wlv, FALSE);
|
||||
#endif
|
||||
|
||||
@@ -73,8 +73,6 @@ static void redraw_custom_statusline(win_T *wp);
|
||||
static int did_update_one_window;
|
||||
#endif
|
||||
|
||||
static void win_redr_status(win_T *wp, int ignore_pum);
|
||||
|
||||
/*
|
||||
* Based on the current value of curwin->w_topline, transfer a screenfull
|
||||
* of stuff from Filemem to ScreenLines[], and update curwin->w_botline.
|
||||
@@ -423,7 +421,7 @@ statusline_row(win_T *wp)
|
||||
* If "ignore_pum" is TRUE, also redraw statusline when the popup menu is
|
||||
* displayed.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
win_redr_status(win_T *wp, int ignore_pum UNUSED)
|
||||
{
|
||||
int row;
|
||||
@@ -548,6 +546,16 @@ win_redr_status(win_T *wp, int ignore_pum UNUSED)
|
||||
- 1 + wp->w_wincol), attr);
|
||||
|
||||
win_redr_ruler(wp, TRUE, ignore_pum);
|
||||
|
||||
// Draw the 'showcmd' information if 'showcmdloc' == "statusline".
|
||||
if (p_sc && *p_sloc == 's')
|
||||
{
|
||||
int width = MIN(10, this_ru_col - len - 2);
|
||||
|
||||
if (width > 0)
|
||||
screen_puts_len(showcmd_buf, width, row,
|
||||
wp->w_wincol + this_ru_col - width - 1, attr);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
124
src/edit.c
124
src/edit.c
@@ -1664,49 +1664,49 @@ edit_putchar(int c, int highlight)
|
||||
{
|
||||
int attr;
|
||||
|
||||
if (ScreenLines != NULL)
|
||||
{
|
||||
update_topline(); // just in case w_topline isn't valid
|
||||
validate_cursor();
|
||||
if (highlight)
|
||||
attr = HL_ATTR(HLF_8);
|
||||
else
|
||||
attr = 0;
|
||||
pc_row = W_WINROW(curwin) + curwin->w_wrow;
|
||||
pc_col = curwin->w_wincol;
|
||||
pc_status = PC_STATUS_UNSET;
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
if (curwin->w_p_rl)
|
||||
{
|
||||
pc_col += curwin->w_width - 1 - curwin->w_wcol;
|
||||
if (has_mbyte)
|
||||
{
|
||||
int fix_col = mb_fix_col(pc_col, pc_row);
|
||||
if (ScreenLines == NULL)
|
||||
return;
|
||||
|
||||
if (fix_col != pc_col)
|
||||
{
|
||||
screen_putchar(' ', pc_row, fix_col, attr);
|
||||
--curwin->w_wcol;
|
||||
pc_status = PC_STATUS_RIGHT;
|
||||
}
|
||||
update_topline(); // just in case w_topline isn't valid
|
||||
validate_cursor();
|
||||
if (highlight)
|
||||
attr = HL_ATTR(HLF_8);
|
||||
else
|
||||
attr = 0;
|
||||
pc_row = W_WINROW(curwin) + curwin->w_wrow;
|
||||
pc_col = curwin->w_wincol;
|
||||
pc_status = PC_STATUS_UNSET;
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
if (curwin->w_p_rl)
|
||||
{
|
||||
pc_col += curwin->w_width - 1 - curwin->w_wcol;
|
||||
if (has_mbyte)
|
||||
{
|
||||
int fix_col = mb_fix_col(pc_col, pc_row);
|
||||
|
||||
if (fix_col != pc_col)
|
||||
{
|
||||
screen_putchar(' ', pc_row, fix_col, attr);
|
||||
--curwin->w_wcol;
|
||||
pc_status = PC_STATUS_RIGHT;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
pc_col += curwin->w_wcol;
|
||||
if (mb_lefthalve(pc_row, pc_col))
|
||||
pc_status = PC_STATUS_LEFT;
|
||||
}
|
||||
|
||||
// save the character to be able to put it back
|
||||
if (pc_status == PC_STATUS_UNSET)
|
||||
{
|
||||
screen_getbytes(pc_row, pc_col, pc_bytes, &pc_attr);
|
||||
pc_status = PC_STATUS_SET;
|
||||
}
|
||||
screen_putchar(c, pc_row, pc_col, attr);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
pc_col += curwin->w_wcol;
|
||||
if (mb_lefthalve(pc_row, pc_col))
|
||||
pc_status = PC_STATUS_LEFT;
|
||||
}
|
||||
|
||||
// save the character to be able to put it back
|
||||
if (pc_status == PC_STATUS_UNSET)
|
||||
{
|
||||
screen_getbytes(pc_row, pc_col, pc_bytes, &pc_attr);
|
||||
pc_status = PC_STATUS_SET;
|
||||
}
|
||||
screen_putchar(c, pc_row, pc_col, attr);
|
||||
}
|
||||
|
||||
#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
|
||||
@@ -1782,11 +1782,11 @@ display_dollar(colnr_T col_arg)
|
||||
void
|
||||
undisplay_dollar(void)
|
||||
{
|
||||
if (dollar_vcol >= 0)
|
||||
{
|
||||
dollar_vcol = -1;
|
||||
redrawWinline(curwin, curwin->w_cursor.lnum);
|
||||
}
|
||||
if (dollar_vcol < 0)
|
||||
return;
|
||||
|
||||
dollar_vcol = -1;
|
||||
redrawWinline(curwin, curwin->w_cursor.lnum);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2554,17 +2554,17 @@ set_last_insert(int c)
|
||||
|
||||
vim_free(last_insert);
|
||||
last_insert = alloc(MB_MAXBYTES * 3 + 5);
|
||||
if (last_insert != NULL)
|
||||
{
|
||||
s = last_insert;
|
||||
// Use the CTRL-V only when entering a special char
|
||||
if (c < ' ' || c == DEL)
|
||||
*s++ = Ctrl_V;
|
||||
s = add_char2buf(c, s);
|
||||
*s++ = ESC;
|
||||
*s++ = NUL;
|
||||
last_insert_skip = 0;
|
||||
}
|
||||
if (last_insert == NULL)
|
||||
return;
|
||||
|
||||
s = last_insert;
|
||||
// Use the CTRL-V only when entering a special char
|
||||
if (c < ' ' || c == DEL)
|
||||
*s++ = Ctrl_V;
|
||||
s = add_char2buf(c, s);
|
||||
*s++ = ESC;
|
||||
*s++ = NUL;
|
||||
last_insert_skip = 0;
|
||||
}
|
||||
|
||||
#if defined(EXITFREE) || defined(PROTO)
|
||||
@@ -2970,12 +2970,12 @@ get_last_insert_save(void)
|
||||
if (last_insert == NULL)
|
||||
return NULL;
|
||||
s = vim_strsave(last_insert + last_insert_skip);
|
||||
if (s != NULL)
|
||||
{
|
||||
len = (int)STRLEN(s);
|
||||
if (len > 0 && s[len - 1] == ESC) // remove trailing ESC
|
||||
s[len - 1] = NUL;
|
||||
}
|
||||
if (s == NULL)
|
||||
return NULL;
|
||||
|
||||
len = (int)STRLEN(s);
|
||||
if (len > 0 && s[len - 1] == ESC) // remove trailing ESC
|
||||
s[len - 1] = NUL;
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -3714,7 +3714,7 @@ ins_esc(
|
||||
MAY_WANT_TO_LOG_THIS;
|
||||
|
||||
// Re-enable bracketed paste mode.
|
||||
out_str(T_BE);
|
||||
out_str_t_BE();
|
||||
|
||||
// Re-enable modifyOtherKeys.
|
||||
out_str_t_TI();
|
||||
|
||||
122
src/errors.h
122
src/errors.h
@@ -968,9 +968,9 @@ EXTERN char e_couldnt_find_pattern[]
|
||||
#ifdef FEAT_SYN_HL
|
||||
EXTERN char e_illegal_argument_str_2[]
|
||||
INIT(= N_("E390: Illegal argument: %s"));
|
||||
EXTERN char e_no_such_syntax_cluster_1[]
|
||||
EXTERN char e_no_such_syntax_cluster_str_1[]
|
||||
INIT(= N_("E391: No such syntax cluster: %s"));
|
||||
EXTERN char e_no_such_syntax_cluster_2[]
|
||||
EXTERN char e_no_such_syntax_cluster_str_2[]
|
||||
INIT(= N_("E392: No such syntax cluster: %s"));
|
||||
EXTERN char e_groupthere_not_accepted_here[]
|
||||
INIT(= N_("E393: group[t]here not accepted here"));
|
||||
@@ -1028,7 +1028,7 @@ EXTERN char e_fg_color_unknown[]
|
||||
INIT(= N_("E419: FG color unknown"));
|
||||
EXTERN char e_bg_color_unknown[]
|
||||
INIT(= N_("E420: BG color unknown"));
|
||||
EXTERN char e_color_name_or_number_not_recognized[]
|
||||
EXTERN char e_color_name_or_number_not_recognized_str[]
|
||||
INIT(= N_("E421: Color name or number not recognized: %s"));
|
||||
EXTERN char e_terminal_code_too_long_str[]
|
||||
INIT(= N_("E422: Terminal code too long: %s"));
|
||||
@@ -1182,6 +1182,8 @@ EXTERN char e_invalid_command[]
|
||||
INIT(= N_("E476: Invalid command"));
|
||||
EXTERN char e_invalid_command_str[]
|
||||
INIT(= N_("E476: Invalid command: %s"));
|
||||
EXTERN char e_invalid_command_str_expected_str[]
|
||||
INIT(= N_("E476: Invalid command: %s, expected %s"));
|
||||
EXTERN char e_no_bang_allowed[]
|
||||
INIT(= N_("E477: No ! allowed"));
|
||||
EXTERN char e_dont_panic[]
|
||||
@@ -1796,7 +1798,7 @@ EXTERN char e_list_required[]
|
||||
INIT(= N_("E714: List required"));
|
||||
EXTERN char e_dictionary_required[]
|
||||
INIT(= N_("E715: Dictionary required"));
|
||||
EXTERN char e_key_not_present_in_dictionary[]
|
||||
EXTERN char e_key_not_present_in_dictionary_str[]
|
||||
INIT(= N_("E716: Key not present in Dictionary: \"%s\""));
|
||||
EXTERN char e_dictionary_entry_already_exists[]
|
||||
INIT(= N_("E717: Dictionary entry already exists"));
|
||||
@@ -1804,13 +1806,13 @@ EXTERN char e_funcref_required[]
|
||||
INIT(= N_("E718: Funcref required"));
|
||||
EXTERN char e_cannot_slice_dictionary[]
|
||||
INIT(= N_("E719: Cannot slice a Dictionary"));
|
||||
EXTERN char e_missing_colon_in_dictionary[]
|
||||
EXTERN char e_missing_colon_in_dictionary_str[]
|
||||
INIT(= N_("E720: Missing colon in Dictionary: %s"));
|
||||
EXTERN char e_duplicate_key_in_dictionary[]
|
||||
EXTERN char e_duplicate_key_in_dictionary_str[]
|
||||
INIT(= N_("E721: Duplicate key in Dictionary: \"%s\""));
|
||||
EXTERN char e_missing_comma_in_dictionary[]
|
||||
EXTERN char e_missing_comma_in_dictionary_str[]
|
||||
INIT(= N_("E722: Missing comma in Dictionary: %s"));
|
||||
EXTERN char e_missing_dict_end[]
|
||||
EXTERN char e_missing_dict_end_str[]
|
||||
INIT(= N_("E723: Missing end of Dictionary '}': %s"));
|
||||
EXTERN char e_variable_nested_too_deep_for_displaying[]
|
||||
INIT(= N_("E724: Variable nested too deep for displaying"));
|
||||
@@ -2111,7 +2113,7 @@ EXTERN char e_undo_number_nr_not_found[]
|
||||
EXTERN char e_bf_key_init_called_with_empty_password[]
|
||||
INIT(= N_("E831: bf_key_init() called with empty password"));
|
||||
# ifdef FEAT_PERSISTENT_UNDO
|
||||
EXTERN char e_non_encrypted_file_has_encrypted_undo_file[]
|
||||
EXTERN char e_non_encrypted_file_has_encrypted_undo_file_str[]
|
||||
INIT(= N_("E832: Non-encrypted file has encrypted undo file: %s"));
|
||||
# endif
|
||||
#else
|
||||
@@ -2397,7 +2399,7 @@ EXTERN char e_cannot_use_redir_inside_execute[]
|
||||
EXTERN char e_buffer_cannot_be_registered[]
|
||||
INIT(= N_("E931: Buffer cannot be registered"));
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN char e_closure_function_should_not_be_at_top_level[]
|
||||
EXTERN char e_closure_function_should_not_be_at_top_level_str[]
|
||||
INIT(= N_("E932: Closure function should not be at top level: %s"));
|
||||
EXTERN char e_function_was_deleted_str[]
|
||||
INIT(= N_("E933: Function was deleted: %s"));
|
||||
@@ -2513,7 +2515,7 @@ EXTERN char e_property_type_str_already_defined[]
|
||||
INIT(= N_("E969: Property type %s already defined"));
|
||||
EXTERN char e_unknown_highlight_group_name_str[]
|
||||
INIT(= N_("E970: Unknown highlight group name: '%s'"));
|
||||
EXTERN char e_type_not_exist[]
|
||||
EXTERN char e_property_type_str_does_not_exist[]
|
||||
INIT(= N_("E971: Property type %s does not exist"));
|
||||
#endif
|
||||
#ifdef FEAT_EVAL
|
||||
@@ -2634,17 +2636,17 @@ EXTERN char e_invalid_key_str[]
|
||||
INIT(= N_("E1014: Invalid key: %s"));
|
||||
EXTERN char e_name_expected_str[]
|
||||
INIT(= N_("E1015: Name expected: %s"));
|
||||
EXTERN char e_cannot_declare_a_scope_variable[]
|
||||
EXTERN char e_cannot_declare_a_scope_variable_str[]
|
||||
INIT(= N_("E1016: Cannot declare a %s variable: %s"));
|
||||
EXTERN char e_cannot_declare_an_environment_variable[]
|
||||
EXTERN char e_cannot_declare_an_environment_variable_str[]
|
||||
INIT(= N_("E1016: Cannot declare an environment variable: %s"));
|
||||
EXTERN char e_variable_already_declared[]
|
||||
EXTERN char e_variable_already_declared_str[]
|
||||
INIT(= N_("E1017: Variable already declared: %s"));
|
||||
EXTERN char e_cannot_assign_to_constant[]
|
||||
EXTERN char e_cannot_assign_to_constant_str[]
|
||||
INIT(= N_("E1018: Cannot assign to a constant: %s"));
|
||||
EXTERN char e_can_only_concatenate_to_string[]
|
||||
INIT(= N_("E1019: Can only concatenate to string"));
|
||||
EXTERN char e_cannot_use_operator_on_new_variable[]
|
||||
EXTERN char e_cannot_use_operator_on_new_variable_str[]
|
||||
INIT(= N_("E1020: Cannot use an operator on a new variable: %s"));
|
||||
EXTERN char e_const_requires_a_value[]
|
||||
INIT(= N_("E1021: Const requires a value"));
|
||||
@@ -2674,7 +2676,7 @@ EXTERN char e_missing_catch_or_finally[]
|
||||
INIT(= N_("E1032: Missing :catch or :finally"));
|
||||
EXTERN char e_catch_unreachable_after_catch_all[]
|
||||
INIT(= N_("E1033: Catch unreachable after catch-all"));
|
||||
EXTERN char e_cannot_use_reserved_name[]
|
||||
EXTERN char e_cannot_use_reserved_name_str[]
|
||||
INIT(= N_("E1034: Cannot use reserved name %s"));
|
||||
EXTERN char e_percent_requires_number_arguments[]
|
||||
// xgettext:no-c-format
|
||||
@@ -2713,7 +2715,7 @@ EXTERN char e_colon_required_before_range_str[]
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN char e_wrong_argument_type_for_plus[]
|
||||
INIT(= N_("E1051: Wrong argument type for +"));
|
||||
EXTERN char e_cannot_declare_an_option[]
|
||||
EXTERN char e_cannot_declare_an_option_str[]
|
||||
INIT(= N_("E1052: Cannot declare an option: %s"));
|
||||
EXTERN char e_could_not_import_str[]
|
||||
INIT(= N_("E1053: Could not import \"%s\""));
|
||||
@@ -2791,7 +2793,7 @@ EXTERN char e_script_cannot_import_itself[]
|
||||
INIT(= N_("E1088: Script cannot import itself"));
|
||||
EXTERN char e_unknown_variable_str[]
|
||||
INIT(= N_("E1089: Unknown variable: %s"));
|
||||
EXTERN char e_cannot_assign_to_argument[]
|
||||
EXTERN char e_cannot_assign_to_argument_str[]
|
||||
INIT(= N_("E1090: Cannot assign to argument %s"));
|
||||
EXTERN char e_function_is_not_compiled_str[]
|
||||
INIT(= N_("E1091: Function is not compiled: %s"));
|
||||
@@ -2841,8 +2843,8 @@ EXTERN char e_list_item_nr_cell_width_invalid[]
|
||||
INIT(= N_("E1112: List item %d cell width invalid"));
|
||||
EXTERN char e_overlapping_ranges_for_nr[]
|
||||
INIT(= N_("E1113: Overlapping ranges for 0x%lx"));
|
||||
EXTERN char e_only_values_of_0x100_and_higher_supported[]
|
||||
INIT(= N_("E1114: Only values of 0x100 and higher supported"));
|
||||
EXTERN char e_only_values_of_0x80_and_higher_supported[]
|
||||
INIT(= N_("E1114: Only values of 0x80 and higher supported"));
|
||||
EXTERN char e_assert_fails_fourth_argument[]
|
||||
INIT(= N_("E1115: \"assert_fails()\" fourth argument must be a number"));
|
||||
EXTERN char e_assert_fails_fifth_argument[]
|
||||
@@ -3346,8 +3348,8 @@ EXTERN char e_not_allowed_to_add_or_remove_entries_str[]
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN char e_class_name_must_start_with_uppercase_letter_str[]
|
||||
INIT(= N_("E1314: Class name must start with an uppercase letter: %s"));
|
||||
EXTERN char e_white_space_required_after_class_name_str[]
|
||||
INIT(= N_("E1315: White space required after class name: %s"));
|
||||
EXTERN char e_white_space_required_after_name_str[]
|
||||
INIT(= N_("E1315: White space required after name: %s"));
|
||||
EXTERN char e_class_can_only_be_defined_in_vim9_script[]
|
||||
INIT(= N_("E1316: Class can only be defined in Vim9 script"));
|
||||
EXTERN char e_invalid_object_member_declaration_str[]
|
||||
@@ -3370,4 +3372,78 @@ EXTERN char e_method_not_found_on_class_str_str[]
|
||||
INIT(= N_("E1325: Method not found on class \"%s\": %s"));
|
||||
EXTERN char e_member_not_found_on_object_str_str[]
|
||||
INIT(= N_("E1326: Member not found on object \"%s\": %s"));
|
||||
EXTERN char e_object_required_found_str[]
|
||||
INIT(= N_("E1327: Object required, found %s"));
|
||||
EXTERN char e_constructor_default_value_must_be_vnone_str[]
|
||||
INIT(= N_("E1328: Constructor default value must be v:none: %s"));
|
||||
EXTERN char e_cannot_get_object_member_type_from_initializer_str[]
|
||||
INIT(= N_("E1329: Cannot get object member type from initializer: %s"));
|
||||
EXTERN char e_invalid_type_for_object_member_str[]
|
||||
INIT(= N_("E1330: Invalid type for object member: %s"));
|
||||
EXTERN char e_public_must_be_followed_by_this_or_static[]
|
||||
INIT(= N_("E1331: Public must be followed by \"this\" or \"static\""));
|
||||
EXTERN char e_public_member_name_cannot_start_with_underscore_str[]
|
||||
INIT(= N_("E1332: Public member name cannot start with underscore: %s"));
|
||||
EXTERN char e_cannot_access_private_member_str[]
|
||||
INIT(= N_("E1333: Cannot access private member: %s"));
|
||||
EXTERN char e_object_member_not_found_str[]
|
||||
INIT(= N_("E1334: Object member not found: %s"));
|
||||
EXTERN char e_member_is_not_writable_str[]
|
||||
INIT(= N_("E1335: Member is not writable: %s"));
|
||||
#endif
|
||||
EXTERN char e_internal_error_shortmess_too_long[]
|
||||
INIT(= N_("E1336: Internal error: shortmess too long"));
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN char e_class_member_not_found_str[]
|
||||
INIT(= N_("E1337: Class member not found: %s"));
|
||||
EXTERN char e_member_not_found_on_class_str_str[]
|
||||
INIT(= N_("E1338: Member not found on class \"%s\": %s"));
|
||||
#endif
|
||||
#ifdef FEAT_PROP_POPUP
|
||||
EXTERN char e_cannot_add_textprop_with_text_after_using_textprop_with_negative_id[]
|
||||
INIT(= N_("E1339: Cannot add a textprop with text after using a textprop with a negative id"));
|
||||
#endif
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN char e_argument_already_declared_in_class_str[]
|
||||
INIT(= N_("E1340: Argument already declared in the class: %s"));
|
||||
EXTERN char e_variable_already_declared_in_class_str[]
|
||||
INIT(= N_("E1341: Variable already declared in the class: %s"));
|
||||
EXTERN char e_interface_can_only_be_defined_in_vim9_script[]
|
||||
INIT(= N_("E1342: Interface can only be defined in Vim9 script"));
|
||||
EXTERN char e_interface_name_must_start_with_uppercase_letter_str[]
|
||||
INIT(= N_("E1343: Interface name must start with an uppercase letter: %s"));
|
||||
EXTERN char e_cannot_initialize_member_in_interface[]
|
||||
INIT(= N_("E1344: Cannot initialize a member in an interface"));
|
||||
EXTERN char e_not_valid_command_in_interface_str[]
|
||||
INIT(= N_("E1345: Not a valid command in an interface: %s"));
|
||||
EXTERN char e_interface_name_not_found_str[]
|
||||
INIT(= N_("E1346: Interface name not found: %s"));
|
||||
EXTERN char e_not_valid_interface_str[]
|
||||
INIT(= N_("E1347: Not a valid interface: %s"));
|
||||
EXTERN char e_member_str_of_interface_str_not_implemented[]
|
||||
INIT(= N_("E1348: Member \"%s\" of interface \"%s\" not implemented"));
|
||||
EXTERN char e_function_str_of_interface_str_not_implemented[]
|
||||
INIT(= N_("E1349: Function \"%s\" of interface \"%s\" not implemented"));
|
||||
EXTERN char e_duplicate_implements[]
|
||||
INIT(= N_("E1350: Duplicate \"implements\""));
|
||||
EXTERN char e_duplicate_interface_after_implements_str[]
|
||||
INIT(= N_("E1351: Duplicate interface after \"implements\": %s"));
|
||||
EXTERN char e_duplicate_extends[]
|
||||
INIT(= N_("E1352: Duplicate \"extends\""));
|
||||
EXTERN char e_class_name_not_found_str[]
|
||||
INIT(= N_("E1353: Class name not found: %s"));
|
||||
EXTERN char e_cannot_extend_str[]
|
||||
INIT(= N_("E1354: Cannot extend %s"));
|
||||
EXTERN char e_duplicate_function_str[]
|
||||
INIT(= N_("E1355: Duplicate function: %s"));
|
||||
EXTERN char e_super_must_be_followed_by_dot[]
|
||||
INIT(= N_("E1356: \"super\" must be followed by a dot"));
|
||||
EXTERN char e_using_super_not_in_class_function[]
|
||||
INIT(= N_("E1357: Using \"super\" not in a class function"));
|
||||
EXTERN char e_using_super_not_in_child_class[]
|
||||
INIT(= N_("E1358: Using \"super\" not in a child class"));
|
||||
EXTERN char e_cannot_define_new_function_in_abstract_class[]
|
||||
INIT(= N_("E1359: Cannot define a \"new\" function in an abstract class"));
|
||||
EXTERN char e_using_null_object[]
|
||||
INIT(= N_("E1360: Using a null object"));
|
||||
#endif
|
||||
|
||||
789
src/eval.c
789
src/eval.c
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user