mirror of
https://github.com/zoriya/vim.git
synced 2025-12-08 08:16:16 +00:00
Compare commits
89 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8294d49937 | ||
|
|
efb6482949 | ||
|
|
3e06a1e2a8 | ||
|
|
6f8f7337c1 | ||
|
|
bf61fdd008 | ||
|
|
94f4ffa770 | ||
|
|
6e4cfffe80 | ||
|
|
a9a47d157a | ||
|
|
7f7a888869 | ||
|
|
1e91eafc2e | ||
|
|
64d662d5fc | ||
|
|
127542bceb | ||
|
|
a1b9b0cc01 | ||
|
|
a7cc9e697b | ||
|
|
b3ca982407 | ||
|
|
3896a105eb | ||
|
|
94f6c06ac5 | ||
|
|
62a232506d | ||
|
|
730b248339 | ||
|
|
efa94447e8 | ||
|
|
daa2f36573 | ||
|
|
4a6d1b660f | ||
|
|
5a849da57c | ||
|
|
98b4f145eb | ||
|
|
2dd0a2c39a | ||
|
|
b7f4fa5177 | ||
|
|
bf8feb5aeb | ||
|
|
fa211f3c6d | ||
|
|
1c199f9c70 | ||
|
|
74d95b5b58 | ||
|
|
dd29f1b056 | ||
|
|
e7b1ea0276 | ||
|
|
95dd9f2571 | ||
|
|
994b89d28d | ||
|
|
de6804d871 | ||
|
|
8ce4b7ed85 | ||
|
|
9470a4d88a | ||
|
|
8e1986e389 | ||
|
|
56b8dc331d | ||
|
|
3d945cc925 | ||
|
|
ae95a3946b | ||
|
|
bbd3e3c357 | ||
|
|
b8d732e93e | ||
|
|
803af686e2 | ||
|
|
c5da1fb7ea | ||
|
|
a71e263320 | ||
|
|
f9b2b49663 | ||
|
|
fdac71c507 | ||
|
|
3c1c9fd94b | ||
|
|
c753478b82 | ||
|
|
14ddd226da | ||
|
|
ff1cd39cfe | ||
|
|
b4caa163ff | ||
|
|
a6296200bd | ||
|
|
bb1b5e24ec | ||
|
|
282f9c64e5 | ||
|
|
e46a2ed0d8 | ||
|
|
ecd34bf55d | ||
|
|
6a25026262 | ||
|
|
f96e9dec63 | ||
|
|
8314454648 | ||
|
|
434d72cbf2 | ||
|
|
658217276f | ||
|
|
7226e5b19b | ||
|
|
c2ee44cc38 | ||
|
|
aa970abd0a | ||
|
|
8b89614e69 | ||
|
|
ad486a0f0d | ||
|
|
bcbf41395f | ||
|
|
b9a2cac3ef | ||
|
|
eef2102e20 | ||
|
|
e4218b9416 | ||
|
|
909443028b | ||
|
|
491799be50 | ||
|
|
f8992d47cd | ||
|
|
2c79e9d14d | ||
|
|
333894b195 | ||
|
|
f5a48010ef | ||
|
|
2ec208172c | ||
|
|
b86abadf87 | ||
|
|
2caa1594e7 | ||
|
|
8e4c8c853e | ||
|
|
586268721d | ||
|
|
af50e899e7 | ||
|
|
4e1d8bd79b | ||
|
|
b53da7918c | ||
|
|
af8edbb8dc | ||
|
|
ce6583568f | ||
|
|
badd8486f7 |
@@ -11,6 +11,9 @@ freebsd_12_task:
|
||||
- NPROC=$(getconf _NPROCESSORS_ONLN)
|
||||
- ./configure --with-features=${FEATURES}
|
||||
- make -j${NPROC}
|
||||
- src/vim --version
|
||||
test_script:
|
||||
- make test
|
||||
- src/vim --version
|
||||
# run tests as user "cirrus" instead of root
|
||||
- pw useradd cirrus -m
|
||||
- chown -R cirrus:cirrus .
|
||||
- sudo -u cirrus make test
|
||||
|
||||
10
.github/workflows/ci-windows.yaml
vendored
10
.github/workflows/ci-windows.yaml
vendored
@@ -210,14 +210,18 @@ jobs:
|
||||
|
||||
echo %COL_GREEN%Wait for vim tests to finish.%COL_RESET%
|
||||
cd ..\src2\testdir
|
||||
:: Wait about 5 minutes.
|
||||
for /L %%i in (1,1,300) do (
|
||||
:: Wait about 10 minutes.
|
||||
for /L %%i in (1,1,600) do (
|
||||
if exist done.txt goto exitloop
|
||||
ping -n 2 localhost > nul
|
||||
)
|
||||
echo %COL_RED%Timed out.%COL_RESET%
|
||||
set timeout=1
|
||||
:exitloop
|
||||
|
||||
echo %COL_GREEN%Test results of vim:%COL_RESET%
|
||||
if exist messages type messages
|
||||
nmake -nologo -f Make_dos.mak report VIMPROG=..\..\src\vim || exit 1
|
||||
if "%timeout%"=="1" (
|
||||
echo %COL_RED%Timed out.%COL_RESET%
|
||||
exit 1
|
||||
)
|
||||
|
||||
53
.travis.yml
53
.travis.yml
@@ -1,23 +1,29 @@
|
||||
language: c
|
||||
|
||||
env:
|
||||
global:
|
||||
- BUILD=yes TEST=test CONFOPT= LEAK_CFLAGS="-DEXITFREE" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
|
||||
_anchors:
|
||||
envs:
|
||||
- &tiny-nogui
|
||||
BUILD=yes TEST=test FEATURES=tiny CONFOPT="--disable-gui" LEAK_CFLAGS="-DEXITFREE" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
FEATURES=tiny CONFOPT="--disable-gui"
|
||||
- &tiny
|
||||
BUILD=yes TEST=test FEATURES=tiny CONFOPT= LEAK_CFLAGS="-DEXITFREE" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
FEATURES=tiny
|
||||
- &small
|
||||
BUILD=yes TEST=test FEATURES=small CONFOPT= LEAK_CFLAGS="-DEXITFREE" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
FEATURES=small
|
||||
- &normal
|
||||
BUILD=yes TEST=test FEATURES=normal CONFOPT= LEAK_CFLAGS="-DEXITFREE" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
FEATURES=normal
|
||||
- &linux-huge
|
||||
BUILD=yes TEST="scripttests test_libvterm" CFLAGS="--coverage -DUSE_GCOV_FLUSH" LDFLAGS=--coverage FEATURES=huge LEAK_CFLAGS="-DEXITFREE" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
FEATURES=huge TEST="scripttests test_libvterm"
|
||||
CONFOPT="--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
|
||||
- &osx-huge # macOS build
|
||||
BUILD=yes TEST=test FEATURES=huge LEAK_CFLAGS="-DEXITFREE" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
CONFOPT="--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
|
||||
FEATURES=huge
|
||||
CONFOPT="--enable-perlinterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
|
||||
- &unittests
|
||||
BUILD=no TEST=unittests CFLAGS="--coverage -DUSE_GCOV_FLUSH" LDFLAGS=--coverage FEATURES=huge LEAK_CFLAGS="-DEXITFREE" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
|
||||
BUILD=no TEST=unittests FEATURES=huge CHECK_AUTOCONF=yes
|
||||
- &coverage
|
||||
CFLAGS="--coverage -DUSE_GCOV_FLUSH" LDFLAGS=--coverage
|
||||
- &asan # ASAN build
|
||||
SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
|
||||
ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
|
||||
@@ -87,7 +93,7 @@ _anchors:
|
||||
# Lua is not installed on macOS
|
||||
- export LUA_PREFIX=/usr/local
|
||||
|
||||
coverage: &coverage
|
||||
coverage: &eval-coverage
|
||||
# needed for https support for coveralls building cffi only works with gcc,
|
||||
# not with clang
|
||||
- CC=gcc pip install --user cpp-coveralls pyopenssl ndg-httpsclient pyasn1
|
||||
@@ -202,9 +208,16 @@ jobs:
|
||||
env:
|
||||
- *normal
|
||||
- *shadowopt
|
||||
# Temporarily disabled, always fails
|
||||
#- <<: *linux
|
||||
# arch: s390x
|
||||
# name: huge/gcc-s390x
|
||||
# compiler: gcc
|
||||
# env: *linux-huge
|
||||
# services: []
|
||||
- <<: *linux
|
||||
arch: s390x
|
||||
name: huge/gcc-s390x
|
||||
arch: arm64
|
||||
name: huge/gcc-arm64
|
||||
compiler: gcc
|
||||
env: *linux-huge
|
||||
services: []
|
||||
@@ -213,14 +226,17 @@ jobs:
|
||||
compiler: clang
|
||||
env:
|
||||
- *linux-huge
|
||||
- *coverage
|
||||
# Clang cannot compile test_libvterm with "--coverage" flag.
|
||||
- TEST=scripttests
|
||||
after_success: *coverage
|
||||
after_success: *eval-coverage
|
||||
- <<: *linux
|
||||
name: huge+coverage/gcc
|
||||
compiler: gcc
|
||||
env: *linux-huge
|
||||
after_success: *coverage
|
||||
env:
|
||||
- *linux-huge
|
||||
- *coverage
|
||||
after_success: *eval-coverage
|
||||
- <<: *linux # ASAN
|
||||
name: huge+asan/gcc
|
||||
compiler: gcc
|
||||
@@ -233,13 +249,16 @@ jobs:
|
||||
compiler: gcc
|
||||
env:
|
||||
- *linux-huge
|
||||
- *coverage
|
||||
- TEST="-C src testgui"
|
||||
after_success: *coverage
|
||||
after_success: *eval-coverage
|
||||
- <<: *linux
|
||||
name: unittests+coverage/gcc
|
||||
compiler: gcc
|
||||
env: *unittests
|
||||
after_success: *coverage
|
||||
env:
|
||||
- *unittests
|
||||
- *coverage
|
||||
after_success: *eval-coverage
|
||||
- <<: *linux
|
||||
name: vimtags/gcc
|
||||
compiler: gcc
|
||||
|
||||
3
Filelist
3
Filelist
@@ -149,6 +149,7 @@ SRC_ALL = \
|
||||
src/vim9compile.c \
|
||||
src/vim9execute.c \
|
||||
src/vim9script.c \
|
||||
src/vim9type.c \
|
||||
src/viminfo.c \
|
||||
src/winclip.c \
|
||||
src/window.c \
|
||||
@@ -172,6 +173,7 @@ SRC_ALL = \
|
||||
src/testdir/setup_gui.vim \
|
||||
src/testdir/shared.vim \
|
||||
src/testdir/vim9.vim \
|
||||
src/testdir/script_util.vim \
|
||||
src/testdir/summarize.vim \
|
||||
src/testdir/term_util.vim \
|
||||
src/testdir/view_util.vim \
|
||||
@@ -303,6 +305,7 @@ SRC_ALL = \
|
||||
src/proto/vim9compile.pro \
|
||||
src/proto/vim9execute.pro \
|
||||
src/proto/vim9script.pro \
|
||||
src/proto/vim9type.pro \
|
||||
src/proto/viminfo.pro \
|
||||
src/proto/winclip.pro \
|
||||
src/proto/window.pro \
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
This is an experimental side of [Vim](https://github.com/vim/vim).
|
||||
It explores ways of making Vim script faster and better.
|
||||
|
||||
WARNING: The Vim9 script features are in the early stages of development,
|
||||
anything can break!
|
||||
WARNING: The Vim9 script features are still under development, anything can
|
||||
break!
|
||||
|
||||
# Why Vim9?
|
||||
|
||||
@@ -52,7 +52,7 @@ we can gain, and also that Vim script can be faster than builtin
|
||||
interfaces.
|
||||
|
||||
In practice the script would not do something useless as counting but change
|
||||
the text. For example, re-indent all the lines:
|
||||
the text. For example, reindent all the lines:
|
||||
|
||||
``` vim
|
||||
let totallen = 0
|
||||
@@ -91,9 +91,9 @@ Instead of using script language support in Vim:
|
||||
with them. The job and channel support already makes this possible.
|
||||
Really any language can be used, also Java and Go, which are not
|
||||
available built-in.
|
||||
* Phase out the built-in language interfaces, make maintenance a bit easier
|
||||
and executables easier to build. They will be kept for backwards
|
||||
compatibility, no new features.
|
||||
* No priority for the built-in language interfaces. They will have to be kept
|
||||
for backwards compatibility, but many users won't need a Vim build with these
|
||||
interfaces.
|
||||
* Improve the Vim script language, it is used to communicate with the external
|
||||
tool and implements the Vim side of the interface. Also, it can be used when
|
||||
an external tool is undesired.
|
||||
@@ -140,6 +140,9 @@ Taking this one step further is also dropping "s:" for script-local variables;
|
||||
everything at the script level is script-local by default. Since this is not
|
||||
backwards compatible it requires a new script style: Vim9 script!
|
||||
|
||||
To avoid having more variations, the syntax inside a compiled function is the
|
||||
same as in Vim9 script. Thus you have legacy syntax and Vim9 syntax.
|
||||
|
||||
It should be possible to convert code from other languages to Vim
|
||||
script. We can add functionality to make this easier. This still needs
|
||||
to be discussed, but we can consider adding type checking and a simple
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
" Vim completion script
|
||||
" Language: Java Script
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2017 Mar 04
|
||||
" Maintainer: Jay Sitter (jay@jaysitter.com)
|
||||
" URL: https://github.com/jsit/javascriptcomplete.vim/
|
||||
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2020 Jul 30
|
||||
|
||||
function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
if a:findstart
|
||||
@@ -154,12 +156,30 @@ function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
\ 'text', 'vLink']
|
||||
let bodys = bodyprop
|
||||
" Document - document.
|
||||
let docuprop = ['anchors', 'applets', 'childNodes', 'embeds', 'forms', 'images', 'links', 'stylesheets',
|
||||
\ 'body', 'cookie', 'documentElement', 'domain', 'lastModified', 'referrer', 'title', 'URL']
|
||||
let documeth = ['close', 'createAttribute', 'createElement', 'createTextNode', 'focus', 'getElementById',
|
||||
\ 'getElementsByName', 'getElementsByTagName', 'open', 'write', 'writeln',
|
||||
\ 'onClick', 'onDblClick', 'onFocus', 'onKeyDown', 'onKeyPress', 'onKeyUp',
|
||||
\ 'onMouseDown', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onResize']
|
||||
let docuprop = ['anchors', 'body', 'characterSet', 'doctype',
|
||||
\ 'documentElement', 'documentURI', 'embeds', 'fonts', 'forms',
|
||||
\ 'head', 'hidden', 'images', 'implementation', 'lastStyleSheetSet',
|
||||
\ 'links', 'plugins', 'preferredStyleSheetSet', 'scripts',
|
||||
\ 'scrollingElement', 'selectedStyleSheetSet', 'styleSheetSets',
|
||||
\ 'timeline', 'visibilityState', 'cookie', 'defaultView',
|
||||
\ 'designMode', 'dir', 'domain', 'lastModified', 'location',
|
||||
\ 'readyState', 'referrer', 'title', 'URL', 'activeElement',
|
||||
\ 'fullscreenElement', 'styleSheets']
|
||||
let documeth = ['adoptNode', 'close', 'createAttribute',
|
||||
\ 'createAttributeNS', 'createCDATASection', 'createComment',
|
||||
\ 'createDocumentFragment', 'createElement', 'createElementNS',
|
||||
\ 'createEvent', 'createExpression', 'createNSResolver',
|
||||
\ 'createNodeIterator', 'createProcessingInstruction', 'createRange',
|
||||
\ 'createTextNode', 'createTouchList', 'createTreeWalker',
|
||||
\ 'enableStyleSheetsForSet', 'evaluate', 'focus', 'getElementById',
|
||||
\ 'getElementById', 'getElementsByClassName', 'getElementsByName',
|
||||
\ 'getElementsByTagName', 'getElementsByTagNameNS',
|
||||
\ 'hasStorageAccess', 'importNode', 'onClick', 'onDblClick',
|
||||
\ 'onFocus', 'onKeyDown', 'onKeyPress', 'onKeyUp', 'onMouseDown',
|
||||
\ 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp',
|
||||
\ 'onResize', 'open', 'querySelector', 'querySelectorAll',
|
||||
\ 'requestStorageAccess', 'write', 'writeln']
|
||||
|
||||
call map(documeth, 'v:val."("')
|
||||
let docuxprop = ['attributes', 'childNodes', 'doctype', 'documentElement', 'firstChild',
|
||||
\ 'implementation', 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType',
|
||||
@@ -368,9 +388,11 @@ function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
let xdomelemprop = ['attributes', 'childNodes', 'firstChild', 'lastChild',
|
||||
\ 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue',
|
||||
\ 'ownerDocument', 'parentNode', 'prefix', 'previousSibling', 'tagName']
|
||||
let xdomelemmeth = ['appendChild', 'cloneNode', 'getAttribute', 'getAttributeNode',
|
||||
\ 'getElementsByTagName', 'hasChildNodes', 'insertBefore', 'normalize',
|
||||
\ 'removeAttribute', 'removeAttributeNode', 'removeChild', 'replaceChild',
|
||||
let xdomelemmeth = ['appendChild', 'addEventListener', 'cloneNode',
|
||||
\ 'dispatchEvent', 'getAttribute', 'getAttributeNode',
|
||||
\ 'getElementsByTagName', 'hasChildNodes', 'insertBefore',
|
||||
\ 'normalize', 'removeAttribute', 'removeAttributeNode',
|
||||
\ 'removeChild', 'removeEventListener', 'replaceChild',
|
||||
\ 'setAttribute', 'setAttributeNode']
|
||||
call map(xdomelemmeth, 'v:val."("')
|
||||
let xdomelems = xdomelemprop + xdomelemmeth
|
||||
|
||||
26
runtime/compiler/xo.vim
Normal file
26
runtime/compiler/xo.vim
Normal file
@@ -0,0 +1,26 @@
|
||||
" Vim compiler file
|
||||
" Compiler: XO
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2019 Jul 10
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "xo"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" CompilerSet makeprg=npx\ xo\ --reporter\ compact
|
||||
|
||||
CompilerSet makeprg=xo\ --reporter\ compact
|
||||
CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %trror\ %m,
|
||||
\%f:\ line\ %l\\,\ col\ %c\\,\ %tarning\ %m,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2020 Jun 10
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2020 Aug 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1425,8 +1425,8 @@ name!
|
||||
:aug[roup]! {name} Delete the autocmd group {name}. Don't use
|
||||
this if there is still an autocommand using
|
||||
this group! You will get a warning if doing
|
||||
it anyway. when the group is the current group
|
||||
you will get error E936.
|
||||
it anyway. When the group is the current
|
||||
group you will get error E936.
|
||||
|
||||
To enter autocommands for a specific group, use this method:
|
||||
1. Select the group with ":augroup {name}".
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*develop.txt* For Vim version 8.2. Last change: 2020 Apr 13
|
||||
*develop.txt* For Vim version 8.2. Last change: 2020 Jul 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -34,8 +34,8 @@ balance must be found between them.
|
||||
VIM IS... VI COMPATIBLE *design-compatible*
|
||||
|
||||
First of all, it should be possible to use Vim as a drop-in replacement for
|
||||
Vi. When the user wants to, he can use Vim in compatible mode and hardly
|
||||
notice any difference with the original Vi.
|
||||
Vi. When the user wants to, Vim can be used in compatible mode and hardly
|
||||
any differences with the original Vi will be noticed.
|
||||
|
||||
Exceptions:
|
||||
- We don't reproduce obvious Vi bugs in Vim.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.2. Last change: 2020 Jul 21
|
||||
*eval.txt* For Vim version 8.2. Last change: 2020 Aug 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -4273,6 +4273,8 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()*
|
||||
line number
|
||||
<sflnum> script file line number, also when in
|
||||
a function
|
||||
<SID> "<SNR>123_" where "123" is the
|
||||
current script ID |<SID>|
|
||||
<cword> word under the cursor
|
||||
<cWORD> WORD under the cursor
|
||||
<client> the {clientid} of the last received
|
||||
@@ -4893,31 +4895,32 @@ getbufinfo([{dict}])
|
||||
|
||||
Each returned List item is a dictionary with the following
|
||||
entries:
|
||||
bufnr buffer number.
|
||||
bufnr Buffer number.
|
||||
changed TRUE if the buffer is modified.
|
||||
changedtick number of changes made to the buffer.
|
||||
changedtick Number of changes made to the buffer.
|
||||
hidden TRUE if the buffer is hidden.
|
||||
lastused timestamp in seconds, like
|
||||
lastused Timestamp in seconds, like
|
||||
|localtime()|, when the buffer was
|
||||
last used.
|
||||
{only with the |+viminfo| feature}
|
||||
listed TRUE if the buffer is listed.
|
||||
lnum current line number in buffer.
|
||||
linecount number of lines in the buffer (only
|
||||
lnum Line number used for the buffer when
|
||||
opened in the current window.
|
||||
linecount Number of lines in the buffer (only
|
||||
valid when loaded)
|
||||
loaded TRUE if the buffer is loaded.
|
||||
name full path to the file in the buffer.
|
||||
signs list of signs placed in the buffer.
|
||||
name Full path to the file in the buffer.
|
||||
signs List of signs placed in the buffer.
|
||||
Each list item is a dictionary with
|
||||
the following fields:
|
||||
id sign identifier
|
||||
lnum line number
|
||||
name sign name
|
||||
variables a reference to the dictionary with
|
||||
variables A reference to the dictionary with
|
||||
buffer-local variables.
|
||||
windows list of |window-ID|s that display this
|
||||
windows List of |window-ID|s that display this
|
||||
buffer
|
||||
popups list of popup |window-ID|s that
|
||||
popups List of popup |window-ID|s that
|
||||
display this buffer
|
||||
|
||||
Examples: >
|
||||
@@ -5444,7 +5447,7 @@ getloclist({nr} [, {what}]) *getloclist()*
|
||||
:echo getloclist(5, {'filewinid': 0})
|
||||
|
||||
|
||||
getmarklist([{expr}] *getmarklist()*
|
||||
getmarklist([{expr}]) *getmarklist()*
|
||||
Without the {expr} argument returns a |List| with information
|
||||
about all the global marks. |mark|
|
||||
|
||||
@@ -8707,7 +8710,8 @@ searchcount([{options}]) *searchcount()*
|
||||
pos |List| `[lnum, col, off]` value
|
||||
when recomputing the result.
|
||||
this changes "current" result
|
||||
value. see |cursor()|, |getpos()
|
||||
value. see |cursor()|,
|
||||
|getpos()|
|
||||
(default: cursor's position)
|
||||
|
||||
|
||||
@@ -9109,7 +9113,7 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
|
||||
argument is ignored. See below for the supported items in
|
||||
{what}.
|
||||
*setqflist-what*
|
||||
When {what} is not present, the items in {list} or used. Each
|
||||
When {what} is not present, the items in {list} are used. Each
|
||||
item must be a dictionary. Non-dictionary items in {list} are
|
||||
ignored. Each dictionary item can contain the following
|
||||
entries:
|
||||
@@ -9330,7 +9334,7 @@ settagstack({nr}, {dict} [, {action}]) *settagstack()*
|
||||
|
||||
Returns zero for success, -1 for failure.
|
||||
|
||||
Examples (for more examples see |tagstack-examples||):
|
||||
Examples (for more examples see |tagstack-examples|):
|
||||
Empty the tag stack of window 3: >
|
||||
call settagstack(3, {'items' : []})
|
||||
|
||||
@@ -10130,7 +10134,7 @@ 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).
|
||||
|:swapname| (unless there is no swap file).
|
||||
If buffer {expr} has no swap file, returns an empty string.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
@@ -10353,8 +10357,13 @@ tabpagebuflist([{arg}]) *tabpagebuflist()*
|
||||
tabpagenr([{arg}]) *tabpagenr()*
|
||||
The result is a Number, which is the number of the current
|
||||
tab page. The first tab page has number 1.
|
||||
When the optional argument is "$", the number of the last tab
|
||||
page is returned (the tab page count).
|
||||
|
||||
The optional argument {arg} supports the following values:
|
||||
$ the number of the last tab page (the tab page
|
||||
count).
|
||||
# the number of the last accessed tab page
|
||||
(where |g<Tab>| goes to). if there is no
|
||||
previous tab page 0 is returned.
|
||||
The number can be used with the |:tab| command.
|
||||
|
||||
|
||||
@@ -12129,7 +12138,8 @@ text...
|
||||
{endmarker}
|
||||
Set internal variable {var-name} to a |List|
|
||||
containing the lines of text bounded by the string
|
||||
{endmarker}.
|
||||
{endmarker}. The lines of text is used as a
|
||||
|literal-string|.
|
||||
{endmarker} must not contain white space.
|
||||
{endmarker} cannot start with a lower case character.
|
||||
The last line should end only with the {endmarker}
|
||||
|
||||
@@ -451,7 +451,7 @@ with the Intellimouse driver 2.2 and when "Universal Scrolling" is turned on.
|
||||
|
||||
XPM support *w32-xpm-support*
|
||||
|
||||
GVim can be build on MS-Windows with support for XPM files. |+xpm_w32|
|
||||
GVim can be built on MS-Windows with support for XPM files. |+xpm_w32|
|
||||
See the Make_mvc.mak file for instructions, search for XPM.
|
||||
|
||||
To try out if XPM support works do this: >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*helphelp.txt* For Vim version 8.2. Last change: 2020 Mar 01
|
||||
*helphelp.txt* For Vim version 8.2. Last change: 2020 Jul 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -369,14 +369,16 @@ highlighting. So do these:
|
||||
You can find the details in $VIMRUNTIME/syntax/help.vim
|
||||
|
||||
*inclusion*
|
||||
Some people make a big deal about using "his" when referring to the user,
|
||||
thinking it means we assume the user is male. That is of course not the case,
|
||||
it's just a habit of writing help text, which quite often is many years old.
|
||||
Also, a lot of the text is written by contributors for who English is not
|
||||
their first language. We do not make any assumptions about the gender of the
|
||||
user, no matter how the text is phrased. And we do not want to waste time on
|
||||
this discussion. The goal is that the reader understands how Vim works, the
|
||||
exact wording is secondary.
|
||||
Vim is for everybody, no matter race, gender or anything. Some people make a
|
||||
big deal about using "he" or "his" when referring to the user, thinking it
|
||||
means we assume the user is male. That is not the case, it's just a habit of
|
||||
writing help text, which quite often is many years old. Also, a lot of the
|
||||
text is written by contributors for whom English is not their first language.
|
||||
We do not make any assumptions about the gender of the user, no matter how the
|
||||
text is phrased. Some people have suggested using "they", but that is not
|
||||
regular English. We do not want to spend much time on this discussion. The
|
||||
goal is that the reader understands how Vim works, the exact wording is
|
||||
secondary.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -199,8 +199,8 @@ Vim evaluation and command execution, and others.
|
||||
returns it. Note that the buffer is not set as
|
||||
current.
|
||||
|
||||
vim.call({name} [,{args}])
|
||||
Proxy to call Vim function named {name} with
|
||||
vim.call({name} [, {args}])
|
||||
Proxy to call Vim function named {name} with
|
||||
arguments {args}. Example: >
|
||||
:lua print(vim.call('has', 'timers'))
|
||||
<
|
||||
|
||||
@@ -275,7 +275,7 @@ Options:
|
||||
$win delcmd {cmd} *tcl-window-delcmd*
|
||||
Registers the Tcl command {cmd} as a deletion callback for the window.
|
||||
This command is executed (in the global scope) just before the window
|
||||
is closed. Complex commands should be build with "list": >
|
||||
is closed. Complex commands should be built with "list": >
|
||||
$win delcmd [list puts vimerr "window deleted"]
|
||||
< See also |tcl-buffer-delcmd|.
|
||||
|
||||
@@ -357,7 +357,7 @@ Options:
|
||||
$buf delcmd {cmd} *tcl-buffer-delcmd*
|
||||
Registers the Tcl command {cmd} as a deletion callback for the buffer.
|
||||
This command is executed (in the global scope) just before the buffer
|
||||
is deleted. Complex commands should be build with "list": >
|
||||
is deleted. Complex commands should be built with "list": >
|
||||
$buf delcmd [list puts vimerr "buffer [$buf number] gone"]
|
||||
< See also |tcl-window-delcmd|.
|
||||
|
||||
|
||||
@@ -414,11 +414,11 @@ The examples below assume a 'shiftwidth' of 4.
|
||||
<
|
||||
*cino-(*
|
||||
(N When in unclosed parentheses, indent N characters from the line
|
||||
with the unclosed parentheses. Add a 'shiftwidth' for every
|
||||
with the unclosed parenthesis. Add a 'shiftwidth' for every
|
||||
extra unclosed parentheses. When N is 0 or the unclosed
|
||||
parentheses is the first non-white character in its line, line
|
||||
parenthesis is the first non-white character in its line, line
|
||||
up with the next non-white character after the unclosed
|
||||
parentheses. (default 'shiftwidth' * 2).
|
||||
parenthesis. (default 'shiftwidth' * 2).
|
||||
|
||||
cino= cino=(0 >
|
||||
if (c1 && (c2 || if (c1 && (c2 ||
|
||||
@@ -439,7 +439,7 @@ The examples below assume a 'shiftwidth' of 4.
|
||||
<
|
||||
*cino-U*
|
||||
UN When N is non-zero, do not ignore the indenting specified by
|
||||
( or u in case that the unclosed parentheses is the first
|
||||
( or u in case that the unclosed parenthesis is the first
|
||||
non-white character in its line. (default 0).
|
||||
|
||||
cino= or cino=(s cino=(s,U1 >
|
||||
@@ -452,8 +452,8 @@ The examples below assume a 'shiftwidth' of 4.
|
||||
*cino-w*
|
||||
wN When in unclosed parentheses and N is non-zero and either
|
||||
using "(0" or "u0", respectively, or using "U0" and the unclosed
|
||||
parentheses is the first non-white character in its line, line
|
||||
up with the character immediately after the unclosed parentheses
|
||||
parenthesis is the first non-white character in its line, line
|
||||
up with the character immediately after the unclosed parenthesis
|
||||
rather than the first non-white character. (default 0).
|
||||
|
||||
cino=(0 cino=(0,w1 >
|
||||
@@ -464,11 +464,11 @@ The examples below assume a 'shiftwidth' of 4.
|
||||
<
|
||||
*cino-W*
|
||||
WN When in unclosed parentheses and N is non-zero and either
|
||||
using "(0" or "u0", respectively and the unclosed parentheses is
|
||||
using "(0" or "u0", respectively and the unclosed parenthesis is
|
||||
the last non-white character in its line and it is not the
|
||||
closing parentheses, indent the following line N characters
|
||||
closing parenthesis, indent the following line N characters
|
||||
relative to the outer context (i.e. start of the line or the
|
||||
next unclosed parentheses). (default: 0).
|
||||
next unclosed parenthesis). (default: 0).
|
||||
|
||||
cino=(0 cino=(0,W4 >
|
||||
a_long_line( a_long_line(
|
||||
@@ -495,8 +495,8 @@ The examples below assume a 'shiftwidth' of 4.
|
||||
<
|
||||
*cino-m*
|
||||
mN When N is non-zero, line up a line starting with a closing
|
||||
parentheses with the first character of the line with the
|
||||
matching opening parentheses. (default 0).
|
||||
parenthesis with the first character of the line with the
|
||||
matching opening parenthesis. (default 0).
|
||||
|
||||
cino=(s cino=(s,m1 >
|
||||
c = c1 && ( c = c1 && (
|
||||
@@ -510,7 +510,7 @@ The examples below assume a 'shiftwidth' of 4.
|
||||
<
|
||||
*cino-M*
|
||||
MN When N is non-zero, line up a line starting with a closing
|
||||
parentheses with the first character of the previous line.
|
||||
parenthesis with the first character of the previous line.
|
||||
(default 0).
|
||||
|
||||
cino= cino=M1 >
|
||||
@@ -569,7 +569,7 @@ The examples below assume a 'shiftwidth' of 4.
|
||||
recognize preprocessor lines; right-shifting lines that start
|
||||
with "#" does not work.
|
||||
|
||||
|
||||
*cino-P*
|
||||
PN When N is non-zero recognize C pragmas, and indent them like any
|
||||
other code; does not concern other preprocessor directives.
|
||||
When N is zero (default): don't recognize C pragmas, treating
|
||||
@@ -996,7 +996,7 @@ Indent after a nested paren: >
|
||||
Indent for a continuation line: >
|
||||
let g:pyindent_continue = 'shiftwidth() * 2'
|
||||
|
||||
The method uses |searchpair()| to look back for unclosed parenthesis. This
|
||||
The method uses |searchpair()| to look back for unclosed parentheses. 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
|
||||
|
||||
@@ -440,6 +440,7 @@ tag char note action in Normal mode ~
|
||||
|<C-LeftMouse>| <C-LeftMouse> ":ta" to the keyword at the mouse click
|
||||
|<C-Right>| <C-Right> 1 same as "w"
|
||||
|<C-RightMouse>| <C-RightMouse> same as "CTRL-T"
|
||||
|<C-Tab>| <C-Tab> same as "g<Tab>"
|
||||
|<Del>| ["x]<Del> 2 same as "x"
|
||||
|N<Del>| {count}<Del> remove the last digit from {count}
|
||||
|<Down>| <Down> 1 same as "j"
|
||||
@@ -587,6 +588,8 @@ tag command action in Normal mode ~
|
||||
following the file name.
|
||||
|CTRL-W_gt| CTRL-W g t same as `gt`: go to next tab page
|
||||
|CTRL-W_gT| CTRL-W g T same as `gT`: go to previous tab page
|
||||
|CTRL-W_g<Tab>| CTRL-W g <Tab> same as |g<Tab>|: go to last accessed tab
|
||||
page.
|
||||
|CTRL-W_h| CTRL-W h go to Nth left window (stop at first window)
|
||||
|CTRL-W_i| CTRL-W i split window and jump to declaration of
|
||||
identifier under the cursor
|
||||
@@ -805,6 +808,7 @@ tag char note action in Normal mode ~
|
||||
|g<LeftMouse>| g<LeftMouse> same as <C-LeftMouse>
|
||||
g<MiddleMouse> same as <C-MiddleMouse>
|
||||
|g<RightMouse>| g<RightMouse> same as <C-RightMouse>
|
||||
|g<Tab>| g<Tab> go to the last accessed tab page.
|
||||
|g<Up>| g<Up> 1 same as "gk"
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 8.2. Last change: 2020 Apr 23
|
||||
*map.txt* For Vim version 8.2. Last change: 2020 Aug 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1167,6 +1167,10 @@ When executing an autocommand or a user command, it will run in the context of
|
||||
the script it was defined in. This makes it possible that the command calls a
|
||||
local function or uses a local mapping.
|
||||
|
||||
In case the value is used in a context where <SID> cannot be correctly
|
||||
expanded, use the expand() function: >
|
||||
let &includexpr = expand('<SID>') .. 'My_includeexpr()'
|
||||
|
||||
Otherwise, using "<SID>" outside of a script context is an error.
|
||||
|
||||
If you need to get the script number to use in a complicated script, you can
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.2. Last change: 2020 Jul 18
|
||||
*options.txt* For Vim version 8.2. Last change: 2020 Aug 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -2715,6 +2715,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
for Unix: ".,~/tmp,/var/tmp,/tmp")
|
||||
global
|
||||
List of directory names for the swap file, separated with commas.
|
||||
Recommended value: ".,~/vimswap//" - this will put the swap file next
|
||||
to the edited file if possible, and in your personal swap directory
|
||||
otherwise. Make sure "~/vimswap//" is only readable for you.
|
||||
|
||||
Possible items:
|
||||
- The swap file will be created in the first directory where this is
|
||||
possible.
|
||||
- Empty means that no swap file will be used (recovery is
|
||||
@@ -2749,9 +2754,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
the same file twice will result in a warning. Using "/tmp" on Unix is
|
||||
discouraged: When the system crashes you lose the swap file.
|
||||
"/var/tmp" is often not cleared when rebooting, thus is a better
|
||||
choice than "/tmp". But it can contain a lot of files, your swap
|
||||
files get lost in the crowd. That is why a "tmp" directory in your
|
||||
home directory is tried first.
|
||||
choice than "/tmp". But others on the computer may be able to see the
|
||||
files, and it can contain a lot of files, your swap files get lost in
|
||||
the crowd. That is why a "tmp" directory in your home directory is
|
||||
tried first.
|
||||
The use of |:set+=| and |:set-=| is preferred when adding or removing
|
||||
directories from the list. This avoids problems when a future version
|
||||
uses another default.
|
||||
@@ -8368,7 +8374,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
>= 14 Anything pending in a ":finally" clause.
|
||||
>= 15 Every executed Ex command from a script (truncated at 200
|
||||
characters).
|
||||
>= 16 Every executed Ex command
|
||||
>= 16 Every executed Ex command.
|
||||
|
||||
This option can also be set with the "-V" argument. See |-V|.
|
||||
This option is also set by the |:verbose| command.
|
||||
@@ -8907,7 +8913,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{only available when compiled with the |terminal|
|
||||
feature on MS-Windows}
|
||||
Specifies the name of the winpty shared library, used for the
|
||||
|:terminal| command. The default depends on whether was build as a
|
||||
|:terminal| command. The default depends on whether Vim was built as a
|
||||
32-bit or 64-bit executable. If not found, "winpty.dll" is tried as
|
||||
a fallback.
|
||||
Environment variables are expanded |:set_env|.
|
||||
|
||||
@@ -88,7 +88,7 @@ VAX C compiler is not fully ANSI C compatible in pre-processor directives
|
||||
semantics, therefore you have to use a converter program that will do the lion
|
||||
part of the job. For detailed instructions read file INSTALLvms.txt
|
||||
|
||||
MMS_VIM.EXE is build together with VIM.EXE, but for XXD.EXE you should
|
||||
MMS_VIM.EXE is built together with VIM.EXE, but for XXD.EXE you should
|
||||
change to a subdirectory and build it separately.
|
||||
|
||||
CTAGS is not part of the Vim source distribution anymore, however the OpenVMS
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*popup.txt* For Vim version 8.2. Last change: 2020 May 18
|
||||
*popup.txt* For Vim version 8.2. Last change: 2020 Jul 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -74,9 +74,9 @@ wrapping, lines in the buffer. It can be limited with the "maxheight"
|
||||
property. You can use empty lines to increase the height or the "minheight"
|
||||
property.
|
||||
|
||||
The width of the window is normally equal to the longest line in the buffer.
|
||||
It can be limited with the "maxwidth" property. You can use spaces to
|
||||
increase the width or use the "minwidth" property.
|
||||
The width of the window is normally equal to the longest visible line in the
|
||||
buffer. It can be limited with the "maxwidth" property. You can use spaces
|
||||
to increase the width or use the "minwidth" property.
|
||||
|
||||
By default the 'wrap' option is set, so that no text disappears. Otherwise,
|
||||
if there is not enough space then the window is shifted left in order to
|
||||
|
||||
@@ -179,7 +179,7 @@ name on the 'VimRegistry' property on the root window.
|
||||
|
||||
A non GUI Vim with access to the X11 display (|xterm-clipboard| enabled), can
|
||||
also act as a command server if a server name is explicitly given with the
|
||||
--servername argument, or when Vim was build with the |+autoservername|
|
||||
--servername argument, or when Vim was built with the |+autoservername|
|
||||
feature.
|
||||
|
||||
An empty --servername argument will cause the command server to be disabled.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2020 Jul 08
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2020 Jul 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -3648,7 +3648,7 @@ DEFINING FOLDLEVEL *:syn-foldlevel*
|
||||
start: Use level of item containing start of line.
|
||||
minimum: Use lowest local-minimum level of items on line.
|
||||
|
||||
The default is 'start'. Use 'minimum' to search a line horizontally
|
||||
The default is "start". Use "minimum" to search a line horizontally
|
||||
for the lowest level contained on the line that is followed by a
|
||||
higher level. This produces more natural folds when syntax items
|
||||
may close and open horizontally within a line.
|
||||
@@ -3795,9 +3795,9 @@ DEFINING REGIONS *:syn-region* *:syn-start* *:syn-skip* *:syn-end*
|
||||
[keepend]
|
||||
[extend]
|
||||
[excludenl]
|
||||
start={start_pattern} ..
|
||||
[skip={skip_pattern}]
|
||||
end={end_pattern} ..
|
||||
start={start-pattern} ..
|
||||
[skip={skip-pattern}]
|
||||
end={end-pattern} ..
|
||||
[{options}]
|
||||
|
||||
This defines one region. It may span several lines.
|
||||
@@ -3819,12 +3819,12 @@ DEFINING REGIONS *:syn-region* *:syn-start* *:syn-skip* *:syn-end*
|
||||
extend a containing match or item. Only
|
||||
useful for end patterns. Must be given before
|
||||
the patterns it applies to. |:syn-excludenl|
|
||||
start={start_pattern} The search pattern that defines the start of
|
||||
start={start-pattern} The search pattern that defines the start of
|
||||
the region. See |:syn-pattern| below.
|
||||
skip={skip_pattern} The search pattern that defines text inside
|
||||
skip={skip-pattern} The search pattern that defines text inside
|
||||
the region where not to look for the end
|
||||
pattern. See |:syn-pattern| below.
|
||||
end={end_pattern} The search pattern that defines the end of
|
||||
end={end-pattern} The search pattern that defines the end of
|
||||
the region. See |:syn-pattern| below.
|
||||
|
||||
Example: >
|
||||
|
||||
@@ -142,6 +142,7 @@ something else.
|
||||
:tabclose + " close the next tab page
|
||||
:tabclose 3 " close the third tab page
|
||||
:tabclose $ " close the last tab page
|
||||
:tabclose # " close the last accessed tab page
|
||||
<
|
||||
*:tabo* *:tabonly*
|
||||
:tabo[nly][!] Close all other tab pages.
|
||||
@@ -170,6 +171,8 @@ something else.
|
||||
" one
|
||||
:tabonly 1 " close all tab pages except the first one
|
||||
:tabonly $ " close all tab pages except the last one
|
||||
:tabonly # " close all tab pages except the last
|
||||
" accessed one
|
||||
|
||||
|
||||
SWITCHING TO ANOTHER TAB PAGE:
|
||||
@@ -192,6 +195,7 @@ gt *i_CTRL-<PageDown>* *i_<C-PageDown>*
|
||||
:+2tabnext " go to the two next tab page
|
||||
:1tabnext " go to the first tab page
|
||||
:$tabnext " go to the last tab page
|
||||
:tabnext # " go to the last accessed tab page
|
||||
:tabnext $ " as above
|
||||
:tabnext - " go to the previous tab page
|
||||
:tabnext -1 " as above
|
||||
@@ -221,6 +225,8 @@ gT Go to the previous tab page. Wraps around from the first one
|
||||
*:tabl* *:tablast*
|
||||
:tabl[ast] Go to the last tab page.
|
||||
|
||||
*g<Tab>* *CTRL-W_g<Tab>* *<C-Tab>*
|
||||
g<Tab> Go to the last accessed tab page.
|
||||
|
||||
Other commands:
|
||||
*:tabs*
|
||||
@@ -253,6 +259,8 @@ REORDERING TAB PAGES:
|
||||
:tabmove " move the tab page to the last
|
||||
:$tabmove " as above
|
||||
:tabmove $ " as above
|
||||
:tabmove # " move the tab page after the last accessed
|
||||
" tab page
|
||||
|
||||
:tabm[ove] +[N]
|
||||
:tabm[ove] -[N]
|
||||
|
||||
@@ -5744,6 +5744,7 @@ cino-J indent.txt /*cino-J*
|
||||
cino-L indent.txt /*cino-L*
|
||||
cino-M indent.txt /*cino-M*
|
||||
cino-N indent.txt /*cino-N*
|
||||
cino-P indent.txt /*cino-P*
|
||||
cino-U indent.txt /*cino-U*
|
||||
cino-W indent.txt /*cino-W*
|
||||
cino-^ indent.txt /*cino-^*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.2. Last change: 2020 Jul 26
|
||||
*todo.txt* For Vim version 8.2. Last change: 2020 Aug 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -39,10 +39,9 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Making everything work:
|
||||
- more items in https://github.com/vim/vim/issues/6507
|
||||
- More "goto failed" with check for trylevel.
|
||||
- memory leak in test_vim9_script
|
||||
- Check that when sourcing a Vim9 script, only the global items can be used.
|
||||
- Make string indexes character indexes instead of byte indexes. (#6574)
|
||||
explain how to use byte index when needed. Use blob?
|
||||
- :put with a "=" register argument doesn't work, need to find the expression
|
||||
and compile it. (#6397)
|
||||
- At the script level, keep script variables local to the block they are
|
||||
@@ -51,6 +50,8 @@ Making everything work:
|
||||
- Implement { } block at the script level.
|
||||
- need to check type when a declaration specifies a type: #6507
|
||||
let nr: number = 'asdf'
|
||||
- Make sure that in vim9script a function call without namespace only finds
|
||||
the script-local function, not a global one.
|
||||
- Make map() give an error if the resulting type is wrong.
|
||||
Add mapnew() to create a new List/Dict for the result, which can have a
|
||||
different value type.
|
||||
@@ -169,7 +170,7 @@ Popup windows:
|
||||
- Figure out the size and position better if wrapping inserts indent
|
||||
|
||||
Text properties:
|
||||
- :goto does not go to the right place when test properties are present.
|
||||
- :goto does not go to the right place when text properties are present.
|
||||
(#5930)
|
||||
- "cc" does not call inserted_bytes(). (Axel Forsman, #5763)
|
||||
- Get E685 with a sequence of commands. (#5674)
|
||||
@@ -200,7 +201,7 @@ Terminal debugger:
|
||||
an already running program. (M. Kelly)
|
||||
- When only gdb window exists, on "quit" edit another buffer.
|
||||
- Use a sign group
|
||||
- Termdebug does not work when Vim was build with mzscheme: gdb hangs just
|
||||
- Termdebug does not work when Vim was built 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? issue #3565
|
||||
@@ -255,10 +256,15 @@ Terminal emulator window:
|
||||
Error numbers available:
|
||||
E610, E611, E653
|
||||
|
||||
Clean up empty entries in testdir/Make_all.mak
|
||||
|
||||
Remove SPACE_IN_FILENAME ? It is only used for completion.
|
||||
|
||||
Patch to use collaction based sorting. (Christian Brabandt, #6229)
|
||||
|
||||
Add 'termguiattr' option, use "gui=" attributes in the terminal? Would work
|
||||
with 'termguicolors'. #1740
|
||||
|
||||
Can we detect true color support? https://gist.github.com/XVilka/8346728
|
||||
Try setting a color then request the current color, like using t_u7.
|
||||
|
||||
@@ -333,6 +339,9 @@ character. (#6154)
|
||||
|
||||
undo result wrong: Masato Nishihata, #4798
|
||||
|
||||
After recovering from a swap file the undofile should not be used, it causes
|
||||
corruption. (#6631)
|
||||
|
||||
When 'lazyredraw' is set sometimes the title is not updated.
|
||||
(Jason Franklin, 2020 Feb 3) Looks like a race condition.
|
||||
|
||||
@@ -1471,7 +1480,7 @@ Zero-out krypt key information when no longer in use. (Ben Fritz, 2017 May 15)
|
||||
|
||||
Add stronger encryption. Could use libsodium (NaCl).
|
||||
https://github.com/jedisct1/libsodium/
|
||||
Possibly include the needed code so that it can be build everywhere.
|
||||
Possibly include the needed code so that it can be built everywhere.
|
||||
|
||||
Add a way to restart a timer. It's similar to timer_stop() and timer_start(),
|
||||
but the reference remains valid.
|
||||
@@ -3833,8 +3842,6 @@ Macintosh:
|
||||
8 When write_viminfo() is used while there are many orphaned viminfo
|
||||
tempfiles writing the viminfo file fails. Give a clear error message so
|
||||
that the user knows he has to delete the files.
|
||||
7 It's possible to redefine a script-local function with ":func
|
||||
<SNR>123_Test()". (Krishna) Disallow this.
|
||||
|
||||
|
||||
I can't reproduce these (if you can, let me know how!):
|
||||
@@ -5673,7 +5680,7 @@ Buffer list:
|
||||
Also for other windows: ":inwin {winnr} {cmd}". How to make sure that
|
||||
this works properly for all commands, and still be able to return to the
|
||||
current buffer/window? E.g.: ":inbuf xxx only".
|
||||
8 Add File.{recent_files} menu entries: Recently edited files.
|
||||
8 Add File.{recent-files} menu entries: Recently edited files.
|
||||
Ron Aaron has a plugin for this: mru.vim.
|
||||
8 Unix: Check all uses of fnamecmp() and fnamencmp() if they should check
|
||||
inode too.
|
||||
|
||||
@@ -161,7 +161,7 @@ line break.
|
||||
==============================================================================
|
||||
*04.3* Repeating a change
|
||||
|
||||
The "." command is one of the most simple yet powerful commands in Vim. It
|
||||
The "." command is one of the simplest yet powerful commands in Vim. It
|
||||
repeats the last change. For instance, suppose you are editing an HTML file
|
||||
and want to delete all the <B> tags. You position the cursor on the first <
|
||||
and delete the <B> with the command "df>". You then go to the < of the next
|
||||
|
||||
@@ -58,8 +58,8 @@ This initializes Vim for new users (as opposed to traditional Vi users). See
|
||||
|defaults.vim| for the details.
|
||||
|
||||
The vimrc file can contain all the commands that you type after a colon. The
|
||||
most simple ones are for setting options. For example, if you want Vim to
|
||||
always start with the 'incsearch' option on, add this line your vimrc file: >
|
||||
simplest ones are for setting options. For example, if you want Vim to always
|
||||
start with the 'incsearch' option on, add this line your vimrc file: >
|
||||
|
||||
set incsearch
|
||||
|
||||
|
||||
@@ -327,10 +327,10 @@ for next.
|
||||
==============================================================================
|
||||
*20.5* Command line window
|
||||
|
||||
Typing the text in the command line works different from typing text in Insert
|
||||
mode. It doesn't allow many commands to change the text. For most commands
|
||||
that's OK, but sometimes you have to type a complicated command. That's where
|
||||
the command line window is useful.
|
||||
Typing the text in the command line works differently from typing text in
|
||||
Insert mode. It doesn't allow many commands to change the text. For most
|
||||
commands that's OK, but sometimes you have to type a complicated command.
|
||||
That's where the command line window is useful.
|
||||
|
||||
Open the command line window with this command: >
|
||||
|
||||
|
||||
@@ -336,7 +336,7 @@ How to do that is explained here: |indent-expression|.
|
||||
==============================================================================
|
||||
*30.4* Other indenting
|
||||
|
||||
The most simple form of automatic indenting is with the 'autoindent' option.
|
||||
The simplest form of automatic indenting is with the 'autoindent' option.
|
||||
It uses the indent from the previous line. A bit smarter is the 'smartindent'
|
||||
option. This is useful for languages where no indent file is available.
|
||||
'smartindent' is not as smart as 'cindent', but smarter than 'autoindent'.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_31.txt* For Vim version 8.2. Last change: 2007 May 08
|
||||
*usr_31.txt* For Vim version 8.2. Last change: 2020 Jul 28
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -198,9 +198,9 @@ is not possible in most terminals.
|
||||
You can start the X-Windows version of gvim with an argument to specify the
|
||||
size and position of the window: >
|
||||
|
||||
gvim -geometry {width}x{height}+{x_offset}+{y_offset}
|
||||
gvim -geometry {width}x{height}+{x-offset}+{y-offset}
|
||||
|
||||
{width} and {height} are in characters, {x_offset} and {y_offset} are in
|
||||
{width} and {height} are in characters, {x-offset} and {y-offset} are in
|
||||
pixels. Example: >
|
||||
|
||||
gvim -geometry 80x25+100+300
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_40.txt* For Vim version 8.2. Last change: 2013 Aug 05
|
||||
*usr_40.txt* For Vim version 8.2. Last change: 2020 Jul 28
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -453,12 +453,12 @@ matching BufWritePre autocommands and executes them, and then it
|
||||
performs the ":write".
|
||||
The general form of the :autocmd command is as follows: >
|
||||
|
||||
:autocmd [group] {events} {file_pattern} [nested] {command}
|
||||
:autocmd [group] {events} {file-pattern} [nested] {command}
|
||||
|
||||
The [group] name is optional. It is used in managing and calling the commands
|
||||
(more on this later). The {events} parameter is a list of events (comma
|
||||
separated) that trigger the command.
|
||||
{file_pattern} is a filename, usually with wildcards. For example, using
|
||||
{file-pattern} is a filename, usually with wildcards. For example, using
|
||||
"*.txt" makes the autocommand be used for all files whose name end in ".txt".
|
||||
The optional [nested] flag allows for nesting of autocommands (see below), and
|
||||
finally, {command} is the command to be executed.
|
||||
@@ -489,7 +489,7 @@ See |autocmd-events| for a complete list of events.
|
||||
|
||||
PATTERNS
|
||||
|
||||
The {file_pattern} argument can actually be a comma-separated list of file
|
||||
The {file-pattern} argument can actually be a comma-separated list of file
|
||||
patterns. For example: "*.c,*.h" matches files ending in ".c" and ".h".
|
||||
The usual file wildcards can be used. Here is a summary of the most often
|
||||
used ones:
|
||||
|
||||
@@ -44,7 +44,7 @@ script file. You can think of other uses yourself.
|
||||
If you are familiar with Python, you can find a comparison between
|
||||
Python and Vim script here, with pointers to other documents:
|
||||
https://gist.github.com/yegappan/16d964a37ead0979b05e655aa036cad0
|
||||
And if you are familiar with Javascript:
|
||||
And if you are familiar with JavaScript:
|
||||
https://w0rp.com/blog/post/vim-script-for-the-javascripter/
|
||||
|
||||
Let's start with a simple example: >
|
||||
@@ -2108,7 +2108,7 @@ Thus when a user types "\a", this sequence is invoked: >
|
||||
|
||||
\a -> <Plug>TypecorrAdd -> <SID>Add -> :call <SID>Add()
|
||||
|
||||
If another script would also map <SID>Add, it would get another script ID and
|
||||
If another script was also map <SID>Add, it would get another script ID and
|
||||
thus define another mapping.
|
||||
|
||||
Note that instead of s:Add() we use <SID>Add() here. That is because the
|
||||
|
||||
@@ -210,8 +210,8 @@ argument: >
|
||||
:amenu <silent> Mine.Next\ File :call <SID>NextFile()<CR>
|
||||
|
||||
Don't use "<silent>" too often. It is not needed for short commands. If you
|
||||
make a menu for someone else, being able the see the executed command will
|
||||
give him a hint about what he could have typed, instead of using the mouse.
|
||||
make a menu for someone else, being able to see the executed command will give
|
||||
him a hint about what he could have typed, instead of using the mouse.
|
||||
|
||||
|
||||
LISTING MENUS
|
||||
|
||||
@@ -34,7 +34,7 @@ That makes very clear what is defined where.
|
||||
Let's start with an example, a script that exports one function and has one
|
||||
private function: >
|
||||
|
||||
vim9script " This indicates a Vim9 script file,
|
||||
vim9script " This indicates a Vim9 script file.
|
||||
|
||||
export def GetMessage(): string
|
||||
let result = ''
|
||||
|
||||
@@ -333,7 +333,7 @@ Make Vim work as you like it.
|
||||
|44.11| Installing a syntax file
|
||||
|44.12| Portable syntax file layout
|
||||
|
||||
|usr_45.txt| Select your language
|
||||
|usr_45.txt| Select your language (locale)
|
||||
|45.1| Language for Messages
|
||||
|45.2| Language for Menus
|
||||
|45.3| Using another encoding
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2020 Jul 25
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2020 Aug 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -14,7 +14,7 @@ features in Vim9 script.
|
||||
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||
|
||||
|
||||
1 What is Vim9 script? |vim9-script|
|
||||
1. What is Vim9 script? |vim9-script|
|
||||
2. Differences |vim9-differences|
|
||||
3. New style functions |fast-functions|
|
||||
4. Types |vim9-types|
|
||||
@@ -119,11 +119,12 @@ Functions and variables are script-local by default ~
|
||||
When using `:function` or `:def` to specify a new function at the script level
|
||||
in a Vim9 script, the function is local to the script, as if "s:" was
|
||||
prefixed. Using the "s:" prefix is optional. To define or use a global
|
||||
function or variable the "g:" prefix must be used. For functions in an
|
||||
function or variable the "g:" prefix should be used. For functions in an
|
||||
autoload script the "name#" prefix is sufficient. >
|
||||
def ThisFunction() # script-local
|
||||
def s:ThisFunction() # script-local
|
||||
def g:ThatFunction() # global
|
||||
def ThatFunction() # global if no local ThatFunction()
|
||||
def scriptname#function() # autoload
|
||||
|
||||
When using `:function` or `:def` to specify a new function inside a function,
|
||||
@@ -132,16 +133,14 @@ script-local function inside a function. It is possible to define a global
|
||||
function, using the "g:" prefix.
|
||||
|
||||
When referring to a function and no "s:" or "g:" prefix is used, Vim will
|
||||
search for the function in this order:
|
||||
- Local to the current scope and outer scopes up to the function scope.
|
||||
- Local to the current script file.
|
||||
- Imported functions, see `:import`.
|
||||
prefer using a local function (in the function scope, script scope or
|
||||
imported) before looking for a global function.
|
||||
In all cases the function must be defined before used. That is when it is
|
||||
first called or when `:defcompile` causes the call to be compiled.
|
||||
|
||||
The result is that functions and variables without a namespace can always be
|
||||
The result is that functions and variables without a namespace can usually be
|
||||
found in the script, either defined there or imported. Global functions and
|
||||
variables could be defined anywhere (good luck finding where!).
|
||||
variables could be defined anywhere (good luck finding out where!).
|
||||
|
||||
Global functions can be still be defined and deleted at nearly any time. In
|
||||
Vim9 script script-local functions are defined once when the script is sourced
|
||||
@@ -190,10 +189,11 @@ To intentionally avoid a variable being available later, a block can be used:
|
||||
|
||||
An existing variable cannot be assigned to with `:let`, since that implies a
|
||||
declaration. Global, window, tab, buffer and Vim variables can only be used
|
||||
without `:let`, because they are are not really declared, they can also be
|
||||
deleted with `:unlet`.
|
||||
without `:let`, because they are not really declared, they can also be deleted
|
||||
with `:unlet`.
|
||||
|
||||
Variables cannot shadow previously defined variables.
|
||||
Variables and functions cannot shadow previously defined or imported variables
|
||||
and functions.
|
||||
Variables may shadow Ex commands, rename the variable if needed.
|
||||
|
||||
Global variables and user defined functions must be prefixed with "g:", also
|
||||
@@ -232,11 +232,11 @@ identifier or can't be an Ex command. Examples: >
|
||||
'foobar'->Process()
|
||||
('foobar')->Process()
|
||||
|
||||
In rare case there is ambiguity between a function name and an Ex command, use
|
||||
":" to make clear you want to use the Ex command. For example, there is both
|
||||
the `:substitute` command and the `substitute()` function. When the line
|
||||
starts with `substitute(` this will use the function. Prepend a colon to use
|
||||
the command instead: >
|
||||
In rare case there is ambiguity between a function name and an Ex command,
|
||||
prepend ":" to make clear you want to use the Ex command. For example, there
|
||||
is both the `:substitute` command and the `substitute()` function. When the
|
||||
line starts with `substitute(` this will use the function. Prepend a colon to
|
||||
use the command instead: >
|
||||
:substitute(pattern (replacement (
|
||||
|
||||
Note that while variables need to be defined before they can be used,
|
||||
@@ -261,8 +261,8 @@ number of arguments and any return type. The function can be defined later.
|
||||
Automatic line continuation ~
|
||||
|
||||
In many cases it is obvious that an expression continues on the next line. In
|
||||
those cases there is no need to prefix the line with a backslash. For
|
||||
example, when a list spans multiple lines: >
|
||||
those cases there is no need to prefix the line with a backslash
|
||||
|line-continuation|. For example, when a list spans multiple lines: >
|
||||
let mylist = [
|
||||
'one',
|
||||
'two',
|
||||
@@ -352,10 +352,11 @@ No curly braces expansion ~
|
||||
|curly-braces-names| cannot be used.
|
||||
|
||||
|
||||
No :xit, :append, :change or :insert ~
|
||||
No :xit, :t, :append, :change or :insert ~
|
||||
|
||||
These commands are too easily confused with local variable names. Instead of
|
||||
`:x` or `:xit` you can use `:exit`.
|
||||
These commands are too easily confused with local variable names.
|
||||
Instead of `:x` or `:xit` you can use `:exit`.
|
||||
Instead of `:t` you can use `:copy`.
|
||||
|
||||
|
||||
Comparators ~
|
||||
@@ -451,6 +452,11 @@ Ex command ranges need to be prefixed with a colon. >
|
||||
'text'->func() " Vim9: method call
|
||||
:'t " legacy Vim: jump to mark m
|
||||
|
||||
Some Ex commands can be confused with assignments in Vim9 script: >
|
||||
g:name = value # assignment
|
||||
g:pattern:cmd # invalid command - ERROR
|
||||
:g:pattern:cmd # :global command
|
||||
|
||||
Functions defined with `:def` compile the whole function. Legacy functions
|
||||
can bail out, and the following lines are not parsed: >
|
||||
func Maybe()
|
||||
@@ -613,6 +619,8 @@ called in the same way the declaration is the same.
|
||||
|
||||
Custom types can be defined with `:type`: >
|
||||
:type MyList list<string>
|
||||
Custom types must start with a capital letter, to avoid name clashes with
|
||||
builtin types added later, similarly to user functions.
|
||||
{not implemented yet}
|
||||
|
||||
And classes and interfaces can be used as types: >
|
||||
@@ -632,6 +640,35 @@ And classes and interfaces can be used as types: >
|
||||
{not implemented yet}
|
||||
|
||||
|
||||
Variable types and type casting *variable-types*
|
||||
|
||||
Variables declared in Vim9 script or in a `:def` function have a type, either
|
||||
specified explicitly or inferred from the initialization.
|
||||
|
||||
Global, buffer, window and tab page variables do not have a specific type, the
|
||||
value can be changed at any time, possibly changing the type. Therefore, in
|
||||
compiled code the "any" type is assumed.
|
||||
|
||||
This can be a problem when the "any" type is undesired and the actual type is
|
||||
expected to always be the same. For example, when declaring a list: >
|
||||
let l: list<number> = [1, g:two]
|
||||
This will give an error, because "g:two" has type "any". To avoid this, use a
|
||||
type cast: >
|
||||
let l: list<number> = [1, <number>g:two]
|
||||
< *type-casting*
|
||||
The compiled code will then check that "g:two" is a number at runtime and give
|
||||
an error if it isn't. This is called type casting.
|
||||
|
||||
The syntax of a type cast is: "<" {type} ">". There cannot be white space
|
||||
after the "<" or before the ">" (to avoid them being confused with
|
||||
smaller-than and bigger-than operators).
|
||||
|
||||
The semantics is that, if needed, a runtime type check is performed. The
|
||||
value is not actually changed. If you need to change the type, e.g. to change
|
||||
it to a string, use the |string()| function. Or use |str2nr()| to convert a
|
||||
string to a number.
|
||||
|
||||
|
||||
Type inference *type-inference*
|
||||
|
||||
In general: Whenever the type is clear it can be omitted. For example, when
|
||||
@@ -639,6 +676,12 @@ declaring a variable and giving it a value: >
|
||||
let var = 0 " infers number type
|
||||
let var = 'hello' " infers string type
|
||||
|
||||
The type of a list and dictionary comes from the common type of the values.
|
||||
If the values all have the same type, that type is used for the list or
|
||||
dictionary. If there is a mix of types, the "any" type is used. >
|
||||
[1, 2, 3] list<number>
|
||||
['a', 'b', 'c'] list<string>
|
||||
[1, 'x', 3] list<any>
|
||||
|
||||
==============================================================================
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ gN Like |gn| but searches backward, like with `N`.
|
||||
|
||||
*<LeftMouse>*
|
||||
<LeftMouse> Set the current cursor position. If Visual mode is
|
||||
active it is stopped. Only when 'mouse' option is
|
||||
active it is stopped. Only when 'mouse' option
|
||||
contains 'n' or 'a'. If the position is within 'so'
|
||||
lines from the last line on the screen the text is
|
||||
scrolled up. If the position is within 'so' lines from
|
||||
@@ -136,7 +136,7 @@ gN Like |gn| but searches backward, like with `N`.
|
||||
<RightMouse> Start Visual mode if it is not active. The text from
|
||||
the cursor position to the position of the click is
|
||||
highlighted. If Visual mode was already active move
|
||||
the start or end of the highlighted text, which ever
|
||||
the start or end of the highlighted text, whichever
|
||||
is closest, to the position of the click. Only when
|
||||
'mouse' option contains 'n' or 'a'.
|
||||
|
||||
@@ -236,7 +236,7 @@ The objects that can be used are:
|
||||
is inner sentence |v_is|
|
||||
ap a paragraph (with white space) |v_ap|
|
||||
ip inner paragraph |v_ip|
|
||||
ab a () block (with parenthesis) |v_ab|
|
||||
ab a () block (with parentheses) |v_ab|
|
||||
ib inner () block |v_ib|
|
||||
aB a {} block (with braces) |v_aB|
|
||||
iB inner {} block |v_iB|
|
||||
@@ -347,7 +347,7 @@ Visual-block Shift *v_b_>*
|
||||
The block is shifted by 'shiftwidth'. The RHS of the block is irrelevant. The
|
||||
LHS of the block determines the point from which to apply a right shift, and
|
||||
padding includes TABs optimally according to 'ts' and 'et'. The LHS of the
|
||||
block determines the point upto which to shift left.
|
||||
block determines the point up to which to shift left.
|
||||
See |v_b_>_example|.
|
||||
See |v_b_<_example|.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Jun 25
|
||||
" Last Change: 2020 Aug 04
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -1093,6 +1093,9 @@ au BufNewFile,BufRead .netrc setf netrc
|
||||
" Ninja file
|
||||
au BufNewFile,BufRead *.ninja setf ninja
|
||||
|
||||
" NPM RC file
|
||||
au BufNewFile,BufRead npmrc,.npmrc setf dosini
|
||||
|
||||
" Novell netware batch files
|
||||
au BufNewFile,BufRead *.ncf setf ncf
|
||||
|
||||
@@ -1199,6 +1202,9 @@ au BufNewFile,BufRead *.pod6 setf pod6
|
||||
" Also .ctp for Cake template file
|
||||
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp setf php
|
||||
|
||||
" PHP config
|
||||
au BufNewFile,BufRead php.ini,php.ini-* setf dosini
|
||||
|
||||
" Pike and Cmod
|
||||
au BufNewFile,BufRead *.pike,*.pmod setf pike
|
||||
au BufNewFile,BufRead *.cmod setf cmod
|
||||
|
||||
@@ -83,7 +83,7 @@ endif
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words =
|
||||
\ '\<\%(fu\%[nction]\|def\)\>[^(]:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
|
||||
\ '\<\%(fu\%[nction]\|def\)\>)\@!:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
|
||||
\ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' .
|
||||
\ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
|
||||
\ '{:},' .
|
||||
|
||||
114
runtime/keymap/turkish-f.vim
Normal file
114
runtime/keymap/turkish-f.vim
Normal file
@@ -0,0 +1,114 @@
|
||||
" Vim keymap file for Turkish F layout
|
||||
" Maintainer: Emir SARI <bitigchi@me.com>
|
||||
" Last changed: 5 August 2020
|
||||
|
||||
scriptencoding utf-8
|
||||
let b:keymap_name = "tr-f"
|
||||
loadkeymap
|
||||
|
||||
F A LATIN CAPITAL LETTER A
|
||||
< B LATIN CAPITAL LETTER B
|
||||
V C LATIN CAPITAL LETTER C
|
||||
B Ç LATIN CAPITAL LETTER C WITH CEDILLA
|
||||
Y D LATIN CAPITAL LETTER D
|
||||
D E LATIN CAPITAL LETTER E
|
||||
Q F LATIN CAPITAL LETTER F
|
||||
W G LATIN CAPITAL LETTER G
|
||||
E Ğ LATIN CAPITAL LETTER G WITH BREVE
|
||||
O H LATIN CAPITAL LETTER H
|
||||
R I LATIN CAPITAL LETTER I
|
||||
S İ LATIN CAPITAL LETTER I WITH DOT ABOVE
|
||||
Z J LATIN CAPITAL LETTER J
|
||||
J K LATIN CAPITAL LETTER K
|
||||
K M LATIN CAPITAL LETTER M
|
||||
I N LATIN CAPITAL LETTER N
|
||||
T O LATIN CAPITAL LETTER O
|
||||
X Ö LATIN CAPITAL LETTER O WITH DIAERESIS
|
||||
U R LATIN CAPITAL LETTER R
|
||||
M S LATIN CAPITAL LETTER S
|
||||
\" Ş LATIN CAPITAL LETTER S WITH CEDILLA
|
||||
H T LATIN CAPITAL LETTER T
|
||||
A U LATIN CAPITAL LETTER U
|
||||
G Ü LATIN CAPITAL LETTER U WITH DIAERESIS
|
||||
C V LATIN CAPITAL LETTER V
|
||||
: Y LATIN CAPITAL LETTER Y
|
||||
N Z LATIN CAPITAL LETTER Z
|
||||
|
||||
{ Q LATIN CAPITAL LETTER Q
|
||||
} W LATIN CAPITAL LETTER W
|
||||
| X LATIN CAPITAL LETTER X
|
||||
|
||||
± * ASTERISK
|
||||
@ " QUOTATION MARK
|
||||
# ^ CIRCUMFLEX ACCENT
|
||||
^ & AMPERSAND
|
||||
& ' APOSTROPHE
|
||||
* ( LEFT PARENTHESIS
|
||||
( ) RIGHT PARENTHESIS
|
||||
) = EQUALS SIGN
|
||||
_ ? QUESTION MARK
|
||||
+ _ LOW LINE
|
||||
> : COLON
|
||||
? ; SEMICOLON
|
||||
~ > GREATER-THAN SIGN
|
||||
|
||||
Å Û LATIN CAPITAL LETTER U WITH CIRCUMFLEX
|
||||
Í Î LATIN CAPITAL LETTER I WITH CIRCUMFLEX
|
||||
Ï Â LATIN CAPITAL LETTER A WITH CIRCUMFLEX
|
||||
` » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
|
||||
f a LATIN SMALL LETTER A
|
||||
, b LATIN SMALL LETTER B
|
||||
v c LATIN SMALL LETTER C
|
||||
b ç LATIN SMALL LETTER C WITH CEDILLA
|
||||
y d LATIN SMALL LETTER D
|
||||
d e LATIN SMALL LETTER E
|
||||
q f LATIN SMALL LETTER F
|
||||
w g LATIN SMALL LETTER G
|
||||
e ğ LATIN SMALL LETTER G WITH BREVE
|
||||
o h LATIN SMALL LETTER H
|
||||
r ı LATIN SMALL LETTER I
|
||||
s i LATIN SMALL LETTER I WITH DOT ABOVE
|
||||
z j LATIN SMALL LETTER J
|
||||
j k LATIN SMALL LETTER K
|
||||
k m LATIN SMALL LETTER M
|
||||
i n LATIN SMALL LETTER N
|
||||
t o LATIN SMALL LETTER O
|
||||
x ö LATIN SMALL LETTER O WITH DIAERESIS
|
||||
u r LATIN SMALL LETTER R
|
||||
m s LATIN SMALL LETTER S
|
||||
\' ş LATIN SMALL LETTER S WITH CEDILLA
|
||||
h t LATIN SMALL LETTER T
|
||||
a u LATIN SMALL LETTER U
|
||||
g ü LATIN SMALL LETTER U WITH DIAERESIS
|
||||
c v LATIN SMALL LETTER V
|
||||
; y LATIN SMALL LETTER Y
|
||||
n z LATIN SMALL LETTER Z
|
||||
|
||||
[ q LATIN SMALL LETTER Q
|
||||
] w LATIN SMALL LETTER W
|
||||
\\ x LATIN SMALL LETTER X
|
||||
|
||||
§ + PLUS SIGN
|
||||
- / SOLIDUS
|
||||
= - HYPHEN-MINUS
|
||||
/ , COMMA
|
||||
` < LESS-THAN SIGN
|
||||
|
||||
£ # NUMBER SIGN
|
||||
¶ { LEFT CURLY BRACKET
|
||||
• [ LEFT SQUARE BRACKET
|
||||
ª ] RIGHT SQUARE BRACKET
|
||||
º } RIGHT CURLY BRACKET
|
||||
– \ REVERSE SOLIDUS
|
||||
≠ | VERTICAL LINE
|
||||
œ @ COMMERCIAL AT
|
||||
‘ ~ TILDE
|
||||
å û LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
ß î LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
∂ € EURO SIGN
|
||||
ƒ â LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
˙ ₺ TURKISH LIRA SIGN
|
||||
¬ £ POUND SIGN
|
||||
… ¥ YEN SIGN
|
||||
` « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
62
runtime/keymap/turkish-q.vim
Normal file
62
runtime/keymap/turkish-q.vim
Normal file
@@ -0,0 +1,62 @@
|
||||
" Vim keymap file for Turkish Q layout
|
||||
" Maintainer: Emir SARI <bitigchi@me.com>
|
||||
" Last changed: 5 August 2020
|
||||
|
||||
scriptencoding utf-8
|
||||
let b:keymap_name = "tr-q"
|
||||
loadkeymap
|
||||
|
||||
\> Ç LATIN CAPITAL LETTER C WITH CEDILLA
|
||||
\{ Ğ LATIN CAPITAL LETTER G WITH BREVE
|
||||
\" İ LATIN CAPITAL LETTER I WITH DOT ABOVE
|
||||
\< Ö LATIN CAPITAL LETTER O WITH DIAERESIS
|
||||
\: Ş LATIN CAPITAL LETTER S WITH CEDILLA
|
||||
\} Ü LATIN CAPITAL LETTER U WITH DIAERESIS
|
||||
|
||||
± é LATIN SMALL LETTER E WITH ACUTE
|
||||
@ ' APOSTROPHE
|
||||
# ^ CIRCUMFLEX ACCENT
|
||||
$ + PLUS SIGN
|
||||
^ & AMPERSAND
|
||||
& / SOLIDUS
|
||||
* ( LEFT PARENTHESIS
|
||||
( ) RIGHT PARENTHESIS
|
||||
) = EQUAL SIGN
|
||||
_ ? QUESTION MARK
|
||||
+ _ LOW LINE
|
||||
~ > GREATER-THAN SIGN
|
||||
| ; SEMICOLON
|
||||
? : COLON
|
||||
|
||||
\. ç LATIN SMALL LETTER C WITH CEDILLA
|
||||
\[ ğ LATIN SMALL LETTER G WITH BREVE
|
||||
\' i LATIN SMALL LETTER I
|
||||
\, ö LATIN SMALL LETTER O WITH DIAERESIS
|
||||
\; ş LATIN SMALL LETTER S WITH CEDILLA
|
||||
\] ü LATIN SMALL LETTER U WITH DIAERESIS
|
||||
i ı LATIN SMALL LETTER DOTLESS I
|
||||
|
||||
§ " QUOTATION MARK
|
||||
- * ASTERISK
|
||||
= - HYPHEN-MINUS
|
||||
\\ , COMMA
|
||||
\/ . FULL STOP
|
||||
` < LESS-THAN SIGN
|
||||
|
||||
™ £ POUND SIGN
|
||||
£ # NUMBER SIGN
|
||||
¢ $ DOLLAR SIGN
|
||||
∞ ½ VULGAR FRACTION ONE HALF
|
||||
¶ { LEFT CURLY BRACKET
|
||||
• [ LEFT SQUARE BRACKET
|
||||
ª ] RIGHT SQUARE BRACKET
|
||||
º } RIGHT CURLY BRACKET
|
||||
– \ REVERSE SOLIDUS
|
||||
≠ | VERTICAL LINE
|
||||
œ @ COMMERCIAL AT
|
||||
´ € EURO SIGN
|
||||
† ₺ TURKISH LIRA SIGN
|
||||
¥ ¥ YEN SIGN
|
||||
‘ ~ TILDE
|
||||
… ´ ACUTE ACCENT
|
||||
« ` GRAVE ACCENT
|
||||
@@ -1,11 +1,12 @@
|
||||
" Vim syntax file
|
||||
" Language: Cascading Style Sheets
|
||||
" Previous Contributor List:
|
||||
" Jules Wang <w.jq0722@gmail.com>
|
||||
" Claudio Fleiner <claudio@fleiner.com> (Maintainer)
|
||||
" Yeti (Add full CSS2, HTML4 support)
|
||||
" Nikolai Weibull (Add CSS2 support)
|
||||
" URL: https://github.com/JulesWang/css.vim
|
||||
" Maintainer: Jules Wang <w.jq0722@gmail.com>
|
||||
" URL: https://github.com/jsit/css.vim
|
||||
" Maintainer: Jay Sitter <jay@jaysitter.com>
|
||||
" Last Change: 2019 Jul. 29
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
@@ -68,7 +69,7 @@ endtry
|
||||
" digits
|
||||
syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators
|
||||
syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" contains=cssUnitDecorators
|
||||
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\|fr\|vw\|vh\|vmin\|vmax\)\>" contains=cssUnitDecorators
|
||||
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\|fr\|vw\|vh\|vmin\|vmax\|ch\)\>" contains=cssUnitDecorators
|
||||
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=%" contains=cssUnitDecorators
|
||||
syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)\>" contains=cssUnitDecorators
|
||||
syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)\>" contains=cssUnitDecorators
|
||||
@@ -128,12 +129,14 @@ syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\|color-stop\|from\|to\)\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma,cssFunction
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(matrix\(3d\)\=\|scale\(3d\|X\|Y\|Z\)\=\|translate\(3d\|X\|Y\|Z\)\=\|skew\(X\|Y\)\=\|rotate\(3d\|X\|Y\|Z\)\=\|perspective\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssValueAngle,cssFunctionComma
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(blur\|brightness\|contrast\|drop-shadow\|grayscale\|hue-rotate\|invert\|opacity\|saturate\|sepia\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssValueAngle,cssFunctionComma
|
||||
syn keyword cssGradientAttr contained top bottom left right cover center middle ellipse at
|
||||
syn match cssFunctionComma contained ","
|
||||
|
||||
" Common Prop and Attr
|
||||
syn keyword cssCommonAttr contained auto none inherit all default normal
|
||||
syn keyword cssCommonAttr contained top bottom center stretch hidden visible
|
||||
syn match cssCommonAttr contained "\<\(max-\|min-\|fit-\)content\>"
|
||||
"------------------------------------------------
|
||||
" CSS Animations
|
||||
" http://www.w3.org/TR/css3-animations/
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: fstab file
|
||||
" Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
|
||||
" URL: https://raw.github.com/rid9/vim-fstab/master/fstab.vim
|
||||
" Last Change: 2019 Jun 06
|
||||
" Version: 1.3
|
||||
" Last Change: 2020 Aug 06
|
||||
" Version: 1.4
|
||||
"
|
||||
" Credits:
|
||||
" David Necas (Yeti) <yeti@physics.muni.cz>
|
||||
@@ -68,7 +68,7 @@ syn match fsOptionsString /[a-zA-Z0-9_-]\+/
|
||||
syn keyword fsOptionsYesNo yes no
|
||||
syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck
|
||||
syn keyword fsOptionsSize 512 1024 2048
|
||||
syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail
|
||||
syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail failok
|
||||
syn match fsOptionsGeneral /_netdev/
|
||||
|
||||
" Options: adfs
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim help file
|
||||
" Maintainer: Bram Moolenaar (Bram@vim.org)
|
||||
" Last Change: 2020 Mar 06
|
||||
" Last Change: 2020 Jul 28
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: pam(8) configuration file
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2011-08-03
|
||||
" Latest Revision: 2020/08/04
|
||||
" Changes By: Haochen Tong
|
||||
|
||||
|
||||
if exists("b:current_syntax")
|
||||
@@ -11,23 +12,32 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn match pamconfService '^[[:graph:]]\+'
|
||||
\ nextgroup=pamconfType,
|
||||
\ pamconfServiceLineCont skipwhite
|
||||
let s:has_service_field = exists("b:pamconf_has_service_field")
|
||||
\ ? b:pamconf_has_service_field
|
||||
\ : expand('%:t') == 'pam.conf' ? 1 : 0
|
||||
|
||||
syn match pamconfType '-\?[[:alpha:]]\+'
|
||||
\ contains=pamconfTypeKeyword
|
||||
\ nextgroup=pamconfControl,
|
||||
\ pamconfTypeLineCont skipwhite
|
||||
|
||||
syn keyword pamconfTypeKeyword contained account auth password session
|
||||
|
||||
if s:has_service_field
|
||||
syn match pamconfService '^[[:graph:]]\+'
|
||||
\ nextgroup=pamconfType,
|
||||
\ pamconfServiceLineCont skipwhite
|
||||
|
||||
syn match pamconfServiceLineCont contained '\\$'
|
||||
\ nextgroup=pamconfType,
|
||||
\ pamconfServiceLineCont skipwhite skipnl
|
||||
endif
|
||||
|
||||
syn keyword pamconfTodo contained TODO FIXME XXX NOTE
|
||||
|
||||
syn region pamconfComment display oneline start='#' end='$'
|
||||
\ contains=pamconfTodo,@Spell
|
||||
|
||||
syn match pamconfServiceLineCont contained '\\$'
|
||||
\ nextgroup=pamconfType,
|
||||
\ pamconfServiceLineCont skipwhite skipnl
|
||||
|
||||
syn keyword pamconfType account auth password session
|
||||
\ nextgroup=pamconfControl,
|
||||
\ pamconfTypeLineCont skipwhite
|
||||
|
||||
syn match pamconfTypeLineCont contained '\\$'
|
||||
\ nextgroup=pamconfControl,
|
||||
\ pamconfTypeLineCont skipwhite skipnl
|
||||
@@ -98,7 +108,8 @@ hi def link pamconfTodo Todo
|
||||
hi def link pamconfComment Comment
|
||||
hi def link pamconfService Statement
|
||||
hi def link pamconfServiceLineCont Special
|
||||
hi def link pamconfType Type
|
||||
hi def link pamconfType Special
|
||||
hi def link pamconfTypeKeyword Type
|
||||
hi def link pamconfTypeLineCont pamconfServiceLineCont
|
||||
hi def link pamconfControl Macro
|
||||
hi def link pamconfControlBegin Delimiter
|
||||
|
||||
@@ -588,6 +588,8 @@ ifdef PYTHON3
|
||||
CFLAGS += -DFEAT_PYTHON3
|
||||
ifeq (yes, $(DYNAMIC_PYTHON3))
|
||||
CFLAGS += -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"$(DYNAMIC_PYTHON3_DLL)\"
|
||||
else
|
||||
CFLAGS += -DPYTHON3_DLL=\"$(DYNAMIC_PYTHON3_DLL)\"
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -804,6 +806,7 @@ OBJ = \
|
||||
$(OUTDIR)/vim9compile.o \
|
||||
$(OUTDIR)/vim9execute.o \
|
||||
$(OUTDIR)/vim9script.o \
|
||||
$(OUTDIR)/vim9type.o \
|
||||
$(OUTDIR)/viminfo.o \
|
||||
$(OUTDIR)/winclip.o \
|
||||
$(OUTDIR)/window.o
|
||||
@@ -1175,6 +1178,8 @@ $(OUTDIR)/vim9execute.o: vim9execute.c $(INCL) version.h
|
||||
|
||||
$(OUTDIR)/vim9script.o: vim9script.c $(INCL) version.h
|
||||
|
||||
$(OUTDIR)/vim9type.o: vim9type.c $(INCL) version.h
|
||||
|
||||
$(OUTDIR)/viminfo.o: viminfo.c $(INCL) version.h
|
||||
|
||||
$(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp gui_dwrite.h
|
||||
|
||||
@@ -825,6 +825,7 @@ OBJ = \
|
||||
$(OUTDIR)\vim9compile.obj \
|
||||
$(OUTDIR)\vim9execute.obj \
|
||||
$(OUTDIR)\vim9script.obj \
|
||||
$(OUTDIR)\vim9type.obj \
|
||||
$(OUTDIR)\viminfo.obj \
|
||||
$(OUTDIR)\winclip.obj \
|
||||
$(OUTDIR)\window.obj \
|
||||
@@ -1026,6 +1027,9 @@ PYTHON_LIB = $(PYTHON)\libs\python$(PYTHON_VER).lib
|
||||
! ifndef PYTHON3_VER
|
||||
PYTHON3_VER = 36
|
||||
! endif
|
||||
! ifndef DYNAMIC_PYTHON3_DLL
|
||||
DYNAMIC_PYTHON3_DLL = python$(PYTHON3_VER).dll
|
||||
! endif
|
||||
! message Python3 requested (version $(PYTHON3_VER)) - root dir is "$(PYTHON3)"
|
||||
! if "$(DYNAMIC_PYTHON3)" == "yes"
|
||||
! message Python3 DLL will be loaded dynamically
|
||||
@@ -1035,9 +1039,10 @@ PYTHON3_OBJ = $(OUTDIR)\if_python3.obj
|
||||
PYTHON3_INC = /I "$(PYTHON3)\Include" /I "$(PYTHON3)\PC"
|
||||
! if "$(DYNAMIC_PYTHON3)" == "yes"
|
||||
CFLAGS = $(CFLAGS) -DDYNAMIC_PYTHON3 \
|
||||
-DDYNAMIC_PYTHON3_DLL=\"python$(PYTHON3_VER).dll\"
|
||||
-DDYNAMIC_PYTHON3_DLL=\"$(DYNAMIC_PYTHON3_DLL)\"
|
||||
PYTHON3_LIB = /nodefaultlib:python$(PYTHON3_VER).lib
|
||||
! else
|
||||
CFLAGS = $(CFLAGS) -DPYTHON3_DLL=\"$(DYNAMIC_PYTHON3_DLL)\"
|
||||
PYTHON3_LIB = $(PYTHON3)\libs\python$(PYTHON3_VER).lib
|
||||
! endif
|
||||
!endif
|
||||
@@ -1795,6 +1800,8 @@ $(OUTDIR)/vim9execute.obj: $(OUTDIR) vim9execute.c $(INCL)
|
||||
|
||||
$(OUTDIR)/vim9script.obj: $(OUTDIR) vim9script.c $(INCL)
|
||||
|
||||
$(OUTDIR)/vim9type.obj: $(OUTDIR) vim9type.c $(INCL)
|
||||
|
||||
$(OUTDIR)/viminfo.obj: $(OUTDIR) viminfo.c $(INCL) version.h
|
||||
|
||||
$(OUTDIR)/window.obj: $(OUTDIR) window.c $(INCL)
|
||||
@@ -1994,6 +2001,7 @@ proto.h: \
|
||||
proto/vim9compile.pro \
|
||||
proto/vim9execute.pro \
|
||||
proto/vim9script.pro \
|
||||
proto/vim9type.pro \
|
||||
proto/viminfo.pro \
|
||||
proto/window.pro \
|
||||
$(SOUND_PRO) \
|
||||
|
||||
12
src/Makefile
12
src/Makefile
@@ -1702,6 +1702,7 @@ BASIC_SRC = \
|
||||
vim9compile.c \
|
||||
vim9execute.c \
|
||||
vim9script.c \
|
||||
vim9type.c \
|
||||
viminfo.c \
|
||||
window.c \
|
||||
bufwrite.c \
|
||||
@@ -1851,6 +1852,7 @@ OBJ_COMMON = \
|
||||
objects/vim9compile.o \
|
||||
objects/vim9execute.o \
|
||||
objects/vim9script.o \
|
||||
objects/vim9type.o \
|
||||
objects/viminfo.o \
|
||||
objects/window.o \
|
||||
objects/bufwrite.o \
|
||||
@@ -2032,6 +2034,7 @@ PRO_AUTO = \
|
||||
vim9compile.pro \
|
||||
vim9execute.pro \
|
||||
vim9script.pro \
|
||||
vim9type.pro \
|
||||
viminfo.pro \
|
||||
window.pro \
|
||||
$(ALL_GUI_PRO) \
|
||||
@@ -2310,7 +2313,7 @@ test_libvterm:
|
||||
|
||||
# Run individual OLD style test.
|
||||
# These do not depend on the executable, compile it when needed.
|
||||
test1 test49 test59:
|
||||
test1 test49:
|
||||
cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTESTTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
|
||||
|
||||
# Run individual NEW style test.
|
||||
@@ -3563,6 +3566,9 @@ objects/vim9execute.o: vim9execute.c
|
||||
objects/vim9script.o: vim9script.c
|
||||
$(CCC) -o $@ vim9script.c
|
||||
|
||||
objects/vim9type.o: vim9type.c
|
||||
$(CCC) -o $@ vim9type.c
|
||||
|
||||
objects/viminfo.o: viminfo.c
|
||||
$(CCC) -o $@ viminfo.c
|
||||
|
||||
@@ -4192,6 +4198,10 @@ objects/vim9script.o: vim9script.c vim.h protodef.h auto/config.h feature.h \
|
||||
os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h vim9.h
|
||||
objects/vim9type.o: vim9type.c vim.h protodef.h auto/config.h feature.h \
|
||||
os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h vim9.h
|
||||
objects/viminfo.o: viminfo.c vim.h protodef.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
|
||||
@@ -596,7 +596,8 @@ build_drop_cmd(
|
||||
ga_concat(&ga, cdp);
|
||||
|
||||
// Call inputsave() so that a prompt for an encryption key works.
|
||||
ga_concat(&ga, (char_u *)"<CR>:if exists('*inputsave')|call inputsave()|endif|");
|
||||
ga_concat(&ga, (char_u *)
|
||||
"<CR>:if exists('*inputsave')|call inputsave()|endif|");
|
||||
if (tabs)
|
||||
ga_concat(&ga, (char_u *)"tab ");
|
||||
ga_concat(&ga, (char_u *)"drop");
|
||||
@@ -621,7 +622,8 @@ build_drop_cmd(
|
||||
ga_concat(&ga, p);
|
||||
vim_free(p);
|
||||
}
|
||||
ga_concat(&ga, (char_u *)"|if exists('*inputrestore')|call inputrestore()|endif<CR>");
|
||||
ga_concat(&ga, (char_u *)
|
||||
"|if exists('*inputrestore')|call inputrestore()|endif<CR>");
|
||||
|
||||
// The :drop commands goes to Insert mode when 'insertmode' is set, use
|
||||
// CTRL-\ CTRL-N again.
|
||||
|
||||
@@ -817,7 +817,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
|
||||
{
|
||||
if (eval1(&start, &tv, NULL) == FAIL) // recursive!
|
||||
return FAIL;
|
||||
if (*start == '}')
|
||||
if (*skipwhite(start) == '}')
|
||||
return NOTDONE;
|
||||
}
|
||||
|
||||
@@ -966,7 +966,7 @@ dict_extend(dict_T *d1, dict_T *d2, char_u *action)
|
||||
// Check the key to be valid when adding to any scope.
|
||||
if (d1->dv_scope == VAR_DEF_SCOPE
|
||||
&& HI2DI(hi2)->di_tv.v_type == VAR_FUNC
|
||||
&& var_check_func_name(hi2->hi_key, di1 == NULL))
|
||||
&& var_wrong_func_name(hi2->hi_key, di1 == NULL))
|
||||
break;
|
||||
if (!valid_varname(hi2->hi_key))
|
||||
break;
|
||||
|
||||
@@ -1659,10 +1659,13 @@ win_update(win_T *wp)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
if (mod_top != 0 && wp->w_topline == mod_top)
|
||||
if (mod_top != 0
|
||||
&& wp->w_topline == mod_top
|
||||
&& (!wp->w_lines[0].wl_valid
|
||||
|| wp->w_topline == wp->w_lines[0].wl_lnum))
|
||||
{
|
||||
// w_topline is the first changed line, the scrolling will be done
|
||||
// further down.
|
||||
// w_topline is the first changed line and window is not scrolled,
|
||||
// the scrolling from changed lines will be done further down.
|
||||
}
|
||||
else if (wp->w_lines[0].wl_valid
|
||||
&& (wp->w_topline < wp->w_lines[0].wl_lnum
|
||||
|
||||
189
src/eval.c
189
src/eval.c
@@ -192,7 +192,10 @@ eval_to_bool(
|
||||
*error = FALSE;
|
||||
if (!skip)
|
||||
{
|
||||
retval = (tv_get_number_chk(&tv, error) != 0);
|
||||
if (in_vim9script())
|
||||
retval = tv2bool(&tv);
|
||||
else
|
||||
retval = (tv_get_number_chk(&tv, error) != 0);
|
||||
clear_tv(&tv);
|
||||
}
|
||||
}
|
||||
@@ -300,7 +303,7 @@ eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv)
|
||||
s = skipwhite(s);
|
||||
if (eval1_emsg(&s, rettv, NULL) == FAIL)
|
||||
return FAIL;
|
||||
if (*s != NUL) // check for trailing chars after expr
|
||||
if (*skipwhite(s) != NUL) // check for trailing chars after expr
|
||||
{
|
||||
clear_tv(rettv);
|
||||
semsg(_(e_invexpr2), s);
|
||||
@@ -820,14 +823,23 @@ get_lval(
|
||||
{
|
||||
lp->ll_name = name;
|
||||
|
||||
if (in_vim9script() && *p == ':')
|
||||
if (in_vim9script())
|
||||
{
|
||||
scriptitem_T *si = SCRIPT_ITEM(current_sctx.sc_sid);
|
||||
char_u *tp = skipwhite(p + 1);
|
||||
// "a: type" is declaring variable "a" with a type, not "a:".
|
||||
if (p == name + 2 && p[-1] == ':')
|
||||
{
|
||||
--p;
|
||||
lp->ll_name_end = p;
|
||||
}
|
||||
if (*p == ':')
|
||||
{
|
||||
scriptitem_T *si = SCRIPT_ITEM(current_sctx.sc_sid);
|
||||
char_u *tp = skipwhite(p + 1);
|
||||
|
||||
// parse the type after the name
|
||||
lp->ll_type = parse_type(&tp, &si->sn_type_list);
|
||||
lp->ll_name_end = tp;
|
||||
// parse the type after the name
|
||||
lp->ll_type = parse_type(&tp, &si->sn_type_list);
|
||||
lp->ll_name_end = tp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -903,6 +915,7 @@ get_lval(
|
||||
clear_tv(&var1);
|
||||
return NULL;
|
||||
}
|
||||
p = skipwhite(p);
|
||||
}
|
||||
|
||||
// Optionally get the second index [ :expr].
|
||||
@@ -997,7 +1010,7 @@ get_lval(
|
||||
prevval = 0; // avoid compiler warning
|
||||
wrong = (lp->ll_dict->dv_scope == VAR_DEF_SCOPE
|
||||
&& rettv->v_type == VAR_FUNC
|
||||
&& var_check_func_name(key, lp->ll_di == NULL))
|
||||
&& var_wrong_func_name(key, lp->ll_di == NULL))
|
||||
|| !valid_varname(key);
|
||||
if (len != -1)
|
||||
key[len] = prevval;
|
||||
@@ -2071,7 +2084,7 @@ eval0(
|
||||
* expr2 ? expr1 : expr1
|
||||
*
|
||||
* "arg" must point to the first non-white of the expression.
|
||||
* "arg" is advanced to the next non-white after the recognized expression.
|
||||
* "arg" is advanced to just after the recognized expression.
|
||||
*
|
||||
* Note: "rettv.v_lock" is not set.
|
||||
*
|
||||
@@ -2110,7 +2123,15 @@ eval1(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
if (getnext)
|
||||
*arg = eval_next_line(evalarg_used);
|
||||
else
|
||||
{
|
||||
if (evaluate && in_vim9script() && !VIM_ISWHITE(p[-1]))
|
||||
{
|
||||
error_white_both(p, 1);
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
*arg = p;
|
||||
}
|
||||
|
||||
result = FALSE;
|
||||
if (evaluate)
|
||||
@@ -2127,6 +2148,12 @@ eval1(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
/*
|
||||
* Get the second variable. Recursive!
|
||||
*/
|
||||
if (evaluate && in_vim9script() && !IS_WHITE_OR_NUL((*arg)[1]))
|
||||
{
|
||||
error_white_both(p, 1);
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
*arg = skipwhite_and_linebreak(*arg + 1, evalarg_used);
|
||||
evalarg_used->eval_flags = result ? orig_flags
|
||||
: orig_flags & ~EVAL_EVALUATE;
|
||||
@@ -2147,11 +2174,25 @@ eval1(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
if (getnext)
|
||||
*arg = eval_next_line(evalarg_used);
|
||||
else
|
||||
{
|
||||
if (evaluate && in_vim9script() && !VIM_ISWHITE(p[-1]))
|
||||
{
|
||||
error_white_both(p, 1);
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
*arg = p;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the third variable. Recursive!
|
||||
*/
|
||||
if (evaluate && in_vim9script() && !IS_WHITE_OR_NUL((*arg)[1]))
|
||||
{
|
||||
error_white_both(p, 1);
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
*arg = skipwhite_and_linebreak(*arg + 1, evalarg_used);
|
||||
evalarg_used->eval_flags = !result ? orig_flags
|
||||
: orig_flags & ~EVAL_EVALUATE;
|
||||
@@ -2178,7 +2219,7 @@ eval1(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
* expr2 || expr2 || expr2 logical OR
|
||||
*
|
||||
* "arg" must point to the first non-white of the expression.
|
||||
* "arg" is advanced to the next non-white after the recognized expression.
|
||||
* "arg" is advanced to just after the recognized expression.
|
||||
*
|
||||
* Return OK or FAIL.
|
||||
*/
|
||||
@@ -2241,11 +2282,25 @@ eval2(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
if (getnext)
|
||||
*arg = eval_next_line(evalarg_used);
|
||||
else
|
||||
{
|
||||
if (evaluate && in_vim9script() && !VIM_ISWHITE(p[-1]))
|
||||
{
|
||||
error_white_both(p, 2);
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
*arg = p;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the second variable.
|
||||
*/
|
||||
if (evaluate && in_vim9script() && !IS_WHITE_OR_NUL((*arg)[2]))
|
||||
{
|
||||
error_white_both(p, 2);
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
*arg = skipwhite_and_linebreak(*arg + 2, evalarg_used);
|
||||
evalarg_used->eval_flags = !result ? orig_flags
|
||||
: orig_flags & ~EVAL_EVALUATE;
|
||||
@@ -2295,7 +2350,7 @@ eval2(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
* expr3 && expr3 && expr3 logical AND
|
||||
*
|
||||
* "arg" must point to the first non-white of the expression.
|
||||
* "arg" is advanced to the next non-white after the recognized expression.
|
||||
* "arg" is advanced to just after the recognized expression.
|
||||
*
|
||||
* Return OK or FAIL.
|
||||
*/
|
||||
@@ -2358,11 +2413,25 @@ eval3(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
if (getnext)
|
||||
*arg = eval_next_line(evalarg_used);
|
||||
else
|
||||
{
|
||||
if (evaluate && in_vim9script() && !VIM_ISWHITE(p[-1]))
|
||||
{
|
||||
error_white_both(p, 2);
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
*arg = p;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the second variable.
|
||||
*/
|
||||
if (evaluate && in_vim9script() && !IS_WHITE_OR_NUL((*arg)[2]))
|
||||
{
|
||||
error_white_both(p, 2);
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
*arg = skipwhite_and_linebreak(*arg + 2, evalarg_used);
|
||||
evalarg_used->eval_flags = result ? orig_flags
|
||||
: orig_flags & ~EVAL_EVALUATE;
|
||||
@@ -2421,7 +2490,7 @@ eval3(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
* var1 isnot var2
|
||||
*
|
||||
* "arg" must point to the first non-white of the expression.
|
||||
* "arg" is advanced to the next non-white after the recognized expression.
|
||||
* "arg" is advanced to just after the recognized expression.
|
||||
*
|
||||
* Return OK or FAIL.
|
||||
*/
|
||||
@@ -2451,9 +2520,17 @@ eval4(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
typval_T var2;
|
||||
int ic;
|
||||
int vim9script = in_vim9script();
|
||||
int evaluate = evalarg == NULL
|
||||
? 0 : (evalarg->eval_flags & EVAL_EVALUATE);
|
||||
|
||||
if (getnext)
|
||||
*arg = eval_next_line(evalarg);
|
||||
else if (evaluate && vim9script && !VIM_ISWHITE(**arg))
|
||||
{
|
||||
error_white_both(p, len);
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
if (vim9script && type_is && (p[len] == '?' || p[len] == '#'))
|
||||
{
|
||||
@@ -2481,13 +2558,19 @@ eval4(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
/*
|
||||
* Get the second variable.
|
||||
*/
|
||||
if (evaluate && vim9script && !IS_WHITE_OR_NUL(p[len]))
|
||||
{
|
||||
error_white_both(p, 1);
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
*arg = skipwhite_and_linebreak(p + len, evalarg);
|
||||
if (eval5(arg, &var2, evalarg) == FAIL)
|
||||
{
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
if (evalarg != NULL && (evalarg->eval_flags & EVAL_EVALUATE))
|
||||
if (evaluate)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -2551,7 +2634,7 @@ eval_addlist(typval_T *tv1, typval_T *tv2)
|
||||
* .. string concatenation
|
||||
*
|
||||
* "arg" must point to the first non-white of the expression.
|
||||
* "arg" is advanced to the next non-white after the recognized expression.
|
||||
* "arg" is advanced to just after the recognized expression.
|
||||
*
|
||||
* Return OK or FAIL.
|
||||
*/
|
||||
@@ -2573,6 +2656,7 @@ eval5(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
int getnext;
|
||||
char_u *p;
|
||||
int op;
|
||||
int oplen;
|
||||
int concat;
|
||||
typval_T var2;
|
||||
|
||||
@@ -2583,11 +2667,20 @@ eval5(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
if (op != '+' && op != '-' && !concat)
|
||||
break;
|
||||
|
||||
evaluate = evalarg == NULL ? 0 : (evalarg->eval_flags & EVAL_EVALUATE);
|
||||
oplen = (concat && p[1] == '.') ? 2 : 1;
|
||||
if (getnext)
|
||||
*arg = eval_next_line(evalarg);
|
||||
else
|
||||
{
|
||||
if (evaluate && in_vim9script() && !VIM_ISWHITE(**arg))
|
||||
{
|
||||
error_white_both(p, oplen);
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
*arg = p;
|
||||
evaluate = evalarg == NULL ? 0 : (evalarg->eval_flags & EVAL_EVALUATE);
|
||||
}
|
||||
if ((op != '+' || (rettv->v_type != VAR_LIST
|
||||
&& rettv->v_type != VAR_BLOB))
|
||||
#ifdef FEAT_FLOAT
|
||||
@@ -2612,9 +2705,13 @@ eval5(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
/*
|
||||
* Get the second variable.
|
||||
*/
|
||||
if (op == '.' && *(*arg + 1) == '.') // .. string concatenation
|
||||
++*arg;
|
||||
*arg = skipwhite_and_linebreak(*arg + 1, evalarg);
|
||||
if (evaluate && in_vim9script() && !IS_WHITE_OR_NUL((*arg)[oplen]))
|
||||
{
|
||||
error_white_both(p, oplen);
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
*arg = skipwhite_and_linebreak(*arg + oplen, evalarg);
|
||||
if (eval6(arg, &var2, evalarg, op == '.') == FAIL)
|
||||
{
|
||||
clear_tv(rettv);
|
||||
@@ -2739,7 +2836,7 @@ eval5(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
* % number modulo
|
||||
*
|
||||
* "arg" must point to the first non-white of the expression.
|
||||
* "arg" is advanced to the next non-white after the recognized expression.
|
||||
* "arg" is advanced to just after the recognized expression.
|
||||
*
|
||||
* Return OK or FAIL.
|
||||
*/
|
||||
@@ -2781,17 +2878,25 @@ eval6(
|
||||
if (op != '*' && op != '/' && op != '%')
|
||||
break;
|
||||
|
||||
evaluate = evalarg == NULL ? 0 : (evalarg->eval_flags & EVAL_EVALUATE);
|
||||
if (getnext)
|
||||
*arg = eval_next_line(evalarg);
|
||||
else
|
||||
{
|
||||
if (evaluate && in_vim9script() && !VIM_ISWHITE(**arg))
|
||||
{
|
||||
error_white_both(p, 1);
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
*arg = p;
|
||||
}
|
||||
|
||||
#ifdef FEAT_FLOAT
|
||||
f1 = 0;
|
||||
f2 = 0;
|
||||
#endif
|
||||
error = FALSE;
|
||||
evaluate = evalarg == NULL ? 0 : (evalarg->eval_flags & EVAL_EVALUATE);
|
||||
if (evaluate)
|
||||
{
|
||||
#ifdef FEAT_FLOAT
|
||||
@@ -2814,7 +2919,13 @@ eval6(
|
||||
/*
|
||||
* Get the second variable.
|
||||
*/
|
||||
*arg = skipwhite(*arg + 1);
|
||||
if (evaluate && in_vim9script() && !IS_WHITE_OR_NUL((*arg)[1]))
|
||||
{
|
||||
error_white_both(p, 1);
|
||||
clear_tv(rettv);
|
||||
return FAIL;
|
||||
}
|
||||
*arg = skipwhite_and_linebreak(*arg + 1, evalarg);
|
||||
if (eval7(arg, &var2, evalarg, FALSE) == FAIL)
|
||||
return FAIL;
|
||||
|
||||
@@ -2927,7 +3038,7 @@ eval6(
|
||||
* trailing ->name() method call
|
||||
*
|
||||
* "arg" must point to the first non-white of the expression.
|
||||
* "arg" is advanced to the next non-white after the recognized expression.
|
||||
* "arg" is advanced to just after the recognized expression.
|
||||
*
|
||||
* Return OK or FAIL.
|
||||
*/
|
||||
@@ -2990,7 +3101,8 @@ eval7(
|
||||
|
||||
// Apply prefixed "-" and "+" now. Matters especially when
|
||||
// "->" follows.
|
||||
if (ret == OK && evaluate && end_leader > start_leader)
|
||||
if (ret == OK && evaluate && end_leader > start_leader
|
||||
&& rettv->v_type != VAR_BLOB)
|
||||
ret = eval7_leader(rettv, TRUE, start_leader, &end_leader);
|
||||
break;
|
||||
|
||||
@@ -3099,9 +3211,12 @@ eval7(
|
||||
{
|
||||
int flags = evalarg == NULL ? 0 : evalarg->eval_flags;
|
||||
|
||||
if (**arg == '(')
|
||||
if ((in_vim9script() ? **arg : *skipwhite(*arg)) == '(')
|
||||
{
|
||||
// "name(..." recursive!
|
||||
*arg = skipwhite(*arg);
|
||||
ret = eval_func(arg, evalarg, s, len, rettv, flags, NULL);
|
||||
}
|
||||
else if (flags & EVAL_CONSTANT)
|
||||
ret = FAIL;
|
||||
else if (evaluate)
|
||||
@@ -3111,12 +3226,14 @@ eval7(
|
||||
{
|
||||
rettv->v_type = VAR_BOOL;
|
||||
rettv->vval.v_number = VVAL_TRUE;
|
||||
ret = OK;
|
||||
}
|
||||
else if (len == 5 && in_vim9script()
|
||||
&& STRNCMP(s, "false", 4) == 0)
|
||||
{
|
||||
rettv->v_type = VAR_BOOL;
|
||||
rettv->vval.v_number = VVAL_FALSE;
|
||||
ret = OK;
|
||||
}
|
||||
else
|
||||
ret = eval_variable(s, len, rettv, NULL, TRUE, FALSE);
|
||||
@@ -3160,6 +3277,7 @@ eval7_leader(
|
||||
int ret = OK;
|
||||
int error = FALSE;
|
||||
varnumber_T val = 0;
|
||||
vartype_T type = rettv->v_type;
|
||||
#ifdef FEAT_FLOAT
|
||||
float_T f = 0.0;
|
||||
|
||||
@@ -3167,7 +3285,10 @@ eval7_leader(
|
||||
f = rettv->vval.v_float;
|
||||
else
|
||||
#endif
|
||||
val = tv_get_number_chk(rettv, &error);
|
||||
if (in_vim9script() && end_leader[-1] == '!')
|
||||
val = tv2bool(rettv);
|
||||
else
|
||||
val = tv_get_number_chk(rettv, &error);
|
||||
if (error)
|
||||
{
|
||||
clear_tv(rettv);
|
||||
@@ -3190,7 +3311,10 @@ eval7_leader(
|
||||
f = !f;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
val = !val;
|
||||
type = VAR_BOOL;
|
||||
}
|
||||
}
|
||||
else if (*end_leader == '-')
|
||||
{
|
||||
@@ -3199,7 +3323,10 @@ eval7_leader(
|
||||
f = -f;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
val = -val;
|
||||
type = VAR_NUMBER;
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef FEAT_FLOAT
|
||||
@@ -3212,7 +3339,10 @@ eval7_leader(
|
||||
#endif
|
||||
{
|
||||
clear_tv(rettv);
|
||||
rettv->v_type = VAR_NUMBER;
|
||||
if (in_vim9script())
|
||||
rettv->v_type = type;
|
||||
else
|
||||
rettv->v_type = VAR_NUMBER;
|
||||
rettv->vval.v_number = val;
|
||||
}
|
||||
}
|
||||
@@ -3357,6 +3487,7 @@ eval_method(
|
||||
}
|
||||
else
|
||||
{
|
||||
*arg = skipwhite(*arg);
|
||||
if (**arg != '(')
|
||||
{
|
||||
if (verbose)
|
||||
@@ -4840,7 +4971,7 @@ get_env_len(char_u **arg)
|
||||
|
||||
/*
|
||||
* Get the length of the name of a function or internal variable.
|
||||
* "arg" is advanced to the first non-white character after the name.
|
||||
* "arg" is advanced to after the name.
|
||||
* Return 0 if something is wrong.
|
||||
*/
|
||||
int
|
||||
@@ -4866,7 +4997,7 @@ get_id_len(char_u **arg)
|
||||
return 0;
|
||||
|
||||
len = (int)(p - *arg);
|
||||
*arg = skipwhite(p);
|
||||
*arg = p;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
@@ -393,6 +393,24 @@ ret_remove(int argcount UNUSED, type_T **argtypes)
|
||||
return &t_any;
|
||||
}
|
||||
|
||||
static type_T *
|
||||
ret_getreg(int argcount, type_T **argtypes UNUSED)
|
||||
{
|
||||
// Assume that if the third argument is passed it's non-zero
|
||||
if (argcount == 3)
|
||||
return &t_list_string;
|
||||
return &t_string;
|
||||
}
|
||||
|
||||
static type_T *
|
||||
ret_maparg(int argcount, type_T **argtypes UNUSED)
|
||||
{
|
||||
// Assume that if the fourth argument is passed it's non-zero
|
||||
if (argcount == 4)
|
||||
return &t_dict_any;
|
||||
return &t_string;
|
||||
}
|
||||
|
||||
static type_T *ret_f_function(int argcount, type_T **argtypes);
|
||||
|
||||
/*
|
||||
@@ -641,7 +659,7 @@ static funcentry_T global_functions[] =
|
||||
{"getpid", 0, 0, 0, ret_number, f_getpid},
|
||||
{"getpos", 1, 1, FEARG_1, ret_list_number, f_getpos},
|
||||
{"getqflist", 0, 1, 0, ret_list_or_dict_0, f_getqflist},
|
||||
{"getreg", 0, 3, FEARG_1, ret_string, f_getreg},
|
||||
{"getreg", 0, 3, FEARG_1, ret_getreg, f_getreg},
|
||||
{"getreginfo", 0, 1, FEARG_1, ret_dict_any, f_getreginfo},
|
||||
{"getregtype", 0, 1, FEARG_1, ret_string, f_getregtype},
|
||||
{"gettabinfo", 0, 1, FEARG_1, ret_list_dict_any, f_gettabinfo},
|
||||
@@ -720,7 +738,7 @@ static funcentry_T global_functions[] =
|
||||
#endif
|
||||
},
|
||||
{"map", 2, 2, FEARG_1, ret_any, f_map},
|
||||
{"maparg", 1, 4, FEARG_1, ret_string, f_maparg},
|
||||
{"maparg", 1, 4, FEARG_1, ret_maparg, f_maparg},
|
||||
{"mapcheck", 1, 3, FEARG_1, ret_string, f_mapcheck},
|
||||
{"mapset", 3, 3, FEARG_1, ret_void, f_mapset},
|
||||
{"match", 2, 4, FEARG_1, ret_any, f_match},
|
||||
|
||||
@@ -1137,6 +1137,7 @@ list_arg_vars(exarg_T *eap, char_u *arg, int *first)
|
||||
}
|
||||
else
|
||||
{
|
||||
arg = skipwhite(arg);
|
||||
if (tofree != NULL)
|
||||
name = tofree;
|
||||
if (eval_variable(name, len, &tv, NULL, TRUE, FALSE) == FAIL)
|
||||
@@ -1219,6 +1220,13 @@ ex_let_one(
|
||||
int opt_flags;
|
||||
char_u *tofree = NULL;
|
||||
|
||||
if (in_vim9script() && (flags & LET_NO_COMMAND) == 0
|
||||
&& vim_strchr((char_u *)"$@&", *arg) != NULL)
|
||||
{
|
||||
vim9_declare_error(arg);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// ":let $VAR = expr": Set environment variable.
|
||||
if (*arg == '$')
|
||||
{
|
||||
@@ -1227,11 +1235,6 @@ ex_let_one(
|
||||
emsg(_("E996: Cannot lock an environment variable"));
|
||||
return NULL;
|
||||
}
|
||||
if (in_vim9script() && (flags & LET_NO_COMMAND) == 0)
|
||||
{
|
||||
vim9_declare_error(arg);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Find the end of the name.
|
||||
++arg;
|
||||
@@ -2427,7 +2430,7 @@ eval_variable(
|
||||
else
|
||||
{
|
||||
scriptitem_T *si = SCRIPT_ITEM(import->imp_sid);
|
||||
svar_T *sv = ((svar_T *)si->sn_var_vals.ga_data)
|
||||
svar_T *sv = ((svar_T *)si->sn_var_vals.ga_data)
|
||||
+ import->imp_var_vals_idx;
|
||||
tv = sv->sv_tv;
|
||||
}
|
||||
@@ -2925,7 +2928,7 @@ set_var_const(
|
||||
di = find_var_in_scoped_ht(name, TRUE);
|
||||
|
||||
if ((tv->v_type == VAR_FUNC || tv->v_type == VAR_PARTIAL)
|
||||
&& var_check_func_name(name, di == NULL))
|
||||
&& var_wrong_func_name(name, di == NULL))
|
||||
return;
|
||||
|
||||
if (di != NULL)
|
||||
@@ -3111,7 +3114,7 @@ var_check_fixed(int flags, char_u *name, int use_gettext)
|
||||
* Return TRUE and give an error if not.
|
||||
*/
|
||||
int
|
||||
var_check_func_name(
|
||||
var_wrong_func_name(
|
||||
char_u *name, // points to start of variable name
|
||||
int new_var) // TRUE when creating the variable
|
||||
{
|
||||
@@ -3356,6 +3359,7 @@ assert_error(garray_T *gap)
|
||||
int
|
||||
var_exists(char_u *var)
|
||||
{
|
||||
char_u *arg = var;
|
||||
char_u *name;
|
||||
char_u *tofree;
|
||||
typval_T tv;
|
||||
@@ -3364,7 +3368,7 @@ var_exists(char_u *var)
|
||||
|
||||
// get_name_len() takes care of expanding curly braces
|
||||
name = var;
|
||||
len = get_name_len(&var, &tofree, TRUE, FALSE);
|
||||
len = get_name_len(&arg, &tofree, TRUE, FALSE);
|
||||
if (len > 0)
|
||||
{
|
||||
if (tofree != NULL)
|
||||
@@ -3373,12 +3377,13 @@ var_exists(char_u *var)
|
||||
if (n)
|
||||
{
|
||||
// handle d.key, l[idx], f(expr)
|
||||
n = (handle_subscript(&var, &tv, &EVALARG_EVALUATE, FALSE) == OK);
|
||||
arg = skipwhite(arg);
|
||||
n = (handle_subscript(&arg, &tv, &EVALARG_EVALUATE, FALSE) == OK);
|
||||
if (n)
|
||||
clear_tv(&tv);
|
||||
}
|
||||
}
|
||||
if (*var != NUL)
|
||||
if (*arg != NUL)
|
||||
n = FALSE;
|
||||
|
||||
vim_free(tofree);
|
||||
|
||||
@@ -616,6 +616,9 @@ f_tabpagenr(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
{
|
||||
if (STRCMP(arg, "$") == 0)
|
||||
nr = tabpage_index(NULL) - 1;
|
||||
else if (STRCMP(arg, "#") == 0)
|
||||
nr = valid_tabpage(lastused_tabpage) ?
|
||||
tabpage_index(lastused_tabpage) : 0;
|
||||
else
|
||||
semsg(_(e_invexpr2), arg);
|
||||
}
|
||||
|
||||
@@ -572,7 +572,7 @@ EXCMD(CMD_exit, "exit", ex_exit,
|
||||
EX_RANGE|EX_WHOLEFOLD|EX_BANG|EX_FILE1|EX_ARGOPT|EX_DFLALL|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
|
||||
ADDR_LINES),
|
||||
EXCMD(CMD_export, "export", ex_export,
|
||||
EX_EXTRA|EX_NOTRLCOM,
|
||||
EX_EXTRA|EX_NOTRLCOM|EX_CMDWIN|EX_LOCK_OK,
|
||||
ADDR_NONE),
|
||||
EXCMD(CMD_exusage, "exusage", ex_exusage,
|
||||
EX_TRLBAR,
|
||||
@@ -698,7 +698,7 @@ EXCMD(CMD_imenu, "imenu", ex_menu,
|
||||
EX_RANGE|EX_ZEROR|EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN|EX_LOCK_OK,
|
||||
ADDR_OTHER),
|
||||
EXCMD(CMD_import, "import", ex_import,
|
||||
EX_EXTRA|EX_NOTRLCOM,
|
||||
EX_EXTRA|EX_NOTRLCOM|EX_CMDWIN|EX_LOCK_OK,
|
||||
ADDR_NONE),
|
||||
EXCMD(CMD_inoremap, "inoremap", ex_map,
|
||||
EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN|EX_LOCK_OK,
|
||||
@@ -1670,7 +1670,7 @@ EXCMD(CMD_vimgrepadd, "vimgrepadd", ex_vimgrep,
|
||||
EX_RANGE|EX_BANG|EX_NEEDARG|EX_EXTRA|EX_NOTRLCOM|EX_TRLBAR|EX_XFILE,
|
||||
ADDR_OTHER),
|
||||
EXCMD(CMD_vim9script, "vim9script", ex_vim9script,
|
||||
EX_LOCK_OK,
|
||||
EX_CMDWIN|EX_LOCK_OK,
|
||||
ADDR_NONE),
|
||||
EXCMD(CMD_viusage, "viusage", ex_viusage,
|
||||
EX_TRLBAR,
|
||||
|
||||
@@ -2087,7 +2087,7 @@ do_one_cmd(
|
||||
// Do allow ":checktime" (it is postponed).
|
||||
// Do allow ":edit" (check for an argument later).
|
||||
// Do allow ":file" with no arguments (check for an argument later).
|
||||
if (!(ea.argt & EX_CMDWIN)
|
||||
if (!(ea.argt & (EX_CMDWIN | EX_LOCK_OK))
|
||||
&& ea.cmdidx != CMD_checktime
|
||||
&& ea.cmdidx != CMD_edit
|
||||
&& ea.cmdidx != CMD_file
|
||||
@@ -3274,10 +3274,10 @@ find_ex_command(
|
||||
if (lookup != NULL)
|
||||
{
|
||||
// Skip over first char for "&opt = val", "$ENV = val" and "@r = val".
|
||||
char_u *pskip = (*eap->cmd == '&' || *eap->cmd == '$'
|
||||
|| *eap->cmd == '@') ? eap->cmd + 1 : eap->cmd;
|
||||
char_u *pskip = (*eap->cmd == '&' || *eap->cmd == '$')
|
||||
? eap->cmd + 1 : eap->cmd;
|
||||
|
||||
if (vim_strchr((char_u *)"{('[\"", *p) != NULL
|
||||
if (vim_strchr((char_u *)"{('[\"@", *p) != NULL
|
||||
|| ((p = to_name_const_end(pskip)) > eap->cmd && *p != NUL))
|
||||
{
|
||||
int oplen;
|
||||
@@ -3336,6 +3336,8 @@ find_ex_command(
|
||||
// Recognize an assignment if we recognize the variable name:
|
||||
// "g:var = expr"
|
||||
// "var = expr" where "var" is a local var name.
|
||||
if (*eap->cmd == '@')
|
||||
p = eap->cmd + 2;
|
||||
oplen = assignment_len(skipwhite(p), &heredoc);
|
||||
if (oplen > 0)
|
||||
{
|
||||
@@ -5410,6 +5412,15 @@ get_tabpage_arg(exarg_T *eap)
|
||||
{
|
||||
if (STRCMP(p, "$") == 0)
|
||||
tab_number = LAST_TAB_NR;
|
||||
else if (STRCMP(p, "#") == 0)
|
||||
if (valid_tabpage(lastused_tabpage))
|
||||
tab_number = tabpage_index(lastused_tabpage);
|
||||
else
|
||||
{
|
||||
eap->errmsg = ex_errmsg(e_invargval, eap->arg);
|
||||
tab_number = 0;
|
||||
goto theend;
|
||||
}
|
||||
else if (p == p_save || *p_save == '-' || *p != NUL
|
||||
|| tab_number > LAST_TAB_NR)
|
||||
{
|
||||
@@ -7276,6 +7287,10 @@ ex_copymove(exarg_T *eap)
|
||||
{
|
||||
long n;
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
if (not_in_vim9(eap) == FAIL)
|
||||
return;
|
||||
#endif
|
||||
n = get_address(eap, &eap->arg, eap->addr_type, FALSE, FALSE, FALSE, 1);
|
||||
if (eap->arg == NULL) // error detected
|
||||
{
|
||||
@@ -8298,9 +8313,11 @@ find_cmdline_var(char_u *src, int *usedlen)
|
||||
#define SPEC_AMATCH (SPEC_ABUF + 1)
|
||||
"<sflnum>", // script file line number
|
||||
#define SPEC_SFLNUM (SPEC_AMATCH + 1)
|
||||
"<SID>", // script ID: <SNR>123_
|
||||
#define SPEC_SID (SPEC_SFLNUM + 1)
|
||||
#ifdef FEAT_CLIENTSERVER
|
||||
"<client>"
|
||||
# define SPEC_CLIENT (SPEC_SFLNUM + 1)
|
||||
# define SPEC_CLIENT (SPEC_SID + 1)
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -8575,6 +8592,16 @@ eval_vars(
|
||||
(long)(current_sctx.sc_lnum + SOURCING_LNUM));
|
||||
result = strbuf;
|
||||
break;
|
||||
|
||||
case SPEC_SID:
|
||||
if (current_sctx.sc_sid <= 0)
|
||||
{
|
||||
*errormsg = _(e_usingsid);
|
||||
return NULL;
|
||||
}
|
||||
sprintf((char *)strbuf, "<SNR>%d_", current_sctx.sc_sid);
|
||||
result = strbuf;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_CLIENTSERVER
|
||||
|
||||
@@ -447,6 +447,8 @@ flush_buffers(flush_buffers_T flush_typeahead)
|
||||
typebuf.tb_silent = 0;
|
||||
cmd_silent = FALSE;
|
||||
typebuf.tb_no_abbr_cnt = 0;
|
||||
if (++typebuf.tb_change_cnt == 0)
|
||||
typebuf.tb_change_cnt = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -725,10 +725,12 @@ EXTERN frame_T *topframe; // top of the window frame tree
|
||||
|
||||
/*
|
||||
* Tab pages are alternative topframes. "first_tabpage" points to the first
|
||||
* one in the list, "curtab" is the current one.
|
||||
* one in the list, "curtab" is the current one. "lastused_tabpage" is the
|
||||
* last used one.
|
||||
*/
|
||||
EXTERN tabpage_T *first_tabpage;
|
||||
EXTERN tabpage_T *curtab;
|
||||
EXTERN tabpage_T *lastused_tabpage;
|
||||
EXTERN int redraw_tabline INIT(= FALSE); // need to redraw tabline
|
||||
|
||||
/*
|
||||
@@ -1684,6 +1686,7 @@ EXTERN char e_readonlysbx[] INIT(= N_("E794: Cannot set variable in the sandbox:
|
||||
EXTERN char e_stringreq[] INIT(= N_("E928: String required"));
|
||||
EXTERN char e_emptykey[] INIT(= N_("E713: Cannot use empty key for Dictionary"));
|
||||
EXTERN char e_dictreq[] INIT(= N_("E715: Dictionary required"));
|
||||
EXTERN char e_dictnull[] INIT(= N_("E1103: Dictionary not set"));
|
||||
EXTERN char e_listidx[] INIT(= N_("E684: list index out of range: %ld"));
|
||||
EXTERN char e_blobidx[] INIT(= N_("E979: Blob index out of range: %ld"));
|
||||
EXTERN char e_invalblob[] INIT(= N_("E978: Invalid operation for Blob"));
|
||||
@@ -1745,6 +1748,7 @@ EXTERN char e_missing_dict_colon[] INIT(= N_("E720: Missing colon in Dictionary:
|
||||
EXTERN char e_duplicate_key[] INIT(= N_("E721: Duplicate key in Dictionary: \"%s\""));
|
||||
EXTERN char e_missing_dict_comma[] INIT(= N_("E722: Missing comma in Dictionary: %s"));
|
||||
EXTERN char e_missing_dict_end[] INIT(= N_("E723: Missing end of Dictionary '}': %s"));
|
||||
EXTERN char e_already_defined[] INIT(= N_("E1073: name already defined: %s"));
|
||||
#endif
|
||||
#ifdef FEAT_CLIENTSERVER
|
||||
EXTERN char e_invexprmsg[] INIT(= N_("E449: Invalid expression received"));
|
||||
|
||||
24
src/gui.c
24
src/gui.c
@@ -5575,3 +5575,27 @@ gui_handle_drop(
|
||||
entered = FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Check if "key" is to interrupt us. Handles a key that has not had modifiers
|
||||
* applied yet.
|
||||
* Return the key with modifiers applied if so, NUL if not.
|
||||
*/
|
||||
int
|
||||
check_for_interrupt(int key, int modifiers_arg)
|
||||
{
|
||||
int modifiers = modifiers_arg;
|
||||
int c = merge_modifyOtherKeys(key, &modifiers);
|
||||
|
||||
if ((c == Ctrl_C && ctrl_c_interrupts)
|
||||
#ifdef UNIX
|
||||
|| (intr_char != Ctrl_C && c == intr_char)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
got_int = TRUE;
|
||||
return c;
|
||||
}
|
||||
return NUL;
|
||||
}
|
||||
|
||||
|
||||
@@ -1254,11 +1254,16 @@ key_press_event(GtkWidget *widget UNUSED,
|
||||
add_to_input_buf(string2, 3);
|
||||
}
|
||||
|
||||
if (len == 1 && ((string[0] == Ctrl_C && ctrl_c_interrupts)
|
||||
|| (string[0] == intr_char && intr_char != Ctrl_C)))
|
||||
// Check if the key interrupts.
|
||||
{
|
||||
trash_input_buf();
|
||||
got_int = TRUE;
|
||||
int int_ch = check_for_interrupt(key, modifiers);
|
||||
|
||||
if (int_ch != NUL)
|
||||
{
|
||||
trash_input_buf();
|
||||
string[0] = int_ch;
|
||||
len = 1;
|
||||
}
|
||||
}
|
||||
|
||||
add_to_input_buf(string, len);
|
||||
|
||||
@@ -596,11 +596,17 @@ gui_ph_handle_keyboard(PtWidget_t *widget, void *data, PtCallbackInfo_t *info)
|
||||
string[ len++ ] = ch;
|
||||
}
|
||||
|
||||
if (len == 1 && ((ch == Ctrl_C && ctrl_c_interrupts)
|
||||
|| ch == intr_char))
|
||||
// Check if the key interrupts.
|
||||
{
|
||||
trash_input_buf();
|
||||
got_int = TRUE;
|
||||
int int_ch = check_for_interrupt(ch, modifiers);
|
||||
|
||||
if (int_ch != NUL)
|
||||
{
|
||||
ch = int_ch;
|
||||
string[0] = ch;
|
||||
len = 1;
|
||||
trash_input_buf();
|
||||
}
|
||||
}
|
||||
|
||||
if (len == 1 && string[0] == CSI)
|
||||
|
||||
@@ -970,14 +970,16 @@ gui_x11_key_hit_cb(
|
||||
add_to_input_buf(string2, 3);
|
||||
}
|
||||
|
||||
if (len == 1 && ((string[0] == Ctrl_C && ctrl_c_interrupts)
|
||||
#ifdef UNIX
|
||||
|| (intr_char != 0 && string[0] == intr_char)
|
||||
#endif
|
||||
))
|
||||
// Check if the key interrupts.
|
||||
{
|
||||
trash_input_buf();
|
||||
got_int = TRUE;
|
||||
int int_ch = check_for_interrupt(key, modifiers);
|
||||
|
||||
if (int_ch != NUL)
|
||||
{
|
||||
trash_input_buf();
|
||||
string[0] = int_ch;
|
||||
len = 1;
|
||||
}
|
||||
}
|
||||
|
||||
add_to_input_buf(string, len);
|
||||
|
||||
@@ -907,6 +907,47 @@ python3_loaded(void)
|
||||
|
||||
static wchar_t *py_home_buf = NULL;
|
||||
|
||||
#if defined(MSWIN) && (PY_VERSION_HEX >= 0x030500f0)
|
||||
// Python 3.5 or later will abort inside Py_Initialize() when stdin is
|
||||
// redirected. Reconnect stdin to CONIN$.
|
||||
// Note that the python DLL is linked to its own stdio DLL which can be
|
||||
// differ from Vim's stdio.
|
||||
static void
|
||||
reset_stdin(void)
|
||||
{
|
||||
FILE *(*py__acrt_iob_func)(unsigned) = NULL;
|
||||
FILE *(*pyfreopen)(const char *, const char *, FILE *) = NULL;
|
||||
HINSTANCE hinst;
|
||||
|
||||
# ifdef DYNAMIC_PYTHON3
|
||||
hinst = hinstPy3;
|
||||
# else
|
||||
hinst = GetModuleHandle(PYTHON3_DLL);
|
||||
# endif
|
||||
if (hinst == NULL)
|
||||
return;
|
||||
|
||||
// Get "freopen" and "stdin" which are used in the python DLL.
|
||||
// "stdin" is defined as "__acrt_iob_func(0)" in VC++ 2015 or later.
|
||||
py__acrt_iob_func = get_dll_import_func(hinst, "__acrt_iob_func");
|
||||
if (py__acrt_iob_func)
|
||||
{
|
||||
HINSTANCE hpystdiodll = find_imported_module_by_funcname(hinst,
|
||||
"__acrt_iob_func");
|
||||
if (hpystdiodll)
|
||||
pyfreopen = (void*)GetProcAddress(hpystdiodll, "freopen");
|
||||
}
|
||||
|
||||
// Reconnect stdin to CONIN$.
|
||||
if (pyfreopen)
|
||||
pyfreopen("CONIN$", "r", py__acrt_iob_func(0));
|
||||
else
|
||||
freopen("CONIN$", "r", stdin);
|
||||
}
|
||||
#else
|
||||
# define reset_stdin()
|
||||
#endif
|
||||
|
||||
static int
|
||||
Python3_Init(void)
|
||||
{
|
||||
@@ -939,6 +980,7 @@ Python3_Init(void)
|
||||
|
||||
PyImport_AppendInittab("vim", Py3Init_vim);
|
||||
|
||||
reset_stdin();
|
||||
Py_Initialize();
|
||||
|
||||
// Initialise threads, and below save the state using
|
||||
|
||||
@@ -186,7 +186,12 @@ static int putglyph(VTermGlyphInfo *info, VTermPos pos, void *user)
|
||||
cell->chars[i] = 0;
|
||||
|
||||
for(col = 1; col < info->width; col++)
|
||||
getcell(screen, pos.row, pos.col + col)->chars[0] = (uint32_t)-1;
|
||||
{
|
||||
ScreenCell *onecell = getcell(screen, pos.row, pos.col + col);
|
||||
if (onecell == NULL)
|
||||
break;
|
||||
onecell->chars[0] = (uint32_t)-1;
|
||||
}
|
||||
|
||||
rect.start_row = pos.row;
|
||||
rect.end_row = pos.row+1;
|
||||
|
||||
10
src/macros.h
10
src/macros.h
@@ -166,7 +166,15 @@
|
||||
# ifndef MSWIN
|
||||
# define mch_access(n, p) access((n), (p))
|
||||
# endif
|
||||
# define mch_fstat(n, p) fstat((n), (p))
|
||||
|
||||
// Use 64-bit fstat function if available.
|
||||
// NOTE: This condition is the same as for the stat_T type.
|
||||
# if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__)
|
||||
# define mch_fstat(n, p) _fstat64((n), (p))
|
||||
# else
|
||||
# define mch_fstat(n, p) fstat((n), (p))
|
||||
# endif
|
||||
|
||||
# ifdef MSWIN // has its own mch_stat() function
|
||||
# define mch_stat(n, p) vim_stat((n), (p))
|
||||
# else
|
||||
|
||||
13
src/normal.c
13
src/normal.c
@@ -5442,7 +5442,7 @@ nv_gomark(cmdarg_T *cap)
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle CTRL-O, CTRL-I, "g;" and "g," commands.
|
||||
* Handle CTRL-O, CTRL-I, "g;", "g," and "CTRL-Tab" commands.
|
||||
*/
|
||||
static void
|
||||
nv_pcmark(cmdarg_T *cap)
|
||||
@@ -5456,6 +5456,12 @@ nv_pcmark(cmdarg_T *cap)
|
||||
|
||||
if (!checkclearopq(cap->oap))
|
||||
{
|
||||
if (cap->cmdchar == TAB && mod_mask == MOD_MASK_CTRL)
|
||||
{
|
||||
if (goto_tabpage_lastused() == FAIL)
|
||||
clearopbeep(cap->oap);
|
||||
return;
|
||||
}
|
||||
if (cap->cmdchar == 'g')
|
||||
pos = movechangelist((int)cap->count1);
|
||||
else
|
||||
@@ -6310,6 +6316,11 @@ nv_g_cmd(cmdarg_T *cap)
|
||||
goto_tabpage(-(int)cap->count1);
|
||||
break;
|
||||
|
||||
case TAB:
|
||||
if (!checkclearop(oap) && goto_tabpage_lastused() == FAIL)
|
||||
clearopbeep(oap);
|
||||
break;
|
||||
|
||||
case '+':
|
||||
case '-': // "g+" and "g-": undo or redo along the timeline
|
||||
if (!checkclearopq(oap))
|
||||
|
||||
@@ -1311,12 +1311,12 @@ do_set(
|
||||
{
|
||||
if (flags & (P_SECURE | P_NO_ML))
|
||||
{
|
||||
errmsg = _("E520: Not allowed in a modeline");
|
||||
errmsg = N_("E520: Not allowed in a modeline");
|
||||
goto skip;
|
||||
}
|
||||
if ((flags & P_MLE) && !p_mle)
|
||||
{
|
||||
errmsg = _("E992: Not allowed in a modeline when 'modelineexpr' is off");
|
||||
errmsg = N_("E992: Not allowed in a modeline when 'modelineexpr' is off");
|
||||
goto skip;
|
||||
}
|
||||
#ifdef FEAT_DIFF
|
||||
@@ -1338,7 +1338,7 @@ do_set(
|
||||
// Disallow changing some options in the sandbox
|
||||
if (sandbox != 0 && (flags & P_SECURE))
|
||||
{
|
||||
errmsg = _(e_sandbox);
|
||||
errmsg = e_sandbox;
|
||||
goto skip;
|
||||
}
|
||||
#endif
|
||||
@@ -1763,6 +1763,7 @@ do_set(
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
&& !((flags & P_EXPAND)
|
||||
&& vim_isfilec(arg[1])
|
||||
&& !VIM_ISWHITE(arg[1])
|
||||
&& (arg[1] != '\\'
|
||||
|| (s == newval
|
||||
&& arg[2] != '\\')))
|
||||
|
||||
@@ -1130,9 +1130,11 @@ popup_adjust_position(win_T *wp)
|
||||
int org_leftcol = wp->w_leftcol;
|
||||
int org_leftoff = wp->w_popup_leftoff;
|
||||
int minwidth, minheight;
|
||||
int maxheight = Rows;
|
||||
int wantline = wp->w_wantline; // adjusted for textprop
|
||||
int wantcol = wp->w_wantcol; // adjusted for textprop
|
||||
int use_wantcol = wantcol != 0;
|
||||
int adjust_height_for_top_aligned = FALSE;
|
||||
|
||||
wp->w_winrow = 0;
|
||||
wp->w_wincol = 0;
|
||||
@@ -1277,6 +1279,9 @@ popup_adjust_position(win_T *wp)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (wp->w_maxheight > 0)
|
||||
maxheight = wp->w_maxheight;
|
||||
|
||||
// start at the desired first line
|
||||
if (wp->w_firstline > 0)
|
||||
wp->w_topline = wp->w_firstline;
|
||||
@@ -1353,11 +1358,11 @@ popup_adjust_position(win_T *wp)
|
||||
++lnum;
|
||||
|
||||
// do not use the width of lines we're not going to show
|
||||
if (wp->w_maxheight > 0
|
||||
if (maxheight > 0
|
||||
&& (wp->w_firstline >= 0
|
||||
? lnum - wp->w_topline
|
||||
: wp->w_buffer->b_ml.ml_line_count - lnum)
|
||||
+ wrapped >= wp->w_maxheight)
|
||||
+ wrapped >= maxheight)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1449,13 +1454,11 @@ popup_adjust_position(win_T *wp)
|
||||
+ 1 + wrapped;
|
||||
if (minheight > 0 && wp->w_height < minheight)
|
||||
wp->w_height = minheight;
|
||||
if (wp->w_maxheight > 0 && wp->w_height > wp->w_maxheight)
|
||||
wp->w_height = wp->w_maxheight;
|
||||
if (maxheight > 0 && wp->w_height > maxheight)
|
||||
wp->w_height = maxheight;
|
||||
w_height_before_limit = wp->w_height;
|
||||
if (wp->w_height > Rows - wp->w_winrow)
|
||||
wp->w_height = Rows - wp->w_winrow;
|
||||
if (wp->w_height != org_height)
|
||||
win_comp_scroll(wp);
|
||||
|
||||
if (center_vert)
|
||||
{
|
||||
@@ -1477,9 +1480,12 @@ popup_adjust_position(win_T *wp)
|
||||
wp->w_height = wantline - extra_height;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not enough space and more space on the other side: make top
|
||||
// aligned.
|
||||
wp->w_winrow = (wantline < 0 ? 0 : wantline) + 1;
|
||||
adjust_height_for_top_aligned = TRUE;
|
||||
}
|
||||
}
|
||||
else if (wp->w_popup_pos == POPPOS_TOPRIGHT
|
||||
|| wp->w_popup_pos == POPPOS_TOPLEFT)
|
||||
@@ -1499,13 +1505,33 @@ popup_adjust_position(win_T *wp)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wp->w_winrow = wantline - 1;
|
||||
adjust_height_for_top_aligned = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (adjust_height_for_top_aligned && wp->w_want_scrollbar
|
||||
&& wp->w_winrow + wp->w_height + extra_height > Rows)
|
||||
{
|
||||
// Bottom of the popup goes below the last line, reduce the height and
|
||||
// add a scrollbar.
|
||||
wp->w_height = Rows - wp->w_winrow - extra_height;
|
||||
#ifdef FEAT_TERMINAL
|
||||
if (wp->w_buffer->b_term == NULL)
|
||||
#endif
|
||||
wp->w_has_scrollbar = TRUE;
|
||||
}
|
||||
|
||||
// make sure w_winrow is valid
|
||||
if (wp->w_winrow >= Rows)
|
||||
wp->w_winrow = Rows - 1;
|
||||
else if (wp->w_winrow < 0)
|
||||
wp->w_winrow = 0;
|
||||
|
||||
if (wp->w_height != org_height)
|
||||
win_comp_scroll(wp);
|
||||
|
||||
wp->w_popup_last_changedtick = CHANGEDTICK(wp->w_buffer);
|
||||
if (win_valid(wp->w_popup_prop_win))
|
||||
{
|
||||
@@ -3183,7 +3209,14 @@ popup_do_filter(int c)
|
||||
res = invoke_popup_filter(wp, c);
|
||||
|
||||
if (must_redraw > was_must_redraw)
|
||||
{
|
||||
int save_got_int = got_int;
|
||||
|
||||
// Reset got_int to avoid a function used in the statusline aborts.
|
||||
got_int = FALSE;
|
||||
redraw_after_callback(FALSE);
|
||||
got_int |= save_got_int;
|
||||
}
|
||||
recursive = FALSE;
|
||||
KeyTyped = save_KeyTyped;
|
||||
return res;
|
||||
|
||||
@@ -237,6 +237,7 @@ void mbyte_im_set_active(int active_arg);
|
||||
# include "vim9compile.pro"
|
||||
# include "vim9execute.pro"
|
||||
# include "vim9script.pro"
|
||||
# include "vim9type.pro"
|
||||
# endif
|
||||
# include "window.pro"
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ void set_var(char_u *name, typval_T *tv, int copy);
|
||||
void set_var_const(char_u *name, type_T *type, typval_T *tv, int copy, int flags);
|
||||
int var_check_ro(int flags, char_u *name, int use_gettext);
|
||||
int var_check_fixed(int flags, char_u *name, int use_gettext);
|
||||
int var_check_func_name(char_u *name, int new_var);
|
||||
int var_wrong_func_name(char_u *name, int new_var);
|
||||
int var_check_lock(int lock, char_u *name, int use_gettext);
|
||||
int valid_varname(char_u *varname);
|
||||
void reset_v_option_vars(void);
|
||||
|
||||
@@ -65,4 +65,5 @@ void gui_update_screen(void);
|
||||
char_u *get_find_dialog_text(char_u *arg, int *wwordp, int *mcasep);
|
||||
int gui_do_findrepl(int flags, char_u *find_text, char_u *repl_text, int down);
|
||||
void gui_handle_drop(int x, int y, int_u modifiers, char_u **fnames, int count);
|
||||
int check_for_interrupt(int key, int modifiers_arg);
|
||||
/* vim: set ft=c : */
|
||||
|
||||
@@ -5,12 +5,13 @@ int get_function_args(char_u **argp, char_u endchar, garray_T *newargs, garray_T
|
||||
char_u *get_lambda_name(void);
|
||||
char_u *register_cfunc(cfunc_T cb, cfunc_free_T cb_free, void *state);
|
||||
int get_lambda_tv(char_u **arg, typval_T *rettv, evalarg_T *evalarg);
|
||||
void copy_func(char_u *lambda, char_u *global);
|
||||
char_u *deref_func_name(char_u *name, int *lenp, partial_T **partialp, int no_autoload);
|
||||
void emsg_funcname(char *ermsg, char_u *name);
|
||||
int get_func_tv(char_u *name, int len, typval_T *rettv, char_u **arg, evalarg_T *evalarg, funcexe_T *funcexe);
|
||||
char_u *fname_trans_sid(char_u *name, char_u *fname_buf, char_u **tofree, int *error);
|
||||
ufunc_T *find_func_even_dead(char_u *name, int is_global, cctx_T *cctx);
|
||||
ufunc_T *find_func(char_u *name, int is_global, cctx_T *cctx);
|
||||
void copy_func(char_u *lambda, char_u *global);
|
||||
int call_user_func_check(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rettv, funcexe_T *funcexe, dict_T *selfdict);
|
||||
void save_funccal(funccal_entry_T *entry);
|
||||
void restore_funccal(void);
|
||||
|
||||
@@ -1,22 +1,15 @@
|
||||
/* vim9compile.c */
|
||||
int check_defined(char_u *p, size_t len, cctx_T *cctx);
|
||||
void clear_type_list(garray_T *gap);
|
||||
type_T *typval2type(typval_T *tv, garray_T *type_gap);
|
||||
type_T *typval2type_vimvar(typval_T *tv, garray_T *type_gap);
|
||||
int check_typval_type(type_T *expected, typval_T *actual_tv);
|
||||
int check_type(type_T *expected, type_T *actual, int give_msg);
|
||||
int check_compare_types(exptype_T type, typval_T *tv1, typval_T *tv2);
|
||||
char_u *skip_type(char_u *start, int optional);
|
||||
type_T *parse_type(char_u **arg, garray_T *type_gap);
|
||||
char *vartype_name(vartype_T type);
|
||||
char *type_name(type_T *type, char **tofree);
|
||||
int get_script_item_idx(int sid, char_u *name, int check_writable);
|
||||
imported_T *find_imported(char_u *name, size_t len, cctx_T *cctx);
|
||||
imported_T *find_imported_in_script(char_u *name, size_t len, int sid);
|
||||
int vim9_comment_start(char_u *p);
|
||||
char_u *peek_next_line_from_context(cctx_T *cctx);
|
||||
char_u *next_line_from_context(cctx_T *cctx, int skip_comment);
|
||||
char_u *to_name_const_end(char_u *arg);
|
||||
exptype_T get_compare_type(char_u *p, int *len, int *type_is);
|
||||
void error_white_both(char_u *op, int len);
|
||||
int assignment_len(char_u *p, int *heredoc);
|
||||
void vim9_declare_error(char_u *name);
|
||||
int check_vim9_unlet(char_u *name);
|
||||
|
||||
20
src/proto/vim9type.pro
Normal file
20
src/proto/vim9type.pro
Normal file
@@ -0,0 +1,20 @@
|
||||
/* vim9type.c */
|
||||
void clear_type_list(garray_T *gap);
|
||||
type_T *get_list_type(type_T *member_type, garray_T *type_gap);
|
||||
type_T *get_dict_type(type_T *member_type, garray_T *type_gap);
|
||||
type_T *alloc_func_type(type_T *ret_type, int argcount, garray_T *type_gap);
|
||||
type_T *get_func_type(type_T *ret_type, int argcount, garray_T *type_gap);
|
||||
int func_type_add_arg_types(type_T *functype, int argcount, garray_T *type_gap);
|
||||
type_T *typval2type(typval_T *tv, garray_T *type_gap);
|
||||
type_T *typval2type_vimvar(typval_T *tv, garray_T *type_gap);
|
||||
int check_typval_type(type_T *expected, typval_T *actual_tv);
|
||||
void type_mismatch(type_T *expected, type_T *actual);
|
||||
void arg_type_mismatch(type_T *expected, type_T *actual, int argidx);
|
||||
int check_type(type_T *expected, type_T *actual, int give_msg);
|
||||
char_u *skip_type(char_u *start, int optional);
|
||||
type_T *parse_type(char_u **arg, garray_T *type_gap);
|
||||
void common_type(type_T *type1, type_T *type2, type_T **dest, garray_T *type_gap);
|
||||
type_T *get_member_type_from_stack(type_T **stack_top, int count, int skip, garray_T *type_gap);
|
||||
char *vartype_name(vartype_T type);
|
||||
char *type_name(type_T *type, char **tofree);
|
||||
/* vim: set ft=c : */
|
||||
@@ -32,6 +32,7 @@ tabpage_T *find_tabpage(int n);
|
||||
int tabpage_index(tabpage_T *ftp);
|
||||
void goto_tabpage(int n);
|
||||
void goto_tabpage_tp(tabpage_T *tp, int trigger_enter_autocmds, int trigger_leave_autocmds);
|
||||
int goto_tabpage_lastused(void);
|
||||
void goto_tabpage_win(tabpage_T *tp, win_T *wp);
|
||||
void tabpage_move(int nr);
|
||||
void win_goto(win_T *wp);
|
||||
|
||||
@@ -6015,6 +6015,23 @@ vgr_process_args(
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if "buf" had an existing swap file, the current swap file does
|
||||
* not end in ".swp".
|
||||
*/
|
||||
static int
|
||||
existing_swapfile(buf_T *buf)
|
||||
{
|
||||
if (buf->b_ml.ml_mfp != NULL)
|
||||
{
|
||||
char_u *fname = buf->b_ml.ml_mfp->mf_fname;
|
||||
size_t len = STRLEN(fname);
|
||||
|
||||
return fname[len - 1] != 'p' || fname[len - 2] != 'w';
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Search for a pattern in a list of files and populate the quickfix list with
|
||||
* the matches.
|
||||
@@ -6125,7 +6142,8 @@ vgr_process_files(
|
||||
buf = NULL;
|
||||
}
|
||||
else if (buf != *first_match_buf
|
||||
|| (cmd_args->flags & VGR_NOJUMP))
|
||||
|| (cmd_args->flags & VGR_NOJUMP)
|
||||
|| existing_swapfile(buf))
|
||||
{
|
||||
unload_dummy_buffer(buf, dirname_start);
|
||||
// Keeping the buffer, remove the dummy flag.
|
||||
|
||||
@@ -2012,6 +2012,7 @@ script_autoload(
|
||||
char_u *scriptname, *tofree;
|
||||
int ret = FALSE;
|
||||
int i;
|
||||
int ret_sid;
|
||||
|
||||
// If there is no '#' after name[0] there is no package name.
|
||||
p = vim_strchr(name, AUTOLOAD_CHAR);
|
||||
@@ -2039,7 +2040,8 @@ script_autoload(
|
||||
}
|
||||
|
||||
// Try loading the package from $VIMRUNTIME/autoload/<name>.vim
|
||||
if (source_runtime(scriptname, 0) == OK)
|
||||
// Use "ret_sid" to avoid loading the same script again.
|
||||
if (source_in_path(p_rtp, scriptname, 0, &ret_sid) == OK)
|
||||
ret = TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -1928,8 +1928,8 @@ find_rawstring_end(char_u *linep, pos_T *startpos, pos_T *endpos)
|
||||
{
|
||||
if (lnum == endpos->lnum && (colnr_T)(p - line) >= endpos->col)
|
||||
break;
|
||||
if (*p == ')' && p[delim_len + 1] == '"'
|
||||
&& STRNCMP(delim_copy, p + 1, delim_len) == 0)
|
||||
if (*p == ')' && STRNCMP(delim_copy, p + 1, delim_len) == 0
|
||||
&& p[delim_len + 1] == '"')
|
||||
{
|
||||
found = TRUE;
|
||||
break;
|
||||
|
||||
@@ -1594,7 +1594,9 @@ typedef struct
|
||||
int uf_tml_execed; // line being timed was executed
|
||||
# endif
|
||||
sctx_T uf_script_ctx; // SCTX where function was defined,
|
||||
// used for s: variables
|
||||
// used for s: variables; sc_version changed
|
||||
// for :function
|
||||
int uf_script_ctx_version; // original sc_version of SCTX
|
||||
int uf_refcount; // reference count, see func_name_refcount()
|
||||
|
||||
funccall_T *uf_scoped; // l: local variables for closure
|
||||
|
||||
@@ -1763,6 +1763,7 @@ get_term_entries(int *height, int *width)
|
||||
report_term_error(char *error_msg, char_u *term)
|
||||
{
|
||||
struct builtin_term *termp;
|
||||
int i;
|
||||
|
||||
mch_errmsg("\r\n");
|
||||
if (error_msg != NULL)
|
||||
@@ -1787,6 +1788,10 @@ report_term_error(char *error_msg, char_u *term)
|
||||
mch_errmsg("\r\n");
|
||||
}
|
||||
}
|
||||
// Output extra 'cmdheight' line breaks to avoid that the following error
|
||||
// message overwrites the last terminal name.
|
||||
for (i = 1; i < p_ch; ++i)
|
||||
mch_errmsg("\r\n");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -20,7 +20,7 @@ SCRIPTS_MORE1 =
|
||||
SCRIPTS_MORE2 = test49.out
|
||||
|
||||
# Tests that run on most systems, but not on VMS
|
||||
SCRIPTS_MORE4 = test59.out
|
||||
SCRIPTS_MORE4 =
|
||||
|
||||
# Tests specifically for MS-Windows.
|
||||
SCRIPTS_WIN32 =
|
||||
@@ -242,6 +242,7 @@ NEW_TESTS = \
|
||||
test_source \
|
||||
test_source_utf8 \
|
||||
test_spell \
|
||||
test_spell_utf8 \
|
||||
test_spellfile \
|
||||
test_startup \
|
||||
test_startup_utf8 \
|
||||
@@ -464,6 +465,7 @@ NEW_TESTS_RES = \
|
||||
test_sound.res \
|
||||
test_source.res \
|
||||
test_spell.res \
|
||||
test_spell_utf8.res \
|
||||
test_spellfile.res \
|
||||
test_startup.res \
|
||||
test_stat.res \
|
||||
|
||||
@@ -32,22 +32,6 @@
|
||||
# and directory handling.
|
||||
# WANT_UNIX = YES
|
||||
|
||||
# Comment out if you want to run Win32 specific tests as well, but please
|
||||
# be aware, that on OpenVMS will fail, because of cat, rm, etc commands
|
||||
# and directory handling.
|
||||
# WANT_WIN = YES
|
||||
|
||||
# Comment out if you want to run spell checker tests.
|
||||
# They fail because VMS does not support file names.
|
||||
# WANT_SPELL = YES
|
||||
|
||||
# Comment out if you want to run mzschema tests.
|
||||
# It fails because VMS does not support this feature yet.
|
||||
# WANT_MZSCH = YES
|
||||
|
||||
# Comment out if you have ODS-5 file system
|
||||
# HAVE_ODS5 = YES
|
||||
|
||||
# Comment out if you have gzip on your system
|
||||
# HAVE_GZIP = YES
|
||||
|
||||
@@ -75,12 +59,6 @@ VIMPROG = <->vim.exe
|
||||
|
||||
SCRIPT = test1.out test49.out test77a.out
|
||||
|
||||
# Known problems:
|
||||
#
|
||||
# test59: Failed/Hangs - VMS does not support spell files (file names
|
||||
# with too many dots).
|
||||
#
|
||||
|
||||
.IFDEF WANT_GUI
|
||||
GUI_OPTION = -g
|
||||
.ENDIF
|
||||
@@ -89,10 +67,6 @@ GUI_OPTION = -g
|
||||
SCRIPT_UNIX = test49.out
|
||||
.ENDIF
|
||||
|
||||
.IFDEF WANT_SPELL
|
||||
SCRIPT_SPELL = test59.out
|
||||
.ENDIF
|
||||
|
||||
.in.out :
|
||||
-@ !clean up before doing the test
|
||||
-@ if "''F$SEARCH("test.out.*")'" .NES. "" then delete/noconfirm/nolog test.out.*
|
||||
@@ -113,8 +87,7 @@ SCRIPT_SPELL = test59.out
|
||||
-@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.*
|
||||
-@ if "''F$SEARCH("Xtest.*")'" .NES. "" then delete/noconfirm/nolog Xtest.*.*
|
||||
|
||||
all : clean nolog $(START_WITH) $(SCRIPT) $(SCRIPT_UNIX) $(SCRIPT_SPELL) \
|
||||
nolog
|
||||
all : clean nolog $(START_WITH) $(SCRIPT) $(SCRIPT_UNIX) nolog
|
||||
-@ write sys$output " "
|
||||
-@ write sys$output "-----------------------------------------------"
|
||||
-@ write sys$output " All done"
|
||||
@@ -139,10 +112,6 @@ nolog :
|
||||
-@ write sys$output "MAKE_VMS.MMS options:"
|
||||
-@ write sys$output " WANT_GUI = ""$(WANT_GUI)"" "
|
||||
-@ write sys$output " WANT_UNIX = ""$(WANT_UNIX)"" "
|
||||
-@ write sys$output " WANT_WIN = ""$(WANT_WIN)"" "
|
||||
-@ write sys$output " WANT_SPELL = ""$(WANT_SPELL)"" "
|
||||
-@ write sys$output " WANT_MZSCH = ""$(WANT_MZSCH)"" "
|
||||
-@ write sys$output " HAVE_ODS5 = ""$(HAVE_ODS5)"" "
|
||||
-@ write sys$output " HAVE_GZIP = ""$(HAVE_GZIP)"" "
|
||||
-@ write sys$output " HAVE_GDIFF = ""$(HAVE_GDIFF)"" "
|
||||
-@ write sys$output " HAVE_ICONV = ""$(HAVE_ICONV)"" "
|
||||
|
||||
7
src/testdir/dumps/Test_display_visual_block_scroll.dump
Normal file
7
src/testdir/dumps/Test_display_visual_block_scroll.dump
Normal file
@@ -0,0 +1,7 @@
|
||||
|{+0&#e0e0e08| | +0&#ffffff0@72
|
||||
|}+0&#e0e0e08| | +0&#ffffff0@72
|
||||
|{+0&#e0e0e08| | +0&#ffffff0@72
|
||||
|f+0&#e0e0e08| | +0&#ffffff0@72
|
||||
>g| +0&#e0e0e08| +0&#ffffff0@72
|
||||
|}| @73
|
||||
|-+2&&@1| |V|I|S|U|A|L| |L|I|N|E| |-@1| +0&&@29|7| @8|1@1|,|1| @9|B|o|t|
|
||||
10
src/testdir/dumps/Test_popupwin_ctrl_c.dump
Normal file
10
src/testdir/dumps/Test_popupwin_ctrl_c.dump
Normal file
@@ -0,0 +1,10 @@
|
||||
> +0&#ffffff0@36||+1&&| +0&&@36
|
||||
|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||
|~| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||
|~| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||
|~| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||
|~| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||
|~| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||
|~| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||
|[+3#0000000&|N|o| |N|a|m|e|]| @9|0|,|0|-|1| @9|A|l@1| |[+1&&|N|o| |N|a|m|e|]| @9|0|,|0|-|1| @9|A|l@1
|
||||
| +0&&@74
|
||||
@@ -3,10 +3,10 @@
|
||||
|-|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|b@2|║|-+0#0000000#ffffff0@15|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@11| @14
|
||||
|-|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@1|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|c@2|║|-+0#0000000#ffffff0@15|║+0#0000001#ffd7ff255|t|e@1|║|-+0#0000000#ffffff0@11| @14
|
||||
|-|@|-@5|#|-@5|%|-@5|║+0#0000001#ffd7ff255|d@2|║|-+0#0000000#ffffff0@15|║+0#0000001#ffd7ff255|f|o|u|║|-+0#0000000#ffffff0@1>*|-@8| @14
|
||||
|-@14|╔+0#0000001#ffd7ff255|═@2|╗|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|e@2|║|-+0#0000000#ffffff0@15|║+0#0000001#ffd7ff255|f|i|v|║|-+0#0000000#ffffff0@1|╔+0#0000001#ffd7ff255|═@2|╗|-+0#0000000#ffffff0@4| @14
|
||||
|-@14|║+0#0000001#ffd7ff255|o|n|e|║|-+0#0000000#ffffff0@1|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@15|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|a@2|║|-+0#0000000#ffffff0@4| @14
|
||||
|-@14|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@1|*|-@5|@|-@5|#|-@5|%|-@5|║+0#0000001#ffd7ff255|b@2|║|-+0#0000000#ffffff0@4| @14
|
||||
|-@14|║+0#0000001#ffd7ff255|t|e@1|║|-+0#0000000#ffffff0@8|╔+0#0000001#ffd7ff255|═@2|╗|-+0#0000000#ffffff0@1|╔+0#0000001#ffd7ff255|═@2|╗|-+0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|c@2|║|-+0#0000000#ffffff0@4| @14
|
||||
|-@14|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|o|n|e|║|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|o|n|e|║|-+0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|d@2|║|-+0#0000000#ffffff0@4| @14
|
||||
|-@28|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|e@2|║|-+0#0000000#ffffff0@4| @14
|
||||
@29|╚+0#0000001#ffd7ff255|═@2|╝| +0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|t|e@1|║| +0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|f@2|║| +0#0000000#ffffff0@1|5|,|5|1| @9|T|o|p|
|
||||
|-@14|╔+0#0000001#ffd7ff255|═@2|╗|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|e@2|║|-+0#0000000#ffffff0@15|║+0#0000001#ffd7ff255|f|i|v|║|-+0#0000000#ffffff0@1|╔+0#0000001#ffd7ff255|═@3|╗|-+0#0000000#ffffff0@3| @14
|
||||
|-@14|║+0#0000001#ffd7ff255|o|n|e|║|-+0#0000000#ffffff0@1|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@15|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|a@2| +0#0000000#0000001|║+0#0000001#ffd7ff255|-+0#0000000#ffffff0@3| @14
|
||||
|-@14|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@1|*|-@5|@|-@5|#|-@5|%|-@5|║+0#0000001#ffd7ff255|b@2| +0#0000000#0000001|║+0#0000001#ffd7ff255|-+0#0000000#ffffff0@3| @14
|
||||
|-@14|║+0#0000001#ffd7ff255|t|e@1|║|-+0#0000000#ffffff0@8|╔+0#0000001#ffd7ff255|═@2|╗|-+0#0000000#ffffff0@1|╔+0#0000001#ffd7ff255|═@3|╗|-+0#0000000#ffffff0@7|║+0#0000001#ffd7ff255|c@2| +0#0000000#0000001|║+0#0000001#ffd7ff255|-+0#0000000#ffffff0@3| @14
|
||||
|-@14|╚+0#0000001#ffd7ff255|═@2|╝|-+0#0000000#ffffff0@8|║+0#0000001#ffd7ff255|o|n|e|║|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|o|n|e| +0#0000000#0000001|║+0#0000001#ffd7ff255|-+0#0000000#ffffff0@7|║+0#0000001#ffd7ff255|d@2| +0#0000000#0000001|║+0#0000001#ffd7ff255|-+0#0000000#ffffff0@3| @14
|
||||
|-@28|║+0#0000001#ffd7ff255|t|w|o|║|-+0#0000000#ffffff0@1|║+0#0000001#ffd7ff255|t|w|o| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255|-+0#0000000#ffffff0@7|║+0#0000001#ffd7ff255|e@2| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255|-+0#0000000#ffffff0@3| @14
|
||||
@29|╚+0#0000001#ffd7ff255|═@2|╝| +0#0000000#ffffff0@1|╚+0#0000001#ffd7ff255|═@3|╝| +0#0000000#ffffff0@7|╚+0#0000001#ffd7ff255|═@3|╝| +0#0000000#ffffff0|5|,|5|1| @9|T|o|p|
|
||||
|
||||
10
src/testdir/dumps/Test_popupwin_toohigh_1.dump
Normal file
10
src/testdir/dumps/Test_popupwin_toohigh_1.dump
Normal file
@@ -0,0 +1,10 @@
|
||||
|1+0&#ffffff0@9| @64
|
||||
|2@9| @64
|
||||
|3@8>3| @64
|
||||
|4@8|╔+0#0000001#ffd7ff255|═@8|╗| +0#0000000#ffffff0@54
|
||||
|5@8|║+0#0000001#ffd7ff255|o|n|e| @4| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|6@8|║+0#0000001#ffd7ff255|t|w|o| @4| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|7@8|║+0#0000001#ffd7ff255|t|h|r|e@1| @2| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|8@8|║+0#0000001#ffd7ff255|f|o|u|r| @3| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|9@8|║+0#0000001#ffd7ff255|f|i|v|e| @3| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
@9|╚+0#0000001#ffd7ff255|═@8|╝| +0#0000000#ffffff0@36|3|,|1|0| @9|T|o|p|
|
||||
10
src/testdir/dumps/Test_popupwin_toohigh_2.dump
Normal file
10
src/testdir/dumps/Test_popupwin_toohigh_2.dump
Normal file
@@ -0,0 +1,10 @@
|
||||
|1+0&#ffffff0@8|╔+0#0000001#ffd7ff255|═@8|╗| +0#0000000#ffffff0@54
|
||||
|2@8|║+0#0000001#ffd7ff255|o|n|e| @4| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|3@8|║+0#0000001#ffd7ff255|t|w|o| @4| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|4@8|║+0#0000001#ffd7ff255|t|h|r|e@1| @2| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|5@8|║+0#0000001#ffd7ff255|f|o|u|r| @3| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|6@8|║+0#0000001#ffd7ff255|f|i|v|e| @3| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|7@8|╚+0#0000001#ffd7ff255|═@8|╝| +0#0000000#ffffff0@54
|
||||
|8@8>8| @64
|
||||
|9@9| @64
|
||||
|:|c|a|l@1| |S|h|o|w|P|o|p|u|p|(|)| @39|8|,|1|0| @9|T|o|p|
|
||||
10
src/testdir/dumps/Test_popupwin_toohigh_3.dump
Normal file
10
src/testdir/dumps/Test_popupwin_toohigh_3.dump
Normal file
@@ -0,0 +1,10 @@
|
||||
|1+0&#ffffff0@8>1| @64
|
||||
|2@8|╔+0#0000001#ffd7ff255|═@8|╗| +0#0000000#ffffff0@54
|
||||
|3@8|║+0#0000001#ffd7ff255|o|n|e| @4| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|4@8|║+0#0000001#ffd7ff255|t|w|o| @4| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|5@8|║+0#0000001#ffd7ff255|t|h|r|e@1| @2| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|6@8|║+0#0000001#ffd7ff255|f|o|u|r| @3| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|7@8|║+0#0000001#ffd7ff255|f|i|v|e| @3| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|8@8|║+0#0000001#ffd7ff255|s|i|x| @4| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|9@8|║+0#0000001#ffd7ff255|s|e|v|e|n| @2| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@54
|
||||
|:|c|a|l@1| |S|h|o|╚+0#0000001#ffd7ff255|═@8|╝| +0#0000000#ffffff0@36|1|,|1|0| @9|T|o|p|
|
||||
@@ -91,6 +91,9 @@ set encoding=utf-8
|
||||
let s:test_script_fname = expand('%')
|
||||
au! SwapExists * call HandleSwapExists()
|
||||
func HandleSwapExists()
|
||||
if exists('g:ignoreSwapExists')
|
||||
return
|
||||
endif
|
||||
" Ignore finding a swap file for the test script (the user might be
|
||||
" editing it and do ":make test_name") and the output file.
|
||||
" Report finding another swap file and chose 'q' to avoid getting stuck.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
let g:loaded_sourced_vim += 1
|
||||
func! sourced#something()
|
||||
func sourced#something()
|
||||
endfunc
|
||||
call sourced#something()
|
||||
|
||||
69
src/testdir/script_util.vim
Normal file
69
src/testdir/script_util.vim
Normal file
@@ -0,0 +1,69 @@
|
||||
" Functions shared by the tests for Vim Script
|
||||
|
||||
" Commands to track the execution path of a script
|
||||
com! XpathINIT let g:Xpath = ''
|
||||
com! -nargs=1 -bar Xpath let g:Xpath ..= <args>
|
||||
com! XloopINIT let g:Xloop = 1
|
||||
com! -nargs=1 -bar Xloop let g:Xpath ..= <args> .. g:Xloop
|
||||
com! XloopNEXT let g:Xloop += 1
|
||||
|
||||
" MakeScript() - Make a script file from a function. {{{2
|
||||
"
|
||||
" Create a script that consists of the body of the function a:funcname.
|
||||
" Replace any ":return" by a ":finish", any argument variable by a global
|
||||
" variable, and every ":call" by a ":source" for the next following argument
|
||||
" in the variable argument list. This function is useful if similar tests are
|
||||
" to be made for a ":return" from a function call or a ":finish" in a script
|
||||
" file.
|
||||
func MakeScript(funcname, ...)
|
||||
let script = tempname()
|
||||
execute "redir! >" . script
|
||||
execute "function" a:funcname
|
||||
redir END
|
||||
execute "edit" script
|
||||
" Delete the "function" and the "endfunction" lines. Do not include the
|
||||
" word "function" in the pattern since it might be translated if LANG is
|
||||
" set. When MakeScript() is being debugged, this deletes also the debugging
|
||||
" output of its line 3 and 4.
|
||||
exec '1,/.*' . a:funcname . '(.*)/d'
|
||||
/^\d*\s*endfunction\>/,$d
|
||||
%s/^\d*//e
|
||||
%s/return/finish/e
|
||||
%s/\<a:\(\h\w*\)/g:\1/ge
|
||||
normal gg0
|
||||
let cnt = 0
|
||||
while search('\<call\s*\%(\u\|s:\)\w*\s*(.*)', 'W') > 0
|
||||
let cnt = cnt + 1
|
||||
s/\<call\s*\%(\u\|s:\)\w*\s*(.*)/\='source ' . a:{cnt}/
|
||||
endwhile
|
||||
g/^\s*$/d
|
||||
write
|
||||
bwipeout
|
||||
return script
|
||||
endfunc
|
||||
|
||||
" ExecAsScript - Source a temporary script made from a function. {{{2
|
||||
"
|
||||
" Make a temporary script file from the function a:funcname, ":source" it, and
|
||||
" delete it afterwards. However, if an exception is thrown the file may remain,
|
||||
" the caller should call DeleteTheScript() afterwards.
|
||||
let s:script_name = ''
|
||||
function! ExecAsScript(funcname)
|
||||
" Make a script from the function passed as argument.
|
||||
let s:script_name = MakeScript(a:funcname)
|
||||
|
||||
" Source and delete the script.
|
||||
exec "source" s:script_name
|
||||
call delete(s:script_name)
|
||||
let s:script_name = ''
|
||||
endfunction
|
||||
|
||||
function! DeleteTheScript()
|
||||
if s:script_name
|
||||
call delete(s:script_name)
|
||||
let s:script_name = ''
|
||||
endif
|
||||
endfunc
|
||||
|
||||
com! -nargs=1 -bar ExecAsScript call ExecAsScript(<f-args>)
|
||||
|
||||
@@ -1,48 +1,4 @@
|
||||
Results of test49.vim:
|
||||
*** Test 18: OK (67224583)
|
||||
*** Test 19: OK (69275973)
|
||||
*** Test 20: OK (1874575085)
|
||||
*** Test 21: OK (147932225)
|
||||
*** Test 22: OK (4161)
|
||||
*** Test 23: OK (49)
|
||||
*** Test 24: OK (41)
|
||||
*** Test 27: OK (1996459)
|
||||
*** Test 28: OK (1996459)
|
||||
*** Test 29: OK (170428555)
|
||||
*** Test 30: OK (190905173)
|
||||
*** Test 31: OK (190905173)
|
||||
*** Test 34: OK (2146584868)
|
||||
*** Test 35: OK (2146584868)
|
||||
*** Test 36: OK (1071644672)
|
||||
*** Test 37: OK (1071644672)
|
||||
*** Test 38: OK (357908480)
|
||||
*** Test 39: OK (357908480)
|
||||
*** Test 40: OK (357908480)
|
||||
*** Test 49: OK (179000669)
|
||||
*** Test 50: OK (363550045)
|
||||
*** Test 52: OK (1247112011)
|
||||
*** Test 53: OK (131071)
|
||||
*** Test 54: OK (2047)
|
||||
*** Test 55: OK (1023)
|
||||
*** Test 56: OK (511)
|
||||
*** Test 57: OK (2147450880)
|
||||
*** Test 58: OK (624945)
|
||||
*** Test 59: OK (2038431743)
|
||||
*** Test 60: OK (311511339)
|
||||
*** Test 61: OK (374889517)
|
||||
*** Test 62: OK (286331153)
|
||||
*** Test 63: OK (236978127)
|
||||
*** Test 64: OK (1499645335)
|
||||
*** Test 65: OK (70187)
|
||||
*** Test 66: OK (5464)
|
||||
*** Test 67: OK (212514423)
|
||||
*** Test 68: OK (212514423)
|
||||
*** Test 76: OK (1610087935)
|
||||
*** Test 77: OK (1388671)
|
||||
*** Test 78: OK (134217728)
|
||||
*** Test 79: OK (70288929)
|
||||
*** Test 80: OK (17895765)
|
||||
*** Test 81: OK (387)
|
||||
*** Test 82: OK (8454401)
|
||||
*** Test 83: OK (2835)
|
||||
*** Test 84: OK (934782101)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,626 +0,0 @@
|
||||
Tests for spell checking with 'encoding' set to "utf-8". vim: set ft=vim :
|
||||
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
:so mbyte.vim
|
||||
:"
|
||||
:" Don't want to depend on the locale from the environment. The .aff and .dic
|
||||
:" text is in latin1, the test text is utf-8.
|
||||
:set enc=latin1
|
||||
:e!
|
||||
:set enc=utf-8
|
||||
:set fenc=
|
||||
:"
|
||||
:" Function to test .aff/.dic with list of good and bad words.
|
||||
:func TestOne(aff, dic)
|
||||
set spellfile=
|
||||
$put =''
|
||||
$put ='test '. a:aff . '-' . a:dic
|
||||
" Generate a .spl file from a .dic and .aff file.
|
||||
exe '1;/^' . a:aff . 'affstart/+1,/^' . a:aff . 'affend/-1w! Xtest.aff'
|
||||
exe '1;/^' . a:dic . 'dicstart/+1,/^' . a:dic . 'dicend/-1w! Xtest.dic'
|
||||
mkspell! Xtest Xtest
|
||||
" use that spell file
|
||||
set spl=Xtest.utf-8.spl spell
|
||||
" list all valid words
|
||||
spelldump
|
||||
%yank
|
||||
quit
|
||||
$put
|
||||
$put ='-------'
|
||||
" find all bad words and suggestions for them
|
||||
exe '1;/^' . a:aff . 'good:'
|
||||
normal 0f:]s
|
||||
let prevbad = ''
|
||||
while 1
|
||||
let [bad, a] = spellbadword()
|
||||
if bad == '' || bad == prevbad || bad == 'badend'
|
||||
break
|
||||
endif
|
||||
let prevbad = bad
|
||||
let lst = spellsuggest(bad, 3)
|
||||
normal mm
|
||||
$put =bad
|
||||
$put =string(lst)
|
||||
normal `m]s
|
||||
endwhile
|
||||
endfunc
|
||||
:"
|
||||
:call TestOne('1', '1')
|
||||
:$put =soundfold('goobledygoook')
|
||||
:$put =soundfold('kóopërÿnôven')
|
||||
:$put =soundfold('oeverloos gezwets edale')
|
||||
:"
|
||||
:"
|
||||
:" and now with SAL instead of SOFO items; test automatic reloading
|
||||
gg:/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff
|
||||
:mkspell! Xtest Xtest
|
||||
:$put =soundfold('goobledygoook')
|
||||
:$put =soundfold('kóopërÿnôven')
|
||||
:$put =soundfold('oeverloos gezwets edale')
|
||||
:"
|
||||
:" also use an addition file
|
||||
gg:/^addstart/+1,/^addend/-1w! Xtest.utf-8.add
|
||||
:mkspell! Xtest.utf-8.add.spl Xtest.utf-8.add
|
||||
:set spellfile=Xtest.utf-8.add
|
||||
/^test2:
|
||||
]s:let [str, a] = spellbadword()
|
||||
:$put =str
|
||||
:set spl=Xtest_us.utf-8.spl
|
||||
/^test2:
|
||||
]smm:let [str, a] = spellbadword()
|
||||
:$put =str
|
||||
`m]s:let [str, a] = spellbadword()
|
||||
:$put =str
|
||||
:set spl=Xtest_gb.utf-8.spl
|
||||
/^test2:
|
||||
]smm:let [str, a] = spellbadword()
|
||||
:$put =str
|
||||
`m]s:let [str, a] = spellbadword()
|
||||
:$put =str
|
||||
:set spl=Xtest_nz.utf-8.spl
|
||||
/^test2:
|
||||
]smm:let [str, a] = spellbadword()
|
||||
:$put =str
|
||||
`m]s:let [str, a] = spellbadword()
|
||||
:$put =str
|
||||
:set spl=Xtest_ca.utf-8.spl
|
||||
/^test2:
|
||||
]smm:let [str, a] = spellbadword()
|
||||
:$put =str
|
||||
`m]s:let [str, a] = spellbadword()
|
||||
:$put =str
|
||||
:unlet str a
|
||||
:"
|
||||
:" Postponed prefixes
|
||||
:call TestOne('2', '1')
|
||||
:"
|
||||
:" Compound words
|
||||
:call TestOne('3', '3')
|
||||
:call TestOne('4', '4')
|
||||
:call TestOne('5', '5')
|
||||
:call TestOne('6', '6')
|
||||
:call TestOne('7', '7')
|
||||
:"
|
||||
:" clean up for valgrind
|
||||
:delfunc TestOne
|
||||
:set spl= enc=latin1
|
||||
:"
|
||||
gg:/^test output:/,$wq! test.out
|
||||
ENDTEST
|
||||
|
||||
1affstart
|
||||
SET ISO8859-1
|
||||
TRY esianrtolcdugmphbyfvkwjkqxz-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'ESIANRTOLCDUGMPHBYFVKWJKQXZ
|
||||
|
||||
FOL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
LOW <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UPP <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<59><5A><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep?
|
||||
|
||||
MIDWORD '-
|
||||
|
||||
KEP =
|
||||
RAR ?
|
||||
BAD !
|
||||
|
||||
#NOSPLITSUGS
|
||||
|
||||
PFX I N 1
|
||||
PFX I 0 in .
|
||||
|
||||
PFX O Y 1
|
||||
PFX O 0 out .
|
||||
|
||||
SFX S Y 2
|
||||
SFX S 0 s [^s]
|
||||
SFX S 0 es s
|
||||
|
||||
SFX N N 3
|
||||
SFX N 0 en [^n]
|
||||
SFX N 0 nen n
|
||||
SFX N 0 n .
|
||||
|
||||
REP 3
|
||||
REP g ch
|
||||
REP ch g
|
||||
REP svp s.v.p.
|
||||
|
||||
MAP 9
|
||||
MAP a<><61><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
MAP e<><65><EFBFBD><EFBFBD>
|
||||
MAP i<><69><EFBFBD><EFBFBD>
|
||||
MAP o<><6F><EFBFBD><EFBFBD><EFBFBD>
|
||||
MAP u<><75><EFBFBD><EFBFBD>
|
||||
MAP n<>
|
||||
MAP c<>
|
||||
MAP y<><79>
|
||||
MAP s<>
|
||||
1affend
|
||||
|
||||
affstart_sal
|
||||
SET ISO8859-1
|
||||
TRY esianrtolcdugmphbyfvkwjkqxz-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'ESIANRTOLCDUGMPHBYFVKWJKQXZ
|
||||
|
||||
FOL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
LOW <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UPP <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
MIDWORD '-
|
||||
|
||||
KEP =
|
||||
RAR ?
|
||||
BAD !
|
||||
|
||||
#NOSPLITSUGS
|
||||
|
||||
PFX I N 1
|
||||
PFX I 0 in .
|
||||
|
||||
PFX O Y 1
|
||||
PFX O 0 out .
|
||||
|
||||
SFX S Y 2
|
||||
SFX S 0 s [^s]
|
||||
SFX S 0 es s
|
||||
|
||||
SFX N N 3
|
||||
SFX N 0 en [^n]
|
||||
SFX N 0 nen n
|
||||
SFX N 0 n .
|
||||
|
||||
REP 3
|
||||
REP g ch
|
||||
REP ch g
|
||||
REP svp s.v.p.
|
||||
|
||||
MAP 9
|
||||
MAP a<><61><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
MAP e<><65><EFBFBD><EFBFBD>
|
||||
MAP i<><69><EFBFBD><EFBFBD>
|
||||
MAP o<><6F><EFBFBD><EFBFBD><EFBFBD>
|
||||
MAP u<><75><EFBFBD><EFBFBD>
|
||||
MAP n<>
|
||||
MAP c<>
|
||||
MAP y<><79>
|
||||
MAP s<>
|
||||
|
||||
SAL AH(AEIOUY)-^ *H
|
||||
SAL AR(AEIOUY)-^ *R
|
||||
SAL A(HR)^ *
|
||||
SAL A^ *
|
||||
SAL AH(AEIOUY)- H
|
||||
SAL AR(AEIOUY)- R
|
||||
SAL A(HR) _
|
||||
SAL <20>^ *
|
||||
SAL <20>^ *
|
||||
SAL BB- _
|
||||
SAL B B
|
||||
SAL CQ- _
|
||||
SAL CIA X
|
||||
SAL CH X
|
||||
SAL C(EIY)- S
|
||||
SAL CK K
|
||||
SAL COUGH^ KF
|
||||
SAL CC< C
|
||||
SAL C K
|
||||
SAL DG(EIY) K
|
||||
SAL DD- _
|
||||
SAL D T
|
||||
SAL <20>< E
|
||||
SAL EH(AEIOUY)-^ *H
|
||||
SAL ER(AEIOUY)-^ *R
|
||||
SAL E(HR)^ *
|
||||
SAL ENOUGH^$ *NF
|
||||
SAL E^ *
|
||||
SAL EH(AEIOUY)- H
|
||||
SAL ER(AEIOUY)- R
|
||||
SAL E(HR) _
|
||||
SAL FF- _
|
||||
SAL F F
|
||||
SAL GN^ N
|
||||
SAL GN$ N
|
||||
SAL GNS$ NS
|
||||
SAL GNED$ N
|
||||
SAL GH(AEIOUY)- K
|
||||
SAL GH _
|
||||
SAL GG9 K
|
||||
SAL G K
|
||||
SAL H H
|
||||
SAL IH(AEIOUY)-^ *H
|
||||
SAL IR(AEIOUY)-^ *R
|
||||
SAL I(HR)^ *
|
||||
SAL I^ *
|
||||
SAL ING6 N
|
||||
SAL IH(AEIOUY)- H
|
||||
SAL IR(AEIOUY)- R
|
||||
SAL I(HR) _
|
||||
SAL J K
|
||||
SAL KN^ N
|
||||
SAL KK- _
|
||||
SAL K K
|
||||
SAL LAUGH^ LF
|
||||
SAL LL- _
|
||||
SAL L L
|
||||
SAL MB$ M
|
||||
SAL MM M
|
||||
SAL M M
|
||||
SAL NN- _
|
||||
SAL N N
|
||||
SAL OH(AEIOUY)-^ *H
|
||||
SAL OR(AEIOUY)-^ *R
|
||||
SAL O(HR)^ *
|
||||
SAL O^ *
|
||||
SAL OH(AEIOUY)- H
|
||||
SAL OR(AEIOUY)- R
|
||||
SAL O(HR) _
|
||||
SAL PH F
|
||||
SAL PN^ N
|
||||
SAL PP- _
|
||||
SAL P P
|
||||
SAL Q K
|
||||
SAL RH^ R
|
||||
SAL ROUGH^ RF
|
||||
SAL RR- _
|
||||
SAL R R
|
||||
SAL SCH(EOU)- SK
|
||||
SAL SC(IEY)- S
|
||||
SAL SH X
|
||||
SAL SI(AO)- X
|
||||
SAL SS- _
|
||||
SAL S S
|
||||
SAL TI(AO)- X
|
||||
SAL TH @
|
||||
SAL TCH-- _
|
||||
SAL TOUGH^ TF
|
||||
SAL TT- _
|
||||
SAL T T
|
||||
SAL UH(AEIOUY)-^ *H
|
||||
SAL UR(AEIOUY)-^ *R
|
||||
SAL U(HR)^ *
|
||||
SAL U^ *
|
||||
SAL UH(AEIOUY)- H
|
||||
SAL UR(AEIOUY)- R
|
||||
SAL U(HR) _
|
||||
SAL V^ W
|
||||
SAL V F
|
||||
SAL WR^ R
|
||||
SAL WH^ W
|
||||
SAL W(AEIOU)- W
|
||||
SAL X^ S
|
||||
SAL X KS
|
||||
SAL Y(AEIOU)- Y
|
||||
SAL ZZ- _
|
||||
SAL Z S
|
||||
affend_sal
|
||||
|
||||
2affstart
|
||||
SET ISO8859-1
|
||||
|
||||
FOL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
LOW <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UPP <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
PFXPOSTPONE
|
||||
|
||||
MIDWORD '-
|
||||
|
||||
KEP =
|
||||
RAR ?
|
||||
BAD !
|
||||
|
||||
#NOSPLITSUGS
|
||||
|
||||
PFX I N 1
|
||||
PFX I 0 in .
|
||||
|
||||
PFX O Y 1
|
||||
PFX O 0 out [a-z]
|
||||
|
||||
SFX S Y 2
|
||||
SFX S 0 s [^s]
|
||||
SFX S 0 es s
|
||||
|
||||
SFX N N 3
|
||||
SFX N 0 en [^n]
|
||||
SFX N 0 nen n
|
||||
SFX N 0 n .
|
||||
|
||||
REP 3
|
||||
REP g ch
|
||||
REP ch g
|
||||
REP svp s.v.p.
|
||||
|
||||
MAP 9
|
||||
MAP a<><61><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
MAP e<><65><EFBFBD><EFBFBD>
|
||||
MAP i<><69><EFBFBD><EFBFBD>
|
||||
MAP o<><6F><EFBFBD><EFBFBD><EFBFBD>
|
||||
MAP u<><75><EFBFBD><EFBFBD>
|
||||
MAP n<>
|
||||
MAP c<>
|
||||
MAP y<><79>
|
||||
MAP s<>
|
||||
2affend
|
||||
|
||||
1dicstart
|
||||
123456
|
||||
test/NO
|
||||
# comment
|
||||
wrong
|
||||
Comment
|
||||
OK
|
||||
uk
|
||||
put/ISO
|
||||
the end
|
||||
deol
|
||||
d<EFBFBD><EFBFBD>r
|
||||
1dicend
|
||||
|
||||
addstart
|
||||
/regions=usgbnz
|
||||
elequint/2
|
||||
elekwint/3
|
||||
addend
|
||||
|
||||
1good: wrong OK puts. Test the end
|
||||
bad: inputs comment ok Ok. test déôl end the
|
||||
badend
|
||||
|
||||
2good: puts
|
||||
bad: inputs comment ok Ok end the. test déôl
|
||||
badend
|
||||
|
||||
Test rules for compounding.
|
||||
|
||||
3affstart
|
||||
SET ISO8859-1
|
||||
|
||||
COMPOUNDMIN 3
|
||||
COMPOUNDRULE m*
|
||||
NEEDCOMPOUND x
|
||||
3affend
|
||||
|
||||
3dicstart
|
||||
1234
|
||||
foo/m
|
||||
bar/mx
|
||||
m<EFBFBD>/m
|
||||
la/mx
|
||||
3dicend
|
||||
|
||||
3good: foo mï foobar foofoobar barfoo barbarfoo
|
||||
bad: bar la foomï barmï mïfoo mïbar mïmï lala mïla lamï foola labar
|
||||
badend
|
||||
|
||||
|
||||
Tests for compounding.
|
||||
|
||||
4affstart
|
||||
SET ISO8859-1
|
||||
|
||||
FOL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
LOW <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UPP <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
COMPOUNDRULE m+
|
||||
COMPOUNDRULE sm*e
|
||||
COMPOUNDRULE sm+
|
||||
COMPOUNDMIN 3
|
||||
COMPOUNDWORDMAX 3
|
||||
COMPOUNDFORBIDFLAG t
|
||||
|
||||
COMPOUNDSYLMAX 5
|
||||
SYLLABLE a<>e<EFBFBD>i<EFBFBD>o<EFBFBD><6F><EFBFBD>u<EFBFBD><75><EFBFBD>y/aa/au/ea/ee/ei/ie/oa/oe/oo/ou/uu/ui
|
||||
|
||||
MAP 9
|
||||
MAP a<><61><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
MAP e<><65><EFBFBD><EFBFBD>
|
||||
MAP i<><69><EFBFBD><EFBFBD>
|
||||
MAP o<><6F><EFBFBD><EFBFBD><EFBFBD>
|
||||
MAP u<><75><EFBFBD><EFBFBD>
|
||||
MAP n<>
|
||||
MAP c<>
|
||||
MAP y<><79>
|
||||
MAP s<>
|
||||
|
||||
NEEDAFFIX x
|
||||
|
||||
PFXPOSTPONE
|
||||
|
||||
MIDWORD '-
|
||||
|
||||
SFX q N 1
|
||||
SFX q 0 -ok .
|
||||
|
||||
SFX a Y 2
|
||||
SFX a 0 s .
|
||||
SFX a 0 ize/t .
|
||||
|
||||
PFX p N 1
|
||||
PFX p 0 pre .
|
||||
|
||||
PFX P N 1
|
||||
PFX P 0 nou .
|
||||
4affend
|
||||
|
||||
4dicstart
|
||||
1234
|
||||
word/mP
|
||||
util/am
|
||||
pro/xq
|
||||
tomato/m
|
||||
bork/mp
|
||||
start/s
|
||||
end/e
|
||||
4dicend
|
||||
|
||||
4good: word util bork prebork start end wordutil wordutils pro-ok
|
||||
bork borkbork borkborkbork borkborkborkbork borkborkborkborkbork
|
||||
tomato tomatotomato startend startword startwordword startwordend
|
||||
startwordwordend startwordwordwordend prebork preborkbork
|
||||
preborkborkbork
|
||||
nouword
|
||||
bad: wordutilize pro borkborkborkborkborkbork tomatotomatotomato
|
||||
endstart endend startstart wordend wordstart
|
||||
preborkprebork preborkpreborkbork
|
||||
startwordwordwordwordend borkpreborkpreborkbork
|
||||
utilsbork startnouword
|
||||
badend
|
||||
|
||||
test2:
|
||||
elequint test elekwint test elekwent asdf
|
||||
|
||||
Test affix flags with two characters
|
||||
|
||||
5affstart
|
||||
SET ISO8859-1
|
||||
|
||||
FLAG long
|
||||
|
||||
NEEDAFFIX !!
|
||||
|
||||
COMPOUNDRULE ssmm*ee
|
||||
|
||||
NEEDCOMPOUND xx
|
||||
COMPOUNDPERMITFLAG pp
|
||||
|
||||
SFX 13 Y 1
|
||||
SFX 13 0 bork .
|
||||
|
||||
SFX a1 Y 1
|
||||
SFX a1 0 a1 .
|
||||
|
||||
SFX a<> Y 1
|
||||
SFX a<> 0 a<> .
|
||||
|
||||
PFX zz Y 1
|
||||
PFX zz 0 pre/pp .
|
||||
|
||||
PFX yy Y 1
|
||||
PFX yy 0 nou .
|
||||
5affend
|
||||
|
||||
5dicstart
|
||||
1234
|
||||
foo/a1a<31>!!
|
||||
bar/zz13ee
|
||||
start/ss
|
||||
end/eeyy
|
||||
middle/mmxx
|
||||
5dicend
|
||||
|
||||
5good: fooa1 fooaé bar prebar barbork prebarbork startprebar
|
||||
start end startend startmiddleend nouend
|
||||
bad: foo fooa2 prabar probarbirk middle startmiddle middleend endstart
|
||||
startprobar startnouend
|
||||
badend
|
||||
|
||||
6affstart
|
||||
SET ISO8859-1
|
||||
|
||||
FLAG caplong
|
||||
|
||||
NEEDAFFIX A!
|
||||
|
||||
COMPOUNDRULE sMm*Ee
|
||||
|
||||
NEEDCOMPOUND Xx
|
||||
|
||||
COMPOUNDPERMITFLAG p
|
||||
|
||||
SFX N3 Y 1
|
||||
SFX N3 0 bork .
|
||||
|
||||
SFX A1 Y 1
|
||||
SFX A1 0 a1 .
|
||||
|
||||
SFX A<> Y 1
|
||||
SFX A<> 0 a<> .
|
||||
|
||||
PFX Zz Y 1
|
||||
PFX Zz 0 pre/p .
|
||||
6affend
|
||||
|
||||
6dicstart
|
||||
1234
|
||||
mee/A1A<31>A!
|
||||
bar/ZzN3Ee
|
||||
lead/s
|
||||
end/Ee
|
||||
middle/MmXx
|
||||
6dicend
|
||||
|
||||
6good: meea1 meeaé bar prebar barbork prebarbork leadprebar
|
||||
lead end leadend leadmiddleend
|
||||
bad: mee meea2 prabar probarbirk middle leadmiddle middleend endlead
|
||||
leadprobar
|
||||
badend
|
||||
|
||||
7affstart
|
||||
SET ISO8859-1
|
||||
|
||||
FOL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
LOW <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UPP <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
FLAG num
|
||||
|
||||
NEEDAFFIX 9999
|
||||
|
||||
COMPOUNDRULE 2,77*123
|
||||
|
||||
NEEDCOMPOUND 1
|
||||
COMPOUNDPERMITFLAG 432
|
||||
|
||||
SFX 61003 Y 1
|
||||
SFX 61003 0 meat .
|
||||
|
||||
SFX 391 Y 1
|
||||
SFX 391 0 a1 .
|
||||
|
||||
SFX 111 Y 1
|
||||
SFX 111 0 a<> .
|
||||
|
||||
PFX 17 Y 1
|
||||
PFX 17 0 pre/432 .
|
||||
7affend
|
||||
|
||||
7dicstart
|
||||
1234
|
||||
mee/391,111,9999
|
||||
bar/17,61003,123
|
||||
lead/2
|
||||
tail/123
|
||||
middle/77,1
|
||||
7dicend
|
||||
|
||||
7good: meea1 meeaé bar prebar barmeat prebarmeat leadprebar
|
||||
lead tail leadtail leadmiddletail
|
||||
bad: mee meea2 prabar probarmaat middle leadmiddle middletail taillead
|
||||
leadprobar
|
||||
badend
|
||||
|
||||
test output:
|
||||
@@ -1,270 +0,0 @@
|
||||
test output:
|
||||
|
||||
test 1-1
|
||||
# file: Xtest.utf-8.spl
|
||||
Comment
|
||||
deol
|
||||
déôr
|
||||
input
|
||||
OK
|
||||
output
|
||||
outputs
|
||||
outtest
|
||||
put
|
||||
puts
|
||||
test
|
||||
testen
|
||||
testn
|
||||
the end
|
||||
uk
|
||||
wrong
|
||||
-------
|
||||
bad
|
||||
['put', 'uk', 'OK']
|
||||
inputs
|
||||
['input', 'puts', 'outputs']
|
||||
comment
|
||||
['Comment', 'outtest', 'the end']
|
||||
ok
|
||||
['OK', 'uk', 'put']
|
||||
Ok
|
||||
['OK', 'Uk', 'Put']
|
||||
test
|
||||
['Test', 'testn', 'testen']
|
||||
déôl
|
||||
['deol', 'déôr', 'test']
|
||||
end
|
||||
['put', 'uk', 'test']
|
||||
the
|
||||
['put', 'uk', 'test']
|
||||
gebletegek
|
||||
kepereneven
|
||||
everles gesvets etele
|
||||
kbltykk
|
||||
kprnfn
|
||||
*fls kswts tl
|
||||
elekwent
|
||||
elequint
|
||||
elekwint
|
||||
elekwint
|
||||
elekwent
|
||||
elequint
|
||||
elekwent
|
||||
elequint
|
||||
elekwint
|
||||
|
||||
test 2-1
|
||||
# file: Xtest.utf-8.spl
|
||||
Comment
|
||||
deol
|
||||
déôr
|
||||
OK
|
||||
put
|
||||
input
|
||||
output
|
||||
puts
|
||||
outputs
|
||||
test
|
||||
outtest
|
||||
testen
|
||||
testn
|
||||
the end
|
||||
uk
|
||||
wrong
|
||||
-------
|
||||
bad
|
||||
['put', 'uk', 'OK']
|
||||
inputs
|
||||
['input', 'puts', 'outputs']
|
||||
comment
|
||||
['Comment']
|
||||
ok
|
||||
['OK', 'uk', 'put']
|
||||
Ok
|
||||
['OK', 'Uk', 'Put']
|
||||
end
|
||||
['put', 'uk', 'deol']
|
||||
the
|
||||
['put', 'uk', 'test']
|
||||
test
|
||||
['Test', 'testn', 'testen']
|
||||
déôl
|
||||
['deol', 'déôr', 'test']
|
||||
|
||||
test 3-3
|
||||
# file: Xtest.utf-8.spl
|
||||
foo
|
||||
mï
|
||||
-------
|
||||
bad
|
||||
['foo', 'mï']
|
||||
bar
|
||||
['barfoo', 'foobar', 'foo']
|
||||
la
|
||||
['mï', 'foo']
|
||||
foomï
|
||||
['foo mï', 'foo', 'foofoo']
|
||||
barmï
|
||||
['barfoo', 'mï', 'barbar']
|
||||
mïfoo
|
||||
['mï foo', 'foo', 'foofoo']
|
||||
mïbar
|
||||
['foobar', 'barbar', 'mï']
|
||||
mïmï
|
||||
['mï mï', 'mï']
|
||||
lala
|
||||
[]
|
||||
mïla
|
||||
['mï', 'mï mï']
|
||||
lamï
|
||||
['mï', 'mï mï']
|
||||
foola
|
||||
['foo', 'foobar', 'foofoo']
|
||||
labar
|
||||
['barbar', 'foobar']
|
||||
|
||||
test 4-4
|
||||
# file: Xtest.utf-8.spl
|
||||
bork
|
||||
prebork
|
||||
end
|
||||
pro-ok
|
||||
start
|
||||
tomato
|
||||
util
|
||||
utilize
|
||||
utils
|
||||
word
|
||||
nouword
|
||||
-------
|
||||
bad
|
||||
['end', 'bork', 'word']
|
||||
wordutilize
|
||||
['word utilize', 'wordutils', 'wordutil']
|
||||
pro
|
||||
['bork', 'word', 'end']
|
||||
borkborkborkborkborkbork
|
||||
['bork borkborkborkborkbork', 'borkbork borkborkborkbork', 'borkborkbork borkborkbork']
|
||||
tomatotomatotomato
|
||||
['tomato tomatotomato', 'tomatotomato tomato', 'tomato tomato tomato']
|
||||
endstart
|
||||
['end start', 'start']
|
||||
endend
|
||||
['end end', 'end']
|
||||
startstart
|
||||
['start start']
|
||||
wordend
|
||||
['word end', 'word', 'wordword']
|
||||
wordstart
|
||||
['word start', 'bork start']
|
||||
preborkprebork
|
||||
['prebork prebork', 'preborkbork', 'preborkborkbork']
|
||||
preborkpreborkbork
|
||||
['prebork preborkbork', 'preborkborkbork', 'preborkborkborkbork']
|
||||
startwordwordwordwordend
|
||||
['startwordwordwordword end', 'startwordwordwordword', 'start wordwordwordword end']
|
||||
borkpreborkpreborkbork
|
||||
['bork preborkpreborkbork', 'bork prebork preborkbork', 'bork preborkprebork bork']
|
||||
utilsbork
|
||||
['utilbork', 'utils bork', 'util bork']
|
||||
startnouword
|
||||
['start nouword', 'startword', 'startborkword']
|
||||
|
||||
test 5-5
|
||||
# file: Xtest.utf-8.spl
|
||||
bar
|
||||
barbork
|
||||
end
|
||||
fooa1
|
||||
fooaé
|
||||
nouend
|
||||
prebar
|
||||
prebarbork
|
||||
start
|
||||
-------
|
||||
bad
|
||||
['bar', 'end', 'fooa1']
|
||||
foo
|
||||
['fooa1', 'fooaé', 'bar']
|
||||
fooa2
|
||||
['fooa1', 'fooaé', 'bar']
|
||||
prabar
|
||||
['prebar', 'bar', 'bar bar']
|
||||
probarbirk
|
||||
['prebarbork']
|
||||
middle
|
||||
[]
|
||||
startmiddle
|
||||
['startmiddleend', 'startmiddlebar']
|
||||
middleend
|
||||
[]
|
||||
endstart
|
||||
['end start', 'start']
|
||||
startprobar
|
||||
['startprebar', 'start prebar', 'startbar']
|
||||
startnouend
|
||||
['start nouend', 'startend']
|
||||
|
||||
test 6-6
|
||||
# file: Xtest.utf-8.spl
|
||||
bar
|
||||
barbork
|
||||
end
|
||||
lead
|
||||
meea1
|
||||
meeaé
|
||||
prebar
|
||||
prebarbork
|
||||
-------
|
||||
bad
|
||||
['bar', 'end', 'lead']
|
||||
mee
|
||||
['meea1', 'meeaé', 'bar']
|
||||
meea2
|
||||
['meea1', 'meeaé', 'lead']
|
||||
prabar
|
||||
['prebar', 'bar', 'leadbar']
|
||||
probarbirk
|
||||
['prebarbork']
|
||||
middle
|
||||
[]
|
||||
leadmiddle
|
||||
['leadmiddleend', 'leadmiddlebar']
|
||||
middleend
|
||||
[]
|
||||
endlead
|
||||
['end lead', 'lead', 'end end']
|
||||
leadprobar
|
||||
['leadprebar', 'lead prebar', 'leadbar']
|
||||
|
||||
test 7-7
|
||||
# file: Xtest.utf-8.spl
|
||||
bar
|
||||
barmeat
|
||||
lead
|
||||
meea1
|
||||
meeaé
|
||||
prebar
|
||||
prebarmeat
|
||||
tail
|
||||
-------
|
||||
bad
|
||||
['bar', 'lead', 'tail']
|
||||
mee
|
||||
['meea1', 'meeaé', 'bar']
|
||||
meea2
|
||||
['meea1', 'meeaé', 'lead']
|
||||
prabar
|
||||
['prebar', 'bar', 'leadbar']
|
||||
probarmaat
|
||||
['prebarmeat']
|
||||
middle
|
||||
[]
|
||||
leadmiddle
|
||||
['leadmiddlebar']
|
||||
middletail
|
||||
[]
|
||||
taillead
|
||||
['tail lead', 'tail']
|
||||
leadprobar
|
||||
['leadprebar', 'lead prebar', 'leadbar']
|
||||
@@ -1618,7 +1618,7 @@ func Test_change_mark_in_autocmds()
|
||||
write
|
||||
au! BufWritePre
|
||||
|
||||
if executable('cat')
|
||||
if has('unix')
|
||||
write XtestFilter
|
||||
write >> XtestFilter
|
||||
|
||||
|
||||
@@ -19,6 +19,22 @@ func Test_backup()
|
||||
call delete('Xbackup.txt~')
|
||||
endfunc
|
||||
|
||||
func Test_backup_backupskip()
|
||||
set backup backupdir=. backupskip=*.txt
|
||||
new
|
||||
call setline(1, ['line1', 'line2'])
|
||||
:f Xbackup.txt
|
||||
:w! Xbackup.txt
|
||||
" backup file is only created after
|
||||
" writing a second time (before overwriting)
|
||||
:w! Xbackup.txt
|
||||
call assert_false(filereadable('Xbackup.txt~'))
|
||||
bw!
|
||||
set backup&vim backupdir&vim backupskip&vim
|
||||
call delete('Xbackup.txt')
|
||||
call delete('Xbackup.txt~')
|
||||
endfunc
|
||||
|
||||
func Test_backup2()
|
||||
set backup backupdir=.// backupskip=
|
||||
new
|
||||
@@ -30,7 +46,7 @@ func Test_backup2()
|
||||
:w! Xbackup.txt
|
||||
sp *Xbackup.txt~
|
||||
call assert_equal(['line1', 'line2', 'line3'], getline(1,'$'))
|
||||
let f=expand('%')
|
||||
let f = expand('%')
|
||||
call assert_match('%testdir%Xbackup.txt\~', f)
|
||||
bw!
|
||||
bw!
|
||||
@@ -50,7 +66,7 @@ func Test_backup2_backupcopy()
|
||||
:w! Xbackup.txt
|
||||
sp *Xbackup.txt~
|
||||
call assert_equal(['line1', 'line2', 'line3'], getline(1,'$'))
|
||||
let f=expand('%')
|
||||
let f = expand('%')
|
||||
call assert_match('%testdir%Xbackup.txt\~', f)
|
||||
bw!
|
||||
bw!
|
||||
@@ -61,14 +77,11 @@ endfunc
|
||||
|
||||
" Test for using a non-existing directory as a backup directory
|
||||
func Test_non_existing_backupdir()
|
||||
CheckNotBSD
|
||||
let save_backup = &backupdir
|
||||
set backupdir=./non_existing_dir
|
||||
set backupdir=./non_existing_dir backupskip=
|
||||
call writefile(['line1'], 'Xfile')
|
||||
new Xfile
|
||||
" TODO: write doesn't fail in Cirrus FreeBSD CI test
|
||||
call assert_fails('write', 'E510:')
|
||||
let &backupdir = save_backup
|
||||
set backupdir&vim backupskip&vim
|
||||
call delete('Xfile')
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -168,6 +168,15 @@ func Test_prev_dir()
|
||||
call delete('Xdir', 'rf')
|
||||
endfunc
|
||||
|
||||
func Test_lcd_split()
|
||||
let curdir = getcwd()
|
||||
lcd ..
|
||||
split
|
||||
lcd -
|
||||
call assert_equal(curdir, getcwd())
|
||||
quit!
|
||||
endfunc
|
||||
|
||||
func Test_cd_completion()
|
||||
call mkdir('XComplDir1', 'p')
|
||||
call mkdir('XComplDir2', 'p')
|
||||
|
||||
@@ -46,7 +46,7 @@ func Test_compiler_without_arg()
|
||||
let a = split(execute('compiler'))
|
||||
call assert_match(runtime .. '/compiler/ant.vim$', a[0])
|
||||
call assert_match(runtime .. '/compiler/bcc.vim$', a[1])
|
||||
call assert_match(runtime .. '/compiler/xmlwf.vim$', a[-1])
|
||||
call assert_match(runtime .. '/compiler/xo.vim$', a[-1])
|
||||
endfunc
|
||||
|
||||
" Test executing :compiler from the command line, not from a script
|
||||
@@ -60,7 +60,7 @@ endfunc
|
||||
|
||||
func Test_compiler_completion()
|
||||
call feedkeys(":compiler \<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_match('^"compiler ant bcc .* xmlwf$', @:)
|
||||
call assert_match('^"compiler ant bcc .* xmlwf xo$', @:)
|
||||
|
||||
call feedkeys(":compiler p\<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"compiler pbx perl php pylint pyunit', @:)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user