aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt24
-rw-r--r--runtime/CMakeLists.txt86
-rw-r--r--runtime/autoload/phpcomplete.vim74
-rw-r--r--runtime/autoload/provider/script_host.py8
-rw-r--r--runtime/doc/change.txt3
-rw-r--r--runtime/doc/cmdline.txt3
-rw-r--r--runtime/doc/editing.txt26
-rw-r--r--runtime/doc/eval.txt30
-rw-r--r--runtime/doc/indent.txt2
-rw-r--r--runtime/doc/index.txt1
-rw-r--r--runtime/doc/intro.txt5
-rw-r--r--runtime/doc/map.txt5
-rw-r--r--runtime/doc/motion.txt4
-rw-r--r--runtime/doc/options.txt49
-rw-r--r--runtime/doc/recover.txt4
-rw-r--r--runtime/doc/syntax.txt3
-rw-r--r--runtime/doc/term.txt13
-rw-r--r--runtime/doc/todo.txt162
-rw-r--r--runtime/doc/usr_40.txt4
-rw-r--r--runtime/doc/various.txt7
-rw-r--r--runtime/doc/vi_diff.txt59
-rw-r--r--runtime/doc/vim_diff.txt13
-rw-r--r--runtime/doc/windows.txt10
-rw-r--r--runtime/filetype.vim6
-rw-r--r--runtime/indent/php.vim87
-rw-r--r--runtime/macros/editexisting.vim4
-rw-r--r--runtime/syntax/vim.vim170
-rw-r--r--runtime/syntax/zimbu.vim64
-rw-r--r--scripts/gen_events.lua65
-rw-r--r--scripts/genoptions.lua183
-rw-r--r--scripts/genvimvim.lua138
-rw-r--r--src/nvim/CMakeLists.txt22
-rw-r--r--src/nvim/api/vim.c50
-rw-r--r--src/nvim/auevents.lua106
-rw-r--r--src/nvim/buffer.c4
-rw-r--r--src/nvim/eval.c216
-rw-r--r--src/nvim/eval.h3
-rw-r--r--src/nvim/event/rstream.c14
-rw-r--r--src/nvim/ex_cmds.c14
-rw-r--r--src/nvim/ex_cmds.lua6
-rw-r--r--src/nvim/ex_docmd.c16
-rw-r--r--src/nvim/fileio.c120
-rw-r--r--src/nvim/fileio.h96
-rw-r--r--src/nvim/globals.h11
-rw-r--r--src/nvim/main.c5
-rw-r--r--src/nvim/memline.c3
-rw-r--r--src/nvim/menu.c77
-rw-r--r--src/nvim/message.c16
-rw-r--r--src/nvim/msgpack_rpc/remote_ui.c21
-rw-r--r--src/nvim/normal.c32
-rw-r--r--src/nvim/ops.c5
-rw-r--r--src/nvim/option.c1422
-rw-r--r--src/nvim/option_defs.h12
-rw-r--r--src/nvim/options.lua2777
-rw-r--r--src/nvim/os/fs.c50
-rw-r--r--src/nvim/os/os_defs.h5
-rw-r--r--src/nvim/path.c22
-rw-r--r--src/nvim/regexp.c7
-rw-r--r--src/nvim/regexp_nfa.c130
-rw-r--r--src/nvim/screen.c22
-rw-r--r--src/nvim/search.c8
-rw-r--r--src/nvim/testdir/Makefile16
-rw-r--r--src/nvim/testdir/test57.in500
-rw-r--r--src/nvim/testdir/test57.ok459
-rw-r--r--src/nvim/testdir/test79.inbin3381 -> 3335 bytes
-rw-r--r--src/nvim/testdir/test79.okbin574 -> 570 bytes
-rw-r--r--src/nvim/testdir/test80.in201
-rw-r--r--src/nvim/testdir/test80.ok131
-rw-r--r--src/nvim/testdir/test86.in1425
-rw-r--r--src/nvim/testdir/test86.ok1266
-rw-r--r--src/nvim/testdir/test87.in1402
-rw-r--r--src/nvim/testdir/test87.ok1266
-rw-r--r--src/nvim/tui/tui.c75
-rw-r--r--src/nvim/ui.c27
-rw-r--r--src/nvim/ui.h3
-rw-r--r--src/nvim/version.c20
-rw-r--r--src/nvim/vim.h13
-rw-r--r--test/functional/api/vim_spec.lua9
-rw-r--r--test/functional/clipboard/clipboard_provider_spec.lua53
-rw-r--r--test/functional/eval/glob_spec.lua25
-rw-r--r--test/functional/ex_cmds/menu_spec.lua38
-rw-r--r--test/functional/ex_cmds/recover_spec.lua4
-rw-r--r--test/functional/fixtures/autoload/provider/clipboard.vim (renamed from test/functional/clipboard/autoload/provider/clipboard.vim)4
-rw-r--r--test/functional/helpers.lua25
-rw-r--r--test/functional/legacy/057_sort_spec.lua603
-rw-r--r--test/functional/legacy/080_substitute_spec.lua162
-rw-r--r--test/functional/terminal/highlight_spec.lua25
-rw-r--r--test/functional/ui/screen.lua9
-rw-r--r--test/functional/ui/screen_basic_spec.lua23
-rw-r--r--test/unit/os/fs_spec.lua63
-rw-r--r--third-party/CMakeLists.txt8
-rw-r--r--third-party/cmake/BuildLuarocks.cmake36
92 files changed, 5270 insertions, 9225 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 06db4f473e..700bfdf7cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -266,11 +266,6 @@ if(NOT BUSTED_OUTPUT_TYPE)
set(BUSTED_OUTPUT_TYPE "utfTerminal")
endif()
-# CMake is painful here. It will create the destination using the user's
-# current umask, and we don't want that. And we don't just want to install
-# the target directory, as it will mess with existing permissions. So this
-# seems like the best compromise. If we create it, then everyone can see it.
-# If it's preexisting, leave it alone.
include(InstallHelpers)
file(GLOB MANPAGES
@@ -281,24 +276,6 @@ install_helper(
FILES ${MANPAGES}
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
-install_helper(
- DIRECTORY runtime
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim)
-
-file(GLOB_RECURSE RUNTIME_PROGRAMS
- RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
- runtime/*.awk runtime/*.sh)
-
-foreach(PROG ${RUNTIME_PROGRAMS})
- get_filename_component(BASEDIR ${PROG} PATH)
- install_helper(PROGRAMS ${PROG} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/${BASEDIR})
-endforeach()
-
-configure_file(${PROJECT_SOURCE_DIR}/cmake/GenerateHelptags.cmake.in
- ${PROJECT_BINARY_DIR}/cmake/GenerateHelptags.cmake @ONLY)
-install(SCRIPT ${PROJECT_BINARY_DIR}/cmake/GenerateHelptags.cmake)
-
-
# Go down the tree.
add_subdirectory(src/nvim)
@@ -310,6 +287,7 @@ get_compile_flags(NVIM_VERSION_CFLAGS)
add_subdirectory(test/includes)
add_subdirectory(config)
add_subdirectory(test/functional/fixtures) # compile pty/shell test programs
+add_subdirectory(runtime)
# Setup some test-related bits. We do this after going down the tree because we
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
new file mode 100644
index 0000000000..a6c06195d0
--- /dev/null
+++ b/runtime/CMakeLists.txt
@@ -0,0 +1,86 @@
+set(SYN_VIM_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/genvimvim.lua)
+set(GENERATED_RUNTIME_DIR ${PROJECT_BINARY_DIR}/runtime)
+set(GENERATED_SYN_VIM ${GENERATED_RUNTIME_DIR}/syntax/vim/generated.vim)
+set(GENERATED_HELP_TAGS ${GENERATED_RUNTIME_DIR}/doc/tags)
+
+file(MAKE_DIRECTORY ${GENERATED_RUNTIME_DIR})
+file(MAKE_DIRECTORY ${GENERATED_RUNTIME_DIR}/syntax)
+file(MAKE_DIRECTORY ${GENERATED_RUNTIME_DIR}/syntax/vim)
+
+add_custom_command(OUTPUT ${GENERATED_SYN_VIM}
+ COMMAND ${LUA_PRG} ${SYN_VIM_GENERATOR}
+ ${PROJECT_SOURCE_DIR}/src/nvim ${GENERATED_SYN_VIM}
+ DEPENDS
+ ${SYN_VIM_GENERATOR}
+ ${PROJECT_SOURCE_DIR}/src/nvim/ex_cmds.lua
+ ${PROJECT_SOURCE_DIR}/src/nvim/auevents.lua
+ ${PROJECT_SOURCE_DIR}/src/nvim/options.lua
+ ${PROJECT_SOURCE_DIR}/src/nvim/eval.c
+)
+
+file(GLOB DOCFILES ${PROJECT_SOURCE_DIR}/runtime/doc/*.txt)
+
+set(BUILDDOCFILES)
+foreach(DF ${DOCFILES})
+ get_filename_component(F ${DF} NAME)
+ list(APPEND BUILDDOCFILES ${GENERATED_RUNTIME_DIR}/doc/${F})
+endforeach()
+
+add_custom_command(OUTPUT ${BUILDDOCFILES}
+ COMMAND ${CMAKE_COMMAND} -E copy_directory
+ ${PROJECT_SOURCE_DIR}/runtime/doc ${GENERATED_RUNTIME_DIR}/doc
+ DEPENDS
+ ${DOCFILES})
+
+add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
+ COMMAND ${CMAKE_COMMAND} -E copy_directory
+ ${PROJECT_SOURCE_DIR}/runtime/doc ${GENERATED_RUNTIME_DIR}/doc
+ COMMAND "${PROJECT_BINARY_DIR}/bin/nvim"
+ -u NONE
+ -i NONE
+ -esX
+ -c "helptags ++t ."
+ -c quit
+ DEPENDS
+ ${BUILDDOCFILES}
+ nvim
+ WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}/doc"
+)
+
+add_custom_target(
+ runtime ALL
+ DEPENDS
+ ${GENERATED_SYN_VIM}
+ ${GENERATED_HELP_TAGS}
+)
+
+# CMake is painful here. It will create the destination using the user's
+# current umask, and we don't want that. And we don't just want to install
+# the target directory, as it will mess with existing permissions. So this
+# seems like the best compromise. If we create it, then everyone can see it.
+# If it's preexisting, leave it alone.
+
+install_helper(
+ FILES ${GENERATED_HELP_TAGS} ${BUILDDOCFILES}
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/doc)
+
+file(GLOB_RECURSE RUNTIME_PROGRAMS
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ *.awk *.sh *.bat)
+
+foreach(PROG ${RUNTIME_PROGRAMS})
+ get_filename_component(BASEDIR ${PROG} PATH)
+ install_helper(PROGRAMS ${PROG}
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/${BASEDIR})
+endforeach()
+
+file(GLOB_RECURSE RUNTIME_FILES
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ *.vim *.dict *.py *.ps)
+list(APPEND RUNTIME_FILES macros/dvorak)
+
+foreach(F ${RUNTIME_FILES})
+ get_filename_component(BASEDIR ${F} PATH)
+ install_helper(FILES ${F}
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/${BASEDIR})
+endforeach()
diff --git a/runtime/autoload/phpcomplete.vim b/runtime/autoload/phpcomplete.vim
index b014b4cdcf..5ddad88873 100644
--- a/runtime/autoload/phpcomplete.vim
+++ b/runtime/autoload/phpcomplete.vim
@@ -3,7 +3,7 @@
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" URL: https://github.com/shawncplus/phpcomplete.vim
-" Last Change: 2014 Oct 02
+" Last Change: 2014 Dec 01
"
" OPTIONS:
"
@@ -1172,11 +1172,11 @@ function! phpcomplete#GetCurrentInstruction(line_number, col_number, phpbegin) "
" break if we are on a "naked" stop_char (operators, colon, openparent...)
if index(stop_chars, current_char) != -1
let do_break = 1
- " dont break does not look like a "->"
+ " dont break if it does look like a "->"
if (prev_char == '-' && current_char == '>') || (current_char == '-' && next_char == '>')
let do_break = 0
endif
- " dont break if its looks like a "::"
+ " dont break if it does look like a "::"
if (prev_char == ':' && current_char == ':') || (current_char == ':' && next_char == ':')
let do_break = 0
endif
@@ -1356,8 +1356,12 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat
endif
" make @return self, static, $this the same way
" (not exactly what php means by these)
- if returnclass == 'self' || returnclass == 'static' || returnclass == '$this'
- let classname_candidate = a:classname_candidate
+ if returnclass == 'self' || returnclass == 'static' || returnclass == '$this' || returnclass == 'self[]' || returnclass == 'static[]' || returnclass == '$this[]'
+ if returnclass =~ '\[\]$'
+ let classname_candidate = a:classname_candidate.'[]'
+ else
+ let classname_candidate = a:classname_candidate
+ endif
let class_candidate_namespace = a:class_candidate_namespace
else
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(returnclass, fullnamespace, a:imports)
@@ -1527,7 +1531,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
let function_boundary = phpcomplete#GetCurrentFunctionBoundaries()
let search_end_line = max([1, function_boundary[0][0]])
" -1 makes us ignore the current line (where the completion was invoked
- let lines = reverse(getline(search_end_line, line('.') - 1))
+ let lines = reverse(getline(search_end_line, a:start_line - 1))
" check Constant lookup
let constant_object = matchstr(a:context, '\zs'.class_name_pattern.'\ze::')
@@ -1638,9 +1642,32 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
" assignment for the variable in question with a variable on the right hand side
if line =~# '^\s*'.object.'\s*=&\?\s*'.variable_name_pattern
- let tailing_semicolon = match(line, ';\s*$')
- let tailing_semicolon = tailing_semicolon != -1 ? tailing_semicolon : strlen(getline(a:start_line - i))
- let prev_context = phpcomplete#GetCurrentInstruction(a:start_line - i, tailing_semicolon - 1, b:phpbegin)
+
+ " try to find the next non-comment or string ";" char
+ let start_col = match(line, '^\s*'.object.'\C\s*=\zs&\?\s*'.variable_name_pattern)
+ let filelines = reverse(lines)
+ let [pos, char] = s:getNextCharWithPos(filelines, [a:start_line - i - 1, start_col])
+ let chars_read = 1
+ " read while end of the file
+ while char != 'EOF' && chars_read < 1000
+ let last_pos = pos
+ let [pos, char] = s:getNextCharWithPos(filelines, pos)
+ let chars_read += 1
+ " we got a candidate
+ if char == ';'
+ let synIDName = synIDattr(synID(pos[0] + 1, pos[1] + 1, 0), 'name')
+ " it's not a comment or string, end search
+ if synIDName !~? 'comment\|string'
+ break
+ endif
+ endif
+ endwhile
+
+ let prev_context = phpcomplete#GetCurrentInstruction(last_pos[0] + 1, last_pos[1], b:phpbegin)
+ if prev_context == ''
+ " cannot get previous context give up
+ return
+ endif
let prev_class = phpcomplete#GetClassName(a:start_line - i, prev_context, a:current_namespace, a:imports)
if stridx(prev_class, '\') != -1
@@ -1656,9 +1683,32 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
" assignment for the variable in question with a function on the right hand side
if line =~# '^\s*'.object.'\s*=&\?\s*'.function_invocation_pattern
- let tailing_semicolon = match(line, ';\s*$')
- let tailing_semicolon = tailing_semicolon != -1 ? tailing_semicolon : strlen(getline(a:start_line - i))
- let prev_context = phpcomplete#GetCurrentInstruction(a:start_line - i, tailing_semicolon - 1, b:phpbegin)
+
+ " try to find the next non-comment or string ";" char
+ let start_col = match(line, '\C^\s*'.object.'\s*=\zs&\?\s*'.function_invocation_pattern)
+ let filelines = reverse(lines)
+ let [pos, char] = s:getNextCharWithPos(filelines, [a:start_line - i - 1, start_col])
+ let chars_read = 1
+ " read while end of the file
+ while char != 'EOF' && chars_read < 1000
+ let last_pos = pos
+ let [pos, char] = s:getNextCharWithPos(filelines, pos)
+ let chars_read += 1
+ " we got a candidate
+ if char == ';'
+ let synIDName = synIDattr(synID(pos[0] + 1, pos[1] + 1, 0), 'name')
+ " it's not a comment or string, end search
+ if synIDName !~? 'comment\|string'
+ break
+ endif
+ endif
+ endwhile
+
+ let prev_context = phpcomplete#GetCurrentInstruction(last_pos[0] + 1, last_pos[1], b:phpbegin)
+ if prev_context == ''
+ " cannot get previous context give up
+ return
+ endif
let function_name = matchstr(prev_context, '^'.function_invocation_pattern.'\ze')
let function_name = matchstr(function_name, '^\zs.\+\ze\s*($') " strip the trailing (
diff --git a/runtime/autoload/provider/script_host.py b/runtime/autoload/provider/script_host.py
index e0b9ee6012..0a7eb53a0e 100644
--- a/runtime/autoload/provider/script_host.py
+++ b/runtime/autoload/provider/script_host.py
@@ -32,10 +32,6 @@ class ScriptHost(object):
# it seems some plugins assume 'sys' is already imported, so do it now
exec('import sys', self.module.__dict__)
self.legacy_vim = nvim.with_hook(LegacyEvalHook())
- if IS_PYTHON3:
- self.legacy_vim = self.legacy_vim.with_hook(
- neovim.DecodeHook(
- encoding=nvim.options['encoding']))
sys.modules['vim'] = self.legacy_vim
def setup(self, nvim):
@@ -93,10 +89,6 @@ class ScriptHost(object):
stop -= 1
fname = '_vim_pydo'
- # Python3 code (exec) must be a string, mixing bytes with
- # function_def would use bytes.__repr__ instead
- if isinstance and isinstance(code, bytes):
- code = code.decode(nvim.options['encoding'])
# define the function
function_def = 'def %s(line, linenr):\n %s' % (fname, code,)
exec(function_def, self.module.__dict__)
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index 4dd515f3e0..813d741f5d 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -714,9 +714,6 @@ When the {string} starts with "\=" it is evaluated as an expression, see
characters.
Otherwise these characters in {string} have a special meaning:
- *:s%*
-When {string} is equal to "%" and '/' is included with the 'cpoptions' option,
-then the {string} of the previous substitute command is used, see |cpo-/|
magic nomagic action ~
& \& replaced with the whole matched pattern *s/\&*
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index 932d230a59..85f16ca8ca 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -54,8 +54,7 @@ history tables:
- one for debug mode commands
These are completely separate. Each history can only be accessed when
entering the same type of line.
-Use the 'history' option to set the number of lines that are remembered
-(default: 50).
+Use the 'history' option to set the number of lines that are remembered.
Notes:
- When you enter a command-line that is exactly the same as an older one, the
old one is removed (to avoid repeated commands moving older commands out of
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index 63c27b2ff2..bb3d89e4ac 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -569,7 +569,10 @@ list of the current window.
Also see |++opt| and |+cmd|.
:[count]arga[dd] {name} .. *:arga* *:argadd* *E479*
- Add the {name}s to the argument list.
+:[count]arga[dd]
+ Add the {name}s to the argument list. When {name} is
+ omitted add the current buffer name to the argument
+ list.
If [count] is omitted, the {name}s are added just
after the current entry in the argument list.
Otherwise they are added after the [count]'th file.
@@ -579,7 +582,8 @@ list of the current window.
:argadd x a b x c
:0argadd x x a b c
:1argadd x a x b c
- :99argadd x a b c x
+ :$argadd x a b c x
+ :+2argadd y a b c x y
There is no check for duplicates, it is possible to
add a file to the argument list twice.
The currently edited file is not changed.
@@ -597,11 +601,19 @@ list of the current window.
Example: >
:argdel *.obj
-:{range}argd[elete] Delete the {range} files from the argument list.
+:[range]argd[elete] Delete the {range} files from the argument list.
+ Example: >
+ :10,$argdel
+< Deletes arguments 10 and further, keeping 1-9. >
+ :$argd
+< Deletes just the last one. >
+ :argd
+ :.argd
+< Deletes the current argument. >
+ :%argd
+< Removes all the files from the arglist.
When the last number in the range is too high, up to
- the last argument is deleted. Example: >
- :10,1000argdel
-< Deletes arguments 10 and further, keeping 1-9.
+ the last argument is deleted.
*:argu* *:argument*
:[count]argu[ment] [count] [++opt] [+cmd]
@@ -1018,7 +1030,7 @@ The names can be in upper- or lowercase.
:q[uit]! Quit without writing, also when currently visible
buffers have changes. Does not exit when this is the
- last window and there are is a changed hidden buffer.
+ last window and there is a changed hidden buffer.
In this case, the first changed hidden buffer becomes
the current buffer.
Use ":qall!" to exit always.
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index ba8948197e..d12871f4ab 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.4. Last change: 2014 Nov 15
+*eval.txt* For Vim version 7.4. Last change: 2014 Nov 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3311,6 +3311,17 @@ getchar([expr]) *getchar()*
: endif
: endwhile
:endfunction
+<
+ You may also receive syntetic characters, such as
+ |<CursorHold>|. Often you will want to ignore this and get
+ another character: >
+ :function GetKey()
+ : let c = getchar()
+ : while c == "\<CursorHold>"
+ : let c = getchar()
+ : endwhile
+ : return c
+ :endfunction
getcharmod() *getcharmod()*
The result is a Number which is the state of the modifiers for
@@ -3521,7 +3532,7 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
This can be used to save and restore the position of a mark: >
let save_a_mark = getpos("'a")
...
- call setpos(''a', save_a_mark
+ call setpos("'a", save_a_mark)
< Also see |getcurpos()| and |setpos()|.
@@ -4581,15 +4592,16 @@ mkdir({name} [, {path} [, {prot}]])
If {prot} is given it is used to set the protection bits of
the new directory. The default is 0755 (rwxr-xr-x: r/w for
the user readable for others). Use 0700 to make it unreadable
- for others. This is only used for the last part of {name}.
- Thus if you create /tmp/foo/bar then /tmp/foo will be created
- with 0755.
- Example: >
+ for others.
+ {Nvim}
+ {prot} is applied for all parts of {name}. Thus if you create
+ /tmp/foo/bar then /tmp/foo will be created with 0700. Example: >
:call mkdir($HOME . "/tmp/foo/bar", "p", 0700)
< This function is not available in the |sandbox|.
- Not available on all systems. To check use: >
- :if exists("*mkdir")
-<
+
+ If you try to create an existing directory with {path} set to
+ "p" mkdir() will silently exit.
+
*mode()*
mode([expr]) Return a string that indicates the current mode.
If [expr] is supplied and it evaluates to a non-zero Number or
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index fc16b1a7e7..3f61e28651 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -1,4 +1,4 @@
-*indent.txt* For Vim version 7.4. Last change: 2014 Apr 23
+*indent.txt* For Vim version 7.4. Last change: 2014 Dec 06
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index fd5bf1c50e..a1f593765f 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1070,7 +1070,6 @@ tag command action ~
|:@| :@ execute contents of a register
|:@@| :@@ repeat the previous ":@"
|:Next| :N[ext] go to previous file in the argument list
-|:Print| :P[rint] print lines
|:append| :a[ppend] append text
|:abbreviate| :ab[breviate] enter abbreviation
|:abclear| :abc[lear] remove all abbreviations
diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt
index d15f8b3dd3..0825ca8848 100644
--- a/runtime/doc/intro.txt
+++ b/runtime/doc/intro.txt
@@ -269,11 +269,6 @@ Vi "the original". Without further remarks this is the version
to. Only runs under Unix. Source code only available with a
license. More information on Vi can be found through:
http://vi-editor.org [doesn't currently work...]
- *Posix*
-Posix From the IEEE standard 1003.2, Part 2: Shell and utilities.
- Generally known as "Posix". This is a textual description of
- how Vi is supposed to work.
- See |posix-compliance|.
*Nvi*
Nvi The "New" Vi. The version of Vi that comes with BSD 4.4 and FreeBSD.
Very good compatibility with the original Vi, with a few extensions.
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 699915a86f..37e1235a81 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1132,9 +1132,7 @@ For starters: See section |40.2| in the user manual.
All user defined commands must start with an uppercase letter, to avoid
confusion with builtin commands. Exceptions are these builtin commands:
:Next
- :X
-They cannot be used for a user defined command. ":Print" is also an existing
-command, but it is deprecated and can be overruled.
+They cannot be used for a user defined command.
The other characters of the user command can be uppercase letters, lowercase
letters or digits. When using digits, note that other commands that take a
@@ -1154,7 +1152,6 @@ Example: >
:Renu " Means "Renumber"
:Ren " Error - ambiguous
:command Paste ...
- :P " The built-in :Print
It is recommended that full names for user-defined commands are used in
scripts.
diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt
index 7f64168663..8e96aedba6 100644
--- a/runtime/doc/motion.txt
+++ b/runtime/doc/motion.txt
@@ -469,9 +469,7 @@ the macros ".IP", ".LP", etc. (These are nroff macros, so the dot must be in
the first column). A section boundary is also a paragraph boundary.
Note that a blank line (only containing white space) is NOT a paragraph
boundary.
-Also note that this does not include a '{' or '}' in the first column. When
-the '{' flag is in 'cpoptions' then '{' in the first column is used as a
-paragraph boundary |posix|.
+Note: this does not include a '{' or '}' in the first column.
*section*
A section begins after a form-feed (<C-L>) in the first column and at each of
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 9f482b35ff..fea8a59a74 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1493,8 +1493,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'columns' 'co' number (default 80 or terminal width)
global
Number of columns of the screen. Normally this is set by the terminal
- initialization and does not have to be set by hand. Also see
- |posix-screen-size|.
+ initialization and does not have to be set by hand.
When Vim is running in the GUI or in a resizable window, setting this
option will cause the window size to be changed. When you only want
to use the size for the GUI, put the command in your |gvimrc| file.
@@ -1701,10 +1700,6 @@ A jump table for the options with a short description can be found at |Q_op|.
Commas can be added for readability.
To avoid problems with flags that are added in the future, use the
"+=" and "-=" feature of ":set" |add-option-flags|.
- NOTE: This option is set to the POSIX default value at startup when
- the Vi default value would be used and the $VIM_POSIX environment
- variable exists |posix|. This means Vim tries to behave like the
- POSIX specification.
contains behavior ~
*cpo-a*
@@ -1802,7 +1797,6 @@ A jump table for the options with a short description can be found at |Q_op|.
See |/[]|
'l' included: "/[ \t]" finds <Space>, '\' and 't'
'l' excluded: "/[ \t]" finds <Space> and <Tab>
- Also see |cpo-\|.
*cpo-L*
L When the 'list' option is set, 'wrapmargin',
'textwidth', 'softtabstop' and Virtual Replace mode
@@ -1942,38 +1936,6 @@ A jump table for the options with a short description can be found at |Q_op|.
the cursor would skip over it and jump to the
following occurrence.
- POSIX flags. These are not included in the Vi default value, except
- when $VIM_POSIX was set on startup. |posix|
-
- contains behavior ~
- *cpo-#*
- # A count before "D", "o" and "O" has no effect.
- *cpo-&*
- & When ":preserve" was used keep the swap file when
- exiting normally while this buffer is still loaded.
- This flag is tested when exiting.
- *cpo-\*
- \ Backslash in a [] range in a search pattern is taken
- literally, only "\]" is special See |/[]|
- '\' included: "/[ \-]" finds <Space>, '\' and '-'
- '\' excluded: "/[ \-]" finds <Space> and '-'
- Also see |cpo-l|.
- *cpo-/*
- / When "%" is used as the replacement string in a |:s|
- command, use the previous replacement string. |:s%|
- *cpo-{*
- { The |{| and |}| commands also stop at a "{" character
- at the start of a line.
- *cpo-.*
- . The ":chdir" and ":cd" commands fail if the current
- buffer is modified, unless ! is used. Vim doesn't
- need this, since it remembers the full path of an
- opened file.
- *cpo-bar*
- | The value of the $LINES and $COLUMNS environment
- variables overrule the terminal size values obtained
- with system specific functions.
-
*'cryptmethod'* *'cm'*
'cryptmethod' Removed. |vim-differences| {Nvim}
@@ -3552,7 +3514,7 @@ A jump table for the options with a short description can be found at |Q_op|.
with the 'h' flag in 'viminfo' |viminfo-h|.
*'history'* *'hi'*
-'history' 'hi' number (Vim default: 50, Vi default: 0)
+'history' 'hi' number (Vim default: 10000, Vi default: 0)
global
A history of ":" commands, and a history of previous search patterns
is remembered. This option decides how many entries may be stored in
@@ -4157,7 +4119,7 @@ A jump table for the options with a short description can be found at |Q_op|.
global
Number of lines of the Vim window.
Normally you don't need to set this. It is done automatically by the
- terminal initialization code. Also see |posix-screen-size|.
+ terminal initialization code.
When Vim is running in the GUI or in a resizable window, setting this
option will cause the window size to be changed. When you only want
to use the size for the GUI, put the command in your |gvimrc| file.
@@ -4767,6 +4729,8 @@ A jump table for the options with a short description can be found at |Q_op|.
*'paste'* *'nopaste'*
'paste' boolean (default off)
global
+ You probably don't have to set this option: |bracketed-paste-mode|.
+
Put Vim in Paste mode. This is useful if you want to cut or copy
some text from one window and paste it in Vim. This will avoid
unexpected effects.
@@ -5630,8 +5594,7 @@ A jump table for the options with a short description can be found at |Q_op|.
function to get the effective shiftwidth value.
*'shortmess'* *'shm'*
-'shortmess' 'shm' string (Vim default "filnxtToO", Vi default: "",
- POSIX default: "A")
+'shortmess' 'shm' string (Vim default "filnxtToO", Vi default: "")
global
This option helps to avoid all the |hit-enter| prompts caused by file
messages, for example with CTRL-G, and to avoid some other messages.
diff --git a/runtime/doc/recover.txt b/runtime/doc/recover.txt
index 53cb31f813..0b67732cd1 100644
--- a/runtime/doc/recover.txt
+++ b/runtime/doc/recover.txt
@@ -111,10 +111,6 @@ command:
*:pre* *:preserve* *E313* *E314*
:pre[serve] Write all text for all buffers into swap file. The
original file is no longer needed for recovery.
- This sets a flag in the current buffer. When the '&'
- flag is present in 'cpoptions' the swap file will not
- be deleted for this buffer when Vim exits and the
- buffer is still loaded |cpo-&|.
A Vim swap file can be recognized by the first six characters: "b0VIM ".
After that comes the version number, e.g., "3.0".
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 6bc1b2873c..88f23e6c76 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 7.4. Last change: 2014 Sep 27
+*syntax.txt* For Vim version 7.4. Last change: 2014 Nov 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5055,6 +5055,7 @@ This will set the "w:current_syntax" variable to "foo". The value of
restoring "b:current_syntax", since the syntax files do set
"b:current_syntax". The value set by the syntax file is assigned to
"w:current_syntax".
+Note: This resets the 'spell', 'spellcapcheck' and 'spellfile' options.
Once a window has its own syntax, syntax commands executed from other windows
on the same buffer (including :syntax clear) have no effect. Conversely,
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index d7b9395aeb..3b8bf4507f 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -592,6 +592,19 @@ before using the mouse:
"g<LeftMouse>" is "<C-LeftMouse> (jump to tag under mouse click)
"g<RightMouse>" is "<C-RightMouse> ("CTRL-T")
+ *bracketed-paste-mode*
+Bracketed paste mode allows terminal emulators to distinguish between typed
+text and pasted text.
+
+For terminal emulators that support it, this mode is enabled by default. Thus
+you can paste text without Neovim giving any special meaning to it. Most
+notably it won't try reindenting those lines.
+
+If your terminal emulator doesn't support it yet, you can get the old Vim
+behaviour by enabling |'paste'| temporarily.
+
+NOTE: See https://cirw.in/blog/bracketed-paste for technical details.
+
*mouse-mode-table* *mouse-overview*
A short overview of what the mouse buttons do, when 'mousemodel' is "extend":
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 75585e878b..78ae536c5a 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.4. Last change: 2014 Nov 19
+*todo.txt* For Vim version 7.4. Last change: 2014 Dec 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -34,9 +34,23 @@ not be repeated below, unless there is extra information.
*known-bugs*
-------------------- Known bugs and current work -----------------------
+Patch to fix list range assign crash. (Yukihiro Nakadaira, 2014 Dec 1)
+
+Patch to fix range with user command. (Marcin Szamotulski, 2014 Dec 2)
+Update Dec 6, with support for user commands.
+
+When window number in Ex range is too high, give an error?
+Only when backwards compatible.
+
+:s/\n// doesn't change anything. Since 7.4.232? (Eliseo Martínez, 2014 Nov
+28) Patch on Issue 287
+
+Using vim_snprintf() in window.c can be in a function.
+
Regexp problems:
- The NFA engine does not implement the time limit passed to
nfa_regexec_multi()
+- Very slow with a long line and Ruby highlighting. (John Whitley, 2014 Dec 4)
- Bug with pattern: '\vblock (\d+)\.\n.*\d+%(\1)@<!\.$'
(Lech Lorens, 2014 Feb 3)
- Issue 164: freeze on regexp search.
@@ -64,17 +78,11 @@ Breaks test_eval. Inefficient, can we only compute y_width when needed?
Problem that a previous silent ":throw" causes a following try/catch not to
work. (ZyX, 2013 Sep 28)
+Patch to fix recognizing function name. (Ozaki Kiichi, 2014 Nov 28)
+
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
directory exists. (Sergio Gallelli, 2013 Dec 29)
-Patch by Marcin Szamotulski to add count to :close (2014 Aug 10, update Aug
-14, Aug 30)
- Make ":1close" close the first window.
- Make ":+1close" close the next window.
- Make ":-1close" close the previous window.
-Doesn't look right, asked for updates.
-Update 2014 Nov 8. Replied with suggestions.
-
The entries added by matchaddpos() are returned by getmatches() but can't be
set with setmatches(). (lcd47, 2014 Jun 29)
@@ -84,34 +92,34 @@ Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
-Patch to fix issue 78. (Christian Brabandt, 2014 Oct 8)
-
-Patch to fix leak in map() with error. (Christian Brabandt, 2014 Oct 11)
-
-Patch to fix incsearch for "2/pattern/e".
-
-Patch to fix memory leak in :hardcopy. (Christian Brabandt, 2014 Nov 16)
-
-Patch to fix warnings in if_ruby.c. (Ken Takata, 2014 Nov 17)
-
-Patch to make test 63 pass when in a B&W terminal. (Christian Brabandt, 2014
-Nov 15) Other patch (better) on Nov 17.
-
Change behavior of v:hlsearch? Patch from Christian, 2014 Oct 22.
+Patch to recover from X server restart: hint on Issue 203 (2014 Nov 21 18:44)
+
MS-Windows: When editing a file with a leading space, writing it uses the
wrong name. (Aram, 2014 Nov 7) Vim 7.4.
+Add LessCss support. (Jenoma / Alessandro Vioni, 2014 Nov 24)
+Now with updated license, Nov 24.
+
patch to remove FEAT_OSFILETYPE from fileio.c. (Christian, 2014 Nov 12)
Value returned by virtcol() changes depending on how lines wrap. This is
inconsistent with the documentation.
-Patch to fix relatie numbers. (Christian Brabandt, 2014 Nov 17)
+Ukrainian vimtutor. (Issue 288)
+
+Regenerate the Unicode tables in mbyte.c.
+Diff from ZyX, 2014 Dec 6.
+
+Patch to fix relative numbers. (Christian Brabandt, 2014 Nov 17)
+Update Nov 26.
Patch to fix wrong formatting if 'linebreak' is set. (Christian Brabandt, 2014
Nov 12)
+Patch to avoid recognizing polkit as hog files. (Issue 292)
+
Patch to support hex values for setting option value.
(Zyx, 2015 Nov 6)
@@ -122,17 +130,29 @@ Update Nov 5.
MS-Windows: Crash opening very long file name starting with "\\".
(Christian Brock, 2012 Jun 29)
+Cursorline background color not mixed with character highlight.
+Patch by Yasuhiro Matsumoto, 2014 Dec 3.
+
Problem using diff syntax with cp932 encoding. Idea from Yasuhiro Matsumoto,
patch from Ken Takata (2014 Nov 6)
ml_updatechunk() is slow when retrying for another encoding. (John Little,
2014 Sep 11)
+Patch to add a different escape sequence for replace mode.
+(Omar Sandoval, 2014 Nov 30)
+
+Patch to allow values greater than 255 for ctermfg/ctermbg on Windows.
+(Yasuhiro Matsumoto, 2014 Dec 5)
+
When 'balloonexpr' returns a list the result has a trailing newline.
Just remove one trailing newline. (lcd, 2014 Oct 17)
Make comments in the test Makefile silent. (Kartik Agaram, 2014 Sep 24)
+Result of systemlist() does not show whether text ended in line break.
+(Bjorn Linse, 2014 Nov 27)
+
When in 'comments' "n:x" follows after three-part comment directly it repeats
any one-character from the previous line. (Kartik Agaram, 2014 Sep 19)
@@ -147,6 +167,15 @@ Plugins need to make a lot of effort, lots of mappings, to know what happened
before pressing the key that triggers a plugin action. How about keeping the
last N pressed keys, so that they do not need to be mapped?
+":q!" should reset modified flag for current buffer, if another buffer is
+modified no need to abandon it again.
+Patch from Yasuhiro Matsumoto, 2014 Nov 21.
+Update from Hirohito Higashi, 2014 Nov 21.
+With test, Nov 23.
+
+Wrong scrolling when using incsearch. Patch by Christian Brabandt, 2014 Dec 4.
+Is this a good solution?
+
Can assign to s:type when a function s:type has been defined.
Also the other way around: define a function while a variable with that name
was already defined.
@@ -175,6 +204,7 @@ Bug: Autocompleting ":tag/pat" replaces "/pat" with a match but does not
insert a space. (Micha Mos, 2014 Nov 7)
Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
+Update Dec 6.
Patch to add argument to :cquit. (Thinca, 2014 Oct 12)
@@ -287,6 +317,10 @@ Yasuhiro Matsumoto, 2013 May 31.
Or should we add a more general mechanism, like a lambda() function?
Patch by Yasuhiro Matsumoto, 2014 Sep 16.
+Patch to fix display of listchars on the cursorline. (Nayuri Aohime, 2013)
+Update suggested by Yasuhiro Matsumoto, 2014 Nov 25:
+https://gist.github.com/presuku/d3d6b230b9b6dcfc0477
+
Patch for XDG base directory support. (Jean François Bignolles, 2014 Mar 4)
Remark on the docs. Should not be a compile time feature. But then what?
@@ -537,6 +571,14 @@ MS-Windows resizing problems:
causes the window to move unnecessarily. (William E. Skeith III, 2012 Jan
12) Patch: 2012 Jan 13 Needs more work (2012 Feb 2)
+Patch to use Modern UI 2.0 for the Nsis installer. (Guopeng Wen, 2010 Jul 30)
+Latest version: 2011 May 18
+8 Windows install with NSIS: make it possible to do a silent install, see
+ http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
+ Version from Guopeng Wen that does this (2010 Dec 27)
+Alternative: MSI installer: https://github.com/petrkle/vim-msi/
+Or the one on Issue 279
+
'iminsert' global value set when using ":setlocal iminsert"? (Wu, 2012 Jun 23)
Patch to append regexp to tag commands to make it possible to select one out
@@ -847,7 +889,7 @@ Assume the system converts between the actual encoding of the filesystem to
the system encoding (usually utf-8).
Patch to add GUI colors to the terminal, when it supports it. (ZyX, 2013 Jan
-26, update 2013 Dec 14)
+26, update 2013 Dec 14, another 2014 Nov 22)
Problem producing tags file when hebrew.frx is present. It has a BOM.
Results in E670. (Tony Mechelynck, 2010 May 2)
@@ -1479,13 +1521,6 @@ with "gvim -nb:localhost:55555:foo". From nc do: '1:editFile!0 "foo"'. Then
go to Insert mode and add a few lines. Then backspacing every other time
moves the cursor instead of deleting. (Chris Kaiser, 2007 Sep 25)
-Patch to use Modern UI 2.0 for the Nsis installer. (Guopeng Wen, 2010 Jul 30)
-Latest version: 2011 May 18
-8 Windows install with NSIS: make it possible to do a silent install, see
- http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
- Version from Guopeng Wen that does this (2010 Dec 27)
-Alternative: MSI installer: https://github.com/petrkle/vim-msi/
-
Windows installer should install 32-bit version of right-click handler also on
64-bit systems. (Brian Cunningham, 2011 Dec 28)
@@ -1994,71 +2029,6 @@ Awaiting updated patches:
- Patch for "paranoid mode" by Kevin Collins, March 7. Needs much more work.
-Vi incompatibility:
-- Try new POSIX tests, made after my comments. (Geoff Clare, 2005 April 7)
- Version 1.5 is in ~/src/posix/1.5. (Lynne Canal)
-8 With undo/redo only marks in the changed lines should be changed. Other
- marks should be kept. Vi keeps each mark at the same text, even when it
- is deleted or restored. (Webb)
- Also: A mark is lost after: make change, undo, redo and undo.
- Example: "{d''" then "u" then "d''": deletes an extra line, because the ''
- position is one line down. (Veselinovic)
-8 When stdin is not a tty, and Vim reads commands from it, an error should
- make Vim exit.
-7 Unix Vim (not gvim): Typing CTRL-C in Ex mode should finish the line
- (currently you can continue typing, but it's truncated later anyway).
- Requires a way to make CTRL-C interrupt select() when in cooked input.
-8 When loading a file in the .exrc, Vi loads the argument anyway. Vim skips
- loading the argument if there is a file already. When no file argument
- given, Vi starts with an empty buffer, Vim keeps the loaded file. (Bearded)
-6 In Insert mode, when using <BS> or <Del>, don't wipe out the text, but
- only move back the cursor. Behaves like '$' in 'cpoptions'. Use a flag
- in 'cpoptions' to switch this on/off.
-8 When editing a file which is a symbolic link, and then opening another
- symbolic link on the same file, Vim uses the name of the first one.
- Adjust the file name in the buffer to the last one used? Use several file
- names in one buffer???
- Also: When first editing file "test", which is symlink to "test2", and
- then editing "test2", you end up editing buffer "test" again. It's not
- logical that the name that was first used sticks with the buffer.
-7 The ":undo" command works differently in Ex mode. Edit a file, make some
- changes, "Q", "undo" and _all_ changes are undone, like the ":visual"
- command was one command.
- On the other hand, an ":undo" command in an Ex script only undoes the last
- change (e.g., use two :append commands, then :undo).
-7 The ":map" command output overwrites the command. Perhaps it should keep
- the ":map" when it's used without arguments?
-7 CTRL-L is not the end of a section? It is for Posix! Make it an option.
-7 Implement 'prompt' option. Init to off when stdin is not a tty.
-7 CTRL-T in Insert mode inserts 'shiftwidth' of spaces at the cursor. Add a
- flag in 'cpoptions' for this.
-7 Add a way to send an email for a crashed edit session. Create a file when
- making changes (containing name of the swap file), delete it when writing
- the file. Supply a program that can check for crashed sessions (either
- all, for a system startup, or for one user, for in a .login file).
-7 Vi doesn't do autoindenting when input is not from a tty (in Ex mode).
-7 "z3<CR>" should still use the whole window, but only redisplay 3 lines.
-7 ":tag xx" should move the cursor to the first non-blank. Or should it go
- to the match with the tag? Option?
-7 Implement 'autoprint'/'ap' option.
-7 Add flag in 'cpoptions' that makes <BS> after a count work like <Del>
- (Sayre).
-7 Add flag in 'cpoptions' that makes operator (yank, filter) not move the
- cursor, at least when cancelled. (default Vi compatible).
-7 This Vi-trick doesn't work: "Q" to go to Ex mode, then "g/pattern/visual".
- In Vi you can edit in visual mode, and when doing "Q" you jump to the next
- match. Nvi can do it too.
-7 Support '\' for line continuation in Ex mode for these commands: (Luebking)
- g/./a\ g/pattern1/ s/pattern2/rep1\\
- line 1\ line 2\\
- line 2\ line 3\\
- . line4/
-6 ":e /tmp/$tty" doesn't work. ":e $uid" does. Is $tty not set because of
- the way the shell is started?
-6 Vi compatibility (optional): make "ia<CR><ESC>10." do the same strange
- thing. (only repeat insert for the first line).
-
-
MSDOS and Win32:
8 Should $USERPROFILE be preferred above $HOMEDRIVE/$HOMEPATH? No, but it's
a good fallback, thus use:
diff --git a/runtime/doc/usr_40.txt b/runtime/doc/usr_40.txt
index 9d706481df..b802c9534a 100644
--- a/runtime/doc/usr_40.txt
+++ b/runtime/doc/usr_40.txt
@@ -290,8 +290,8 @@ deletes the first line.
Note:
User-defined commands must start with a capital letter. You cannot
- use ":X", ":Next" and ":Print". The underscore cannot be used! You
- can use digits, but this is discouraged.
+ use ":Next". The underscore cannot be used! You can use digits, but
+ this is discouraged.
To list the user-defined commands, execute the following command: >
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index a241e2beaf..5fb6dac402 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -91,13 +91,6 @@ g8 Print the hex values of the bytes used in the
current line |cmdline-ranges|).
See |ex-flags| for [flags].
- *:P* *:Print*
-:[range]P[rint] [count] [flags]
- Just as ":print". Was apparently added to Vi for
- people that keep the shift key pressed too long...
- Note: A user command can overrule this command.
- See |ex-flags| for [flags].
-
*:l* *:list*
:[range]l[ist] [count] [flags]
Same as :print, but display unprintable characters
diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt
index 45d81bba2e..e76c0163b5 100644
--- a/runtime/doc/vi_diff.txt
+++ b/runtime/doc/vi_diff.txt
@@ -10,17 +10,12 @@ Throughout the help files differences between Vim and Vi/Ex are given in
curly braces, like "{not in Vi}". This file only lists what has not been
mentioned in other files and gives an overview.
-Vim is mostly POSIX 1003.2-1 compliant. The only command known to be missing
-is ":open". There are probably a lot of small differences (either because Vim
-is missing something or because Posix is beside the mark).
-
1. Simulated command |simulated-command|
2. Missing options |missing-options|
3. Limits |limits|
4. The most interesting additions |vim-additions|
5. Other vim features |other-features|
6. Command-line arguments |cmdline-arguments|
-7. POSIX compliance |posix-compliance|
==============================================================================
1. Simulated command *simulated-command*
@@ -919,59 +914,5 @@ Only Vim is able to accept options in between and after the file names.
@{cmdfile} Vile: use {cmdfile} as startup file.
-==============================================================================
-7. POSIX compliance *posix* *posix-compliance*
-
-In 2005 the POSIX test suite was run to check the compatibility of Vim. Most
-of the test was executed properly. There are the few things where Vim
-is not POSIX compliant, even when run in Vi compatibility mode.
-
-Set the $VIM_POSIX environment variable to have 'cpoptions' include the POSIX
-flags when Vim starts up. This makes Vim run as POSIX as it can. That's
-a bit different from being Vi compatible.
-
-This is where Vim does not behave as POSIX specifies and why:
-
- *posix-screen-size*
- The $COLUMNS and $LINES environment variables are ignored by Vim if
- the size can be obtained from the terminal in a more reliable way.
- Add the '|' flag to 'cpoptions' to have $COLUMNS and $LINES overrule
- sizes obtained in another way.
-
- The "{" and "}" commands don't stop at a "{" in the original Vi, but
- POSIX specifies it does. Add the '{' flag to 'cpoptions' if you want
- it the POSIX way.
-
- The "D", "o" and "O" commands accept a count. Also when repeated.
- Add the '#' flag to 'cpoptions' if you want to ignore the count.
-
- The ":cd" command fails if the current buffer is modified when the '.'
- flag is present in 'cpoptions'.
-
- There is no ATTENTION message, the "A" flag is added to 'shortmess'.
-
-These are remarks about running the POSIX test suite:
-- vi test 33 sometimes fails for unknown reasons
-- vi test 250 fails; behavior will be changed in a new revision
- http://www.opengroup.org/austin/mailarchives/ag-review/msg01710.html
- (link no longer works, perhaps it's now:
- https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=show_archive.tpl&source=L&listname=austin-review-l&id=1711)
-- vi test 310 fails; exit code non-zero when any error occurred?
-- ex test 24 fails because test is wrong. Changed between SUSv2 and SUSv3.
-- ex tests 47, 48, 49, 72, 73 fail because .exrc file isn't read in silent
- mode and $EXINIT isn't used.
-- ex tests 76, 78 fail because echo is used instead of printf. (fixed)
- Also: problem with \s not changed to space.
-- ex test 355 fails because 'window' isn't used for "30z".
-- ex test 368 fails because shell command isn't echoed in silent mode.
-- ex test 394 fails because "=" command output isn't visible in silent mode.
-- ex test 411 fails because test file is wrong, contains stray ':'.
-- ex test 475 and 476 fail because reprint output isn't visible in silent mode.
-- ex test 480 and 481 fail because the tags file has spaces instead of a tab.
-- ex test 502 fails because .exrc isn't read in silent mode.
-- ex test 509 fails because .exrc isn't read in silent mode. and exit code is
- 1 instead of 2.
-- ex test 534 fails because .exrc isn't read in silent mode.
-
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 557f23dd4b..5d4e6861f5 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -35,6 +35,7 @@ these differences.
- 'display' defaults to "lastline"
- 'encoding' defaults to "utf-8"
- 'formatoptions' defaults to "tcqj"
+- 'history' defaults to 10000 (the maximum)
- 'hlsearch' is set by default
- 'incsearch' is set by default
- 'langnoremap' is set by default
@@ -63,11 +64,21 @@ are always available and may be used simultaneously in separate plugins. The
`neovim` pip package must be installed to use Python plugins in Nvim (see
|nvim-python|).
+|mkdir()| behaviour changed:
+1. Assuming /tmp/foo does not exist and /tmp can be written to
+ mkdir('/tmp/foo/bar', 'p', 0700) will create both /tmp/foo and /tmp/foo/bar
+ with 0700 permissions. Vim mkdir will create /tmp/foo with 0755.
+2. If you try to create an existing directory with `'p'` (e.g. mkdir('/',
+ 'p')) mkdir() will silently exit. In Vim this was an error.
+3. mkdir() error messages now include strerror() text when mkdir fails.
+
==============================================================================
4. New Features *nvim-features-new*
See |nvim-intro| for a list of Nvim's largest new features.
+|bracketed-paste-mode| is built-in and enabled by default.
+
Meta (alt) chords are recognized (even in the terminal).
<M-1>, <M-2>, ...
<M-BS>, <M-Del>, <M-Ins>, ...
@@ -135,6 +146,7 @@ Highlight groups:
|hl-VisualNOS|
Other options:
+ 'cpoptions' ('g', 'w', 'H', '*', '-', 'j', and all POSIX flags were removed)
'guioptions' (only the 't' flag was removed)
'guipty'
'macatsui'
@@ -148,6 +160,7 @@ Other options:
'weirdinvert'
Other commands:
+ :Print
:fixdel
:mode (no longer accepts an argument)
:shell
diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt
index ba69b7cf2f..39d3c43d97 100644
--- a/runtime/doc/windows.txt
+++ b/runtime/doc/windows.txt
@@ -1,4 +1,4 @@
-*windows.txt* For Vim version 7.4. Last change: 2014 Sep 23
+*windows.txt* For Vim version 7.4. Last change: 2014 Dec 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -280,7 +280,7 @@ CTRL-W CTRL-Q *CTRL-W_CTRL-Q*
" if there are less than 9 windows opened
:-quit " quit the previous window
:+quit " quit the next window
- :+2quit " will also work as expected
+ :+2quit " quit the second next window
<
:q[uit]!
:{count}q[uit]!
@@ -324,9 +324,9 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C*
screen. For {count} see |:quit|.
The buffer becomes hidden (unless there is another window
- editing it or 'bufhidden' is `unload` or `delete`). If the
- window is the last one in the current tab page the tab page is
- closed. |tab-page|
+ editing it or 'bufhidden' is `unload`, `delete` or `wipe`).
+ If the window is the last one in the current tab page the tab
+ page is closed. |tab-page|
The value of 'hidden' is irrelevant for this command.
Changes to the buffer are not written and won't get lost, so
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index d7bac1bdcf..71d6b0b25a 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2014 Nov 05
+" Last Change: 2014 Dec 06
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -1852,7 +1852,7 @@ au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
" Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
-au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,*.bash,*.ebuild,PKGBUILD* call SetFileTypeSH("bash")
+au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,.bash_aliases*,*.bash,*.ebuild,PKGBUILD* call SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc*,*.ksh call SetFileTypeSH("ksh")
au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call SetFileTypeSH(getline(1))
@@ -2506,6 +2506,8 @@ au BufNewFile,BufRead */etc/yum.conf setf dosini
" Zimbu
au BufNewFile,BufRead *.zu setf zimbu
+" Zimbu Templates
+au BufNewFile,BufRead *.zut setf zimbutempl
" Zope
" dtml (zope dynamic template markup language), pt (zope page template),
diff --git a/runtime/indent/php.vim b/runtime/indent/php.vim
index b83a1923ed..1bffa7f195 100644
--- a/runtime/indent/php.vim
+++ b/runtime/indent/php.vim
@@ -3,8 +3,8 @@
" Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr>
" URL: http://www.2072productions.com/vim/indent/php.vim
" Home: https://github.com/2072/PHP-Indenting-for-VIm
-" Last Change: 2014 April 3rd
-" Version: 1.49
+" Last Change: 2014 November 26th
+" Version: 1.57
"
"
" Type :help php-indent for available options
@@ -48,7 +48,7 @@ endif
let b:did_indent = 1
-let php_sync_method = 0
+let g:php_sync_method = 0
@@ -112,7 +112,7 @@ setlocal nocindent
setlocal nolisp
setlocal indentexpr=GetPhpIndent()
-setlocal indentkeys=0{,0},0),:,!^F,o,O,e,*<Return>,=?>,=<?,=*/
+setlocal indentkeys=0{,0},0),0],:,!^F,o,O,e,*<Return>,=?>,=<?,=*/
@@ -128,11 +128,14 @@ if exists("*GetPhpIndent")
endif
+let s:PHP_validVariable = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)'
let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|\%(}\s*\)\?else\>\|do\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|trait\>\|use\>\|interface\>\|abstract\>\|final\>\|try\>\|\%(}\s*\)\=catch\>\|\%(}\s*\)\=finally\>\)'
-let s:functionDecl = '\<function\>\%(\s\+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\)\=\s*(.*'
+let s:functionDecl = '\<function\>\%(\s\+'.s:PHP_validVariable.'\)\=\s*(.*'
let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
-let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\)'.s:endline.'\)\|^[^''"`]*[''"`]$'
+
+
+let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|^\s*'.s:PHP_validVariable.':\)'.s:endline.'\)\|^[^''"`]*[''"`]$'
let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
@@ -140,7 +143,7 @@ let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
let s:escapeDebugStops = 0
function! DebugPrintReturn(scriptLine)
- if ! s:escapeDebugStops
+ if ! s:escapeDebugStops
echo "debug:" . a:scriptLine
let c = getchar()
if c == "\<Del>"
@@ -158,8 +161,6 @@ function! GetLastRealCodeLNum(startline) " {{{
let lnum = b:GetLastRealCodeLNum_ADD
endif
- let old_lnum = lnum
-
while lnum > 1
let lnum = prevnonblank(lnum)
let lastline = getline(lnum)
@@ -217,7 +218,7 @@ function! GetLastRealCodeLNum(startline) " {{{
let lnum=0
endif
- if b:InPHPcode_and_script && !b:InPHPcode
+ if b:InPHPcode_and_script && 1 > b:InPHPcode
let b:InPHPcode_and_script = 0
endif
@@ -237,7 +238,7 @@ endfun
function! Skippmatch() " {{{
let synname = synIDattr(synID(line("."), col("."), 0), "name")
- if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname =~# "^phpComment" && b:UserIsTypingComment
+ if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname =~# '^php\%(Doc\)\?Comment' && b:UserIsTypingComment
return 0
else
return 1
@@ -249,7 +250,7 @@ function! FindOpenBracket(lnum, blockStarter) " {{{
let line = searchpair('{', '', '}', 'bW', 'Skippmatch()')
if a:blockStarter == 1
- while line > 1
+ while line > 1
let linec = getline(line)
if linec =~ s:terminated || linec =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
@@ -310,7 +311,6 @@ let s:defaultORcase = '^\s*\%(default\|case\).*:'
function! FindTheSwitchIndent (lnum) " {{{
-
let test = GetLastRealCodeLNum(a:lnum - 1)
if test <= 1
@@ -353,7 +353,7 @@ function! IslinePHP (lnum, tofind) " {{{
if synname == 'phpStringSingle' || synname == 'phpStringDouble' || synname == 'phpBacktick'
if cline !~ '^\s*[''"`]'
- return ""
+ return "SpecStringEntrails"
else
return synname
end
@@ -372,7 +372,7 @@ if ! s:autoresetoptions
endif
function! ResetPhpOptions()
- if ! b:optionsset && &filetype == "php"
+ if ! b:optionsset && &filetype =~ "php"
if b:PHP_autoformatcomment
setlocal comments=s1:/*,mb:*,ex:*/,://,:#
@@ -418,7 +418,7 @@ function! GetPhpIndent()
let b:PHP_indentinghuge = 0
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
endif
- let b:PHP_lastindented = v:lnum
+ let real_PHP_lastindented = v:lnum
let b:PHP_LastIndentedWasComment=0
let b:PHP_InsideMultilineComment=0
let b:PHP_indentbeforelast = 0
@@ -430,9 +430,12 @@ function! GetPhpIndent()
elseif v:lnum > b:PHP_lastindented
let real_PHP_lastindented = b:PHP_lastindented
- let b:PHP_lastindented = v:lnum
+ else
+ let real_PHP_lastindented = v:lnum
endif
+ let b:PHP_lastindented = v:lnum
+
if !b:InPHPcode_checked " {{{ One time check
let b:InPHPcode_checked = 1
@@ -443,11 +446,15 @@ function! GetPhpIndent()
endif
if synname!=""
- if synname != "phpHereDoc" && synname != "phpHereDocDelimiter"
+ if synname == "SpecStringEntrails"
+ let b:InPHPcode = -1 " thumb down
+ let b:UserIsTypingComment = 0
+ let b:InPHPcode_tofind = ""
+ elseif synname != "phpHereDoc" && synname != "phpHereDocDelimiter"
let b:InPHPcode = 1
let b:InPHPcode_tofind = ""
- if synname =~# "^phpComment"
+ if synname =~# '^php\%(Doc\)\?Comment'
let b:UserIsTypingComment = 1
else
let b:UserIsTypingComment = 0
@@ -483,9 +490,16 @@ function! GetPhpIndent()
if b:InPHPcode_tofind!=""
if cline =~? b:InPHPcode_tofind
- let b:InPHPcode = 1
let b:InPHPcode_tofind = ""
let b:UserIsTypingComment = 0
+
+ if b:InPHPcode == -1
+ let b:InPHPcode = 1
+ return -1
+ end
+
+ let b:InPHPcode = 1
+
if cline =~ '\*/'
call cursor(v:lnum, 1)
if cline !~ '^\*/'
@@ -510,7 +524,7 @@ function! GetPhpIndent()
endif
endif
- if b:InPHPcode
+ if 1 == b:InPHPcode
if !b:InPHPcode_and_script && last_line =~ '\%(<?.*\)\@<!?>\%(.*<?\)\@!' && IslinePHP(lnum, '?>')=~"Delimiter"
if cline !~? s:PHP_startindenttag
@@ -520,8 +534,8 @@ function! GetPhpIndent()
let b:InPHPcode_and_script = 1
endif
- elseif last_line =~ '^[^''"`]\+[''"`]$' " a string identifier with nothing after it and no other string identifier before
- let b:InPHPcode = 0
+ elseif last_line =~ '^[^''"`]\+[''"`]$'
+ let b:InPHPcode = -1
let b:InPHPcode_tofind = substitute( last_line, '^.*\([''"`]\).*$', '^[^\1]*\1[;,]$', '')
elseif last_line =~? '<<<''\=\a\w*''\=$'
let b:InPHPcode = 0
@@ -538,7 +552,7 @@ function! GetPhpIndent()
endif " }}}
- if !b:InPHPcode && !b:InPHPcode_and_script
+ if 1 > b:InPHPcode && !b:InPHPcode_and_script
return -1
endif
@@ -568,7 +582,7 @@ function! GetPhpIndent()
endif
endif
- if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*' && cline !~ '\*/\s*$'
+ if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*\%(.*\*/\)\@!'
if getline(v:lnum + 1) !~ '^\s*\*'
return -1
endif
@@ -669,17 +683,17 @@ function! GetPhpIndent()
endwhile
elseif last_line =~# unstated && cline !~ '^\s*);\='.endline
- let ind = ind + &sw " we indent one level further when the preceding line is not stated
+ let ind = ind + &sw
return ind + addSpecial
- elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated " Added || last_line =~ '^)' on 2007-12-30 (array indenting problem broke other things)
+ elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated
let previous_line = last_line
let last_line_num = lnum
let LastLineClosed = 1
let isSingleLineBlock = 0
while 1
- if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline " XXX
+ if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline
call cursor(last_line_num, 1)
if previous_line !~ '^}'
@@ -740,14 +754,19 @@ function! GetPhpIndent()
endif
endif
- let plinnum = GetLastRealCodeLNum(lnum - 1)
+ if (last_line !~ '^\s*}\%(}}\)\@!')
+ let plinnum = GetLastRealCodeLNum(lnum - 1)
+ else
+ let plinnum = GetLastRealCodeLNum(FindOpenBracket(lnum, 1) - 1)
+ endif
+
let AntepenultimateLine = getline(plinnum)
let last_line = substitute(last_line,"\\(//\\|#\\)\\(\\(\\([^\"']*\\([\"']\\)[^\"']*\\5\\)\\+[^\"']*$\\)\\|\\([^\"']*$\\)\\)",'','')
if ind == b:PHP_default_indenting
- if last_line =~ terminated
+ if last_line =~ terminated && last_line !~# s:defaultORcase
let LastLineClosed = 1
endif
endif
@@ -755,10 +774,10 @@ function! GetPhpIndent()
if !LastLineClosed
- if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(]'.endline
+ if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(\[]'.endline
let dontIndent = 0
- if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
+ if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*)\s*{'.endline && last_line !~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
let dontIndent = 1
endif
@@ -774,7 +793,7 @@ function! GetPhpIndent()
elseif last_line =~ '\S\+\s*),'.endline
call cursor(lnum, 1)
- call search('),'.endline, 'W') " line never begins with ) so no need for 'c' flag
+ call search('),'.endline, 'W')
let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()')
if openedparent != lnum
let ind = indent(openedparent)
@@ -784,7 +803,7 @@ function! GetPhpIndent()
let ind = ind + &sw
- elseif AntepenultimateLine =~ '\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|{\)'.endline . '\|' . s:defaultORcase
+ elseif AntepenultimateLine =~ '{'.endline || AntepenultimateLine =~ terminated || AntepenultimateLine =~# s:defaultORcase
let ind = ind + &sw
endif
diff --git a/runtime/macros/editexisting.vim b/runtime/macros/editexisting.vim
index c18f22569f..3530e29dc4 100644
--- a/runtime/macros/editexisting.vim
+++ b/runtime/macros/editexisting.vim
@@ -1,6 +1,6 @@
" Vim Plugin: Edit the file with an existing Vim if possible
" Maintainer: Bram Moolenaar
-" Last Change: 2013 Feb 24
+" Last Change: 2014 Dec 06
" This is a plugin, drop it in your (Unix) ~/.vim/plugin or (Win32)
" $VIM/vimfiles/plugin directory. Or make a symbolic link, so that you
@@ -112,7 +112,7 @@ func! EditExisting(fname, command)
endif
if a:command != ''
- exe "normal " . a:command
+ exe "normal! " . a:command
endif
redraw
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index b200d43f73..e23232bbbe 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 7.4 script
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: Mar 20, 2014
-" Version: 7.4-27
+" Last Change: Apr 02, 2015
+" Version: 7.4-33
" Automatically generated keyword lists: {{{1
" Quit when a syntax file was already loaded {{{2
@@ -14,67 +14,48 @@ set cpo&vim
" vimTodo: contains common special-notices for comments {{{2
" Use the vimCommentGroup cluster to add your own.
+syn keyword vimTodo contained COMBAK FIXME TODO XXX
syn cluster vimCommentGroup contains=vimTodo,@Spell
-" regular vim commands {{{2
-syn keyword vimCommand contained a arga[dd] ar[gs] bd[elete] bN[ext] breakd[el] bufdo cabc[lear] cat[ch] cex[pr] c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpt[ags] iabc[lear] intro k l lan lc[d] lefta[bove] lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] o ownsyntax pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] r[ead] redr[aw] retu[rn] rub[y] rv[iminfo] sba[ll] sbN[ext] scripte[ncoding] setf[iletype] sh[ell] sim[alt] sm[ap] sni[ff] sor[t] spelli[nfo] spr[evious] start st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tj[ump] tN tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] xnoremenu
-syn keyword vimCommand contained ab argd[elete] argu[ment] bel[owright] bo[tright] breakl[ist] b[uffer] cad cb[uffer] cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h hi if is[earch] keepa la lan[guage] lch[dir] lex[pr] lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] rec[over] redraws[tatus] rew[ind] sal[l] sbf[irst] sbp[revious] scrip[tnames] setg[lobal] si sl sme sno[magic] so[urce] spellr[epall] sre[wind] startg[replace] stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tl[ast] tn[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xunme
-syn keyword vimCommand contained abc[lear] argdo as[cii] bf[irst] bp[revious] br[ewind] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] ma menut[ranslate] mksp[ell] m[ove] nb[key] noa omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] red reg[isters] ri[ght] san[dbox] sbl[ast] sbr[ewind] scs setl[ocal] sig sla[st] smenu snoreme spe spellu[ndo] st star[tinsert] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xunmenu
-syn keyword vimCommand contained abo[veleft] arge[dit] au bl[ast] br bro[wse] bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] mak[e] mes mkv nbs[tart] noautocmd on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r redi[r] res[ize] rightb[elow] rundo sa[rgument] sbm[odified] sb[uffer] scscope sf[ind] sign sl[eep] sn[ext] snoremenu spelld[ump] spellw[rong] sta[g] startr[eplace] sun[hide] sw[apname] syntime tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xwininfo
-syn keyword vimCommand contained al[l] argg[lobal] bad[d] bm[odified] brea[k] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] ma[rk] messages mkvie[w] ne noh[lsearch] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re red[o] ret[ab] ru ru[ntime] sav[eas] sbn[ext] scrip se[t] sfir[st] sil[ent] sm[agic] sN[ext] so spe[llgood] sp[lit] star stj[ump] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] xnoreme y[ank]
-syn keyword vimCommand contained ar argl[ocal] ba[ll] bn[ext] breaka[dd] buf c cal[l] ce[nter] cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] le[ft] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] new nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q
+" Special and plugin vim commands {{{2
syn match vimCommand contained "\<z[-+^.=]\="
-syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns
-
-" vimOptions are caught only when contained in a vimSet {{{2
-syn keyword vimOption contained acd ambiwidth arabicshape autowriteall backupdir bdlay binary breakat bufhidden cd ci cinw co commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs filetype fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident langmap lines lmap ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pi previewwindow printmbfont qe relativenumber rightleftcmd ru sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wcm whichwrap wildignore winaltkeys winminwidth wmnu write
-syn keyword vimOption contained ai ambw ari aw backupext beval brk buflisted cdpath cin cinwords cocu compatible cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fic fillchars foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu linespace loadplugins maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape remap rl ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax taglength tbidi terse tildeop tl tr tty tw undofile vb vi wa wd wi wildignorecase window winwidth wmw writeany
-syn keyword vimOption contained akm anti arshape awa backupskip bex browsedir buftype cedit cindent clipboard cole complete crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencoding fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel laststatus lisp lpl magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste pex pmbcs printencoding prompt rdt report rlc ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta tagrelative tbis textauto timeout tm ts tx undolevels vbs viewdir wak wic wildmenu winfixheight wop writebackup
-syn keyword vimOption contained al antialias autochdir background balloondelay bexpr bk bs casemap cf cink cmdheight colorcolumn completefunc copyindent cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileencodings fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg lazyredraw lispwords ls makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pexpr pmbfn printexpr pt re restorescreen rnu rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tags tbs textmode timeoutlen to uc undoreload vdir viewoptions warn wfh wig wildmode winfixwidth wiw wrap writedelay
-syn keyword vimOption contained aleph ar autoindent backspace ballooneval bg bkc bsdir cb cfu cinkeys cmdwinheight columns completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformat flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lbr list lsp makeprg maxmem mh mmp more mouses nuw opfunc patchexpr pfn popt printfont pumheight readonly revins ro runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tagstack textwidth title toolbar tsr udf updatecount ve viminfo wb wfw wildchar wildoptions winheight wm wrapmargin ws
-syn keyword vimOption contained allowrevins arab autoread backup balloonexpr bh bl bsk cc ch cino cmp com concealcursor cp cscopeprg csprg cul def diff display endofline errorformat fcl fdm fex fileformats fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lcs listchars lw mat maxmempattern mis mmt mouse mouseshape odev patchmode ph preserveindent printheader pvh redrawtime ri rs sb scrollbind secure shcf shelltemp shortmess showtabline slm spellcapcheck splitright ssop stmp swapfile sxq tabstop tal term titlelen toolbariconsize ttimeout udir updatetime verbose virtualedit wc wh wildcharm wim winminheight wmh wrapscan ww
-syn keyword vimOption contained altkeymap arabic autowrite backupcopy bdir bin bomb bt ccv charconvert cinoptions cms comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fileignorecase fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp linebreak lm lz matchpairs maxmemtot mkspellmem mod mousef mouset nf pa path pheader previewheight printmbcharset pvw regexpengine rightleft rtp sbo scrolljump sel shell shq sm so spellfile spr st sts swapsync syn tag tb termbidi tgst titleold top ttimeoutlen ul ur unnamedclip unc verbosefile visualbell
-
-" vimOptions: These are the turn-off setting variants {{{2
-syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noendofline noerrorbells noex nofen nofk nogd nohid nohkmap nohkp nohlsearch noicon noim noimcmdline noimdisable noinf noinsertmode nojoinspaces nolazyredraw nolinebreak nolist nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbs noterse notextmode notgst notimeout noto notr notx noundofile novisualbell nowarn nowfw nowildignorecase nowinfixheight nowrap nowrite nowritebackup
-syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobl nocf nocindent nocp nocscopetag nocst nocul nocursorline nodg noea noeol noesckeys noexpandtab nofic nofkmap nogdefault nohidden nohkmapp nohls noic noignorecase noimc noimd noincsearch noinfercase nois nojs nolbr nolisp noloadplugins nolz nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notildeop notitle notop nottimeout noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
-syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobomb noci nocompatible nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexrc nofileignorecase nofoldenable noguipty nohk
-
-" vimOptions: These are the invertible variants {{{2
-syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbuflisted invcin invconfirm invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph invendofline inverrorbells invex invfen invfk invgd invhid invhkmap invhkp invhlsearch invicon invim invimcmdline invimdisable invinf invinsertmode invjoinspaces invlazyredraw invlinebreak invlist invlpl invma invmagic invml invmodeline invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscs invsft invshelltemp invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbs invterse invtextmode invtgst invtimeout invto invtr invtx invundofile invvisualbell invwarn invwfw invwildignorecase invwinfixheight invwrap invwrite invwritebackup
-syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbl invcf invcindent invcp invcscopetag invcst invcul invcursorline invdg invea inveol invesckeys invexpandtab invfic invfkmap invgdefault invhidden invhkmapp invhls invic invignorecase invimc invimd invincsearch invinfercase invis invjs invlbr invlisp invloadplugins invlz invmh invmod invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtildeop invtitle invtop invttimeout invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
-syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbomb invci invcompatible invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfoldenable invguipty invhk
+syn keyword vimOnlyCommand contained fix[del] sh[ell] P[rint]
+syn keyword vimStdPlugin contained DiffOrig Man N[ext] S TOhtml XMLent XMLns
+" Vim-specific options {{{2
+syn keyword vimOnlyOption contained biosk bioskey cp compatible consk conskey cm cryptmethod edcompatible guipty key macatsui mzq mzquantum osfiletype oft renderoptions rop st shelltype sn shortname tenc termencoding ta textauto tx textmode tf ttyfast ttym ttymouse tbi ttybuiltin wiv weirdinvert
+
+" Turn-off setting variants
+syn keyword vimOnlyOption contained nobiosk nobioskey noconsk noconskey nocp nocompatible noguipty nomacatsui nosn noshortname nota notextauto notx notextmode notf nottyfast notbi nottybuiltin nowiv noweirdinvert
+
+" Invertible setting variants
+syn keyword vimOnlyOption contained invbiosk invbioskey invconsk invconskey invcp invcompatible invguipty invmacatsui invsn invshortname invta invtextauto invtx invtextmode invtf invttyfast invtbi invttybuiltin invwiv invweirdinvert
" termcap codes (which can also be set) {{{2
-syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CS t_CV t_da t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xs t_ZH t_ZR
-syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm t_cs
-syn match vimOption contained "t_%1"
-syn match vimOption contained "t_#2"
-syn match vimOption contained "t_#4"
-syn match vimOption contained "t_@7"
-syn match vimOption contained "t_*7"
-syn match vimOption contained "t_&8"
-syn match vimOption contained "t_%i"
-syn match vimOption contained "t_k;"
-
-" AutoCmd Events {{{2
+syn keyword vimTermOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CS t_CV t_da t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xs t_ZH t_ZR
+syn keyword vimTermOption contained t_AF t_AL t_cd t_Ce t_cm t_cs
+syn match vimTermOption contained "t_%1"
+syn match vimTermOption contained "t_#2"
+syn match vimTermOption contained "t_#4"
+syn match vimTermOption contained "t_@7"
+syn match vimTermOption contained "t_*7"
+syn match vimTermOption contained "t_&8"
+syn match vimTermOption contained "t_%i"
+syn match vimTermOption contained "t_k;"
+
+" unsupported settings: these are supported by vi but don't do anything in vim {{{2
+syn keyword vimErrSetting contained hardtabs ht w1200 w300 w9600
+"}}}2
syn case ignore
-syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TabNew TabNewEntered TabClosed TermChanged TermResponse TextChanged TextChangedI User UserGettingBored VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave
-
" Highlight commonly used Groupnames {{{2
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
" Default highlighting groups {{{2
-syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel TermCursor TermCursorNC Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
+syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual WarningMsg WildMenu
syn match vimHLGroup contained "Conceal"
+syn keyword vimOnlyHLGroup contained VisualNOS
+syn keyword nvimHLGroup contained EndOfBuffer TermCursor TermCursorNC
+"}}}2
syn case match
-
-" Function Names {{{2
-syn keyword vimFuncName contained abs and argidx atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add copy count deepcopy diff_filler escape executable expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcmdline getcwd getfsize getline getpid getreg gettabwinvar getwinvar has hasmapto histget hlID indent inputdialog inputsave invert items len line localtime mapcheck matcharg matchlist min or prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setpos setreg settabwinvar sha256 shiftwidth sin sort spellbadword split str2float strchars strftime string strpart strtrans submatch synconcealed synIDattr synstack tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree virtcol wildmenumode wincol winline winrestcmd winsaveview writefile
-syn keyword vimFuncName contained acos append argv atan2 bufexists bufname byte2line call char2nr col complete_check cos cscope_connection delete diff_hlID eval exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdpos getfontname getftime getloclist getpos getregtype getwinposx glob has_key histadd histnr hostname index inputlist inputsecret isdirectory join libcall line2byte log map match matchdelete matchstr mkdir nextnonblank pathshorten printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setline setmatches setqflist settabvar setwinvar shellescape simplify sinh soundfold spellsuggest sqrt str2nr strdisplaywidth stridx strlen strridx strwidth substitute synID synIDtrans system tabpagenr tagfiles tan tempname toupper trunc undofile values visualmode winbufnr winheight winnr winrestview winwidth xor
-syn keyword vimFuncName contained add argc asin browse buflisted bufnr byteidx ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdtype getfperm getftype getmatches getqflist gettabvar getwinposy globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked keys libcallnr lispindent log10 maparg matchadd matchend max mode nr2char pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client jobsend jobstart jobstop rpcnotify rpcrequest rpcstart rpcstop
-
-"--- syntax here and above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
" commands not picked up by the generator (due to non-standard format)
@@ -96,11 +77,11 @@ endif
syn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
syn match vimNumber "-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
syn match vimNumber "\<0[xX]\x\+"
-syn match vimNumber "#\x\{6}"
+syn match vimNumber "\%(^\|[^a-zA-Z]\)\zs#\x\{6}"
" All vimCommands are contained by vimIsCommands. {{{2
-syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd
-syn match vimIsCommand "\<\h\w*\>" contains=vimCommand
+syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimCommand,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd,vimOnlyCommand
+syn match vimIsCommand "\<\h\w*\>" contains=vimCommand,vimOnlyCommand
syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>"
syn match vimVar "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>"
syn match vimFBVar contained "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>"
@@ -131,13 +112,13 @@ syn keyword vimFTOption contained detect indent off on plugin
" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
-syn cluster vimAugroupList contains=vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
+syn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'a'
- syn region vimAugroup fold start="\<aug\%[roup]\>\s\+\h\w*" end="\<aug\%[roup]\>\s\+[eE][nN][dD]\>" contains=vimAugroupKey,vimAutoCmd,@vimAugroupList keepend
+ syn region vimAugroup fold matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
else
- syn region vimAugroup start="\<aug\%[roup]\>\s\+\h\w*" end="\<aug\%[roup]\>\s\+[eE][nN][dD]\>" contains=vimAugroupKey,vimAutoCmd,@vimAugroupList keepend
+ syn region vimAugroup matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
endif
-syn match vimAugroup "aug\%[roup]!" contains=vimAugroupKey
+syn match vimAugroup "aug\%[roup]!" contains=vimAugroupKey
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror")
syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
endif
@@ -145,7 +126,6 @@ syn keyword vimAugroupKey contained aug[roup]
" Operators: {{{2
" =========
-" COMBAK: vimOperParen used to have "oneline"
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue
syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile
@@ -158,15 +138,15 @@ endif
" Functions : Tag is provided for those who wish to highlight tagged functions {{{2
" =========
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
-syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
+syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand,nvimUnmap,nvimMap
syn match vimFunction "\<fu\%[nction]!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'f'
- syn region vimFuncBody contained fold start="\ze(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
+ syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
else
- syn region vimFuncBody contained start="\ze(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
+ syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
endif
-syn match vimFuncVar contained "a:\(\h\w*\|\d\+\)"
+syn match vimFuncVar contained "a:\(\K\k*\|\d\+\)"
syn match vimFuncSID contained "\c<sid>\|\<s:"
syn keyword vimFuncKey contained fu[nction]
syn match vimFuncBlank contained "\s\+"
@@ -187,14 +167,16 @@ syn match vimSpecFileMod "\(:[phtre]\)\+" contained
" =======================
syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vimCtrlChar,vimEscapeBrace,vimFilter,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
syn keyword vimUserCommand contained com[mand]
-syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserCommand,@vimUserCmdList
-syn match vimUserAttrb contained "-n\%[args]=[01*?+]" contains=vimUserAttrbKey,vimOper
-syn match vimUserAttrb contained "-com\%[plete]=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError
-syn match vimUserAttrb contained "-ra\%[nge]\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey
-syn match vimUserAttrb contained "-cou\%[nt]=\d\+" contains=vimNumber,vimOper,vimUserAttrbKey
-syn match vimUserAttrb contained "-bang\=\>" contains=vimOper,vimUserAttrbKey
-syn match vimUserAttrb contained "-bar\>" contains=vimOper,vimUserAttrbKey
-syn match vimUserAttrb contained "-re\%[gister]\>" contains=vimOper,vimUserAttrbKey
+syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList
+syn match vimUserAttrbError contained "-\a\+\ze\s"
+syn match vimUserAttrb contained "-nargs=[01*?+]" contains=vimUserAttrbKey,vimOper
+syn match vimUserAttrb contained "-complete=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError
+syn match vimUserAttrb contained "-range\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey
+syn match vimUserAttrb contained "-count\(=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey
+syn match vimUserAttrb contained "-bang\>" contains=vimOper,vimUserAttrbKey
+syn match vimUserAttrb contained "-bar\>" contains=vimOper,vimUserAttrbKey
+syn match vimUserAttrb contained "-buffer\>" contains=vimOper,vimUserAttrbKey
+syn match vimUserAttrb contained "-register\>" contains=vimOper,vimUserAttrbKey
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror")
syn match vimUserCmdError contained "\S\+\>"
endif
@@ -268,7 +250,7 @@ syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumbe
syn match vimMarkNumber "[-+]\d\+" nextgroup=vimSubst contained contains=vimOper
syn match vimPlainMark contained "'[a-zA-Z0-9]"
-syn match vimRegister '[^,;[{]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]'
+syn match vimRegister '[^,;[{: \t]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]'
syn match vimRegister '\<norm\s\+\zs"[a-zA-Z0-9]'
syn match vimRegister '\<normal\s\+\zs"[a-zA-Z0-9]'
syn match vimRegister '@"'
@@ -285,10 +267,10 @@ syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1
syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
" Set command and associated set-options (vimOptions) with comment {{{2
-syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod
+syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod,vimTermOption,vimOnlyOption
syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline
syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
-syn match vimSetSep contained "[,:]"
+syn match vimSetSep contained "[,:]" skipwhite nextgroup=vimCommand
syn match vimSetMod contained "&vim\=\|[!&?<]\|all&"
" Let {{{2
@@ -301,7 +283,7 @@ syn keyword vimAbb ab[breviate] ca[bbrev] inorea[bbrev] cnorea[bbrev] norea[bbre
" Autocmd {{{2
" =======
-syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace
+syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent,nvimAutoEvent nextgroup=vimAutoCmdSpace
syn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList
syn match vimAutoCmdSfxList contained "\S*"
syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList
@@ -310,7 +292,7 @@ syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vim
" ================
syn region vimEcho oneline excludenl matchgroup=vimCommand start="\<ec\%[ho]\>" skip="\(\\\\\)*\\|" end="$\||" contains=vimFunc,vimFuncVar,vimString,vimVar
syn region vimExecute oneline excludenl matchgroup=vimCommand start="\<exe\%[cute]\>" skip="\(\\\\\)*\\|" end="$\||\|<[cC][rR]>" contains=vimFuncVar,vimIsCommand,vimOper,vimNotation,vimOperParen,vimString,vimVar
-syn match vimEchoHL "echohl\=" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchoHLNone
+syn match vimEchoHL "echohl\=" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchoHLNone,vimOnlyHLGroup,nvimHLGroup
syn case ignore
syn keyword vimEchoHLNone none
syn case match
@@ -319,15 +301,17 @@ syn case match
" ====
syn match vimMap "\<map\>!\=\ze\s*[^(]" skipwhite nextgroup=vimMapMod,vimMapLhs
syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] vm[ap] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
+syn keyword nvimMap tn[oremap] tm[ap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
syn keyword vimMap mapc[lear] smapc[lear]
syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] unm[ap] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
+syn keyword nvimUnmap tunm[ap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs
syn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs
-syn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
+syn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
syn match vimMapRhs contained ".*" contains=vimNotation,vimCtrlChar skipnl nextgroup=vimMapRhsExtend
-syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimNotation,vimCtrlChar,vimContinue skipnl nextgroup=vimMapRhsExtend
+syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimContinue
syn case ignore
-syn keyword vimMapModKey contained buffer expr leader localleader plug script sid silent unique
+syn keyword vimMapModKey contained buffer expr leader localleader nowait plug script sid silent unique
syn case match
" Menus {{{2
@@ -357,8 +341,8 @@ syn case match
" User Function Highlighting {{{2
" (following Gautam Iyer's suggestion)
" ==========================
-syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute
-syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation
+syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_.]\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute
+syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_.]\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<return\>\|\<while\>"
" Errors And Warnings: {{{2
@@ -404,7 +388,7 @@ syn keyword vimSynType contained clear skipwhite nextgroup=vimGroupList
" Syntax: cluster {{{2
syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName
-syn region vimClusterName contained matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
+syn region vimClusterName contained matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
syn match vimGroupAdd contained "add=" nextgroup=vimGroupList
syn match vimGroupRem contained "remove=" nextgroup=vimGroupList
syn cluster vimFuncBodyList add=vimSynType,vimGroupAdd,vimGroupRem
@@ -416,14 +400,14 @@ syn cluster vimFuncBodyList add=vimSynType
" Syntax: keyword {{{2
syn cluster vimSynKeyGroup contains=vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin
syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion
-syn region vimSynKeyRegion contained oneline keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup
+syn region vimSynKeyRegion contained oneline keepend matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup
syn match vimSynKeyOpt contained "\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
syn cluster vimFuncBodyList add=vimSynType
" Syntax: match {{{2
syn cluster vimSynMtchGroup contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation
syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
-syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup
+syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\k\+" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup
syn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
if has("conceal")
syn match vimSynMtchOpt contained "\<cchar=" nextgroup=vimSynMtchCchar
@@ -438,10 +422,10 @@ syn keyword vimSynType contained enable list manual off on reset
syn cluster vimSynRegPatGroup contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation
syn cluster vimSynRegGroup contains=vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp
syn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion
-syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" end="|\|$" contains=@vimSynRegGroup
+syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" end="|\|$" contains=@vimSynRegGroup
syn match vimSynRegOpt contained "\<\(conceal\(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>"
syn match vimSynReg contained "\(start\|skip\|end\)="he=e-1 nextgroup=vimSynRegPat
-syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup
+syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup,vimOnlyHLGroup,nvimHLGroup
syn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg
syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\="
syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod
@@ -464,9 +448,9 @@ syn keyword vimSyncRegion contained region skipwhite nextgroup=vimSynReg
syn match vimSyncLinebreak contained "\<linebreaks=" skipwhite nextgroup=vimNumber
syn keyword vimSyncLinecont contained linecont skipwhite nextgroup=vimSynRegPat
syn match vimSyncLines contained "\(min\|max\)\=lines=" nextgroup=vimNumber
-syn match vimSyncGroupName contained "\h\w*" skipwhite nextgroup=vimSyncKey
+syn match vimSyncGroupName contained "\k\+" skipwhite nextgroup=vimSyncKey
syn match vimSyncKey contained "\<groupthere\|grouphere\>" skipwhite nextgroup=vimSyncGroup
-syn match vimSyncGroup contained "\h\w*" skipwhite nextgroup=vimSynRegPat,vimSyncNone
+syn match vimSyncGroup contained "\k\+" skipwhite nextgroup=vimSynRegPat,vimSyncNone
syn keyword vimSyncNone contained NONE
" Additional IsCommand, here by reasons of precedence {{{2
@@ -518,7 +502,7 @@ syn match vimHiNmbr contained '\d\+'
syn keyword vimHiClear contained clear nextgroup=vimHiGroup
" Highlight: link {{{2
-syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
+syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation,vimOnlyHLGroup,nvimHLGroup
syn cluster vimFuncBodyList add=vimHiLink
" Control Characters {{{2
@@ -701,6 +685,10 @@ if !exists("g:vimsyn_noerror")
hi def link vimSubstFlagErr vimError
hi def link vimSynCaseError vimError
hi def link vimBufnrWarn vimWarn
+ hi def link vimOnlyCommand vimError
+ hi def link vimTermOption vimError
+ hi def link vimOnlyOption vimError
+ hi def link vimOnlyHLGroup vimError
endif
hi def link vimAbb vimCommand
@@ -710,6 +698,7 @@ hi def link vimAuHighlight vimHighlight
hi def link vimAutoCmdOpt vimOption
hi def link vimAutoCmd vimCommand
hi def link vimAutoEvent Type
+hi def link nvimAutoEvent vimAutoEvent
hi def link vimAutoSet vimCommand
hi def link vimBehaveModel vimBehave
hi def link vimBehave vimCommand
@@ -756,6 +745,7 @@ hi def link vimHiNmbr Number
hi def link vimHiStartStop vimHiTerm
hi def link vimHiTerm Type
hi def link vimHLGroup vimGroup
+hi def link nvimHLGroup vimHLGroup
hi def link vimHLMod PreProc
hi def link vimInsert vimString
hi def link vimKeyCode vimSpecFile
@@ -766,6 +756,7 @@ hi def link vimMapBang vimCommand
hi def link vimMapModKey vimFuncSID
hi def link vimMapMod vimBracket
hi def link vimMap vimCommand
+hi def link nvimMap vimMap
hi def link vimMark Number
hi def link vimMarkNumber vimNumber
hi def link vimMenuMod vimMapMod
@@ -834,6 +825,7 @@ hi def link vimSyntax vimCommand
hi def link vimSynType vimSpecial
hi def link vimTodo Todo
hi def link vimUnmap vimMap
+hi def link nvimUnmap vimMap
hi def link vimUserAttrbCmpltFunc Special
hi def link vimUserAttrbCmplt vimSpecial
hi def link vimUserAttrbKey vimOption
diff --git a/runtime/syntax/zimbu.vim b/runtime/syntax/zimbu.vim
index c859a2f815..1a7a485e6f 100644
--- a/runtime/syntax/zimbu.vim
+++ b/runtime/syntax/zimbu.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Zimbu
" Maintainer: Bram Moolenaar
-" Last Change: 2012 Jun 01
+" Last Change: 2014 Nov 23
if exists("b:current_syntax")
finish
@@ -12,7 +12,10 @@ syn include @Ccode syntax/c.vim
syn keyword zimbuTodo TODO FIXME XXX contained
syn match zimbuNoBar "|" contained
syn match zimbuParam "|[^| ]\+|" contained contains=zimbuNoBar
-syn match zimbuComment "#.*$" contains=zimbuTodo,zimbuParam,@Spell
+syn match zimbuNoBacktick "`" contained
+syn match zimbuCode "`[^`]\+`" contained contains=zimbuNoBacktick
+syn match zimbuComment "#.*$" contains=zimbuTodo,zimbuParam,zimbuCode,@Spell
+syn match zimbuComment "/\*.\{-}\*/" contains=zimbuTodo,zimbuParam,zimbuCode,@Spell
syn match zimbuChar "'\\\=.'"
@@ -28,27 +31,32 @@ syn keyword zimbuBasicType fixed1 fixed2 fixed3 fixed4 fixed5 fixed6
syn keyword zimbuBasicType fixed7 fixed8 fixed9 fixed10 fixed11 fixed12
syn keyword zimbuBasicType fixed13 fixed14 fixed15
-syn keyword zimbuCompType string stringval cstring varstring
-syn keyword zimbuCompType bytes varbytes
-syn keyword zimbuCompType tuple array list dict multiDict set multiSet
+syn keyword zimbuCompType string varString
+syn keyword zimbuCompType byteString varByteString
+syn keyword zimbuCompType tuple array list dict dictList set callback
+syn keyword zimbuCompType sortedList multiDict multiDictList multiSet
syn keyword zimbuCompType complex complex32 complex64 complex80 complex128
syn keyword zimbuCompType proc func def thread evalThread lock cond pipe
-syn keyword zimbuType VAR ANY USE GET
+syn keyword zimbuType VAR dyn type USE GET
syn match zimbuType "IO.File"
syn match zimbuType "IO.Stat"
-syn keyword zimbuStatement IF ELSE ELSEIF WHILE REPEAT FOR IN TO STEP
+syn keyword zimbuStatement IF ELSE ELSEIF IFNIL WHILE REPEAT FOR IN TO STEP
syn keyword zimbuStatement DO UNTIL SWITCH WITH
syn keyword zimbuStatement TRY CATCH FINALLY
syn keyword zimbuStatement GENERATE_IF GENERATE_ELSE GENERATE_ELSEIF
+syn keyword zimbuStatement GENERATE_ERROR
+syn keyword zimbuStatement BUILD_IF BUILD_ELSE BUILD_ELSEIF
syn keyword zimbuStatement CASE DEFAULT FINAL ABSTRACT VIRTUAL DEFINE REPLACE
syn keyword zimbuStatement IMPLEMENTS EXTENDS PARENT LOCAL
-syn keyword zimbuStatement PART ALIAS CONNECT WRAP
+syn keyword zimbuStatement PART ALIAS TYPE CONNECT WRAP
syn keyword zimbuStatement BREAK CONTINUE PROCEED
-syn keyword zimbuStatement RETURN EXIT THROW
+syn keyword zimbuStatement RETURN EXIT THROW DEFER
syn keyword zimbuStatement IMPORT AS OPTIONS MAIN
-syn keyword zimbuStatement INTERFACE MODULE ENUM BITS SHARED
+syn keyword zimbuStatement INTERFACE PIECE INCLUDE MODULE ENUM BITS
+syn keyword zimbuStatement SHARED STATIC
+syn keyword zimbuStatement LAMBDA
syn match zimbuStatement "\<\(FUNC\|PROC\|DEF\)\>"
syn match zimbuStatement "\<CLASS\>"
syn match zimbuStatement "}"
@@ -61,10 +69,13 @@ syn match zimbuAttribute "@default\>"
syn match zimbuAttribute "@define\>"
syn match zimbuAttribute "@replace\>"
syn match zimbuAttribute "@final\>"
+syn match zimbuAttribute "@primitive\>"
+syn match zimbuAttribute "@notOnExit\>"
syn match zimbuAttribute "@private\>"
syn match zimbuAttribute "@protected\>"
syn match zimbuAttribute "@public\>"
+syn match zimbuAttribute "@local\>"
syn match zimbuAttribute "@file\>"
syn match zimbuAttribute "@directory\>"
syn match zimbuAttribute "@read=private\>"
@@ -78,15 +89,22 @@ syn match zimbuAttribute "@items=public\>"
syn match zimbuAttribute "@items=file\>"
syn match zimbuAttribute "@items=directory\>"
-syn keyword zimbuMethod NEW EQUAL COPY COMPARE SIZE GET SET
+syn keyword zimbuMethod NEW EQUAL COPY COMPARE SIZE GET SET INIT EARLYINIT
syn keyword zimbuOperator IS ISNOT ISA ISNOTA
-syn keyword zimbuModule ARG CHECK E IO PROTO SYS HTTP ZC ZWT TIME THREAD
+syn keyword zimbuModule ARG CHECK E GC IO LOG PROTO SYS HTTP ZC ZWT T TIME THREAD
-syn match zimbuString +"\([^"\\]\|\\.\)*\("\|$\)+
+syn match zimbuImport "\.\zsPROTO"
+syn match zimbuImport "\.\zsCHEADER"
+
+"syn match zimbuString +"\([^"\\]\|\\.\)*\("\|$\)+ contains=zimbuStringExpr
+syn region zimbuString start=+"+ skip=+[^"\\]\|\\.+ end=+"\|$+ contains=zimbuStringExpr
syn match zimbuString +R"\([^"]\|""\)*\("\|$\)+
-syn region zimbuString start=+'''+ end=+'''+
+syn region zimbuLongString start=+''"+ end=+"''+
+syn match zimbuStringExpr +\\([^)]*)+hs=s+2,he=e-1 contained contains=zimbuString,zimbuParenPairOuter
+syn region zimbuParenPairOuter start=+(+ms=s+1 end=+)+me=e-1 contained contains=zimbuString,zimbuParenPair
+syn region zimbuParenPair start=+(+ end=+)+ contained contains=zimbuString,zimbuParenPair
syn keyword zimbuFixed TRUE FALSE NIL THIS THISTYPE FAIL OK
syn keyword zimbuError NULL
@@ -97,12 +115,18 @@ syn match zimbuSpaceError display excludenl "\S\s\+$"ms=s+1
syn match zimbuSpaceError display " \+\t"
syn match zimbuSpaceError display "\t\+ "
-syn match zimbuUses contained "uses([a-zA-Z_ ,]*)"
+syn match zimbuUses contained "\<uses([a-zA-Z_ ,]*)"
+syn match zimbuBlockgc contained "blockgc"
syn match zimbuBlockComment contained " #.*"
-syn region zimbuCregion matchgroup=zimbuCblock start="^>>>" end="^<<<.*" contains=@Ccode,zimbuUses,zimbuBlockComment keepend
+syn region zimbuCregion matchgroup=zimbuCblock start="^>>>" end="^<<<.*" contains=@Ccode,zimbuUses,zimbuBlockgc,zimbuBlockComment keepend
+
+" Assume long strings and C regions don't take more than 200 lines.
+syn sync minlines=200
-syn sync minlines=2000
+" When we find the start of a long string, without a # or " before it, we are
+" sure to be inside a long string.
+syn sync match zimbuLongStringSync grouphere zimbuLongString +^[^"#]*''\"+
hi def link zimbuBasicType Type
hi def link zimbuCompType Type
@@ -111,17 +135,23 @@ hi def link zimbuStatement Statement
hi def link zimbuOperator Statement
hi def link zimbuMethod PreProc
hi def link zimbuModule PreProc
+hi def link zimbuImport PreProc
hi def link zimbuUses PreProc
+hi def link zimbuBlockgc PreProc
hi def link zimbuAttribute PreProc
hi def link zimbuString Constant
+hi def link zimbuLongString Special
hi def link zimbuChar Constant
hi def link zimbuFixed Constant
hi def link zimbuComment Comment
+hi def link zimbuCommentStart zimbuComment
hi def link zimbuBlockComment Comment
hi def link zimbuCblock Comment
hi def link zimbuTodo Todo
hi def link zimbuParam Constant
+hi def link zimbuCode Statement
hi def link zimbuNoBar Ignore
+hi def link zimbuNoBacktick Ignore
hi def link zimbuSpaceError Error
hi def link zimbuError Error
diff --git a/scripts/gen_events.lua b/scripts/gen_events.lua
new file mode 100644
index 0000000000..75e0b3da3a
--- /dev/null
+++ b/scripts/gen_events.lua
@@ -0,0 +1,65 @@
+if arg[1] == '--help' then
+ print('Usage: gen_events.lua src/nvim enum_file event_names_file')
+ os.exit(0)
+end
+
+local nvimsrcdir = arg[1]
+local fileio_enum_file = arg[2]
+local names_file = arg[3]
+
+package.path = nvimsrcdir .. '/?.lua;' .. package.path
+
+local auevents = require('auevents')
+local events = auevents.events
+local aliases = auevents.aliases
+
+enum_tgt = io.open(fileio_enum_file, 'w')
+names_tgt = io.open(names_file, 'w')
+
+enum_tgt:write('typedef enum auto_event {')
+names_tgt:write([[
+static const struct event_name {
+ size_t len;
+ char *name;
+ event_T event;
+} event_names[] = {]])
+
+for i, event in ipairs(events) do
+ if i > 1 then
+ comma = ',\n'
+ else
+ comma = '\n'
+ end
+ enum_tgt:write(('%s EVENT_%s = %u'):format(comma, event:upper(), i - 1))
+ names_tgt:write(('%s {%u, "%s", EVENT_%s}'):format(comma, #event, event, event:upper()))
+end
+
+for alias, event in pairs(aliases) do
+ names_tgt:write((',\n {%u, "%s", EVENT_%s}'):format(#alias, alias, event:upper()))
+end
+
+names_tgt:write(',\n {0, NULL, (event_T)0}')
+
+enum_tgt:write('\n} event_T;\n')
+names_tgt:write('\n};\n')
+
+enum_tgt:write(('\n#define NUM_EVENTS %u\n'):format(#events))
+names_tgt:write('\nstatic AutoPat *first_autopat[NUM_EVENTS] = {\n ')
+line_len = 1
+for i = 1,((#events) - 1) do
+ line_len = line_len + #(' NULL,')
+ if line_len > 80 then
+ names_tgt:write('\n ')
+ line_len = 1 + #(' NULL,')
+ end
+ names_tgt:write(' NULL,')
+end
+if line_len + #(' NULL') > 80 then
+ names_tgt:write('\n NULL')
+else
+ names_tgt:write(' NULL')
+end
+names_tgt:write('\n};\n')
+
+enum_tgt:close()
+names_tgt:close()
diff --git a/scripts/genoptions.lua b/scripts/genoptions.lua
new file mode 100644
index 0000000000..2859ca1795
--- /dev/null
+++ b/scripts/genoptions.lua
@@ -0,0 +1,183 @@
+if arg[1] == '--help' then
+ print('Usage: genoptions.lua src/nvim options_file')
+ os.exit(0)
+end
+
+local nvimsrcdir = arg[1]
+local options_file = arg[2]
+
+package.path = nvimsrcdir .. '/?.lua;' .. package.path
+
+local opt_fd = io.open(options_file, 'w')
+
+local w = function(s)
+ if s:match('^ %.') then
+ opt_fd:write(s .. ',\n')
+ else
+ opt_fd:write(s .. '\n')
+ end
+end
+
+local options = require('options')
+
+cstr = options.cstr
+
+local type_flags={
+ bool='P_BOOL',
+ number='P_NUM',
+ string='P_STRING',
+}
+
+local redraw_flags={
+ statuslines='P_RSTAT',
+ current_window='P_RWIN',
+ current_buffer='P_RBUF',
+ all_windows='P_RALL',
+ everything='P_RCLR',
+ curswant='P_CURSWANT',
+}
+
+local list_flags={
+ comma='P_COMMA',
+ flags='P_FLAGLIST',
+ flagscomma='P_COMMA|P_FLAGLIST',
+}
+
+local get_flags = function(o)
+ local ret = {type_flags[o.type]}
+ local add_flag = function(f)
+ ret[1] = ret[1] .. '|' .. f
+ end
+ if o.list then
+ add_flag(list_flags[o.list])
+ end
+ if o.redraw then
+ for _, r_flag in ipairs(o.redraw) do
+ add_flag(redraw_flags[r_flag])
+ end
+ end
+ for _, flag_desc in ipairs({
+ {'alloced'},
+ {'expand'},
+ {'nodefault'},
+ {'no_mkrc'},
+ {'vi_def'},
+ {'vim'},
+ {'secure'},
+ {'gettext'},
+ {'noglob'},
+ {'normal_fname_chars', 'P_NFNAME'},
+ {'pri_mkrc'},
+ {'deny_in_modelines', 'P_NO_ML'},
+ {'deny_duplicates', 'P_NODUP'},
+ }) do
+ local key_name = flag_desc[1]
+ local def_name = flag_desc[2] or ('P_' .. key_name:upper())
+ if o[key_name] then
+ add_flag(def_name)
+ end
+ end
+ return ret[1]
+end
+
+local get_cond
+get_cond = function(c, base_string)
+ local cond_string = base_string or '#if '
+ if type(c) == 'table' then
+ cond_string = cond_string .. get_cond(c[1], '')
+ for i, subc in ipairs(c) do
+ if i > 1 then
+ cond_string = cond_string .. ' && ' .. get_cond(subc, '')
+ end
+ end
+ elseif c:sub(1, 1) == '!' then
+ cond_string = cond_string .. '!defined(' .. c:sub(2) .. ')'
+ else
+ cond_string = cond_string .. 'defined(' .. c .. ')'
+ end
+ return cond_string
+end
+
+value_dumpers = {
+ ['function']=function(v) return v() end,
+ string=cstr,
+ boolean=function(v) return v and 'true' or 'false' end,
+ number=function(v) return ('%iL'):format(v) end,
+ ['nil']=function(v) return '0L' end,
+}
+
+local get_value = function(v)
+ return '(char_u *) ' .. value_dumpers[type(v)](v)
+end
+
+local get_defaults = function(d)
+ return '{' .. get_value(d.vi) .. ', ' .. get_value(d.vim) .. '}'
+end
+
+local defines = {}
+
+local dump_option = function(i, o)
+ w(' [' .. ('%u'):format(i - 1) .. ']={')
+ w(' .fullname=' .. cstr(o.full_name))
+ if o.abbreviation then
+ w(' .shortname=' .. cstr(o.abbreviation))
+ end
+ w(' .flags=' .. get_flags(o))
+ if o.enable_if then
+ w(get_cond(o.enable_if))
+ end
+ if o.varname then
+ w(' .var=(char_u *)&' .. o.varname)
+ elseif #o.scope == 1 and o.scope[1] == 'window' then
+ w(' .var=VAR_WIN')
+ end
+ if o.enable_if then
+ w('#endif')
+ end
+ if #o.scope == 1 and o.scope[1] == 'global' then
+ w(' .indir=PV_NONE')
+ else
+ assert (#o.scope == 1 or #o.scope == 2)
+ assert (#o.scope == 1 or o.scope[1] == 'global')
+ local min_scope = o.scope[#o.scope]
+ local varname = o.pv_name or o.varname or (
+ 'p_' .. (o.abbreviation or o.full_name))
+ local pv_name = (
+ 'OPT_' .. min_scope:sub(1, 3):upper() .. '(' .. (
+ min_scope:sub(1, 1):upper() .. 'V_' .. varname:sub(3):upper()
+ ) .. ')'
+ )
+ if #o.scope == 2 then
+ pv_name = 'OPT_BOTH(' .. pv_name .. ')'
+ end
+ defines['PV_' .. varname:sub(3):upper()] = pv_name
+ w(' .indir=' .. pv_name)
+ end
+ if o.defaults then
+ if o.defaults.condition then
+ w(get_cond(o.defaults.condition))
+ end
+ w(' .def_val=' .. get_defaults(o.defaults.if_true))
+ if o.defaults.condition then
+ if o.defaults.if_false then
+ w('#else')
+ w(' .def_val=' .. get_defaults(o.defaults.if_false))
+ end
+ w('#endif')
+ end
+ end
+ w(' },')
+end
+
+w('static vimoption_T options[] = {')
+for i, o in ipairs(options.options) do
+ dump_option(i, o)
+end
+w(' [' .. ('%u'):format(#options.options) .. ']={.fullname=NULL}')
+w('};')
+w('')
+
+for k, v in pairs(defines) do
+ w('#define ' .. k .. ' ' .. v)
+end
+opt_fd:close()
diff --git a/scripts/genvimvim.lua b/scripts/genvimvim.lua
new file mode 100644
index 0000000000..9135c8e3ab
--- /dev/null
+++ b/scripts/genvimvim.lua
@@ -0,0 +1,138 @@
+if arg[1] == '--help' then
+ print('Usage: genoptions.lua src/nvim runtime/syntax/vim/generated.vim')
+ os.exit(0)
+end
+
+local nvimsrcdir = arg[1]
+local syntax_file = arg[2]
+
+package.path = nvimsrcdir .. '/?.lua;' .. package.path
+
+local lld = {}
+local syn_fd = io.open(syntax_file, 'w')
+lld.line_length = 0
+local w = function(s)
+ syn_fd:write(s)
+ if s:find('\n') then
+ lld.line_length = #(s:gsub('.*\n', ''))
+ else
+ lld.line_length = lld.line_length + #s
+ end
+end
+
+local options = require('options')
+local auevents = require('auevents')
+local ex_cmds = require('ex_cmds')
+
+local cmd_kw = function(prev_cmd, cmd)
+ if not prev_cmd then
+ return cmd:sub(1, 1) .. '[' .. cmd:sub(2) .. ']'
+ else
+ local shift = 1
+ while cmd:sub(shift, shift) == prev_cmd:sub(shift, shift) do
+ shift = shift + 1
+ end
+ if shift >= #cmd then
+ return cmd
+ else
+ return cmd:sub(1, shift) .. '[' .. cmd:sub(shift + 1) .. ']'
+ end
+ end
+end
+
+vimcmd_start = 'syn keyword vimCommand contained '
+w(vimcmd_start)
+local prev_cmd = nil
+for _, cmd_desc in ipairs(ex_cmds) do
+ if lld.line_length > 850 then
+ w('\n' .. vimcmd_start)
+ end
+ local cmd = cmd_desc.command
+ if cmd:match('%w') and cmd ~= 'z' then
+ w(' ' .. cmd_kw(prev_cmd, cmd))
+ end
+ prev_cmd = cmd
+end
+
+local vimopt_start = 'syn keyword vimOption contained '
+w('\n\n' .. vimopt_start)
+
+for _, opt_desc in ipairs(options.options) do
+ if not opt_desc.varname or opt_desc.varname:sub(1, 7) ~= 'p_force' then
+ if lld.line_length > 850 then
+ w('\n' .. vimopt_start)
+ end
+ w(' ' .. opt_desc.full_name)
+ if opt_desc.abbreviation then
+ w(' ' .. opt_desc.abbreviation)
+ end
+ if opt_desc.type == 'bool' then
+ w(' inv' .. opt_desc.full_name)
+ w(' no' .. opt_desc.full_name)
+ if opt_desc.abbreviation then
+ w(' inv' .. opt_desc.abbreviation)
+ w(' no' .. opt_desc.abbreviation)
+ end
+ end
+ end
+end
+
+w('\n\nsyn case ignore')
+local vimau_start = 'syn keyword vimAutoEvent contained '
+w('\n\n' .. vimau_start)
+
+for _, au in ipairs(auevents.events) do
+ if not auevents.neovim_specific[au] then
+ if lld.line_length > 850 then
+ w('\n' .. vimau_start)
+ end
+ w(' ' .. au)
+ end
+end
+for au, _ in pairs(auevents.aliases) do
+ if not auevents.neovim_specific[au] then
+ if lld.line_length > 850 then
+ w('\n' .. vimau_start)
+ end
+ w(' ' .. au)
+ end
+end
+
+local nvimau_start = 'syn keyword nvimAutoEvent contained '
+w('\n\n' .. nvimau_start)
+
+for au, _ in pairs(auevents.neovim_specific) do
+ if lld.line_length > 850 then
+ w('\n' .. nvimau_start)
+ end
+ w(' ' .. au)
+end
+
+w('\n\nsyn case match')
+local vimfun_start = 'syn keyword vimFuncName contained '
+w('\n\n' .. vimfun_start)
+eval_fd = io.open(nvimsrcdir .. '/eval.c', 'r')
+local started = 0
+for line in eval_fd:lines() do
+ if line == '} functions[] =' then
+ started = 1
+ elseif started == 1 then
+ assert (line == '{')
+ started = 2
+ elseif started == 2 then
+ if line == '};' then
+ break
+ end
+ local func_name = line:match('^ {"(%w+)",')
+ if func_name then
+ if lld.line_length > 850 then
+ w('\n' .. vimfun_start)
+ end
+ w(' ' .. func_name)
+ end
+ end
+end
+eval_fd:close()
+
+w('\n')
+syn_fd:close()
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 4448859b64..d49b8dc416 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -18,8 +18,15 @@ set(HEADER_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/gendeclarations.lua)
set(GENERATED_INCLUDES_DIR ${PROJECT_BINARY_DIR}/include)
set(GENERATED_EX_CMDS_ENUM ${GENERATED_INCLUDES_DIR}/ex_cmds_enum.generated.h)
set(GENERATED_EX_CMDS_DEFS ${GENERATED_DIR}/ex_cmds_defs.generated.h)
+set(GENERATED_EVENTS_ENUM ${GENERATED_INCLUDES_DIR}/auevents_enum.generated.h)
+set(GENERATED_EVENTS_NAMES_MAP ${GENERATED_DIR}/auevents_name_map.generated.h)
+set(GENERATED_OPTIONS ${GENERATED_DIR}/options.generated.h)
set(EX_CMDS_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/genex_cmds.lua)
+set(EVENTS_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/gen_events.lua)
+set(OPTIONS_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/genoptions.lua)
+set(EVENTS_LIST_FILE ${PROJECT_SOURCE_DIR}/src/nvim/auevents.lua)
set(EX_CMDS_DEFS_FILE ${PROJECT_SOURCE_DIR}/src/nvim/ex_cmds.lua)
+set(OPTIONS_LIST_FILE ${PROJECT_SOURCE_DIR}/src/nvim/options.lua)
include_directories(${GENERATED_DIR})
include_directories(${GENERATED_INCLUDES_DIR})
@@ -149,6 +156,9 @@ list(APPEND NEOVIM_GENERATED_SOURCES
"${MSGPACK_DISPATCH}"
"${GENERATED_EX_CMDS_ENUM}"
"${GENERATED_EX_CMDS_DEFS}"
+ "${GENERATED_EVENTS_ENUM}"
+ "${GENERATED_EVENTS_NAMES_MAP}"
+ "${GENERATED_OPTIONS}"
)
add_custom_command(OUTPUT ${GENERATED_EX_CMDS_ENUM} ${GENERATED_EX_CMDS_DEFS}
@@ -157,6 +167,18 @@ add_custom_command(OUTPUT ${GENERATED_EX_CMDS_ENUM} ${GENERATED_EX_CMDS_DEFS}
DEPENDS ${EX_CMDS_GENERATOR} ${EX_CMDS_DEFS_FILE}
)
+add_custom_command(OUTPUT ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+ COMMAND ${LUA_PRG} ${EVENTS_GENERATOR}
+ ${PROJECT_SOURCE_DIR}/src/nvim ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP}
+ DEPENDS ${EVENTS_GENERATOR} ${EVENTS_LIST_FILE}
+)
+
+add_custom_command(OUTPUT ${GENERATED_OPTIONS}
+ COMMAND ${LUA_PRG} ${OPTIONS_GENERATOR}
+ ${PROJECT_SOURCE_DIR}/src/nvim ${GENERATED_OPTIONS}
+ DEPENDS ${OPTIONS_GENERATOR} ${OPTIONS_LIST_FILE}
+)
+
# Our dependencies come first.
if (LibIntl_FOUND)
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index 22bdbc2ee5..f5dadb00ea 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -164,6 +164,56 @@ Object vim_eval(String str, Error *err)
return rv;
}
+/// Call the given function with the given arguments stored in an array.
+///
+/// @param fname Function to call
+/// @param args Functions arguments packed in an Array
+/// @param[out] err Details of an error that may have occurred
+/// @return Result of the function call
+Object vim_call_function(String fname, Array args, Error *err)
+ FUNC_ATTR_DEFERRED
+{
+ Object rv = OBJECT_INIT;
+ if (args.size > MAX_FUNC_ARGS) {
+ api_set_error(err, Validation,
+ _("Function called with too many arguments."));
+ return rv;
+ }
+
+ // Convert the arguments in args from Object to typval_T values
+ typval_T vim_args[MAX_FUNC_ARGS + 1];
+ size_t i = 0; // also used for freeing the variables
+ for (; i < args.size; i++) {
+ if (!object_to_vim(args.items[i], &vim_args[i], err)) {
+ goto free_vim_args;
+ }
+ }
+
+ try_start();
+ // Call the function
+ typval_T rettv;
+ int dummy;
+ int r = call_func((char_u *) fname.data, (int) fname.size,
+ &rettv, (int) args.size, vim_args,
+ curwin->w_cursor.lnum, curwin->w_cursor.lnum, &dummy,
+ true,
+ NULL);
+ if (r == FAIL) {
+ api_set_error(err, Exception, _("Error calling function."));
+ }
+ if (!try_end(err)) {
+ rv = vim_to_object(&rettv);
+ }
+ clear_tv(&rettv);
+
+free_vim_args:
+ while (i > 0) {
+ clear_tv(&vim_args[--i]);
+ }
+
+ return rv;
+}
+
/// Calculates the number of display cells `str` occupies, tab is counted as
/// one cell.
///
diff --git a/src/nvim/auevents.lua b/src/nvim/auevents.lua
new file mode 100644
index 0000000000..af801c6f1a
--- /dev/null
+++ b/src/nvim/auevents.lua
@@ -0,0 +1,106 @@
+return {
+ events = {
+ 'BufAdd', -- after adding a buffer to the buffer list
+ 'BufDelete', -- deleting a buffer from the buffer list
+ 'BufEnter', -- after entering a buffer
+ 'BufFilePost', -- after renaming a buffer
+ 'BufFilePre', -- before renaming a buffer
+ 'BufHidden', -- just after buffer becomes hidden
+ 'BufLeave', -- before leaving a buffer
+ 'BufNew', -- after creating any buffer
+ 'BufNewFile', -- when creating a buffer for a new file
+ 'BufReadCmd', -- read buffer using command
+ 'BufReadPost', -- after reading a buffer
+ 'BufReadPre', -- before reading a buffer
+ 'BufUnload', -- just before unloading a buffer
+ 'BufWinEnter', -- after showing a buffer in a window
+ 'BufWinLeave', -- just after buffer removed from window
+ 'BufWipeout', -- just before really deleting a buffer
+ 'BufWriteCmd', -- write buffer using command
+ 'BufWritePost', -- after writing a buffer
+ 'BufWritePre', -- before writing a buffer
+ 'CmdUndefined', -- command undefined
+ 'CmdWinEnter', -- after entering the cmdline window
+ 'CmdWinLeave', -- before leaving the cmdline window
+ 'ColorScheme', -- after loading a colorscheme
+ 'CompleteDone', -- after finishing insert complete
+ 'CursorHold', -- cursor in same position for a while
+ 'CursorHoldI', -- idem, in Insert mode
+ 'CursorMoved', -- cursor was moved
+ 'CursorMovedI', -- cursor was moved in Insert mode
+ 'EncodingChanged', -- after changing the 'encoding' option
+ 'FileAppendCmd', -- append to a file using command
+ 'FileAppendPost', -- after appending to a file
+ 'FileAppendPre', -- before appending to a file
+ 'FileChangedRO', -- before first change to read-only file
+ 'FileChangedShell', -- after shell command that changed file
+ 'FileChangedShellPost', -- after (not) reloading changed file
+ 'FileReadCmd', -- read from a file using command
+ 'FileReadPost', -- after reading a file
+ 'FileReadPre', -- before reading a file
+ 'FileType', -- new file type detected (user defined)
+ 'FileWriteCmd', -- write to a file using command
+ 'FileWritePost', -- after writing a file
+ 'FileWritePre', -- before writing a file
+ 'FilterReadPost', -- after reading from a filter
+ 'FilterReadPre', -- before reading from a filter
+ 'FilterWritePost', -- after writing to a filter
+ 'FilterWritePre', -- before writing to a filter
+ 'FocusGained', -- got the focus
+ 'FocusLost', -- lost the focus to another app
+ 'FuncUndefined', -- if calling a function which doesn't exist
+ 'GUIEnter', -- after starting the GUI
+ 'GUIFailed', -- after starting the GUI failed
+ 'InsertChange', -- when changing Insert/Replace mode
+ 'InsertCharPre', -- before inserting a char
+ 'InsertEnter', -- when entering Insert mode
+ 'InsertLeave', -- when leaving Insert mode
+ 'JobActivity', -- when job sent some data
+ 'MenuPopup', -- just before popup menu is displayed
+ 'QuickFixCmdPost', -- after :make, :grep etc.
+ 'QuickFixCmdPre', -- before :make, :grep etc.
+ 'QuitPre', -- before :quit
+ 'RemoteReply', -- upon string reception from a remote vim
+ 'SessionLoadPost', -- after loading a session file
+ 'ShellCmdPost', -- after ":!cmd"
+ 'ShellFilterPost', -- after ":1,2!cmd", ":w !cmd", ":r !cmd".
+ 'SourceCmd', -- sourcing a Vim script using command
+ 'SourcePre', -- before sourcing a Vim script
+ 'SpellFileMissing', -- spell file missing
+ 'StdinReadPost', -- after reading from stdin
+ 'StdinReadPre', -- before reading from stdin
+ 'SwapExists', -- found existing swap file
+ 'Syntax', -- syntax selected
+ 'TabClosed', -- a tab has closed
+ 'TabEnter', -- after entering a tab page
+ 'TabLeave', -- before leaving a tab page
+ 'TabNew', -- when creating a new tab
+ 'TabNewEntered', -- after entering a new tab
+ 'TermChanged', -- after changing 'term'
+ 'TermResponse', -- after setting "v:termresponse"
+ 'TermOpen', -- after opening a terminal buffer
+ 'TextChanged', -- text was modified
+ 'TextChangedI', -- text was modified in Insert mode
+ 'User', -- user defined autocommand
+ 'VimEnter', -- after starting Vim
+ 'VimLeave', -- before exiting Vim
+ 'VimLeavePre', -- before exiting Vim and writing .viminfo
+ 'VimResized', -- after Vim window was resized
+ 'WinEnter', -- after entering a window
+ 'WinLeave', -- before leaving a window
+ },
+ aliases = {
+ BufCreate = 'BufAdd',
+ BufRead = 'BufReadPost',
+ BufWrite = 'BufWritePre',
+ FileEncoding = 'EncodingChanged',
+ },
+ -- List of neovim-specific events or aliases for the purpose of generating
+ -- syntax file
+ neovim_specific = {
+ TabNew=true,
+ TabNewEntered=true,
+ TabClosed=true,
+ TermEnter=true,
+ },
+}
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index b4b36f7fc0..2f87c9cbd2 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -2679,7 +2679,7 @@ void maketitle(void)
append_arg_number(curwin, buf, SPACE_FOR_ARGNR, FALSE);
- STRCAT(buf, " - VIM");
+ STRCAT(buf, " - NVIM");
if (maxlen > 0) {
/* make it shorter by removing a bit in the middle */
@@ -3576,7 +3576,7 @@ void fname_expand(buf_T *buf, char_u **ffname, char_u **sfname)
*sfname = *ffname;
*ffname = (char_u *)fix_fname((char *)*ffname); /* expand to full path */
-#ifdef FEAT_SHORTCUT
+#ifdef WIN32
if (!buf->b_p_bin) {
char_u *rfname;
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index ed0b6290dc..48f9faa777 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -300,7 +300,6 @@ static ufunc_T dumuf;
#define FUNCARG(fp, j) ((char_u **)(fp->uf_args.ga_data))[j]
#define FUNCLINE(fp, j) ((char_u **)(fp->uf_lines.ga_data))[j]
-#define MAX_FUNC_ARGS 20 /* maximum number of function arguments */
#define VAR_SHORT_LEN 20 /* short variable name length */
#define FIXVAR_CNT 12 /* number of fixed variables */
@@ -6973,7 +6972,7 @@ get_func_tv (
* Return FAIL when the function can't be called, OK otherwise.
* Also returns OK when an error was encountered while executing the function.
*/
-static int
+int
call_func (
char_u *funcname, /* name of the function */
int len, /* length of "name" */
@@ -7194,7 +7193,7 @@ static int non_zero_arg(typval_T *argvars)
* Get the float value of "argvars[0]" into "f".
* Returns FAIL when the argument is not a Number or Float.
*/
-static int get_float_arg(typval_T *argvars, float_T *f)
+static inline int get_float_arg(typval_T *argvars, float_T *f)
{
if (argvars[0].v_type == VAR_FLOAT) {
*f = argvars[0].vval.v_float;
@@ -7208,14 +7207,34 @@ static int get_float_arg(typval_T *argvars, float_T *f)
return FAIL;
}
+// Apply a floating point C function on a typval with one float_T.
+//
+// Some versions of glibc on i386 have an optimization that makes it harder to
+// call math functions indirectly from inside an inlined function, causing
+// compile-time errors. Avoid `inline` in that case. #3072
+#ifndef ARCH_32
+inline
+#endif
+static void float_op_wrapper(typval_T *argvars, typval_T *rettv,
+ float_T (*function)(float_T))
+{
+ float_T f;
+
+ rettv->v_type = VAR_FLOAT;
+ if (get_float_arg(argvars, &f) == OK) {
+ rettv->vval.v_float = function(f);
+ } else {
+ rettv->vval.v_float = 0.0;
+ }
+}
+
/*
* "abs(expr)" function
*/
static void f_abs(typval_T *argvars, typval_T *rettv)
{
if (argvars[0].v_type == VAR_FLOAT) {
- rettv->v_type = VAR_FLOAT;
- rettv->vval.v_float = fabs(argvars[0].vval.v_float);
+ float_op_wrapper(argvars, rettv, &fabs);
} else {
varnumber_T n;
int error = FALSE;
@@ -7235,13 +7254,7 @@ static void f_abs(typval_T *argvars, typval_T *rettv)
*/
static void f_acos(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = acos(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &acos);
}
/*
@@ -7395,13 +7408,7 @@ static void f_argv(typval_T *argvars, typval_T *rettv)
*/
static void f_asin(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = asin(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &asin);
}
/*
@@ -7409,13 +7416,7 @@ static void f_asin(typval_T *argvars, typval_T *rettv)
*/
static void f_atan(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = atan(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &atan);
}
/*
@@ -7744,13 +7745,7 @@ static void f_call(typval_T *argvars, typval_T *rettv)
*/
static void f_ceil(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = ceil(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &ceil);
}
/*
@@ -7954,13 +7949,7 @@ static void f_copy(typval_T *argvars, typval_T *rettv)
*/
static void f_cos(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = cos(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &cos);
}
/*
@@ -7968,13 +7957,7 @@ static void f_cos(typval_T *argvars, typval_T *rettv)
*/
static void f_cosh(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = cosh(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &cosh);
}
/*
@@ -8373,13 +8356,7 @@ static void f_exists(typval_T *argvars, typval_T *rettv)
*/
static void f_exp(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = exp(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &exp);
}
/*
@@ -8858,13 +8835,7 @@ static void f_float2nr(typval_T *argvars, typval_T *rettv)
*/
static void f_floor(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = floor(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &floor);
}
/*
@@ -10042,9 +10013,7 @@ static void f_has(typval_T *argvars, typval_T *rettv)
#endif
"arabic",
"autocmd",
-#if defined(FEAT_BROWSE) && (defined(USE_FILE_CHOOSER) \
- || defined(FEAT_GUI_W32) \
- || defined(FEAT_GUI_MOTIF))
+#ifdef FEAT_BROWSE
"browsefilter",
#endif
"byte_offset",
@@ -11421,13 +11390,7 @@ static void get_maparg(typval_T *argvars, typval_T *rettv, int exact)
*/
static void f_log(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = log(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &log);
}
/*
@@ -11435,13 +11398,7 @@ static void f_log(typval_T *argvars, typval_T *rettv)
*/
static void f_log10(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = log10(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &log10);
}
@@ -11833,33 +11790,6 @@ static void f_min(typval_T *argvars, typval_T *rettv)
max_min(argvars, rettv, FALSE);
}
-
-/*
- * Create the directory in which "dir" is located, and higher levels when
- * needed.
- */
-static int mkdir_recurse(char_u *dir, int prot)
-{
- char_u *p;
- char_u *updir;
- int r = FAIL;
-
- /* Get end of directory name in "dir".
- * We're done when it's "/" or "c:/". */
- p = path_tail_with_sep(dir);
- if (p <= get_past_head(dir))
- return OK;
-
- /* If the directory exists we're done. Otherwise: create it.*/
- updir = vim_strnsave(dir, (int)(p - dir));
- if (os_isdir(updir))
- r = OK;
- else if (mkdir_recurse(updir, prot) == OK)
- r = vim_mkdir_emsg(updir, prot);
- xfree(updir);
- return r;
-}
-
/*
* "mkdir()" function
*/
@@ -11884,8 +11814,19 @@ static void f_mkdir(typval_T *argvars, typval_T *rettv)
if (argvars[1].v_type != VAR_UNKNOWN) {
if (argvars[2].v_type != VAR_UNKNOWN)
prot = get_tv_number_chk(&argvars[2], NULL);
- if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0)
- mkdir_recurse(dir, prot);
+ if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0) {
+ char *failed_dir;
+ int ret = os_mkdir_recurse((char *) dir, prot, &failed_dir);
+ if (ret != 0) {
+ EMSG3(_(e_mkdir), failed_dir, os_strerror(ret));
+ xfree(failed_dir);
+ rettv->vval.v_number = FAIL;
+ return;
+ } else {
+ rettv->vval.v_number = OK;
+ return;
+ }
+ }
}
rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot);
}
@@ -13356,7 +13297,7 @@ static void f_resolve(typval_T *argvars, typval_T *rettv)
#endif
p = get_tv_string(&argvars[0]);
-#ifdef FEAT_SHORTCUT
+#ifdef WIN32
{
char_u *v = NULL;
@@ -13692,13 +13633,7 @@ theend:
*/
static void f_round(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = round(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &round);
}
// "rpcnotify()" function
@@ -14829,13 +14764,7 @@ static void f_simplify(typval_T *argvars, typval_T *rettv)
*/
static void f_sin(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = sin(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &sin);
}
/*
@@ -14843,13 +14772,7 @@ static void f_sin(typval_T *argvars, typval_T *rettv)
*/
static void f_sinh(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = sinh(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &sinh);
}
/// struct used in the array that's given to qsort()
@@ -15320,13 +15243,7 @@ static void f_split(typval_T *argvars, typval_T *rettv)
*/
static void f_sqrt(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = sqrt(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &sqrt);
}
/*
@@ -15699,6 +15616,8 @@ static void f_synIDattr(typval_T *argvars, typval_T *rettv)
modec = TOLOWER_ASC(mode[0]);
if (modec != 'c' && modec != 'g')
modec = 0; /* replace invalid with current */
+ } else if (ui_rgb_attached()) {
+ modec = 'g';
} else {
modec = 'c';
}
@@ -16210,13 +16129,7 @@ static void f_test(typval_T *argvars, typval_T *rettv)
*/
static void f_tan(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = tan(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &tan);
}
/*
@@ -16224,13 +16137,7 @@ static void f_tan(typval_T *argvars, typval_T *rettv)
*/
static void f_tanh(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- rettv->vval.v_float = tanh(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &tanh);
}
/*
@@ -16378,14 +16285,7 @@ error:
*/
static void f_trunc(typval_T *argvars, typval_T *rettv)
{
- float_T f;
-
- rettv->v_type = VAR_FLOAT;
- if (get_float_arg(argvars, &f) == OK)
- /* trunc() is not in C90, use floor() or ceil() instead. */
- rettv->vval.v_float = f > 0 ? floor(f) : ceil(f);
- else
- rettv->vval.v_float = 0.0;
+ float_op_wrapper(argvars, rettv, &trunc);
}
/*
diff --git a/src/nvim/eval.h b/src/nvim/eval.h
index f3a1c26a5d..8f065eda33 100644
--- a/src/nvim/eval.h
+++ b/src/nvim/eval.h
@@ -69,6 +69,9 @@ enum {
VV_LEN, /* number of v: vars */
};
+/// Maximum number of function arguments
+#define MAX_FUNC_ARGS 20
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval.h.generated.h"
#endif
diff --git a/src/nvim/event/rstream.c b/src/nvim/event/rstream.c
index 78c044347f..9d2439ac2b 100644
--- a/src/nvim/event/rstream.c
+++ b/src/nvim/event/rstream.c
@@ -112,7 +112,7 @@ static void read_cb(uv_stream_t *uvstream, ssize_t cnt, const uv_buf_t *buf)
// Read error or EOF, either way stop the stream and invoke the callback
// with eof == true
uv_read_stop(uvstream);
- stream->read_cb(stream, stream->buffer, stream->data, true);
+ invoke_read_cb(stream, true);
}
return;
}
@@ -122,7 +122,7 @@ static void read_cb(uv_stream_t *uvstream, ssize_t cnt, const uv_buf_t *buf)
// Data was already written, so all we need is to update 'wpos' to reflect
// the space actually used in the buffer.
rbuffer_produced(stream->buffer, nread);
- stream->read_cb(stream, stream->buffer, stream->data, false);
+ invoke_read_cb(stream, false);
}
// Called by the by the 'idle' handle to emulate a reading event
@@ -156,7 +156,7 @@ static void fread_idle_cb(uv_idle_t *handle)
if (req.result <= 0) {
uv_idle_stop(&stream->uv.idle);
- stream->read_cb(stream, stream->buffer, stream->data, true);
+ invoke_read_cb(stream, true);
return;
}
@@ -164,4 +164,12 @@ static void fread_idle_cb(uv_idle_t *handle)
size_t nread = (size_t) req.result;
rbuffer_produced(stream->buffer, nread);
stream->fpos += nread;
+ invoke_read_cb(stream, false);
+}
+
+static void invoke_read_cb(Stream *stream, bool eof)
+{
+ if (stream->read_cb) {
+ stream->read_cb(stream, stream->buffer, stream->data, eof);
+ }
}
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 2dc5c3045d..cacef01b19 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -3472,18 +3472,8 @@ void do_sub(exarg_T *eap)
}
if (!eap->skip) {
- /* In POSIX vi ":s/pat/%/" uses the previous subst. string. */
- if (STRCMP(sub, "%") == 0
- && vim_strchr(p_cpo, CPO_SUBPERCENT) != NULL) {
- if (old_sub == NULL) { /* there is no previous command */
- EMSG(_(e_nopresub));
- return;
- }
- sub = old_sub;
- } else {
- xfree(old_sub);
- old_sub = vim_strsave(sub);
- }
+ xfree(old_sub);
+ old_sub = vim_strsave(sub);
}
} else if (!eap->skip) { /* use previous pattern and substitution */
if (old_sub == NULL) { /* there is no previous command */
diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua
index 41c596c5a8..5221554306 100644
--- a/src/nvim/ex_cmds.lua
+++ b/src/nvim/ex_cmds.lua
@@ -3165,12 +3165,6 @@ return {
func='ex_previous',
},
{
- command='Print',
- flags=bit.bor(RANGE, WHOLEFOLD, COUNT, EXFLAGS, TRLBAR, CMDWIN),
- addr_type=ADDR_LINES,
- func='ex_print',
- },
- {
command='~',
enum='CMD_tilde',
flags=bit.bor(RANGE, WHOLEFOLD, EXTRA, CMDWIN, MODIFY),
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 3b6e05fd8a..3c57537397 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -2401,9 +2401,8 @@ static char_u *find_command(exarg_T *eap, int *full)
break;
}
- /* Look for a user defined command as a last resort. Let ":Print" be
- * overruled by a user defined command. */
- if ((eap->cmdidx == CMD_SIZE || eap->cmdidx == CMD_Print)
+ // Look for a user defined command as a last resort.
+ if ((eap->cmdidx == CMD_SIZE)
&& *eap->cmd >= 'A' && *eap->cmd <= 'Z') {
/* User defined commands may contain digits. */
while (ASCII_ISALNUM(*p))
@@ -6834,12 +6833,6 @@ void ex_cd(exarg_T *eap)
{
if (allbuf_locked())
return;
- if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged()
- && !eap->forceit) {
- EMSG(_(
- "E747: Cannot change directory, buffer is modified (add ! to override)"));
- return;
- }
/* ":cd -": Change to previous directory */
if (STRCMP(new_dir, "-") == 0) {
@@ -7554,8 +7547,9 @@ static void ex_mkrc(exarg_T *eap)
int vim_mkdir_emsg(char_u *name, int prot)
{
- if (os_mkdir((char *)name, prot) != 0) {
- EMSG2(_("E739: Cannot create directory: %s"), name);
+ int ret;
+ if ((ret = os_mkdir((char *)name, prot)) != 0) {
+ EMSG3(_(e_mkdir), name, os_strerror(ret));
return FAIL;
}
return OK;
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 4dfa155e61..58e4873e00 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -415,14 +415,11 @@ readfile (
msg_scroll = TRUE; /* don't overwrite previous file message */
/*
- * If the name ends in a path separator, we can't open it. Check here,
- * because reading the file may actually work, but then creating the swap
- * file may destroy it! Reported on MS-DOS and Win 95.
* If the name is too long we might crash further on, quit here.
*/
if (fname != NULL && *fname != NUL) {
p = fname + STRLEN(fname);
- if (after_pathsep((char *)fname, (char *)p) || STRLEN(fname) >= MAXPATHL) {
+ if (STRLEN(fname) >= MAXPATHL) {
filemess(curbuf, fname, (char_u *)_("Illegal file name"), 0);
msg_end();
msg_scroll = msg_save;
@@ -5121,116 +5118,9 @@ void forward_slash(char_u *fname)
/*
* Code for automatic commands.
*/
-
-
-static struct event_name {
- char *name; /* event name */
- event_T event; /* event number */
-} event_names[] =
-{
- {"BufAdd", EVENT_BUFADD},
- {"BufCreate", EVENT_BUFADD},
- {"BufDelete", EVENT_BUFDELETE},
- {"BufEnter", EVENT_BUFENTER},
- {"BufFilePost", EVENT_BUFFILEPOST},
- {"BufFilePre", EVENT_BUFFILEPRE},
- {"BufHidden", EVENT_BUFHIDDEN},
- {"BufLeave", EVENT_BUFLEAVE},
- {"BufNew", EVENT_BUFNEW},
- {"BufNewFile", EVENT_BUFNEWFILE},
- {"BufRead", EVENT_BUFREADPOST},
- {"BufReadCmd", EVENT_BUFREADCMD},
- {"BufReadPost", EVENT_BUFREADPOST},
- {"BufReadPre", EVENT_BUFREADPRE},
- {"BufUnload", EVENT_BUFUNLOAD},
- {"BufWinEnter", EVENT_BUFWINENTER},
- {"BufWinLeave", EVENT_BUFWINLEAVE},
- {"BufWipeout", EVENT_BUFWIPEOUT},
- {"BufWrite", EVENT_BUFWRITEPRE},
- {"BufWritePost", EVENT_BUFWRITEPOST},
- {"BufWritePre", EVENT_BUFWRITEPRE},
- {"BufWriteCmd", EVENT_BUFWRITECMD},
- {"CmdwinEnter", EVENT_CMDWINENTER},
- {"CmdwinLeave", EVENT_CMDWINLEAVE},
- {"CmdUndefined", EVENT_CMDUNDEFINED},
- {"ColorScheme", EVENT_COLORSCHEME},
- {"CompleteDone", EVENT_COMPLETEDONE},
- {"CursorHold", EVENT_CURSORHOLD},
- {"CursorHoldI", EVENT_CURSORHOLDI},
- {"CursorMoved", EVENT_CURSORMOVED},
- {"CursorMovedI", EVENT_CURSORMOVEDI},
- {"EncodingChanged", EVENT_ENCODINGCHANGED},
- {"FileEncoding", EVENT_ENCODINGCHANGED},
- {"FileAppendPost", EVENT_FILEAPPENDPOST},
- {"FileAppendPre", EVENT_FILEAPPENDPRE},
- {"FileAppendCmd", EVENT_FILEAPPENDCMD},
- {"FileChangedShell",EVENT_FILECHANGEDSHELL},
- {"FileChangedShellPost",EVENT_FILECHANGEDSHELLPOST},
- {"FileChangedRO", EVENT_FILECHANGEDRO},
- {"FileReadPost", EVENT_FILEREADPOST},
- {"FileReadPre", EVENT_FILEREADPRE},
- {"FileReadCmd", EVENT_FILEREADCMD},
- {"FileType", EVENT_FILETYPE},
- {"FileWritePost", EVENT_FILEWRITEPOST},
- {"FileWritePre", EVENT_FILEWRITEPRE},
- {"FileWriteCmd", EVENT_FILEWRITECMD},
- {"FilterReadPost", EVENT_FILTERREADPOST},
- {"FilterReadPre", EVENT_FILTERREADPRE},
- {"FilterWritePost", EVENT_FILTERWRITEPOST},
- {"FilterWritePre", EVENT_FILTERWRITEPRE},
- {"FocusGained", EVENT_FOCUSGAINED},
- {"FocusLost", EVENT_FOCUSLOST},
- {"FuncUndefined", EVENT_FUNCUNDEFINED},
- {"GUIEnter", EVENT_GUIENTER},
- {"GUIFailed", EVENT_GUIFAILED},
- {"InsertChange", EVENT_INSERTCHANGE},
- {"InsertEnter", EVENT_INSERTENTER},
- {"InsertLeave", EVENT_INSERTLEAVE},
- {"InsertCharPre", EVENT_INSERTCHARPRE},
- {"MenuPopup", EVENT_MENUPOPUP},
- {"QuickFixCmdPost", EVENT_QUICKFIXCMDPOST},
- {"QuickFixCmdPre", EVENT_QUICKFIXCMDPRE},
- {"QuitPre", EVENT_QUITPRE},
- {"RemoteReply", EVENT_REMOTEREPLY},
- {"SessionLoadPost", EVENT_SESSIONLOADPOST},
- {"ShellCmdPost", EVENT_SHELLCMDPOST},
- {"ShellFilterPost", EVENT_SHELLFILTERPOST},
- {"SourcePre", EVENT_SOURCEPRE},
- {"SourceCmd", EVENT_SOURCECMD},
- {"SpellFileMissing",EVENT_SPELLFILEMISSING},
- {"StdinReadPost", EVENT_STDINREADPOST},
- {"StdinReadPre", EVENT_STDINREADPRE},
- {"SwapExists", EVENT_SWAPEXISTS},
- {"Syntax", EVENT_SYNTAX},
- {"TabClosed", EVENT_TABCLOSED},
- {"TabEnter", EVENT_TABENTER},
- {"TabLeave", EVENT_TABLEAVE},
- {"TabNew", EVENT_TABNEW},
- {"TabNewEntered", EVENT_TABNEWENTERED},
- {"TermChanged", EVENT_TERMCHANGED},
- {"TermOpen", EVENT_TERMOPEN},
- {"TermResponse", EVENT_TERMRESPONSE},
- {"TextChanged", EVENT_TEXTCHANGED},
- {"TextChangedI", EVENT_TEXTCHANGEDI},
- {"User", EVENT_USER},
- {"VimEnter", EVENT_VIMENTER},
- {"VimLeave", EVENT_VIMLEAVE},
- {"VimLeavePre", EVENT_VIMLEAVEPRE},
- {"WinEnter", EVENT_WINENTER},
- {"WinLeave", EVENT_WINLEAVE},
- {"VimResized", EVENT_VIMRESIZED},
- {NULL, (event_T)0}
-};
-
-static AutoPat *first_autopat[NUM_EVENTS] =
-{
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
-};
+#ifdef INCLUDE_GENERATED_DECLARATIONS
+# include "auevents_name_map.generated.h"
+#endif
static AutoPatCmd *active_apc_list = NULL; /* stack of active autocommands */
@@ -5526,7 +5416,7 @@ static event_T event_name2nr(char_u *start, char_u **end)
for (p = start; *p && !ascii_iswhite(*p) && *p != ','; ++p)
;
for (i = 0; event_names[i].name != NULL; ++i) {
- len = (int)STRLEN(event_names[i].name);
+ len = (int) event_names[i].len;
if (len == p - start && STRNICMP(event_names[i].name, start, len) == 0)
break;
}
diff --git a/src/nvim/fileio.h b/src/nvim/fileio.h
index 3b37d359d7..d93f3f3eb3 100644
--- a/src/nvim/fileio.h
+++ b/src/nvim/fileio.h
@@ -13,100 +13,6 @@
#define READ_KEEP_UNDO 0x20 /* keep undo info*/
/*
- * Events for autocommands.
- */
-typedef enum auto_event {
- EVENT_BUFADD = 0, /* after adding a buffer to the buffer list */
- EVENT_BUFNEW, /* after creating any buffer */
- EVENT_BUFDELETE, /* deleting a buffer from the buffer list */
- EVENT_BUFWIPEOUT, /* just before really deleting a buffer */
- EVENT_BUFENTER, /* after entering a buffer */
- EVENT_BUFFILEPOST, /* after renaming a buffer */
- EVENT_BUFFILEPRE, /* before renaming a buffer */
- EVENT_BUFLEAVE, /* before leaving a buffer */
- EVENT_BUFNEWFILE, /* when creating a buffer for a new file */
- EVENT_BUFREADPOST, /* after reading a buffer */
- EVENT_BUFREADPRE, /* before reading a buffer */
- EVENT_BUFREADCMD, /* read buffer using command */
- EVENT_BUFUNLOAD, /* just before unloading a buffer */
- EVENT_BUFHIDDEN, /* just after buffer becomes hidden */
- EVENT_BUFWINENTER, /* after showing a buffer in a window */
- EVENT_BUFWINLEAVE, /* just after buffer removed from window */
- EVENT_BUFWRITEPOST, /* after writing a buffer */
- EVENT_BUFWRITEPRE, /* before writing a buffer */
- EVENT_BUFWRITECMD, /* write buffer using command */
- EVENT_CMDWINENTER, /* after entering the cmdline window */
- EVENT_CMDWINLEAVE, /* before leaving the cmdline window */
- EVENT_COLORSCHEME, /* after loading a colorscheme */
- EVENT_COMPLETEDONE, /* after finishing insert complete */
- EVENT_FILEAPPENDPOST, /* after appending to a file */
- EVENT_FILEAPPENDPRE, /* before appending to a file */
- EVENT_FILEAPPENDCMD, /* append to a file using command */
- EVENT_FILECHANGEDSHELL, /* after shell command that changed file */
- EVENT_FILECHANGEDSHELLPOST, /* after (not) reloading changed file */
- EVENT_FILECHANGEDRO, /* before first change to read-only file */
- EVENT_FILEREADPOST, /* after reading a file */
- EVENT_FILEREADPRE, /* before reading a file */
- EVENT_FILEREADCMD, /* read from a file using command */
- EVENT_FILETYPE, /* new file type detected (user defined) */
- EVENT_FILEWRITEPOST, /* after writing a file */
- EVENT_FILEWRITEPRE, /* before writing a file */
- EVENT_FILEWRITECMD, /* write to a file using command */
- EVENT_FILTERREADPOST, /* after reading from a filter */
- EVENT_FILTERREADPRE, /* before reading from a filter */
- EVENT_FILTERWRITEPOST, /* after writing to a filter */
- EVENT_FILTERWRITEPRE, /* before writing to a filter */
- EVENT_FOCUSGAINED, /* got the focus */
- EVENT_FOCUSLOST, /* lost the focus to another app */
- EVENT_GUIENTER, /* after starting the GUI */
- EVENT_GUIFAILED, /* after starting the GUI failed */
- EVENT_INSERTCHANGE, /* when changing Insert/Replace mode */
- EVENT_INSERTENTER, /* when entering Insert mode */
- EVENT_INSERTLEAVE, /* when leaving Insert mode */
- EVENT_MENUPOPUP, /* just before popup menu is displayed */
- EVENT_QUICKFIXCMDPOST, /* after :make, :grep etc. */
- EVENT_QUICKFIXCMDPRE, /* before :make, :grep etc. */
- EVENT_QUITPRE, /* before :quit */
- EVENT_SESSIONLOADPOST, /* after loading a session file */
- EVENT_STDINREADPOST, /* after reading from stdin */
- EVENT_STDINREADPRE, /* before reading from stdin */
- EVENT_SYNTAX, /* syntax selected */
- EVENT_TERMCHANGED, /* after changing 'term' */
- EVENT_TERMRESPONSE, /* after setting "v:termresponse" */
- EVENT_USER, /* user defined autocommand */
- EVENT_VIMENTER, /* after starting Vim */
- EVENT_VIMLEAVE, /* before exiting Vim */
- EVENT_VIMLEAVEPRE, /* before exiting Vim and writing .viminfo */
- EVENT_VIMRESIZED, /* after Vim window was resized */
- EVENT_WINENTER, /* after entering a window */
- EVENT_WINLEAVE, /* before leaving a window */
- EVENT_ENCODINGCHANGED, /* after changing the 'encoding' option */
- EVENT_INSERTCHARPRE, /* before inserting a char */
- EVENT_CURSORHOLD, /* cursor in same position for a while */
- EVENT_CURSORHOLDI, /* idem, in Insert mode */
- EVENT_FUNCUNDEFINED, /* if calling a function which doesn't exist */
- EVENT_REMOTEREPLY, /* upon string reception from a remote vim */
- EVENT_SWAPEXISTS, /* found existing swap file */
- EVENT_SOURCEPRE, /* before sourcing a Vim script */
- EVENT_SOURCECMD, /* sourcing a Vim script using command */
- EVENT_SPELLFILEMISSING, /* spell file missing */
- EVENT_CURSORMOVED, /* cursor was moved */
- EVENT_CURSORMOVEDI, /* cursor was moved in Insert mode */
- EVENT_TABCLOSED, /* a tab has closed */
- EVENT_TABLEAVE, /* before leaving a tab page */
- EVENT_TABENTER, /* after entering a tab page */
- EVENT_TABNEW, /* when creating a new tab */
- EVENT_TABNEWENTERED, /* after entering a new tab */
- EVENT_SHELLCMDPOST, /* after ":!cmd" */
- EVENT_SHELLFILTERPOST, /* after ":1,2!cmd", ":w !cmd", ":r !cmd". */
- EVENT_TERMOPEN, // after opening a terminal buffer
- EVENT_TEXTCHANGED, /* text was modified */
- EVENT_TEXTCHANGEDI, /* text was modified in Insert mode*/
- EVENT_CMDUNDEFINED, ///< command undefined
- NUM_EVENTS /* MUST be the last one */
-} event_T;
-
-/*
* Struct to save values in before executing autocommands for a buffer that is
* not the current buffer.
*/
@@ -120,6 +26,8 @@ typedef struct {
} aco_save_T;
#ifdef INCLUDE_GENERATED_DECLARATIONS
+// Events for autocommands
+# include "auevents_enum.generated.h"
# include "fileio.h.generated.h"
#endif
#endif // NVIM_FILEIO_H
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index c7164ef1f1..e4dcad9afb 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -59,7 +59,7 @@
/* Values for "starting" */
#define NO_SCREEN 2 /* no screen updating yet */
#define NO_BUFFERS 1 /* not all buffers loaded yet */
-/* 0 not starting anymore */
+/* 0 not starting anymore */
/*
* Number of Rows and Columns in the screen.
@@ -68,12 +68,16 @@
* They may have different values when the screen wasn't (re)allocated yet
* after setting Rows or Columns (e.g., when starting up).
*/
+
+#define DFLT_COLS 80 /* default value for 'columns' */
+#define DFLT_ROWS 24 /* default value for 'lines' */
+
EXTERN long Rows /* nr of rows in the screen */
#ifdef DO_INIT
- = 24L
+ = DFLT_ROWS
#endif
;
-EXTERN long Columns INIT(= 80); /* nr of columns in the screen */
+EXTERN long Columns INIT(= DFLT_COLS); /* nr of columns in the screen */
/*
* The characters and attributes cached for the screen.
@@ -1113,6 +1117,7 @@ EXTERN char_u e_jobtblfull[] INIT(= N_("E901: Job table is full"));
EXTERN char_u e_jobexe[] INIT(= N_("E902: \"%s\" is not an executable"));
EXTERN char_u e_jobnotpty[] INIT(= N_("E904: Job is not connected to a pty"));
EXTERN char_u e_libcall[] INIT(= N_("E364: Library call failed for \"%s()\""));
+EXTERN char_u e_mkdir[] INIT(= N_("E739: Cannot create directory %s: %s"));
EXTERN char_u e_markinval[] INIT(= N_("E19: Mark has invalid line number"));
EXTERN char_u e_marknotset[] INIT(= N_("E20: Mark not set"));
EXTERN char_u e_modifiable[] INIT(= N_(
diff --git a/src/nvim/main.c b/src/nvim/main.c
index e2ae63e134..bfaeada6de 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -521,6 +521,11 @@ int main(int argc, char **argv)
if (restart_edit != 0)
stuffcharReadbuff(K_NOP);
+ // WORKAROUND(mhi): #3023
+ if (cb_flags & CB_UNNAMEDMASK) {
+ (void)eval_has_provider("clipboard");
+ }
+
TIME_MSG("before starting main loop");
/*
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index f11dc636a3..53f9a544b4 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -587,8 +587,7 @@ void ml_close(buf_T *buf, int del_file)
void ml_close_all(int del_file)
{
FOR_ALL_BUFFERS(buf) {
- ml_close(buf, del_file && ((buf->b_flags & BF_PRESERVED) == 0
- || vim_strchr(p_cpo, CPO_PRESERVE) == NULL));
+ ml_close(buf, del_file && ((buf->b_flags & BF_PRESERVED) == 0));
}
spell_delete_wordlist(); /* delete the internal wordlist */
vim_deltempdir(); /* delete created temp directory */
diff --git a/src/nvim/menu.c b/src/nvim/menu.c
index 06351581ea..d965de6019 100644
--- a/src/nvim/menu.c
+++ b/src/nvim/menu.c
@@ -460,12 +460,6 @@ add_menu_path (
menu->silent[i] = menuarg->silent[0];
}
}
-#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) \
- && (defined(FEAT_BEVAL) || defined(FEAT_GUI_GTK))
- /* Need to update the menu tip. */
- if (modes & MENU_TIP_MODE)
- gui_mch_menu_set_tip(menu);
-#endif
}
return OK;
@@ -613,12 +607,6 @@ remove_menu (
menu->modes |= child->modes;
if (modes & MENU_TIP_MODE) {
free_menu_string(menu, MENU_INDEX_TIP);
-#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) \
- && (defined(FEAT_BEVAL) || defined(FEAT_GUI_GTK))
- /* Need to update the menu tip. */
- if (gui.in_use)
- gui_mch_menu_set_tip(menu);
-#endif
}
if ((menu->modes & MENU_ALL_MODES) == 0) {
/* The menu item is no longer valid in ANY mode, so delete it */
@@ -1269,11 +1257,15 @@ void ex_emenu(exarg_T *eap)
/* Found the menu, so execute.
* Use the Insert mode entry when returning to Insert mode. */
- if (restart_edit
- && !current_SID
- ) {
+ if (((State & INSERT) || restart_edit) && !current_SID) {
mode = (char_u *)"Insert";
idx = MENU_INDEX_INSERT;
+ } else if (get_real_state() & VISUAL) {
+ /* Detect real visual mode -- if we are really in visual mode we
+ * don't need to do any guesswork to figure out what the selection
+ * is. Just execute the visual binding for the menu. */
+ mode = (char_u *)"Visual";
+ idx = MENU_INDEX_VISUAL;
} else if (eap->addr_count) {
pos_T tpos;
@@ -1332,61 +1324,6 @@ void ex_emenu(exarg_T *eap)
EMSG2(_("E335: Menu not defined for %s mode"), mode);
}
-#if defined(FEAT_GUI_MSWIN) \
- || defined(FEAT_GUI_GTK) \
- || defined(FEAT_BEVAL_TIP)
-/*
- * Given a menu descriptor, e.g. "File.New", find it in the menu hierarchy.
- */
-vimmenu_T *gui_find_menu(char_u *path_name)
-{
- vimmenu_T *menu = NULL;
- char_u *name;
- char_u *saved_name;
- char_u *p;
-
- menu = root_menu;
-
- saved_name = vim_strsave(path_name);
-
- name = saved_name;
- while (*name) {
- /* find the end of one dot-separated name and put a NUL at the dot */
- p = menu_name_skip(name);
-
- while (menu != NULL) {
- if (menu_name_equal(name, menu)) {
- if (menu->children == NULL) {
- /* found a menu item instead of a sub-menu */
- if (*p == NUL)
- EMSG(_("E336: Menu path must lead to a sub-menu"));
- else
- EMSG(_(e_notsubmenu));
- menu = NULL;
- goto theend;
- }
- if (*p == NUL) /* found a full match */
- goto theend;
- break;
- }
- menu = menu->next;
- }
- if (menu == NULL) /* didn't find it */
- break;
-
- /* Found a match, search the sub-menu. */
- menu = menu->children;
- name = p;
- }
-
- if (menu == NULL)
- EMSG(_("E337: Menu not found - check menu names"));
-theend:
- xfree(saved_name);
- return menu;
-}
-#endif
-
/*
* Translation of menu names. Just a simple lookup table.
*/
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 5b4c90cc8f..8263ff4896 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -2234,15 +2234,11 @@ void mch_errmsg(char *str)
{
int len;
-#if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
+#ifdef UNIX
/* On Unix use stderr if it's a tty.
* When not going to start the GUI also use stderr.
* On Mac, when started from Finder, stderr is the console. */
- if (
-# ifdef UNIX
- isatty(2)
-# endif
- ) {
+ if (os_isatty(2)) {
fprintf(stderr, "%s", str);
return;
}
@@ -2284,16 +2280,12 @@ void mch_errmsg(char *str)
*/
void mch_msg(char *str)
{
-#if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
+#ifdef UNIX
/* On Unix use stdout if we have a tty. This allows "vim -h | more" and
* uses mch_errmsg() when started from the desktop.
* When not going to start the GUI also use stdout.
* On Mac, when started from Finder, stderr is the console. */
- if (
-# ifdef UNIX
- isatty(2)
-# endif
- ) {
+ if (os_isatty(2)) {
printf("%s", str);
return;
}
diff --git a/src/nvim/msgpack_rpc/remote_ui.c b/src/nvim/msgpack_rpc/remote_ui.c
index 07d78dd9d7..e582bf9550 100644
--- a/src/nvim/msgpack_rpc/remote_ui.c
+++ b/src/nvim/msgpack_rpc/remote_ui.c
@@ -86,8 +86,7 @@ static Object remote_ui_attach(uint64_t channel_id, uint64_t request_id,
ui->busy_stop = remote_ui_busy_stop;
ui->mouse_on = remote_ui_mouse_on;
ui->mouse_off = remote_ui_mouse_off;
- ui->insert_mode = remote_ui_insert_mode;
- ui->normal_mode = remote_ui_normal_mode;
+ ui->mode_change = remote_ui_mode_change;
ui->set_scroll_region = remote_ui_set_scroll_region;
ui->scroll = remote_ui_scroll;
ui->highlight_set = remote_ui_highlight_set;
@@ -214,16 +213,18 @@ static void remote_ui_mouse_off(UI *ui)
push_call(ui, "mouse_off", args);
}
-static void remote_ui_insert_mode(UI *ui)
+static void remote_ui_mode_change(UI *ui, int mode)
{
Array args = ARRAY_DICT_INIT;
- push_call(ui, "insert_mode", args);
-}
-
-static void remote_ui_normal_mode(UI *ui)
-{
- Array args = ARRAY_DICT_INIT;
- push_call(ui, "normal_mode", args);
+ if (mode == INSERT) {
+ ADD(args, STRING_OBJ(cstr_to_string("insert")));
+ } else if (mode == REPLACE) {
+ ADD(args, STRING_OBJ(cstr_to_string("replace")));
+ } else {
+ assert(mode == NORMAL);
+ ADD(args, STRING_OBJ(cstr_to_string("normal")));
+ }
+ push_call(ui, "mode_change", args);
}
static void remote_ui_set_scroll_region(UI *ui, int top, int bot, int left,
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index b66bc31b74..95e1c3d113 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -2016,6 +2016,9 @@ do_mouse (
if (regname == '.')
insert_reg(regname, true);
else {
+ if (regname == 0 && eval_has_provider("clipboard")) {
+ regname = '*';
+ }
if ((State & REPLACE_FLAG) && !yank_register_mline(regname))
insert_reg(regname, true);
else {
@@ -2105,11 +2108,6 @@ do_mouse (
* NOTE: Ignore right button down and drag mouse events.
* Windows only shows the popup menu on the button up event.
*/
-#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \
- || defined(FEAT_GUI_MAC)
- if (!is_click)
- return false;
-#endif
return false;
}
if (which_button == MOUSE_LEFT
@@ -2284,6 +2282,9 @@ do_mouse (
* Middle mouse click: Put text before cursor.
*/
if (which_button == MOUSE_MIDDLE) {
+ if (regname == 0 && eval_has_provider("clipboard")) {
+ regname = '*';
+ }
if (yank_register_mline(regname)) {
if (mouse_past_bottom)
dir = FORWARD;
@@ -5740,22 +5741,10 @@ static void nv_optrans(cmdarg_T *cap)
static char_u *str = (char_u *)"xXDCsSY&";
if (!checkclearopq(cap->oap)) {
- /* In Vi "2D" doesn't delete the next line. Can't translate it
- * either, because "2." should also not use the count. */
- if (cap->cmdchar == 'D' && vim_strchr(p_cpo, CPO_HASH) != NULL) {
- cap->oap->start = curwin->w_cursor;
- cap->oap->op_type = OP_DELETE;
- set_op_var(OP_DELETE);
- cap->count1 = 1;
- nv_dollar(cap);
- finish_op = true;
- ResetRedobuff();
- AppendCharToRedobuff('D');
- } else {
- if (cap->count0)
- stuffnumReadbuff(cap->count0);
- stuffReadbuff(ar[(int)(vim_strchr(str, cap->cmdchar) - str)]);
+ if (cap->count0) {
+ stuffnumReadbuff(cap->count0);
}
+ stuffReadbuff(ar[(int)(vim_strchr(str, cap->cmdchar) - str)]);
}
cap->opcount = 0;
}
@@ -6553,9 +6542,6 @@ static void n_opencmd(cmdarg_T *cap)
0, 0)) {
if (curwin->w_p_cole > 0 && oldline != curwin->w_cursor.lnum)
update_single_line(curwin, oldline);
- /* When '#' is in 'cpoptions' ignore the count. */
- if (vim_strchr(p_cpo, CPO_HASH) != NULL)
- cap->count1 = 1;
invoke_edit(cap, false, cap->cmdchar, true);
}
}
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 063ad154f1..8a7ced138b 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -765,7 +765,10 @@ yankreg_T *get_yank_register(int regname, int mode)
if (mode == YREG_PASTE && get_clipboard(regname, &reg, false)) {
// reg is set to clipboard contents.
return reg;
- } else if (mode != YREG_YANK && (regname == 0 || regname == '"') && y_previous != NULL) {
+ } else if (mode != YREG_YANK
+ && (regname == 0 || regname == '"' || regname == '*' || regname == '+')
+ && y_previous != NULL) {
+ // in case clipboard not available, paste from previous used register
return y_previous;
}
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 113c47f112..9a375c0675 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -97,121 +97,6 @@
#define OPT_BUF(x) (idopt_T)(PV_BUF + (int)(x))
#define OPT_BOTH(x) (idopt_T)(PV_BOTH + (int)(x))
-/*
- * Definition of the PV_ values for buffer-local options.
- * The BV_ values are defined in option_defs.h.
- */
-#define PV_AI OPT_BUF(BV_AI)
-#define PV_AR OPT_BOTH(OPT_BUF(BV_AR))
-#define PV_BKC OPT_BOTH(OPT_BUF(BV_BKC))
-# define PV_BH OPT_BUF(BV_BH)
-# define PV_BT OPT_BUF(BV_BT)
-# define PV_EFM OPT_BOTH(OPT_BUF(BV_EFM))
-# define PV_GP OPT_BOTH(OPT_BUF(BV_GP))
-# define PV_MP OPT_BOTH(OPT_BUF(BV_MP))
-#define PV_BIN OPT_BUF(BV_BIN)
-#define PV_BL OPT_BUF(BV_BL)
-# define PV_BOMB OPT_BUF(BV_BOMB)
-#define PV_CI OPT_BUF(BV_CI)
-# define PV_CIN OPT_BUF(BV_CIN)
-# define PV_CINK OPT_BUF(BV_CINK)
-# define PV_CINO OPT_BUF(BV_CINO)
-# define PV_CINW OPT_BUF(BV_CINW)
-#define PV_CM OPT_BOTH(OPT_BUF(BV_CM))
-# define PV_CMS OPT_BUF(BV_CMS)
-# define PV_COM OPT_BUF(BV_COM)
-# define PV_CPT OPT_BUF(BV_CPT)
-# define PV_DICT OPT_BOTH(OPT_BUF(BV_DICT))
-# define PV_TSR OPT_BOTH(OPT_BUF(BV_TSR))
-# define PV_CFU OPT_BUF(BV_CFU)
-# define PV_DEF OPT_BOTH(OPT_BUF(BV_DEF))
-# define PV_INC OPT_BOTH(OPT_BUF(BV_INC))
-#define PV_EOL OPT_BUF(BV_EOL)
-#define PV_EP OPT_BOTH(OPT_BUF(BV_EP))
-#define PV_ET OPT_BUF(BV_ET)
-# define PV_FENC OPT_BUF(BV_FENC)
-# define PV_FEX OPT_BUF(BV_FEX)
-#define PV_FF OPT_BUF(BV_FF)
-#define PV_FLP OPT_BUF(BV_FLP)
-#define PV_FO OPT_BUF(BV_FO)
-# define PV_FT OPT_BUF(BV_FT)
-#define PV_IMI OPT_BUF(BV_IMI)
-#define PV_IMS OPT_BUF(BV_IMS)
-# define PV_INDE OPT_BUF(BV_INDE)
-# define PV_INDK OPT_BUF(BV_INDK)
-# define PV_INEX OPT_BUF(BV_INEX)
-#define PV_INF OPT_BUF(BV_INF)
-#define PV_ISK OPT_BUF(BV_ISK)
-# define PV_KMAP OPT_BUF(BV_KMAP)
-#define PV_KP OPT_BOTH(OPT_BUF(BV_KP))
-# define PV_LISP OPT_BUF(BV_LISP)
-# define PV_LW OPT_BOTH(OPT_BUF(BV_LW))
-#define PV_MA OPT_BUF(BV_MA)
-#define PV_ML OPT_BUF(BV_ML)
-#define PV_MOD OPT_BUF(BV_MOD)
-#define PV_MPS OPT_BUF(BV_MPS)
-#define PV_NF OPT_BUF(BV_NF)
-# define PV_OFU OPT_BUF(BV_OFU)
-#define PV_PATH OPT_BOTH(OPT_BUF(BV_PATH))
-#define PV_PI OPT_BUF(BV_PI)
-# define PV_QE OPT_BUF(BV_QE)
-#define PV_RO OPT_BUF(BV_RO)
-# define PV_SI OPT_BUF(BV_SI)
-# define PV_SMC OPT_BUF(BV_SMC)
-# define PV_SYN OPT_BUF(BV_SYN)
-# define PV_SPC OPT_BUF(BV_SPC)
-# define PV_SPF OPT_BUF(BV_SPF)
-# define PV_SPL OPT_BUF(BV_SPL)
-#define PV_STS OPT_BUF(BV_STS)
-# define PV_SUA OPT_BUF(BV_SUA)
-#define PV_SW OPT_BUF(BV_SW)
-#define PV_SWF OPT_BUF(BV_SWF)
-#define PV_TAGS OPT_BOTH(OPT_BUF(BV_TAGS))
-#define PV_TS OPT_BUF(BV_TS)
-#define PV_TW OPT_BUF(BV_TW)
-# define PV_UDF OPT_BUF(BV_UDF)
-#define PV_WM OPT_BUF(BV_WM)
-
-/*
- * Definition of the PV_ values for window-local options.
- * The WV_ values are defined in option_defs.h.
- */
-#define PV_LIST OPT_WIN(WV_LIST)
-# define PV_ARAB OPT_WIN(WV_ARAB)
-# define PV_BRI OPT_WIN(WV_BRI)
-# define PV_BRIOPT OPT_WIN(WV_BRIOPT)
-# define PV_DIFF OPT_WIN(WV_DIFF)
-# define PV_FDC OPT_WIN(WV_FDC)
-# define PV_FEN OPT_WIN(WV_FEN)
-# define PV_FDI OPT_WIN(WV_FDI)
-# define PV_FDL OPT_WIN(WV_FDL)
-# define PV_FDM OPT_WIN(WV_FDM)
-# define PV_FML OPT_WIN(WV_FML)
-# define PV_FDN OPT_WIN(WV_FDN)
-# define PV_FDE OPT_WIN(WV_FDE)
-# define PV_FDT OPT_WIN(WV_FDT)
-# define PV_FMR OPT_WIN(WV_FMR)
-# define PV_LBR OPT_WIN(WV_LBR)
-#define PV_NU OPT_WIN(WV_NU)
-#define PV_RNU OPT_WIN(WV_RNU)
-# define PV_NUW OPT_WIN(WV_NUW)
-# define PV_PVW OPT_WIN(WV_PVW)
-# define PV_RL OPT_WIN(WV_RL)
-# define PV_RLC OPT_WIN(WV_RLC)
-# define PV_SCBIND OPT_WIN(WV_SCBIND)
-#define PV_SCROLL OPT_WIN(WV_SCROLL)
-# define PV_SPELL OPT_WIN(WV_SPELL)
-# define PV_CUC OPT_WIN(WV_CUC)
-# define PV_CUL OPT_WIN(WV_CUL)
-# define PV_CC OPT_WIN(WV_CC)
-# define PV_STL OPT_BOTH(OPT_WIN(WV_STL))
-#define PV_UL OPT_BOTH(OPT_BUF(BV_UL))
-# define PV_WFH OPT_WIN(WV_WFH)
-# define PV_WFW OPT_WIN(WV_WFW)
-#define PV_WRAP OPT_WIN(WV_WRAP)
-# define PV_CRBIND OPT_WIN(WV_CRBIND)
-# define PV_COCU OPT_WIN(WV_COCU)
-# define PV_COLE OPT_WIN(WV_COLE)
/* WV_ and BV_ values get typecasted to this for the "indir" field */
typedef enum {
@@ -380,1303 +265,10 @@ typedef struct vimoption {
* The options with a NULL variable are 'hidden': a set command for them is
* ignored and they are not printed.
*/
-static vimoption_T
- options[] =
-{
- {"aleph", "al", P_NUM|P_VI_DEF|P_CURSWANT,
- (char_u *)&p_aleph, PV_NONE,
- {
- (char_u *)224L,
- (char_u *)0L
- } SCRIPTID_INIT},
- {"antialias", "anti", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
- (char_u *)NULL, PV_NONE,
- {(char_u *)FALSE, (char_u *)FALSE}
- SCRIPTID_INIT},
- {"arabic", "arab", P_BOOL|P_VI_DEF|P_VIM|P_CURSWANT,
- VAR_WIN, PV_ARAB,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"arabicshape", "arshape", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
- (char_u *)&p_arshape, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"allowrevins", "ari", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_ari, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"altkeymap", "akm", P_BOOL|P_VI_DEF,
- (char_u *)&p_altkeymap, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"ambiwidth", "ambw", P_STRING|P_VI_DEF|P_RCLR,
- (char_u *)&p_ambw, PV_NONE,
- {(char_u *)"single", (char_u *)0L}
- SCRIPTID_INIT},
- {"autochdir", "acd", P_BOOL|P_VI_DEF,
- (char_u *)&p_acd, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"autoindent", "ai", P_BOOL,
- (char_u *)&p_ai, PV_AI,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"autoread", "ar", P_BOOL|P_VIM,
- (char_u *)&p_ar, PV_AR,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"autowrite", "aw", P_BOOL|P_VI_DEF,
- (char_u *)&p_aw, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"autowriteall","awa", P_BOOL|P_VI_DEF,
- (char_u *)&p_awa, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"background", "bg", P_STRING|P_VI_DEF|P_RCLR,
- (char_u *)&p_bg, PV_NONE,
- {
- (char_u *)"light",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"backspace", "bs", P_STRING|P_VIM|P_COMMA|P_NODUP,
- (char_u *)&p_bs, PV_NONE,
- {(char_u *)"", (char_u *)"indent,eol,start"} SCRIPTID_INIT},
- {"backup", "bk", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_bk, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"backupcopy", "bkc", P_STRING|P_VIM|P_COMMA|P_NODUP,
- (char_u *)&p_bkc, PV_BKC,
-#ifdef UNIX
- {(char_u *)"yes", (char_u *)"auto"}
-#else
- {(char_u *)"auto", (char_u *)"auto"}
-#endif
- SCRIPTID_INIT},
- {"backupdir", "bdir", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP|P_SECURE,
- (char_u *)&p_bdir, PV_NONE,
- {(char_u *)DFLT_BDIR, (char_u *)0L} SCRIPTID_INIT},
- {"backupext", "bex", P_STRING|P_VI_DEF|P_NFNAME,
- (char_u *)&p_bex, PV_NONE,
- {
- (char_u *)"~",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"backupskip", "bsk", P_STRING|P_VI_DEF|P_COMMA,
- (char_u *)&p_bsk, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"binary", "bin", P_BOOL|P_VI_DEF|P_RSTAT,
- (char_u *)&p_bin, PV_BIN,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"bomb", NULL, P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
- (char_u *)&p_bomb, PV_BOMB,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"breakat", "brk", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
- (char_u *)&p_breakat, PV_NONE,
- {(char_u *)" \t!@*-+;:,./?", (char_u *)0L}
- SCRIPTID_INIT},
- {"breakindent", "bri", P_BOOL|P_VI_DEF|P_VIM|P_RWIN,
- VAR_WIN, PV_BRI,
- {(char_u *)FALSE, (char_u *)0L}
- SCRIPTID_INIT},
- {"breakindentopt", "briopt", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_COMMA|P_NODUP,
- VAR_WIN, PV_BRIOPT,
- {(char_u *)"", (char_u *)NULL}
- SCRIPTID_INIT},
- {"browsedir", "bsdir",P_STRING|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)0L, (char_u *)0L}
- SCRIPTID_INIT},
- {"bufhidden", "bh", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB,
- (char_u *)&p_bh, PV_BH,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"buflisted", "bl", P_BOOL|P_VI_DEF|P_NOGLOB,
- (char_u *)&p_bl, PV_BL,
- {(char_u *)1L, (char_u *)0L}
- SCRIPTID_INIT},
- {"buftype", "bt", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB,
- (char_u *)&p_bt, PV_BT,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"casemap", "cmp", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_cmp, PV_NONE,
- {(char_u *)"internal,keepascii", (char_u *)0L}
- SCRIPTID_INIT},
- {"cdpath", "cd", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_cdpath, PV_NONE,
- {(char_u *)",,", (char_u *)0L}
- SCRIPTID_INIT},
- {"cedit", NULL, P_STRING,
- (char_u *)&p_cedit, PV_NONE,
- {(char_u *)"", (char_u *)CTRL_F_STR}
- SCRIPTID_INIT},
- {"charconvert", "ccv", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_ccv, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"cindent", "cin", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_cin, PV_CIN,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"cinkeys", "cink", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_cink, PV_CINK,
- {(char_u *)"0{,0},0),:,0#,!^F,o,O,e", (char_u *)0L}
- SCRIPTID_INIT},
- {"cinoptions", "cino", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_cino, PV_CINO,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"cinwords", "cinw", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_cinw, PV_CINW,
- {(char_u *)"if,else,while,do,for,switch",
- (char_u *)0L}
- SCRIPTID_INIT},
- {"clipboard", "cb", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_cb, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"cmdheight", "ch", P_NUM|P_VI_DEF|P_RALL,
- (char_u *)&p_ch, PV_NONE,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"cmdwinheight", "cwh", P_NUM|P_VI_DEF,
- (char_u *)&p_cwh, PV_NONE,
- {(char_u *)7L, (char_u *)0L} SCRIPTID_INIT},
- {"colorcolumn", "cc", P_STRING|P_VI_DEF|P_COMMA|P_NODUP|P_RWIN,
- VAR_WIN, PV_CC,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"columns", "co", P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
- (char_u *)&Columns, PV_NONE,
- {(char_u *)80L, (char_u *)0L} SCRIPTID_INIT},
- {"comments", "com", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP|
- P_CURSWANT,
- (char_u *)&p_com, PV_COM,
- {(char_u *)"s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-",
- (char_u *)0L}
- SCRIPTID_INIT},
- {"commentstring", "cms", P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT,
- (char_u *)&p_cms, PV_CMS,
- {(char_u *)"/*%s*/", (char_u *)0L}
- SCRIPTID_INIT},
- /* P_PRI_MKRC isn't needed here, optval_default()
- * always returns TRUE for 'compatible' */
- {"compatible", "cp", P_BOOL|P_RALL,
- (char_u *)&p_force_off, PV_NONE,
- {(char_u *)TRUE, (char_u *)FALSE} SCRIPTID_INIT},
- {"complete", "cpt", P_STRING|P_ALLOCED|P_COMMA|P_NODUP,
- (char_u *)&p_cpt, PV_CPT,
- {(char_u *)".,w,b,u,t,i", (char_u *)".,w,b,u,t"}
- SCRIPTID_INIT},
- {"concealcursor","cocu", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF,
- VAR_WIN, PV_COCU,
- {(char_u *)"", (char_u *)NULL}
- SCRIPTID_INIT},
- {"conceallevel","cole", P_NUM|P_RWIN|P_VI_DEF,
- VAR_WIN, PV_COLE,
- {(char_u *)0L, (char_u *)0L}
- SCRIPTID_INIT},
- {"completefunc", "cfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE,
- (char_u *)&p_cfu, PV_CFU,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"completeopt", "cot", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_cot, PV_NONE,
- {(char_u *)"menu,preview", (char_u *)0L}
- SCRIPTID_INIT},
- {"confirm", "cf", P_BOOL|P_VI_DEF,
- (char_u *)&p_confirm, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"copyindent", "ci", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_ci, PV_CI,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"cpoptions", "cpo", P_STRING|P_VIM|P_RALL|P_FLAGLIST,
- (char_u *)&p_cpo, PV_NONE,
- {(char_u *)CPO_VI, (char_u *)CPO_VIM}
- SCRIPTID_INIT},
- {"cscopepathcomp", "cspc", P_NUM|P_VI_DEF|P_VIM,
- (char_u *)&p_cspc, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"cscopeprg", "csprg", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_csprg, PV_NONE,
- {(char_u *)"cscope", (char_u *)0L}
- SCRIPTID_INIT},
- {"cscopequickfix", "csqf", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_csqf, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"cscoperelative", "csre", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_csre, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"cscopetag", "cst", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_cst, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"cscopetagorder", "csto", P_NUM|P_VI_DEF|P_VIM,
- (char_u *)&p_csto, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"cscopeverbose", "csverb", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_csverbose, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"cursorbind", "crb", P_BOOL|P_VI_DEF,
- VAR_WIN, PV_CRBIND,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"cursorcolumn", "cuc", P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_CUC,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_CUL,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"debug", NULL, P_STRING|P_VI_DEF,
- (char_u *)&p_debug, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"define", "def", P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT,
- (char_u *)&p_def, PV_DEF,
- {(char_u *)"^\\s*#\\s*define", (char_u *)0L}
- SCRIPTID_INIT},
- {"delcombine", "deco", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_deco, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_dict, PV_DICT,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"diff", NULL, P_BOOL|P_VI_DEF|P_RWIN|P_NOGLOB,
- VAR_WIN, PV_DIFF,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"diffexpr", "dex", P_STRING|P_VI_DEF|P_SECURE|P_CURSWANT,
- (char_u *)&p_dex, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"diffopt", "dip", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN|P_COMMA|P_NODUP,
- (char_u *)&p_dip, PV_NONE,
- {(char_u *)"filler", (char_u *)NULL}
- SCRIPTID_INIT},
- {"digraph", "dg", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_dg, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"directory", "dir", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP|P_SECURE,
- (char_u *)&p_dir, PV_NONE,
- {(char_u *)DFLT_DIR, (char_u *)0L} SCRIPTID_INIT},
- {"display", "dy", P_STRING|P_VIM|P_COMMA|P_RALL|P_NODUP,
- (char_u *)&p_dy, PV_NONE,
- {(char_u *)"", (char_u *)"lastline"} SCRIPTID_INIT},
- {"eadirection", "ead", P_STRING|P_VI_DEF,
- (char_u *)&p_ead, PV_NONE,
- {(char_u *)"both", (char_u *)0L}
- SCRIPTID_INIT},
- {"edcompatible","ed", P_BOOL|P_VI_DEF,
- (char_u *)&p_force_off, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"encoding", "enc", P_STRING|P_VI_DEF|P_RCLR|P_NO_ML,
- (char_u *)&p_enc, PV_NONE,
- {(char_u *)ENC_DFLT, (char_u *)0L}
- SCRIPTID_INIT},
- {"endofline", "eol", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
- (char_u *)&p_eol, PV_EOL,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"equalalways", "ea", P_BOOL|P_VI_DEF|P_RALL,
- (char_u *)&p_ea, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"equalprg", "ep", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_ep, PV_EP,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"errorbells", "eb", P_BOOL|P_VI_DEF,
- (char_u *)&p_eb, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"errorfile", "ef", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_ef, PV_NONE,
- {(char_u *)DFLT_ERRORFILE, (char_u *)0L}
- SCRIPTID_INIT},
- {"errorformat", "efm", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_efm, PV_EFM,
- {(char_u *)DFLT_EFM, (char_u *)0L}
- SCRIPTID_INIT},
- {"esckeys", "ek", P_BOOL|P_VIM,
- (char_u *)&p_ek, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"eventignore", "ei", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_ei, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"expandtab", "et", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_et, PV_ET,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"exrc", "ex", P_BOOL|P_VI_DEF|P_SECURE,
- (char_u *)&p_exrc, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"fileencoding","fenc", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_RBUF|P_NO_MKRC,
- (char_u *)&p_fenc, PV_FENC,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"fileencodings","fencs", P_STRING|P_VI_DEF|P_COMMA,
- (char_u *)&p_fencs, PV_NONE,
- {(char_u *)"ucs-bom", (char_u *)0L}
- SCRIPTID_INIT},
- {"fileformat", "ff", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_NO_MKRC|
- P_CURSWANT,
- (char_u *)&p_ff, PV_FF,
- {(char_u *)DFLT_FF, (char_u *)0L} SCRIPTID_INIT},
- {"fileformats", "ffs", P_STRING|P_VIM|P_COMMA|P_NODUP,
- (char_u *)&p_ffs, PV_NONE,
- {(char_u *)DFLT_FFS_VI, (char_u *)DFLT_FFS_VIM}
- SCRIPTID_INIT},
- {"fileignorecase", "fic", P_BOOL|P_VI_DEF,
- (char_u *)&p_fic, PV_NONE,
- {
-#ifdef CASE_INSENSITIVE_FILENAME
- (char_u *)TRUE,
-#else
- (char_u *)FALSE,
-#endif
- (char_u *)0L
- } SCRIPTID_INIT},
- {"filetype", "ft", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME,
- (char_u *)&p_ft, PV_FT,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"fillchars", "fcs", P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
- (char_u *)&p_fcs, PV_NONE,
- {(char_u *)"vert:|,fold:-", (char_u *)0L}
- SCRIPTID_INIT},
- {"fkmap", "fk", P_BOOL|P_VI_DEF,
- (char_u *)&p_fkmap, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"foldclose", "fcl", P_STRING|P_VI_DEF|P_COMMA|P_NODUP|P_RWIN,
- (char_u *)&p_fcl, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"foldcolumn", "fdc", P_NUM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FDC,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"foldenable", "fen", P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FEN,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"foldexpr", "fde", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FDE,
- {(char_u *)"0", (char_u *)NULL}
- SCRIPTID_INIT},
- {"foldignore", "fdi", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FDI,
- {(char_u *)"#", (char_u *)NULL} SCRIPTID_INIT},
- {"foldlevel", "fdl", P_NUM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FDL,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"foldlevelstart","fdls", P_NUM|P_VI_DEF|P_CURSWANT,
- (char_u *)&p_fdls, PV_NONE,
- {(char_u *)-1L, (char_u *)0L} SCRIPTID_INIT},
- {"foldmarker", "fmr", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|
- P_RWIN|P_COMMA|P_NODUP,
- VAR_WIN, PV_FMR,
- {(char_u *)"{{{,}}}", (char_u *)NULL}
- SCRIPTID_INIT},
- {"foldmethod", "fdm", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FDM,
- {(char_u *)"manual", (char_u *)NULL} SCRIPTID_INIT},
- {"foldminlines","fml", P_NUM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FML,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"foldnestmax", "fdn", P_NUM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FDN,
- {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
- {"foldopen", "fdo", P_STRING|P_VI_DEF|P_COMMA|P_NODUP|P_CURSWANT,
- (char_u *)&p_fdo, PV_NONE,
- {(char_u *)"block,hor,mark,percent,quickfix,search,tag,undo",
- (char_u *)0L} SCRIPTID_INIT},
- {"foldtext", "fdt", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_FDT,
- {(char_u *)"foldtext()", (char_u *)NULL}
- SCRIPTID_INIT},
- {"formatexpr", "fex", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
- (char_u *)&p_fex, PV_FEX,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"formatoptions","fo", P_STRING|P_ALLOCED|P_VIM|P_FLAGLIST,
- (char_u *)&p_fo, PV_FO,
- {(char_u *)DFLT_FO_VI, (char_u *)DFLT_FO_VIM}
- SCRIPTID_INIT},
- {"formatlistpat","flp", P_STRING|P_ALLOCED|P_VI_DEF,
- (char_u *)&p_flp, PV_FLP,
- {(char_u *)"^\\s*\\d\\+[\\]:.)}\\t ]\\s*",
- (char_u *)0L} SCRIPTID_INIT},
- {"formatprg", "fp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_fp, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"fsync", "fs", P_BOOL|P_SECURE|P_VI_DEF,
-#ifdef HAVE_FSYNC
- (char_u *)&p_fs, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L}
-#else
- (char_u *)NULL, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L}
-#endif
- SCRIPTID_INIT},
- {"gdefault", "gd", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_gd, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"grepformat", "gfm", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_gefm, PV_NONE,
- {(char_u *)DFLT_GREPFORMAT, (char_u *)0L}
- SCRIPTID_INIT},
- {"grepprg", "gp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_gp, PV_GP,
- {
-# ifdef UNIX
- /* Add an extra file name so that grep will always
- * insert a file name in the match line. */
- (char_u *)"grep -n $* /dev/null",
-# else
- (char_u *)"grep -n ",
-# endif
- (char_u *)0L
- }
- SCRIPTID_INIT},
- {"guicursor", "gcr", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_guicursor, PV_NONE,
- {
- (char_u *)"n-v-c:block,o:hor50,i-ci:hor15,r-cr:hor30,sm:block",
- (char_u *)0L
- }
- SCRIPTID_INIT},
- {"guifont", "gfn", P_STRING|P_VI_DEF|P_RCLR|P_COMMA|P_NODUP,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"guifontset", "gfs", P_STRING|P_VI_DEF|P_RCLR|P_COMMA,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"guifontwide", "gfw", P_STRING|P_VI_DEF|P_RCLR|P_COMMA|P_NODUP,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"guiheadroom", "ghr", P_NUM|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)50L, (char_u *)0L} SCRIPTID_INIT},
- {"guioptions", "go", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"guitablabel", "gtl", P_STRING|P_VI_DEF|P_RWIN,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"guitabtooltip", "gtt", P_STRING|P_VI_DEF|P_RWIN,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"helpfile", "hf", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_hf, PV_NONE,
- {(char_u *)DFLT_HELPFILE, (char_u *)0L}
- SCRIPTID_INIT},
- {"helpheight", "hh", P_NUM|P_VI_DEF,
- (char_u *)&p_hh, PV_NONE,
- {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
- {"helplang", "hlg", P_STRING|P_VI_DEF|P_COMMA,
- (char_u *)&p_hlg, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"hidden", "hid", P_BOOL|P_VI_DEF,
- (char_u *)&p_hid, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"highlight", "hl", P_STRING|P_VI_DEF|P_RCLR|P_COMMA|P_NODUP,
- (char_u *)&p_hl, PV_NONE,
- {(char_u *)HIGHLIGHT_INIT, (char_u *)0L}
- SCRIPTID_INIT},
- {"history", "hi", P_NUM|P_VIM,
- (char_u *)&p_hi, PV_NONE,
- {(char_u *)0L, (char_u *)50L} SCRIPTID_INIT},
- {"hkmap", "hk", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_hkmap, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"hkmapp", "hkp", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_hkmapp, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"hlsearch", "hls", P_BOOL|P_VIM|P_RALL,
- (char_u *)&p_hls, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"icon", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_icon, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"iconstring", NULL, P_STRING|P_VI_DEF,
- (char_u *)&p_iconstring, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"ignorecase", "ic", P_BOOL|P_VI_DEF,
- (char_u *)&p_ic, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"imactivatefunc","imaf",P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"imactivatekey","imak",P_STRING|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"imcmdline", "imc", P_BOOL|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"imdisable", "imd", P_BOOL|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L}
- SCRIPTID_INIT},
- {"iminsert", "imi", P_NUM|P_VI_DEF,
- (char_u *)&p_iminsert, PV_IMI,
-#ifdef B_IMODE_IM
- {(char_u *)B_IMODE_IM, (char_u *)0L}
-#else
- {(char_u *)B_IMODE_NONE, (char_u *)0L}
-#endif
- SCRIPTID_INIT},
- {"imsearch", "ims", P_NUM|P_VI_DEF,
- (char_u *)&p_imsearch, PV_IMS,
-#ifdef B_IMODE_IM
- {(char_u *)B_IMODE_IM, (char_u *)0L}
-#else
- {(char_u *)B_IMODE_NONE, (char_u *)0L}
-#endif
- SCRIPTID_INIT},
- {"imstatusfunc","imsf",P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"include", "inc", P_STRING|P_ALLOCED|P_VI_DEF,
- (char_u *)&p_inc, PV_INC,
- {(char_u *)"^\\s*#\\s*include", (char_u *)0L}
- SCRIPTID_INIT},
- {"includeexpr", "inex", P_STRING|P_ALLOCED|P_VI_DEF,
- (char_u *)&p_inex, PV_INEX,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"incsearch", "is", P_BOOL|P_VIM,
- (char_u *)&p_is, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"indentexpr", "inde", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
- (char_u *)&p_inde, PV_INDE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"indentkeys", "indk", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_indk, PV_INDK,
- {(char_u *)"0{,0},:,0#,!^F,o,O,e", (char_u *)0L}
- SCRIPTID_INIT},
- {"infercase", "inf", P_BOOL|P_VI_DEF,
- (char_u *)&p_inf, PV_INF,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"insertmode", "im", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_im, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"isfname", "isf", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_isf, PV_NONE,
- {
-#ifdef BACKSLASH_IN_FILENAME
- /* Excluded are: & and ^ are special in cmd.exe
- * ( and ) are used in text separating fnames */
- (char_u *)"@,48-57,/,\\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,=",
-#else
- (char_u *)"@,48-57,/,.,-,_,+,,,#,$,%,~,=",
-#endif
- (char_u *)0L
- } SCRIPTID_INIT},
- {"isident", "isi", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_isi, PV_NONE,
- {
- (char_u *)"@,48-57,_,192-255",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"iskeyword", "isk", P_STRING|P_ALLOCED|P_VIM|P_COMMA|P_NODUP,
- (char_u *)&p_isk, PV_ISK,
- {
- (char_u *)"@,48-57,_",
- ISK_LATIN1
- } SCRIPTID_INIT},
- {"isprint", "isp", P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
- (char_u *)&p_isp, PV_NONE,
- {
-#if defined(MSWIN)
- (char_u *)"@,~-255",
-#else
- ISP_LATIN1,
-#endif
- (char_u *)0L
- } SCRIPTID_INIT},
- {"joinspaces", "js", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_js, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"keymap", "kmp", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_RSTAT|P_NFNAME|
- P_PRI_MKRC,
- (char_u *)&p_keymap, PV_KMAP,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"keymodel", "km", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_km, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"keywordprg", "kp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_kp, PV_KP,
- {
-# ifdef USEMAN_S
- (char_u *)"man -s",
-# else
- (char_u *)"man",
-# endif
- (char_u *)0L
- } SCRIPTID_INIT},
- {"langmap", "lmap", P_STRING|P_VI_DEF|P_COMMA|P_NODUP|P_SECURE,
- (char_u *)&p_langmap, PV_NONE,
- {(char_u *)"", /* unmatched } */
- (char_u *)0L} SCRIPTID_INIT},
- {"langmenu", "lm", P_STRING|P_VI_DEF|P_NFNAME,
- (char_u *)&p_lm, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"langnoremap", "lnr", P_BOOL,
- (char_u *)&p_lnr, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"laststatus", "ls", P_NUM|P_VI_DEF|P_RALL,
- (char_u *)&p_ls, PV_NONE,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"lazyredraw", "lz", P_BOOL|P_VI_DEF,
- (char_u *)&p_lz, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"linebreak", "lbr", P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_LBR,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"lines", NULL, P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
- (char_u *)&Rows, PV_NONE,
- {
- (char_u *)24L,
- (char_u *)0L
- } SCRIPTID_INIT},
- {"linespace", "lsp", P_NUM|P_VI_DEF|P_RCLR,
- (char_u *)NULL, PV_NONE,
- {(char_u *)0L, (char_u *)0L}
- SCRIPTID_INIT},
- {"lisp", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_lisp, PV_LISP,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"lispwords", "lw", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_lispwords, PV_LW,
- {(char_u *)LISPWORD_VALUE, (char_u *)0L}
- SCRIPTID_INIT},
- {"list", NULL, P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_LIST,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"listchars", "lcs", P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
- (char_u *)&p_lcs, PV_NONE,
- {(char_u *)"eol:$", (char_u *)0L} SCRIPTID_INIT},
- {"loadplugins", "lpl", P_BOOL|P_VI_DEF,
- (char_u *)&p_lpl, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"magic", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_magic, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"makeef", "mef", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_mef, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"makeprg", "mp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_mp, PV_MP,
- {(char_u *)"make", (char_u *)0L}
- SCRIPTID_INIT},
- {"matchpairs", "mps", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_mps, PV_MPS,
- {(char_u *)"(:),{:},[:]", (char_u *)0L}
- SCRIPTID_INIT},
- {"matchtime", "mat", P_NUM|P_VI_DEF,
- (char_u *)&p_mat, PV_NONE,
- {(char_u *)5L, (char_u *)0L} SCRIPTID_INIT},
- {"maxcombine", "mco", P_NUM|P_VI_DEF|P_CURSWANT,
- (char_u *)&p_mco, PV_NONE,
- {(char_u *)2, (char_u *)0L} SCRIPTID_INIT},
- {"maxfuncdepth", "mfd", P_NUM|P_VI_DEF,
- (char_u *)&p_mfd, PV_NONE,
- {(char_u *)100L, (char_u *)0L} SCRIPTID_INIT},
- {"maxmapdepth", "mmd", P_NUM|P_VI_DEF,
- (char_u *)&p_mmd, PV_NONE,
- {(char_u *)1000L, (char_u *)0L} SCRIPTID_INIT},
- {"maxmem", "mm", P_NUM|P_VI_DEF,
- (char_u *)&p_mm, PV_NONE,
- {(char_u *)DFLT_MAXMEM, (char_u *)0L}
- SCRIPTID_INIT},
- {"maxmempattern","mmp", P_NUM|P_VI_DEF,
- (char_u *)&p_mmp, PV_NONE,
- {(char_u *)1000L, (char_u *)0L} SCRIPTID_INIT},
- {"maxmemtot", "mmt", P_NUM|P_VI_DEF,
- (char_u *)&p_mmt, PV_NONE,
- {(char_u *)DFLT_MAXMEMTOT, (char_u *)0L}
- SCRIPTID_INIT},
- {"menuitems", "mis", P_NUM|P_VI_DEF,
- (char_u *)&p_mis, PV_NONE,
- {(char_u *)25L, (char_u *)0L} SCRIPTID_INIT},
- {"mkspellmem", "msm", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE,
- (char_u *)&p_msm, PV_NONE,
- {(char_u *)"460000,2000,500", (char_u *)0L}
- SCRIPTID_INIT},
- {"modeline", "ml", P_BOOL|P_VIM,
- (char_u *)&p_ml, PV_ML,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"modelines", "mls", P_NUM|P_VI_DEF,
- (char_u *)&p_mls, PV_NONE,
- {(char_u *)5L, (char_u *)0L} SCRIPTID_INIT},
- {"modifiable", "ma", P_BOOL|P_VI_DEF|P_NOGLOB,
- (char_u *)&p_ma, PV_MA,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"modified", "mod", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
- (char_u *)&p_mod, PV_MOD,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"more", NULL, P_BOOL|P_VIM,
- (char_u *)&p_more, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"mouse", NULL, P_STRING|P_FLAGLIST,
- (char_u *)&p_mouse, PV_NONE,
- {
- (char_u *)"",
- (char_u *)"a"
- } SCRIPTID_INIT},
- {"mousefocus", "mousef", P_BOOL|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"mousehide", "mh", P_BOOL|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"mousemodel", "mousem", P_STRING|P_VI_DEF,
- (char_u *)&p_mousem, PV_NONE,
- {
- (char_u *)"extend",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"mouseshape", "mouses", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)NULL, PV_NONE,
- {(char_u *)NULL, (char_u *)0L}
- SCRIPTID_INIT},
- {"mousetime", "mouset", P_NUM|P_VI_DEF,
- (char_u *)&p_mouset, PV_NONE,
- {(char_u *)500L, (char_u *)0L} SCRIPTID_INIT},
- {"nrformats", "nf", P_STRING|P_ALLOCED|P_VIM|P_COMMA|P_NODUP,
- (char_u *)&p_nf, PV_NF,
- {(char_u *)"octal,hex", (char_u *)"hex"}
- SCRIPTID_INIT},
- {"number", "nu", P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_NU,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"numberwidth", "nuw", P_NUM|P_RWIN|P_VIM,
- VAR_WIN, PV_NUW,
- {(char_u *)8L, (char_u *)4L} SCRIPTID_INIT},
- {"omnifunc", "ofu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE,
- (char_u *)&p_ofu, PV_OFU,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"opendevice", "odev", P_BOOL|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)FALSE, (char_u *)FALSE}
- SCRIPTID_INIT},
- {"operatorfunc", "opfunc", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_opfunc, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"paragraphs", "para", P_STRING|P_VI_DEF,
- (char_u *)&p_para, PV_NONE,
- {(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp",
- (char_u *)0L} SCRIPTID_INIT},
- {"paste", NULL, P_BOOL|P_VI_DEF|P_PRI_MKRC,
- (char_u *)&p_paste, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"pastetoggle", "pt", P_STRING|P_VI_DEF,
- (char_u *)&p_pt, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"patchexpr", "pex", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_pex, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"patchmode", "pm", P_STRING|P_VI_DEF|P_NFNAME,
- (char_u *)&p_pm, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"path", "pa", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_path, PV_PATH,
- {
- (char_u *)".,/usr/include,,",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_pi, PV_PI,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"previewheight", "pvh", P_NUM|P_VI_DEF,
- (char_u *)&p_pvh, PV_NONE,
- {(char_u *)12L, (char_u *)0L} SCRIPTID_INIT},
- {"previewwindow", "pvw", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB,
- VAR_WIN, PV_PVW,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"printdevice", "pdev", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_pdev, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"printencoding", "penc", P_STRING|P_VI_DEF,
- (char_u *)&p_penc, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"printexpr", "pexpr", P_STRING|P_VI_DEF,
- (char_u *)&p_pexpr, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"printfont", "pfn", P_STRING|P_VI_DEF,
- (char_u *)&p_pfn, PV_NONE,
- {
- (char_u *)"courier",
- (char_u *)0L
- }
- SCRIPTID_INIT},
- {"printheader", "pheader", P_STRING|P_VI_DEF|P_GETTEXT,
- (char_u *)&p_header, PV_NONE,
- {(char_u *)N_("%<%f%h%m%=Page %N"), (char_u *)0L}
- SCRIPTID_INIT},
- {"printmbcharset", "pmbcs", P_STRING|P_VI_DEF,
- (char_u *)&p_pmcs, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"printmbfont", "pmbfn", P_STRING|P_VI_DEF,
- (char_u *)&p_pmfn, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"printoptions", "popt", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_popt, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"prompt", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_prompt, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"pumheight", "ph", P_NUM|P_VI_DEF,
- (char_u *)&p_ph, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"quoteescape", "qe", P_STRING|P_ALLOCED|P_VI_DEF,
- (char_u *)&p_qe, PV_QE,
- {(char_u *)"\\", (char_u *)0L}
- SCRIPTID_INIT},
- {"readonly", "ro", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB,
- (char_u *)&p_ro, PV_RO,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"redrawtime", "rdt", P_NUM|P_VI_DEF,
- (char_u *)&p_rdt, PV_NONE,
- {(char_u *)2000L, (char_u *)0L} SCRIPTID_INIT},
- {"regexpengine", "re", P_NUM|P_VI_DEF,
- (char_u *)&p_re, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"relativenumber", "rnu", P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_RNU,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"remap", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_remap, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"report", NULL, P_NUM|P_VI_DEF,
- (char_u *)&p_report, PV_NONE,
- {(char_u *)2L, (char_u *)0L} SCRIPTID_INIT},
- {"restorescreen", "rs", P_BOOL|P_VI_DEF,
- (char_u *)NULL, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"revins", "ri", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_ri, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"rightleft", "rl", P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_RL,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"rightleftcmd", "rlc", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_RLC,
- {(char_u *)"search", (char_u *)NULL}
- SCRIPTID_INIT},
- {"ruler", "ru", P_BOOL|P_VI_DEF|P_VIM|P_RSTAT,
- (char_u *)&p_ru, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"rulerformat", "ruf", P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT,
- (char_u *)&p_ruf, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"runtimepath", "rtp", P_STRING|P_VI_DEF|P_EXPAND|P_COMMA|P_NODUP|P_SECURE,
- (char_u *)&p_rtp, PV_NONE,
- {(char_u *)DFLT_RUNTIMEPATH, (char_u *)0L}
- SCRIPTID_INIT},
- {"scroll", "scr", P_NUM|P_NO_MKRC|P_VI_DEF,
- VAR_WIN, PV_SCROLL,
- {(char_u *)12L, (char_u *)0L} SCRIPTID_INIT},
- {"scrollbind", "scb", P_BOOL|P_VI_DEF,
- VAR_WIN, PV_SCBIND,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"scrolljump", "sj", P_NUM|P_VI_DEF|P_VIM,
- (char_u *)&p_sj, PV_NONE,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"scrolloff", "so", P_NUM|P_VI_DEF|P_VIM|P_RALL,
- (char_u *)&p_so, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"scrollopt", "sbo", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_sbo, PV_NONE,
- {(char_u *)"ver,jump", (char_u *)0L}
- SCRIPTID_INIT},
- {"sections", "sect", P_STRING|P_VI_DEF,
- (char_u *)&p_sections, PV_NONE,
- {(char_u *)"SHNHH HUnhsh", (char_u *)0L}
- SCRIPTID_INIT},
- {"secure", NULL, P_BOOL|P_VI_DEF|P_SECURE,
- (char_u *)&p_secure, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"selection", "sel", P_STRING|P_VI_DEF,
- (char_u *)&p_sel, PV_NONE,
- {(char_u *)"inclusive", (char_u *)0L}
- SCRIPTID_INIT},
- {"selectmode", "slm", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_slm, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"sessionoptions", "ssop", P_STRING|P_VIM|P_COMMA|P_NODUP,
- (char_u *)&p_ssop, PV_NONE,
- {(char_u *)"blank,buffers,curdir,folds,help,options,tabpages,winsize",
- (char_u *)"blank,buffers,curdir,folds,help,tabpages,winsize"}
- SCRIPTID_INIT},
- {"shell", "sh", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_sh, PV_NONE,
- {
- (char_u *)"sh",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"shellcmdflag","shcf", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_shcf, PV_NONE,
- {
- (char_u *)"-c",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"shellpipe", "sp", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_sp, PV_NONE,
- {
-#if defined(UNIX)
- (char_u *)"| tee",
-#else
- (char_u *)">",
-#endif
- (char_u *)0L
- }
- SCRIPTID_INIT},
- {"shellquote", "shq", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_shq, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"shellredir", "srr", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_srr, PV_NONE,
- {(char_u *)">", (char_u *)0L} SCRIPTID_INIT},
- {"shellslash", "ssl", P_BOOL|P_VI_DEF,
-#ifdef BACKSLASH_IN_FILENAME
- (char_u *)&p_ssl, PV_NONE,
-#else
- (char_u *)NULL, PV_NONE,
-#endif
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"shelltemp", "stmp", P_BOOL,
- (char_u *)&p_stmp, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"shellxquote", "sxq", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_sxq, PV_NONE,
- {
- (char_u *)"",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"shellxescape", "sxe", P_STRING|P_VI_DEF|P_SECURE,
- (char_u *)&p_sxe, PV_NONE,
- {
- (char_u *)"",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"shiftround", "sr", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_sr, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"shiftwidth", "sw", P_NUM|P_VI_DEF,
- (char_u *)&p_sw, PV_SW,
- {(char_u *)8L, (char_u *)0L} SCRIPTID_INIT},
- {"shortmess", "shm", P_STRING|P_VIM|P_FLAGLIST,
- (char_u *)&p_shm, PV_NONE,
- {(char_u *)"", (char_u *)"filnxtToO"}
- SCRIPTID_INIT},
- {"showbreak", "sbr", P_STRING|P_VI_DEF|P_RALL,
- (char_u *)&p_sbr, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"showcmd", "sc", P_BOOL|P_VIM,
- (char_u *)&p_sc, PV_NONE,
- {(char_u *)FALSE,
-#ifdef UNIX
- (char_u *)FALSE
-#else
- (char_u *) TRUE
-#endif
- } SCRIPTID_INIT},
- {"showfulltag", "sft", P_BOOL|P_VI_DEF,
- (char_u *)&p_sft, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"showmatch", "sm", P_BOOL|P_VI_DEF,
- (char_u *)&p_sm, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"showmode", "smd", P_BOOL|P_VIM,
- (char_u *)&p_smd, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"showtabline", "stal", P_NUM|P_VI_DEF|P_RALL,
- (char_u *)&p_stal, PV_NONE,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"sidescroll", "ss", P_NUM|P_VI_DEF,
- (char_u *)&p_ss, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"sidescrolloff", "siso", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
- (char_u *)&p_siso, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"smartcase", "scs", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_scs, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"smartindent", "si", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_si, PV_SI,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"smarttab", "sta", P_BOOL|P_VIM,
- (char_u *)&p_sta, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"softtabstop", "sts", P_NUM|P_VI_DEF|P_VIM,
- (char_u *)&p_sts, PV_STS,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"spell", NULL, P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_SPELL,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"spellcapcheck", "spc", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF,
- (char_u *)&p_spc, PV_SPC,
- {(char_u *)"[.?!]\\_[\\])'\" ]\\+", (char_u *)0L}
- SCRIPTID_INIT},
- {"spellfile", "spf", P_STRING|P_EXPAND|P_ALLOCED|P_VI_DEF|P_SECURE|P_COMMA,
- (char_u *)&p_spf, PV_SPF,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"spelllang", "spl", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_RBUF|P_EXPAND,
- (char_u *)&p_spl, PV_SPL,
- {(char_u *)"en", (char_u *)0L}
- SCRIPTID_INIT},
- {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE|P_COMMA,
- (char_u *)&p_sps, PV_NONE,
- {(char_u *)"best", (char_u *)0L}
- SCRIPTID_INIT},
- {"splitbelow", "sb", P_BOOL|P_VI_DEF,
- (char_u *)&p_sb, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"splitright", "spr", P_BOOL|P_VI_DEF,
- (char_u *)&p_spr, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"startofline", "sol", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_sol, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"statusline","stl", P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT,
- (char_u *)&p_stl, PV_STL,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"suffixes", "su", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_su, PV_NONE,
- {(char_u *)".bak,~,.o,.h,.info,.swp,.obj",
- (char_u *)0L} SCRIPTID_INIT},
- {"suffixesadd", "sua", P_STRING|P_VI_DEF|P_ALLOCED|P_COMMA|P_NODUP,
- (char_u *)&p_sua, PV_SUA,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"swapfile", "swf", P_BOOL|P_VI_DEF|P_RSTAT,
- (char_u *)&p_swf, PV_SWF,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"swapsync", "sws", P_STRING|P_VI_DEF,
- (char_u *)&p_sws, PV_NONE,
- {(char_u *)"fsync", (char_u *)0L} SCRIPTID_INIT},
- {"switchbuf", "swb", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_swb, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"synmaxcol", "smc", P_NUM|P_VI_DEF|P_RBUF,
- (char_u *)&p_smc, PV_SMC,
- {(char_u *)3000L, (char_u *)0L}
- SCRIPTID_INIT},
- {"syntax", "syn", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME,
- (char_u *)&p_syn, PV_SYN,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"tabline", "tal", P_STRING|P_VI_DEF|P_RALL,
- (char_u *)&p_tal, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"tabpagemax", "tpm", P_NUM|P_VIM,
- (char_u *)&p_tpm, PV_NONE,
- {(char_u *)10L, (char_u *)50L} SCRIPTID_INIT},
- {"tabstop", "ts", P_NUM|P_VI_DEF|P_RBUF,
- (char_u *)&p_ts, PV_TS,
- {(char_u *)8L, (char_u *)0L} SCRIPTID_INIT},
- {"tagbsearch", "tbs", P_BOOL|P_VI_DEF,
- (char_u *)&p_tbs, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L}
- SCRIPTID_INIT},
- {"taglength", "tl", P_NUM|P_VI_DEF,
- (char_u *)&p_tl, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"tagrelative", "tr", P_BOOL|P_VIM,
- (char_u *)&p_tr, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"tags", "tag", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_tags, PV_TAGS,
- {
- (char_u *)"./tags;,tags",
- (char_u *)0L
- } SCRIPTID_INIT},
- {"tagstack", "tgst", P_BOOL|P_VI_DEF,
- (char_u *)&p_tgst, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"termbidi", "tbidi", P_BOOL|P_VI_DEF,
- (char_u *)&p_tbidi, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"termencoding", "tenc", P_STRING|P_VI_DEF|P_RCLR,
- (char_u *)NULL, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"terse", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_terse, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"textwidth", "tw", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
- (char_u *)&p_tw, PV_TW,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_tsr, PV_TSR,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"tildeop", "top", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_to, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"timeout", "to", P_BOOL|P_VI_DEF,
- (char_u *)&p_timeout, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"timeoutlen", "tm", P_NUM|P_VI_DEF,
- (char_u *)&p_tm, PV_NONE,
- {(char_u *)1000L, (char_u *)0L} SCRIPTID_INIT},
- {"title", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_title, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"titlelen", NULL, P_NUM|P_VI_DEF,
- (char_u *)&p_titlelen, PV_NONE,
- {(char_u *)85L, (char_u *)0L} SCRIPTID_INIT},
- {"titleold", NULL, P_STRING|P_VI_DEF|P_GETTEXT|P_SECURE|P_NO_MKRC,
- (char_u *)&p_titleold, PV_NONE,
- {(char_u *)N_("Thanks for flying Vim"),
- (char_u *)0L}
- SCRIPTID_INIT},
- {"titlestring", NULL, P_STRING|P_VI_DEF,
- (char_u *)&p_titlestring, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"ttimeout", NULL, P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_ttimeout, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"ttimeoutlen", "ttm", P_NUM|P_VI_DEF,
- (char_u *)&p_ttm, PV_NONE,
- {(char_u *)-1L, (char_u *)0L} SCRIPTID_INIT},
- {"ttyfast", "tf", P_BOOL|P_NO_MKRC|P_VI_DEF,
- (char_u *)&p_force_on, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"undodir", "udir", P_STRING|P_EXPAND|P_COMMA|P_NODUP|P_SECURE|P_VI_DEF,
- (char_u *)&p_udir, PV_NONE,
- {(char_u *)".", (char_u *)0L}
- SCRIPTID_INIT},
- {"undofile", "udf", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_udf, PV_UDF,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"undolevels", "ul", P_NUM|P_VI_DEF,
- (char_u *)&p_ul, PV_UL,
- {
-#if defined(UNIX) || defined(WIN3264)
- (char_u *)1000L,
-#else
- (char_u *)100L,
+
+#ifdef INCLUDE_GENERATED_DECLARATIONS
+# include "options.generated.h"
#endif
- (char_u *)0L
- } SCRIPTID_INIT},
- {"undoreload", "ur", P_NUM|P_VI_DEF,
- (char_u *)&p_ur, PV_NONE,
- { (char_u *)10000L, (char_u *)0L} SCRIPTID_INIT},
- {"updatecount", "uc", P_NUM|P_VI_DEF,
- (char_u *)&p_uc, PV_NONE,
- {(char_u *)200L, (char_u *)0L} SCRIPTID_INIT},
- {"updatetime", "ut", P_NUM|P_VI_DEF,
- (char_u *)&p_ut, PV_NONE,
- {(char_u *)4000L, (char_u *)0L} SCRIPTID_INIT},
- {"verbose", "vbs", P_NUM|P_VI_DEF,
- (char_u *)&p_verbose, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"verbosefile", "vfile", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_vfile, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"viewdir", "vdir", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
- (char_u *)&p_vdir, PV_NONE,
- {(char_u *)DFLT_VDIR, (char_u *)0L}
- SCRIPTID_INIT},
- {"viewoptions", "vop", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_vop, PV_NONE,
- {(char_u *)"folds,options,cursor", (char_u *)0L}
- SCRIPTID_INIT},
- {"viminfo", "vi", P_STRING|P_COMMA|P_NODUP|P_SECURE,
- (char_u *)&p_viminfo, PV_NONE,
- {(char_u *)"", (char_u *)"!,'100,<50,s10,h"}
- SCRIPTID_INIT},
- {"virtualedit", "ve", P_STRING|P_COMMA|P_NODUP|P_VI_DEF|P_VIM|P_CURSWANT,
- (char_u *)&p_ve, PV_NONE,
- {(char_u *)"", (char_u *)""}
- SCRIPTID_INIT},
- {"visualbell", "vb", P_BOOL|P_VI_DEF,
- (char_u *)&p_vb, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"warn", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_warn, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"whichwrap", "ww", P_STRING|P_VIM|P_COMMA|P_FLAGLIST,
- (char_u *)&p_ww, PV_NONE,
- {(char_u *)"", (char_u *)"b,s"} SCRIPTID_INIT},
- {"wildchar", "wc", P_NUM|P_VIM,
- (char_u *)&p_wc, PV_NONE,
- {(char_u *)(long)Ctrl_E, (char_u *)(long)TAB}
- SCRIPTID_INIT},
- {"wildcharm", "wcm", P_NUM|P_VI_DEF,
- (char_u *)&p_wcm, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"wildignore", "wig", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
- (char_u *)&p_wig, PV_NONE,
- {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
- {"wildignorecase", "wic", P_BOOL|P_VI_DEF,
- (char_u *)&p_wic, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"wildmenu", "wmnu", P_BOOL|P_VIM,
- (char_u *)&p_wmnu, PV_NONE,
- {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
- {"wildmode", "wim", P_STRING|P_VIM|P_COMMA|P_NODUP,
- (char_u *)&p_wim, PV_NONE,
- {(char_u *)"", (char_u *)"list:longest,full"} SCRIPTID_INIT},
- {"wildoptions", "wop", P_STRING|P_VI_DEF,
- (char_u *)&p_wop, PV_NONE,
- {(char_u *)"", (char_u *)0L}
- SCRIPTID_INIT},
- {"winaltkeys", "wak", P_STRING|P_VI_DEF,
- (char_u *)&p_wak, PV_NONE,
- {(char_u *)"menu", (char_u *)0L}
- SCRIPTID_INIT},
- {"window", "wi", P_NUM|P_VI_DEF,
- (char_u *)&p_window, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"winheight", "wh", P_NUM|P_VI_DEF,
- (char_u *)&p_wh, PV_NONE,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"winfixheight", "wfh", P_BOOL|P_VI_DEF|P_RSTAT,
- VAR_WIN, PV_WFH,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"winfixwidth", "wfw", P_BOOL|P_VI_DEF|P_RSTAT,
- VAR_WIN, PV_WFW,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"winminheight", "wmh", P_NUM|P_VI_DEF,
- (char_u *)&p_wmh, PV_NONE,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"winminwidth", "wmw", P_NUM|P_VI_DEF,
- (char_u *)&p_wmw, PV_NONE,
- {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
- {"winwidth", "wiw", P_NUM|P_VI_DEF,
- (char_u *)&p_wiw, PV_NONE,
- {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
- {"wrap", NULL, P_BOOL|P_VI_DEF|P_RWIN,
- VAR_WIN, PV_WRAP,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"wrapmargin", "wm", P_NUM|P_VI_DEF,
- (char_u *)&p_wm, PV_WM,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
- {"wrapscan", "ws", P_BOOL|P_VI_DEF,
- (char_u *)&p_ws, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"write", NULL, P_BOOL|P_VI_DEF,
- (char_u *)&p_write, PV_NONE,
- {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
- {"writeany", "wa", P_BOOL|P_VI_DEF,
- (char_u *)&p_wa, PV_NONE,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"writebackup", "wb", P_BOOL|P_VI_DEF|P_VIM,
- (char_u *)&p_wb, PV_NONE,
- {
- (char_u *)TRUE,
- (char_u *)0L
- } SCRIPTID_INIT},
- {"writedelay", "wd", P_NUM|P_VI_DEF,
- (char_u *)&p_wd, PV_NONE,
- {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
-
- /* end marker */
- {
- NULL, NULL, 0, NULL, PV_NONE, {NULL, NULL} SCRIPTID_INIT
- }
-};
#define PARAM_COUNT ARRAY_SIZE(options)
@@ -1724,12 +316,6 @@ void set_init_1(void)
/* Be nocompatible */
p_cp = FALSE;
- /* Use POSIX compatibility when $VIM_POSIX is set. */
- if (os_env_exists("VIM_POSIX")) {
- set_string_default("cpo", (char_u *)CPO_ALL);
- set_string_default("shm", (char_u *)"A");
- }
-
/*
* Find default value for 'shell' option.
* Don't use it if it is empty.
@@ -4226,7 +2812,7 @@ did_set_string_option (
if (varp == &p_shm)
p = (char_u *)SHM_ALL;
else if (varp == &(p_cpo))
- p = (char_u *)CPO_ALL;
+ p = (char_u *)CPO_VI;
else if (varp == &(curbuf->b_p_fo))
p = (char_u *)FO_ALL;
else if (varp == &curwin->w_p_cocu)
diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h
index d1fe91f49c..e35f8bc55b 100644
--- a/src/nvim/option_defs.h
+++ b/src/nvim/option_defs.h
@@ -128,21 +128,11 @@
#define CPO_PLUS '+' /* ":write file" resets 'modified' */
#define CPO_SPECI '<' /* don't recognize <> in mappings */
#define CPO_REGAPPEND '>' /* insert NL when appending to a register */
-/* POSIX flags */
-#define CPO_HASH '#' /* "D", "o" and "O" do not use a count */
-#define CPO_PARA '{' /* "{" is also a paragraph boundary */
-#define CPO_TSIZE '|' /* $LINES and $COLUMNS overrule term size */
-#define CPO_PRESERVE '&' /* keep swap file after :preserve */
-#define CPO_SUBPERCENT '/' /* % in :s string uses previous one */
-#define CPO_BACKSL '\\' /* \ is not special in [] */
-#define CPO_CHDIR '.' /* don't chdir if buffer is modified */
#define CPO_SCOLON ';' /* using "," and ";" will skip over char if
* cursor would not move */
-/* default values for Vim, Vi and POSIX */
+/* default values for Vim and Vi */
#define CPO_VIM "aABceFs"
#define CPO_VI "aAbBcCdDeEfFiIJkKlLmMnoOpPqrRsStuvWxXyZ$!%+<>;"
-#define CPO_ALL \
- "aAbBcCdDeEfFiIJkKlLmMnoOpPqrRsStuvWxXyZ$!%+<>#{|&/\\.;"
/* characters for p_ww option: */
#define WW_ALL "bshl<>[],~"
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
new file mode 100644
index 0000000000..b269bfdc98
--- /dev/null
+++ b/src/nvim/options.lua
@@ -0,0 +1,2777 @@
+-- {
+-- {
+-- full_name='aleph', abbreviation='al',
+-- varname='p_aleph', pv_name=nil,
+-- type='number', list=nil, scope={'global'},
+-- deny_duplicates=nil,
+-- enable_if=nil,
+-- defaults={condition=nil, if_true={vi=224, vim=0}, if_false=nil},
+-- secure=nil, gettext=nil, noglob=nil, normal_fname_chars=nil,
+-- pri_mkrc=nil, deny_in_modelines=nil,
+-- expand=nil, nodefault=nil, no_mkrc=nil, vi_def=true, vim=true,
+-- alloced=nil,
+-- save_pv_indir=nil,
+-- redraw={'curswant'},
+-- }
+-- }
+-- types: bool, number, string
+-- lists: (nil), comma, flags, flagscomma
+-- scopes: global, buffer, window
+-- redraw options: statuslines, current_window, current_buffer, all_windows,
+-- everything, curswant
+-- default: {vi=…[, vim=…]}
+-- defaults: {condition=#if condition, if_true=default, if_false=default}
+-- #if condition:
+-- string: #ifdef string
+-- !string: #ifndef string
+-- {string, string}: #if defined(string) && defined(string)
+-- {!string, !string}: #if !defined(string) && !defined(string)
+local cstr = function(s)
+ return '"' .. s:gsub('["\\]', '\\%0'):gsub('\t', '\\t') .. '"'
+end
+local macros=function(s)
+ return function()
+ return s
+ end
+end
+local N_=function(s)
+ return function()
+ return 'N_(' .. cstr(s) .. ')'
+ end
+end
+return {
+ cstr=cstr,
+ options={
+ {
+ full_name='aleph', abbreviation='al',
+ type='number', scope={'global'},
+ vi_def=true,
+ redraw={'curswant'},
+ varname='p_aleph',
+ defaults={if_true={vi=224}}
+ },
+ {
+ full_name='antialias', abbreviation='anti',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ redraw={'everything'},
+ enable_if=false,
+ defaults={if_true={vi=false, vim=false}}
+ },
+ {
+ full_name='arabic', abbreviation='arab',
+ type='bool', scope={'window'},
+ vi_def=true,
+ vim=true,
+ redraw={'curswant'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='arabicshape', abbreviation='arshape',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ redraw={'everything'},
+ varname='p_arshape',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='allowrevins', abbreviation='ari',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_ari',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='altkeymap', abbreviation='akm',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_altkeymap',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='ambiwidth', abbreviation='ambw',
+ type='string', scope={'global'},
+ vi_def=true,
+ redraw={'everything'},
+ varname='p_ambw',
+ defaults={if_true={vi="single"}}
+ },
+ {
+ full_name='autochdir', abbreviation='acd',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_acd',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='autoindent', abbreviation='ai',
+ type='bool', scope={'buffer'},
+ varname='p_ai',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='autoread', abbreviation='ar',
+ type='bool', scope={'global', 'buffer'},
+ varname='p_ar',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='autowrite', abbreviation='aw',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_aw',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='autowriteall', abbreviation='awa',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_awa',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='background', abbreviation='bg',
+ type='string', scope={'global'},
+ vi_def=true,
+ redraw={'everything'},
+ varname='p_bg',
+ defaults={if_true={vi="light"}}
+ },
+ {
+ full_name='backspace', abbreviation='bs',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vim=true,
+ varname='p_bs',
+ defaults={if_true={vi="", vim="indent,eol,start"}}
+ },
+ {
+ full_name='backup', abbreviation='bk',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_bk',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='backupcopy', abbreviation='bkc',
+ type='string', list='comma', scope={'global', 'buffer'},
+ deny_duplicates=true,
+ vim=true,
+ varname='p_bkc',
+ defaults={
+ condition='UNIX',
+ if_true={vi="yes", vim="auto"},
+ if_false={vi="auto", vim="auto"}
+ },
+ },
+ {
+ full_name='backupdir', abbreviation='bdir',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_bdir',
+ defaults={if_true={vi=macros('DFLT_BDIR')}}
+ },
+ {
+ full_name='backupext', abbreviation='bex',
+ type='string', scope={'global'},
+ normal_fname_chars=true,
+ vi_def=true,
+ varname='p_bex',
+ defaults={if_true={vi="~"}}
+ },
+ {
+ full_name='backupskip', abbreviation='bsk',
+ type='string', list='comma', scope={'global'},
+ vi_def=true,
+ varname='p_bsk',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='binary', abbreviation='bin',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ redraw={'statuslines'},
+ varname='p_bin',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='bomb',
+ type='bool', scope={'buffer'},
+ no_mkrc=true,
+ vi_def=true,
+ redraw={'statuslines'},
+ varname='p_bomb',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='breakat', abbreviation='brk',
+ type='string', list='flags', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_breakat',
+ defaults={if_true={vi=" \t!@*-+;:,./?"}}
+ },
+ {
+ full_name='breakindent', abbreviation='bri',
+ type='bool', scope={'window'},
+ vi_def=true,
+ vim=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='breakindentopt', abbreviation='briopt',
+ type='string', list='comma', scope={'window'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ redraw={'current_buffer'},
+ defaults={if_true={vi=""}},
+ },
+ {
+ full_name='browsedir', abbreviation='bsdir',
+ type='string', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ },
+ {
+ full_name='bufhidden', abbreviation='bh',
+ type='string', scope={'buffer'},
+ noglob=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_bh',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='buflisted', abbreviation='bl',
+ type='bool', scope={'buffer'},
+ noglob=true,
+ vi_def=true,
+ varname='p_bl',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='buftype', abbreviation='bt',
+ type='string', scope={'buffer'},
+ noglob=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_bt',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='casemap', abbreviation='cmp',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_cmp',
+ defaults={if_true={vi="internal,keepascii"}}
+ },
+ {
+ full_name='cdpath', abbreviation='cd',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ expand=true,
+ varname='p_cdpath',
+ defaults={if_true={vi=",,"}}
+ },
+ {
+ full_name='cedit',
+ type='string', scope={'global'},
+ varname='p_cedit',
+ defaults={if_true={vi="", vim=macros('CTRL_F_STR')}}
+ },
+ {
+ full_name='charconvert', abbreviation='ccv',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_ccv',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='cindent', abbreviation='cin',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ varname='p_cin',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='cinkeys', abbreviation='cink',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_cink',
+ defaults={if_true={vi="0{,0},0),:,0#,!^F,o,O,e"}}
+ },
+ {
+ full_name='cinoptions', abbreviation='cino',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_cino',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='cinwords', abbreviation='cinw',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_cinw',
+ defaults={if_true={vi="if,else,while,do,for,switch"}}
+ },
+ {
+ full_name='clipboard', abbreviation='cb',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_cb',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='cmdheight', abbreviation='ch',
+ type='number', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_ch',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='cmdwinheight', abbreviation='cwh',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_cwh',
+ defaults={if_true={vi=7}}
+ },
+ {
+ full_name='colorcolumn', abbreviation='cc',
+ type='string', list='comma', scope={'window'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='columns', abbreviation='co',
+ type='number', scope={'global'},
+ no_mkrc=true,
+ nodefault=true,
+ vi_def=true,
+ redraw={'everything'},
+ varname='Columns',
+ defaults={if_true={vi=macros('DFLT_COLS')}}
+ },
+ {
+ full_name='comments', abbreviation='com',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ redraw={'curswant'},
+ varname='p_com',
+ defaults={if_true={vi="s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-"}}
+ },
+ {
+ full_name='commentstring', abbreviation='cms',
+ type='string', scope={'buffer'},
+ vi_def=true,
+ alloced=true,
+ redraw={'curswant'},
+ varname='p_cms',
+ defaults={if_true={vi="/*%s*/"}}
+ },
+ {
+ full_name='compatible', abbreviation='cp',
+ type='bool', scope={'global'},
+ redraw={'all_windows'},
+ varname='p_force_off',
+ -- pri_mkrc isn't needed here, optval_default()
+ -- always returns TRUE for 'compatible'
+ defaults={if_true={vi=true, vim=false}}
+ },
+ {
+ full_name='complete', abbreviation='cpt',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ alloced=true,
+ varname='p_cpt',
+ defaults={if_true={vi=".,w,b,u,t,i", vim=".,w,b,u,t"}}
+ },
+ {
+ full_name='concealcursor', abbreviation='cocu',
+ type='string', scope={'window'},
+ vi_def=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='conceallevel', abbreviation='cole',
+ type='number', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='completefunc', abbreviation='cfu',
+ type='string', scope={'buffer'},
+ secure=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_cfu',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='completeopt', abbreviation='cot',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_cot',
+ defaults={if_true={vi="menu,preview"}}
+ },
+ {
+ full_name='confirm', abbreviation='cf',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_confirm',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='copyindent', abbreviation='ci',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ varname='p_ci',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='cpoptions', abbreviation='cpo',
+ type='string', list='flags', scope={'global'},
+ vim=true,
+ redraw={'all_windows'},
+ varname='p_cpo',
+ defaults={if_true={vi=macros('CPO_VI'), vim=macros('CPO_VIM')}}
+ },
+ {
+ full_name='cscopepathcomp', abbreviation='cspc',
+ type='number', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_cspc',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='cscopeprg', abbreviation='csprg',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_csprg',
+ defaults={if_true={vi="cscope"}}
+ },
+ {
+ full_name='cscopequickfix', abbreviation='csqf',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_csqf',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='cscoperelative', abbreviation='csre',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_csre',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='cscopetag', abbreviation='cst',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_cst',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='cscopetagorder', abbreviation='csto',
+ type='number', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_csto',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='cscopeverbose', abbreviation='csverb',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_csverbose',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='cursorbind', abbreviation='crb',
+ type='bool', scope={'window'},
+ vi_def=true,
+ pv_name='p_crbind',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='cursorcolumn', abbreviation='cuc',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='cursorline', abbreviation='cul',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='debug',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_debug',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='define', abbreviation='def',
+ type='string', scope={'global', 'buffer'},
+ vi_def=true,
+ alloced=true,
+ redraw={'curswant'},
+ varname='p_def',
+ defaults={if_true={vi="^\\s*#\\s*define"}}
+ },
+ {
+ full_name='delcombine', abbreviation='deco',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_deco',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='dictionary', abbreviation='dict',
+ type='string', list='comma', scope={'global', 'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ expand=true,
+ varname='p_dict',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='diff',
+ type='bool', scope={'window'},
+ noglob=true,
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='diffexpr', abbreviation='dex',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ redraw={'curswant'},
+ varname='p_dex',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='diffopt', abbreviation='dip',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ redraw={'current_window'},
+ varname='p_dip',
+ defaults={if_true={vi="filler"}}
+ },
+ {
+ full_name='digraph', abbreviation='dg',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_dg',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='directory', abbreviation='dir',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_dir',
+ defaults={if_true={vi=macros('DFLT_DIR')}}
+ },
+ {
+ full_name='display', abbreviation='dy',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vim=true,
+ redraw={'all_windows'},
+ varname='p_dy',
+ defaults={if_true={vi="", vim="lastline"}}
+ },
+ {
+ full_name='eadirection', abbreviation='ead',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_ead',
+ defaults={if_true={vi="both"}}
+ },
+ {
+ full_name='edcompatible', abbreviation='ed',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_force_off',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='encoding', abbreviation='enc',
+ type='string', scope={'global'},
+ deny_in_modelines=true,
+ vi_def=true,
+ redraw={'everything'},
+ varname='p_enc',
+ defaults={if_true={vi=macros('ENC_DFLT')}}
+ },
+ {
+ full_name='endofline', abbreviation='eol',
+ type='bool', scope={'buffer'},
+ no_mkrc=true,
+ vi_def=true,
+ redraw={'statuslines'},
+ varname='p_eol',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='equalalways', abbreviation='ea',
+ type='bool', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_ea',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='equalprg', abbreviation='ep',
+ type='string', scope={'global', 'buffer'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_ep',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='errorbells', abbreviation='eb',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_eb',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='errorfile', abbreviation='ef',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_ef',
+ defaults={if_true={vi=macros('DFLT_ERRORFILE')}}
+ },
+ {
+ full_name='errorformat', abbreviation='efm',
+ type='string', list='comma', scope={'global', 'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_efm',
+ defaults={if_true={vi=macros('DFLT_EFM')}}
+ },
+ {
+ full_name='esckeys', abbreviation='ek',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_ek',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='eventignore', abbreviation='ei',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_ei',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='expandtab', abbreviation='et',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ varname='p_et',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='exrc', abbreviation='ex',
+ type='bool', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_exrc',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='fileencoding', abbreviation='fenc',
+ type='string', scope={'buffer'},
+ no_mkrc=true,
+ vi_def=true,
+ alloced=true,
+ redraw={'statuslines', 'current_buffer'},
+ varname='p_fenc',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='fileencodings', abbreviation='fencs',
+ type='string', list='comma', scope={'global'},
+ vi_def=true,
+ varname='p_fencs',
+ defaults={if_true={vi="ucs-bom"}}
+ },
+ {
+ full_name='fileformat', abbreviation='ff',
+ type='string', scope={'buffer'},
+ no_mkrc=true,
+ vi_def=true,
+ alloced=true,
+ redraw={'curswant', 'statuslines'},
+ varname='p_ff',
+ defaults={if_true={vi=macros('DFLT_FF')}}
+ },
+ {
+ full_name='fileformats', abbreviation='ffs',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vim=true,
+ varname='p_ffs',
+ defaults={if_true={vi=macros('DFLT_FFS_VI'), vim=macros('DFLT_FFS_VIM')}}
+ },
+ {
+ full_name='fileignorecase', abbreviation='fic',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_fic',
+ defaults={
+ condition='CASE_INSENSITIVE_FILENAME',
+ if_true={vi=true},
+ if_false={vi=false},
+ }
+ },
+ {
+ full_name='filetype', abbreviation='ft',
+ type='string', scope={'buffer'},
+ noglob=true,
+ normal_fname_chars=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_ft',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='fillchars', abbreviation='fcs',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_fcs',
+ defaults={if_true={vi="vert:|,fold:-"}}
+ },
+ {
+ full_name='fkmap', abbreviation='fk',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_fkmap',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='foldclose', abbreviation='fcl',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'current_window'},
+ varname='p_fcl',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='foldcolumn', abbreviation='fdc',
+ type='number', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='foldenable', abbreviation='fen',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='foldexpr', abbreviation='fde',
+ type='string', scope={'window'},
+ vi_def=true,
+ vim=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi="0"}}
+ },
+ {
+ full_name='foldignore', abbreviation='fdi',
+ type='string', scope={'window'},
+ vi_def=true,
+ vim=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi="#"}}
+ },
+ {
+ full_name='foldlevel', abbreviation='fdl',
+ type='number', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='foldlevelstart', abbreviation='fdls',
+ type='number', scope={'global'},
+ vi_def=true,
+ redraw={'curswant'},
+ varname='p_fdls',
+ defaults={if_true={vi=-1}}
+ },
+ {
+ full_name='foldmarker', abbreviation='fmr',
+ type='string', list='comma', scope={'window'},
+ deny_duplicates=true,
+ vi_def=true,
+ vim=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi="{{{,}}}"}}
+ },
+ {
+ full_name='foldmethod', abbreviation='fdm',
+ type='string', scope={'window'},
+ vi_def=true,
+ vim=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi="manual"}}
+ },
+ {
+ full_name='foldminlines', abbreviation='fml',
+ type='number', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='foldnestmax', abbreviation='fdn',
+ type='number', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=20}}
+ },
+ {
+ full_name='foldopen', abbreviation='fdo',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'curswant'},
+ varname='p_fdo',
+ defaults={if_true={vi="block,hor,mark,percent,quickfix,search,tag,undo"}}
+ },
+ {
+ full_name='foldtext', abbreviation='fdt',
+ type='string', scope={'window'},
+ vi_def=true,
+ vim=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi="foldtext()"}}
+ },
+ {
+ full_name='formatexpr', abbreviation='fex',
+ type='string', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ alloced=true,
+ varname='p_fex',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='formatoptions', abbreviation='fo',
+ type='string', list='flags', scope={'buffer'},
+ vim=true,
+ alloced=true,
+ varname='p_fo',
+ defaults={if_true={vi=macros('DFLT_FO_VI'), vim=macros('DFLT_FO_VIM')}}
+ },
+ {
+ full_name='formatlistpat', abbreviation='flp',
+ type='string', scope={'buffer'},
+ vi_def=true,
+ alloced=true,
+ varname='p_flp',
+ defaults={if_true={vi="^\\s*\\d\\+[\\]:.)}\\t ]\\s*"}}
+ },
+ {
+ full_name='formatprg', abbreviation='fp',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_fp',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='fsync', abbreviation='fs',
+ type='bool', scope={'global'},
+ secure=true,
+ vi_def=true,
+ enable_if='HAVE_FSYNC',
+ varname='p_fs',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='gdefault', abbreviation='gd',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_gd',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='grepformat', abbreviation='gfm',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_gefm',
+ defaults={if_true={vi=macros('DFLT_GREPFORMAT')}}
+ },
+ {
+ full_name='grepprg', abbreviation='gp',
+ type='string', scope={'global', 'buffer'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_gp',
+ defaults={
+ condition='UNIX',
+ -- Add an extra file name so that grep will always
+ -- insert a file name in the match line. */
+ if_true={vi="grep -n $* /dev/null"},
+ if_false={vi="grep -n "},
+ }
+ },
+ {
+ full_name='guicursor', abbreviation='gcr',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_guicursor',
+ defaults={if_true={vi="n-v-c:block,o:hor50,i-ci:hor15,r-cr:hor30,sm:block"}}
+ },
+ {
+ full_name='guifont', abbreviation='gfn',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'everything'},
+ enable_if=false,
+ },
+ {
+ full_name='guifontset', abbreviation='gfs',
+ type='string', list='comma', scope={'global'},
+ vi_def=true,
+ redraw={'everything'},
+ enable_if=false,
+ },
+ {
+ full_name='guifontwide', abbreviation='gfw',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'everything'},
+ enable_if=false,
+ },
+ {
+ full_name='guiheadroom', abbreviation='ghr',
+ type='number', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=50}}
+ },
+ {
+ full_name='guioptions', abbreviation='go',
+ type='string', list='flags', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ enable_if=false,
+ },
+ {
+ full_name='guitablabel', abbreviation='gtl',
+ type='string', scope={'global'},
+ vi_def=true,
+ redraw={'current_window'},
+ enable_if=false,
+ },
+ {
+ full_name='guitabtooltip', abbreviation='gtt',
+ type='string', scope={'global'},
+ vi_def=true,
+ redraw={'current_window'},
+ enable_if=false,
+ },
+ {
+ full_name='helpfile', abbreviation='hf',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_hf',
+ defaults={if_true={vi=macros('DFLT_HELPFILE')}}
+ },
+ {
+ full_name='helpheight', abbreviation='hh',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_hh',
+ defaults={if_true={vi=20}}
+ },
+ {
+ full_name='helplang', abbreviation='hlg',
+ type='string', list='comma', scope={'global'},
+ vi_def=true,
+ varname='p_hlg',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='hidden', abbreviation='hid',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_hid',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='highlight', abbreviation='hl',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'everything'},
+ varname='p_hl',
+ defaults={if_true={vi=macros('HIGHLIGHT_INIT')}}
+ },
+ {
+ full_name='history', abbreviation='hi',
+ type='number', scope={'global'},
+ vim=true,
+ varname='p_hi',
+ defaults={if_true={vi=0, vim=10000}}
+ },
+ {
+ full_name='hkmap', abbreviation='hk',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_hkmap',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='hkmapp', abbreviation='hkp',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_hkmapp',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='hlsearch', abbreviation='hls',
+ type='bool', scope={'global'},
+ vim=true,
+ redraw={'all_windows'},
+ varname='p_hls',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='icon',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_icon',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='iconstring',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_iconstring',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='ignorecase', abbreviation='ic',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_ic',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='imactivatefunc', abbreviation='imaf',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ enable_if=false,
+ },
+ {
+ full_name='imactivatekey', abbreviation='imak',
+ type='string', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='imcmdline', abbreviation='imc',
+ type='bool', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='imdisable', abbreviation='imd',
+ type='bool', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='iminsert', abbreviation='imi',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ varname='p_iminsert', pv_name='p_imi',
+ defaults={
+ condition='B_IMODE_IM',
+ if_true={vi=macros('B_IMODE_IM')},
+ if_false={vi=macros('B_IMODE_NONE')},
+ }
+ },
+ {
+ full_name='imsearch', abbreviation='ims',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ varname='p_imsearch', pv_name='p_ims',
+ defaults={
+ condition='B_IMODE_IM',
+ if_true={vi=macros('B_IMODE_IM')},
+ if_false={vi=macros('B_IMODE_NONE')},
+ }
+ },
+ {
+ full_name='imstatusfunc', abbreviation='imsf',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ enable_if=false,
+ },
+ {
+ full_name='include', abbreviation='inc',
+ type='string', scope={'global', 'buffer'},
+ vi_def=true,
+ alloced=true,
+ varname='p_inc',
+ defaults={if_true={vi="^\\s*#\\s*include"}}
+ },
+ {
+ full_name='includeexpr', abbreviation='inex',
+ type='string', scope={'buffer'},
+ vi_def=true,
+ alloced=true,
+ varname='p_inex',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='incsearch', abbreviation='is',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_is',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='indentexpr', abbreviation='inde',
+ type='string', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ alloced=true,
+ varname='p_inde',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='indentkeys', abbreviation='indk',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_indk',
+ defaults={if_true={vi="0{,0},:,0#,!^F,o,O,e"}}
+ },
+ {
+ full_name='infercase', abbreviation='inf',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ varname='p_inf',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='insertmode', abbreviation='im',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_im',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='isfname', abbreviation='isf',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_isf',
+ defaults={
+ condition='BACKSLASH_IN_FILENAME',
+ -- Excluded are: & and ^ are special in cmd.exe
+ -- ( and ) are used in text separating fnames */
+ if_true={vi="@,48-57,/,\\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,="},
+ if_false={vi="@,48-57,/,.,-,_,+,,,#,$,%,~,="}
+ }
+ },
+ {
+ full_name='isident', abbreviation='isi',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_isi',
+ defaults={if_true={vi="@,48-57,_,192-255"}}
+ },
+ {
+ full_name='iskeyword', abbreviation='isk',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vim=true,
+ alloced=true,
+ varname='p_isk',
+ defaults={if_true={vi="@,48-57,_", vim=macros('ISK_LATIN1')}}
+ },
+ {
+ full_name='isprint', abbreviation='isp',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_isp',
+ defaults={
+ condition='MSWIN',
+ if_true={vi="@,~-255"},
+ if_false={vi=macros("ISP_LATIN1")}
+ }
+ },
+ {
+ full_name='joinspaces', abbreviation='js',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_js',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='keymap', abbreviation='kmp',
+ type='string', scope={'buffer'},
+ normal_fname_chars=true,
+ pri_mkrc=true,
+ vi_def=true,
+ alloced=true,
+ redraw={'statuslines', 'current_buffer'},
+ varname='p_keymap', pv_name='p_kmap',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='keymodel', abbreviation='km',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_km',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='keywordprg', abbreviation='kp',
+ type='string', scope={'global', 'buffer'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_kp',
+ defaults={
+ condition='USEMAN_S',
+ if_true={vi="man -s"},
+ if_false={vi="man"},
+ }
+ },
+ {
+ full_name='langmap', abbreviation='lmap',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ secure=true,
+ vi_def=true,
+ varname='p_langmap',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='langmenu', abbreviation='lm',
+ type='string', scope={'global'},
+ normal_fname_chars=true,
+ vi_def=true,
+ varname='p_lm',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='langnoremap', abbreviation='lnr',
+ type='bool', scope={'global'},
+ varname='p_lnr',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='laststatus', abbreviation='ls',
+ type='number', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_ls',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='lazyredraw', abbreviation='lz',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_lz',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='linebreak', abbreviation='lbr',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='lines',
+ type='number', scope={'global'},
+ no_mkrc=true,
+ nodefault=true,
+ vi_def=true,
+ redraw={'everything'},
+ varname='Rows',
+ defaults={if_true={vi=macros('DFLT_ROWS')}}
+ },
+ {
+ full_name='linespace', abbreviation='lsp',
+ type='number', scope={'global'},
+ vi_def=true,
+ redraw={'everything'},
+ enable_if=false,
+ },
+ {
+ full_name='lisp',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ varname='p_lisp',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='lispwords', abbreviation='lw',
+ type='string', list='comma', scope={'global', 'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_lispwords', pv_name='p_lw',
+ defaults={if_true={vi=macros('LISPWORD_VALUE')}}
+ },
+ {
+ full_name='list',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='listchars', abbreviation='lcs',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_lcs',
+ defaults={if_true={vi="eol:$"}}
+ },
+ {
+ full_name='loadplugins', abbreviation='lpl',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_lpl',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='magic',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_magic',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='makeef', abbreviation='mef',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_mef',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='makeprg', abbreviation='mp',
+ type='string', scope={'global', 'buffer'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_mp',
+ defaults={if_true={vi="make"}}
+ },
+ {
+ full_name='matchpairs', abbreviation='mps',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_mps',
+ defaults={if_true={vi="(:),{:},[:]"}}
+ },
+ {
+ full_name='matchtime', abbreviation='mat',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mat',
+ defaults={if_true={vi=5}}
+ },
+ {
+ full_name='maxcombine', abbreviation='mco',
+ type='number', scope={'global'},
+ vi_def=true,
+ redraw={'curswant'},
+ varname='p_mco',
+ defaults={if_true={vi=2}}
+ },
+ {
+ full_name='maxfuncdepth', abbreviation='mfd',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mfd',
+ defaults={if_true={vi=100}}
+ },
+ {
+ full_name='maxmapdepth', abbreviation='mmd',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mmd',
+ defaults={if_true={vi=1000}}
+ },
+ {
+ full_name='maxmem', abbreviation='mm',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mm',
+ defaults={if_true={vi=macros('DFLT_MAXMEM')}}
+ },
+ {
+ full_name='maxmempattern', abbreviation='mmp',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mmp',
+ defaults={if_true={vi=1000}}
+ },
+ {
+ full_name='maxmemtot', abbreviation='mmt',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mmt',
+ defaults={if_true={vi=macros('DFLT_MAXMEMTOT')}}
+ },
+ {
+ full_name='menuitems', abbreviation='mis',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mis',
+ defaults={if_true={vi=25}}
+ },
+ {
+ full_name='mkspellmem', abbreviation='msm',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_msm',
+ defaults={if_true={vi="460000,2000,500"}}
+ },
+ {
+ full_name='modeline', abbreviation='ml',
+ type='bool', scope={'buffer'},
+ vim=true,
+ varname='p_ml',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='modelines', abbreviation='mls',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mls',
+ defaults={if_true={vi=5}}
+ },
+ {
+ full_name='modifiable', abbreviation='ma',
+ type='bool', scope={'buffer'},
+ noglob=true,
+ vi_def=true,
+ varname='p_ma',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='modified', abbreviation='mod',
+ type='bool', scope={'buffer'},
+ no_mkrc=true,
+ vi_def=true,
+ redraw={'statuslines'},
+ varname='p_mod',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='more',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_more',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='mouse',
+ type='string', list='flags', scope={'global'},
+ varname='p_mouse',
+ defaults={if_true={vi="", vim="a"}}
+ },
+ {
+ full_name='mousefocus', abbreviation='mousef',
+ type='bool', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='mousehide', abbreviation='mh',
+ type='bool', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='mousemodel', abbreviation='mousem',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_mousem',
+ defaults={if_true={vi="extend"}}
+ },
+ {
+ full_name='mouseshape', abbreviation='mouses',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ enable_if=false,
+ },
+ {
+ full_name='mousetime', abbreviation='mouset',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_mouset',
+ defaults={if_true={vi=500}}
+ },
+ {
+ full_name='nrformats', abbreviation='nf',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ alloced=true,
+ varname='p_nf',
+ defaults={if_true={vi="octal,hex", vim="hex"}}
+ },
+ {
+ full_name='number', abbreviation='nu',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='numberwidth', abbreviation='nuw',
+ type='number', scope={'window'},
+ vim=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=8, vim=4}}
+ },
+ {
+ full_name='omnifunc', abbreviation='ofu',
+ type='string', scope={'buffer'},
+ secure=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_ofu',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='opendevice', abbreviation='odev',
+ type='bool', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=false, vim=false}}
+ },
+ {
+ full_name='operatorfunc', abbreviation='opfunc',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_opfunc',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='paragraphs', abbreviation='para',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_para',
+ defaults={if_true={vi="IPLPPPQPP TPHPLIPpLpItpplpipbp"}}
+ },
+ {
+ full_name='paste',
+ type='bool', scope={'global'},
+ pri_mkrc=true,
+ vi_def=true,
+ varname='p_paste',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='pastetoggle', abbreviation='pt',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_pt',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='patchexpr', abbreviation='pex',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_pex',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='patchmode', abbreviation='pm',
+ type='string', scope={'global'},
+ normal_fname_chars=true,
+ vi_def=true,
+ varname='p_pm',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='path', abbreviation='pa',
+ type='string', list='comma', scope={'global', 'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ expand=true,
+ varname='p_path',
+ defaults={if_true={vi=".,/usr/include,,"}}
+ },
+ {
+ full_name='preserveindent', abbreviation='pi',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ varname='p_pi',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='previewheight', abbreviation='pvh',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_pvh',
+ defaults={if_true={vi=12}}
+ },
+ {
+ full_name='previewwindow', abbreviation='pvw',
+ type='bool', scope={'window'},
+ noglob=true,
+ vi_def=true,
+ redraw={'statuslines'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='printdevice', abbreviation='pdev',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_pdev',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='printencoding', abbreviation='penc',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_penc',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='printexpr', abbreviation='pexpr',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_pexpr',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='printfont', abbreviation='pfn',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_pfn',
+ defaults={if_true={vi="courier"}}
+ },
+ {
+ full_name='printheader', abbreviation='pheader',
+ type='string', scope={'global'},
+ gettext=true,
+ vi_def=true,
+ varname='p_header',
+ defaults={if_true={vi=N_("%<%f%h%m%=Page %N")}}
+ },
+ {
+ full_name='printmbcharset', abbreviation='pmbcs',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_pmcs',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='printmbfont', abbreviation='pmbfn',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_pmfn',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='printoptions', abbreviation='popt',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_popt',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='prompt',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_prompt',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='pumheight', abbreviation='ph',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_ph',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='quoteescape', abbreviation='qe',
+ type='string', scope={'buffer'},
+ vi_def=true,
+ alloced=true,
+ varname='p_qe',
+ defaults={if_true={vi="\\"}}
+ },
+ {
+ full_name='readonly', abbreviation='ro',
+ type='bool', scope={'buffer'},
+ noglob=true,
+ vi_def=true,
+ redraw={'statuslines'},
+ varname='p_ro',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='redrawtime', abbreviation='rdt',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_rdt',
+ defaults={if_true={vi=2000}}
+ },
+ {
+ full_name='regexpengine', abbreviation='re',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_re',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='relativenumber', abbreviation='rnu',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='remap',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_remap',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='report',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_report',
+ defaults={if_true={vi=2}}
+ },
+ {
+ full_name='restorescreen', abbreviation='rs',
+ type='bool', scope={'global'},
+ vi_def=true,
+ enable_if=false,
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='revins', abbreviation='ri',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_ri',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='rightleft', abbreviation='rl',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='rightleftcmd', abbreviation='rlc',
+ type='string', scope={'window'},
+ vi_def=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi="search"}}
+ },
+ {
+ full_name='ruler', abbreviation='ru',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ redraw={'statuslines'},
+ varname='p_ru',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='rulerformat', abbreviation='ruf',
+ type='string', scope={'global'},
+ vi_def=true,
+ alloced=true,
+ redraw={'statuslines'},
+ varname='p_ruf',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='runtimepath', abbreviation='rtp',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_rtp',
+ defaults={if_true={vi=macros('DFLT_RUNTIMEPATH')}}
+ },
+ {
+ full_name='scroll', abbreviation='scr',
+ type='number', scope={'window'},
+ no_mkrc=true,
+ vi_def=true,
+ pv_name='p_scroll',
+ defaults={if_true={vi=12}}
+ },
+ {
+ full_name='scrollbind', abbreviation='scb',
+ type='bool', scope={'window'},
+ vi_def=true,
+ pv_name='p_scbind',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='scrolljump', abbreviation='sj',
+ type='number', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_sj',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='scrolloff', abbreviation='so',
+ type='number', scope={'global'},
+ vi_def=true,
+ vim=true,
+ redraw={'all_windows'},
+ varname='p_so',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='scrollopt', abbreviation='sbo',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_sbo',
+ defaults={if_true={vi="ver,jump"}}
+ },
+ {
+ full_name='sections', abbreviation='sect',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_sections',
+ defaults={if_true={vi="SHNHH HUnhsh"}}
+ },
+ {
+ full_name='secure',
+ type='bool', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_secure',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='selection', abbreviation='sel',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_sel',
+ defaults={if_true={vi="inclusive"}}
+ },
+ {
+ full_name='selectmode', abbreviation='slm',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_slm',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='sessionoptions', abbreviation='ssop',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vim=true,
+ varname='p_ssop',
+ defaults={if_true={
+ vi="blank,buffers,curdir,folds,help,options,tabpages,winsize",
+ vim="blank,buffers,curdir,folds,help,tabpages,winsize"
+ }}
+ },
+ {
+ full_name='shell', abbreviation='sh',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_sh',
+ defaults={if_true={vi="sh"}}
+ },
+ {
+ full_name='shellcmdflag', abbreviation='shcf',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_shcf',
+ defaults={if_true={vi="-c"}}
+ },
+ {
+ full_name='shellpipe', abbreviation='sp',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_sp',
+ defaults={
+ condition='UNIX',
+ if_true={vi="| tee"},
+ if_false={vi=">"},
+ }
+ },
+ {
+ full_name='shellquote', abbreviation='shq',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_shq',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='shellredir', abbreviation='srr',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_srr',
+ defaults={if_true={vi=">"}}
+ },
+ {
+ full_name='shellslash', abbreviation='ssl',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_ssl',
+ enable_if='BACKSLASH_IN_FILENAME',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='shelltemp', abbreviation='stmp',
+ type='bool', scope={'global'},
+ varname='p_stmp',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='shellxquote', abbreviation='sxq',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_sxq',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='shellxescape', abbreviation='sxe',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_sxe',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='shiftround', abbreviation='sr',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_sr',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='shiftwidth', abbreviation='sw',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ varname='p_sw',
+ defaults={if_true={vi=8}}
+ },
+ {
+ full_name='shortmess', abbreviation='shm',
+ type='string', list='flags', scope={'global'},
+ vim=true,
+ varname='p_shm',
+ defaults={if_true={vi="", vim="filnxtToO"}}
+ },
+ {
+ full_name='showbreak', abbreviation='sbr',
+ type='string', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_sbr',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='showcmd', abbreviation='sc',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_sc',
+ defaults={
+ condition='UNIX',
+ if_true={vi=false, vim=false},
+ if_false={vi=false, vim=true},
+ }
+ },
+ {
+ full_name='showfulltag', abbreviation='sft',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_sft',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='showmatch', abbreviation='sm',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_sm',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='showmode', abbreviation='smd',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_smd',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='showtabline', abbreviation='stal',
+ type='number', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_stal',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='sidescroll', abbreviation='ss',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_ss',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='sidescrolloff', abbreviation='siso',
+ type='number', scope={'global'},
+ vi_def=true,
+ vim=true,
+ redraw={'current_buffer'},
+ varname='p_siso',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='smartcase', abbreviation='scs',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_scs',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='smartindent', abbreviation='si',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ varname='p_si',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='smarttab', abbreviation='sta',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_sta',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='softtabstop', abbreviation='sts',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ varname='p_sts',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='spell',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='spellcapcheck', abbreviation='spc',
+ type='string', scope={'buffer'},
+ vi_def=true,
+ alloced=true,
+ redraw={'current_buffer'},
+ varname='p_spc',
+ defaults={if_true={vi="[.?!]\\_[\\])'\" ]\\+"}}
+ },
+ {
+ full_name='spellfile', abbreviation='spf',
+ type='string', list='comma', scope={'buffer'},
+ secure=true,
+ vi_def=true,
+ alloced=true,
+ expand=true,
+ varname='p_spf',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='spelllang', abbreviation='spl',
+ type='string', list='comma', scope={'buffer'},
+ vi_def=true,
+ alloced=true,
+ expand=true,
+ redraw={'current_buffer'},
+ varname='p_spl',
+ defaults={if_true={vi="en"}}
+ },
+ {
+ full_name='spellsuggest', abbreviation='sps',
+ type='string', list='comma', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_sps',
+ defaults={if_true={vi="best"}}
+ },
+ {
+ full_name='splitbelow', abbreviation='sb',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_sb',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='splitright', abbreviation='spr',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_spr',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='startofline', abbreviation='sol',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_sol',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='statusline', abbreviation='stl',
+ type='string', scope={'global', 'window'},
+ vi_def=true,
+ alloced=true,
+ redraw={'statuslines'},
+ varname='p_stl',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='suffixes', abbreviation='su',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_su',
+ defaults={if_true={vi=".bak,~,.o,.h,.info,.swp,.obj"}}
+ },
+ {
+ full_name='suffixesadd', abbreviation='sua',
+ type='string', list='comma', scope={'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_sua',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='swapfile', abbreviation='swf',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ redraw={'statuslines'},
+ varname='p_swf',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='swapsync', abbreviation='sws',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_sws',
+ defaults={if_true={vi="fsync"}}
+ },
+ {
+ full_name='switchbuf', abbreviation='swb',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_swb',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='synmaxcol', abbreviation='smc',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ redraw={'current_buffer'},
+ varname='p_smc',
+ defaults={if_true={vi=3000}}
+ },
+ {
+ full_name='syntax', abbreviation='syn',
+ type='string', scope={'buffer'},
+ noglob=true,
+ normal_fname_chars=true,
+ vi_def=true,
+ alloced=true,
+ varname='p_syn',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='tabline', abbreviation='tal',
+ type='string', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_tal',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='tabpagemax', abbreviation='tpm',
+ type='number', scope={'global'},
+ vim=true,
+ varname='p_tpm',
+ defaults={if_true={vi=10, vim=50}}
+ },
+ {
+ full_name='tabstop', abbreviation='ts',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ redraw={'current_buffer'},
+ varname='p_ts',
+ defaults={if_true={vi=8}}
+ },
+ {
+ full_name='tagbsearch', abbreviation='tbs',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_tbs',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='taglength', abbreviation='tl',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_tl',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='tagrelative', abbreviation='tr',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_tr',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='tags', abbreviation='tag',
+ type='string', list='comma', scope={'global', 'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ expand=true,
+ varname='p_tags',
+ defaults={if_true={vi="./tags;,tags"}}
+ },
+ {
+ full_name='tagstack', abbreviation='tgst',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_tgst',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='termbidi', abbreviation='tbidi',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_tbidi',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='termencoding', abbreviation='tenc',
+ type='string', scope={'global'},
+ vi_def=true,
+ redraw={'everything'},
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='terse',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_terse',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='textwidth', abbreviation='tw',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ redraw={'current_buffer'},
+ varname='p_tw',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='thesaurus', abbreviation='tsr',
+ type='string', list='comma', scope={'global', 'buffer'},
+ deny_duplicates=true,
+ vi_def=true,
+ expand=true,
+ varname='p_tsr',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='tildeop', abbreviation='top',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_to',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='timeout', abbreviation='to',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_timeout',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='timeoutlen', abbreviation='tm',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_tm',
+ defaults={if_true={vi=1000}}
+ },
+ {
+ full_name='title',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_title',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='titlelen',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_titlelen',
+ defaults={if_true={vi=85}}
+ },
+ {
+ full_name='titleold',
+ type='string', scope={'global'},
+ secure=true,
+ gettext=true,
+ no_mkrc=true,
+ vi_def=true,
+ varname='p_titleold',
+ defaults={if_true={vi=N_("Thanks for flying Vim")}}
+ },
+ {
+ full_name='titlestring',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_titlestring',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='ttimeout',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_ttimeout',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='ttimeoutlen', abbreviation='ttm',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_ttm',
+ defaults={if_true={vi=-1}}
+ },
+ {
+ full_name='ttyfast', abbreviation='tf',
+ type='bool', scope={'global'},
+ no_mkrc=true,
+ vi_def=true,
+ varname='p_force_on',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='undodir', abbreviation='udir',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_udir',
+ defaults={if_true={vi="."}}
+ },
+ {
+ full_name='undofile', abbreviation='udf',
+ type='bool', scope={'buffer'},
+ vi_def=true,
+ vim=true,
+ varname='p_udf',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='undolevels', abbreviation='ul',
+ type='number', scope={'global', 'buffer'},
+ vi_def=true,
+ varname='p_ul',
+ defaults={
+ condition={'!UNIX', '!WIN3264'},
+ if_true={vi=100},
+ if_false={vi=1000},
+ }
+ },
+ {
+ full_name='undoreload', abbreviation='ur',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_ur',
+ defaults={if_true={vi=10000}}
+ },
+ {
+ full_name='updatecount', abbreviation='uc',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_uc',
+ defaults={if_true={vi=200}}
+ },
+ {
+ full_name='updatetime', abbreviation='ut',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_ut',
+ defaults={if_true={vi=4000}}
+ },
+ {
+ full_name='verbose', abbreviation='vbs',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_verbose',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='verbosefile', abbreviation='vfile',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_vfile',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='viewdir', abbreviation='vdir',
+ type='string', scope={'global'},
+ secure=true,
+ vi_def=true,
+ expand=true,
+ varname='p_vdir',
+ defaults={if_true={vi=macros('DFLT_VDIR')}}
+ },
+ {
+ full_name='viewoptions', abbreviation='vop',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_vop',
+ defaults={if_true={vi="folds,options,cursor"}}
+ },
+ {
+ full_name='viminfo', abbreviation='vi',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ secure=true,
+ varname='p_viminfo',
+ defaults={if_true={vi="", vim="!,'100,<50,s10,h"}}
+ },
+ {
+ full_name='virtualedit', abbreviation='ve',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ vim=true,
+ redraw={'curswant'},
+ varname='p_ve',
+ defaults={if_true={vi="", vim=""}}
+ },
+ {
+ full_name='visualbell', abbreviation='vb',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_vb',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='warn',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_warn',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='whichwrap', abbreviation='ww',
+ type='string', list='flagscomma', scope={'global'},
+ vim=true,
+ varname='p_ww',
+ defaults={if_true={vi="", vim="b,s"}}
+ },
+ {
+ full_name='wildchar', abbreviation='wc',
+ type='number', scope={'global'},
+ vim=true,
+ varname='p_wc',
+ defaults={if_true={vi=macros('Ctrl_E'), vim=macros('TAB')}}
+ },
+ {
+ full_name='wildcharm', abbreviation='wcm',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_wcm',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='wildignore', abbreviation='wig',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vi_def=true,
+ varname='p_wig',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='wildignorecase', abbreviation='wic',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_wic',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='wildmenu', abbreviation='wmnu',
+ type='bool', scope={'global'},
+ vim=true,
+ varname='p_wmnu',
+ defaults={if_true={vi=false, vim=true}}
+ },
+ {
+ full_name='wildmode', abbreviation='wim',
+ type='string', list='comma', scope={'global'},
+ deny_duplicates=true,
+ vim=true,
+ varname='p_wim',
+ defaults={if_true={vi="", vim="list:longest,full"}}
+ },
+ {
+ full_name='wildoptions', abbreviation='wop',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_wop',
+ defaults={if_true={vi=""}}
+ },
+ {
+ full_name='winaltkeys', abbreviation='wak',
+ type='string', scope={'global'},
+ vi_def=true,
+ varname='p_wak',
+ defaults={if_true={vi="menu"}}
+ },
+ {
+ full_name='window', abbreviation='wi',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_window',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='winheight', abbreviation='wh',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_wh',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='winfixheight', abbreviation='wfh',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'statuslines'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='winfixwidth', abbreviation='wfw',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'statuslines'},
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='winminheight', abbreviation='wmh',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_wmh',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='winminwidth', abbreviation='wmw',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_wmw',
+ defaults={if_true={vi=1}}
+ },
+ {
+ full_name='winwidth', abbreviation='wiw',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_wiw',
+ defaults={if_true={vi=20}}
+ },
+ {
+ full_name='wrap',
+ type='bool', scope={'window'},
+ vi_def=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='wrapmargin', abbreviation='wm',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ varname='p_wm',
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='wrapscan', abbreviation='ws',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_ws',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='write',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_write',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='writeany', abbreviation='wa',
+ type='bool', scope={'global'},
+ vi_def=true,
+ varname='p_wa',
+ defaults={if_true={vi=false}}
+ },
+ {
+ full_name='writebackup', abbreviation='wb',
+ type='bool', scope={'global'},
+ vi_def=true,
+ vim=true,
+ varname='p_wb',
+ defaults={if_true={vi=true}}
+ },
+ {
+ full_name='writedelay', abbreviation='wd',
+ type='number', scope={'global'},
+ vi_def=true,
+ varname='p_wd',
+ defaults={if_true={vi=0}}
+ },
+ }
+}
diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c
index 553dda5e88..5eeb275701 100644
--- a/src/nvim/os/fs.c
+++ b/src/nvim/os/fs.c
@@ -316,7 +316,7 @@ int os_rename(const char_u *path, const char_u *new_path)
/// Make a directory.
///
-/// @return `0` for success, non-zero for failure.
+/// @return `0` for success, -errno for failure.
int os_mkdir(const char *path, int32_t mode)
FUNC_ATTR_NONNULL_ALL
{
@@ -326,6 +326,54 @@ int os_mkdir(const char *path, int32_t mode)
return result;
}
+/// Make a directory, with higher levels when needed
+///
+/// @param[in] dir Directory to create.
+/// @param[in] mode Permissions for the newly-created directory.
+/// @param[out] failed_dir If it failed to create directory, then this
+/// argument is set to an allocated string containing
+/// the name of the directory which os_mkdir_recurse
+/// failed to create. I.e. it will contain dir or any
+/// of the higher level directories.
+///
+/// @return `0` for success, -errno for failure.
+int os_mkdir_recurse(const char *const dir, int32_t mode,
+ char **const failed_dir)
+ FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
+{
+ // Get end of directory name in "dir".
+ // We're done when it's "/" or "c:/".
+ const size_t dirlen = strlen(dir);
+ char *const curdir = xmemdupz(dir, dirlen);
+ char *const past_head = (char *) get_past_head((char_u *) curdir);
+ char *e = curdir + dirlen;
+ const char *const real_end = e;
+ const char past_head_save = *past_head;
+ while (!os_isdir((char_u *) curdir)) {
+ e = (char *) path_tail_with_sep((char_u *) curdir);
+ if (e <= past_head) {
+ *past_head = NUL;
+ break;
+ }
+ *e = NUL;
+ }
+ while (e != real_end) {
+ if (e > past_head) {
+ *e = '/';
+ } else {
+ *past_head = past_head_save;
+ }
+ e += strlen(e);
+ int ret;
+ if ((ret = os_mkdir(curdir, mode)) != 0) {
+ *failed_dir = curdir;
+ return ret;
+ }
+ }
+ xfree(curdir);
+ return 0;
+}
+
/// Create a unique temporary directory.
///
/// @param[in] template Template of the path to the directory with XXXXXX
diff --git a/src/nvim/os/os_defs.h b/src/nvim/os/os_defs.h
index 0e7632a79d..1d16111066 100644
--- a/src/nvim/os/os_defs.h
+++ b/src/nvim/os/os_defs.h
@@ -135,4 +135,9 @@
// For dup(3).
#define HAVE_DUP
+/// Function to convert -errno error to char * error description
+///
+/// -errno errors are returned by a number of os functions.
+#define os_strerror uv_strerror
+
#endif // NVIM_OS_OS_DEFS_H
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 152154e5f4..72980fcd0e 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -481,6 +481,21 @@ static size_t path_expand(garray_T *gap, const char_u *path, int flags)
return do_path_expand(gap, path, 0, flags, false);
}
+static const char *scandir_next_with_dots(Directory *dir)
+{
+ static int count = 0;
+ if (dir == NULL) { // initialize
+ count = 0;
+ return NULL;
+ }
+
+ count += 1;
+ if (count == 1 || count == 2) {
+ return (count == 1) ? "." : "..";
+ }
+ return os_scandir_next(dir);
+}
+
/// Implementation of path_expand().
///
/// Chars before `path + wildoff` do not get expanded.
@@ -597,11 +612,12 @@ static size_t do_path_expand(garray_T *gap, const char_u *path,
*s = NUL;
Directory dir;
- // open the directory for scanning
- if (os_scandir(&dir, *buf == NUL ? "." : (char *)buf)) {
+ if (os_scandir(&dir, *buf == NUL ? "." : (char *)buf)
+ || os_isdir(*buf == NUL ? (char_u *)"." : (char_u *)buf)) {
// Find all matching entries.
char_u *name;
- while((name = (char_u *) os_scandir_next(&dir))) {
+ scandir_next_with_dots(NULL /* initialize */);
+ while((name = (char_u *) scandir_next_with_dots(&dir)) && name != NULL) {
if ((name[0] != '.' || starts_with_dot)
&& ((regmatch.regprog != NULL && vim_regexec(&regmatch, name, 0))
|| ((flags & EW_NOTWILD)
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index 3ae3f46db3..4724a07895 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -1120,12 +1120,10 @@ static int get_coll_element(char_u **pp)
}
static int reg_cpo_lit; /* 'cpoptions' contains 'l' flag */
-static int reg_cpo_bsl; /* 'cpoptions' contains '\' flag */
static void get_cpo_flags(void)
{
reg_cpo_lit = vim_strchr(p_cpo, CPO_LITERAL) != NULL;
- reg_cpo_bsl = vim_strchr(p_cpo, CPO_BACKSL) != NULL;
}
/*
@@ -1149,7 +1147,6 @@ static char_u *skip_anyof(char_u *p)
if (*p != ']' && *p != NUL)
mb_ptr_adv(p);
} else if (*p == '\\'
- && !reg_cpo_bsl
&& (vim_strchr(REGEXP_INRANGE, p[1]) != NULL
|| (!reg_cpo_lit && vim_strchr(REGEXP_ABBR, p[1]) != NULL)))
p += 2;
@@ -2222,7 +2219,7 @@ collection:
}
/* Handle \o40, \x20 and \u20AC style sequences */
- if (endc == '\\' && !reg_cpo_lit && !reg_cpo_bsl)
+ if (endc == '\\' && !reg_cpo_lit)
endc = coll_get_char();
if (startc > endc)
@@ -2245,10 +2242,8 @@ collection:
* Only "\]", "\^", "\]" and "\\" are special in Vi. Vim
* accepts "\t", "\e", etc., but only when the 'l' flag in
* 'cpoptions' is not included.
- * Posix doesn't recognize backslash at all.
*/
else if (*regparse == '\\'
- && !reg_cpo_bsl
&& (vim_strchr(REGEXP_INRANGE, regparse[1]) != NULL
|| (!reg_cpo_lit
&& vim_strchr(REGEXP_ABBR,
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index d9dc09b623..227737e7ff 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -270,8 +270,10 @@ typedef struct {
/* When REG_MULTI is TRUE list.multi is used, otherwise list.line. */
union {
struct multipos {
- lpos_T start;
- lpos_T end;
+ linenr_T start_lnum;
+ linenr_T end_lnum;
+ colnr_T start_col;
+ colnr_T end_col;
} multi[NSUBEXP];
struct linepos {
char_u *start;
@@ -1391,7 +1393,7 @@ static int nfa_regatom(void)
* matched an unlimited number of times. NFA_NOPEN is
* added only once at a position, while NFA_SPLIT is
* added multiple times. This is more efficient than
- * not allowsing NFA_SPLIT multiple times, it is used
+ * not allowing NFA_SPLIT multiple times, it is used
* a lot. */
EMIT(NFA_NOPEN);
break;
@@ -1584,10 +1586,8 @@ collection:
* Only "\]", "\^", "\]" and "\\" are special in Vi. Vim
* accepts "\t", "\e", etc., but only when the 'l' flag in
* 'cpoptions' is not included.
- * Posix doesn't recognize backslash at all.
*/
if (*regparse == '\\'
- && !reg_cpo_bsl
&& regparse + 1 <= endp
&& (vim_strchr(REGEXP_INRANGE, regparse[1]) != NULL
|| (!reg_cpo_lit
@@ -3433,10 +3433,10 @@ static void log_subexpr(regsub_T *sub)
if (REG_MULTI)
fprintf(log_fd, "*** group %d, start: c=%d, l=%d, end: c=%d, l=%d\n",
j,
- sub->list.multi[j].start.col,
- (int)sub->list.multi[j].start.lnum,
- sub->list.multi[j].end.col,
- (int)sub->list.multi[j].end.lnum);
+ sub->list.multi[j].start_col,
+ (int)sub->list.multi[j].start_lnum,
+ sub->list.multi[j].end_col,
+ (int)sub->list.multi[j].end_lnum);
else {
char *s = (char *)sub->list.line[j].start;
char *e = (char *)sub->list.line[j].end;
@@ -3537,8 +3537,10 @@ static void copy_ze_off(regsub_T *to, regsub_T *from)
{
if (nfa_has_zend) {
if (REG_MULTI) {
- if (from->list.multi[0].end.lnum >= 0)
- to->list.multi[0].end = from->list.multi[0].end;
+ if (from->list.multi[0].end_lnum >= 0){
+ to->list.multi[0].end_lnum = from->list.multi[0].end_lnum;
+ to->list.multi[0].end_col = from->list.multi[0].end_col;
+ }
} else {
if (from->list.line[0].end != NULL)
to->list.line[0].end = from->list.line[0].end;
@@ -3561,27 +3563,27 @@ static int sub_equal(regsub_T *sub1, regsub_T *sub2)
if (REG_MULTI) {
for (i = 0; i < todo; ++i) {
if (i < sub1->in_use)
- s1 = sub1->list.multi[i].start.lnum;
+ s1 = sub1->list.multi[i].start_lnum;
else
s1 = -1;
if (i < sub2->in_use)
- s2 = sub2->list.multi[i].start.lnum;
+ s2 = sub2->list.multi[i].start_lnum;
else
s2 = -1;
if (s1 != s2)
return FALSE;
- if (s1 != -1 && sub1->list.multi[i].start.col
- != sub2->list.multi[i].start.col)
+ if (s1 != -1 && sub1->list.multi[i].start_col
+ != sub2->list.multi[i].start_col)
return FALSE;
if (nfa_has_backref) {
if (i < sub1->in_use) {
- s1 = sub1->list.multi[i].end.lnum;
+ s1 = sub1->list.multi[i].end_lnum;
} else {
s1 = -1;
}
if (i < sub2->in_use) {
- s2 = sub2->list.multi[i].end.lnum;
+ s2 = sub2->list.multi[i].end_lnum;
} else {
s2 = -1;
}
@@ -3589,7 +3591,7 @@ static int sub_equal(regsub_T *sub1, regsub_T *sub2)
return FALSE;
}
if (s1 != -1
- && sub1->list.multi[i].end.col != sub2->list.multi[i].end.col) {
+ && sub1->list.multi[i].end_col != sub2->list.multi[i].end_col) {
return FALSE;
}
}
@@ -3639,7 +3641,7 @@ static void report_state(char *action,
if (sub->in_use <= 0)
col = -1;
else if (REG_MULTI)
- col = sub->list.multi[0].start.col;
+ col = sub->list.multi[0].start_col;
else
col = (int)(sub->list.line[0].start - regline);
nfa_set_code(state->c);
@@ -4025,22 +4027,24 @@ skip_add:
* and restore it when it was in use. Otherwise fill any gap. */
if (REG_MULTI) {
if (subidx < sub->in_use) {
- save_lpos = sub->list.multi[subidx].start;
+ save_lpos.lnum = sub->list.multi[subidx].start_lnum;
+ save_lpos.col = sub->list.multi[subidx].start_col;
save_in_use = -1;
} else {
save_in_use = sub->in_use;
for (i = sub->in_use; i < subidx; ++i) {
- sub->list.multi[i].start.lnum = -1;
- sub->list.multi[i].end.lnum = -1;
+ sub->list.multi[i].start_lnum = -1;
+ sub->list.multi[i].end_lnum = -1;
}
sub->in_use = subidx + 1;
}
if (off == -1) {
- sub->list.multi[subidx].start.lnum = reglnum + 1;
- sub->list.multi[subidx].start.col = 0;
+ sub->list.multi[subidx].start_lnum = reglnum + 1;
+ sub->list.multi[subidx].start_col = 0;
} else {
- sub->list.multi[subidx].start.lnum = reglnum;
- sub->list.multi[subidx].start.col =
+
+ sub->list.multi[subidx].start_lnum = reglnum;
+ sub->list.multi[subidx].start_col =
(colnr_T)(reginput - regline + off);
}
} else {
@@ -4066,8 +4070,10 @@ skip_add:
sub = &subs->norm;
if (save_in_use == -1) {
- if (REG_MULTI)
- sub->list.multi[subidx].start = save_lpos;
+ if (REG_MULTI){
+ sub->list.multi[subidx].start_lnum = save_lpos.lnum;
+ sub->list.multi[subidx].start_col = save_lpos.col;
+ }
else
sub->list.line[subidx].start = save_ptr;
} else
@@ -4076,7 +4082,7 @@ skip_add:
case NFA_MCLOSE:
if (nfa_has_zend && (REG_MULTI
- ? subs->norm.list.multi[0].end.lnum >= 0
+ ? subs->norm.list.multi[0].end_lnum >= 0
: subs->norm.list.line[0].end != NULL)) {
/* Do not overwrite the position set by \ze. */
subs = addstate(l, state->out, subs, pim, off);
@@ -4119,13 +4125,14 @@ skip_add:
if (sub->in_use <= subidx)
sub->in_use = subidx + 1;
if (REG_MULTI) {
- save_lpos = sub->list.multi[subidx].end;
+ save_lpos.lnum = sub->list.multi[subidx].end_lnum;
+ save_lpos.col = sub->list.multi[subidx].end_col;
if (off == -1) {
- sub->list.multi[subidx].end.lnum = reglnum + 1;
- sub->list.multi[subidx].end.col = 0;
+ sub->list.multi[subidx].end_lnum = reglnum + 1;
+ sub->list.multi[subidx].end_col = 0;
} else {
- sub->list.multi[subidx].end.lnum = reglnum;
- sub->list.multi[subidx].end.col =
+ sub->list.multi[subidx].end_lnum = reglnum;
+ sub->list.multi[subidx].end_col =
(colnr_T)(reginput - regline + off);
}
/* avoid compiler warnings */
@@ -4145,8 +4152,10 @@ skip_add:
else
sub = &subs->norm;
- if (REG_MULTI)
- sub->list.multi[subidx].end = save_lpos;
+ if (REG_MULTI){
+ sub->list.multi[subidx].end_lnum = save_lpos.lnum;
+ sub->list.multi[subidx].end_col = save_lpos.col;
+ }
else
sub->list.line[subidx].end = save_ptr;
sub->in_use = save_in_use;
@@ -4321,24 +4330,24 @@ retempty:
}
if (REG_MULTI) {
- if (sub->list.multi[subidx].start.lnum < 0
- || sub->list.multi[subidx].end.lnum < 0)
+ if (sub->list.multi[subidx].start_lnum < 0
+ || sub->list.multi[subidx].end_lnum < 0)
goto retempty;
- if (sub->list.multi[subidx].start.lnum == reglnum
- && sub->list.multi[subidx].end.lnum == reglnum) {
- len = sub->list.multi[subidx].end.col
- - sub->list.multi[subidx].start.col;
- if (cstrncmp(regline + sub->list.multi[subidx].start.col,
+ if (sub->list.multi[subidx].start_lnum == reglnum
+ && sub->list.multi[subidx].end_lnum == reglnum) {
+ len = sub->list.multi[subidx].end_col
+ - sub->list.multi[subidx].start_col;
+ if (cstrncmp(regline + sub->list.multi[subidx].start_col,
reginput, &len) == 0) {
*bytelen = len;
return TRUE;
}
} else {
if (match_with_backref(
- sub->list.multi[subidx].start.lnum,
- sub->list.multi[subidx].start.col,
- sub->list.multi[subidx].end.lnum,
- sub->list.multi[subidx].end.col,
+ sub->list.multi[subidx].start_lnum,
+ sub->list.multi[subidx].start_col,
+ sub->list.multi[subidx].end_lnum,
+ sub->list.multi[subidx].end_col,
bytelen) == RA_MATCH)
return TRUE;
}
@@ -4875,8 +4884,8 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm
* it's the first MOPEN. */
if (toplevel) {
if (REG_MULTI) {
- m->norm.list.multi[0].start.lnum = reglnum;
- m->norm.list.multi[0].start.col = (colnr_T)(reginput - regline);
+ m->norm.list.multi[0].start_lnum = reglnum;
+ m->norm.list.multi[0].start_col = (colnr_T)(reginput - regline);
} else
m->norm.list.line[0].start = reginput;
m->norm.in_use = 1;
@@ -4964,7 +4973,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm
if (t->subs.norm.in_use <= 0)
col = -1;
else if (REG_MULTI)
- col = t->subs.norm.list.multi[0].start.col;
+ col = t->subs.norm.list.multi[0].start_col;
else
col = (int)(t->subs.norm.list.line[0].start - regline);
nfa_set_code(t->state->c);
@@ -5216,7 +5225,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm
* continue with what follows. */
if (REG_MULTI)
/* TODO: multi-line match */
- bytelen = m->norm.list.multi[0].end.col
+ bytelen = m->norm.list.multi[0].end_col
- (int)(reginput - regline);
else
bytelen = (int)(m->norm.list.line[0].end - reginput);
@@ -6020,7 +6029,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm
if (add) {
if (REG_MULTI)
- m->norm.list.multi[0].start.col =
+ m->norm.list.multi[0].start_col =
(colnr_T)(reginput - regline) + clen;
else
m->norm.list.line[0].start = reginput + clen;
@@ -6125,8 +6134,11 @@ static long nfa_regtry(nfa_regprog_T *prog, colnr_T col)
cleanup_subexpr();
if (REG_MULTI) {
for (i = 0; i < subs.norm.in_use; i++) {
- reg_startpos[i] = subs.norm.list.multi[i].start;
- reg_endpos[i] = subs.norm.list.multi[i].end;
+ reg_startpos[i].lnum = subs.norm.list.multi[i].start_lnum;
+ reg_startpos[i].col = subs.norm.list.multi[i].start_col;
+
+ reg_endpos[i].lnum = subs.norm.list.multi[i].end_lnum;
+ reg_endpos[i].col = subs.norm.list.multi[i].end_col;
}
if (reg_startpos[0].lnum < 0) {
@@ -6164,12 +6176,12 @@ static long nfa_regtry(nfa_regprog_T *prog, colnr_T col)
struct multipos *mpos = &subs.synt.list.multi[i];
// Only accept single line matches that are valid.
- if (mpos->start.lnum >= 0
- && mpos->start.lnum == mpos->end.lnum
- && mpos->end.col >= mpos->start.col) {
+ if (mpos->start_lnum >= 0
+ && mpos->start_lnum == mpos->end_lnum
+ && mpos->end_col >= mpos->start_col) {
re_extmatch_out->matches[i] =
- vim_strnsave(reg_getline(mpos->start.lnum) + mpos->start.col,
- mpos->end.col - mpos->start.col);
+ vim_strnsave(reg_getline(mpos->start_lnum) + mpos->start_col,
+ mpos->end_col - mpos->start_col);
}
} else {
struct linepos *lpos = &subs.synt.list.line[i];
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 43cb6f4878..d57b84ad50 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -1951,6 +1951,28 @@ static void fold_line(win_T *wp, long fold_count, foldinfo_T *foldinfo, linenr_T
}
}
+ // Show colorcolumn in the fold line, but let cursorcolumn override it.
+ if (wp->w_p_cc_cols) {
+ int i = 0;
+ int j = wp->w_p_cc_cols[i];
+ int old_txtcol = txtcol;
+
+ while (j > -1) {
+ txtcol += j;
+ if (wp->w_p_wrap) {
+ txtcol -= wp->w_skipcol;
+ } else {
+ txtcol -= wp->w_leftcol;
+ }
+ if (txtcol >= 0 && txtcol < wp->w_width) {
+ ScreenAttrs[off + txtcol] =
+ hl_combine_attr(ScreenAttrs[off + txtcol], hl_attr(HLF_MC));
+ }
+ txtcol = old_txtcol;
+ j = wp->w_p_cc_cols[++i];
+ }
+ }
+
/* Show 'cursorcolumn' in the fold line. */
if (wp->w_p_cuc) {
txtcol += wp->w_virtcol;
diff --git a/src/nvim/search.c b/src/nvim/search.c
index e10504973b..f91ac3bb9c 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -2199,7 +2199,6 @@ findpar (
linenr_T curr;
bool did_skip; /* true after separating lines have been skipped */
bool first; /* true on first line */
- int posix = (vim_strchr(p_cpo, CPO_PARA) != NULL);
linenr_T fold_first; /* first line of a closed fold */
linenr_T fold_last; /* last line of a closed fold */
bool fold_skipped; /* true if a closed fold was skipped this
@@ -2220,12 +2219,7 @@ findpar (
fold_skipped = true;
}
- /* POSIX has it's own ideas of what a paragraph boundary is and it
- * doesn't match historical Vi: It also stops at a "{" in the
- * first column and at an empty line. */
- if (!first && did_skip && (startPS(curr, what, both)
- || (posix && what == NUL && *ml_get(curr) ==
- '{')))
+ if (!first && did_skip && startPS(curr, what, both))
break;
if (fold_skipped)
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile
index f701098980..c97ffc2ced 100644
--- a/src/nvim/testdir/Makefile
+++ b/src/nvim/testdir/Makefile
@@ -12,19 +12,19 @@ SCRIPTS := test_eval.out \
test11.out test12.out test13.out test14.out \
test17.out \
test24.out \
- test26.out test27.out test30.out \
+ test30.out \
test32.out test34.out \
test36.out test37.out test39.out test40.out \
- test42.out test43.out test45.out \
- test46.out test47.out test48.out test49.out \
+ test42.out test45.out \
+ test47.out test48.out test49.out \
test52.out test53.out test55.out \
- test57.out test58.out test59.out \
- test63.out test64.out \
+ test58.out test59.out \
+ test64.out \
test68.out test69.out \
- test71.out test73.out \
- test79.out test80.out \
+ test73.out \
+ test79.out \
test83.out \
- test86.out test87.out test88.out \
+ test88.out \
test_listlbr.out \
test_breakindent.out \
test_close_count.out \
diff --git a/src/nvim/testdir/test57.in b/src/nvim/testdir/test57.in
deleted file mode 100644
index 8d972e4a68..0000000000
--- a/src/nvim/testdir/test57.in
+++ /dev/null
@@ -1,500 +0,0 @@
-Tests for :sort command. vim: set ft=vim :
-
-STARTTEST
-:so small.vim
-:"
-:/^t01:/+1,/^t02/-1sort
-:/^t02:/+1,/^t03/-1sort n
-:/^t03:/+1,/^t04/-1sort x
-:/^t04:/+1,/^t05/-1sort u
-:/^t05:/+1,/^t06/-1sort!
-:/^t06:/+1,/^t07/-1sort! n
-:/^t07:/+1,/^t08/-1sort! u
-:/^t08:/+1,/^t09/-1sort o
-:/^t09:/+1,/^t10/-1sort! x
-:/^t10:/+1,/^t11/-1sort/./
-:/^t11:/+1,/^t12/-1sort/../
-:/^t12:/+1,/^t13/-1sort/../u
-:/^t13:/+1,/^t14/-1sort/./n
-:/^t14:/+1,/^t15/-1sort/./r
-:/^t15:/+1,/^t16/-1sort/../r
-:/^t16:/+1,/^t17/-1sort/./rn
-:/^t17:/+1,/^t18/-1sort/\d/
-:/^t18:/+1,/^t19/-1sort/\d/r
-:/^t19:/+1,/^t20/-1sort/\d/n
-:/^t20:/+1,/^t21/-1sort/\d/rn
-:/^t21:/+1,/^t22/-1sort/\d\d/
-:/^t22:/+1,/^t23/-1sort/\d\d/n
-:/^t23:/+1,/^t24/-1sort/\d\d/x
-:/^t24:/+1,/^t25/-1sort/\d\d/r
-:/^t25:/+1,/^t26/-1sort/\d\d/rn
-:/^t26:/+1,/^t27/-1sort/\d\d/rx
-:/^t27:/+1,/^t28/-1sort no
-:/^t01:/,$wq! test.out
-ENDTEST
-
-t01: alphebetical
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t02: numeric
-abc
-ab
-a321
-a123
-a122
-a
-x-22
-b321
-b123
-
-c123d
--24
- 123b
-c321d
-0
-b322b
-b321
-b321b
-
-
-t03: hexadecimal
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t04: alpha, unique
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t05: alpha, reverse
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t06: numeric, reverse
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t07: unique, reverse
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t08: octal
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t09: reverse, hexadecimal
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t10: alpha, skip first character
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t11: alpha, skip first 2 characters
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t12: alpha, unique, skip first 2 characters
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t13: numeric, skip first character
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t14: alpha, sort on first character
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t15: alpha, sort on first 2 characters
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t16: numeric, sort on first character
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t17: alpha, skip past first digit
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t18: alpha, sort on first digit
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t19: numeric, skip past first digit
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t20: numeric, sort on first digit
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t21: alpha, skip past first 2 digits
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t22: numeric, skip past first 2 digits
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t23: hexadecimal, skip past first 2 digits
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t24: alpha, sort on first 2 digits
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t25: numeric, sort on first 2 digits
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t26: hexadecimal, sort on first 2 digits
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t27: wrong arguments
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t28: done
-
diff --git a/src/nvim/testdir/test57.ok b/src/nvim/testdir/test57.ok
deleted file mode 100644
index aa3d373183..0000000000
--- a/src/nvim/testdir/test57.ok
+++ /dev/null
@@ -1,459 +0,0 @@
-t01: alphebetical
-
-
- 123b
-a
-a122
-a123
-a321
-ab
-abc
-b123
-b321
-b321
-b321b
-b322b
-c123d
-c321d
-t02: numeric
-abc
-ab
-a
-
-
-
--24
-x-22
-0
-a122
-a123
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b321
-b321b
-b322b
-t03: hexadecimal
-
-
-a
-ab
-abc
- 123b
-a122
-a123
-a321
-b123
-b321
-b321
-b321b
-b322b
-c123d
-c321d
-t04: alpha, unique
-
- 123b
-a
-a122
-a123
-a321
-ab
-abc
-b123
-b321
-b321b
-b322b
-c123d
-c321d
-t05: alpha, reverse
-c321d
-c123d
-b322b
-b321b
-b321
-b321
-b123
-abc
-ab
-a321
-a123
-a122
-a
- 123b
-
-
-t06: numeric, reverse
-b322b
-b321b
-b321
-c321d
-b321
-a321
- 123b
-c123d
-b123
-a123
-a122
-
-
-a
-ab
-abc
-t07: unique, reverse
-c321d
-c123d
-b322b
-b321b
-b321
-b123
-abc
-ab
-a321
-a123
-a122
-a
- 123b
-
-t08: octal
-abc
-ab
-a
-
-
-a122
-a123
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b321
-b321b
-b322b
-t09: reverse, hexadecimal
-c321d
-c123d
-b322b
-b321b
-b321
-b321
-b123
-a321
-a123
-a122
- 123b
-abc
-ab
-a
-
-
-t10: alpha, skip first character
-a
-
-
-a122
-a123
-b123
- 123b
-c123d
-a321
-b321
-b321
-b321b
-c321d
-b322b
-ab
-abc
-t11: alpha, skip first 2 characters
-ab
-a
-
-
-a321
-b321
-b321
-b321b
-c321d
-a122
-b322b
-a123
-b123
- 123b
-c123d
-abc
-t12: alpha, unique, skip first 2 characters
-ab
-a
-
-a321
-b321
-b321b
-c321d
-a122
-b322b
-a123
-b123
- 123b
-c123d
-abc
-t13: numeric, skip first character
-abc
-ab
-a
-
-
-a122
-a123
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b321
-b321b
-b322b
-t14: alpha, sort on first character
-
-
- 123b
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-b322b
-b321
-b321b
-c123d
-c321d
-t15: alpha, sort on first 2 characters
-a
-
-
- 123b
-a123
-a122
-a321
-abc
-ab
-b123
-b321
-b322b
-b321
-b321b
-c123d
-c321d
-t16: numeric, sort on first character
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t17: alpha, skip past first digit
-abc
-ab
-a
-
-
-a321
-b321
-b321
-b321b
-c321d
-a122
-b322b
-a123
-b123
- 123b
-c123d
-t18: alpha, sort on first digit
-abc
-ab
-a
-
-
-a123
-a122
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b322b
-b321
-b321b
-t19: numeric, skip past first digit
-abc
-ab
-a
-
-
-a321
-b321
-c321d
-b321
-b321b
-a122
-b322b
-a123
-b123
-c123d
- 123b
-t20: numeric, sort on first digit
-abc
-ab
-a
-
-
-a123
-a122
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b322b
-b321
-b321b
-t21: alpha, skip past first 2 digits
-abc
-ab
-a
-
-
-a321
-b321
-b321
-b321b
-c321d
-a122
-b322b
-a123
-b123
- 123b
-c123d
-t22: numeric, skip past first 2 digits
-abc
-ab
-a
-
-
-a321
-b321
-c321d
-b321
-b321b
-a122
-b322b
-a123
-b123
-c123d
- 123b
-t23: hexadecimal, skip past first 2 digits
-abc
-ab
-a
-
-
-a321
-b321
-b321
-a122
-a123
-b123
-b321b
-c321d
-b322b
- 123b
-c123d
-t24: alpha, sort on first 2 digits
-abc
-ab
-a
-
-
-a123
-a122
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b322b
-b321
-b321b
-t25: numeric, sort on first 2 digits
-abc
-ab
-a
-
-
-a123
-a122
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b322b
-b321
-b321b
-t26: hexadecimal, sort on first 2 digits
-abc
-ab
-a
-
-
-a123
-a122
-b123
-c123d
- 123b
-a321
-b321
-c321d
-b322b
-b321
-b321b
-t27: wrong arguments
-abc
-ab
-a
-a321
-a123
-a122
-b321
-b123
-c123d
- 123b
-c321d
-b322b
-b321
-b321b
-
-
-t28: done
-
diff --git a/src/nvim/testdir/test79.in b/src/nvim/testdir/test79.in
index 8278bd8000..afbf2083d2 100644
--- a/src/nvim/testdir/test79.in
+++ b/src/nvim/testdir/test79.in
Binary files differ
diff --git a/src/nvim/testdir/test79.ok b/src/nvim/testdir/test79.ok
index e22eee0b71..d4e0ae8819 100644
--- a/src/nvim/testdir/test79.ok
+++ b/src/nvim/testdir/test79.ok
Binary files differ
diff --git a/src/nvim/testdir/test80.in b/src/nvim/testdir/test80.in
deleted file mode 100644
index 406fb6dac7..0000000000
--- a/src/nvim/testdir/test80.in
+++ /dev/null
@@ -1,201 +0,0 @@
-Test for *sub-replace-special* and *sub-replace-expression* on substitue().
-Test for submatch() on substitue().
-Test for *:s%* on :substitute.
-
-STARTTEST
-:so small.vim
-ENDTEST
-
-TEST_1:
-
-STARTTEST
-:set magic
-:set cpo&
-:$put =\"\n\nTEST_1:\"
-:$put =substitute('A', 'A', '&&', '')
-:$put =substitute('B', 'B', '\&', '')
-:$put =substitute('C123456789', 'C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\0\9\8\7\6\5\4\3\2\1', '')
-:$put =substitute('D', 'D', 'd', '')
-:$put =substitute('E', 'E', '~', '')
-:$put =substitute('F', 'F', '\~', '')
-:$put =substitute('G', 'G', '\ugg', '')
-:$put =substitute('H', 'H', '\Uh\Eh', '')
-:$put =substitute('I', 'I', '\lII', '')
-:$put =substitute('J', 'J', '\LJ\EJ', '')
-:$put =substitute('K', 'K', '\Uk\ek', '')
-:$put =substitute('lLl', 'L', ' ', '')
-:$put =substitute('mMm', 'M', '\r', '')
-:$put =substitute('nNn', 'N', '\ ', '')
-:$put =substitute('oOo', 'O', '\n', '')
-:$put =substitute('pPp', 'P', '\b', '')
-:$put =substitute('qQq', 'Q', '\t', '')
-:$put =substitute('rRr', 'R', '\\', '')
-:$put =substitute('sSs', 'S', '\c', '')
-:$put =substitute('uUu', 'U', \"\n\", '')
-:$put =substitute('vVv', 'V', \"\b\", '')
-:$put =substitute('wWw', 'W', \"\\\", '')
-:$put =substitute('xXx', 'X', \"\r\", '')
-:$put =substitute('Y', 'Y', '\L\uyYy\l\EY', '')
-:$put =substitute('Z', 'Z', '\U\lZzZ\u\Ez', '')
-/^TEST_2
-ENDTEST
-
-TEST_2:
-
-STARTTEST
-:set nomagic
-:set cpo&
-:$put =\"\n\nTEST_2:\"
-:$put =substitute('A', 'A', '&&', '')
-:$put =substitute('B', 'B', '\&', '')
-:$put =substitute('C123456789', 'C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\0\9\8\7\6\5\4\3\2\1', '')
-:$put =substitute('D', 'D', 'd', '')
-:$put =substitute('E', 'E', '~', '')
-:$put =substitute('F', 'F', '\~', '')
-:$put =substitute('G', 'G', '\ugg', '')
-:$put =substitute('H', 'H', '\Uh\Eh', '')
-:$put =substitute('I', 'I', '\lII', '')
-:$put =substitute('J', 'J', '\LJ\EJ', '')
-:$put =substitute('K', 'K', '\Uk\ek', '')
-:$put =substitute('lLl', 'L', ' ', '')
-:$put =substitute('mMm', 'M', '\r', '')
-:$put =substitute('nNn', 'N', '\ ', '')
-:$put =substitute('oOo', 'O', '\n', '')
-:$put =substitute('pPp', 'P', '\b', '')
-:$put =substitute('qQq', 'Q', '\t', '')
-:$put =substitute('rRr', 'R', '\\', '')
-:$put =substitute('sSs', 'S', '\c', '')
-:$put =substitute('tTt', 'T', \"\r\", '')
-:$put =substitute('uUu', 'U', \"\n\", '')
-:$put =substitute('vVv', 'V', \"\b\", '')
-:$put =substitute('wWw', 'W', \"\\\", '')
-:$put =substitute('X', 'X', '\L\uxXx\l\EX', '')
-:$put =substitute('Y', 'Y', '\U\lYyY\u\Ey', '')
-/^TEST_3
-ENDTEST
-
-TEST_3:
-
-STARTTEST
-:set magic&
-:set cpo&
-:$put =\"\n\nTEST_3:\"
-:let y = substitute('aAa', 'A', '\="\\"', '') | $put =y
-:let y = substitute('bBb', 'B', '\="\\\\"', '') | $put =y
-:let y = substitute('cCc', 'C', '\=" "', '') | $put =y
-:let y = substitute('dDd', 'D', '\="\\ "', '') | $put =y
-:let y = substitute('eEe', 'E', '\="\\\\ "', '') | $put =y
-:let y = substitute('fFf', 'F', '\="\\r"', '') | $put =y
-:let y = substitute('jJj', 'J', '\="\\n"', '') | $put =y
-:let y = substitute('kKk', 'K', '\="\r"', '') | $put =y
-:let y = substitute('lLl', 'L', '\="\n"', '') | $put =y
-/^TEST_4
-ENDTEST
-
-TEST_4:
-
-STARTTEST
-:set magic&
-:set cpo&
-:$put =\"\n\nTEST_4:\"
-:let y = substitute('aAa', 'A', '\=substitute(submatch(0), ".", "\\", "")', '') | $put =y
-:let y = substitute('bBb', 'B', '\=substitute(submatch(0), ".", "\\\\", "")', '') | $put =y
-:let y = substitute('cCc', 'C', '\=substitute(submatch(0), ".", " ", "")', '') | $put =y
-:let y = substitute('dDd', 'D', '\=substitute(submatch(0), ".", "\\ ", "")', '') | $put =y
-:let y = substitute('eEe', 'E', '\=substitute(submatch(0), ".", "\\\\ ", "")', '') | $put =y
-:let y = substitute('fFf', 'F', '\=substitute(submatch(0), ".", "\\r", "")', '') | $put =y
-:let y = substitute('jJj', 'J', '\=substitute(submatch(0), ".", "\\n", "")', '') | $put =y
-:let y = substitute('kKk', 'K', '\=substitute(submatch(0), ".", "\r", "")', '') | $put =y
-:let y = substitute('lLl', 'L', '\=substitute(submatch(0), ".", "\n", "")', '') | $put =y
-/^TEST_5
-ENDTEST
-
-TEST_5:
-
-STARTTEST
-:set magic&
-:set cpo&
-:$put =\"\n\nTEST_5:\"
-:$put =substitute('A123456789', 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\=submatch(0) . submatch(9) . submatch(8) . submatch(7) . submatch(6) . submatch(5) . submatch(4) . submatch(3) . submatch(2) . submatch(1)', '')
-:$put =substitute('A123456789', 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\=string([submatch(0, 1), submatch(9, 1), submatch(8, 1), submatch(7, 1), submatch(6, 1), submatch(5, 1), submatch(4, 1), submatch(3, 1), submatch(2, 1), submatch(1, 1)])', '')
-/^TEST_6
-ENDTEST
-
-TEST_6:
-
-STARTTEST
-:set magic&
-:$put =\"\n\nTEST_6:\"
-:set cpo+=/
-:$put =substitute('A', 'A', 'a', '')
-:$put =substitute('B', 'B', '%', '')
-:set cpo-=/
-:$put =substitute('C', 'C', 'c', '')
-:$put =substitute('D', 'D', '%', '')
-/^TEST_7
-ENDTEST
-
-TEST_7:
-
-STARTTEST
-:set magic&
-:set cpo&
-:$put =\"\n\nTEST_7:\"
-:$put =substitute('A A', 'A.', '\=submatch(0)', '')
-:$put =substitute(\"B\nB\", 'B.', '\=submatch(0)', '')
-:$put =substitute(\"B\nB\", 'B.', '\=string(submatch(0, 1))', '')
-:$put =substitute('-bb', '\zeb', 'a', 'g')
-:$put =substitute('-bb', '\ze', 'c', 'g')
-/^TEST_8
-ENDTEST
-
-TEST_8:
-
-STARTTEST
-:set magic&
-:set cpo&
-:$put =\"\n\nTEST_8:\"
-:$put =',,X'
-:s/\(^\|,\)\ze\(,\|X\)/\1N/g
-:$put =',,Y'
-:s/\(^\|,\)\ze\(,\|Y\)/\1N/gc
-a:$put =',,Z'
-:s/\(^\|,\)\ze\(,\|Z\)/\1N/gc
-yy/^TEST_9:
-ENDTEST
-
-TEST_9:
-
-STARTTEST
-:set magic&
-:set cpo&
-:$put =\"\n\nTEST_9:\"
-:$put ='xxx'
-:s/x/X/gc
-yyq/^TEST_10:
-ENDTEST
-
-TEST_10:
-
-STARTTEST
-:set magic&
-:set cpo&
-:$put =\"\n\nTEST_10:\"
-:let y = substitute('123', '\zs', 'a', 'g') | $put =y
-:let y = substitute('123', '\zs.', 'a', 'g') | $put =y
-:let y = substitute('123', '.\zs', 'a', 'g') | $put =y
-:let y = substitute('123', '\ze', 'a', 'g') | $put =y
-:let y = substitute('123', '\ze.', 'a', 'g') | $put =y
-:let y = substitute('123', '.\ze', 'a', 'g') | $put =y
-:let y = substitute('123', '1\|\ze', 'a', 'g') | $put =y
-:let y = substitute('123', '1\zs\|[23]', 'a', 'g') | $put =y
-/^TEST_11
-ENDTEST
-
-TEST_11:
-
-STARTTEST
-:/^Results/,$wq! test.out
-ENDTEST
-
-Results of test72:
diff --git a/src/nvim/testdir/test80.ok b/src/nvim/testdir/test80.ok
deleted file mode 100644
index b42f604a07..0000000000
--- a/src/nvim/testdir/test80.ok
+++ /dev/null
@@ -1,131 +0,0 @@
-Results of test72:
-
-
-TEST_1:
-AA
-&
-C123456789987654321
-d
-~
-~
-Gg
-Hh
-iI
-jJ
-Kk
-l l
-m m
-n n
-o
-o
-pp
-q q
-r\r
-scs
-u
-u
-vv
-w\w
-x x
-YyyY
-zZZz
-
-
-TEST_2:
-AA
-&
-C123456789987654321
-d
-~
-~
-Gg
-Hh
-iI
-jJ
-Kk
-l l
-m m
-n n
-o
-o
-pp
-q q
-r\r
-scs
-t t
-u
-u
-vv
-w\w
-XxxX
-yYYy
-
-
-TEST_3:
-a\a
-b\\b
-c c
-d\ d
-e\\ e
-f\rf
-j\nj
-k k
-l
-l
-
-
-TEST_4:
-a\a
-b\b
-c c
-d d
-e\ e
-f f
-j
-j
-k k
-l
-l
-
-
-TEST_5:
-A123456789987654321
-[['A123456789'], ['9'], ['8'], ['7'], ['6'], ['5'], ['4'], ['3'], ['2'], ['1']]
-
-
-TEST_6:
-a
-%
-c
-%
-
-
-TEST_7:
-A A
-B
-B
-['B
-']B
--abab
-c-cbcbc
-
-
-TEST_8:
-N,,NX
-N,,NY
-N,,NZ
-
-
-TEST_9:
-XXx
-
-
-TEST_10:
-a1a2a3a
-aaa
-1a2a3a
-a1a2a3a
-a1a2a3
-aaa
-aa2a3a
-1aaa
diff --git a/src/nvim/testdir/test86.in b/src/nvim/testdir/test86.in
deleted file mode 100644
index 41d9a2fa32..0000000000
--- a/src/nvim/testdir/test86.in
+++ /dev/null
@@ -1,1425 +0,0 @@
-Tests for various python features. vim: set ft=vim :
-
-This test is not run in Neovim(see the has('nvim') check below) because the
-python compatibility layer is not complete.
-
-NOTE: This will cause errors when run under valgrind.
-This would require recompiling Python with:
- ./configure --without-pymalloc
-See http://svn.python.org/view/python/trunk/Misc/README.valgrind?view=markup
-
-STARTTEST
-:so small.vim
-:set encoding=latin1
-:set noswapfile
-:if !has('python') || has('nvim') | e! test.ok | wq! test.out | endif
-:lang C
-:fun Test()
-:py import vim
-:let l = []
-:py l=vim.bindeval('l')
-:py f=vim.bindeval('function("strlen")')
-:" Extending List directly with different types
-:py l.extend([1, "as'd", [1, 2, f, {'a': 1}]])
-:$put =string(l)
-:$put =string(l[-1])
-:try
-: $put =string(l[-4])
-:catch
-: $put =v:exception[:13]
-:endtry
-:" List assignment
-:py l[0]=0
-:$put =string(l)
-:py l[-2]=f
-:$put =string(l)
-:"
-:" Extending Dictionary directly with different types
-:let d = {}
-:fun d.f()
-: return 1
-:endfun
-py << EOF
-d=vim.bindeval('d')
-d['1']='asd'
-d.update(b=[1, 2, f])
-d.update((('-1', {'a': 1}),))
-d.update({'0': -1})
-dk = d.keys()
-dv = d.values()
-di = d.items()
-cmpfun = lambda a, b: cmp(repr(a), repr(b))
-dk.sort(cmpfun)
-dv.sort(cmpfun)
-di.sort(cmpfun)
-EOF
-:$put =pyeval('d[''f''](self={})')
-:$put =pyeval('repr(dk)')
-:$put =substitute(pyeval('repr(dv)'),'0x\x\+','','g')
-:$put =substitute(pyeval('repr(di)'),'0x\x\+','','g')
-:for [key, Val] in sort(items(d))
-: $put =string(key) . ' : ' . string(Val)
-: unlet key Val
-:endfor
-:py del dk
-:py del di
-:py del dv
-:"
-:" removing items with del
-:py del l[2]
-:$put =string(l)
-:let l = range(8)
-:py l=vim.bindeval('l')
-:try
-: py del l[:3]
-: py del l[1:]
-:catch
-: $put =v:exception
-:endtry
-:$put =string(l)
-:"
-:py del d['-1']
-:py del d['f']
-:$put =string(pyeval('d.get(''b'', 1)'))
-:$put =string(pyeval('d.pop(''b'')'))
-:$put =string(pyeval('d.get(''b'', 1)'))
-:$put =string(pyeval('d.pop(''1'', 2)'))
-:$put =string(pyeval('d.pop(''1'', 2)'))
-:$put =pyeval('repr(d.has_key(''0''))')
-:$put =pyeval('repr(d.has_key(''1''))')
-:$put =pyeval('repr(''0'' in d)')
-:$put =pyeval('repr(''1'' in d)')
-:$put =pyeval('repr(list(iter(d)))')
-:$put =string(d)
-:$put =pyeval('repr(d.popitem())')
-:$put =pyeval('repr(d.get(''0''))')
-:$put =pyeval('repr(list(iter(d)))')
-:"
-:" removing items out of range: silently skip items that don't exist
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:" The following two ranges delete nothing as they match empty list:
-:py del l[2:1]
-:$put =string(l)
-:py del l[2:2]
-:$put =string(l)
-:py del l[2:3]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[2:4]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[2:5]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[2:6]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:" The following two ranges delete nothing as they match empty list:
-:py del l[-1:2]
-:$put =string(l)
-:py del l[-2:2]
-:$put =string(l)
-:py del l[-3:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[-4:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[-5:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[-6:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[::2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[3:0:-2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py del l[2:4:-2]
-:$put =string(l)
-:"
-:" Slice assignment to a list
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py l[0:0]=['a']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py l[1:2]=['b']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py l[2:4]=['c']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py l[4:4]=['d']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py l[-1:2]=['e']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py l[-10:2]=['f']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:py l[2:-10]=['g']
-:$put =string(l)
-:let l = []
-:py l=vim.bindeval('l')
-:py l[0:0]=['h']
-:$put =string(l)
-:let l = range(8)
-:py l=vim.bindeval('l')
-:py l[2:6:2] = [10, 20]
-:$put =string(l)
-:let l = range(8)
-:py l=vim.bindeval('l')
-:py l[6:2:-2] = [10, 20]
-:$put =string(l)
-:let l = range(8)
-:py l=vim.bindeval('l')
-:py l[6:2] = ()
-:$put =string(l)
-:let l = range(8)
-:py l=vim.bindeval('l')
-:py l[6:2:1] = ()
-:$put =string(l)
-:let l = range(8)
-:py l=vim.bindeval('l')
-:py l[2:2:1] = ()
-:$put =string(l)
-:"
-:" Locked variables
-:let l = [0, 1, 2, 3]
-:py l=vim.bindeval('l')
-:lockvar! l
-:py l[2]='i'
-:$put =string(l)
-:unlockvar! l
-:"
-:" Function calls
-py << EOF
-import sys
-def ee(expr, g=globals(), l=locals()):
- try:
- exec(expr, g, l)
- except:
- ei = sys.exc_info()
- msg = sys.exc_info()[0].__name__ + ':' + repr(sys.exc_info()[1].args)
- msg = msg.replace('TypeError:(\'argument 1 ', 'TypeError:(\'')
- if expr.find('None') > -1:
- msg = msg.replace('TypeError:(\'iteration over non-sequence\',)',
- 'TypeError:("\'NoneType\' object is not iterable",)')
- if expr.find('FailingNumber') > -1:
- msg = msg.replace(', not \'FailingNumber\'', '').replace('"', '\'')
- msg = msg.replace('TypeError:(\'iteration over non-sequence\',)',
- 'TypeError:("\'FailingNumber\' object is not iterable",)')
- if msg.find('(\'\'') > -1 or msg.find('(\'can\'t') > -1:
- msg = msg.replace('(\'', '("').replace('\',)', '",)')
- if expr == 'fd(self=[])':
- # HACK: PyMapping_Check changed meaning
- msg = msg.replace('AttributeError:(\'keys\',)',
- 'TypeError:(\'unable to convert list to vim dictionary\',)')
- vim.current.buffer.append(expr + ':' + msg)
- else:
- vim.current.buffer.append(expr + ':NOT FAILED')
-EOF
-:fun New(...)
-: return ['NewStart']+a:000+['NewEnd']
-:endfun
-:fun DictNew(...) dict
-: return ['DictNewStart']+a:000+['DictNewEnd', self]
-:endfun
-:let l=[function('New'), function('DictNew')]
-:py l=vim.bindeval('l')
-:py l.extend(list(l[0](1, 2, 3)))
-:$put =string(l)
-:py l.extend(list(l[1](1, 2, 3, self={'a': 'b'})))
-:$put =string(l)
-:py l.extend([l[0].name])
-:$put =string(l)
-:py ee('l[1](1, 2, 3)')
-:py f=l[0]
-:delfunction New
-:py ee('f(1, 2, 3)')
-:let l=[0.0]
-:py l=vim.bindeval('l')
-:py l.extend([0.0])
-:$put =string(l)
-:let messages=[]
-:delfunction DictNew
-py <<EOF
-d=vim.bindeval('{}')
-m=vim.bindeval('messages')
-def em(expr, g=globals(), l=locals()):
- try:
- exec(expr, g, l)
- except:
- m.extend([sys.exc_type.__name__])
-
-em('d["abc1"]')
-em('d["abc1"]="\\0"')
-em('d["abc1"]=vim')
-em('d[""]=1')
-em('d["a\\0b"]=1')
-em('d[u"a\\0b"]=1')
-
-em('d.pop("abc1")')
-em('d.popitem()')
-del em
-del m
-EOF
-:$put =messages
-:unlet messages
-:" locked and scope attributes
-:let d={} | let dl={} | lockvar dl
-:for s in split("d dl v: g:")
-: let name=tr(s, ':', 's')
-: execute 'py '.name.'=vim.bindeval("'.s.'")'
-: let toput=s.' : '.join(map(['locked', 'scope'], 'v:val.":".pyeval(name.".".v:val)'), ';')
-: $put =toput
-:endfor
-:silent! let d.abc2=1
-:silent! let dl.abc3=1
-:py d.locked=True
-:py dl.locked=False
-:silent! let d.def=1
-:silent! let dl.def=1
-:put ='d:'.string(d)
-:put ='dl:'.string(dl)
-:unlet d dl
-:
-:let l=[] | let ll=[] | lockvar ll
-:for s in split("l ll")
-: let name=tr(s, ':', 's')
-: execute 'py '.name.'=vim.bindeval("'.s.'")'
-: let toput=s.' : locked:'.pyeval(name.'.locked')
-: $put =toput
-:endfor
-:silent! call extend(l, [0])
-:silent! call extend(ll, [0])
-:py l.locked=True
-:py ll.locked=False
-:silent! call extend(l, [1])
-:silent! call extend(ll, [1])
-:put ='l:'.string(l)
-:put ='ll:'.string(ll)
-:unlet l ll
-:"
-:" pyeval()
-:let l=pyeval('range(3)')
-:$put =string(l)
-:let d=pyeval('{"a": "b", "c": 1, "d": ["e"]}')
-:$put =sort(items(d))
-:let f=pyeval('0.0')
-:$put =string(f)
-:" Invalid values:
-:for e in ['"\0"', '{"\0": 1}', 'undefined_name', 'vim']
-: try
-: let v=pyeval(e)
-: catch
-: let toput=e.":\t".v:exception[:13]
-: $put =toput
-: endtry
-:endfor
-:"
-:" threading
-:let l = [0]
-:py l=vim.bindeval('l')
-py <<EOF
-import threading
-import time
-
-class T(threading.Thread):
- def __init__(self):
- threading.Thread.__init__(self)
- self.t = 0
- self.running = True
-
- def run(self):
- while self.running:
- self.t += 1
- time.sleep(0.1)
-
-t = T()
-del T
-t.start()
-EOF
-:sleep 1
-:py t.running = False
-:py t.join()
-:py l[0] = t.t > 8 # check if the background thread is working
-:py del time
-:py del threading
-:py del t
-:$put =string(l)
-:"
-:" settrace
-:let l = []
-:py l=vim.bindeval('l')
-py <<EOF
-import sys
-
-def traceit(frame, event, arg):
- global l
- if event == "line":
- l.extend([frame.f_lineno])
- return traceit
-
-def trace_main():
- for i in range(5):
- pass
-EOF
-:py sys.settrace(traceit)
-:py trace_main()
-:py sys.settrace(None)
-:py del traceit
-:py del trace_main
-:$put =string(l)
-:"
-:" Slice
-:py ll = vim.bindeval('[0, 1, 2, 3, 4, 5]')
-:py l = ll[:4]
-:$put =string(pyeval('l'))
-:py l = ll[2:]
-:$put =string(pyeval('l'))
-:py l = ll[:-4]
-:$put =string(pyeval('l'))
-:py l = ll[-2:]
-:$put =string(pyeval('l'))
-:py l = ll[2:4]
-:$put =string(pyeval('l'))
-:py l = ll[4:2]
-:$put =string(pyeval('l'))
-:py l = ll[-4:-2]
-:$put =string(pyeval('l'))
-:py l = ll[-2:-4]
-:$put =string(pyeval('l'))
-:py l = ll[:]
-:$put =string(pyeval('l'))
-:py l = ll[0:6]
-:$put =string(pyeval('l'))
-:py l = ll[-10:10]
-:$put =string(pyeval('l'))
-:py l = ll[4:2:-1]
-:$put =string(pyeval('l'))
-:py l = ll[::2]
-:$put =string(pyeval('l'))
-:py l = ll[4:2:1]
-:$put =string(pyeval('l'))
-:py del l
-:"
-:" Vars
-:let g:foo = 'bac'
-:let w:abc3 = 'def'
-:let b:baz = 'bar'
-:let t:bar = 'jkl'
-:try
-: throw "Abc"
-:catch
-: put =pyeval('vim.vvars[''exception'']')
-:endtry
-:put =pyeval('vim.vars[''foo'']')
-:put =pyeval('vim.current.window.vars[''abc3'']')
-:put =pyeval('vim.current.buffer.vars[''baz'']')
-:put =pyeval('vim.current.tabpage.vars[''bar'']')
-:"
-:" Options
-:" paste: boolean, global
-:" previewheight number, global
-:" operatorfunc: string, global
-:" number: boolean, window-local
-:" numberwidth: number, window-local
-:" colorcolumn: string, window-local
-:" statusline: string, window-local/global
-:" autoindent: boolean, buffer-local
-:" shiftwidth: number, buffer-local
-:" omnifunc: string, buffer-local
-:" preserveindent: boolean, buffer-local/global
-:" path: string, buffer-local/global
-:let g:bufs=[bufnr('%')]
-:new
-:let g:bufs+=[bufnr('%')]
-:vnew
-:let g:bufs+=[bufnr('%')]
-:wincmd j
-:vnew
-:let g:bufs+=[bufnr('%')]
-:wincmd l
-:fun RecVars(opt)
-: let gval =string(eval('&g:'.a:opt))
-: let wvals=join(map(range(1, 4), 'v:val.":".string(getwinvar(v:val, "&".a:opt))'))
-: let bvals=join(map(copy(g:bufs), 'v:val.":".string(getbufvar(v:val, "&".a:opt))'))
-: put =' G: '.gval
-: put =' W: '.wvals
-: put =' B: '.wvals
-:endfun
-py << EOF
-def e(s, g=globals(), l=locals()):
- try:
- exec(s, g, l)
- except:
- vim.command('return ' + repr(sys.exc_type.__name__))
-
-def ev(s, g=globals(), l=locals()):
- try:
- return eval(s, g, l)
- except:
- vim.command('let exc=' + repr(sys.exc_type.__name__))
- return 0
-EOF
-:fun E(s)
-: python e(vim.eval('a:s'))
-:endfun
-:fun Ev(s)
-: let r=pyeval('ev(vim.eval("a:s"))')
-: if exists('exc')
-: throw exc
-: endif
-: return r
-:endfun
-:py gopts1=vim.options
-:py wopts1=vim.windows[2].options
-:py wopts2=vim.windows[0].options
-:py wopts3=vim.windows[1].options
-:py bopts1=vim.buffers[vim.bindeval("g:bufs")[2]].options
-:py bopts2=vim.buffers[vim.bindeval("g:bufs")[1]].options
-:py bopts3=vim.buffers[vim.bindeval("g:bufs")[0]].options
-:$put ='wopts iters equal: '.pyeval('list(wopts1) == list(wopts2)')
-:$put ='bopts iters equal: '.pyeval('list(bopts1) == list(bopts2)')
-:py gset=set(iter(gopts1))
-:py wset=set(iter(wopts1))
-:py bset=set(iter(bopts1))
-:set path=.,..,,
-:let lst=[]
-:let lst+=[['paste', 1, 0, 1, 2, 1, 1, 0 ]]
-:let lst+=[['previewheight', 5, 1, 6, 'a', 0, 1, 0 ]]
-:let lst+=[['operatorfunc', 'A', 'B', 'C', 2, 0, 1, 0 ]]
-:let lst+=[['number', 0, 1, 1, 0, 1, 0, 1 ]]
-:let lst+=[['numberwidth', 2, 3, 5, -100, 0, 0, 1 ]]
-:let lst+=[['colorcolumn', '+1', '+2', '+3', 'abc4', 0, 0, 1 ]]
-:let lst+=[['statusline', '1', '2', '4', 0, 0, 1, 1 ]]
-:let lst+=[['autoindent', 0, 1, 1, 2, 1, 0, 2 ]]
-:let lst+=[['shiftwidth', 0, 2, 1, 3, 0, 0, 2 ]]
-:let lst+=[['omnifunc', 'A', 'B', 'C', 1, 0, 0, 2 ]]
-:let lst+=[['preserveindent', 0, 1, 1, 2, 1, 1, 2 ]]
-:let lst+=[['path', '.,,', ',,', '.', 0, 0, 1, 2 ]]
-:for [oname, oval1, oval2, oval3, invval, bool, global, local] in lst
-: py oname=vim.eval('oname')
-: py oval1=vim.bindeval('oval1')
-: py oval2=vim.bindeval('oval2')
-: py oval3=vim.bindeval('oval3')
-: if invval is 0 || invval is 1
-: py invval=bool(vim.bindeval('invval'))
-: else
-: py invval=vim.bindeval('invval')
-: endif
-: if bool
-: py oval1=bool(oval1)
-: py oval2=bool(oval2)
-: py oval3=bool(oval3)
-: endif
-: put ='>>> '.oname
-: $put =' g/w/b:'.pyeval('oname in gset').'/'.pyeval('oname in wset').'/'.pyeval('oname in bset')
-: $put =' g/w/b (in):'.pyeval('oname in gopts1').'/'.pyeval('oname in wopts1').'/'.pyeval('oname in bopts1')
-: for v in ['gopts1', 'wopts1', 'bopts1']
-: try
-: put =' p/'.v.': '.Ev('repr('.v.'['''.oname.'''])')
-: catch
-: put =' p/'.v.'! '.v:exception
-: endtry
-: let r=E(v.'['''.oname.''']=invval')
-: if r isnot 0
-: put =' inv: '.string(invval).'! '.r
-: endif
-: for vv in (v is# 'gopts1' ? [v] : [v, v[:-2].'2', v[:-2].'3'])
-: let val=substitute(vv, '^.opts', 'oval', '')
-: let r=E(vv.'['''.oname.''']='.val)
-: if r isnot 0
-: put =' '.vv.'! '.r
-: endif
-: endfor
-: endfor
-: call RecVars(oname)
-: for v in ['wopts3', 'bopts3']
-: let r=E('del '.v.'["'.oname.'"]')
-: if r isnot 0
-: put =' del '.v.'! '.r
-: endif
-: endfor
-: call RecVars(oname)
-:endfor
-:delfunction RecVars
-:delfunction E
-:delfunction Ev
-:py del ev
-:py del e
-:only
-:for buf in g:bufs[1:]
-: execute 'bwipeout!' buf
-:endfor
-:py del gopts1
-:py del wopts1
-:py del wopts2
-:py del wopts3
-:py del bopts1
-:py del bopts2
-:py del bopts3
-:py del oval1
-:py del oval2
-:py del oval3
-:py del oname
-:py del invval
-:"
-:" Test buffer object
-:vnew
-:put ='First line'
-:put ='Second line'
-:put ='Third line'
-:1 delete _
-:py b=vim.current.buffer
-:wincmd w
-:mark a
-:augroup BUFS
-: autocmd BufFilePost * python cb.append(vim.eval('expand("<abuf>")') + ':BufFilePost:' + vim.eval('bufnr("%")'))
-: autocmd BufFilePre * python cb.append(vim.eval('expand("<abuf>")') + ':BufFilePre:' + vim.eval('bufnr("%")'))
-:augroup END
-py << EOF
-cb = vim.current.buffer
-# Tests BufferAppend and BufferItem
-cb.append(b[0])
-# Tests BufferSlice and BufferAssSlice
-cb.append('abc5') # Will be overwritten
-cb[-1:] = b[:-2]
-# Test BufferLength and BufferAssSlice
-cb.append('def') # Will not be overwritten
-cb[len(cb):] = b[:]
-# Test BufferAssItem and BufferMark
-cb.append('ghi') # Will be overwritten
-cb[-1] = repr((len(cb) - cb.mark('a')[0], cb.mark('a')[1]))
-# Test BufferRepr
-cb.append(repr(cb) + repr(b))
-# Modify foreign buffer
-b.append('foo')
-b[0]='bar'
-b[0:0]=['baz']
-vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
-# Test assigning to name property
-import os
-old_name = cb.name
-cb.name = 'foo'
-cb.append(cb.name[-11:].replace(os.path.sep, '/'))
-b.name = 'bar'
-cb.append(b.name[-11:].replace(os.path.sep, '/'))
-cb.name = old_name
-cb.append(cb.name[-17:].replace(os.path.sep, '/'))
-del old_name
-# Test CheckBuffer
-for _b in vim.buffers:
- if _b is not cb:
- vim.command('bwipeout! ' + str(_b.number))
-del _b
-cb.append('valid: b:%s, cb:%s' % (repr(b.valid), repr(cb.valid)))
-for expr in ('b[1]','b[:] = ["A", "B"]','b[:]','b.append("abc6")', 'b.name = "!"'):
- try:
- exec(expr)
- except vim.error:
- pass
- else:
- # Usually a SEGV here
- # Should not happen in any case
- cb.append('No exception for ' + expr)
-vim.command('cd .')
-del b
-EOF
-:augroup BUFS
-: autocmd!
-:augroup END
-:augroup! BUFS
-:"
-:" Test vim.buffers object
-:set hidden
-:edit a
-:buffer #
-:edit b
-:buffer #
-:edit c
-:buffer #
-py << EOF
-try:
- from __builtin__ import next
-except ImportError:
- next = lambda o: o.next()
-# Check GCing iterator that was not fully exhausted
-i = iter(vim.buffers)
-cb.append('i:' + str(next(i)))
-# and also check creating more then one iterator at a time
-i2 = iter(vim.buffers)
-cb.append('i2:' + str(next(i2)))
-cb.append('i:' + str(next(i)))
-# The following should trigger GC and not cause any problems
-del i
-del i2
-i3 = iter(vim.buffers)
-cb.append('i3:' + str(next(i3)))
-del i3
-
-prevnum = 0
-for b in vim.buffers:
- # Check buffer order
- if prevnum >= b.number:
- cb.append('!!! Buffer numbers not in strictly ascending order')
- # Check indexing: vim.buffers[number].number == number
- cb.append(str(b.number) + ':' + repr(vim.buffers[b.number]) + '=' + repr(b))
- prevnum = b.number
-del prevnum
-
-cb.append(str(len(vim.buffers)))
-
-bnums = list(map(lambda b: b.number, vim.buffers))[1:]
-
-# Test wiping out buffer with existing iterator
-i4 = iter(vim.buffers)
-cb.append('i4:' + str(next(i4)))
-vim.command('bwipeout! ' + str(bnums.pop(0)))
-try:
- next(i4)
-except vim.error:
- pass
-else:
- cb.append('!!!! No vim.error')
-i4 = iter(vim.buffers)
-vim.command('bwipeout! ' + str(bnums.pop(-1)))
-vim.command('bwipeout! ' + str(bnums.pop(-1)))
-cb.append('i4:' + str(next(i4)))
-try:
- next(i4)
-except StopIteration:
- cb.append('StopIteration')
-del i4
-del bnums
-EOF
-:"
-:" Test vim.{tabpage,window}list and vim.{tabpage,window} objects
-:tabnew 0
-:tabnew 1
-:vnew a.1
-:tabnew 2
-:vnew a.2
-:vnew b.2
-:vnew c.2
-py << EOF
-cb.append('Number of tabs: ' + str(len(vim.tabpages)))
-cb.append('Current tab pages:')
-def W(w):
- if repr(w).find('(unknown)') != -1:
- return '<window object (unknown)>'
- else:
- return repr(w)
-
-start = len(cb)
-
-def Cursor(w):
- if w.buffer is cb:
- return repr((start - w.cursor[0], w.cursor[1]))
- else:
- return repr(w.cursor)
-
-for t in vim.tabpages:
- cb.append(' ' + repr(t) + '(' + str(t.number) + ')' + ': ' + str(len(t.windows)) + ' windows, current is ' + W(t.window))
- cb.append(' Windows:')
- for w in t.windows:
- cb.append(' ' + W(w) + '(' + str(w.number) + ')' + ': displays buffer ' + repr(w.buffer) + '; cursor is at ' + Cursor(w))
- # Other values depend on the size of the terminal, so they are checked partly:
- for attr in ('height', 'row', 'width', 'col'):
- try:
- aval = getattr(w, attr)
- if type(aval) is not long:
- raise TypeError
- if aval < 0:
- raise ValueError
- except Exception:
- cb.append('!!!!!! Error while getting attribute ' + attr + ': ' + sys.exc_type.__name__)
- del aval
- del attr
- w.cursor = (len(w.buffer), 0)
-del W
-del Cursor
-cb.append('Number of windows in current tab page: ' + str(len(vim.windows)))
-if list(vim.windows) != list(vim.current.tabpage.windows):
- cb.append('!!!!!! Windows differ')
-EOF
-:"
-:" Test vim.current
-py << EOF
-def H(o):
- return repr(o)
-cb.append('Current tab page: ' + repr(vim.current.tabpage))
-cb.append('Current window: ' + repr(vim.current.window) + ': ' + H(vim.current.window) + ' is ' + H(vim.current.tabpage.window))
-cb.append('Current buffer: ' + repr(vim.current.buffer) + ': ' + H(vim.current.buffer) + ' is ' + H(vim.current.window.buffer)+ ' is ' + H(vim.current.tabpage.window.buffer))
-del H
-# Assigning: fails
-try:
- vim.current.window = vim.tabpages[0].window
-except ValueError:
- cb.append('ValueError at assigning foreign tab window')
-
-for attr in ('window', 'tabpage', 'buffer'):
- try:
- setattr(vim.current, attr, None)
- except TypeError:
- cb.append('Type error at assigning None to vim.current.' + attr)
-del attr
-
-# Assigning: success
-vim.current.tabpage = vim.tabpages[-2]
-vim.current.buffer = cb
-vim.current.window = vim.windows[0]
-vim.current.window.cursor = (len(vim.current.buffer), 0)
-cb.append('Current tab page: ' + repr(vim.current.tabpage))
-cb.append('Current window: ' + repr(vim.current.window))
-cb.append('Current buffer: ' + repr(vim.current.buffer))
-cb.append('Current line: ' + repr(vim.current.line))
-ws = list(vim.windows)
-ts = list(vim.tabpages)
-for b in vim.buffers:
- if b is not cb:
- vim.command('bwipeout! ' + str(b.number))
-del b
-cb.append('w.valid: ' + repr([w.valid for w in ws]))
-cb.append('t.valid: ' + repr([t.valid for t in ts]))
-del w
-del t
-del ts
-del ws
-EOF
-:tabonly!
-:only!
-:"
-:" Test types
-py << EOF
-for expr, attr in (
- ('vim.vars', 'Dictionary'),
- ('vim.options', 'Options'),
- ('vim.bindeval("{}")', 'Dictionary'),
- ('vim.bindeval("[]")', 'List'),
- ('vim.bindeval("function(\'tr\')")', 'Function'),
- ('vim.current.buffer', 'Buffer'),
- ('vim.current.range', 'Range'),
- ('vim.current.window', 'Window'),
- ('vim.current.tabpage', 'TabPage'),
-):
- cb.append(expr + ':' + attr + ':' + repr(type(eval(expr)) is getattr(vim, attr)))
-del expr
-del attr
-EOF
-:"
-:" Test __dir__() method
-py << EOF
-for name, o in (
- ('current', vim.current),
- ('buffer', vim.current.buffer),
- ('window', vim.current.window),
- ('tabpage', vim.current.tabpage),
- ('range', vim.current.range),
- ('dictionary', vim.bindeval('{}')),
- ('list', vim.bindeval('[]')),
- ('function', vim.bindeval('function("tr")')),
- ('output', sys.stdout),
- ):
- cb.append(name + ':' + ','.join(dir(o)))
-del name
-del o
-EOF
-:"
-:" Test vim.*.__new__
-:$put =string(pyeval('vim.Dictionary({})'))
-:$put =string(pyeval('vim.Dictionary(a=1)'))
-:$put =string(pyeval('vim.Dictionary(((''a'', 1),))'))
-:$put =string(pyeval('vim.List()'))
-:$put =string(pyeval('vim.List(iter(''abc7''))'))
-:$put =string(pyeval('vim.Function(''tr'')'))
-:"
-:" Test stdout/stderr
-:redir => messages
-:py sys.stdout.write('abc8') ; sys.stdout.write('def')
-:py sys.stderr.write('abc9') ; sys.stderr.write('def')
-:py sys.stdout.writelines(iter('abcA'))
-:py sys.stderr.writelines(iter('abcB'))
-:redir END
-:$put =string(substitute(messages, '\d\+', '', 'g'))
-:" Test subclassing
-:fun Put(...)
-: $put =string(a:000)
-: return a:000
-:endfun
-py << EOF
-class DupDict(vim.Dictionary):
- def __setitem__(self, key, value):
- super(DupDict, self).__setitem__(key, value)
- super(DupDict, self).__setitem__('dup_' + key, value)
-dd = DupDict()
-dd['a'] = 'b'
-
-class DupList(vim.List):
- def __getitem__(self, idx):
- return [super(DupList, self).__getitem__(idx)] * 2
-
-dl = DupList()
-dl2 = DupList(iter('abcC'))
-dl.extend(dl2[0])
-
-class DupFun(vim.Function):
- def __call__(self, arg):
- return super(DupFun, self).__call__(arg, arg)
-
-df = DupFun('Put')
-EOF
-:$put =string(sort(keys(pyeval('dd'))))
-:$put =string(pyeval('dl'))
-:$put =string(pyeval('dl2'))
-:$put =string(pyeval('df(2)'))
-:$put =string(pyeval('dl') is# pyeval('dl'))
-:$put =string(pyeval('dd') is# pyeval('dd'))
-:$put =string(pyeval('df'))
-:delfunction Put
-py << EOF
-del DupDict
-del DupList
-del DupFun
-del dd
-del dl
-del dl2
-del df
-EOF
-:"
-:" Test chdir
-py << EOF
-import os
-fnamemodify = vim.Function('fnamemodify')
-cb.append(fnamemodify('.', ':p:h:t'))
-cb.append(vim.eval('@%'))
-os.chdir('..')
-path = fnamemodify('.', ':p:h:t')
-if path != 'src':
- # Running tests from a shadow directory, so move up another level
- # This will result in @% looking like shadow/testdir/test86.in, hence the
- # extra fnamemodify
- os.chdir('..')
- cb.append(fnamemodify('.', ':p:h:t'))
- cb.append(fnamemodify(vim.eval('@%'), ':s?^%s.??' % path).replace(os.path.sep, '/'))
- os.chdir(path)
- del path
-else:
- cb.append(fnamemodify('.', ':p:h:t'))
- cb.append(vim.eval('@%').replace(os.path.sep, '/'))
-os.chdir('testdir')
-cb.append(fnamemodify('.', ':p:h:t'))
-cb.append(vim.eval('@%'))
-del fnamemodify
-EOF
-:"
-:" Test errors
-:fun F() dict
-:endfun
-:fun D()
-:endfun
-py << EOF
-d = vim.Dictionary()
-ned = vim.Dictionary(foo='bar', baz='abcD')
-dl = vim.Dictionary(a=1)
-dl.locked = True
-l = vim.List()
-ll = vim.List('abcE')
-ll.locked = True
-nel = vim.List('abcO')
-f = vim.Function('string')
-fd = vim.Function('F')
-fdel = vim.Function('D')
-vim.command('delfunction D')
-
-def subexpr_test(expr, name, subexprs):
- cb.append('>>> Testing %s using %s' % (name, expr))
- for subexpr in subexprs:
- ee(expr % subexpr)
- cb.append('<<< Finished')
-
-def stringtochars_test(expr):
- return subexpr_test(expr, 'StringToChars', (
- '1', # Fail type checks
- 'u"\\0"', # Fail PyString_AsStringAndSize(bytes, , NULL) check
- '"\\0"', # Fail PyString_AsStringAndSize(object, , NULL) check
- ))
-
-class Mapping(object):
- def __init__(self, d):
- self.d = d
-
- def __getitem__(self, key):
- return self.d[key]
-
- def keys(self):
- return self.d.keys()
-
- def items(self):
- return self.d.items()
-
-def convertfrompyobject_test(expr, recurse=True):
- # pydict_to_tv
- stringtochars_test(expr % '{%s : 1}')
- if recurse:
- convertfrompyobject_test(expr % '{"abcF" : %s}', False)
- # pymap_to_tv
- stringtochars_test(expr % 'Mapping({%s : 1})')
- if recurse:
- convertfrompyobject_test(expr % 'Mapping({"abcG" : %s})', False)
- # pyseq_to_tv
- iter_test(expr)
- return subexpr_test(expr, 'ConvertFromPyObject', (
- 'None', # Not conversible
- '{"": 1}', # Empty key not allowed
- '{u"": 1}', # Same, but with unicode object
- 'FailingMapping()', #
- 'FailingMappingKey()', #
- 'FailingNumber()', #
- ))
-
-def convertfrompymapping_test(expr):
- convertfrompyobject_test(expr)
- return subexpr_test(expr, 'ConvertFromPyMapping', (
- '[]',
- ))
-
-def iter_test(expr):
- return subexpr_test(expr, '*Iter*', (
- 'FailingIter()',
- 'FailingIterNext()',
- ))
-
-def number_test(expr, natural=False, unsigned=False):
- if natural:
- unsigned = True
- return subexpr_test(expr, 'NumberToLong', (
- '[]',
- 'None',
- ) + (unsigned and ('-1',) or ())
- + (natural and ('0',) or ()))
-
-class FailingTrue(object):
- def __nonzero__(self):
- raise NotImplementedError('bool')
-
-class FailingIter(object):
- def __iter__(self):
- raise NotImplementedError('iter')
-
-class FailingIterNext(object):
- def __iter__(self):
- return self
-
- def next(self):
- raise NotImplementedError('next')
-
-class FailingIterNextN(object):
- def __init__(self, n):
- self.n = n
-
- def __iter__(self):
- return self
-
- def next(self):
- if self.n:
- self.n -= 1
- return 1
- else:
- raise NotImplementedError('next N')
-
-class FailingMappingKey(object):
- def __getitem__(self, item):
- raise NotImplementedError('getitem:mappingkey')
-
- def keys(self):
- return list("abcH")
-
-class FailingMapping(object):
- def __getitem__(self):
- raise NotImplementedError('getitem:mapping')
-
- def keys(self):
- raise NotImplementedError('keys')
-
-class FailingList(list):
- def __getitem__(self, idx):
- if i == 2:
- raise NotImplementedError('getitem:list')
- else:
- return super(FailingList, self).__getitem__(idx)
-
-class NoArgsCall(object):
- def __call__(self):
- pass
-
-class FailingCall(object):
- def __call__(self, path):
- raise NotImplementedError('call')
-
-class FailingNumber(object):
- def __int__(self):
- raise NotImplementedError('int')
-
-cb.append("> Output")
-cb.append(">> OutputSetattr")
-ee('del sys.stdout.softspace')
-number_test('sys.stdout.softspace = %s', unsigned=True)
-number_test('sys.stderr.softspace = %s', unsigned=True)
-ee('sys.stdout.attr = None')
-cb.append(">> OutputWrite")
-ee('sys.stdout.write(None)')
-cb.append(">> OutputWriteLines")
-ee('sys.stdout.writelines(None)')
-ee('sys.stdout.writelines([1])')
-iter_test('sys.stdout.writelines(%s)')
-cb.append("> VimCommand")
-stringtochars_test('vim.command(%s)')
-ee('vim.command("", 2)')
-#! Not checked: vim->python exceptions translating: checked later
-cb.append("> VimToPython")
-#! Not checked: everything: needs errors in internal python functions
-cb.append("> VimEval")
-stringtochars_test('vim.eval(%s)')
-ee('vim.eval("", FailingTrue())')
-#! Not checked: everything: needs errors in internal python functions
-cb.append("> VimEvalPy")
-stringtochars_test('vim.bindeval(%s)')
-ee('vim.eval("", 2)')
-#! Not checked: vim->python exceptions translating: checked later
-cb.append("> VimStrwidth")
-stringtochars_test('vim.strwidth(%s)')
-cb.append("> VimForeachRTP")
-ee('vim.foreach_rtp(None)')
-ee('vim.foreach_rtp(NoArgsCall())')
-ee('vim.foreach_rtp(FailingCall())')
-ee('vim.foreach_rtp(int, 2)')
-cb.append('> import')
-old_rtp = vim.options['rtp']
-vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
-ee('import xxx_no_such_module_xxx')
-ee('import failing_import')
-ee('import failing')
-vim.options['rtp'] = old_rtp
-del old_rtp
-cb.append("> Options")
-cb.append(">> OptionsItem")
-ee('vim.options["abcQ"]')
-ee('vim.options[""]')
-stringtochars_test('vim.options[%s]')
-cb.append(">> OptionsContains")
-stringtochars_test('%s in vim.options')
-cb.append("> Dictionary")
-cb.append(">> DictionaryConstructor")
-ee('vim.Dictionary("abcI")')
-##! Not checked: py_dict_alloc failure
-cb.append(">> DictionarySetattr")
-ee('del d.locked')
-ee('d.locked = FailingTrue()')
-ee('vim.vvars.locked = False')
-ee('d.scope = True')
-ee('d.xxx = True')
-cb.append(">> _DictionaryItem")
-ee('d.get("a", 2, 3)')
-stringtochars_test('d.get(%s)')
-ee('d.pop("a")')
-ee('dl.pop("a")')
-cb.append(">> DictionaryContains")
-ee('"" in d')
-ee('0 in d')
-cb.append(">> DictionaryIterNext")
-ee('for i in ned: ned["a"] = 1')
-del i
-cb.append(">> DictionaryAssItem")
-ee('dl["b"] = 1')
-stringtochars_test('d[%s] = 1')
-convertfrompyobject_test('d["a"] = %s')
-cb.append(">> DictionaryUpdate")
-cb.append(">>> kwargs")
-cb.append(">>> iter")
-ee('d.update(FailingMapping())')
-ee('d.update([FailingIterNext()])')
-ee('d.update([FailingIterNextN(1)])')
-iter_test('d.update(%s)')
-convertfrompyobject_test('d.update(%s)')
-stringtochars_test('d.update(((%s, 0),))')
-convertfrompyobject_test('d.update((("a", %s),))')
-cb.append(">> DictionaryPopItem")
-ee('d.popitem(1, 2)')
-cb.append(">> DictionaryHasKey")
-ee('d.has_key()')
-cb.append("> List")
-cb.append(">> ListConstructor")
-ee('vim.List(1, 2)')
-ee('vim.List(a=1)')
-iter_test('vim.List(%s)')
-convertfrompyobject_test('vim.List([%s])')
-cb.append(">> ListItem")
-ee('l[1000]')
-cb.append(">> ListAssItem")
-ee('ll[1] = 2')
-ee('l[1000] = 3')
-cb.append(">> ListAssSlice")
-ee('ll[1:100] = "abcJ"')
-iter_test('l[:] = %s')
-ee('nel[1:10:2] = "abcK"')
-cb.append(repr(tuple(nel)))
-ee('nel[1:10:2] = "a"')
-cb.append(repr(tuple(nel)))
-ee('nel[1:1:-1] = "a"')
-cb.append(repr(tuple(nel)))
-ee('nel[:] = FailingIterNextN(2)')
-cb.append(repr(tuple(nel)))
-convertfrompyobject_test('l[:] = [%s]')
-cb.append(">> ListConcatInPlace")
-iter_test('l.extend(%s)')
-convertfrompyobject_test('l.extend([%s])')
-cb.append(">> ListSetattr")
-ee('del l.locked')
-ee('l.locked = FailingTrue()')
-ee('l.xxx = True')
-cb.append("> Function")
-cb.append(">> FunctionConstructor")
-ee('vim.Function("123")')
-ee('vim.Function("xxx_non_existent_function_xxx")')
-ee('vim.Function("xxx#non#existent#function#xxx")')
-cb.append(">> FunctionCall")
-convertfrompyobject_test('f(%s)')
-convertfrompymapping_test('fd(self=%s)')
-cb.append("> TabPage")
-cb.append(">> TabPageAttr")
-ee('vim.current.tabpage.xxx')
-cb.append("> TabList")
-cb.append(">> TabListItem")
-ee('vim.tabpages[1000]')
-cb.append("> Window")
-cb.append(">> WindowAttr")
-ee('vim.current.window.xxx')
-cb.append(">> WindowSetattr")
-ee('vim.current.window.buffer = 0')
-ee('vim.current.window.cursor = (100000000, 100000000)')
-ee('vim.current.window.cursor = True')
-number_test('vim.current.window.height = %s', unsigned=True)
-number_test('vim.current.window.width = %s', unsigned=True)
-ee('vim.current.window.xxxxxx = True')
-cb.append("> WinList")
-cb.append(">> WinListItem")
-ee('vim.windows[1000]')
-cb.append("> Buffer")
-cb.append(">> StringToLine (indirect)")
-ee('vim.current.buffer[0] = u"\\na"')
-ee('vim.current.buffer[0] = "\\na"')
-cb.append(">> SetBufferLine (indirect)")
-ee('vim.current.buffer[0] = True')
-cb.append(">> SetBufferLineList (indirect)")
-ee('vim.current.buffer[:] = True')
-ee('vim.current.buffer[:] = ["\\na", "bc"]')
-cb.append(">> InsertBufferLines (indirect)")
-ee('vim.current.buffer.append(None)')
-ee('vim.current.buffer.append(["\\na", "bc"])')
-ee('vim.current.buffer.append("\\nbc")')
-cb.append(">> RBItem")
-ee('vim.current.buffer[100000000]')
-cb.append(">> RBAsItem")
-ee('vim.current.buffer[100000000] = ""')
-cb.append(">> BufferAttr")
-ee('vim.current.buffer.xxx')
-cb.append(">> BufferSetattr")
-ee('vim.current.buffer.name = True')
-ee('vim.current.buffer.xxx = True')
-cb.append(">> BufferMark")
-ee('vim.current.buffer.mark(0)')
-ee('vim.current.buffer.mark("abcM")')
-ee('vim.current.buffer.mark("!")')
-cb.append(">> BufferRange")
-ee('vim.current.buffer.range(1, 2, 3)')
-cb.append("> BufMap")
-cb.append(">> BufMapItem")
-ee('vim.buffers[100000000]')
-number_test('vim.buffers[%s]', natural=True)
-cb.append("> Current")
-cb.append(">> CurrentGetattr")
-ee('vim.current.xxx')
-cb.append(">> CurrentSetattr")
-ee('vim.current.line = True')
-ee('vim.current.buffer = True')
-ee('vim.current.window = True')
-ee('vim.current.tabpage = True')
-ee('vim.current.xxx = True')
-del d
-del ned
-del dl
-del l
-del ll
-del nel
-del f
-del fd
-del fdel
-del subexpr_test
-del stringtochars_test
-del Mapping
-del convertfrompyobject_test
-del convertfrompymapping_test
-del iter_test
-del number_test
-del FailingTrue
-del FailingIter
-del FailingIterNext
-del FailingIterNextN
-del FailingMapping
-del FailingMappingKey
-del FailingList
-del NoArgsCall
-del FailingCall
-del FailingNumber
-EOF
-:delfunction F
-:"
-:" Test import
-py << EOF
-sys.path.insert(0, os.path.join(os.getcwd(), 'python_before'))
-sys.path.append(os.path.join(os.getcwd(), 'python_after'))
-vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
-l = []
-def callback(path):
- l.append(path[-len('/testdir'):].replace(os.path.sep, '/'))
-vim.foreach_rtp(callback)
-cb.append(repr(l))
-del l
-def callback(path):
- return path[-len('/testdir'):].replace(os.path.sep, '/')
-cb.append(repr(vim.foreach_rtp(callback)))
-del callback
-from module import dir as d
-from modulex import ddir
-cb.append(d + ',' + ddir)
-import before
-cb.append(before.dir)
-import after
-cb.append(after.dir)
-import topmodule as tm
-import topmodule.submodule as tms
-import topmodule.submodule.subsubmodule.subsubsubmodule as tmsss
-cb.append(tm.__file__.replace('.pyc', '.py').replace(os.path.sep, '/')[-len('modulex/topmodule/__init__.py'):])
-cb.append(tms.__file__.replace('.pyc', '.py').replace(os.path.sep, '/')[-len('modulex/topmodule/submodule/__init__.py'):])
-cb.append(tmsss.__file__.replace('.pyc', '.py').replace(os.path.sep, '/')[-len('modulex/topmodule/submodule/subsubmodule/subsubsubmodule.py'):])
-del before
-del after
-del d
-del ddir
-del tm
-del tms
-del tmsss
-EOF
-:"
-:" Test exceptions
-:fun Exe(e)
-: execute a:e
-:endfun
-py << EOF
-Exe = vim.bindeval('function("Exe")')
-ee('vim.command("throw \'abcN\'")')
-ee('Exe("throw \'def\'")')
-ee('vim.eval("Exe(\'throw \'\'ghi\'\'\')")')
-ee('vim.eval("Exe(\'echoerr \'\'jkl\'\'\')")')
-ee('vim.eval("Exe(\'xxx_non_existent_command_xxx\')")')
-ee('vim.eval("xxx_unknown_function_xxx()")')
-ee('vim.bindeval("Exe(\'xxx_non_existent_command_xxx\')")')
-del Exe
-EOF
-:delfunction Exe
-:"
-:" Regression: interrupting vim.command propagates to next vim.command
-py << EOF
-def test_keyboard_interrupt():
- try:
- vim.command('while 1 | endwhile')
- except KeyboardInterrupt:
- cb.append('Caught KeyboardInterrupt')
- except Exception:
- cb.append('!!!!!!!! Caught exception: ' + repr(sys.exc_info))
- else:
- cb.append('!!!!!!!! No exception')
- try:
- vim.command('$ put =\'Running :put\'')
- except KeyboardInterrupt:
- cb.append('!!!!!!!! Caught KeyboardInterrupt')
- except Exception:
- cb.append('!!!!!!!! Caught exception: ' + repr(sys.exc_info))
- else:
- cb.append('No exception')
-EOF
-:debuggreedy
-:call inputsave()
-:call feedkeys("s\ns\ns\ns\nq\n")
-:redir => output
-:debug silent! py test_keyboard_interrupt()
-:redir END
-:0 debuggreedy
-:call inputrestore()
-:silent $put =output
-:unlet output
-:py del test_keyboard_interrupt
-:"
-:" Cleanup
-py << EOF
-del cb
-del ee
-del sys
-del os
-del vim
-EOF
-:endfun
-:"
-:fun RunTest()
-:let checkrefs = !empty($PYTHONDUMPREFS)
-:let start = getline(1, '$')
-:for i in range(checkrefs ? 10 : 1)
-: if i != 0
-: %d _
-: call setline(1, start)
-: endif
-: call Test()
-: if i == 0
-: let result = getline(1, '$')
-: endif
-:endfor
-:if checkrefs
-: %d _
-: call setline(1, result)
-:endif
-:endfun
-:"
-:call RunTest()
-:delfunction RunTest
-:delfunction Test
-:call garbagecollect(1)
-:"
-:/^start:/,$wq! test.out
-:" vim: et ts=4 isk-=\:
-:call getchar()
-ENDTEST
-
-start:
diff --git a/src/nvim/testdir/test86.ok b/src/nvim/testdir/test86.ok
deleted file mode 100644
index 257a5ee4cd..0000000000
--- a/src/nvim/testdir/test86.ok
+++ /dev/null
@@ -1,1266 +0,0 @@
-start:
-[1, 'as''d', [1, 2, function('strlen'), {'a': 1}]]
-[1, 2, function('strlen'), {'a': 1}]
-Vim(put):E684:
-[0, 'as''d', [1, 2, function('strlen'), {'a': 1}]]
-[0, function('strlen'), [1, 2, function('strlen'), {'a': 1}]]
-1
-['-1', '0', '1', 'b', 'f']
-['asd', -1L, <vim.Function '1'>, <vim.dictionary object at >, <vim.list object at >]
-[('-1', <vim.dictionary object at >), ('0', -1L), ('1', 'asd'), ('b', <vim.list object at >), ('f', <vim.Function '1'>)]
-'-1' : {'a': 1}
-'0' : -1
-'1' : 'asd'
-'b' : [1, 2, function('strlen')]
-'f' : function('1')
-[0, function('strlen')]
-[3]
-[1, 2, function('strlen')]
-[1, 2, function('strlen')]
-1
-'asd'
-2
-True
-False
-True
-False
-['0']
-{'0': -1}
-('0', -1L)
-None
-[]
-[0, 1, 2, 3]
-[0, 1, 2, 3]
-[0, 1, 3]
-[0, 1]
-[0, 1]
-[0, 1]
-[0, 1, 2, 3]
-[0, 1, 2, 3]
-[0, 2, 3]
-[2, 3]
-[2, 3]
-[2, 3]
-[1, 3]
-[0, 2]
-[0, 1, 2, 3]
-['a', 0, 1, 2, 3]
-[0, 'b', 2, 3]
-[0, 1, 'c']
-[0, 1, 2, 3, 'd']
-[0, 1, 2, 'e', 3]
-['f', 2, 3]
-[0, 1, 'g', 2, 3]
-['h']
-[0, 1, 10, 3, 20, 5, 6, 7]
-[0, 1, 2, 3, 20, 5, 10, 7]
-[0, 1, 2, 3, 4, 5, 6, 7]
-[0, 1, 2, 3, 4, 5, 6, 7]
-[0, 1, 2, 3, 4, 5, 6, 7]
-[0, 1, 2, 3]
-[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd']
-[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}]
-[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}, 'New']
-l[1](1, 2, 3):error:('Vim:E725: Calling dict function without Dictionary: DictNew',)
-f(1, 2, 3):error:('Vim:E117: Unknown function: New',)
-[0.0, 0.0]
-KeyError
-TypeError
-TypeError
-ValueError
-TypeError
-TypeError
-KeyError
-KeyError
-d : locked:0;scope:0
-dl : locked:1;scope:0
-v: : locked:2;scope:1
-g: : locked:0;scope:2
-d:{'abc2': 1}
-dl:{'def': 1}
-l : locked:0
-ll : locked:1
-l:[0]
-ll:[1]
-[0, 1, 2]
-['a', 'b']
-['c', 1]
-['d', ['e']]
-0.0
-"\0": Vim(let):E859:
-{"\0": 1}: Vim(let):E859:
-undefined_name: Vim(let):Trace
-vim: Vim(let):E859:
-[1]
-[1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1]
-[0, 1, 2, 3]
-[2, 3, 4, 5]
-[0, 1]
-[4, 5]
-[2, 3]
-[]
-[2, 3]
-[]
-[0, 1, 2, 3, 4, 5]
-[0, 1, 2, 3, 4, 5]
-[0, 1, 2, 3, 4, 5]
-[4, 3]
-[0, 2, 4]
-[]
-Abc
-bac
-def
-bar
-jkl
-wopts iters equal: 1
-bopts iters equal: 1
->>> paste
- g/w/b:1/0/0
- g/w/b (in):1/0/0
- p/gopts1: False
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1! KeyError
- inv: 2! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 1
- W: 1:1 2:1 3:1 4:1
- B: 1:1 2:1 3:1 4:1
- del wopts3! KeyError
- del bopts3! KeyError
- G: 1
- W: 1:1 2:1 3:1 4:1
- B: 1:1 2:1 3:1 4:1
->>> previewheight
- g/w/b:1/0/0
- g/w/b (in):1/0/0
- p/gopts1: 12
- inv: 'a'! TypeError
- p/wopts1! KeyError
- inv: 'a'! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1! KeyError
- inv: 'a'! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 5
- W: 1:5 2:5 3:5 4:5
- B: 1:5 2:5 3:5 4:5
- del wopts3! KeyError
- del bopts3! KeyError
- G: 5
- W: 1:5 2:5 3:5 4:5
- B: 1:5 2:5 3:5 4:5
->>> operatorfunc
- g/w/b:1/0/0
- g/w/b (in):1/0/0
- p/gopts1: ''
- inv: 2! TypeError
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1! KeyError
- inv: 2! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 'A'
- W: 1:'A' 2:'A' 3:'A' 4:'A'
- B: 1:'A' 2:'A' 3:'A' 4:'A'
- del wopts3! KeyError
- del bopts3! KeyError
- G: 'A'
- W: 1:'A' 2:'A' 3:'A' 4:'A'
- B: 1:'A' 2:'A' 3:'A' 4:'A'
->>> number
- g/w/b:0/1/0
- g/w/b (in):0/1/0
- p/gopts1! KeyError
- inv: 0! KeyError
- gopts1! KeyError
- p/wopts1: False
- p/bopts1! KeyError
- inv: 0! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 0
- W: 1:1 2:1 3:0 4:0
- B: 1:1 2:1 3:0 4:0
- del wopts3! ValueError
- del bopts3! KeyError
- G: 0
- W: 1:1 2:1 3:0 4:0
- B: 1:1 2:1 3:0 4:0
->>> numberwidth
- g/w/b:0/1/0
- g/w/b (in):0/1/0
- p/gopts1! KeyError
- inv: -100! KeyError
- gopts1! KeyError
- p/wopts1: 8
- inv: -100! error
- p/bopts1! KeyError
- inv: -100! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 8
- W: 1:3 2:5 3:2 4:8
- B: 1:3 2:5 3:2 4:8
- del wopts3! ValueError
- del bopts3! KeyError
- G: 8
- W: 1:3 2:5 3:2 4:8
- B: 1:3 2:5 3:2 4:8
->>> colorcolumn
- g/w/b:0/1/0
- g/w/b (in):0/1/0
- p/gopts1! KeyError
- inv: 'abc4'! KeyError
- gopts1! KeyError
- p/wopts1: ''
- inv: 'abc4'! error
- p/bopts1! KeyError
- inv: 'abc4'! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: ''
- W: 1:'+2' 2:'+3' 3:'+1' 4:''
- B: 1:'+2' 2:'+3' 3:'+1' 4:''
- del wopts3! ValueError
- del bopts3! KeyError
- G: ''
- W: 1:'+2' 2:'+3' 3:'+1' 4:''
- B: 1:'+2' 2:'+3' 3:'+1' 4:''
->>> statusline
- g/w/b:1/1/0
- g/w/b (in):1/1/0
- p/gopts1: ''
- inv: 0! TypeError
- p/wopts1: None
- inv: 0! TypeError
- p/bopts1! KeyError
- inv: 0! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: '1'
- W: 1:'2' 2:'4' 3:'1' 4:'1'
- B: 1:'2' 2:'4' 3:'1' 4:'1'
- del bopts3! KeyError
- G: '1'
- W: 1:'2' 2:'1' 3:'1' 4:'1'
- B: 1:'2' 2:'1' 3:'1' 4:'1'
->>> autoindent
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 2! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: False
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
- del wopts3! KeyError
- del bopts3! ValueError
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
->>> shiftwidth
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 3! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 3! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: 8
- G: 8
- W: 1:0 2:2 3:8 4:1
- B: 1:0 2:2 3:8 4:1
- del wopts3! KeyError
- del bopts3! ValueError
- G: 8
- W: 1:0 2:2 3:8 4:1
- B: 1:0 2:2 3:8 4:1
->>> omnifunc
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 1! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 1! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: ''
- inv: 1! TypeError
- G: ''
- W: 1:'A' 2:'B' 3:'' 4:'C'
- B: 1:'A' 2:'B' 3:'' 4:'C'
- del wopts3! KeyError
- del bopts3! ValueError
- G: ''
- W: 1:'A' 2:'B' 3:'' 4:'C'
- B: 1:'A' 2:'B' 3:'' 4:'C'
->>> preserveindent
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 2! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: False
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
- del wopts3! KeyError
- del bopts3! ValueError
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
->>> path
- g/w/b:1/0/1
- g/w/b (in):1/0/1
- p/gopts1: '.,..,,'
- inv: 0! TypeError
- p/wopts1! KeyError
- inv: 0! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: None
- inv: 0! TypeError
- G: '.,,'
- W: 1:'.,,' 2:',,' 3:'.,,' 4:'.'
- B: 1:'.,,' 2:',,' 3:'.,,' 4:'.'
- del wopts3! KeyError
- G: '.,,'
- W: 1:'.,,' 2:',,' 3:'.,,' 4:'.,,'
- B: 1:'.,,' 2:',,' 3:'.,,' 4:'.,,'
-First line
-First line
-def
-First line
-Second line
-Third line
-(7, 2)
-<buffer test86.in><buffer >
-baz
-bar
-Second line
-Third line
-foo
-1:BufFilePre:1
-1:BufFilePost:1
-testdir/foo
-5:BufFilePre:5
-5:BufFilePost:5
-testdir/bar
-1:BufFilePre:1
-1:BufFilePost:1
-testdir/test86.in
-valid: b:False, cb:True
-i:<buffer test86.in>
-i2:<buffer test86.in>
-i:<buffer a>
-i3:<buffer test86.in>
-1:<buffer test86.in>=<buffer test86.in>
-8:<buffer a>=<buffer a>
-9:<buffer b>=<buffer b>
-10:<buffer c>=<buffer c>
-4
-i4:<buffer test86.in>
-i4:<buffer test86.in>
-StopIteration
-Number of tabs: 4
-Current tab pages:
- <tabpage 0>(1): 1 windows, current is <window object (unknown)>
- Windows:
- <window object (unknown)>(1): displays buffer <buffer test86.in>; cursor is at (37, 0)
- <tabpage 1>(2): 1 windows, current is <window object (unknown)>
- Windows:
- <window object (unknown)>(1): displays buffer <buffer 0>; cursor is at (1, 0)
- <tabpage 2>(3): 2 windows, current is <window object (unknown)>
- Windows:
- <window object (unknown)>(1): displays buffer <buffer a.1>; cursor is at (1, 0)
- <window object (unknown)>(2): displays buffer <buffer 1>; cursor is at (1, 0)
- <tabpage 3>(4): 4 windows, current is <window 0>
- Windows:
- <window 0>(1): displays buffer <buffer c.2>; cursor is at (1, 0)
- <window 1>(2): displays buffer <buffer b.2>; cursor is at (1, 0)
- <window 2>(3): displays buffer <buffer a.2>; cursor is at (1, 0)
- <window 3>(4): displays buffer <buffer 2>; cursor is at (1, 0)
-Number of windows in current tab page: 4
-Current tab page: <tabpage 3>
-Current window: <window 0>: <window 0> is <window 0>
-Current buffer: <buffer c.2>: <buffer c.2> is <buffer c.2> is <buffer c.2>
-ValueError at assigning foreign tab window
-Type error at assigning None to vim.current.window
-Type error at assigning None to vim.current.tabpage
-Type error at assigning None to vim.current.buffer
-Current tab page: <tabpage 2>
-Current window: <window 0>
-Current buffer: <buffer test86.in>
-Current line: 'Type error at assigning None to vim.current.buffer'
-w.valid: [True, False]
-t.valid: [True, False, True, False]
-vim.vars:Dictionary:True
-vim.options:Options:True
-vim.bindeval("{}"):Dictionary:True
-vim.bindeval("[]"):List:True
-vim.bindeval("function('tr')"):Function:True
-vim.current.buffer:Buffer:True
-vim.current.range:Range:True
-vim.current.window:Window:True
-vim.current.tabpage:TabPage:True
-current:__dir__,__members__,buffer,line,range,tabpage,window
-buffer:__dir__,__members__,append,mark,name,number,options,range,valid,vars
-window:__dir__,__members__,buffer,col,cursor,height,number,options,row,tabpage,valid,vars
-tabpage:__dir__,__members__,number,valid,vars,window,windows
-range:__dir__,__members__,append,end,start
-dictionary:__dir__,__members__,get,has_key,items,keys,locked,pop,popitem,scope,update,values
-list:__dir__,__members__,extend,locked
-function:__dir__,__members__,softspace
-output:__dir__,__members__,flush,softspace,write,writelines
-{}
-{'a': 1}
-{'a': 1}
-[]
-['a', 'b', 'c', '7']
-function('tr')
-'
-abcdef
-line :
-abcdef
-abcA
-line :
-abcB'
-['a', 'dup_a']
-['a', 'a']
-['a', 'b', 'c', 'C']
-[2, 2]
-[2, 2]
-1
-1
-function('Put')
-testdir
-test86.in
-src
-testdir/test86.in
-testdir
-test86.in
-> Output
->> OutputSetattr
-del sys.stdout.softspace:AttributeError:("can't delete OutputObject attributes",)
->>> Testing NumberToLong using sys.stdout.softspace = %s
-sys.stdout.softspace = []:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',)
-sys.stdout.softspace = None:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',)
-sys.stdout.softspace = -1:ValueError:('number must be greater or equal to zero',)
-<<< Finished
->>> Testing NumberToLong using sys.stderr.softspace = %s
-sys.stderr.softspace = []:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',)
-sys.stderr.softspace = None:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',)
-sys.stderr.softspace = -1:ValueError:('number must be greater or equal to zero',)
-<<< Finished
-sys.stdout.attr = None:AttributeError:('invalid attribute: attr',)
->> OutputWrite
-sys.stdout.write(None):TypeError:('coercing to Unicode: need string or buffer, NoneType found',)
->> OutputWriteLines
-sys.stdout.writelines(None):TypeError:("'NoneType' object is not iterable",)
-sys.stdout.writelines([1]):TypeError:('coercing to Unicode: need string or buffer, int found',)
->>> Testing *Iter* using sys.stdout.writelines(%s)
-sys.stdout.writelines(FailingIter()):NotImplementedError:('iter',)
-sys.stdout.writelines(FailingIterNext()):NotImplementedError:('next',)
-<<< Finished
-> VimCommand
->>> Testing StringToChars using vim.command(%s)
-vim.command(1):TypeError:('expected str() or unicode() instance, but got int',)
-vim.command(u"\0"):TypeError:('expected string without null bytes',)
-vim.command("\0"):TypeError:('expected string without null bytes',)
-<<< Finished
-vim.command("", 2):TypeError:('command() takes exactly one argument (2 given)',)
-> VimToPython
-> VimEval
->>> Testing StringToChars using vim.eval(%s)
-vim.eval(1):TypeError:('expected str() or unicode() instance, but got int',)
-vim.eval(u"\0"):TypeError:('expected string without null bytes',)
-vim.eval("\0"):TypeError:('expected string without null bytes',)
-<<< Finished
-vim.eval("", FailingTrue()):TypeError:('function takes exactly 1 argument (2 given)',)
-> VimEvalPy
->>> Testing StringToChars using vim.bindeval(%s)
-vim.bindeval(1):TypeError:('expected str() or unicode() instance, but got int',)
-vim.bindeval(u"\0"):TypeError:('expected string without null bytes',)
-vim.bindeval("\0"):TypeError:('expected string without null bytes',)
-<<< Finished
-vim.eval("", 2):TypeError:('function takes exactly 1 argument (2 given)',)
-> VimStrwidth
->>> Testing StringToChars using vim.strwidth(%s)
-vim.strwidth(1):TypeError:('expected str() or unicode() instance, but got int',)
-vim.strwidth(u"\0"):TypeError:('expected string without null bytes',)
-vim.strwidth("\0"):TypeError:('expected string without null bytes',)
-<<< Finished
-> VimForeachRTP
-vim.foreach_rtp(None):TypeError:("'NoneType' object is not callable",)
-vim.foreach_rtp(NoArgsCall()):TypeError:('__call__() takes exactly 1 argument (2 given)',)
-vim.foreach_rtp(FailingCall()):NotImplementedError:('call',)
-vim.foreach_rtp(int, 2):TypeError:('foreach_rtp() takes exactly one argument (2 given)',)
-> import
-import xxx_no_such_module_xxx:ImportError:('No module named xxx_no_such_module_xxx',)
-import failing_import:ImportError:('No module named failing_import',)
-import failing:NotImplementedError:()
-> Options
->> OptionsItem
-vim.options["abcQ"]:KeyError:('abcQ',)
-vim.options[""]:ValueError:('empty keys are not allowed',)
->>> Testing StringToChars using vim.options[%s]
-vim.options[1]:TypeError:('expected str() or unicode() instance, but got int',)
-vim.options[u"\0"]:TypeError:('expected string without null bytes',)
-vim.options["\0"]:TypeError:('expected string without null bytes',)
-<<< Finished
->> OptionsContains
->>> Testing StringToChars using %s in vim.options
-1 in vim.options:TypeError:('expected str() or unicode() instance, but got int',)
-u"\0" in vim.options:TypeError:('expected string without null bytes',)
-"\0" in vim.options:TypeError:('expected string without null bytes',)
-<<< Finished
-> Dictionary
->> DictionaryConstructor
-vim.Dictionary("abcI"):ValueError:('expected sequence element of size 2, but got sequence of size 1',)
->> DictionarySetattr
-del d.locked:AttributeError:('cannot delete vim.Dictionary attributes',)
-d.locked = FailingTrue():NotImplementedError:('bool',)
-vim.vvars.locked = False:TypeError:('cannot modify fixed dictionary',)
-d.scope = True:AttributeError:('cannot set attribute scope',)
-d.xxx = True:AttributeError:('cannot set attribute xxx',)
->> _DictionaryItem
-d.get("a", 2, 3):TypeError:('function takes at most 2 arguments (3 given)',)
->>> Testing StringToChars using d.get(%s)
-d.get(1):TypeError:('expected str() or unicode() instance, but got int',)
-d.get(u"\0"):TypeError:('expected string without null bytes',)
-d.get("\0"):TypeError:('expected string without null bytes',)
-<<< Finished
-d.pop("a"):KeyError:('a',)
-dl.pop("a"):error:('dictionary is locked',)
->> DictionaryContains
-"" in d:ValueError:('empty keys are not allowed',)
-0 in d:TypeError:('expected str() or unicode() instance, but got int',)
->> DictionaryIterNext
-for i in ned: ned["a"] = 1:RuntimeError:('hashtab changed during iteration',)
->> DictionaryAssItem
-dl["b"] = 1:error:('dictionary is locked',)
->>> Testing StringToChars using d[%s] = 1
-d[1] = 1:TypeError:('expected str() or unicode() instance, but got int',)
-d[u"\0"] = 1:TypeError:('expected string without null bytes',)
-d["\0"] = 1:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d["a"] = {%s : 1}
-d["a"] = {1 : 1}:TypeError:('expected str() or unicode() instance, but got int',)
-d["a"] = {u"\0" : 1}:TypeError:('expected string without null bytes',)
-d["a"] = {"\0" : 1}:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d["a"] = {"abcF" : {%s : 1}}
-d["a"] = {"abcF" : {1 : 1}}:TypeError:('expected str() or unicode() instance, but got int',)
-d["a"] = {"abcF" : {u"\0" : 1}}:TypeError:('expected string without null bytes',)
-d["a"] = {"abcF" : {"\0" : 1}}:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d["a"] = {"abcF" : Mapping({%s : 1})}
-d["a"] = {"abcF" : Mapping({1 : 1})}:TypeError:('expected str() or unicode() instance, but got int',)
-d["a"] = {"abcF" : Mapping({u"\0" : 1})}:TypeError:('expected string without null bytes',)
-d["a"] = {"abcF" : Mapping({"\0" : 1})}:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using d["a"] = {"abcF" : %s}
-d["a"] = {"abcF" : FailingIter()}:TypeError:('unable to convert FailingIter to vim structure',)
-d["a"] = {"abcF" : FailingIterNext()}:NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d["a"] = {"abcF" : %s}
-d["a"] = {"abcF" : None}:TypeError:('unable to convert NoneType to vim structure',)
-d["a"] = {"abcF" : {"": 1}}:ValueError:('empty keys are not allowed',)
-d["a"] = {"abcF" : {u"": 1}}:ValueError:('empty keys are not allowed',)
-d["a"] = {"abcF" : FailingMapping()}:NotImplementedError:('keys',)
-d["a"] = {"abcF" : FailingMappingKey()}:NotImplementedError:('getitem:mappingkey',)
-d["a"] = {"abcF" : FailingNumber()}:TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using d["a"] = Mapping({%s : 1})
-d["a"] = Mapping({1 : 1}):TypeError:('expected str() or unicode() instance, but got int',)
-d["a"] = Mapping({u"\0" : 1}):TypeError:('expected string without null bytes',)
-d["a"] = Mapping({"\0" : 1}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d["a"] = Mapping({"abcG" : {%s : 1}})
-d["a"] = Mapping({"abcG" : {1 : 1}}):TypeError:('expected str() or unicode() instance, but got int',)
-d["a"] = Mapping({"abcG" : {u"\0" : 1}}):TypeError:('expected string without null bytes',)
-d["a"] = Mapping({"abcG" : {"\0" : 1}}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d["a"] = Mapping({"abcG" : Mapping({%s : 1})})
-d["a"] = Mapping({"abcG" : Mapping({1 : 1})}):TypeError:('expected str() or unicode() instance, but got int',)
-d["a"] = Mapping({"abcG" : Mapping({u"\0" : 1})}):TypeError:('expected string without null bytes',)
-d["a"] = Mapping({"abcG" : Mapping({"\0" : 1})}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using d["a"] = Mapping({"abcG" : %s})
-d["a"] = Mapping({"abcG" : FailingIter()}):TypeError:('unable to convert FailingIter to vim structure',)
-d["a"] = Mapping({"abcG" : FailingIterNext()}):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d["a"] = Mapping({"abcG" : %s})
-d["a"] = Mapping({"abcG" : None}):TypeError:('unable to convert NoneType to vim structure',)
-d["a"] = Mapping({"abcG" : {"": 1}}):ValueError:('empty keys are not allowed',)
-d["a"] = Mapping({"abcG" : {u"": 1}}):ValueError:('empty keys are not allowed',)
-d["a"] = Mapping({"abcG" : FailingMapping()}):NotImplementedError:('keys',)
-d["a"] = Mapping({"abcG" : FailingMappingKey()}):NotImplementedError:('getitem:mappingkey',)
-d["a"] = Mapping({"abcG" : FailingNumber()}):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using d["a"] = %s
-d["a"] = FailingIter():TypeError:('unable to convert FailingIter to vim structure',)
-d["a"] = FailingIterNext():NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d["a"] = %s
-d["a"] = None:TypeError:('unable to convert NoneType to vim structure',)
-d["a"] = {"": 1}:ValueError:('empty keys are not allowed',)
-d["a"] = {u"": 1}:ValueError:('empty keys are not allowed',)
-d["a"] = FailingMapping():NotImplementedError:('keys',)
-d["a"] = FailingMappingKey():NotImplementedError:('getitem:mappingkey',)
-d["a"] = FailingNumber():TypeError:('long() argument must be a string or a number',)
-<<< Finished
->> DictionaryUpdate
->>> kwargs
->>> iter
-d.update(FailingMapping()):NotImplementedError:('keys',)
-d.update([FailingIterNext()]):NotImplementedError:('next',)
-d.update([FailingIterNextN(1)]):NotImplementedError:('next N',)
->>> Testing *Iter* using d.update(%s)
-d.update(FailingIter()):NotImplementedError:('iter',)
-d.update(FailingIterNext()):NotImplementedError:('next',)
-<<< Finished
->>> Testing StringToChars using d.update({%s : 1})
-d.update({1 : 1}):TypeError:('expected str() or unicode() instance, but got int',)
-d.update({u"\0" : 1}):TypeError:('expected string without null bytes',)
-d.update({"\0" : 1}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update({"abcF" : {%s : 1}})
-d.update({"abcF" : {1 : 1}}):TypeError:('expected str() or unicode() instance, but got int',)
-d.update({"abcF" : {u"\0" : 1}}):TypeError:('expected string without null bytes',)
-d.update({"abcF" : {"\0" : 1}}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update({"abcF" : Mapping({%s : 1})})
-d.update({"abcF" : Mapping({1 : 1})}):TypeError:('expected str() or unicode() instance, but got int',)
-d.update({"abcF" : Mapping({u"\0" : 1})}):TypeError:('expected string without null bytes',)
-d.update({"abcF" : Mapping({"\0" : 1})}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using d.update({"abcF" : %s})
-d.update({"abcF" : FailingIter()}):TypeError:('unable to convert FailingIter to vim structure',)
-d.update({"abcF" : FailingIterNext()}):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d.update({"abcF" : %s})
-d.update({"abcF" : None}):TypeError:('unable to convert NoneType to vim structure',)
-d.update({"abcF" : {"": 1}}):ValueError:('empty keys are not allowed',)
-d.update({"abcF" : {u"": 1}}):ValueError:('empty keys are not allowed',)
-d.update({"abcF" : FailingMapping()}):NotImplementedError:('keys',)
-d.update({"abcF" : FailingMappingKey()}):NotImplementedError:('getitem:mappingkey',)
-d.update({"abcF" : FailingNumber()}):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using d.update(Mapping({%s : 1}))
-d.update(Mapping({1 : 1})):TypeError:('expected str() or unicode() instance, but got int',)
-d.update(Mapping({u"\0" : 1})):TypeError:('expected string without null bytes',)
-d.update(Mapping({"\0" : 1})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update(Mapping({"abcG" : {%s : 1}}))
-d.update(Mapping({"abcG" : {1 : 1}})):TypeError:('expected str() or unicode() instance, but got int',)
-d.update(Mapping({"abcG" : {u"\0" : 1}})):TypeError:('expected string without null bytes',)
-d.update(Mapping({"abcG" : {"\0" : 1}})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update(Mapping({"abcG" : Mapping({%s : 1})}))
-d.update(Mapping({"abcG" : Mapping({1 : 1})})):TypeError:('expected str() or unicode() instance, but got int',)
-d.update(Mapping({"abcG" : Mapping({u"\0" : 1})})):TypeError:('expected string without null bytes',)
-d.update(Mapping({"abcG" : Mapping({"\0" : 1})})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using d.update(Mapping({"abcG" : %s}))
-d.update(Mapping({"abcG" : FailingIter()})):TypeError:('unable to convert FailingIter to vim structure',)
-d.update(Mapping({"abcG" : FailingIterNext()})):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d.update(Mapping({"abcG" : %s}))
-d.update(Mapping({"abcG" : None})):TypeError:('unable to convert NoneType to vim structure',)
-d.update(Mapping({"abcG" : {"": 1}})):ValueError:('empty keys are not allowed',)
-d.update(Mapping({"abcG" : {u"": 1}})):ValueError:('empty keys are not allowed',)
-d.update(Mapping({"abcG" : FailingMapping()})):NotImplementedError:('keys',)
-d.update(Mapping({"abcG" : FailingMappingKey()})):NotImplementedError:('getitem:mappingkey',)
-d.update(Mapping({"abcG" : FailingNumber()})):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using d.update(%s)
-d.update(FailingIter()):NotImplementedError:('iter',)
-d.update(FailingIterNext()):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d.update(%s)
-d.update(None):TypeError:("'NoneType' object is not iterable",)
-d.update({"": 1}):ValueError:('empty keys are not allowed',)
-d.update({u"": 1}):ValueError:('empty keys are not allowed',)
-d.update(FailingMapping()):NotImplementedError:('keys',)
-d.update(FailingMappingKey()):NotImplementedError:('getitem:mappingkey',)
-d.update(FailingNumber()):TypeError:("'FailingNumber' object is not iterable",)
-<<< Finished
->>> Testing StringToChars using d.update(((%s, 0),))
-d.update(((1, 0),)):TypeError:('expected str() or unicode() instance, but got int',)
-d.update(((u"\0", 0),)):TypeError:('expected string without null bytes',)
-d.update((("\0", 0),)):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update((("a", {%s : 1}),))
-d.update((("a", {1 : 1}),)):TypeError:('expected str() or unicode() instance, but got int',)
-d.update((("a", {u"\0" : 1}),)):TypeError:('expected string without null bytes',)
-d.update((("a", {"\0" : 1}),)):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update((("a", {"abcF" : {%s : 1}}),))
-d.update((("a", {"abcF" : {1 : 1}}),)):TypeError:('expected str() or unicode() instance, but got int',)
-d.update((("a", {"abcF" : {u"\0" : 1}}),)):TypeError:('expected string without null bytes',)
-d.update((("a", {"abcF" : {"\0" : 1}}),)):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update((("a", {"abcF" : Mapping({%s : 1})}),))
-d.update((("a", {"abcF" : Mapping({1 : 1})}),)):TypeError:('expected str() or unicode() instance, but got int',)
-d.update((("a", {"abcF" : Mapping({u"\0" : 1})}),)):TypeError:('expected string without null bytes',)
-d.update((("a", {"abcF" : Mapping({"\0" : 1})}),)):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using d.update((("a", {"abcF" : %s}),))
-d.update((("a", {"abcF" : FailingIter()}),)):TypeError:('unable to convert FailingIter to vim structure',)
-d.update((("a", {"abcF" : FailingIterNext()}),)):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d.update((("a", {"abcF" : %s}),))
-d.update((("a", {"abcF" : None}),)):TypeError:('unable to convert NoneType to vim structure',)
-d.update((("a", {"abcF" : {"": 1}}),)):ValueError:('empty keys are not allowed',)
-d.update((("a", {"abcF" : {u"": 1}}),)):ValueError:('empty keys are not allowed',)
-d.update((("a", {"abcF" : FailingMapping()}),)):NotImplementedError:('keys',)
-d.update((("a", {"abcF" : FailingMappingKey()}),)):NotImplementedError:('getitem:mappingkey',)
-d.update((("a", {"abcF" : FailingNumber()}),)):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using d.update((("a", Mapping({%s : 1})),))
-d.update((("a", Mapping({1 : 1})),)):TypeError:('expected str() or unicode() instance, but got int',)
-d.update((("a", Mapping({u"\0" : 1})),)):TypeError:('expected string without null bytes',)
-d.update((("a", Mapping({"\0" : 1})),)):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update((("a", Mapping({"abcG" : {%s : 1}})),))
-d.update((("a", Mapping({"abcG" : {1 : 1}})),)):TypeError:('expected str() or unicode() instance, but got int',)
-d.update((("a", Mapping({"abcG" : {u"\0" : 1}})),)):TypeError:('expected string without null bytes',)
-d.update((("a", Mapping({"abcG" : {"\0" : 1}})),)):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using d.update((("a", Mapping({"abcG" : Mapping({%s : 1})})),))
-d.update((("a", Mapping({"abcG" : Mapping({1 : 1})})),)):TypeError:('expected str() or unicode() instance, but got int',)
-d.update((("a", Mapping({"abcG" : Mapping({u"\0" : 1})})),)):TypeError:('expected string without null bytes',)
-d.update((("a", Mapping({"abcG" : Mapping({"\0" : 1})})),)):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using d.update((("a", Mapping({"abcG" : %s})),))
-d.update((("a", Mapping({"abcG" : FailingIter()})),)):TypeError:('unable to convert FailingIter to vim structure',)
-d.update((("a", Mapping({"abcG" : FailingIterNext()})),)):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d.update((("a", Mapping({"abcG" : %s})),))
-d.update((("a", Mapping({"abcG" : None})),)):TypeError:('unable to convert NoneType to vim structure',)
-d.update((("a", Mapping({"abcG" : {"": 1}})),)):ValueError:('empty keys are not allowed',)
-d.update((("a", Mapping({"abcG" : {u"": 1}})),)):ValueError:('empty keys are not allowed',)
-d.update((("a", Mapping({"abcG" : FailingMapping()})),)):NotImplementedError:('keys',)
-d.update((("a", Mapping({"abcG" : FailingMappingKey()})),)):NotImplementedError:('getitem:mappingkey',)
-d.update((("a", Mapping({"abcG" : FailingNumber()})),)):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using d.update((("a", %s),))
-d.update((("a", FailingIter()),)):TypeError:('unable to convert FailingIter to vim structure',)
-d.update((("a", FailingIterNext()),)):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using d.update((("a", %s),))
-d.update((("a", None),)):TypeError:('unable to convert NoneType to vim structure',)
-d.update((("a", {"": 1}),)):ValueError:('empty keys are not allowed',)
-d.update((("a", {u"": 1}),)):ValueError:('empty keys are not allowed',)
-d.update((("a", FailingMapping()),)):NotImplementedError:('keys',)
-d.update((("a", FailingMappingKey()),)):NotImplementedError:('getitem:mappingkey',)
-d.update((("a", FailingNumber()),)):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->> DictionaryPopItem
-d.popitem(1, 2):TypeError:('popitem() takes no arguments (2 given)',)
->> DictionaryHasKey
-d.has_key():TypeError:('has_key() takes exactly one argument (0 given)',)
-> List
->> ListConstructor
-vim.List(1, 2):TypeError:('function takes at most 1 argument (2 given)',)
-vim.List(a=1):TypeError:('list constructor does not accept keyword arguments',)
->>> Testing *Iter* using vim.List(%s)
-vim.List(FailingIter()):NotImplementedError:('iter',)
-vim.List(FailingIterNext()):NotImplementedError:('next',)
-<<< Finished
->>> Testing StringToChars using vim.List([{%s : 1}])
-vim.List([{1 : 1}]):TypeError:('expected str() or unicode() instance, but got int',)
-vim.List([{u"\0" : 1}]):TypeError:('expected string without null bytes',)
-vim.List([{"\0" : 1}]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using vim.List([{"abcF" : {%s : 1}}])
-vim.List([{"abcF" : {1 : 1}}]):TypeError:('expected str() or unicode() instance, but got int',)
-vim.List([{"abcF" : {u"\0" : 1}}]):TypeError:('expected string without null bytes',)
-vim.List([{"abcF" : {"\0" : 1}}]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using vim.List([{"abcF" : Mapping({%s : 1})}])
-vim.List([{"abcF" : Mapping({1 : 1})}]):TypeError:('expected str() or unicode() instance, but got int',)
-vim.List([{"abcF" : Mapping({u"\0" : 1})}]):TypeError:('expected string without null bytes',)
-vim.List([{"abcF" : Mapping({"\0" : 1})}]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using vim.List([{"abcF" : %s}])
-vim.List([{"abcF" : FailingIter()}]):TypeError:('unable to convert FailingIter to vim structure',)
-vim.List([{"abcF" : FailingIterNext()}]):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using vim.List([{"abcF" : %s}])
-vim.List([{"abcF" : None}]):TypeError:('unable to convert NoneType to vim structure',)
-vim.List([{"abcF" : {"": 1}}]):ValueError:('empty keys are not allowed',)
-vim.List([{"abcF" : {u"": 1}}]):ValueError:('empty keys are not allowed',)
-vim.List([{"abcF" : FailingMapping()}]):NotImplementedError:('keys',)
-vim.List([{"abcF" : FailingMappingKey()}]):NotImplementedError:('getitem:mappingkey',)
-vim.List([{"abcF" : FailingNumber()}]):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using vim.List([Mapping({%s : 1})])
-vim.List([Mapping({1 : 1})]):TypeError:('expected str() or unicode() instance, but got int',)
-vim.List([Mapping({u"\0" : 1})]):TypeError:('expected string without null bytes',)
-vim.List([Mapping({"\0" : 1})]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using vim.List([Mapping({"abcG" : {%s : 1}})])
-vim.List([Mapping({"abcG" : {1 : 1}})]):TypeError:('expected str() or unicode() instance, but got int',)
-vim.List([Mapping({"abcG" : {u"\0" : 1}})]):TypeError:('expected string without null bytes',)
-vim.List([Mapping({"abcG" : {"\0" : 1}})]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using vim.List([Mapping({"abcG" : Mapping({%s : 1})})])
-vim.List([Mapping({"abcG" : Mapping({1 : 1})})]):TypeError:('expected str() or unicode() instance, but got int',)
-vim.List([Mapping({"abcG" : Mapping({u"\0" : 1})})]):TypeError:('expected string without null bytes',)
-vim.List([Mapping({"abcG" : Mapping({"\0" : 1})})]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using vim.List([Mapping({"abcG" : %s})])
-vim.List([Mapping({"abcG" : FailingIter()})]):TypeError:('unable to convert FailingIter to vim structure',)
-vim.List([Mapping({"abcG" : FailingIterNext()})]):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using vim.List([Mapping({"abcG" : %s})])
-vim.List([Mapping({"abcG" : None})]):TypeError:('unable to convert NoneType to vim structure',)
-vim.List([Mapping({"abcG" : {"": 1}})]):ValueError:('empty keys are not allowed',)
-vim.List([Mapping({"abcG" : {u"": 1}})]):ValueError:('empty keys are not allowed',)
-vim.List([Mapping({"abcG" : FailingMapping()})]):NotImplementedError:('keys',)
-vim.List([Mapping({"abcG" : FailingMappingKey()})]):NotImplementedError:('getitem:mappingkey',)
-vim.List([Mapping({"abcG" : FailingNumber()})]):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using vim.List([%s])
-vim.List([FailingIter()]):TypeError:('unable to convert FailingIter to vim structure',)
-vim.List([FailingIterNext()]):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using vim.List([%s])
-vim.List([None]):TypeError:('unable to convert NoneType to vim structure',)
-vim.List([{"": 1}]):ValueError:('empty keys are not allowed',)
-vim.List([{u"": 1}]):ValueError:('empty keys are not allowed',)
-vim.List([FailingMapping()]):NotImplementedError:('keys',)
-vim.List([FailingMappingKey()]):NotImplementedError:('getitem:mappingkey',)
-vim.List([FailingNumber()]):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->> ListItem
-l[1000]:IndexError:('list index out of range',)
->> ListAssItem
-ll[1] = 2:error:('list is locked',)
-l[1000] = 3:IndexError:('list index out of range',)
->> ListAssSlice
-ll[1:100] = "abcJ":error:('list is locked',)
->>> Testing *Iter* using l[:] = %s
-l[:] = FailingIter():NotImplementedError:('iter',)
-l[:] = FailingIterNext():NotImplementedError:('next',)
-<<< Finished
-nel[1:10:2] = "abcK":ValueError:('attempt to assign sequence of size greater then 2 to extended slice',)
-('a', 'b', 'c', 'O')
-nel[1:10:2] = "a":ValueError:('attempt to assign sequence of size 1 to extended slice of size 2',)
-('a', 'b', 'c', 'O')
-nel[1:1:-1] = "a":ValueError:('attempt to assign sequence of size greater then 0 to extended slice',)
-('a', 'b', 'c', 'O')
-nel[:] = FailingIterNextN(2):NotImplementedError:('next N',)
-('a', 'b', 'c', 'O')
->>> Testing StringToChars using l[:] = [{%s : 1}]
-l[:] = [{1 : 1}]:TypeError:('expected str() or unicode() instance, but got int',)
-l[:] = [{u"\0" : 1}]:TypeError:('expected string without null bytes',)
-l[:] = [{"\0" : 1}]:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l[:] = [{"abcF" : {%s : 1}}]
-l[:] = [{"abcF" : {1 : 1}}]:TypeError:('expected str() or unicode() instance, but got int',)
-l[:] = [{"abcF" : {u"\0" : 1}}]:TypeError:('expected string without null bytes',)
-l[:] = [{"abcF" : {"\0" : 1}}]:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l[:] = [{"abcF" : Mapping({%s : 1})}]
-l[:] = [{"abcF" : Mapping({1 : 1})}]:TypeError:('expected str() or unicode() instance, but got int',)
-l[:] = [{"abcF" : Mapping({u"\0" : 1})}]:TypeError:('expected string without null bytes',)
-l[:] = [{"abcF" : Mapping({"\0" : 1})}]:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using l[:] = [{"abcF" : %s}]
-l[:] = [{"abcF" : FailingIter()}]:TypeError:('unable to convert FailingIter to vim structure',)
-l[:] = [{"abcF" : FailingIterNext()}]:NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using l[:] = [{"abcF" : %s}]
-l[:] = [{"abcF" : None}]:TypeError:('unable to convert NoneType to vim structure',)
-l[:] = [{"abcF" : {"": 1}}]:ValueError:('empty keys are not allowed',)
-l[:] = [{"abcF" : {u"": 1}}]:ValueError:('empty keys are not allowed',)
-l[:] = [{"abcF" : FailingMapping()}]:NotImplementedError:('keys',)
-l[:] = [{"abcF" : FailingMappingKey()}]:NotImplementedError:('getitem:mappingkey',)
-l[:] = [{"abcF" : FailingNumber()}]:TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using l[:] = [Mapping({%s : 1})]
-l[:] = [Mapping({1 : 1})]:TypeError:('expected str() or unicode() instance, but got int',)
-l[:] = [Mapping({u"\0" : 1})]:TypeError:('expected string without null bytes',)
-l[:] = [Mapping({"\0" : 1})]:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l[:] = [Mapping({"abcG" : {%s : 1}})]
-l[:] = [Mapping({"abcG" : {1 : 1}})]:TypeError:('expected str() or unicode() instance, but got int',)
-l[:] = [Mapping({"abcG" : {u"\0" : 1}})]:TypeError:('expected string without null bytes',)
-l[:] = [Mapping({"abcG" : {"\0" : 1}})]:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l[:] = [Mapping({"abcG" : Mapping({%s : 1})})]
-l[:] = [Mapping({"abcG" : Mapping({1 : 1})})]:TypeError:('expected str() or unicode() instance, but got int',)
-l[:] = [Mapping({"abcG" : Mapping({u"\0" : 1})})]:TypeError:('expected string without null bytes',)
-l[:] = [Mapping({"abcG" : Mapping({"\0" : 1})})]:TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using l[:] = [Mapping({"abcG" : %s})]
-l[:] = [Mapping({"abcG" : FailingIter()})]:TypeError:('unable to convert FailingIter to vim structure',)
-l[:] = [Mapping({"abcG" : FailingIterNext()})]:NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using l[:] = [Mapping({"abcG" : %s})]
-l[:] = [Mapping({"abcG" : None})]:TypeError:('unable to convert NoneType to vim structure',)
-l[:] = [Mapping({"abcG" : {"": 1}})]:ValueError:('empty keys are not allowed',)
-l[:] = [Mapping({"abcG" : {u"": 1}})]:ValueError:('empty keys are not allowed',)
-l[:] = [Mapping({"abcG" : FailingMapping()})]:NotImplementedError:('keys',)
-l[:] = [Mapping({"abcG" : FailingMappingKey()})]:NotImplementedError:('getitem:mappingkey',)
-l[:] = [Mapping({"abcG" : FailingNumber()})]:TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using l[:] = [%s]
-l[:] = [FailingIter()]:TypeError:('unable to convert FailingIter to vim structure',)
-l[:] = [FailingIterNext()]:NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using l[:] = [%s]
-l[:] = [None]:TypeError:('unable to convert NoneType to vim structure',)
-l[:] = [{"": 1}]:ValueError:('empty keys are not allowed',)
-l[:] = [{u"": 1}]:ValueError:('empty keys are not allowed',)
-l[:] = [FailingMapping()]:NotImplementedError:('keys',)
-l[:] = [FailingMappingKey()]:NotImplementedError:('getitem:mappingkey',)
-l[:] = [FailingNumber()]:TypeError:('long() argument must be a string or a number',)
-<<< Finished
->> ListConcatInPlace
->>> Testing *Iter* using l.extend(%s)
-l.extend(FailingIter()):NotImplementedError:('iter',)
-l.extend(FailingIterNext()):NotImplementedError:('next',)
-<<< Finished
->>> Testing StringToChars using l.extend([{%s : 1}])
-l.extend([{1 : 1}]):TypeError:('expected str() or unicode() instance, but got int',)
-l.extend([{u"\0" : 1}]):TypeError:('expected string without null bytes',)
-l.extend([{"\0" : 1}]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l.extend([{"abcF" : {%s : 1}}])
-l.extend([{"abcF" : {1 : 1}}]):TypeError:('expected str() or unicode() instance, but got int',)
-l.extend([{"abcF" : {u"\0" : 1}}]):TypeError:('expected string without null bytes',)
-l.extend([{"abcF" : {"\0" : 1}}]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l.extend([{"abcF" : Mapping({%s : 1})}])
-l.extend([{"abcF" : Mapping({1 : 1})}]):TypeError:('expected str() or unicode() instance, but got int',)
-l.extend([{"abcF" : Mapping({u"\0" : 1})}]):TypeError:('expected string without null bytes',)
-l.extend([{"abcF" : Mapping({"\0" : 1})}]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using l.extend([{"abcF" : %s}])
-l.extend([{"abcF" : FailingIter()}]):TypeError:('unable to convert FailingIter to vim structure',)
-l.extend([{"abcF" : FailingIterNext()}]):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using l.extend([{"abcF" : %s}])
-l.extend([{"abcF" : None}]):TypeError:('unable to convert NoneType to vim structure',)
-l.extend([{"abcF" : {"": 1}}]):ValueError:('empty keys are not allowed',)
-l.extend([{"abcF" : {u"": 1}}]):ValueError:('empty keys are not allowed',)
-l.extend([{"abcF" : FailingMapping()}]):NotImplementedError:('keys',)
-l.extend([{"abcF" : FailingMappingKey()}]):NotImplementedError:('getitem:mappingkey',)
-l.extend([{"abcF" : FailingNumber()}]):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using l.extend([Mapping({%s : 1})])
-l.extend([Mapping({1 : 1})]):TypeError:('expected str() or unicode() instance, but got int',)
-l.extend([Mapping({u"\0" : 1})]):TypeError:('expected string without null bytes',)
-l.extend([Mapping({"\0" : 1})]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l.extend([Mapping({"abcG" : {%s : 1}})])
-l.extend([Mapping({"abcG" : {1 : 1}})]):TypeError:('expected str() or unicode() instance, but got int',)
-l.extend([Mapping({"abcG" : {u"\0" : 1}})]):TypeError:('expected string without null bytes',)
-l.extend([Mapping({"abcG" : {"\0" : 1}})]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using l.extend([Mapping({"abcG" : Mapping({%s : 1})})])
-l.extend([Mapping({"abcG" : Mapping({1 : 1})})]):TypeError:('expected str() or unicode() instance, but got int',)
-l.extend([Mapping({"abcG" : Mapping({u"\0" : 1})})]):TypeError:('expected string without null bytes',)
-l.extend([Mapping({"abcG" : Mapping({"\0" : 1})})]):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using l.extend([Mapping({"abcG" : %s})])
-l.extend([Mapping({"abcG" : FailingIter()})]):TypeError:('unable to convert FailingIter to vim structure',)
-l.extend([Mapping({"abcG" : FailingIterNext()})]):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using l.extend([Mapping({"abcG" : %s})])
-l.extend([Mapping({"abcG" : None})]):TypeError:('unable to convert NoneType to vim structure',)
-l.extend([Mapping({"abcG" : {"": 1}})]):ValueError:('empty keys are not allowed',)
-l.extend([Mapping({"abcG" : {u"": 1}})]):ValueError:('empty keys are not allowed',)
-l.extend([Mapping({"abcG" : FailingMapping()})]):NotImplementedError:('keys',)
-l.extend([Mapping({"abcG" : FailingMappingKey()})]):NotImplementedError:('getitem:mappingkey',)
-l.extend([Mapping({"abcG" : FailingNumber()})]):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using l.extend([%s])
-l.extend([FailingIter()]):TypeError:('unable to convert FailingIter to vim structure',)
-l.extend([FailingIterNext()]):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using l.extend([%s])
-l.extend([None]):TypeError:('unable to convert NoneType to vim structure',)
-l.extend([{"": 1}]):ValueError:('empty keys are not allowed',)
-l.extend([{u"": 1}]):ValueError:('empty keys are not allowed',)
-l.extend([FailingMapping()]):NotImplementedError:('keys',)
-l.extend([FailingMappingKey()]):NotImplementedError:('getitem:mappingkey',)
-l.extend([FailingNumber()]):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->> ListSetattr
-del l.locked:AttributeError:('cannot delete vim.List attributes',)
-l.locked = FailingTrue():NotImplementedError:('bool',)
-l.xxx = True:AttributeError:('cannot set attribute xxx',)
-> Function
->> FunctionConstructor
-vim.Function("123"):ValueError:('unnamed function 123 does not exist',)
-vim.Function("xxx_non_existent_function_xxx"):ValueError:('function xxx_non_existent_function_xxx does not exist',)
-vim.Function("xxx#non#existent#function#xxx"):NOT FAILED
->> FunctionCall
->>> Testing StringToChars using f({%s : 1})
-f({1 : 1}):TypeError:('expected str() or unicode() instance, but got int',)
-f({u"\0" : 1}):TypeError:('expected string without null bytes',)
-f({"\0" : 1}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using f({"abcF" : {%s : 1}})
-f({"abcF" : {1 : 1}}):TypeError:('expected str() or unicode() instance, but got int',)
-f({"abcF" : {u"\0" : 1}}):TypeError:('expected string without null bytes',)
-f({"abcF" : {"\0" : 1}}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using f({"abcF" : Mapping({%s : 1})})
-f({"abcF" : Mapping({1 : 1})}):TypeError:('expected str() or unicode() instance, but got int',)
-f({"abcF" : Mapping({u"\0" : 1})}):TypeError:('expected string without null bytes',)
-f({"abcF" : Mapping({"\0" : 1})}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using f({"abcF" : %s})
-f({"abcF" : FailingIter()}):TypeError:('unable to convert FailingIter to vim structure',)
-f({"abcF" : FailingIterNext()}):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using f({"abcF" : %s})
-f({"abcF" : None}):TypeError:('unable to convert NoneType to vim structure',)
-f({"abcF" : {"": 1}}):ValueError:('empty keys are not allowed',)
-f({"abcF" : {u"": 1}}):ValueError:('empty keys are not allowed',)
-f({"abcF" : FailingMapping()}):NotImplementedError:('keys',)
-f({"abcF" : FailingMappingKey()}):NotImplementedError:('getitem:mappingkey',)
-f({"abcF" : FailingNumber()}):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using f(Mapping({%s : 1}))
-f(Mapping({1 : 1})):TypeError:('expected str() or unicode() instance, but got int',)
-f(Mapping({u"\0" : 1})):TypeError:('expected string without null bytes',)
-f(Mapping({"\0" : 1})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using f(Mapping({"abcG" : {%s : 1}}))
-f(Mapping({"abcG" : {1 : 1}})):TypeError:('expected str() or unicode() instance, but got int',)
-f(Mapping({"abcG" : {u"\0" : 1}})):TypeError:('expected string without null bytes',)
-f(Mapping({"abcG" : {"\0" : 1}})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using f(Mapping({"abcG" : Mapping({%s : 1})}))
-f(Mapping({"abcG" : Mapping({1 : 1})})):TypeError:('expected str() or unicode() instance, but got int',)
-f(Mapping({"abcG" : Mapping({u"\0" : 1})})):TypeError:('expected string without null bytes',)
-f(Mapping({"abcG" : Mapping({"\0" : 1})})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using f(Mapping({"abcG" : %s}))
-f(Mapping({"abcG" : FailingIter()})):TypeError:('unable to convert FailingIter to vim structure',)
-f(Mapping({"abcG" : FailingIterNext()})):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using f(Mapping({"abcG" : %s}))
-f(Mapping({"abcG" : None})):TypeError:('unable to convert NoneType to vim structure',)
-f(Mapping({"abcG" : {"": 1}})):ValueError:('empty keys are not allowed',)
-f(Mapping({"abcG" : {u"": 1}})):ValueError:('empty keys are not allowed',)
-f(Mapping({"abcG" : FailingMapping()})):NotImplementedError:('keys',)
-f(Mapping({"abcG" : FailingMappingKey()})):NotImplementedError:('getitem:mappingkey',)
-f(Mapping({"abcG" : FailingNumber()})):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using f(%s)
-f(FailingIter()):TypeError:('unable to convert FailingIter to vim structure',)
-f(FailingIterNext()):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using f(%s)
-f(None):TypeError:('unable to convert NoneType to vim structure',)
-f({"": 1}):ValueError:('empty keys are not allowed',)
-f({u"": 1}):ValueError:('empty keys are not allowed',)
-f(FailingMapping()):NotImplementedError:('keys',)
-f(FailingMappingKey()):NotImplementedError:('getitem:mappingkey',)
-f(FailingNumber()):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using fd(self={%s : 1})
-fd(self={1 : 1}):TypeError:('expected str() or unicode() instance, but got int',)
-fd(self={u"\0" : 1}):TypeError:('expected string without null bytes',)
-fd(self={"\0" : 1}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using fd(self={"abcF" : {%s : 1}})
-fd(self={"abcF" : {1 : 1}}):TypeError:('expected str() or unicode() instance, but got int',)
-fd(self={"abcF" : {u"\0" : 1}}):TypeError:('expected string without null bytes',)
-fd(self={"abcF" : {"\0" : 1}}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using fd(self={"abcF" : Mapping({%s : 1})})
-fd(self={"abcF" : Mapping({1 : 1})}):TypeError:('expected str() or unicode() instance, but got int',)
-fd(self={"abcF" : Mapping({u"\0" : 1})}):TypeError:('expected string without null bytes',)
-fd(self={"abcF" : Mapping({"\0" : 1})}):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using fd(self={"abcF" : %s})
-fd(self={"abcF" : FailingIter()}):TypeError:('unable to convert FailingIter to vim structure',)
-fd(self={"abcF" : FailingIterNext()}):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using fd(self={"abcF" : %s})
-fd(self={"abcF" : None}):TypeError:('unable to convert NoneType to vim structure',)
-fd(self={"abcF" : {"": 1}}):ValueError:('empty keys are not allowed',)
-fd(self={"abcF" : {u"": 1}}):ValueError:('empty keys are not allowed',)
-fd(self={"abcF" : FailingMapping()}):NotImplementedError:('keys',)
-fd(self={"abcF" : FailingMappingKey()}):NotImplementedError:('getitem:mappingkey',)
-fd(self={"abcF" : FailingNumber()}):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing StringToChars using fd(self=Mapping({%s : 1}))
-fd(self=Mapping({1 : 1})):TypeError:('expected str() or unicode() instance, but got int',)
-fd(self=Mapping({u"\0" : 1})):TypeError:('expected string without null bytes',)
-fd(self=Mapping({"\0" : 1})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using fd(self=Mapping({"abcG" : {%s : 1}}))
-fd(self=Mapping({"abcG" : {1 : 1}})):TypeError:('expected str() or unicode() instance, but got int',)
-fd(self=Mapping({"abcG" : {u"\0" : 1}})):TypeError:('expected string without null bytes',)
-fd(self=Mapping({"abcG" : {"\0" : 1}})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing StringToChars using fd(self=Mapping({"abcG" : Mapping({%s : 1})}))
-fd(self=Mapping({"abcG" : Mapping({1 : 1})})):TypeError:('expected str() or unicode() instance, but got int',)
-fd(self=Mapping({"abcG" : Mapping({u"\0" : 1})})):TypeError:('expected string without null bytes',)
-fd(self=Mapping({"abcG" : Mapping({"\0" : 1})})):TypeError:('expected string without null bytes',)
-<<< Finished
->>> Testing *Iter* using fd(self=Mapping({"abcG" : %s}))
-fd(self=Mapping({"abcG" : FailingIter()})):TypeError:('unable to convert FailingIter to vim structure',)
-fd(self=Mapping({"abcG" : FailingIterNext()})):NotImplementedError:('next',)
-<<< Finished
->>> Testing ConvertFromPyObject using fd(self=Mapping({"abcG" : %s}))
-fd(self=Mapping({"abcG" : None})):TypeError:('unable to convert NoneType to vim structure',)
-fd(self=Mapping({"abcG" : {"": 1}})):ValueError:('empty keys are not allowed',)
-fd(self=Mapping({"abcG" : {u"": 1}})):ValueError:('empty keys are not allowed',)
-fd(self=Mapping({"abcG" : FailingMapping()})):NotImplementedError:('keys',)
-fd(self=Mapping({"abcG" : FailingMappingKey()})):NotImplementedError:('getitem:mappingkey',)
-fd(self=Mapping({"abcG" : FailingNumber()})):TypeError:('long() argument must be a string or a number',)
-<<< Finished
->>> Testing *Iter* using fd(self=%s)
-fd(self=FailingIter()):TypeError:('unable to convert FailingIter to vim dictionary',)
-fd(self=FailingIterNext()):TypeError:('unable to convert FailingIterNext to vim dictionary',)
-<<< Finished
->>> Testing ConvertFromPyObject using fd(self=%s)
-fd(self=None):TypeError:('unable to convert NoneType to vim dictionary',)
-fd(self={"": 1}):ValueError:('empty keys are not allowed',)
-fd(self={u"": 1}):ValueError:('empty keys are not allowed',)
-fd(self=FailingMapping()):NotImplementedError:('keys',)
-fd(self=FailingMappingKey()):NotImplementedError:('getitem:mappingkey',)
-fd(self=FailingNumber()):TypeError:('unable to convert FailingNumber to vim dictionary',)
-<<< Finished
->>> Testing ConvertFromPyMapping using fd(self=%s)
-fd(self=[]):TypeError:('unable to convert list to vim dictionary',)
-<<< Finished
-> TabPage
->> TabPageAttr
-vim.current.tabpage.xxx:AttributeError:('xxx',)
-> TabList
->> TabListItem
-vim.tabpages[1000]:IndexError:('no such tab page',)
-> Window
->> WindowAttr
-vim.current.window.xxx:AttributeError:('xxx',)
->> WindowSetattr
-vim.current.window.buffer = 0:TypeError:('readonly attribute: buffer',)
-vim.current.window.cursor = (100000000, 100000000):error:('cursor position outside buffer',)
-vim.current.window.cursor = True:TypeError:('argument must be 2-item sequence, not bool',)
->>> Testing NumberToLong using vim.current.window.height = %s
-vim.current.window.height = []:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',)
-vim.current.window.height = None:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',)
-vim.current.window.height = -1:ValueError:('number must be greater or equal to zero',)
-<<< Finished
->>> Testing NumberToLong using vim.current.window.width = %s
-vim.current.window.width = []:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',)
-vim.current.window.width = None:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',)
-vim.current.window.width = -1:ValueError:('number must be greater or equal to zero',)
-<<< Finished
-vim.current.window.xxxxxx = True:AttributeError:('xxxxxx',)
-> WinList
->> WinListItem
-vim.windows[1000]:IndexError:('no such window',)
-> Buffer
->> StringToLine (indirect)
-vim.current.buffer[0] = u"\na":error:('string cannot contain newlines',)
-vim.current.buffer[0] = "\na":error:('string cannot contain newlines',)
->> SetBufferLine (indirect)
-vim.current.buffer[0] = True:TypeError:('bad argument type for built-in operation',)
->> SetBufferLineList (indirect)
-vim.current.buffer[:] = True:TypeError:('bad argument type for built-in operation',)
-vim.current.buffer[:] = ["\na", "bc"]:error:('string cannot contain newlines',)
->> InsertBufferLines (indirect)
-vim.current.buffer.append(None):TypeError:('bad argument type for built-in operation',)
-vim.current.buffer.append(["\na", "bc"]):error:('string cannot contain newlines',)
-vim.current.buffer.append("\nbc"):error:('string cannot contain newlines',)
->> RBItem
-vim.current.buffer[100000000]:IndexError:('line number out of range',)
->> RBAsItem
-vim.current.buffer[100000000] = "":IndexError:('line number out of range',)
->> BufferAttr
-vim.current.buffer.xxx:AttributeError:('xxx',)
->> BufferSetattr
-vim.current.buffer.name = True:TypeError:('expected str() or unicode() instance, but got bool',)
-vim.current.buffer.xxx = True:AttributeError:('xxx',)
->> BufferMark
-vim.current.buffer.mark(0):TypeError:('expected str() or unicode() instance, but got int',)
-vim.current.buffer.mark("abcM"):ValueError:('mark name must be a single character',)
-vim.current.buffer.mark("!"):error:('invalid mark name',)
->> BufferRange
-vim.current.buffer.range(1, 2, 3):TypeError:('function takes exactly 2 arguments (3 given)',)
-> BufMap
->> BufMapItem
-vim.buffers[100000000]:KeyError:(100000000,)
->>> Testing NumberToLong using vim.buffers[%s]
-vim.buffers[[]]:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',)
-vim.buffers[None]:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',)
-vim.buffers[-1]:ValueError:('number must be greater then zero',)
-vim.buffers[0]:ValueError:('number must be greater then zero',)
-<<< Finished
-> Current
->> CurrentGetattr
-vim.current.xxx:AttributeError:('xxx',)
->> CurrentSetattr
-vim.current.line = True:TypeError:('bad argument type for built-in operation',)
-vim.current.buffer = True:TypeError:('expected vim.Buffer object, but got bool',)
-vim.current.window = True:TypeError:('expected vim.Window object, but got bool',)
-vim.current.tabpage = True:TypeError:('expected vim.TabPage object, but got bool',)
-vim.current.xxx = True:AttributeError:('xxx',)
-['/testdir']
-'/testdir'
-2,xx
-before
-after
-pythonx/topmodule/__init__.py
-pythonx/topmodule/submodule/__init__.py
-pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py
-vim.command("throw 'abcN'"):error:('abcN',)
-Exe("throw 'def'"):error:('def',)
-vim.eval("Exe('throw ''ghi''')"):error:('ghi',)
-vim.eval("Exe('echoerr ''jkl''')"):error:('Vim(echoerr):jkl',)
-vim.eval("Exe('xxx_non_existent_command_xxx')"):error:('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',)
-vim.eval("xxx_unknown_function_xxx()"):error:('Vim:E117: Unknown function: xxx_unknown_function_xxx',)
-vim.bindeval("Exe('xxx_non_existent_command_xxx')"):error:('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',)
-Caught KeyboardInterrupt
-Running :put
-No exception
-
diff --git a/src/nvim/testdir/test87.in b/src/nvim/testdir/test87.in
deleted file mode 100644
index 58f9ac6418..0000000000
--- a/src/nvim/testdir/test87.in
+++ /dev/null
@@ -1,1402 +0,0 @@
-Tests for various python features. vim: set ft=vim :
-
-This test is not run in Neovim(see the has('nvim') check below) because the
-python3 compatibility layer is not complete.
-
-STARTTEST
-:so small.vim
-:set noswapfile
-:if !has('python3') || has('nvim') | e! test.ok | wq! test.out | endif
-:lang C
-:fun Test()
-:py3 import vim
-:let l = []
-:py3 l=vim.bindeval('l')
-:py3 f=vim.bindeval('function("strlen")')
-:" Extending List directly with different types
-:py3 l+=[1, "as'd", [1, 2, f, {'a': 1}]]
-:$put =string(l)
-:$put =string(l[-1])
-:try
-: $put =string(l[-4])
-:catch
-: $put =v:exception[:13]
-:endtry
-:" List assignment
-:py3 l[0]=0
-:$put =string(l)
-:py3 l[-2]=f
-:$put =string(l)
-:"
-:" Extending Dictionary directly with different types
-:let d = {}
-:fun d.f()
-: return 1
-:endfun
-py3 << EOF
-d=vim.bindeval('d')
-d['1']='asd'
-d.update(b=[1, 2, f])
-d.update((('-1', {'a': 1}),))
-d.update({'0': -1})
-dk = d.keys()
-dv = d.values()
-di = d.items()
-dk.sort(key=repr)
-dv.sort(key=repr)
-di.sort(key=repr)
-EOF
-:$put =py3eval('d[''f''](self={})')
-:$put =py3eval('repr(dk)')
-:$put =substitute(py3eval('repr(dv)'),'0x\x\+','','g')
-:$put =substitute(py3eval('repr(di)'),'0x\x\+','','g')
-:for [key, Val] in sort(items(d))
-: $put =string(key) . ' : ' . string(Val)
-: unlet key Val
-:endfor
-:py3 del dk
-:py3 del di
-:py3 del dv
-:"
-:" removing items with del
-:py3 del l[2]
-:$put =string(l)
-:let l = range(8)
-:py3 l=vim.bindeval('l')
-:try
-: py3 del l[:3]
-: py3 del l[1:]
-:catch
-: $put =v:exception
-:endtry
-:$put =string(l)
-:"
-:py3 del d['-1']
-:py3 del d['f']
-:$put =string(py3eval('d.get(''b'', 1)'))
-:$put =string(py3eval('d.pop(''b'')'))
-:$put =string(py3eval('d.get(''b'', 1)'))
-:$put =string(py3eval('d.pop(''1'', 2)'))
-:$put =string(py3eval('d.pop(''1'', 2)'))
-:$put =py3eval('repr(d.has_key(''0''))')
-:$put =py3eval('repr(d.has_key(''1''))')
-:$put =py3eval('repr(''0'' in d)')
-:$put =py3eval('repr(''1'' in d)')
-:$put =py3eval('repr(list(iter(d)))')
-:$put =string(d)
-:$put =py3eval('repr(d.popitem())')
-:$put =py3eval('repr(d.get(''0''))')
-:$put =py3eval('repr(list(iter(d)))')
-:"
-:" removing items out of range: silently skip items that don't exist
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:" The following two ranges delete nothing as they match empty list:
-:py3 del l[2:1]
-:$put =string(l)
-:py3 del l[2:2]
-:$put =string(l)
-:py3 del l[2:3]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[2:4]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[2:5]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[2:6]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:" The following two ranges delete nothing as they match empty list:
-:py3 del l[-1:2]
-:$put =string(l)
-:py3 del l[-2:2]
-:$put =string(l)
-:py3 del l[-3:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[-4:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[-5:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[-6:2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[::2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[3:0:-2]
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 del l[2:4:-2]
-:$put =string(l)
-:"
-:" Slice assignment to a list
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 l[0:0]=['a']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 l[1:2]=['b']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 l[2:4]=['c']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 l[4:4]=['d']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 l[-1:2]=['e']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 l[-10:2]=['f']
-:$put =string(l)
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:py3 l[2:-10]=['g']
-:$put =string(l)
-:let l = []
-:py3 l=vim.bindeval('l')
-:py3 l[0:0]=['h']
-:$put =string(l)
-:let l = range(8)
-:py3 l=vim.bindeval('l')
-:py3 l[2:6:2] = [10, 20]
-:$put =string(l)
-:let l = range(8)
-:py3 l=vim.bindeval('l')
-:py3 l[6:2:-2] = [10, 20]
-:$put =string(l)
-:let l = range(8)
-:py3 l=vim.bindeval('l')
-:py3 l[6:2] = ()
-:$put =string(l)
-:let l = range(8)
-:py3 l=vim.bindeval('l')
-:py3 l[6:2:1] = ()
-:$put =string(l)
-:let l = range(8)
-:py3 l=vim.bindeval('l')
-:py3 l[2:2:1] = ()
-:$put =string(l)
-:"
-:" Locked variables
-:let l = [0, 1, 2, 3]
-:py3 l=vim.bindeval('l')
-:lockvar! l
-:py3 l[2]='i'
-:$put =string(l)
-:unlockvar! l
-:"
-:" Function calls
-py3 << EOF
-import sys
-import re
-
-py33_type_error_pattern = re.compile('^__call__\(\) takes (\d+) positional argument but (\d+) were given$')
-
-def ee(expr, g=globals(), l=locals()):
- cb = vim.current.buffer
- try:
- try:
- exec(expr, g, l)
- except Exception as e:
- if sys.version_info >= (3, 3) and e.__class__ is AttributeError and str(e).find('has no attribute')>=0 and not str(e).startswith("'vim."):
- cb.append(expr + ':' + repr((e.__class__, AttributeError(str(e)[str(e).rfind(" '") + 2:-1]))))
- elif sys.version_info >= (3, 3) and e.__class__ is ImportError and str(e).find('No module named \'') >= 0:
- cb.append(expr + ':' + repr((e.__class__, ImportError(str(e).replace("'", '')))))
- elif sys.version_info >= (3, 3) and e.__class__ is TypeError:
- m = py33_type_error_pattern.search(str(e))
- if m:
- msg = '__call__() takes exactly {0} positional argument ({1} given)'.format(m.group(1), m.group(2))
- cb.append(expr + ':' + repr((e.__class__, TypeError(msg))))
- else:
- cb.append(expr + ':' + repr((e.__class__, e)))
- else:
- cb.append(expr + ':' + repr((e.__class__, e)))
- else:
- cb.append(expr + ':NOT FAILED')
- except Exception as e:
- cb.append(expr + '::' + repr((e.__class__, e)))
-EOF
-:fun New(...)
-: return ['NewStart']+a:000+['NewEnd']
-:endfun
-:fun DictNew(...) dict
-: return ['DictNewStart']+a:000+['DictNewEnd', self]
-:endfun
-:let l=[function('New'), function('DictNew')]
-:py3 l=vim.bindeval('l')
-:py3 l.extend(list(l[0](1, 2, 3)))
-:$put =string(l)
-:py3 l.extend(list(l[1](1, 2, 3, self={'a': 'b'})))
-:$put =string(l)
-:py3 l+=[l[0].name]
-:$put =string(l)
-:py3 ee('l[1](1, 2, 3)')
-:py3 f=l[0]
-:delfunction New
-:py3 ee('f(1, 2, 3)')
-:let l=[0.0]
-:py3 l=vim.bindeval('l')
-:py3 l.extend([0.0])
-:$put =string(l)
-:let messages=[]
-:delfunction DictNew
-py3 <<EOF
-d=vim.bindeval('{}')
-m=vim.bindeval('messages')
-def em(expr, g=globals(), l=locals()):
- try:
- exec(expr, g, l)
- except Exception as e:
- m.extend([e.__class__.__name__])
-
-em('d["abc1"]')
-em('d["abc1"]="\\0"')
-em('d["abc1"]=vim')
-em('d[""]=1')
-em('d["a\\0b"]=1')
-em('d[b"a\\0b"]=1')
-
-em('d.pop("abc1")')
-em('d.popitem()')
-del em
-del m
-EOF
-:$put =messages
-:unlet messages
-:" locked and scope attributes
-:let d={} | let dl={} | lockvar dl
-:for s in split("d dl v: g:")
-: let name=tr(s, ':', 's')
-: execute 'py3 '.name.'=vim.bindeval("'.s.'")'
-: let toput=s.' : '.join(map(['locked', 'scope'], 'v:val.":".py3eval(name.".".v:val)'), ';')
-: $put =toput
-:endfor
-:silent! let d.abc2=1
-:silent! let dl.abc3=1
-:py3 d.locked=True
-:py3 dl.locked=False
-:silent! let d.def=1
-:silent! let dl.def=1
-:put ='d:'.string(d)
-:put ='dl:'.string(dl)
-:unlet d dl
-:
-:let l=[] | let ll=[] | lockvar ll
-:for s in split("l ll")
-: let name=tr(s, ':', 's')
-: execute 'py3 '.name.'=vim.bindeval("'.s.'")'
-: let toput=s.' : locked:'.py3eval(name.'.locked')
-: $put =toput
-:endfor
-:silent! call extend(l, [0])
-:silent! call extend(ll, [0])
-:py3 l.locked=True
-:py3 ll.locked=False
-:silent! call extend(l, [1])
-:silent! call extend(ll, [1])
-:put ='l:'.string(l)
-:put ='ll:'.string(ll)
-:unlet l ll
-:"
-:" py3eval()
-:let l=py3eval('[0, 1, 2]')
-:$put =string(l)
-:let d=py3eval('{"a": "b", "c": 1, "d": ["e"]}')
-:$put =sort(items(d))
-:let f=py3eval('0.0')
-:$put =string(f)
-:" Invalid values:
-:for e in ['"\0"', '{"\0": 1}', 'undefined_name', 'vim']
-: try
-: let v=py3eval(e)
-: catch
-: let toput=e.":\t".v:exception[:13]
-: $put =toput
-: endtry
-:endfor
-:"
-:" threading
-:let l = [0]
-:py3 l=vim.bindeval('l')
-py3 <<EOF
-import threading
-import time
-
-class T(threading.Thread):
- def __init__(self):
- threading.Thread.__init__(self)
- self.t = 0
- self.running = True
-
- def run(self):
- while self.running:
- self.t += 1
- time.sleep(0.1)
-
-t = T()
-del T
-t.start()
-EOF
-:sleep 1
-:py3 t.running = False
-:py3 t.join()
-:py3 l[0] = t.t > 8 # check if the background thread is working
-:py3 del time
-:py3 del threading
-:py3 del t
-:$put =string(l)
-:"
-:" settrace
-:let l = []
-:py3 l=vim.bindeval('l')
-py3 <<EOF
-import sys
-
-def traceit(frame, event, arg):
- global l
- if event == "line":
- l += [frame.f_lineno]
- return traceit
-
-def trace_main():
- for i in range(5):
- pass
-EOF
-:py3 sys.settrace(traceit)
-:py3 trace_main()
-:py3 sys.settrace(None)
-:py3 del traceit
-:py3 del trace_main
-:$put =string(l)
-:"
-:" Slice
-:py3 ll = vim.bindeval('[0, 1, 2, 3, 4, 5]')
-:py3 l = ll[:4]
-:$put =string(py3eval('l'))
-:py3 l = ll[2:]
-:$put =string(py3eval('l'))
-:py3 l = ll[:-4]
-:$put =string(py3eval('l'))
-:py3 l = ll[-2:]
-:$put =string(py3eval('l'))
-:py3 l = ll[2:4]
-:$put =string(py3eval('l'))
-:py3 l = ll[4:2]
-:$put =string(py3eval('l'))
-:py3 l = ll[-4:-2]
-:$put =string(py3eval('l'))
-:py3 l = ll[-2:-4]
-:$put =string(py3eval('l'))
-:py3 l = ll[:]
-:$put =string(py3eval('l'))
-:py3 l = ll[0:6]
-:$put =string(py3eval('l'))
-:py3 l = ll[-10:10]
-:$put =string(py3eval('l'))
-:py3 l = ll[4:2:-1]
-:$put =string(py3eval('l'))
-:py3 l = ll[::2]
-:$put =string(py3eval('l'))
-:py3 l = ll[4:2:1]
-:$put =string(py3eval('l'))
-:py3 del l
-:"
-:" Vars
-:let g:foo = 'bac'
-:let w:abc3 = 'def'
-:let b:baz = 'bar'
-:let t:bar = 'jkl'
-:try
-: throw "Abc"
-:catch
-: put =py3eval('vim.vvars[''exception'']')
-:endtry
-:put =py3eval('vim.vars[''foo'']')
-:put =py3eval('vim.current.window.vars[''abc3'']')
-:put =py3eval('vim.current.buffer.vars[''baz'']')
-:put =py3eval('vim.current.tabpage.vars[''bar'']')
-:"
-:" Options
-:" paste: boolean, global
-:" previewheight number, global
-:" operatorfunc: string, global
-:" number: boolean, window-local
-:" numberwidth: number, window-local
-:" colorcolumn: string, window-local
-:" statusline: string, window-local/global
-:" autoindent: boolean, buffer-local
-:" shiftwidth: number, buffer-local
-:" omnifunc: string, buffer-local
-:" preserveindent: boolean, buffer-local/global
-:" path: string, buffer-local/global
-:let g:bufs=[bufnr('%')]
-:new
-:let g:bufs+=[bufnr('%')]
-:vnew
-:let g:bufs+=[bufnr('%')]
-:wincmd j
-:vnew
-:let g:bufs+=[bufnr('%')]
-:wincmd l
-:fun RecVars(opt)
-: let gval =string(eval('&g:'.a:opt))
-: let wvals=join(map(range(1, 4), 'v:val.":".string(getwinvar(v:val, "&".a:opt))'))
-: let bvals=join(map(copy(g:bufs), 'v:val.":".string(getbufvar(v:val, "&".a:opt))'))
-: put =' G: '.gval
-: put =' W: '.wvals
-: put =' B: '.wvals
-:endfun
-py3 << EOF
-def e(s, g=globals(), l=locals()):
- try:
- exec(s, g, l)
- except Exception as e:
- vim.command('return ' + repr(e.__class__.__name__))
-
-def ev(s, g=globals(), l=locals()):
- try:
- return eval(s, g, l)
- except Exception as e:
- vim.command('let exc=' + repr(e.__class__.__name__))
- return 0
-EOF
-:fun E(s)
-: python3 e(vim.eval('a:s'))
-:endfun
-:fun Ev(s)
-: let r=py3eval('ev(vim.eval("a:s"))')
-: if exists('exc')
-: throw exc
-: endif
-: return r
-:endfun
-:py3 gopts1=vim.options
-:py3 wopts1=vim.windows[2].options
-:py3 wopts2=vim.windows[0].options
-:py3 wopts3=vim.windows[1].options
-:py3 bopts1=vim.buffers[vim.bindeval("g:bufs")[2]].options
-:py3 bopts2=vim.buffers[vim.bindeval("g:bufs")[1]].options
-:py3 bopts3=vim.buffers[vim.bindeval("g:bufs")[0]].options
-:$put ='wopts iters equal: '.py3eval('list(wopts1) == list(wopts2)')
-:$put ='bopts iters equal: '.py3eval('list(bopts1) == list(bopts2)')
-:py3 gset=set(iter(gopts1))
-:py3 wset=set(iter(wopts1))
-:py3 bset=set(iter(bopts1))
-:set path=.,..,,
-:let lst=[]
-:let lst+=[['paste', 1, 0, 1, 2, 1, 1, 0 ]]
-:let lst+=[['previewheight', 5, 1, 6, 'a', 0, 1, 0 ]]
-:let lst+=[['operatorfunc', 'A', 'B', 'C', 2, 0, 1, 0 ]]
-:let lst+=[['number', 0, 1, 1, 0, 1, 0, 1 ]]
-:let lst+=[['numberwidth', 2, 3, 5, -100, 0, 0, 1 ]]
-:let lst+=[['colorcolumn', '+1', '+2', '+3', 'abc4', 0, 0, 1 ]]
-:let lst+=[['statusline', '1', '2', '4', 0, 0, 1, 1 ]]
-:let lst+=[['autoindent', 0, 1, 1, 2, 1, 0, 2 ]]
-:let lst+=[['shiftwidth', 0, 2, 1, 3, 0, 0, 2 ]]
-:let lst+=[['omnifunc', 'A', 'B', 'C', 1, 0, 0, 2 ]]
-:let lst+=[['preserveindent', 0, 1, 1, 2, 1, 1, 2 ]]
-:let lst+=[['path', '.,,', ',,', '.', 0, 0, 1, 2 ]]
-:for [oname, oval1, oval2, oval3, invval, bool, global, local] in lst
-: py3 oname=vim.eval('oname')
-: py3 oval1=vim.bindeval('oval1')
-: py3 oval2=vim.bindeval('oval2')
-: py3 oval3=vim.bindeval('oval3')
-: if invval is 0 || invval is 1
-: py3 invval=bool(vim.bindeval('invval'))
-: else
-: py3 invval=vim.bindeval('invval')
-: endif
-: if bool
-: py3 oval1=bool(oval1)
-: py3 oval2=bool(oval2)
-: py3 oval3=bool(oval3)
-: endif
-: put ='>>> '.oname
-: $put =' g/w/b:'.py3eval('oname in gset').'/'.py3eval('oname in wset').'/'.py3eval('oname in bset')
-: $put =' g/w/b (in):'.py3eval('oname in gopts1').'/'.py3eval('oname in wopts1').'/'.py3eval('oname in bopts1')
-: for v in ['gopts1', 'wopts1', 'bopts1']
-: try
-: put =' p/'.v.': '.Ev('repr('.v.'['''.oname.'''])')
-: catch
-: put =' p/'.v.'! '.v:exception
-: endtry
-: let r=E(v.'['''.oname.''']=invval')
-: if r isnot 0
-: put =' inv: '.string(invval).'! '.r
-: endif
-: for vv in (v is# 'gopts1' ? [v] : [v, v[:-2].'2', v[:-2].'3'])
-: let val=substitute(vv, '^.opts', 'oval', '')
-: let r=E(vv.'['''.oname.''']='.val)
-: if r isnot 0
-: put =' '.vv.'! '.r
-: endif
-: endfor
-: endfor
-: call RecVars(oname)
-: for v in ['wopts3', 'bopts3']
-: let r=E('del '.v.'["'.oname.'"]')
-: if r isnot 0
-: put =' del '.v.'! '.r
-: endif
-: endfor
-: call RecVars(oname)
-:endfor
-:delfunction RecVars
-:delfunction E
-:delfunction Ev
-:py3 del ev
-:py3 del e
-:only
-:for buf in g:bufs[1:]
-: execute 'bwipeout!' buf
-:endfor
-:py3 del gopts1
-:py3 del wopts1
-:py3 del wopts2
-:py3 del wopts3
-:py3 del bopts1
-:py3 del bopts2
-:py3 del bopts3
-:py3 del oval1
-:py3 del oval2
-:py3 del oval3
-:py3 del oname
-:py3 del invval
-:"
-:" Test buffer object
-:vnew
-:put ='First line'
-:put ='Second line'
-:put ='Third line'
-:1 delete _
-:py3 b=vim.current.buffer
-:wincmd w
-:mark a
-:augroup BUFS
-: autocmd BufFilePost * python3 cb.append(vim.eval('expand("<abuf>")') + ':BufFilePost:' + vim.eval('bufnr("%")'))
-: autocmd BufFilePre * python3 cb.append(vim.eval('expand("<abuf>")') + ':BufFilePre:' + vim.eval('bufnr("%")'))
-:augroup END
-py3 << EOF
-cb = vim.current.buffer
-# Tests BufferAppend and BufferItem
-cb.append(b[0])
-# Tests BufferSlice and BufferAssSlice
-cb.append('abc5') # Will be overwritten
-cb[-1:] = b[:-2]
-# Test BufferLength and BufferAssSlice
-cb.append('def') # Will not be overwritten
-cb[len(cb):] = b[:]
-# Test BufferAssItem and BufferMark
-cb.append('ghi') # Will be overwritten
-cb[-1] = repr((len(cb) - cb.mark('a')[0], cb.mark('a')[1]))
-# Test BufferRepr
-cb.append(repr(cb) + repr(b))
-# Modify foreign buffer
-b.append('foo')
-b[0]='bar'
-b[0:0]=['baz']
-vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
-# Test assigning to name property
-import os
-old_name = cb.name
-cb.name = 'foo'
-cb.append(cb.name[-11:].replace(os.path.sep, '/'))
-b.name = 'bar'
-cb.append(b.name[-11:].replace(os.path.sep, '/'))
-cb.name = old_name
-cb.append(cb.name[-17:].replace(os.path.sep, '/'))
-del old_name
-# Test CheckBuffer
-for _b in vim.buffers:
- if _b is not cb:
- vim.command('bwipeout! ' + str(_b.number))
-del _b
-cb.append('valid: b:%s, cb:%s' % (repr(b.valid), repr(cb.valid)))
-for expr in ('b[1]','b[:] = ["A", "B"]','b[:]','b.append("abc6")'):
- try:
- exec(expr)
- except vim.error:
- pass
- else:
- # Usually a SEGV here
- # Should not happen in any case
- cb.append('No exception for ' + expr)
-vim.command('cd .')
-del b
-EOF
-:"
-:" Test vim.buffers object
-:set hidden
-:edit a
-:buffer #
-:edit b
-:buffer #
-:edit c
-:buffer #
-py3 << EOF
-# Check GCing iterator that was not fully exhausted
-i = iter(vim.buffers)
-cb.append('i:' + str(next(i)))
-# and also check creating more then one iterator at a time
-i2 = iter(vim.buffers)
-cb.append('i2:' + str(next(i2)))
-cb.append('i:' + str(next(i)))
-# The following should trigger GC and not cause any problems
-del i
-del i2
-i3 = iter(vim.buffers)
-cb.append('i3:' + str(next(i3)))
-del i3
-
-prevnum = 0
-for b in vim.buffers:
- # Check buffer order
- if prevnum >= b.number:
- cb.append('!!! Buffer numbers not in strictly ascending order')
- # Check indexing: vim.buffers[number].number == number
- cb.append(str(b.number) + ':' + repr(vim.buffers[b.number]) + '=' + repr(b))
- prevnum = b.number
-del prevnum
-
-cb.append(str(len(vim.buffers)))
-
-bnums = list(map(lambda b: b.number, vim.buffers))[1:]
-
-# Test wiping out buffer with existing iterator
-i4 = iter(vim.buffers)
-cb.append('i4:' + str(next(i4)))
-vim.command('bwipeout! ' + str(bnums.pop(0)))
-try:
- next(i4)
-except vim.error:
- pass
-else:
- cb.append('!!!! No vim.error')
-i4 = iter(vim.buffers)
-vim.command('bwipeout! ' + str(bnums.pop(-1)))
-vim.command('bwipeout! ' + str(bnums.pop(-1)))
-cb.append('i4:' + str(next(i4)))
-try:
- next(i4)
-except StopIteration:
- cb.append('StopIteration')
-del i4
-del bnums
-EOF
-:"
-:" Test vim.{tabpage,window}list and vim.{tabpage,window} objects
-:tabnew 0
-:tabnew 1
-:vnew a.1
-:tabnew 2
-:vnew a.2
-:vnew b.2
-:vnew c.2
-py3 << EOF
-cb.append('Number of tabs: ' + str(len(vim.tabpages)))
-cb.append('Current tab pages:')
-
-def W(w):
- if '(unknown)' in repr(w):
- return '<window object (unknown)>'
- else:
- return repr(w)
-
-def Cursor(w, start=len(cb)):
- if w.buffer is cb:
- return repr((start - w.cursor[0], w.cursor[1]))
- else:
- return repr(w.cursor)
-
-for t in vim.tabpages:
- cb.append(' ' + repr(t) + '(' + str(t.number) + ')' + ': ' + str(len(t.windows)) + ' windows, current is ' + W(t.window))
- cb.append(' Windows:')
- for w in t.windows:
- cb.append(' ' + W(w) + '(' + str(w.number) + ')' + ': displays buffer ' + repr(w.buffer) + '; cursor is at ' + Cursor(w))
- # Other values depend on the size of the terminal, so they are checked partly:
- for attr in ('height', 'row', 'width', 'col'):
- try:
- aval = getattr(w, attr)
- if type(aval) is not int:
- raise TypeError
- if aval < 0:
- raise ValueError
- except Exception as e:
- cb.append('!!!!!! Error while getting attribute ' + attr + ': ' + e.__class__.__name__)
- del aval
- del attr
- w.cursor = (len(w.buffer), 0)
-del W
-del Cursor
-cb.append('Number of windows in current tab page: ' + str(len(vim.windows)))
-if list(vim.windows) != list(vim.current.tabpage.windows):
- cb.append('!!!!!! Windows differ')
-EOF
-:"
-:" Test vim.current
-py3 << EOF
-def H(o):
- return repr(o)
-cb.append('Current tab page: ' + repr(vim.current.tabpage))
-cb.append('Current window: ' + repr(vim.current.window) + ': ' + H(vim.current.window) + ' is ' + H(vim.current.tabpage.window))
-cb.append('Current buffer: ' + repr(vim.current.buffer) + ': ' + H(vim.current.buffer) + ' is ' + H(vim.current.window.buffer)+ ' is ' + H(vim.current.tabpage.window.buffer))
-del H
-# Assigning: fails
-try:
- vim.current.window = vim.tabpages[0].window
-except ValueError:
- cb.append('ValueError at assigning foreign tab window')
-
-for attr in ('window', 'tabpage', 'buffer'):
- try:
- setattr(vim.current, attr, None)
- except TypeError:
- cb.append('Type error at assigning None to vim.current.' + attr)
-del attr
-
-# Assigning: success
-vim.current.tabpage = vim.tabpages[-2]
-vim.current.buffer = cb
-vim.current.window = vim.windows[0]
-vim.current.window.cursor = (len(vim.current.buffer), 0)
-cb.append('Current tab page: ' + repr(vim.current.tabpage))
-cb.append('Current window: ' + repr(vim.current.window))
-cb.append('Current buffer: ' + repr(vim.current.buffer))
-cb.append('Current line: ' + repr(vim.current.line))
-ws = list(vim.windows)
-ts = list(vim.tabpages)
-for b in vim.buffers:
- if b is not cb:
- vim.command('bwipeout! ' + str(b.number))
-del b
-cb.append('w.valid: ' + repr([w.valid for w in ws]))
-cb.append('t.valid: ' + repr([t.valid for t in ts]))
-del w
-del t
-del ts
-del ws
-EOF
-:tabonly!
-:only!
-:"
-:" Test types
-py3 << EOF
-for expr, attr in (
- ('vim.vars', 'Dictionary'),
- ('vim.options', 'Options'),
- ('vim.bindeval("{}")', 'Dictionary'),
- ('vim.bindeval("[]")', 'List'),
- ('vim.bindeval("function(\'tr\')")', 'Function'),
- ('vim.current.buffer', 'Buffer'),
- ('vim.current.range', 'Range'),
- ('vim.current.window', 'Window'),
- ('vim.current.tabpage', 'TabPage'),
-):
- cb.append(expr + ':' + attr + ':' + repr(type(eval(expr)) is getattr(vim, attr)))
-del expr
-del attr
-EOF
-:"
-:" Test __dir__() method
-py3 << EOF
-for name, o in (
- ('current', vim.current),
- ('buffer', vim.current.buffer),
- ('window', vim.current.window),
- ('tabpage', vim.current.tabpage),
- ('range', vim.current.range),
- ('dictionary', vim.bindeval('{}')),
- ('list', vim.bindeval('[]')),
- ('function', vim.bindeval('function("tr")')),
- ('output', sys.stdout),
- ):
- cb.append(name + ':' + ','.join(dir(o)))
-del name
-del o
-EOF
-:"
-:" Test vim.*.__new__
-:$put =string(py3eval('vim.Dictionary({})'))
-:$put =string(py3eval('vim.Dictionary(a=1)'))
-:$put =string(py3eval('vim.Dictionary(((''a'', 1),))'))
-:$put =string(py3eval('vim.List()'))
-:$put =string(py3eval('vim.List(iter(''abc7''))'))
-:$put =string(py3eval('vim.Function(''tr'')'))
-:"
-:" Test stdout/stderr
-:redir => messages
-:py3 sys.stdout.write('abc8') ; sys.stdout.write('def')
-:py3 sys.stderr.write('abc9') ; sys.stderr.write('def')
-:py3 sys.stdout.writelines(iter('abcA'))
-:py3 sys.stderr.writelines(iter('abcB'))
-:redir END
-:$put =string(substitute(messages, '\d\+', '', 'g'))
-:" Test subclassing
-:fun Put(...)
-: $put =string(a:000)
-: return a:000
-:endfun
-py3 << EOF
-class DupDict(vim.Dictionary):
- def __setitem__(self, key, value):
- super(DupDict, self).__setitem__(key, value)
- super(DupDict, self).__setitem__('dup_' + key, value)
-dd = DupDict()
-dd['a'] = 'b'
-
-class DupList(vim.List):
- def __getitem__(self, idx):
- return [super(DupList, self).__getitem__(idx)] * 2
-
-dl = DupList()
-dl2 = DupList(iter('abcC'))
-dl.extend(dl2[0])
-
-class DupFun(vim.Function):
- def __call__(self, arg):
- return super(DupFun, self).__call__(arg, arg)
-
-df = DupFun('Put')
-EOF
-:$put =string(sort(keys(py3eval('dd'))))
-:$put =string(py3eval('dl'))
-:$put =string(py3eval('dl2'))
-:$put =string(py3eval('df(2)'))
-:$put =string(py3eval('dl') is# py3eval('dl'))
-:$put =string(py3eval('dd') is# py3eval('dd'))
-:$put =string(py3eval('df'))
-:delfunction Put
-py3 << EOF
-del DupDict
-del DupList
-del DupFun
-del dd
-del dl
-del dl2
-del df
-EOF
-:"
-:" Test chdir
-py3 << EOF
-import os
-fnamemodify = vim.Function('fnamemodify')
-cb.append(str(fnamemodify('.', ':p:h:t')))
-cb.append(vim.eval('@%'))
-os.chdir('..')
-cb.append(str(fnamemodify('.', ':p:h:t')))
-cb.append(vim.eval('@%').replace(os.path.sep, '/'))
-os.chdir('testdir')
-cb.append(str(fnamemodify('.', ':p:h:t')))
-cb.append(vim.eval('@%'))
-del fnamemodify
-EOF
-:"
-:" Test errors
-:fun F() dict
-:endfun
-:fun D()
-:endfun
-py3 << EOF
-d = vim.Dictionary()
-ned = vim.Dictionary(foo='bar', baz='abcD')
-dl = vim.Dictionary(a=1)
-dl.locked = True
-l = vim.List()
-ll = vim.List('abcE')
-ll.locked = True
-nel = vim.List('abcO')
-f = vim.Function('string')
-fd = vim.Function('F')
-fdel = vim.Function('D')
-vim.command('delfunction D')
-
-def subexpr_test(expr, name, subexprs):
- cb.append('>>> Testing %s using %s' % (name, expr))
- for subexpr in subexprs:
- ee(expr % subexpr)
- cb.append('<<< Finished')
-
-def stringtochars_test(expr):
- return subexpr_test(expr, 'StringToChars', (
- '1', # Fail type checks
- 'b"\\0"', # Fail PyString_AsStringAndSize(object, , NULL) check
- '"\\0"', # Fail PyString_AsStringAndSize(bytes, , NULL) check
- ))
-
-class Mapping(object):
- def __init__(self, d):
- self.d = d
-
- def __getitem__(self, key):
- return self.d[key]
-
- def keys(self):
- return self.d.keys()
-
- def items(self):
- return self.d.items()
-
-def convertfrompyobject_test(expr, recurse=True):
- # pydict_to_tv
- stringtochars_test(expr % '{%s : 1}')
- if recurse:
- convertfrompyobject_test(expr % '{"abcF" : %s}', False)
- # pymap_to_tv
- stringtochars_test(expr % 'Mapping({%s : 1})')
- if recurse:
- convertfrompyobject_test(expr % 'Mapping({"abcG" : %s})', False)
- # pyseq_to_tv
- iter_test(expr)
- return subexpr_test(expr, 'ConvertFromPyObject', (
- 'None', # Not conversible
- '{b"": 1}', # Empty key not allowed
- '{"": 1}', # Same, but with unicode object
- 'FailingMapping()', #
- 'FailingMappingKey()', #
- 'FailingNumber()', #
- ))
-
-def convertfrompymapping_test(expr):
- convertfrompyobject_test(expr)
- return subexpr_test(expr, 'ConvertFromPyMapping', (
- '[]',
- ))
-
-def iter_test(expr):
- return subexpr_test(expr, '*Iter*', (
- 'FailingIter()',
- 'FailingIterNext()',
- ))
-
-def number_test(expr, natural=False, unsigned=False):
- if natural:
- unsigned = True
- return subexpr_test(expr, 'NumberToLong', (
- '[]',
- 'None',
- ) + (('-1',) if unsigned else ())
- + (('0',) if natural else ()))
-
-class FailingTrue(object):
- def __bool__(self):
- raise NotImplementedError('bool')
-
-class FailingIter(object):
- def __iter__(self):
- raise NotImplementedError('iter')
-
-class FailingIterNext(object):
- def __iter__(self):
- return self
-
- def __next__(self):
- raise NotImplementedError('next')
-
-class FailingIterNextN(object):
- def __init__(self, n):
- self.n = n
-
- def __iter__(self):
- return self
-
- def __next__(self):
- if self.n:
- self.n -= 1
- return 1
- else:
- raise NotImplementedError('next N')
-
-class FailingMappingKey(object):
- def __getitem__(self, item):
- raise NotImplementedError('getitem:mappingkey')
-
- def keys(self):
- return list("abcH")
-
-class FailingMapping(object):
- def __getitem__(self):
- raise NotImplementedError('getitem:mapping')
-
- def keys(self):
- raise NotImplementedError('keys')
-
-class FailingList(list):
- def __getitem__(self, idx):
- if i == 2:
- raise NotImplementedError('getitem:list')
- else:
- return super(FailingList, self).__getitem__(idx)
-
-class NoArgsCall(object):
- def __call__(self):
- pass
-
-class FailingCall(object):
- def __call__(self, path):
- raise NotImplementedError('call')
-
-class FailingNumber(object):
- def __int__(self):
- raise NotImplementedError('int')
-
-cb.append("> Output")
-cb.append(">> OutputSetattr")
-ee('del sys.stdout.softspace')
-number_test('sys.stdout.softspace = %s', unsigned=True)
-number_test('sys.stderr.softspace = %s', unsigned=True)
-ee('sys.stdout.attr = None')
-cb.append(">> OutputWrite")
-ee('sys.stdout.write(None)')
-cb.append(">> OutputWriteLines")
-ee('sys.stdout.writelines(None)')
-ee('sys.stdout.writelines([1])')
-iter_test('sys.stdout.writelines(%s)')
-cb.append("> VimCommand")
-stringtochars_test('vim.command(%s)')
-ee('vim.command("", 2)')
-#! Not checked: vim->python exceptions translating: checked later
-cb.append("> VimToPython")
-#! Not checked: everything: needs errors in internal python functions
-cb.append("> VimEval")
-stringtochars_test('vim.eval(%s)')
-ee('vim.eval("", FailingTrue())')
-#! Not checked: everything: needs errors in internal python functions
-cb.append("> VimEvalPy")
-stringtochars_test('vim.bindeval(%s)')
-ee('vim.eval("", 2)')
-#! Not checked: vim->python exceptions translating: checked later
-cb.append("> VimStrwidth")
-stringtochars_test('vim.strwidth(%s)')
-cb.append("> VimForeachRTP")
-ee('vim.foreach_rtp(None)')
-ee('vim.foreach_rtp(NoArgsCall())')
-ee('vim.foreach_rtp(FailingCall())')
-ee('vim.foreach_rtp(int, 2)')
-cb.append('> import')
-old_rtp = vim.options['rtp']
-vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
-ee('import xxx_no_such_module_xxx')
-ee('import failing_import')
-ee('import failing')
-vim.options['rtp'] = old_rtp
-del old_rtp
-cb.append("> Options")
-cb.append(">> OptionsItem")
-ee('vim.options["abcQ"]')
-ee('vim.options[""]')
-stringtochars_test('vim.options[%s]')
-cb.append(">> OptionsContains")
-stringtochars_test('%s in vim.options')
-cb.append("> Dictionary")
-cb.append(">> DictionaryConstructor")
-ee('vim.Dictionary("abcI")')
-##! Not checked: py_dict_alloc failure
-cb.append(">> DictionarySetattr")
-ee('del d.locked')
-ee('d.locked = FailingTrue()')
-ee('vim.vvars.locked = False')
-ee('d.scope = True')
-ee('d.xxx = True')
-cb.append(">> _DictionaryItem")
-ee('d.get("a", 2, 3)')
-stringtochars_test('d.get(%s)')
-ee('d.pop("a")')
-ee('dl.pop("a")')
-cb.append(">> DictionaryContains")
-ee('"" in d')
-ee('0 in d')
-cb.append(">> DictionaryIterNext")
-ee('for i in ned: ned["a"] = 1')
-del i
-cb.append(">> DictionaryAssItem")
-ee('dl["b"] = 1')
-stringtochars_test('d[%s] = 1')
-convertfrompyobject_test('d["a"] = %s')
-cb.append(">> DictionaryUpdate")
-cb.append(">>> kwargs")
-cb.append(">>> iter")
-ee('d.update(FailingMapping())')
-ee('d.update([FailingIterNext()])')
-ee('d.update([FailingIterNextN(1)])')
-iter_test('d.update(%s)')
-convertfrompyobject_test('d.update(%s)')
-stringtochars_test('d.update(((%s, 0),))')
-convertfrompyobject_test('d.update((("a", %s),))')
-cb.append(">> DictionaryPopItem")
-ee('d.popitem(1, 2)')
-cb.append(">> DictionaryHasKey")
-ee('d.has_key()')
-cb.append("> List")
-cb.append(">> ListConstructor")
-ee('vim.List(1, 2)')
-ee('vim.List(a=1)')
-iter_test('vim.List(%s)')
-convertfrompyobject_test('vim.List([%s])')
-cb.append(">> ListItem")
-ee('l[1000]')
-cb.append(">> ListAssItem")
-ee('ll[1] = 2')
-ee('l[1000] = 3')
-cb.append(">> ListAssSlice")
-ee('ll[1:100] = "abcJ"')
-iter_test('l[:] = %s')
-ee('nel[1:10:2] = "abcK"')
-cb.append(repr(tuple(nel)))
-ee('nel[1:10:2] = "a"')
-cb.append(repr(tuple(nel)))
-ee('nel[1:1:-1] = "a"')
-cb.append(repr(tuple(nel)))
-ee('nel[:] = FailingIterNextN(2)')
-cb.append(repr(tuple(nel)))
-convertfrompyobject_test('l[:] = [%s]')
-cb.append(">> ListConcatInPlace")
-iter_test('l.extend(%s)')
-convertfrompyobject_test('l.extend([%s])')
-cb.append(">> ListSetattr")
-ee('del l.locked')
-ee('l.locked = FailingTrue()')
-ee('l.xxx = True')
-cb.append("> Function")
-cb.append(">> FunctionConstructor")
-ee('vim.Function("123")')
-ee('vim.Function("xxx_non_existent_function_xxx")')
-ee('vim.Function("xxx#non#existent#function#xxx")')
-cb.append(">> FunctionCall")
-convertfrompyobject_test('f(%s)')
-convertfrompymapping_test('fd(self=%s)')
-cb.append("> TabPage")
-cb.append(">> TabPageAttr")
-ee('vim.current.tabpage.xxx')
-cb.append("> TabList")
-cb.append(">> TabListItem")
-ee('vim.tabpages[1000]')
-cb.append("> Window")
-cb.append(">> WindowAttr")
-ee('vim.current.window.xxx')
-cb.append(">> WindowSetattr")
-ee('vim.current.window.buffer = 0')
-ee('vim.current.window.cursor = (100000000, 100000000)')
-ee('vim.current.window.cursor = True')
-number_test('vim.current.window.height = %s', unsigned=True)
-number_test('vim.current.window.width = %s', unsigned=True)
-ee('vim.current.window.xxxxxx = True')
-cb.append("> WinList")
-cb.append(">> WinListItem")
-ee('vim.windows[1000]')
-cb.append("> Buffer")
-cb.append(">> StringToLine (indirect)")
-ee('vim.current.buffer[0] = "\\na"')
-ee('vim.current.buffer[0] = b"\\na"')
-cb.append(">> SetBufferLine (indirect)")
-ee('vim.current.buffer[0] = True')
-cb.append(">> SetBufferLineList (indirect)")
-ee('vim.current.buffer[:] = True')
-ee('vim.current.buffer[:] = ["\\na", "bc"]')
-cb.append(">> InsertBufferLines (indirect)")
-ee('vim.current.buffer.append(None)')
-ee('vim.current.buffer.append(["\\na", "bc"])')
-ee('vim.current.buffer.append("\\nbc")')
-cb.append(">> RBItem")
-ee('vim.current.buffer[100000000]')
-cb.append(">> RBAsItem")
-ee('vim.current.buffer[100000000] = ""')
-cb.append(">> BufferAttr")
-ee('vim.current.buffer.xxx')
-cb.append(">> BufferSetattr")
-ee('vim.current.buffer.name = True')
-ee('vim.current.buffer.xxx = True')
-cb.append(">> BufferMark")
-ee('vim.current.buffer.mark(0)')
-ee('vim.current.buffer.mark("abcM")')
-ee('vim.current.buffer.mark("!")')
-cb.append(">> BufferRange")
-ee('vim.current.buffer.range(1, 2, 3)')
-cb.append("> BufMap")
-cb.append(">> BufMapItem")
-ee('vim.buffers[100000000]')
-number_test('vim.buffers[%s]', natural=True)
-cb.append("> Current")
-cb.append(">> CurrentGetattr")
-ee('vim.current.xxx')
-cb.append(">> CurrentSetattr")
-ee('vim.current.line = True')
-ee('vim.current.buffer = True')
-ee('vim.current.window = True')
-ee('vim.current.tabpage = True')
-ee('vim.current.xxx = True')
-del d
-del ned
-del dl
-del l
-del ll
-del nel
-del f
-del fd
-del fdel
-del subexpr_test
-del stringtochars_test
-del Mapping
-del convertfrompyobject_test
-del convertfrompymapping_test
-del iter_test
-del number_test
-del FailingTrue
-del FailingIter
-del FailingIterNext
-del FailingIterNextN
-del FailingMapping
-del FailingMappingKey
-del FailingList
-del NoArgsCall
-del FailingCall
-del FailingNumber
-EOF
-:delfunction F
-:"
-:" Test import
-py3 << EOF
-sys.path.insert(0, os.path.join(os.getcwd(), 'python_before'))
-sys.path.append(os.path.join(os.getcwd(), 'python_after'))
-vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
-l = []
-def callback(path):
- l.append(os.path.relpath(path))
-vim.foreach_rtp(callback)
-cb.append(repr(l))
-del l
-def callback(path):
- return os.path.relpath(path)
-cb.append(repr(vim.foreach_rtp(callback)))
-del callback
-from module import dir as d
-from modulex import ddir
-cb.append(d + ',' + ddir)
-import before
-cb.append(before.dir)
-import after
-cb.append(after.dir)
-import topmodule as tm
-import topmodule.submodule as tms
-import topmodule.submodule.subsubmodule.subsubsubmodule as tmsss
-cb.append(tm.__file__.replace(os.path.sep, '/')[-len('modulex/topmodule/__init__.py'):])
-cb.append(tms.__file__.replace(os.path.sep, '/')[-len('modulex/topmodule/submodule/__init__.py'):])
-cb.append(tmsss.__file__.replace(os.path.sep, '/')[-len('modulex/topmodule/submodule/subsubmodule/subsubsubmodule.py'):])
-del before
-del after
-del d
-del ddir
-del tm
-del tms
-del tmsss
-EOF
-:"
-:" Test exceptions
-:fun Exe(e)
-: execute a:e
-:endfun
-py3 << EOF
-Exe = vim.bindeval('function("Exe")')
-ee('vim.command("throw \'abcN\'")')
-ee('Exe("throw \'def\'")')
-ee('vim.eval("Exe(\'throw \'\'ghi\'\'\')")')
-ee('vim.eval("Exe(\'echoerr \'\'jkl\'\'\')")')
-ee('vim.eval("Exe(\'xxx_non_existent_command_xxx\')")')
-ee('vim.eval("xxx_unknown_function_xxx()")')
-ee('vim.bindeval("Exe(\'xxx_non_existent_command_xxx\')")')
-del Exe
-EOF
-:delfunction Exe
-:"
-:" Regression: interrupting vim.command propagates to next vim.command
-py3 << EOF
-def test_keyboard_interrupt():
- try:
- vim.command('while 1 | endwhile')
- except KeyboardInterrupt:
- cb.append('Caught KeyboardInterrupt')
- except Exception as e:
- cb.append('!!!!!!!! Caught exception: ' + repr(e))
- else:
- cb.append('!!!!!!!! No exception')
- try:
- vim.command('$ put =\'Running :put\'')
- except KeyboardInterrupt:
- cb.append('!!!!!!!! Caught KeyboardInterrupt')
- except Exception as e:
- cb.append('!!!!!!!! Caught exception: ' + repr(e))
- else:
- cb.append('No exception')
-EOF
-:debuggreedy
-:call inputsave()
-:call feedkeys("s\ns\ns\ns\nq\n")
-:redir => output
-:debug silent! py3 test_keyboard_interrupt()
-:redir END
-:0 debuggreedy
-:call inputrestore()
-:silent $put =output
-:unlet output
-:py3 del test_keyboard_interrupt
-:"
-:" Cleanup
-py3 << EOF
-del cb
-del ee
-del sys
-del os
-del vim
-EOF
-:endfun
-:"
-:fun RunTest()
-:let checkrefs = !empty($PYTHONDUMPREFS)
-:let start = getline(1, '$')
-:for i in range(checkrefs ? 10 : 1)
-: if i != 0
-: %d _
-: call setline(1, start)
-: endif
-: call Test()
-: if i == 0
-: let result = getline(1, '$')
-: endif
-:endfor
-:if checkrefs
-: %d _
-: call setline(1, result)
-:endif
-:endfun
-:"
-:call RunTest()
-:delfunction RunTest
-:delfunction Test
-:call garbagecollect(1)
-:"
-:/^start:/,$wq! test.out
-:" vim: et ts=4 isk-=\:
-:call getchar()
-ENDTEST
-
-start:
diff --git a/src/nvim/testdir/test87.ok b/src/nvim/testdir/test87.ok
deleted file mode 100644
index d1ec84c6b8..0000000000
--- a/src/nvim/testdir/test87.ok
+++ /dev/null
@@ -1,1266 +0,0 @@
-start:
-[1, 'as''d', [1, 2, function('strlen'), {'a': 1}]]
-[1, 2, function('strlen'), {'a': 1}]
-Vim(put):E684:
-[0, 'as''d', [1, 2, function('strlen'), {'a': 1}]]
-[0, function('strlen'), [1, 2, function('strlen'), {'a': 1}]]
-1
-[b'-1', b'0', b'1', b'b', b'f']
-[-1, <vim.Function '1'>, <vim.dictionary object at >, <vim.list object at >, b'asd']
-[(b'-1', <vim.dictionary object at >), (b'0', -1), (b'1', b'asd'), (b'b', <vim.list object at >), (b'f', <vim.Function '1'>)]
-'-1' : {'a': 1}
-'0' : -1
-'1' : 'asd'
-'b' : [1, 2, function('strlen')]
-'f' : function('1')
-[0, function('strlen')]
-[3]
-[1, 2, function('strlen')]
-[1, 2, function('strlen')]
-1
-'asd'
-2
-True
-False
-True
-False
-[b'0']
-{'0': -1}
-(b'0', -1)
-None
-[]
-[0, 1, 2, 3]
-[0, 1, 2, 3]
-[0, 1, 3]
-[0, 1]
-[0, 1]
-[0, 1]
-[0, 1, 2, 3]
-[0, 1, 2, 3]
-[0, 2, 3]
-[2, 3]
-[2, 3]
-[2, 3]
-[1, 3]
-[0, 2]
-[0, 1, 2, 3]
-['a', 0, 1, 2, 3]
-[0, 'b', 2, 3]
-[0, 1, 'c']
-[0, 1, 2, 3, 'd']
-[0, 1, 2, 'e', 3]
-['f', 2, 3]
-[0, 1, 'g', 2, 3]
-['h']
-[0, 1, 10, 3, 20, 5, 6, 7]
-[0, 1, 2, 3, 20, 5, 10, 7]
-[0, 1, 2, 3, 4, 5, 6, 7]
-[0, 1, 2, 3, 4, 5, 6, 7]
-[0, 1, 2, 3, 4, 5, 6, 7]
-[0, 1, 2, 3]
-[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd']
-[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}]
-[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}, 'New']
-l[1](1, 2, 3):(<class 'vim.error'>, error('Vim:E725: Calling dict function without Dictionary: DictNew',))
-f(1, 2, 3):(<class 'vim.error'>, error('Vim:E117: Unknown function: New',))
-[0.0, 0.0]
-KeyError
-TypeError
-TypeError
-ValueError
-TypeError
-TypeError
-KeyError
-KeyError
-d : locked:0;scope:0
-dl : locked:1;scope:0
-v: : locked:2;scope:1
-g: : locked:0;scope:2
-d:{'abc2': 1}
-dl:{'def': 1}
-l : locked:0
-ll : locked:1
-l:[0]
-ll:[1]
-[0, 1, 2]
-['a', 'b']
-['c', 1]
-['d', ['e']]
-0.0
-"\0": Vim(let):E859:
-{"\0": 1}: Vim(let):E859:
-undefined_name: Vim(let):Trace
-vim: Vim(let):E859:
-[1]
-[1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1]
-[0, 1, 2, 3]
-[2, 3, 4, 5]
-[0, 1]
-[4, 5]
-[2, 3]
-[]
-[2, 3]
-[]
-[0, 1, 2, 3, 4, 5]
-[0, 1, 2, 3, 4, 5]
-[0, 1, 2, 3, 4, 5]
-[4, 3]
-[0, 2, 4]
-[]
-Abc
-bac
-def
-bar
-jkl
-wopts iters equal: 1
-bopts iters equal: 1
->>> paste
- g/w/b:1/0/0
- g/w/b (in):1/0/0
- p/gopts1: False
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1! KeyError
- inv: 2! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 1
- W: 1:1 2:1 3:1 4:1
- B: 1:1 2:1 3:1 4:1
- del wopts3! KeyError
- del bopts3! KeyError
- G: 1
- W: 1:1 2:1 3:1 4:1
- B: 1:1 2:1 3:1 4:1
->>> previewheight
- g/w/b:1/0/0
- g/w/b (in):1/0/0
- p/gopts1: 12
- inv: 'a'! TypeError
- p/wopts1! KeyError
- inv: 'a'! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1! KeyError
- inv: 'a'! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 5
- W: 1:5 2:5 3:5 4:5
- B: 1:5 2:5 3:5 4:5
- del wopts3! KeyError
- del bopts3! KeyError
- G: 5
- W: 1:5 2:5 3:5 4:5
- B: 1:5 2:5 3:5 4:5
->>> operatorfunc
- g/w/b:1/0/0
- g/w/b (in):1/0/0
- p/gopts1: b''
- inv: 2! TypeError
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1! KeyError
- inv: 2! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 'A'
- W: 1:'A' 2:'A' 3:'A' 4:'A'
- B: 1:'A' 2:'A' 3:'A' 4:'A'
- del wopts3! KeyError
- del bopts3! KeyError
- G: 'A'
- W: 1:'A' 2:'A' 3:'A' 4:'A'
- B: 1:'A' 2:'A' 3:'A' 4:'A'
->>> number
- g/w/b:0/1/0
- g/w/b (in):0/1/0
- p/gopts1! KeyError
- inv: 0! KeyError
- gopts1! KeyError
- p/wopts1: False
- p/bopts1! KeyError
- inv: 0! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 0
- W: 1:1 2:1 3:0 4:0
- B: 1:1 2:1 3:0 4:0
- del wopts3! ValueError
- del bopts3! KeyError
- G: 0
- W: 1:1 2:1 3:0 4:0
- B: 1:1 2:1 3:0 4:0
->>> numberwidth
- g/w/b:0/1/0
- g/w/b (in):0/1/0
- p/gopts1! KeyError
- inv: -100! KeyError
- gopts1! KeyError
- p/wopts1: 8
- inv: -100! error
- p/bopts1! KeyError
- inv: -100! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: 8
- W: 1:3 2:5 3:2 4:8
- B: 1:3 2:5 3:2 4:8
- del wopts3! ValueError
- del bopts3! KeyError
- G: 8
- W: 1:3 2:5 3:2 4:8
- B: 1:3 2:5 3:2 4:8
->>> colorcolumn
- g/w/b:0/1/0
- g/w/b (in):0/1/0
- p/gopts1! KeyError
- inv: 'abc4'! KeyError
- gopts1! KeyError
- p/wopts1: b''
- inv: 'abc4'! error
- p/bopts1! KeyError
- inv: 'abc4'! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: ''
- W: 1:'+2' 2:'+3' 3:'+1' 4:''
- B: 1:'+2' 2:'+3' 3:'+1' 4:''
- del wopts3! ValueError
- del bopts3! KeyError
- G: ''
- W: 1:'+2' 2:'+3' 3:'+1' 4:''
- B: 1:'+2' 2:'+3' 3:'+1' 4:''
->>> statusline
- g/w/b:1/1/0
- g/w/b (in):1/1/0
- p/gopts1: b''
- inv: 0! TypeError
- p/wopts1: None
- inv: 0! TypeError
- p/bopts1! KeyError
- inv: 0! KeyError
- bopts1! KeyError
- bopts2! KeyError
- bopts3! KeyError
- G: '1'
- W: 1:'2' 2:'4' 3:'1' 4:'1'
- B: 1:'2' 2:'4' 3:'1' 4:'1'
- del bopts3! KeyError
- G: '1'
- W: 1:'2' 2:'1' 3:'1' 4:'1'
- B: 1:'2' 2:'1' 3:'1' 4:'1'
->>> autoindent
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 2! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: False
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
- del wopts3! KeyError
- del bopts3! ValueError
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
->>> shiftwidth
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 3! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 3! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: 8
- G: 8
- W: 1:0 2:2 3:8 4:1
- B: 1:0 2:2 3:8 4:1
- del wopts3! KeyError
- del bopts3! ValueError
- G: 8
- W: 1:0 2:2 3:8 4:1
- B: 1:0 2:2 3:8 4:1
->>> omnifunc
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 1! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 1! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: b''
- inv: 1! TypeError
- G: ''
- W: 1:'A' 2:'B' 3:'' 4:'C'
- B: 1:'A' 2:'B' 3:'' 4:'C'
- del wopts3! KeyError
- del bopts3! ValueError
- G: ''
- W: 1:'A' 2:'B' 3:'' 4:'C'
- B: 1:'A' 2:'B' 3:'' 4:'C'
->>> preserveindent
- g/w/b:0/0/1
- g/w/b (in):0/0/1
- p/gopts1! KeyError
- inv: 2! KeyError
- gopts1! KeyError
- p/wopts1! KeyError
- inv: 2! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: False
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
- del wopts3! KeyError
- del bopts3! ValueError
- G: 0
- W: 1:0 2:1 3:0 4:1
- B: 1:0 2:1 3:0 4:1
->>> path
- g/w/b:1/0/1
- g/w/b (in):1/0/1
- p/gopts1: b'.,..,,'
- inv: 0! TypeError
- p/wopts1! KeyError
- inv: 0! KeyError
- wopts1! KeyError
- wopts2! KeyError
- wopts3! KeyError
- p/bopts1: None
- inv: 0! TypeError
- G: '.,,'
- W: 1:'.,,' 2:',,' 3:'.,,' 4:'.'
- B: 1:'.,,' 2:',,' 3:'.,,' 4:'.'
- del wopts3! KeyError
- G: '.,,'
- W: 1:'.,,' 2:',,' 3:'.,,' 4:'.,,'
- B: 1:'.,,' 2:',,' 3:'.,,' 4:'.,,'
-First line
-First line
-def
-First line
-Second line
-Third line
-(7, 2)
-<buffer test87.in><buffer >
-baz
-bar
-Second line
-Third line
-foo
-1:BufFilePre:1
-1:BufFilePost:1
-testdir/foo
-5:BufFilePre:5
-5:BufFilePost:5
-testdir/bar
-1:BufFilePre:1
-1:BufFilePost:1
-testdir/test87.in
-valid: b:False, cb:True
-i:<buffer test87.in>
-i2:<buffer test87.in>
-i:<buffer a>
-i3:<buffer test87.in>
-1:<buffer test87.in>=<buffer test87.in>
-8:<buffer a>=<buffer a>
-9:<buffer b>=<buffer b>
-10:<buffer c>=<buffer c>
-4
-i4:<buffer test87.in>
-i4:<buffer test87.in>
-StopIteration
-Number of tabs: 4
-Current tab pages:
- <tabpage 0>(1): 1 windows, current is <window object (unknown)>
- Windows:
- <window object (unknown)>(1): displays buffer <buffer test87.in>; cursor is at (37, 0)
- <tabpage 1>(2): 1 windows, current is <window object (unknown)>
- Windows:
- <window object (unknown)>(1): displays buffer <buffer 0>; cursor is at (1, 0)
- <tabpage 2>(3): 2 windows, current is <window object (unknown)>
- Windows:
- <window object (unknown)>(1): displays buffer <buffer a.1>; cursor is at (1, 0)
- <window object (unknown)>(2): displays buffer <buffer 1>; cursor is at (1, 0)
- <tabpage 3>(4): 4 windows, current is <window 0>
- Windows:
- <window 0>(1): displays buffer <buffer c.2>; cursor is at (1, 0)
- <window 1>(2): displays buffer <buffer b.2>; cursor is at (1, 0)
- <window 2>(3): displays buffer <buffer a.2>; cursor is at (1, 0)
- <window 3>(4): displays buffer <buffer 2>; cursor is at (1, 0)
-Number of windows in current tab page: 4
-Current tab page: <tabpage 3>
-Current window: <window 0>: <window 0> is <window 0>
-Current buffer: <buffer c.2>: <buffer c.2> is <buffer c.2> is <buffer c.2>
-ValueError at assigning foreign tab window
-Type error at assigning None to vim.current.window
-Type error at assigning None to vim.current.tabpage
-Type error at assigning None to vim.current.buffer
-Current tab page: <tabpage 2>
-Current window: <window 0>
-Current buffer: <buffer test87.in>
-Current line: 'Type error at assigning None to vim.current.buffer'
-w.valid: [True, False]
-t.valid: [True, False, True, False]
-vim.vars:Dictionary:True
-vim.options:Options:True
-vim.bindeval("{}"):Dictionary:True
-vim.bindeval("[]"):List:True
-vim.bindeval("function('tr')"):Function:True
-vim.current.buffer:Buffer:True
-vim.current.range:Range:True
-vim.current.window:Window:True
-vim.current.tabpage:TabPage:True
-current:__dir__,buffer,line,range,tabpage,window
-buffer:__dir__,append,mark,name,number,options,range,valid,vars
-window:__dir__,buffer,col,cursor,height,number,options,row,tabpage,valid,vars
-tabpage:__dir__,number,valid,vars,window,windows
-range:__dir__,append,end,start
-dictionary:__dir__,get,has_key,items,keys,locked,pop,popitem,scope,update,values
-list:__dir__,extend,locked
-function:__dir__,softspace
-output:__dir__,flush,softspace,write,writelines
-{}
-{'a': 1}
-{'a': 1}
-[]
-['a', 'b', 'c', '7']
-function('tr')
-'
-abcdef
-line :
-abcdef
-abcA
-line :
-abcB'
-['a', 'dup_a']
-['a', 'a']
-['a', 'b', 'c', 'C']
-[2, 2]
-[2, 2]
-1
-1
-function('Put')
-b'testdir'
-test87.in
-b'src'
-testdir/test87.in
-b'testdir'
-test87.in
-> Output
->> OutputSetattr
-del sys.stdout.softspace:(<class 'AttributeError'>, AttributeError("can't delete OutputObject attributes",))
->>> Testing NumberToLong using sys.stdout.softspace = %s
-sys.stdout.softspace = []:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got list',))
-sys.stdout.softspace = None:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got NoneType',))
-sys.stdout.softspace = -1:(<class 'ValueError'>, ValueError('number must be greater or equal to zero',))
-<<< Finished
->>> Testing NumberToLong using sys.stderr.softspace = %s
-sys.stderr.softspace = []:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got list',))
-sys.stderr.softspace = None:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got NoneType',))
-sys.stderr.softspace = -1:(<class 'ValueError'>, ValueError('number must be greater or equal to zero',))
-<<< Finished
-sys.stdout.attr = None:(<class 'AttributeError'>, AttributeError('invalid attribute: attr',))
->> OutputWrite
-sys.stdout.write(None):(<class 'TypeError'>, TypeError("Can't convert 'NoneType' object to str implicitly",))
->> OutputWriteLines
-sys.stdout.writelines(None):(<class 'TypeError'>, TypeError("'NoneType' object is not iterable",))
-sys.stdout.writelines([1]):(<class 'TypeError'>, TypeError("Can't convert 'int' object to str implicitly",))
->>> Testing *Iter* using sys.stdout.writelines(%s)
-sys.stdout.writelines(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError('iter',))
-sys.stdout.writelines(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
-> VimCommand
->>> Testing StringToChars using vim.command(%s)
-vim.command(1):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.command(b"\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.command("\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
-vim.command("", 2):(<class 'TypeError'>, TypeError('command() takes exactly one argument (2 given)',))
-> VimToPython
-> VimEval
->>> Testing StringToChars using vim.eval(%s)
-vim.eval(1):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.eval(b"\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.eval("\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
-vim.eval("", FailingTrue()):(<class 'TypeError'>, TypeError('function takes exactly 1 argument (2 given)',))
-> VimEvalPy
->>> Testing StringToChars using vim.bindeval(%s)
-vim.bindeval(1):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.bindeval(b"\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.bindeval("\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
-vim.eval("", 2):(<class 'TypeError'>, TypeError('function takes exactly 1 argument (2 given)',))
-> VimStrwidth
->>> Testing StringToChars using vim.strwidth(%s)
-vim.strwidth(1):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.strwidth(b"\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.strwidth("\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
-> VimForeachRTP
-vim.foreach_rtp(None):(<class 'TypeError'>, TypeError("'NoneType' object is not callable",))
-vim.foreach_rtp(NoArgsCall()):(<class 'TypeError'>, TypeError('__call__() takes exactly 1 positional argument (2 given)',))
-vim.foreach_rtp(FailingCall()):(<class 'NotImplementedError'>, NotImplementedError('call',))
-vim.foreach_rtp(int, 2):(<class 'TypeError'>, TypeError('foreach_rtp() takes exactly one argument (2 given)',))
-> import
-import xxx_no_such_module_xxx:(<class 'ImportError'>, ImportError('No module named xxx_no_such_module_xxx',))
-import failing_import:(<class 'ImportError'>, ImportError('No module named failing_import',))
-import failing:(<class 'NotImplementedError'>, NotImplementedError())
-> Options
->> OptionsItem
-vim.options["abcQ"]:(<class 'KeyError'>, KeyError('abcQ',))
-vim.options[""]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
->>> Testing StringToChars using vim.options[%s]
-vim.options[1]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.options[b"\0"]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.options["\0"]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->> OptionsContains
->>> Testing StringToChars using %s in vim.options
-1 in vim.options:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-b"\0" in vim.options:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-"\0" in vim.options:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
-> Dictionary
->> DictionaryConstructor
-vim.Dictionary("abcI"):(<class 'ValueError'>, ValueError('expected sequence element of size 2, but got sequence of size 1',))
->> DictionarySetattr
-del d.locked:(<class 'AttributeError'>, AttributeError('cannot delete vim.Dictionary attributes',))
-d.locked = FailingTrue():(<class 'NotImplementedError'>, NotImplementedError('bool',))
-vim.vvars.locked = False:(<class 'TypeError'>, TypeError('cannot modify fixed dictionary',))
-d.scope = True:(<class 'AttributeError'>, AttributeError('cannot set attribute scope',))
-d.xxx = True:(<class 'AttributeError'>, AttributeError('cannot set attribute xxx',))
->> _DictionaryItem
-d.get("a", 2, 3):(<class 'TypeError'>, TypeError('function takes at most 2 arguments (3 given)',))
->>> Testing StringToChars using d.get(%s)
-d.get(1):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.get(b"\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.get("\0"):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
-d.pop("a"):(<class 'KeyError'>, KeyError('a',))
-dl.pop("a"):(<class 'vim.error'>, error('dictionary is locked',))
->> DictionaryContains
-"" in d:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-0 in d:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
->> DictionaryIterNext
-for i in ned: ned["a"] = 1:(<class 'RuntimeError'>, RuntimeError('hashtab changed during iteration',))
->> DictionaryAssItem
-dl["b"] = 1:(<class 'vim.error'>, error('dictionary is locked',))
->>> Testing StringToChars using d[%s] = 1
-d[1] = 1:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d[b"\0"] = 1:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d["\0"] = 1:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d["a"] = {%s : 1}
-d["a"] = {1 : 1}:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d["a"] = {b"\0" : 1}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d["a"] = {"\0" : 1}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d["a"] = {"abcF" : {%s : 1}}
-d["a"] = {"abcF" : {1 : 1}}:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d["a"] = {"abcF" : {b"\0" : 1}}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d["a"] = {"abcF" : {"\0" : 1}}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d["a"] = {"abcF" : Mapping({%s : 1})}
-d["a"] = {"abcF" : Mapping({1 : 1})}:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d["a"] = {"abcF" : Mapping({b"\0" : 1})}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d["a"] = {"abcF" : Mapping({"\0" : 1})}:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using d["a"] = {"abcF" : %s}
-d["a"] = {"abcF" : FailingIter()}:(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d["a"] = {"abcF" : FailingIterNext()}:(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d["a"] = {"abcF" : %s}
-d["a"] = {"abcF" : None}:(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d["a"] = {"abcF" : {b"": 1}}:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d["a"] = {"abcF" : {"": 1}}:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d["a"] = {"abcF" : FailingMapping()}:(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d["a"] = {"abcF" : FailingMappingKey()}:(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d["a"] = {"abcF" : FailingNumber()}:(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using d["a"] = Mapping({%s : 1})
-d["a"] = Mapping({1 : 1}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d["a"] = Mapping({b"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d["a"] = Mapping({"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d["a"] = Mapping({"abcG" : {%s : 1}})
-d["a"] = Mapping({"abcG" : {1 : 1}}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d["a"] = Mapping({"abcG" : {b"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d["a"] = Mapping({"abcG" : {"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d["a"] = Mapping({"abcG" : Mapping({%s : 1})})
-d["a"] = Mapping({"abcG" : Mapping({1 : 1})}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d["a"] = Mapping({"abcG" : Mapping({b"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d["a"] = Mapping({"abcG" : Mapping({"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using d["a"] = Mapping({"abcG" : %s})
-d["a"] = Mapping({"abcG" : FailingIter()}):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d["a"] = Mapping({"abcG" : FailingIterNext()}):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d["a"] = Mapping({"abcG" : %s})
-d["a"] = Mapping({"abcG" : None}):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d["a"] = Mapping({"abcG" : {b"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d["a"] = Mapping({"abcG" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d["a"] = Mapping({"abcG" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d["a"] = Mapping({"abcG" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d["a"] = Mapping({"abcG" : FailingNumber()}):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using d["a"] = %s
-d["a"] = FailingIter():(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d["a"] = FailingIterNext():(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d["a"] = %s
-d["a"] = None:(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d["a"] = {b"": 1}:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d["a"] = {"": 1}:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d["a"] = FailingMapping():(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d["a"] = FailingMappingKey():(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d["a"] = FailingNumber():(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->> DictionaryUpdate
->>> kwargs
->>> iter
-d.update(FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d.update([FailingIterNext()]):(<class 'NotImplementedError'>, NotImplementedError('next',))
-d.update([FailingIterNextN(1)]):(<class 'NotImplementedError'>, NotImplementedError('next N',))
->>> Testing *Iter* using d.update(%s)
-d.update(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError('iter',))
-d.update(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing StringToChars using d.update({%s : 1})
-d.update({1 : 1}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update({b"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update({"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update({"abcF" : {%s : 1}})
-d.update({"abcF" : {1 : 1}}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update({"abcF" : {b"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update({"abcF" : {"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update({"abcF" : Mapping({%s : 1})})
-d.update({"abcF" : Mapping({1 : 1})}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update({"abcF" : Mapping({b"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update({"abcF" : Mapping({"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using d.update({"abcF" : %s})
-d.update({"abcF" : FailingIter()}):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d.update({"abcF" : FailingIterNext()}):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d.update({"abcF" : %s})
-d.update({"abcF" : None}):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d.update({"abcF" : {b"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update({"abcF" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update({"abcF" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d.update({"abcF" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d.update({"abcF" : FailingNumber()}):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using d.update(Mapping({%s : 1}))
-d.update(Mapping({1 : 1})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update(Mapping({b"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update(Mapping({"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update(Mapping({"abcG" : {%s : 1}}))
-d.update(Mapping({"abcG" : {1 : 1}})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update(Mapping({"abcG" : {b"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update(Mapping({"abcG" : {"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update(Mapping({"abcG" : Mapping({%s : 1})}))
-d.update(Mapping({"abcG" : Mapping({1 : 1})})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update(Mapping({"abcG" : Mapping({b"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update(Mapping({"abcG" : Mapping({"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using d.update(Mapping({"abcG" : %s}))
-d.update(Mapping({"abcG" : FailingIter()})):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d.update(Mapping({"abcG" : FailingIterNext()})):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d.update(Mapping({"abcG" : %s}))
-d.update(Mapping({"abcG" : None})):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d.update(Mapping({"abcG" : {b"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update(Mapping({"abcG" : {"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update(Mapping({"abcG" : FailingMapping()})):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d.update(Mapping({"abcG" : FailingMappingKey()})):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d.update(Mapping({"abcG" : FailingNumber()})):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using d.update(%s)
-d.update(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError('iter',))
-d.update(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d.update(%s)
-d.update(None):(<class 'TypeError'>, TypeError("'NoneType' object is not iterable",))
-d.update({b"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update({"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update(FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d.update(FailingMappingKey()):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d.update(FailingNumber()):(<class 'TypeError'>, TypeError("'FailingNumber' object is not iterable",))
-<<< Finished
->>> Testing StringToChars using d.update(((%s, 0),))
-d.update(((1, 0),)):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update(((b"\0", 0),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update((("\0", 0),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update((("a", {%s : 1}),))
-d.update((("a", {1 : 1}),)):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update((("a", {b"\0" : 1}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update((("a", {"\0" : 1}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update((("a", {"abcF" : {%s : 1}}),))
-d.update((("a", {"abcF" : {1 : 1}}),)):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update((("a", {"abcF" : {b"\0" : 1}}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update((("a", {"abcF" : {"\0" : 1}}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update((("a", {"abcF" : Mapping({%s : 1})}),))
-d.update((("a", {"abcF" : Mapping({1 : 1})}),)):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update((("a", {"abcF" : Mapping({b"\0" : 1})}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update((("a", {"abcF" : Mapping({"\0" : 1})}),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using d.update((("a", {"abcF" : %s}),))
-d.update((("a", {"abcF" : FailingIter()}),)):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d.update((("a", {"abcF" : FailingIterNext()}),)):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d.update((("a", {"abcF" : %s}),))
-d.update((("a", {"abcF" : None}),)):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d.update((("a", {"abcF" : {b"": 1}}),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update((("a", {"abcF" : {"": 1}}),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update((("a", {"abcF" : FailingMapping()}),)):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d.update((("a", {"abcF" : FailingMappingKey()}),)):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d.update((("a", {"abcF" : FailingNumber()}),)):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using d.update((("a", Mapping({%s : 1})),))
-d.update((("a", Mapping({1 : 1})),)):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update((("a", Mapping({b"\0" : 1})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update((("a", Mapping({"\0" : 1})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update((("a", Mapping({"abcG" : {%s : 1}})),))
-d.update((("a", Mapping({"abcG" : {1 : 1}})),)):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update((("a", Mapping({"abcG" : {b"\0" : 1}})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update((("a", Mapping({"abcG" : {"\0" : 1}})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using d.update((("a", Mapping({"abcG" : Mapping({%s : 1})})),))
-d.update((("a", Mapping({"abcG" : Mapping({1 : 1})})),)):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-d.update((("a", Mapping({"abcG" : Mapping({b"\0" : 1})})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-d.update((("a", Mapping({"abcG" : Mapping({"\0" : 1})})),)):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using d.update((("a", Mapping({"abcG" : %s})),))
-d.update((("a", Mapping({"abcG" : FailingIter()})),)):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d.update((("a", Mapping({"abcG" : FailingIterNext()})),)):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d.update((("a", Mapping({"abcG" : %s})),))
-d.update((("a", Mapping({"abcG" : None})),)):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d.update((("a", Mapping({"abcG" : {b"": 1}})),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update((("a", Mapping({"abcG" : {"": 1}})),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update((("a", Mapping({"abcG" : FailingMapping()})),)):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d.update((("a", Mapping({"abcG" : FailingMappingKey()})),)):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d.update((("a", Mapping({"abcG" : FailingNumber()})),)):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using d.update((("a", %s),))
-d.update((("a", FailingIter()),)):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-d.update((("a", FailingIterNext()),)):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using d.update((("a", %s),))
-d.update((("a", None),)):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-d.update((("a", {b"": 1}),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update((("a", {"": 1}),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-d.update((("a", FailingMapping()),)):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-d.update((("a", FailingMappingKey()),)):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-d.update((("a", FailingNumber()),)):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->> DictionaryPopItem
-d.popitem(1, 2):(<class 'TypeError'>, TypeError('popitem() takes no arguments (2 given)',))
->> DictionaryHasKey
-d.has_key():(<class 'TypeError'>, TypeError('has_key() takes exactly one argument (0 given)',))
-> List
->> ListConstructor
-vim.List(1, 2):(<class 'TypeError'>, TypeError('function takes at most 1 argument (2 given)',))
-vim.List(a=1):(<class 'TypeError'>, TypeError('list constructor does not accept keyword arguments',))
->>> Testing *Iter* using vim.List(%s)
-vim.List(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError('iter',))
-vim.List(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing StringToChars using vim.List([{%s : 1}])
-vim.List([{1 : 1}]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.List([{b"\0" : 1}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.List([{"\0" : 1}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using vim.List([{"abcF" : {%s : 1}}])
-vim.List([{"abcF" : {1 : 1}}]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.List([{"abcF" : {b"\0" : 1}}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.List([{"abcF" : {"\0" : 1}}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using vim.List([{"abcF" : Mapping({%s : 1})}])
-vim.List([{"abcF" : Mapping({1 : 1})}]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.List([{"abcF" : Mapping({b"\0" : 1})}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.List([{"abcF" : Mapping({"\0" : 1})}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using vim.List([{"abcF" : %s}])
-vim.List([{"abcF" : FailingIter()}]):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-vim.List([{"abcF" : FailingIterNext()}]):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using vim.List([{"abcF" : %s}])
-vim.List([{"abcF" : None}]):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-vim.List([{"abcF" : {b"": 1}}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-vim.List([{"abcF" : {"": 1}}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-vim.List([{"abcF" : FailingMapping()}]):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-vim.List([{"abcF" : FailingMappingKey()}]):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-vim.List([{"abcF" : FailingNumber()}]):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using vim.List([Mapping({%s : 1})])
-vim.List([Mapping({1 : 1})]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.List([Mapping({b"\0" : 1})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.List([Mapping({"\0" : 1})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using vim.List([Mapping({"abcG" : {%s : 1}})])
-vim.List([Mapping({"abcG" : {1 : 1}})]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.List([Mapping({"abcG" : {b"\0" : 1}})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.List([Mapping({"abcG" : {"\0" : 1}})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using vim.List([Mapping({"abcG" : Mapping({%s : 1})})])
-vim.List([Mapping({"abcG" : Mapping({1 : 1})})]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.List([Mapping({"abcG" : Mapping({b"\0" : 1})})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-vim.List([Mapping({"abcG" : Mapping({"\0" : 1})})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using vim.List([Mapping({"abcG" : %s})])
-vim.List([Mapping({"abcG" : FailingIter()})]):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-vim.List([Mapping({"abcG" : FailingIterNext()})]):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using vim.List([Mapping({"abcG" : %s})])
-vim.List([Mapping({"abcG" : None})]):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-vim.List([Mapping({"abcG" : {b"": 1}})]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-vim.List([Mapping({"abcG" : {"": 1}})]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-vim.List([Mapping({"abcG" : FailingMapping()})]):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-vim.List([Mapping({"abcG" : FailingMappingKey()})]):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-vim.List([Mapping({"abcG" : FailingNumber()})]):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using vim.List([%s])
-vim.List([FailingIter()]):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-vim.List([FailingIterNext()]):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using vim.List([%s])
-vim.List([None]):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-vim.List([{b"": 1}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-vim.List([{"": 1}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-vim.List([FailingMapping()]):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-vim.List([FailingMappingKey()]):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-vim.List([FailingNumber()]):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->> ListItem
-l[1000]:(<class 'IndexError'>, IndexError('list index out of range',))
->> ListAssItem
-ll[1] = 2:(<class 'vim.error'>, error('list is locked',))
-l[1000] = 3:(<class 'IndexError'>, IndexError('list index out of range',))
->> ListAssSlice
-ll[1:100] = "abcJ":(<class 'vim.error'>, error('list is locked',))
->>> Testing *Iter* using l[:] = %s
-l[:] = FailingIter():(<class 'NotImplementedError'>, NotImplementedError('iter',))
-l[:] = FailingIterNext():(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
-nel[1:10:2] = "abcK":(<class 'ValueError'>, ValueError('attempt to assign sequence of size greater then 2 to extended slice',))
-(b'a', b'b', b'c', b'O')
-nel[1:10:2] = "a":(<class 'ValueError'>, ValueError('attempt to assign sequence of size 1 to extended slice of size 2',))
-(b'a', b'b', b'c', b'O')
-nel[1:1:-1] = "a":(<class 'ValueError'>, ValueError('attempt to assign sequence of size greater then 0 to extended slice',))
-(b'a', b'b', b'c', b'O')
-nel[:] = FailingIterNextN(2):(<class 'NotImplementedError'>, NotImplementedError('next N',))
-(b'a', b'b', b'c', b'O')
->>> Testing StringToChars using l[:] = [{%s : 1}]
-l[:] = [{1 : 1}]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l[:] = [{b"\0" : 1}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l[:] = [{"\0" : 1}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l[:] = [{"abcF" : {%s : 1}}]
-l[:] = [{"abcF" : {1 : 1}}]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l[:] = [{"abcF" : {b"\0" : 1}}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l[:] = [{"abcF" : {"\0" : 1}}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l[:] = [{"abcF" : Mapping({%s : 1})}]
-l[:] = [{"abcF" : Mapping({1 : 1})}]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l[:] = [{"abcF" : Mapping({b"\0" : 1})}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l[:] = [{"abcF" : Mapping({"\0" : 1})}]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using l[:] = [{"abcF" : %s}]
-l[:] = [{"abcF" : FailingIter()}]:(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-l[:] = [{"abcF" : FailingIterNext()}]:(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using l[:] = [{"abcF" : %s}]
-l[:] = [{"abcF" : None}]:(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-l[:] = [{"abcF" : {b"": 1}}]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l[:] = [{"abcF" : {"": 1}}]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l[:] = [{"abcF" : FailingMapping()}]:(<class 'NotImplementedError'>, NotImplementedError('keys',))
-l[:] = [{"abcF" : FailingMappingKey()}]:(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-l[:] = [{"abcF" : FailingNumber()}]:(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using l[:] = [Mapping({%s : 1})]
-l[:] = [Mapping({1 : 1})]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l[:] = [Mapping({b"\0" : 1})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l[:] = [Mapping({"\0" : 1})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l[:] = [Mapping({"abcG" : {%s : 1}})]
-l[:] = [Mapping({"abcG" : {1 : 1}})]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l[:] = [Mapping({"abcG" : {b"\0" : 1}})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l[:] = [Mapping({"abcG" : {"\0" : 1}})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l[:] = [Mapping({"abcG" : Mapping({%s : 1})})]
-l[:] = [Mapping({"abcG" : Mapping({1 : 1})})]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l[:] = [Mapping({"abcG" : Mapping({b"\0" : 1})})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l[:] = [Mapping({"abcG" : Mapping({"\0" : 1})})]:(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using l[:] = [Mapping({"abcG" : %s})]
-l[:] = [Mapping({"abcG" : FailingIter()})]:(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-l[:] = [Mapping({"abcG" : FailingIterNext()})]:(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using l[:] = [Mapping({"abcG" : %s})]
-l[:] = [Mapping({"abcG" : None})]:(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-l[:] = [Mapping({"abcG" : {b"": 1}})]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l[:] = [Mapping({"abcG" : {"": 1}})]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l[:] = [Mapping({"abcG" : FailingMapping()})]:(<class 'NotImplementedError'>, NotImplementedError('keys',))
-l[:] = [Mapping({"abcG" : FailingMappingKey()})]:(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-l[:] = [Mapping({"abcG" : FailingNumber()})]:(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using l[:] = [%s]
-l[:] = [FailingIter()]:(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-l[:] = [FailingIterNext()]:(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using l[:] = [%s]
-l[:] = [None]:(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-l[:] = [{b"": 1}]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l[:] = [{"": 1}]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l[:] = [FailingMapping()]:(<class 'NotImplementedError'>, NotImplementedError('keys',))
-l[:] = [FailingMappingKey()]:(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-l[:] = [FailingNumber()]:(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->> ListConcatInPlace
->>> Testing *Iter* using l.extend(%s)
-l.extend(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError('iter',))
-l.extend(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing StringToChars using l.extend([{%s : 1}])
-l.extend([{1 : 1}]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l.extend([{b"\0" : 1}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l.extend([{"\0" : 1}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l.extend([{"abcF" : {%s : 1}}])
-l.extend([{"abcF" : {1 : 1}}]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l.extend([{"abcF" : {b"\0" : 1}}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l.extend([{"abcF" : {"\0" : 1}}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l.extend([{"abcF" : Mapping({%s : 1})}])
-l.extend([{"abcF" : Mapping({1 : 1})}]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l.extend([{"abcF" : Mapping({b"\0" : 1})}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l.extend([{"abcF" : Mapping({"\0" : 1})}]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using l.extend([{"abcF" : %s}])
-l.extend([{"abcF" : FailingIter()}]):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-l.extend([{"abcF" : FailingIterNext()}]):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using l.extend([{"abcF" : %s}])
-l.extend([{"abcF" : None}]):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-l.extend([{"abcF" : {b"": 1}}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l.extend([{"abcF" : {"": 1}}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l.extend([{"abcF" : FailingMapping()}]):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-l.extend([{"abcF" : FailingMappingKey()}]):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-l.extend([{"abcF" : FailingNumber()}]):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using l.extend([Mapping({%s : 1})])
-l.extend([Mapping({1 : 1})]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l.extend([Mapping({b"\0" : 1})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l.extend([Mapping({"\0" : 1})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l.extend([Mapping({"abcG" : {%s : 1}})])
-l.extend([Mapping({"abcG" : {1 : 1}})]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l.extend([Mapping({"abcG" : {b"\0" : 1}})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l.extend([Mapping({"abcG" : {"\0" : 1}})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using l.extend([Mapping({"abcG" : Mapping({%s : 1})})])
-l.extend([Mapping({"abcG" : Mapping({1 : 1})})]):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-l.extend([Mapping({"abcG" : Mapping({b"\0" : 1})})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-l.extend([Mapping({"abcG" : Mapping({"\0" : 1})})]):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using l.extend([Mapping({"abcG" : %s})])
-l.extend([Mapping({"abcG" : FailingIter()})]):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-l.extend([Mapping({"abcG" : FailingIterNext()})]):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using l.extend([Mapping({"abcG" : %s})])
-l.extend([Mapping({"abcG" : None})]):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-l.extend([Mapping({"abcG" : {b"": 1}})]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l.extend([Mapping({"abcG" : {"": 1}})]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l.extend([Mapping({"abcG" : FailingMapping()})]):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-l.extend([Mapping({"abcG" : FailingMappingKey()})]):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-l.extend([Mapping({"abcG" : FailingNumber()})]):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using l.extend([%s])
-l.extend([FailingIter()]):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-l.extend([FailingIterNext()]):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using l.extend([%s])
-l.extend([None]):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-l.extend([{b"": 1}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l.extend([{"": 1}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-l.extend([FailingMapping()]):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-l.extend([FailingMappingKey()]):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-l.extend([FailingNumber()]):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->> ListSetattr
-del l.locked:(<class 'AttributeError'>, AttributeError('cannot delete vim.List attributes',))
-l.locked = FailingTrue():(<class 'NotImplementedError'>, NotImplementedError('bool',))
-l.xxx = True:(<class 'AttributeError'>, AttributeError('cannot set attribute xxx',))
-> Function
->> FunctionConstructor
-vim.Function("123"):(<class 'ValueError'>, ValueError('unnamed function 123 does not exist',))
-vim.Function("xxx_non_existent_function_xxx"):(<class 'ValueError'>, ValueError('function xxx_non_existent_function_xxx does not exist',))
-vim.Function("xxx#non#existent#function#xxx"):NOT FAILED
->> FunctionCall
->>> Testing StringToChars using f({%s : 1})
-f({1 : 1}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-f({b"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-f({"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using f({"abcF" : {%s : 1}})
-f({"abcF" : {1 : 1}}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-f({"abcF" : {b"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-f({"abcF" : {"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using f({"abcF" : Mapping({%s : 1})})
-f({"abcF" : Mapping({1 : 1})}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-f({"abcF" : Mapping({b"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-f({"abcF" : Mapping({"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using f({"abcF" : %s})
-f({"abcF" : FailingIter()}):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-f({"abcF" : FailingIterNext()}):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using f({"abcF" : %s})
-f({"abcF" : None}):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-f({"abcF" : {b"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-f({"abcF" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-f({"abcF" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-f({"abcF" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-f({"abcF" : FailingNumber()}):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using f(Mapping({%s : 1}))
-f(Mapping({1 : 1})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-f(Mapping({b"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-f(Mapping({"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using f(Mapping({"abcG" : {%s : 1}}))
-f(Mapping({"abcG" : {1 : 1}})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-f(Mapping({"abcG" : {b"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-f(Mapping({"abcG" : {"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using f(Mapping({"abcG" : Mapping({%s : 1})}))
-f(Mapping({"abcG" : Mapping({1 : 1})})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-f(Mapping({"abcG" : Mapping({b"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-f(Mapping({"abcG" : Mapping({"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using f(Mapping({"abcG" : %s}))
-f(Mapping({"abcG" : FailingIter()})):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-f(Mapping({"abcG" : FailingIterNext()})):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using f(Mapping({"abcG" : %s}))
-f(Mapping({"abcG" : None})):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-f(Mapping({"abcG" : {b"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-f(Mapping({"abcG" : {"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-f(Mapping({"abcG" : FailingMapping()})):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-f(Mapping({"abcG" : FailingMappingKey()})):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-f(Mapping({"abcG" : FailingNumber()})):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using f(%s)
-f(FailingIter()):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-f(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using f(%s)
-f(None):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-f({b"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-f({"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-f(FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-f(FailingMappingKey()):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-f(FailingNumber()):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using fd(self={%s : 1})
-fd(self={1 : 1}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-fd(self={b"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-fd(self={"\0" : 1}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using fd(self={"abcF" : {%s : 1}})
-fd(self={"abcF" : {1 : 1}}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-fd(self={"abcF" : {b"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-fd(self={"abcF" : {"\0" : 1}}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using fd(self={"abcF" : Mapping({%s : 1})})
-fd(self={"abcF" : Mapping({1 : 1})}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-fd(self={"abcF" : Mapping({b"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-fd(self={"abcF" : Mapping({"\0" : 1})}):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using fd(self={"abcF" : %s})
-fd(self={"abcF" : FailingIter()}):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-fd(self={"abcF" : FailingIterNext()}):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using fd(self={"abcF" : %s})
-fd(self={"abcF" : None}):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-fd(self={"abcF" : {b"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-fd(self={"abcF" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-fd(self={"abcF" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-fd(self={"abcF" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-fd(self={"abcF" : FailingNumber()}):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing StringToChars using fd(self=Mapping({%s : 1}))
-fd(self=Mapping({1 : 1})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-fd(self=Mapping({b"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-fd(self=Mapping({"\0" : 1})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using fd(self=Mapping({"abcG" : {%s : 1}}))
-fd(self=Mapping({"abcG" : {1 : 1}})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-fd(self=Mapping({"abcG" : {b"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-fd(self=Mapping({"abcG" : {"\0" : 1}})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing StringToChars using fd(self=Mapping({"abcG" : Mapping({%s : 1})}))
-fd(self=Mapping({"abcG" : Mapping({1 : 1})})):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-fd(self=Mapping({"abcG" : Mapping({b"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-fd(self=Mapping({"abcG" : Mapping({"\0" : 1})})):(<class 'TypeError'>, TypeError('expected bytes with no null',))
-<<< Finished
->>> Testing *Iter* using fd(self=Mapping({"abcG" : %s}))
-fd(self=Mapping({"abcG" : FailingIter()})):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim structure',))
-fd(self=Mapping({"abcG" : FailingIterNext()})):(<class 'NotImplementedError'>, NotImplementedError('next',))
-<<< Finished
->>> Testing ConvertFromPyObject using fd(self=Mapping({"abcG" : %s}))
-fd(self=Mapping({"abcG" : None})):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim structure',))
-fd(self=Mapping({"abcG" : {b"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-fd(self=Mapping({"abcG" : {"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-fd(self=Mapping({"abcG" : FailingMapping()})):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-fd(self=Mapping({"abcG" : FailingMappingKey()})):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-fd(self=Mapping({"abcG" : FailingNumber()})):(<class 'NotImplementedError'>, NotImplementedError('int',))
-<<< Finished
->>> Testing *Iter* using fd(self=%s)
-fd(self=FailingIter()):(<class 'TypeError'>, TypeError('unable to convert FailingIter to vim dictionary',))
-fd(self=FailingIterNext()):(<class 'TypeError'>, TypeError('unable to convert FailingIterNext to vim dictionary',))
-<<< Finished
->>> Testing ConvertFromPyObject using fd(self=%s)
-fd(self=None):(<class 'TypeError'>, TypeError('unable to convert NoneType to vim dictionary',))
-fd(self={b"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-fd(self={"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
-fd(self=FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError('keys',))
-fd(self=FailingMappingKey()):(<class 'NotImplementedError'>, NotImplementedError('getitem:mappingkey',))
-fd(self=FailingNumber()):(<class 'TypeError'>, TypeError('unable to convert FailingNumber to vim dictionary',))
-<<< Finished
->>> Testing ConvertFromPyMapping using fd(self=%s)
-fd(self=[]):(<class 'AttributeError'>, AttributeError('keys',))
-<<< Finished
-> TabPage
->> TabPageAttr
-vim.current.tabpage.xxx:(<class 'AttributeError'>, AttributeError("'vim.tabpage' object has no attribute 'xxx'",))
-> TabList
->> TabListItem
-vim.tabpages[1000]:(<class 'IndexError'>, IndexError('no such tab page',))
-> Window
->> WindowAttr
-vim.current.window.xxx:(<class 'AttributeError'>, AttributeError("'vim.window' object has no attribute 'xxx'",))
->> WindowSetattr
-vim.current.window.buffer = 0:(<class 'TypeError'>, TypeError('readonly attribute: buffer',))
-vim.current.window.cursor = (100000000, 100000000):(<class 'vim.error'>, error('cursor position outside buffer',))
-vim.current.window.cursor = True:(<class 'TypeError'>, TypeError('argument must be 2-item sequence, not bool',))
->>> Testing NumberToLong using vim.current.window.height = %s
-vim.current.window.height = []:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got list',))
-vim.current.window.height = None:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got NoneType',))
-vim.current.window.height = -1:(<class 'ValueError'>, ValueError('number must be greater or equal to zero',))
-<<< Finished
->>> Testing NumberToLong using vim.current.window.width = %s
-vim.current.window.width = []:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got list',))
-vim.current.window.width = None:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got NoneType',))
-vim.current.window.width = -1:(<class 'ValueError'>, ValueError('number must be greater or equal to zero',))
-<<< Finished
-vim.current.window.xxxxxx = True:(<class 'AttributeError'>, AttributeError('xxxxxx',))
-> WinList
->> WinListItem
-vim.windows[1000]:(<class 'IndexError'>, IndexError('no such window',))
-> Buffer
->> StringToLine (indirect)
-vim.current.buffer[0] = "\na":(<class 'vim.error'>, error('string cannot contain newlines',))
-vim.current.buffer[0] = b"\na":(<class 'vim.error'>, error('string cannot contain newlines',))
->> SetBufferLine (indirect)
-vim.current.buffer[0] = True:(<class 'TypeError'>, TypeError('bad argument type for built-in operation',))
->> SetBufferLineList (indirect)
-vim.current.buffer[:] = True:(<class 'TypeError'>, TypeError('bad argument type for built-in operation',))
-vim.current.buffer[:] = ["\na", "bc"]:(<class 'vim.error'>, error('string cannot contain newlines',))
->> InsertBufferLines (indirect)
-vim.current.buffer.append(None):(<class 'TypeError'>, TypeError('bad argument type for built-in operation',))
-vim.current.buffer.append(["\na", "bc"]):(<class 'vim.error'>, error('string cannot contain newlines',))
-vim.current.buffer.append("\nbc"):(<class 'vim.error'>, error('string cannot contain newlines',))
->> RBItem
-vim.current.buffer[100000000]:(<class 'IndexError'>, IndexError('line number out of range',))
->> RBAsItem
-vim.current.buffer[100000000] = "":(<class 'IndexError'>, IndexError('line number out of range',))
->> BufferAttr
-vim.current.buffer.xxx:(<class 'AttributeError'>, AttributeError("'vim.buffer' object has no attribute 'xxx'",))
->> BufferSetattr
-vim.current.buffer.name = True:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got bool',))
-vim.current.buffer.xxx = True:(<class 'AttributeError'>, AttributeError('xxx',))
->> BufferMark
-vim.current.buffer.mark(0):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
-vim.current.buffer.mark("abcM"):(<class 'ValueError'>, ValueError('mark name must be a single character',))
-vim.current.buffer.mark("!"):(<class 'vim.error'>, error('invalid mark name',))
->> BufferRange
-vim.current.buffer.range(1, 2, 3):(<class 'TypeError'>, TypeError('function takes exactly 2 arguments (3 given)',))
-> BufMap
->> BufMapItem
-vim.buffers[100000000]:(<class 'KeyError'>, KeyError(100000000,))
->>> Testing NumberToLong using vim.buffers[%s]
-vim.buffers[[]]:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got list',))
-vim.buffers[None]:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got NoneType',))
-vim.buffers[-1]:(<class 'ValueError'>, ValueError('number must be greater then zero',))
-vim.buffers[0]:(<class 'ValueError'>, ValueError('number must be greater then zero',))
-<<< Finished
-> Current
->> CurrentGetattr
-vim.current.xxx:(<class 'AttributeError'>, AttributeError("'vim.currentdata' object has no attribute 'xxx'",))
->> CurrentSetattr
-vim.current.line = True:(<class 'TypeError'>, TypeError('bad argument type for built-in operation',))
-vim.current.buffer = True:(<class 'TypeError'>, TypeError('expected vim.Buffer object, but got bool',))
-vim.current.window = True:(<class 'TypeError'>, TypeError('expected vim.Window object, but got bool',))
-vim.current.tabpage = True:(<class 'TypeError'>, TypeError('expected vim.TabPage object, but got bool',))
-vim.current.xxx = True:(<class 'AttributeError'>, AttributeError('xxx',))
-['.']
-'.'
-3,xx
-before
-after
-pythonx/topmodule/__init__.py
-pythonx/topmodule/submodule/__init__.py
-pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py
-vim.command("throw 'abcN'"):(<class 'vim.error'>, error('abcN',))
-Exe("throw 'def'"):(<class 'vim.error'>, error('def',))
-vim.eval("Exe('throw ''ghi''')"):(<class 'vim.error'>, error('ghi',))
-vim.eval("Exe('echoerr ''jkl''')"):(<class 'vim.error'>, error('Vim(echoerr):jkl',))
-vim.eval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
-vim.eval("xxx_unknown_function_xxx()"):(<class 'vim.error'>, error('Vim:E117: Unknown function: xxx_unknown_function_xxx',))
-vim.bindeval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',))
-Caught KeyboardInterrupt
-Running :put
-No exception
-
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index a12ee880d6..2659125d2d 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -1,6 +1,7 @@
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
+#include <limits.h>
#include <uv.h>
#include <unibilium.h>
@@ -56,10 +57,11 @@ typedef struct {
bool busy;
HlAttrs attrs, print_attrs;
Cell **screen;
+ int showing_mode;
struct {
int enable_mouse, disable_mouse;
int enable_bracketed_paste, disable_bracketed_paste;
- int enter_insert_mode, exit_insert_mode;
+ int enter_insert_mode, enter_replace_mode, exit_insert_mode;
int set_rgb_foreground, set_rgb_background;
} unibi_ext;
} TUIData;
@@ -97,11 +99,13 @@ UI *tui_start(void)
data->can_use_terminal_scroll = true;
data->bufpos = 0;
data->bufsize = sizeof(data->buf) - CNORM_COMMAND_MAX_SIZE;
+ data->showing_mode = 0;
data->unibi_ext.enable_mouse = -1;
data->unibi_ext.disable_mouse = -1;
data->unibi_ext.enable_bracketed_paste = -1;
data->unibi_ext.disable_bracketed_paste = -1;
data->unibi_ext.enter_insert_mode = -1;
+ data->unibi_ext.enter_replace_mode = -1;
data->unibi_ext.exit_insert_mode = -1;
// write output to stderr if stdout is not a tty
@@ -147,8 +151,7 @@ UI *tui_start(void)
ui->busy_stop = tui_busy_stop;
ui->mouse_on = tui_mouse_on;
ui->mouse_off = tui_mouse_off;
- ui->insert_mode = tui_insert_mode;
- ui->normal_mode = tui_normal_mode;
+ ui->mode_change = tui_mode_change;
ui->set_scroll_region = tui_set_scroll_region;
ui->scroll = tui_scroll;
ui->highlight_set = tui_highlight_set;
@@ -177,7 +180,7 @@ static void tui_stop(UI *ui)
// Destroy input stuff
term_input_destroy(data->input);
// Destroy output stuff
- tui_normal_mode(ui);
+ tui_mode_change(ui, NORMAL);
tui_mouse_off(ui);
unibi_out(ui, unibi_exit_attribute_mode);
// cursor should be set to normal before exiting alternate screen
@@ -350,6 +353,11 @@ static void tui_resize(UI *ui, int width, int height)
data->scroll_region.left = 0;
data->scroll_region.right = width - 1;
data->row = data->col = 0;
+
+ // try to resize the terminal window
+ char r[16]; // enough for 9999x9999
+ snprintf(r, sizeof(r), "\x1b[8;%d;%dt", height, width);
+ out(ui, r, strlen(r));
}
static void tui_clear(UI *ui)
@@ -398,16 +406,25 @@ static void tui_mouse_off(UI *ui)
data->mouse_enabled = false;
}
-static void tui_insert_mode(UI *ui)
+static void tui_mode_change(UI *ui, int mode)
{
TUIData *data = ui->data;
- unibi_out(ui, data->unibi_ext.enter_insert_mode);
-}
-static void tui_normal_mode(UI *ui)
-{
- TUIData *data = ui->data;
- unibi_out(ui, data->unibi_ext.exit_insert_mode);
+ if (mode == INSERT) {
+ if (data->showing_mode != INSERT) {
+ unibi_out(ui, data->unibi_ext.enter_insert_mode);
+ }
+ } else if (mode == REPLACE) {
+ if (data->showing_mode != REPLACE) {
+ unibi_out(ui, data->unibi_ext.enter_replace_mode);
+ }
+ } else {
+ assert(mode == NORMAL);
+ if (data->showing_mode != NORMAL) {
+ unibi_out(ui, data->unibi_ext.exit_insert_mode);
+ }
+ }
+ data->showing_mode = mode;
}
static void tui_set_scroll_region(UI *ui, int top, int bot, int left,
@@ -641,12 +658,22 @@ static void update_size(UI *ui)
{
TUIData *data = ui->data;
int width = 0, height = 0;
- // 1 - try from a system call(ioctl/TIOCGWINSZ on unix)
+
+ // 1 - look for non-default 'columns' and 'lines' options during startup
+ if (starting != 0 && (Columns != DFLT_COLS || Rows != DFLT_ROWS)) {
+ assert(Columns >= INT_MIN && Columns <= INT_MAX);
+ assert(Rows >= INT_MIN && Rows <= INT_MAX);
+ width = (int)Columns;
+ height = (int)Rows;
+ goto end;
+ }
+
+ // 2 - try from a system call(ioctl/TIOCGWINSZ on unix)
if (!uv_tty_get_winsize(&data->output_handle, &width, &height)) {
goto end;
}
- // 2 - use $LINES/$COLUMNS if available
+ // 3 - use $LINES/$COLUMNS if available
const char *val;
int advance;
if ((val = os_getenv("LINES"))
@@ -656,15 +683,15 @@ static void update_size(UI *ui)
goto end;
}
- // 3- read from terminfo if available
+ // 4 - read from terminfo if available
height = unibi_get_num(data->ut, unibi_lines);
width = unibi_get_num(data->ut, unibi_columns);
end:
if (width <= 0 || height <= 0) {
- // use a default of 80x24
- width = 80;
- height = 24;
+ // use the defaults
+ width = DFLT_COLS;
+ height = DFLT_ROWS;
}
ui->width = width;
@@ -756,12 +783,10 @@ static void fix_terminfo(TUIData *data)
unibi_set_if_empty(ut, unibi_from_status_line, "\x07");
}
- if (STARTS_WITH(term, "xterm") || STARTS_WITH(term, "rxvt") || inside_tmux) {
- data->unibi_ext.enable_bracketed_paste = (int)unibi_add_ext_str(ut, NULL,
- "\x1b[?2004h");
- data->unibi_ext.disable_bracketed_paste = (int)unibi_add_ext_str(ut, NULL,
- "\x1b[?2004l");
- }
+ data->unibi_ext.enable_bracketed_paste = (int)unibi_add_ext_str(ut, NULL,
+ "\x1b[?2004h");
+ data->unibi_ext.disable_bracketed_paste = (int)unibi_add_ext_str(ut, NULL,
+ "\x1b[?2004l");
#define XTERM_SETAF \
"\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m"
@@ -790,12 +815,16 @@ static void fix_terminfo(TUIData *data)
// iterm
data->unibi_ext.enter_insert_mode = (int)unibi_add_ext_str(ut, NULL,
TMUX_WRAP("\x1b]50;CursorShape=1;BlinkingCursorEnabled=1\x07"));
+ data->unibi_ext.enter_replace_mode = (int)unibi_add_ext_str(ut, NULL,
+ TMUX_WRAP("\x1b]50;CursorShape=2;BlinkingCursorEnabled=1\x07"));
data->unibi_ext.exit_insert_mode = (int)unibi_add_ext_str(ut, NULL,
TMUX_WRAP("\x1b]50;CursorShape=0;BlinkingCursorEnabled=0\x07"));
} else {
// xterm-like sequences for blinking bar and solid block
data->unibi_ext.enter_insert_mode = (int)unibi_add_ext_str(ut, NULL,
TMUX_WRAP("\x1b[5 q"));
+ data->unibi_ext.enter_replace_mode = (int)unibi_add_ext_str(ut, NULL,
+ TMUX_WRAP("\x1b[3 q"));
data->unibi_ext.exit_insert_mode = (int)unibi_add_ext_str(ut, NULL,
TMUX_WRAP("\x1b[2 q"));
}
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index dc2bc0898c..7e155f9b4f 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -121,7 +121,7 @@ void ui_update_encoding(void)
// May update the shape of the cursor.
void ui_cursor_shape(void)
{
- ui_change_mode();
+ ui_mode_change();
}
void ui_refresh(void)
@@ -469,25 +469,20 @@ static void flush_cursor_update(void)
// Notify that the current mode has changed. Can be used to change cursor
// shape, for example.
-static void ui_change_mode(void)
+static void ui_mode_change(void)
{
- static int showing_insert_mode = MAYBE;
-
+ int mode;
if (!full_screen) {
return;
}
-
- if (State & INSERT) {
- if (showing_insert_mode != TRUE) {
- UI_CALL(insert_mode);
- }
- showing_insert_mode = TRUE;
- } else {
- if (showing_insert_mode != FALSE) {
- UI_CALL(normal_mode);
- }
- showing_insert_mode = FALSE;
- }
+ /* Get a simple UI mode out of State. */
+ if ((State & REPLACE) == REPLACE)
+ mode = REPLACE;
+ else if (State & INSERT)
+ mode = INSERT;
+ else
+ mode = NORMAL;
+ UI_CALL(mode_change, mode);
conceal_check_cursur_line();
}
diff --git a/src/nvim/ui.h b/src/nvim/ui.h
index 76ceec7775..9cfd99c096 100644
--- a/src/nvim/ui.h
+++ b/src/nvim/ui.h
@@ -24,8 +24,7 @@ struct ui_t {
void (*busy_stop)(UI *ui);
void (*mouse_on)(UI *ui);
void (*mouse_off)(UI *ui);
- void (*insert_mode)(UI *ui);
- void (*normal_mode)(UI *ui);
+ void (*mode_change)(UI *ui, int mode);
void (*set_scroll_region)(UI *ui, int top, int bot, int left, int right);
void (*scroll)(UI *ui, int count);
void (*highlight_set)(UI *ui, HlAttrs attrs);
diff --git a/src/nvim/version.c b/src/nvim/version.c
index c7523bbdc7..3962cb7729 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -71,11 +71,23 @@ static char *features[] = {
// clang-format off
static int included_patches[] = {
+ //790,
+ //789,
+ //788,
+ //787,
+ //786,
+ //785,
+ 784,
+ //783,
+ //782,
+ //781,
+ //780,
+ //779,
//778,
//777,
//776,
- //775,
- //774,
+ 775,
+ 774,
//773,
//772,
//771,
@@ -182,7 +194,7 @@ static int included_patches[] = {
//670,
//669 NA
668,
- //667,
+ 667,
//666 NA
//665,
//664 NA
@@ -249,7 +261,7 @@ static int included_patches[] = {
//603,
//602,
601,
- //600,
+ 600,
599,
//598,
597,
diff --git a/src/nvim/vim.h b/src/nvim/vim.h
index c88a8872f3..17f9cbc310 100644
--- a/src/nvim/vim.h
+++ b/src/nvim/vim.h
@@ -332,20 +332,15 @@ enum {
/* Maximum number of bytes in a multi-byte character. It can be one 32-bit
* character of up to 6 bytes, or one 16-bit character of up to three bytes
* plus six following composing characters of three bytes each. */
-# define MB_MAXBYTES 21
+#define MB_MAXBYTES 21
/* This has to go after the include of proto.h, as proto/gui.pro declares
* functions of these names. The declarations would break if the defines had
* been seen at that stage. But it must be before globals.h, where error_ga
* is declared. */
-#if !defined(FEAT_GUI_W32) && !defined(FEAT_GUI_X11) \
- && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MAC)
-# define mch_errmsg(str) fprintf(stderr, "%s", (str))
-# define display_errors() fflush(stderr)
-# define mch_msg(str) printf("%s", (str))
-#else
-# define USE_MCH_ERRMSG
-#endif
+#define mch_errmsg(str) fprintf(stderr, "%s", (str))
+#define display_errors() fflush(stderr)
+#define mch_msg(str) printf("%s", (str))
#include "nvim/globals.h" /* global variables and messages */
#include "nvim/buffer_defs.h" /* buffer and windows */
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
index c158c26341..9e880a4f04 100644
--- a/test/functional/api/vim_spec.lua
+++ b/test/functional/api/vim_spec.lua
@@ -34,6 +34,15 @@ describe('vim_* functions', function()
end)
end)
+ describe('call_function', function()
+ it('works', function()
+ nvim('call_function', 'setqflist', {{{ filename = 'something', lnum = 17}}, 'r'})
+ eq(17, nvim('call_function', 'getqflist', {})[1].lnum)
+ eq(17, nvim('call_function', 'eval', {17}))
+ eq('foo', nvim('call_function', 'simplify', {'this/./is//redundant/../../../foo'}))
+ end)
+ end)
+
describe('strwidth', function()
it('works', function()
eq(3, nvim('strwidth', 'abc'))
diff --git a/test/functional/clipboard/clipboard_provider_spec.lua b/test/functional/clipboard/clipboard_provider_spec.lua
index 9282a66240..f6d6188d82 100644
--- a/test/functional/clipboard/clipboard_provider_spec.lua
+++ b/test/functional/clipboard/clipboard_provider_spec.lua
@@ -92,7 +92,7 @@ end)
describe('clipboard usage', function()
before_each(function()
clear()
- execute('let &rtp = "test/functional/clipboard,".&rtp')
+ execute('let &rtp = "test/functional/fixtures,".&rtp')
execute('call getreg("*")') -- force load of provider
end)
@@ -197,6 +197,17 @@ describe('clipboard usage', function()
expect('some more')
end)
+ it('pastes unnamed register if the provider fails', function()
+ insert('the text')
+ feed('yy')
+ execute("let g:cliperror = 1")
+ feed('"*p')
+ expect([[
+ the text
+ the text]])
+ end)
+
+
describe('with clipboard=unnamed', function()
-- the basic behavior of unnamed register should be the same
-- even when handled by clipboard provider
@@ -261,6 +272,16 @@ describe('clipboard usage', function()
expect("indeed star")
end)
+ it('unamed operations work even if the provider fails', function()
+ insert('the text')
+ feed('yy')
+ execute("let g:cliperror = 1")
+ feed('p')
+ expect([[
+ the text
+ the text]])
+ end)
+
end)
it('supports :put', function()
@@ -335,4 +356,34 @@ describe('clipboard usage', function()
'Howdy!',
}, 'v'}, eval("g:test_clip['*']"))
end)
+
+ it('handles middleclick correctly', function()
+ local screen = Screen.new(30, 5)
+ screen:attach()
+ insert([[
+ the source
+ a target]])
+ feed('gg"*ywwyw')
+ -- clicking depends on the exact visual layout, so expect it:
+ screen:expect([[
+ the ^source |
+ a target |
+ ~ |
+ ~ |
+ |
+ ]], nil, {{bold = true, foreground = Screen.colors.Blue}})
+
+ feed('<MiddleMouse><0,1>')
+ expect([[
+ the source
+ the a target]])
+
+ -- on error, fall back to unnamed register
+ execute("let g:cliperror = 1")
+ feed('<MiddleMouse><6,1>')
+ expect([[
+ the source
+ the a sourcetarget]])
+ end)
+
end)
diff --git a/test/functional/eval/glob_spec.lua b/test/functional/eval/glob_spec.lua
new file mode 100644
index 0000000000..136417249c
--- /dev/null
+++ b/test/functional/eval/glob_spec.lua
@@ -0,0 +1,25 @@
+local helpers = require('test.functional.helpers')
+local clear, execute, eval, eq = helpers.clear, helpers.execute, helpers.eval, helpers.eq
+
+before_each(function()
+ clear()
+ lfs.mkdir('test-glob')
+ execute('cd test-glob')
+end)
+
+after_each(function()
+ lfs.rmdir('test-glob')
+end)
+
+describe('glob()', function()
+ it("glob('.*') returns . and .. ", function()
+ eq({'.', '..'}, eval("glob('.*', 0, 1)"))
+ -- Do it again to verify scandir_next_with_dots() internal state.
+ eq({'.', '..'}, eval("glob('.*', 0, 1)"))
+ end)
+ it("glob('*') returns an empty list ", function()
+ eq({}, eval("glob('*', 0, 1)"))
+ -- Do it again to verify scandir_next_with_dots() internal state.
+ eq({}, eval("glob('*', 0, 1)"))
+ end)
+end)
diff --git a/test/functional/ex_cmds/menu_spec.lua b/test/functional/ex_cmds/menu_spec.lua
new file mode 100644
index 0000000000..6af889bf9e
--- /dev/null
+++ b/test/functional/ex_cmds/menu_spec.lua
@@ -0,0 +1,38 @@
+local helpers = require('test.functional.helpers')
+local clear, execute, nvim = helpers.clear, helpers.execute, helpers.nvim
+local expect = helpers.expect
+local feed = helpers.feed
+local command = helpers.command
+
+describe(':emenu', function()
+
+ before_each(function()
+ clear()
+ execute('nnoremenu Test.Test inormal<ESC>')
+ execute('inoremenu Test.Test insert')
+ execute('vnoremenu Test.Test x')
+ end)
+
+ it('executes correct bindings in normal mode without using API', function()
+ execute('emenu Test.Test')
+ expect('normal')
+ end)
+
+ it('executes correct bindings in normal mode', function()
+ command('emenu Test.Test')
+ expect('normal')
+ end)
+
+ it('executes correct bindings in insert mode', function()
+ feed('i')
+ command('emenu Test.Test')
+ expect('insert')
+ end)
+
+ it('executes correct bindings in visual mode', function()
+ feed('iabcde<ESC>0lvll')
+ command('emenu Test.Test')
+ expect('ae')
+ end)
+
+end)
diff --git a/test/functional/ex_cmds/recover_spec.lua b/test/functional/ex_cmds/recover_spec.lua
index d4c9477133..b92739e40e 100644
--- a/test/functional/ex_cmds/recover_spec.lua
+++ b/test/functional/ex_cmds/recover_spec.lua
@@ -20,11 +20,11 @@ describe(':preserve', function()
local swapdir = lfs.currentdir()..'/testdir_recover_spec'
before_each(function()
clear()
- os.remove(swapdir)
+ helpers.rmdir(swapdir)
lfs.mkdir(swapdir)
end)
after_each(function()
- os.remove(swapdir)
+ helpers.rmdir(swapdir)
end)
it("saves to custom 'directory' and (R)ecovers (issue #1836)", function()
diff --git a/test/functional/clipboard/autoload/provider/clipboard.vim b/test/functional/fixtures/autoload/provider/clipboard.vim
index d88b68464e..a28484169a 100644
--- a/test/functional/clipboard/autoload/provider/clipboard.vim
+++ b/test/functional/fixtures/autoload/provider/clipboard.vim
@@ -3,8 +3,12 @@ let g:test_clip = { '+': [''], '*': [''], }
let s:methods = {}
let g:cliplossy = 0
+let g:cliperror = 0
function! s:methods.get(reg)
+ if g:cliperror
+ return 0
+ end
if g:cliplossy
" behave like pure text clipboard
return g:test_clip[a:reg][0]
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 33d04616a0..d5c22c6f1c 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -290,6 +290,28 @@ local function expect(contents)
return eq(dedent(contents), curbuf_contents())
end
+local function rmdir(path)
+ if lfs.attributes(path, 'mode') ~= 'directory' then
+ return nil
+ end
+ for file in lfs.dir(path) do
+ if file == '.' or file == '..' then
+ goto continue
+ end
+ ret, err = os.remove(path..'/'..file)
+ if not ret then
+ error('os.remove: '..err)
+ return nil
+ end
+ ::continue::
+ end
+ ret, err = os.remove(path)
+ if not ret then
+ error('os.remove: '..err)
+ end
+ return ret
+end
+
return {
clear = clear,
spawn = spawn,
@@ -321,5 +343,6 @@ return {
curbuf_contents = curbuf_contents,
wait = wait,
set_session = set_session,
- write_file = write_file
+ write_file = write_file,
+ rmdir = rmdir
}
diff --git a/test/functional/legacy/057_sort_spec.lua b/test/functional/legacy/057_sort_spec.lua
new file mode 100644
index 0000000000..585b391198
--- /dev/null
+++ b/test/functional/legacy/057_sort_spec.lua
@@ -0,0 +1,603 @@
+-- Tests for :sort command.
+
+local helpers = require('test.functional.helpers')
+local insert, execute, clear, expect, eq, eval, source = helpers.insert,
+ helpers.execute, helpers.clear, helpers.expect, helpers.eq, helpers.eval,
+ helpers.source
+
+describe(':sort', function()
+ local text = [[
+ abc
+ ab
+ a
+ a321
+ a123
+ a122
+ b321
+ b123
+ c123d
+ 123b
+ c321d
+ b322b
+ b321
+ b321b
+ ]]
+ before_each(clear)
+
+ it('alphabetical', function()
+ insert(text)
+ execute('sort')
+ expect([[
+
+ 123b
+ a
+ a122
+ a123
+ a321
+ ab
+ abc
+ b123
+ b321
+ b321
+ b321b
+ b322b
+ c123d
+ c321d]])
+ end)
+
+ it('numerical', function()
+ insert([[
+ abc
+ ab
+ a321
+ a123
+ a122
+ a
+ x-22
+ b321
+ b123
+ c123d
+ -24
+ 123b
+ c321d
+ 0
+ b322b
+ b321
+ b321b
+ ]])
+ execute('sort n')
+ expect([[
+ abc
+ ab
+ a
+
+ -24
+ x-22
+ 0
+ a122
+ a123
+ b123
+ c123d
+ 123b
+ a321
+ b321
+ c321d
+ b321
+ b321b
+ b322b]])
+ end)
+
+ it('hexadecimal', function()
+ insert(text)
+ execute('sort x')
+ expect([[
+
+ a
+ ab
+ abc
+ 123b
+ a122
+ a123
+ a321
+ b123
+ b321
+ b321
+ b321b
+ b322b
+ c123d
+ c321d]])
+ end)
+
+ it('alphabetical, unique', function()
+ insert(text)
+ execute('sort u')
+ expect([[
+
+ 123b
+ a
+ a122
+ a123
+ a321
+ ab
+ abc
+ b123
+ b321
+ b321b
+ b322b
+ c123d
+ c321d]])
+ end)
+
+ it('alphabetical, reverse', function()
+ insert(text)
+ execute('sort!')
+ expect([[
+ c321d
+ c123d
+ b322b
+ b321b
+ b321
+ b321
+ b123
+ abc
+ ab
+ a321
+ a123
+ a122
+ a
+ 123b
+ ]])
+ end)
+
+ it('numerical, reverse', function()
+ insert(text)
+ execute('sort! n')
+ expect([[
+ b322b
+ b321b
+ b321
+ c321d
+ b321
+ a321
+ 123b
+ c123d
+ b123
+ a123
+ a122
+
+ a
+ ab
+ abc]])
+ end)
+
+ it('unique, reverse', function()
+ insert(text)
+ execute('sort! u')
+ expect([[
+ c321d
+ c123d
+ b322b
+ b321b
+ b321
+ b123
+ abc
+ ab
+ a321
+ a123
+ a122
+ a
+ 123b
+ ]])
+ end)
+
+ it('octal', function()
+ insert(text)
+ execute('sort o')
+ expect([[
+ abc
+ ab
+ a
+
+ a122
+ a123
+ b123
+ c123d
+ 123b
+ a321
+ b321
+ c321d
+ b321
+ b321b
+ b322b]])
+ end)
+
+ it('reverse, hexadecimal', function()
+ insert(text)
+ execute('sort! x')
+ expect([[
+ c321d
+ c123d
+ b322b
+ b321b
+ b321
+ b321
+ b123
+ a321
+ a123
+ a122
+ 123b
+ abc
+ ab
+ a
+ ]])
+ end)
+
+ it('alphabetical, skip first character', function()
+ insert(text)
+ execute('sort/./')
+ expect([[
+ a
+
+ a122
+ a123
+ b123
+ 123b
+ c123d
+ a321
+ b321
+ b321
+ b321b
+ c321d
+ b322b
+ ab
+ abc]])
+ end)
+
+ it('alphabetical, skip first 2 characters', function()
+ insert(text)
+ execute('sort/../')
+ expect([[
+ ab
+ a
+
+ a321
+ b321
+ b321
+ b321b
+ c321d
+ a122
+ b322b
+ a123
+ b123
+ 123b
+ c123d
+ abc]])
+ end)
+
+ it('alphabetical, unique, skip first 2 characters', function()
+ insert(text)
+ execute('sort/../u')
+ expect([[
+ ab
+ a
+
+ a321
+ b321
+ b321b
+ c321d
+ a122
+ b322b
+ a123
+ b123
+ 123b
+ c123d
+ abc]])
+ end)
+
+ it('numerical, skip first character', function()
+ insert(text)
+ execute('sort/./n')
+ expect([[
+ abc
+ ab
+ a
+
+ a122
+ a123
+ b123
+ c123d
+ 123b
+ a321
+ b321
+ c321d
+ b321
+ b321b
+ b322b]])
+ end)
+
+ it('alphabetical, sort on first character', function()
+ insert(text)
+ execute('sort/./r')
+ expect([[
+
+ 123b
+ abc
+ ab
+ a
+ a321
+ a123
+ a122
+ b321
+ b123
+ b322b
+ b321
+ b321b
+ c123d
+ c321d]])
+ end)
+
+ it('alphabetical, sort on first 2 characters', function()
+ insert(text)
+ execute('sort/../r')
+ expect([[
+ a
+
+ 123b
+ a123
+ a122
+ a321
+ abc
+ ab
+ b123
+ b321
+ b322b
+ b321
+ b321b
+ c123d
+ c321d]])
+ end)
+
+ it('numerical, sort on first character', function()
+ insert(text)
+ execute('sort/./rn')
+ expect([[
+ abc
+ ab
+ a
+ a321
+ a123
+ a122
+ b321
+ b123
+ c123d
+ 123b
+ c321d
+ b322b
+ b321
+ b321b
+ ]])
+ end)
+
+ it('alphabetical, skip past first digit', function()
+ insert(text)
+ execute([[sort/\d/]])
+ expect([[
+ abc
+ ab
+ a
+
+ a321
+ b321
+ b321
+ b321b
+ c321d
+ a122
+ b322b
+ a123
+ b123
+ 123b
+ c123d]])
+ end)
+
+ it('alphabetical, sort on first digit', function()
+ insert(text)
+ execute([[sort/\d/r]])
+ expect([[
+ abc
+ ab
+ a
+
+ a123
+ a122
+ b123
+ c123d
+ 123b
+ a321
+ b321
+ c321d
+ b322b
+ b321
+ b321b]])
+ end)
+
+ it('numerical, skip past first digit', function()
+ insert(text)
+ execute([[sort/\d/n]])
+ expect([[
+ abc
+ ab
+ a
+
+ a321
+ b321
+ c321d
+ b321
+ b321b
+ a122
+ b322b
+ a123
+ b123
+ c123d
+ 123b]])
+ end)
+
+ it('numerical, sort on first digit', function()
+ insert(text)
+ execute([[sort/\d/rn]])
+ expect([[
+ abc
+ ab
+ a
+
+ a123
+ a122
+ b123
+ c123d
+ 123b
+ a321
+ b321
+ c321d
+ b322b
+ b321
+ b321b]])
+ end)
+
+ it('alphabetical, skip past first 2 digits', function()
+ insert(text)
+ execute([[sort/\d\d/]])
+ expect([[
+ abc
+ ab
+ a
+
+ a321
+ b321
+ b321
+ b321b
+ c321d
+ a122
+ b322b
+ a123
+ b123
+ 123b
+ c123d]])
+ end)
+
+ it('numerical, skip past first 2 digits', function()
+ insert(text)
+ execute([[sort/\d\d/n]])
+ expect([[
+ abc
+ ab
+ a
+
+ a321
+ b321
+ c321d
+ b321
+ b321b
+ a122
+ b322b
+ a123
+ b123
+ c123d
+ 123b]])
+ end)
+
+ it('hexadecimal, skip past first 2 digits', function()
+ insert(text)
+ execute([[sort/\d\d/x]])
+ expect([[
+ abc
+ ab
+ a
+
+ a321
+ b321
+ b321
+ a122
+ a123
+ b123
+ b321b
+ c321d
+ b322b
+ 123b
+ c123d]])
+ end)
+
+ it('alpha, on first 2 digits', function()
+ insert(text)
+ execute([[sort/\d\d/r]])
+ expect([[
+ abc
+ ab
+ a
+
+ a123
+ a122
+ b123
+ c123d
+ 123b
+ a321
+ b321
+ c321d
+ b322b
+ b321
+ b321b]])
+ end)
+
+ it('numeric, on first 2 digits', function()
+ insert(text)
+ execute([[sort/\d\d/rn]])
+ expect([[
+ abc
+ ab
+ a
+
+ a123
+ a122
+ b123
+ c123d
+ 123b
+ a321
+ b321
+ c321d
+ b322b
+ b321
+ b321b]])
+ end)
+
+ it('hexadecimal, on first 2 digits', function()
+ insert(text)
+ execute([[sort/\d\d/rx]])
+ expect([[
+ abc
+ ab
+ a
+
+ a123
+ a122
+ b123
+ c123d
+ 123b
+ a321
+ b321
+ c321d
+ b322b
+ b321
+ b321b]])
+ end)
+
+ it('fails with wrong arguments', function()
+ insert(text)
+ -- This should fail with "E474: Invalid argument".
+ source([[
+ try
+ sort no
+ catch
+ let tmpvar = v:exception
+ endtry]])
+ eq('Vim(sort):E474: Invalid argument', eval('tmpvar'))
+ expect(text)
+ end)
+end)
diff --git a/test/functional/legacy/080_substitute_spec.lua b/test/functional/legacy/080_substitute_spec.lua
new file mode 100644
index 0000000000..89ef7a713c
--- /dev/null
+++ b/test/functional/legacy/080_substitute_spec.lua
@@ -0,0 +1,162 @@
+-- Test for *sub-replace-special* and *sub-replace-expression* on substitue().
+-- Test for submatch() on substitue().
+-- Test for *:s%* on :substitute.
+
+local helpers = require('test.functional.helpers')
+local feed, insert, source = helpers.feed, helpers.insert, helpers.source
+local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
+local eq, eval = helpers.eq, helpers.eval
+
+describe('substitue()', function()
+ before_each(clear)
+
+ -- The original test contained several TEST_X lines to delimit different
+ -- parts. These where used to split the test into different it() blocks.
+ -- The TEST_X strings are repeated in the description of the blocks to make
+ -- it easier to incorporate upstream changes.
+
+ local function test_1_and_2()
+ eq('AA', eval("substitute('A', 'A', '&&', '')"))
+ eq('&', eval([[substitute('B', 'B', '\&', '')]]))
+ eq('C123456789987654321', eval([[substitute('C123456789', ]] ..
+ [['C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', ]] ..
+ [['\0\9\8\7\6\5\4\3\2\1', '')]]))
+ eq('d', eval("substitute('D', 'D', 'd', '')"))
+ eq('~', eval("substitute('E', 'E', '~', '')"))
+ eq('~', eval([[substitute('F', 'F', '\~', '')]]))
+ eq('Gg', eval([[substitute('G', 'G', '\ugg', '')]]))
+ eq('Hh', eval([[substitute('H', 'H', '\Uh\Eh', '')]]))
+ eq('iI', eval([[substitute('I', 'I', '\lII', '')]]))
+ eq('jJ', eval([[substitute('J', 'J', '\LJ\EJ', '')]]))
+ eq('Kk', eval([[substitute('K', 'K', '\Uk\ek', '')]]))
+ eq('l\rl', eval("substitute('lLl', 'L', '\r', '')"))
+ eq('m\rm', eval([[substitute('mMm', 'M', '\r', '')]]))
+ eq('n\rn', eval("substitute('nNn', 'N', '\\\r', '')"))
+ eq('o\no', eval([[substitute('oOo', 'O', '\n', '')]]))
+ eq('p\bp', eval([[substitute('pPp', 'P', '\b', '')]]))
+ eq('q\tq', eval([[substitute('qQq', 'Q', '\t', '')]]))
+ eq('r\\r', eval([[substitute('rRr', 'R', '\\', '')]]))
+ eq('scs', eval([[substitute('sSs', 'S', '\c', '')]]))
+ eq('t\rt', eval([[substitute('tTt', 'T', "\r", '')]]))
+ eq('u\nu', eval([[substitute('uUu', 'U', "\n", '')]]))
+ eq('v\bv', eval([[substitute('vVv', 'V', "\b", '')]]))
+ eq('w\\w', eval([[substitute('wWw', 'W', "\\", '')]]))
+ eq('XxxX', eval([[substitute('X', 'X', '\L\uxXx\l\EX', '')]]))
+ eq('yYYy', eval([[substitute('Y', 'Y', '\U\lYyY\u\Ey', '')]]))
+ end
+
+ it('with "set magic" (TEST_1)', function()
+ execute('set magic')
+ test_1_and_2()
+ end)
+
+ it('with "set nomagic" (TEST_2)', function()
+ execute('set nomagic')
+ test_1_and_2()
+ end)
+
+ it('with sub-replace-expression (TEST_3)', function()
+ execute('set magic&')
+ eq('a\\a', eval([[substitute('aAa', 'A', '\="\\"', '')]]))
+ eq('b\\\\b', eval([[substitute('bBb', 'B', '\="\\\\"', '')]]))
+ eq('c\rc', eval([[substitute('cCc', 'C', '\="]]..'\r'..[["', '')]]))
+ eq('d\\\rd', eval([[substitute('dDd', 'D', '\="\\]]..'\r'..[["', '')]]))
+ eq('e\\\\\re',
+ eval([[substitute('eEe', 'E', '\="\\\\]]..'\r'..[["', '')]]))
+ eq('f\\rf', eval([[substitute('fFf', 'F', '\="\\r"', '')]]))
+ eq('j\\nj', eval([[substitute('jJj', 'J', '\="\\n"', '')]]))
+ eq('k\rk', eval([[substitute('kKk', 'K', '\="\r"', '')]]))
+ eq('l\nl', eval([[substitute('lLl', 'L', '\="\n"', '')]]))
+ end)
+
+ it('with submatch() (TEST_4)', function()
+ execute('set magic&')
+ eq('a\\a', eval([[substitute('aAa', 'A', ]] ..
+ [['\=substitute(submatch(0), ".", "\\", "")', '')]]))
+ eq('b\\b', eval([[substitute('bBb', 'B', ]] ..
+ [['\=substitute(submatch(0), ".", "\\\\", "")', '')]]))
+ eq('c\rc', eval([[substitute('cCc', 'C', ]] ..
+ [['\=substitute(submatch(0), ".", "]]..'\r'..[[", "")', '')]]))
+ eq('d\rd', eval([[substitute('dDd', 'D', ]] ..
+ [['\=substitute(submatch(0), ".", "\\]]..'\r'..[[", "")', '')]]))
+ eq('e\\\re', eval([[substitute('eEe', 'E', ]] ..
+ [['\=substitute(submatch(0), ".", "\\\\]]..'\r'..[[", "")', '')]]))
+ eq('f\rf', eval([[substitute('fFf', 'F', ]] ..
+ [['\=substitute(submatch(0), ".", "\\r", "")', '')]]))
+ eq('j\nj', eval([[substitute('jJj', 'J', ]] ..
+ [['\=substitute(submatch(0), ".", "\\n", "")', '')]]))
+ eq('k\rk', eval([[substitute('kKk', 'K', ]] ..
+ [['\=substitute(submatch(0), ".", "\r", "")', '')]]))
+ eq('l\nl', eval([[substitute('lLl', 'L', ]] ..
+ [['\=substitute(submatch(0), ".", "\n", "")', '')]]))
+ end)
+
+ it('with submatch() (TEST_5)', function()
+ execute('set magic&')
+ eq('A123456789987654321', eval([[substitute('A123456789', ]] ..
+ [['A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', ]] ..
+ [['\=submatch(0) . submatch(9) . submatch(8) . submatch(7) . ]] ..
+ [[submatch(6) . submatch(5) . submatch(4) . submatch(3) . ]] ..
+ [[submatch(2) . submatch(1)', '')]]))
+ eq("[['A123456789'], ['9'], ['8'], ['7'], ['6'], ['5'], ['4'], ['3'], " ..
+ "['2'], ['1']]", eval([[substitute('A123456789', ]] ..
+ [['A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', ]] ..
+ [['\=string([submatch(0, 1), submatch(9, 1), submatch(8, 1), ]] ..
+ [[submatch(7, 1), submatch(6, 1), submatch(5, 1), submatch(4, 1), ]] ..
+ [[submatch(3, 1), submatch(2, 1), submatch(1, 1)])', '')]]))
+ end)
+
+ -- TEST_6 was about the 'cpoptions' flag / which was removed in pull request
+ -- #2943.
+
+ it('with submatch or \\ze (TEST_7)', function()
+ execute('set magic&')
+ eq('A\rA', eval("substitute('A\rA', 'A.', '\\=submatch(0)', '')"))
+ eq('B\nB', eval([[substitute("B\nB", 'B.', '\=submatch(0)', '')]]))
+ eq("['B\n']B",
+ eval([[substitute("B\nB", 'B.', '\=string(submatch(0, 1))', '')]]))
+ eq('-abab', eval([[substitute('-bb', '\zeb', 'a', 'g')]]))
+ eq('c-cbcbc', eval([[substitute('-bb', '\ze', 'c', 'g')]]))
+ end)
+
+ it('with \\zs and \\ze (TEST_10)', function()
+ execute('set magic&')
+ eq('a1a2a3a', eval([[substitute('123', '\zs', 'a', 'g')]]))
+ eq('aaa', eval([[substitute('123', '\zs.', 'a', 'g')]]))
+ eq('1a2a3a', eval([[substitute('123', '.\zs', 'a', 'g')]]))
+ eq('a1a2a3a', eval([[substitute('123', '\ze', 'a', 'g')]]))
+ eq('a1a2a3', eval([[substitute('123', '\ze.', 'a', 'g')]]))
+ eq('aaa', eval([[substitute('123', '.\ze', 'a', 'g')]]))
+ eq('aa2a3a', eval([[substitute('123', '1\|\ze', 'a', 'g')]]))
+ eq('1aaa', eval([[substitute('123', '1\zs\|[23]', 'a', 'g')]]))
+ end)
+end)
+
+describe(':substitue', function()
+ before_each(clear)
+
+ it('with \\ze and \\zs and confirmation dialog (TEST_8)', function()
+ insert([[
+ ,,X
+ ,,Y
+ ,,Z]])
+ execute('set magic&')
+ execute([[1s/\(^\|,\)\ze\(,\|X\)/\1N/g]])
+ execute([[2s/\(^\|,\)\ze\(,\|Y\)/\1N/gc]])
+ feed('a') -- For the dialog of the previous :s command.
+ execute([[3s/\(^\|,\)\ze\(,\|Z\)/\1N/gc]])
+ feed('yy') -- For the dialog of the previous :s command.
+ expect([[
+ N,,NX
+ N,,NY
+ N,,NZ]])
+ end)
+
+ it('with confirmation dialog (TEST_9)', function()
+ insert('xxx')
+ execute('set magic&')
+ execute('s/x/X/gc')
+ feed('yyq') -- For the dialog of the previous :s command.
+ expect('XXx')
+ end)
+end)
diff --git a/test/functional/terminal/highlight_spec.lua b/test/functional/terminal/highlight_spec.lua
index b72527e7b6..1a96cb4dba 100644
--- a/test/functional/terminal/highlight_spec.lua
+++ b/test/functional/terminal/highlight_spec.lua
@@ -3,6 +3,7 @@ local Screen = require('test.functional.ui.screen')
local thelpers = require('test.functional.terminal.helpers')
local feed, clear, nvim = helpers.feed, helpers.clear, helpers.nvim
local nvim_dir, execute = helpers.nvim_dir, helpers.execute
+local eq, eval = helpers.eq, helpers.eval
describe('terminal window highlighting', function()
@@ -161,3 +162,27 @@ describe('terminal window highlighting with custom palette', function()
]])
end)
end)
+
+describe('synIDattr()', function()
+ local screen
+
+ before_each(function()
+ clear()
+ screen = Screen.new(50, 7)
+ execute('highlight Normal ctermfg=1 guifg=#ff0000')
+ end)
+
+ after_each(function()
+ screen:detach()
+ end)
+
+ it('returns RGB number if GUI', function()
+ screen:attach(true)
+ eq('#ff0000', eval('synIDattr(hlID("Normal"), "fg")'))
+ end)
+
+ it('returns color number if non-GUI', function()
+ screen:attach(false)
+ eq('1', eval('synIDattr(hlID("Normal"), "fg")'))
+ end)
+end)
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua
index 60198bb008..1d616ed853 100644
--- a/test/functional/ui/screen.lua
+++ b/test/functional/ui/screen.lua
@@ -340,12 +340,9 @@ function Screen:_handle_mouse_off()
self._mouse_enabled = false
end
-function Screen:_handle_insert_mode()
- self._mode = 'insert'
-end
-
-function Screen:_handle_normal_mode()
- self._mode = 'normal'
+function Screen:_handle_mode_change(mode)
+ assert(mode == 'insert' or mode == 'replace' or mode == 'normal')
+ self._mode = mode
end
function Screen:_handle_set_scroll_region(top, bot, left, right)
diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua
index 472c211ab7..421c167300 100644
--- a/test/functional/ui/screen_basic_spec.lua
+++ b/test/functional/ui/screen_basic_spec.lua
@@ -63,6 +63,29 @@ describe('Screen', function()
end
end)
end)
+
+ it('has correct default title with unnamed file', function()
+ local expected = '[No Name] - NVIM'
+ execute('set title')
+ screen:wait(function()
+ local actual = screen.title
+ if actual ~= expected then
+ return 'Expected title to be "'..expected..'" but was "'..actual..'"'
+ end
+ end)
+ end)
+
+ it('has correct default title with named file', function()
+ local expected = 'myfile (/mydir) - NVIM'
+ execute('set title')
+ execute('file /mydir/myfile')
+ screen:wait(function()
+ local actual = screen.title
+ if actual ~= expected then
+ return 'Expected title to be "'..expected..'" but was "'..actual..'"'
+ end
+ end)
+ end)
end)
describe(':set icon', function()
diff --git a/test/unit/os/fs_spec.lua b/test/unit/os/fs_spec.lua
index 2ffffb907f..20aca9109e 100644
--- a/test/unit/os/fs_spec.lua
+++ b/test/unit/os/fs_spec.lua
@@ -486,6 +486,16 @@ describe('fs function', function()
return fs.os_rmdir(to_cstr(path))
end
+ local function os_mkdir_recurse(path, mode)
+ local failed_str = ffi.new('char *[1]', {nil})
+ local ret = fs.os_mkdir_recurse(path, mode, failed_str)
+ local str = failed_str[0]
+ if str ~= nil then
+ str = ffi.string(str)
+ end
+ return ret, str
+ end
+
describe('os_mkdir', function()
it('returns non-zero when given an already existing directory', function()
local mode = ffi.C.kS_IRUSR + ffi.C.kS_IWUSR + ffi.C.kS_IXUSR
@@ -501,6 +511,59 @@ describe('fs function', function()
end)
end)
+ describe('os_mkdir_recurse', function()
+ it('returns zero when given an already existing directory', function()
+ local mode = ffi.C.kS_IRUSR + ffi.C.kS_IWUSR + ffi.C.kS_IXUSR
+ local ret, failed_str = os_mkdir_recurse('unit-test-directory', mode)
+ eq(0, ret)
+ eq(nil, failed_str)
+ end)
+
+ it('fails to create a directory where there is a file', function()
+ local mode = ffi.C.kS_IRUSR + ffi.C.kS_IWUSR + ffi.C.kS_IXUSR
+ local ret, failed_str = os_mkdir_recurse(
+ 'unit-test-directory/test.file', mode)
+ neq(0, ret)
+ eq('unit-test-directory/test.file', failed_str)
+ end)
+
+ it('fails to create a directory where there is a file in path', function()
+ local mode = ffi.C.kS_IRUSR + ffi.C.kS_IWUSR + ffi.C.kS_IXUSR
+ local ret, failed_str = os_mkdir_recurse(
+ 'unit-test-directory/test.file/test', mode)
+ neq(0, ret)
+ eq('unit-test-directory/test.file', failed_str)
+ end)
+
+ it('succeeds to create a directory', function()
+ local mode = ffi.C.kS_IRUSR + ffi.C.kS_IWUSR + ffi.C.kS_IXUSR
+ local ret, failed_str = os_mkdir_recurse(
+ 'unit-test-directory/new-dir-recurse', mode)
+ eq(0, ret)
+ eq(nil, failed_str)
+ eq(true, os_isdir('unit-test-directory/new-dir-recurse'))
+ lfs.rmdir('unit-test-directory/new-dir-recurse')
+ eq(false, os_isdir('unit-test-directory/new-dir-recurse'))
+ end)
+
+ it('succeeds to create a directory tree', function()
+ local mode = ffi.C.kS_IRUSR + ffi.C.kS_IWUSR + ffi.C.kS_IXUSR
+ local ret, failed_str = os_mkdir_recurse(
+ 'unit-test-directory/new-dir-recurse/1/2/3', mode)
+ eq(0, ret)
+ eq(nil, failed_str)
+ eq(true, os_isdir('unit-test-directory/new-dir-recurse'))
+ eq(true, os_isdir('unit-test-directory/new-dir-recurse/1'))
+ eq(true, os_isdir('unit-test-directory/new-dir-recurse/1/2'))
+ eq(true, os_isdir('unit-test-directory/new-dir-recurse/1/2/3'))
+ lfs.rmdir('unit-test-directory/new-dir-recurse/1/2/3')
+ lfs.rmdir('unit-test-directory/new-dir-recurse/1/2')
+ lfs.rmdir('unit-test-directory/new-dir-recurse/1')
+ lfs.rmdir('unit-test-directory/new-dir-recurse')
+ eq(false, os_isdir('unit-test-directory/new-dir-recurse'))
+ end)
+ end)
+
describe('os_rmdir', function()
it('returns non_zero when given a non-existing directory', function()
neq(0, (os_rmdir('non-existing-directory')))
diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt
index 50f610008d..ff4a11b417 100644
--- a/third-party/CMakeLists.txt
+++ b/third-party/CMakeLists.txt
@@ -6,10 +6,10 @@ project(NEOVIM_DEPS)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
set(DEPS_INSTALL_DIR "${CMAKE_BINARY_DIR}/usr" CACHE PATH "Dependencies install directory.")
-set(DEPS_BIN_DIR "${DEPS_INSTALL_DIR}/bin")
-set(DEPS_LIB_DIR "${DEPS_INSTALL_DIR}/lib")
-set(DEPS_BUILD_DIR "${CMAKE_BINARY_DIR}/build")
-set(DEPS_DOWNLOAD_DIR "${DEPS_BUILD_DIR}/downloads")
+set(DEPS_BIN_DIR "${DEPS_INSTALL_DIR}/bin" CACHE PATH "Dependencies binary install directory.")
+set(DEPS_LIB_DIR "${DEPS_INSTALL_DIR}/lib" CACHE PATH "Dependencies library install directory.")
+set(DEPS_BUILD_DIR "${CMAKE_BINARY_DIR}/build" CACHE PATH "Dependencies build directory.")
+set(DEPS_DOWNLOAD_DIR "${DEPS_BUILD_DIR}/downloads" CACHE PATH "Dependencies download directory.")
option(USE_BUNDLED "Use bundled dependencies." ON)
diff --git a/third-party/cmake/BuildLuarocks.cmake b/third-party/cmake/BuildLuarocks.cmake
index ff1f57442d..14454fa5a0 100644
--- a/third-party/cmake/BuildLuarocks.cmake
+++ b/third-party/cmake/BuildLuarocks.cmake
@@ -113,40 +113,10 @@ add_custom_target(lpeg
list(APPEND THIRD_PARTY_DEPS lpeg)
if(USE_BUNDLED_BUSTED)
- # The following are only required if we want to run tests
- # with busted
- add_custom_command(OUTPUT ${HOSTDEPS_LIB_DIR}/luarocks/rocks/stable-busted-deps
- COMMAND ${LUAROCKS_BINARY}
- ARGS build lua_cliargs 2.5-1 ${LUAROCKS_BUILDARGS}
- COMMAND ${LUAROCKS_BINARY}
- ARGS build luafilesystem 1.6.3-1 ${LUAROCKS_BUILDARGS}
- COMMAND ${LUAROCKS_BINARY}
- ARGS build dkjson 2.5-2 ${LUAROCKS_BUILDARGS}
- COMMAND ${LUAROCKS_BINARY}
- ARGS build say 1.3-0 ${LUAROCKS_BUILDARGS}
- COMMAND ${LUAROCKS_BINARY}
- ARGS build luassert 1.7.6-0 ${LUAROCKS_BUILDARGS}
- COMMAND ${LUAROCKS_BINARY}
- ARGS build lua-term 0.3-1 ${LUAROCKS_BUILDARGS}
- COMMAND ${LUAROCKS_BINARY}
- ARGS build penlight 1.3.2-2 ${LUAROCKS_BUILDARGS}
- COMMAND ${LUAROCKS_BINARY}
- ARGS build mediator_lua 1.1.1-0 ${LUAROCKS_BUILDARGS}
- COMMAND ${LUAROCKS_BINARY}
- ARGS build luasocket 3.0rc1-2 ${LUAROCKS_BUILDARGS}
- COMMAND ${LUAROCKS_BINARY}
- ARGS build xml 1.1.2-1 ${LUAROCKS_BUILDARGS}
- COMMAND ${LUAROCKS_BINARY}
- ARGS build ansicolors 1.0.2-3 ${LUAROCKS_BUILDARGS}
- COMMAND ${CMAKE_COMMAND} -E touch ${HOSTDEPS_LIB_DIR}/luarocks/rocks/stable-busted-deps
- DEPENDS lpeg)
- add_custom_target(stable-busted-deps
- DEPENDS ${HOSTDEPS_LIB_DIR}/luarocks/rocks/stable-busted-deps)
-
add_custom_command(OUTPUT ${HOSTDEPS_BIN_DIR}/busted
COMMAND ${LUAROCKS_BINARY}
- ARGS build https://raw.githubusercontent.com/Olivine-Labs/busted/v2.0.rc8-0/busted-2.0.rc8-0.rockspec ${LUAROCKS_BUILDARGS}
- DEPENDS stable-busted-deps)
+ ARGS build https://raw.githubusercontent.com/Olivine-Labs/busted/v2.0.rc10-0/busted-2.0.rc10-0.rockspec ${LUAROCKS_BUILDARGS}
+ DEPENDS luarocks)
add_custom_target(busted
DEPENDS ${HOSTDEPS_BIN_DIR}/busted)
@@ -157,5 +127,5 @@ if(USE_BUNDLED_BUSTED)
add_custom_target(nvim-client
DEPENDS ${HOSTDEPS_LIB_DIR}/luarocks/rocks/nvim-client)
- list(APPEND THIRD_PARTY_DEPS stable-busted-deps busted nvim-client)
+ list(APPEND THIRD_PARTY_DEPS busted nvim-client)
endif()