mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-05-28 00:21:57 +02:00
Compare commits
373 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f7ff60b4f2 | |||
| 0a444c1956 | |||
| cf80560781 | |||
| 41adbabe54 | |||
| 79541d2844 | |||
| 7d8b5890c1 | |||
| bbad3edf5a | |||
| ab71bd8d69 | |||
| 51a7454cd2 | |||
| b513d3079b | |||
| d2ec51f399 | |||
| 5378e1cf0a | |||
| 0db547d459 | |||
| 63dbd5838d | |||
| 4ba02a87ed | |||
| ed8bc78d23 | |||
| 2fb8f684d8 | |||
| 614ab8aa00 | |||
| 07dc18ffa4 | |||
| 01a060da74 | |||
| 8ff5af9544 | |||
| 76a6345433 | |||
| dabe5a224a | |||
| 10efcd5b02 | |||
| 1341024e08 | |||
| bbbdc4731a | |||
| 6e1489e531 | |||
| 007de995cb | |||
| acb1c07777 | |||
| b1e26a6b4c | |||
| af6bd98de1 | |||
| d8606ce022 | |||
| 7e1b43e6c2 | |||
| e126fa9652 | |||
| 3067a4dd0d | |||
| 4ace6ab7e7 | |||
| dc2f73a698 | |||
| b730f0c7ba | |||
| 916a818cea | |||
| 4e303c8ba8 | |||
| e5d11768a2 | |||
| 1a0d5034a6 | |||
| 8e5b2b51bd | |||
| 5ad7ee8107 | |||
| f951416a83 | |||
| 7c6b2b0e86 | |||
| 2b84949ad8 | |||
| 247bb7e43b | |||
| 82e8c92ebe | |||
| 8fbb254859 | |||
| 199fa1f766 | |||
| dd1d7f6c3c | |||
| 2aa9b8f2c5 | |||
| dc42fa339e | |||
| 1447ebfdfb | |||
| ea5fe03309 | |||
| 5958f95a40 | |||
| 48d23bb4de | |||
| b3907e6722 | |||
| 3df190c296 | |||
| addc156c38 | |||
| 6b731886ca | |||
| 25a494ce60 | |||
| 447f6ce8bd | |||
| 2d67d307ee | |||
| dbc0d2163a | |||
| c0f05d0bd1 | |||
| f77af0e613 | |||
| c4568ab37e | |||
| f0d58efc9d | |||
| 0c27cbcacf | |||
| 61fb8d8c67 | |||
| d3471e5785 | |||
| c2c02574ec | |||
| b244373bec | |||
| f3aea59afa | |||
| 883ba68cda | |||
| 218959bc91 | |||
| f49cc60aa8 | |||
| 2c43cd672d | |||
| 8617b40159 | |||
| d42333d8e9 | |||
| ddd1f9183b | |||
| ded5f1bed7 | |||
| 1bbb619483 | |||
| 98fed9dfc9 | |||
| 49b33ba08a | |||
| c5e9d1f5b4 | |||
| eda162cdbb | |||
| 0b95deff83 | |||
| d0721058f4 | |||
| 389ab7122b | |||
| 9e353b5265 | |||
| ba3ff53930 | |||
| dcd71cbaed | |||
| fdb10af4c1 | |||
| 0b38f54730 | |||
| 0f62cf5b33 | |||
| da1c11c641 | |||
| 9691f82f86 | |||
| bd9a0c611c | |||
| 4dbc262764 | |||
| 91aa372a22 | |||
| 8400c5301d | |||
| 57dd4c6884 | |||
| f7acf2b63c | |||
| fa0fad6d73 | |||
| ad821e46d9 | |||
| 5502bbf9ff | |||
| f080d70a82 | |||
| 324ff06148 | |||
| a9a8e04eab | |||
| 0e473839d0 | |||
| 833e5dab14 | |||
| 7dd6ce67e2 | |||
| 1c29943416 | |||
| d474686a09 | |||
| 5f57bdcab7 | |||
| c0fe4978f2 | |||
| f86db78fed | |||
| babfcf54ae | |||
| e6e3989c1b | |||
| bf9679ae46 | |||
| 93d7fe4bd5 | |||
| 0fd6be77de | |||
| eda9e9c2fe | |||
| b6f1480a6a | |||
| 9f84ded38b | |||
| 4c5d815256 | |||
| 42a4ea10af | |||
| 839e81e12d | |||
| 38654503b0 | |||
| 2c64ca1802 | |||
| 04c86d27fe | |||
| 115510f0bd | |||
| 29e7fe55be | |||
| b361db077f | |||
| 64f410742f | |||
| 65dc12143a | |||
| d95c3c253c | |||
| a2aad02830 | |||
| 27e80c885b | |||
| a16bc54503 | |||
| d6105cb408 | |||
| 6cdb2c9811 | |||
| 453ce7c16b | |||
| 3d6014f033 | |||
| 108e7b422b | |||
| 4be190ebe6 | |||
| 0664089ecc | |||
| 1d3dbcf743 | |||
| 6a2633b00b | |||
| 95ba5c364f | |||
| 1df2fa47b4 | |||
| 798184cc67 | |||
| c0543e145f | |||
| 00bf8cd211 | |||
| 1307d1c003 | |||
| a05a0d325c | |||
| df77cef92e | |||
| 0cc7b2d6cc | |||
| d8f27b30d6 | |||
| 019dfe6855 | |||
| 2610990709 | |||
| 8295666dc2 | |||
| 7554c548a4 | |||
| 8b2dcf4d6e | |||
| 2bc152ab53 | |||
| 0e9deefb4f | |||
| 7701f30856 | |||
| 4a5abbd613 | |||
| 586c70cdfe | |||
| 4f88875725 | |||
| 35bc7d6c52 | |||
| 54ade9f7e3 | |||
| 95bafa296a | |||
| 6bfafd9d5f | |||
| 6dff58f15c | |||
| f45d747ebf | |||
| d3dc062160 | |||
| 2bfddfc508 | |||
| 438d176e35 | |||
| b434ae2a1f | |||
| 95892c27b2 | |||
| dfe72b890a | |||
| ee91c33570 | |||
| 8c63e0ec31 | |||
| 09037503ea | |||
| 31cbadf74b | |||
| 45c5c86e63 | |||
| 6dae96ef7a | |||
| d339828b4b | |||
| c75878c923 | |||
| 3b30168f04 | |||
| 7ff8a3cfb6 | |||
| 4841a7ccae | |||
| 7b3e0ab5a8 | |||
| 3616c83b36 | |||
| 592e3c7823 | |||
| a968ddf5a4 | |||
| d716ad7ff8 | |||
| 9cea87c577 | |||
| e76d7a63df | |||
| 0bd4051732 | |||
| 4ff4290de1 | |||
| 76c612a166 | |||
| 1f402806b8 | |||
| de2bd37bec | |||
| b872e63fc6 | |||
| 036b09ca78 | |||
| b0e982bf05 | |||
| d4f73438bb | |||
| 3f3fb0b147 | |||
| 933bef779a | |||
| d9c3c62eaf | |||
| 92fcfe15a5 | |||
| 1f7e0c9ec1 | |||
| 92cbf62b87 | |||
| cec12cd661 | |||
| 476c0db002 | |||
| 4b1c9a91b5 | |||
| 365fede8af | |||
| a87f8fd3fe | |||
| fe15b7dfa6 | |||
| 9e81db9742 | |||
| 664323e7c8 | |||
| e961cba3cb | |||
| cc3a997746 | |||
| 198fa066b2 | |||
| acf95bfed2 | |||
| 110bd60985 | |||
| d2b58c0a2c | |||
| 65985ac998 | |||
| 8f4499b816 | |||
| e8fa05b5bc | |||
| 42c63356d7 | |||
| 6e272acc82 | |||
| e3521d9cbb | |||
| 785fc6567f | |||
| 50eb16c3b2 | |||
| ac49f61a20 | |||
| ab18673731 | |||
| da1f71d75f | |||
| d02a1945e3 | |||
| 33c20214bc | |||
| bf1c1b8513 | |||
| 24839edc54 | |||
| fe8ef98dd1 | |||
| c91c500348 | |||
| 8aeb504fc6 | |||
| a214079008 | |||
| 0f7683f973 | |||
| 5c6f574bd1 | |||
| 32d19c1820 | |||
| 78dcd4f002 | |||
| 0d5f21c3df | |||
| 42335f50bc | |||
| c787539747 | |||
| 3b8defd0a5 | |||
| cfcb2d4ffe | |||
| bd9a53c06c | |||
| 1b7fefcbce | |||
| 90a997987d | |||
| 643b614087 | |||
| 274cea35c6 | |||
| 3f1f9b0f9d | |||
| 67f8ab8299 | |||
| 25328e39d2 | |||
| 84d9390480 | |||
| be7053b6bd | |||
| 007921611b | |||
| 4c7b08f640 | |||
| e797abf3c7 | |||
| c93262b2e3 | |||
| f29c1c6aa3 | |||
| 6b0b83f768 | |||
| e828b7621c | |||
| 84f1c3dbe4 | |||
| 93a1df2c20 | |||
| 6f8bdab8e2 | |||
| a5c48c2698 | |||
| 02c972153d | |||
| 99f043a57d | |||
| a750ac2288 | |||
| 53c8a478cc | |||
| 99396d4cbf | |||
| d4a1aabe37 | |||
| ea5d7e71c0 | |||
| 198cb66d65 | |||
| 0b1468884a | |||
| ed5a9d6612 | |||
| f29a0fcb35 | |||
| e67a7d690a | |||
| 800c4f7cc1 | |||
| f1c118be93 | |||
| 20aac6c112 | |||
| acca8df9d4 | |||
| c9cc9c78f2 | |||
| 7ee3f15b21 | |||
| 3c5b8cd254 | |||
| 94f01956a5 | |||
| b3c2a8c3b3 | |||
| 32bbd00949 | |||
| 9049b68612 | |||
| f13daa46da | |||
| f6ceaf1e05 | |||
| 379fb76b08 | |||
| dd5d18eadf | |||
| 2bf4fe07b6 | |||
| 8c9e7b00f6 | |||
| 92c1b69641 | |||
| ba7f8db26d | |||
| a449a7c6b9 | |||
| fc65cabb15 | |||
| 627cb6a6b3 | |||
| 6f6ef7c195 | |||
| a06afc7f5e | |||
| 4cbdf155ca | |||
| 490169b266 | |||
| 0529583ff1 | |||
| 98fc8d7b6c | |||
| ef51eff309 | |||
| 7c60505e10 | |||
| 74c8be2c68 | |||
| 2551c037e4 | |||
| 7cb33a14c9 | |||
| 4edfe2d2a2 | |||
| bdfb631f49 | |||
| c206733e6f | |||
| 8b0d5ce881 | |||
| 8e7218c459 | |||
| 3b3a506f57 | |||
| 320bf2d85e | |||
| 4c5765bc47 | |||
| 5178dd4390 | |||
| c631f2df62 | |||
| 47ad5656e1 | |||
| 00f123a565 | |||
| 8e82c057ff | |||
| 8c5e0093c9 | |||
| 2f0f871159 | |||
| 7feb35e778 | |||
| fd6100b2aa | |||
| 0f6b4f06de | |||
| da6e8919e7 | |||
| 830e3583da | |||
| 2e31048c30 | |||
| c26f7c6053 | |||
| f1883479be | |||
| 3f6a16f022 | |||
| d8f0cef2bd | |||
| 142ae736d9 | |||
| 46fad2ef0b | |||
| cea1f9ec52 | |||
| e35b0a69a7 | |||
| 111bbd61e9 | |||
| 264cf5cfaf | |||
| 3b9fcfcffa | |||
| 4d77c65a9e | |||
| 9bc1eac2c7 | |||
| 81f56536b1 | |||
| b476cb7d8d | |||
| 2dfcef4c08 | |||
| 396659592f | |||
| 37b15568c2 | |||
| 167ae42685 | |||
| d7cc163570 | |||
| 2f6a346a4c | |||
| 80d83c094d | |||
| 33c4dbb74b | |||
| effed9315c | |||
| 0065c3fd3b | |||
| 0e4db3d79e |
+26
-8
@@ -4,11 +4,23 @@ dist: trusty
|
||||
os:
|
||||
- osx
|
||||
|
||||
osx_image: xcode9.3
|
||||
osx_image:
|
||||
- xcode7.3
|
||||
- xcode8.3
|
||||
- xcode9.4
|
||||
- xcode10.1
|
||||
|
||||
compiler:
|
||||
- clang
|
||||
|
||||
addons:
|
||||
homebrew:
|
||||
packages:
|
||||
- lua
|
||||
- ruby
|
||||
- python3
|
||||
update: true
|
||||
|
||||
env:
|
||||
- MACOSX_DEPLOYMENT_TARGET=10.8
|
||||
XCODEFLAGS="MACOSX_DEPLOYMENT_TARGET=10.8"
|
||||
@@ -21,17 +33,14 @@ env:
|
||||
vi_cv_dll_name_python=/System/Library/Frameworks/Python.framework/Versions/2.7/Python
|
||||
vi_cv_dll_name_python3=/usr/local/Frameworks/Python.framework/Versions/3.7/Python
|
||||
VIMCMD=src/MacVim/build/Release/MacVim.app/Contents/MacOS/Vim
|
||||
"CONFOPT='--with-features=huge --enable-multibyte --enable-terminal --enable-netbeans --with-tlib=ncurses --enable-cscope --enable-perlinterp=dynamic --enable-pythoninterp=dynamic --enable-python3interp=dynamic --enable-rubyinterp=dynamic --with-ruby-command=/usr/local/bin/ruby --enable-luainterp=dynamic --with-lua-prefix=/usr/local --enable-gui=macvim'"
|
||||
"CONFOPT='--with-features=huge --enable-multibyte --enable-terminal --enable-netbeans --with-tlib=ncurses --enable-cscope --enable-perlinterp=dynamic --enable-pythoninterp=dynamic --enable-python3interp=dynamic --enable-rubyinterp=dynamic --with-ruby-command=/usr/local/opt/ruby/bin/ruby --enable-luainterp=dynamic --with-lua-prefix=/usr/local --enable-gui=macvim'"
|
||||
DYLD_LIBRARY_PATH=/usr/local/opt/ruby/lib:$DYLD_LIBRARY_PATH # Ruby is keg-only in Homebrew, so need to manually link in the path so Vim will know where to look for the binaries.
|
||||
|
||||
sudo: false
|
||||
|
||||
before_install:
|
||||
- brew update || brew update
|
||||
- brew upgrade python
|
||||
- brew install lua
|
||||
- brew install ruby
|
||||
|
||||
script:
|
||||
- set -e
|
||||
- echo "Configuring MacVim" && echo -en "travis_fold:start:config\\r"
|
||||
- NPROC=$(getconf _NPROCESSORS_ONLN)
|
||||
- ./configure $CONFOPT --enable-fail-if-missing
|
||||
- cat src/auto/config.mk
|
||||
@@ -39,15 +48,23 @@ script:
|
||||
- grep -q -- "-DDYNAMIC_PERL_DLL=\\\\\"$vi_cv_dll_name_perl\\\\\"" src/auto/config.mk
|
||||
- grep -q -- "-DDYNAMIC_PYTHON_DLL=\\\\\"$vi_cv_dll_name_python\\\\\"" src/auto/config.mk
|
||||
- grep -q -- "-DDYNAMIC_PYTHON3_DLL=\\\\\"$vi_cv_dll_name_python3\\\\\"" src/auto/config.mk
|
||||
- echo -en "travis_fold:end:config\\r"
|
||||
- echo "Building MacVim" && echo -en "travis_fold:start:build\\r"
|
||||
- make -j$NPROC
|
||||
- echo -en "travis_fold:end:build\\r"
|
||||
- echo "Testing MacVim" && echo -en "travis_fold:start:test\\r"
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "lua print(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "perl VIM::Msg(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "py import sys; print(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "py3 import sys; print(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "ruby puts(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result;
|
||||
- make test
|
||||
- echo -en "travis_fold:end:test\\r"
|
||||
- echo "Testing MacVim (GUI)" && echo -en "travis_fold:start:test_gui\\r"
|
||||
- make -C src/testdir clean
|
||||
- make -C src testgui
|
||||
- echo -en "travis_fold:end:test_gui\\r"
|
||||
|
||||
before_deploy:
|
||||
- make -C src macvim-dmg
|
||||
@@ -58,6 +75,7 @@ deploy:
|
||||
file: src/MacVim/build/Release/MacVim.dmg
|
||||
skip_cleanup: true
|
||||
on:
|
||||
condition: $TRAVIS_OSX_IMAGE = xcode10.1
|
||||
all_branches: true
|
||||
tags: true
|
||||
repo: macvim-dev/macvim
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# List of distributed Vim files.
|
||||
# Used by Makefile and upload.aap.
|
||||
# Used by Makefile.
|
||||
|
||||
# source files for all source archives
|
||||
SRC_ALL = \
|
||||
@@ -101,9 +101,7 @@ SRC_ALL = \
|
||||
src/window.c \
|
||||
src/tee/tee.c \
|
||||
src/xxd/xxd.c \
|
||||
src/main.aap \
|
||||
src/testdir/gen_opt_test.vim \
|
||||
src/testdir/main.aap \
|
||||
src/testdir/README.txt \
|
||||
src/testdir/Make_all.mak \
|
||||
src/testdir/*.in \
|
||||
@@ -143,6 +141,7 @@ SRC_ALL = \
|
||||
src/testdir/if_ver*.vim \
|
||||
src/testdir/color_ramp.vim \
|
||||
src/proto.h \
|
||||
src/protodef.h \
|
||||
src/proto/arabic.pro \
|
||||
src/proto/beval.pro \
|
||||
src/proto/blowfish.pro \
|
||||
@@ -229,7 +228,7 @@ SRC_ALL = \
|
||||
src/libvterm/src/parser.c \
|
||||
src/libvterm/src/pen.c \
|
||||
src/libvterm/src/rect.h \
|
||||
src/libvterm/src/screen.c \
|
||||
src/libvterm/src/termscreen.c \
|
||||
src/libvterm/src/state.c \
|
||||
src/libvterm/src/unicode.c \
|
||||
src/libvterm/src/utf8.h \
|
||||
@@ -275,6 +274,22 @@ SRC_ALL = \
|
||||
src/libvterm/t/92lp1640917.test \
|
||||
src/libvterm/t/harness.c \
|
||||
src/libvterm/t/run-test.pl \
|
||||
src/xdiff/COPYING \
|
||||
src/xdiff/README.txt \
|
||||
src/xdiff/xdiff.h \
|
||||
src/xdiff/xdiffi.c \
|
||||
src/xdiff/xdiffi.h \
|
||||
src/xdiff/xemit.c \
|
||||
src/xdiff/xemit.h \
|
||||
src/xdiff/xhistogram.c \
|
||||
src/xdiff/xinclude.h \
|
||||
src/xdiff/xmacros.h \
|
||||
src/xdiff/xpatience.c \
|
||||
src/xdiff/xprepare.c \
|
||||
src/xdiff/xprepare.h \
|
||||
src/xdiff/xtypes.h \
|
||||
src/xdiff/xutils.c \
|
||||
src/xdiff/xutils.h \
|
||||
|
||||
|
||||
# source files for Unix only
|
||||
@@ -291,7 +306,6 @@ SRC_UNIX = \
|
||||
src/INSTALLx.txt \
|
||||
src/Makefile \
|
||||
src/auto/configure \
|
||||
src/config.aap.in \
|
||||
src/config.h.in \
|
||||
src/config.mk.dist \
|
||||
src/config.mk.in \
|
||||
@@ -612,7 +626,6 @@ RT_ALL = \
|
||||
runtime/macros/matchit.vim \
|
||||
runtime/macros/maze/README.txt \
|
||||
runtime/macros/maze/[mM]akefile \
|
||||
runtime/macros/maze/main.aap \
|
||||
runtime/macros/maze/maze.c \
|
||||
runtime/macros/maze/maze_5.78 \
|
||||
runtime/macros/maze/maze_mac \
|
||||
@@ -640,6 +653,7 @@ RT_ALL = \
|
||||
runtime/tutor/tutor \
|
||||
runtime/tutor/tutor.vim \
|
||||
runtime/vimrc_example.vim \
|
||||
runtime/pack/dist/opt/cfilter/plugin/cfilter.vim \
|
||||
runtime/pack/dist/opt/dvorak/plugin/dvorak.vim \
|
||||
runtime/pack/dist/opt/dvorak/dvorak/enable.vim \
|
||||
runtime/pack/dist/opt/dvorak/dvorak/disable.vim \
|
||||
@@ -677,6 +691,11 @@ RT_SCRIPTS = \
|
||||
runtime/compiler/README.txt \
|
||||
runtime/indent/*.vim \
|
||||
runtime/indent/README.txt \
|
||||
runtime/indent/Makefile \
|
||||
runtime/indent/testdir/README.txt \
|
||||
runtime/indent/testdir/*.vim \
|
||||
runtime/indent/testdir/*.in \
|
||||
runtime/indent/testdir/*.ok \
|
||||
runtime/ftplugin/*.vim \
|
||||
runtime/ftplugin/logtalk.dict \
|
||||
runtime/ftplugin/README.txt \
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
VIM LICENSE
|
||||
|
||||
I) There are no restrictions on distributing unmodified copies of Vim except
|
||||
that they must include this license text. You can also distribute
|
||||
unmodified parts of Vim, likewise unrestricted except that they must
|
||||
include this license text. You are also allowed to include executables
|
||||
that you made from the unmodified Vim sources, plus your own usage
|
||||
examples and Vim scripts.
|
||||
|
||||
II) It is allowed to distribute a modified (or extended) version of Vim,
|
||||
including executables and/or source code, when the following four
|
||||
conditions are met:
|
||||
1) This license text must be included unmodified.
|
||||
2) The modified Vim must be distributed in one of the following five ways:
|
||||
a) If you make changes to Vim yourself, you must clearly describe in
|
||||
the distribution how to contact you. When the maintainer asks you
|
||||
(in any way) for a copy of the modified Vim you distributed, you
|
||||
must make your changes, including source code, available to the
|
||||
maintainer without fee. The maintainer reserves the right to
|
||||
include your changes in the official version of Vim. What the
|
||||
maintainer will do with your changes and under what license they
|
||||
will be distributed is negotiable. If there has been no negotiation
|
||||
then this license, or a later version, also applies to your changes.
|
||||
The current maintainer is Bram Moolenaar <Bram@vim.org>. If this
|
||||
changes it will be announced in appropriate places (most likely
|
||||
vim.sf.net, www.vim.org and/or comp.editors). When it is completely
|
||||
impossible to contact the maintainer, the obligation to send him
|
||||
your changes ceases. Once the maintainer has confirmed that he has
|
||||
received your changes they will not have to be sent again.
|
||||
b) If you have received a modified Vim that was distributed as
|
||||
mentioned under a) you are allowed to further distribute it
|
||||
unmodified, as mentioned at I). If you make additional changes the
|
||||
text under a) applies to those changes.
|
||||
c) Provide all the changes, including source code, with every copy of
|
||||
the modified Vim you distribute. This may be done in the form of a
|
||||
context diff. You can choose what license to use for new code you
|
||||
add. The changes and their license must not restrict others from
|
||||
making their own changes to the official version of Vim.
|
||||
d) When you have a modified Vim which includes changes as mentioned
|
||||
under c), you can distribute it without the source code for the
|
||||
changes if the following three conditions are met:
|
||||
- The license that applies to the changes permits you to distribute
|
||||
the changes to the Vim maintainer without fee or restriction, and
|
||||
permits the Vim maintainer to include the changes in the official
|
||||
version of Vim without fee or restriction.
|
||||
- You keep the changes for at least three years after last
|
||||
distributing the corresponding modified Vim. When the maintainer
|
||||
or someone who you distributed the modified Vim to asks you (in
|
||||
any way) for the changes within this period, you must make them
|
||||
available to him.
|
||||
- You clearly describe in the distribution how to contact you. This
|
||||
contact information must remain valid for at least three years
|
||||
after last distributing the corresponding modified Vim, or as long
|
||||
as possible.
|
||||
e) When the GNU General Public License (GPL) applies to the changes,
|
||||
you can distribute the modified Vim under the GNU GPL version 2 or
|
||||
any later version.
|
||||
3) A message must be added, at least in the output of the ":version"
|
||||
command and in the intro screen, such that the user of the modified Vim
|
||||
is able to see that it was modified. When distributing as mentioned
|
||||
under 2)e) adding the message is only required for as far as this does
|
||||
not conflict with the license used for the changes.
|
||||
4) The contact information as required under 2)a) and 2)d) must not be
|
||||
removed or changed, except that the person himself can make
|
||||
corrections.
|
||||
|
||||
III) If you distribute a modified version of Vim, you are encouraged to use
|
||||
the Vim license for your changes and make them available to the
|
||||
maintainer, including the source code. The preferred way to do this is
|
||||
by e-mail or by uploading the files to a server and e-mailing the URL.
|
||||
If the number of changes is small (e.g., a modified Makefile) e-mailing a
|
||||
context diff will do. The e-mail address to be used is
|
||||
<maintainer@vim.org>
|
||||
|
||||
IV) It is not allowed to remove this license from the distribution of the Vim
|
||||
sources, parts of it or from a modified version. You may use this
|
||||
license for previous Vim releases instead of the license that they came
|
||||
with, at your option.
|
||||
@@ -1,10 +1,7 @@
|
||||
Vim - the text editor - for Mac OS X
|
||||
|
||||
This is the official GitHub repository for MacVim, the macOS port of [vim](https://github.com/vim/vim). It is based on
|
||||
[Björn Winckler's repository](https://github.com/b4winckler/macvim), which was official until he stepped down as the
|
||||
maintainer of the port.
|
||||
|
||||
- MacVim homepage http://macvim-dev.github.io/macvim
|
||||
- MacVim homepage https://macvim-dev.github.io/macvim
|
||||
|
||||
- Vim README https://github.com/macvim-dev/macvim/blob/master/README_vim.md
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_zOS.txt for version 8.1 of Vim: Vi IMproved.
|
||||
README_os390.txt for version 8.1 of Vim: Vi IMproved.
|
||||
|
||||
This readme explains how to build Vim on z/OS. Formerly called OS/390.
|
||||
See "README.txt" for general information about Vim.
|
||||
|
||||
+8
-6
@@ -15,6 +15,7 @@ To build the installable .exe:
|
||||
vimrun.exe,
|
||||
install.exe,
|
||||
uninstal.exe,
|
||||
tee/tee.exe,
|
||||
xxd/xxd.exe,
|
||||
|
||||
Then execute tools/rename.bat to rename the executables. (mv command is
|
||||
@@ -29,14 +30,15 @@ To build the installable .exe:
|
||||
4. Go to the VisVim directory and build VisVim.dll (or get it from a binary
|
||||
archive).
|
||||
|
||||
5. Go to the OleVim directory and build OpenWithVim.exe and SendToVim.exe (or
|
||||
get them from a binary archive).
|
||||
|
||||
6. Get a "diff.exe" program and put it in the "../.." directory (above the
|
||||
"vim80" directory, it's the same for all Vim versions).
|
||||
5. Get a "diff.exe" program. If you skip this the built-in diff will always
|
||||
be used (which is fine for most users). If you do have your own
|
||||
"diff.exe" put it in the "../.." directory (above the "vim81" directory,
|
||||
it's the same for all Vim versions).
|
||||
You can find one in previous Vim versions or in this archive:
|
||||
http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz
|
||||
Also put winpty32.dll and winpty-agent.exe there.
|
||||
|
||||
6 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim81"
|
||||
directory). This is required for the terminal window.
|
||||
|
||||
7. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have
|
||||
to do this on Unix. Make sure the file is in DOS file format!
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2012 Jun 20
|
||||
" Last Change: 2018 Aug 20
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
@@ -72,8 +72,10 @@ function! ccomplete#Complete(findstart, base)
|
||||
" Split item in words, keep empty word after "." or "->".
|
||||
" "aa" -> ['aa'], "aa." -> ['aa', ''], "aa.bb" -> ['aa', 'bb'], etc.
|
||||
" We can't use split, because we need to skip nested [...].
|
||||
" "aa[...]" -> ['aa', '[...]'], "aa.bb[...]" -> ['aa', 'bb', '[...]'], etc.
|
||||
let items = []
|
||||
let s = 0
|
||||
let arrays = 0
|
||||
while 1
|
||||
let e = match(base, '\.\|->\|\[', s)
|
||||
if e < 0
|
||||
@@ -107,6 +109,7 @@ function! ccomplete#Complete(findstart, base)
|
||||
endwhile
|
||||
let e += 1
|
||||
call add(items, strpart(base, s, e - s))
|
||||
let arrays += 1
|
||||
let s = e
|
||||
endif
|
||||
endwhile
|
||||
@@ -161,15 +164,26 @@ function! ccomplete#Complete(findstart, base)
|
||||
endif
|
||||
endif
|
||||
let res = [{'match': match, 'tagline' : '', 'kind' : kind, 'info' : line}]
|
||||
elseif len(items) == arrays + 1
|
||||
" Completing one word and it's a local array variable: build tagline
|
||||
" from declaration line
|
||||
let match = items[0]
|
||||
let kind = 'v'
|
||||
let tagline = "\t/^" . line . '$/'
|
||||
let res = [{'match': match, 'tagline' : tagline, 'kind' : kind, 'info' : line}]
|
||||
else
|
||||
" Completing "var.", "var.something", etc.
|
||||
let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
if len(items) == 1
|
||||
if len(items) == 1 || len(items) == arrays + 1
|
||||
" Only one part, no "." or "->": complete from tags file.
|
||||
let tags = taglist('^' . base)
|
||||
if len(items) == 1
|
||||
let tags = taglist('^' . base)
|
||||
else
|
||||
let tags = taglist('^' . items[0] . '$')
|
||||
endif
|
||||
|
||||
" Remove members, these can't appear without something in front.
|
||||
call filter(tags, 'has_key(v:val, "kind") ? v:val["kind"] != "m" : 1')
|
||||
@@ -516,11 +530,24 @@ function! s:StructMembers(typename, items, all)
|
||||
endif
|
||||
endif
|
||||
|
||||
" Skip over [...] items
|
||||
let idx = 0
|
||||
while 1
|
||||
if idx >= len(a:items)
|
||||
let target = '' " No further items, matching all members
|
||||
break
|
||||
endif
|
||||
if a:items[idx][0] != '['
|
||||
let target = a:items[idx]
|
||||
break
|
||||
endif
|
||||
let idx += 1
|
||||
endwhile
|
||||
" Put matching members in matches[].
|
||||
let matches = []
|
||||
for l in qflist
|
||||
let memb = matchstr(l['text'], '[^\t]*')
|
||||
if memb =~ '^' . a:items[0]
|
||||
if memb =~ '^' . target
|
||||
" Skip matches local to another file.
|
||||
if match(l['text'], "\tfile:") < 0 || bufnr('%') == bufnr(matchstr(l['text'], '\t\zs[^\t]*'))
|
||||
let item = {'match': memb, 'tagline': l['text']}
|
||||
@@ -540,8 +567,8 @@ function! s:StructMembers(typename, items, all)
|
||||
endfor
|
||||
|
||||
if len(matches) > 0
|
||||
" Skip over [...] items
|
||||
let idx = 1
|
||||
" Skip over next [...] items
|
||||
let idx += 1
|
||||
while 1
|
||||
if idx >= len(a:items)
|
||||
return matches " No further items, return the result.
|
||||
|
||||
Vendored
+2
-2
@@ -126,7 +126,7 @@ endfunc
|
||||
" This function checks if one of the first ten lines start with a '@'. In
|
||||
" that case it is probably a change file.
|
||||
" If the first line starts with # or ! it's probably a ch file.
|
||||
" If a line has "main", "include", "//" ir "/*" it's probably ch.
|
||||
" If a line has "main", "include", "//" or "/*" it's probably ch.
|
||||
" Otherwise CHILL is assumed.
|
||||
func dist#ft#FTchange()
|
||||
let lnum = 1
|
||||
@@ -632,7 +632,7 @@ endfunc
|
||||
" Choose context, plaintex, or tex (LaTeX) based on these rules:
|
||||
" 1. Check the first line of the file for "%&<format>".
|
||||
" 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords.
|
||||
" 3. Default to "latex" or to g:tex_flavor, can be set in user's vimrc.
|
||||
" 3. Default to "plain" or to g:tex_flavor, can be set in user's vimrc.
|
||||
func dist#ft#FTtex()
|
||||
let firstline = getline(1)
|
||||
if firstline =~ '^%&\s*\a\+'
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
|
||||
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" URL: https://github.com/shawncplus/phpcomplete.vim
|
||||
" Last Change: 2016 Oct 10
|
||||
" Last Change: 2018 Oct 10
|
||||
"
|
||||
" OPTIONS:
|
||||
"
|
||||
@@ -146,6 +146,8 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
|
||||
end
|
||||
|
||||
try
|
||||
let eventignore = &eventignore
|
||||
let &eventignore = 'all'
|
||||
let winheight = winheight(0)
|
||||
let winnr = winnr()
|
||||
|
||||
@@ -216,6 +218,7 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
|
||||
endif
|
||||
finally
|
||||
silent! exec winnr.'resize '.winheight
|
||||
let &eventignore = eventignore
|
||||
endtry
|
||||
endfunction
|
||||
" }}}
|
||||
@@ -1393,23 +1396,28 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat
|
||||
for classstructure in classcontents
|
||||
let docblock_target_pattern = 'function\s\+&\?'.method.'\>\|\(public\|private\|protected\|var\).\+\$'.method.'\>\|@property.\+\$'.method.'\>'
|
||||
let doc_str = phpcomplete#GetDocBlock(split(classstructure.content, '\n'), docblock_target_pattern)
|
||||
if doc_str != ''
|
||||
let return_type_hint = phpcomplete#GetFunctionReturnTypeHint(split(classstructure.content, '\n'), 'function\s\+&\?'.method.'\>')
|
||||
if doc_str != '' || return_type_hint != ''
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
if doc_str != ''
|
||||
if doc_str != '' || return_type_hint != ''
|
||||
let docblock = phpcomplete#ParseDocBlock(doc_str)
|
||||
if has_key(docblock.return, 'type') || has_key(docblock.var, 'type') || len(docblock.properties) > 0
|
||||
let type = has_key(docblock.return, 'type') ? docblock.return.type : has_key(docblock.var, 'type') ? docblock.var.type : ''
|
||||
if has_key(docblock.return, 'type') || has_key(docblock.var, 'type') || len(docblock.properties) > 0 || return_type_hint != ''
|
||||
if return_type_hint == ''
|
||||
let type = has_key(docblock.return, 'type') ? docblock.return.type : has_key(docblock.var, 'type') ? docblock.var.type : ''
|
||||
|
||||
if type == ''
|
||||
for property in docblock.properties
|
||||
if property.description =~? method
|
||||
let type = property.type
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
if type == ''
|
||||
for property in docblock.properties
|
||||
if property.description =~? method
|
||||
let type = property.type
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
else
|
||||
let type = return_type_hint
|
||||
end
|
||||
|
||||
" there's a namespace in the type, threat the type as FQCN
|
||||
if type =~ '\\'
|
||||
@@ -1483,7 +1491,7 @@ function! phpcomplete#GetMethodStack(line) " {{{
|
||||
continue
|
||||
endif
|
||||
|
||||
" if it's looks like a string
|
||||
" if it looks like a string
|
||||
if current_char == "'" || current_char == '"'
|
||||
" and it is not escaped
|
||||
if prev_char != '\' || (prev_char == '\' && prev_prev_char == '\')
|
||||
@@ -1587,9 +1595,11 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
elseif function_file != '' && filereadable(function_file)
|
||||
let file_lines = readfile(function_file)
|
||||
let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*&\?\<'.function_name.'\>')
|
||||
let return_type_hint = phpcomplete#GetFunctionReturnTypeHint(file_lines, 'function\s*&\?'.function_name.'\>')
|
||||
let docblock = phpcomplete#ParseDocBlock(docblock_str)
|
||||
if has_key(docblock.return, 'type')
|
||||
let classname_candidate = docblock.return.type
|
||||
let type = has_key(docblock.return, 'type') ? docblock.return.type : return_type_hint
|
||||
if type != ''
|
||||
let classname_candidate = type
|
||||
let [class_candidate_namespace, function_imports] = phpcomplete#GetCurrentNameSpace(file_lines)
|
||||
" try to expand the classname of the returned type with the context got from the function's source file
|
||||
|
||||
@@ -1821,9 +1831,11 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
elseif function_file != '' && filereadable(function_file)
|
||||
let file_lines = readfile(function_file)
|
||||
let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*&\?\<'.function_name.'\>')
|
||||
let return_type_hint = phpcomplete#GetFunctionReturnTypeHint(file_lines, 'function\s*&\?'.function_name.'\>')
|
||||
let docblock = phpcomplete#ParseDocBlock(docblock_str)
|
||||
if has_key(docblock.return, 'type')
|
||||
let classname_candidate = docblock.return.type
|
||||
let type = has_key(docblock.return, 'type') ? docblock.return.type : return_type_hint
|
||||
if type != ''
|
||||
let classname_candidate = type
|
||||
let [class_candidate_namespace, function_imports] = phpcomplete#GetCurrentNameSpace(file_lines)
|
||||
" try to expand the classname of the returned type with the context got from the function's source file
|
||||
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, function_imports)
|
||||
@@ -2413,6 +2425,44 @@ function! phpcomplete#ParseDocBlock(docblock) " {{{
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
function! phpcomplete#GetFunctionReturnTypeHint(sccontent, search)
|
||||
let i = 0
|
||||
let l = 0
|
||||
let function_line_start = -1
|
||||
let function_line_end = -1
|
||||
let sccontent_len = len(a:sccontent)
|
||||
let return_type = ''
|
||||
|
||||
while (i < sccontent_len)
|
||||
let line = a:sccontent[i]
|
||||
" search for a function declaration
|
||||
if line =~? a:search
|
||||
let l = i
|
||||
let function_line_start = i
|
||||
" now search for the first { where the function body starts
|
||||
while l < sccontent_len
|
||||
let line = a:sccontent[l]
|
||||
if line =~? '\V{'
|
||||
let function_line_end = l
|
||||
break
|
||||
endif
|
||||
let l += 1
|
||||
endwhile
|
||||
break
|
||||
endif
|
||||
let i += 1
|
||||
endwhile
|
||||
|
||||
" now grab the lines that holds the function declaration line
|
||||
if function_line_start != -1 && function_line_end != -1
|
||||
let function_line = join(a:sccontent[function_line_start :function_line_end], " ")
|
||||
let class_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
|
||||
let return_type = matchstr(function_line, '\c\s*:\s*\zs'.class_name_pattern.'\ze\s*{')
|
||||
endif
|
||||
return return_type
|
||||
|
||||
endfunction
|
||||
|
||||
function! phpcomplete#GetTypeFromDocBlockParam(docblock_type) " {{{
|
||||
if a:docblock_type !~ '|'
|
||||
return a:docblock_type
|
||||
@@ -2572,7 +2622,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
|
||||
" find kind flags from tags or built in methods for the objects we extracted
|
||||
" they can be either classes, interfaces or namespaces, no other thing is importable in php
|
||||
for [key, import] in items(imports)
|
||||
" if theres a \ in the name we have it's definetly not a built in thing, look for tags
|
||||
" if theres a \ in the name we have it's definitely not a built in thing, look for tags
|
||||
if import.name =~ '\\'
|
||||
let patched_ctags_detected = 0
|
||||
let [classname, namespace_for_classes] = phpcomplete#ExpandClassName(import.name, '\', {})
|
||||
|
||||
@@ -152,10 +152,12 @@ fun! tar#Browse(tarfile)
|
||||
" assuming cygwin
|
||||
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
|
||||
endif
|
||||
|
||||
let curlast= line("$")
|
||||
if tarfile =~# '\.\(gz\|tgz\)$'
|
||||
let gzip_command = s:get_gzip_command(tarfile)
|
||||
" call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
exe "sil! r! " . gzip_command . " -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.lrp'
|
||||
" call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
@@ -287,12 +289,14 @@ fun! tar#Read(fname,mode)
|
||||
else
|
||||
let tar_secure= " "
|
||||
endif
|
||||
|
||||
if tarfile =~# '\.bz2$'
|
||||
" call Decho("7: exe silent r! bzip2 -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
|
||||
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
elseif tarfile =~# '\.\(gz\|tgz\)$'
|
||||
let gzip_command = s:get_gzip_command(tarfile)
|
||||
" call Decho("5: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.tar_secure.shellescape(fname,1))
|
||||
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "sil! r! " . gzip_command . " -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
elseif tarfile =~# '\.lrp$'
|
||||
" call Decho("6: exe silent r! cat ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
|
||||
exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
@@ -389,6 +393,8 @@ fun! tar#Write(fname)
|
||||
let tarfile = substitute(b:tarfile,'tarfile:\(.\{-}\)::.*$','\1','')
|
||||
let fname = substitute(b:tarfile,'tarfile:.\{-}::\(.*\)$','\1','')
|
||||
|
||||
let gzip_command = s:get_gzip_command(tarfile)
|
||||
|
||||
" handle compressed archives
|
||||
if tarfile =~# '\.bz2'
|
||||
call system("bzip2 -d -- ".shellescape(tarfile,0))
|
||||
@@ -396,12 +402,12 @@ fun! tar#Write(fname)
|
||||
let compress= "bzip2 -- ".shellescape(tarfile,0)
|
||||
" call Decho("compress<".compress.">")
|
||||
elseif tarfile =~# '\.gz'
|
||||
call system("gzip -d -- ".shellescape(tarfile,0))
|
||||
call system(gzip_command . " -d -- ".shellescape(tarfile,0))
|
||||
let tarfile = substitute(tarfile,'\.gz','','e')
|
||||
let compress= "gzip -- ".shellescape(tarfile,0)
|
||||
" call Decho("compress<".compress.">")
|
||||
elseif tarfile =~# '\.tgz'
|
||||
call system("gzip -d -- ".shellescape(tarfile,0))
|
||||
call system(gzip_command . " -d -- ".shellescape(tarfile,0))
|
||||
let tarfile = substitute(tarfile,'\.tgz','.tar','e')
|
||||
let compress= "gzip -- ".shellescape(tarfile,0)
|
||||
let tgz = 1
|
||||
@@ -581,7 +587,10 @@ fun! tar#Vimuntar(...)
|
||||
|
||||
" if necessary, decompress the tarball; then, extract it
|
||||
if tartail =~ '\.tgz'
|
||||
if executable("gunzip")
|
||||
let gzip_command = s:get_gzip_command(tarfile)
|
||||
if executable(gzip_command)
|
||||
silent exe "!" . gzip_command . " -d ".shellescape(tartail)
|
||||
elseif executable("gunzip")
|
||||
silent exe "!gunzip ".shellescape(tartail)
|
||||
elseif executable("gzip")
|
||||
silent exe "!gzip -d ".shellescape(tartail)
|
||||
@@ -619,6 +628,28 @@ fun! tar#Vimuntar(...)
|
||||
" call Dret("tar#Vimuntar")
|
||||
endfun
|
||||
|
||||
func s:get_gzip_command(file)
|
||||
" Try using the "file" command to get the actual compression type, since
|
||||
" there is no standard way for the naming: ".tgz", ".tbz", ".txz", etc.
|
||||
" If the "file" command doesn't work fall back to just using the file name.
|
||||
if a:file =~# 'z$'
|
||||
let filetype = system('file ' . a:file)
|
||||
if filetype =~ 'bzip2 compressed' && executable('bzip2')
|
||||
return 'bzip2'
|
||||
endif
|
||||
if filetype =~ 'XZ compressed' && executable('xz')
|
||||
return 'xz'
|
||||
endif
|
||||
endif
|
||||
if a:file =~# 'bz2$'
|
||||
return 'bzip2'
|
||||
endif
|
||||
if a:file =~# 'xz$'
|
||||
return 'xz'
|
||||
endif
|
||||
return 'gzip'
|
||||
endfunc
|
||||
|
||||
" =====================================================================
|
||||
" Modelines And Restoration: {{{1
|
||||
let &cpo= s:keepcpo
|
||||
|
||||
+67
-55
@@ -1,6 +1,6 @@
|
||||
" Vim autoload file for the tohtml plugin.
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2013 Sep 03
|
||||
" Last Change: 2018 Nov 11
|
||||
"
|
||||
" Additional contributors:
|
||||
"
|
||||
@@ -544,12 +544,16 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
" add required javascript in reverse order so we can just call append again
|
||||
" and again without adjusting {{{
|
||||
|
||||
" insert script closing tag
|
||||
call append(style_start, [
|
||||
\ '',
|
||||
\ s:settings.use_xhtml ? '//]]>' : '-->',
|
||||
\ "</script>"
|
||||
\ ])
|
||||
let s:uses_script = s:settings.dynamic_folds || s:settings.line_ids || !empty(s:settings.prevent_copy)
|
||||
|
||||
" insert script closing tag if needed
|
||||
if s:uses_script
|
||||
call append(style_start, [
|
||||
\ '',
|
||||
\ s:settings.use_xhtml ? '//]]>' : '-->',
|
||||
\ "</script>"
|
||||
\ ])
|
||||
endif
|
||||
|
||||
" insert script which corrects the size of small input elements in
|
||||
" prevent_copy mode. See 2html.vim for details on why this is needed and how
|
||||
@@ -575,55 +579,61 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
\ '}'
|
||||
\ ])
|
||||
endif
|
||||
"
|
||||
|
||||
" insert javascript to get IDs from line numbers, and to open a fold before
|
||||
" jumping to any lines contained therein
|
||||
call append(style_start, [
|
||||
\ " /* Always jump to new location even if the line was hidden inside a fold, or",
|
||||
\ " * we corrected the raw number to a line ID.",
|
||||
\ " */",
|
||||
\ " if (lineElem) {",
|
||||
\ " lineElem.scrollIntoView(true);",
|
||||
\ " }",
|
||||
\ " return true;",
|
||||
\ "}",
|
||||
\ "if ('onhashchange' in window) {",
|
||||
\ " window.onhashchange = JumpToLine;",
|
||||
\ "}"
|
||||
\ ])
|
||||
if s:settings.dynamic_folds
|
||||
if s:settings.line_ids
|
||||
call append(style_start, [
|
||||
\ " /* Always jump to new location even if the line was hidden inside a fold, or",
|
||||
\ " * we corrected the raw number to a line ID.",
|
||||
\ " */",
|
||||
\ " if (lineElem) {",
|
||||
\ " lineElem.scrollIntoView(true);",
|
||||
\ " }",
|
||||
\ " return true;",
|
||||
\ "}",
|
||||
\ "if ('onhashchange' in window) {",
|
||||
\ " window.onhashchange = JumpToLine;",
|
||||
\ "}"
|
||||
\ ])
|
||||
|
||||
if s:settings.dynamic_folds
|
||||
call append(style_start, [
|
||||
\ "",
|
||||
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
|
||||
\ " var node = lineElem;",
|
||||
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
|
||||
\ " {",
|
||||
\ " if (node.className == 'closed-fold')",
|
||||
\ " {",
|
||||
\ " /* toggle open the fold ID (remove window ID) */",
|
||||
\ " toggleFold(node.id.substr(4));",
|
||||
\ " }",
|
||||
\ " node = node.parentNode;",
|
||||
\ " }",
|
||||
\ ])
|
||||
endif
|
||||
endif
|
||||
|
||||
if s:settings.line_ids
|
||||
call append(style_start, [
|
||||
\ "",
|
||||
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
|
||||
\ " var node = lineElem;",
|
||||
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
|
||||
\ " {",
|
||||
\ " if (node.className == 'closed-fold')",
|
||||
\ " {",
|
||||
\ " /* toggle open the fold ID (remove window ID) */",
|
||||
\ " toggleFold(node.id.substr(4));",
|
||||
\ " }",
|
||||
\ " node = node.parentNode;",
|
||||
\ "/* function to open any folds containing a jumped-to line before jumping to it */",
|
||||
\ "function JumpToLine()",
|
||||
\ "{",
|
||||
\ " var lineNum;",
|
||||
\ " lineNum = window.location.hash;",
|
||||
\ " lineNum = lineNum.substr(1); /* strip off '#' */",
|
||||
\ "",
|
||||
\ " if (lineNum.indexOf('L') == -1) {",
|
||||
\ " lineNum = 'L'+lineNum;",
|
||||
\ " }",
|
||||
\ " if (lineNum.indexOf('W') == -1) {",
|
||||
\ " lineNum = 'W1'+lineNum;",
|
||||
\ " }",
|
||||
\ " var lineElem = document.getElementById(lineNum);"
|
||||
\ ])
|
||||
endif
|
||||
call append(style_start, [
|
||||
\ "",
|
||||
\ "/* function to open any folds containing a jumped-to line before jumping to it */",
|
||||
\ "function JumpToLine()",
|
||||
\ "{",
|
||||
\ " var lineNum;",
|
||||
\ " lineNum = window.location.hash;",
|
||||
\ " lineNum = lineNum.substr(1); /* strip off '#' */",
|
||||
\ "",
|
||||
\ " if (lineNum.indexOf('L') == -1) {",
|
||||
\ " lineNum = 'L'+lineNum;",
|
||||
\ " }",
|
||||
\ " if (lineNum.indexOf('W') == -1) {",
|
||||
\ " lineNum = 'W1'+lineNum;",
|
||||
\ " }",
|
||||
\ " lineElem = document.getElementById(lineNum);"
|
||||
\ ])
|
||||
|
||||
" Insert javascript to toggle matching folds open and closed in all windows,
|
||||
" if dynamic folding is active.
|
||||
@@ -648,11 +658,13 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
\ ])
|
||||
endif
|
||||
|
||||
" insert script tag; javascript is always needed for the line number
|
||||
" normalization for URL hashes
|
||||
call append(style_start, [
|
||||
\ "<script type='text/javascript'>",
|
||||
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
|
||||
if s:uses_script
|
||||
" insert script tag; javascript is always needed for the line number
|
||||
" normalization for URL hashes
|
||||
call append(style_start, [
|
||||
\ "<script type='text/javascript'>",
|
||||
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
|
||||
endif
|
||||
|
||||
" Insert styles from all the generated html documents and additional styles
|
||||
" for the table-based layout of the side-by-side diff. The diff should take
|
||||
@@ -767,7 +779,7 @@ func! tohtml#GetUserSettings() "{{{
|
||||
if user_settings.no_pre == 0
|
||||
call tohtml#GetOption(user_settings,
|
||||
\ 'expand_tabs',
|
||||
\ &expandtab || &ts != 8 || user_settings.number_lines ||
|
||||
\ &expandtab || &ts != 8 || &vts != '' || user_settings.number_lines ||
|
||||
\ (user_settings.dynamic_folds && !user_settings.no_foldcolumn))
|
||||
else
|
||||
let user_settings.expand_tabs = 1
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Haskell Stack
|
||||
" Maintainer: Daniel Campoverde <alx@sillybytes.net>
|
||||
" Latest Revision: 2018-08-27
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "stack"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%-G%.%#:\ build\ %.%#,
|
||||
\%-G%.%#:\ configure\ %.%#,
|
||||
\%-G[%.%#]%.%#,
|
||||
\%-G%.%#preprocessing\ %.%#,
|
||||
\%-G%.%#configuring\ %.%#,
|
||||
\%-G%.%#building\ %.%#,
|
||||
\%-G%.%#linking\ %.%#,
|
||||
\%-G%.%#installing\ %.%#,
|
||||
\%-G%.%#registering\ %.%#,
|
||||
\%-G%.%#:\ copy/register%.%#,
|
||||
\%-G%.%#process\ exited\ %.%#,
|
||||
\%-G%.%#--builddir=%.%#,
|
||||
\%-G--%.%#,
|
||||
\%-G%.%#\|%.%#,
|
||||
\%E%f:%l:%c:\ error:,%+Z\ \ \ \ %m,
|
||||
\%E%f:%l:%c:\ error:\ %m,%-Z,
|
||||
\%W%f:%l:%c:\ warning:,%+Z\ \ \ \ %m,
|
||||
\%W%f:%l:%c:\ warning:\ %m,%-Z,
|
||||
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -5,6 +5,7 @@
|
||||
" Last Change: 2001 May 27
|
||||
|
||||
aunmenu *
|
||||
tlunmenu *
|
||||
|
||||
silent! unlet did_install_default_menus
|
||||
silent! unlet did_install_syntax_menu
|
||||
|
||||
+12
-2
@@ -301,6 +301,7 @@ Name triggered by ~
|
||||
|FileChangedShellPost| After handling a file changed since editing started
|
||||
|FileChangedRO| before making the first change to a read-only file
|
||||
|
||||
|DiffUpdated| after diffs have been updated
|
||||
|DirChanged| after the working directory has changed
|
||||
|
||||
|ShellCmdPost| after executing a shell command
|
||||
@@ -656,6 +657,11 @@ FileChangedRO Before making the first change to a read-only
|
||||
*E881*
|
||||
If the number of lines changes saving for undo
|
||||
may fail and the change will be aborted.
|
||||
*DiffUpdated*
|
||||
DiffUpdated After diffs have been updated. Depending on
|
||||
what kind of diff is being used (internal or
|
||||
external) this can be triggered on every
|
||||
change or when doing |:diffupdate|.
|
||||
*DirChanged*
|
||||
DirChanged The working directory has changed in response
|
||||
to the |:cd| or |:lcd| commands, or as a
|
||||
@@ -829,13 +835,14 @@ MenuPopup Just before showing the popup menu (under the
|
||||
right mouse button). Useful for adjusting the
|
||||
menu for what is under the cursor or mouse
|
||||
pointer.
|
||||
The pattern is matched against a single
|
||||
character representing the mode:
|
||||
The pattern is matched against one or two
|
||||
characters representing the mode:
|
||||
n Normal
|
||||
v Visual
|
||||
o Operator-pending
|
||||
i Insert
|
||||
c Command line
|
||||
tl Terminal
|
||||
*OptionSet*
|
||||
OptionSet After setting an option. The pattern is
|
||||
matched against the long option name.
|
||||
@@ -859,6 +866,9 @@ OptionSet After setting an option. The pattern is
|
||||
plugin. You can always use `:noa` to prevent
|
||||
triggering this autocommand.
|
||||
|
||||
When using |:set| in the autocommand the event
|
||||
is not triggered again.
|
||||
|
||||
*QuickFixCmdPre*
|
||||
QuickFixCmdPre Before a quickfix command is run (|:make|,
|
||||
|:lmake|, |:grep|, |:lgrep|, |:grepadd|,
|
||||
|
||||
+18
-4
@@ -476,6 +476,10 @@ SHIFTING LINES LEFT OR RIGHT *shift-left-right*
|
||||
*<*
|
||||
<{motion} Shift {motion} lines one 'shiftwidth' leftwards.
|
||||
|
||||
If the 'vartabstop' feature is enabled, and the
|
||||
'shiftwidth' option is set to zero, the amount of
|
||||
indent is calculated at the first non-blank character
|
||||
in the line.
|
||||
*<<*
|
||||
<< Shift [count] lines one 'shiftwidth' leftwards.
|
||||
|
||||
@@ -487,6 +491,10 @@ SHIFTING LINES LEFT OR RIGHT *shift-left-right*
|
||||
*>*
|
||||
>{motion} Shift {motion} lines one 'shiftwidth' rightwards.
|
||||
|
||||
If the 'vartabstop' feature is enabled, and the
|
||||
'shiftwidth' option is set to zero, the amount of
|
||||
indent is calculated at the first non-blank character
|
||||
in the line.
|
||||
*>>*
|
||||
>> Shift [count] lines one 'shiftwidth' rightwards.
|
||||
|
||||
@@ -708,6 +716,7 @@ The flags that you can use for the substitute commands:
|
||||
search pattern.
|
||||
{not in Vi: highlighting of the match, other responses than 'y' or 'n'}
|
||||
|
||||
*:s_e*
|
||||
[e] When the search pattern fails, do not issue an error message and, in
|
||||
particular, continue in maps as if no error occurred. This is most
|
||||
useful to prevent the "No match" error from breaking a mapping. Vim
|
||||
@@ -719,6 +728,7 @@ The flags that you can use for the substitute commands:
|
||||
Interrupted
|
||||
{not in Vi}
|
||||
|
||||
*:s_g*
|
||||
[g] Replace all occurrences in the line. Without this argument,
|
||||
replacement occurs only for the first occurrence in each line. If
|
||||
the 'edcompatible' option is on, Vim remembers this flag and toggles
|
||||
@@ -726,26 +736,30 @@ The flags that you can use for the substitute commands:
|
||||
pattern. If the 'gdefault' option is on, this flag is on by default
|
||||
and the [g] argument switches it off.
|
||||
|
||||
*:s_i*
|
||||
[i] Ignore case for the pattern. The 'ignorecase' and 'smartcase' options
|
||||
are not used.
|
||||
{not in Vi}
|
||||
|
||||
*:s_I*
|
||||
[I] Don't ignore case for the pattern. The 'ignorecase' and 'smartcase'
|
||||
options are not used.
|
||||
{not in Vi}
|
||||
|
||||
*:s_n*
|
||||
[n] Report the number of matches, do not actually substitute. The [c]
|
||||
flag is ignored. The matches are reported as if 'report' is zero.
|
||||
Useful to |count-items|.
|
||||
If \= |sub-replace-expression| is used, the expression will be
|
||||
evaluated in the |sandbox| at every match.
|
||||
|
||||
[p] Print the line containing the last substitute.
|
||||
[p] Print the line containing the last substitute. *:s_p*
|
||||
|
||||
[#] Like [p] and prepend the line number.
|
||||
[#] Like [p] and prepend the line number. *:s_#*
|
||||
|
||||
[l] Like [p] but print the text like |:list|.
|
||||
[l] Like [p] but print the text like |:list|. *:s_l*
|
||||
|
||||
*:s_r*
|
||||
[r] Only useful in combination with `:&` or `:s` without arguments. `:&r`
|
||||
works the same way as `:~`: When the search pattern is empty, use the
|
||||
previously used search pattern instead of the search pattern from the
|
||||
@@ -844,7 +858,7 @@ the |substitute()| function with the following exceptions:
|
||||
- magic is always set without regard to 'magic'.
|
||||
- A ~ inserts a tilde literally.
|
||||
- <CR> and \r inserts a carriage-return (CTRL-M).
|
||||
- \<CR> does not have a special meaning. it's just one of \x.
|
||||
- \<CR> does not have a special meaning. It's just one of \x.
|
||||
|
||||
Examples: >
|
||||
:s/a\|b/xxx\0xxx/g modifies "a b" to "xxxaxxx xxxbxxx"
|
||||
|
||||
@@ -163,6 +163,9 @@ Use |ch_status()| to see if the channel could be opened.
|
||||
The "close_cb" is also considered for this.
|
||||
"never" All messages will be kept.
|
||||
|
||||
*channel-noblock*
|
||||
"noblock" Same effect as |job-noblock|. Only matters for writing.
|
||||
|
||||
*waittime*
|
||||
"waittime" The time to wait for the connection to be made in
|
||||
milliseconds. A negative number waits forever.
|
||||
@@ -594,6 +597,17 @@ See |job_setoptions()| and |ch_setoptions()|.
|
||||
Note: when writing to a file or buffer and when
|
||||
reading from a buffer NL mode is used by default.
|
||||
|
||||
*job-noblock*
|
||||
"noblock": 1 When writing use a non-blocking write call. This
|
||||
avoids getting stuck if Vim should handle other
|
||||
messages in between, e.g. when a job sends back data
|
||||
to Vim. It implies that when `ch_sendraw()` returns
|
||||
not all data may have been written yet.
|
||||
This option was added in patch 8.1.0350, test with: >
|
||||
if has("patch-8.1.350")
|
||||
let options['noblock'] = 1
|
||||
endif
|
||||
<
|
||||
*job-callback*
|
||||
"callback": handler Callback for something to read on any part of the
|
||||
channel.
|
||||
|
||||
+55
-13
@@ -534,8 +534,45 @@ after a command causes the rest of the line to be ignored. This can be used
|
||||
to add comments. Example: >
|
||||
:set ai "set 'autoindent' option
|
||||
It is not possible to add a comment to a shell command ":!cmd" or to the
|
||||
":map" command and a few others, because they see the '"' as part of their
|
||||
argument. This is mentioned where the command is explained.
|
||||
":map" command and a few others (mainly commands that expect expressions)
|
||||
that see the '"' as part of their argument:
|
||||
|
||||
:argdo
|
||||
:autocmd
|
||||
:bufdo
|
||||
:cexpr (and the like)
|
||||
:cdo (and the like)
|
||||
:command
|
||||
:cscope (and the like)
|
||||
:debug
|
||||
:display
|
||||
:echo (and the like)
|
||||
:elseif
|
||||
:execute
|
||||
:folddoopen
|
||||
:folddoclosed
|
||||
:for
|
||||
:grep (and the like)
|
||||
:help (and the like)
|
||||
:if
|
||||
:let
|
||||
:make
|
||||
:map (and the like including :abbrev commands)
|
||||
:menu (and the like)
|
||||
:mkspell
|
||||
:normal
|
||||
:ownsyntax
|
||||
:popup
|
||||
:promptfind (and the like)
|
||||
:registers
|
||||
:return
|
||||
:sort
|
||||
:syntax
|
||||
:tabdo
|
||||
:tearoff
|
||||
:vimgrep (and the like)
|
||||
:while
|
||||
:windo
|
||||
|
||||
*:bar* *:\bar*
|
||||
'|' can be used to separate commands, so you can give multiple commands in one
|
||||
@@ -832,11 +869,12 @@ it, no matter how many backslashes.
|
||||
\\# \#
|
||||
Also see |`=|.
|
||||
|
||||
*:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
|
||||
*:<sfile>* *<sfile>* *:<afile>* *<afile>*
|
||||
*:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
|
||||
*:<cexpr>* *<cexpr>*
|
||||
*<slnum>* *E495* *E496* *E497* *E499* *E500*
|
||||
*:<cword>* *<cword>* *:<cWORD>* *<cWORD>*
|
||||
*:<cexpr>* *<cexpr>* *:<cfile>* *<cfile>*
|
||||
*:<afile>* *<afile>* *:<abuf>* *<abuf>*
|
||||
*:<amatch>* *<amatch>*
|
||||
*:<sfile>* *<sfile>* *:<slnum>* *<slnum>*
|
||||
*:<sflnum>* *<sflnum>* *E499* *E500*
|
||||
Note: these are typed literally, they are not special keys!
|
||||
<cword> is replaced with the word under the cursor (like |star|)
|
||||
<cWORD> is replaced with the WORD under the cursor (see |WORD|)
|
||||
@@ -849,15 +887,16 @@ Note: these are typed literally, they are not special keys!
|
||||
|gf| uses)
|
||||
<afile> When executing autocommands, is replaced with the file name
|
||||
of the buffer being manipulated, or the file for a read or
|
||||
write.
|
||||
write. *E495*
|
||||
<abuf> When executing autocommands, is replaced with the currently
|
||||
effective buffer number (for ":r file" and ":so file" it is
|
||||
the current buffer, the file being read/sourced is not in a
|
||||
buffer).
|
||||
buffer). *E496*
|
||||
<amatch> When executing autocommands, is replaced with the match for
|
||||
which this autocommand was executed. It differs from
|
||||
<afile> only when the file name isn't used to match with
|
||||
(for FileType, Syntax and SpellFileMissing events).
|
||||
which this autocommand was executed. *E497*
|
||||
It differs from <afile> only when the file name isn't used
|
||||
to match with (for FileType, Syntax and SpellFileMissing
|
||||
events).
|
||||
<sfile> When executing a ":source" command, is replaced with the
|
||||
file name of the sourced file. *E498*
|
||||
When executing a function, is replaced with:
|
||||
@@ -867,9 +906,12 @@ Note: these are typed literally, they are not special keys!
|
||||
Note that filename-modifiers are useless when <sfile> is
|
||||
used inside a function.
|
||||
<slnum> When executing a ":source" command, is replaced with the
|
||||
line number. *E842*
|
||||
line number. *E842*
|
||||
When executing a function it's the line number relative to
|
||||
the start of the function.
|
||||
<sflnum> When executing a script, is replaced with the line number.
|
||||
It differs from <slnum> in that <sflnum> is replaced with
|
||||
the script line number in any situation. *E961*
|
||||
|
||||
*filename-modifiers*
|
||||
*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*
|
||||
|
||||
@@ -39,7 +39,9 @@ The second and following arguments may also be a directory name. Vim will
|
||||
then append the file name of the first argument to the directory name to find
|
||||
the file.
|
||||
|
||||
This only works when a standard "diff" command is available. See 'diffexpr'.
|
||||
By default an internal diff library will be used. When 'diffopt' or
|
||||
'diffexpr' has been set an external "diff" command will be used. This only
|
||||
works when such a diff program is available.
|
||||
|
||||
Diffs are local to the current tab page |tab-page|. You can't see diffs with
|
||||
a window in another tab page. This does make it possible to have several
|
||||
@@ -344,8 +346,9 @@ between file1 and file2: >
|
||||
|
||||
The ">" is replaced with the value of 'shellredir'.
|
||||
|
||||
The output of "diff" must be a normal "ed" style diff. Do NOT use a context
|
||||
diff. This example explains the format that Vim expects: >
|
||||
The output of "diff" must be a normal "ed" style diff or a unified diff. Do
|
||||
NOT use a context diff. This example explains the format that Vim expects for
|
||||
the "ed" style diff: >
|
||||
|
||||
1a2
|
||||
> bbb
|
||||
|
||||
+239
-48
@@ -180,10 +180,10 @@ function() or funcref(). When calling the function the Dictionary and/or
|
||||
arguments will be passed to the function. Example: >
|
||||
|
||||
let Cb = function('Callback', ['foo'], myDict)
|
||||
call Cb()
|
||||
call Cb('bar')
|
||||
|
||||
This will invoke the function as if using: >
|
||||
call myDict.Callback('foo')
|
||||
call myDict.Callback('foo', 'bar')
|
||||
|
||||
This is very useful when passing a function around, e.g. in the arguments of
|
||||
|ch_open()|.
|
||||
@@ -954,6 +954,13 @@ These three can be repeated and mixed. Examples:
|
||||
|
||||
expr8 *expr8*
|
||||
-----
|
||||
This expression is either |expr9| or a sequence of the alternatives below,
|
||||
in any order. E.g., these are all possible:
|
||||
expr9[expr1].name
|
||||
expr9.name[expr1]
|
||||
expr9(expr1, ...)[expr1].name
|
||||
|
||||
|
||||
expr8[expr1] item of String or |List| *expr-[]* *E111*
|
||||
*E909* *subscript*
|
||||
If expr8 is a Number or String this results in a String that contains the
|
||||
@@ -2015,13 +2022,15 @@ abs({expr}) Float or Number absolute value of {expr}
|
||||
acos({expr}) Float arc cosine of {expr}
|
||||
add({list}, {item}) List append {item} to |List| {list}
|
||||
and({expr}, {expr}) Number bitwise AND
|
||||
append({lnum}, {string}) Number append {string} below line {lnum}
|
||||
append({lnum}, {list}) Number append lines {list} below line {lnum}
|
||||
argc() Number number of files in the argument list
|
||||
append({lnum}, {text}) Number append {text} below line {lnum}
|
||||
appendbufline({expr}, {lnum}, {text})
|
||||
Number append {text} below line {lnum}
|
||||
in buffer {expr}
|
||||
argc([{winid}]) Number number of files in the argument list
|
||||
argidx() Number current index in the argument list
|
||||
arglistid([{winnr} [, {tabnr}]]) Number argument list id
|
||||
argv({nr}) String {nr} entry of the argument list
|
||||
argv() List the argument list
|
||||
argv({nr} [, {winid}]) String {nr} entry of the argument list
|
||||
argv([-1, {winid}]) List the argument list
|
||||
assert_beeps({cmd}) Number assert {cmd} causes a beep
|
||||
assert_equal({exp}, {act} [, {msg}])
|
||||
Number assert {exp} is equal to {act}
|
||||
@@ -2029,7 +2038,8 @@ assert_equalfile({fname-one}, {fname-two})
|
||||
Number assert file contents is equal
|
||||
assert_exception({error} [, {msg}])
|
||||
Number assert {error} is in v:exception
|
||||
assert_fails({cmd} [, {error}]) Number assert {cmd} fails
|
||||
assert_fails({cmd} [, {error} [, {msg}]])
|
||||
Number assert {cmd} fails
|
||||
assert_false({actual} [, {msg}])
|
||||
Number assert {actual} is false
|
||||
assert_inrange({lower}, {upper}, {actual} [, {msg}])
|
||||
@@ -2101,8 +2111,8 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
|
||||
copy({expr}) any make a shallow copy of {expr}
|
||||
cos({expr}) Float cosine of {expr}
|
||||
cosh({expr}) Float hyperbolic cosine of {expr}
|
||||
count({list}, {expr} [, {ic} [, {start}]])
|
||||
Number count how many {expr} are in {list}
|
||||
count({comp}, {expr} [, {ic} [, {start}]])
|
||||
Number count how many {expr} are in {comp}
|
||||
cscope_connection([{num}, {dbpath} [, {prepend}]])
|
||||
Number checks existence of cscope connection
|
||||
cursor({lnum}, {col} [, {off}])
|
||||
@@ -2196,6 +2206,7 @@ gettabvar({nr}, {varname} [, {def}])
|
||||
any variable {varname} in tab {nr} or {def}
|
||||
gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
|
||||
any {name} in {winnr} in tab page {tabnr}
|
||||
gettagstack([{nr}]) Dict get the tag stack of window {nr}
|
||||
getwininfo([{winid}]) List list of info about each window
|
||||
getwinpos([{timeout}]) List X and Y coord in pixels of the Vim window
|
||||
getwinposx() Number X coord in pixels of the Vim window
|
||||
@@ -2297,7 +2308,6 @@ perleval({expr}) any evaluate |Perl| expression
|
||||
pow({x}, {y}) Float {x} to the power of {y}
|
||||
prevnonblank({lnum}) Number line nr of non-blank line <= {lnum}
|
||||
printf({fmt}, {expr1}...) String format text
|
||||
prompt_addtext({buf}, {expr}) none add text to a prompt buffer
|
||||
prompt_setcallback({buf}, {expr}) none set prompt callback function
|
||||
prompt_setinterrupt({buf}, {text}) none set prompt interrupt function
|
||||
prompt_setprompt({buf}, {text}) none set prompt text
|
||||
@@ -2324,7 +2334,6 @@ remote_read({serverid} [, {timeout}])
|
||||
remote_send({server}, {string} [, {idvar}])
|
||||
String send key sequence
|
||||
remote_startserver({name}) none become server {name}
|
||||
String send key sequence
|
||||
remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list}
|
||||
remove({dict}, {key}) any remove entry {key} from {dict}
|
||||
rename({from}, {to}) Number rename (move) file from {from} to {to}
|
||||
@@ -2349,8 +2358,8 @@ searchpos({pattern} [, {flags} [, {stopline} [, {timeout}]]])
|
||||
server2client({clientid}, {string})
|
||||
Number send reply string
|
||||
serverlist() String get a list of available servers
|
||||
setbufline({expr}, {lnum}, {line})
|
||||
Number set line {lnum} to {line} in buffer
|
||||
setbufline({expr}, {lnum}, {text})
|
||||
Number set line {lnum} to {text} in buffer
|
||||
{expr}
|
||||
setbufvar({expr}, {varname}, {val})
|
||||
none set {varname} in buffer {expr} to {val}
|
||||
@@ -2369,12 +2378,14 @@ settabvar({nr}, {varname}, {val}) none set {varname} in tab page {nr} to {val}
|
||||
settabwinvar({tabnr}, {winnr}, {varname}, {val})
|
||||
none set {varname} in window {winnr} in tab
|
||||
page {tabnr} to {val}
|
||||
settagstack({nr}, {dict} [, {action}])
|
||||
Number modify tag stack using {dict}
|
||||
setwinvar({nr}, {varname}, {val}) none set {varname} in window {nr} to {val}
|
||||
sha256({string}) String SHA256 checksum of {string}
|
||||
shellescape({string} [, {special}])
|
||||
String escape {string} for use as shell
|
||||
command argument
|
||||
shiftwidth() Number effective value of 'shiftwidth'
|
||||
shiftwidth([{col}]) Number effective value of 'shiftwidth'
|
||||
simplify({filename}) String simplify filename as much as possible
|
||||
sin({expr}) Float sine of {expr}
|
||||
sinh({expr}) Float hyperbolic sine of {expr}
|
||||
@@ -2409,6 +2420,8 @@ submatch({nr} [, {list}]) String or List
|
||||
specific match in ":s" or substitute()
|
||||
substitute({expr}, {pat}, {sub}, {flags})
|
||||
String all {pat} in {expr} replaced with {sub}
|
||||
swapinfo({fname}) Dict information about swap file {fname}
|
||||
swapname({expr}) String swap file of buffer {expr}
|
||||
synID({lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
|
||||
synIDattr({synID}, {what} [, {mode}])
|
||||
String attribute {what} of syntax ID {synID}
|
||||
@@ -2451,12 +2464,12 @@ term_setkill({buf}, {how}) none set signal to stop job in terminal
|
||||
term_setrestore({buf}, {command}) none set command to restore terminal
|
||||
term_setsize({buf}, {rows}, {cols})
|
||||
none set the size of a terminal
|
||||
term_start({cmd}, {options}) Job open a terminal window and run a job
|
||||
term_start({cmd}, {options}) Number open a terminal window and run a job
|
||||
term_wait({buf} [, {time}]) Number wait for screen to be updated
|
||||
test_alloc_fail({id}, {countdown}, {repeat})
|
||||
none make memory allocation fail
|
||||
test_autochdir() none enable 'autochdir' during startup
|
||||
test_feedinput() none add key sequence to input buffer
|
||||
test_feedinput({string}) none add key sequence to input buffer
|
||||
test_garbagecollect_now() none free memory right now for testing
|
||||
test_ignore_error({expr}) none ignore a specific error
|
||||
test_null_channel() Channel null value for testing
|
||||
@@ -2465,7 +2478,10 @@ test_null_job() Job null value for testing
|
||||
test_null_list() List null value for testing
|
||||
test_null_partial() Funcref null value for testing
|
||||
test_null_string() String null value for testing
|
||||
test_override({expr}, {val}) none test with Vim internal overrides
|
||||
test_option_not_set({name}) none reset flag indicating option was set
|
||||
test_override({expr}, {val}) none test with Vim internal overrides
|
||||
test_scrollbar({which}, {value}, {dragging})
|
||||
none scroll in the GUI for testing
|
||||
test_settime({expr}) none set current time for testing
|
||||
timer_info([{id}]) List information about timers
|
||||
timer_pause({id}, {pause}) none pause or unpause a timer
|
||||
@@ -2497,6 +2513,7 @@ win_screenpos({nr}) List get screen position of window {nr}
|
||||
winbufnr({nr}) Number buffer number of window {nr}
|
||||
wincol() Number window column of the cursor
|
||||
winheight({nr}) Number height of window {nr}
|
||||
winlayout([{tabnr}]) List layout of windows in tab {tabnr}
|
||||
winline() Number window line of the cursor
|
||||
winnr([{expr}]) Number number of current window
|
||||
winrestcmd() String returns command to restore window sizes
|
||||
@@ -2554,10 +2571,10 @@ and({expr}, {expr}) *and()*
|
||||
:let flag = and(bits, 0x80)
|
||||
|
||||
|
||||
append({lnum}, {expr}) *append()*
|
||||
When {expr} is a |List|: Append each item of the |List| as a
|
||||
append({lnum}, {text}) *append()*
|
||||
When {text} is a |List|: Append each item of the |List| as a
|
||||
text line below line {lnum} in the current buffer.
|
||||
Otherwise append {expr} as one text line below line {lnum} in
|
||||
Otherwise append {text} as one text line below line {lnum} in
|
||||
the current buffer.
|
||||
{lnum} can be zero to insert a line before the first one.
|
||||
Returns 1 for failure ({lnum} out of range or out of memory),
|
||||
@@ -2581,8 +2598,15 @@ appendbufline({expr}, {lnum}, {text}) *appendbufline()*
|
||||
:let failed = appendbufline(13, 0, "# THE START")
|
||||
<
|
||||
*argc()*
|
||||
argc() The result is the number of files in the argument list of the
|
||||
current window. See |arglist|.
|
||||
argc([{winid}])
|
||||
The result is the number of files in the argument list. See
|
||||
|arglist|.
|
||||
If {winid} is not supplied, the argument list of the current
|
||||
window is used.
|
||||
If {winid} is -1, the global argument list is used.
|
||||
Otherwise {winid} specifies the window of which the argument
|
||||
list is used: either the window number or the window ID.
|
||||
Returns -1 if the {winid} argument is invalid.
|
||||
|
||||
*argidx()*
|
||||
argidx() The result is the current index in the argument list. 0 is
|
||||
@@ -2593,7 +2617,7 @@ arglistid([{winnr} [, {tabnr}]])
|
||||
Return the argument list ID. This is a number which
|
||||
identifies the argument list being used. Zero is used for the
|
||||
global argument list. See |arglist|.
|
||||
Return -1 if the arguments are invalid.
|
||||
Returns -1 if the arguments are invalid.
|
||||
|
||||
Without arguments use the current window.
|
||||
With {winnr} only use this window in the current tab page.
|
||||
@@ -2602,17 +2626,19 @@ arglistid([{winnr} [, {tabnr}]])
|
||||
{winnr} can be the window number or the |window-ID|.
|
||||
|
||||
*argv()*
|
||||
argv([{nr}]) The result is the {nr}th file in the argument list of the
|
||||
current window. See |arglist|. "argv(0)" is the first one.
|
||||
Example: >
|
||||
argv([{nr} [, {winid}])
|
||||
The result is the {nr}th file in the argument list. See
|
||||
|arglist|. "argv(0)" is the first one. Example: >
|
||||
:let i = 0
|
||||
:while i < argc()
|
||||
: let f = escape(fnameescape(argv(i)), '.')
|
||||
: exe 'amenu Arg.' . f . ' :e ' . f . '<CR>'
|
||||
: let i = i + 1
|
||||
:endwhile
|
||||
< Without the {nr} argument a |List| with the whole |arglist| is
|
||||
returned.
|
||||
< Without the {nr} argument, or when {nr} is -1, a |List| with
|
||||
the whole |arglist| is returned.
|
||||
|
||||
The {winid} argument specifies the window ID, see |argc()|.
|
||||
|
||||
assert_beeps({cmd}) *assert_beeps()*
|
||||
Run {cmd} and add an error message to |v:errors| if it does
|
||||
@@ -2657,7 +2683,7 @@ assert_exception({error} [, {msg}]) *assert_exception()*
|
||||
call assert_exception('E492:')
|
||||
endtry
|
||||
|
||||
assert_fails({cmd} [, {error}]) *assert_fails()*
|
||||
assert_fails({cmd} [, {error} [, {msg}]]) *assert_fails()*
|
||||
Run {cmd} and add an error message to |v:errors| if it does
|
||||
NOT produce an error. Also see |assert-return|.
|
||||
When {error} is given it must match in |v:errmsg|.
|
||||
@@ -2787,15 +2813,15 @@ balloon_show({expr}) *balloon_show()*
|
||||
|
||||
When showing a balloon is not possible nothing happens, no
|
||||
error message.
|
||||
{only available when compiled with the +balloon_eval or
|
||||
+balloon_eval_term feature}
|
||||
{only available when compiled with the |+balloon_eval| or
|
||||
|+balloon_eval_term| feature}
|
||||
|
||||
balloon_split({msg}) *balloon_split()*
|
||||
Split {msg} into lines to be displayed in a balloon. The
|
||||
splits are made for the current window size and optimize to
|
||||
show debugger output.
|
||||
Returns a |List| with the split lines.
|
||||
{only available when compiled with the +balloon_eval_term
|
||||
{only available when compiled with the |+balloon_eval_term|
|
||||
feature}
|
||||
|
||||
*browse()*
|
||||
@@ -3536,7 +3562,7 @@ deletebufline({expr}, {first} [, {last}]) *deletebufline()*
|
||||
|
||||
For the use of {expr}, see |bufname()| above.
|
||||
|
||||
{first} and {last} are used like with |setline()|. Note that
|
||||
{first} and {last} are used like with |getline()|. Note that
|
||||
when using |line()| this refers to the current buffer. Use "$"
|
||||
to refer to the last line in buffer {expr}.
|
||||
|
||||
@@ -3789,7 +3815,10 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()*
|
||||
<abuf> autocmd buffer number (as a String!)
|
||||
<amatch> autocmd matched name
|
||||
<sfile> sourced script file or function name
|
||||
<slnum> sourced script file line number
|
||||
<slnum> sourced script line number or function
|
||||
line number
|
||||
<sflnum> script file line number, also when in
|
||||
a function
|
||||
<cword> word under the cursor
|
||||
<cWORD> WORD under the cursor
|
||||
<client> the {clientid} of the last received
|
||||
@@ -4488,6 +4517,8 @@ getcmdline() *getcmdline()*
|
||||
Example: >
|
||||
:cmap <F7> <C-\>eescape(getcmdline(), ' \')<CR>
|
||||
< Also see |getcmdtype()|, |getcmdpos()| and |setcmdpos()|.
|
||||
Returns an empty string when entering a password or using
|
||||
|inputsecret()|.
|
||||
|
||||
getcmdpos() *getcmdpos()*
|
||||
Return the position of the cursor in the command line as a
|
||||
@@ -4585,7 +4616,6 @@ getcurpos() Get the position of the cursor. This is like getpos('.'), but
|
||||
getcwd([{winnr} [, {tabnr}]])
|
||||
The result is a String, which is the name of the current
|
||||
working directory.
|
||||
Without arguments, for the current window.
|
||||
|
||||
With {winnr} return the local current directory of this window
|
||||
in the current tab page. {winnr} can be the window number or
|
||||
@@ -4720,6 +4750,10 @@ getloclist({nr} [, {what}]) *getloclist()*
|
||||
If the optional {what} dictionary argument is supplied, then
|
||||
returns the items listed in {what} as a dictionary. Refer to
|
||||
|getqflist()| for the supported items in {what}.
|
||||
If {what} contains 'filewinid', then returns the id of the
|
||||
window used to display files from the location list. This
|
||||
field is applicable only when called from a location list
|
||||
window.
|
||||
|
||||
getmatches() *getmatches()*
|
||||
Returns a |List| with all matches previously defined by
|
||||
@@ -4939,6 +4973,34 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
|
||||
To obtain all window-local variables use: >
|
||||
gettabwinvar({tabnr}, {winnr}, '&')
|
||||
|
||||
gettagstack([{nr}]) *gettagstack()*
|
||||
The result is a Dict, which is the tag stack of window {nr}.
|
||||
{nr} can be the window number or the |window-ID|.
|
||||
When {nr} is not specified, the current window is used.
|
||||
When window {nr} doesn't exist, an empty Dict is returned.
|
||||
|
||||
The returned dictionary contains the following entries:
|
||||
curidx Current index in the stack. When at
|
||||
top of the stack, set to (length + 1).
|
||||
Index of bottom of the stack is 1.
|
||||
items List of items in the stack. Each item
|
||||
is a dictionary containing the
|
||||
entries described below.
|
||||
length Number of entries in the stack.
|
||||
|
||||
Each item in the stack is a dictionary with the following
|
||||
entries:
|
||||
bufnr buffer number of the current jump
|
||||
from cursor position before the tag jump.
|
||||
See |getpos()| for the format of the
|
||||
returned list.
|
||||
matchnr current matching tag number. Used when
|
||||
multiple matching tags are found for a
|
||||
name.
|
||||
tagname name of the tag
|
||||
|
||||
See |tagstack| for more information about the tag stack.
|
||||
|
||||
getwininfo([{winid}]) *getwininfo()*
|
||||
Returns information about windows as a List with Dictionaries.
|
||||
|
||||
@@ -5918,6 +5980,7 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()*
|
||||
(|mapmode-ic|)
|
||||
"sid" The script local ID, used for <sid> mappings
|
||||
(|<SID>|).
|
||||
"lnum" The line number in "sid", zero if unknown.
|
||||
"nowait" Do not wait for other, longer mappings.
|
||||
(|:map-<nowait>|).
|
||||
|
||||
@@ -5965,11 +6028,14 @@ match({expr}, {pat} [, {start} [, {count}]]) *match()*
|
||||
When {expr} is a |List| then this returns the index of the
|
||||
first item where {pat} matches. Each item is used as a
|
||||
String, |Lists| and |Dictionaries| are used as echoed.
|
||||
|
||||
Otherwise, {expr} is used as a String. The result is a
|
||||
Number, which gives the index (byte offset) in {expr} where
|
||||
{pat} matches.
|
||||
|
||||
A match at the first character or |List| item returns zero.
|
||||
If there is no match -1 is returned.
|
||||
|
||||
For getting submatches see |matchlist()|.
|
||||
Example: >
|
||||
:echo match("testing", "ing") " results in 4
|
||||
@@ -7499,6 +7565,37 @@ settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()*
|
||||
:call settabwinvar(3, 2, "myvar", "foobar")
|
||||
< This function is not available in the |sandbox|.
|
||||
|
||||
settagstack({nr}, {dict} [, {action}]) *settagstack()*
|
||||
Modify the tag stack of the window {nr} using {dict}.
|
||||
{nr} can be the window number or the |window-ID|.
|
||||
|
||||
For a list of supported items in {dict}, refer to
|
||||
|gettagstack()|
|
||||
*E962*
|
||||
If {action} is not present or is set to 'r', then the tag
|
||||
stack is replaced. If {action} is set to 'a', then new entries
|
||||
from {dict} are pushed onto the tag stack.
|
||||
|
||||
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: >
|
||||
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
|
||||
call settagstack(1003, stack)
|
||||
unlet stack
|
||||
<
|
||||
setwinvar({nr}, {varname}, {val}) *setwinvar()*
|
||||
Like |settabwinvar()| for the current tab page.
|
||||
Examples: >
|
||||
@@ -7541,11 +7638,17 @@ shellescape({string} [, {special}]) *shellescape()*
|
||||
< See also |::S|.
|
||||
|
||||
|
||||
shiftwidth() *shiftwidth()*
|
||||
shiftwidth([{col}]) *shiftwidth()*
|
||||
Returns the effective value of 'shiftwidth'. This is the
|
||||
'shiftwidth' value unless it is zero, in which case it is the
|
||||
'tabstop' value. This function was introduced with patch
|
||||
7.3.694 in 2012, everybody should have it by now.
|
||||
7.3.694 in 2012, everybody should have it by now (however it
|
||||
did not allow for the optional {col} argument until 8.1.542).
|
||||
|
||||
When there is one argument {col} this is used as column number
|
||||
for which to return the 'shiftwidth' value. This matters for the
|
||||
'vartabstop' feature. If the 'vartabstop' setting is enabled and
|
||||
no {col} argument is given, column 1 will be assumed.
|
||||
|
||||
|
||||
simplify({filename}) *simplify()*
|
||||
@@ -8000,6 +8103,32 @@ substitute({expr}, {pat}, {sub}, {flags}) *substitute()*
|
||||
|submatch()| returns. Example: >
|
||||
:echo substitute(s, '%\(\x\x\)', {m -> '0x' . m[1]}, 'g')
|
||||
|
||||
swapinfo({fname}) *swapinfo()*
|
||||
The result is a dictionary, which holds information about the
|
||||
swapfile {fname}. The available fields are:
|
||||
version Vim version
|
||||
user user name
|
||||
host host name
|
||||
fname original file name
|
||||
pid PID of the Vim process that created the swap
|
||||
file
|
||||
mtime last modification time in seconds
|
||||
inode Optional: INODE number of the file
|
||||
dirty 1 if file was modified, 0 if not
|
||||
Note that "user" and "host" are truncated to at most 39 bytes.
|
||||
In case of failure an "error" item is added with the reason:
|
||||
Cannot open file: file not found or in accessible
|
||||
Cannot read file: cannot read first block
|
||||
Not a swap file: does not contain correct block ID
|
||||
Magic number mismatch: Info in first block is invalid
|
||||
|
||||
swapname({expr}) *swapname()*
|
||||
The result is the swap file path of the buffer {expr}.
|
||||
For the use of {expr}, see |bufname()| above.
|
||||
If buffer {expr} is the current buffer, the result is equal to
|
||||
|:swapname| (unless no swap file).
|
||||
If buffer {expr} has no swap file, returns an empty string.
|
||||
|
||||
synID({lnum}, {col}, {trans}) *synID()*
|
||||
The result is a Number, which is the syntax ID at the position
|
||||
{lnum} and {col} in the current window.
|
||||
@@ -8081,7 +8210,7 @@ synconcealed({lnum}, {col}) *synconcealed()*
|
||||
concealable region if there are two consecutive regions
|
||||
with the same replacement character. For an example, if
|
||||
the text is "123456" and both "23" and "45" are concealed
|
||||
and replace by the character "X", then:
|
||||
and replaced by the character "X", then:
|
||||
call returns ~
|
||||
synconcealed(lnum, 1) [0, '', 0]
|
||||
synconcealed(lnum, 2) [1, 'X', 1]
|
||||
@@ -8309,7 +8438,7 @@ term_dumpdiff({filename}, {filename} [, {options}])
|
||||
The top part of the buffer contains the contents of the first
|
||||
file, the bottom part of the buffer contains the contents of
|
||||
the second file. The middle part shows the differences.
|
||||
The parts are separated by a line of dashes.
|
||||
The parts are separated by a line of equals.
|
||||
|
||||
If the {options} argument is present, it must be a Dict with
|
||||
these possible members:
|
||||
@@ -8354,7 +8483,9 @@ term_dumpwrite({buf}, {filename} [, {options}])
|
||||
Dump the contents of the terminal screen of {buf} in the file
|
||||
{filename}. This uses a format that can be used with
|
||||
|term_dumpload()| and |term_dumpdiff()|.
|
||||
If {filename} already exists an error is given. *E953*
|
||||
If the job in the terminal already finished an error is given:
|
||||
*E958*
|
||||
If {filename} already exists an error is given: *E953*
|
||||
Also see |terminal-diff|.
|
||||
|
||||
{options} is a dictionary with these optional entries:
|
||||
@@ -8400,8 +8531,8 @@ term_getcursor({buf}) *term_getcursor()*
|
||||
"dict" can have these members:
|
||||
"visible" one when the cursor is visible, zero when it
|
||||
is hidden.
|
||||
"blink" one when the cursor is visible, zero when it
|
||||
is hidden.
|
||||
"blink" one when the cursor is blinking, zero when it
|
||||
is not blinking.
|
||||
"shape" 1 for a block cursor, 2 for underline and 3
|
||||
for a vertical bar.
|
||||
|
||||
@@ -8433,7 +8564,7 @@ term_getscrolled({buf}) *term_getscrolled()*
|
||||
used for |term_getline()| and |getline()|, so that: >
|
||||
term_getline(buf, N)
|
||||
< is equal to: >
|
||||
`getline(N + term_getscrolled(buf))
|
||||
getline(N + term_getscrolled(buf))
|
||||
< (if that line exists).
|
||||
|
||||
{buf} is used as with |term_getsize()|.
|
||||
@@ -8696,6 +8827,15 @@ test_null_partial() *test_null_partial()*
|
||||
test_null_string() *test_null_string()*
|
||||
Return a String that is null. Only useful for testing.
|
||||
|
||||
test_option_not_set({name}) *test_option_not_set()*
|
||||
Reset the flag that indicates option {name} was set. Thus it
|
||||
looks like it still has the default value. Use like this: >
|
||||
set ambiwidth=double
|
||||
call test_option_not_set('ambiwidth')
|
||||
< Now the 'ambiwidth' option behaves like it was never changed,
|
||||
even though the value is "double".
|
||||
Only to be used for testing!
|
||||
|
||||
test_override({name}, {val}) *test_override()*
|
||||
Overrides certain parts of Vims internal processing to be able
|
||||
to run tests. Only to be used for testing Vim!
|
||||
@@ -8705,6 +8845,7 @@ test_override({name}, {val}) *test_override()*
|
||||
|
||||
name effect when {val} is non-zero ~
|
||||
redraw disable the redrawing() function
|
||||
redraw_flag ignore the RedrawingDisabled flag
|
||||
char_avail disable the char_avail() function
|
||||
starting reset the "starting" variable, see below
|
||||
nfa_fail makes the NFA regexp engine fail to force a
|
||||
@@ -8721,6 +8862,23 @@ test_override({name}, {val}) *test_override()*
|
||||
< The value of "starting" is saved. It is restored by: >
|
||||
call test_override('starting', 0)
|
||||
|
||||
test_scrollbar({which}, {value}, {dragging}) *test_scrollbar()*
|
||||
Pretend using scrollbar {which} to move it to position
|
||||
{value}. {which} can be:
|
||||
left Left scrollbar of the current window
|
||||
right Right scrollbar of the current window
|
||||
hor Horizontal scrollbar
|
||||
|
||||
For the vertical scrollbars {value} can be 1 to the
|
||||
line-count of the buffer. For the horizontal scrollbar the
|
||||
{value} can be between 1 and the maximum line length, assuming
|
||||
'wrap' is not set.
|
||||
|
||||
When {dragging} is non-zero it's like dragging the scrollbar,
|
||||
otherwise it's like clicking in the scrollbar.
|
||||
Only works when the {which} scrollbar actually exists,
|
||||
obviously only when using the GUI.
|
||||
|
||||
test_settime({expr}) *test_settime()*
|
||||
Set the time Vim uses internally. Currently only used for
|
||||
timestamps in the history, as they are used in viminfo, and
|
||||
@@ -9036,7 +9194,7 @@ win_getid([{win} [, {tab}]]) *win_getid()*
|
||||
Get the |window-ID| for the specified window.
|
||||
When {win} is missing use the current window.
|
||||
With {win} this is the window number. The top window has
|
||||
number 1. Use `win_getid(winnr())` for the current window.
|
||||
number 1.
|
||||
Without {tab} use the current tab, otherwise the tab with
|
||||
number {tab}. The first tab has number one.
|
||||
Return zero if the window cannot be found.
|
||||
@@ -9087,6 +9245,35 @@ winheight({nr}) *winheight()*
|
||||
This excludes any window toolbar line.
|
||||
Examples: >
|
||||
:echo "The current window has " . winheight(0) . " lines."
|
||||
<
|
||||
winlayout([{tabnr}]) *winlayout()*
|
||||
The result is a nested List containing the layout of windows
|
||||
in a tabpage.
|
||||
|
||||
Without {tabnr} use the current tabpage, otherwise the tabpage
|
||||
with number {tabnr}. If the tabpage {tabnr} is not found,
|
||||
returns an empty list.
|
||||
|
||||
For a leaf window, it returns:
|
||||
['leaf', {winid}]
|
||||
For horizontally split windows, which form a column, it
|
||||
returns:
|
||||
['col', [{nested list of windows}]]
|
||||
For vertically split windows, which form a row, it returns:
|
||||
['row', [{nested list of windows}]]
|
||||
|
||||
Example: >
|
||||
" Only one window in the tab page
|
||||
:echo winlayout()
|
||||
['leaf', 1000]
|
||||
" Two horizontally split windows
|
||||
:echo winlayout()
|
||||
['col', [['leaf', 1000], ['leaf', 1001]]]
|
||||
" 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]]
|
||||
<
|
||||
*winline()*
|
||||
winline() The result is a Number, which is the screen line of the cursor
|
||||
@@ -9558,9 +9745,13 @@ See |:verbose-cmd| for more information.
|
||||
deleted if there are no more references to it.
|
||||
*E127* *E122*
|
||||
When a function by this name already exists and [!] is
|
||||
not used an error message is given. When [!] is used,
|
||||
an existing function is silently replaced. Unless it
|
||||
is currently being executed, that is an error.
|
||||
not used an error message is given. There is one
|
||||
exception: When sourcing a script again, a function
|
||||
that was previously defined in that script will be
|
||||
silently replaced.
|
||||
When [!] is used, an existing function is silently
|
||||
replaced. Unless it is currently being executed, that
|
||||
is an error.
|
||||
NOTE: Use ! wisely. If used without care it can cause
|
||||
an existing function to be replaced unexpectedly,
|
||||
which is hard to debug.
|
||||
|
||||
@@ -638,11 +638,31 @@ By default the following options are set, in accordance with PEP8: >
|
||||
|
||||
setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
|
||||
|
||||
To disable this behaviour, set the following variable in your vimrc: >
|
||||
To disable this behavior, set the following variable in your vimrc: >
|
||||
|
||||
let g:python_recommended_style = 0
|
||||
|
||||
|
||||
R MARKDOWN *ft-rmd-plugin*
|
||||
|
||||
By default ftplugin/html.vim is not sourced. If you want it sourced, add to
|
||||
your |vimrc|: >
|
||||
let rmd_include_html = 1
|
||||
|
||||
The 'formatexpr' option is set dynamically with different values for R code
|
||||
and for Markdown code. If you prefer that 'formatexpr' is not set, add to your
|
||||
|vimrc|: >
|
||||
let rmd_dynamic_comments = 0
|
||||
|
||||
|
||||
R RESTRUCTURED TEXT *ft-rrst-plugin*
|
||||
|
||||
The 'formatexpr' option is set dynamically with different values for R code
|
||||
and for ReStructured text. If you prefer that 'formatexpr' is not set, add to
|
||||
your |vimrc|: >
|
||||
let rrst_dynamic_comments = 0
|
||||
|
||||
|
||||
RPM SPEC *ft-spec-plugin*
|
||||
|
||||
Since the text for this plugin is rather long it has been put in a separate
|
||||
|
||||
+30
-12
@@ -547,15 +547,16 @@ floating menus that do not appear on the main menu bar.
|
||||
|
||||
5.2 Creating New Menus *creating-menus*
|
||||
|
||||
*:me* *:menu* *:noreme* *:noremenu*
|
||||
*:am* *:amenu* *:an* *:anoremenu*
|
||||
*:nme* *:nmenu* *:nnoreme* *:nnoremenu*
|
||||
*:ome* *:omenu* *:onoreme* *:onoremenu*
|
||||
*:vme* *:vmenu* *:vnoreme* *:vnoremenu*
|
||||
*:xme* *:xmenu* *:xnoreme* *:xnoremenu*
|
||||
*:sme* *:smenu* *:snoreme* *:snoremenu*
|
||||
*:ime* *:imenu* *:inoreme* *:inoremenu*
|
||||
*:cme* *:cmenu* *:cnoreme* *:cnoremenu*
|
||||
*:me* *:menu* *:noreme* *:noremenu*
|
||||
*:am* *:amenu* *:an* *:anoremenu*
|
||||
*:nme* *:nmenu* *:nnoreme* *:nnoremenu*
|
||||
*:ome* *:omenu* *:onoreme* *:onoremenu*
|
||||
*:vme* *:vmenu* *:vnoreme* *:vnoremenu*
|
||||
*:xme* *:xmenu* *:xnoreme* *:xnoremenu*
|
||||
*:sme* *:smenu* *:snoreme* *:snoremenu*
|
||||
*:ime* *:imenu* *:inoreme* *:inoremenu*
|
||||
*:cme* *:cmenu* *:cnoreme* *:cnoremenu*
|
||||
*:tlm* *:tlmenu* *:tln* *:tlnoremenu*
|
||||
*E330* *E327* *E331* *E336* *E333*
|
||||
*E328* *E329* *E337* *E792*
|
||||
To create a new menu item, use the ":menu" commands. They are mostly like
|
||||
@@ -571,6 +572,10 @@ the mouse button down on this will pop up a menu containing the item
|
||||
"Big Changes", which is a sub-menu containing the item "Delete All Spaces",
|
||||
which when selected, performs the operation.
|
||||
|
||||
To create a menu for terminal mode, use |:tlmenu| instead of |:tmenu| unlike
|
||||
key mapping (|:tmap|). This is because |:tmenu| is already used for defining
|
||||
tooltips for menus. See |terminal-typing|.
|
||||
|
||||
Special characters in a menu name:
|
||||
|
||||
& The next character is the shortcut key. Make sure each
|
||||
@@ -589,9 +594,9 @@ With the shortcut "F" (while keeping the <Alt> key pressed), and then "O",
|
||||
this menu can be used. The second part is shown as "Open :e". The ":e"
|
||||
is right aligned, and the "O" is underlined, to indicate it is the shortcut.
|
||||
|
||||
The ":amenu" command can be used to define menu entries for all modes at once.
|
||||
To make the command work correctly, a character is automatically inserted for
|
||||
some modes:
|
||||
The ":amenu" command can be used to define menu entries for all modes at once,
|
||||
except for Terminal mode. To make the command work correctly, a character is
|
||||
automatically inserted for some modes:
|
||||
mode inserted appended ~
|
||||
Normal nothing nothing
|
||||
Visual <C-C> <C-\><C-G>
|
||||
@@ -866,6 +871,16 @@ be used to complete the name of the menu item.
|
||||
insert-mode menu Eg: >
|
||||
:emenu File.Exit
|
||||
|
||||
:[range]em[enu] {mode} {menu} Like above, but execute the menu for {mode}:
|
||||
'n': |:nmenu| Normal mode
|
||||
'v': |:vmenu| Visual mode
|
||||
's': |:smenu| Select mode
|
||||
'o': |:omenu| Operator-pending mode
|
||||
't': |:tlmenu| Terminal mode
|
||||
'i': |:imenu| Insert mode
|
||||
'c': |:cmenu| Cmdline mode
|
||||
|
||||
|
||||
If the console-mode vim has been compiled with WANT_MENU defined, you can
|
||||
use :emenu to access useful menu items you may have got used to from GUI
|
||||
mode. See 'wildmenu' for an option that works well with this. See
|
||||
@@ -886,6 +901,7 @@ using the last visual selection.
|
||||
*:sunme* *:sunmenu*
|
||||
*:iunme* *:iunmenu*
|
||||
*:cunme* *:cunmenu*
|
||||
*:tlu* *:tlunmenu*
|
||||
To delete a menu item or a whole submenu, use the unmenu commands, which are
|
||||
analogous to the unmap commands. Eg: >
|
||||
:unmenu! Edit.Paste
|
||||
@@ -952,6 +968,8 @@ See section |42.4| in the user manual.
|
||||
:tu[nmenu] {menupath} Remove a tip for a menu or tool.
|
||||
{only in X11 and Win32 GUI}
|
||||
|
||||
Note: To create menus for terminal mode, use |:tlmenu| instead.
|
||||
|
||||
When a tip is defined for a menu item, it appears in the command-line area
|
||||
when the mouse is over that item, much like a standard Windows menu hint in
|
||||
the status bar. (Except when Vim is in Command-line mode, when of course
|
||||
|
||||
+62
-47
@@ -30,7 +30,7 @@ Other relevant documentation:
|
||||
==============================================================================
|
||||
1. MacVim differences *macvim-differences*
|
||||
|
||||
One of the goals of MacVim is to make Vim behave like a proper Mac OS X
|
||||
One of the goals of MacVim is to make Vim behave like a proper macOS
|
||||
application. For this reason MacVim behaves slightly different from other GUI
|
||||
ports of Vim. Most of the modifications are provided in the system gvimrc
|
||||
file; you can quickly open this file and look at it yourself by typing: >
|
||||
@@ -65,8 +65,8 @@ file at all. In this situation, you will need to set both 'encoding' and
|
||||
the file is read into memory, the original bytes are left untouched.
|
||||
|
||||
*macvim-shift-movement*
|
||||
Text editors on Mac OS X lets the user hold down shift+movement key to extend
|
||||
the selection. Also, pressing a printable key whilst selecting replaces the
|
||||
Text editors on macOS lets the user hold down shift+movement key to extend the
|
||||
selection. Also, pressing a printable key whilst selecting replaces the
|
||||
current selection with that character. MacVim can emulate this kind of
|
||||
behaviour (by providing key bindings and by setting 'keymodel' and
|
||||
'selectmode' to non-default values) although it is not enabled by default. To
|
||||
@@ -120,15 +120,22 @@ These are the non-standard commands that MacVim supports:
|
||||
|:macaction| |:macmenu|
|
||||
|
||||
*macvim-find*
|
||||
Whenever you search for something in Vim (e.g. using "/") the search query is
|
||||
copied to the OS X "Find Pasteboard". The idea is that if you search for
|
||||
something and switch to another application, then you can hit <D-g> (or <D-G>)
|
||||
to repeat the search in the new app. The same feature works if you search in
|
||||
some app, switch to MacVim and hit <D-g>.
|
||||
Whenever you search for something in Vim (e.g. using "/"), or hit <D-e> when
|
||||
you have text selected, the search query is copied to the macOS "Find
|
||||
Pasteboard". The idea is that if you search for something and switch to
|
||||
another application, then you can hit <D-g> (or <D-G>) to repeat the search in
|
||||
the new app. The same feature works if you search in some app, switch to
|
||||
MacVim and hit <D-g>.
|
||||
|
||||
If you would like to turn off sharing Vim's search query to the macOS Find
|
||||
Pasteboard, you can set |MMShareFindPboard| to "NO". Even when that's set,
|
||||
<D-g> will still use the OS Find Pasteboard for searching (use |n| instead if
|
||||
that's not what you want), and <D-e> ("Edit -> Use Selection for Find") will
|
||||
still share the search pattern to Find Pasteboard.
|
||||
|
||||
Note that the command |n| is not the same as <D-g>. The former will repeat
|
||||
the last search made in Vim, whereas the latter searches for the string on the
|
||||
OS X Find Pasteboard using the action findNext: (see |:macaction|).
|
||||
macOS Find Pasteboard using the action findNext: (see |:macaction|).
|
||||
|
||||
The <D-g> key equivalent is a great way to bring a search from one window to
|
||||
another in MacVim. Simply search for something in one window (using "/") then
|
||||
@@ -156,7 +163,7 @@ up the "Open with" menu. You can also drag and drop files onto the Dock icon
|
||||
to open them in tabs in a new window, or you can drop them in an already open
|
||||
window to open the files in tabs in that specific window (it is possible to
|
||||
have files open in e.g. splits by changing the "Open files from applications"
|
||||
option in the General preference pane). Finally, you can use Mac OS X System
|
||||
option in the General preference pane). Finally, you can use macOS System
|
||||
Services to open files in MacVim, see |macvim-services|.
|
||||
|
||||
Use |mvim| script to start MacVim from Terminal.
|
||||
@@ -206,9 +213,9 @@ history as the window you just closed (however the next window you open will).
|
||||
For these reasons Quickstart is disabled by default.
|
||||
|
||||
*odbeditor* *external-editor*
|
||||
MacVim can act as an 'external editor' for Mac OS X applications that support
|
||||
the ODB Editor Protocol (or the 'external editor' protocol). Each application
|
||||
has different ways of configuring this option, check the application's
|
||||
MacVim can act as an 'external editor' for macOS applications that support the
|
||||
ODB Editor Protocol (or the 'external editor' protocol). Each application has
|
||||
different ways of configuring this option, check the application's
|
||||
documentation. Once configured properly MacVim can be used to open files in
|
||||
such an application.
|
||||
|
||||
@@ -231,32 +238,32 @@ circumstances. These options can still be changed with the "defaults" command
|
||||
by opening Terminal and typing >
|
||||
defaults write org.vim.MacVim KEY VALUE
|
||||
Check the man page on "defaults" for more information on this command as well
|
||||
as general information regarding Mac OS X user defaults.
|
||||
as general information regarding macOS user defaults.
|
||||
|
||||
Here is a list of relevant dictionary entries:
|
||||
|
||||
KEY VALUE ~
|
||||
MMCellWidthMultiplier width of a normal glyph in em units [float]
|
||||
MMDialogsTrackPwd open/save dialogs track the Vim pwd [bool]
|
||||
MMFullScreenFadeTime fade delay for non-native fullscreen [float]
|
||||
MMLoginShellArgument login shell parameter [string]
|
||||
MMLoginShellCommand which shell to use to launch Vim [string]
|
||||
MMNoFontSubstitution disable automatic font substitution [bool]
|
||||
MMNoTitleBarWindow hide title bar [bool]
|
||||
MMShareFindPboard share search text to Find Pasteboard [bool]
|
||||
MMShowAddTabButton enable "add tab" button on tabline [bool]
|
||||
MMTabMaxWidth maximum width of a tab [int]
|
||||
MMTabMinWidth minimum width of a tab [int]
|
||||
MMTabOptimumWidth default width of a tab [int]
|
||||
MMTextInsetBottom text area offset in pixels [int]
|
||||
MMTextInsetLeft text area offset in pixels [int]
|
||||
MMTextInsetRight text area offset in pixels [int]
|
||||
MMTextInsetTop text area offset in pixels [int]
|
||||
MMTexturedWindow use brushed metal window (Tiger only) [bool]
|
||||
MMTranslateCtrlClick interpret ctrl-click as right-click [bool]
|
||||
MMUseMouseTime use mousetime to detect multiple clicks [bool]
|
||||
MMVerticalSplit files open in vertical splits [bool]
|
||||
MMZoomBoth zoom button maximizes both directions [bool]
|
||||
*MMCellWidthMultiplier* width of a normal glyph in em units [float]
|
||||
*MMDialogsTrackPwd* open/save dialogs track the Vim pwd [bool]
|
||||
*MMFullScreenFadeTime* fade delay for non-native fullscreen [float]
|
||||
*MMLoginShellArgument* login shell parameter [string]
|
||||
*MMLoginShellCommand* which shell to use to launch Vim [string]
|
||||
*MMNoFontSubstitution* disable automatic font substitution [bool]
|
||||
*MMNoTitleBarWindow* hide title bar [bool]
|
||||
*MMShareFindPboard* share search text to Find Pasteboard [bool]
|
||||
*MMShowAddTabButton* enable "add tab" button on tabline [bool]
|
||||
*MMTabMaxWidth* maximum width of a tab [int]
|
||||
*MMTabMinWidth* minimum width of a tab [int]
|
||||
*MMTabOptimumWidth* default width of a tab [int]
|
||||
*MMTextInsetBottom* text area offset in pixels [int]
|
||||
*MMTextInsetLeft* text area offset in pixels [int]
|
||||
*MMTextInsetRight* text area offset in pixels [int]
|
||||
*MMTextInsetTop* text area offset in pixels [int]
|
||||
*MMTexturedWindow* use brushed metal window (Tiger only) [bool]
|
||||
*MMTranslateCtrlClick* interpret ctrl-click as right-click [bool]
|
||||
*MMUseMouseTime* use mousetime to detect multiple clicks [bool]
|
||||
*MMVerticalSplit* files open in vertical splits [bool]
|
||||
*MMZoomBoth* zoom button maximizes both directions [bool]
|
||||
|
||||
As an example, if you have more than one mouse button and would wish to free
|
||||
up Ctrl-click so you can bind it to something else, then the appropriate
|
||||
@@ -337,9 +344,9 @@ highlight color when a window becomes inactive.
|
||||
==============================================================================
|
||||
5. Menus *macvim-menus*
|
||||
|
||||
Menus in Mac OS X behave slightly different from other platforms. For that
|
||||
Menus in macOS behave slightly different from other platforms. For that
|
||||
reason two new commands have been added to Vim. To understand what these
|
||||
commands do you must first understand how menus work on OS X.
|
||||
commands do you must first understand how menus work on macOS.
|
||||
|
||||
Each entry in a menu is called a "menu item". With each menu item is
|
||||
associated: a title, a key equivalent and an action message. When a menu is
|
||||
@@ -348,7 +355,7 @@ shown on the right. Key equivalents enable you to access a menu item using
|
||||
the keyboard instead of having to use the mouse. When a menu item is clicked
|
||||
it will send its associated action message. Actions can be used to instruct
|
||||
MacVim to paste some text (paste:), open a new window (newWindow:), etc.
|
||||
Certain actions are standard throughout OS X which is why MacVim must be able
|
||||
Certain actions are standard throughout macOS which is why MacVim must be able
|
||||
to set these for each menu item. (E.g. the menu item "Edit.Paste" must be
|
||||
bound to the action "paste:" otherwise pasting won't work in dialogs since
|
||||
that is the action that instructs them to paste something.)
|
||||
@@ -440,6 +447,8 @@ Action Description ~
|
||||
fileOpen: Show "File Open" dialog
|
||||
findNext: Search forward using the "Find Pasteboard"
|
||||
findPrevious: Search backward using the "Find Pasteboard"
|
||||
useSelectionForFind: Search the selected text and share to "Find
|
||||
Pasteboard"
|
||||
fontSizeDown: Decrease font size
|
||||
fontSizeUp: Increase font size
|
||||
hide: Hide MacVim
|
||||
@@ -471,7 +480,7 @@ whose name begins with "-space" ("-flexspace") and ends with "-"
|
||||
Toolbar icons should be tiff, png, icns, or heic, of dimension 32x32 or 24x24
|
||||
pixels. The larger size is used when 'tbis' is "medium" or "large", otherwise
|
||||
the smaller size is used (which is the default). If the icon file only
|
||||
contains one dimension then Mac OS X will scale the icon to the appropriate
|
||||
contains one dimension then macOS will scale the icon to the appropriate
|
||||
dimension if necessary. To avoid this, use a file format which supports
|
||||
multiple resolutions (such as icns) and provide both 32x32 and 24x24 versions
|
||||
of the icon.
|
||||
@@ -532,8 +541,7 @@ outline.
|
||||
MacVim supports two system services. These can be accessed from the MacVim
|
||||
submenu in the Services menu or by right-clicking a selection. For services
|
||||
to work, MacVim.app should be located in the /Applications folder. (You might
|
||||
have to logout and then login again before Mac OS X detects the MacVim
|
||||
services.)
|
||||
have to logout and then login again before macOS detects the MacVim services.)
|
||||
|
||||
These are the currently supported services:
|
||||
* New MacVim Buffer With Selection: Create a new buffer and paste the
|
||||
@@ -640,7 +648,7 @@ sometimes be slightly involved. Here are all the things you need to consider:
|
||||
- Bindings to <D-..> are case sensitive: <D-d> is not the same as <D-D>. If
|
||||
you want to map something to Cmd+Shift+d, then you need to use <D-D>, not
|
||||
<D-S-d> or <D-S-D>.
|
||||
- Some command key shortcuts are reserved by Mac OS X and cannot be mapped to
|
||||
- Some command key shortcuts are reserved by macOS and cannot be mapped to
|
||||
(e.g. <D-Tab>). However, some of these shortcuts can be freed up in the
|
||||
System Preferences under Keyboard (e.g. Cmd+Space).
|
||||
- A few command key mappings are set up by MacVim, see |cmd-movement|.
|
||||
@@ -685,9 +693,9 @@ See the section on |key-mapping| for more help on how to map keys.
|
||||
|
||||
When editing non-English text it may be convenient to keep separate keyboard
|
||||
layouts for normal and insert mode. This is supported via the 'imd' option on
|
||||
Mac OS X 10.5 or later (on 10.4 the 'imd' option support is not as useful as
|
||||
it only switches between Roman and non-Roman input sources and it has been
|
||||
known not to work very reliably).
|
||||
macOS 10.5 or later (on 10.4 the 'imd' option support is not as useful as it
|
||||
only switches between Roman and non-Roman input sources and it has been known
|
||||
not to work very reliably).
|
||||
|
||||
For example: When 'noimd' is enabled (i.e. IM is enabled) the input source is
|
||||
saved when toggling between normal and insert mode, so you can use a US layout
|
||||
@@ -707,6 +715,9 @@ to use in normal mode and type ":set imd" followed by ":set noimd".
|
||||
This list is by no means exhaustive, it only enumerates some of the more
|
||||
prominent bugs/missing features.
|
||||
|
||||
- Under macOS Mojave (10.14), the default renderer (Core Text renderer) has
|
||||
some performance issues and scrolling is not as smooth as previous macOS
|
||||
versions (10.13 or below).
|
||||
- Localized menus are not supported. Choosing anything but "English" in the
|
||||
"International" pane of "System Prefences" may break the menus (and
|
||||
toolbar).
|
||||
@@ -718,8 +729,12 @@ prominent bugs/missing features.
|
||||
then opened in Preview where it may be printed.
|
||||
- The toolbar looks ugly and is not very useful.
|
||||
|
||||
If you find new bugs then please post your findings to the vim_mac mailing
|
||||
list: *vim_mac_group* >
|
||||
Other bugs and issues are tracked on Github. If you find new bugs then please
|
||||
file an issue there: >
|
||||
https://github.com/macvim-dev/macvim/issues
|
||||
|
||||
There is also a vim_mac mailing list. You can also post your findings of bugs
|
||||
and issues there as well: *vim_mac_group* >
|
||||
http://groups.google.com/group/vim_mac
|
||||
|
||||
This is also the best place for making feature requests as well as for asking
|
||||
|
||||
+16
-2
@@ -385,8 +385,8 @@ you might have to use the file ~/.gtkrc-2.0 instead, depending on your
|
||||
distribution.
|
||||
|
||||
For GTK+ 3, an effect similar to the above can be obtained by adding the
|
||||
following snippet of CSS code to $XDG_HOME_DIR/gtk-3.0/gtk.css (usually,
|
||||
$HOME/.config/gtk-3.0/gtk.css):
|
||||
following snippet of CSS code to $XDG_HOME_DIR/gtk-3.0/gtk.css (see the next
|
||||
section):
|
||||
|
||||
For GTK+ 3 < 3.20: >
|
||||
|
||||
@@ -417,6 +417,10 @@ stable support for GTK+ CSS:
|
||||
GTK+ uses CSS for styling and layout of widgets. In this subsection, we'll
|
||||
have a quick look at GTK+ CSS through simple, illustrative examples.
|
||||
|
||||
You can usually edit the config with: >
|
||||
vim $HOME/.config/gtk-3.0/gtk.css
|
||||
|
||||
|
||||
Example 1. Empty Space Adjustment ~
|
||||
|
||||
By default, the toolbar and the tabline of the GTK+ 3 GUI are somewhat larger
|
||||
@@ -501,6 +505,16 @@ unexpectedly less attractive or even deteriorates their usability. Keep this
|
||||
in mind always when you try improving a theme.
|
||||
|
||||
|
||||
Example 3. border color ~
|
||||
|
||||
To eliminate borders when maximized: >
|
||||
|
||||
@define-color bg_color #1B2B34;
|
||||
#vim-main-window {
|
||||
background-color: @bg_color;
|
||||
}
|
||||
|
||||
|
||||
Using Vim as a GTK+ plugin ~
|
||||
*gui-gtk-socketid*
|
||||
When the GTK+ version of Vim starts up normally, it creates its own top level
|
||||
|
||||
@@ -226,4 +226,4 @@ will try to find help for it. Especially for options in single quotes, e.g.
|
||||
'compatible'.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl:
|
||||
vim:tw=78:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -45,8 +45,8 @@ The Perl patches for Vim were made by:
|
||||
Matt Gerassimof
|
||||
|
||||
Perl for MS-Windows (and other platforms) can be found at:
|
||||
http://www.perl.org/ The ActiveState one should work, Strawberry Perl is a
|
||||
good alternative.
|
||||
http://www.perl.org/
|
||||
The ActiveState one should work, Strawberry Perl is a good alternative.
|
||||
|
||||
==============================================================================
|
||||
3. Using the Perl interface *perl-using*
|
||||
|
||||
+22
-6
@@ -60,9 +60,10 @@ Example: >
|
||||
endfunction
|
||||
|
||||
To see what version of Python you have: >
|
||||
:python import sys
|
||||
:python print(sys.version)
|
||||
|
||||
There is no need to import sys, it's done by default.
|
||||
|
||||
Note: Python is very sensitive to the indenting. Make sure the "class" line
|
||||
and "EOF" do not have any indent.
|
||||
|
||||
@@ -81,6 +82,18 @@ Examples:
|
||||
>
|
||||
:pydo return "%s\t%d" % (line[::-1], len(line))
|
||||
:pydo if line: return "%4d: %s" % (linenr, line)
|
||||
<
|
||||
One can use `:pydo` in possible conjunction with `:py` to filter a range using
|
||||
python. For example: >
|
||||
|
||||
:py3 << EOF
|
||||
needle = vim.eval('@a')
|
||||
replacement = vim.eval('@b')
|
||||
|
||||
def py_vim_string_replace(str):
|
||||
return str.replace(needle, replacement)
|
||||
EOF
|
||||
:'<,'>py3do return py_vim_string_replace(line)
|
||||
<
|
||||
*:pyfile* *:pyf*
|
||||
:[range]pyf[ile] {file}
|
||||
@@ -98,7 +111,6 @@ Python commands cannot be used in the |sandbox|.
|
||||
|
||||
To pass arguments you need to set sys.argv[] explicitly. Example: >
|
||||
|
||||
:python import sys
|
||||
:python sys.argv = ["foo", "bar"]
|
||||
:pyfile myscript.py
|
||||
|
||||
@@ -168,11 +180,15 @@ vim.eval(str) *python-eval*
|
||||
- a dictionary if the Vim expression evaluates to a Vim dictionary
|
||||
Dictionaries and lists are recursively expanded.
|
||||
Examples: >
|
||||
:" value of the 'textwidth' option
|
||||
:py text_width = vim.eval("&tw")
|
||||
:py str = vim.eval("12+12") # NB result is a string! Use
|
||||
# string.atoi() to convert to
|
||||
# a number.
|
||||
|
||||
:
|
||||
:" contents of the 'a' register
|
||||
:py a_reg = vim.eval("@a")
|
||||
:
|
||||
:" Result is a string! Use string.atoi() to convert to a number.
|
||||
:py str = vim.eval("12+12")
|
||||
:
|
||||
:py tagList = vim.eval('taglist("eval_expr")')
|
||||
< The latter will return a python list of python dicts, for instance:
|
||||
[{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name': ~
|
||||
|
||||
+22
-11
@@ -588,8 +588,9 @@ The basics for using flexible indenting are explained in section |30.3| of the
|
||||
user manual.
|
||||
|
||||
If you want to write your own indent file, it must set the 'indentexpr'
|
||||
option. Setting the 'indentkeys' option is often useful. See the
|
||||
$VIMRUNTIME/indent directory for examples.
|
||||
option. Setting the 'indentkeys' option is often useful.
|
||||
See the $VIMRUNTIME/indent/README.txt file for hints.
|
||||
See the $VIMRUNTIME/indent directory for examples.
|
||||
|
||||
|
||||
REMARKS ABOUT SPECIFIC INDENT FILES ~
|
||||
@@ -602,14 +603,14 @@ the use of square and curly brackets, and otherwise by community convention.
|
||||
These conventions are not universally followed, so the Clojure indent script
|
||||
offers a few configurable options, listed below.
|
||||
|
||||
If the current vim does not include searchpairpos(), the indent script falls
|
||||
If the current vim does not include |searchpairpos()|, the indent script falls
|
||||
back to normal 'lisp' indenting, and the following options are ignored.
|
||||
|
||||
*g:clojure_maxlines*
|
||||
|
||||
Set maximum scan distance of searchpairpos(). Larger values trade performance
|
||||
for correctness when dealing with very long forms. A value of 0 will scan
|
||||
without limits.
|
||||
Set maximum scan distance of |searchpairpos()|. Larger values trade
|
||||
performance for correctness when dealing with very long forms. A value of 0
|
||||
will scan without limits.
|
||||
>
|
||||
" Default
|
||||
let g:clojure_maxlines = 100
|
||||
@@ -935,11 +936,16 @@ given are the defaults. Note that the variables are set to an expression, so
|
||||
that you can change the value of 'shiftwidth' later.
|
||||
|
||||
Indent after an open paren: >
|
||||
let g:pyindent_open_paren = '&sw * 2'
|
||||
let g:pyindent_open_paren = 'shiftwidth() * 2'
|
||||
Indent after a nested paren: >
|
||||
let g:pyindent_nested_paren = '&sw'
|
||||
let g:pyindent_nested_paren = 'shiftwidth()'
|
||||
Indent for a continuation line: >
|
||||
let g:pyindent_continue = '&sw * 2'
|
||||
let g:pyindent_continue = 'shiftwidth() * 2'
|
||||
|
||||
The method uses |searchpair()| to look back for unclosed parenthesis. This
|
||||
can sometimes be slow, thus it timeouts after 150 msec. If you notice the
|
||||
indenting isn't correct, you can set a larger timeout in msec: >
|
||||
let g:pyindent_searchpair_timeout = 500
|
||||
|
||||
|
||||
R *ft-r-indent*
|
||||
@@ -978,6 +984,11 @@ Below is an example of indentation with and without this option enabled:
|
||||
paste(x) paste(x)
|
||||
} }
|
||||
<
|
||||
The code will be indented after lines that match the pattern
|
||||
`'\(&\||\|+\|-\|\*\|/\|=\|\~\|%\|->\)\s*$'`. If you want indentation after
|
||||
lines that match a different pattern, you should set the appropriate value of
|
||||
`r_indent_op_pattern` in your |vimrc|.
|
||||
|
||||
|
||||
SHELL *ft-sh-indent*
|
||||
|
||||
@@ -1028,7 +1039,7 @@ Furthermore, setting the variable b:verilog_indent_width to change the
|
||||
indenting width (default is 'shiftwidth'): >
|
||||
|
||||
let b:verilog_indent_width = 4
|
||||
let b:verilog_indent_width = &sw * 2
|
||||
let b:verilog_indent_width = shiftwidth() * 2
|
||||
|
||||
In addition, you can turn the verbose mode for debug issue: >
|
||||
|
||||
@@ -1151,7 +1162,7 @@ VIM *ft-vim-indent*
|
||||
For indenting Vim scripts there is one variable that specifies the amount of
|
||||
indent for a continuation line, a line that starts with a backslash: >
|
||||
|
||||
:let g:vim_indent_cont = &sw * 3
|
||||
:let g:vim_indent_cont = shiftwidth() * 3
|
||||
|
||||
Three times shiftwidth is the default value.
|
||||
|
||||
|
||||
@@ -1585,6 +1585,9 @@ tag command action ~
|
||||
|:tjump| :tj[ump] like ":tselect", but jump directly when there
|
||||
is only one match
|
||||
|:tlast| :tl[ast] jump to last matching tag
|
||||
|:tlmenu| :tlm[enu] add menu for Terminal-Job mode
|
||||
|:tlnoremenu| :tln[oremenu] like ":noremenu" but for Terminal-Job mode
|
||||
|:tlunmenu| :tlu[nmenu] remove menu for Terminal-Job mode
|
||||
|:tmapclear| :tmapc[lear] remove all mappings for Terminal-Job mode
|
||||
|:tmap| :tma[p] like ":map" but for Terminal-Job mode
|
||||
|:tmenu| :tm[enu] define menu tooltip
|
||||
|
||||
@@ -1051,13 +1051,13 @@ The function must return the column where the completion starts. It must be a
|
||||
number between zero and the cursor column "col('.')". This involves looking
|
||||
at the characters just before the cursor and including those characters that
|
||||
could be part of the completed item. The text between this column and the
|
||||
cursor column will be replaced with the matches.
|
||||
cursor column will be replaced with the matches. If the returned value is
|
||||
larger than the cursor column, the cursor column is used.
|
||||
|
||||
Special return values:
|
||||
-1 If no completion can be done, the completion will be cancelled with an
|
||||
error message.
|
||||
-2 To cancel silently and stay in completion mode.
|
||||
-3 To cancel silently and leave completion mode.
|
||||
Negative return values:
|
||||
-2 To cancel silently and stay in completion mode.
|
||||
-3 To cancel silently and leave completion mode.
|
||||
Another negative value: completion starts at the cursor column
|
||||
|
||||
On the second invocation the arguments are:
|
||||
a:findstart 0
|
||||
|
||||
+6
-3
@@ -371,8 +371,9 @@ job running in the terminal. See |terminal-typing|.
|
||||
|
||||
*omap-info*
|
||||
Operator-pending mappings can be used to define a movement command that can be
|
||||
used with any operator. Simple example: ":omap { w" makes "y{" work like "yw"
|
||||
and "d{" like "dw".
|
||||
used with any operator. Simple example: >
|
||||
:omap { w
|
||||
makes "y{" work like "yw" and "d{" like "dw".
|
||||
|
||||
To ignore the starting cursor position and select different text, you can have
|
||||
the omap start Visual mode to select the text to be operated upon. Example
|
||||
@@ -383,9 +384,11 @@ Normal mode commands find the first '(' character and select the first word
|
||||
before it. That usually is the function name.
|
||||
|
||||
To enter a mapping for Normal and Visual mode, but not Operator-pending mode,
|
||||
first define it for all three modes, then unmap it for Operator-pending mode:
|
||||
first define it for all three modes, then unmap it for
|
||||
Operator-pending mode: >
|
||||
:map xx something-difficult
|
||||
:ounmap xx
|
||||
|
||||
Likewise for a mapping for Visual and Operator-pending mode or Normal and
|
||||
Operator-pending mode.
|
||||
|
||||
|
||||
@@ -102,8 +102,10 @@ Or:
|
||||
|
||||
This also contains tools xgettext, msgformat and others.
|
||||
|
||||
libintl.dll should be placed in same directory with (g)vim.exe, or some
|
||||
place where PATH environment value describe. Vim also finds libintl-8.dll.
|
||||
libintl.dll should be placed in same directory as (g)vim.exe, or one of the
|
||||
directories listed in the PATH environment value. Vim also looks for the
|
||||
alternate names "libintl-8.dll" and "intl.dll".
|
||||
|
||||
Message files (vim.mo) have to be placed in "$VIMRUNTIME/lang/xx/LC_MESSAGES",
|
||||
where "xx" is the abbreviation of the language (mostly two letters).
|
||||
|
||||
|
||||
@@ -1025,7 +1025,7 @@ remembered. You can return to that position with the "''" and "``" command,
|
||||
unless the line containing that position was changed or deleted. The
|
||||
following commands are "jump" commands: "'", "`", "G", "/", "?", "n", "N",
|
||||
"%", "(", ")", "[[", "]]", "{", "}", ":s", ":tag", "L", "M", "H" and the
|
||||
commands that start editing a new file.
|
||||
commands that start editing a new file.
|
||||
|
||||
*CTRL-O*
|
||||
CTRL-O Go to [count] Older cursor position in jump list
|
||||
|
||||
+95
-40
@@ -120,10 +120,10 @@ and the following arguments will be ignored.
|
||||
When 'verbose' is non-zero, displaying an option value will also tell where it
|
||||
was last set. Example: >
|
||||
:verbose set shiftwidth cindent?
|
||||
< shiftwidth=4 ~
|
||||
Last set from modeline ~
|
||||
cindent ~
|
||||
Last set from /usr/local/share/vim/vim60/ftplugin/c.vim ~
|
||||
< shiftwidth=4 ~
|
||||
Last set from modeline line 1 ~
|
||||
cindent ~
|
||||
Last set from /usr/local/share/vim/vim60/ftplugin/c.vim line 30 ~
|
||||
This is only done when specific option values are requested, not for ":verbose
|
||||
set all" or ":verbose set" without an argument.
|
||||
When the option was set by hand there is no "Last set" message.
|
||||
@@ -132,7 +132,7 @@ autocommand, the script in which it was defined is reported.
|
||||
Note that an option may also have been set as a side effect of setting
|
||||
'compatible'.
|
||||
A few special texts:
|
||||
Last set from modeline ~
|
||||
Last set from modeline line 1 ~
|
||||
Option was set in a |modeline|.
|
||||
Last set from --cmd argument ~
|
||||
Option was set with command line argument |--cmd| or +.
|
||||
@@ -851,6 +851,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'{A-Z0-9}, or `{A-Z0-9} command takes one to another file.
|
||||
Note that for some commands the 'autowrite' option is not used, see
|
||||
'autowriteall' for that.
|
||||
Some buffers will not be written, specifically when 'buftype' is
|
||||
"nowrite", "nofile", "terminal" or "prompt".
|
||||
|
||||
*'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'*
|
||||
'autowriteall' 'awa' boolean (default off)
|
||||
@@ -1060,9 +1062,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
- To include a comma in a directory name precede it with a backslash.
|
||||
- A directory name may end in an '/'.
|
||||
- For Unix and Win32, if a directory ends in two path separators "//",
|
||||
the swap file name will be built from the complete path to the file
|
||||
with all path separators changed to percent '%' signs. This will
|
||||
ensure file name uniqueness in the backup directory.
|
||||
the backup file name will be built from the complete path to the
|
||||
file with all path separators changed to percent '%' signs. This
|
||||
will ensure file name uniqueness in the backup directory.
|
||||
On Win32, it is also possible to end with "\\". However, When a
|
||||
separating comma is following, you must use "//", since "\\" will
|
||||
include the comma in the file name. Therefore it is recommended to
|
||||
@@ -1649,10 +1651,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
area extended, Vim tries to become the owner of the
|
||||
windowing system's global selection or put the
|
||||
selected text on the clipboard used by the selection
|
||||
register "*. See |guioptions_a| and |quotestar| for
|
||||
details. When the GUI is active, the 'a' flag in
|
||||
'guioptions' is used, when the GUI is not active, this
|
||||
"autoselect" flag is used.
|
||||
register "*. See |'go-a'| and |quotestar| for details.
|
||||
When the GUI is active, the 'a' flag in 'guioptions'
|
||||
is used, when the GUI is not active, this "autoselect"
|
||||
flag is used.
|
||||
Also applies to the modeless selection.
|
||||
|
||||
*clipboard-autoselectplus*
|
||||
@@ -2020,8 +2022,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
displayed. E.g., when moving vertically it may change column.
|
||||
|
||||
|
||||
'conceallevel' 'cole' *'conceallevel'* *'cole'*
|
||||
number (default 0)
|
||||
*'conceallevel'* *'cole'*
|
||||
'conceallevel' 'cole' number (default 0)
|
||||
local to window
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+conceal|
|
||||
@@ -2630,13 +2632,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+diff|
|
||||
feature}
|
||||
Expression which is evaluated to obtain an ed-style diff file from two
|
||||
versions of a file. See |diff-diffexpr|.
|
||||
Expression which is evaluated to obtain a diff file (either ed-style
|
||||
or unified-style) from two versions of a file. See |diff-diffexpr|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'dip'* *'diffopt'*
|
||||
'diffopt' 'dip' string (default "filler")
|
||||
'diffopt' 'dip' string (default "internal,filler")
|
||||
global
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+diff|
|
||||
@@ -2655,6 +2657,15 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When omitted a context of six lines is used.
|
||||
See |fold-diff|.
|
||||
|
||||
iblank Ignore changes where lines are all blank. Adds
|
||||
the "-B" flag to the "diff" command if
|
||||
'diffexpr' is empty. Check the documentation
|
||||
of the "diff" command for what this does
|
||||
exactly.
|
||||
NOTE: the diff windows will get out of sync,
|
||||
because no differences between blank lines are
|
||||
taken into account.
|
||||
|
||||
icase Ignore changes in case of text. "a" and "A"
|
||||
are considered the same. Adds the "-i" flag
|
||||
to the "diff" command if 'diffexpr' is empty.
|
||||
@@ -2666,6 +2677,18 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
exactly. It should ignore adding trailing
|
||||
white space, but not leading white space.
|
||||
|
||||
iwhiteall Ignore all white space changes. Adds
|
||||
the "-w" flag to the "diff" command if
|
||||
'diffexpr' is empty. Check the documentation
|
||||
of the "diff" command for what this does
|
||||
exactly.
|
||||
|
||||
iwhiteeol Ignore white space changes at end of line.
|
||||
Adds the "-Z" flag to the "diff" command if
|
||||
'diffexpr' is empty. Check the documentation
|
||||
of the "diff" command for what this does
|
||||
exactly.
|
||||
|
||||
horizontal Start diff mode with horizontal splits (unless
|
||||
explicitly specified otherwise).
|
||||
|
||||
@@ -2678,11 +2701,31 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
foldcolumn:{n} Set the 'foldcolumn' option to {n} when
|
||||
starting diff mode. Without this 2 is used.
|
||||
|
||||
Examples: >
|
||||
internal Use the internal diff library. This is
|
||||
ignored when 'diffexpr' is set. *E960*
|
||||
When running out of memory when writing a
|
||||
buffer this item will be ignored for diffs
|
||||
involving that buffer. Set the 'verbose'
|
||||
option to see when this happens.
|
||||
|
||||
:set diffopt=filler,context:4
|
||||
indent-heuristic
|
||||
Use the indent heuristic for the internal
|
||||
diff library.
|
||||
|
||||
algorithm:{text} Use the specified diff algorithm with the
|
||||
internal diff engine. Currently supported
|
||||
algorithms are:
|
||||
myers the default algorithm
|
||||
minimal spend extra time to generate the
|
||||
smallest possible diff
|
||||
patience patience diff algorithm
|
||||
histogram histogram diff algorithm
|
||||
|
||||
Examples: >
|
||||
:set diffopt=internal,filler,context:4
|
||||
:set diffopt=
|
||||
:set diffopt=filler,foldcolumn:3
|
||||
:set diffopt=internal,filler,foldcolumn:3
|
||||
:set diffopt-=internal " do NOT use the internal diff parser
|
||||
<
|
||||
*'digraph'* *'dg'* *'nodigraph'* *'nodg'*
|
||||
'digraph' 'dg' boolean (default off)
|
||||
@@ -3973,8 +4016,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
screen.
|
||||
|
||||
*'guioptions'* *'go'*
|
||||
'guioptions' 'go' string (default "egmrLtT" (MS-Windows, "t" is
|
||||
removed in |defaults.vim|),
|
||||
'guioptions' 'go' string (default "egmrLtT" (MS-Windows,
|
||||
"t" is removed in |defaults.vim|),
|
||||
"aegimrLtT" (GTK, Motif and Athena),
|
||||
)
|
||||
global
|
||||
@@ -3994,7 +4037,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
terminal to list the command output.
|
||||
The terminal window will be positioned at the bottom, and grow
|
||||
upwards as needed.
|
||||
*guioptions_a* *'go-a'*
|
||||
*'go-a'*
|
||||
'a' Autoselect: If present, then whenever VISUAL mode is started,
|
||||
or the Visual area extended, Vim tries to become the owner of
|
||||
the windowing system's global selection. This means that the
|
||||
@@ -4603,8 +4646,18 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
so far, matches. The matched string is highlighted. If the pattern
|
||||
is invalid or not found, nothing is shown. The screen will be updated
|
||||
often, this is only useful on fast terminals.
|
||||
Also applies to the `:s`, `:g` and `:v` commands.
|
||||
Note that the match will be shown, but the cursor will return to its
|
||||
Also applies to the pattern in commands: >
|
||||
:global
|
||||
:lvimgrep
|
||||
:lvimgrepadd
|
||||
:smagic
|
||||
:snomagic
|
||||
:sort
|
||||
:substitute
|
||||
:vglobal
|
||||
:vimgrep
|
||||
:vimgrepadd
|
||||
< Note that the match will be shown, but the cursor will return to its
|
||||
original position when no match is found and when pressing <Esc>. You
|
||||
still need to finish the search command with <Enter> to move the
|
||||
cursor to the match.
|
||||
@@ -4789,7 +4842,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Identifiers are used in recognizing environment variables and after a
|
||||
match of the 'define' option. It is also used for "\i" in a
|
||||
|pattern|. See 'isfname' for a description of the format of this
|
||||
option.
|
||||
option. For '@' only characters up to 255 are used.
|
||||
Careful: If you change this option, it might break expanding
|
||||
environment variables. E.g., when '/' is included and Vim tries to
|
||||
expand "$HOME/.viminfo". Maybe you should change 'iskeyword' instead.
|
||||
@@ -4803,8 +4856,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
Keywords are used in searching and recognizing with many commands:
|
||||
"w", "*", "[i", etc. It is also used for "\k" in a |pattern|. See
|
||||
'isfname' for a description of the format of this option. For C
|
||||
programs you could use "a-z,A-Z,48-57,_,.,-,>".
|
||||
'isfname' for a description of the format of this option. For '@'
|
||||
characters above 255 check the "word" character class.
|
||||
For C programs you could use "a-z,A-Z,48-57,_,.,-,>".
|
||||
For a help file it is set to all non-blank printable characters except
|
||||
'*', '"' and '|' (so that CTRL-] on a command finds the help for that
|
||||
command).
|
||||
@@ -5553,7 +5607,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
h all previous modes when editing a help file
|
||||
a all previous modes
|
||||
r for |hit-enter| and |more-prompt| prompt
|
||||
Normally you would enable the mouse in all four modes with: >
|
||||
Normally you would enable the mouse in all five modes with: >
|
||||
:set mouse=a
|
||||
< When the mouse is not enabled, the GUI will still use the mouse for
|
||||
modeless selection. This doesn't move the text cursor.
|
||||
@@ -6075,7 +6129,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
security reasons.
|
||||
|
||||
*'printencoding'* *'penc'*
|
||||
'printencoding' 'penc' String (default empty, except for some systems)
|
||||
'printencoding' 'penc' string (default empty, except for some systems)
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+printer|
|
||||
@@ -6084,7 +6138,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
See |penc-option|.
|
||||
|
||||
*'printexpr'* *'pexpr'*
|
||||
'printexpr' 'pexpr' String (default: see below)
|
||||
'printexpr' 'pexpr' string (default: see below)
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+printer|
|
||||
@@ -7446,8 +7500,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
After this option has been set successfully, Vim will source the files
|
||||
"spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang'
|
||||
up to the first comma, dot or underscore.
|
||||
Also see |set-spc-auto|.
|
||||
up to the first character that is not an ASCII letter or number and
|
||||
not a dash. Also see |set-spc-auto|.
|
||||
|
||||
|
||||
*'spellsuggest'* *'sps'*
|
||||
@@ -8230,13 +8284,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global or local to buffer |global-local|
|
||||
{not in Vi}
|
||||
List of file names, separated by commas, that are used to lookup words
|
||||
for thesaurus completion commands |i_CTRL-X_CTRL-T|. Each line in
|
||||
the file should contain words with similar meaning, separated by
|
||||
non-keyword characters (white space is preferred). Maximum line
|
||||
length is 510 bytes.
|
||||
To obtain a file to be used here, check out this ftp site:
|
||||
[Sorry this link doesn't work anymore, do you know the right one?]
|
||||
ftp://ftp.ox.ac.uk/pub/wordlists/ First get the README file.
|
||||
for thesaurus completion commands |i_CTRL-X_CTRL-T|.
|
||||
|
||||
Each line in the file should contain words with similar meaning,
|
||||
separated by non-keyword characters (white space is preferred).
|
||||
Maximum line length is 510 bytes.
|
||||
|
||||
Unfortunately we currently cannot recommend a file to be used here.
|
||||
|
||||
To include a comma in a file name precede it with a backslash. Spaces
|
||||
after a comma are ignored, otherwise spaces are included in the file
|
||||
name. See |option-backslash| about using backslashes.
|
||||
|
||||
@@ -83,10 +83,10 @@ There is no solution for this yet.
|
||||
ctags out there, that does it right, but we can't be sure. So this seems to
|
||||
be a permanent restriction.
|
||||
|
||||
- The cscope interface (|cscope|) doesn't work for the version of cscope
|
||||
that we use on our mainframe. We have a copy of version 15.0b12, and it
|
||||
causes Vim to hang when using the "cscope add" command. I'm guessing that
|
||||
the binary format of the cscope database isn't quite what Vim is expecting.
|
||||
- The cscope interface (|cscope|) doesn't work for the version of cscope that
|
||||
we use on our mainframe. We have a copy of version 15.0b12, and it causes
|
||||
Vim to hang when using the "cscope add" command. I'm guessing that the
|
||||
binary format of the cscope database isn't quite what Vim is expecting.
|
||||
I've tried to port the current version of cscope (15.3) to z/OS, without
|
||||
much success. If anyone is interested in trying, drop me a line if you
|
||||
make any progress.
|
||||
@@ -131,4 +131,4 @@ Also look at:
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
vim:tw=78:fo=tcq2:ts=8:noet:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -303,4 +303,4 @@ A. Yes, place your favorite icon in bitmaps/vim.ico in a directory of
|
||||
'runtimepath'. For example ~/vimfiles/bitmaps/vim.ico.
|
||||
|
||||
|
||||
vim:tw=78:fo=tcq2:ts=8:noet:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -295,7 +295,7 @@ the "*" is under your right hand middle finger (search to the right and down).
|
||||
|
||||
*E956*
|
||||
In very rare cases a regular expression is used recursively. This can happen
|
||||
when executing a pattern takes a long time and when checkig for messages on
|
||||
when executing a pattern takes a long time and when checking for messages on
|
||||
channels a callback is invoked that also uses a pattern or an autocommand is
|
||||
triggered. In most cases this should be fine, but if a pattern is in use when
|
||||
it's used again it fails. Usually this means there is something wrong with
|
||||
|
||||
@@ -898,7 +898,7 @@ commands can be combined to create a NewGrep command: >
|
||||
'smartcase' is not used.
|
||||
If {pattern} is empty (e.g. // is specified), the last
|
||||
used search pattern is used. |last-pattern|
|
||||
|
||||
:{count}vim[grep] ...
|
||||
When a number is put before the command this is used
|
||||
as the maximum number of matches to find. Use
|
||||
":1vimgrep pattern file" to find only the first.
|
||||
@@ -1551,6 +1551,22 @@ The backslashes before the pipe character are required to avoid it to be
|
||||
recognized as a command separator. The backslash before each space is
|
||||
required for the set command.
|
||||
|
||||
*cfilter-plugin* *Cfilter* *Lfilter*
|
||||
If you have too many matching messages, you can use the cfilter plugin to
|
||||
reduce the number of entries. Load the plugin with: >
|
||||
packadd cfilter
|
||||
|
||||
Then you can use these command: >
|
||||
:Cfilter[!] /{pat}/
|
||||
:Lfilter[!] /{pat}/
|
||||
|
||||
:Cfilter creates a new quickfix list from entries matching {pat} in the
|
||||
current quickfix list. Both the file name and the text of the entries are
|
||||
matched against {pat}. If ! is supplied, then entries not matching {pat} are
|
||||
used.
|
||||
|
||||
:Lfilter does the same as :Cfilter but operates on the current location list.
|
||||
|
||||
=============================================================================
|
||||
8. The directory stack *quickfix-directory-stack*
|
||||
|
||||
|
||||
@@ -28,6 +28,9 @@ You can see the name of the current swap file being used with the command:
|
||||
|
||||
:sw[apname] *:sw* *:swapname*
|
||||
|
||||
Or you can use the |swapname()| function, which also allows for seeing the
|
||||
swap file name of other buffers.
|
||||
|
||||
The name of the swap file is normally the same as the file you are editing,
|
||||
with the extension ".swp".
|
||||
- On Unix, a '.' is prepended to swap file names in the same directory as the
|
||||
|
||||
@@ -334,6 +334,9 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
{not in Vi} {not available when compiled without the
|
||||
|+eval| feature}
|
||||
|
||||
:scr[iptnames][!] {scriptId} *:script*
|
||||
Edit script {scriptId}. Suggested name is ":script".
|
||||
|
||||
*:fini* *:finish* *E168*
|
||||
:fini[sh] Stop sourcing a script. Can only be used in a Vim
|
||||
script file. This is a quick way to skip the rest of
|
||||
@@ -465,6 +468,16 @@ flag when defining the function, it is not relevant when executing it. >
|
||||
.
|
||||
:endfunction
|
||||
:set cpo-=C
|
||||
<
|
||||
*line-continuation-comment*
|
||||
To add a comment in between the lines start with '"\ '. Notice the space
|
||||
after the backslash. Example: >
|
||||
let array = [
|
||||
"\ first entry comment
|
||||
\ 'first',
|
||||
"\ second entry comment
|
||||
\ 'second',
|
||||
\ ]
|
||||
|
||||
Rationale:
|
||||
Most programs work with a trailing backslash to indicate line
|
||||
@@ -473,6 +486,14 @@ Rationale:
|
||||
:map xx asdf\
|
||||
< Therefore the unusual leading backslash is used.
|
||||
|
||||
Starting a comment in a continuation line results in all following
|
||||
continuation lines to be part of the comment. Since it was like this
|
||||
for a long time, when making it possible to add a comment halfway a
|
||||
sequence of continuation lines, it was not possible to use \", since
|
||||
that was a valid continuation line. Using '"\ ' comes closest, even
|
||||
though it may look a bit weird. Requiring the space after the
|
||||
backslash is to make it very unlikely this is a normal comment line.
|
||||
|
||||
==============================================================================
|
||||
5. Using Vim packages *packages*
|
||||
|
||||
|
||||
@@ -515,7 +515,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
--clean Similar to "-u DEFAULTS -U NONE -i NONE":
|
||||
- initializations from files and environment variables is
|
||||
skipped
|
||||
-'runtimepath'and 'packpath' are set to exclude home
|
||||
- 'runtimepath' and 'packpath' are set to exclude home
|
||||
directory entries (does not happen with -u DEFAULTS).
|
||||
- the |defaults.vim| script is loaded, which implies
|
||||
'nocompatible': use Vim defaults
|
||||
|
||||
+57
-6
@@ -671,12 +671,12 @@ the rendered page generated by 2html.vim.
|
||||
:let g:html_no_pre = 1
|
||||
<
|
||||
*g:html_expand_tabs*
|
||||
Default: 1 if 'tabstop' is 8, 'expandtab' is 0, and no fold column or line
|
||||
numbers occur in the generated HTML;
|
||||
0 otherwise.
|
||||
When 0, <Tab> characters in the buffer text are replaced with an appropriate
|
||||
Default: 0 if 'tabstop' is 8, 'expandtab' is 0, 'vartabstop' is not in use,
|
||||
and no fold column or line numbers occur in the generated HTML;
|
||||
1 otherwise.
|
||||
When 1, <Tab> characters in the buffer text are replaced with an appropriate
|
||||
number of space characters, or references if |g:html_no_pre| is 1.
|
||||
When 1, if |g:html_no_pre| is 0 or unset, <Tab> characters in the buffer text
|
||||
When 0, if |g:html_no_pre| is 0 or unset, <Tab> characters in the buffer text
|
||||
are included as-is in the generated HTML. This is useful for when you want to
|
||||
allow copy and paste from a browser without losing the actual whitespace in
|
||||
the source document. Note that this can easily break text alignment and
|
||||
@@ -939,6 +939,9 @@ to the respective variable. Example: >
|
||||
To disable them use ":unlet". Example: >
|
||||
:unlet c_comment_strings
|
||||
|
||||
An alternative is to switch to the C++ highlighting: >
|
||||
:set filetype=cpp
|
||||
|
||||
Variable Highlight ~
|
||||
*c_gnu* GNU gcc specific items
|
||||
*c_comment_strings* strings and numbers inside a comment
|
||||
@@ -1265,7 +1268,7 @@ doxygen_javadoc_autobrief 1 Set to 0 to disable javadoc autobrief
|
||||
doxygen_end_punctuation '[.]' Set to regexp match for the ending
|
||||
punctuation of brief
|
||||
|
||||
There are also some hilight groups worth mentioning as they can be useful in
|
||||
There are also some highlight groups worth mentioning as they can be useful in
|
||||
configuration.
|
||||
|
||||
Highlight Effect ~
|
||||
@@ -2641,6 +2644,48 @@ Any combination of these three variables is legal, but might highlight more
|
||||
commands than are actually available to you by the game.
|
||||
|
||||
|
||||
R *r.vim* *ft-r-syntax*
|
||||
|
||||
The parsing of R code for syntax highlight starts 40 lines backwards, but you
|
||||
can set a different value in your |vimrc|. Example: >
|
||||
let r_syntax_minlines = 60
|
||||
|
||||
You can also turn off syntax highlighting of ROxygen: >
|
||||
let r_syntax_hl_roxygen = 0
|
||||
|
||||
enable folding of code delimited by parentheses, square brackets and curly
|
||||
braces: >
|
||||
let r_syntax_folding = 1
|
||||
|
||||
and highlight as functions all keywords followed by an opening parenthesis: >
|
||||
let r_syntax_fun_pattern = 1
|
||||
|
||||
|
||||
R MARKDOWN *rmd.vim* *ft-rmd-syntax*
|
||||
|
||||
To disable syntax highlight of YAML header, add to your |vimrc|: >
|
||||
let rmd_syn_hl_yaml = 0
|
||||
|
||||
To disable syntax highlighting of citation keys: >
|
||||
let rmd_syn_hl_citations = 0
|
||||
|
||||
To highlight R code in knitr chunk headers: >
|
||||
let rmd_syn_hl_chunk = 1
|
||||
|
||||
By default, chunks of R code will be highlighted following the rules of R
|
||||
language. If you want proper syntax highlighting of chunks of other languages,
|
||||
you should add them to either `markdown_fenced_languages` or
|
||||
`rmd_fenced_languages`. For example to properly highlight both R and Python,
|
||||
you may add this to your |vimrc|: >
|
||||
let rmd_fenced_languages = ['r', 'python']
|
||||
|
||||
|
||||
R RESTRUCTURED TEXT *rrst.vim* *ft-rrst-syntax*
|
||||
|
||||
To highlight R code in knitr chunk headers, add to your |vimrc|: >
|
||||
let rrst_syn_hl_chunk = 1
|
||||
|
||||
|
||||
READLINE *readline.vim* *ft-readline-syntax*
|
||||
|
||||
The readline library is primarily used by the BASH shell, which adds quite a
|
||||
@@ -3169,6 +3214,12 @@ by syntax/tex.vim. Please consider uploading any extensions that you write,
|
||||
which typically would go in $HOME/after/syntax/tex/[pkgname].vim, to
|
||||
http://vim.sf.net/.
|
||||
|
||||
I've included some support for various popular packages on my website: >
|
||||
|
||||
http://www.drchip.org/astronaut/vim/index.html#LATEXPKGS
|
||||
<
|
||||
The syntax files there go into your .../after/syntax/tex/ directory.
|
||||
|
||||
*tex-error* *g:tex_no_error*
|
||||
Tex: Excessive Error Highlighting? ~
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ REORDERING TAB PAGES:
|
||||
Move the current tab page to after tab page N. Use zero to
|
||||
make the current tab page the first one. N is counted before
|
||||
the move, thus if the second tab is the current one,
|
||||
`:tabmove 1`` and `:tabmove 2` have no effect.
|
||||
`:tabmove 1` and `:tabmove 2` have no effect.
|
||||
Without N the tab page is made the last one. >
|
||||
:.tabmove " do nothing
|
||||
:-tabmove " move the tab page to the left
|
||||
|
||||
+67
-1
@@ -1955,6 +1955,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:<cfile> cmdline.txt /*:<cfile>*
|
||||
:<cword> cmdline.txt /*:<cword>*
|
||||
:<sfile> cmdline.txt /*:<sfile>*
|
||||
:<sflnum> cmdline.txt /*:<sflnum>*
|
||||
:<slnum> cmdline.txt /*:<slnum>*
|
||||
:= various.txt /*:=*
|
||||
:> change.txt /*:>*
|
||||
:? cmdline.txt /*:?*
|
||||
@@ -2899,8 +2901,17 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:sN windows.txt /*:sN*
|
||||
:sNext windows.txt /*:sNext*
|
||||
:s\= change.txt /*:s\\=*
|
||||
:s_# change.txt /*:s_#*
|
||||
:s_I change.txt /*:s_I*
|
||||
:s_c change.txt /*:s_c*
|
||||
:s_e change.txt /*:s_e*
|
||||
:s_flags change.txt /*:s_flags*
|
||||
:s_g change.txt /*:s_g*
|
||||
:s_i change.txt /*:s_i*
|
||||
:s_l change.txt /*:s_l*
|
||||
:s_n change.txt /*:s_n*
|
||||
:s_p change.txt /*:s_p*
|
||||
:s_r change.txt /*:s_r*
|
||||
:sa windows.txt /*:sa*
|
||||
:sal windows.txt /*:sal*
|
||||
:sall windows.txt /*:sall*
|
||||
@@ -3201,6 +3212,12 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:tjump tagsrch.txt /*:tjump*
|
||||
:tl tagsrch.txt /*:tl*
|
||||
:tlast tagsrch.txt /*:tlast*
|
||||
:tlm gui.txt /*:tlm*
|
||||
:tlmenu gui.txt /*:tlmenu*
|
||||
:tln gui.txt /*:tln*
|
||||
:tlnoremenu gui.txt /*:tlnoremenu*
|
||||
:tlu gui.txt /*:tlu*
|
||||
:tlunmenu gui.txt /*:tlunmenu*
|
||||
:tm gui.txt /*:tm*
|
||||
:tma map.txt /*:tma*
|
||||
:tmap map.txt /*:tmap*
|
||||
@@ -3504,10 +3521,12 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
<bang> map.txt /*<bang>*
|
||||
<buffer=N> autocmd.txt /*<buffer=N>*
|
||||
<buffer=abuf> autocmd.txt /*<buffer=abuf>*
|
||||
<cWORD> cmdline.txt /*<cWORD>*
|
||||
<cexpr> cmdline.txt /*<cexpr>*
|
||||
<cfile> cmdline.txt /*<cfile>*
|
||||
<character> intro.txt /*<character>*
|
||||
<count> map.txt /*<count>*
|
||||
<cword> cmdline.txt /*<cword>*
|
||||
<f-args> map.txt /*<f-args>*
|
||||
<k0> term.txt /*<k0>*
|
||||
<k1> term.txt /*<k1>*
|
||||
@@ -3539,6 +3558,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
<reg> map.txt /*<reg>*
|
||||
<register> map.txt /*<register>*
|
||||
<sfile> cmdline.txt /*<sfile>*
|
||||
<sflnum> cmdline.txt /*<sflnum>*
|
||||
<slnum> cmdline.txt /*<slnum>*
|
||||
<xCSI> intro.txt /*<xCSI>*
|
||||
<xDown> term.txt /*<xDown>*
|
||||
@@ -3742,6 +3762,7 @@ CTRL-\_CTRL-N intro.txt /*CTRL-\\_CTRL-N*
|
||||
CTRL-] tagsrch.txt /*CTRL-]*
|
||||
CTRL-^ editing.txt /*CTRL-^*
|
||||
CTRL-{char} intro.txt /*CTRL-{char}*
|
||||
Cfilter quickfix.txt /*Cfilter*
|
||||
Channel eval.txt /*Channel*
|
||||
Channels eval.txt /*Channels*
|
||||
Chinese mbyte.txt /*Chinese*
|
||||
@@ -3781,6 +3802,7 @@ DOS-format-write editing.txt /*DOS-format-write*
|
||||
Dictionaries eval.txt /*Dictionaries*
|
||||
Dictionary eval.txt /*Dictionary*
|
||||
Dictionary-function eval.txt /*Dictionary-function*
|
||||
DiffUpdated autocmd.txt /*DiffUpdated*
|
||||
Digraphs digraph.txt /*Digraphs*
|
||||
DirChanged autocmd.txt /*DirChanged*
|
||||
E motion.txt /*E*
|
||||
@@ -4680,7 +4702,11 @@ E954 options.txt /*E954*
|
||||
E955 eval.txt /*E955*
|
||||
E956 pattern.txt /*E956*
|
||||
E957 eval.txt /*E957*
|
||||
E958 eval.txt /*E958*
|
||||
E96 diff.txt /*E96*
|
||||
E960 options.txt /*E960*
|
||||
E961 cmdline.txt /*E961*
|
||||
E962 eval.txt /*E962*
|
||||
E97 diff.txt /*E97*
|
||||
E98 diff.txt /*E98*
|
||||
E99 diff.txt /*E99*
|
||||
@@ -4755,6 +4781,7 @@ KVim gui_x11.txt /*KVim*
|
||||
Kibaale uganda.txt /*Kibaale*
|
||||
Korean mbyte.txt /*Korean*
|
||||
L motion.txt /*L*
|
||||
Lfilter quickfix.txt /*Lfilter*
|
||||
Linux-backspace options.txt /*Linux-backspace*
|
||||
List eval.txt /*List*
|
||||
Lists eval.txt /*Lists*
|
||||
@@ -4775,6 +4802,27 @@ Macintosh os_mac.txt /*Macintosh*
|
||||
Mark motion.txt /*Mark*
|
||||
MenuPopup autocmd.txt /*MenuPopup*
|
||||
MiNT os_mint.txt /*MiNT*
|
||||
MMCellWidthMultiplier gui_mac.txt /*MMCellWidthMultiplier*
|
||||
MMDialogsTrackPwd gui_mac.txt /*MMDialogsTrackPwd*
|
||||
MMFullScreenFadeTime gui_mac.txt /*MMFullScreenFadeTime*
|
||||
MMLoginShellArgument gui_mac.txt /*MMLoginShellArgument*
|
||||
MMLoginShellCommand gui_mac.txt /*MMLoginShellCommand*
|
||||
MMNoFontSubstitution gui_mac.txt /*MMNoFontSubstitution*
|
||||
MMNoTitleBarWindow gui_mac.txt /*MMNoTitleBarWindow*
|
||||
MMShareFindPboard gui_mac.txt /*MMShareFindPboard*
|
||||
MMShowAddTabButton gui_mac.txt /*MMShowAddTabButton*
|
||||
MMTabMaxWidth gui_mac.txt /*MMTabMaxWidth*
|
||||
MMTabMinWidth gui_mac.txt /*MMTabMinWidth*
|
||||
MMTabOptimumWidth gui_mac.txt /*MMTabOptimumWidth*
|
||||
MMTextInsetBottom gui_mac.txt /*MMTextInsetBottom*
|
||||
MMTextInsetLeft gui_mac.txt /*MMTextInsetLeft*
|
||||
MMTextInsetRight gui_mac.txt /*MMTextInsetRight*
|
||||
MMTextInsetTop gui_mac.txt /*MMTextInsetTop*
|
||||
MMTexturedWindow gui_mac.txt /*MMTexturedWindow*
|
||||
MMTranslateCtrlClick gui_mac.txt /*MMTranslateCtrlClick*
|
||||
MMUseMouseTime gui_mac.txt /*MMUseMouseTime*
|
||||
MMVerticalSplit gui_mac.txt /*MMVerticalSplit*
|
||||
MMZoomBoth gui_mac.txt /*MMZoomBoth*
|
||||
Moolenaar intro.txt /*Moolenaar*
|
||||
MorphOS os_amiga.txt /*MorphOS*
|
||||
Motif gui_x11.txt /*Motif*
|
||||
@@ -5465,6 +5513,7 @@ catch-order eval.txt /*catch-order*
|
||||
catch-text eval.txt /*catch-text*
|
||||
cc change.txt /*cc*
|
||||
ceil() eval.txt /*ceil()*
|
||||
cfilter-plugin quickfix.txt /*cfilter-plugin*
|
||||
ch.vim syntax.txt /*ch.vim*
|
||||
ch_canread() eval.txt /*ch_canread()*
|
||||
ch_close() eval.txt /*ch_close()*
|
||||
@@ -5519,6 +5568,7 @@ channel-drop channel.txt /*channel-drop*
|
||||
channel-functions usr_41.txt /*channel-functions*
|
||||
channel-mode channel.txt /*channel-mode*
|
||||
channel-more channel.txt /*channel-more*
|
||||
channel-noblock channel.txt /*channel-noblock*
|
||||
channel-open channel.txt /*channel-open*
|
||||
channel-open-options channel.txt /*channel-open-options*
|
||||
channel-raw channel.txt /*channel-raw*
|
||||
@@ -6331,8 +6381,13 @@ ft-python-plugin filetype.txt /*ft-python-plugin*
|
||||
ft-python-syntax syntax.txt /*ft-python-syntax*
|
||||
ft-quake-syntax syntax.txt /*ft-quake-syntax*
|
||||
ft-r-indent indent.txt /*ft-r-indent*
|
||||
ft-r-syntax syntax.txt /*ft-r-syntax*
|
||||
ft-readline-syntax syntax.txt /*ft-readline-syntax*
|
||||
ft-rexx-syntax syntax.txt /*ft-rexx-syntax*
|
||||
ft-rmd-plugin filetype.txt /*ft-rmd-plugin*
|
||||
ft-rmd-syntax syntax.txt /*ft-rmd-syntax*
|
||||
ft-rrst-plugin filetype.txt /*ft-rrst-plugin*
|
||||
ft-rrst-syntax syntax.txt /*ft-rrst-syntax*
|
||||
ft-rst-syntax syntax.txt /*ft-rst-syntax*
|
||||
ft-ruby-omni insert.txt /*ft-ruby-omni*
|
||||
ft-ruby-syntax syntax.txt /*ft-ruby-syntax*
|
||||
@@ -6720,6 +6775,7 @@ getscript-start pi_getscript.txt /*getscript-start*
|
||||
gettabinfo() eval.txt /*gettabinfo()*
|
||||
gettabvar() eval.txt /*gettabvar()*
|
||||
gettabwinvar() eval.txt /*gettabwinvar()*
|
||||
gettagstack() eval.txt /*gettagstack()*
|
||||
getwininfo() eval.txt /*getwininfo()*
|
||||
getwinpos() eval.txt /*getwinpos()*
|
||||
getwinposx() eval.txt /*getwinposx()*
|
||||
@@ -6842,7 +6898,6 @@ gui_x11.txt gui_x11.txt /*gui_x11.txt*
|
||||
guifontwide_gtk2 options.txt /*guifontwide_gtk2*
|
||||
guifontwide_macvim options.txt /*guifontwide_macvim*
|
||||
guifontwide_win_mbyte options.txt /*guifontwide_win_mbyte*
|
||||
guioptions_a options.txt /*guioptions_a*
|
||||
guu change.txt /*guu*
|
||||
gv visual.txt /*gv*
|
||||
gview starting.txt /*gview*
|
||||
@@ -7241,6 +7296,7 @@ job-err_io channel.txt /*job-err_io*
|
||||
job-exit_cb channel.txt /*job-exit_cb*
|
||||
job-functions usr_41.txt /*job-functions*
|
||||
job-in_io channel.txt /*job-in_io*
|
||||
job-noblock channel.txt /*job-noblock*
|
||||
job-options channel.txt /*job-options*
|
||||
job-out_cb channel.txt /*job-out_cb*
|
||||
job-out_io channel.txt /*job-out_io*
|
||||
@@ -7328,6 +7384,7 @@ lifelines.vim syntax.txt /*lifelines.vim*
|
||||
limits vi_diff.txt /*limits*
|
||||
line() eval.txt /*line()*
|
||||
line-continuation repeat.txt /*line-continuation*
|
||||
line-continuation-comment repeat.txt /*line-continuation-comment*
|
||||
line2byte() eval.txt /*line2byte()*
|
||||
linefeed intro.txt /*linefeed*
|
||||
linewise motion.txt /*linewise*
|
||||
@@ -8300,6 +8357,7 @@ quotes.txt quotes.txt /*quotes.txt*
|
||||
quotestar gui.txt /*quotestar*
|
||||
quote~ change.txt /*quote~*
|
||||
r change.txt /*r*
|
||||
r.vim syntax.txt /*r.vim*
|
||||
range() eval.txt /*range()*
|
||||
raw-terminal-mode term.txt /*raw-terminal-mode*
|
||||
rcp pi_netrw.txt /*rcp*
|
||||
@@ -8364,8 +8422,10 @@ right-justify change.txt /*right-justify*
|
||||
rileft rileft.txt /*rileft*
|
||||
rileft.txt rileft.txt /*rileft.txt*
|
||||
riscos os_risc.txt /*riscos*
|
||||
rmd.vim syntax.txt /*rmd.vim*
|
||||
rot13 change.txt /*rot13*
|
||||
round() eval.txt /*round()*
|
||||
rrst.vim syntax.txt /*rrst.vim*
|
||||
rst.vim syntax.txt /*rst.vim*
|
||||
rsync pi_netrw.txt /*rsync*
|
||||
ruby if_ruby.txt /*ruby*
|
||||
@@ -8498,6 +8558,7 @@ setqflist-examples quickfix.txt /*setqflist-examples*
|
||||
setreg() eval.txt /*setreg()*
|
||||
settabvar() eval.txt /*settabvar()*
|
||||
settabwinvar() eval.txt /*settabwinvar()*
|
||||
settagstack() eval.txt /*settagstack()*
|
||||
setting-guifont gui.txt /*setting-guifont*
|
||||
setting-guitablabel tabpage.txt /*setting-guitablabel*
|
||||
setting-tabline tabpage.txt /*setting-tabline*
|
||||
@@ -8751,6 +8812,8 @@ swap-file recover.txt /*swap-file*
|
||||
swapchoice-variable eval.txt /*swapchoice-variable*
|
||||
swapcommand-variable eval.txt /*swapcommand-variable*
|
||||
swapfile-changed version4.txt /*swapfile-changed*
|
||||
swapinfo() eval.txt /*swapinfo()*
|
||||
swapname() eval.txt /*swapname()*
|
||||
swapname-variable eval.txt /*swapname-variable*
|
||||
sybase ft_sql.txt /*sybase*
|
||||
syn-sync-grouphere syntax.txt /*syn-sync-grouphere*
|
||||
@@ -9164,7 +9227,9 @@ test_null_job() eval.txt /*test_null_job()*
|
||||
test_null_list() eval.txt /*test_null_list()*
|
||||
test_null_partial() eval.txt /*test_null_partial()*
|
||||
test_null_string() eval.txt /*test_null_string()*
|
||||
test_option_not_set() eval.txt /*test_option_not_set()*
|
||||
test_override() eval.txt /*test_override()*
|
||||
test_scrollbar() eval.txt /*test_scrollbar()*
|
||||
test_settime() eval.txt /*test_settime()*
|
||||
testing eval.txt /*testing*
|
||||
testing-variable eval.txt /*testing-variable*
|
||||
@@ -9732,6 +9797,7 @@ windows98 os_win32.txt /*windows98*
|
||||
windowsme os_win32.txt /*windowsme*
|
||||
winheight() eval.txt /*winheight()*
|
||||
winid windows.txt /*winid*
|
||||
winlayout() eval.txt /*winlayout()*
|
||||
winline() eval.txt /*winline()*
|
||||
winnr() eval.txt /*winnr()*
|
||||
winrestcmd() eval.txt /*winrestcmd()*
|
||||
|
||||
@@ -179,6 +179,9 @@ commands explained above the tag stack will look like this:
|
||||
1 1 main 1 harddisk2:text/vim/test
|
||||
2 1 FuncB 59 harddisk2:text/vim/src/main.c
|
||||
|
||||
The |gettagstack()| function returns the tag stack of a specified window. The
|
||||
|settagstack()| function modifies the tag stack of a window.
|
||||
|
||||
*E73*
|
||||
When you try to use the tag stack while it doesn't contain anything you will
|
||||
get an error message.
|
||||
|
||||
@@ -114,6 +114,9 @@ break: >
|
||||
tnoremap <Esc> <C-W>N
|
||||
set notimeout ttimeout timeoutlen=100
|
||||
|
||||
You can also create menus similar to terminal mode mappings, but you have to
|
||||
use |:tlmenu| instead of |:tmenu|.
|
||||
|
||||
< *options-in-terminal*
|
||||
After opening the terminal window and setting 'buftype' to "terminal" the
|
||||
TerminalOpen autocommand event is triggered. This makes it possible to set
|
||||
@@ -228,6 +231,10 @@ Syntax ~
|
||||
|
||||
If you want to use more options use the |term_start()|
|
||||
function.
|
||||
If you want to split the window vertically, use: >
|
||||
:vertical terminal
|
||||
< Or short: >
|
||||
:vert ter
|
||||
|
||||
When the buffer associated with the terminal is forcibly unloaded or wiped out
|
||||
the job is killed, similar to calling `job_stop(job, "kill")` .
|
||||
@@ -613,7 +620,18 @@ This will open a window consisting of three parts:
|
||||
3. The contents of the second dump
|
||||
|
||||
You can usually see what differs in the second part. Use the 'ruler' to
|
||||
relate it to the position in the first or second dump.
|
||||
relate it to the position in the first or second dump. Letters indicate the
|
||||
kind of difference:
|
||||
X different character
|
||||
> cursor in first but not in second
|
||||
< cursor in second but not in first
|
||||
w character width differs (single vs double width)
|
||||
f foreground color differs
|
||||
b background color differs
|
||||
a attribute differs (bold, underline, reverse, etc.)
|
||||
? character missing in both
|
||||
+ character missing in first
|
||||
- character missing in second
|
||||
|
||||
Alternatively, press "s" to swap the first and second dump. Do this several
|
||||
times so that you can spot the difference in the context of the text.
|
||||
|
||||
+226
-112
@@ -38,23 +38,54 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Make ":script 40" edit the script listed with number 40. Actually use
|
||||
":scriptnames".
|
||||
|
||||
Download page: "A 64 bit version" link is wrong, use this one instead:
|
||||
https://github.com/vim/vim-win32-installer/releases/latest
|
||||
|
||||
'incsearch' with :s: (#3321)
|
||||
- :s/foo using CTRL-G moves to another line, should not happen, or use the
|
||||
correct line (it uses the last but one line) (Lifepillar, Aug 18, #3345)
|
||||
- Also support range: :/foo/,/bar/delete
|
||||
- Also support for user command, e.g. Cfilter
|
||||
- :%s/foo should take the first match below the cursor line, unless there
|
||||
isn't one?
|
||||
Then :%s?foo should take the first match above the cursor line.
|
||||
|
||||
Prompt buffer:
|
||||
- Add a command line history.
|
||||
- delay next prompt until plugin gives OK?
|
||||
- add prompt_addtext({buf}, {expr}) none add text to a prompt buffer
|
||||
|
||||
Terminal debugger:
|
||||
- Make prompt-buffer variant work better.
|
||||
- If breakpoints are deleted with "delete" in gdb the response is not parsed
|
||||
properly and the breakpoints in Vim are not removed.
|
||||
- Add option to not open the program window. It's not used when attaching to
|
||||
an already running program. (M. Kelly)
|
||||
- When only gdb window exists, on "quit" edit another buffer.
|
||||
- Termdebug does not work when Vim was build with mzscheme: gdb hangs just
|
||||
after "run". Everything else works, including communication channel. Not
|
||||
initializing mzscheme avoid the problem, thus it's not some #ifdef.
|
||||
- Add support for lldb? #3565
|
||||
- Could we do something similar for debugging Vim scripts? At least see the
|
||||
script while stepping through it. Simple version would use an extra window.
|
||||
More complete solution would actually run Vim in a Terminal an control it
|
||||
with another Vim instance.
|
||||
|
||||
Terminal emulator window:
|
||||
- GUI: When using ":set go+=!" a system() call causes the hit-enter prompt.
|
||||
(#3327)
|
||||
- GUI: hang until key typed. (#3530)
|
||||
- When the job in the terminal doesn't use mouse events, let the scroll wheel
|
||||
scroll the scrollback, like a terminal does at the shell prompt. #2490
|
||||
And use modeless selection. #2962
|
||||
- Allow for specifying the directory, with ++cwd={dir}.
|
||||
- With a vertical split only one window is updated. (Linwei, 2018 Jun 2,
|
||||
#2977)
|
||||
- Add a way to make ":term cmd" run "cmd" in a shell, instead of executing it
|
||||
directly. Perhaps ":term ++shell cmd". (#3340)
|
||||
- When pasting should call vterm_keyboard_start_paste(), e.g. when using
|
||||
K_MIDDLEMOUSE, calling insert_reg().
|
||||
- Users expect parsing the :term argument like a shell does, also support
|
||||
@@ -74,100 +105,134 @@ Terminal emulator window:
|
||||
- When 'encoding' is not utf-8, or the job is using another encoding, setup
|
||||
conversions.
|
||||
|
||||
Patch to support ":tag <tagkind> <tagname". (emmrk, 2018 May 7, #2871)
|
||||
Users get used to "function!" because they reload a script file. How about
|
||||
recognizing the script is re-sourced and not giving an error for the first
|
||||
function that overwrites. Then one can leave out the exclamation mark and
|
||||
catch actual errors, overwriting a function from another script.
|
||||
|
||||
Patch to parse ":line" in tags file and use it for search. (Daniel Hahler,
|
||||
#2546) Fixes #1057. Missing a test.
|
||||
Update for German spell files: https://github.com/chrisbra/vim/compare/5e021c990f8817a50d3264782a5...3b27c92f297540761ebbd92d04fb3
|
||||
(Christian Brabandt, 2018 Nov 4)
|
||||
|
||||
Problem with quickfix giving E42 when filtering the error list.
|
||||
(Nobuhiro Takasaki, 2018 Aug 1, #3270)
|
||||
Patch with test from Yegappan, Aug 2.
|
||||
Patch for nsis/README.txt and uninstal.txt (Ken Takata, 2018 Nov 17, #3614)
|
||||
|
||||
Patch to add variable name after "scope add". (Eddie Lebow, 2018 Feb 7, #2620)
|
||||
Maybe not needed?
|
||||
Patch to add commandline completion tests. (Dominique, #3622)
|
||||
|
||||
Patch in issue 3268, fix suggestion window appearing on wrong screen.
|
||||
Also from Ken Takata, 2018 Aug 2.
|
||||
Problem with Visual yank when 'linebreak' and 'showbreak' are set.
|
||||
Patch with tests, but it's not clear how it is supposed to work. (tommm, 2018
|
||||
Nov 17)
|
||||
|
||||
Patch for Lua support. (Kazunobu Kuriyama, 2018 May 26)
|
||||
|
||||
Patch to use NGETTEXT() in many more places. (Sergey Alyoshin, 2018 May 25)
|
||||
Updated patch May 27.
|
||||
|
||||
Patch to add winlayout() function. (Yegappan Lakshmanan, 2018 Jan 4)
|
||||
|
||||
Patch to fix profiling condition lines. (Ozaki Kiichi,, 2017 Dec 26, #2499)
|
||||
|
||||
Issue #686: apply 'F' in 'shortmess' to more messages. Also #3221.
|
||||
Patch on #3221 from Christian. Does it work now?
|
||||
|
||||
Patch to include a cfilter plugin to filter quickfix/location lists.
|
||||
(Yegappan Lakshmanan, 2018 May 12)
|
||||
Key mapping times out when using a timer in Gvim. (Michael Henry, 2018 Sep 9,
|
||||
#3417)
|
||||
|
||||
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?
|
||||
|
||||
Adding a fold with a marker in a C file doesn't add the comment /* */ if the
|
||||
line contains a * somewhere. Patch with a fix (Hirohito Higashi, 2018 Nov 22)
|
||||
|
||||
Crash in terminal with long multi-byte sequence. (2018 Nov 17, #3619)
|
||||
Dominique cannot reproduce. Update Nov 18.
|
||||
Suggested solution by Yasuhiro Matsumoto, 2018 Nov 18.
|
||||
|
||||
Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
|
||||
13, #2910) Can't reproduce?
|
||||
|
||||
On Win32 when not in the console and t_Co >= 256, allow using 'tgc'.
|
||||
(Nobuhiro Takasaki, #2833) Also check t_Co.
|
||||
|
||||
Errors found with random data:
|
||||
heap-buffer-overflow in alist_add (#2472)
|
||||
|
||||
Win32 key codes are messy. Mike Williams tried to fix that, but now old
|
||||
mappings no longer work. Create a new terminal for the better solution?
|
||||
|
||||
Patch to fix that appending makes items to be "recognized".
|
||||
(Yegappan, 2018 Nov 23). Reported by Daniel Hahler, #3633.
|
||||
|
||||
Improve fallback for menu translations, to avoid having to create lots of
|
||||
files that source the actual file. E.g. menu_da_de -> menu_da
|
||||
Include part of #3242?
|
||||
|
||||
Inlcude Chinese-Taiwan translations. (bystar, #3261)
|
||||
When a terminal exit_cb closes the window, a following typed key is lost, if
|
||||
it's in a mapping. (2018 Oct 6, #2302, #3522)
|
||||
|
||||
Patch to add FOR_ALL_FRAMES. (Yegappan, 2018 Nov 18)
|
||||
|
||||
Patch to resize to fit parent position when using ---windowid. ( Agorgianitis
|
||||
Loukas, 2018 Nov 17, #3616)
|
||||
Completion mixes results from the current buffer with tags and other files.
|
||||
Happens when typing CTRL-N while still search for results. E.g., type "b_" in
|
||||
terminal.c and then CTRL-N twice.
|
||||
Should do current file first and not split it up when more results are found.
|
||||
(Also #1890)
|
||||
|
||||
Using mouse for inputlist() doesn't work after patch 8.0.1756. (Dominique
|
||||
Pelle, 2018 Jul 22, #3239) Also see 8.0.0722. Check both console and GUI.
|
||||
Internal diff doesn't handle binary file like external diff does. (Mike
|
||||
Williams, 2018 Oct 30)
|
||||
|
||||
Problem with :tlmenu: Detach item added with all modes? Issue #3563.
|
||||
|
||||
C syntax: {} inside () causes following {} to be highlighted as error.
|
||||
(Michalis Giannakidis, 2006 Jun 1)
|
||||
|
||||
More warnings from static analysis:
|
||||
https://lgtm.com/projects/g/vim/vim/alerts/?mode=list
|
||||
|
||||
Quickfix accessing free memory. (Dominique, 2018 Oct 13, #3538)
|
||||
Yegappan will look into it.
|
||||
|
||||
Patch for this: (Aron Widforss, 2018 Oct 13, #3539)
|
||||
missing a test.
|
||||
7 Make 'scrolloff' a global-local option, so that it can be different in the
|
||||
quickfix window, for example. (Gary Holloway)
|
||||
Also do 'sidescrolloff'.
|
||||
|
||||
Patch for ConPTY support, #3474: What is the status?
|
||||
|
||||
Pasting foo} causes Vim to behave weird. (John Little, 2018 Jun 17)
|
||||
Related to bracketed paste. I cannot reproduce it.
|
||||
|
||||
Using ":file" in quickfix window during an autocommand doesn't work.
|
||||
(Jason Franklin, 2018 May 23) Allow for using it when there is no argument.
|
||||
Using CTRL-L to add a character to the search string doesn't work for the last
|
||||
character in the file. (Smylers, 2018 Nov 17, #3620)
|
||||
Suggested patch by Hirohito Higashi, 2018 Nov 18.
|
||||
|
||||
Using CTRL-L to add a character to the search string that contains \v,
|
||||
punctiuation is repeated. (Smylers, 2018 Nov 17, #3621)
|
||||
|
||||
":mksession" cannot handle a very long 'runtimepath'. (Timothy Madden, 21 Sep
|
||||
2018, #3466) Patch from Christian, 2018 Oct 30 (with comments).
|
||||
|
||||
Patch in pull request #2967: Allow white space in sign text. (Ben Jackson)
|
||||
Test fails in AppVeyor.
|
||||
|
||||
Removing flags from 'cpoptions' breaks the Winbar buttons in termdebug.
|
||||
(Dominique Pelle, 2018 Jul 16)
|
||||
Patch to simplify nsis installer. (Ken Takata, 2018 Sep 24, was #3479)
|
||||
Now included in #3501, using MUI2. Use the zip file to get the binary files:
|
||||
https://github.com/vim/vim/files/2475621/nsis-icons.zip
|
||||
Still being worked on.
|
||||
|
||||
ml_get error: (Israel Chauca Fuentes, 2018 Oct 17, #3550).
|
||||
|
||||
Patch to convert temp file name. (Yasuhiro Matsumoto, #3520)
|
||||
Not ready to include yet.
|
||||
|
||||
Problem with two buffers with the same name a/b, if it didn't exist before and
|
||||
is created outside of Vim. (dskloetg, 2018 Jul 16, #3219)
|
||||
|
||||
Memory leak in test_assert:
|
||||
==19127== by 0x2640D7: alloc (misc2.c:874)
|
||||
==19127== by 0x2646D6: vim_strsave (misc2.c:1315)
|
||||
==19127== by 0x1B68D2: f_getcwd (evalfunc.c:4950)
|
||||
And:
|
||||
==19127== by 0x2640D7: alloc (misc2.c:874)
|
||||
==19127== by 0x1A9477: set_var (eval.c:7601)
|
||||
==19127== by 0x19F96F: set_var_lval (eval.c:2233)
|
||||
==19127== by 0x19EA3A: ex_let_one (eval.c:1810)
|
||||
==19127== by 0x19D737: ex_let_vars (eval.c:1294)
|
||||
==19127== by 0x19D6B4: ex_let (eval.c:1259)
|
||||
Invalid memory access with old regexp engine. (Dominique Pelle, 2018 Sep 3,
|
||||
#3405) Introduced by 8.0.1517, which was fixing another memory access error.
|
||||
(Sep 8)
|
||||
|
||||
Add function to make use of internal diff, working on two lists and returning
|
||||
unified diff (list of lines).
|
||||
|
||||
Patch to implement 'diffref' option. (#3535)
|
||||
Easier to use a 'diffmaster' option, is the extra complexity needed?
|
||||
|
||||
Patch to fix that bracketed paste remains after Vim exits. (2018 Oct 30, #3579)
|
||||
|
||||
cursorline highlighting not removed after yanking in Visual mode.
|
||||
(Matéo Zanibelli, 2018 Oct 30, #3578)
|
||||
Patch by Christian, Oct 30.
|
||||
|
||||
Memory leaks in test_channel? (or is it because of fork())
|
||||
Using uninitialized value in test_crypt.
|
||||
Memory leaks in test_escaped_glob
|
||||
==20651== by 0x2640D7: alloc (misc2.c:874)
|
||||
==20651== by 0x2646D6: vim_strsave (misc2.c:1315)
|
||||
==20651== by 0x3741EA: get_function_args (userfunc.c:131)
|
||||
==20651== by 0x378779: ex_function (userfunc.c:2036)
|
||||
Memory leak in test_terminal:
|
||||
==23530== by 0x2640D7: alloc (misc2.c:874)
|
||||
==23530== by 0x2646D6: vim_strsave (misc2.c:1315)
|
||||
@@ -181,18 +246,61 @@ Memory leak in test_terminal:
|
||||
|
||||
gethostbyname() is old, use getaddrinfo() if available. (#3227)
|
||||
|
||||
Delete the src/main.aap file?
|
||||
|
||||
matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
|
||||
19.
|
||||
|
||||
Sourceforge Vim pages still have content, redirect from empty page.
|
||||
Check for PHP errors. (Wayne Davison, 2018 Oct 26)
|
||||
|
||||
Patch to support ":tag <tagkind> <tagname>". (emmrk, 2018 May 7, #2871)
|
||||
Use something like ":tag {kind}/{tagname}".
|
||||
Not ready to include.
|
||||
|
||||
:pedit resets the 'buflisted' option unexpectedly. (Wang Shidong, 2018 Oct 12,
|
||||
#3536)
|
||||
|
||||
home_replace() uses $HOME instead of "homedir". (Cesar Martins, 2018 Aug 9)
|
||||
|
||||
When the status line uses term_gettitle(), it does not get updated when the
|
||||
terminal title changes. (Josh Triplett, 2018 Sep 9, #3418)
|
||||
How would we know that the status line needs to be updated?
|
||||
|
||||
Adjust windows installer explanation of behavior. (scootergrisen, #3310)
|
||||
|
||||
Set g:actual_curbuf when evaluating 'statusline', not just with an expression.
|
||||
(Daniel Hahler, 2018 Aug 8, #3299)
|
||||
|
||||
ml_get error. (Dominique Pelle, 2018 Sep 14, #3434)
|
||||
|
||||
Patch to use forward slash for completion even when 'shellslash' is set.
|
||||
Adds 'completepathslash'. (Yasuhiro Matsumoto, 2018 Nov 15, #3612)
|
||||
|
||||
Only output t_Cs when t_Ce is also set. do not use Cs and Ce termcap entries. (Daniel Hahler, 2018 Sep 25)
|
||||
Add t_cS and t_cR for cursor color select and reset. Use Cs and Cr terminfo
|
||||
values.
|
||||
|
||||
Further xdiff changes:
|
||||
- More options, e.g. different kind of whitespace diff.
|
||||
- when editing text, update the surrounding diff blocks.
|
||||
- omit diff.exe from distribution
|
||||
- Can we make this show differences within a line?
|
||||
- add option to use external diff above a certain size.
|
||||
|
||||
Difference between two regexp engines: #3373
|
||||
|
||||
When the last line wraps, selecting with the mouse below that line only
|
||||
includes the first screen line. (2018 Aug 23, #3368)
|
||||
|
||||
Refactored HTML indent file. (Michael Lee, #1821)
|
||||
Ask to write a test first.
|
||||
|
||||
Patch to add getregpoint() and setreg() with an option to set "".
|
||||
(Andy Massimino, 2018 Aug 24, #3370)
|
||||
Better name?
|
||||
|
||||
MS-Windows: .lnk file not resolved properly when 'encoding' is set.
|
||||
(lkintact, 2018 Sep 22, #3473)
|
||||
|
||||
Script generated by :mksession does not work well if there are windows with
|
||||
modified buffers
|
||||
change "silent only" into "silent only!"
|
||||
@@ -209,21 +317,58 @@ Compiler warnings (geeknik, 2017 Oct 26):
|
||||
Win32 console: <F11> and <F12> typed in Insert mode don't result in normal
|
||||
characters. (#3246)
|
||||
|
||||
'foldtext' is evaluated too often. (Daniel Hahler, #2773)
|
||||
|
||||
Add Native language protocol server (LSP) support. (Yegappan Lakshmanan, 2018
|
||||
Oct 28)
|
||||
|
||||
ml_get error when using a Python script. (Yggdroot, 2017 Jun 1, #1737)
|
||||
Lemonboy can reproduce (2017 Jun 5)
|
||||
Also reproduced by Benjamin Doherty, 2018 Oct 4.
|
||||
Simpler way: Ken Takata, Oct 6.
|
||||
|
||||
Height of quickfix window is not retained with vertical splits. (Lifepillar,
|
||||
2018 Aug 24, #2998)
|
||||
|
||||
Window size is wrong when using quickfix window. (Lifepillar, 2018 Aug 24,
|
||||
#2999)
|
||||
|
||||
Tests failing for "make testgui" with GTK:
|
||||
- Test_setbufvar_options()
|
||||
- Test_exit_callback_interval()
|
||||
|
||||
Get a "No Name" buffer when 'hidden' is set and opening a new window from the
|
||||
quickfix list. (bfrg, 2018 Jan 22, #2574)
|
||||
Tracked down by Jason Franklin, 2018 Oct 30.
|
||||
Suggested patch by Yegappan, Nov 1.
|
||||
|
||||
When using CTRL-W CR in the quickfix window, the jumplist in the opened window
|
||||
is cleared, to avoid going back to the list of errors buffer (would have two
|
||||
windows with it). Can we just remove the jump list entries for the quickfix
|
||||
buffer?
|
||||
|
||||
Patch to fix that executable() may fail on very long filename in MS-Windows.
|
||||
(Ken Takata, 2016 Feb 1, update 2018 Oct 7)
|
||||
|
||||
Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6)
|
||||
Update Sep 7. Update by Christian Brabandt, 2015 Sep 8, 2016 Feb 1.
|
||||
Patch to be able to disable default digraphs (incomplete) (Eric Pruitt, 2018
|
||||
Nov 22).
|
||||
|
||||
Make balloon_show() work outside of 'balloonexpr'? Users expect it to work:
|
||||
#2948. (related to #1512?)
|
||||
On Win32 it stops showing, because showState is already ShS_SHOWING.
|
||||
balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec
|
||||
20, #2481)
|
||||
Also see #2352, want better control over balloon, perhaps set the position.
|
||||
Should also be possible to add highlighting, like in the status line?
|
||||
balloonexpr() on MS-Windows GUI doesn't handle accented chars? (nivaemail,
|
||||
2018 Sep 14)
|
||||
|
||||
Add v:motion_force. (Kana Natsuno, 2008 Dec 6)
|
||||
Maybe call it v:motiontype. Update in #3490.
|
||||
Alternative: add the force flag to mode(), after "no".
|
||||
Patch ready to include?
|
||||
|
||||
Try out background make plugin:
|
||||
https://github.com/AndrewVos/vim-make-background
|
||||
@@ -231,7 +376,7 @@ or asyncmake:
|
||||
https://github.com/yegappan/asyncmake
|
||||
|
||||
Add a ModeChanged autocommand that has an argument indicating the old and new
|
||||
mode. Also used for switching Terminal mode.
|
||||
mode, as what's returned from mode(). Also used for switching Terminal mode.
|
||||
|
||||
Add an option with file patterns, to be used when unloading a buffer: If there
|
||||
is a match, remove entries for the buffer from marks, jumplist, etc. To be
|
||||
@@ -239,9 +384,18 @@ used for git temp files.
|
||||
|
||||
Cursor in wrong position when line wraps. (#2540)
|
||||
|
||||
Patch to parse ":line" in tags file and use it for search. (Daniel Hahler,
|
||||
#2546) Fixes #1057. Missing a test.
|
||||
|
||||
Setting 'columns' in a BufEnter autocommand causes a second tab width to
|
||||
behave strangely, as if there is a gap and a vertical window separator.
|
||||
(Michael Soyka, 2018 Sep 23, #3477)
|
||||
|
||||
Make {skip} argument of searchpair() consistent with other places where we
|
||||
pass an expression to evaluate. Allow passing zero for "never skip".
|
||||
|
||||
The 'scrolloff' option is global, make it global-local. #3195
|
||||
|
||||
Add an option similar to 'lazyredraw' to skip redrawing while executing a
|
||||
script or function.
|
||||
|
||||
@@ -257,6 +411,11 @@ If 'readonly' is not set but the file appears to be readonly later, try again
|
||||
(wait a little while).
|
||||
CreateFile() returns ERROR_SHARING_VIOLATION (Linwei, 2018 May 5)
|
||||
|
||||
Using --remote to open a file in which a # appears does not work on
|
||||
MS-Windows. Perhaps in \# the \ is seen as a path separator. (Axel Bender,
|
||||
2017 Feb 9) Can we expand wildcards first and send the path literally to the
|
||||
receiving Vim? Or make an exception for #, it's not useful remotely.
|
||||
|
||||
Should add a test for every command line argument. Check coverage for what is
|
||||
missing: --nofork, -A , -b, -h, etc.
|
||||
|
||||
@@ -267,7 +426,7 @@ Quickfix window height is not kept with a vertical split. (Lifepillar, 2018
|
||||
Jun 10, #2998)
|
||||
|
||||
Improve the installer for MS-Windows. There are a few alternatives:
|
||||
- Add silent install option. (Shane Lee, #751)
|
||||
- mui2 installer improved by Ken Takata (2018 Sep 29)
|
||||
- Installer from Cream (Steve Hall).
|
||||
- Modern UI 2.0 for the Nsis installer. (Guopeng Wen)
|
||||
https://github.com/gpwen/vim-installer-mui2
|
||||
@@ -281,9 +440,8 @@ How to test that it works well for all Vim users?
|
||||
|
||||
Alternative manpager.vim. (Enno, 2018 Jan 5, #2529)
|
||||
|
||||
Does setting 'cursorline' cause syntax highlighting to slow down? Perhaps is
|
||||
mess up the cache? (Mike Lee Williams, 2018 Jan 27, #2539)
|
||||
Also: 'foldtext' is evaluated too often. (Daniel Hahler, #2773)
|
||||
Delete all the specific stuff for the Borland compiler? (#3374)
|
||||
Patch in #3377 (Thomas Dziedzic)
|
||||
|
||||
With 'foldmethod' "indent" and appending an empty line, what follows isn't
|
||||
included in the existing fold. Deleting the empty line and undo fixes it.
|
||||
@@ -317,12 +475,6 @@ Add the debug command line history to viminfo.
|
||||
Avoid that "sign unplace id" does a redraw right away, esp. when there is a
|
||||
sequence of these commands. (Andy Stewart, 2018 Mar 16)
|
||||
|
||||
ch_sendraw() with long string does not try to read in between, which may cause
|
||||
a deadlock if the reading side is waiting for the write to finish. (Nate
|
||||
Bosch, 2018 Jan 13, #2548)
|
||||
Perhaps just make chunks of 1024 bytes? Make the write non-blocking?
|
||||
Also a problem on MS-Windows: #2828.
|
||||
|
||||
Add Makefiles to the runtime/spell directory tree, since nobody uses Aap.
|
||||
Will have to explain the manual steps (downloading the .aff and .dic files,
|
||||
applying the diff, etc.
|
||||
@@ -367,14 +519,15 @@ option_save({list}) *option_save()*
|
||||
values are handled and the script ID is restored, so that
|
||||
`:verbose set` will show where the option was originally set,
|
||||
not where it was restored.
|
||||
Alternatively: save and restore ALL options. Implementation needs to use
|
||||
copy-on-write. Return an ID from option_save(), when
|
||||
option_restore(ID) is called give an error if another option_save()
|
||||
was called in the mean time, they must be balanced.
|
||||
|
||||
"gvim --remote" from a directory with non-word characters changes the current
|
||||
directory (Paulo Marcel Coelho Arabic, 2017 Oct 30, #2266)
|
||||
Also see #1689.
|
||||
|
||||
ml_get error when using a Python script. (Yggdroot, 2017 Jun 1, #1737)
|
||||
Lemonboy can reproduce (2017 Jun 5)
|
||||
|
||||
crash when removing an element while inside map(). (Nikolai Pavlov, 2018 Feb
|
||||
17, #2652)
|
||||
|
||||
@@ -388,27 +541,16 @@ No profile information for function that executes ":quit". (Daniel Hahler,
|
||||
|
||||
A function on a dictionary is not profiled. (ZyX, 2010 Dec 25)
|
||||
|
||||
Add script number to profile? (#3330 breaks tests).
|
||||
|
||||
A function defined locally and lambda's are not easily recognized.
|
||||
Mention where they were defined somewhere.
|
||||
|
||||
Get a "No Name" buffer when 'hidden' is set and opening a new window from the
|
||||
quickfix list. (bfrg, 2018 Jan 22, #2574)
|
||||
|
||||
CTRL-X on zero gets stuck on 0xfffffffffffffffe. (Hengyang Zhao, #2746)
|
||||
|
||||
Invalid range error when using BufWinLeave for closing terminal.
|
||||
(Gabriel Barta, 2017 Nov 15, #2339)
|
||||
|
||||
Using an external diff is inefficient. Not all systems have a good diff
|
||||
program available (esp. MS-Windows). Would be nice to have in internal diff
|
||||
implementation. Can then also use this for displaying changes within a line.
|
||||
Olaf Dabrunz is working on this. (10 Jan 2016)
|
||||
9 Instead invoking an external diff program, use builtin code. One can be
|
||||
found here: http://www.ioplex.com/~miallen/libmba/dl/src/diff.c
|
||||
It's complicated and badly documented.
|
||||
Alternative: use the xdiff library. Unfinished Patch from Christian Brabandt,
|
||||
2018 Mar 20, #2732)
|
||||
|
||||
ml_get errors with buggy script. (Dominique, 2017 Apr 30)
|
||||
|
||||
Error in emsg with buggy script. (Dominique, 2017 Apr 30)
|
||||
@@ -457,6 +599,9 @@ Problem with 'delcombine'. (agguser, 2017 Nov 10, #2313)
|
||||
MS-Windows: buffer completion doesn't work when using backslash (or slash)
|
||||
for a path separator. (xtal8, #2201)
|
||||
|
||||
Would be nice for insert mode completion to highlight the text that was added
|
||||
(and may change when picking another completion).
|
||||
|
||||
Test runtime files.
|
||||
Start with filetype detection: testdir/test_filetype.vim
|
||||
|
||||
@@ -486,8 +631,6 @@ It can replace the BeOS code, which is likely not used anymore.
|
||||
Now on github: #1856. Updated Oct 2017
|
||||
Got permission to include this under the Vim license.
|
||||
|
||||
Refactored HTML indent file. (Michael Lee, #1821)
|
||||
|
||||
Test_writefile_fails_conversion failure on Solaris because if different iconv
|
||||
behavior. Skip when "uname" returns "SunOS"? (Pavel Heimlich, #1872)
|
||||
|
||||
@@ -565,9 +708,6 @@ stack trace. (Yggdroot, 2017 Jul 28, #1887)
|
||||
Profile of a dict function is lost when the dict is deleted. Would it be
|
||||
possible to collect this? (Daniel Hahler, #2350)
|
||||
|
||||
Add `:filter` support for various commands (Marcin Szamotulski, 2017 Nov 12
|
||||
#2322) Now in #2327?
|
||||
|
||||
When checking if a bufref is valid, also check the buffer number, to catch the
|
||||
case of :bwipe followed by :new.
|
||||
|
||||
@@ -742,15 +882,11 @@ Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases
|
||||
Problem passing non-UTF-8 strings to Python 3. (Björn Linse, 2016 Sep 11,
|
||||
#1053) With patch, does it work?
|
||||
|
||||
Using --remote to open a file in which a # appears does not work on
|
||||
MS-Windows. Perhaps in \# the \ is seen as a path separator. (Axel Bender,
|
||||
2017 Feb 9) Can we expand wildcards first and send the path literally to the
|
||||
receiving Vim? Or make an exception for #, it's not useful remotely.
|
||||
|
||||
":sbr" docs state it respects 'switchbuf', but "vsplit" does not cause a
|
||||
vertical split. (Haldean Brown, 2017 Mar 1)
|
||||
|
||||
Use ADDR_OTHER instead of ADDR_LINES for many more commands.
|
||||
E.g. all the location list commands use a count.
|
||||
Add tests for using number larger than number of lines in buffer.
|
||||
|
||||
Might be useful to have isreadonly(), like we have islocked().
|
||||
@@ -1081,9 +1217,6 @@ Patch to avoid redrawing tabline when the popup menu is visible.
|
||||
Patch to add {skip} argument to search(). (Christian Brabandt, 2016 Feb 24)
|
||||
Update 2016 Jun 10, #861
|
||||
|
||||
Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6)
|
||||
Update Sep 7. Update by Christian Brabandt, 2015 Sep 8, 2016 Feb 1.
|
||||
|
||||
Patch to show search statistics. (Christian Brabandt, 2016 Jul 22)
|
||||
|
||||
When the CursorMovedI event triggers, and CTRL-X was typed, a script cannot
|
||||
@@ -1098,9 +1231,6 @@ Patch to add <restore> to :windo, :bufdo, etc. (Christian Brabandt, 2015 Jan
|
||||
6, 2nd message)
|
||||
Alternative: ":keeppos" command modifier: ":keeppos windo {cmd}".
|
||||
|
||||
Patch to fix that executable() may fail on very long filename in MS-Windows.
|
||||
(Ken Takata, 2016 Feb 1)
|
||||
|
||||
Patch to fix display of listchars on the cursorline. (Nayuri Aohime, 2013)
|
||||
Update suggested by Yasuhiro Matsumoto, 2014 Nov 25:
|
||||
https://gist.github.com/presuku/d3d6b230b9b6dcfc0477
|
||||
@@ -1162,10 +1292,6 @@ I can't recommend it though.
|
||||
Build with Python on Mac does not always use the right library.
|
||||
(Kazunobu Kuriyama, 2015 Mar 28)
|
||||
|
||||
Patch to add arguments to argc() and argv(). (Yegappan Lakshmanan, 2016 Jan
|
||||
24) Also need a way to get the global arg list? Update later on Jan 24
|
||||
Update Mar 5. Update Apr 7. Update Jun 5.
|
||||
|
||||
To support Thai (and other languages) word boundaries, include the ICU
|
||||
library: http://userguide.icu-project.org/boundaryanalysis
|
||||
|
||||
@@ -2159,16 +2285,11 @@ still delete them. Also convert all buffer file names?
|
||||
"gqip" in Insert mode has an off-by-one error, causing it to reflow text.
|
||||
(Raul Coronado, 2009 Nov 2)
|
||||
|
||||
Update src/testdir/main.aap.
|
||||
|
||||
Something wrong with session that has "cd" commands and "badd", in such a way
|
||||
that Vim doesn't find the edited file in the buffer list, causing the
|
||||
ATTENTION message? (Tony Mechelynck, 2008 Dec 1)
|
||||
Also: swap files are in ~/tmp/ One has relative file name ".mozilla/...".
|
||||
|
||||
Add v:motion_force. (Kana Natsuno, 2008 Dec 6)
|
||||
Maybe call it v:motiontype.
|
||||
|
||||
MS-Windows: editing the first, empty buffer, 'ffs' set to "unix,dos", ":enew"
|
||||
doesn't set 'ff' to "unix". (Ben Fritz, 2008 Dec 5) Reusing the old buffer
|
||||
probably causes this.
|
||||
@@ -2358,9 +2479,6 @@ Syntax highlighting wrong for transparent region. (Doug Kearns, 2007 Feb 26)
|
||||
Bug in using a transparent syntax region. (Hanlen in vim-dev maillist, 2007
|
||||
Jul 31)
|
||||
|
||||
C syntax: {} inside () causes following {} to be highlighted as error.
|
||||
(Michalis Giannakidis, 2006 Jun 1)
|
||||
|
||||
When 'diffopt' has "context:0" a single deleted line causes two folds to merge
|
||||
and mess up syncing. (Austin Jennings, 2008 Jan 31)
|
||||
|
||||
@@ -2823,8 +2941,6 @@ More patches:
|
||||
- Another patch for Javascript indenting. (Hari Kumar, 2010 Jul 11)
|
||||
Needs a few tests.
|
||||
- Add 'cscopeignorecase' option. (Liang Wenzhi, 2006 Sept 3)
|
||||
- Load intl.dll too, not only libintl.dll. (Mike Williams, 2006 May 9, docs
|
||||
patch May 10)
|
||||
- Extra argument to strtrans() to translate special keys to their name (Eric
|
||||
Arnold, 2006 May 22)
|
||||
- 'threglookexp' option: only match with first word in thesaurus file.
|
||||
@@ -3648,6 +3764,7 @@ Most interesting new features to be added when all bugs have been fixed:
|
||||
Alternative: Make a function for Ex commands: cmd_edit().
|
||||
- Add COLUMN NUMBERS to ":" commands ":line1,line2[col1,col2]cmd". Block
|
||||
can be selected with CTRL-V. Allow '$' (end of line) for col2.
|
||||
(issue #3292)
|
||||
- ECLIPSE plugin. Problem is: the interface is very complicated. Need to
|
||||
implement part in Java and then connect to Vim. Some hints from Alexandru
|
||||
Roman, 2004 Dec 15. Should then also work with Oracle Jdeveloper, see JSR
|
||||
@@ -5520,9 +5637,6 @@ Options:
|
||||
that marks if the option was set. Useful to keep the effect of setting
|
||||
'compatible' after ":syntax on" has been used.
|
||||
7 There is 'titleold', why is there no 'iconold'? (Chazelas)
|
||||
7 Make 'scrolloff' a global-local option, so that it can be different in the
|
||||
quickfix window, for example. (Gary Holloway)
|
||||
Also do 'sidescrolloff'.
|
||||
|
||||
|
||||
External commands:
|
||||
|
||||
@@ -284,6 +284,7 @@ If you really don't want to see this message, you can add the 'A' flag to the
|
||||
'shortmess' option. But it's very unusual that you need this.
|
||||
|
||||
For remarks about encryption and the swap file, see |:recover-crypt|.
|
||||
For programatic access to the swap file, see |swapinfo()|.
|
||||
|
||||
==============================================================================
|
||||
*11.4* Further reading
|
||||
|
||||
+11
-9
@@ -208,15 +208,17 @@ encryption key, just like the "-x" argument did: >
|
||||
|
||||
LIMITS ON ENCRYPTION
|
||||
|
||||
The encryption algorithm used by Vim is weak. It is good enough to keep out
|
||||
the casual prowler, but not good enough to keep out a cryptology expert with
|
||||
lots of time on his hands. Also you should be aware that the swap file is not
|
||||
encrypted; so while you are editing, people with superuser privileges can read
|
||||
the unencrypted text from this file.
|
||||
One way to avoid letting people read your swap file is to avoid using one.
|
||||
If the -n argument is supplied on the command line, no swap file is used
|
||||
(instead, Vim puts everything in memory). For example, to edit the encrypted
|
||||
file "file.txt" without a swap file use the following command: >
|
||||
The encryption algorithm used by Vim is not very strong. It is good enough to
|
||||
keep out the casual prowler, but not good enough to keep out a cryptology
|
||||
expert with lots of time on his hands. The text in the swap file and the undo
|
||||
file is also encrypted. However, this is done block-by-block and may reduce
|
||||
the time needed to crack a password. You can disable the swap file, but then
|
||||
a crash will cause you to lose your work, since Vim keeps all the text in
|
||||
memory only. The undo file can be disabled with the only disadvantage that
|
||||
you can't undo after unloading the buffer.
|
||||
To avoid using a swap file, supply the -n argument on the command line.
|
||||
For example, to edit the encrypted file "file.txt" without a swap file use the
|
||||
following command: >
|
||||
|
||||
vim -x -n file.txt
|
||||
|
||||
|
||||
+29
-3
@@ -612,6 +612,7 @@ String manipulation: *string-functions*
|
||||
repeat() repeat a string multiple times
|
||||
eval() evaluate a string expression
|
||||
execute() execute an Ex command and get the output
|
||||
trim() trim characters from a string
|
||||
|
||||
List manipulation: *list-functions*
|
||||
get() get an item without error for wrong index
|
||||
@@ -799,6 +800,9 @@ Buffers, windows and the argument list:
|
||||
bufwinnr() get the window number of a specific buffer
|
||||
winbufnr() get the buffer number of a specific window
|
||||
getbufline() get a list of lines from the specified buffer
|
||||
setbufline() replace a line in the specified buffer
|
||||
appendbufline() append a list of lines in the specified buffer
|
||||
deletebufline() delete lines from a specified buffer
|
||||
win_findbuf() find windows containing a buffer
|
||||
win_getid() get window ID of a window
|
||||
win_gotoid() go to window with ID
|
||||
@@ -809,6 +813,8 @@ Buffers, windows and the argument list:
|
||||
getwininfo() get a list with window information
|
||||
getchangelist() get a list of change list entries
|
||||
getjumplist() get a list of jump list entries
|
||||
swapinfo() information about a swap file
|
||||
swapname() get the swap file path of a buffer
|
||||
|
||||
Command line: *command-line-functions*
|
||||
getcmdline() get the current command line
|
||||
@@ -906,6 +912,7 @@ Window size and position: *window-size-functions*
|
||||
winheight() get height of a specific window
|
||||
winwidth() get width of a specific window
|
||||
win_screenpos() get screen position of a window
|
||||
winlayout() get layout of windows in a tab page
|
||||
winrestcmd() return command to restore window sizes
|
||||
winsaveview() get view of current window
|
||||
winrestview() restore saved view of current window
|
||||
@@ -918,6 +925,7 @@ Mappings: *mapping-functions*
|
||||
|
||||
Testing: *test-functions*
|
||||
assert_equal() assert that two expressions values are equal
|
||||
assert_equalfile() assert that two file contents are equal
|
||||
assert_notequal() assert that two expressions values are not equal
|
||||
assert_inrange() assert that an expression is inside a range
|
||||
assert_match() assert that a pattern matches the value
|
||||
@@ -940,6 +948,9 @@ Testing: *test-functions*
|
||||
test_null_partial() return a null Partial function
|
||||
test_null_string() return a null String
|
||||
test_settime() set the time Vim uses internally
|
||||
test_feedinput() add key sequence to input buffer
|
||||
test_option_not_set() reset flag indicating option was set
|
||||
test_scrollbar() simulate scrollbar movement in the GUI
|
||||
|
||||
Inter-process communication: *channel-functions*
|
||||
ch_canread() check if there is something to read
|
||||
@@ -990,6 +1001,12 @@ Terminal window: *terminal-functions*
|
||||
term_gettty() get the tty name of a terminal
|
||||
term_setansicolors() set 16 ANSI colors, used for GUI
|
||||
term_getansicolors() get 16 ANSI colors, used for GUI
|
||||
term_dumpdiff() display difference between two screen dumps
|
||||
term_dumpload() load a terminal screen dump in a window
|
||||
term_dumpwrite() dump contents of a terminal screen to a file
|
||||
term_setkill() set signal to stop job in a terminal
|
||||
term_setrestore() set command to restore a terminal
|
||||
term_setsize() set the size of a terminal
|
||||
|
||||
Timers: *timer-functions*
|
||||
timer_start() create a timer
|
||||
@@ -998,6 +1015,17 @@ Timers: *timer-functions*
|
||||
timer_stopall() stop all timers
|
||||
timer_info() get information about timers
|
||||
|
||||
Tags: *tag-functions*
|
||||
taglist() get list of matching tags
|
||||
tagfiles() get a list of tags files
|
||||
gettagstack() get the tag stack of a window
|
||||
settagstack() modify the tag stack of a window
|
||||
|
||||
Prompt Buffer: *promptbuffer-functions*
|
||||
prompt_setcallback() set prompt callback for a buffer
|
||||
prompt_setinterrupt() set interrupt callback for a buffer
|
||||
prompt_setprompt() set the prompt text for a buffer
|
||||
|
||||
Various: *various-functions*
|
||||
mode() get current editing mode
|
||||
visualmode() last visual mode used
|
||||
@@ -1025,15 +1053,13 @@ Various: *various-functions*
|
||||
|
||||
wordcount() get byte/word/char count of buffer
|
||||
|
||||
taglist() get list of matching tags
|
||||
tagfiles() get a list of tags files
|
||||
|
||||
luaeval() evaluate Lua expression
|
||||
mzeval() evaluate |MzScheme| expression
|
||||
perleval() evaluate Perl expression (|+perl|)
|
||||
py3eval() evaluate Python expression (|+python3|)
|
||||
pyeval() evaluate Python expression (|+python|)
|
||||
pyxeval() evaluate |python_x| expression
|
||||
debugbreak() interrupt a program being debugged
|
||||
|
||||
==============================================================================
|
||||
*41.7* Defining a function
|
||||
|
||||
@@ -150,7 +150,8 @@ like the variations on the ":map" command:
|
||||
:menu! Insert and Command-line mode
|
||||
:imenu Insert mode
|
||||
:cmenu Command-line mode
|
||||
:amenu All modes
|
||||
:tlmenu Terminal mode
|
||||
:amenu All modes (except for Terminal mode)
|
||||
|
||||
To avoid that the commands of a menu item are being mapped, use the command
|
||||
":noremenu", ":nnoremenu", ":anoremenu", etc.
|
||||
|
||||
+12
-1
@@ -568,7 +568,18 @@ N *+X11* Unix only: can restore window title |X11|
|
||||
The pattern is matched against the relevant part of
|
||||
the output, not necessarily the whole line. Only some
|
||||
commands support filtering, try it out to check if it
|
||||
works.
|
||||
works. Some of the commands that support filtering:
|
||||
|:#| - filter whole line
|
||||
|:command| - filter by command name
|
||||
|:files| - filter by file name
|
||||
|:highlight| - filter by highlight group
|
||||
|:jumps| - filter by file name
|
||||
|:let| - filter by variable name
|
||||
|:list| - filter whole line
|
||||
|:llist| - filter by file name or module name
|
||||
|:oldfiles| - filter by file name
|
||||
|:clist| - filter by file name or module name
|
||||
|:set| - filter by variable name
|
||||
|
||||
Only normal messages are filtered, error messages are
|
||||
not.
|
||||
|
||||
@@ -81,6 +81,10 @@ will not change within a Vim session. The |win_getid()| and |win_id2tabwin()|
|
||||
functions can be used to convert between the window/tab number and the
|
||||
identifier. There is also the window number, which may change whenever
|
||||
windows are opened or closed, see |winnr()|.
|
||||
The window number is only valid in one specific tab. The window ID is valid
|
||||
across tabs. For most functions that take a window ID or a window number, the
|
||||
window number only applies to the current tab, while the window ID can refer
|
||||
to a window in any tab.
|
||||
|
||||
Each buffer has a unique number and the number will not change within a Vim
|
||||
session. The |bufnr()| and |bufname()| functions can be used to convert
|
||||
@@ -218,9 +222,11 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N*
|
||||
|:find|. Doesn't split if {file} is not found.
|
||||
|
||||
CTRL-W CTRL-^ *CTRL-W_CTRL-^* *CTRL-W_^*
|
||||
CTRL-W ^ Does ":split #", split window in two and edit alternate file.
|
||||
When a count is given, it becomes ":split #N", split window
|
||||
and edit buffer N.
|
||||
CTRL-W ^ Split the current window in two and edit the alternate file.
|
||||
When a count N is given, split the current window and edit
|
||||
buffer N. Similar to ":sp #" and ":sp #N", but it allows the
|
||||
other buffer to be unnamed. This command matches the behavior
|
||||
of |CTRL-^|, except that it splits a window first.
|
||||
|
||||
*CTRL-W_:*
|
||||
CTRL-W : Does the same as typing |:| - enter a command line. Useful in a
|
||||
|
||||
@@ -258,7 +258,7 @@ ligne.
|
||||
.br
|
||||
0000030: 2e5c 220a 2e5c 2220 3231 7374 .\"..\" 21st
|
||||
.br
|
||||
000003c: 204d 6179 2031 3939 360a 2e5c May 1996..\
|
||||
000003c: 204d 6179 2031 3939 360a 2e5c May 1996..\\
|
||||
.br
|
||||
0000048: 2220 4d61 6e20 7061 6765 2061 " Man page a
|
||||
.br
|
||||
|
||||
@@ -258,7 +258,7 @@ ligne.
|
||||
.br
|
||||
0000030: 2e5c 220a 2e5c 2220 3231 7374 .\"..\" 21st
|
||||
.br
|
||||
000003c: 204d 6179 2031 3939 360a 2e5c May 1996..\
|
||||
000003c: 204d 6179 2031 3939 360a 2e5c May 1996..\\
|
||||
.br
|
||||
0000048: 2220 4d61 6e20 7061 6765 2061 " Man page a
|
||||
.br
|
||||
|
||||
@@ -257,15 +257,15 @@ Stampa i primi 120 byte della pagina di manuale vim.1 a 12 byte per linea.
|
||||
.br
|
||||
0000018: 224d 616e 7561 6c20 7061 6765 "Manual page
|
||||
.br
|
||||
0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\
|
||||
0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\\
|
||||
.br
|
||||
0000030: 220a 2e5c 2220 3231 7374 204d "..\" 21st M
|
||||
0000030: 220a 2e5c 2220 3231 7374 204d "..\\" 21st M
|
||||
.br
|
||||
000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\"
|
||||
000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\\"
|
||||
.br
|
||||
0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut
|
||||
.br
|
||||
0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\"
|
||||
0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\\"
|
||||
.br
|
||||
0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent
|
||||
.br
|
||||
|
||||
@@ -257,15 +257,15 @@ Stampa i primi 120 byte della pagina di manuale vim.1 a 12 byte per linea.
|
||||
.br
|
||||
0000018: 224d 616e 7561 6c20 7061 6765 "Manual page
|
||||
.br
|
||||
0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\
|
||||
0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\\
|
||||
.br
|
||||
0000030: 220a 2e5c 2220 3231 7374 204d "..\" 21st M
|
||||
0000030: 220a 2e5c 2220 3231 7374 204d "..\\" 21st M
|
||||
.br
|
||||
000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\"
|
||||
000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\\"
|
||||
.br
|
||||
0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut
|
||||
.br
|
||||
0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\"
|
||||
0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\\"
|
||||
.br
|
||||
0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent
|
||||
.br
|
||||
|
||||
+16
-13
@@ -613,12 +613,12 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
|
||||
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
|
||||
|
||||
" Git
|
||||
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
|
||||
au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
|
||||
au BufNewFile,BufRead *.git/modules/*/config setf gitconfig
|
||||
au BufNewFile,BufRead */.config/git/config setf gitconfig
|
||||
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
|
||||
au BufNewFile,BufRead *.git/config,.gitconfig,/etc/gitconfig setf gitconfig
|
||||
au BufNewFile,BufRead */.config/git/config setf gitconfig
|
||||
au BufNewFile,BufRead .gitmodules,*.git/modules/*/config setf gitconfig
|
||||
if !empty($XDG_CONFIG_HOME)
|
||||
au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig
|
||||
au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig
|
||||
endif
|
||||
au BufNewFile,BufRead git-rebase-todo setf gitrebase
|
||||
au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail
|
||||
@@ -1129,7 +1129,7 @@ au BufNewFile,BufRead *.dpr setf pascal
|
||||
" PDF
|
||||
au BufNewFile,BufRead *.pdf setf pdf
|
||||
|
||||
" PCMK - HAE - crm configure edit
|
||||
" PCMK - HAE - crm configure edit
|
||||
au BufNewFile,BufRead *.pcmk setf pcmk
|
||||
|
||||
" Perl
|
||||
@@ -1263,9 +1263,9 @@ au BufNewFile,BufRead */etc/protocols setf protocols
|
||||
" Pyrex
|
||||
au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
|
||||
|
||||
" Python, Python Shell Startup Files
|
||||
" Python, Python Shell Startup and Python Stub Files
|
||||
" Quixote (Python-based web framework)
|
||||
au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl setf python
|
||||
au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl,*.pyi setf python
|
||||
|
||||
" Radiance
|
||||
au BufNewFile,BufRead *.rad,*.mat setf radiance
|
||||
@@ -1414,8 +1414,8 @@ au BufNewFile,BufRead *.sdl,*.pr setf sdl
|
||||
" sed
|
||||
au BufNewFile,BufRead *.sed setf sed
|
||||
|
||||
" Sieve (RFC 3028)
|
||||
au BufNewFile,BufRead *.siv setf sieve
|
||||
" Sieve (RFC 3028, 5228)
|
||||
au BufNewFile,BufRead *.siv,*.sieve setf sieve
|
||||
|
||||
" Sendmail
|
||||
au BufNewFile,BufRead sendmail.cf setf sm
|
||||
@@ -1893,8 +1893,11 @@ au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc
|
||||
" Yacc or racc
|
||||
au BufNewFile,BufRead *.y call dist#ft#FTy()
|
||||
|
||||
" Yaml or Raml
|
||||
au BufNewFile,BufRead *.yaml,*.yml,*.raml setf yaml
|
||||
" Yaml
|
||||
au BufNewFile,BufRead *.yaml,*.yml setf yaml
|
||||
|
||||
" Raml
|
||||
au BufNewFile,BufRead *.raml setf raml
|
||||
|
||||
" yum conf (close enough to dosini)
|
||||
au BufNewFile,BufRead */etc/yum.conf setf dosini
|
||||
@@ -2107,7 +2110,7 @@ au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
|
||||
au BufNewFile,BufRead *.text,README setf text
|
||||
|
||||
" Help files match *.txt but should have a last line that is a modeline.
|
||||
au BufNewFile,BufRead *.txt
|
||||
au BufNewFile,BufRead *.txt
|
||||
\ if getline('$') !~ 'vim:.*ft=help'
|
||||
\| setf text
|
||||
\| endif
|
||||
|
||||
@@ -1,16 +1,34 @@
|
||||
" Vim filetype plugin
|
||||
" Language: CMake
|
||||
" Maintainer: Keith Smiley <keithbsmiley@gmail.com>
|
||||
" Last Change: 2017 Dec 24
|
||||
" Last Change: 2018 Aug 30
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" save 'cpo' for restoration at the end of this file
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl commentstring<"
|
||||
|
||||
if exists('loaded_matchit')
|
||||
let b:match_words = '\<if\>:\<elseif\>\|\<else\>:\<endif\>'
|
||||
\ . ',\<foreach\>\|\<while\>:\<break\>:\<endforeach\>\|\<endwhile\>'
|
||||
\ . ',\<macro\>:\<endmacro\>'
|
||||
\ . ',\<function\>:\<endfunction\>'
|
||||
let b:match_ignorecase = 1
|
||||
|
||||
let b:undo_ftplugin .= "| unlet b:match_words"
|
||||
endif
|
||||
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
" restore 'cpo' and clean up buffer variable
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Haskell
|
||||
" Maintainer: Daniel Campoverde <alx@sillybytes.net>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Latest Revision: 2018-08-27
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -15,6 +16,7 @@ let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=s1fl:{-,mb:-,ex:-},:-- commentstring=--\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
setlocal omnifunc=haskellcomplete#Complete
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
+21
-12
@@ -2,7 +2,7 @@
|
||||
" Language: R Markdown file
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Mon Jun 06, 2016 09:41PM
|
||||
" Last Change: Sun Jul 22, 2018 06:51PM
|
||||
" Original work by Alex Zvoleff (adjusted from R help for rmd by Michel Kuhlmann)
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
@@ -10,19 +10,12 @@ if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
|
||||
|
||||
" Nvim-R plugin needs this
|
||||
if exists("*CompleteR")
|
||||
if &omnifunc == "CompleteR"
|
||||
let b:rplugin_nonr_omnifunc = ""
|
||||
else
|
||||
let b:rplugin_nonr_omnifunc = &omnifunc
|
||||
endif
|
||||
set omnifunc=CompleteR
|
||||
if exists('g:rmd_include_html') && g:rmd_include_html
|
||||
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
|
||||
endif
|
||||
|
||||
setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
|
||||
setlocal comments=fb:*,fb:-,fb:+,n:>
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal formatoptions+=tcqln
|
||||
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
@@ -30,6 +23,22 @@ setlocal iskeyword=@,48-57,_,.
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! FormatRmd()
|
||||
if search("^[ \t]*```[ ]*{r", "bncW") > search("^[ \t]*```$", "bncW")
|
||||
setlocal comments=:#',:###,:##,:#
|
||||
else
|
||||
setlocal comments=fb:*,fb:-,fb:+,n:>
|
||||
endif
|
||||
return 1
|
||||
endfunction
|
||||
|
||||
" If you do not want 'comments' dynamically defined, put in your vimrc:
|
||||
" let g:rmd_dynamic_comments = 0
|
||||
if !exists("g:rmd_dynamic_comments") || (exists("g:rmd_dynamic_comments") && g:rmd_dynamic_comments == 1)
|
||||
setlocal formatexpr=FormatRmd()
|
||||
endif
|
||||
|
||||
|
||||
" Enables pandoc if it is installed
|
||||
unlet! b:did_ftplugin
|
||||
runtime ftplugin/pandoc.vim
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: reStructuredText documentation format with R code
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Tue Apr 07, 2015 04:38PM
|
||||
" Last Change: Wed Nov 01, 2017 10:47PM
|
||||
" Original work by Alex Zvoleff
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
@@ -16,11 +16,27 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
|
||||
setlocal comments=fb:*,fb:-,fb:+,n:>
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal formatoptions+=tcqln
|
||||
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
|
||||
function! FormatRrst()
|
||||
if search('^\.\. {r', "bncW") > search('^\.\. \.\.$', "bncW")
|
||||
setlocal comments=:#',:###,:##,:#
|
||||
else
|
||||
setlocal comments=fb:*,fb:-,fb:+,n:>
|
||||
endif
|
||||
return 1
|
||||
endfunction
|
||||
|
||||
" If you do not want 'comments' dynamically defined, put in your vimrc:
|
||||
" let g:rrst_dynamic_comments = 0
|
||||
if !exists("g:rrst_dynamic_comments") || (exists("g:rrst_dynamic_comments") && g:rrst_dynamic_comments == 1)
|
||||
setlocal formatexpr=FormatRrst()
|
||||
endif
|
||||
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
|
||||
@@ -67,10 +67,10 @@ if !exists("no_plugin_maps") && !exists("no_vim_maps")
|
||||
vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "bW")<CR>
|
||||
nnoremap <silent><buffer> ]] m':call search('^\s*fu\%[nction]\>', "W")<CR>
|
||||
vnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "W")<CR>
|
||||
nnoremap <silent><buffer> [] m':call search('^\s*endf*\%[unction]\>', "bW")<CR>
|
||||
vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "bW")<CR>
|
||||
nnoremap <silent><buffer> ][ m':call search('^\s*endf*\%[unction]\>', "W")<CR>
|
||||
vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "W")<CR>
|
||||
nnoremap <silent><buffer> [] m':call search('^\s*endf\%[unction]\>', "bW")<CR>
|
||||
vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf\%[unction]\>', "bW")<CR>
|
||||
nnoremap <silent><buffer> ][ m':call search('^\s*endf\%[unction]\>', "W")<CR>
|
||||
vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf\%[unction]\>', "W")<CR>
|
||||
|
||||
" Move around comments
|
||||
nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR>
|
||||
@@ -87,8 +87,7 @@ if exists("loaded_matchit")
|
||||
\ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' .
|
||||
\ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
|
||||
\ '\<try\>:\<cat\%[ch]\>:\<fina\%[lly]\>:\<endt\%[ry]\>,' .
|
||||
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' .
|
||||
\ '(:)'
|
||||
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,'
|
||||
" Ignore syntax region commands and settings, any 'en*' would clobber
|
||||
" if-endif.
|
||||
" - set spl=de,en
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# Portable Makefile for running indent tests.
|
||||
|
||||
VIM = vim
|
||||
|
||||
# Run the tests that didn't run yet or failed previously.
|
||||
# If a test succeeds a testdir/*.out file will be written.
|
||||
# If a test fails a testdir/*.fail file will be written.
|
||||
test:
|
||||
$(VIM) --clean --not-a-term -u testdir/runtest.vim
|
||||
|
||||
|
||||
clean:
|
||||
$(VIM) --clean --not-a-term -u testdir/cleantest.vim
|
||||
@@ -43,3 +43,5 @@ running. Add a test if the function exists and use ":finish", like this:
|
||||
The user may have several options set unlike you, try to write the file such
|
||||
that it works with any option settings. Also be aware of certain features not
|
||||
being compiled in.
|
||||
|
||||
To test the indent file, see testdir/README.txt.
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
" Vim indent file
|
||||
" Language: MSDOS batch file (with NT command extensions)
|
||||
" Maintainer: Ken Takata
|
||||
" URL: https://github.com/k-takata/vim-dosbatch-indent
|
||||
" Last Change: 2017 May 10
|
||||
" Filenames: *.bat
|
||||
" License: VIM License
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal nosmartindent
|
||||
setlocal noautoindent
|
||||
setlocal indentexpr=GetDosBatchIndent(v:lnum)
|
||||
setlocal indentkeys=!^F,o,O
|
||||
setlocal indentkeys+=0=)
|
||||
|
||||
if exists("*GetDosBatchIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! GetDosBatchIndent(lnum)
|
||||
let l:prevlnum = prevnonblank(a:lnum-1)
|
||||
if l:prevlnum == 0
|
||||
" top of file
|
||||
return 0
|
||||
endif
|
||||
|
||||
" grab the previous and current line, stripping comments.
|
||||
let l:prevl = substitute(getline(l:prevlnum), '\c^\s*\%(@\s*\)\?rem\>.*$', '', '')
|
||||
let l:thisl = getline(a:lnum)
|
||||
let l:previ = indent(l:prevlnum)
|
||||
|
||||
let l:ind = l:previ
|
||||
|
||||
if l:prevl =~? '^\s*@\=if\>.*(\s*$' ||
|
||||
\ l:prevl =~? '\<do\>\s*(\s*$' ||
|
||||
\ l:prevl =~? '\<else\>\s*\%(if\>.*\)\?(\s*$' ||
|
||||
\ l:prevl =~? '^.*\(&&\|||\)\s*(\s*$'
|
||||
" previous line opened a block
|
||||
let l:ind += shiftwidth()
|
||||
endif
|
||||
if l:thisl =~ '^\s*)'
|
||||
" this line closed a block
|
||||
let l:ind -= shiftwidth()
|
||||
endif
|
||||
|
||||
return l:ind
|
||||
endfunction
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: ts=8 sw=2 sts=2
|
||||
@@ -3,9 +3,6 @@
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2011-07-08
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal indentexpr=GetDTDIndent()
|
||||
setlocal indentkeys=!^F,o,O,>
|
||||
setlocal nosmartindent
|
||||
@@ -14,6 +11,9 @@ if exists("*GetDTDIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" TODO: Needs to be adjusted to stop at [, <, and ].
|
||||
let s:token_pattern = '^[^[:space:]]\+'
|
||||
|
||||
|
||||
@@ -625,7 +625,7 @@ func! s:CSSIndent()
|
||||
return eval(b:hi_css1indent)
|
||||
endif
|
||||
|
||||
" If the current line starts with "}" align with it's match.
|
||||
" If the current line starts with "}" align with its match.
|
||||
if curtext =~ '^\s*}'
|
||||
call cursor(v:lnum, 1)
|
||||
try
|
||||
@@ -663,7 +663,7 @@ func! s:CSSIndent()
|
||||
else
|
||||
let cur_hasfield = curtext =~ '^\s*[a-zA-Z0-9-]\+:'
|
||||
let prev_unfinished = s:CssUnfinished(prev_text)
|
||||
if !cur_hasfield && (prev_hasfield || prev_unfinished)
|
||||
if prev_unfinished
|
||||
" Continuation line has extra indent if the previous line was not a
|
||||
" continuation line.
|
||||
let extra = shiftwidth()
|
||||
@@ -716,9 +716,13 @@ func! s:CSSIndent()
|
||||
endfunc "}}}
|
||||
|
||||
" Inside <style>: Whether a line is unfinished.
|
||||
" tag:
|
||||
" tag: blah
|
||||
" tag: blah &&
|
||||
" tag: blah ||
|
||||
func! s:CssUnfinished(text)
|
||||
"{{{
|
||||
return a:text =~ '\s\(||\|&&\|:\)\s*$'
|
||||
return a:text =~ '\(||\|&&\|:\|\k\)\s*$'
|
||||
endfunc "}}}
|
||||
|
||||
" Search back for the first unfinished line above "lnum".
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
" Maintainer : Gergely Kontra <kgergely@mcl.hu>
|
||||
" Revised on : 2002.02.18. 23:34:05
|
||||
" Language : Prolog
|
||||
" Last change by: Takuya Fujiwara, 2018 Sep 23
|
||||
|
||||
" TODO:
|
||||
" checking with respect to syntax highlighting
|
||||
@@ -37,10 +38,18 @@ function! GetPrologIndent()
|
||||
let ind = indent(pnum)
|
||||
" Previous line was comment -> use previous line's indent
|
||||
if pline =~ '^\s*%'
|
||||
retu ind
|
||||
return ind
|
||||
endif
|
||||
" Previous line was the start of block comment -> +1 after '/*' comment
|
||||
if pline =~ '^\s*/\*'
|
||||
return ind + 1
|
||||
endif
|
||||
" Previous line was the end of block comment -> -1 after '*/' comment
|
||||
if pline =~ '^\s*\*/'
|
||||
return ind - 1
|
||||
endif
|
||||
" Check for clause head on previous line
|
||||
if pline =~ ':-\s*\(%.*\)\?$'
|
||||
if pline =~ '\%(:-\|-->\)\s*\(%.*\)\?$'
|
||||
let ind = ind + shiftwidth()
|
||||
" Check for end of clause on previous line
|
||||
elseif pline =~ '\.\s*\(%.*\)\?$'
|
||||
|
||||
@@ -53,6 +53,11 @@ function GetPythonIndent(lnum)
|
||||
return 0
|
||||
endif
|
||||
|
||||
" searchpair() can be slow sometimes, limit the time to 100 msec or what is
|
||||
" put in g:pyindent_searchpair_timeout
|
||||
let searchpair_stopline = 0
|
||||
let searchpair_timeout = get(g:, 'pyindent_searchpair_timeout', 150)
|
||||
|
||||
" If the previous line is inside parenthesis, use the indent of the starting
|
||||
" line.
|
||||
" Trick: use the non-existing "dummy" variable to break out of the loop when
|
||||
@@ -61,7 +66,8 @@ function GetPythonIndent(lnum)
|
||||
let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW',
|
||||
\ "line('.') < " . (plnum - s:maxoff) . " ? dummy :"
|
||||
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
|
||||
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'")
|
||||
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
|
||||
\ searchpair_stopline, searchpair_timeout)
|
||||
if parlnum > 0
|
||||
let plindent = indent(parlnum)
|
||||
let plnumstart = parlnum
|
||||
@@ -80,14 +86,16 @@ function GetPythonIndent(lnum)
|
||||
let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
|
||||
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
|
||||
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
|
||||
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'")
|
||||
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
|
||||
\ searchpair_stopline, searchpair_timeout)
|
||||
if p > 0
|
||||
if p == plnum
|
||||
" When the start is inside parenthesis, only indent one 'shiftwidth'.
|
||||
let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
|
||||
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
|
||||
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
|
||||
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'")
|
||||
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
|
||||
\ searchpair_stopline, searchpair_timeout)
|
||||
if pp > 0
|
||||
return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth())
|
||||
endif
|
||||
|
||||
+19
-18
@@ -2,7 +2,7 @@
|
||||
" Language: R
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Thu Feb 18, 2016 06:32AM
|
||||
" Last Change: Sun Aug 19, 2018 09:13PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@@ -19,22 +19,16 @@ if exists("*GetRIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Options to make the indentation more similar to Emacs/ESS:
|
||||
if !exists("g:r_indent_align_args")
|
||||
let g:r_indent_align_args = 1
|
||||
endif
|
||||
if !exists("g:r_indent_ess_comments")
|
||||
let g:r_indent_ess_comments = 0
|
||||
endif
|
||||
if !exists("g:r_indent_comment_column")
|
||||
let g:r_indent_comment_column = 40
|
||||
endif
|
||||
if ! exists("g:r_indent_ess_compatible")
|
||||
let g:r_indent_ess_compatible = 0
|
||||
endif
|
||||
if ! exists("g:r_indent_op_pattern")
|
||||
let g:r_indent_op_pattern = '\(&\||\|+\|-\|\*\|/\|=\|\~\|%\|->\)\s*$'
|
||||
endif
|
||||
let g:r_indent_align_args = get(g:, 'r_indent_align_args', 1)
|
||||
let g:r_indent_ess_comments = get(g:, 'r_indent_ess_comments', 0)
|
||||
let g:r_indent_comment_column = get(g:, 'r_indent_comment_column', 40)
|
||||
let g:r_indent_ess_compatible = get(g:, 'r_indent_ess_compatible', 0)
|
||||
let g:r_indent_op_pattern = get(g:, 'r_indent_op_pattern',
|
||||
\ '\(&\||\|+\|-\|\*\|/\|=\|\~\|%\|->\)\s*$')
|
||||
|
||||
function s:RDelete_quotes(line)
|
||||
let i = 0
|
||||
@@ -231,7 +225,7 @@ function GetRIndent()
|
||||
|
||||
let cline = SanitizeRLine(cline)
|
||||
|
||||
if cline =~ '^\s*}' || cline =~ '^\s*}\s*)$'
|
||||
if cline =~ '^\s*}'
|
||||
let indline = s:Get_matching_brace(clnum, '{', '}', 1)
|
||||
if indline > 0 && indline != clnum
|
||||
let iline = SanitizeRLine(getline(indline))
|
||||
@@ -244,6 +238,11 @@ function GetRIndent()
|
||||
endif
|
||||
endif
|
||||
|
||||
if cline =~ '^\s*)$'
|
||||
let indline = s:Get_matching_brace(clnum, '(', ')', 1)
|
||||
return indent(indline)
|
||||
endif
|
||||
|
||||
" Find the first non blank line above the current line
|
||||
let lnum = s:Get_prev_line(clnum)
|
||||
" Hit the start of the file, use zero indent.
|
||||
@@ -515,7 +514,9 @@ function GetRIndent()
|
||||
endwhile
|
||||
|
||||
return ind
|
||||
|
||||
endfunction
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: sw=2
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
" Vim indent file
|
||||
" Language: RAML (RESTful API Modeling Language)
|
||||
" Maintainer: mucheng <leisurelicht@gmail.com>
|
||||
" License: VIM LICENSE
|
||||
" Latest Revision: 2018-11-03
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Same as yaml indenting.
|
||||
runtime! indent/yaml.vim
|
||||
+22
-3
@@ -2,7 +2,7 @@
|
||||
" Language: Rmd
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Tue Apr 07, 2015 04:38PM
|
||||
" Last Change: Sun Aug 19, 2018 09:14PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@@ -20,7 +20,10 @@ if exists("*GetRmdIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function GetMdIndent()
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function s:GetMdIndent()
|
||||
let pline = getline(v:lnum - 1)
|
||||
let cline = getline(v:lnum)
|
||||
if prevnonblank(v:lnum - 1) < v:lnum - 1 || cline =~ '^\s*[-\+\*]\s' || cline =~ '^\s*\d\+\.\s\+'
|
||||
@@ -33,15 +36,31 @@ function GetMdIndent()
|
||||
return indent(prevnonblank(v:lnum - 1))
|
||||
endfunction
|
||||
|
||||
function s:GetYamlIndent()
|
||||
let pline = getline(v:lnum - 1)
|
||||
if pline =~ ':\s*$'
|
||||
return indent(v:lnum) + &sw
|
||||
elseif pline =~ '^\s*- '
|
||||
return indent(v:lnum) + 2
|
||||
endif
|
||||
return indent(prevnonblank(v:lnum - 1))
|
||||
endfunction
|
||||
|
||||
function GetRmdIndent()
|
||||
if getline(".") =~ '^[ \t]*```{r .*}$' || getline(".") =~ '^[ \t]*```$'
|
||||
return 0
|
||||
endif
|
||||
if search('^[ \t]*```{r', "bncW") > search('^[ \t]*```$', "bncW")
|
||||
return s:RIndent()
|
||||
elseif v:lnum > 1 && search('^---$', "bnW") == 1 &&
|
||||
\ (search('^---$', "nW") > v:lnum || search('^...$', "nW") > v:lnum)
|
||||
return s:GetYamlIndent()
|
||||
else
|
||||
return GetMdIndent()
|
||||
return s:GetMdIndent()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: sw=2
|
||||
|
||||
@@ -21,7 +21,7 @@ else
|
||||
let s:TeXIndent = function(substitute(&indentexpr, "()", "", ""))
|
||||
endif
|
||||
|
||||
unlet b:did_indent
|
||||
unlet! b:did_indent
|
||||
runtime indent/r.vim
|
||||
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
|
||||
let b:did_indent = 1
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
" Vim indent file
|
||||
" Language: Tera Term Language (TTL)
|
||||
" Based on Tera Term Version 4.92
|
||||
" Based on Tera Term Version 4.100
|
||||
" Maintainer: Ken Takata
|
||||
" URL: https://github.com/k-takata/vim-teraterm
|
||||
" Last Change: 2017 Jun 13
|
||||
" Last Change: 2018-08-31
|
||||
" Filenames: *.ttl
|
||||
" License: VIM License
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
TESTING INDENT SCRIPTS
|
||||
|
||||
We'll use FILETYPE for the filetype name here.
|
||||
|
||||
|
||||
FORMAT OF THE FILETYPE.IN FILE
|
||||
|
||||
First of all, create a FILETYPE.in file. It should contain:
|
||||
|
||||
- A modeline setting the 'filetype' and any other option values.
|
||||
This must work like a comment for FILETYPE. E.g. for vim:
|
||||
" vim: set ft=vim sw=4 :
|
||||
|
||||
- At least one block of lines to indent, prefixed with START_INDENT and
|
||||
followed by END_INDENT. These lines must also look like a comment for your
|
||||
FILETYPE. You would normally leave out all indent, so that the effect of
|
||||
the indent command results in adding indent. Example:
|
||||
|
||||
" START_INDENT
|
||||
func Some()
|
||||
let x = 1
|
||||
endfunc
|
||||
" END_INDENT
|
||||
|
||||
If you just want to test normal indenting with default options, you can make
|
||||
this a large number of lines. Just add all kinds of language constructs,
|
||||
nested statements, etc. with valid syntax.
|
||||
|
||||
- Optionally, add lines with INDENT_EXE after START_INDENT, followed by a Vim
|
||||
command. This will be executed before indenting the lines. Example:
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_EXE let g:vim_indent_cont = 6
|
||||
let cmd =
|
||||
\ 'some '
|
||||
\ 'string'
|
||||
" END_INDENT
|
||||
|
||||
Note that the command is not undone, you may need to reverse the effect for
|
||||
the next block of lines.
|
||||
|
||||
- Alternatively to indenting all the lines between START_INDENT and
|
||||
END_INDENT, use an INDENT_AT line, which specifies a pattern to find the
|
||||
line to indent. Example:
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_AT this-line
|
||||
func Some()
|
||||
let f = x " this-line
|
||||
endfunc
|
||||
" END_INDENT
|
||||
|
||||
Alternatively you can use INDENT_NEXT to indent the line below the matching
|
||||
pattern. Keep in mind that quite often it will indent relative to the
|
||||
matching line:
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_NEXT next-line
|
||||
func Some()
|
||||
" next-line
|
||||
let f = x
|
||||
endfunc
|
||||
" END_INDENT
|
||||
|
||||
Or use INDENT_PREV to indent the line above the matching pattern:
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_PREV prev-line
|
||||
func Some()
|
||||
let f = x
|
||||
" prev-line
|
||||
endfunc
|
||||
" END_INDENT
|
||||
|
||||
It's best to keep the whole file valid for FILETYPE, so that syntax
|
||||
highlighting works normally, and any indenting that depends on the syntax
|
||||
highlighting also works.
|
||||
|
||||
|
||||
RUNNING THE TEST
|
||||
|
||||
Before running the test, create a FILETYPE.ok file. You can leave it empty at
|
||||
first.
|
||||
|
||||
Now run "make test". After Vim has done the indenting you will see a
|
||||
FILETYPE.fail file. This contains the actual result of indenting, and it's
|
||||
different from the FILETYPE.ok file.
|
||||
|
||||
Check the contents of the FILETYPE.fail file. If it is perfectly OK, then
|
||||
rename it to overwrite the FILETYPE.ok file. If you now run "make test" again,
|
||||
the test will pass and create a FILETYPE.out file, which is identical to the
|
||||
FILETYPE.ok file. The FILETYPE.fail file will be deleted.
|
||||
|
||||
If you try to run "make test" again you will notice that nothing happens,
|
||||
because the FILETYPE.out file already exists. Delete it, or do "make clean",
|
||||
so that the text runs again. If you edit the FILETYPE.in file, so that it's
|
||||
newer than the FILETYPE.out file, the test will also run.
|
||||
@@ -0,0 +1,6 @@
|
||||
" Deletes all the test output files: *.fail and *.out
|
||||
for fname in glob('testdir/*.out', 1, 1) + glob('testdir/*.fail', 1, 1)
|
||||
call delete(fname)
|
||||
endfor
|
||||
|
||||
quit
|
||||
@@ -0,0 +1,17 @@
|
||||
% vim: set ft=matlab sw=4 :
|
||||
|
||||
% START_INDENT
|
||||
if true
|
||||
disp foo
|
||||
elseif false
|
||||
disp bar
|
||||
end
|
||||
% END_INDENT
|
||||
|
||||
% START_INDENT
|
||||
try
|
||||
statements
|
||||
catch exception
|
||||
statements
|
||||
end
|
||||
% END_INDENT
|
||||
@@ -0,0 +1,17 @@
|
||||
% vim: set ft=matlab sw=4 :
|
||||
|
||||
% START_INDENT
|
||||
if true
|
||||
disp foo
|
||||
elseif false
|
||||
disp bar
|
||||
end
|
||||
% END_INDENT
|
||||
|
||||
% START_INDENT
|
||||
try
|
||||
statements
|
||||
catch exception
|
||||
statements
|
||||
end
|
||||
% END_INDENT
|
||||
@@ -0,0 +1,119 @@
|
||||
" Runs all the indent tests for which there is no .out file.
|
||||
"
|
||||
" Current directory must be runtime/indent.
|
||||
|
||||
set nocp
|
||||
filetype indent on
|
||||
set nowrapscan
|
||||
|
||||
au! SwapExists * call HandleSwapExists()
|
||||
func HandleSwapExists()
|
||||
" Ignore finding a swap file for the test input and output, the user might be
|
||||
" editing them and that's OK.
|
||||
if expand('<afile>') =~ '.*\.\(in\|out\|fail\|ok\)'
|
||||
let v:swapchoice = 'e'
|
||||
endif
|
||||
endfunc
|
||||
|
||||
for fname in glob('testdir/*.in', 1, 1)
|
||||
let root = substitute(fname, '\.in', '', '')
|
||||
|
||||
" Execute the test if the .out file does not exist of when the .in file is
|
||||
" newer.
|
||||
let in_time = getftime(fname)
|
||||
let out_time = getftime(root . '.out')
|
||||
if out_time < 0 || in_time > out_time
|
||||
call delete(root . '.fail')
|
||||
call delete(root . '.out')
|
||||
|
||||
set sw& ts& filetype=
|
||||
exe 'split ' . fname
|
||||
|
||||
let did_some = 0
|
||||
let failed = 0
|
||||
let end = 1
|
||||
while 1
|
||||
" Indent all the lines between "START_INDENT" and "END_INDENT"
|
||||
exe end
|
||||
let start = search('\<START_INDENT\>')
|
||||
let end = search('\<END_INDENT\>')
|
||||
if start <= 0 || end <= 0 || end <= start
|
||||
if did_some == 0
|
||||
call append(0, 'ERROR: START_INDENT and/or END_INDENT not found')
|
||||
let failed = 1
|
||||
endif
|
||||
break
|
||||
else
|
||||
let did_some = 1
|
||||
|
||||
" Execute all commands marked with INDENT_EXE and find any pattern.
|
||||
let lnum = start
|
||||
let pattern = ''
|
||||
let at = ''
|
||||
while 1
|
||||
exe lnum + 1
|
||||
let lnum_exe = search('\<INDENT_EXE\>')
|
||||
exe lnum + 1
|
||||
let indent_at = search('\<INDENT_\(AT\|NEXT\|PREV\)\>')
|
||||
if lnum_exe > 0 && lnum_exe < end && (indent_at <= 0 || lnum_exe < indent_at)
|
||||
exe substitute(getline(lnum_exe), '.*INDENT_EXE', '', '')
|
||||
let lnum = lnum_exe
|
||||
let start = lnum
|
||||
elseif indent_at > 0 && indent_at < end
|
||||
if pattern != ''
|
||||
call append(indent_at, 'ERROR: duplicate pattern')
|
||||
let failed = 1
|
||||
break
|
||||
endif
|
||||
let text = getline(indent_at)
|
||||
let pattern = substitute(text, '.*INDENT_\S*\s*', '', '')
|
||||
let at = substitute(text, '.*INDENT_\(\S*\).*', '\1', '')
|
||||
let lnum = indent_at
|
||||
let start = lnum
|
||||
else
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
|
||||
exe start + 1
|
||||
if pattern == ''
|
||||
exe 'normal =' . (end - 1) . 'G'
|
||||
else
|
||||
let lnum = search(pattern)
|
||||
if lnum <= 0
|
||||
call append(indent_at, 'ERROR: pattern not found: ' . pattern)
|
||||
let failed = 1
|
||||
break
|
||||
endif
|
||||
if at == 'AT'
|
||||
exe lnum
|
||||
elseif at == 'NEXT'
|
||||
exe lnum + 1
|
||||
else
|
||||
exe lnum - 1
|
||||
endif
|
||||
normal ==
|
||||
endif
|
||||
endif
|
||||
endwhile
|
||||
|
||||
if !failed
|
||||
" Check the resulting text equals the .ok file.
|
||||
if getline(1, '$') != readfile(root . '.ok')
|
||||
let failed = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
if failed
|
||||
exe 'write ' . root . '.fail'
|
||||
echoerr 'Test ' . fname . ' FAILED!'
|
||||
sleep 2
|
||||
else
|
||||
exe 'write ' . root . '.out'
|
||||
endif
|
||||
|
||||
quit! " close the indented file
|
||||
endif
|
||||
endfor
|
||||
|
||||
qall!
|
||||
@@ -0,0 +1,46 @@
|
||||
" vim: set ft=vim sw=4 :
|
||||
|
||||
" START_INDENT
|
||||
|
||||
func Some()
|
||||
let x = 1
|
||||
endfunc
|
||||
|
||||
let cmd =
|
||||
\ 'some '
|
||||
\ 'string'
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_EXE let g:vim_indent_cont = 6
|
||||
|
||||
let cmd =
|
||||
\ 'some '
|
||||
\ 'string'
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_EXE unlet g:vim_indent_cont
|
||||
" INDENT_AT this-line
|
||||
func Some()
|
||||
let f = x " this-line
|
||||
endfunc
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_NEXT next-line
|
||||
func Some()
|
||||
" next-line
|
||||
let f = x
|
||||
endfunc
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_PREV prev-line
|
||||
func Some()
|
||||
let f = x
|
||||
" prev-line
|
||||
endfunc
|
||||
" END_INDENT
|
||||
@@ -0,0 +1,46 @@
|
||||
" vim: set ft=vim sw=4 :
|
||||
|
||||
" START_INDENT
|
||||
|
||||
func Some()
|
||||
let x = 1
|
||||
endfunc
|
||||
|
||||
let cmd =
|
||||
\ 'some '
|
||||
\ 'string'
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_EXE let g:vim_indent_cont = 6
|
||||
|
||||
let cmd =
|
||||
\ 'some '
|
||||
\ 'string'
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_EXE unlet g:vim_indent_cont
|
||||
" INDENT_AT this-line
|
||||
func Some()
|
||||
let f = x " this-line
|
||||
endfunc
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_NEXT next-line
|
||||
func Some()
|
||||
" next-line
|
||||
let f = x
|
||||
endfunc
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_PREV prev-line
|
||||
func Some()
|
||||
let f = x
|
||||
" prev-line
|
||||
endfunc
|
||||
" END_INDENT
|
||||
+10
-8
@@ -10,7 +10,7 @@ endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetVimIndent()
|
||||
setlocal indentkeys+==end,=else,=cat,=fina,=END,0\\
|
||||
setlocal indentkeys+==end,=else,=cat,=fina,=END,0\\,0=\"\\\
|
||||
|
||||
let b:undo_indent = "setl indentkeys< indentexpr<"
|
||||
|
||||
@@ -31,15 +31,17 @@ function GetVimIndent()
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
let s:lineContPat = '^\s*\(\\\|"\\ \)'
|
||||
|
||||
function GetVimIndentIntern()
|
||||
" Find a non-blank line above the current line.
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
" If the current line doesn't start with '\' and below a line that starts
|
||||
" with '\', use the indent of the line above it.
|
||||
" If the current line doesn't start with '\' or '"\ ' and below a line that
|
||||
" starts with '\' or '"\ ', use the indent of the line above it.
|
||||
let cur_text = getline(v:lnum)
|
||||
if cur_text !~ '^\s*\\'
|
||||
while lnum > 0 && getline(lnum) =~ '^\s*\\'
|
||||
if cur_text !~ s:lineContPat
|
||||
while lnum > 0 && getline(lnum) =~ s:lineContPat
|
||||
let lnum = lnum - 1
|
||||
endwhile
|
||||
endif
|
||||
@@ -51,10 +53,10 @@ function GetVimIndentIntern()
|
||||
let prev_text = getline(lnum)
|
||||
|
||||
" Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function
|
||||
" and :else. Add it three times for a line that starts with '\' after
|
||||
" a line that doesn't (or g:vim_indent_cont if it exists).
|
||||
" and :else. Add it three times for a line that starts with '\' or '"\ '
|
||||
" after a line that doesn't (or g:vim_indent_cont if it exists).
|
||||
let ind = indent(lnum)
|
||||
if cur_text =~ '^\s*\\' && v:lnum > 1 && prev_text !~ '^\s*\\'
|
||||
if cur_text =~ s:lineContPat && v:lnum > 1 && prev_text !~ s:lineContPat
|
||||
if exists("g:vim_indent_cont")
|
||||
let ind = ind + g:vim_indent_cont
|
||||
else
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: 20180724 - Correctly indent xml comments https://github.com/vim/vim/issues/3200
|
||||
" Last Change: 20181022 - Do not overwrite indentkeys setting
|
||||
" https://github.com/chrisbra/vim-xml-ftplugin/issues/1
|
||||
" 20180724 - Correctly indent xml comments https://github.com/vim/vim/issues/3200
|
||||
" Notes: 1) does not indent pure non-xml code (e.g. embedded scripts)
|
||||
" 2) will be confused by unbalanced tags in comments
|
||||
" or CDATA sections.
|
||||
@@ -19,7 +21,7 @@ set cpo&vim
|
||||
|
||||
" [-- local settings (must come before aborting the script) --]
|
||||
setlocal indentexpr=XmlIndentGet(v:lnum,1)
|
||||
setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,}
|
||||
setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,},!^F
|
||||
|
||||
if !exists('b:xml_indent_open')
|
||||
let b:xml_indent_open = '.\{-}<\a'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Menu Translations: Danish / Dansk
|
||||
" Menu Translations: Danish
|
||||
" Maintainer: scootergrisen
|
||||
" Last Change: 2018 Jun 23
|
||||
" Last Change: 2018 Aug 17
|
||||
|
||||
" Quit when menu translations have already been done.
|
||||
if exists("did_menu_trans")
|
||||
@@ -43,7 +43,7 @@ menut &Save<Tab>:w Gem<Tab>:w
|
||||
menut Save\ &As\.\.\.<Tab>:sav Gem\ som\.\.\.<Tab>:sav
|
||||
" -SEP2-
|
||||
menut Split\ &Diff\ with\.\.\. Opdel\ diff\ med\.\.\.
|
||||
menut Split\ Patched\ &By\.\.\. Opdel\ "patchet\ af"\.\.\.
|
||||
menut Split\ Patched\ &By\.\.\. Opdel\ patchet\ af\.\.\.
|
||||
" -SEP3-
|
||||
menut &Print Udskriv
|
||||
" -SEP4-
|
||||
@@ -79,7 +79,7 @@ menut Question Spørgsmål
|
||||
" Edit
|
||||
|
||||
menut Toggle\ Pattern\ &Highlight<Tab>:set\ hls! Fremhævning\ af\ mønster\ til/fra<Tab>:set\ hls!
|
||||
menut Toggle\ &Ignoring\ Case<Tab>:set\ ic! Ignorerer\ "forskel\ på\ store\ og\ små\ bogstaver"\ til/fra<Tab>:set\ ic!
|
||||
menut Toggle\ &Ignoring\ Case<Tab>:set\ ic! Ignorerer\ forskel\ på\ store\ og\ små\ bogstaver\ til/fra<Tab>:set\ ic!
|
||||
menut Toggle\ &Showing\ Matched\ Pairs<Tab>:set\ sm! Viser\ matchende\ par\ til/fra<Tab>:set\ sm!
|
||||
|
||||
menut &Context\ lines Kontekstlinjer
|
||||
@@ -117,20 +117,20 @@ menut Toggle\ Tab\ &expanding<Tab>:set\ et! Udvidelse\ af\ tabulator\ til/fra<Ta
|
||||
menut Toggle\ &Auto\ Indenting<Tab>:set\ ai! Automatisk\ indrykning\ til/fra<Tab>:set\ ai!
|
||||
menut Toggle\ &C-Style\ Indenting<Tab>:set\ cin! Indrykning\ i\ &C-stil\ til/fra<Tab>:set\ cin!
|
||||
" -SEP2-
|
||||
menut &Shiftwidth "Shiftwidth"
|
||||
" menut &Shiftwidth.2<Tab>:set\ sw=2\ sw?<CR> "Shiftwidth".2<Tab>:set\ sw=2\ sw?<CR>
|
||||
" menut &Shiftwidth.3<Tab>:set\ sw=3\ sw?<CR> "Shiftwidth".3<Tab>:set\ sw=3\ sw?<CR>
|
||||
" menut &Shiftwidth.4<Tab>:set\ sw=4\ sw?<CR> "Shiftwidth".4<Tab>:set\ sw=4\ sw?<CR>
|
||||
" menut &Shiftwidth.5<Tab>:set\ sw=5\ sw?<CR> "Shiftwidth".5<Tab>:set\ sw=5\ sw?<CR>
|
||||
" menut &Shiftwidth.6<Tab>:set\ sw=6\ sw?<CR> "Shiftwidth".6<Tab>:set\ sw=6\ sw?<CR>
|
||||
" menut &Shiftwidth.8<Tab>:set\ sw=8\ sw?<CR> "Shiftwidth".8<Tab>:set\ sw=8\ sw?<CR>
|
||||
menut &Shiftwidth Shiftwidth
|
||||
" menut &Shiftwidth.2<Tab>:set\ sw=2\ sw?<CR> Shiftwidth.2<Tab>:set\ sw=2\ sw?<CR>
|
||||
" menut &Shiftwidth.3<Tab>:set\ sw=3\ sw?<CR> Shiftwidth.3<Tab>:set\ sw=3\ sw?<CR>
|
||||
" menut &Shiftwidth.4<Tab>:set\ sw=4\ sw?<CR> Shiftwidth.4<Tab>:set\ sw=4\ sw?<CR>
|
||||
" menut &Shiftwidth.5<Tab>:set\ sw=5\ sw?<CR> Shiftwidth.5<Tab>:set\ sw=5\ sw?<CR>
|
||||
" menut &Shiftwidth.6<Tab>:set\ sw=6\ sw?<CR> Shiftwidth.6<Tab>:set\ sw=6\ sw?<CR>
|
||||
" menut &Shiftwidth.8<Tab>:set\ sw=8\ sw?<CR> Shiftwidth.8<Tab>:set\ sw=8\ sw?<CR>
|
||||
menut Soft\ &Tabstop Blødt\ tabulatorstop
|
||||
" menut Soft\ &Tabstop.2<Tab>:set\ sts=2\ sts? Blødt\ "Tabstop".2<Tab>:set\ sts=2\ sts?
|
||||
" menut Soft\ &Tabstop.3<Tab>:set\ sts=3\ sts? Blødt\ "Tabstop".3<Tab>:set\ sts=3\ sts?
|
||||
" menut Soft\ &Tabstop.4<Tab>:set\ sts=4\ sts? Blødt\ "Tabstop".4<Tab>:set\ sts=4\ sts?
|
||||
" menut Soft\ &Tabstop.5<Tab>:set\ sts=5\ sts? Blødt\ "Tabstop".5<Tab>:set\ sts=5\ sts?
|
||||
" menut Soft\ &Tabstop.6<Tab>:set\ sts=6\ sts? Blødt\ "Tabstop".6<Tab>:set\ sts=6\ sts?
|
||||
" menut Soft\ &Tabstop.8<Tab>:set\ sts=8\ sts? Blødt\ "Tabstop".8<Tab>:set\ sts=8\ sts?
|
||||
" menut Soft\ &Tabstop.2<Tab>:set\ sts=2\ sts? Blødt\ Tabstop.2<Tab>:set\ sts=2\ sts?
|
||||
" menut Soft\ &Tabstop.3<Tab>:set\ sts=3\ sts? Blødt\ Tabstop.3<Tab>:set\ sts=3\ sts?
|
||||
" menut Soft\ &Tabstop.4<Tab>:set\ sts=4\ sts? Blødt\ Tabstop.4<Tab>:set\ sts=4\ sts?
|
||||
" menut Soft\ &Tabstop.5<Tab>:set\ sts=5\ sts? Blødt\ Tabstop.5<Tab>:set\ sts=5\ sts?
|
||||
" menut Soft\ &Tabstop.6<Tab>:set\ sts=6\ sts? Blødt\ Tabstop.6<Tab>:set\ sts=6\ sts?
|
||||
" menut Soft\ &Tabstop.8<Tab>:set\ sts=8\ sts? Blødt\ Tabstop.8<Tab>:set\ sts=8\ sts?
|
||||
menut Te&xt\ Width\.\.\. Tekstbredde\.\.\.
|
||||
menut &File\ Format\.\.\. Filformat\.\.\.
|
||||
|
||||
@@ -168,11 +168,11 @@ menut None Intet
|
||||
" menut arabic arabisk
|
||||
" menut armenian-eastern armensk\ (østlig)
|
||||
" menut armenian-western armensk\ (vestlig)
|
||||
" menut belarusian-jcuken hviderussisk"\ [belarusian-jcuken]"
|
||||
" menut belarusian-jcuken hviderussisk\ [belarusian-jcuken]
|
||||
" menut czech tjekkisk
|
||||
" menut greek græsk
|
||||
" menut hebrew hebraisk
|
||||
" menut hebrewp hebraisk"\ [hebrewp]"
|
||||
" menut hebrewp hebraisk\ [hebrewp]
|
||||
" menut magyar ungarsk
|
||||
" menut persian persisk
|
||||
" menut serbian serbisk
|
||||
@@ -362,8 +362,10 @@ if has("toolbar")
|
||||
endif
|
||||
|
||||
let g:menutrans_set_lang_to = "Sæt sprog til"
|
||||
let g:menutrans_spell_change_ARG_to = 'Ændr "%s" til'
|
||||
let g:menutrans_spell_add_ARG_to_word_list = 'Tilføj "%s" til ordliste'
|
||||
|
||||
" stavegenvejsmenu pop op ting
|
||||
let g:menutrans_spell_change_ARG_to = 'Ændr\ "%s"\ til'
|
||||
let g:menutrans_spell_add_ARG_to_word_list = 'Tilføj\ "%s"\ til\ ordliste'
|
||||
let g:menutrans_spell_ignore_ARG = 'Ignorer "%s"'
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
"
|
||||
" Menu Translations: Japanese (EUC-JP)
|
||||
" Last Translator: MURAOKA Taro <koron.kaoriya@gmail.com>
|
||||
" Last Change: 28-Jan-2016.
|
||||
" Last Change: 18-Jul-2018.
|
||||
"
|
||||
" Copyright (C) 2001-2016 MURAOKA Taro <koron.kaoriya@gmail.com>,
|
||||
" Copyright (C) 2001-2018 MURAOKA Taro <koron.kaoriya@gmail.com>,
|
||||
" vim-jp <http://vim-jp.org/>
|
||||
"
|
||||
" THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
"
|
||||
" Menu Translations: Japanese (UTF-8)
|
||||
" Last Translator: MURAOKA Taro <koron.kaoriya@gmail.com>
|
||||
" Last Change: 28-Jan-2016.
|
||||
" Last Change: 18-Jul-2018.
|
||||
"
|
||||
" Copyright (C) 2001-2016 MURAOKA Taro <koron.kaoriya@gmail.com>,
|
||||
" Copyright (C) 2001-2018 MURAOKA Taro <koron.kaoriya@gmail.com>,
|
||||
" vim-jp <http://vim-jp.org/>
|
||||
"
|
||||
" THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
"
|
||||
" Menu Translations: Japanese (CP932)
|
||||
" Last Translator: MURAOKA Taro <koron.kaoriya@gmail.com>
|
||||
" Last Change: 28-Jan-2016.
|
||||
" Last Change: 18-Jul-2018.
|
||||
"
|
||||
" Copyright (C) 2001-2016 MURAOKA Taro <koron.kaoriya@gmail.com>,
|
||||
" Copyright (C) 2001-2018 MURAOKA Taro <koron.kaoriya@gmail.com>,
|
||||
" vim-jp <http://vim-jp.org/>
|
||||
"
|
||||
" THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
|
||||
|
||||
@@ -138,7 +138,7 @@ map ,Id1 o# X .`a22lr
|
||||
map ,Il0 o#XX .`a22lr
|
||||
map ,Id0 o# .`a22lr
|
||||
"
|
||||
" Patterns used to replace a germ with it's next generation
|
||||
" Patterns used to replace a germ with its next generation
|
||||
map ,Iaa o=AB =BC =CD =DE =EF =FG =GH =HI =IJ =JK =KL =LM =MN =NO =OP =PQ =QR
|
||||
map ,Iab o=RS =ST =TU =UV =VW =WX =XY =YZ =Z
|
||||
"
|
||||
@@ -232,7 +232,7 @@ map ,m p
|
||||
" Delete the character under the cursor
|
||||
map ,n x
|
||||
"
|
||||
" Replace a character by it's next, A --> B, B --> C, etc.
|
||||
" Replace a character by its next, A --> B, B --> C, etc.
|
||||
map ,a `a,jGi?=,ma
0,dll,j`a21l,ml,nh
|
||||
"
|
||||
" ----- END of Work out one germ -----
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Aap recipe to build the maze program
|
||||
:program maze : mazeansi.c
|
||||
|
||||
:program mazeclean : mazeclean.c
|
||||
+7
-2
@@ -201,6 +201,9 @@ vnoremenu 20.350 &Edit.&Copy<Tab>"+y "+y
|
||||
cnoremenu 20.350 &Edit.&Copy<Tab>"+y <C-Y>
|
||||
nnoremenu 20.360 &Edit.&Paste<Tab>"+gP "+gP
|
||||
cnoremenu &Edit.&Paste<Tab>"+gP <C-R>+
|
||||
if exists(':tlmenu')
|
||||
tlnoremenu &Edit.&Paste<Tab>"+gP <C-W>"+
|
||||
endif
|
||||
exe 'vnoremenu <script> &Edit.&Paste<Tab>"+gP ' . paste#paste_cmd['v']
|
||||
exe 'inoremenu <script> &Edit.&Paste<Tab>"+gP ' . paste#paste_cmd['i']
|
||||
nnoremenu 20.370 &Edit.Put\ &Before<Tab>[p [p
|
||||
@@ -228,7 +231,7 @@ elseif has("gui_macvim")
|
||||
vnoremenu <silent> &Edit.Find.Find\.\.\. y:promptfind <C-R>=<SID>FixFText()<CR><CR>
|
||||
an 20.410.20 &Edit.Find.Find\ Next <Nop>
|
||||
an 20.410.30 &Edit.Find.Find\ Previous <Nop>
|
||||
vmenu 20.410.35 &Edit.Find.Use\ Selection\ for\ Find y:let @/=@"<CR>:<BS>
|
||||
vnoremenu 20.410.35 &Edit.Find.Use\ Selection\ for\ Find <Nop>
|
||||
else
|
||||
an 20.410 &Edit.&Find<Tab>/ /
|
||||
an 20.420 &Edit.Find\ and\ Rep&lace<Tab>:%s :%s/
|
||||
@@ -404,6 +407,8 @@ func! s:SetupColorSchemes() abort
|
||||
let s:did_setup_color_schemes = 1
|
||||
|
||||
let n = globpath(&runtimepath, "colors/*.vim", 1, 1)
|
||||
let n += globpath(&runtimepath, "pack/*/start/*/colors/*.vim", 1, 1)
|
||||
let n += globpath(&runtimepath, "pack/*/opt/*/colors/*.vim", 1, 1)
|
||||
|
||||
" Ignore case for VMS and windows, sort on name
|
||||
let names = sort(map(n, 'substitute(v:val, "\\c.*[/\\\\:\\]]\\([^/\\\\:]*\\)\\.vim", "\\1", "")'), 1)
|
||||
@@ -1256,7 +1261,7 @@ if has("gui_macvim")
|
||||
macm Edit.Find.Find\.\.\. key=<D-f>
|
||||
macm Edit.Find.Find\ Next key=<D-g> action=findNext:
|
||||
macm Edit.Find.Find\ Previous key=<D-G> action=findPrevious:
|
||||
macm Edit.Find.Use\ Selection\ for\ Find key=<D-e>
|
||||
macm Edit.Find.Use\ Selection\ for\ Find key=<D-e> action=useSelectionForFind:
|
||||
macm Edit.Font.Show\ Fonts action=orderFrontFontPanel:
|
||||
macm Edit.Font.Bigger key=<D-=> action=fontSizeUp:
|
||||
macm Edit.Font.Smaller key=<D--> action=fontSizeDown:
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
" cfilter.vim: Plugin to filter entries from a quickfix/location list
|
||||
" Last Change: Aug 23, 2018
|
||||
" Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
|
||||
" Version: 1.1
|
||||
"
|
||||
" Commands to filter the quickfix list:
|
||||
" :Cfilter[!] /{pat}/
|
||||
" Create a new quickfix list from entries matching {pat} in the current
|
||||
" quickfix list. Both the file name and the text of the entries are
|
||||
" matched against {pat}. If ! is supplied, then entries not matching
|
||||
" {pat} are used. The pattern can be optionally enclosed using one of
|
||||
" the following characters: ', ", /. If the pattern is empty, then the
|
||||
" last used search pattern is used.
|
||||
" :Lfilter[!] /{pat}/
|
||||
" Same as :Cfilter but operates on the current location list.
|
||||
"
|
||||
if exists("loaded_cfilter")
|
||||
finish
|
||||
endif
|
||||
let loaded_cfilter = 1
|
||||
|
||||
func s:Qf_filter(qf, searchpat, bang)
|
||||
if a:qf
|
||||
let Xgetlist = function('getqflist')
|
||||
let Xsetlist = function('setqflist')
|
||||
let cmd = ':Cfilter' . a:bang
|
||||
else
|
||||
let Xgetlist = function('getloclist', [0])
|
||||
let Xsetlist = function('setloclist', [0])
|
||||
let cmd = ':Lfilter' . a:bang
|
||||
endif
|
||||
|
||||
let firstchar = a:searchpat[0]
|
||||
let lastchar = a:searchpat[-1:]
|
||||
if firstchar == lastchar &&
|
||||
\ (firstchar == '/' || firstchar == '"' || firstchar == "'")
|
||||
let pat = a:searchpat[1:-2]
|
||||
if pat == ''
|
||||
" Use the last search pattern
|
||||
let pat = @/
|
||||
endif
|
||||
else
|
||||
let pat = a:searchpat
|
||||
endif
|
||||
|
||||
if pat == ''
|
||||
return
|
||||
endif
|
||||
|
||||
if a:bang == '!'
|
||||
let cond = 'v:val.text !~# pat && bufname(v:val.bufnr) !~# pat'
|
||||
else
|
||||
let cond = 'v:val.text =~# pat || bufname(v:val.bufnr) =~# pat'
|
||||
endif
|
||||
|
||||
let items = filter(Xgetlist(), cond)
|
||||
let title = cmd . ' /' . pat . '/'
|
||||
call Xsetlist([], ' ', {'title' : title, 'items' : items})
|
||||
endfunc
|
||||
|
||||
com! -nargs=+ -bang Cfilter call s:Qf_filter(1, <q-args>, <q-bang>)
|
||||
com! -nargs=+ -bang Lfilter call s:Qf_filter(0, <q-args>, <q-bang>)
|
||||
+102
-80
@@ -73,6 +73,13 @@ let s:pc_id = 12
|
||||
let s:break_id = 13 " breakpoint number is added to this
|
||||
let s:stopped = 1
|
||||
|
||||
" Take a breakpoint number as used by GDB and turn it into an integer.
|
||||
" The breakpoint may contain a dot: 123.4
|
||||
func s:Breakpoint2SignNumber(nr)
|
||||
let t = split(a:nr, '\.')
|
||||
return t[0] * 1000 + (len(t) == 2 ? t[1] : 0)
|
||||
endfunction
|
||||
|
||||
func s:Highlight(init, old, new)
|
||||
let default = a:init ? 'default ' : ''
|
||||
if a:new ==# 'light' && a:old !=# 'light'
|
||||
@@ -138,9 +145,9 @@ endfunc
|
||||
func s:StartDebug_term(dict)
|
||||
" Open a terminal window without a job, to run the debugged program in.
|
||||
let s:ptybuf = term_start('NONE', {
|
||||
\ 'term_name': 'debugged program',
|
||||
\ 'vertical': s:vertical,
|
||||
\ })
|
||||
\ 'term_name': 'debugged program',
|
||||
\ 'vertical': s:vertical,
|
||||
\ })
|
||||
if s:ptybuf == 0
|
||||
echoerr 'Failed to open the program terminal window'
|
||||
return
|
||||
@@ -155,10 +162,10 @@ func s:StartDebug_term(dict)
|
||||
|
||||
" Create a hidden terminal window to communicate with gdb
|
||||
let s:commbuf = term_start('NONE', {
|
||||
\ 'term_name': 'gdb communication',
|
||||
\ 'out_cb': function('s:CommOutput'),
|
||||
\ 'hidden': 1,
|
||||
\ })
|
||||
\ 'term_name': 'gdb communication',
|
||||
\ 'out_cb': function('s:CommOutput'),
|
||||
\ 'hidden': 1,
|
||||
\ })
|
||||
if s:commbuf == 0
|
||||
echoerr 'Failed to open the communication terminal window'
|
||||
exe 'bwipe! ' . s:ptybuf
|
||||
@@ -174,9 +181,9 @@ func s:StartDebug_term(dict)
|
||||
let cmd = [g:termdebugger, '-quiet', '-tty', pty] + gdb_args
|
||||
call ch_log('executing "' . join(cmd) . '"')
|
||||
let s:gdbbuf = term_start(cmd, {
|
||||
\ 'exit_cb': function('s:EndTermDebug'),
|
||||
\ 'term_finish': 'close',
|
||||
\ })
|
||||
\ 'exit_cb': function('s:EndTermDebug'),
|
||||
\ 'term_finish': 'close',
|
||||
\ })
|
||||
if s:gdbbuf == 0
|
||||
echoerr 'Failed to open the gdb terminal window'
|
||||
exe 'bwipe! ' . s:ptybuf
|
||||
@@ -200,18 +207,18 @@ func s:StartDebug_term(dict)
|
||||
let response = ''
|
||||
for lnum in range(1,200)
|
||||
if term_getline(s:gdbbuf, lnum) =~ 'new-ui mi '
|
||||
" response can be in the same line or the next line
|
||||
let response = term_getline(s:gdbbuf, lnum) . term_getline(s:gdbbuf, lnum + 1)
|
||||
if response =~ 'Undefined command'
|
||||
echoerr 'Sorry, your gdb is too old, gdb 7.12 is required'
|
||||
exe 'bwipe! ' . s:ptybuf
|
||||
exe 'bwipe! ' . s:commbuf
|
||||
return
|
||||
endif
|
||||
if response =~ 'New UI allocated'
|
||||
" Success!
|
||||
break
|
||||
endif
|
||||
" response can be in the same line or the next line
|
||||
let response = term_getline(s:gdbbuf, lnum) . term_getline(s:gdbbuf, lnum + 1)
|
||||
if response =~ 'Undefined command'
|
||||
echoerr 'Sorry, your gdb is too old, gdb 7.12 is required'
|
||||
exe 'bwipe! ' . s:ptybuf
|
||||
exe 'bwipe! ' . s:commbuf
|
||||
return
|
||||
endif
|
||||
if response =~ 'New UI allocated'
|
||||
" Success!
|
||||
break
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
if response =~ 'New UI allocated'
|
||||
@@ -268,9 +275,9 @@ func s:StartDebug_prompt(dict)
|
||||
call ch_log('executing "' . join(cmd) . '"')
|
||||
|
||||
let s:gdbjob = job_start(cmd, {
|
||||
\ 'exit_cb': function('s:EndPromptDebug'),
|
||||
\ 'out_cb': function('s:GdbOutCallback'),
|
||||
\ })
|
||||
\ 'exit_cb': function('s:EndPromptDebug'),
|
||||
\ 'out_cb': function('s:GdbOutCallback'),
|
||||
\ })
|
||||
if job_status(s:gdbjob) != "run"
|
||||
echoerr 'Failed to start gdb'
|
||||
exe 'bwipe! ' . s:promptbuf
|
||||
@@ -295,8 +302,8 @@ func s:StartDebug_prompt(dict)
|
||||
" Unix: Run the debugged program in a terminal window. Open it below the
|
||||
" gdb window.
|
||||
belowright let s:ptybuf = term_start('NONE', {
|
||||
\ 'term_name': 'debugged program',
|
||||
\ })
|
||||
\ 'term_name': 'debugged program',
|
||||
\ })
|
||||
if s:ptybuf == 0
|
||||
echoerr 'Failed to open the program terminal window'
|
||||
call job_stop(s:gdbjob)
|
||||
@@ -353,7 +360,8 @@ func s:StartDebugCommon(dict)
|
||||
endif
|
||||
endif
|
||||
|
||||
" Contains breakpoints that have been placed, key is the number.
|
||||
" Contains breakpoints that have been placed, key is a string with the GDB
|
||||
" breakpoint number.
|
||||
let s:breakpoints = {}
|
||||
|
||||
augroup TermDebug
|
||||
@@ -466,9 +474,9 @@ func s:DecodeMessage(quotedText)
|
||||
if a:quotedText[i] == '\'
|
||||
let i += 1
|
||||
if a:quotedText[i] == 'n'
|
||||
" drop \n
|
||||
let i += 1
|
||||
continue
|
||||
" drop \n
|
||||
let i += 1
|
||||
continue
|
||||
endif
|
||||
endif
|
||||
let result .= a:quotedText[i]
|
||||
@@ -479,6 +487,9 @@ endfunc
|
||||
|
||||
" Extract the "name" value from a gdb message with fullname="name".
|
||||
func s:GetFullname(msg)
|
||||
if a:msg !~ 'fullname'
|
||||
return ''
|
||||
endif
|
||||
let name = s:DecodeMessage(substitute(a:msg, '.*fullname=', '', ''))
|
||||
if has('win32') && name =~ ':\\\\'
|
||||
" sometimes the name arrives double-escaped
|
||||
@@ -549,17 +560,17 @@ func s:CommOutput(chan, msg)
|
||||
endif
|
||||
if msg != ''
|
||||
if msg =~ '^\(\*stopped\|\*running\|=thread-selected\)'
|
||||
call s:HandleCursor(msg)
|
||||
call s:HandleCursor(msg)
|
||||
elseif msg =~ '^\^done,bkpt=' || msg =~ '^=breakpoint-created,'
|
||||
call s:HandleNewBreakpoint(msg)
|
||||
call s:HandleNewBreakpoint(msg)
|
||||
elseif msg =~ '^=breakpoint-deleted,'
|
||||
call s:HandleBreakpointDelete(msg)
|
||||
call s:HandleBreakpointDelete(msg)
|
||||
elseif msg =~ '^=thread-group-started'
|
||||
call s:HandleProgramRun(msg)
|
||||
call s:HandleProgramRun(msg)
|
||||
elseif msg =~ '^\^done,value='
|
||||
call s:HandleEvaluate(msg)
|
||||
call s:HandleEvaluate(msg)
|
||||
elseif msg =~ '^\^error,msg='
|
||||
call s:HandleError(msg)
|
||||
call s:HandleError(msg)
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
@@ -650,12 +661,12 @@ func s:DeleteCommands()
|
||||
let curwinid = win_getid(winnr())
|
||||
for winid in s:winbar_winids
|
||||
if win_gotoid(winid)
|
||||
aunmenu WinBar.Step
|
||||
aunmenu WinBar.Next
|
||||
aunmenu WinBar.Finish
|
||||
aunmenu WinBar.Cont
|
||||
aunmenu WinBar.Stop
|
||||
aunmenu WinBar.Eval
|
||||
aunmenu WinBar.Step
|
||||
aunmenu WinBar.Next
|
||||
aunmenu WinBar.Finish
|
||||
aunmenu WinBar.Cont
|
||||
aunmenu WinBar.Stop
|
||||
aunmenu WinBar.Eval
|
||||
endif
|
||||
endfor
|
||||
call win_gotoid(curwinid)
|
||||
@@ -673,7 +684,7 @@ func s:DeleteCommands()
|
||||
|
||||
exe 'sign unplace ' . s:pc_id
|
||||
for key in keys(s:breakpoints)
|
||||
exe 'sign unplace ' . (s:break_id + key)
|
||||
exe 'sign unplace ' . (s:break_id + s:Breakpoint2SignNumber(key))
|
||||
endfor
|
||||
unlet s:breakpoints
|
||||
|
||||
@@ -700,7 +711,7 @@ func s:SetBreakpoint()
|
||||
endif
|
||||
" Use the fname:lnum format, older gdb can't handle --source.
|
||||
call s:SendCommand('-break-insert '
|
||||
\ . fnameescape(expand('%:p')) . ':' . line('.'))
|
||||
\ . fnameescape(expand('%:p')) . ':' . line('.'))
|
||||
if do_continue
|
||||
call s:SendCommand('-exec-continue')
|
||||
endif
|
||||
@@ -714,7 +725,7 @@ func s:ClearBreakpoint()
|
||||
if val['fname'] == fname && val['lnum'] == lnum
|
||||
call s:SendCommand('-break-delete ' . key)
|
||||
" Assume this always wors, the reply is simply "^done".
|
||||
exe 'sign unplace ' . (s:break_id + key)
|
||||
exe 'sign unplace ' . (s:break_id + s:Breakpoint2SignNumber(key))
|
||||
unlet s:breakpoints[key]
|
||||
break
|
||||
endif
|
||||
@@ -839,14 +850,14 @@ func s:HandleCursor(msg)
|
||||
if lnum =~ '^[0-9]*$'
|
||||
call s:GotoSourcewinOrCreateIt()
|
||||
if expand('%:p') != fnamemodify(fname, ':p')
|
||||
if &modified
|
||||
" TODO: find existing window
|
||||
exe 'split ' . fnameescape(fname)
|
||||
let s:sourcewin = win_getid(winnr())
|
||||
call s:InstallWinbar()
|
||||
else
|
||||
exe 'edit ' . fnameescape(fname)
|
||||
endif
|
||||
if &modified
|
||||
" TODO: find existing window
|
||||
exe 'split ' . fnameescape(fname)
|
||||
let s:sourcewin = win_getid(winnr())
|
||||
call s:InstallWinbar()
|
||||
else
|
||||
exe 'edit ' . fnameescape(fname)
|
||||
endif
|
||||
endif
|
||||
exe lnum
|
||||
exe 'sign unplace ' . s:pc_id
|
||||
@@ -865,10 +876,14 @@ let s:BreakpointSigns = []
|
||||
func s:CreateBreakpoint(nr)
|
||||
if index(s:BreakpointSigns, a:nr) == -1
|
||||
call add(s:BreakpointSigns, a:nr)
|
||||
exe "sign define debugBreakpoint" . a:nr . " text=" . a:nr . " texthl=debugBreakpoint"
|
||||
exe "sign define debugBreakpoint" . a:nr . " text=" . substitute(a:nr, '\..*', '', '') . " texthl=debugBreakpoint"
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func s:SplitMsg(s)
|
||||
return split(a:s, '{\%([a-z-]\+=[^,]\+,*\)\+}\zs')
|
||||
endfunction
|
||||
|
||||
" Handle setting a breakpoint
|
||||
" Will update the sign that shows the breakpoint
|
||||
func s:HandleNewBreakpoint(msg)
|
||||
@@ -876,50 +891,57 @@ func s:HandleNewBreakpoint(msg)
|
||||
" a watch does not have a file name
|
||||
return
|
||||
endif
|
||||
for msg in s:SplitMsg(a:msg)
|
||||
let fname = s:GetFullname(msg)
|
||||
if empty(fname)
|
||||
continue
|
||||
endif
|
||||
let nr = substitute(msg, '.*number="\([0-9.]*\)\".*', '\1', '')
|
||||
if empty(nr)
|
||||
return
|
||||
endif
|
||||
call s:CreateBreakpoint(nr)
|
||||
|
||||
let nr = substitute(a:msg, '.*number="\([0-9]*\)".*', '\1', '') + 0
|
||||
if nr == 0
|
||||
return
|
||||
endif
|
||||
call s:CreateBreakpoint(nr)
|
||||
if has_key(s:breakpoints, nr)
|
||||
let entry = s:breakpoints[nr]
|
||||
else
|
||||
let entry = {}
|
||||
let s:breakpoints[nr] = entry
|
||||
endif
|
||||
|
||||
if has_key(s:breakpoints, nr)
|
||||
let entry = s:breakpoints[nr]
|
||||
else
|
||||
let entry = {}
|
||||
let s:breakpoints[nr] = entry
|
||||
endif
|
||||
let lnum = substitute(msg, '.*line="\([^"]*\)".*', '\1', '')
|
||||
let entry['fname'] = fname
|
||||
let entry['lnum'] = lnum
|
||||
|
||||
let fname = s:GetFullname(a:msg)
|
||||
let lnum = substitute(a:msg, '.*line="\([^"]*\)".*', '\1', '')
|
||||
let entry['fname'] = fname
|
||||
let entry['lnum'] = lnum
|
||||
|
||||
if bufloaded(fname)
|
||||
call s:PlaceSign(nr, entry)
|
||||
endif
|
||||
if bufloaded(fname)
|
||||
call s:PlaceSign(nr, entry)
|
||||
endif
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
func s:PlaceSign(nr, entry)
|
||||
exe 'sign place ' . (s:break_id + a:nr) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . a:nr . ' file=' . a:entry['fname']
|
||||
exe 'sign place ' . (s:break_id + s:Breakpoint2SignNumber(a:nr)) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . a:nr . ' file=' . a:entry['fname']
|
||||
let a:entry['placed'] = 1
|
||||
endfunc
|
||||
|
||||
" Handle deleting a breakpoint
|
||||
" Will remove the sign that shows the breakpoint
|
||||
func s:HandleBreakpointDelete(msg)
|
||||
let nr = substitute(a:msg, '.*id="\([0-9]*\)\".*', '\1', '') + 0
|
||||
if nr == 0
|
||||
let key = substitute(a:msg, '.*id="\([0-9.]*\)\".*', '\1', '')
|
||||
if empty(key)
|
||||
return
|
||||
endif
|
||||
if has_key(s:breakpoints, nr)
|
||||
for [nr, entry] in items(s:breakpoints)
|
||||
if stridx(nr, key) != 0
|
||||
continue
|
||||
endif
|
||||
let entry = s:breakpoints[nr]
|
||||
if has_key(entry, 'placed')
|
||||
exe 'sign unplace ' . (s:break_id + nr)
|
||||
exe 'sign unplace ' . (s:break_id + s:Breakpoint2SignNumber(nr))
|
||||
unlet entry['placed']
|
||||
endif
|
||||
unlet s:breakpoints[nr]
|
||||
endif
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
" Handle the debugged program starting to run.
|
||||
|
||||
+74
-63
@@ -1,82 +1,33 @@
|
||||
" Vim plugin for converting a syntax highlighted file to HTML.
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2015 Sep 08
|
||||
" Last Change: 2018 Nov 11
|
||||
"
|
||||
" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
|
||||
" $VIMRUNTIME/syntax/2html.vim
|
||||
"
|
||||
" TODO: {{{
|
||||
" * Options for generating the CSS in external style sheets. New :TOcss
|
||||
" command to convert the current color scheme into a (mostly) generic CSS
|
||||
" stylesheet which can be re-used. Alternate stylesheet support? Good start
|
||||
" by Erik Falor
|
||||
" ( https://groups.google.com/d/topic/vim_use/7XTmC4D22dU/discussion ).
|
||||
" * Add optional argument to :TOhtml command to specify mode (gui, cterm,
|
||||
" term) to use for the styling. Suggestion by "nacitar".
|
||||
" * Add way to override or specify which RGB colors map to the color numbers
|
||||
" in cterm. Get better defaults than just guessing? Suggestion by "nacitar".
|
||||
" * Disable filetype detection until after all processing is done.
|
||||
" * Add option for not generating the hyperlink on stuff that looks like a
|
||||
" URL? Or just color the link to fit with the colorscheme (and only special
|
||||
" when hovering)?
|
||||
" * Bug: Opera does not allow printing more than one page if uncopyable
|
||||
" regions is turned on. Possible solution: Add normal text line numbers with
|
||||
" display:none, set to display:inline for print style sheets, and hide
|
||||
" <input> elements for print, to allow Opera printing multiple pages (and
|
||||
" other uncopyable areas?). May need to make the new text invisible to IE
|
||||
" with conditional comments to prevent copying it, IE for some reason likes
|
||||
" to copy hidden text. Other browsers too?
|
||||
" * Bug: still a 1px gap throughout the fold column when html_prevent_copy is
|
||||
" "fn" in some browsers. Specifically, in Chromium on Ubuntu (but not Chrome
|
||||
" on Windows). Perhaps it is font related?
|
||||
" * Bug: still some gaps in the fold column when html_prevent_copy contains
|
||||
" 'd' and showing the whole diff (observed in multiple browsers). Only gaps
|
||||
" on diff lines though.
|
||||
" * Undercurl support via CSS3, with fallback to dotted or something:
|
||||
" https://groups.google.com/d/topic/vim_use/BzXA6He1pHg/discussion
|
||||
" * Redo updates for modified default foldtext (v11) when/if the patch is
|
||||
" accepted to modify it.
|
||||
" * Test case +diff_one_file-dynamic_folds+expand_tabs-hover_unfold
|
||||
" +ignore_conceal-ignore_folding+no_foldcolumn+no_pre+no_progress
|
||||
" +number_lines-pre_wrap-use_css+use_xhtml+whole_filler.xhtml
|
||||
" does not show the whole diff filler as it is supposed to?
|
||||
" * Bug: when 'isprint' is wrong for the current encoding, will generate
|
||||
" invalid content. Can/should anything be done about this? Maybe a separate
|
||||
" plugin to correct 'isprint' based on encoding?
|
||||
" * Check to see if the windows-125\d encodings actually work in Unix without
|
||||
" the 8bit- prefix. Add prefix to autoload dictionaries for Unix if not.
|
||||
" * Font auto-detection similar to
|
||||
" http://www.vim.org/scripts/script.php?script_id=2384 but for a variety of
|
||||
" platforms.
|
||||
" * Error thrown when sourcing 2html.vim directly when plugins are not loaded.
|
||||
" * Pull in code from http://www.vim.org/scripts/script.php?script_id=3113 :
|
||||
" - listchars support
|
||||
" - full-line background highlight
|
||||
" - other?
|
||||
" * Make it so deleted lines in a diff don't create side-scrolling (get it
|
||||
" free with full-line background highlight above).
|
||||
" * Restore open/closed folds and cursor position after processing each file
|
||||
" with option not to restore for speed increase.
|
||||
" * Add extra meta info (generation time, etc.)?
|
||||
" * Tidy up so we can use strict doctype in even more situations
|
||||
" * Implementation detail: add threshold for writing the lines to the html
|
||||
" buffer before we're done (5000 or so lines should do it)
|
||||
" * TODO comments for code cleanup scattered throughout
|
||||
"}}}
|
||||
|
||||
if exists('g:loaded_2html_plugin')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_2html_plugin = 'vim7.4_v2'
|
||||
let g:loaded_2html_plugin = 'vim8.1_v1'
|
||||
|
||||
"
|
||||
" Changelog: {{{
|
||||
" 7.4_v2 (this version): Fix error raised when converting a diff containing
|
||||
" 8.1_v1 (this version): Fix Bitbucket issue #6: Don't generate empty script
|
||||
" tag.
|
||||
" Fix Bitbucket issue #5: javascript should
|
||||
" declare variables with "var".
|
||||
" Fix Bitbucket issue #13: errors thrown sourcing
|
||||
" 2html.vim directly when plugins not loaded.
|
||||
" Fix Bitbucket issue #16: support 'vartabstop'.
|
||||
"
|
||||
" 7.4 updates: {{{
|
||||
" 7.4_v2 (Vim 7.4.0899): Fix error raised when converting a diff containing
|
||||
" an empty buffer. Jan Stocker: allow g:html_font to
|
||||
" take a list so it is easier to specfiy fallback
|
||||
" fonts in the generated CSS.
|
||||
" 7.4_v1 (Vim 7.4.0000): Fix modeline mangling for new "Vim:" format, and
|
||||
" also for version-specific modelines like "vim>703:".
|
||||
"}}}
|
||||
"
|
||||
" 7.3 updates: {{{
|
||||
" 7.3_v14 (Vim 7.3.1246): Allow suppressing line number anchors using
|
||||
@@ -170,9 +121,69 @@ let g:loaded_2html_plugin = 'vim7.4_v2'
|
||||
"}}}
|
||||
"}}}
|
||||
|
||||
" TODO: {{{
|
||||
" * Check the issue tracker:
|
||||
" https://bitbucket.org/fritzophrenic/vim-tohtml/issues?status=new&status=open
|
||||
" * Options for generating the CSS in external style sheets. New :TOcss
|
||||
" command to convert the current color scheme into a (mostly) generic CSS
|
||||
" stylesheet which can be re-used. Alternate stylesheet support? Good start
|
||||
" by Erik Falor
|
||||
" ( https://groups.google.com/d/topic/vim_use/7XTmC4D22dU/discussion ).
|
||||
" * Add optional argument to :TOhtml command to specify mode (gui, cterm,
|
||||
" term) to use for the styling. Suggestion by "nacitar".
|
||||
" * Add way to override or specify which RGB colors map to the color numbers
|
||||
" in cterm. Get better defaults than just guessing? Suggestion by "nacitar".
|
||||
" * Disable filetype detection until after all processing is done.
|
||||
" * Add option for not generating the hyperlink on stuff that looks like a
|
||||
" URL? Or just color the link to fit with the colorscheme (and only special
|
||||
" when hovering)?
|
||||
" * Bug: Opera does not allow printing more than one page if uncopyable
|
||||
" regions is turned on. Possible solution: Add normal text line numbers with
|
||||
" display:none, set to display:inline for print style sheets, and hide
|
||||
" <input> elements for print, to allow Opera printing multiple pages (and
|
||||
" other uncopyable areas?). May need to make the new text invisible to IE
|
||||
" with conditional comments to prevent copying it, IE for some reason likes
|
||||
" to copy hidden text. Other browsers too?
|
||||
" * Bug: still a 1px gap throughout the fold column when html_prevent_copy is
|
||||
" "fn" in some browsers. Specifically, in Chromium on Ubuntu (but not Chrome
|
||||
" on Windows). Perhaps it is font related?
|
||||
" * Bug: still some gaps in the fold column when html_prevent_copy contains
|
||||
" 'd' and showing the whole diff (observed in multiple browsers). Only gaps
|
||||
" on diff lines though.
|
||||
" * Undercurl support via CSS3, with fallback to dotted or something:
|
||||
" https://groups.google.com/d/topic/vim_use/BzXA6He1pHg/discussion
|
||||
" * Redo updates for modified default foldtext (v11) when/if the patch is
|
||||
" accepted to modify it.
|
||||
" * Test case +diff_one_file-dynamic_folds+expand_tabs-hover_unfold
|
||||
" +ignore_conceal-ignore_folding+no_foldcolumn+no_pre+no_progress
|
||||
" +number_lines-pre_wrap-use_css+use_xhtml+whole_filler.xhtml
|
||||
" does not show the whole diff filler as it is supposed to?
|
||||
" * Bug: when 'isprint' is wrong for the current encoding, will generate
|
||||
" invalid content. Can/should anything be done about this? Maybe a separate
|
||||
" plugin to correct 'isprint' based on encoding?
|
||||
" * Check to see if the windows-125\d encodings actually work in Unix without
|
||||
" the 8bit- prefix. Add prefix to autoload dictionaries for Unix if not.
|
||||
" * Font auto-detection similar to
|
||||
" http://www.vim.org/scripts/script.php?script_id=2384 but for a variety of
|
||||
" platforms.
|
||||
" * Pull in code from http://www.vim.org/scripts/script.php?script_id=3113 :
|
||||
" - listchars support
|
||||
" - full-line background highlight
|
||||
" - other?
|
||||
" * Make it so deleted lines in a diff don't create side-scrolling (get it
|
||||
" free with full-line background highlight above).
|
||||
" * Restore open/closed folds and cursor position after processing each file
|
||||
" with option not to restore for speed increase.
|
||||
" * Add extra meta info (generation time, etc.)?
|
||||
" * Tidy up so we can use strict doctype in even more situations
|
||||
" * Implementation detail: add threshold for writing the lines to the html
|
||||
" buffer before we're done (5000 or so lines should do it)
|
||||
" * TODO comments for code cleanup scattered throughout
|
||||
"}}}
|
||||
|
||||
" Define the :TOhtml command when:
|
||||
" - 'compatible' is not set
|
||||
" - this plugin was not already loaded
|
||||
" - this plugin or user override was not already loaded
|
||||
" - user commands are available. {{{
|
||||
if !&cp && !exists(":TOhtml") && has("user_commands")
|
||||
command -range=% -bar TOhtml :call tohtml#Convert2HTML(<line1>, <line2>)
|
||||
|
||||
+75
-18
@@ -1,6 +1,6 @@
|
||||
" Vim syntax support file
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2015 Sep 08
|
||||
" Last Change: 2018 Nov 11
|
||||
"
|
||||
" Additional contributors:
|
||||
"
|
||||
@@ -633,6 +633,45 @@ if s:current_syntax == ''
|
||||
let s:current_syntax = 'none'
|
||||
endif
|
||||
|
||||
" If the user is sourcing this script directly then the plugin version isn't
|
||||
" known because the main plugin script didn't load. In the usual case where the
|
||||
" user still has the full Vim runtime installed, or has this full plugin
|
||||
" installed in a package or something, then we can extract the version from the
|
||||
" main plugin file at it's usual spot relative to this file. Otherwise the user
|
||||
" is assembling their runtime piecemeal and we have no idea what versions of
|
||||
" other files may be present so don't even try to make a guess or assume the
|
||||
" presence of other specific files with specific meaning.
|
||||
"
|
||||
" We don't want to actually source the main plugin file here because the user
|
||||
" may have a good reason not to (e.g. they define their own TOhtml command or
|
||||
" something).
|
||||
"
|
||||
" If this seems way too complicated and convoluted, it is. Probably I should
|
||||
" have put the version information in the autoload file from the start. But the
|
||||
" version has been in the global variable for so long that changing it could
|
||||
" break a lot of user scripts.
|
||||
if exists("g:loaded_2html_plugin")
|
||||
let s:pluginversion = g:loaded_2html_plugin
|
||||
else
|
||||
if !exists("g:unloaded_tohtml_plugin")
|
||||
let s:main_plugin_path = expand("<sfile>:p:h:h")."/plugin/tohtml.vim"
|
||||
if filereadable(s:main_plugin_path)
|
||||
let s:lines = readfile(s:main_plugin_path, "", 20)
|
||||
call filter(s:lines, 'v:val =~ "loaded_2html_plugin = "')
|
||||
if empty(s:lines)
|
||||
let g:unloaded_tohtml_plugin = "unknown"
|
||||
else
|
||||
let g:unloaded_tohtml_plugin = substitute(s:lines[0], '.*loaded_2html_plugin = \([''"]\)\(\%(\1\@!.\)\+\)\1', '\2', '')
|
||||
endif
|
||||
unlet s:lines
|
||||
else
|
||||
let g:unloaded_tohtml_plugin = "unknown"
|
||||
endif
|
||||
unlet s:main_plugin_path
|
||||
endif
|
||||
let s:pluginversion = g:unloaded_tohtml_plugin
|
||||
endif
|
||||
|
||||
" Split window to create a buffer with the HTML file.
|
||||
let s:orgbufnr = winbufnr(0)
|
||||
let s:origwin_stl = &l:stl
|
||||
@@ -721,7 +760,7 @@ endif
|
||||
call extend(s:lines, [
|
||||
\ ("<title>".expand("%:p:~")."</title>"),
|
||||
\ ("<meta name=\"Generator\" content=\"Vim/".v:version/100.".".v:version%100.'"'.s:tag_close),
|
||||
\ ("<meta name=\"plugin-version\" content=\"".g:loaded_2html_plugin.'"'.s:tag_close)
|
||||
\ ("<meta name=\"plugin-version\" content=\"".s:pluginversion.'"'.s:tag_close)
|
||||
\ ])
|
||||
call add(s:lines, '<meta name="syntax" content="'.s:current_syntax.'"'.s:tag_close)
|
||||
call add(s:lines, '<meta name="settings" content="'.
|
||||
@@ -807,12 +846,15 @@ if s:settings.use_css
|
||||
endif
|
||||
endif
|
||||
|
||||
" insert script tag; javascript is always needed for the line number
|
||||
" normalization for URL hashes
|
||||
call extend(s:lines, [
|
||||
\ "",
|
||||
\ "<script type='text/javascript'>",
|
||||
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
|
||||
let s:uses_script = s:settings.dynamic_folds || s:settings.line_ids || !empty(s:settings.prevent_copy)
|
||||
|
||||
" insert script tag if needed
|
||||
if s:uses_script
|
||||
call extend(s:lines, [
|
||||
\ "",
|
||||
\ "<script type='text/javascript'>",
|
||||
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
|
||||
endif
|
||||
|
||||
" insert javascript to toggle folds open and closed
|
||||
if s:settings.dynamic_folds
|
||||
@@ -849,8 +891,9 @@ if s:settings.line_ids
|
||||
\ " if (lineNum.indexOf('L') == -1) {",
|
||||
\ " lineNum = 'L'+lineNum;",
|
||||
\ " }",
|
||||
\ " lineElem = document.getElementById(lineNum);"
|
||||
\ " var lineElem = document.getElementById(lineNum);"
|
||||
\ ])
|
||||
|
||||
if s:settings.dynamic_folds
|
||||
call extend(s:lines, [
|
||||
\ "",
|
||||
@@ -940,12 +983,14 @@ if !empty(s:settings.prevent_copy)
|
||||
\ ])
|
||||
endif
|
||||
|
||||
" insert script closing tag
|
||||
call extend(s:lines, [
|
||||
\ '',
|
||||
\ s:settings.use_xhtml ? '//]]>' : '-->',
|
||||
\ "</script>"
|
||||
\ ])
|
||||
" insert script closing tag if needed
|
||||
if s:uses_script
|
||||
call extend(s:lines, [
|
||||
\ '',
|
||||
\ s:settings.use_xhtml ? '//]]>' : '-->',
|
||||
\ "</script>"
|
||||
\ ])
|
||||
endif
|
||||
|
||||
call extend(s:lines, ["</head>"])
|
||||
if !empty(s:settings.prevent_copy)
|
||||
@@ -1525,10 +1570,22 @@ while s:lnum <= s:end
|
||||
if s:settings.expand_tabs
|
||||
let s:offset = 0
|
||||
let s:idx = stridx(s:expandedtab, "\t")
|
||||
let s:tablist = split(&vts,',')
|
||||
if empty(s:tablist)
|
||||
let s:tablist = [ &ts ]
|
||||
endif
|
||||
let s:tabidx = 0
|
||||
let s:tabwidth = 0
|
||||
while s:idx >= 0
|
||||
while s:startcol+s:idx > s:tabwidth + s:tablist[s:tabidx]
|
||||
let s:tabwidth += s:tablist[s:tabidx]
|
||||
if s:tabidx < len(s:tablist)-1
|
||||
let s:tabidx = s:tabidx+1
|
||||
endif
|
||||
endwhile
|
||||
if has("multi_byte_encoding")
|
||||
if s:startcol + s:idx == 1
|
||||
let s:i = &ts
|
||||
let s:i = s:tablist[s:tabidx]
|
||||
else
|
||||
if s:idx == 0
|
||||
let s:prevc = matchstr(s:line, '.\%' . (s:startcol + s:idx + s:offset) . 'c')
|
||||
@@ -1536,11 +1593,11 @@ while s:lnum <= s:end
|
||||
let s:prevc = matchstr(s:expandedtab, '.\%' . (s:idx + 1) . 'c')
|
||||
endif
|
||||
let s:vcol = virtcol([s:lnum, s:startcol + s:idx + s:offset - len(s:prevc)])
|
||||
let s:i = &ts - (s:vcol % &ts)
|
||||
let s:i = s:tablist[s:tabidx] - (s:vcol - s:tabwidth)
|
||||
endif
|
||||
let s:offset -= s:i - 1
|
||||
else
|
||||
let s:i = &ts - ((s:idx + s:startcol - 1) % &ts)
|
||||
let s:i = s:tablist[s:tabidx] - ((s:idx + s:startcol - 1) - s:tabwidth)
|
||||
endif
|
||||
let s:expandedtab = substitute(s:expandedtab, '\t', repeat(' ', s:i), '')
|
||||
let s:idx = stridx(s:expandedtab, "\t")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2017 Apr 30
|
||||
" Last Change: 2018 Sep 21
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -220,7 +220,7 @@ if exists("c_comment_strings")
|
||||
syn match cCommentSkip contained "^\s*\*\($\|\s\+\)"
|
||||
syn region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip
|
||||
syn region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial
|
||||
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,@Spell
|
||||
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,cWrongComTail,@Spell
|
||||
if exists("c_no_comment_fold")
|
||||
" Use "extend" here to have preprocessor lines not terminate halfway a
|
||||
" comment.
|
||||
@@ -239,6 +239,7 @@ endif
|
||||
" keep a // comment separately, it terminates a preproc. conditional
|
||||
syn match cCommentError display "\*/"
|
||||
syn match cCommentStartError display "/\*"me=e-1 contained
|
||||
syn match cWrongComTail display "\*/"
|
||||
|
||||
syn keyword cOperator sizeof
|
||||
if exists("c_gnu")
|
||||
@@ -453,6 +454,7 @@ hi def link cErrInBracket cError
|
||||
hi def link cCommentError cError
|
||||
hi def link cCommentStartError cError
|
||||
hi def link cSpaceError cError
|
||||
hi def link cWrongComTail cError
|
||||
hi def link cSpecialError cError
|
||||
hi def link cCurlyError cError
|
||||
hi def link cOperator Operator
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2018 May 03
|
||||
" Last Change: 2018 Oct 30
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -21,7 +21,7 @@ let s:binNMU='binary-only=yes'
|
||||
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
|
||||
exe 'syn match debchangelogFirstKV contained "; \('.s:urgency.'\|'.s:binNMU.'\)"'
|
||||
exe 'syn match debchangelogOtherKV contained ", \('.s:urgency.'\|'.s:binNMU.'\)"'
|
||||
syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|%(wheezy|jessie)%(-backports%(-sloppy)=|-security)=|stretch%(-backports|-security)=|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty|artful|bionic|cosmic)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
|
||||
syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|%(wheezy|jessie)%(-backports%(-sloppy)=|-security)=|stretch%(-backports|-security)=|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty|artful|bionic|cosmic|disco)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
|
||||
syn match debchangelogVersion contained "(.\{-})"
|
||||
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
|
||||
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||
" Last Change: 2018 Aug 11
|
||||
" Last Change: 2018 Oct 30
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -25,7 +25,7 @@ let s:supported = [
|
||||
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
|
||||
\ 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
|
||||
\
|
||||
\ 'trusty', 'xenial', 'bionic', 'cosmic', 'devel'
|
||||
\ 'trusty', 'xenial', 'bionic', 'cosmic', 'disco', 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
" Vim syntax file
|
||||
" Language: Configuration File (ini file) for MSDOS/MS Windows
|
||||
" Version: 2.1
|
||||
" Version: 2.2
|
||||
" Original Author: Sean M. McKee <mckee@misslink.net>
|
||||
" Previous Maintainer: Nima Talebi <nima@it.net.au>
|
||||
" Current Maintainer: Hong Xu <xuhdev@gmail.com>
|
||||
" Current Maintainer: Hong Xu <hong@topbug.net>
|
||||
" Homepage: http://www.vim.org/scripts/script.php?script_id=3747
|
||||
" https://bitbucket.org/xuhdev/syntax-dosini.vim
|
||||
" Last Change: 2011 Nov 8
|
||||
" Repository: https://github.com/xuhdev/syntax-dosini.vim
|
||||
" Last Change: 2018 Sep 11
|
||||
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
@@ -17,10 +17,11 @@ endif
|
||||
" shut case off
|
||||
syn case ignore
|
||||
|
||||
syn match dosiniNumber "\<\d\+\>"
|
||||
syn match dosiniNumber "\<\d*\.\d\+\>"
|
||||
syn match dosiniNumber "\<\d\+e[+-]\=\d\+\>"
|
||||
syn match dosiniLabel "^.\{-}="
|
||||
syn match dosiniLabel "^.\{-}\ze\s*=" nextgroup=dosiniNumber,dosiniValue
|
||||
syn match dosiniValue "=\zs.*"
|
||||
syn match dosiniNumber "=\zs\s*\d\+\s*$"
|
||||
syn match dosiniNumber "=\zs\s*\d*\.\d\+\s*$"
|
||||
syn match dosiniNumber "=\zs\s*\d\+e[+-]\=\d\+\s*$"
|
||||
syn region dosiniHeader start="^\s*\[" end="\]"
|
||||
syn match dosiniComment "^[#;].*$"
|
||||
|
||||
@@ -31,6 +32,7 @@ hi def link dosiniNumber Number
|
||||
hi def link dosiniHeader Special
|
||||
hi def link dosiniComment Comment
|
||||
hi def link dosiniLabel Type
|
||||
hi def link dosiniValue String
|
||||
|
||||
|
||||
let b:current_syntax = "dosini"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: BIND configuration file
|
||||
" Maintainer: Nick Hibma <nick@van-laarhoven.org>
|
||||
" Last change: 2007-01-30
|
||||
" Last Change: 2007-01-30
|
||||
" Filenames: named.conf, rndc.conf
|
||||
" Location: http://www.van-laarhoven.org/vim/syntax/named.vim
|
||||
"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user