mirror of
https://github.com/zoriya/vim.git
synced 2025-12-24 16:15:21 +00:00
Compare commits
270 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e774c7579 | ||
|
|
9c7e6dd653 | ||
|
|
e6085c5350 | ||
|
|
2196bce56f | ||
|
|
a80faa8930 | ||
|
|
82de464f76 | ||
|
|
bfe13ccc58 | ||
|
|
c5f1ef53c2 | ||
|
|
4fdae9996f | ||
|
|
acc770a10f | ||
|
|
cd630becc8 | ||
|
|
99aaf0ce7c | ||
|
|
1363a30cef | ||
|
|
88c1ee84d6 | ||
|
|
3b922f1138 | ||
|
|
08938eeba4 | ||
|
|
e7f234120f | ||
|
|
fe27081724 | ||
|
|
d19a8f97ad | ||
|
|
880e4d9117 | ||
|
|
1378fbc459 | ||
|
|
8832a34578 | ||
|
|
81ea1dfb97 | ||
|
|
004a6781b3 | ||
|
|
d1caa941d8 | ||
|
|
7b293c730b | ||
|
|
9c8bb7c0e2 | ||
|
|
cab2767874 | ||
|
|
5da356e073 | ||
|
|
4d23c52824 | ||
|
|
25d5700952 | ||
|
|
6a2c5a7dd5 | ||
|
|
7035fd9d90 | ||
|
|
476a613135 | ||
|
|
a65c288134 | ||
|
|
49cf7cc8d2 | ||
|
|
0b76b42d0a | ||
|
|
ec5929d0fe | ||
|
|
86b9a3e8cd | ||
|
|
40655d5016 | ||
|
|
c74fbfedfa | ||
|
|
00d253e2b2 | ||
|
|
ee4e0c1e9a | ||
|
|
15352dc6ec | ||
|
|
6c307dcd55 | ||
|
|
8922860afb | ||
|
|
5ba8d3578c | ||
|
|
4c68375057 | ||
|
|
f87a0400fd | ||
|
|
b8ed3aa9e7 | ||
|
|
bdff012f44 | ||
|
|
5d905c2b96 | ||
|
|
5deeb3f1f9 | ||
|
|
d7ffc0ba8c | ||
|
|
8d4ed11da6 | ||
|
|
cde0ff39da | ||
|
|
d77a8525d5 | ||
|
|
5259275347 | ||
|
|
d1e9dc2723 | ||
|
|
01603a9970 | ||
|
|
3cca299520 | ||
|
|
585fea7b98 | ||
|
|
e8c4abbbd7 | ||
|
|
2c869deeb7 | ||
|
|
aeea72151c | ||
|
|
f10806b250 | ||
|
|
4227c789ff | ||
|
|
e5bae13da3 | ||
|
|
a4d4cf490e | ||
|
|
80c34ca312 | ||
|
|
ea94fbe83b | ||
|
|
e69f6d044c | ||
|
|
a8c1770469 | ||
|
|
2da0f0c445 | ||
|
|
0afdcf8601 | ||
|
|
25b70c780a | ||
|
|
05afceeddc | ||
|
|
bd5da371aa | ||
|
|
9be61bbb17 | ||
|
|
01b3862956 | ||
|
|
92dba36fc8 | ||
|
|
d25ec2cfa0 | ||
|
|
ca68ae1311 | ||
|
|
7d333a900d | ||
|
|
0b37a2f379 | ||
|
|
2027973b5b | ||
|
|
5908fdf72f | ||
|
|
c58164c5cf | ||
|
|
52ea92b19d | ||
|
|
bf54dbeb5c | ||
|
|
0fff44152d | ||
|
|
8601545338 | ||
|
|
360bdbda81 | ||
|
|
a30590d3e7 | ||
|
|
7b1b36b1cb | ||
|
|
ee619e5bc0 | ||
|
|
7c003aa314 | ||
|
|
33fa29cf74 | ||
|
|
09c569038c | ||
|
|
599c89c82f | ||
|
|
495282b6e7 | ||
|
|
14285cb801 | ||
|
|
2d9d409ad4 | ||
|
|
191acfdeca | ||
|
|
37bb030cd9 | ||
|
|
9207d1f523 | ||
|
|
bd5e622bfa | ||
|
|
15c476023f | ||
|
|
bea9023d42 | ||
|
|
26bde6e2eb | ||
|
|
72749f062f | ||
|
|
83d4790a04 | ||
|
|
3ed9efc2b1 | ||
|
|
7851b1ca99 | ||
|
|
a9c3a30891 | ||
|
|
82e743c5b3 | ||
|
|
7d941ee032 | ||
|
|
cf3f8bf4dd | ||
|
|
0e05de4622 | ||
|
|
bfcfd5784a | ||
|
|
a07e31af54 | ||
|
|
f66ca9f1df | ||
|
|
d36ef573b2 | ||
|
|
45fffdf10b | ||
|
|
71658f74ae | ||
|
|
f3710ee22d | ||
|
|
d06dbf3f42 | ||
|
|
1082772f4c | ||
|
|
d7b7770f11 | ||
|
|
0df541963d | ||
|
|
db99f9f29a | ||
|
|
dbbb0ef729 | ||
|
|
a8bd349638 | ||
|
|
bad8804cdd | ||
|
|
ab505b1a48 | ||
|
|
56ba21a156 | ||
|
|
5080b0a047 | ||
|
|
c5a8fdc42d | ||
|
|
d5bc32df20 | ||
|
|
7929651e05 | ||
|
|
9b9be007e7 | ||
|
|
515545e11f | ||
|
|
97acfc781b | ||
|
|
ce436de5a9 | ||
|
|
0f1563ffee | ||
|
|
9645e2d9fc | ||
|
|
f1ec378b01 | ||
|
|
20431c9dbb | ||
|
|
8b63313510 | ||
|
|
98be7fecac | ||
|
|
ff78155aa1 | ||
|
|
95e59a355b | ||
|
|
40d235e730 | ||
|
|
373a876d0c | ||
|
|
5e94a29ebb | ||
|
|
37f471df6e | ||
|
|
24e9b6fe4b | ||
|
|
3696839ef1 | ||
|
|
b68df220c5 | ||
|
|
22da5596d0 | ||
|
|
2d10cd4780 | ||
|
|
e32848780c | ||
|
|
3fa5e13262 | ||
|
|
18a2b87ca2 | ||
|
|
a3a9c8ef69 | ||
|
|
30d53e2c11 | ||
|
|
8dfcce3a78 | ||
|
|
3cdcb090a6 | ||
|
|
292b90d4fa | ||
|
|
a21df1db3c | ||
|
|
5715b3147b | ||
|
|
24ebd83e03 | ||
|
|
a2cbdea968 | ||
|
|
7f009dfa06 | ||
|
|
c030063329 | ||
|
|
56cb337872 | ||
|
|
b2e1f8a28f | ||
|
|
ddbfe238a5 | ||
|
|
e4fc746d13 | ||
|
|
833805a486 | ||
|
|
bb65a5690c | ||
|
|
0bdbc10e8a | ||
|
|
0eabd4dc8f | ||
|
|
5e4d1eba95 | ||
|
|
4f32f9c90e | ||
|
|
353c351bd2 | ||
|
|
2573af3519 | ||
|
|
1939826509 | ||
|
|
b17893aa94 | ||
|
|
965fd8d4dc | ||
|
|
346f18e5fe | ||
|
|
d47e6f0b4c | ||
|
|
fa5d8a191d | ||
|
|
8210693795 | ||
|
|
8a677a37d0 | ||
|
|
3a05ce63fe | ||
|
|
66b98854d8 | ||
|
|
cee52204ca | ||
|
|
e49b4bb895 | ||
|
|
1671f44881 | ||
|
|
5269bd2a72 | ||
|
|
3a2505cc18 | ||
|
|
2e09634a78 | ||
|
|
283e5f4e69 | ||
|
|
693e80e938 | ||
|
|
f5f1e10d0d | ||
|
|
d0d440f702 | ||
|
|
14e57909e6 | ||
|
|
8eab731328 | ||
|
|
ba2920fe97 | ||
|
|
bd7206e02c | ||
|
|
49b79bd488 | ||
|
|
8f027fe470 | ||
|
|
a471eeae75 | ||
|
|
a65bb53514 | ||
|
|
d0df1aacd8 | ||
|
|
36ddf93831 | ||
|
|
3e919d2924 | ||
|
|
080457c02d | ||
|
|
6d69bf602b | ||
|
|
5381c7a162 | ||
|
|
91ffc8a5f5 | ||
|
|
61a6d4e48b | ||
|
|
815eb83b09 | ||
|
|
ab55c6826f | ||
|
|
eab6dff19f | ||
|
|
f51cb4e08e | ||
|
|
0546d7df13 | ||
|
|
41fe061753 | ||
|
|
087d2e1518 | ||
|
|
fbdd08ed9b | ||
|
|
f4f190d821 | ||
|
|
b54b8e0c86 | ||
|
|
42a480bf72 | ||
|
|
cc390ff5b2 | ||
|
|
dd58923c6b | ||
|
|
57c339569e | ||
|
|
d30ae2fc4a | ||
|
|
7c215c5893 | ||
|
|
57c732ed78 | ||
|
|
ec084d3356 | ||
|
|
e52e0c89d1 | ||
|
|
80ae880f5f | ||
|
|
d5aec0ced1 | ||
|
|
578fe947e3 | ||
|
|
12f2003871 | ||
|
|
7eeefd4a39 | ||
|
|
b35efa5ed0 | ||
|
|
ad39c094d2 | ||
|
|
b3f740695a | ||
|
|
d672dde584 | ||
|
|
bc93cebb69 | ||
|
|
0c2ca58ef0 | ||
|
|
703ea9eaef | ||
|
|
8d588ccee5 | ||
|
|
c593bec412 | ||
|
|
e010c720b2 | ||
|
|
fa29c8abd6 | ||
|
|
f2d5c240a5 | ||
|
|
750802b55c | ||
|
|
8fb1b47a5e | ||
|
|
b81f56fb57 | ||
|
|
1aa76b8fd0 | ||
|
|
026270c01d | ||
|
|
83f37b9142 | ||
|
|
8040a7147f | ||
|
|
95ffd43f88 | ||
|
|
d28e0b3652 | ||
|
|
0c81d1b112 | ||
|
|
b654103ad1 |
118
.travis.yml
118
.travis.yml
@@ -1,23 +1,23 @@
|
||||
language: c
|
||||
|
||||
anchors:
|
||||
_anchors:
|
||||
envs:
|
||||
- &tiny-nogui
|
||||
BUILD=yes TEST=test COVERAGE=no FEATURES=tiny "CONFOPT='--disable-gui'" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
BUILD=yes TEST=test FEATURES=tiny CONFOPT="--disable-gui" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
- &tiny
|
||||
BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
BUILD=yes TEST=test FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
- &small
|
||||
BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
BUILD=yes TEST=test FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
- &normal
|
||||
BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
BUILD=yes TEST=test FEATURES=normal CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
- &linux-huge
|
||||
BUILD=yes TEST="scripttests test_libvterm" COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
|
||||
BUILD=yes TEST="scripttests test_libvterm" CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
CONFOPT="--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
|
||||
- &osx-huge # macOS build
|
||||
BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
|
||||
BUILD=yes TEST=test FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
CONFOPT="--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
|
||||
- &unittests
|
||||
BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
|
||||
BUILD=no TEST=unittests CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
|
||||
- &asan # ASAN build
|
||||
SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
|
||||
ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
|
||||
@@ -26,12 +26,9 @@ anchors:
|
||||
|
||||
linux: &linux
|
||||
os: linux
|
||||
dist: trusty
|
||||
dist: bionic
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
# Need msgfmt 0.19.8 to be able to generate .desktop files
|
||||
- sourceline: 'ppa:ricotz/toolchain'
|
||||
packages:
|
||||
- autoconf
|
||||
- clang
|
||||
@@ -41,46 +38,41 @@ anchors:
|
||||
- libperl-dev
|
||||
- python-dev
|
||||
- python3-dev
|
||||
- liblua5.2-dev
|
||||
- lua5.2
|
||||
- liblua5.3-dev
|
||||
- lua5.3
|
||||
- ruby-dev
|
||||
- tcl-dev
|
||||
- cscope
|
||||
- libgtk2.0-dev
|
||||
- desktop-file-utils
|
||||
- libtool-bin
|
||||
services:
|
||||
- xvfb
|
||||
before_install:
|
||||
- rvm reset
|
||||
# Remove /opt/python/3.x.x/bin from $PATH for using system python3.
|
||||
# ("pyenv global system" doesn't seem to work.)
|
||||
- |
|
||||
if [[ "$(which python3)" =~ ^/opt/python/ ]]; then
|
||||
export PATH=$(py3=$(which python3); echo ${PATH//${py3%/python3}:/})
|
||||
fi
|
||||
- |
|
||||
if [[ "${COVERAGE}" = "yes" ]]; then
|
||||
pip install --user cpp-coveralls
|
||||
fi
|
||||
# needed for https support for coveralls
|
||||
# building cffi only works with gcc, not with clang
|
||||
- |
|
||||
if [[ "${COVERAGE}" = "yes" ]]; then
|
||||
CC=gcc pip install --user pyopenssl ndg-httpsclient pyasn1
|
||||
fi
|
||||
# Use llvm-cov instead of gcov when compiler is clang.
|
||||
- |
|
||||
if [[ "${CC}" = "clang" ]]; then
|
||||
ln -sf "$(which llvm-cov)" /home/travis/bin/gcov
|
||||
ln -sf "$(command -v llvm-cov)" /home/travis/bin/gcov
|
||||
fi
|
||||
# Setup lua5.3 manually since its package doesn't provide alternative.
|
||||
# https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
|
||||
- |
|
||||
if [[ "${CONFOPT}" =~ luainterp ]]; then
|
||||
sudo update-alternatives --install /usr/bin/lua lua /usr/bin/lua5.3 10
|
||||
fi
|
||||
before_script:
|
||||
# Start virtual framebuffer to be able to test the GUI. Does not work on OS X.
|
||||
- export DISPLAY=:99.0
|
||||
- sh -e /etc/init.d/xvfb start && sleep 3
|
||||
- sudo modprobe snd-dummy
|
||||
- sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
|
||||
- sudo bash ci/load-snd-dummy.sh || true
|
||||
- sudo usermod -a -G audio $USER
|
||||
- do_test() { sg audio "sg $(id -gn) '$*'"; }
|
||||
|
||||
osx: &osx
|
||||
os: osx
|
||||
before_script:
|
||||
- do_test() { "$@"; }
|
||||
|
||||
homebrew: &osx-homebrew
|
||||
addons:
|
||||
homebrew:
|
||||
packages:
|
||||
@@ -89,25 +81,24 @@ anchors:
|
||||
cache:
|
||||
directories:
|
||||
- /usr/local/Homebrew/Library/Homebrew/vendor/
|
||||
- /usr/local/Homebrew/Library/Taps/
|
||||
- /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/
|
||||
before_install:
|
||||
- rvm reset
|
||||
# Lua is not installed on Travis OSX
|
||||
# Lua is not installed on macOS
|
||||
- export LUA_PREFIX=/usr/local
|
||||
before_script:
|
||||
- do_test() { "$@"; }
|
||||
|
||||
coverage: &coverage
|
||||
# needed for https support for coveralls building cffi only works with gcc,
|
||||
# not with clang
|
||||
- CC=gcc pip install --user cpp-coveralls pyopenssl ndg-httpsclient pyasn1
|
||||
- ~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8
|
||||
- (cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
|
||||
|
||||
asan_symbolize: &asan_symbolize
|
||||
- |
|
||||
while read log; do
|
||||
asan_symbolize < "${log}"
|
||||
done < <(find . -type f -name 'asan.*' -size +0)
|
||||
|
||||
sudo: false
|
||||
# Update pyenv to fix the error "/opt/pyenv/libexec/pyenv: line 43: cd: asan_symbolize-6.0: Not a directory".
|
||||
# https://github.com/pyenv/pyenv/issues/580
|
||||
- (cd "${PYENV_ROOT}" && git fetch -p origin && git checkout "$(git rev-list --tags -n1)") &>/dev/null || true
|
||||
- find . -type f -name 'asan.*' -size +0 2>/dev/null | xargs grep -l '^==[[:digit:]]*==ERROR:' | xargs -I{} -n1 -t asan_symbolize -l{}
|
||||
|
||||
branches:
|
||||
except:
|
||||
@@ -131,6 +122,10 @@ script:
|
||||
- echo -e "\\033[33;1mBuilding Vim\\033[0m" && echo -en "travis_fold:start:build\\r\\033[0K"
|
||||
- |
|
||||
if [[ "${BUILD}" = "yes" ]]; then
|
||||
# Append various warning flags to CFLAGS.
|
||||
# BSD sed needs backup extension specified.
|
||||
sed -i.bak -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
|
||||
sed -i.bak -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
|
||||
make ${SHADOWOPT} -j${NPROC}
|
||||
fi
|
||||
- echo -en "travis_fold:end:build\\r\\033[0K"
|
||||
@@ -139,8 +134,8 @@ script:
|
||||
- |
|
||||
if [[ "${BUILD}" = "yes" ]]; then
|
||||
"${SRCDIR}"/vim --version
|
||||
"${SRCDIR}"/vim -u NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
|
||||
"${SRCDIR}"/vim -u NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
|
||||
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
|
||||
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
|
||||
fi
|
||||
- echo -e "\\033[33;1mTesting Vim\\033[0m" && echo -en "travis_fold:start:test\\r\\033[0K"
|
||||
- do_test make ${SHADOWOPT} ${TEST} && FOLD_MARKER=travis_fold
|
||||
@@ -151,7 +146,7 @@ script:
|
||||
# exclude some builds on mac os x and linux
|
||||
# on mac os x "tiny" is always without GUI
|
||||
# linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
|
||||
matrix:
|
||||
jobs:
|
||||
include:
|
||||
- <<: *osx
|
||||
name: tiny-nogui/clang
|
||||
@@ -162,10 +157,12 @@ matrix:
|
||||
compiler: gcc
|
||||
env: *tiny-nogui
|
||||
- <<: *osx
|
||||
<<: *osx-homebrew
|
||||
name: huge/clang
|
||||
compiler: clang
|
||||
env: *osx-huge
|
||||
- <<: *osx
|
||||
<<: *osx-homebrew
|
||||
name: huge/gcc
|
||||
compiler: gcc
|
||||
env: *osx-huge
|
||||
@@ -201,21 +198,25 @@ matrix:
|
||||
env:
|
||||
- *normal
|
||||
- *shadowopt
|
||||
- <<: *linux
|
||||
arch: s390x
|
||||
name: huge/gcc-s390x
|
||||
compiler: gcc
|
||||
env: *linux-huge
|
||||
services: []
|
||||
- <<: *linux
|
||||
name: huge+coverage/clang
|
||||
compiler: clang
|
||||
env: *linux-huge
|
||||
env:
|
||||
- *linux-huge
|
||||
# Clang cannot compile test_libvterm with "--coverage" flag.
|
||||
- TEST=scripttests
|
||||
after_success: *coverage
|
||||
- <<: *linux
|
||||
name: huge+coverage/gcc
|
||||
compiler: gcc
|
||||
env: *linux-huge
|
||||
after_success: *coverage
|
||||
- <<: *linux
|
||||
name: unittests+coverage/gcc
|
||||
compiler: gcc
|
||||
env: *unittests
|
||||
after_success: *coverage
|
||||
- <<: *linux # ASAN
|
||||
name: huge+asan/gcc
|
||||
compiler: gcc
|
||||
@@ -230,6 +231,11 @@ matrix:
|
||||
- *linux-huge
|
||||
- TEST="-C src testgui"
|
||||
after_success: *coverage
|
||||
- <<: *linux
|
||||
name: unittests+coverage/gcc
|
||||
compiler: gcc
|
||||
env: *unittests
|
||||
after_success: *coverage
|
||||
- <<: *linux
|
||||
name: vimtags/gcc
|
||||
compiler: gcc
|
||||
|
||||
46
Filelist
46
Filelist
@@ -12,9 +12,9 @@ SRC_ALL = \
|
||||
appveyor.yml \
|
||||
ci/appveyor.bat \
|
||||
ci/if_ver*.vim \
|
||||
ci/load-snd-dummy.sh \
|
||||
src/Make_all.mak \
|
||||
src/README.md \
|
||||
src/README_VIM9.md \
|
||||
src/alloc.h \
|
||||
src/arabic.c \
|
||||
src/arglist.c \
|
||||
@@ -30,6 +30,8 @@ SRC_ALL = \
|
||||
src/channel.c \
|
||||
src/charset.c \
|
||||
src/cindent.c \
|
||||
src/clientserver.c \
|
||||
src/clipboard.c \
|
||||
src/cmdexpand.c \
|
||||
src/cmdhist.c \
|
||||
src/crypt.c \
|
||||
@@ -151,17 +153,18 @@ SRC_ALL = \
|
||||
src/testdir/*.py \
|
||||
src/testdir/lsan-suppress.txt \
|
||||
src/testdir/sautest/autoload/*.vim \
|
||||
src/testdir/runtest.vim \
|
||||
src/testdir/summarize.vim \
|
||||
src/testdir/check.vim \
|
||||
src/testdir/shared.vim \
|
||||
src/testdir/screendump.vim \
|
||||
src/testdir/view_util.vim \
|
||||
src/testdir/term_util.vim \
|
||||
src/testdir/setup.vim \
|
||||
src/testdir/gui_init.vim \
|
||||
src/testdir/setup_gui.vim \
|
||||
src/testdir/gui_preinit.vim \
|
||||
src/testdir/mouse.vim \
|
||||
src/testdir/runtest.vim \
|
||||
src/testdir/screendump.vim \
|
||||
src/testdir/setup.vim \
|
||||
src/testdir/setup_gui.vim \
|
||||
src/testdir/shared.vim \
|
||||
src/testdir/summarize.vim \
|
||||
src/testdir/term_util.vim \
|
||||
src/testdir/view_util.vim \
|
||||
src/testdir/test[0-9]*.ok \
|
||||
src/testdir/test[0-9]*a.ok \
|
||||
src/testdir/test_[a-z]*.ok \
|
||||
@@ -201,6 +204,8 @@ SRC_ALL = \
|
||||
src/proto/channel.pro \
|
||||
src/proto/charset.pro \
|
||||
src/proto/cindent.pro \
|
||||
src/proto/clientserver.pro \
|
||||
src/proto/clipboard.pro \
|
||||
src/proto/cmdexpand.pro \
|
||||
src/proto/cmdhist.pro \
|
||||
src/proto/crypt.pro \
|
||||
@@ -600,6 +605,14 @@ SRC_AMI = \
|
||||
src/testdir/amiga.vim \
|
||||
src/xxd/Make_amiga.mak \
|
||||
|
||||
# source files for Haiku (also in the extra archive)
|
||||
SRC_HAIKU = \
|
||||
src/os_haiku.h \
|
||||
src/os_haiku.rdef \
|
||||
src/gui_haiku.cc \
|
||||
src/gui_haiku.h \
|
||||
src/proto/gui_haiku.pro \
|
||||
|
||||
# source files for the Mac (also in the extra archive)
|
||||
SRC_MAC = \
|
||||
src/INSTALLmac.txt \
|
||||
@@ -635,13 +648,13 @@ SRC_QNX = \
|
||||
src/proto/gui_photon.pro \
|
||||
src/proto/os_qnx.pro \
|
||||
|
||||
|
||||
# source files for the extra archive (all sources that are not for Unix)
|
||||
SRC_EXTRA = \
|
||||
$(SRC_AMI) \
|
||||
$(SRC_AMI_DOS) \
|
||||
$(SRC_DOS) \
|
||||
$(SRC_DOS_BIN) \
|
||||
$(SRC_HAIKU) \
|
||||
$(SRC_MAC) \
|
||||
$(SRC_QNX) \
|
||||
$(SRC_VMS) \
|
||||
@@ -661,6 +674,7 @@ SRC_EXTRA = \
|
||||
RT_ALL = \
|
||||
README.txt \
|
||||
README.md \
|
||||
README_VIM9.md \
|
||||
LICENSE \
|
||||
CONTRIBUTING.md \
|
||||
runtime/bugreport.vim \
|
||||
@@ -776,20 +790,20 @@ RT_UNIX = \
|
||||
README_unix.txt \
|
||||
runtime/hi16-action-make.png \
|
||||
runtime/hi22-action-make.png \
|
||||
runtime/vim16x16.png \
|
||||
runtime/vim16x16.xpm \
|
||||
runtime/vim32x32.png \
|
||||
runtime/vim32x32.xpm \
|
||||
runtime/vim48x48.png \
|
||||
runtime/vim48x48.xpm \
|
||||
runtime/gvim.desktop \
|
||||
runtime/vim.desktop \
|
||||
|
||||
# Unix and DOS runtime without CR-LF translation
|
||||
RT_UNIX_DOS_BIN = \
|
||||
runtime/vim16x16.gif \
|
||||
runtime/vim16x16.png \
|
||||
runtime/vim16x16.xpm \
|
||||
runtime/vim32x32.gif \
|
||||
runtime/vim32x32.png \
|
||||
runtime/vim32x32.xpm \
|
||||
runtime/vim48x48.gif \
|
||||
runtime/vim48x48.png \
|
||||
runtime/vim48x48.xpm \
|
||||
|
||||
# runtime not for unix or extra
|
||||
RT_NO_UNIX = \
|
||||
|
||||
@@ -25,9 +25,9 @@ test_script:
|
||||
- cd src/testdir
|
||||
# Testing with MSVC gvim
|
||||
- path C:\Python35-x64;%PATH%
|
||||
- nmake -f Make_dos.mak VIMPROG=..\gvim
|
||||
- nmake -f Make_dos.mak POSTSCRIPT=yes VIMPROG=..\gvim
|
||||
- nmake -f Make_dos.mak clean
|
||||
# Testing with MingW console version
|
||||
- nmake -f Make_dos.mak VIMPROG=..\vim
|
||||
- nmake -f Make_dos.mak POSTSCRIPT=yes VIMPROG=..\vim
|
||||
|
||||
# vim: sw=2 sts=2 et ts=8 sr
|
||||
|
||||
1
ci/config.mk.clang.sed
Normal file
1
ci/config.mk.clang.sed
Normal file
@@ -0,0 +1 @@
|
||||
/^RUBY_CFLAGS\b/s/$/ -Wno-error=unknown-attributes -Wno-error=ignored-attributes/
|
||||
1
ci/config.mk.gcc.sed
Normal file
1
ci/config.mk.gcc.sed
Normal file
@@ -0,0 +1 @@
|
||||
/^CFLAGS\b/s/$/ -Wno-error=maybe-uninitialized/
|
||||
2
ci/config.mk.sed
Normal file
2
ci/config.mk.sed
Normal file
@@ -0,0 +1,2 @@
|
||||
/^CFLAGS\b/s/$/ -Wall -Wextra -Wshadow -Werror/
|
||||
/^PERL_CFLAGS\b/s/$/ -Wno-error=unused-function/
|
||||
8
ci/load-snd-dummy.sh
Normal file
8
ci/load-snd-dummy.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if ! modprobe snd-dummy; then
|
||||
# snd-dummy is contained in linux-modules-extra (if exists)
|
||||
apt install -y "linux-modules-extra-$(uname -r)"
|
||||
modprobe snd-dummy
|
||||
fi
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2018 Aug 20
|
||||
" Last Change: 2020 Apr 08
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
@@ -635,3 +635,5 @@ endfunc
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: noet sw=2 sts=2
|
||||
|
||||
4
runtime/autoload/dist/ft.vim
vendored
4
runtime/autoload/dist/ft.vim
vendored
@@ -1,7 +1,7 @@
|
||||
" Vim functions for file type detection
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Jan 02
|
||||
" Last Change: 2020 Mar 30
|
||||
|
||||
" These functions are moved here from runtime/filetype.vim to make startup
|
||||
" faster.
|
||||
@@ -325,7 +325,7 @@ endfunc
|
||||
|
||||
func dist#ft#FTmm()
|
||||
let n = 1
|
||||
while n < 10
|
||||
while n < 20
|
||||
let line = getline(n)
|
||||
if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\)'
|
||||
setf objcpp
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim plugin for formatting XML
|
||||
" Last Change: 2019 Oct 24
|
||||
" Version: 0.2
|
||||
" Last Change: 2020 Jan 06
|
||||
" Version: 0.3
|
||||
" Author: Christian Brabandt <cb@256bit.org>
|
||||
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
|
||||
" License: VIM License
|
||||
@@ -15,7 +15,7 @@ let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Main function: Format the input {{{1
|
||||
func! xmlformat#Format()
|
||||
func! xmlformat#Format() abort
|
||||
" only allow reformatting through the gq command
|
||||
" (e.g. Vim is in normal mode)
|
||||
if mode() != 'n'
|
||||
@@ -40,14 +40,16 @@ func! xmlformat#Format()
|
||||
continue
|
||||
elseif line !~# '<[/]\?[^>]*>'
|
||||
let nextmatch = match(list, '<[/]\?[^>]*>', current)
|
||||
let line .= join(list[(current + 1):(nextmatch-1)], "\n")
|
||||
call remove(list, current+1, nextmatch-1)
|
||||
if nextmatch > -1
|
||||
let line .= ' '. join(list[(current + 1):(nextmatch-1)], " ")
|
||||
call remove(list, current+1, nextmatch-1)
|
||||
endif
|
||||
endif
|
||||
" split on `>`, but don't split on very first opening <
|
||||
" this means, items can be like ['<tag>', 'tag content</tag>']
|
||||
for item in split(line, '.\@<=[>]\zs')
|
||||
if s:EndTag(item)
|
||||
let s:indent = s:DecreaseIndent()
|
||||
call s:DecreaseIndent()
|
||||
call add(result, s:Indent(item))
|
||||
elseif s:EmptyTag(lastitem)
|
||||
call add(result, s:Indent(item))
|
||||
@@ -59,13 +61,23 @@ func! xmlformat#Format()
|
||||
" Simply split on '<', if there is one,
|
||||
" but reformat according to &textwidth
|
||||
let t=split(item, '.<\@=\zs')
|
||||
|
||||
" if the content fits well within a single line, add it there
|
||||
" so that the output looks like this:
|
||||
"
|
||||
" <foobar>1</foobar>
|
||||
if s:TagContent(lastitem) is# s:TagContent(t[1]) && strlen(result[-1]) + strlen(item) <= s:Textwidth()
|
||||
let result[-1] .= item
|
||||
let lastitem = t[1]
|
||||
continue
|
||||
endif
|
||||
" t should only contain 2 items, but just be safe here
|
||||
if s:IsTag(lastitem)
|
||||
let s:indent+=1
|
||||
endif
|
||||
let result+=s:FormatContent([t[0]])
|
||||
if s:EndTag(t[1])
|
||||
let s:indent = s:DecreaseIndent()
|
||||
call s:DecreaseIndent()
|
||||
endif
|
||||
"for y in t[1:]
|
||||
let result+=s:FormatContent(t[1:])
|
||||
@@ -97,15 +109,15 @@ func! xmlformat#Format()
|
||||
return 0
|
||||
endfunc
|
||||
" Check if given tag is XML Declaration header {{{1
|
||||
func! s:IsXMLDecl(tag)
|
||||
func! s:IsXMLDecl(tag) abort
|
||||
return a:tag =~? '^\s*<?xml\s\?\%(version="[^"]*"\)\?\s\?\%(encoding="[^"]*"\)\? ?>\s*$'
|
||||
endfunc
|
||||
" Return tag indented by current level {{{1
|
||||
func! s:Indent(item)
|
||||
func! s:Indent(item) abort
|
||||
return repeat(' ', shiftwidth()*s:indent). s:Trim(a:item)
|
||||
endfu
|
||||
" Return item trimmed from leading whitespace {{{1
|
||||
func! s:Trim(item)
|
||||
func! s:Trim(item) abort
|
||||
if exists('*trim')
|
||||
return trim(a:item)
|
||||
else
|
||||
@@ -113,44 +125,53 @@ func! s:Trim(item)
|
||||
endif
|
||||
endfunc
|
||||
" Check if tag is a new opening tag <tag> {{{1
|
||||
func! s:StartTag(tag)
|
||||
func! s:StartTag(tag) abort
|
||||
let is_comment = s:IsComment(a:tag)
|
||||
return a:tag =~? '^\s*<[^/?]' && !is_comment
|
||||
endfunc
|
||||
" Check if tag is a Comment start {{{1
|
||||
func! s:IsComment(tag)
|
||||
func! s:IsComment(tag) abort
|
||||
return a:tag =~? '<!--'
|
||||
endfunc
|
||||
" Remove one level of indentation {{{1
|
||||
func! s:DecreaseIndent()
|
||||
return (s:indent > 0 ? s:indent - 1 : 0)
|
||||
func! s:DecreaseIndent() abort
|
||||
let s:indent = (s:indent > 0 ? s:indent - 1 : 0)
|
||||
endfunc
|
||||
" Check if tag is a closing tag </tag> {{{1
|
||||
func! s:EndTag(tag)
|
||||
func! s:EndTag(tag) abort
|
||||
return a:tag =~? '^\s*</'
|
||||
endfunc
|
||||
" Check that the tag is actually a tag and not {{{1
|
||||
" something like "foobar</foobar>"
|
||||
func! s:IsTag(tag)
|
||||
func! s:IsTag(tag) abort
|
||||
return s:Trim(a:tag)[0] == '<'
|
||||
endfunc
|
||||
" Check if tag is empty <tag/> {{{1
|
||||
func! s:EmptyTag(tag)
|
||||
func! s:EmptyTag(tag) abort
|
||||
return a:tag =~ '/>\s*$'
|
||||
endfunc
|
||||
func! s:TagContent(tag) abort "{{{1
|
||||
" Return content of a tag
|
||||
return substitute(a:tag, '^\s*<[/]\?\([^>]*\)>\s*$', '\1', '')
|
||||
endfunc
|
||||
func! s:Textwidth() abort "{{{1
|
||||
" return textwidth (or 80 if not set)
|
||||
return &textwidth == 0 ? 80 : &textwidth
|
||||
endfunc
|
||||
" Format input line according to textwidth {{{1
|
||||
func! s:FormatContent(list)
|
||||
func! s:FormatContent(list) abort
|
||||
let result=[]
|
||||
let limit = 80
|
||||
if &textwidth > 0
|
||||
let limit = &textwidth
|
||||
endif
|
||||
let limit = s:Textwidth()
|
||||
let column=0
|
||||
let idx = -1
|
||||
let add_indent = 0
|
||||
let cnt = 0
|
||||
for item in a:list
|
||||
for word in split(item, '\s\+\S\+\zs')
|
||||
if match(word, '^\s\+$') > -1
|
||||
" skip empty words
|
||||
continue
|
||||
endif
|
||||
let column += strdisplaywidth(word, column)
|
||||
if match(word, "^\\s*\n\\+\\s*$") > -1
|
||||
call add(result, '')
|
||||
|
||||
@@ -64,6 +64,7 @@ DOCS = \
|
||||
os_amiga.txt \
|
||||
os_beos.txt \
|
||||
os_dos.txt \
|
||||
os_haiku.txt \
|
||||
os_mac.txt \
|
||||
os_mint.txt \
|
||||
os_msdos.txt \
|
||||
@@ -204,6 +205,7 @@ HTMLS = \
|
||||
os_amiga.html \
|
||||
os_beos.html \
|
||||
os_dos.html \
|
||||
os_haiku.html \
|
||||
os_mac.html \
|
||||
os_mint.html \
|
||||
os_msdos.html \
|
||||
@@ -422,6 +424,9 @@ os_beos.txt:
|
||||
os_dos.txt:
|
||||
touch os_dos.txt
|
||||
|
||||
os_haiku.txt:
|
||||
touch os_haiku.txt
|
||||
|
||||
os_mac.txt:
|
||||
touch os_mac.txt
|
||||
|
||||
|
||||
@@ -1458,7 +1458,7 @@ text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim: >
|
||||
func! format#Format()
|
||||
" only reformat on explicit gq command
|
||||
if mode() != 'n'
|
||||
" fall back to Vims internal reformatting
|
||||
" fall back to Vim's internal reformatting
|
||||
return 1
|
||||
endif
|
||||
let lines = getline(v:lnum, v:lnum + v:count - 1)
|
||||
|
||||
@@ -120,6 +120,9 @@ Use |ch_status()| to see if the channel could be opened.
|
||||
|
||||
{address} has the form "hostname:port". E.g., "localhost:8765".
|
||||
|
||||
When using an IPv6 address, enclose it within square brackets. E.g.,
|
||||
"[2001:db8::1]:8765".
|
||||
|
||||
{options} is a dictionary with optional entries: *channel-open-options*
|
||||
|
||||
"mode" can be: *channel-mode*
|
||||
@@ -621,6 +624,9 @@ ch_open({address} [, {options}]) *ch_open()*
|
||||
{address} has the form "hostname:port", e.g.,
|
||||
"localhost:8765".
|
||||
|
||||
When using an IPv6 address, enclose it within square brackets.
|
||||
E.g., "[2001:db8::1]:8765".
|
||||
|
||||
If {options} is given it must be a |Dictionary|.
|
||||
See |channel-open-options|.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 8.2. Last change: 2019 Dec 17
|
||||
*cmdline.txt* For Vim version 8.2. Last change: 2020 Feb 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -476,6 +476,10 @@ emulate it. For example, this mimics autolist=ambiguous:
|
||||
This will find the longest match with the first 'wildchar', then list all
|
||||
matching files with the next.
|
||||
|
||||
*complete-script-local-functions*
|
||||
When completing user function names, prepend "s:" to find script-local
|
||||
functions.
|
||||
|
||||
*suffixes*
|
||||
For file name completion you can use the 'suffixes' option to set a priority
|
||||
between files with almost the same name. If there are multiple matches,
|
||||
@@ -586,6 +590,7 @@ followed by another Vim command:
|
||||
:command
|
||||
:cscope
|
||||
:debug
|
||||
:eval
|
||||
:folddoopen
|
||||
:folddoclosed
|
||||
:function
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.2. Last change: 2020 Feb 14
|
||||
*eval.txt* For Vim version 8.2. Last change: 2020 Apr 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1992,7 +1992,7 @@ v:null An empty String. Used to put "null" in JSON. See
|
||||
|
||||
*v:numbersize* *numbersize-variable*
|
||||
v:numbersize Number of bits in a Number. This is normally 64, but on some
|
||||
systems it my be 32.
|
||||
systems it may be 32.
|
||||
|
||||
*v:oldfiles* *oldfiles-variable*
|
||||
v:oldfiles List of file names that is loaded from the |viminfo| file on
|
||||
@@ -2515,7 +2515,7 @@ glob({expr} [, {nosuf} [, {list} [, {alllinks}]]])
|
||||
glob2regpat({expr}) String convert a glob pat into a search pat
|
||||
globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
|
||||
String do glob({expr}) for all dirs in {path}
|
||||
has({feature}) Number |TRUE| if feature {feature} supported
|
||||
has({feature} [, {check}]) Number |TRUE| if feature {feature} supported
|
||||
has_key({dict}, {key}) Number |TRUE| if {dict} has entry {key}
|
||||
haslocaldir([{winnr} [, {tabnr}]])
|
||||
Number |TRUE| if the window executed |:lcd|
|
||||
@@ -2601,6 +2601,7 @@ matchstr({expr}, {pat} [, {start} [, {count}]])
|
||||
matchstrpos({expr}, {pat} [, {start} [, {count}]])
|
||||
List {count}'th match of {pat} in {expr}
|
||||
max({expr}) Number maximum value of items in {expr}
|
||||
menu_info({name} [, {mode}]) Dict get menu item information
|
||||
min({expr}) Number minimum value of items in {expr}
|
||||
mkdir({name} [, {path} [, {prot}]])
|
||||
Number create directory {name}
|
||||
@@ -2860,6 +2861,7 @@ test_ignore_error({expr}) none ignore a specific error
|
||||
test_null_blob() Blob null value for testing
|
||||
test_null_channel() Channel null value for testing
|
||||
test_null_dict() Dict null value for testing
|
||||
test_null_function() Funcref null value for testing
|
||||
test_null_job() Job null value for testing
|
||||
test_null_list() List null value for testing
|
||||
test_null_partial() Funcref null value for testing
|
||||
@@ -4101,8 +4103,12 @@ exists({expr}) The result is a Number, which is |TRUE| if {expr} is defined,
|
||||
string)
|
||||
*funcname built-in function (see |functions|)
|
||||
or user defined function (see
|
||||
|user-functions|). Also works for a
|
||||
variable that is a Funcref.
|
||||
|user-functions|) that is implemented.
|
||||
Also works for a variable that is a
|
||||
Funcref.
|
||||
?funcname built-in function that could be
|
||||
implemented; to be used to check if
|
||||
"funcname" is valid
|
||||
varname internal variable (see
|
||||
|internal-variables|). Also works
|
||||
for |curly-braces-names|, |Dictionary|
|
||||
@@ -4357,6 +4363,8 @@ feedkeys({string} [, {mode}]) *feedkeys()*
|
||||
'L' Lowlevel input. Only works for Unix or when using the
|
||||
GUI. Keys are used as if they were coming from the
|
||||
terminal. Other flags are not used. *E980*
|
||||
When a CTRL-C interrupts and 't' is included it sets
|
||||
the internal "got_int" flag.
|
||||
'i' Insert the string instead of appending (see above).
|
||||
'x' Execute commands until typeahead is empty. This is
|
||||
similar to using ":normal!". You can call feedkeys()
|
||||
@@ -5129,10 +5137,11 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
|
||||
<
|
||||
*getcurpos()*
|
||||
getcurpos() Get the position of the cursor. This is like getpos('.'), but
|
||||
includes an extra item in the list:
|
||||
[bufnum, lnum, col, off, curswant] ~
|
||||
includes an extra "curswant" item in the list:
|
||||
[0, lnum, col, off, curswant] ~
|
||||
The "curswant" number is the preferred column when moving the
|
||||
cursor vertically. Also see |getpos()|.
|
||||
The first "bufnum" item is always zero.
|
||||
|
||||
This can be used to save and restore the cursor position: >
|
||||
let save_cursor = getcurpos()
|
||||
@@ -5825,11 +5834,32 @@ globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
|
||||
GetExpr()->globpath(&rtp)
|
||||
<
|
||||
*has()*
|
||||
has({feature}) The result is a Number, which is 1 if the feature {feature} is
|
||||
supported, zero otherwise. The {feature} argument is a
|
||||
string. See |feature-list| below.
|
||||
has({feature} [, {check}])
|
||||
When {check} is omitted or is zero: The result is a Number,
|
||||
which is 1 if the feature {feature} is supported, zero
|
||||
otherwise. The {feature} argument is a string, case is
|
||||
ignored. See |feature-list| below.
|
||||
|
||||
When {check} is present and not zero: The result is a Number,
|
||||
which is 1 if the feature {feature} could ever be supported,
|
||||
zero otherwise. This is useful to check for a typo in
|
||||
{feature} and to detect dead code. Keep in mind that an older
|
||||
Vim version will not know about a feature added later and
|
||||
features that have been abandoned will not be know by the
|
||||
current Vim version.
|
||||
|
||||
Also see |exists()|.
|
||||
|
||||
Note that to skip code that has a syntax error when the
|
||||
feature is not available, Vim may skip the rest of the line
|
||||
and miss a following `endif`. Therfore put the `endif` on a
|
||||
separate line: >
|
||||
if has('feature')
|
||||
let x = this->breaks->without->the->feature
|
||||
endif
|
||||
< If the `endif` would be moved to the second line as "| endif" it
|
||||
would not be found.
|
||||
|
||||
|
||||
has_key({dict}, {key}) *has_key()*
|
||||
The result is a Number, which is 1 if |Dictionary| {dict} has
|
||||
@@ -6796,6 +6826,7 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()*
|
||||
"rhs" The {rhs} of the mapping as typed.
|
||||
"silent" 1 for a |:map-silent| mapping, else 0.
|
||||
"noremap" 1 if the {rhs} of the mapping is not remappable.
|
||||
"script" 1 if mapping was defined with <script>.
|
||||
"expr" 1 for an expression mapping (|:map-<expr>|).
|
||||
"buffer" 1 for a buffer local mapping (|:map-local|).
|
||||
"mode" Modes for which the mapping is defined. In
|
||||
@@ -6912,6 +6943,10 @@ match({expr}, {pat} [, {start} [, {count}]]) *match()*
|
||||
The 'ignorecase' option is used to set the ignore-caseness of
|
||||
the pattern. 'smartcase' is NOT used. The matching is always
|
||||
done like 'magic' is set and 'cpoptions' is empty.
|
||||
Note that a match at the start is preferred, thus when the
|
||||
pattern is using "*" (any number of matches) it tends to find
|
||||
zero matches at the start instead of a number of matches
|
||||
further down in the text.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetList()->match('word')
|
||||
@@ -7109,6 +7144,7 @@ matchstrpos({expr}, {pat} [, {start} [, {count}]]) *matchstrpos()*
|
||||
Can also be used as a |method|: >
|
||||
GetText()->matchstrpos('word')
|
||||
<
|
||||
|
||||
*max()*
|
||||
max({expr}) Return the maximum value of all items in {expr}.
|
||||
{expr} can be a List or a Dictionary. For a Dictionary,
|
||||
@@ -7120,6 +7156,66 @@ max({expr}) Return the maximum value of all items in {expr}.
|
||||
Can also be used as a |method|: >
|
||||
mylist->max()
|
||||
|
||||
|
||||
menu_info({name} [, {mode}]) *menu_info()*
|
||||
Return information about the specified menu {name} in
|
||||
mode {mode}. The menu name should be specified without the
|
||||
shortcut character ('&').
|
||||
|
||||
{mode} can be one of these strings:
|
||||
"n" Normal
|
||||
"v" Visual (including Select)
|
||||
"o" Operator-pending
|
||||
"i" Insert
|
||||
"c" Cmd-line
|
||||
"s" Select
|
||||
"x" Visual
|
||||
"t" Terminal-Job
|
||||
"" Normal, Visual and Operator-pending
|
||||
"!" Insert and Cmd-line
|
||||
When {mode} is omitted, the modes for "" are used.
|
||||
|
||||
Returns a |Dictionary| containing the following items:
|
||||
accel menu item accelerator text |menu-text|
|
||||
display display name (name without '&')
|
||||
enabled v:true if this menu item is enabled
|
||||
Refer to |:menu-enable|
|
||||
icon name of the icon file (for toolbar)
|
||||
|toolbar-icon|
|
||||
iconidx index of a built-in icon
|
||||
modes modes for which the menu is defined. In
|
||||
addition to the modes mentioned above, these
|
||||
characters will be used:
|
||||
" " Normal, Visual and Operator-pending
|
||||
name menu item name.
|
||||
noremenu v:true if the {rhs} of the menu item is not
|
||||
remappable else v:false.
|
||||
priority menu order priority |menu-priority|
|
||||
rhs right-hand-side of the menu item. The returned
|
||||
string has special characters translated like
|
||||
in the output of the ":menu" command listing.
|
||||
When the {rhs} of a menu item is empty, then
|
||||
"<Nop>" is returned.
|
||||
script v:true if script-local remapping of {rhs} is
|
||||
allowed else v:false. See |:menu-script|.
|
||||
shortcut shortcut key (character after '&' in
|
||||
the menu name) |menu-shortcut|
|
||||
silent v:true if the menu item is created
|
||||
with <silent> argument |:menu-silent|
|
||||
submenus |List| containing the names of
|
||||
all the submenus. Present only if the menu
|
||||
item has submenus.
|
||||
|
||||
Returns an empty dictionary if the menu item is not found.
|
||||
|
||||
Examples: >
|
||||
:echo menu_info('Edit.Cut')
|
||||
:echo menu_info('File.Save', 'n')
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetMenuName()->menu_info('v')
|
||||
|
||||
|
||||
< *min()*
|
||||
min({expr}) Return the minimum value of all items in {expr}.
|
||||
{expr} can be a List or a Dictionary. For a Dictionary,
|
||||
@@ -8608,7 +8704,12 @@ setpos({expr}, {list})
|
||||
setqflist({list} [, {action} [, {what}]]) *setqflist()*
|
||||
Create or replace or add to the quickfix list.
|
||||
|
||||
When {what} is not present, use the items in {list}. Each
|
||||
If the optional {what} dictionary argument is supplied, then
|
||||
only the items listed in {what} are set. The first {list}
|
||||
argument is ignored. See below for the supported items in
|
||||
{what}.
|
||||
|
||||
When {what} is not present, the items in {list} or used. Each
|
||||
item must be a dictionary. Non-dictionary items in {list} are
|
||||
ignored. Each dictionary item can contain the following
|
||||
entries:
|
||||
@@ -8663,10 +8764,7 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
|
||||
freed. To add a new quickfix list at the end of the stack,
|
||||
set "nr" in {what} to "$".
|
||||
|
||||
If the optional {what} dictionary argument is supplied, then
|
||||
only the items listed in {what} are set. The first {list}
|
||||
argument is ignored. The following items can be specified in
|
||||
{what}:
|
||||
The following items can be specified in dictionary {what}:
|
||||
context quickfix list context. See |quickfix-context|
|
||||
efm errorformat to use when parsing text from
|
||||
"lines". If this is not present, then the
|
||||
@@ -8713,6 +8811,7 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
|
||||
*setreg()*
|
||||
setreg({regname}, {value} [, {options}])
|
||||
Set the register {regname} to {value}.
|
||||
If {regname} is "" or "@", the unnamed register '"' is used.
|
||||
{value} may be any value returned by |getreg()|, including
|
||||
a |List|.
|
||||
If {options} contains "a" or {regname} is upper case,
|
||||
@@ -8819,18 +8918,10 @@ settagstack({nr}, {dict} [, {action}]) *settagstack()*
|
||||
|
||||
Returns zero for success, -1 for failure.
|
||||
|
||||
Examples:
|
||||
Set current index of the tag stack to 4: >
|
||||
call settagstack(1005, {'curidx' : 4})
|
||||
|
||||
< Empty the tag stack of window 3: >
|
||||
Examples (for more examples see |tagstack-examples||):
|
||||
Empty the tag stack of window 3: >
|
||||
call settagstack(3, {'items' : []})
|
||||
|
||||
< Push a new item onto the tag stack: >
|
||||
let pos = [bufnr('myfile.txt'), 10, 1, 0]
|
||||
let newtag = [{'tagname' : 'mytag', 'from' : pos}]
|
||||
call settagstack(2, {'items' : newtag}, 'a')
|
||||
|
||||
< Save and restore the tag stack: >
|
||||
let stack = gettagstack(1003)
|
||||
" do something else
|
||||
@@ -8926,6 +9017,8 @@ simplify({filename}) *simplify()*
|
||||
directory. In order to resolve all the involved symbolic
|
||||
links before simplifying the path name, use |resolve()|.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetName()->simplify()
|
||||
|
||||
sin({expr}) *sin()*
|
||||
Return the sine of {expr}, measured in radians, as a |Float|.
|
||||
@@ -10482,11 +10575,12 @@ winlayout([{tabnr}]) *winlayout()*
|
||||
" Two horizontally split windows
|
||||
:echo winlayout()
|
||||
['col', [['leaf', 1000], ['leaf', 1001]]]
|
||||
" Three horizontally split windows, with two
|
||||
" vertically split windows in the middle window
|
||||
" The second tab page, with three horizontally split
|
||||
" windows, with two vertically split windows in the
|
||||
" middle window
|
||||
:echo winlayout(2)
|
||||
['col', [['leaf', 1002], ['row', ['leaf', 1003],
|
||||
['leaf', 1001]]], ['leaf', 1000]]
|
||||
['col', [['leaf', 1002], ['row', [['leaf', 1003],
|
||||
['leaf', 1001]]], ['leaf', 1000]]]
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetTabnr()->winlayout()
|
||||
@@ -10715,6 +10809,7 @@ browsefilter Compiled with support for |browsefilter|.
|
||||
bsd Compiled on an OS in the BSD family (excluding macOS).
|
||||
builtin_terms Compiled with some builtin terminals.
|
||||
byte_offset Compiled with support for 'o' in 'statusline'
|
||||
channel Compiled with support for |channel| and |job|
|
||||
cindent Compiled with 'cindent' support.
|
||||
clientserver Compiled with remote invocation support |clientserver|.
|
||||
clipboard Compiled with 'clipboard' support.
|
||||
@@ -10761,17 +10856,20 @@ gui_gnome Compiled with Gnome support (gui_gtk is also defined).
|
||||
gui_gtk Compiled with GTK+ GUI (any version).
|
||||
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).
|
||||
gui_gtk3 Compiled with GTK+ 3 GUI (gui_gtk is also defined).
|
||||
gui_haiku Compiled with Haiku GUI.
|
||||
gui_mac Compiled with Macintosh GUI.
|
||||
gui_motif Compiled with Motif GUI.
|
||||
gui_photon Compiled with Photon GUI.
|
||||
gui_running Vim is running in the GUI, or it will start soon.
|
||||
gui_win32 Compiled with MS Windows Win32 GUI.
|
||||
gui_win32s idem, and Win32s system being used (Windows 3.1)
|
||||
haiku Haiku version of Vim.
|
||||
hangul_input Compiled with Hangul input support. |hangul|
|
||||
hpux HP-UX version of Vim.
|
||||
iconv Can use iconv() for conversion.
|
||||
insert_expand Compiled with support for CTRL-X expansion commands in
|
||||
Insert mode. (always true)
|
||||
job Compiled with support for |channel| and |job|
|
||||
jumplist Compiled with |jumplist| support.
|
||||
keymap Compiled with 'keymap' support.
|
||||
lambda Compiled with |lambda| support.
|
||||
@@ -10826,7 +10924,7 @@ python_dynamic Python 2.x interface is dynamically loaded. |has-python|
|
||||
python3 Python 3.x interface available. |has-python|
|
||||
python3_compiled Compiled with Python 3.x interface. |has-python|
|
||||
python3_dynamic Python 3.x interface is dynamically loaded. |has-python|
|
||||
pythonx Compiled with |python_x| interface. |has-pythonx|
|
||||
pythonx Python 2.x and/or 3.x interface available. |python_x|
|
||||
qnx QNX version of Vim.
|
||||
quickfix Compiled with |quickfix| support.
|
||||
reltime Compiled with |reltime()| support.
|
||||
@@ -11136,8 +11234,8 @@ It is allowed to define another function inside a function body.
|
||||
You can provide default values for positional named arguments. This makes
|
||||
them optional for function calls. When a positional argument is not
|
||||
specified at a call, the default expression is used to initialize it.
|
||||
This only works for functions declared with `:function`, not for lambda
|
||||
expressions |expr-lambda|.
|
||||
This only works for functions declared with `:function` or `:def`, not for
|
||||
lambda expressions |expr-lambda|.
|
||||
|
||||
Example: >
|
||||
function Something(key, value = 10)
|
||||
@@ -11175,9 +11273,10 @@ Example that does NOT work: >
|
||||
:function NoGood(first = a:second, second = 10)
|
||||
:endfunction
|
||||
<
|
||||
When not using "...", the number of arguments in a function call must be equal
|
||||
to the number of mandatory named arguments. When using "...", the number of
|
||||
arguments may be larger.
|
||||
When not using "...", the number of arguments in a function call must be at
|
||||
least equal to the number of mandatory named arguments. When using "...", the
|
||||
number of arguments may be larger than the total of mandatory and optional
|
||||
arguments.
|
||||
|
||||
*local-variables*
|
||||
Inside a function local variables can be used. These will disappear when the
|
||||
@@ -11534,7 +11633,7 @@ This does NOT work: >
|
||||
Like above, but append/add/subtract the value for each
|
||||
|List| item.
|
||||
|
||||
:let [{name}, ..., ; {lastname}] = {expr1}
|
||||
:let [{name}, ..., ; {lastname}] = {expr1} *E452*
|
||||
Like |:let-unpack| above, but the |List| may have more
|
||||
items than there are names. A list of the remaining
|
||||
items is assigned to {lastname}. If there are no
|
||||
@@ -11854,11 +11953,11 @@ text...
|
||||
":endtry" is reached thereafter, the next
|
||||
(dynamically) surrounding ":try" is checked for
|
||||
a corresponding ":finally" etc. Then the script
|
||||
processing is terminated. (Whether a function
|
||||
definition has an "abort" argument does not matter.)
|
||||
processing is terminated. Whether a function
|
||||
definition has an "abort" argument does not matter.
|
||||
Example: >
|
||||
:try | edit too much | finally | echo "cleanup" | endtry
|
||||
:echo "impossible" " not reached, script terminated above
|
||||
try | call Unknown() | finally | echomsg "cleanup" | endtry
|
||||
echomsg "not reached"
|
||||
<
|
||||
Moreover, an error or interrupt (dynamically) inside
|
||||
":try" and ":endtry" is converted to an exception. It
|
||||
@@ -11875,8 +11974,8 @@ text...
|
||||
error exception is not caught, always beginning with
|
||||
the error number.
|
||||
Examples: >
|
||||
:try | sleep 100 | catch /^Vim:Interrupt$/ | endtry
|
||||
:try | edit | catch /^Vim(edit):E\d\+/ | echo "error" | endtry
|
||||
try | sleep 100 | catch /^Vim:Interrupt$/ | endtry
|
||||
try | edit | catch /^Vim(edit):E\d\+/ | echo "error" | endtry
|
||||
<
|
||||
*:cat* *:catch* *E603* *E604* *E605*
|
||||
:cat[ch] /{pattern}/ The following commands until the next |:catch|,
|
||||
@@ -12031,6 +12130,9 @@ text...
|
||||
these are hard to recognize and therefore not to be
|
||||
used.
|
||||
|
||||
The command cannot be followed by "|" and another
|
||||
command, since "|" is seen as part of the expression.
|
||||
|
||||
|
||||
*:exe* *:execute*
|
||||
:exe[cute] {expr1} .. Executes the string that results from the evaluation
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 8.2. Last change: 2019 Nov 16
|
||||
*gui.txt* For Vim version 8.2. Last change: 2020 Mar 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -99,6 +99,7 @@ Recommended place for your personal GUI initializations:
|
||||
or $VIM/_gvimrc
|
||||
Amiga s:.gvimrc, home:.gvimrc, home:vimfiles:gvimrc
|
||||
or $VIM/.gvimrc
|
||||
Haiku $HOME/config/settings/vim/gvimrc
|
||||
|
||||
The personal initialization files are searched in the order specified above
|
||||
and only the first one that is found is read.
|
||||
@@ -577,9 +578,11 @@ tooltips for menus. See |terminal-typing|.
|
||||
|
||||
Special characters in a menu name:
|
||||
|
||||
*menu-shortcut*
|
||||
& The next character is the shortcut key. Make sure each
|
||||
shortcut key is only used once in a (sub)menu. If you want to
|
||||
insert a literal "&" in the menu name use "&&".
|
||||
*menu-text*
|
||||
<Tab> Separates the menu name from right-aligned text. This can be
|
||||
used to show the equivalent typed command. The text "<Tab>"
|
||||
can be used here for convenience. If you are using a real
|
||||
@@ -852,6 +855,8 @@ Special characters in the list, just before the rhs:
|
||||
* The menu was defined with "nore" to disallow remapping.
|
||||
& The menu was defined with "<script>" to allow remapping script-local
|
||||
mappings only.
|
||||
s The menu was defined with "<silent>" to avoid showing what it is
|
||||
mapped to when triggered.
|
||||
- The menu was disabled.
|
||||
|
||||
Note that hitting <Tab> while entering a menu name after a menu command may
|
||||
@@ -953,7 +958,7 @@ item for the keyword under the cursor. The register "z" is used. >
|
||||
mappings, or put these lines in your gvimrc; "<C-R>" is CTRL-R, "<CR>" is
|
||||
the <CR> key. |<>|)
|
||||
|
||||
|
||||
*tooltips* *menu-tips*
|
||||
5.8 Tooltips & Menu tips
|
||||
|
||||
See section |42.4| in the user manual.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_w32.txt* For Vim version 8.2. Last change: 2019 May 05
|
||||
*gui_w32.txt* For Vim version 8.2. Last change: 2020 Mar 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -199,7 +199,7 @@ With..." menu. This means you can use Vim to edit many files. Not every file
|
||||
One reason to add this is to be able to edit HTML files directly from Internet
|
||||
Explorer. To enable this use the "Tools" menu, "Internet Options..." entry.
|
||||
In the dialog select the "Programs" tab and select Vim in the "HTML editor"
|
||||
choice. If it's not there than installing didn't work properly.
|
||||
choice. If it's not there then installing didn't work properly.
|
||||
|
||||
Doing this manually can be done with this script:
|
||||
|
||||
@@ -456,8 +456,12 @@ See the Make_mvc.mak file for instructions, search for XPM.
|
||||
|
||||
To try out if XPM support works do this: >
|
||||
:help
|
||||
:exe 'sign define vimxpm icon=' . $VIMRUNTIME . '\\vim16x16.xpm'
|
||||
:exe 'sign place 1 line=1 name=vimxpm file=' . expand('%:p')
|
||||
:let runtime = escape($VIMRUNTIME, ' \')
|
||||
:exe 'sign define vimxpm icon=' .. runtime .. '\\vim16x16.xpm'
|
||||
:exe 'sign place 1 line=1 name=vimxpm file=' .. expand('%:p')
|
||||
<
|
||||
You may need to get the vim16x16.xpm file from github:
|
||||
https://github.com/vim/vim/blob/master/runtime/vim16x16.xpm
|
||||
|
||||
|
||||
vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*help.txt* For Vim version 8.2. Last change: 2019 Jul 21
|
||||
*help.txt* For Vim version 8.2. Last change: 2020 Apr 05
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -31,7 +31,7 @@ Get specific help: It is possible to go directly to whatever you want help
|
||||
help entries for "word".
|
||||
Or use ":helpgrep word". |:helpgrep|
|
||||
|
||||
Getting started: Do the Vim tutor, a 20 minute interactive training for the
|
||||
Getting started: Do the Vim tutor, a 30-minute interactive course for the
|
||||
basic commands, see |vimtutor|.
|
||||
Read the user manual from start to end: |usr_01.txt|
|
||||
|
||||
@@ -41,7 +41,7 @@ through the help of many others. See |credits|.
|
||||
*doc-file-list* *Q_ct*
|
||||
BASIC:
|
||||
|quickref| Overview of the most common commands you will use
|
||||
|tutor| 20 minutes training course for beginners
|
||||
|tutor| 30-minute interactive course for beginners
|
||||
|copying| About copyrights
|
||||
|iccf| Helping poor children in Uganda
|
||||
|sponsor| Sponsor Vim development, become a registered Vim user
|
||||
@@ -144,7 +144,7 @@ Special issues ~
|
||||
|remote.txt| using Vim as a server or client
|
||||
|term.txt| using different terminals and mice
|
||||
|terminal.txt| Terminal window support
|
||||
|popup.txt| popop window support
|
||||
|popup.txt| popup window support
|
||||
|
||||
Programming language support ~
|
||||
|indent.txt| automatic indenting for C and other languages
|
||||
@@ -204,6 +204,7 @@ Remarks about specific systems ~
|
||||
|os_os2.txt| OS/2
|
||||
|os_qnx.txt| QNX
|
||||
|os_risc.txt| RISC-OS
|
||||
|os_haiku.txt| Haiku
|
||||
|os_unix.txt| Unix
|
||||
|os_vms.txt| VMS
|
||||
|os_win32.txt| MS-Windows
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*helphelp.txt* For Vim version 8.2. Last change: 2019 Oct 18
|
||||
*helphelp.txt* For Vim version 8.2. Last change: 2020 Mar 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -368,4 +368,15 @@ highlighting. So do these:
|
||||
|
||||
You can find the details in $VIMRUNTIME/syntax/help.vim
|
||||
|
||||
*inclusion*
|
||||
Some people make a big deal about using "his" when referring to the user,
|
||||
thinking it means we assume the user is male. That is of course not the case,
|
||||
it's just a habit of writing help text, which quite often is many years old.
|
||||
Also, a lot of the text is written by contributors for who English is not
|
||||
their first language. We do not make any assumptions about the gender of the
|
||||
user, no matter how the text is phrased. And we do not want to waste time on
|
||||
this discussion. The goal is that the reader understands how Vim works, the
|
||||
exact wording is secondary.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 8.2. Last change: 2020 Jan 14
|
||||
*index.txt* For Vim version 8.2. Last change: 2020 Mar 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1260,11 +1260,12 @@ tag command action ~
|
||||
|:cunmenu| :cunme[nu] remove menu for Command-line mode
|
||||
|:cwindow| :cw[indow] open or close quickfix window
|
||||
|:delete| :d[elete] delete lines
|
||||
|:delmarks| :delm[arks] delete marks
|
||||
|:debug| :deb[ug] run a command in debugging mode
|
||||
|:debuggreedy| :debugg[reedy] read debug mode commands from normal input
|
||||
|:def| :def define a Vim9 user function
|
||||
|:delcommand| :delc[ommand] delete user-defined command
|
||||
|:delfunction| :delf[unction] delete a user function
|
||||
|:delmarks| :delm[arks] delete marks
|
||||
|:diffupdate| :dif[fupdate] update 'diff' buffers
|
||||
|:diffget| :diffg[et] remove differences in current buffer
|
||||
|:diffoff| :diffo[ff] switch off diff mode
|
||||
@@ -1274,9 +1275,9 @@ tag command action ~
|
||||
|:diffthis| :diffthis make current window a diff window
|
||||
|:digraphs| :dig[raphs] show or enter digraphs
|
||||
|:display| :di[splay] display registers
|
||||
|:disassemble| :disa[ssemble] disassemble Vim9 user function
|
||||
|:djump| :dj[ump] jump to #define
|
||||
|:dl| :dl short for |:delete| with the 'l' flag
|
||||
|:del| :del[ete]l short for |:delete| with the 'l' flag
|
||||
|:dlist| :dli[st] list #defines
|
||||
|:doautocmd| :do[autocmd] apply autocommands to current buffer
|
||||
|:doautoall| :doautoa[ll] apply autocommands for all loaded buffers
|
||||
@@ -1295,15 +1296,17 @@ 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
|
||||
|:enddef| :enddef end of a user function started with :def
|
||||
|:endif| :en[dif] end previous :if
|
||||
|:endfor| :endfo[r] end previous :for
|
||||
|:endfunction| :endf[unction] end of a user function
|
||||
|:endfunction| :endf[unction] end of a user function started with :function
|
||||
|:endtry| :endt[ry] end previous :try
|
||||
|:endwhile| :endw[hile] end previous :while
|
||||
|:enew| :ene[w] edit a new, unnamed buffer
|
||||
|:ex| :ex same as ":edit"
|
||||
|:execute| :exe[cute] execute result of expressions
|
||||
|:exit| :exi[t] same as ":xit"
|
||||
|:export| :exp[ort] Vim9: export an item from a script
|
||||
|:exusage| :exu[sage] overview of Ex commands
|
||||
|:file| :f[ile] show or set the current file name
|
||||
|:files| :files list all files in the buffer list
|
||||
@@ -1345,6 +1348,7 @@ tag command action ~
|
||||
|:imap| :im[ap] like ":map" but for Insert mode
|
||||
|:imapclear| :imapc[lear] like ":mapclear" but for Insert mode
|
||||
|:imenu| :ime[nu] add menu for Insert mode
|
||||
|:import| :imp[ort] Vim9: import an item from another script
|
||||
|:inoremap| :ino[remap] like ":noremap" but for Insert mode
|
||||
|:inoreabbrev| :inorea[bbrev] like ":noreabbrev" but for Insert mode
|
||||
|:inoremenu| :inoreme[nu] like ":noremenu" but for Insert mode
|
||||
@@ -1686,6 +1690,7 @@ tag command action ~
|
||||
|:version| :ve[rsion] print version number and other info
|
||||
|:verbose| :verb[ose] execute command with 'verbose' set
|
||||
|:vertical| :vert[ical] make following command split vertically
|
||||
|:vim9script| :vim9[script] indicates Vim9 script file
|
||||
|:vimgrep| :vim[grep] search for pattern in files
|
||||
|:vimgrepadd| :vimgrepa[dd] like :vimgrep, but append to current list
|
||||
|:visual| :vi[sual] same as ":edit", but turns off "Ex" mode
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 8.2. Last change: 2020 Jan 26
|
||||
*insert.txt* For Vim version 8.2. Last change: 2020 Mar 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -154,6 +154,8 @@ CTRL-R CTRL-R {register} *i_CTRL-R_CTRL-R*
|
||||
you also want to avoid these, use CTRL-R CTRL-O, see below.
|
||||
The '.' register (last inserted text) is still inserted as
|
||||
typed.
|
||||
After this command, the '.' register contains the text from
|
||||
the register as if it was inserted by typing it.
|
||||
|
||||
CTRL-R CTRL-O {register} *i_CTRL-R_CTRL-O*
|
||||
Insert the contents of a register literally and don't
|
||||
@@ -163,6 +165,9 @@ CTRL-R CTRL-O {register} *i_CTRL-R_CTRL-O*
|
||||
Does not replace characters!
|
||||
The '.' register (last inserted text) is still inserted as
|
||||
typed.
|
||||
After this command, the '.' register contains the command
|
||||
typed and not the text. I.e., the literals "^R^O" and not the
|
||||
text from the register.
|
||||
|
||||
CTRL-R CTRL-P {register} *i_CTRL-R_CTRL-P*
|
||||
Insert the contents of a register literally and fix the
|
||||
@@ -170,6 +175,9 @@ CTRL-R CTRL-P {register} *i_CTRL-R_CTRL-P*
|
||||
Does not replace characters!
|
||||
The '.' register (last inserted text) is still inserted as
|
||||
typed.
|
||||
After this command, the '.' register contains the command
|
||||
typed and not the text. I.e., the literals "^R^P" and not the
|
||||
text from the register.
|
||||
|
||||
*i_CTRL-T*
|
||||
CTRL-T Insert one shiftwidth of indent at the start of the current
|
||||
@@ -379,8 +387,8 @@ CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O*
|
||||
CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L*
|
||||
CTRL-G u break undo sequence, start new change *i_CTRL-G_u*
|
||||
CTRL-G U don't break undo with next left/right cursor *i_CTRL-G_U*
|
||||
movement, if the cursor stays within
|
||||
same the line
|
||||
movement, if the cursor stays within the
|
||||
same line
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Note: If the cursor keys take you out of Insert mode, check the 'noesckeys'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.2. Last change: 2020 Feb 14
|
||||
*options.txt* For Vim version 8.2. Last change: 2020 Apr 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -3769,7 +3769,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'guitablabel' can be used to change the text in the labels.
|
||||
When 'e' is missing a non-GUI tab pages line may be used.
|
||||
The GUI tabs are only supported on some systems, currently
|
||||
GTK, Motif, Mac OS/X and MS-Windows.
|
||||
GTK, Motif, Mac OS/X, Haiku, and MS-Windows.
|
||||
*'go-f'*
|
||||
'f' Foreground: Don't use fork() to detach the GUI from the shell
|
||||
where it was started. Use this for programs that wait for the
|
||||
@@ -4646,8 +4646,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
be able to execute Normal mode commands.
|
||||
This is the opposite of the 'keymap' option, where characters are
|
||||
mapped in Insert mode.
|
||||
Also consider resetting 'langremap' to avoid 'langmap' applies to
|
||||
characters resulting from a mapping.
|
||||
Also consider setting 'langremap' to off, to prevent 'langmap' from
|
||||
applying to characters resulting from a mapping.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
@@ -4712,7 +4712,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'langnoremap' is set to the inverted value, and the other way around.
|
||||
|
||||
*'langremap'* *'lrm'* *'nolangremap'* *'nolrm'*
|
||||
'langremap' 'lrm' boolean (default on, reset in |defaults.vim|)
|
||||
'langremap' 'lrm' boolean (default on, set to off in |defaults.vim|)
|
||||
global
|
||||
{only available when compiled with the |+langmap|
|
||||
feature}
|
||||
@@ -6207,6 +6207,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Macintosh: "$VIM:vimfiles,
|
||||
$VIMRUNTIME,
|
||||
$VIM:vimfiles:after"
|
||||
Haiku: "$BE_USER_SETTINGS/vim,
|
||||
$VIM/vimfiles,
|
||||
$VIMRUNTIME,
|
||||
$VIM/vimfiles/after,
|
||||
$BE_USER_SETTINGS/vim/after")
|
||||
VMS: "sys$login:vimfiles,
|
||||
$VIM/vimfiles,
|
||||
$VIMRUNTIME,
|
||||
@@ -7665,6 +7670,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
in the GUI: "builtin_gui"
|
||||
on Amiga: "amiga"
|
||||
on BeOS: "beos-ansi"
|
||||
on Haiku: "xterm"
|
||||
on Mac: "mac-ansi"
|
||||
on MiNT: "vt52"
|
||||
on Unix: "ansi"
|
||||
@@ -7951,7 +7957,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
- VIM the server name |v:servername| or "VIM"
|
||||
Only works if the terminal supports setting window titles
|
||||
(currently Amiga console, Win32 console, all GUI versions and
|
||||
terminals with a non- empty 't_ts' option - these are Unix xterm and
|
||||
terminals with a non-empty 't_ts' option - these are Unix xterm and
|
||||
iris-ansi by default, where 't_ts' is taken from the builtin termcap).
|
||||
*X11*
|
||||
When Vim was compiled with HAVE_X11 defined, the original title will
|
||||
|
||||
@@ -138,7 +138,7 @@ and merge it back in.
|
||||
|
||||
6. The $VIM directory *beos-vimdir*
|
||||
|
||||
$VIM is the symbolic name for the place where Vims support files are stored.
|
||||
$VIM is the symbolic name for the place where Vim's support files are stored.
|
||||
The default value for $VIM is set at compile time and can be determined with >
|
||||
|
||||
:version
|
||||
|
||||
234
runtime/doc/os_haiku.txt
Normal file
234
runtime/doc/os_haiku.txt
Normal file
@@ -0,0 +1,234 @@
|
||||
*os_haiku.txt* For Vim version 8.2. Last change: 2020 Mar 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
|
||||
*Haiku*
|
||||
This file contains the particularities for the Haiku version of Vim. For
|
||||
matters not discussed in this file, Vim behaves very much like the Unix
|
||||
|os_unix.txt| version.
|
||||
|
||||
Haiku is an open-source operating system inspired by BeOS, that specifically
|
||||
targets personal computing.
|
||||
|
||||
1. General |haiku-general|
|
||||
2. Compiling Vim |haiku-compiling|
|
||||
3. The Haiku GUI |haiku-gui|
|
||||
4. The $VIM directory |haiku-vimdir|
|
||||
5. The $USER_SETTINGS_DIR
|
||||
directory |haiku-user-settings-dir|
|
||||
6. Drag & Drop |haiku-dragndrop|
|
||||
7. Single Launch vs. Multiple
|
||||
Launch |haiku-launch|
|
||||
8. Fonts |haiku-fonts|
|
||||
9. The meta key modifier |haiku-meta|
|
||||
10. Mouse key mappings |haiku-mouse|
|
||||
11. Color names |haiku-colors|
|
||||
12. Credits |haiku-support-credits|
|
||||
13. Bugs & to-do |haiku-bugs|
|
||||
|
||||
|
||||
1. General *haiku-general*
|
||||
|
||||
The default syntax highlighting mostly works with different foreground colors
|
||||
to highlight items. This works best if you set your Terminal window to a
|
||||
darkish background and light letters. Some middle-grey background (for
|
||||
instance (r,g,b)=(168,168,168)) with black letters also works nicely.
|
||||
|
||||
|
||||
2. Compiling Vim *haiku-compiling*
|
||||
|
||||
Vim can be compiled using the standard configure/make approach. Running
|
||||
./configure without any arguments or passing --enable-gui=haiku, will compile
|
||||
vim with the Haiku GUI support. Run ./configure --help , to find out other
|
||||
features you can enable/disable.
|
||||
|
||||
Haiku uses "ncurses6" as its terminal library, therefore you need to have
|
||||
"ncurses6_devel" package installed from HaikuDepot in order to configure
|
||||
the Haiku build. Just append "--with-tlib=ncurses6" to ./configure command
|
||||
below for the initial build.
|
||||
|
||||
Now you should use "make" to compile Vim, then "make install" to install it.
|
||||
For seamless integration into Haiku, the GUI-less vim binary should be
|
||||
additionally installed over the GUI version. Typical build commands are: >
|
||||
|
||||
./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \
|
||||
--datarootdir=`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY` \
|
||||
--mandir=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY`/documentation/man \
|
||||
make clean
|
||||
make install
|
||||
|
||||
./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \
|
||||
--datarootdir=`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY` \
|
||||
--mandir=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY`/documentation/man \
|
||||
--disable-gui
|
||||
make clean
|
||||
make install
|
||||
|
||||
|
||||
3. The Haiku GUI *haiku-gui*
|
||||
|
||||
Normally Vim starts with the GUI if you start it as gvim or vim -g. The vim
|
||||
version with GUI tries to determine if it was started from the Tracker instead
|
||||
of the Terminal, and if so, uses the GUI anyway. However, the current detection
|
||||
scheme is fooled if you use the command "vim - </dev/null".
|
||||
|
||||
Stuff that does not work yet:
|
||||
|
||||
- Mouse up events are not generated when outside the window. This may be a bug in
|
||||
Haiku. You can notice this when selecting text and moving the cursor outside
|
||||
the window, then letting go of the mouse button. Another way is when you
|
||||
drag the scrollbar and do the same thing. Because Vim still thinks you are
|
||||
still playing with the scrollbar it won't change it itself. I provided a
|
||||
workaround which kicks in when the window is activated or deactivated (so it
|
||||
works best with focus- follows-mouse turned on).
|
||||
- The cursor does not flash.
|
||||
|
||||
|
||||
4. The $VIM directory *haiku-vimdir*
|
||||
|
||||
$VIM is the symbolic name for the place where Vim's support files are stored.
|
||||
The default value for $VIM is set at compile time and can be determined with >
|
||||
|
||||
:version
|
||||
|
||||
The normal value is /boot/system/data/vim for Haikuports version,
|
||||
/boot/system/non-packaged/data/vim for manual builds. If you don't like it
|
||||
you can set the VIM environment variable to override this, or set 'helpfile'
|
||||
in your .vimrc: >
|
||||
|
||||
:if version >= 500
|
||||
: set helpfile=~/vim/runtime/doc/help.txt
|
||||
: syntax on
|
||||
:endif
|
||||
|
||||
|
||||
5. The $USER_SETTINGS_DIR directory *haiku-user-settings-dir*
|
||||
|
||||
$USER_SETTINGS_DIR is the symbolic name for the place where Haiku
|
||||
configuration and settings files are stored.
|
||||
|
||||
The normal value is /boot/home/config/settings.
|
||||
|
||||
|
||||
6. Drag & Drop *haiku-dragndrop*
|
||||
|
||||
You can drop files and directories on either the Vim icon (starts a new Vim
|
||||
session, unless you use the File Types application to set Vim to be "Single
|
||||
Launch") or on the Vim window (starts editing the files). Dropping a folder
|
||||
sets Vim's current working directory. |:cd| |:pwd| If you drop files or
|
||||
folders with either SHIFT key pressed, Vim changes directory to the folder
|
||||
that contains the first item dropped. When starting Vim, there is no need to
|
||||
press shift: Vim behaves as if you do.
|
||||
|
||||
Files dropped set the current argument list. |argument-list|
|
||||
|
||||
|
||||
7. Single Launch vs. Multiple Launch *haiku-launch*
|
||||
|
||||
As distributed Vim's Application Flags (as seen in the FileTypes preference)
|
||||
are set to Multiple Launch. If you prefer, you can set them to Single Launch
|
||||
instead. Attempts to start a second copy of Vim will cause the first Vim to
|
||||
open the files instead. This works from the Tracker but also from the command
|
||||
line. In the latter case, non-file (option) arguments are not supported.
|
||||
Another drawback of the Single Launch is silent ignore of "Open With ..."
|
||||
requests by vim instance that running as non-GUI application even GUI support
|
||||
was compiled in. Vim instance running with GUI has no such problems.
|
||||
|
||||
NB: Only the GUI version has a BApplication (and hence Application Flags).
|
||||
This section does not apply to the GUI-less version, should you compile one.
|
||||
|
||||
|
||||
8. Fonts *haiku-fonts*
|
||||
|
||||
Set fonts with >
|
||||
|
||||
:set guifont=DejaVu_Sans_Mono/Book/12
|
||||
|
||||
where the first part is the font family, the second part the style, and the
|
||||
third part the size. You can use underscores instead of spaces in family and
|
||||
style.
|
||||
|
||||
Best results are obtained with monospaced fonts. Vim attempts to use all
|
||||
fonts in B_FIXED_SPACING mode but apparently this does not work for
|
||||
proportional fonts (despite what the BeBook says).
|
||||
|
||||
To verify which encodings are supported by the current font give the >
|
||||
|
||||
:digraphs
|
||||
|
||||
command, which lists a bunch of characters with their ISO Latin 1 encoding.
|
||||
If, for instance, there are "box" characters among them, or the last character
|
||||
isn't a dotted-y, then for this font the encoding does not work.
|
||||
|
||||
If the font you specify is unavailable, you get the system fixed font.
|
||||
|
||||
GUI Font Selection Dialog is available at giving the >
|
||||
|
||||
:set guifont=*
|
||||
|
||||
command.
|
||||
|
||||
|
||||
9. The meta key modifier *haiku-meta*
|
||||
|
||||
The META key modifier is obtained by the left or right OPTION keys. This is
|
||||
because the ALT (aka COMMAND) keys are not passed to applications.
|
||||
|
||||
|
||||
10. Mouse key mappings *haiku-mouse*
|
||||
|
||||
Vim calls the various mouse buttons LeftMouse, MiddleMouse and RightMouse. If
|
||||
you use the default Mouse preference settings these names indeed correspond to
|
||||
reality. Vim uses this mapping:
|
||||
|
||||
Button 1 -> LeftMouse,
|
||||
Button 2 -> RightMouse,
|
||||
Button 3 -> MiddleMouse.
|
||||
|
||||
If your mouse has fewer than 3 buttons you can provide your own mapping from
|
||||
mouse clicks with modifier(s) to other mouse buttons. See the file
|
||||
$VIM/macros/swapmous.vim for an example. |gui-mouse-mapping|
|
||||
|
||||
|
||||
11. Color names *haiku-colors*
|
||||
|
||||
Vim has a number of color names built-in. Additional names are read from the
|
||||
file $VIMRUNTIME/rgb.txt, if present. This file is basically the color
|
||||
database from X. Names used from this file are cached for efficiency.
|
||||
|
||||
|
||||
12. GUI Toolbar Images *haiku-toolbar-images*
|
||||
|
||||
Alternative set of toolbar images should be the PNG image of any height you
|
||||
like. Image width is calculated to contain at least 32 buttons in one-row
|
||||
cells.
|
||||
The image should be stored under the name $VIRUNTIME/bitmaps/builtin-tools.png
|
||||
More info about the buttons assignment are at |builtin-tools|.
|
||||
|
||||
|
||||
13. Credits *haiku-support-credits*
|
||||
|
||||
Haiku port is based on work done for BeOS version by many people
|
||||
- BeBox GUI support Copyright 1998 by Olaf Seibert;
|
||||
- Ported to R4 by Richard Offer <richard@whitequeen.com> Jul 99;
|
||||
- Those who contributed, not listed above but not forgotten;
|
||||
- Haiku support by Siarzhuk Zharski <imker@gmx.li> Apr-Mai 2009.
|
||||
|
||||
All the changes and patches released under vim-license.
|
||||
|
||||
Thank you, all!
|
||||
|
||||
|
||||
13. Bugs & to-do *haiku-bugs*
|
||||
|
||||
The port is under development now and far away from the perfect state. For bug
|
||||
reports, patches and wishes, please use the Vim mailing list or Vim Github
|
||||
repository.
|
||||
|
||||
Mailing list: https://www.vim.org/maillist.php
|
||||
Vim Github repository: https://github.com/vim/vim
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
@@ -1,4 +1,4 @@
|
||||
*popup.txt* For Vim version 8.2. Last change: 2020 Feb 20
|
||||
*popup.txt* For Vim version 8.2. Last change: 2020 Mar 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -151,13 +151,19 @@ different: *E863*
|
||||
- The popup window can be closed with `popup_close()`, the terminal buffer
|
||||
then becomes hidden.
|
||||
- The default Pmenu color is only used for the border and padding. To change
|
||||
the color of the terminal itself set 'wincolor'.
|
||||
the color of the terminal itself set the Terminal highlight group before
|
||||
creating the terminal. Setting 'wincolor' later can work but requires the
|
||||
program in the terminal to redraw everything.
|
||||
- The default minimal size is 5 lines of 20 characters; Use the "minwidth" and
|
||||
"minheight" parameters to set a different value.
|
||||
- The terminal size will grow if the program running in the terminal writes
|
||||
text. Set "maxheight" and "maxwidth" to restrict the size.
|
||||
|
||||
To run a terminal in a popup window, first create the terminal hidden. Then
|
||||
pass the buffer number to popup_create(). Example: >
|
||||
hi link Terminal Search
|
||||
let buf = term_start(['picker', 'Something'], #{hidden: 1, term_finish: 'close'})
|
||||
let winid = popup_create(buf, #{minwidth: 50, minheight: 20})
|
||||
set wincolor=Search
|
||||
|
||||
==============================================================================
|
||||
2. Functions *popup-functions*
|
||||
@@ -566,7 +572,8 @@ properties. It is in one of four forms:
|
||||
|
||||
If you want to create a new buffer yourself use |bufadd()| and pass the buffer
|
||||
number to popup_create().
|
||||
It is not possible to use the buffer of a terminal window. *E278*
|
||||
It is not possible to use the buffer of a terminal window. *E278* You CAN
|
||||
create a hidden terminal buffer and use that one in a popup window.
|
||||
|
||||
The second argument of |popup_create()| is a dictionary with options:
|
||||
line Screen line where to position the popup. Can use a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*recover.txt* For Vim version 8.2. Last change: 2019 May 07
|
||||
*recover.txt* For Vim version 8.2. Last change: 2020 Mar 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -125,7 +125,7 @@ If you want to make sure that your changes are in the swap file use this
|
||||
command:
|
||||
|
||||
*:pre* *:preserve* *E313* *E314*
|
||||
:pre[serve] Write all text for all buffers into swap file. The
|
||||
:pre[serve] Write all text for all buffers into swap files. The
|
||||
original file is no longer needed for recovery.
|
||||
This sets a flag in the current buffer. When the '&'
|
||||
flag is present in 'cpoptions' the swap file will not
|
||||
|
||||
@@ -790,6 +790,7 @@ accordingly. Vim proceeds in this order:
|
||||
or $VIM/_vimrc
|
||||
Amiga s:.vimrc, home:.vimrc, home:vimfiles:vimrc
|
||||
or $VIM/.vimrc
|
||||
Haiku $HOME/config/settings/vim/vimrc
|
||||
|
||||
The files are searched in the order specified above and only the first
|
||||
one that is found is read.
|
||||
@@ -835,6 +836,8 @@ accordingly. Vim proceeds in this order:
|
||||
"$HOME/_vimrc" (for Win32) (*)
|
||||
"$HOME/vimfiles/vimrc" (for Win32) (*)
|
||||
"$VIM/_vimrc" (for Win32) (*)
|
||||
"$HOME/config/settings/vim/vimrc" (for Haiku) (*)
|
||||
|
||||
Note: For Unix and Amiga, when ".vimrc" does not exist,
|
||||
"_vimrc" is also tried, in case an MS-DOS compatible file
|
||||
system is used. For MS-Windows ".vimrc" is checked after
|
||||
@@ -950,6 +953,8 @@ sessions. Put it in a place so that it will be found by 3b:
|
||||
~/.vimrc (Unix)
|
||||
s:.vimrc (Amiga)
|
||||
$VIM\_vimrc (Win32)
|
||||
~/config/settings/vim/vimrc (Haiku)
|
||||
|
||||
Note that creating a vimrc file will cause the 'compatible' option to be off
|
||||
by default. See |compatible-default|.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2019 Dec 19
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2020 Feb 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -217,7 +217,7 @@ The name for a highlight or syntax group must consist of ASCII letters, digits
|
||||
and the underscore. As a regexp: "[a-zA-Z0-9_]*". However, Vim does not give
|
||||
an error when using other characters.
|
||||
|
||||
To be able to allow each user to pick his favorite set of colors, there must
|
||||
To be able to allow each user to pick their favorite set of colors, there must
|
||||
be preferred names for highlight groups that are common for many languages.
|
||||
These are the suggested group names (if syntax highlighting works properly
|
||||
you can see the actual color, except for "Ignore"):
|
||||
@@ -4512,8 +4512,8 @@ two different ways:
|
||||
(e.g., "syntax/pod.vim") the file is searched for in 'runtimepath'.
|
||||
All matching files are loaded. Using a relative path is
|
||||
recommended, because it allows a user to replace the included file
|
||||
with his own version, without replacing the file that does the ":syn
|
||||
include".
|
||||
with their own version, without replacing the file that does the
|
||||
":syn include".
|
||||
|
||||
*E847*
|
||||
The maximum number of includes is 999.
|
||||
|
||||
@@ -1267,6 +1267,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
+X11 various.txt /*+X11*
|
||||
+acl various.txt /*+acl*
|
||||
+arabic various.txt /*+arabic*
|
||||
+autochdir various.txt /*+autochdir*
|
||||
+autocmd various.txt /*+autocmd*
|
||||
+autoservername various.txt /*+autoservername*
|
||||
+balloon_eval various.txt /*+balloon_eval*
|
||||
@@ -4243,6 +4244,7 @@ E447 editing.txt /*E447*
|
||||
E448 various.txt /*E448*
|
||||
E449 eval.txt /*E449*
|
||||
E45 message.txt /*E45*
|
||||
E452 eval.txt /*E452*
|
||||
E455 print.txt /*E455*
|
||||
E456 print.txt /*E456*
|
||||
E457 print.txt /*E457*
|
||||
@@ -4871,6 +4873,7 @@ GetLatestVimScripts-copyright pi_getscript.txt /*GetLatestVimScripts-copyright*
|
||||
GetLatestVimScripts_dat pi_getscript.txt /*GetLatestVimScripts_dat*
|
||||
Gnome gui_x11.txt /*Gnome*
|
||||
H motion.txt /*H*
|
||||
Haiku os_haiku.txt /*Haiku*
|
||||
I insert.txt /*I*
|
||||
ICCF uganda.txt /*ICCF*
|
||||
IM-server mbyte.txt /*IM-server*
|
||||
@@ -5822,6 +5825,7 @@ complete-item-kind insert.txt /*complete-item-kind*
|
||||
complete-items insert.txt /*complete-items*
|
||||
complete-popup insert.txt /*complete-popup*
|
||||
complete-popuphidden insert.txt /*complete-popuphidden*
|
||||
complete-script-local-functions cmdline.txt /*complete-script-local-functions*
|
||||
complete_CTRL-E insert.txt /*complete_CTRL-E*
|
||||
complete_CTRL-Y insert.txt /*complete_CTRL-Y*
|
||||
complete_add() eval.txt /*complete_add()*
|
||||
@@ -7053,6 +7057,20 @@ g~ change.txt /*g~*
|
||||
g~g~ change.txt /*g~g~*
|
||||
g~~ change.txt /*g~~*
|
||||
h motion.txt /*h*
|
||||
haiku-bugs os_haiku.txt /*haiku-bugs*
|
||||
haiku-colors os_haiku.txt /*haiku-colors*
|
||||
haiku-compiling os_haiku.txt /*haiku-compiling*
|
||||
haiku-dragndrop os_haiku.txt /*haiku-dragndrop*
|
||||
haiku-fonts os_haiku.txt /*haiku-fonts*
|
||||
haiku-general os_haiku.txt /*haiku-general*
|
||||
haiku-gui os_haiku.txt /*haiku-gui*
|
||||
haiku-launch os_haiku.txt /*haiku-launch*
|
||||
haiku-meta os_haiku.txt /*haiku-meta*
|
||||
haiku-mouse os_haiku.txt /*haiku-mouse*
|
||||
haiku-support-credits os_haiku.txt /*haiku-support-credits*
|
||||
haiku-toolbar-images os_haiku.txt /*haiku-toolbar-images*
|
||||
haiku-user-settings-dir os_haiku.txt /*haiku-user-settings-dir*
|
||||
haiku-vimdir os_haiku.txt /*haiku-vimdir*
|
||||
hangul hangulin.txt /*hangul*
|
||||
hangulin.txt hangulin.txt /*hangulin.txt*
|
||||
has() eval.txt /*has()*
|
||||
@@ -7356,6 +7374,7 @@ in_name channel.txt /*in_name*
|
||||
in_top channel.txt /*in_top*
|
||||
inactive-buffer windows.txt /*inactive-buffer*
|
||||
include-search tagsrch.txt /*include-search*
|
||||
inclusion helphelp.txt /*inclusion*
|
||||
inclusive motion.txt /*inclusive*
|
||||
incomp-small-6 version6.txt /*incomp-small-6*
|
||||
incompatible-5 version5.txt /*incompatible-5*
|
||||
@@ -7717,7 +7736,11 @@ menu-changes-5.4 version5.txt /*menu-changes-5.4*
|
||||
menu-examples gui.txt /*menu-examples*
|
||||
menu-priority gui.txt /*menu-priority*
|
||||
menu-separator gui.txt /*menu-separator*
|
||||
menu-shortcut gui.txt /*menu-shortcut*
|
||||
menu-text gui.txt /*menu-text*
|
||||
menu-tips gui.txt /*menu-tips*
|
||||
menu.vim gui.txt /*menu.vim*
|
||||
menu_info() eval.txt /*menu_info()*
|
||||
menus gui.txt /*menus*
|
||||
merge diff.txt /*merge*
|
||||
message-history message.txt /*message-history*
|
||||
@@ -8160,6 +8183,7 @@ nroff.vim syntax.txt /*nroff.vim*
|
||||
null-variable eval.txt /*null-variable*
|
||||
number_relativenumber options.txt /*number_relativenumber*
|
||||
numbered-function eval.txt /*numbered-function*
|
||||
numbersize-variable eval.txt /*numbersize-variable*
|
||||
o insert.txt /*o*
|
||||
o_CTRL-V motion.txt /*o_CTRL-V*
|
||||
o_V motion.txt /*o_V*
|
||||
@@ -8210,6 +8234,7 @@ os_390.txt os_390.txt /*os_390.txt*
|
||||
os_amiga.txt os_amiga.txt /*os_amiga.txt*
|
||||
os_beos.txt os_beos.txt /*os_beos.txt*
|
||||
os_dos.txt os_dos.txt /*os_dos.txt*
|
||||
os_haiku.txt os_haiku.txt /*os_haiku.txt*
|
||||
os_mac.txt os_mac.txt /*os_mac.txt*
|
||||
os_mint.txt os_mint.txt /*os_mint.txt*
|
||||
os_msdos.txt os_msdos.txt /*os_msdos.txt*
|
||||
@@ -9324,6 +9349,7 @@ tags-file-format tagsrch.txt /*tags-file-format*
|
||||
tags-option tagsrch.txt /*tags-option*
|
||||
tagsrch.txt tagsrch.txt /*tagsrch.txt*
|
||||
tagstack tagsrch.txt /*tagstack*
|
||||
tagstack-examples tagsrch.txt /*tagstack-examples*
|
||||
tan() eval.txt /*tan()*
|
||||
tanh() eval.txt /*tanh()*
|
||||
tar pi_tar.txt /*tar*
|
||||
@@ -9479,6 +9505,7 @@ test_ignore_error() testing.txt /*test_ignore_error()*
|
||||
test_null_blob() testing.txt /*test_null_blob()*
|
||||
test_null_channel() testing.txt /*test_null_channel()*
|
||||
test_null_dict() testing.txt /*test_null_dict()*
|
||||
test_null_function() testing.txt /*test_null_function()*
|
||||
test_null_job() testing.txt /*test_null_job()*
|
||||
test_null_list() testing.txt /*test_null_list()*
|
||||
test_null_partial() testing.txt /*test_null_partial()*
|
||||
@@ -9490,6 +9517,8 @@ test_scrollbar() testing.txt /*test_scrollbar()*
|
||||
test_setmouse() testing.txt /*test_setmouse()*
|
||||
test_settime() testing.txt /*test_settime()*
|
||||
test_srand_seed() testing.txt /*test_srand_seed()*
|
||||
test_unknown() testing.txt /*test_unknown()*
|
||||
test_void() testing.txt /*test_void()*
|
||||
testing testing.txt /*testing*
|
||||
testing-support testing.txt /*testing-support*
|
||||
testing-variable eval.txt /*testing-variable*
|
||||
@@ -9547,6 +9576,7 @@ toggle options.txt /*toggle*
|
||||
toggle-revins version4.txt /*toggle-revins*
|
||||
tolower() eval.txt /*tolower()*
|
||||
toolbar-icon gui.txt /*toolbar-icon*
|
||||
tooltips gui.txt /*tooltips*
|
||||
toupper() eval.txt /*toupper()*
|
||||
tr() eval.txt /*tr()*
|
||||
trim() eval.txt /*trim()*
|
||||
@@ -9690,6 +9720,7 @@ v:mouse_win eval.txt /*v:mouse_win*
|
||||
v:mouse_winid eval.txt /*v:mouse_winid*
|
||||
v:none eval.txt /*v:none*
|
||||
v:null eval.txt /*v:null*
|
||||
v:numbersize eval.txt /*v:numbersize*
|
||||
v:oldfiles eval.txt /*v:oldfiles*
|
||||
v:operator eval.txt /*v:operator*
|
||||
v:option_command eval.txt /*v:option_command*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*tagsrch.txt* For Vim version 8.2. Last change: 2020 Jan 30
|
||||
*tagsrch.txt* For Vim version 8.2. Last change: 2020 Apr 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -185,6 +185,29 @@ commands explained above the tag stack will look like this:
|
||||
The |gettagstack()| function returns the tag stack of a specified window. The
|
||||
|settagstack()| function modifies the tag stack of a window.
|
||||
|
||||
*tagstack-examples*
|
||||
Write to the tag stack just like `:tag` but with a user-defined
|
||||
jumper#jump_to_tag function: >
|
||||
" Store where we're jumping from before we jump.
|
||||
let tag = expand('<cword>')
|
||||
let pos = [bufnr()] + getcurpos()[1:]
|
||||
let item = {'bufnr': pos[0], 'from': pos, 'tagname': tag}
|
||||
if jumper#jump_to_tag(tag)
|
||||
" Jump was successful, write previous location to tag stack.
|
||||
let winid = win_getid()
|
||||
let stack = gettagstack(winid)
|
||||
let stack['items'] = [item]
|
||||
call settagstack(winid, stack, 't')
|
||||
endif
|
||||
<
|
||||
Set current index of the tag stack to 4: >
|
||||
call settagstack(1005, {'curidx' : 4})
|
||||
<
|
||||
Push a new item onto the tag stack: >
|
||||
let pos = [bufnr('myfile.txt'), 10, 1, 0]
|
||||
let newtag = [{'tagname' : 'mytag', 'from' : pos}]
|
||||
call settagstack(2, {'items' : newtag}, 'a')
|
||||
<
|
||||
*E73*
|
||||
When you try to use the tag stack while it doesn't contain anything you will
|
||||
get an error message.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 8.2. Last change: 2020 Jan 30
|
||||
*terminal.txt* For Vim version 8.2. Last change: 2020 Mar 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -148,7 +148,12 @@ terminal window will start with a white or black background.
|
||||
To use a different color the Terminal highlight group can be used, for
|
||||
example: >
|
||||
hi Terminal ctermbg=lightgrey ctermfg=blue guibg=lightgrey guifg=blue
|
||||
<
|
||||
The highlight needs to be defined before the terminal is created. Doing it
|
||||
later, or setting 'wincolor', will only have effect when the program running
|
||||
in the terminal displays text or clears the terminal.
|
||||
Instead of Terminal another group can be specified with the "term_highlight"
|
||||
option for `term_start()`.
|
||||
|
||||
*g:terminal_ansi_colors*
|
||||
In GUI mode or with 'termguicolors', the 16 ANSI colors used by default in new
|
||||
terminal windows may be configured using the variable
|
||||
@@ -857,6 +862,8 @@ term_start({cmd} [, {options}]) *term_start()*
|
||||
have "%d" where the buffer number goes,
|
||||
e.g. "10split|buffer %d"; when not
|
||||
specified "botright sbuf %d" is used
|
||||
"term_highlight" highlight group to use instead of
|
||||
"Terminal"
|
||||
"eof_chars" Text to send after all buffer lines were
|
||||
written to the terminal. When not set
|
||||
CTRL-D is used on MS-Windows. For Python
|
||||
@@ -953,7 +960,7 @@ Currently supported commands:
|
||||
directory, thus it's best to use the full path.
|
||||
|
||||
[options] is only used when opening a new window. If present,
|
||||
it must be a Dict. Similarly to |++opt|, These entries are
|
||||
it must be a Dict. Similarly to |++opt|, these entries are
|
||||
recognized:
|
||||
"ff" file format: "dos", "mac" or "unix"
|
||||
"fileformat" idem
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*testing.txt* For Vim version 8.2. Last change: 2020 Feb 08
|
||||
*testing.txt* For Vim version 8.2. Last change: 2020 Apr 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -106,6 +106,10 @@ test_null_dict() *test_null_dict()*
|
||||
Return a |Dict| that is null. Only useful for testing.
|
||||
|
||||
|
||||
test_null_function() *test_null_function()*
|
||||
Return a |Funcref| that is null. Only useful for testing.
|
||||
|
||||
|
||||
test_null_job() *test_null_job()*
|
||||
Return a |Job| that is null. Only useful for testing.
|
||||
{only available when compiled with the +job feature}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*textprop.txt* For Vim version 8.2. Last change: 2020 Jan 10
|
||||
*textprop.txt* For Vim version 8.2. Last change: 2020 Mar 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -133,8 +133,8 @@ prop_add({lnum}, {col}, {props})
|
||||
to {lnum}, this is a zero-width text property
|
||||
bufnr buffer to add the property to; when omitted
|
||||
the current buffer is used
|
||||
id user defined ID for the property; when omitted
|
||||
zero is used
|
||||
id user defined ID for the property; must be a
|
||||
number; when omitted zero is used
|
||||
type name of the text property type
|
||||
All fields except "type" are optional.
|
||||
|
||||
@@ -143,8 +143,9 @@ prop_add({lnum}, {col}, {props})
|
||||
within one line, or use "end_lnum" and "end_col" for a
|
||||
property that spans more than one line.
|
||||
When neither "length" nor "end_col" are given the property
|
||||
will be zero-width. That means it will not be highlighted but
|
||||
will move with the text, as a kind of mark.
|
||||
will be zero-width. That means it will move with the text, as
|
||||
a kind of mark. One character will be highlighted, if the
|
||||
type specifies highlighting.
|
||||
The property can end exactly at the last character of the
|
||||
text, or just after it. In the last case, if text is appended
|
||||
to the line, the text property size will increase, also when
|
||||
@@ -230,6 +231,7 @@ prop_remove({props} [, {lnum} [, {lnum-end}]])
|
||||
{props} is a dictionary with these fields:
|
||||
id remove text properties with this ID
|
||||
type remove text properties with this type name
|
||||
both "id" and "type" must both match
|
||||
bufnr use this buffer instead of the current one
|
||||
all when TRUE remove all matching text properties,
|
||||
not just the first one
|
||||
@@ -335,10 +337,11 @@ properties below the changed text, so that they still highlight the same text,
|
||||
thus you don't need to update these.
|
||||
|
||||
|
||||
Text property columns are not updated: ~
|
||||
Text property columns are not updated or copied: ~
|
||||
|
||||
- When setting the line with |setline()| or through an interface, such as Lua,
|
||||
Tcl or Python. Vim does not know what text got inserted or deleted.
|
||||
- With a command like `:move`, which takes a line of text out of context.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.2. Last change: 2020 Feb 15
|
||||
*todo.txt* For Vim version 8.2. Last change: 2020 Apr 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -38,61 +38,86 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Include ipv6 syntax changes? (DJ Lucas, #5360)
|
||||
|
||||
Avoid modifyOtherKeys temporarily:
|
||||
call modify_other_keys(v:false) " disable modifyOtherKeys
|
||||
Should fix #5617.
|
||||
|
||||
Vim9 script:
|
||||
- "echo Func()" is an error if Func() does not return anything.
|
||||
- Disallow unlet for local/script/imported vars
|
||||
func and partial types:
|
||||
- check using func type with default arguments and varargs.
|
||||
func(type, type?, ...): rettype
|
||||
- Type checking arguments when calling :def function and test
|
||||
- Calling unknown user function does not give proper error message:
|
||||
assert_equal('123text', RefDef2Arg()) typo for "RetDef2Arg"
|
||||
- "func" inside "vim9script" doesn't work? (Ben Jackson, #5670)
|
||||
- :func inside vim9script must still use a:arg
|
||||
- define function and create funcref in one step:
|
||||
let ref = def(arg: type): rettype
|
||||
body
|
||||
enddef
|
||||
Also:
|
||||
- "echo Func()" is an error if Func() does not return anything.
|
||||
- better implementation for partial and tests for that.
|
||||
- Make "g:imported = Export.exported" work in Vim9 script.
|
||||
- Make Foo.Bar() work to call the dict function. (#5676)
|
||||
- make "let var: string" work in a vim9script.
|
||||
- Disallow unlet for local/script/imported vars
|
||||
- Support type for ":let"/":const" at script level for Vim9 script.
|
||||
(Ben Jackson, #5671)
|
||||
- Make "++nr" work.
|
||||
- Check that import in legacy script works and puts item in s:
|
||||
- Error in any command in "vim9script" aborts sourcing.
|
||||
- Find a way to test expressions in legacy and Vim9 script without duplication
|
||||
- Fix memory leaks for test_vim9_disassemble, test_vim9_expr, test_vim9_script
|
||||
- Test each level of expressions properly, with type checking
|
||||
- Test the
|
||||
- Test try/catch and throw better, also nested.
|
||||
Test return inside try/finally jumps to finally and then returns.
|
||||
- call autoload function.
|
||||
- Type checking arguments when calling :def function
|
||||
- Implement more expressions, e.g. [a:b]
|
||||
- can use func as reference:
|
||||
def SomeFunc() ...
|
||||
map(list, SomeFunc)
|
||||
- define function and create funcref in one step:
|
||||
let ref = def(arg: type): rettype
|
||||
Also extends lambda
|
||||
- Test: Function declared inside a :def function is local, disappears at the
|
||||
end of the function. Unless g: is used, just like with variables.
|
||||
- Can we omit \ for line continuation inside (), {}, ?
|
||||
Requires parsing while reading a function. Like fgetline in do_one_cmd()?
|
||||
- implement :type
|
||||
- import type declaration?
|
||||
- implement class
|
||||
- implement interface
|
||||
- predefined class: Promise<T>
|
||||
- import statement for type declaration?
|
||||
- Make accessing varargs faster: arg[expr]
|
||||
EVAL expr
|
||||
LOADVARARG (varags idx)
|
||||
|
||||
Popup windows:
|
||||
- With some sequence get get hidden finished terminal buffer. (#5768)
|
||||
Cannot close popup terminal (#5744)
|
||||
Buffer can't be wiped, gets status "aF". (#5764)
|
||||
Is buf->nwindows incorrect?
|
||||
- popup_clear() and popup_close() should close the terminal popup, and
|
||||
make the buffer hidden. #5745
|
||||
- With terminal in popup, allow for popup_hide() to temporarily hide it.?
|
||||
- Fire some autocommand event after a new popup window was created and
|
||||
positioned? PopupNew? Could be used to set some options or move it out of
|
||||
the way. (#5737)
|
||||
However, it may also cause trouble, changing the popup of another plugin.
|
||||
- Use popup (or popup menu) for command line completion
|
||||
- When using a popup for the info of a completion menu, and there is not
|
||||
enough space, let the popup overlap with the menu. (#4544)
|
||||
- Implement flip option.
|
||||
- Make redrawing more efficient and avoid flicker:
|
||||
- put popup menu also in popup_mask?
|
||||
- Match does not have right BG color if line length equals popup width.
|
||||
(#5658)
|
||||
- Any other commands to disable in a popup window?
|
||||
Use ERROR_IF_POPUP_WINDOW for these.
|
||||
- Figure out the size and position better if wrapping inserts indent
|
||||
|
||||
Text properties:
|
||||
- Patch to fix that split / join does not update properties properly (Axel
|
||||
Forsman, #5839) Alternative: #5875.
|
||||
- "cc" does not call inserted_bytes(). (Axel Forsman, #5763)
|
||||
- Get E685 with a sequence of commands. (#5674)
|
||||
- Combining text property with 'cursorline' does not always work (Billie
|
||||
Cleek, #5533)
|
||||
- Text properties spanning more than one line
|
||||
- Text properties spanning more than one line. #5683
|
||||
- See remarks at top of src/textprop.c
|
||||
|
||||
'incsearch' with :s:
|
||||
@@ -158,17 +183,37 @@ Terminal emulator window:
|
||||
conversions.
|
||||
|
||||
Error numbers available:
|
||||
E451, E452, E453, E454, E460, E489, E491, E565, E578, E610, E611, E653,
|
||||
E654, E856, E857, E860, E861, E900
|
||||
E453, E454, E460, E489, E491, E565, E578, E610, E611, E653,
|
||||
E654, E856, E857, E861, E900
|
||||
|
||||
Patch to move duplicated code to a function. (Yegappan Lakshmanan, #5330)
|
||||
Buffer autocommands are a bit inconsistent. Add a separate set of
|
||||
autocommands for the buffer lifecycle:
|
||||
BufIsCreated (after buffer ID exists)
|
||||
BufIsLoaded (after buffer ID has content)
|
||||
BufIsUnloaded (after buffer ID no longer has)
|
||||
BufIsWiped (after buffer ID was wiped)
|
||||
BufIsRenamed (after buffer ID gets another name)
|
||||
The buffer list and windows are locked, no changes possible
|
||||
|
||||
Patch to use more FOR_ALL_ macros and use them. (Yegappan Lakshmanan, #5339)
|
||||
Patch to fix drawing error with DirectX. (James Grant, #5688)
|
||||
Causes flicker on resizing.
|
||||
|
||||
Patch to explain use of "%" in :!. (#5591)
|
||||
In gvim always set t_Co to 16777216 (#5903)
|
||||
|
||||
Patch to explain use of "%" in :!. (David Briscoe, #5591)
|
||||
|
||||
Patch to improve Windows terminal support. (Nobuhiro Takasaki, #5546)
|
||||
Ready to include.
|
||||
|
||||
Patch to add "-d" to xxd. (#5616)
|
||||
|
||||
Patch to add Turkish manual. (Emir Sarı, #5641)
|
||||
|
||||
Patch to support cindent option to handle pragmas differently.
|
||||
(Max Rumpf, #5468)
|
||||
|
||||
File marks merging has duplicates since 7.4.1925. (Ingo Karkat, #5733)
|
||||
|
||||
Running test_gui and test_gui_init with Motif sometimes kills the window
|
||||
manager. Problem with Motif? Now test_gui crashes in submenu_change().
|
||||
Athena is OK.
|
||||
@@ -180,19 +225,29 @@ Flag in 'formatoptions' is not used in the tests.
|
||||
Patch to add 'vtp' option. (#5344)
|
||||
Needs better docs. Is there a better name?
|
||||
|
||||
Patch for Haiku support. (Emir Sarı, #5605)
|
||||
|
||||
undo result wrong: Masato Nishihata, #4798
|
||||
|
||||
Patch for Template string: #4491. New pull: #4634
|
||||
Ready to include? Review the code.
|
||||
|
||||
When 'lazyredraw' is set sometimes the title is not updated.
|
||||
(Jason Franklin, 2020 Feb 3) Looks like a race condition.
|
||||
|
||||
Patch to delete BeOS code. (#5817)
|
||||
|
||||
Strange sequence of BufWipeout and BufNew events while doing omni-complete.
|
||||
(Paul Jolly, #5656)
|
||||
Get BufDelete without preceding BufNew. (Paul Jolly, #5694)
|
||||
Later more requests for what to track.
|
||||
Should we add new events that don't allow any buffer manipulation?
|
||||
Really only for dealing with appearing and disappearing buffers, load and
|
||||
unload.
|
||||
BufWinenter event not fired when saving unnamed buffer. (Paul Jolly, #5655)
|
||||
Another spurious BufDelete. (Dani Dickstein, #5701)
|
||||
|
||||
Patch to add function to return the text used in the quickfix window.
|
||||
(Yegappan, #5465)
|
||||
|
||||
Patch for Template string: #4491. New pull: #4634
|
||||
Implementation is too inefficient, avoid using lambda.
|
||||
|
||||
Patch to add readdirex() (Ken Takata, #5619)
|
||||
|
||||
Request to support <Cmd> in mappings, similar to how Neovim does this.
|
||||
@@ -203,11 +258,6 @@ Undo puts cursor in wrong line after "cG<Esc>" undo.
|
||||
:unmap <c-n> gives error but does remove the mapping. (Antony Scriven, 2019
|
||||
Dec 19)
|
||||
|
||||
Dos uninstal may delete vim.bat from the wrong directory (e.g., when someone
|
||||
makes his own wrapper). Add a magic string with the version number to the
|
||||
.bat file and check for it in the uninstaller. E.g.
|
||||
# uninstall key: vim8.1*
|
||||
|
||||
Patch to fix session file when using multiple tab pages. (Jason Franklin, 2019
|
||||
May 20)
|
||||
Also put :argadd commands at the start for all buffers, so that their order
|
||||
@@ -215,8 +265,8 @@ remains equal? Then %argdel to clean it up. Do try this with 'hidden' set.
|
||||
Also #4994: window-local options not always restored, related to using :badd.
|
||||
Also #5326: netrw buffers are not restored.
|
||||
|
||||
Patch to support cindent option to handle pragmas differently.
|
||||
(Max Rumpf, #5468)
|
||||
When 'backupdir' has a path ending in double slash (meaning: use full path of
|
||||
the file) combined with 'patchmode' the file name is wrong. (#5791)
|
||||
|
||||
Patch to make ":verbose pwd" show the scope of the directory. (Takuya
|
||||
Fujiwara, #5469)
|
||||
@@ -230,6 +280,8 @@ Should do current file first and not split it up when more results are found.
|
||||
Undo history wrong when ":next file" re-uses a buffer. (#5426)
|
||||
ex_next() should pass flag to do_argfile(), then to do_ecmd().
|
||||
|
||||
Patch to add "note" type to quickfix. (#5527) Missing tests.
|
||||
|
||||
Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
|
||||
(#4087)
|
||||
|
||||
@@ -238,8 +290,11 @@ match, total matches). (#5631)
|
||||
Patch to provide search stats in a variable, so that it can be used in the
|
||||
statusline. (Fujiwara Takuya, #4446)
|
||||
|
||||
":helptags ALL" should skip directories where "tags" cannot be written.
|
||||
(Matěj Cepl, #5026)
|
||||
Patch for ambiguous width characters in libvterm on MS-Windows 10.
|
||||
(Nobuhiro Takasaki, #4411)
|
||||
|
||||
behavior of i_CTRl-R_CTRL-R differs from documentation. (Paul Desmond Parker,
|
||||
#5771)
|
||||
|
||||
":bnext" in a help buffer is supposed to go to the next help buffer, but it
|
||||
goes to any buffer, and then :bnext skips help buffers, since they are
|
||||
@@ -298,16 +353,21 @@ Patch to add per-tabpage and per-window previous directory: "lcd -" and "tcd
|
||||
Does not build with MinGW out of the box:
|
||||
- _stat64 is not defined, need to use "struct stat" in vim.h
|
||||
- WINVER conflict, should use 0x0600 by default?
|
||||
- INT_MAX not defined: need to include <limits.h> in vim.h
|
||||
|
||||
Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
|
||||
13, #2910) Can't reproduce?
|
||||
|
||||
Display messed up with matchparen, wrapping and scrolling. (#5638)
|
||||
|
||||
Patch to configure BUILD_DATE for reproducible builds. (James McCoy, #513)
|
||||
|
||||
Patch to add MODIFIED_BY to MSVC build file. (Chen Lei, 2016 Nov 24, #1275)
|
||||
|
||||
Patch to support "0o" for octal numbers. (Ken Takata, #5304)
|
||||
|
||||
Patch to enable IXON, avoid that CTRL-S stops terminal output. (#5775)
|
||||
|
||||
When getting a focus event halfway a mapping this aborts the mapping. E.g.
|
||||
when "qq" is mapped and after the first "q" the mouse is moved outside of the
|
||||
gvim window (with focus follows mouse), then the K_FOCUSLOST key is put in the
|
||||
@@ -422,9 +482,6 @@ with the first character (like what happens with a last line that doesn't
|
||||
fit). Display "<<<" at the start of the first visible line (like "@@@" is
|
||||
displayed in the last line). (Arseny Nasokin, #5154)
|
||||
|
||||
Patch for ambiguous width characters in libvterm on MS-Windows 10.
|
||||
(Nobuhiro Takasaki, #4411)
|
||||
|
||||
Window size changes after closing a tab. (#4741)
|
||||
|
||||
Problem with colors in terminal window. (Jason Franklin, 2019 May 12)
|
||||
@@ -594,19 +651,8 @@ Make ":interactive !cmd" stop termcap mode, also when used in an autocommand.
|
||||
|
||||
Add buffer argument to undotree(). (#4001)
|
||||
|
||||
Using uninitialized value in test_gn
|
||||
Using uninitialized value in test_crypt.
|
||||
memory leak in test_paste
|
||||
Memory leak in test_terminal:
|
||||
==23530== by 0x2640D7: alloc (misc2.c:874)
|
||||
==23530== by 0x2646D6: vim_strsave (misc2.c:1315)
|
||||
==23530== by 0x25841D: FullName_save (misc1.c:5443)
|
||||
==23530== by 0x17CB4F: fix_fname (buffer.c:4794)
|
||||
==23530== by 0x17CB9A: fname_expand (buffer.c:4838)
|
||||
==23530== by 0x1759AB: buflist_new (buffer.c:1889)
|
||||
==23530== by 0x35C923: term_start (terminal.c:421)
|
||||
==23530== by 0x2AFF30: mch_call_shell_terminal (os_unix.c:4377)
|
||||
==23530== by 0x2B16BE: mch_call_shell (os_unix.c:5383)
|
||||
Using uninitialized value in test_crypt (can't explain why).
|
||||
Memory leak in test_terminal_fail
|
||||
TODO: be able to run all parts of test_alot with valgrind separately
|
||||
Memory leak in test_alot with pyeval() (allocating partial)
|
||||
Memory leak in test_alot with expand()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_03.txt* For Vim version 8.2. Last change: 2019 Nov 21
|
||||
*usr_03.txt* For Vim version 8.2. Last change: 2020 Feb 29
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -346,7 +346,8 @@ to find the first #include after the cursor: >
|
||||
|
||||
And then type "n" several times. You will move to each #include in the text.
|
||||
You can also use a count if you know which match you want. Thus "3n" finds
|
||||
the third match. Using a count with "/" doesn't work.
|
||||
the third match. You can also use a count with "/": "4/the" goes to the
|
||||
fourth match of "the".
|
||||
|
||||
The "?" command works like "/" but searches backwards: >
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_07.txt* For Vim version 8.2. Last change: 2017 Sep 18
|
||||
*usr_07.txt* For Vim version 8.2. Last change: 2020 Mar 23
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -227,8 +227,8 @@ the file.
|
||||
|
||||
FILE MARKS
|
||||
|
||||
In chapter 4 was explained how you can place a mark in a file with "mx" and
|
||||
jump to that position with "`x". That works within one file. If you edit
|
||||
In section |03.10| was explained how you can place a mark in a file with "mx"
|
||||
and jump to that position with "`x". That works within one file. If you edit
|
||||
another file and place marks there, these are specific for that file. Thus
|
||||
each file has its own set of marks, they are local to the file.
|
||||
So far we were using marks with a lowercase letter. There are also marks
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_22.txt* For Vim version 8.2. Last change: 2019 Dec 07
|
||||
*usr_22.txt* For Vim version 8.2. Last change: 2020 Mar 28
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -84,7 +84,7 @@ browser. This is what you get: >
|
||||
a................Hiding Files or Directories................|netrw-a|
|
||||
mb...............Bookmarking a Directory....................|netrw-mb|
|
||||
gb...............Changing to a Bookmarked Directory.........|netrw-gb|
|
||||
c................Make Browsing Directory The Current Dir....|netrw-c|
|
||||
cd...............Make Browsing Directory The Current Dir....|netrw-c|
|
||||
d................Make A New Directory.......................|netrw-d|
|
||||
D................Deleting Files or Directories..............|netrw-D|
|
||||
<c-h>............Edit File/Directory Hiding List............|netrw-ctrl-h|
|
||||
@@ -121,7 +121,7 @@ The following normal-mode commands may be used to control the browser display:
|
||||
|
||||
As a sampling of extra normal-mode commands:
|
||||
|
||||
c Change Vim's notion of the current directory to be
|
||||
cd Change Vim's notion of the current directory to be
|
||||
the same as the browser directory. (see
|
||||
|g:netrw_keepdir| to control this, too)
|
||||
R Rename the file or directory under the cursor; a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 8.2. Last change: 2019 Dec 17
|
||||
*usr_41.txt* For Vim version 8.2. Last change: 2020 Mar 15
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -942,10 +942,11 @@ Window size and position: *window-size-functions*
|
||||
winsaveview() get view of current window
|
||||
winrestview() restore saved view of current window
|
||||
|
||||
Mappings: *mapping-functions*
|
||||
Mappings and Menus: *mapping-functions*
|
||||
hasmapto() check if a mapping exists
|
||||
mapcheck() check if a matching mapping exists
|
||||
maparg() get rhs of a mapping
|
||||
menu_info() get information about a menu item
|
||||
wildmenumode() check if the wildmode is active
|
||||
|
||||
Testing: *test-functions*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 8.2. Last change: 2020 Feb 22
|
||||
*various.txt* For Vim version 8.2. Last change: 2020 Mar 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -317,6 +317,7 @@ g8 Print the hex values of the bytes used in the
|
||||
*+acl* |ACL| support included
|
||||
*+ARP* Amiga only: ARP support included
|
||||
B *+arabic* |Arabic| language support
|
||||
B *+autochdir* support 'autochdir' option
|
||||
T *+autocmd* |:autocmd|, automatic commands
|
||||
H *+autoservername* Automatically enable |clientserver|
|
||||
m *+balloon_eval* |balloon-eval| support in the GUI. Included when
|
||||
@@ -374,6 +375,7 @@ m *+hangul_input* Hangul input support |hangul|
|
||||
*+iconv* Compiled with the |iconv()| function
|
||||
*+iconv/dyn* Likewise |iconv-dynamic| |/dyn|
|
||||
T *+insert_expand* |insert_expand| Insert mode completion
|
||||
m *+ipv6* Support for IPv6 networking |channel|
|
||||
m *+job* starting and stopping jobs |job|
|
||||
S *+jumplist* |jumplist|
|
||||
B *+keymap* |'keymap'|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2020 Feb 21
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2020 Apr 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -120,6 +120,13 @@ and without `:let`, because there is no rule about where they are declared.
|
||||
Variables cannot shadow previously defined variables.
|
||||
Variables may shadow Ex commands, rename the variable if needed.
|
||||
|
||||
Global variables must be prefixed with "g:", also at the script level.
|
||||
However, global user defined functions are used without "g:". >
|
||||
vim9script
|
||||
let script_local = 'text'
|
||||
let g:global = 'value'
|
||||
let Funcref = ThatFunction
|
||||
|
||||
Since "&opt = value" is now assigning a value to option "opt", ":&" cannot be
|
||||
used to repeat a `:substitute` command.
|
||||
|
||||
@@ -149,6 +156,67 @@ with `substitute(` this will use the function, prepend a colon to use the
|
||||
command instead: >
|
||||
:substitute(pattern (replacement (
|
||||
|
||||
Note that while variables need to be defined before they can be used,
|
||||
functions can be called before being defined. This is required to be able
|
||||
have cyclic dependencies between functions. It is slightly less efficient,
|
||||
since the function has to be looked up by name. And a typo in the function
|
||||
name will only be found when the call is executed.
|
||||
|
||||
|
||||
Omitting function() ~
|
||||
|
||||
A user defined function can be used as a function reference in an expression
|
||||
without `function()`. The argument types and return type will then be checked.
|
||||
The function must already have been defined. >
|
||||
|
||||
let Funcref = MyFunction
|
||||
|
||||
When using `function()` the resulting type is "func", a function with any
|
||||
number of arguments and any return type. The function can be defined later.
|
||||
|
||||
|
||||
Automatic line continuation ~
|
||||
|
||||
In many cases it is obvious that an expression continues on the next line. In
|
||||
those cases there is no need to prefix the line with a backslash. For
|
||||
example, when a list spans multiple lines: >
|
||||
let mylist = [
|
||||
'one',
|
||||
'two',
|
||||
]
|
||||
And when a dict spans multiple lines: >
|
||||
let mydict = #{
|
||||
one: 1,
|
||||
two: 2,
|
||||
}
|
||||
Function call: >
|
||||
let result = Func(
|
||||
arg1,
|
||||
arg2
|
||||
)
|
||||
|
||||
For binary operators iin expressions not in [], {} or () a line break is
|
||||
possible AFTER the operators. For example: >
|
||||
let text = lead ..
|
||||
middle ..
|
||||
end
|
||||
let total = start +
|
||||
end -
|
||||
correction
|
||||
let result = positive ?
|
||||
PosFunc(arg) :
|
||||
NegFunc(arg)
|
||||
|
||||
Note that "enddef" cannot be used at the start of a continuation line, it ends
|
||||
the current function.
|
||||
|
||||
It is also possible to split a function header over multiple lines, in between
|
||||
arguments: >
|
||||
def MyFunc(
|
||||
text: string,
|
||||
separator = '-'
|
||||
): string
|
||||
|
||||
|
||||
No curly braces expansion ~
|
||||
|
||||
@@ -207,8 +275,7 @@ few exceptions.
|
||||
blob non-empty
|
||||
list non-empty (different from JavaScript)
|
||||
dictionary non-empty (different from JavaScript)
|
||||
funcref when not NULL
|
||||
partial when not NULL
|
||||
func when there is a function name
|
||||
special v:true
|
||||
job when not NULL
|
||||
channel when not NULL
|
||||
@@ -243,8 +310,8 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||
the function follows in the next lines, until the
|
||||
matching `:enddef`.
|
||||
|
||||
When {return-type} is omitted the function is not
|
||||
expected to return anything.
|
||||
When {return-type} is omitted or is "void" the
|
||||
function is not expected to return anything.
|
||||
|
||||
{arguments} is a sequence of zero or more argument
|
||||
declarations. There are three forms:
|
||||
@@ -275,6 +342,8 @@ script, then script-local variables must be accessed with the "s:" prefix.
|
||||
*:disa* *:disassemble*
|
||||
:disa[ssemble] {func} Show the instructions generated for {func}.
|
||||
This is for debugging and testing.
|
||||
Note that for command line completion of {func} you
|
||||
can prepend "s:" to find script-local functions.
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -288,27 +357,51 @@ The following builtin types are supported:
|
||||
float
|
||||
string
|
||||
blob
|
||||
list<type>
|
||||
dict<type>
|
||||
(a: type, b: type): type
|
||||
list<{type}>
|
||||
dict<{type}>
|
||||
job
|
||||
channel
|
||||
func
|
||||
func: {type}
|
||||
func({type}, ...)
|
||||
func({type}, ...): {type}
|
||||
|
||||
Not supported yet:
|
||||
tuple<a: type, b: type, ...>
|
||||
tuple<a: {type}, b: {type}, ...>
|
||||
|
||||
These types can be used in declarations, but no variable will have this type:
|
||||
type|type
|
||||
These types can be used in declarations, but no value will have this type:
|
||||
{type}|{type}
|
||||
void
|
||||
any
|
||||
|
||||
There is no array type, use list<type> instead. For a list constant an
|
||||
There is no array type, use list<{type}> instead. For a list constant an
|
||||
efficient implementation is used that avoids allocating lot of small pieces of
|
||||
memory.
|
||||
|
||||
A function defined with `:def` must declare the return type. If there is no
|
||||
type then the function doesn't return anything. "void" is used in type
|
||||
declarations.
|
||||
A partial and function can be declared in more or less specific ways:
|
||||
func any kind of function reference, no type
|
||||
checking for arguments or return value
|
||||
func: {type} any number and type of arguments with specific
|
||||
return type
|
||||
func({type}) function with argument type, does not return
|
||||
a value
|
||||
func({type}): {type} function with argument type and return type
|
||||
func(?{type}) function with type of optional argument, does
|
||||
not return a value
|
||||
func(...{type}) function with type of variable number of
|
||||
arguments, does not return a value
|
||||
func({type}, ?{type}, ...{type}): {type}
|
||||
function with:
|
||||
- type of mandatory argument
|
||||
- type of optional argument
|
||||
- type of variable number of arguments
|
||||
- return type
|
||||
|
||||
If the return type is "void" the function does not return a value.
|
||||
|
||||
The reference can also be a |Partial|, in which case it stores extra arguments
|
||||
and/or a dictionary, which are not visible to the caller. Since they are
|
||||
called in the same way the declaration is the same.
|
||||
|
||||
Custom types can be defined with `:type`: >
|
||||
:type MyList list<string>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 8.2. Last change: 2019 Dec 07
|
||||
*windows.txt* For Vim version 8.2. Last change: 2020 Mar 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -215,7 +215,7 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N*
|
||||
height). Reduces the current window height to create room
|
||||
(and others, if the 'equalalways' option is set).
|
||||
|
||||
:[N]sv[iew] [++opt] [+cmd] {file} *:sv* *:sview* *splitview*
|
||||
:[N]sv[iew] [++opt] [+cmd] [file] *:sv* *:sview* *splitview*
|
||||
Same as ":split", but set 'readonly' option for this buffer.
|
||||
|
||||
:[N]sf[ind] [++opt] [+cmd] {file} *:sf* *:sfi* *:sfind* *splitfind*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Jan 31
|
||||
" Last Change: 2020 Apr 12
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -233,6 +233,9 @@ au BufNewFile,BufRead *.bl setf blank
|
||||
" Blkid cache file
|
||||
au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
|
||||
|
||||
" BSDL
|
||||
au BufNewFile,BufRead *.bsdl setf bsdl
|
||||
|
||||
" Bazel (http://bazel.io)
|
||||
autocmd BufRead,BufNewFile *.bzl,WORKSPACE,BUILD.bazel setf bzl
|
||||
if has("fname_case")
|
||||
@@ -1643,9 +1646,11 @@ au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl
|
||||
" Systemd unit files
|
||||
au BufNewFile,BufRead */systemd/*.{automount,mount,path,service,socket,swap,target,timer} setf systemd
|
||||
" Systemd overrides
|
||||
au BufNewFile,BufRead /etc/systemd/system/*.d/*.conf setf systemd
|
||||
au BufNewFile,BufRead */etc/systemd/system/*.d/*.conf setf systemd
|
||||
au BufNewFile,BufRead */.config/systemd/user/*.d/*.conf setf systemd
|
||||
" Systemd temp files
|
||||
au BufNewFile,BufRead /etc/systemd/system/*.d/.#* setf systemd
|
||||
au BufNewFile,BufRead */etc/systemd/system/*.d/.#* setf systemd
|
||||
au BufNewFile,BufRead */.config/systemd/user/*.d/.#* setf systemd
|
||||
|
||||
" Synopsys Design Constraints
|
||||
au BufNewFile,BufRead *.sdc setf sdc
|
||||
@@ -1773,7 +1778,7 @@ au BufNewFile,BufRead *.va,*.vams setf verilogams
|
||||
au BufNewFile,BufRead *.sv,*.svh setf systemverilog
|
||||
|
||||
" VHDL
|
||||
au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst setf vhdl
|
||||
au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst,*.vho setf vhdl
|
||||
|
||||
" Vim script
|
||||
au BufNewFile,BufRead *.vim,*.vba,.exrc,_exrc setf vim
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: man
|
||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||
" Last Change: 2019 Sep 26
|
||||
" (fix by Jason Franklin)
|
||||
" Last Change: 2020 Apr 6
|
||||
|
||||
" To make the ":Man" command available before editing a manual page, source
|
||||
" this script from your startup vimrc file.
|
||||
@@ -96,7 +95,7 @@ func <SID>PreGetPage(cnt)
|
||||
let sect = a:cnt
|
||||
let page = expand("<cword>")
|
||||
endif
|
||||
call s:GetPage(sect, page)
|
||||
call s:GetPage('', sect, page)
|
||||
endfunc
|
||||
|
||||
func <SID>GetCmdArg(sect, page)
|
||||
@@ -205,6 +204,7 @@ func <SID>GetPage(cmdmods, ...)
|
||||
let s:env_has_u = (v:shell_error == 0)
|
||||
endif
|
||||
let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat'
|
||||
let env_cmd .= ' GROFF_NO_SGR=1'
|
||||
let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' | col -b'
|
||||
silent exec "r !" . man_cmd
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
||||
" Original Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Website: https://github.com/marshallward/vim-restructuredtext
|
||||
" Latest Revision: 2018-12-29
|
||||
" Latest Revision: 2020-03-31
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -34,7 +34,7 @@ if exists("g:rst_style") && g:rst_style != 0
|
||||
setlocal expandtab shiftwidth=3 softtabstop=3 tabstop=8
|
||||
endif
|
||||
|
||||
if has('patch-7.3.867') " Introduced the TextChanged event.
|
||||
if g:rst_fold_enabled != 0 && has('patch-7.3.867') " Introduced the TextChanged event.
|
||||
setlocal foldmethod=expr
|
||||
setlocal foldexpr=RstFold#GetRstFold()
|
||||
setlocal foldtext=RstFold#GetRstFoldText()
|
||||
|
||||
@@ -10,6 +10,5 @@
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,:///,://
|
||||
setlocal expandtab
|
||||
setlocal ts=2
|
||||
setlocal sw=2
|
||||
setlocal sw=4 sts=4
|
||||
setlocal smartindent
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: YAML (YAML Ain't Markup Language)
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se> (inactive)
|
||||
" Last Change: 2020 Mar 02
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -16,5 +16,10 @@ let b:undo_ftplugin = "setl com< cms< et< fo<"
|
||||
setlocal comments=:# commentstring=#\ %s expandtab
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
if !exists("g:yaml_recommended_style") || g:yaml_recommended_style != 0
|
||||
let b:undo_ftplugin ..= " sw< sts<"
|
||||
setlocal shiftwidth=2 softtabstop=2
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2017-11-22
|
||||
" Latest Revision: 2020-01-10
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-zsh
|
||||
|
||||
@@ -14,10 +14,24 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo< "
|
||||
|
||||
if executable('zsh')
|
||||
if !has('gui_running') && executable('less')
|
||||
command! -buffer -nargs=1 RunHelp silent exe '!zsh -ic "autoload -Uz run-help; run-help <args> 2>/dev/null | LESS= less"' | redraw!
|
||||
elseif has('terminal')
|
||||
command! -buffer -nargs=1 RunHelp silent exe ':term zsh -ic "autoload -Uz run-help; run-help <args>"'
|
||||
else
|
||||
command! -buffer -nargs=1 RunHelp echo system('zsh -ic "autoload -Uz run-help; run-help <args> 2>/dev/null"')
|
||||
endif
|
||||
setlocal keywordprg=:RunHelp
|
||||
setlocal makeprg=zsh\ -n\ --\ %:S
|
||||
setlocal errorformat=%f:\ line\ %l:\ %m
|
||||
let b:undo_ftplugin .= 'keywordprg< errorformat< makeprg<'
|
||||
endif
|
||||
|
||||
let b:match_words = ',\<if\>:\<elif\>:\<else\>:\<fi\>'
|
||||
\ . ',\<case\>:^\s*([^)]*):\<esac\>'
|
||||
\ . ',\<\%(select\|while\|until\|repeat\|for\%(each\)\=\)\>:\<done\>'
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
" Last change: 2016 Apr 05
|
||||
"
|
||||
" To use it, copy it to
|
||||
" for Unix: ~/.gvimrc
|
||||
" for Amiga: s:.gvimrc
|
||||
" for MS-DOS and Win32: $VIM\_gvimrc
|
||||
" for OpenVMS: sys$login:.gvimrc
|
||||
" for Unix: ~/.gvimrc
|
||||
" for Amiga: s:.gvimrc
|
||||
" for MS-Windows: $VIM\_gvimrc
|
||||
" for Haiku: ~/config/settings/vim/gvimrc
|
||||
" for OpenVMS: sys$login:.gvimrc
|
||||
|
||||
" Make external commands work through a pipe instead of a pseudo-tty
|
||||
"set noguipty
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Author: John Wellesz <John.wellesz (AT) gmail (DOT) com>
|
||||
" URL: https://www.2072productions.com/vim/indent/php.vim
|
||||
" Home: https://github.com/2072/PHP-Indenting-for-VIm
|
||||
" Last Change: 2019 Jully 21st
|
||||
" Last Change: 2020 Mar 05
|
||||
" Version: 1.70
|
||||
"
|
||||
"
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
" Vim indent file
|
||||
" Language: reStructuredText Documentation Format
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2011-08-03
|
||||
" Vim reST indent file
|
||||
" Language: reStructuredText Documentation Format
|
||||
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2020-03-31
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -18,6 +20,12 @@ endif
|
||||
|
||||
let s:itemization_pattern = '^\s*[-*+]\s'
|
||||
let s:enumeration_pattern = '^\s*\%(\d\+\|#\)\.\s\+'
|
||||
let s:note_pattern = '^\.\. '
|
||||
|
||||
function! s:get_paragraph_start()
|
||||
let paragraph_mark_start = getpos("'{")[1]
|
||||
return getline(paragraph_mark_start) =~ '\S' ? paragraph_mark_start : paragraph_mark_start + 1
|
||||
endfunction
|
||||
|
||||
function GetRSTIndent()
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
@@ -28,6 +36,13 @@ function GetRSTIndent()
|
||||
let ind = indent(lnum)
|
||||
let line = getline(lnum)
|
||||
|
||||
let psnum = s:get_paragraph_start()
|
||||
if psnum != 0
|
||||
if getline(psnum) =~ s:note_pattern
|
||||
let ind = 3
|
||||
endif
|
||||
endif
|
||||
|
||||
if line =~ s:itemization_pattern
|
||||
let ind += 2
|
||||
elseif line =~ s:enumeration_pattern
|
||||
|
||||
117
runtime/menu.vim
117
runtime/menu.vim
@@ -2,7 +2,7 @@
|
||||
" You can also use this as a start for your own set of menus.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2019 Dec 10
|
||||
" Last Change: 2020 Mar 29
|
||||
|
||||
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
|
||||
" in all modes and avoid side effects from mappings defined by the user.
|
||||
@@ -139,11 +139,11 @@ an 10.600 &File.-SEP4- <Nop>
|
||||
an 10.610 &File.Sa&ve-Exit<Tab>:wqa :confirm wqa<CR>
|
||||
an 10.620 &File.E&xit<Tab>:qa :confirm qa<CR>
|
||||
|
||||
func! <SID>SelectAll()
|
||||
func s:SelectAll()
|
||||
exe "norm! gg" . (&slm == "" ? "VG" : "gH\<C-O>G")
|
||||
endfunc
|
||||
|
||||
func! s:FnameEscape(fname)
|
||||
func s:FnameEscape(fname)
|
||||
if exists('*fnameescape')
|
||||
return fnameescape(a:fname)
|
||||
endif
|
||||
@@ -356,7 +356,7 @@ endfun
|
||||
let s:did_setup_color_schemes = 0
|
||||
|
||||
" Setup the Edit.Color Scheme submenu
|
||||
func! s:SetupColorSchemes() abort
|
||||
func s:SetupColorSchemes() abort
|
||||
if s:did_setup_color_schemes
|
||||
return
|
||||
endif
|
||||
@@ -388,7 +388,7 @@ endif
|
||||
if has("keymap")
|
||||
let s:did_setup_keymaps = 0
|
||||
|
||||
func! s:SetupKeymaps() abort
|
||||
func s:SetupKeymaps() abort
|
||||
if s:did_setup_keymaps
|
||||
return
|
||||
endif
|
||||
@@ -454,7 +454,7 @@ if has("spell")
|
||||
an <silent> 40.335.270 &Tools.&Spelling.&Find\ More\ Languages :call <SID>SpellLang()<CR>
|
||||
|
||||
let s:undo_spellang = ['aun &Tools.&Spelling.&Find\ More\ Languages']
|
||||
func! s:SpellLang()
|
||||
func s:SpellLang()
|
||||
for cmd in s:undo_spellang
|
||||
exe "silent! " . cmd
|
||||
endfor
|
||||
@@ -566,7 +566,7 @@ an <silent> 40.540 &Tools.Conve&rt\ Back<Tab>:%!xxd\ -r
|
||||
|
||||
" Use a function to do the conversion, so that it also works with 'insertmode'
|
||||
" set.
|
||||
func! s:XxdConv()
|
||||
func s:XxdConv()
|
||||
let mod = &mod
|
||||
if has("vms")
|
||||
%!mc vim:xxd
|
||||
@@ -580,7 +580,7 @@ func! s:XxdConv()
|
||||
let &mod = mod
|
||||
endfun
|
||||
|
||||
func! s:XxdBack()
|
||||
func s:XxdBack()
|
||||
let mod = &mod
|
||||
if has("vms")
|
||||
%!mc vim:xxd -r
|
||||
@@ -593,7 +593,7 @@ func! s:XxdBack()
|
||||
let &mod = mod
|
||||
endfun
|
||||
|
||||
func! s:XxdFind()
|
||||
func s:XxdFind()
|
||||
if !exists("g:xxdprogram")
|
||||
" On the PC xxd may not be in the path but in the install directory
|
||||
if has("win32") && !executable("xxd")
|
||||
@@ -610,7 +610,7 @@ endfun
|
||||
let s:did_setup_compilers = 0
|
||||
|
||||
" Setup the Tools.Compiler submenu
|
||||
func! s:SetupCompilers() abort
|
||||
func s:SetupCompilers() abort
|
||||
if s:did_setup_compilers
|
||||
return
|
||||
endif
|
||||
@@ -634,7 +634,7 @@ endif
|
||||
|
||||
" Load ColorScheme, Compiler Setting and Keymap menus when idle.
|
||||
if !exists("do_no_lazyload_menus")
|
||||
func! s:SetupLazyloadMenus()
|
||||
func s:SetupLazyloadMenus()
|
||||
call s:SetupColorSchemes()
|
||||
call s:SetupCompilers()
|
||||
if has("keymap")
|
||||
@@ -656,51 +656,75 @@ if !exists("no_buffers_menu")
|
||||
" startup faster.
|
||||
let s:bmenu_wait = 1
|
||||
|
||||
" Dictionary of buffer number to name. This helps prevent problems where a
|
||||
" buffer as renamed and we didn't keep track of that.
|
||||
let s:bmenu_items = {}
|
||||
|
||||
if !exists("bmenu_priority")
|
||||
let bmenu_priority = 60
|
||||
endif
|
||||
|
||||
func! s:BMAdd()
|
||||
" invoked from a BufCreate or BufFilePost autocommand
|
||||
func s:BMAdd()
|
||||
if s:bmenu_wait == 0
|
||||
" when adding too many buffers, redraw in short format
|
||||
if s:bmenu_count == &menuitems && s:bmenu_short == 0
|
||||
call s:BMShow()
|
||||
else
|
||||
call <SID>BMFilename(expand("<afile>"), expand("<abuf>"))
|
||||
let s:bmenu_count = s:bmenu_count + 1
|
||||
let name = expand("<afile>")
|
||||
let num = expand("<abuf>") + 0 " add zero to convert to a number type
|
||||
if s:BMCanAdd(name, num)
|
||||
call <SID>BMFilename(name, num)
|
||||
let s:bmenu_count += 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func! s:BMRemove()
|
||||
" invoked from a BufDelete or BufFilePre autocommand
|
||||
func s:BMRemove()
|
||||
if s:bmenu_wait == 0
|
||||
let name = expand("<afile>")
|
||||
if isdirectory(name)
|
||||
return
|
||||
let bufnum = expand("<abuf>")
|
||||
if s:bmenu_items->has_key(bufnum)
|
||||
let menu_name = s:bmenu_items[bufnum]
|
||||
exe 'silent! aun &Buffers.' . menu_name
|
||||
let s:bmenu_count = s:bmenu_count - 1
|
||||
unlet s:bmenu_items[bufnum]
|
||||
endif
|
||||
let munge = <SID>BMMunge(name, expand("<abuf>"))
|
||||
|
||||
if s:bmenu_short == 0
|
||||
exe 'silent! aun &Buffers.' . munge
|
||||
else
|
||||
exe 'silent! aun &Buffers.' . <SID>BMHash2(munge) . munge
|
||||
endif
|
||||
let s:bmenu_count = s:bmenu_count - 1
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Return non-zero if buffer with number "name" / "num" is useful to add in the
|
||||
" buffer menu.
|
||||
func s:BMCanAdd(name, num)
|
||||
" no directory or unlisted buffer
|
||||
if isdirectory(a:name) || !buflisted(a:num)
|
||||
return 0
|
||||
endif
|
||||
|
||||
" no special buffer, such as terminal or popup
|
||||
let buftype = getbufvar(a:num, '&buftype')
|
||||
if buftype != '' && buftype != 'nofile' && buftype != 'nowrite'
|
||||
return 0
|
||||
endif
|
||||
|
||||
" only existing buffers
|
||||
return bufexists(a:num)
|
||||
endfunc
|
||||
|
||||
" Create the buffer menu (delete an existing one first).
|
||||
func! s:BMShow(...)
|
||||
func s:BMShow(...)
|
||||
let s:bmenu_wait = 1
|
||||
let s:bmenu_short = 1
|
||||
let s:bmenu_count = 0
|
||||
let s:bmenu_items = {}
|
||||
"
|
||||
" get new priority, if exists
|
||||
if a:0 == 1
|
||||
let g:bmenu_priority = a:1
|
||||
endif
|
||||
|
||||
" Remove old menu, if exists; keep one entry to avoid a torn off menu to
|
||||
" Remove old menu, if it exists; keep one entry to avoid a torn off menu to
|
||||
" disappear. Use try/catch to avoid setting v:errmsg
|
||||
try | unmenu &Buffers | catch | endtry
|
||||
exe 'noremenu ' . g:bmenu_priority . ".1 &Buffers.Dummy l"
|
||||
@@ -721,7 +745,7 @@ func! s:BMShow(...)
|
||||
" figure out how many buffers there are
|
||||
let buf = 1
|
||||
while buf <= bufnr('$')
|
||||
if bufexists(buf) && !isdirectory(bufname(buf)) && buflisted(buf)
|
||||
if s:BMCanAdd(bufname(buf), buf)
|
||||
let s:bmenu_count = s:bmenu_count + 1
|
||||
endif
|
||||
let buf = buf + 1
|
||||
@@ -733,8 +757,9 @@ func! s:BMShow(...)
|
||||
" iterate through buffer list, adding each buffer to the menu:
|
||||
let buf = 1
|
||||
while buf <= bufnr('$')
|
||||
if bufexists(buf) && !isdirectory(bufname(buf)) && buflisted(buf)
|
||||
call <SID>BMFilename(bufname(buf), buf)
|
||||
let name = bufname(buf)
|
||||
if s:BMCanAdd(name, buf)
|
||||
call <SID>BMFilename(name, buf)
|
||||
endif
|
||||
let buf = buf + 1
|
||||
endwhile
|
||||
@@ -746,7 +771,7 @@ func! s:BMShow(...)
|
||||
aug END
|
||||
endfunc
|
||||
|
||||
func! s:BMHash(name)
|
||||
func s:BMHash(name)
|
||||
" Make name all upper case, so that chars are between 32 and 96
|
||||
let nm = substitute(a:name, ".*", '\U\0', "")
|
||||
if has("ebcdic")
|
||||
@@ -761,7 +786,7 @@ func! s:BMHash(name)
|
||||
return (char2nr(nm[0]) - sp) * 0x800000 + (char2nr(nm[1]) - sp) * 0x20000 + (char2nr(nm[2]) - sp) * 0x1000 + (char2nr(nm[3]) - sp) * 0x80 + (char2nr(nm[4]) - sp) * 0x20 + (char2nr(nm[5]) - sp)
|
||||
endfunc
|
||||
|
||||
func! s:BMHash2(name)
|
||||
func s:BMHash2(name)
|
||||
let nm = substitute(a:name, ".", '\L\0', "")
|
||||
" Not exactly right for EBCDIC...
|
||||
if nm[0] < 'a' || nm[0] > 'z'
|
||||
@@ -781,22 +806,22 @@ func! s:BMHash2(name)
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" insert a buffer name into the buffer menu:
|
||||
func! s:BMFilename(name, num)
|
||||
if isdirectory(a:name)
|
||||
return
|
||||
endif
|
||||
" Insert a buffer name into the buffer menu.
|
||||
func s:BMFilename(name, num)
|
||||
let munge = <SID>BMMunge(a:name, a:num)
|
||||
let hash = <SID>BMHash(munge)
|
||||
if s:bmenu_short == 0
|
||||
let name = 'an ' . g:bmenu_priority . '.' . hash . ' &Buffers.' . munge
|
||||
let s:bmenu_items[a:num] = munge
|
||||
let cmd = 'an ' . g:bmenu_priority . '.' . hash . ' &Buffers.' . munge
|
||||
else
|
||||
let name = 'an ' . g:bmenu_priority . '.' . hash . '.' . hash . ' &Buffers.' . <SID>BMHash2(munge) . munge
|
||||
let menu_name = <SID>BMHash2(munge) . munge
|
||||
let s:bmenu_items[a:num] = menu_name
|
||||
let cmd = 'an ' . g:bmenu_priority . '.' . hash . '.' . hash . ' &Buffers.' . menu_name
|
||||
endif
|
||||
" set 'cpo' to include the <CR>
|
||||
let cpo_save = &cpo
|
||||
set cpo&vim
|
||||
exe name . ' :confirm b' . a:num . '<CR>'
|
||||
exe cmd . ' :confirm b' . a:num . '<CR>'
|
||||
let &cpo = cpo_save
|
||||
endfunc
|
||||
|
||||
@@ -804,7 +829,7 @@ endfunc
|
||||
if !exists("g:bmenu_max_pathlen")
|
||||
let g:bmenu_max_pathlen = 35
|
||||
endif
|
||||
func! s:BMTruncName(fname)
|
||||
func s:BMTruncName(fname)
|
||||
let name = a:fname
|
||||
if g:bmenu_max_pathlen < 5
|
||||
let name = ""
|
||||
@@ -824,7 +849,7 @@ func! s:BMTruncName(fname)
|
||||
return name
|
||||
endfunc
|
||||
|
||||
func! s:BMMunge(fname, bnum)
|
||||
func s:BMMunge(fname, bnum)
|
||||
let name = a:fname
|
||||
if name == ''
|
||||
if !exists("g:menutrans_no_file")
|
||||
@@ -941,7 +966,7 @@ cnoremenu <script> <silent> 1.100 PopUp.Select\ &All <C-U>call <SID>SelectAll()<
|
||||
if has("spell")
|
||||
" Spell suggestions in the popup menu. Note that this will slow down the
|
||||
" appearance of the menu!
|
||||
func! <SID>SpellPopup()
|
||||
func s:SpellPopup()
|
||||
if exists("s:changeitem") && s:changeitem != ''
|
||||
call <SID>SpellDel()
|
||||
endif
|
||||
@@ -997,7 +1022,7 @@ if has("spell")
|
||||
call cursor(0, curcol) " put the cursor back where it was
|
||||
endfunc
|
||||
|
||||
func! <SID>SpellReplace(n)
|
||||
func s:SpellReplace(n)
|
||||
let l = getline('.')
|
||||
" Move the cursor to the start of the word.
|
||||
call spellbadword()
|
||||
@@ -1005,7 +1030,7 @@ if has("spell")
|
||||
\ . strpart(l, col('.') + len(s:fromword) - 1))
|
||||
endfunc
|
||||
|
||||
func! <SID>SpellDel()
|
||||
func s:SpellDel()
|
||||
exe "aunmenu PopUp." . s:changeitem
|
||||
exe "aunmenu PopUp." . s:additem
|
||||
exe "aunmenu PopUp." . s:ignoreitem
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" matchit.vim: (global plugin) Extended "%" matching
|
||||
" autload script of matchit plugin, see ../plugin/matchit.vim
|
||||
" Last Change: 2019 Oct 24
|
||||
" Last Change: Mar 01, 2020
|
||||
|
||||
let s:last_mps = ""
|
||||
let s:last_words = ":"
|
||||
@@ -48,6 +48,8 @@ function matchit#Match_wrapper(word, forward, mode) range
|
||||
execute "normal! gv\<Esc>"
|
||||
elseif a:mode == "o" && mode(1) !~# '[vV]'
|
||||
exe "norm! v"
|
||||
elseif a:mode == "n" && mode(1) =~# 'ni'
|
||||
exe "norm! v"
|
||||
endif
|
||||
" In s:CleanUp(), we may need to check whether the cursor moved forward.
|
||||
let startpos = [line("."), col(".")]
|
||||
|
||||
@@ -4,7 +4,7 @@ For instructions on installing this file, type
|
||||
`:help matchit-install`
|
||||
inside Vim.
|
||||
|
||||
For Vim version 8.1. Last change: 2019 Oct 24
|
||||
For Vim version 8.1. Last change: 2020 Mar 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Benji Fisher et al
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" matchit.vim: (global plugin) Extended "%" matching
|
||||
" Maintainer: Christian Brabandt
|
||||
" Version: 1.16
|
||||
" Version: 1.17
|
||||
" Last Change: 2019 Oct 24
|
||||
" Repository: https://github.com/chrisbra/matchit
|
||||
" Previous URL:http://www.vim.org/script.php?script_id=39
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"
|
||||
" Author: Bram Moolenaar
|
||||
" Copyright: Vim license applies, see ":help license"
|
||||
" Last Change: 2019 Dec 11
|
||||
" Last Change: 2020 Feb 19
|
||||
"
|
||||
" WORK IN PROGRESS - Only the basics work
|
||||
" Note: On MS-Windows you need a recent version of gdb. The one included with
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types in scripts
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2019 Jun 25
|
||||
" Last change: 2020 Mar 06
|
||||
|
||||
" This file is called by an autocommand for every file that has just been
|
||||
" loaded into a buffer. It checks if the type of file can be recognized by
|
||||
@@ -376,6 +376,10 @@ else
|
||||
elseif s:line1 =~? '-\*-.*erlang.*-\*-'
|
||||
set ft=erlang
|
||||
|
||||
" YAML
|
||||
elseif s:line1 =~# '^%YAML'
|
||||
set ft=yaml
|
||||
|
||||
" CVS diff
|
||||
else
|
||||
let s:lnum = 1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: awk, nawk, gawk, mawk
|
||||
" Maintainer: Antonio Colombo <azc100@gmail.com>
|
||||
" Last Change: 2016 Sep 05
|
||||
" Last Change: 2020 Mar 25
|
||||
|
||||
" AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
|
||||
" The AWK Programming Language, Addison-Wesley, 1988
|
||||
@@ -9,7 +9,7 @@
|
||||
" GAWK ref. is: Arnold D. Robbins
|
||||
" Effective AWK Programming, Third Edition, O'Reilly, 2001
|
||||
" Effective AWK Programming, Fourth Edition, O'Reilly, 2015
|
||||
" (also available and updated with the gawk source distribution)
|
||||
" (up-to-date version available with the gawk source distribution)
|
||||
|
||||
" MAWK is a "new awk" meaning it implements AWK ref.
|
||||
" mawk conforms to the Posix 1003.2 (draft 11.3)
|
||||
@@ -33,14 +33,19 @@ syn keyword awkStatement break continue delete exit
|
||||
syn keyword awkStatement function getline next
|
||||
syn keyword awkStatement print printf return
|
||||
" GAWK ref. Chapter 7-9
|
||||
syn keyword awkStatement switch nextfile
|
||||
syn keyword awkStatement case default switch nextfile
|
||||
syn keyword awkStatement func
|
||||
" GAWK ref. Chapter 2.7, Including Other Files into Your Program
|
||||
" GAWK ref. Chapter 2.8, Loading Dynamic Extensions into Your Program
|
||||
" GAWK ref. Chapter 15, Namespaces
|
||||
" Directives
|
||||
syn keyword awkStatement @include @load @namespace
|
||||
"
|
||||
" GAWK ref. Chapter 9, Functions
|
||||
" Numeric Functions
|
||||
syn keyword awkFunction atan2 cos exp int intdiv log rand sin sqrt srand
|
||||
syn keyword awkFunction atan2 cos exp int log rand sin sqrt srand
|
||||
" String Manipulation Functions
|
||||
syn keyword awkFunction asort asort1 gensub gsub index length match
|
||||
syn keyword awkFunction asort asorti gensub gsub index length match
|
||||
syn keyword awkFunction patsplit split sprintf strtonum sub substr
|
||||
syn keyword awkFunction tolower toupper
|
||||
" Input Output Functions
|
||||
@@ -49,7 +54,7 @@ syn keyword awkFunction close fflush system
|
||||
syn keyword awkFunction mktime strftime systime
|
||||
" Bit Manipulation Functions
|
||||
syn keyword awkFunction and compl lshift or rshift xor
|
||||
" Getting Type Functions
|
||||
" Getting Type Information Functions
|
||||
syn keyword awkFunction isarray typeof
|
||||
" String-Translation Functions
|
||||
syn keyword awkFunction bindtextdomain dcgettext dcngetext
|
||||
|
||||
17
runtime/syntax/bsdl.vim
Normal file
17
runtime/syntax/bsdl.vim
Normal file
@@ -0,0 +1,17 @@
|
||||
" Vim syntax file
|
||||
" Language: Boundary Scan Description Language (BSDL)
|
||||
" Maintainer: Daniel Kho <daniel.kho@logik.haus>
|
||||
" Last Changed: 2020 Mar 19 by Daniel Kho
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Read in VHDL syntax files
|
||||
runtime! syntax/vhdl.vim
|
||||
unlet b:current_syntax
|
||||
|
||||
let b:current_syntax = "bsdl"
|
||||
|
||||
" vim: ts=8
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim help file
|
||||
" Maintainer: Bram Moolenaar (Bram@vim.org)
|
||||
" Last Change: 2019 Nov 26
|
||||
" Last Change: 2020 Mar 06
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -11,7 +11,7 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()_]*[ \t]\+\*"me=e-1
|
||||
syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()_]*\ze\(\s\+\*\|$\)"
|
||||
syn match helpSectionDelim "^===.*===$"
|
||||
syn match helpSectionDelim "^---.*--$"
|
||||
if has("conceal")
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
" Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
|
||||
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" Repository: https://notabug.org/jorgesumle/vim-html-syntax
|
||||
" Last Change: 2019 Dec 24
|
||||
" Included patch from Jorge Maldonado Ventura to add the dialog element
|
||||
" Last Change: 2020 Mar 17
|
||||
" Included patch from Florian Breisch to add the summary element
|
||||
"
|
||||
|
||||
" Please check :help html.vim for some comments and a description of the options
|
||||
@@ -61,7 +61,8 @@ syn keyword htmlTagName contained datalist details dialog embed figcaption
|
||||
syn keyword htmlTagName contained figure footer header hgroup keygen main
|
||||
syn keyword htmlTagName contained mark menuitem meter nav output picture
|
||||
syn keyword htmlTagName contained progress rb rp rt rtc ruby section
|
||||
syn keyword htmlTagName contained slot source template time track video wbr
|
||||
syn keyword htmlTagName contained slot source summary template time track
|
||||
syn keyword htmlTagName contained video wbr
|
||||
|
||||
" legal arg names
|
||||
syn keyword htmlArg contained action
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
" Vim syntax file
|
||||
" Language: Jargon File
|
||||
" Maintainer: Dan Church (https://github.com/h3xx)
|
||||
" Last Change: 2019 Sep 27
|
||||
" Last Change: 2020 Mar 16
|
||||
"
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match jargonChaptTitle /:[^:]*:/
|
||||
syn match jargonEmailAddr /[^<@ ^I]*@[^ ^I>]*/
|
||||
syn match jargonUrl +\(http\|ftp\)://[^\t )"]*+
|
||||
syn region jargonMark start="{" end="}"
|
||||
syn region jargonHeader start="^:" end="$" contains=jargonChaptTitle
|
||||
syn match jargonChaptTitle /:[^:]*:/ contained
|
||||
syn match jargonEmailAddr /[+._A-Za-z0-9-]\+@[+._A-Za-z0-9-]\+/
|
||||
syn match jargonUrl +\(https\?\|ftp\)://[^\t )"]*+
|
||||
syn region jargonMark start="{[^\t {}]" end="}"
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only when an item doesn't have highlighting yet
|
||||
hi def link jargonChaptTitle Title
|
||||
hi def link jargonEmailAddr Comment
|
||||
hi def link jargonUrl Comment
|
||||
hi def link jargonMark Label
|
||||
hi def link jargonChaptTitle Title
|
||||
hi def link jargonEmailAddr Comment
|
||||
hi def link jargonUrl Comment
|
||||
hi def link jargonMark Label
|
||||
|
||||
let b:current_syntax = "jargon"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Roland Hieber <rohieb+vim-iR0jGdkV@rohieb.name>, <https://github.com/rohieb>
|
||||
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: https://github.com/vim/vim/blob/master/runtime/syntax/make.vim
|
||||
" Last Change: 2020 Jan 15
|
||||
" Last Change: 2020 Mar 04
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -13,22 +13,13 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
" some special characters
|
||||
syn match makeSpecial "^\s*[@+-]\+"
|
||||
syn match makeNextLine "\\\n\s*"
|
||||
|
||||
" some directives
|
||||
syn match makePreCondit "^ *\(ifn\=\(eq\|def\)\>\|else\(\s\+ifn\=\(eq\|def\)\)\=\>\|endif\>\)"
|
||||
syn match makeInclude "^ *[-s]\=include\s.*$"
|
||||
syn match makeStatement "^ *vpath"
|
||||
syn match makeExport "^ *\(export\|unexport\)\>"
|
||||
syn match makeOverride "^ *override"
|
||||
hi link makeOverride makeStatement
|
||||
hi link makeExport makeStatement
|
||||
|
||||
" catch unmatched define/endef keywords. endef only matches it is by itself on a line, possibly followed by a commend
|
||||
syn region makeDefine start="^\s*define\s" end="^\s*endef\s*\(#.*\)\?$" contains=makeStatement,makeIdent,makePreCondit,makeDefine
|
||||
syn region makeDefine start="^\s*define\s" end="^\s*endef\s*\(#.*\)\?$"
|
||||
\ contains=makeStatement,makeIdent,makePreCondit,makeDefine
|
||||
|
||||
" Microsoft Makefile specials
|
||||
syn case ignore
|
||||
@@ -53,17 +44,36 @@ syn match makeConfig "@[A-Za-z0-9_]\+@"
|
||||
syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1
|
||||
syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2
|
||||
|
||||
syn region makeTarget transparent matchgroup=makeTarget start="^[~A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1 end=";"re=e-1,me=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine,makeComment,makeDString skipnl nextGroup=makeCommands
|
||||
syn match makeTarget "^[~A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$" contains=makeIdent,makeSpecTarget,makeComment skipnl nextgroup=makeCommands,makeCommandError
|
||||
syn region makeTarget transparent matchgroup=makeTarget
|
||||
\ start="^[~A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1
|
||||
\ end=";"re=e-1,me=e-1 end="[^\\]$"
|
||||
\ keepend contains=makeIdent,makeSpecTarget,makeNextLine,makeComment,makeDString
|
||||
\ skipnl nextGroup=makeCommands
|
||||
syn match makeTarget "^[~A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$"
|
||||
\ contains=makeIdent,makeSpecTarget,makeComment
|
||||
\ skipnl nextgroup=makeCommands,makeCommandError
|
||||
|
||||
syn region makeSpecTarget transparent matchgroup=makeSpecTarget start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine,makeComment skipnl nextGroup=makeCommands
|
||||
syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$" contains=makeIdent,makeComment skipnl nextgroup=makeCommands,makeCommandError
|
||||
syn region makeSpecTarget transparent matchgroup=makeSpecTarget
|
||||
\ start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1
|
||||
\ end="[^\\]$" keepend
|
||||
\ contains=makeIdent,makeSpecTarget,makeNextLine,makeComment skipnl nextGroup=makeCommands
|
||||
syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$"
|
||||
\ contains=makeIdent,makeComment
|
||||
\ skipnl nextgroup=makeCommands,makeCommandError
|
||||
|
||||
syn match makeCommandError "^\s\+\S.*" contained
|
||||
syn region makeCommands start=";"hs=s+1 start="^\t" end="^[^\t#]"me=e-1,re=e-1 end="^$" contained contains=makeCmdNextLine,makeSpecial,makeComment,makeIdent,makePreCondit,makeDefine,makeDString,makeSString nextgroup=makeCommandError
|
||||
syn region makeCommands contained start=";"hs=s+1 start="^\t"
|
||||
\ end="^[^\t#]"me=e-1,re=e-1 end="^$"
|
||||
\ contains=makeCmdNextLine,makeSpecial,makeComment,makeIdent,makePreCondit,makeDefine,makeDString,makeSString
|
||||
\ nextgroup=makeCommandError
|
||||
syn match makeCmdNextLine "\\\n."he=e-1 contained
|
||||
|
||||
|
||||
" some directives
|
||||
syn match makePreCondit "^ *\(ifn\=\(eq\|def\)\>\|else\(\s\+ifn\=\(eq\|def\)\)\=\>\|endif\>\)"
|
||||
syn match makeInclude "^ *[-s]\=include\s.*$"
|
||||
syn match makeStatement "^ *vpath"
|
||||
syn match makeExport "^ *\(export\|unexport\)\>"
|
||||
syn match makeOverride "^ *override"
|
||||
" Statements / Functions (GNU make)
|
||||
syn match makeStatement contained "(\(abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|file\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|guile\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|subst\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1
|
||||
|
||||
@@ -103,6 +113,9 @@ syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Z
|
||||
|
||||
hi def link makeNextLine makeSpecial
|
||||
hi def link makeCmdNextLine makeSpecial
|
||||
hi link makeOverride makeStatement
|
||||
hi link makeExport makeStatement
|
||||
|
||||
hi def link makeSpecTarget Statement
|
||||
if !exists("make_no_commands")
|
||||
hi def link makeCommands Number
|
||||
|
||||
@@ -2,12 +2,19 @@
|
||||
" Language: resolver configuration file
|
||||
" Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
|
||||
" URL: https://raw.github.com/rid9/vim-resolv/master/resolv.vim
|
||||
" Last Change: 2013 May 21
|
||||
" Version: 1.0
|
||||
" Last Change: 2020 Mar 10
|
||||
" Version: 1.4
|
||||
"
|
||||
" Credits:
|
||||
" David Necas (Yeti) <yeti@physics.muni.cz>
|
||||
" Stefano Zacchiroli <zack@debian.org>
|
||||
" DJ Lucas <dj@linuxfromscratch.org>
|
||||
"
|
||||
" Changelog:
|
||||
" - 1.4: Added IPv6 support for sortlist.
|
||||
" - 1.3: Added IPv6 support for IPv4 dot-decimal notation.
|
||||
" - 1.2: Added new options.
|
||||
" - 1.1: Added IPv6 support.
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -29,11 +36,47 @@ syn match resolvIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@resolvIPClu
|
||||
syn match resolvIPNetmask contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?/ contains=resolvOperator,@resolvIPCluster
|
||||
syn match resolvHostname contained /\w\{-}\.[-0-9A-Za-z_\.]*/
|
||||
|
||||
" Particular
|
||||
" Nameserver IPv4
|
||||
syn match resolvIPNameserver contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\s\|$\)\)\+/ contains=@resolvIPCluster
|
||||
|
||||
" Nameserver IPv6
|
||||
syn match resolvIPNameserver contained /\<\%(\x\{1,4}:\)\{6}\%(\x\{1,4}:\x\{1,4}\)\>/
|
||||
syn match resolvIPNameserver contained /\s\@<=::\%(\x\{1,4}:\)\{,6}\x\{1,4}\>/
|
||||
syn match resolvIPNameserver contained /\s\@<=::\%(\x\{1,4}:\)\{,5}\%(\d\{1,4}\.\)\{3}\d\{1,4}\>/
|
||||
syn match resolvIPNameserver contained /\<\%(\x\{1,4}:\)\{1}:\%(\x\{1,4}:\)\{,5}\x\{1,4}\>/
|
||||
syn match resolvIPNameserver contained /\<\%(\x\{1,4}:\)\{1}:\%(\x\{1,4}:\)\{,4}\%(\d\{1,4}\.\)\{3}\d\{1,4}\>/
|
||||
syn match resolvIPNameserver contained /\<\%(\x\{1,4}:\)\{2}:\%(\x\{1,4}:\)\{,4}\x\{1,4}\>/
|
||||
syn match resolvIPNameserver contained /\<\%(\x\{1,4}:\)\{2}:\%(\x\{1,4}:\)\{,3}\%(\d\{1,4}\.\)\{3}\d\{1,4}\>/
|
||||
syn match resolvIPNameserver contained /\<\%(\x\{1,4}:\)\{3}:\%(\x\{1,4}:\)\{,3}\x\{1,4}\>/
|
||||
syn match resolvIPNameserver contained /\<\%(\x\{1,4}:\)\{3}:\%(\x\{1,4}:\)\{,2}\%(\d\{1,4}\.\)\{3}\d\{1,4}\>/
|
||||
syn match resolvIPNameserver contained /\<\%(\x\{1,4}:\)\{4}:\%(\x\{1,4}:\)\{,2}\x\{1,4}\>/
|
||||
syn match resolvIPNameserver contained /\<\%(\x\{1,4}:\)\{4}:\%(\x\{1,4}:\)\{,1}\%(\d\{1,4}\.\)\{3}\d\{1,4}\>/
|
||||
syn match resolvIPNameserver contained /\<\%(\x\{1,4}:\)\{5}:\%(\d\{1,4}\.\)\{3}\d\{1,4}\>/
|
||||
syn match resolvIPNameserver contained /\<\%(\x\{1,4}:\)\{6}:\x\{1,4}\>/
|
||||
syn match resolvIPNameserver contained /\<\%(\x\{1,4}:\)\{1,7}:\%(\s\|;\|$\)\@=/
|
||||
|
||||
" Search hostname
|
||||
syn match resolvHostnameSearch contained /\%(\%([-0-9A-Za-z_]\+\.\)*[-0-9A-Za-z_]\+\.\?\%(\s\|$\)\)\+/
|
||||
|
||||
" Sortlist IPv4
|
||||
syn match resolvIPNetmaskSortList contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?\%(\s\|$\)\)\+/ contains=resolvOperator,@resolvIPCluster
|
||||
|
||||
" Sortlist IPv6
|
||||
syn match resolvIPNetmaskSortList contained /\<\%(\x\{1,4}:\)\{6}\%(\x\{1,4}:\x\{1,4}\)\%(\/\d\{1,3}\)\?\>/
|
||||
syn match resolvIPNetmaskSortList contained /\s\@<=::\%(\x\{1,4}:\)\{,6}\x\{1,4}\%(\/\d\{1,3}\)\?\>/
|
||||
syn match resolvIPNetmaskSortList contained /\s\@<=::\%(\x\{1,4}:\)\{,5}\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\d\{1,3}\)\?\>/
|
||||
syn match resolvIPNetmaskSortList contained /\<\%(\x\{1,4}:\)\{1}:\%(\x\{1,4}:\)\{,5}\x\{1,4}\%(\/\d\{1,3}\)\?\>/
|
||||
syn match resolvIPNetmaskSortList contained /\<\%(\x\{1,4}:\)\{1}:\%(\x\{1,4}:\)\{,4}\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\d\{1,3}\)\?\>/
|
||||
syn match resolvIPNetmaskSortList contained /\<\%(\x\{1,4}:\)\{2}:\%(\x\{1,4}:\)\{,4}\x\{1,4}\%(\/\d\{1,3}\)\?\>/
|
||||
syn match resolvIPNetmaskSortList contained /\<\%(\x\{1,4}:\)\{2}:\%(\x\{1,4}:\)\{,3}\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\d\{1,3}\)\?\>/
|
||||
syn match resolvIPNetmaskSortList contained /\<\%(\x\{1,4}:\)\{3}:\%(\x\{1,4}:\)\{,3}\x\{1,4}\%(\/\d\{1,3}\)\?\>/
|
||||
syn match resolvIPNetmaskSortList contained /\<\%(\x\{1,4}:\)\{3}:\%(\x\{1,4}:\)\{,2}\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\d\{1,3}\)\?\>/
|
||||
syn match resolvIPNetmaskSortList contained /\<\%(\x\{1,4}:\)\{4}:\%(\x\{1,4}:\)\{,2}\x\{1,4}\%(\/\d\{1,3}\)\?\>/
|
||||
syn match resolvIPNetmaskSortList contained /\<\%(\x\{1,4}:\)\{4}:\%(\x\{1,4}:\)\{,1}\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\d\{1,3}\)\?\>/
|
||||
syn match resolvIPNetmaskSortList contained /\<\%(\x\{1,4}:\)\{5}:\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\d\{1,3}\)\?\>/
|
||||
syn match resolvIPNetmaskSortList contained /\<\%(\x\{1,4}:\)\{6}:\x\{1,4}\%(\/\d\{1,3}\)\?\>/
|
||||
syn match resolvIPNetmaskSortList contained /\<\%(\x\{1,4}:\)\{1,7}:\%(\s\|;\|$\)\@=\%(\/\d\{1,3}\)\?/
|
||||
|
||||
" Identifiers
|
||||
syn match resolvNameserver /^\s*nameserver\>/ nextgroup=resolvIPNameserver skipwhite
|
||||
syn match resolvLwserver /^\s*lwserver\>/ nextgroup=resolvIPNameserver skipwhite
|
||||
@@ -43,13 +86,12 @@ syn match resolvSortList /^\s*sortlist\>/ nextgroup=resolvIPNetmaskSortList skip
|
||||
syn match resolvOptions /^\s*options\>/ nextgroup=resolvOption skipwhite
|
||||
|
||||
" Options
|
||||
syn match resolvOption /\<\%(debug\|no_tld_query\|rotate\|no-check-names\|inet6\)\>/ contained nextgroup=resolvOption skipwhite
|
||||
syn match resolvOption /\<\%(debug\|no_tld_query\|no-tld-query\|rotate\|no-check-names\|inet6\|ip6-bytestring\|\%(no-\)\?ip6-dotint\|edns0\|single-request\%(-reopen\)\?\|use-vc\)\>/ contained nextgroup=resolvOption skipwhite
|
||||
syn match resolvOption /\<\%(ndots\|timeout\|attempts\):\d\+\>/ contained contains=resolvOperator nextgroup=resolvOption skipwhite
|
||||
|
||||
" Additional errors
|
||||
syn match resolvError /^search .\{257,}/
|
||||
|
||||
|
||||
hi def link resolvIP Number
|
||||
hi def link resolvIPNetmask Number
|
||||
hi def link resolvHostname String
|
||||
@@ -72,7 +114,6 @@ hi def link resolvError Error
|
||||
hi def link resolvIPError Error
|
||||
hi def link resolvIPSpecial Special
|
||||
|
||||
|
||||
let b:current_syntax = "resolv"
|
||||
|
||||
" vim: ts=8 ft=vim
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Vim reST syntax file
|
||||
" Language: reStructuredText documentation format
|
||||
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Website: https://github.com/marshallward/vim-restructuredtext
|
||||
" Latest Revision: 2018-12-29
|
||||
" Latest Revision: 2020-03-31
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -21,7 +21,7 @@ syn cluster rstCruft contains=rstEmphasis,rstStrongEmphasis,
|
||||
\ rstInlineInternalTargets,rstFootnoteReference,rstHyperlinkReference
|
||||
|
||||
syn region rstLiteralBlock matchgroup=rstDelimiter
|
||||
\ start='::\_s*\n\ze\z(\s\+\)' skip='^$' end='^\z1\@!'
|
||||
\ start='\(^\z(\s*\).*\)\@<=::\n\s*\n' skip='^\s*$' end='^\(\z1\s\+\)\@!'
|
||||
\ contains=@NoSpell
|
||||
|
||||
syn region rstQuotedLiteralBlock matchgroup=rstDelimiter
|
||||
@@ -90,16 +90,28 @@ execute 'syn match rstSubstitutionDefinition contained' .
|
||||
\ ' /|.*|\_s\+/ nextgroup=@rstDirectives'
|
||||
|
||||
function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, char_right)
|
||||
" Only escape the first char of a multichar delimiter (e.g. \* inside **)
|
||||
if a:start[0] == '\'
|
||||
let first = a:start[0:1]
|
||||
else
|
||||
let first = a:start[0]
|
||||
endif
|
||||
|
||||
execute 'syn match rstEscape'.a:name.' +\\\\\|\\'.first.'+'.' contained'
|
||||
|
||||
execute 'syn region rst' . a:name .
|
||||
\ ' start=+' . a:char_left . '\zs' . a:start .
|
||||
\ '\ze[^[:space:]' . a:char_right . a:start[strlen(a:start) - 1] . ']+' .
|
||||
\ a:middle .
|
||||
\ ' end=+\S' . a:end . '\ze\%($\|\s\|[''"’)\]}>/:.,;!?\\-]\)+'
|
||||
\ ' end=+' . a:end . '\ze\%($\|\s\|[''"’)\]}>/:.,;!?\\-]\)+' .
|
||||
\ ' contains=rstEscape' . a:name
|
||||
|
||||
execute 'hi def link rstEscape'.a:name.' Special'
|
||||
endfunction
|
||||
|
||||
function! s:DefineInlineMarkup(name, start, middle, end)
|
||||
let middle = a:middle != "" ?
|
||||
\ (' skip=+\\\\\|\\' . a:middle . '+') :
|
||||
\ (' skip=+\\\\\|\\' . a:middle . '\|\s' . a:middle . '+') :
|
||||
\ ""
|
||||
|
||||
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, "'", "'")
|
||||
@@ -161,7 +173,7 @@ syn match rstStandaloneHyperlink contains=@NoSpell
|
||||
\ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]"
|
||||
|
||||
syn region rstCodeBlock contained matchgroup=rstDirective
|
||||
\ start=+\%(sourcecode\|code\%(-block\)\=\)::\s\+.*\_s*\n\ze\z(\s\+\)+
|
||||
\ start=+\%(sourcecode\|code\%(-block\)\=\)::\s*\(\S*\)\?\s*\n\%(\s*:.*:\s*.*\s*\n\)*\n\ze\z(\s\+\)+
|
||||
\ skip=+^$+
|
||||
\ end=+^\z1\@!+
|
||||
\ contains=@NoSpell
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: VHDL [VHSIC (Very High Speed Integrated Circuit) Hardware Description Language]
|
||||
" Maintainer: Daniel Kho <daniel.kho@tauhop.com>
|
||||
" Maintainer: Daniel Kho <daniel.kho@logik.haus>
|
||||
" Previous Maintainer: Czo <Olivier.Sirol@lip6.fr>
|
||||
" Credits: Stephan Hegel <stephan.hegel@snc.siemens.com.cn>
|
||||
" Last Changed: 2018 May 06 by Daniel Kho
|
||||
" Last Changed: 2020 Apr 04 by Daniel Kho
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -16,10 +16,10 @@ set cpo&vim
|
||||
" case is not significant
|
||||
syn case ignore
|
||||
|
||||
" VHDL keywords
|
||||
syn keyword vhdlStatement access after alias all assert
|
||||
" VHDL 1076-2019 keywords
|
||||
syn keyword vhdlStatement access after alias all
|
||||
syn keyword vhdlStatement architecture array attribute
|
||||
syn keyword vhdlStatement assume assume_guarantee
|
||||
syn keyword vhdlStatement assert assume
|
||||
syn keyword vhdlStatement begin block body buffer bus
|
||||
syn keyword vhdlStatement case component configuration constant
|
||||
syn keyword vhdlStatement context cover
|
||||
@@ -34,20 +34,19 @@ syn keyword vhdlStatement map
|
||||
syn keyword vhdlStatement new next null
|
||||
syn keyword vhdlStatement of on open others out
|
||||
syn keyword vhdlStatement package port postponed procedure process pure
|
||||
syn keyword vhdlStatement parameter property protected
|
||||
syn keyword vhdlStatement parameter property protected private
|
||||
syn keyword vhdlStatement range record register reject report return
|
||||
syn keyword vhdlStatement release restrict restrict_guarantee
|
||||
syn keyword vhdlStatement select severity signal shared
|
||||
syn keyword vhdlStatement subtype
|
||||
syn keyword vhdlStatement release restrict
|
||||
syn keyword vhdlStatement select severity signal shared subtype
|
||||
syn keyword vhdlStatement sequence strong
|
||||
syn keyword vhdlStatement then to transport type
|
||||
syn keyword vhdlStatement unaffected units until use
|
||||
syn keyword vhdlStatement variable
|
||||
" VHDL-2017 interface
|
||||
syn keyword vhdlStatement view
|
||||
syn keyword vhdlStatement vmode vprop vunit
|
||||
syn keyword vhdlStatement variable view
|
||||
syn keyword vhdlStatement vpkg vmode vprop vunit
|
||||
syn keyword vhdlStatement wait when while with
|
||||
syn keyword vhdlStatement note warning error failure
|
||||
|
||||
" VHDL predefined severity levels
|
||||
syn keyword vhdlAttribute note warning error failure
|
||||
|
||||
" Linting of conditionals.
|
||||
syn match vhdlStatement "\<\(if\|else\)\>"
|
||||
@@ -124,7 +123,7 @@ syn match vhdlAttribute "\'succ"
|
||||
syn match vhdlAttribute "\'val"
|
||||
syn match vhdlAttribute "\'image"
|
||||
syn match vhdlAttribute "\'value"
|
||||
" VHDL-2017 interface attribute
|
||||
" VHDL-2019 interface attribute
|
||||
syn match vhdlAttribute "\'converse"
|
||||
|
||||
syn keyword vhdlBoolean true false
|
||||
@@ -167,7 +166,7 @@ syn match vhdlOperator "=\|\/=\|>\|<\|>="
|
||||
syn match vhdlOperator "<=\|:="
|
||||
syn match vhdlOperator "=>"
|
||||
|
||||
" VHDL-2017 concurrent signal association (spaceship) operator
|
||||
" VHDL-202x concurrent signal association (spaceship) operator
|
||||
syn match vhdlOperator "<=>"
|
||||
|
||||
" VHDL-2008 conversion, matching equality/non-equality operators
|
||||
@@ -188,7 +187,7 @@ syn match vhdlError "\(<\)[&+\-\/\\]\+"
|
||||
syn match vhdlError "[>=&+\-\/\\]\+\(<\)"
|
||||
" Covers most operators
|
||||
" support negative sign after operators. E.g. q<=-b;
|
||||
" Supports VHDL-2017 spaceship (concurrent simple signal association).
|
||||
" Supports VHDL-202x spaceship (concurrent simple signal association).
|
||||
syn match vhdlError "\(<=\)[<=&+\*\\?:]\+"
|
||||
syn match vhdlError "[>=&+\-\*\\:]\+\(=>\)"
|
||||
syn match vhdlError "\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<=\|?>=\|>=\|:=\|=>\)[<>=&+\*\\?:]\+"
|
||||
@@ -265,4 +264,5 @@ let b:current_syntax = "vhdl"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: ts=8
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 8.0 script
|
||||
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" Last Change: November 29, 2019
|
||||
" Version: 8.0-29
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: March 11, 2020
|
||||
" Version: 8.0-30
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
@@ -19,35 +19,35 @@ 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] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] deletl dep diffpu[t] dl dr[op] ec em[enu] ene[w] files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] 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] srg st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tch[dir] tf[irst] tlmenu tm[enu] to[pleft] tu[nmenu] undol[ist] up[date] vi[sual] vmapc[lear] wa[ll] winp[os] wundo xme xr[estore]
|
||||
syn keyword vimCommand contained ab arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] cle[arjumps] cnor comp[iler] cpf[ile] cun delc[ommand] deletp di[splay] diffs[plit] dli[st] ds[earch] echoe[rr] en[dif] eval filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] messages mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] 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 sri sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs tcld[o] th[row] tln tma[p] tp[revious] tunma[p] unh[ide] v vie[w] vne[w] wh[ile] wn[ext] wv[iminfo] xmenu xunme
|
||||
syn keyword vimCommand contained abc[lear] argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do dsp[lit] echom[sg] endf[unction] ex filetype fix[del] for gui helpg[rep] ia in j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] 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 srl star[tinsert] sts[elect] sv[iew] syncbind tab tabf[ind] tabnew tags tclf[ile] tj[ump] tlnoremenu tmapc[lear] tr[ewind] u[ndo] unl ve[rsion] vim[grep] vs[plit] win[size] wp[revious] x[it] xnoreme xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] delep dell diffg[et] dig[raphs] doau e[dit] echon endfo[r] exi[t] filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] inor ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] pw[d] 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 srn startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] te[aroff] tl[ast] tlu tn[ext] try una[bbreviate] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq xa[ll] xnoremenu xwininfo
|
||||
syn keyword vimCommand contained addd arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cn[ext] colo[rscheme] cons[t] cs d[elete] deletel delm[arks] diffo[ff] dir doaut ea el[se] endt[ry] exu[sage] fin[d] foldc[lose] g h[elp] hi if intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] py3 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] srp startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcd ter[minal] tlm tlunmenu tno[remap] ts[elect] undoj[oin] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xmapc[lear] xprop y[ank]
|
||||
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cnew[er] com cope[n] cscope debug deletep delp diffp[atch] dj[ump] dp earlier elsei[f] endw[hile] f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3do 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]
|
||||
syn keyword vimCommand contained a ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] deletl dep diffpu[t] dl dr[op] ec em[enu] ene[w] files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes 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 st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tch[dir] tf[irst] tlmenu tm[enu] to[pleft] tu[nmenu] undol[ist] up[date] vi[sual] vmapc[lear] wa[ll] winp[os] wundo xme xr[estore]
|
||||
syn keyword vimCommand contained ab arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] cle[arjumps] cnor comp[iler] cpf[ile] cun delc[ommand] deletp di[splay] diffs[plit] dli[st] ds[earch] echoe[rr] en[dif] eval filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] messages 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 sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs tcld[o] th[row] tln tma[p] tp[revious] tunma[p] unh[ide] v vie[w] vne[w] wh[ile] wn[ext] wv[iminfo] xmenu xunme
|
||||
syn keyword vimCommand contained abc[lear] argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do dsp[lit] echom[sg] endf[unction] ex filetype fix[del] for gui helpg[rep] ia in j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] 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 star[tinsert] sts[elect] sv[iew] syncbind tab tabf[ind] tabnew tags tclf[ile] tj[ump] tlnoremenu tmapc[lear] tr[ewind] u[ndo] unl ve[rsion] vim[grep] vs[plit] win[size] wp[revious] x[it] xnoreme xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] delep dell diffg[et] dig[raphs] doau e[dit] echon endfo[r] exi[t] filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] inor ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks 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 startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] te[aroff] tl[ast] tlu tn[ext] try una[bbreviate] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq xa[ll] xnoremenu xwininfo
|
||||
syn keyword vimCommand contained addd arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cn[ext] colo[rscheme] cons[t] cs d[elete] deletel delm[arks] diffo[ff] dir doaut ea el[se] endt[ry] exu[sage] fin[d] foldc[lose] g h[elp] hi if intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] 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 startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcd ter[minal] tlm tlunmenu tno[remap] ts[elect] undoj[oin] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xmapc[lear] xprop y[ank]
|
||||
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cnew[er] com cope[n] cscope debug deletep delp diffp[atch] dj[ump] dp earlier elsei[f] endw[hile] f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] 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]
|
||||
syn match vimCommand contained "\<z[-+^.=]\=\>"
|
||||
syn keyword vimCommand contained def endd[ef] disa[ssemble] vim9[script] imp[ort] exp[ort]
|
||||
syn keyword vimStdPlugin contained Arguments Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Winbar XMLent XMLns
|
||||
|
||||
" vimOptions are caught only when contained in a vimSet {{{2
|
||||
syn keyword vimOption contained acd ambw arshape background ballooneval bex bl brk buftype cf cinkeys cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr go guifontset helpheight history hlsearch imaf ims includeexpr infercase iskeyword keywordprg laststatus lispwords lrm magic maxfuncdepth menuitems mm modifiable mousemodel mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome redrawtime ri rs runtimepath scr sect sft shellredir shiftwidth showmatch signcolumn smarttab sp spf srr startofline suffixes switchbuf ta tagfunc tbi term termwintype tgc titlelen toolbariconsize ttimeout ttymouse twt undofile varsofttabstop verbosefile viminfofile wak weirdinvert wig wildoptions winheight wm wrapscan
|
||||
syn keyword vimOption contained ai anti autochdir backspace balloonevalterm bexpr bo browsedir casemap cfu cino cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd gp guifontwide helplang hk ic imak imsearch incsearch insertmode isp km lazyredraw list ls makeef maxmapdepth mfd mmd modified mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx regexpengine rightleft rtp sb scroll sections sh shellslash shm showmode siso smc spc spl ss statusline suffixesadd sws tabline taglength tbidi termbidi terse tgst titleold top ttimeoutlen ttyscroll tx undolevels vartabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write
|
||||
syn keyword vimOption contained akm antialias autoindent backup balloonexpr bg bomb bs cb ch cinoptions cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault grepformat guiheadroom hf hkmap icon imc imsf inde is isprint kmp lbr listchars lsp makeencoding maxmem mh mmp more mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion relativenumber rightleftcmd ru sbo scrollbind secure shcf shelltemp shortmess showtabline sj smd spell splitbelow ssl stl sw sxe tabpagemax tagrelative tbis termencoding textauto thesaurus titlestring tpm ttm ttytype uc undoreload vb vi visualbell wb wfw wildcharm winaltkeys winminwidth wmnu writeany
|
||||
syn keyword vimOption contained al ar autoread backupcopy bdir bh breakat bsdir cc charconvert cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepprg guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kp lcs lm luadll makeprg maxmempattern mis mmt mouse mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe remap rl rubydll sbr scrolljump sel shell shelltype shortname shq slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tags tbs termguicolors textmode tildeop tl tr tty tw udf updatecount vbs viewdir vop wc wh wildignore wincolor winptydll wmw writebackup
|
||||
syn keyword vimOption contained aleph arab autowrite backupdir bdlay bin breakindent bsk ccv ci cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endofline esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn gtl guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js langmap linebreak lmap lw mat maxmemtot mkspellmem mod mousef mousetime nf ofu para penc pm previewwindow printoptions pw quoteescape renderoptions rlc ruf sc scrolloff selection shellcmdflag shellxescape showbreak si sm so spellfile spr st sts swapsync syn tag tagstack tc termwinkey textwidth timeout tm ts ttybuiltin twk udir updatetime vdir viewoptions vsts wcm whichwrap wildignorecase window winwidth wop writedelay
|
||||
syn keyword vimOption contained allowrevins arabic autowriteall backupext belloff binary breakindentopt bt cd cin clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtt guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lnr lz matchpairs mco ml modeline mousefocus mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll rdt report rnu ruler scb scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tal tcldll termwinscroll tf timeoutlen to tsl ttyfast tws ul ur ve vif vts wcr wi wildmenu winfixheight wiv wrap ws
|
||||
syn keyword vimOption contained acd ambw arshape background ballooneval bex bl brk buftype cf cinkeys cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr go guifontset helpheight history hlsearch imaf ims includeexpr infercase iskeyword keywordprg laststatus lispwords lrm magic maxfuncdepth menuitems mm modifiable mousemodel mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome redrawtime ri rs sb scroll sect sft shellredir shiftwidth showmatch signcolumn smarttab sp spf srr startofline suffixes switchbuf ta tagfunc tbi term termwintype tgc titlelen toolbariconsize ttimeout ttymouse twt undofile varsofttabstop verbosefile viminfofile wak weirdinvert wig wildoptions winheight wm wrapscan
|
||||
syn keyword vimOption contained ai anti autochdir backspace balloonevalterm bexpr bo browsedir casemap cfu cino cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd gp guifontwide helplang hk ic imak imsearch incsearch insertmode isp km lazyredraw list ls makeef maxmapdepth mfd mmd modified mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx regexpengine rightleft rtp sbo scrollbind sections sh shellslash shm showmode siso smc spc spl ss statusline suffixesadd sws tabline taglength tbidi termbidi terse tgst titleold top ttimeoutlen ttyscroll tx undolevels vartabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write
|
||||
syn keyword vimOption contained akm antialias autoindent backup balloonexpr bg bomb bs cb ch cinoptions cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault grepformat guiheadroom hf hkmap icon imc imsf inde is isprint kmp lbr listchars lsp makeencoding maxmem mh mmp more mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion relativenumber rightleftcmd ru sbr scrollfocus secure shcf shelltemp shortmess showtabline sj smd spell splitbelow ssl stl sw sxe tabpagemax tagrelative tbis termencoding textauto thesaurus titlestring tpm ttm ttytype uc undoreload vb vi visualbell wb wfw wildcharm winaltkeys winminwidth wmnu writeany
|
||||
syn keyword vimOption contained al ar autoread backupcopy bdir bh breakat bsdir cc charconvert cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepprg guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kp lcs lm luadll makeprg maxmempattern mis mmt mouse mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe remap rl rubydll sc scrolljump sel shell shelltype shortname shq slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tags tbs termguicolors textmode tildeop tl tr tty tw udf updatecount vbs viewdir vop wc wh wildignore wincolor winptydll wmw writebackup
|
||||
syn keyword vimOption contained aleph arab autowrite backupdir bdlay bin breakindent bsk ccv ci cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endofline esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn gtl guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js langmap linebreak lmap lw mat maxmemtot mkspellmem mod mousef mousetime nf ofu para penc pm previewwindow printoptions pw quoteescape renderoptions rlc ruf scb scrolloff selection shellcmdflag shellxescape showbreak si sm so spellfile spr st sts swapsync syn tag tagstack tc termwinkey textwidth timeout tm ts ttybuiltin twk udir updatetime vdir viewoptions vsts wcm whichwrap wildignorecase window winwidth wop writedelay
|
||||
syn keyword vimOption contained allowrevins arabic autowriteall backupext belloff binary breakindentopt bt cd cin clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtt guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lnr lz matchpairs mco ml modeline mousefocus mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll rdt report rnu ruler scf scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tal tcldll termwinscroll tf timeoutlen to tsl ttyfast tws ul ur ve vif vts wcr wi wildmenu winfixheight wiv wrap ws
|
||||
syn keyword vimOption contained altkeymap arabicshape aw backupskip beval bk bri bufhidden cdpath cindent cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw guicursor guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langnoremap linespace loadplugins ma matchtime mef mle modelineexpr mousehide mps nu opendevice paste pex pmbfn printencoding pt pythonhome re restorescreen ro rulerformat scl scs sessionoptions shellquote shiftround showfulltag sidescrolloff smartindent sol spellsuggest sr stal sua swf syntax tagcase tb tenc termwinsize tfu title toolbar tsr ttym twsl undodir ut verbose viminfo wa wd wic wildmode winfixwidth wiw wrapmargin ww
|
||||
syn keyword vimOption contained ambiwidth ari awa balloondelay bevalterm bkc briopt buflisted cedit cink cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guifont helpfile highlight hls imactivatekey iminsert include inf isk keymodel langremap lisp lpl macatsui maxcombine menc mls modelines mousem msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll readonly revins rop
|
||||
syn keyword vimOption contained ambiwidth ari awa balloondelay bevalterm bkc briopt buflisted cedit cink cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guifont helpfile highlight hls imactivatekey iminsert include inf isk keymodel langremap lisp lpl macatsui maxcombine menc mls modelines mousem msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll readonly revins rop runtimepath scr
|
||||
|
||||
" vimOptions: These are the turn-off setting variants {{{2
|
||||
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobevalterm nobk nobreakindent nocf nocindent nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noemo noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc noimdisable noinfercase nojoinspaces nolangremap nolinebreak nolnr nolrm noma nomagic noml nomod nomodelineexpr nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup
|
||||
syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa noballoonevalterm nobin nobl nobri noci nocompatible nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noemoji noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolisp noloadplugins nolz nomacatsui nomh nomle nomodeline nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab 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
|
||||
syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobeval nobinary nobomb nobuflisted nocin noconfirm nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noendofline noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf nois nolangnoremap nolbr nolist nolpl
|
||||
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobevalterm nobk nobreakindent nocf nocindent nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noemo noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc noimdisable noinfercase nojoinspaces nolangremap nolinebreak nolnr nolrm nomacatsui noml nomod nomodelineexpr nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscrollbind noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup
|
||||
syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa noballoonevalterm nobin nobl nobri noci nocompatible nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noemoji noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolisp noloadplugins nolz nomagic nomle nomodeline nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscf noscrollfocus nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab 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
|
||||
syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobeval nobinary nobomb nobuflisted nocin noconfirm nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noendofline noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf nois nolangnoremap nolbr nolist nolpl noma nomh
|
||||
|
||||
" vimOptions: These are the invertible variants {{{2
|
||||
syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbevalterm invbk invbreakindent invcf invcindent invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invemo inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc invimdisable invinfercase invjoinspaces invlangremap invlinebreak invlnr invlrm invma invmagic invml invmod invmodelineexpr invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv invwrap invwrite invwritebackup
|
||||
syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invballoonevalterm invbin invbl invbri invci invcompatible invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible invemoji invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs invlazyredraw invlisp invloadplugins invlz invmacatsui invmh invmle invmodeline invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
|
||||
syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbeval invbinary invbomb invbuflisted invcin invconfirm invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invendofline inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invinf invis invlangnoremap invlbr invlist invlpl
|
||||
syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbevalterm invbk invbreakindent invcf invcindent invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invemo inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc invimdisable invinfercase invjoinspaces invlangremap invlinebreak invlnr invlrm invmacatsui invml invmod invmodelineexpr invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscrollbind invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv invwrap invwrite invwritebackup
|
||||
syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invballoonevalterm invbin invbl invbri invci invcompatible invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible invemoji invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs invlazyredraw invlisp invloadplugins invlz invmagic invmle invmodeline invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscf invscrollfocus invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
|
||||
syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbeval invbinary invbomb invbuflisted invcin invconfirm invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invendofline inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invinf invis invlangnoremap invlbr invlist invlpl invma invmh
|
||||
|
||||
" termcap codes (which can also be set) {{{2
|
||||
syn keyword vimOption contained t_8b t_AB t_al t_bc t_BE t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_EI t_F2 t_F4 t_F6 t_F8 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_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ 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_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_ut t_vb t_ve t_vi t_vs t_VS t_WP t_WS t_xn t_xs t_ZH t_ZR
|
||||
@@ -67,8 +67,8 @@ syn keyword vimErrSetting contained bioskey biosk conskey consk autoprint beauti
|
||||
|
||||
" AutoCmd Events {{{2
|
||||
syn case ignore
|
||||
syn keyword vimAutoEvent contained BufAdd BufDelete BufFilePost BufHidden BufNew BufRead BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre CmdlineChanged CmdlineEnter CmdlineLeave CmdUndefined CmdwinEnter CmdwinLeave ColorScheme ColorSchemePre CompleteChanged CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI DiffUpdated DirChanged EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TextChanged TextChangedI TextChangedP TextYankPost User VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave WinNew
|
||||
syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre BufLeave BufNewFile BufReadCmd
|
||||
syn keyword vimAutoEvent contained BufAdd BufDelete BufFilePost BufHidden BufNew BufRead BufReadPost BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre CmdlineChanged CmdlineEnter CmdlineLeave CmdUndefined CmdwinEnter CmdwinLeave ColorScheme ColorSchemePre CompleteChanged CompleteDone CompleteDonePre CursorHold CursorHoldI CursorMoved CursorMovedI DiffUpdated DirChanged EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TextChanged TextChangedI TextChangedP TextYankPost User VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave WinNew
|
||||
syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre BufLeave BufNewFile BufReadCmd BufReadPre
|
||||
|
||||
" Highlight commonly used Groupnames {{{2
|
||||
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
|
||||
@@ -79,11 +79,11 @@ syn match vimHLGroup contained "Conceal"
|
||||
syn case match
|
||||
|
||||
" Function Names {{{2
|
||||
syn keyword vimFuncName contained abs appendbufline asin assert_fails assert_notmatch balloon_gettext bufadd bufname byteidx char2nr ch_evalexpr ch_log ch_readraw cindent complete_check cosh deepcopy diff_hlID eventhandler exp filereadable float2nr foldclosed foreground getbufinfo getcharmod getcmdwintype getfontname getimstatus getpid gettabinfo getwinpos glob2regpat hasmapto hlexists index inputsave isinf job_info join keys line2byte listener_remove map matchaddpos matchstr mode pathshorten popup_close popup_findinfo popup_menu popup_show prompt_setinterrupt prop_list prop_type_get pyeval reg_executing remote_expr remote_startserver reverse screenchars search server2client setcmdpos setmatches settabwinvar shiftwidth sign_place simplify soundfold spellsuggest str2list strdisplaywidth string strtrans swapinfo synIDattr systemlist tagfiles tempname term_getaltscreen term_getjob term_getstatus term_scrape term_setkill term_wait test_garbagecollect_now test_null_blob test_null_list test_override test_settime timer_stop tr undofile virtcol wincol win_gotoid winlayout winrestview winwidth
|
||||
syn keyword vimFuncName contained acos argc assert_beeps assert_false assert_report balloon_show bufexists bufnr byteidxcomp ch_canread ch_evalraw ch_logfile ch_sendexpr clearmatches complete_info count delete empty executable expand filewritable floor foldclosedend funcref getbufline getcharsearch getcompletion getfperm getjumplist getpos gettabvar getwinposx globpath histadd hlID input inputsecret islocked job_setoptions js_decode len lispindent localtime maparg matcharg matchstrpos mzeval perleval popup_create popup_findpreview popup_move pow prompt_setprompt prop_remove prop_type_list pyxeval reg_recording remote_foreground remove round screencol searchdecl serverlist setenv setpos settagstack sign_define sign_placelist sin sound_playevent split str2nr strftime strlen strwidth swapname synIDtrans tabpagebuflist taglist term_dumpdiff term_getansicolors term_getline term_gettitle term_sendkeys term_setrestore test_alloc_fail test_garbagecollect_soon test_null_channel test_null_partial test_refcount timer_info timer_stopall trim undotree visualmode win_execute winheight winline winsaveview wordcount
|
||||
syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_true balloon_split buflisted bufwinid call ch_close ch_getbufnr ch_open ch_sendraw col confirm cscope_connection deletebufline environ execute expandcmd filter fmod foldlevel function getbufvar getcmdline getcurpos getfsize getline getqflist gettabwinvar getwinposy has histdel hostname inputdialog insert isnan job_start js_encode libcall list2str log mapcheck matchdelete max nextnonblank popup_atcursor popup_dialog popup_getoptions popup_notification prevnonblank prop_add prop_type_add pum_getpos range reltime remote_peek rename rubyeval screenpos searchpair setbufline setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playfile sqrt strcharpart strgetchar strpart submatch synconcealed synstack tabpagenr tan term_dumpload term_getattr term_getscrolled term_gettty term_setansicolors term_setsize test_autochdir test_getvalue test_null_dict test_null_string test_scrollbar timer_pause tolower trunc uniq wildmenumode win_findbuf win_id2tabwin winnr win_screenpos writefile
|
||||
syn keyword vimFuncName contained and arglistid assert_equalfile assert_match atan browse bufload bufwinnr ceil ch_close_in ch_getjob ch_read ch_setoptions complete copy cursor did_filetype escape exepath extend finddir fnameescape foldtext garbagecollect getchangelist getcmdpos getcwd getftime getloclist getreg gettagstack getwinvar has_key histget iconv inputlist invert items job_status json_decode libcallnr listener_add log10 match matchend min nr2char popup_beval popup_filter_menu popup_getpos popup_setoptions printf prop_clear prop_type_change pumvisible readdir reltimefloat remote_read repeat screenattr screenrow searchpairpos setbufvar setline setreg sha256 sign_getplaced sign_unplace sort sound_stop state strchars stridx strridx substitute synID system tabpagewinnr tanh term_dumpwrite term_getcursor term_getsize term_list term_setapi term_start test_feedinput test_ignore_error test_null_job test_option_not_set test_setmouse timer_start toupper type values winbufnr win_getid win_id2win winrestcmd win_splitmove xor
|
||||
syn keyword vimFuncName contained append argv assert_exception assert_notequal atan2 browsedir bufloaded byte2line changenr chdir ch_info ch_readblob ch_status complete_add cos debugbreak diff_filler eval exists feedkeys findfile fnamemodify foldtextresult get getchar getcmdtype getenv getftype getmatches getregtype getwininfo glob haslocaldir histnr indent inputrestore isdirectory job_getchannel job_stop json_encode line listener_flush luaeval matchadd matchlist mkdir or popup_clear popup_filter_yesno popup_hide popup_settext prompt_setcallback prop_find prop_type_delete py3eval readfile reltimestr remote_send resolve screenchar screenstring searchpos setcharsearch setloclist settabvar shellescape sign_jump sign_unplacelist sound_clear spellbadword str2float
|
||||
syn keyword vimFuncName contained abs appendbufline asin assert_fails assert_notmatch balloon_gettext bufadd bufname byteidx char2nr ch_evalexpr ch_log ch_readraw cindent complete_check cosh deepcopy diff_hlID eval exists feedkeys findfile fnamemodify foldtextresult get getchar getcmdtype getenv getftype getmatches getreg gettagstack getwinvar has_key histget iconv inputlist interrupt isnan job_start js_encode libcall list2str log mapcheck matchdelete max nextnonblank popup_atcursor popup_dialog popup_getoptions popup_notification prevnonblank prop_add prop_type_add pum_getpos rand reg_recording remote_foreground remove round screencol searchdecl serverlist setenv setpos settagstack sign_define sign_placelist sin sound_playevent split str2list strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_sendkeys term_setsize test_autochdir test_getvalue test_null_dict test_null_string test_scrollbar test_unknown timer_start toupper type values winbufnr win_findbuf winheight winline winsaveview winwidth
|
||||
syn keyword vimFuncName contained acos argc assert_beeps assert_false assert_report balloon_show bufexists bufnr byteidxcomp ch_canread ch_evalraw ch_logfile ch_sendexpr clearmatches complete_info count delete echoraw eventhandler exp filereadable float2nr foldclosed foreground getbufinfo getcharmod getcmdwintype getfontname getimstatus getmousepos getregtype getwininfo glob haslocaldir histnr indent inputrestore invert items job_status json_decode libcallnr listener_add log10 match matchend min nr2char popup_beval popup_filter_menu popup_getpos popup_setoptions printf prop_clear prop_type_change pumvisible range reltime remote_peek rename rubyeval screenpos searchpair setbufline setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playfile sqrt str2nr strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_setansicolors term_start test_feedinput test_ignore_error test_null_job test_option_not_set test_setmouse test_void timer_stop tr undofile virtcol wincol win_getid win_id2tabwin winnr win_screenpos wordcount
|
||||
syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_true balloon_split buflisted bufwinid call ch_close ch_getbufnr ch_open ch_sendraw col confirm cscope_connection deletebufline empty executable expand filewritable floor foldclosedend funcref getbufline getcharsearch getcompletion getfperm getjumplist getpid gettabinfo getwinpos glob2regpat hasmapto hlexists index inputsave isdirectory job_getchannel job_stop json_encode line listener_flush luaeval matchadd matchlist mkdir or popup_clear popup_filter_yesno popup_hide popup_settext prompt_setcallback prop_find prop_type_delete py3eval readdir reltimefloat remote_read repeat screenattr screenrow searchpairpos setbufvar setline setreg sha256 sign_getplaced sign_unplace sort sound_stop srand strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setapi term_wait test_garbagecollect_now test_null_blob test_null_list test_override test_settime timer_info timer_stopall trim undotree visualmode windowsversion win_gettype win_id2win winrestcmd win_splitmove writefile
|
||||
syn keyword vimFuncName contained and arglistid assert_equalfile assert_match atan browse bufload bufwinnr ceil ch_close_in ch_getjob ch_read ch_setoptions complete copy cursor did_filetype environ execute expandcmd filter fmod foldlevel function getbufvar getcmdline getcurpos getfsize getline getpos gettabvar getwinposx globpath histadd hlID input inputsecret isinf job_info join keys line2byte listener_remove map matchaddpos matchstr mode pathshorten popup_close popup_findinfo popup_menu popup_show prompt_setinterrupt prop_list prop_type_get pyeval readfile reltimestr remote_send resolve screenchar screenstring searchpos setcharsearch setloclist settabvar shellescape sign_jump sign_unplacelist sound_clear spellbadword state strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled term_list term_setkill test_alloc_fail test_garbagecollect_soon test_null_channel test_null_partial test_refcount test_srand_seed timer_pause tolower trunc uniq wildmenumode win_execute win_gotoid winlayout winrestview win_type xor
|
||||
syn keyword vimFuncName contained append argv assert_exception assert_notequal atan2 browsedir bufloaded byte2line changenr chdir ch_info ch_readblob ch_status complete_add cos debugbreak diff_filler escape exepath extend finddir fnameescape foldtext garbagecollect getchangelist getcmdpos getcwd getftime getloclist getqflist gettabwinvar getwinposy has histdel hostname inputdialog insert islocked job_setoptions js_decode len lispindent localtime maparg matcharg matchstrpos mzeval perleval popup_create popup_findpreview popup_move pow prompt_setprompt prop_remove prop_type_list pyxeval reg_executing remote_expr remote_startserver reverse screenchars search server2client setcmdpos setmatches settabwinvar shiftwidth sign_place simplify soundfold spellsuggest str2float strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_scrape term_setrestore
|
||||
|
||||
"--- syntax here and above generated by mkvimvim ---
|
||||
" Special Vim Highlighting (not automatic) {{{1
|
||||
@@ -241,9 +241,9 @@ syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,
|
||||
syn match vimFunction "\<\(fu\%[nction]\|def\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\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
|
||||
syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList
|
||||
else
|
||||
syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList
|
||||
syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList
|
||||
endif
|
||||
syn match vimFuncVar contained "a:\(\K\k*\|\d\+\)"
|
||||
syn match vimFuncSID contained "\c<sid>\|\<s:"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2018-07-13
|
||||
" Latest Revision: 2020-01-23
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-zsh
|
||||
|
||||
@@ -13,11 +13,30 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if v:version > 704 || (v:version == 704 && has("patch1142"))
|
||||
syn iskeyword @,48-57,_,192-255,#,-
|
||||
else
|
||||
setlocal iskeyword+=-
|
||||
endif
|
||||
function! s:ContainedGroup()
|
||||
" needs 7.4.2008 for execute() function
|
||||
let result='TOP'
|
||||
" vim-pandoc syntax defines the @langname cluster for embedded syntax languages
|
||||
" However, if no syntax is defined yet, `syn list @zsh` will return
|
||||
" "No syntax items defined", so make sure the result is actually a valid syn cluster
|
||||
for cluster in ['markdownHighlightzsh', 'zsh']
|
||||
try
|
||||
" markdown syntax defines embedded clusters as @markdownhighlight<lang>,
|
||||
" pandoc just uses @<lang>, so check both for both clusters
|
||||
let a=split(execute('syn list @'. cluster), "\n")
|
||||
if len(a) == 2 && a[0] =~# '^---' && a[1] =~? cluster
|
||||
return '@'. cluster
|
||||
endif
|
||||
catch /E392/
|
||||
" ignore
|
||||
endtry
|
||||
endfor
|
||||
return result
|
||||
endfunction
|
||||
|
||||
let s:contained=s:ContainedGroup()
|
||||
|
||||
syn iskeyword @,48-57,_,192-255,#,-
|
||||
if get(g:, 'zsh_fold_enable', 0)
|
||||
setlocal foldmethod=syntax
|
||||
endif
|
||||
@@ -32,13 +51,16 @@ syn region zshComment start='^\s*#' end='^\%(\s*#\)\@!'
|
||||
|
||||
syn match zshPreProc '^\%1l#\%(!\|compdef\|autoload\).*$'
|
||||
|
||||
syn match zshPOSIXQuoted '\\[xX][0-9a-fA-F]\{1,2}'
|
||||
syn match zshPOSIXQuoted '\\[0-7]\{1,3}'
|
||||
syn match zshPOSIXQuoted '\\u[0-9a-fA-F]\{1,4}'
|
||||
syn match zshPOSIXQuoted '\\U[1-9a-fA-F]\{1,8}'
|
||||
syn match zshQuoted '\\.'
|
||||
syn region zshString matchgroup=zshStringDelimiter start=+"+ end=+"+
|
||||
\ contains=zshQuoted,@zshDerefs,@zshSubst fold
|
||||
syn region zshString matchgroup=zshStringDelimiter start=+'+ end=+'+ fold
|
||||
" XXX: This should probably be more precise, but Zsh seems a bit confused about it itself
|
||||
syn region zshPOSIXString matchgroup=zshStringDelimiter start=+\$'+
|
||||
\ end=+'+ contains=zshQuoted
|
||||
\ skip=+\\[\\']+ end=+'+ contains=zshPOSIXQuoted,zshQuoted
|
||||
syn match zshJobSpec '%\(\d\+\|?\=\w\+\|[%+-]\)'
|
||||
|
||||
syn keyword zshPrecommand noglob nocorrect exec command builtin - time
|
||||
@@ -342,22 +364,22 @@ syn match zshNumber '[+-]\=\d\+\.\d\+\>'
|
||||
|
||||
" TODO: $[...] is the same as $((...)), so add that as well.
|
||||
syn cluster zshSubst contains=zshSubst,zshOldSubst,zshMathSubst
|
||||
syn region zshSubst matchgroup=zshSubstDelim transparent
|
||||
\ start='\$(' skip='\\)' end=')' contains=TOP fold
|
||||
exe 'syn region zshSubst matchgroup=zshSubstDelim transparent start=/\$(/ skip=/\\)/ end=/)/ contains='.s:contained. ' fold'
|
||||
syn region zshParentheses transparent start='(' skip='\\)' end=')' fold
|
||||
syn region zshGlob start='(#' end=')'
|
||||
syn region zshMathSubst matchgroup=zshSubstDelim transparent
|
||||
\ start='\$((' skip='\\)' end='))'
|
||||
\ contains=zshParentheses,@zshSubst,zshNumber,
|
||||
\ @zshDerefs,zshString keepend fold
|
||||
syn region zshBrackets contained transparent start='{' skip='\\}'
|
||||
" The ms=s+1 prevents matching zshBrackets several times on opening brackets
|
||||
" (see https://github.com/chrisbra/vim-zsh/issues/21#issuecomment-576330348)
|
||||
syn region zshBrackets contained transparent start='{'ms=s+1 skip='\\}'
|
||||
\ end='}' fold
|
||||
syn region zshBrackets transparent start='{' skip='\\}'
|
||||
\ end='}' contains=TOP fold
|
||||
exe 'syn region zshBrackets transparent start=/{/ms=s+1 skip=/\\}/ end=/}/ contains='.s:contained. ' fold'
|
||||
|
||||
syn region zshSubst matchgroup=zshSubstDelim start='\${' skip='\\}'
|
||||
\ end='}' contains=@zshSubst,zshBrackets,zshQuoted,zshString fold
|
||||
syn region zshOldSubst matchgroup=zshSubstDelim start=+`+ skip=+\\`+
|
||||
\ end=+`+ contains=TOP,zshOldSubst fold
|
||||
exe 'syn region zshOldSubst matchgroup=zshSubstDelim start=/`/ skip=/\\[\\`]/ end=/`/ contains='.s:contained. ',zshOldSubst fold'
|
||||
|
||||
syn sync minlines=50 maxlines=90
|
||||
syn sync match zshHereDocSync grouphere NONE '<<-\=\s*\%(\\\=\S\+\|\(["']\)\S\+\1\)'
|
||||
@@ -367,6 +389,7 @@ hi def link zshTodo Todo
|
||||
hi def link zshComment Comment
|
||||
hi def link zshPreProc PreProc
|
||||
hi def link zshQuoted SpecialChar
|
||||
hi def link zshPOSIXQuoted SpecialChar
|
||||
hi def link zshString String
|
||||
hi def link zshStringDelimiter zshString
|
||||
hi def link zshPOSIXString zshString
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
enough of the commands that you will be able to easily use Vim as
|
||||
an all-purpose editor.
|
||||
|
||||
The approximate time required to complete the tutor is 25-30 minutes,
|
||||
The approximate time required to complete the tutor is 30 minutes,
|
||||
depending upon how much time is spent with experimentation.
|
||||
|
||||
ATTENTION:
|
||||
|
||||
@@ -131,8 +131,8 @@ NOTA: Enquanto segue este tutorial, n
|
||||
|
||||
---> H<> algum texto faltando nes
|
||||
H<> algum texto faltando nesta linha.
|
||||
H<> algum texto faltan
|
||||
---> H<> algum texto faltando aqui.
|
||||
---> H<> algum texto faltan
|
||||
H<> algum texto faltando aqui.
|
||||
|
||||
5. Quando se sentir confort<72>vel adicionando texto, v<> para a Li<4C><69>o 1.6.
|
||||
|
||||
|
||||
@@ -131,8 +131,8 @@ NOTA: Enquanto segue este tutorial, não tente memorizar, aprenda pelo uso.
|
||||
|
||||
---> Há algum texto faltando nes
|
||||
Há algum texto faltando nesta linha.
|
||||
Há algum texto faltan
|
||||
---> Há algum texto faltando aqui.
|
||||
---> Há algum texto faltan
|
||||
Há algum texto faltando aqui.
|
||||
|
||||
5. Quando se sentir confortável adicionando texto, vá para a Lição 1.6.
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
enough of the commands that you will be able to easily use Vim as
|
||||
an all-purpose editor.
|
||||
|
||||
The approximate time required to complete the tutor is 25-30 minutes,
|
||||
The approximate time required to complete the tutor is 30 minutes,
|
||||
depending upon how much time is spent with experimentation.
|
||||
|
||||
ATTENTION:
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
" for Unix: ~/.vimrc
|
||||
" for Amiga: s:.vimrc
|
||||
" for MS-Windows: $VIM\_vimrc
|
||||
" for Haiku: ~/config/settings/vim/vimrc
|
||||
" for OpenVMS: sys$login:.vimrc
|
||||
|
||||
" When started as "evim", evim.vim will already have done these settings, bail
|
||||
|
||||
@@ -16,7 +16,7 @@ See INSTALLvms.txt for VMS
|
||||
See INSTALLx.txt for cross-compiling on Unix
|
||||
See ../READMEdir/README_390.txt for z/OS and OS/390 Unix
|
||||
See ../runtime/doc/os_beos.txt for BeBox
|
||||
|
||||
See ../runtime/doc/os_haiku.txt for Haiku
|
||||
|
||||
1. Generic
|
||||
==========
|
||||
|
||||
@@ -710,6 +710,8 @@ OBJ = \
|
||||
$(OUTDIR)/change.o \
|
||||
$(OUTDIR)/charset.o \
|
||||
$(OUTDIR)/cindent.o \
|
||||
$(OUTDIR)/clientserver.o \
|
||||
$(OUTDIR)/clipboard.o \
|
||||
$(OUTDIR)/cmdexpand.o \
|
||||
$(OUTDIR)/cmdhist.o \
|
||||
$(OUTDIR)/crypt.o \
|
||||
@@ -848,7 +850,7 @@ endif
|
||||
|
||||
ifeq ($(CHANNEL),yes)
|
||||
OBJ += $(OUTDIR)/channel.o
|
||||
LIB += -lwsock32
|
||||
LIB += -lwsock32 -lws2_32
|
||||
endif
|
||||
|
||||
ifeq ($(DIRECTX),yes)
|
||||
|
||||
@@ -33,6 +33,8 @@ SRC = arabic.c \
|
||||
change.c \
|
||||
charset.c \
|
||||
cindent.c \
|
||||
clientserver.c \
|
||||
clipboard.c \
|
||||
cmdexpand.c \
|
||||
cmdhist.c \
|
||||
crypt.c \
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
# is yes)
|
||||
# Global IME support: GIME=yes (requires GUI=yes)
|
||||
#
|
||||
# Terminal support: TERMINAL=yes (default is yes)
|
||||
# Terminal support: TERMINAL=yes (default is yes if FEATURES is HUGE)
|
||||
# Will also enable CHANNEL
|
||||
#
|
||||
# Sound support: SOUND=yes (default is yes)
|
||||
#
|
||||
@@ -109,13 +110,13 @@
|
||||
# PostScript printing: POSTSCRIPT=yes (default is no)
|
||||
#
|
||||
# Netbeans Support: NETBEANS=[yes or no] (default is yes if GUI is yes)
|
||||
# Requires CHANNEL.
|
||||
# Requires CHANNEL.
|
||||
#
|
||||
# Netbeans Debugging Support: NBDEBUG=[yes or no] (should be no, yes
|
||||
# doesn't work)
|
||||
#
|
||||
# Inter process communication: CHANNEL=[yes or no] (default is yes if GUI
|
||||
# is yes)
|
||||
# is yes or TERMINAL is yes)
|
||||
#
|
||||
# XPM Image Support: XPM=[path to XPM directory]
|
||||
# Default is "xpm", using the files included in the distribution.
|
||||
@@ -388,7 +389,7 @@ NETBEANS = $(GUI)
|
||||
!endif
|
||||
|
||||
!ifndef CHANNEL
|
||||
! if "$(FEATURES)"=="HUGE"
|
||||
! if "$(FEATURES)"=="HUGE" || "$(TERMINAL)"=="yes"
|
||||
CHANNEL = yes
|
||||
! else
|
||||
CHANNEL = $(GUI)
|
||||
@@ -468,7 +469,7 @@ CHANNEL_PRO = proto/channel.pro
|
||||
CHANNEL_OBJ = $(OBJDIR)/channel.obj
|
||||
CHANNEL_DEFS = -DFEAT_JOB_CHANNEL
|
||||
|
||||
NETBEANS_LIB = WSock32.lib
|
||||
NETBEANS_LIB = WSock32.lib Ws2_32.lib
|
||||
!endif
|
||||
|
||||
# Set which version of the CRT to use
|
||||
@@ -663,9 +664,6 @@ OPTFLAG = /Ox
|
||||
! if "$(OPTIMIZE)" != "SPACE"
|
||||
OPTFLAG = $(OPTFLAG) /GL
|
||||
! endif
|
||||
# Visual Studio 2005 has 'deprecated' many of the standard CRT functions
|
||||
CFLAGS_DEPR = /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
|
||||
CFLAGS = $(CFLAGS) $(CFLAGS_DEPR)
|
||||
! endif
|
||||
|
||||
# (/Wp64 is deprecated in VC9 and generates an obnoxious warning.)
|
||||
@@ -707,6 +705,12 @@ CFLAGS = $(CFLAGS) /Zl /MTd
|
||||
! endif
|
||||
!endif # DEBUG
|
||||
|
||||
!if $(MSVC_MAJOR) >= 8
|
||||
# Visual Studio 2005 has 'deprecated' many of the standard CRT functions
|
||||
CFLAGS_DEPR = /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
|
||||
CFLAGS = $(CFLAGS) $(CFLAGS_DEPR)
|
||||
!endif
|
||||
|
||||
!include Make_all.mak
|
||||
!include testdir\Make_all.mak
|
||||
|
||||
@@ -726,6 +730,8 @@ OBJ = \
|
||||
$(OUTDIR)\change.obj \
|
||||
$(OUTDIR)\charset.obj \
|
||||
$(OUTDIR)\cindent.obj \
|
||||
$(OUTDIR)\clientserver.obj \
|
||||
$(OUTDIR)\clipboard.obj \
|
||||
$(OUTDIR)\cmdexpand.obj \
|
||||
$(OUTDIR)\cmdhist.obj \
|
||||
$(OUTDIR)\crypt.obj \
|
||||
@@ -1511,6 +1517,10 @@ $(OUTDIR)/charset.obj: $(OUTDIR) charset.c $(INCL)
|
||||
|
||||
$(OUTDIR)/cindent.obj: $(OUTDIR) cindent.c $(INCL)
|
||||
|
||||
$(OUTDIR)/clientserver.obj: $(OUTDIR) clientserver.c $(INCL)
|
||||
|
||||
$(OUTDIR)/clipboard.obj: $(OUTDIR) clipboard.c $(INCL)
|
||||
|
||||
$(OUTDIR)/cmdexpand.obj: $(OUTDIR) cmdexpand.c $(INCL)
|
||||
|
||||
$(OUTDIR)/cmdhist.obj: $(OUTDIR) cmdhist.c $(INCL)
|
||||
@@ -1858,6 +1868,8 @@ proto.h: \
|
||||
proto/change.pro \
|
||||
proto/charset.pro \
|
||||
proto/cindent.pro \
|
||||
proto/clientserver.pro \
|
||||
proto/clipboard.pro \
|
||||
proto/cmdexpand.pro \
|
||||
proto/cmdhist.pro \
|
||||
proto/crypt.pro \
|
||||
|
||||
@@ -306,6 +306,8 @@ SRC = \
|
||||
change.c \
|
||||
charset.c \
|
||||
cindent.c \
|
||||
clientserver.c \
|
||||
clipboard.c \
|
||||
cmdexpand.c \
|
||||
cmdhist.c \
|
||||
crypt.c \
|
||||
@@ -412,6 +414,8 @@ OBJ = \
|
||||
change.obj \
|
||||
charset.obj \
|
||||
cindent.obj \
|
||||
clientserver.obj \
|
||||
clipboard.obj \
|
||||
cmdexpand.obj \
|
||||
cmdhist.obj \
|
||||
crypt.obj \
|
||||
@@ -700,6 +704,14 @@ cindent.obj : cindent.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
globals.h
|
||||
clientserver.obj : clientserver.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
globals.h
|
||||
clipboard.obj : clipboard.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
globals.h
|
||||
cmdexpand.obj : cmdexpand.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
|
||||
102
src/Makefile
102
src/Makefile
@@ -691,9 +691,12 @@ LINT_OPTIONS = -beprxzF
|
||||
|
||||
|
||||
# Uncomment one of the next two lines to compile Vim with the
|
||||
# address sanitizer or with the undefined sanitizer. Works with gcc and
|
||||
# address sanitizer (asan) or with the undefined sanitizer. Works with gcc and
|
||||
# clang. May make Vim twice as slow. Errors reported on stderr.
|
||||
# More at: https://code.google.com/p/address-sanitizer/
|
||||
# Useful environment variables:
|
||||
# $ export ASAN_OPTIONS="print_stacktrace=1 log_path=asan"
|
||||
# $ export LSAN_OPTIONS="suppressions=$cwd/testdir/lsan-suppress.txt"
|
||||
#SANITIZER_CFLAGS = -g -O0 -fsanitize=address -fno-omit-frame-pointer
|
||||
#SANITIZER_CFLAGS = -g -O0 -fsanitize=undefined -fno-omit-frame-pointer
|
||||
SANITIZER_LIBS = $(SANITIZER_CFLAGS)
|
||||
@@ -1385,6 +1388,20 @@ CARBONGUI_BUNDLE = gui_bundle
|
||||
APPDIR = $(VIMNAME).app
|
||||
CARBONGUI_TESTARG = VIMPROG=../$(APPDIR)/Contents/MacOS/$(VIMTARGET)
|
||||
|
||||
### Haiku GUI
|
||||
HAIKUGUI_SRC = gui.c gui_haiku.cc
|
||||
HAIKUGUI_OBJ = objects/gui.o objects/gui_haiku.o
|
||||
HAIKUGUI_DEFS = -DFEAT_GUI_HAIKU
|
||||
HAIKUGUI_IPATH =
|
||||
HAIKUGUI_LIBS_DIR =
|
||||
HAIKUGUI_LIBS1 = -lbe -lroot -ltracker -ltranslation -lsupc++ -lstdc++
|
||||
HAIKUGUI_LIBS2 =
|
||||
HAIKUGUI_INSTALL = install_normal install_haiku_extra
|
||||
HAIKUGUI_TARGETS = installglinks_haiku
|
||||
HAIKUGUI_MAN_TARGETS =
|
||||
HAIKUGUI_TESTTARGET = gui
|
||||
HAIKUGUI_BUNDLE =
|
||||
|
||||
# All GUI files
|
||||
ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c
|
||||
ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w32.pro gui_photon.pro
|
||||
@@ -1585,6 +1602,8 @@ BASIC_SRC = \
|
||||
change.c \
|
||||
charset.c \
|
||||
cindent.c \
|
||||
clientserver.c \
|
||||
clipboard.c \
|
||||
cmdexpand.c \
|
||||
cmdhist.c \
|
||||
crypt.c \
|
||||
@@ -1729,6 +1748,8 @@ OBJ_COMMON = \
|
||||
objects/blob.o \
|
||||
objects/blowfish.o \
|
||||
objects/cindent.o \
|
||||
objects/clientserver.o \
|
||||
objects/clipboard.o \
|
||||
objects/cmdexpand.o \
|
||||
objects/cmdhist.o \
|
||||
objects/crypt.o \
|
||||
@@ -1889,6 +1910,8 @@ PRO_AUTO = \
|
||||
channel.pro \
|
||||
charset.pro \
|
||||
cindent.pro \
|
||||
clientserver.pro \
|
||||
clipboard.pro \
|
||||
cmdexpand.pro \
|
||||
cmdhist.pro \
|
||||
crypt.pro \
|
||||
@@ -2278,7 +2301,7 @@ test1 \
|
||||
# export TEST_FILTER=Test_terminal_wipe_buffer
|
||||
# A partial match also works:
|
||||
# export TEST_FILTER=wipe_buffer
|
||||
$(NEW_TESTS):
|
||||
$(NEW_TESTS) test_vim9:
|
||||
cd testdir; $(MAKE) $@ VIMPROG=../$(VIMTESTTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
|
||||
|
||||
newtests:
|
||||
@@ -3103,6 +3126,12 @@ objects/charset.o: charset.c
|
||||
objects/cindent.o: cindent.c
|
||||
$(CCC) -o $@ cindent.c
|
||||
|
||||
objects/clientserver.o: clientserver.c
|
||||
$(CCC) -o $@ clientserver.c
|
||||
|
||||
objects/clipboard.o: clipboard.c
|
||||
$(CCC) -o $@ clipboard.c
|
||||
|
||||
objects/cmdexpand.o: cmdexpand.c
|
||||
$(CCC) -o $@ cmdexpand.c
|
||||
|
||||
@@ -3217,6 +3246,9 @@ objects/gui_gtk_gresources.o: auto/gui_gtk_gresources.c
|
||||
objects/gui_gtk_x11.o: gui_gtk_x11.c
|
||||
$(CCC) -o $@ gui_gtk_x11.c
|
||||
|
||||
objects/gui_haiku.o: gui_haiku.cc
|
||||
$(CCC) -o $@ gui_haiku.cc
|
||||
|
||||
objects/gui_motif.o: gui_motif.c
|
||||
$(CCC) -o $@ gui_motif.c
|
||||
|
||||
@@ -3349,6 +3381,9 @@ objects/os_beos.o: os_beos.c
|
||||
objects/os_qnx.o: os_qnx.c
|
||||
$(CCC) -o $@ os_qnx.c
|
||||
|
||||
objects/os_haiku.rsrc: os_haiku.rdef
|
||||
cat $< | $(CCC) -E - | grep -v '^#' | rc -o "$@" -
|
||||
|
||||
objects/os_macosx.o: os_macosx.m
|
||||
$(CCC) -o $@ os_macosx.m
|
||||
|
||||
@@ -3616,6 +3651,61 @@ $(APPDIR)/Contents:
|
||||
# Dependencies that "make depend" doesn't find
|
||||
objects/gui_gtk_x11.o: version.h
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Haiku installation
|
||||
#
|
||||
# This rule:
|
||||
# - add resources to already installed vim binary to avoid
|
||||
# stripping them during install;
|
||||
# - copy rgb.txt to runtime directory;
|
||||
# - update system MIME database with info about vim application.
|
||||
#
|
||||
install_haiku_extra: $(DEST_BIN)/$(VIMTARGET) objects/os_haiku.rsrc
|
||||
xres -o $(DEST_BIN)/$(VIMTARGET) objects/os_haiku.rsrc
|
||||
$(INSTALL_DATA) $(SCRIPTSOURCE)/rgb.txt $(DEST_RT)
|
||||
mimeset $(DEST_BIN)/$(VIMTARGET)
|
||||
|
||||
# List of g*-links that should be replaced with shell script equivalents.
|
||||
# This solves the problem of them from Tracker.
|
||||
#
|
||||
HAIKU_GLINKS = $(DEST_BIN)/$(GVIMTARGET) \
|
||||
$(DEST_BIN)/$(GVIEWTARGET) \
|
||||
$(DEST_BIN)/$(GVIMDIFFTARGET) \
|
||||
$(DEST_BIN)/$(RGVIMTARGET) \
|
||||
$(DEST_BIN)/$(RGVIEWTARGET)
|
||||
|
||||
# This rule:
|
||||
# - Replace gvim link with copy of vim binary.
|
||||
# - Replace g*-links with shell script equivalents to solve the
|
||||
# problem of calling them from Tracker,
|
||||
# - Add icon resources to mentioned g*-link shell scripts
|
||||
# - in case gui-less vim.con executable available use it.
|
||||
#
|
||||
installglinks_haiku: $(HAIKU_GLINKS) install_haiku_extra
|
||||
@catattr -r "BEOS:ICON" $(DEST_BIN)/$(GVIMTARGET) > ~icon.attr
|
||||
for i in $(HAIKU_GLINKS); do \
|
||||
rm $$i ; \
|
||||
echo "#!/bin/sh" > $$i ; \
|
||||
case $$i in \
|
||||
$(DEST_BIN)/$(GVIMTARGET)) \
|
||||
cp $(DEST_BIN)/$(VIMTARGET) $$i ; \
|
||||
if [ -f $(VIMTARGET).con ] ; then \
|
||||
$(STRIP) $(VIMTARGET).con ; \
|
||||
mv $(VIMTARGET).con $(DEST_BIN)/$(VIMTARGET) ; \
|
||||
fi ;; \
|
||||
$(DEST_BIN)/$(GVIEWTARGET)) printf "%s -R %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \
|
||||
$(DEST_BIN)/$(GVIMDIFFTARGET)) printf "%s -d %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \
|
||||
$(DEST_BIN)/$(RGVIMTARGET)) printf "%s -Z %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \
|
||||
$(DEST_BIN)/$(RGVIEWTARGET)) printf "%s -Z -R %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \
|
||||
*) printf "%s %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \
|
||||
esac ; \
|
||||
chmod $(BINMOD) $$i ; \
|
||||
addattr -f ~icon.attr -t \'VICN\' BEOS:ICON $$i ; \
|
||||
done
|
||||
addattr -f ~icon.attr -t \'VICN\' BEOS:ICON $(DEST_BIN)/$(VIMNAME)tutor
|
||||
@rm ~icon.attr
|
||||
|
||||
###############################################################################
|
||||
### (automatically generated by 'make depend')
|
||||
### Dependencies:
|
||||
@@ -3659,6 +3749,14 @@ objects/cindent.o: cindent.c vim.h protodef.h auto/config.h feature.h os_unix.h
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h
|
||||
objects/clientserver.o: clientserver.c vim.h protodef.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h
|
||||
objects/clipboard.o: clipboard.c vim.h protodef.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h
|
||||
objects/cmdexpand.o: cmdexpand.c vim.h protodef.h auto/config.h feature.h \
|
||||
os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
|
||||
@@ -30,6 +30,8 @@ buffer.c | manipulating buffers (loaded files)
|
||||
bufwrite.c | writing a buffer to file
|
||||
change.c | handling changes to text
|
||||
cindent.c | C and Lisp indentation
|
||||
clientserver.c | client server functionality
|
||||
clipboard.c | handling the clipboard
|
||||
cmdexpand.c | command-line completion
|
||||
cmdhist.c | command-line history
|
||||
debugger.c | vim script debugger
|
||||
|
||||
@@ -1046,7 +1046,7 @@ do_arg_all(
|
||||
// Move the already present window to below the current window
|
||||
if (curwin->w_arg_idx != i)
|
||||
{
|
||||
for (wpnext = firstwin; wpnext != NULL; wpnext = wpnext->w_next)
|
||||
FOR_ALL_WINDOWS(wpnext)
|
||||
{
|
||||
if (wpnext->w_arg_idx == i)
|
||||
{
|
||||
|
||||
163
src/auto/configure
vendored
163
src/auto/configure
vendored
@@ -1501,7 +1501,7 @@ Optional Features:
|
||||
--disable-farsi Deprecated.
|
||||
--enable-xim Include XIM input support.
|
||||
--enable-fontset Include X fontset output support.
|
||||
--enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/photon/carbon
|
||||
--enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/haiku/photon/carbon
|
||||
--enable-gtk2-check If auto-select GUI, check for GTK+ 2 default=yes
|
||||
--enable-gnome-check If GTK GUI, check for GNOME default=no
|
||||
--enable-gtk3-check If auto-select GUI, check for GTK+ 3 default=yes
|
||||
@@ -4543,6 +4543,15 @@ $as_echo "yes" >&6; };;
|
||||
$as_echo "no" >&6; };;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Haiku" >&5
|
||||
$as_echo_n "checking for Haiku... " >&6; }
|
||||
case `uname` in
|
||||
Haiku) HAIKU=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; };;
|
||||
*) HAIKU=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; };;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5
|
||||
$as_echo_n "checking for QNX... " >&6; }
|
||||
case `uname` in
|
||||
@@ -7714,7 +7723,54 @@ $as_echo "yes" >&6; }
|
||||
fi
|
||||
|
||||
if test "$enable_channel" = "yes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
|
||||
if test "x$HAIKU" = "xyes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
|
||||
$as_echo_n "checking for socket in -lnetwork... " >&6; }
|
||||
if ${ac_cv_lib_network_socket+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lnetwork $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char socket ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return socket ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_network_socket=yes
|
||||
else
|
||||
ac_cv_lib_network_socket=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
|
||||
$as_echo "$ac_cv_lib_network_socket" >&6; }
|
||||
if test "x$ac_cv_lib_network_socket" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBNETWORK 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lnetwork $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
|
||||
$as_echo_n "checking for socket in -lsocket... " >&6; }
|
||||
if ${ac_cv_lib_socket_socket+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@@ -7759,7 +7815,65 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv6 networking is possible" >&5
|
||||
$as_echo_n "checking whether compiling with IPv6 networking is possible... " >&6; }
|
||||
if ${vim_cv_ipv6_networking+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
/* Check bitfields */
|
||||
struct nbbuf {
|
||||
unsigned int initDone:1;
|
||||
unsigned short signmaplen;
|
||||
};
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
/* Check creating a socket. */
|
||||
struct sockaddr_in server;
|
||||
struct addrinfo *res;
|
||||
(void)socket(AF_INET, SOCK_STREAM, 0);
|
||||
(void)htons(100);
|
||||
(void)getaddrinfo("microsoft.com", NULL, NULL, &res);
|
||||
if (errno == ECONNREFUSED)
|
||||
(void)connect(1, (struct sockaddr *)&server, sizeof(server));
|
||||
(void)freeaddrinfo(res);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
vim_cv_ipv6_networking="yes"
|
||||
else
|
||||
vim_cv_ipv6_networking="no"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv6_networking" >&5
|
||||
$as_echo "$vim_cv_ipv6_networking" >&6; }
|
||||
|
||||
if test "x$vim_cv_ipv6_networking" = "xyes"; then
|
||||
$as_echo "#define FEAT_IPV6 1" >>confdefs.h
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
|
||||
$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
|
||||
if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@@ -7804,8 +7918,11 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling with process communication is possible" >&5
|
||||
$as_echo_n "checking whether compiling with process communication is possible... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv4 networking is possible" >&5
|
||||
$as_echo_n "checking whether compiling with IPv4 networking is possible... " >&6; }
|
||||
if ${vim_cv_ipv4_networking+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
@@ -7841,15 +7958,17 @@ main ()
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
vim_cv_ipv4_networking="yes"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }; enable_netbeans="no"; enable_channel="no"
|
||||
vim_cv_ipv4_networking="no"; enable_netbeans="no"; enable_channel="no"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv4_networking" >&5
|
||||
$as_echo "$vim_cv_ipv4_networking" >&6; }
|
||||
fi
|
||||
fi
|
||||
if test "$enable_netbeans" = "yes"; then
|
||||
$as_echo "#define FEAT_NETBEANS_INTG 1" >>confdefs.h
|
||||
|
||||
@@ -9034,7 +9153,7 @@ if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
|
||||
as_fn_error $? "could not configure X" "$LINENO" 5
|
||||
fi
|
||||
|
||||
test "x$with_x" = xno -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
|
||||
test "x$with_x" = xno -a "x$HAIKU" != "xyes" -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
|
||||
$as_echo_n "checking --enable-gui argument... " >&6; }
|
||||
@@ -9056,10 +9175,27 @@ SKIP_MOTIF=YES
|
||||
SKIP_ATHENA=YES
|
||||
SKIP_NEXTAW=YES
|
||||
SKIP_PHOTON=YES
|
||||
SKIP_HAIKU=YES
|
||||
SKIP_CARBON=YES
|
||||
GUITYPE=NONE
|
||||
|
||||
if test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
|
||||
if test "x$HAIKU" = "xyes"; then
|
||||
SKIP_HAIKU=
|
||||
case "$enable_gui_canon" in
|
||||
no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
|
||||
$as_echo "no GUI support" >&6; }
|
||||
SKIP_HAIKU=YES ;;
|
||||
yes|"") { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
|
||||
$as_echo "yes - automatic GUI support" >&6; } ;;
|
||||
auto) { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5
|
||||
$as_echo "auto - automatic GUI support" >&6; } ;;
|
||||
haiku) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Haiku GUI support" >&5
|
||||
$as_echo "Haiku GUI support" >&6; } ;;
|
||||
*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
|
||||
$as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
|
||||
SKIP_HAIKU=YES ;;
|
||||
esac
|
||||
elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
|
||||
SKIP_PHOTON=
|
||||
case "$enable_gui_canon" in
|
||||
no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
|
||||
@@ -9283,6 +9419,7 @@ $as_echo "yes" >&6; };
|
||||
SKIP_ATHENA=YES;
|
||||
SKIP_NEXTAW=YES;
|
||||
SKIP_PHOTON=YES;
|
||||
SKIP_HAIKU=YES;
|
||||
SKIP_CARBON=YES
|
||||
fi
|
||||
|
||||
@@ -10589,6 +10726,10 @@ $as_echo "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
|
||||
enable_fontset="no"
|
||||
fi
|
||||
|
||||
if test -z "$SKIP_HAIKU"; then
|
||||
GUITYPE=HAIKUGUI
|
||||
fi
|
||||
|
||||
if test -z "$SKIP_PHOTON"; then
|
||||
GUITYPE=PHOTONGUI
|
||||
fi
|
||||
|
||||
@@ -235,6 +235,10 @@ struct AutoPatCmd_S
|
||||
|
||||
static AutoPatCmd *active_apc_list = NULL; // stack of active autocommands
|
||||
|
||||
// Macro to loop over all the patterns for an autocmd event
|
||||
#define FOR_ALL_AUTOCMD_PATTERNS(event, ap) \
|
||||
for ((ap) = first_autopat[(int)(event)]; (ap) != NULL; (ap) = (ap)->next)
|
||||
|
||||
/*
|
||||
* augroups stores a list of autocmd group names.
|
||||
*/
|
||||
@@ -456,7 +460,7 @@ aubuflocal_remove(buf_T *buf)
|
||||
for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
|
||||
event = (event_T)((int)event + 1))
|
||||
// loop over all autocommand patterns
|
||||
for (ap = first_autopat[(int)event]; ap != NULL; ap = ap->next)
|
||||
FOR_ALL_AUTOCMD_PATTERNS(event, ap)
|
||||
if (ap->buflocal_nr == buf->b_fnum)
|
||||
{
|
||||
au_remove_pat(ap);
|
||||
@@ -519,7 +523,7 @@ au_del_group(char_u *name)
|
||||
for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
|
||||
event = (event_T)((int)event + 1))
|
||||
{
|
||||
for (ap = first_autopat[(int)event]; ap != NULL; ap = ap->next)
|
||||
FOR_ALL_AUTOCMD_PATTERNS(event, ap)
|
||||
if (ap->group == i && ap->pat != NULL)
|
||||
{
|
||||
give_warning((char_u *)_("W19: Deleting augroup that is still in use"), TRUE);
|
||||
@@ -1041,7 +1045,7 @@ do_autocmd_event(
|
||||
*/
|
||||
if (*pat == NUL)
|
||||
{
|
||||
for (ap = first_autopat[(int)event]; ap != NULL; ap = ap->next)
|
||||
FOR_ALL_AUTOCMD_PATTERNS(event, ap)
|
||||
{
|
||||
if (forceit) // delete the AutoPat, if it's in the current group
|
||||
{
|
||||
@@ -2400,7 +2404,7 @@ has_autocmd(event_T event, char_u *sfname, buf_T *buf)
|
||||
forward_slash(fname);
|
||||
#endif
|
||||
|
||||
for (ap = first_autopat[(int)event]; ap != NULL; ap = ap->next)
|
||||
FOR_ALL_AUTOCMD_PATTERNS(event, ap)
|
||||
if (ap->pat != NULL && ap->cmds != NULL
|
||||
&& (ap->buflocal_nr == 0
|
||||
? match_file_pat(NULL, &ap->reg_prog,
|
||||
|
||||
@@ -110,6 +110,8 @@ find_word_under_cursor(
|
||||
lbuf = vim_strnsave(lbuf, len);
|
||||
}
|
||||
}
|
||||
else
|
||||
scol = col;
|
||||
|
||||
if (winp != NULL)
|
||||
*winp = wp;
|
||||
|
||||
@@ -514,7 +514,7 @@ bf_self_test(void)
|
||||
UINT32_T ui = 0xffffffffUL;
|
||||
bf_state_T state;
|
||||
|
||||
vim_memset(&state, 0, sizeof(bf_state_T));
|
||||
CLEAR_FIELD(state);
|
||||
state.cfb_len = BF_MAX_CFB_LEN;
|
||||
|
||||
// We can't simply use sizeof(UINT32_T), it would generate a compiler
|
||||
|
||||
28
src/buffer.c
28
src/buffer.c
@@ -52,6 +52,9 @@ static void clear_wininfo(buf_T *buf);
|
||||
# define dev_T unsigned
|
||||
#endif
|
||||
|
||||
#define FOR_ALL_BUFS_FROM_LAST(buf) \
|
||||
for ((buf) = lastbuf; (buf) != NULL; (buf) = (buf)->b_prev)
|
||||
|
||||
#if defined(FEAT_QUICKFIX)
|
||||
static char *msg_loclist = N_("[Location List]");
|
||||
static char *msg_qflist = N_("[Quickfix List]");
|
||||
@@ -415,7 +418,7 @@ buf_valid(buf_T *buf)
|
||||
|
||||
// Assume that we more often have a recent buffer, start with the last
|
||||
// one.
|
||||
for (bp = lastbuf; bp != NULL; bp = bp->b_prev)
|
||||
FOR_ALL_BUFS_FROM_LAST(bp)
|
||||
if (bp == buf)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
@@ -508,6 +511,7 @@ close_buffer(
|
||||
int wipe_buf = (action == DOBUF_WIPE || action == DOBUF_WIPE_REUSE);
|
||||
int del_buf = (action == DOBUF_DEL || wipe_buf);
|
||||
|
||||
CHECK_CURBUF;
|
||||
/*
|
||||
* Force unloading or deleting when 'bufhidden' says so.
|
||||
* The caller must take care of NOT deleting/freeing when 'bufhidden' is
|
||||
@@ -530,6 +534,7 @@ close_buffer(
|
||||
#ifdef FEAT_TERMINAL
|
||||
if (bt_terminal(buf) && (buf->b_nwindows == 1 || del_buf))
|
||||
{
|
||||
CHECK_CURBUF;
|
||||
if (term_job_running(buf->b_term))
|
||||
{
|
||||
if (wipe_buf || unload_buf)
|
||||
@@ -554,6 +559,7 @@ close_buffer(
|
||||
unload_buf = TRUE;
|
||||
wipe_buf = TRUE;
|
||||
}
|
||||
CHECK_CURBUF;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -743,6 +749,7 @@ aucmd_abort:
|
||||
if (del_buf)
|
||||
buf->b_p_bl = FALSE;
|
||||
}
|
||||
// NOTE: at this point "curbuf" may be invalid!
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -933,7 +940,11 @@ free_buffer(buf_T *buf)
|
||||
au_pending_free_buf = buf;
|
||||
}
|
||||
else
|
||||
{
|
||||
vim_free(buf);
|
||||
if (curbuf == buf)
|
||||
curbuf = NULL; // make clear it's not to be used
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2006,7 +2017,10 @@ buflist_new(
|
||||
apply_autocmds(EVENT_BUFWIPEOUT, NULL, NULL, FALSE, curbuf);
|
||||
#ifdef FEAT_EVAL
|
||||
if (aborting()) // autocmds may abort script processing
|
||||
{
|
||||
vim_free(ffname);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
if (buf == curbuf)
|
||||
{
|
||||
@@ -2499,7 +2513,7 @@ buflist_findname_stat(
|
||||
buf_T *buf;
|
||||
|
||||
// Start at the last buffer, expect to find a match sooner.
|
||||
for (buf = lastbuf; buf != NULL; buf = buf->b_prev)
|
||||
FOR_ALL_BUFS_FROM_LAST(buf)
|
||||
if ((buf->b_flags & BF_DUMMY) == 0 && !otherfile_buf(buf, ffname
|
||||
#ifdef UNIX
|
||||
, stp
|
||||
@@ -2582,7 +2596,7 @@ buflist_findpat(
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (buf = lastbuf; buf != NULL; buf = buf->b_prev)
|
||||
FOR_ALL_BUFS_FROM_LAST(buf)
|
||||
if (buf->b_p_bl == find_listed
|
||||
#ifdef FEAT_DIFF
|
||||
&& (!diffmode || diff_mode_buf(buf))
|
||||
@@ -2900,7 +2914,7 @@ buflist_setfpos(
|
||||
{
|
||||
wininfo_T *wip;
|
||||
|
||||
for (wip = buf->b_wininfo; wip != NULL; wip = wip->wi_next)
|
||||
FOR_ALL_BUF_WININFO(buf, wip)
|
||||
if (wip->wi_win == win)
|
||||
break;
|
||||
if (wip == NULL)
|
||||
@@ -2993,7 +3007,7 @@ find_wininfo(
|
||||
{
|
||||
wininfo_T *wip;
|
||||
|
||||
for (wip = buf->b_wininfo; wip != NULL; wip = wip->wi_next)
|
||||
FOR_ALL_BUF_WININFO(buf, wip)
|
||||
if (wip->wi_win == curwin
|
||||
#ifdef FEAT_DIFF
|
||||
&& (!skip_diff_buffer || !wininfo_other_tab_diff(wip))
|
||||
@@ -3008,7 +3022,7 @@ find_wininfo(
|
||||
#ifdef FEAT_DIFF
|
||||
if (skip_diff_buffer)
|
||||
{
|
||||
for (wip = buf->b_wininfo; wip != NULL; wip = wip->wi_next)
|
||||
FOR_ALL_BUF_WININFO(buf, wip)
|
||||
if (!wininfo_other_tab_diff(wip))
|
||||
break;
|
||||
}
|
||||
@@ -3121,7 +3135,7 @@ buflist_list(exarg_T *eap)
|
||||
if (vim_strchr(eap->arg, 't'))
|
||||
{
|
||||
ga_init2(&buflist, sizeof(buf_T *), 50);
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
{
|
||||
if (ga_grow(&buflist, 1) == OK)
|
||||
((buf_T **)buflist.ga_data)[buflist.ga_len++] = buf;
|
||||
|
||||
@@ -172,8 +172,7 @@ check_recorded_changes(
|
||||
linenr_T prev_lnum;
|
||||
linenr_T prev_lnume;
|
||||
|
||||
for (li = buf->b_recorded_changes->lv_first; li != NULL;
|
||||
li = li->li_next)
|
||||
FOR_ALL_LIST_ITEMS(buf->b_recorded_changes, li)
|
||||
{
|
||||
prev_lnum = (linenr_T)dict_get_number(
|
||||
li->li_tv.vval.v_dict, (char_u *)"lnum");
|
||||
@@ -362,8 +361,7 @@ invoke_listeners(buf_T *buf)
|
||||
argv[0].v_type = VAR_NUMBER;
|
||||
argv[0].vval.v_number = buf->b_fnum; // a:bufnr
|
||||
|
||||
|
||||
for (li = buf->b_recorded_changes->lv_first; li != NULL; li = li->li_next)
|
||||
FOR_ALL_LIST_ITEMS(buf->b_recorded_changes, li)
|
||||
{
|
||||
varnumber_T lnum;
|
||||
|
||||
@@ -1301,7 +1299,7 @@ del_bytes(
|
||||
#endif
|
||||
|
||||
// mark the buffer as changed and prepare for displaying
|
||||
inserted_bytes(lnum, curwin->w_cursor.col, -count);
|
||||
inserted_bytes(lnum, col, -count);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
481
src/channel.c
481
src/channel.c
@@ -10,6 +10,13 @@
|
||||
* Implements communication through a socket or any file handle.
|
||||
*/
|
||||
|
||||
#ifdef WIN32
|
||||
// Must include winsock2.h before windows.h since it conflicts with winsock.h
|
||||
// (included in windows.h).
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
#include "vim.h"
|
||||
|
||||
#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
|
||||
@@ -40,7 +47,7 @@
|
||||
#else
|
||||
# include <netdb.h>
|
||||
# include <netinet/in.h>
|
||||
|
||||
# include <arpa/inet.h>
|
||||
# include <sys/socket.h>
|
||||
# ifdef HAVE_LIBGEN_H
|
||||
# include <libgen.h>
|
||||
@@ -61,6 +68,12 @@ static ch_part_T channel_part_send(channel_T *channel);
|
||||
static ch_part_T channel_part_read(channel_T *channel);
|
||||
static void free_job_options(jobopt_T *opt);
|
||||
|
||||
#define FOR_ALL_CHANNELS(ch) \
|
||||
for ((ch) = first_channel; (ch) != NULL; (ch) = (ch)->ch_next)
|
||||
|
||||
#define FOR_ALL_JOBS(job) \
|
||||
for ((job) = first_job; (job) != NULL; (job) = (job)->jv_next)
|
||||
|
||||
// Whether a redraw is needed for appending a line to a buffer.
|
||||
static int channel_need_redraw = FALSE;
|
||||
|
||||
@@ -396,6 +409,7 @@ channel_can_close(channel_T *channel)
|
||||
|
||||
/*
|
||||
* Close a channel and free all its resources.
|
||||
* The "channel" pointer remains valid.
|
||||
*/
|
||||
static void
|
||||
channel_free_contents(channel_T *channel)
|
||||
@@ -405,6 +419,9 @@ channel_free_contents(channel_T *channel)
|
||||
ch_log(channel, "Freeing channel");
|
||||
}
|
||||
|
||||
/*
|
||||
* Unlink "channel" from the list of channels and free it.
|
||||
*/
|
||||
static void
|
||||
channel_free_channel(channel_T *channel)
|
||||
{
|
||||
@@ -472,7 +489,7 @@ free_unused_channels_contents(int copyID, int mask)
|
||||
// point.
|
||||
++safe_to_invoke_callback;
|
||||
|
||||
for (ch = first_channel; ch != NULL; ch = ch->ch_next)
|
||||
FOR_ALL_CHANNELS(ch)
|
||||
if (!channel_still_useful(ch)
|
||||
&& (ch->ch_copyID & mask) != (copyID & mask))
|
||||
{
|
||||
@@ -497,10 +514,8 @@ free_unused_channels(int copyID, int mask)
|
||||
ch_next = ch->ch_next;
|
||||
if (!channel_still_useful(ch)
|
||||
&& (ch->ch_copyID & mask) != (copyID & mask))
|
||||
{
|
||||
// Free the channel struct itself.
|
||||
channel_free_channel(ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -518,8 +533,7 @@ channel_fd2channel(sock_T fd, ch_part_T *partp)
|
||||
ch_part_T part;
|
||||
|
||||
if (fd != INVALID_FD)
|
||||
for (channel = first_channel; channel != NULL;
|
||||
channel = channel->ch_next)
|
||||
FOR_ALL_CHANNELS(channel)
|
||||
{
|
||||
for (part = PART_SOCK; part < PART_IN; ++part)
|
||||
if (channel->ch_part[part].ch_fd == fd)
|
||||
@@ -660,7 +674,7 @@ channel_gui_register_all(void)
|
||||
{
|
||||
channel_T *channel;
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
FOR_ALL_CHANNELS(channel)
|
||||
channel_gui_register(channel);
|
||||
}
|
||||
|
||||
@@ -704,90 +718,38 @@ channel_gui_unregister(channel_T *channel)
|
||||
static char *e_cannot_connect = N_("E902: Cannot connect to port");
|
||||
|
||||
/*
|
||||
* Open a socket channel to "hostname":"port".
|
||||
* "waittime" is the time in msec to wait for the connection.
|
||||
* When negative wait forever.
|
||||
* Returns the channel for success.
|
||||
* Returns NULL for failure.
|
||||
* For Unix we need to call connect() again after connect() failed.
|
||||
* On Win32 one time is sufficient.
|
||||
*/
|
||||
channel_T *
|
||||
channel_open(
|
||||
char *hostname,
|
||||
int port_in,
|
||||
int waittime,
|
||||
void (*nb_close_cb)(void))
|
||||
static int
|
||||
channel_connect(
|
||||
channel_T *channel,
|
||||
const struct sockaddr *server_addr,
|
||||
int server_addrlen,
|
||||
int *waittime)
|
||||
{
|
||||
int sd = -1;
|
||||
struct sockaddr_in server;
|
||||
struct hostent *host;
|
||||
int sd = -1;
|
||||
#ifdef MSWIN
|
||||
u_short port = port_in;
|
||||
u_long val = 1;
|
||||
#else
|
||||
int port = port_in;
|
||||
#endif
|
||||
channel_T *channel;
|
||||
int ret;
|
||||
|
||||
#ifdef MSWIN
|
||||
channel_init_winsock();
|
||||
u_long val = 1;
|
||||
#endif
|
||||
|
||||
channel = add_channel();
|
||||
if (channel == NULL)
|
||||
{
|
||||
ch_error(NULL, "Cannot allocate channel.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Get the server internet address and put into addr structure
|
||||
// fill in the socket address structure and connect to server
|
||||
vim_memset((char *)&server, 0, sizeof(server));
|
||||
server.sin_family = AF_INET;
|
||||
server.sin_port = htons(port);
|
||||
if ((host = gethostbyname(hostname)) == NULL)
|
||||
{
|
||||
ch_error(channel, "in gethostbyname() in channel_open()");
|
||||
PERROR(_("E901: gethostbyname() in channel_open()"));
|
||||
channel_free(channel);
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
char *p;
|
||||
|
||||
// When using host->h_addr_list[0] directly ubsan warns for it to not
|
||||
// be aligned. First copy the pointer to avoid that.
|
||||
memcpy(&p, &host->h_addr_list[0], sizeof(p));
|
||||
memcpy((char *)&server.sin_addr, p, host->h_length);
|
||||
}
|
||||
|
||||
// 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.
|
||||
if (waittime == 0)
|
||||
waittime = 1;
|
||||
|
||||
/*
|
||||
* For Unix we need to call connect() again after connect() failed.
|
||||
* On Win32 one time is sufficient.
|
||||
*/
|
||||
while (TRUE)
|
||||
{
|
||||
long elapsed_msec = 0;
|
||||
int waitnow;
|
||||
int ret;
|
||||
|
||||
if (sd >= 0)
|
||||
sock_close(sd);
|
||||
sd = socket(AF_INET, SOCK_STREAM, 0);
|
||||
sd = socket(server_addr->sa_family, SOCK_STREAM, 0);
|
||||
if (sd == -1)
|
||||
{
|
||||
ch_error(channel, "in socket() in channel_open().");
|
||||
PERROR(_("E898: socket() in channel_open()"));
|
||||
channel_free(channel);
|
||||
return NULL;
|
||||
ch_error(channel, "in socket() in channel_connect().");
|
||||
PERROR(_("E898: socket() in channel_connect()"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (waittime >= 0)
|
||||
if (*waittime >= 0)
|
||||
{
|
||||
// Make connect() non-blocking.
|
||||
if (
|
||||
@@ -800,23 +762,22 @@ channel_open(
|
||||
{
|
||||
SOCK_ERRNO;
|
||||
ch_error(channel,
|
||||
"channel_open: Connect failed with errno %d", errno);
|
||||
"channel_connect: Connect failed with errno %d", errno);
|
||||
sock_close(sd);
|
||||
channel_free(channel);
|
||||
return NULL;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Try connecting to the server.
|
||||
ch_log(channel, "Connecting to %s port %d", hostname, port);
|
||||
ret = connect(sd, (struct sockaddr *)&server, sizeof(server));
|
||||
ch_log(channel, "Connecting...");
|
||||
|
||||
ret = connect(sd, server_addr, server_addrlen);
|
||||
if (ret == 0)
|
||||
// The connection could be established.
|
||||
break;
|
||||
|
||||
SOCK_ERRNO;
|
||||
if (waittime < 0 || (errno != EWOULDBLOCK
|
||||
if (*waittime < 0 || (errno != EWOULDBLOCK
|
||||
&& errno != ECONNREFUSED
|
||||
#ifdef EINPROGRESS
|
||||
&& errno != EINPROGRESS
|
||||
@@ -824,22 +785,24 @@ channel_open(
|
||||
))
|
||||
{
|
||||
ch_error(channel,
|
||||
"channel_open: Connect failed with errno %d", errno);
|
||||
"channel_connect: Connect failed with errno %d", errno);
|
||||
PERROR(_(e_cannot_connect));
|
||||
sock_close(sd);
|
||||
channel_free(channel);
|
||||
return NULL;
|
||||
return -1;
|
||||
}
|
||||
else if (errno == ECONNREFUSED)
|
||||
{
|
||||
ch_error(channel, "channel_connect: Connection refused");
|
||||
sock_close(sd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Limit the waittime to 50 msec. If it doesn't work within this
|
||||
// time we close the socket and try creating it again.
|
||||
waitnow = waittime > 50 ? 50 : waittime;
|
||||
waitnow = *waittime > 50 ? 50 : *waittime;
|
||||
|
||||
// If connect() didn't finish then try using select() to wait for the
|
||||
// connection to be made. For Win32 always use select() to wait.
|
||||
#ifndef MSWIN
|
||||
if (errno != ECONNREFUSED)
|
||||
#endif
|
||||
{
|
||||
struct timeval tv;
|
||||
fd_set rfds;
|
||||
@@ -861,18 +824,17 @@ channel_open(
|
||||
gettimeofday(&start_tv, NULL);
|
||||
#endif
|
||||
ch_log(channel,
|
||||
"Waiting for connection (waiting %d msec)...", waitnow);
|
||||
ret = select((int)sd + 1, &rfds, &wfds, NULL, &tv);
|
||||
"Waiting for connection (waiting %d msec)...", waitnow);
|
||||
|
||||
ret = select((int)sd + 1, &rfds, &wfds, NULL, &tv);
|
||||
if (ret < 0)
|
||||
{
|
||||
SOCK_ERRNO;
|
||||
ch_error(channel,
|
||||
"channel_open: Connect failed with errno %d", errno);
|
||||
"channel_connect: Connect failed with errno %d", errno);
|
||||
PERROR(_(e_cannot_connect));
|
||||
sock_close(sd);
|
||||
channel_free(channel);
|
||||
return NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef MSWIN
|
||||
@@ -881,9 +843,9 @@ channel_open(
|
||||
if (FD_ISSET(sd, &wfds))
|
||||
break;
|
||||
elapsed_msec = waitnow;
|
||||
if (waittime > 1 && elapsed_msec < waittime)
|
||||
if (*waittime > 1 && elapsed_msec < *waittime)
|
||||
{
|
||||
waittime -= elapsed_msec;
|
||||
*waittime -= elapsed_msec;
|
||||
continue;
|
||||
}
|
||||
#else
|
||||
@@ -907,12 +869,17 @@ channel_open(
|
||||
))
|
||||
{
|
||||
ch_error(channel,
|
||||
"channel_open: Connect failed with errno %d",
|
||||
"channel_connect: Connect failed with errno %d",
|
||||
so_error);
|
||||
PERROR(_(e_cannot_connect));
|
||||
sock_close(sd);
|
||||
channel_free(channel);
|
||||
return NULL;
|
||||
return -1;
|
||||
}
|
||||
else if (errno == ECONNREFUSED)
|
||||
{
|
||||
ch_error(channel, "channel_connect: Connection refused");
|
||||
sock_close(sd);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -922,30 +889,30 @@ channel_open(
|
||||
|
||||
gettimeofday(&end_tv, NULL);
|
||||
elapsed_msec = (end_tv.tv_sec - start_tv.tv_sec) * 1000
|
||||
+ (end_tv.tv_usec - start_tv.tv_usec) / 1000;
|
||||
+ (end_tv.tv_usec - start_tv.tv_usec) / 1000;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef MSWIN
|
||||
if (waittime > 1 && elapsed_msec < waittime)
|
||||
if (*waittime > 1 && elapsed_msec < *waittime)
|
||||
{
|
||||
// The port isn't ready but we also didn't get an error.
|
||||
// This happens when the server didn't open the socket
|
||||
// yet. Select() may return early, wait until the remaining
|
||||
// "waitnow" and try again.
|
||||
waitnow -= elapsed_msec;
|
||||
waittime -= elapsed_msec;
|
||||
*waittime -= elapsed_msec;
|
||||
if (waitnow > 0)
|
||||
{
|
||||
mch_delay((long)waitnow, TRUE);
|
||||
ui_breakcheck();
|
||||
waittime -= waitnow;
|
||||
*waittime -= waitnow;
|
||||
}
|
||||
if (!got_int)
|
||||
{
|
||||
if (waittime <= 0)
|
||||
if (*waittime <= 0)
|
||||
// give it one more try
|
||||
waittime = 1;
|
||||
*waittime = 1;
|
||||
continue;
|
||||
}
|
||||
// we were interrupted, behave as if timed out
|
||||
@@ -955,13 +922,10 @@ channel_open(
|
||||
// We timed out.
|
||||
ch_error(channel, "Connection timed out");
|
||||
sock_close(sd);
|
||||
channel_free(channel);
|
||||
return NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
ch_log(channel, "Connection made");
|
||||
|
||||
if (waittime >= 0)
|
||||
if (*waittime >= 0)
|
||||
{
|
||||
#ifdef MSWIN
|
||||
val = 0;
|
||||
@@ -971,10 +935,151 @@ channel_open(
|
||||
#endif
|
||||
}
|
||||
|
||||
return sd;
|
||||
}
|
||||
|
||||
/*
|
||||
* Open a socket channel to "hostname":"port".
|
||||
* "waittime" is the time in msec to wait for the connection.
|
||||
* When negative wait forever.
|
||||
* Returns the channel for success.
|
||||
* Returns NULL for failure.
|
||||
*/
|
||||
channel_T *
|
||||
channel_open(
|
||||
const char *hostname,
|
||||
int port,
|
||||
int waittime,
|
||||
void (*nb_close_cb)(void))
|
||||
{
|
||||
int sd = -1;
|
||||
channel_T *channel = NULL;
|
||||
#ifdef FEAT_IPV6
|
||||
struct addrinfo hints;
|
||||
struct addrinfo *res = NULL;
|
||||
struct addrinfo *addr = NULL;
|
||||
#else
|
||||
struct sockaddr_in server;
|
||||
struct hostent *host = NULL;
|
||||
#endif
|
||||
|
||||
#ifdef MSWIN
|
||||
channel_init_winsock();
|
||||
#endif
|
||||
|
||||
channel = add_channel();
|
||||
if (channel == NULL)
|
||||
{
|
||||
ch_error(NULL, "Cannot allocate channel.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Get the server internet address and put into addr structure fill in the
|
||||
// socket address structure and connect to server.
|
||||
#ifdef FEAT_IPV6
|
||||
CLEAR_FIELD(hints);
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
# ifdef AI_ADDRCONFIG
|
||||
hints.ai_flags = AI_ADDRCONFIG;
|
||||
# endif
|
||||
// Set port number manually in order to prevent name resolution services
|
||||
// from being invoked in the environment where AI_NUMERICSERV is not
|
||||
// defined.
|
||||
if (getaddrinfo(hostname, NULL, &hints, &res) != 0)
|
||||
{
|
||||
ch_error(channel, "in getaddrinfo() in channel_open()");
|
||||
PERROR(_("E901: getaddrinfo() in channel_open()"));
|
||||
channel_free(channel);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (addr = res; addr != NULL; addr = addr->ai_next)
|
||||
{
|
||||
const char *dst = hostname;
|
||||
const void *src = NULL;
|
||||
char buf[NUMBUFLEN];
|
||||
|
||||
if (addr->ai_family == AF_INET6)
|
||||
{
|
||||
struct sockaddr_in6 *sai = (struct sockaddr_in6 *)addr->ai_addr;
|
||||
|
||||
sai->sin6_port = htons(port);
|
||||
src = &sai->sin6_addr;
|
||||
}
|
||||
else if (addr->ai_family == AF_INET)
|
||||
{
|
||||
struct sockaddr_in *sai = (struct sockaddr_in *)addr->ai_addr;
|
||||
|
||||
sai->sin_port = htons(port);
|
||||
src = &sai->sin_addr;
|
||||
}
|
||||
if (src != NULL)
|
||||
{
|
||||
dst = inet_ntop(addr->ai_family, src, buf, sizeof(buf));
|
||||
if (dst != NULL && STRCMP(hostname, dst) != 0)
|
||||
ch_log(channel, "Resolved %s to %s", hostname, dst);
|
||||
}
|
||||
|
||||
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.
|
||||
if (waittime == 0)
|
||||
waittime = 1;
|
||||
|
||||
sd = channel_connect(channel, addr->ai_addr, addr->ai_addrlen,
|
||||
&waittime);
|
||||
if (sd >= 0)
|
||||
break;
|
||||
}
|
||||
|
||||
freeaddrinfo(res);
|
||||
#else
|
||||
CLEAR_FIELD(server);
|
||||
server.sin_family = AF_INET;
|
||||
server.sin_port = htons(port);
|
||||
if ((host = gethostbyname(hostname)) == NULL)
|
||||
{
|
||||
ch_error(channel, "in gethostbyname() in channel_open()");
|
||||
PERROR(_("E901: gethostbyname() in channel_open()"));
|
||||
channel_free(channel);
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
char *p;
|
||||
|
||||
// When using host->h_addr_list[0] directly ubsan warns for it to not
|
||||
// be aligned. First copy the pointer to avoid that.
|
||||
memcpy(&p, &host->h_addr_list[0], sizeof(p));
|
||||
memcpy((char *)&server.sin_addr, p, host->h_length);
|
||||
}
|
||||
|
||||
ch_log(channel, "Trying to connect to %s port %d", hostname, 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.
|
||||
if (waittime == 0)
|
||||
waittime = 1;
|
||||
|
||||
sd = channel_connect(channel, (struct sockaddr *)&server, sizeof(server),
|
||||
&waittime);
|
||||
#endif
|
||||
|
||||
if (sd < 0)
|
||||
{
|
||||
channel_free(channel);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ch_log(channel, "Connection made");
|
||||
|
||||
channel->CH_SOCK_FD = (sock_T)sd;
|
||||
channel->ch_nb_close_cb = nb_close_cb;
|
||||
channel->ch_hostname = (char *)vim_strsave((char_u *)hostname);
|
||||
channel->ch_port = port_in;
|
||||
channel->ch_port = port;
|
||||
channel->ch_to_be_closed |= (1U << PART_SOCK);
|
||||
|
||||
#ifdef FEAT_GUI
|
||||
@@ -1215,6 +1320,7 @@ channel_open_func(typval_T *argvars)
|
||||
char_u *p;
|
||||
char *rest;
|
||||
int port;
|
||||
int is_ipv6 = FALSE;
|
||||
jobopt_T opt;
|
||||
channel_T *channel = NULL;
|
||||
|
||||
@@ -1227,20 +1333,40 @@ channel_open_func(typval_T *argvars)
|
||||
}
|
||||
|
||||
// parse address
|
||||
p = vim_strchr(address, ':');
|
||||
if (p == NULL)
|
||||
if (*address == '[')
|
||||
{
|
||||
// ipv6 address
|
||||
is_ipv6 = TRUE;
|
||||
p = vim_strchr(address + 1, ']');
|
||||
if (p == NULL || *++p != ':')
|
||||
{
|
||||
semsg(_(e_invarg2), address);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
p = vim_strchr(address, ':');
|
||||
if (p == NULL)
|
||||
{
|
||||
semsg(_(e_invarg2), address);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
port = strtol((char *)(p + 1), &rest, 10);
|
||||
if (*address == NUL || port <= 0 || port >= 65536 || *rest != NUL)
|
||||
{
|
||||
semsg(_(e_invarg2), address);
|
||||
return NULL;
|
||||
}
|
||||
*p++ = NUL;
|
||||
port = strtol((char *)p, &rest, 10);
|
||||
if (*address == NUL || port <= 0 || *rest != NUL)
|
||||
if (is_ipv6)
|
||||
{
|
||||
p[-1] = ':';
|
||||
semsg(_(e_invarg2), address);
|
||||
return NULL;
|
||||
// strip '[' and ']'
|
||||
++address;
|
||||
*(p - 1) = NUL;
|
||||
}
|
||||
else
|
||||
*p = NUL;
|
||||
|
||||
// parse options
|
||||
clear_job_options(&opt);
|
||||
@@ -1567,7 +1693,7 @@ channel_buffer_free(buf_T *buf)
|
||||
channel_T *channel;
|
||||
ch_part_T part;
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
FOR_ALL_CHANNELS(channel)
|
||||
for (part = PART_SOCK; part < PART_COUNT; ++part)
|
||||
{
|
||||
chanpart_T *ch_part = &channel->ch_part[part];
|
||||
@@ -1608,7 +1734,7 @@ channel_write_any_lines(void)
|
||||
{
|
||||
channel_T *channel;
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
FOR_ALL_CHANNELS(channel)
|
||||
channel_write_input(channel);
|
||||
}
|
||||
|
||||
@@ -1623,7 +1749,7 @@ channel_write_new_lines(buf_T *buf)
|
||||
|
||||
// There could be more than one channel for the buffer, loop over all of
|
||||
// them.
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
FOR_ALL_CHANNELS(channel)
|
||||
{
|
||||
chanpart_T *in_part = &channel->ch_part[PART_IN];
|
||||
linenr_T lnum;
|
||||
@@ -2388,7 +2514,7 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
|
||||
exarg_T ea;
|
||||
|
||||
ch_log(channel, "Executing normal command '%s'", (char *)arg);
|
||||
vim_memset(&ea, 0, sizeof(ea));
|
||||
CLEAR_FIELD(ea);
|
||||
ea.arg = arg;
|
||||
ea.addr_count = 0;
|
||||
ea.forceit = TRUE; // no mapping
|
||||
@@ -2399,7 +2525,7 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
|
||||
exarg_T ea;
|
||||
|
||||
ch_log(channel, "redraw");
|
||||
vim_memset(&ea, 0, sizeof(ea));
|
||||
CLEAR_FIELD(ea);
|
||||
ea.forceit = *arg != NUL;
|
||||
ex_redraw(&ea);
|
||||
showruler(FALSE);
|
||||
@@ -2602,7 +2728,7 @@ append_to_buffer(buf_T *buffer, char_u *msg, channel_T *channel, ch_part_T part)
|
||||
// Find channels reading from this buffer and adjust their
|
||||
// next-to-read line number.
|
||||
buffer->b_write_to_channel = TRUE;
|
||||
for (ch = first_channel; ch != NULL; ch = ch->ch_next)
|
||||
FOR_ALL_CHANNELS(ch)
|
||||
{
|
||||
chanpart_T *in_part = &ch->ch_part[PART_IN];
|
||||
|
||||
@@ -3178,7 +3304,7 @@ channel_free_all(void)
|
||||
channel_T *channel;
|
||||
|
||||
ch_log(NULL, "channel_free_all()");
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
FOR_ALL_CHANNELS(channel)
|
||||
channel_clear(channel);
|
||||
}
|
||||
#endif
|
||||
@@ -3200,7 +3326,7 @@ channel_fill_wfds(int maxfd_arg, fd_set *wfds)
|
||||
int maxfd = maxfd_arg;
|
||||
channel_T *ch;
|
||||
|
||||
for (ch = first_channel; ch != NULL; ch = ch->ch_next)
|
||||
FOR_ALL_CHANNELS(ch)
|
||||
{
|
||||
chanpart_T *in_part = &ch->ch_part[PART_IN];
|
||||
|
||||
@@ -3225,7 +3351,7 @@ channel_fill_poll_write(int nfd_in, struct pollfd *fds)
|
||||
int nfd = nfd_in;
|
||||
channel_T *ch;
|
||||
|
||||
for (ch = first_channel; ch != NULL; ch = ch->ch_next)
|
||||
FOR_ALL_CHANNELS(ch)
|
||||
{
|
||||
chanpart_T *in_part = &ch->ch_part[PART_IN];
|
||||
|
||||
@@ -3819,7 +3945,7 @@ channel_handle_events(int only_keep_open)
|
||||
ch_part_T part;
|
||||
sock_T fd;
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
FOR_ALL_CHANNELS(channel)
|
||||
{
|
||||
if (only_keep_open && !channel->ch_keep_open)
|
||||
continue;
|
||||
@@ -3852,7 +3978,7 @@ channel_any_keep_open()
|
||||
{
|
||||
channel_T *channel;
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
FOR_ALL_CHANNELS(channel)
|
||||
if (channel->ch_keep_open)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
@@ -4232,7 +4358,7 @@ channel_poll_setup(int nfd_in, void *fds_in, int *towait)
|
||||
struct pollfd *fds = fds_in;
|
||||
ch_part_T part;
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
FOR_ALL_CHANNELS(channel)
|
||||
{
|
||||
for (part = PART_SOCK; part < PART_IN; ++part)
|
||||
{
|
||||
@@ -4279,7 +4405,7 @@ channel_poll_check(int ret_in, void *fds_in)
|
||||
int idx;
|
||||
chanpart_T *in_part;
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
FOR_ALL_CHANNELS(channel)
|
||||
{
|
||||
for (part = PART_SOCK; part < PART_IN; ++part)
|
||||
{
|
||||
@@ -4330,7 +4456,7 @@ channel_select_setup(
|
||||
fd_set *wfds = wfds_in;
|
||||
ch_part_T part;
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
FOR_ALL_CHANNELS(channel)
|
||||
{
|
||||
for (part = PART_SOCK; part < PART_IN; ++part)
|
||||
{
|
||||
@@ -4379,7 +4505,7 @@ channel_select_check(int ret_in, void *rfds_in, void *wfds_in)
|
||||
ch_part_T part;
|
||||
chanpart_T *in_part;
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
FOR_ALL_CHANNELS(channel)
|
||||
{
|
||||
for (part = PART_SOCK; part < PART_IN; ++part)
|
||||
{
|
||||
@@ -4426,14 +4552,20 @@ channel_parse_messages(void)
|
||||
int ret = FALSE;
|
||||
int r;
|
||||
ch_part_T part = PART_SOCK;
|
||||
static int recursive = 0;
|
||||
#ifdef ELAPSED_FUNC
|
||||
elapsed_T start_tv;
|
||||
|
||||
ELAPSED_INIT(start_tv);
|
||||
#endif
|
||||
|
||||
// The code below may invoke callbacks, which might call us back.
|
||||
// In a recursive call channels will not be closed.
|
||||
++recursive;
|
||||
++safe_to_invoke_callback;
|
||||
|
||||
#ifdef ELAPSED_FUNC
|
||||
ELAPSED_INIT(start_tv);
|
||||
#endif
|
||||
|
||||
// Only do this message when another message was given, otherwise we get
|
||||
// lots of them.
|
||||
if ((did_repeated_msg & REPEATED_MSG_LOOKING) == 0)
|
||||
@@ -4444,34 +4576,37 @@ channel_parse_messages(void)
|
||||
}
|
||||
while (channel != NULL)
|
||||
{
|
||||
if (channel_can_close(channel))
|
||||
if (recursive == 1)
|
||||
{
|
||||
channel->ch_to_be_closed = (1U << PART_COUNT);
|
||||
channel_close_now(channel);
|
||||
// channel may have been freed, start over
|
||||
channel = first_channel;
|
||||
continue;
|
||||
}
|
||||
if (channel->ch_to_be_freed || channel->ch_killing)
|
||||
{
|
||||
if (channel->ch_killing)
|
||||
if (channel_can_close(channel))
|
||||
{
|
||||
channel->ch_to_be_closed = (1U << PART_COUNT);
|
||||
channel_close_now(channel);
|
||||
// channel may have been freed, start over
|
||||
channel = first_channel;
|
||||
continue;
|
||||
}
|
||||
if (channel->ch_to_be_freed || channel->ch_killing)
|
||||
{
|
||||
channel_free_contents(channel);
|
||||
channel->ch_job->jv_channel = NULL;
|
||||
if (channel->ch_job != NULL)
|
||||
channel->ch_job->jv_channel = NULL;
|
||||
|
||||
// free the channel and then start over
|
||||
channel_free_channel(channel);
|
||||
channel = first_channel;
|
||||
continue;
|
||||
}
|
||||
if (channel->ch_refcount == 0 && !channel_still_useful(channel))
|
||||
{
|
||||
// channel is no longer useful, free it
|
||||
channel_free(channel);
|
||||
channel = first_channel;
|
||||
part = PART_SOCK;
|
||||
continue;
|
||||
}
|
||||
channel_free(channel);
|
||||
// channel has been freed, start over
|
||||
channel = first_channel;
|
||||
continue;
|
||||
}
|
||||
if (channel->ch_refcount == 0 && !channel_still_useful(channel))
|
||||
{
|
||||
// channel is no longer useful, free it
|
||||
channel_free(channel);
|
||||
channel = first_channel;
|
||||
part = PART_SOCK;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (channel->ch_part[part].ch_fd != INVALID_FD
|
||||
|| channel_has_readahead(channel, part))
|
||||
{
|
||||
@@ -4512,6 +4647,7 @@ channel_parse_messages(void)
|
||||
}
|
||||
|
||||
--safe_to_invoke_callback;
|
||||
--recursive;
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -4657,7 +4793,7 @@ handle_io(typval_T *item, ch_part_T part, jobopt_T *opt)
|
||||
void
|
||||
clear_job_options(jobopt_T *opt)
|
||||
{
|
||||
vim_memset(opt, 0, sizeof(jobopt_T));
|
||||
CLEAR_POINTER(opt);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5158,6 +5294,21 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
|
||||
memcpy(opt->jo_ansi_colors, rgb, sizeof(rgb));
|
||||
}
|
||||
# endif
|
||||
else if (STRCMP(hi->hi_key, "term_highlight") == 0)
|
||||
{
|
||||
char_u *p;
|
||||
|
||||
if (!(supported2 & JO2_TERM_HIGHLIGHT))
|
||||
break;
|
||||
opt->jo_set2 |= JO2_TERM_HIGHLIGHT;
|
||||
p = tv_get_string_buf_chk(item, opt->jo_term_highlight_buf);
|
||||
if (p == NULL || *p == NUL)
|
||||
{
|
||||
semsg(_(e_invargval), "term_highlight");
|
||||
return FAIL;
|
||||
}
|
||||
opt->jo_term_highlight = p;
|
||||
}
|
||||
else if (STRCMP(hi->hi_key, "term_api") == 0)
|
||||
{
|
||||
if (!(supported2 & JO2_TERM_API))
|
||||
@@ -5444,7 +5595,7 @@ job_any_running()
|
||||
{
|
||||
job_T *job;
|
||||
|
||||
for (job = first_job; job != NULL; job = job->jv_next)
|
||||
FOR_ALL_JOBS(job)
|
||||
if (job_still_useful(job))
|
||||
{
|
||||
ch_log(NULL, "GUI not forking because a job is running");
|
||||
@@ -5543,7 +5694,7 @@ win32_build_cmd(list_T *l, garray_T *gap)
|
||||
char_u *s;
|
||||
|
||||
range_list_materialize(l);
|
||||
for (li = l->lv_first; li != NULL; li = li->li_next)
|
||||
FOR_ALL_LIST_ITEMS(l, li)
|
||||
{
|
||||
s = tv_get_string_chk(&li->li_tv);
|
||||
if (s == NULL)
|
||||
@@ -5668,7 +5819,7 @@ free_unused_jobs_contents(int copyID, int mask)
|
||||
int did_free = FALSE;
|
||||
job_T *job;
|
||||
|
||||
for (job = first_job; job != NULL; job = job->jv_next)
|
||||
FOR_ALL_JOBS(job)
|
||||
if ((job->jv_copyID & mask) != (copyID & mask)
|
||||
&& !job_still_useful(job))
|
||||
{
|
||||
@@ -5754,7 +5905,7 @@ job_stop_on_exit(void)
|
||||
{
|
||||
job_T *job;
|
||||
|
||||
for (job = first_job; job != NULL; job = job->jv_next)
|
||||
FOR_ALL_JOBS(job)
|
||||
if (job->jv_status == JOB_STARTED && job->jv_stoponexit != NULL)
|
||||
mch_signal_job(job, job->jv_stoponexit);
|
||||
}
|
||||
@@ -5768,7 +5919,7 @@ has_pending_job(void)
|
||||
{
|
||||
job_T *job;
|
||||
|
||||
for (job = first_job; job != NULL; job = job->jv_next)
|
||||
FOR_ALL_JOBS(job)
|
||||
// Only should check if the channel has been closed, if the channel is
|
||||
// open the job won't exit.
|
||||
if ((job->jv_status == JOB_STARTED && !job_channel_still_useful(job))
|
||||
@@ -6562,7 +6713,7 @@ job_info_all(list_T *l)
|
||||
job_T *job;
|
||||
typval_T tv;
|
||||
|
||||
for (job = first_job; job != NULL; job = job->jv_next)
|
||||
FOR_ALL_JOBS(job)
|
||||
{
|
||||
tv.v_type = VAR_JOB;
|
||||
tv.vval.v_job = job;
|
||||
|
||||
@@ -127,7 +127,7 @@ buf_init_chartab(
|
||||
/*
|
||||
* Init word char flags all to FALSE
|
||||
*/
|
||||
vim_memset(buf->b_chartab, 0, (size_t)32);
|
||||
CLEAR_FIELD(buf->b_chartab);
|
||||
if (enc_dbcs != 0)
|
||||
for (c = 0; c < 256; ++c)
|
||||
{
|
||||
|
||||
1003
src/clientserver.c
Normal file
1003
src/clientserver.c
Normal file
File diff suppressed because it is too large
Load Diff
2212
src/clipboard.c
Normal file
2212
src/clipboard.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1389,7 +1389,7 @@ set_one_cmd_context(
|
||||
if (*arg != NUL)
|
||||
{
|
||||
xp->xp_context = EXPAND_NOTHING;
|
||||
arg = skip_regexp(arg + 1, *arg, p_magic, NULL);
|
||||
arg = skip_regexp(arg + 1, *arg, p_magic);
|
||||
}
|
||||
}
|
||||
return find_nextcmd(arg);
|
||||
@@ -1427,7 +1427,7 @@ set_one_cmd_context(
|
||||
{
|
||||
// skip "from" part
|
||||
++arg;
|
||||
arg = skip_regexp(arg, delim, p_magic, NULL);
|
||||
arg = skip_regexp(arg, delim, p_magic);
|
||||
}
|
||||
// skip "to" part
|
||||
while (arg[0] != NUL && arg[0] != delim)
|
||||
@@ -1550,6 +1550,7 @@ set_one_cmd_context(
|
||||
|
||||
case CMD_function:
|
||||
case CMD_delfunction:
|
||||
case CMD_disassemble:
|
||||
xp->xp_context = EXPAND_USER_FUNC;
|
||||
xp->xp_pattern = arg;
|
||||
break;
|
||||
@@ -1978,6 +1979,7 @@ ExpandFromContext(
|
||||
regmatch_T regmatch;
|
||||
int ret;
|
||||
int flags;
|
||||
char_u *tofree = NULL;
|
||||
|
||||
flags = EW_DIR; // include directories
|
||||
if (options & WILD_LIST_NOTFOUND)
|
||||
@@ -2115,6 +2117,17 @@ ExpandFromContext(
|
||||
if (xp->xp_context == EXPAND_PACKADD)
|
||||
return ExpandPackAddDir(pat, num_file, file);
|
||||
|
||||
// When expanding a function name starting with s:, match the <SNR>nr_
|
||||
// prefix.
|
||||
if (xp->xp_context == EXPAND_USER_FUNC && STRNCMP(pat, "^s:", 3) == 0)
|
||||
{
|
||||
int len = (int)STRLEN(pat) + 20;
|
||||
|
||||
tofree = alloc(len);
|
||||
vim_snprintf((char *)tofree, len, "^<SNR>\\d\\+_%s", pat + 3);
|
||||
pat = tofree;
|
||||
}
|
||||
|
||||
regmatch.regprog = vim_regcomp(pat, p_magic ? RE_MAGIC : 0);
|
||||
if (regmatch.regprog == NULL)
|
||||
return FAIL;
|
||||
@@ -2204,6 +2217,7 @@ ExpandFromContext(
|
||||
}
|
||||
|
||||
vim_regfree(regmatch.regprog);
|
||||
vim_free(tofree);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2573,7 +2587,7 @@ ExpandUserList(
|
||||
|
||||
ga_init2(&ga, (int)sizeof(char *), 3);
|
||||
// Loop over the items in the list.
|
||||
for (li = retlist->lv_first; li != NULL; li = li->li_next)
|
||||
FOR_ALL_LIST_ITEMS(retlist, li)
|
||||
{
|
||||
if (li->li_tv.v_type != VAR_STRING || li->li_tv.vval.v_string == NULL)
|
||||
continue; // Skip non-string items and empty strings
|
||||
|
||||
@@ -389,7 +389,7 @@ calc_hist_idx(int histype, int num)
|
||||
i += hislen;
|
||||
wrapped = TRUE;
|
||||
}
|
||||
if (hist[i].hisnum == num && hist[i].hisstr != NULL)
|
||||
if (i >= 0 && hist[i].hisnum == num && hist[i].hisstr != NULL)
|
||||
return i;
|
||||
}
|
||||
else if (-num <= hislen)
|
||||
|
||||
@@ -438,6 +438,9 @@
|
||||
/* Define if we have shl_load() */
|
||||
#undef HAVE_SHL_LOAD
|
||||
|
||||
/* Define if we can use IPv6 networking. */
|
||||
#undef FEAT_IPV6
|
||||
|
||||
/* Define if you want to include NetBeans integration. */
|
||||
#undef FEAT_NETBEANS_INTG
|
||||
|
||||
|
||||
@@ -154,6 +154,12 @@ case `uname` in
|
||||
*) BEOS=no; AC_MSG_RESULT(no);;
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING(for Haiku)
|
||||
case `uname` in
|
||||
Haiku) HAIKU=yes; AC_MSG_RESULT(yes);;
|
||||
*) HAIKU=no; AC_MSG_RESULT(no);;
|
||||
esac
|
||||
|
||||
dnl If QNX is found, assume we don't want to use Xphoton
|
||||
dnl unless it was specifically asked for (--with-x)
|
||||
AC_MSG_CHECKING(for QNX)
|
||||
@@ -2032,11 +2038,50 @@ else
|
||||
fi
|
||||
|
||||
if test "$enable_channel" = "yes"; then
|
||||
dnl On Solaris we need the socket and nsl library.
|
||||
AC_CHECK_LIB(socket, socket)
|
||||
AC_CHECK_LIB(nsl, gethostbyname)
|
||||
AC_MSG_CHECKING(whether compiling with process communication is possible)
|
||||
AC_TRY_LINK([
|
||||
dnl On Solaris we need the socket library, or on Haiku the network library.
|
||||
if test "x$HAIKU" = "xyes"; then
|
||||
AC_CHECK_LIB(network, socket)
|
||||
else
|
||||
AC_CHECK_LIB(socket, socket)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([whether compiling with IPv6 networking is possible], [vim_cv_ipv6_networking],
|
||||
[AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
/* Check bitfields */
|
||||
struct nbbuf {
|
||||
unsigned int initDone:1;
|
||||
unsigned short signmaplen;
|
||||
};
|
||||
], [
|
||||
/* Check creating a socket. */
|
||||
struct sockaddr_in server;
|
||||
struct addrinfo *res;
|
||||
(void)socket(AF_INET, SOCK_STREAM, 0);
|
||||
(void)htons(100);
|
||||
(void)getaddrinfo("microsoft.com", NULL, NULL, &res);
|
||||
if (errno == ECONNREFUSED)
|
||||
(void)connect(1, (struct sockaddr *)&server, sizeof(server));
|
||||
(void)freeaddrinfo(res);
|
||||
],
|
||||
[vim_cv_ipv6_networking="yes"],
|
||||
[vim_cv_ipv6_networking="no"])])
|
||||
|
||||
if test "x$vim_cv_ipv6_networking" = "xyes"; then
|
||||
AC_DEFINE(FEAT_IPV6)
|
||||
else
|
||||
dnl On Solaris we need the nsl library.
|
||||
AC_CHECK_LIB(nsl, gethostbyname)
|
||||
AC_CACHE_CHECK([whether compiling with IPv4 networking is possible], [vim_cv_ipv4_networking],
|
||||
[AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
@@ -2060,8 +2105,9 @@ if test "$enable_channel" = "yes"; then
|
||||
if (errno == ECONNREFUSED)
|
||||
(void)connect(1, (struct sockaddr *)&server, sizeof(server));
|
||||
],
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no); enable_netbeans="no"; enable_channel="no")
|
||||
[vim_cv_ipv4_networking="yes"],
|
||||
[vim_cv_ipv4_networking="no"; enable_netbeans="no"; enable_channel="no"])])
|
||||
fi
|
||||
fi
|
||||
if test "$enable_netbeans" = "yes"; then
|
||||
AC_DEFINE(FEAT_NETBEANS_INTG)
|
||||
@@ -2311,11 +2357,11 @@ if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
|
||||
AC_MSG_ERROR([could not configure X])
|
||||
fi
|
||||
|
||||
test "x$with_x" = xno -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
|
||||
test "x$with_x" = xno -a "x$HAIKU" != "xyes" -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
|
||||
|
||||
AC_MSG_CHECKING(--enable-gui argument)
|
||||
AC_ARG_ENABLE(gui,
|
||||
[ --enable-gui[=OPTS] X11 GUI. [default=auto] [OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/photon/carbon]], , enable_gui="auto")
|
||||
[ --enable-gui[=OPTS] X11 GUI. [default=auto] [OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/haiku/photon/carbon]], , enable_gui="auto")
|
||||
|
||||
dnl Canonicalize the --enable-gui= argument so that it can be easily compared.
|
||||
dnl Do not use character classes for portability with old tools.
|
||||
@@ -2330,10 +2376,22 @@ SKIP_MOTIF=YES
|
||||
SKIP_ATHENA=YES
|
||||
SKIP_NEXTAW=YES
|
||||
SKIP_PHOTON=YES
|
||||
SKIP_HAIKU=YES
|
||||
SKIP_CARBON=YES
|
||||
GUITYPE=NONE
|
||||
|
||||
if test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
|
||||
if test "x$HAIKU" = "xyes"; then
|
||||
SKIP_HAIKU=
|
||||
case "$enable_gui_canon" in
|
||||
no) AC_MSG_RESULT(no GUI support)
|
||||
SKIP_HAIKU=YES ;;
|
||||
yes|"") AC_MSG_RESULT(yes - automatic GUI support) ;;
|
||||
auto) AC_MSG_RESULT(auto - automatic GUI support) ;;
|
||||
haiku) AC_MSG_RESULT(Haiku GUI support) ;;
|
||||
*) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported])
|
||||
SKIP_HAIKU=YES ;;
|
||||
esac
|
||||
elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
|
||||
SKIP_PHOTON=
|
||||
case "$enable_gui_canon" in
|
||||
no) AC_MSG_RESULT(no GUI support)
|
||||
@@ -2499,6 +2557,7 @@ if test "x$MACOS_X" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
|
||||
SKIP_ATHENA=YES;
|
||||
SKIP_NEXTAW=YES;
|
||||
SKIP_PHOTON=YES;
|
||||
SKIP_HAIKU=YES;
|
||||
SKIP_CARBON=YES
|
||||
fi
|
||||
|
||||
@@ -3112,6 +3171,11 @@ if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
|
||||
enable_fontset="no"
|
||||
fi
|
||||
|
||||
dnl There is no test for the Haiku GUI, if it's selected it's used
|
||||
if test -z "$SKIP_HAIKU"; then
|
||||
GUITYPE=HAIKUGUI
|
||||
fi
|
||||
|
||||
if test -z "$SKIP_PHOTON"; then
|
||||
GUITYPE=PHOTONGUI
|
||||
fi
|
||||
|
||||
12
src/dict.c
12
src/dict.c
@@ -826,7 +826,8 @@ eval_dict(char_u **arg, typval_T *rettv, int evaluate, int literal)
|
||||
|
||||
if (**arg != ':')
|
||||
{
|
||||
semsg(_(e_missing_dict_colon), *arg);
|
||||
if (evaluate)
|
||||
semsg(_(e_missing_dict_colon), *arg);
|
||||
clear_tv(&tvkey);
|
||||
goto failret;
|
||||
}
|
||||
@@ -853,7 +854,8 @@ eval_dict(char_u **arg, typval_T *rettv, int evaluate, int literal)
|
||||
item = dict_find(d, key, -1);
|
||||
if (item != NULL)
|
||||
{
|
||||
semsg(_(e_duplicate_key), key);
|
||||
if (evaluate)
|
||||
semsg(_(e_duplicate_key), key);
|
||||
clear_tv(&tvkey);
|
||||
clear_tv(&tv);
|
||||
goto failret;
|
||||
@@ -873,7 +875,8 @@ eval_dict(char_u **arg, typval_T *rettv, int evaluate, int literal)
|
||||
break;
|
||||
if (**arg != ',')
|
||||
{
|
||||
semsg(_(e_missing_dict_comma), *arg);
|
||||
if (evaluate)
|
||||
semsg(_(e_missing_dict_comma), *arg);
|
||||
goto failret;
|
||||
}
|
||||
*arg = skipwhite(*arg + 1);
|
||||
@@ -881,7 +884,8 @@ eval_dict(char_u **arg, typval_T *rettv, int evaluate, int literal)
|
||||
|
||||
if (**arg != '}')
|
||||
{
|
||||
semsg(_(e_missing_dict_end), *arg);
|
||||
if (evaluate)
|
||||
semsg(_(e_missing_dict_end), *arg);
|
||||
failret:
|
||||
if (d != NULL)
|
||||
dict_free(d);
|
||||
|
||||
25
src/diff.c
25
src/diff.c
@@ -90,6 +90,9 @@ static int parse_diff_ed(char_u *line, linenr_T *lnum_orig, long *count_orig, li
|
||||
static int parse_diff_unified(char_u *line, linenr_T *lnum_orig, long *count_orig, linenr_T *lnum_new, long *count_new);
|
||||
static int xdiff_out(void *priv, mmbuffer_t *mb, int nbuf);
|
||||
|
||||
#define FOR_ALL_DIFFBLOCKS_IN_TAB(tp, dp) \
|
||||
for ((dp) = (tp)->tp_first_diff; (dp) != NULL; (dp) = (dp)->df_next)
|
||||
|
||||
/*
|
||||
* Called when deleting or unloading a buffer: No longer make a diff with it.
|
||||
*/
|
||||
@@ -936,14 +939,14 @@ ex_diffupdate(exarg_T *eap) // "eap" can be NULL
|
||||
goto theend;
|
||||
|
||||
// Only use the internal method if it did not fail for one of the buffers.
|
||||
vim_memset(&diffio, 0, sizeof(diffio));
|
||||
CLEAR_FIELD(diffio);
|
||||
diffio.dio_internal = diff_internal() && !diff_internal_failed();
|
||||
|
||||
diff_try_update(&diffio, idx_orig, eap);
|
||||
if (diffio.dio_internal && diff_internal_failed())
|
||||
{
|
||||
// Internal diff failed, use external diff instead.
|
||||
vim_memset(&diffio, 0, sizeof(diffio));
|
||||
CLEAR_FIELD(diffio);
|
||||
diff_try_update(&diffio, idx_orig, eap);
|
||||
}
|
||||
|
||||
@@ -1072,9 +1075,9 @@ diff_file_internal(diffio_T *diffio)
|
||||
xdemitconf_t emit_cfg;
|
||||
xdemitcb_t emit_cb;
|
||||
|
||||
vim_memset(¶m, 0, sizeof(param));
|
||||
vim_memset(&emit_cfg, 0, sizeof(emit_cfg));
|
||||
vim_memset(&emit_cb, 0, sizeof(emit_cb));
|
||||
CLEAR_FIELD(param);
|
||||
CLEAR_FIELD(emit_cfg);
|
||||
CLEAR_FIELD(emit_cb);
|
||||
|
||||
param.flags = diff_algorithm;
|
||||
|
||||
@@ -1857,7 +1860,7 @@ diff_check(win_T *wp, linenr_T lnum)
|
||||
#endif
|
||||
|
||||
// search for a change that includes "lnum" in the list of diffblocks.
|
||||
for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next)
|
||||
FOR_ALL_DIFFBLOCKS_IN_TAB(curtab, dp)
|
||||
if (lnum <= dp->df_lnum[idx] + dp->df_count[idx])
|
||||
break;
|
||||
if (dp == NULL || lnum < dp->df_lnum[idx])
|
||||
@@ -2069,7 +2072,7 @@ diff_set_topline(win_T *fromwin, win_T *towin)
|
||||
towin->w_topfill = 0;
|
||||
|
||||
// search for a change that includes "lnum" in the list of diffblocks.
|
||||
for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next)
|
||||
FOR_ALL_DIFFBLOCKS_IN_TAB(curtab, dp)
|
||||
if (lnum <= dp->df_lnum[fromidx] + dp->df_count[fromidx])
|
||||
break;
|
||||
if (dp == NULL)
|
||||
@@ -2374,7 +2377,7 @@ diff_find_change(
|
||||
}
|
||||
|
||||
// search for a change that includes "lnum" in the list of diffblocks.
|
||||
for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next)
|
||||
FOR_ALL_DIFFBLOCKS_IN_TAB(curtab, dp)
|
||||
if (lnum <= dp->df_lnum[idx] + dp->df_count[idx])
|
||||
break;
|
||||
if (dp == NULL || diff_check_sanity(curtab, dp) == FAIL)
|
||||
@@ -2508,7 +2511,7 @@ diff_infold(win_T *wp, linenr_T lnum)
|
||||
if (curtab->tp_first_diff == NULL)
|
||||
return TRUE;
|
||||
|
||||
for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next)
|
||||
FOR_ALL_DIFFBLOCKS_IN_TAB(curtab, dp)
|
||||
{
|
||||
// If this change is below the line there can't be any further match.
|
||||
if (dp->df_lnum[idx] - diff_context > lnum)
|
||||
@@ -3001,7 +3004,7 @@ diff_get_corresponding_line_int(
|
||||
if (curtab->tp_first_diff == NULL) // no diffs today
|
||||
return lnum1;
|
||||
|
||||
for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next)
|
||||
FOR_ALL_DIFFBLOCKS_IN_TAB(curtab, dp)
|
||||
{
|
||||
if (dp->df_lnum[idx1] > lnum1)
|
||||
return lnum1 - baseline;
|
||||
@@ -3070,7 +3073,7 @@ diff_lnum_win(linenr_T lnum, win_T *wp)
|
||||
ex_diffupdate(NULL); // update after a big change
|
||||
|
||||
// search for a change that includes "lnum" in the list of diffblocks.
|
||||
for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next)
|
||||
FOR_ALL_DIFFBLOCKS_IN_TAB(curtab, dp)
|
||||
if (lnum <= dp->df_lnum[idx] + dp->df_count[idx])
|
||||
break;
|
||||
|
||||
|
||||
103
src/dosinst.c
103
src/dosinst.c
@@ -847,8 +847,7 @@ install_bat_choice(int idx)
|
||||
|
||||
/*
|
||||
* Don't use double quotes for the "set" argument, also when it
|
||||
* contains a space. The quotes would be included in the value
|
||||
* for MSDOS and NT.
|
||||
* 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)
|
||||
@@ -861,92 +860,52 @@ install_bat_choice(int idx)
|
||||
fprintf(fd, "\n");
|
||||
|
||||
// Give an error message when the executable could not be found.
|
||||
fprintf(fd, "if exist \"%%VIM_EXE_DIR%%\\%s\" goto havevim\n",
|
||||
exename);
|
||||
fprintf(fd, "echo \"%%VIM_EXE_DIR%%\\%s\" not found\n", exename);
|
||||
fprintf(fd, "goto eof\n");
|
||||
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");
|
||||
fprintf(fd, ":havevim\n");
|
||||
|
||||
fprintf(fd, "rem collect the arguments in VIMARGS for Win95\n");
|
||||
fprintf(fd, "set VIMARGS=\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");
|
||||
if (*exename == 'g')
|
||||
{
|
||||
fprintf(fd, "if NOT .%%1==.--nofork goto noforklongarg\n");
|
||||
fprintf(fd, "set VIMNOFORK=1\n");
|
||||
fprintf(fd, ":noforklongarg\n");
|
||||
fprintf(fd, "if NOT .%%1==.-f goto noforkarg\n");
|
||||
fprintf(fd, "set VIMNOFORK=1\n");
|
||||
fprintf(fd, ":noforkarg\n");
|
||||
}
|
||||
fprintf(fd, "set VIMARGS=%%VIMARGS%% %%1\n");
|
||||
fprintf(fd, "shift\n");
|
||||
fprintf(fd, "goto loopstart\n");
|
||||
fprintf(fd, ":loopend\n");
|
||||
fprintf(fd, "\n");
|
||||
|
||||
fprintf(fd, "if .%%OS%%==.Windows_NT goto ntaction\n");
|
||||
fprintf(fd, "\n");
|
||||
|
||||
// For gvim.exe use "start" to avoid that the console window stays
|
||||
// open.
|
||||
if (*exename == 'g')
|
||||
{
|
||||
fprintf(fd, "if .%%VIMNOFORK%%==.1 goto nofork\n");
|
||||
fprintf(fd, "start ");
|
||||
}
|
||||
|
||||
// Always use quotes, $VIM or $VIMRUNTIME might have a space.
|
||||
fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%VIMARGS%%\n",
|
||||
exename, vimarg);
|
||||
fprintf(fd, "goto eof\n");
|
||||
fprintf(fd, "\n");
|
||||
|
||||
if (*exename == 'g')
|
||||
{
|
||||
fprintf(fd, ":nofork\n");
|
||||
fprintf(fd, "start /w ");
|
||||
// Always use quotes, $VIM or $VIMRUNTIME might have a space.
|
||||
fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%VIMARGS%%\n",
|
||||
exename, vimarg);
|
||||
fprintf(fd, "goto eof\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");
|
||||
}
|
||||
|
||||
fprintf(fd, ":ntaction\n");
|
||||
fprintf(fd, "rem for WinNT we can use %%*\n");
|
||||
|
||||
// For gvim.exe use "start /b" to avoid that the console window
|
||||
// stays open.
|
||||
if (*exename == 'g')
|
||||
{
|
||||
fprintf(fd, "if .%%VIMNOFORK%%==.1 goto noforknt\n");
|
||||
fprintf(fd, "start \"dummy\" /b ");
|
||||
// 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");
|
||||
}
|
||||
|
||||
// Always use quotes, $VIM or $VIMRUNTIME might have a space.
|
||||
fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%*\n", exename, vimarg);
|
||||
fprintf(fd, "goto eof\n");
|
||||
fprintf(fd, "\n");
|
||||
|
||||
if (*exename == 'g')
|
||||
else
|
||||
{
|
||||
fprintf(fd, ":noforknt\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, "\n:eof\n");
|
||||
fprintf(fd, "set VIMARGS=\n");
|
||||
if (*exename == 'g')
|
||||
fprintf(fd, "set VIMNOFORK=\n");
|
||||
|
||||
fclose(fd);
|
||||
printf("%s has been %s\n", batpath,
|
||||
oldname == NULL ? "created" : "overwritten");
|
||||
|
||||
@@ -270,7 +270,6 @@ win_line(
|
||||
int tocol = MAXCOL; // end of inverting
|
||||
int fromcol_prev = -2; // start of inverting after cursor
|
||||
int noinvcur = FALSE; // don't invert the cursor
|
||||
pos_T *top, *bot;
|
||||
int lnum_in_visual_area = FALSE;
|
||||
pos_T pos;
|
||||
long v;
|
||||
@@ -535,6 +534,8 @@ win_line(
|
||||
// handle Visual active in this window
|
||||
if (VIsual_active && wp->w_buffer == curwin->w_buffer)
|
||||
{
|
||||
pos_T *top, *bot;
|
||||
|
||||
if (LTOREQ_POS(curwin->w_cursor, VIsual))
|
||||
{
|
||||
// Visual is after curwin->w_cursor
|
||||
@@ -1140,11 +1141,11 @@ win_line(
|
||||
}
|
||||
|
||||
#ifdef FEAT_LINEBREAK
|
||||
if (wp->w_p_brisbr && draw_state == WL_BRI - 1
|
||||
if (wp->w_briopt_sbr && draw_state == WL_BRI - 1
|
||||
&& n_extra == 0 && *get_showbreak_value(wp) != NUL)
|
||||
// draw indent after showbreak value
|
||||
draw_state = WL_BRI;
|
||||
else if (wp->w_p_brisbr && draw_state == WL_SBR && n_extra == 0)
|
||||
else if (wp->w_briopt_sbr && draw_state == WL_SBR && n_extra == 0)
|
||||
// After the showbreak, draw the breakindent
|
||||
draw_state = WL_BRI - 1;
|
||||
|
||||
@@ -1176,7 +1177,7 @@ win_line(
|
||||
c_final = NUL;
|
||||
n_extra = get_breakindent_win(wp,
|
||||
ml_get_buf(wp->w_buffer, lnum, FALSE));
|
||||
if (wp->w_skipcol > 0 && wp->w_p_wrap)
|
||||
if (wp->w_skipcol > 0 && wp->w_p_wrap && wp->w_briopt_sbr)
|
||||
need_showbreak = FALSE;
|
||||
// Correct end of highlighted area for 'breakindent',
|
||||
// required when 'linebreak' is also set.
|
||||
|
||||
@@ -69,6 +69,11 @@ static void win_update(win_T *wp);
|
||||
#ifdef FEAT_STL_OPT
|
||||
static void redraw_custom_statusline(win_T *wp);
|
||||
#endif
|
||||
#if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_CLIPBOARD)
|
||||
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
|
||||
@@ -81,10 +86,8 @@ update_screen(int type_arg)
|
||||
int type = type_arg;
|
||||
win_T *wp;
|
||||
static int did_intro = FALSE;
|
||||
#if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_CLIPBOARD)
|
||||
int did_one;
|
||||
#endif
|
||||
#ifdef FEAT_GUI
|
||||
int did_one = FALSE;
|
||||
int did_undraw = FALSE;
|
||||
int gui_cursor_col = 0;
|
||||
int gui_cursor_row = 0;
|
||||
@@ -276,7 +279,7 @@ update_screen(int type_arg)
|
||||
// Go from top to bottom through the windows, redrawing the ones that need
|
||||
// it.
|
||||
#if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_CLIPBOARD)
|
||||
did_one = FALSE;
|
||||
did_update_one_window = FALSE;
|
||||
#endif
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
screen_search_hl.rm.regprog = NULL;
|
||||
@@ -286,21 +289,11 @@ update_screen(int type_arg)
|
||||
if (wp->w_redr_type != 0)
|
||||
{
|
||||
cursor_off();
|
||||
#if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_CLIPBOARD)
|
||||
#ifdef FEAT_GUI
|
||||
if (!did_one)
|
||||
{
|
||||
did_one = TRUE;
|
||||
# ifdef FEAT_SEARCH_EXTRA
|
||||
start_search_hl();
|
||||
# endif
|
||||
# ifdef FEAT_CLIPBOARD
|
||||
// When Visual area changed, may have to update selection.
|
||||
if (clip_star.available && clip_isautosel_star())
|
||||
clip_update_selection(&clip_star);
|
||||
if (clip_plus.available && clip_isautosel_plus())
|
||||
clip_update_selection(&clip_plus);
|
||||
# endif
|
||||
#ifdef FEAT_GUI
|
||||
|
||||
// Remove the cursor before starting to do anything, because
|
||||
// scrolling may make it difficult to redraw the text under
|
||||
// it.
|
||||
@@ -311,9 +304,9 @@ update_screen(int type_arg)
|
||||
gui_undraw_cursor();
|
||||
did_undraw = TRUE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
win_update(wp);
|
||||
}
|
||||
|
||||
@@ -391,7 +384,7 @@ update_screen(int type_arg)
|
||||
* If "ignore_pum" is TRUE, also redraw statusline when the popup menu is
|
||||
* displayed.
|
||||
*/
|
||||
void
|
||||
static void
|
||||
win_redr_status(win_T *wp, int ignore_pum UNUSED)
|
||||
{
|
||||
int row;
|
||||
@@ -970,7 +963,7 @@ redraw_win_toolbar(win_T *wp)
|
||||
int button_attr = syn_name2attr((char_u *)"ToolbarButton");
|
||||
|
||||
vim_free(wp->w_winbar_items);
|
||||
for (menu = wp->w_winbar->children; menu != NULL; menu = menu->next)
|
||||
FOR_ALL_CHILD_MENUS(wp->w_winbar, menu)
|
||||
++item_count;
|
||||
wp->w_winbar_items = ALLOC_CLEAR_MULT(winbar_item_T, item_count + 1);
|
||||
|
||||
@@ -1422,6 +1415,25 @@ win_update(win_T *wp)
|
||||
proftime_T syntax_tm;
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_CLIPBOARD)
|
||||
// This needs to be done only for the first window when update_screen() is
|
||||
// called.
|
||||
if (!did_update_one_window)
|
||||
{
|
||||
did_update_one_window = TRUE;
|
||||
# ifdef FEAT_SEARCH_EXTRA
|
||||
start_search_hl();
|
||||
# endif
|
||||
# ifdef FEAT_CLIPBOARD
|
||||
// When Visual area changed, may have to update selection.
|
||||
if (clip_star.available && clip_isautosel_star())
|
||||
clip_update_selection(&clip_star);
|
||||
if (clip_plus.available && clip_isautosel_plus())
|
||||
clip_update_selection(&clip_plus);
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
type = wp->w_redr_type;
|
||||
|
||||
if (type == NOT_VALID)
|
||||
@@ -3025,6 +3037,11 @@ redraw_buf_later(buf_T *buf, int type)
|
||||
if (wp->w_buffer == buf)
|
||||
redraw_win_later(wp, type);
|
||||
}
|
||||
#if defined(FEAT_TERMINAL) && defined(FEAT_PROP_POPUP)
|
||||
// terminal in popup window is not in list of windows
|
||||
if (curwin->w_buffer == buf)
|
||||
redraw_win_later(curwin, type);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(FEAT_SIGNS) || defined(PROTO)
|
||||
|
||||
@@ -1612,6 +1612,10 @@ decodeModifyOtherKeys(int c)
|
||||
// Match, consume the code.
|
||||
typebuf.tb_off += idx + 1;
|
||||
typebuf.tb_len -= idx + 1;
|
||||
#if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL)
|
||||
if (typebuf.tb_len == 0)
|
||||
typebuf_was_filled = FALSE;
|
||||
#endif
|
||||
|
||||
mod_mask = decode_modifiers(arg[!form]);
|
||||
c = merge_modifyOtherKeys(arg[form]);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user