summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:40:16 +0000
commit6af24b2457752c0d36aaf9f29f03d39afd09937f (patch)
tree2671b594908d1f971de6b2a2d473f97dfb7291d2
parentReleasing progress-linux version 2:9.1.0016-1~progress7.99u1. (diff)
downloadvim-6af24b2457752c0d36aaf9f29f03d39afd09937f.tar.xz
vim-6af24b2457752c0d36aaf9f29f03d39afd09937f.zip
Merging upstream version 2:9.1.0199.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--.github/CODEOWNERS64
-rw-r--r--.github/workflows/ci.yml49
-rw-r--r--.gitignore5
-rw-r--r--Filelist85
-rw-r--r--READMEdir/README_vimlogo.txt11
-rw-r--r--ci/remove_snap.sh13
-rw-r--r--nsis/README.txt18
-rw-r--r--nsis/gvim.nsi80
-rw-r--r--nsis/lang/greek.nsi276
-rw-r--r--nsis/lang/russian.nsi102
-rw-r--r--nsis/lang/serbian.nsi2
-rw-r--r--runtime/autoload/dist/ft.vim6
-rw-r--r--runtime/autoload/dist/man.vim20
-rw-r--r--runtime/autoload/dist/vimindent.vim5
-rw-r--r--runtime/autoload/getscript.vim3
-rw-r--r--runtime/autoload/netrw.vim115
-rw-r--r--runtime/autoload/netrwFileHandlers.vim3
-rw-r--r--runtime/autoload/netrwSettings.vim3
-rw-r--r--runtime/autoload/tar.vim39
-rw-r--r--runtime/autoload/vimball.vim5
-rw-r--r--runtime/autoload/zip.vim3
-rw-r--r--runtime/colors/blue.vim18
-rw-r--r--runtime/colors/darkblue.vim10
-rw-r--r--runtime/colors/evening.vim14
-rw-r--r--runtime/colors/habamax.vim22
-rw-r--r--runtime/colors/lists/csscolors.vim12
-rw-r--r--runtime/colors/lists/default.vim43
-rw-r--r--runtime/colors/lunaperche.vim32
-rw-r--r--runtime/colors/murphy.vim4
-rw-r--r--runtime/colors/wildcharm.vim70
-rw-r--r--runtime/doc/Make_mvc.mak77
-rw-r--r--runtime/doc/Makefile55
-rw-r--r--runtime/doc/autocmd.txt36
-rw-r--r--runtime/doc/builtin.txt266
-rw-r--r--runtime/doc/diff.txt46
-rw-r--r--runtime/doc/editing.txt7
-rw-r--r--runtime/doc/eval.txt88
-rw-r--r--runtime/doc/filetype.txt18
-rw-r--r--runtime/doc/ft_ada.txt2
-rw-r--r--runtime/doc/ft_sql.txt2
-rw-r--r--runtime/doc/gui_w32.txt36
-rw-r--r--runtime/doc/gui_x11.txt14
-rw-r--r--runtime/doc/if_ole.txt6
-rw-r--r--runtime/doc/indent.txt8
-rw-r--r--runtime/doc/index.txt2
-rw-r--r--runtime/doc/intro.txt4
-rw-r--r--runtime/doc/maketags.awk7
-rw-r--r--runtime/doc/map.txt26
-rw-r--r--runtime/doc/message.txt9
-rw-r--r--runtime/doc/options.txt60
-rw-r--r--runtime/doc/os_vms.txt2
-rw-r--r--runtime/doc/pi_netrw.txt43
-rw-r--r--runtime/doc/quickfix.txt14
-rw-r--r--runtime/doc/quickref.txt3
-rw-r--r--runtime/doc/starting.txt138
-rw-r--r--runtime/doc/syntax.txt51
-rw-r--r--runtime/doc/tags46
-rw-r--r--runtime/doc/tagsrch.txt35
-rw-r--r--runtime/doc/term.txt5
-rw-r--r--runtime/doc/terminal.txt29
-rw-r--r--runtime/doc/testing.txt13
-rw-r--r--runtime/doc/todo.txt12
-rw-r--r--runtime/doc/usr_41.txt8
-rw-r--r--runtime/doc/version9.txt86
-rw-r--r--runtime/doc/vim9.txt28
-rw-r--r--runtime/doc/vim9class.txt35
-rw-r--r--runtime/doc/windows.txt32
-rw-r--r--runtime/filetype.vim24
-rw-r--r--runtime/ftplugin/aap.vim9
-rw-r--r--runtime/ftplugin/abap.vim15
-rw-r--r--runtime/ftplugin/abaqus.vim9
-rw-r--r--runtime/ftplugin/ant.vim15
-rw-r--r--runtime/ftplugin/asciidoc.vim67
-rw-r--r--runtime/ftplugin/aspvbs.vim15
-rw-r--r--runtime/ftplugin/awk.vim14
-rw-r--r--runtime/ftplugin/basic.vim10
-rw-r--r--runtime/ftplugin/c.vim32
-rw-r--r--runtime/ftplugin/clojure.vim9
-rw-r--r--runtime/ftplugin/cobol.vim9
-rw-r--r--runtime/ftplugin/config.vim15
-rw-r--r--runtime/ftplugin/cs.vim11
-rw-r--r--runtime/ftplugin/csh.vim10
-rw-r--r--runtime/ftplugin/deb822sources.vim16
-rw-r--r--runtime/ftplugin/diff.vim9
-rw-r--r--runtime/ftplugin/dosbatch.vim12
-rw-r--r--runtime/ftplugin/dtd.vim15
-rw-r--r--runtime/ftplugin/eiffel.vim10
-rw-r--r--runtime/ftplugin/eruby.vim11
-rw-r--r--runtime/ftplugin/expect.vim10
-rw-r--r--runtime/ftplugin/falcon.vim13
-rw-r--r--runtime/ftplugin/forth.vim9
-rw-r--r--runtime/ftplugin/fortran.vim10
-rw-r--r--runtime/ftplugin/fpcmake.vim12
-rw-r--r--runtime/ftplugin/freebasic.vim10
-rw-r--r--runtime/ftplugin/haml.vim15
-rw-r--r--runtime/ftplugin/html.vim12
-rw-r--r--runtime/ftplugin/hurl.vim11
-rw-r--r--runtime/ftplugin/icon.vim16
-rw-r--r--runtime/ftplugin/ishd.vim10
-rw-r--r--runtime/ftplugin/j.vim7
-rw-r--r--runtime/ftplugin/java.vim15
-rw-r--r--runtime/ftplugin/javascript.vim8
-rw-r--r--runtime/ftplugin/json5.vim10
-rw-r--r--runtime/ftplugin/jsp.vim15
-rw-r--r--runtime/ftplugin/kotlin.vim10
-rw-r--r--runtime/ftplugin/kwt.vim15
-rw-r--r--runtime/ftplugin/lua.vim10
-rw-r--r--runtime/ftplugin/lynx.vim10
-rw-r--r--runtime/ftplugin/m3build.vim10
-rw-r--r--runtime/ftplugin/m3quake.vim10
-rw-r--r--runtime/ftplugin/meson.vim9
-rw-r--r--runtime/ftplugin/mf.vim7
-rw-r--r--runtime/ftplugin/modula2.vim10
-rw-r--r--runtime/ftplugin/modula3.vim10
-rw-r--r--runtime/ftplugin/mp.vim7
-rw-r--r--runtime/ftplugin/msmessages.vim13
-rw-r--r--runtime/ftplugin/occam.vim17
-rw-r--r--runtime/ftplugin/octave.vim10
-rw-r--r--runtime/ftplugin/odin.vim20
-rw-r--r--runtime/ftplugin/pascal.vim10
-rw-r--r--runtime/ftplugin/perl.vim9
-rw-r--r--runtime/ftplugin/php.vim10
-rw-r--r--runtime/ftplugin/pod.vim10
-rw-r--r--runtime/ftplugin/poke.vim16
-rw-r--r--runtime/ftplugin/postscr.vim15
-rw-r--r--runtime/ftplugin/ps1.vim13
-rw-r--r--runtime/ftplugin/ps1xml.vim13
-rw-r--r--runtime/ftplugin/pyrex.vim13
-rw-r--r--runtime/ftplugin/python.vim9
-rw-r--r--runtime/ftplugin/qml.vim12
-rw-r--r--runtime/ftplugin/r.vim17
-rw-r--r--runtime/ftplugin/racket.vim9
-rw-r--r--runtime/ftplugin/readline.vim10
-rw-r--r--runtime/ftplugin/registry.vim15
-rw-r--r--runtime/ftplugin/rhelp.vim17
-rw-r--r--runtime/ftplugin/rmd.vim17
-rw-r--r--runtime/ftplugin/rnoweb.vim17
-rw-r--r--runtime/ftplugin/routeros.vim9
-rw-r--r--runtime/ftplugin/rrst.vim17
-rw-r--r--runtime/ftplugin/ruby.vim9
-rw-r--r--runtime/ftplugin/rust.vim31
-rw-r--r--runtime/ftplugin/sed.vim10
-rw-r--r--runtime/ftplugin/sgml.vim15
-rw-r--r--runtime/ftplugin/sh.vim16
-rw-r--r--runtime/ftplugin/solution.vim10
-rw-r--r--runtime/ftplugin/sql.vim13
-rw-r--r--runtime/ftplugin/svg.vim15
-rw-r--r--runtime/ftplugin/tcl.vim13
-rw-r--r--runtime/ftplugin/tcsh.vim10
-rw-r--r--runtime/ftplugin/tidy.vim16
-rw-r--r--runtime/ftplugin/typescript.vim15
-rw-r--r--runtime/ftplugin/vb.vim10
-rw-r--r--runtime/ftplugin/verilog.vim13
-rw-r--r--runtime/ftplugin/vhdl.vim14
-rw-r--r--runtime/ftplugin/vim.vim2
-rw-r--r--runtime/ftplugin/wget.vim10
-rw-r--r--runtime/ftplugin/wget2.vim10
-rw-r--r--runtime/ftplugin/xhtml.vim15
-rw-r--r--runtime/ftplugin/xml.vim9
-rw-r--r--runtime/ftplugin/xsd.vim15
-rw-r--r--runtime/ftplugin/xslt.vim2
-rw-r--r--runtime/indent/Make_mvc.mak21
-rw-r--r--runtime/indent/Makefile3
-rw-r--r--runtime/indent/odin.vim119
-rw-r--r--runtime/indent/qml.vim6
-rw-r--r--runtime/indent/r.vim8
-rw-r--r--runtime/indent/racket.vim4
-rw-r--r--runtime/indent/rhelp.vim8
-rw-r--r--runtime/indent/rmd.vim8
-rw-r--r--runtime/indent/rnoweb.vim8
-rw-r--r--runtime/indent/rrst.vim8
-rw-r--r--runtime/indent/testdir/runtest.vim38
-rw-r--r--runtime/indent/testdir/vim.in5
-rw-r--r--runtime/indent/testdir/vim.ok5
-rw-r--r--runtime/indent/yaml.vim7
-rw-r--r--runtime/lang/Make_mvc.mak227
-rw-r--r--runtime/lang/Makefile8
-rw-r--r--runtime/lang/menu_cs_cz.iso_8859-2.vim2
-rw-r--r--runtime/macros/less.vim232
-rw-r--r--runtime/mswin.vim24
-rw-r--r--runtime/optwin.vim3
-rw-r--r--runtime/pack/dist/opt/justify/plugin/justify.vim2
-rw-r--r--runtime/plugin/getscriptPlugin.vim3
-rw-r--r--runtime/plugin/logiPat.vim3
-rw-r--r--runtime/plugin/matchparen.vim3
-rw-r--r--runtime/plugin/netrwPlugin.vim3
-rw-r--r--runtime/plugin/tarPlugin.vim2
-rw-r--r--runtime/plugin/vimballPlugin.vim3
-rw-r--r--runtime/plugin/zipPlugin.vim3
-rw-r--r--runtime/syntax/Makefile9
-rw-r--r--runtime/syntax/amiga.vim5
-rw-r--r--runtime/syntax/ant.vim94
-rw-r--r--runtime/syntax/c.vim12
-rw-r--r--runtime/syntax/chuck.vim187
-rw-r--r--runtime/syntax/csh.vim5
-rw-r--r--runtime/syntax/css.vim19
-rw-r--r--runtime/syntax/dcl.vim5
-rw-r--r--runtime/syntax/deb822sources.vim24
-rw-r--r--runtime/syntax/debsources.vim9
-rw-r--r--runtime/syntax/dosbatch.vim31
-rw-r--r--runtime/syntax/elmfilt.vim5
-rw-r--r--runtime/syntax/exports.vim5
-rw-r--r--runtime/syntax/fortran.vim374
-rw-r--r--runtime/syntax/generator/Makefile43
-rw-r--r--runtime/syntax/generator/README.md26
-rw-r--r--runtime/syntax/generator/gen_syntax_vim.vim704
-rw-r--r--runtime/syntax/generator/update_date.vim14
-rw-r--r--runtime/syntax/generator/vim.vim.base1192
-rw-r--r--runtime/syntax/go.vim29
-rw-r--r--runtime/syntax/gpg.vim21
-rw-r--r--runtime/syntax/i3config.vim8
-rw-r--r--runtime/syntax/java.vim137
-rw-r--r--runtime/syntax/lex.vim6
-rw-r--r--runtime/syntax/lisp.vim6
-rw-r--r--runtime/syntax/mail.vim19
-rw-r--r--runtime/syntax/maple.vim6
-rw-r--r--runtime/syntax/netrw.vim6
-rw-r--r--runtime/syntax/odin.vim103
-rw-r--r--runtime/syntax/quarto.vim8
-rw-r--r--runtime/syntax/r.vim14
-rw-r--r--runtime/syntax/rhelp.vim10
-rw-r--r--runtime/syntax/rmd.vim8
-rw-r--r--runtime/syntax/rpcgen.vim6
-rw-r--r--runtime/syntax/sh.vim48
-rw-r--r--runtime/syntax/shared/debversions.vim6
-rw-r--r--runtime/syntax/sm.vim6
-rw-r--r--runtime/syntax/spec.vim2
-rw-r--r--runtime/syntax/swayconfig.vim12
-rw-r--r--runtime/syntax/tags.vim6
-rw-r--r--runtime/syntax/testdir/README.txt45
-rw-r--r--runtime/syntax/testdir/dumps/c_00.dump4
-rw-r--r--runtime/syntax/testdir/dumps/c_01.dump10
-rw-r--r--runtime/syntax/testdir/dumps/c_02.dump10
-rw-r--r--runtime/syntax/testdir/dumps/c_03.dump10
-rw-r--r--runtime/syntax/testdir/dumps/c_04.dump6
-rw-r--r--runtime/syntax/testdir/dumps/c_05.dump10
-rw-r--r--runtime/syntax/testdir/dumps/c_06.dump10
-rw-r--r--runtime/syntax/testdir/dumps/c_99.dump2
-rw-r--r--runtime/syntax/testdir/dumps/java_comments_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_comments_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_comments_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_escapes_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_escapes_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_escapes_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_escapes_03.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_escapes_04.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_escapes_05.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_escapes_06.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_escapes_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_numbers_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_numbers_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_numbers_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_numbers_03.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_numbers_04.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_numbers_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_string_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_string_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_string_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_string_03.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_string_04.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_string_05.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_string_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_switch_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_switch_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_switch_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_switch_03.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_switch_04.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_switch_05.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_switch_06.dump20
-rw-r--r--runtime/syntax/testdir/dumps/java_switch_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/markdown_conceal_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/markdown_conceal_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/modula2_iso_00.dump2
-rw-r--r--runtime/syntax/testdir/dumps/modula2_pim_00.dump2
-rw-r--r--runtime/syntax/testdir/dumps/modula2_r10_00.dump2
-rw-r--r--runtime/syntax/testdir/dumps/sh_10_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/sh_10_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/sh_10_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/sh_10_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/sh_11_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/sh_11_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_abbreviate_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_abbreviate_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_abbreviate_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_augroup_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_augroup_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_behave_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_behave_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_command_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_command_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_00.dump6
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_01.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_02.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_03.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_04.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_05.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_06.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_07.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_08.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_09.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_10.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_11.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_12.dump12
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_13.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_14.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_15.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_16.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_17.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_18.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_19.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_20.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_21.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_22.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_23.dump12
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_24.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_25.dump12
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_26.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_27.dump12
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_28.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_29.dump12
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_30.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_31.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_32.dump10
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_33.dump12
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_34.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_35.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_36.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_37.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_38.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_39.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_40.dump16
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_41.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_42.dump16
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_43.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_44.dump16
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_45.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_46.dump16
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_47.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_48.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_49.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_50.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_51.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_52.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_53.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_54.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_55.dump16
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_56.dump16
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_57.dump16
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_58.dump16
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_59.dump16
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_60.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_61.dump16
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_62.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_63.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_64.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_65.dump14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_66.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_commands_99.dump2
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_03.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_04.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_05.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_06.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_fold_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_fold_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_fold_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_fold_03.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_fold_04.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_fold_05.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_fold_06.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_def_fold_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_echo_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_echo_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_echo_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_execute_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_execute_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_execute_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_execute_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_func_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_func_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_03.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_04.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_05.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_06.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_07.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_08.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_09.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_fold_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_fold_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_fold_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_fold_03.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_fold_04.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_fold_05.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_fold_06.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_fold_07.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_fold_08.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_fold_09.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_function_fold_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_highlight_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_highlight_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_highlight_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_highlight_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_map_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_map_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_map_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_map_03.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_map_04.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_map_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_menu_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_menu_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_menu_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_menu_03.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_menu_04.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_menu_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_menutranslate_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_menutranslate_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_menutranslate_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_menutranslate_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_substitute_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_substitute_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_substitute_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_substitute_03.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_substitute_04.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_substitute_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_03.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_04.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_05.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_06.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_07.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_08.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_09.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_expr_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_expr_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_expr_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_expr_03.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_expr_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_key_notation_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_key_notation_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_key_notation_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_key_notation_03.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_key_notation_04.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_key_notation_05.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_key_notation_06.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_key_notation_07.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_key_notation_08.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_key_notation_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_keymap_00.dump2
-rw-r--r--runtime/syntax/testdir/dumps/vim_line_continuation_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_line_continuation_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_line_continuation_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_line_continuation_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_new_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_new_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_syntax_00.dump30
-rw-r--r--runtime/syntax/testdir/dumps/vim_syntax_01.dump28
-rw-r--r--runtime/syntax/testdir/dumps/vim_syntax_02.dump40
-rw-r--r--runtime/syntax/testdir/dumps/vim_syntax_03.dump40
-rw-r--r--runtime/syntax/testdir/dumps/vim_syntax_04.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_syntax_05.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_syntax_06.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_syntax_07.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_syntax_08.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_syntax_99.dump30
-rw-r--r--runtime/syntax/testdir/dumps/vim_variables_00.dump2
-rw-r--r--runtime/syntax/testdir/dumps/vim_variables_01.dump2
-rw-r--r--runtime/syntax/testdir/ftplugin/java.vim5
-rw-r--r--runtime/syntax/testdir/input/c.c1
-rw-r--r--runtime/syntax/testdir/input/java_comments.java25
-rw-r--r--runtime/syntax/testdir/input/java_escapes.java123
-rw-r--r--runtime/syntax/testdir/input/java_numbers.java88
-rw-r--r--runtime/syntax/testdir/input/java_string.java104
-rw-r--r--runtime/syntax/testdir/input/java_switch.java122
-rw-r--r--runtime/syntax/testdir/input/markdown_conceal.markdown15
-rw-r--r--runtime/syntax/testdir/input/setup/markdown_conceal.vim8
-rw-r--r--runtime/syntax/testdir/input/sh_10.sh49
-rw-r--r--runtime/syntax/testdir/input/sh_11.sh20
-rw-r--r--runtime/syntax/testdir/input/vim_ex_abbreviate.vim25
-rw-r--r--runtime/syntax/testdir/input/vim_ex_augroup.vim19
-rw-r--r--runtime/syntax/testdir/input/vim_ex_behave.vim7
-rw-r--r--runtime/syntax/testdir/input/vim_ex_command.vim5
-rw-r--r--runtime/syntax/testdir/input/vim_ex_commands.vim4
-rw-r--r--runtime/syntax/testdir/input/vim_ex_def.vim125
-rw-r--r--runtime/syntax/testdir/input/vim_ex_def_fold.vim126
-rw-r--r--runtime/syntax/testdir/input/vim_ex_echo.vim38
-rw-r--r--runtime/syntax/testdir/input/vim_ex_execute.vim41
-rw-r--r--runtime/syntax/testdir/input/vim_ex_function.vim182
-rw-r--r--runtime/syntax/testdir/input/vim_ex_function_fold.vim183
-rw-r--r--runtime/syntax/testdir/input/vim_ex_highlight.vim55
-rw-r--r--runtime/syntax/testdir/input/vim_ex_map.vim87
-rw-r--r--runtime/syntax/testdir/input/vim_ex_menu.vim87
-rw-r--r--runtime/syntax/testdir/input/vim_ex_menutranslate.vim51
-rw-r--r--runtime/syntax/testdir/input/vim_ex_substitute.vim86
-rw-r--r--runtime/syntax/testdir/input/vim_ex_syntax.vim177
-rw-r--r--runtime/syntax/testdir/input/vim_expr.vim71
-rw-r--r--runtime/syntax/testdir/input/vim_key_notation.vim163
-rw-r--r--runtime/syntax/testdir/input/vim_line_continuation.vim49
-rw-r--r--runtime/syntax/testdir/input/vim_new.vim17
-rw-r--r--runtime/syntax/testdir/input/vim_syntax.vim75
-rw-r--r--runtime/syntax/testdir/runtest.vim320
-rw-r--r--runtime/syntax/tex.vim6
-rw-r--r--runtime/syntax/tmux.vim8
-rw-r--r--runtime/syntax/vim.vim550
-rw-r--r--runtime/syntax/xmath.vim6
-rw-r--r--runtime/syntax/xxd.vim6
-rw-r--r--runtime/syntax/yacc.vim5
-rw-r--r--runtime/tutor/Make_mvc.mak79
-rw-r--r--runtime/tutor/Makefile57
-rw-r--r--runtime/tutor/tutor.lt.utf-81061
-rw-r--r--runtime/tutor/tutor.zh.euc2
-rw-r--r--runtime/tutor/tutor.zh_cn.utf-82
-rw-r--r--runtime/vimlogo.svg44
-rw-r--r--src/Make_mvc.mak4
-rw-r--r--src/Makefile2
-rw-r--r--src/arglist.c19
-rwxr-xr-xsrc/auto/configure19
-rw-r--r--src/autocmd.c68
-rw-r--r--src/blob.c37
-rw-r--r--src/buffer.c246
-rw-r--r--src/change.c45
-rw-r--r--src/channel.c2
-rw-r--r--src/charset.c71
-rw-r--r--src/cindent.c3
-rw-r--r--src/clientserver.c8
-rw-r--r--src/clipboard.c3
-rw-r--r--src/config.mk.in1
-rw-r--r--src/configure.ac13
-rw-r--r--src/dict.c5
-rw-r--r--src/diff.c283
-rw-r--r--src/drawline.c277
-rw-r--r--src/drawscreen.c44
-rw-r--r--src/edit.c55
-rw-r--r--src/errors.h25
-rw-r--r--src/eval.c50
-rw-r--r--src/evalbuffer.c1
-rw-r--r--src/evalfunc.c286
-rw-r--r--src/evalvars.c35
-rw-r--r--src/evalwindow.c102
-rw-r--r--src/ex_cmds.c39
-rw-r--r--src/ex_cmds.h2
-rw-r--r--src/ex_cmds2.c30
-rw-r--r--src/ex_docmd.c15
-rw-r--r--src/ex_getln.c58
-rw-r--r--src/fileio.c15
-rw-r--r--src/fold.c14
-rw-r--r--src/getchar.c12
-rw-r--r--src/globals.h4
-rw-r--r--src/gui.c19
-rw-r--r--src/gui.h7
-rw-r--r--src/gui_beval.c1
-rw-r--r--src/gui_gtk_x11.c336
-rw-r--r--src/gui_w32.c525
-rw-r--r--src/gui_xim.c7
-rw-r--r--src/help.c2
-rw-r--r--src/highlight.c97
-rw-r--r--src/if_lua.c5
-rw-r--r--src/if_perl.xs2
-rw-r--r--src/if_py_both.h3
-rw-r--r--src/if_ruby.c2
-rw-r--r--src/if_tcl.c3
-rw-r--r--src/indent.c72
-rw-r--r--src/insexpand.c153
-rw-r--r--src/keymap.h4
-rw-r--r--src/list.c81
-rw-r--r--src/mbyte.c35
-rw-r--r--src/memline.c78
-rw-r--r--src/misc1.c5
-rw-r--r--src/misc2.c24
-rw-r--r--src/mouse.c46
-rw-r--r--src/move.c5
-rw-r--r--src/netbeans.c17
-rw-r--r--src/normal.c53
-rw-r--r--src/ops.c196
-rw-r--r--src/option.c57
-rw-r--r--src/option.h11
-rw-r--r--src/optiondefs.h29
-rw-r--r--src/optionstr.c56
-rw-r--r--src/os_mswin.c62
-rw-r--r--src/os_unix.c13
-rw-r--r--src/os_win32.c19
-rw-r--r--src/po/Make_mvc.mak238
-rw-r--r--src/po/Makefile142
-rw-r--r--src/po/README.txt13
-rw-r--r--src/po/README_mingw.txt6
-rw-r--r--src/po/README_mvc.txt52
-rw-r--r--src/po/ca.po34
-rw-r--r--src/po/hu.po2
-rw-r--r--src/po/it.po62
-rw-r--r--src/po/ru.cp1251.po446
-rw-r--r--src/po/ru.po689
-rw-r--r--src/po/sr.po51
-rw-r--r--src/popupwin.c4
-rw-r--r--src/profiler.c8
-rw-r--r--src/proto/diff.pro1
-rw-r--r--src/proto/evalvars.pro2
-rw-r--r--src/proto/getchar.pro2
-rw-r--r--src/proto/gui_gtk_x11.pro2
-rw-r--r--src/proto/indent.pro4
-rw-r--r--src/proto/list.pro1
-rw-r--r--src/proto/memline.pro5
-rw-r--r--src/proto/move.pro1
-rw-r--r--src/proto/ops.pro1
-rw-r--r--src/proto/option.pro1
-rw-r--r--src/proto/optionstr.pro1
-rw-r--r--src/proto/os_mswin.pro1
-rw-r--r--src/proto/screen.pro6
-rw-r--r--src/proto/search.pro2
-rw-r--r--src/proto/term.pro1
-rw-r--r--src/proto/typval.pro1
-rw-r--r--src/proto/undo.pro3
-rw-r--r--src/proto/userfunc.pro1
-rw-r--r--src/proto/vim9class.pro9
-rw-r--r--src/proto/window.pro12
-rw-r--r--src/quickfix.c79
-rw-r--r--src/regexp.c3
-rw-r--r--src/register.c91
-rw-r--r--src/screen.c135
-rw-r--r--src/scriptfile.c2
-rw-r--r--src/search.c44
-rw-r--r--src/spell.c4
-rw-r--r--src/spellfile.c2
-rw-r--r--src/spellsuggest.c16
-rw-r--r--src/strings.c153
-rw-r--r--src/structs.h35
-rw-r--r--src/syntax.c12
-rw-r--r--src/tag.c8
-rw-r--r--src/term.c41
-rw-r--r--src/termdefs.h6
-rw-r--r--src/terminal.c5
-rw-r--r--src/testdir/Make_all.mak4
-rw-r--r--src/testdir/check.vim8
-rw-r--r--src/testdir/dumps/Test_balloon_eval_term_02.dump2
-rw-r--r--src/testdir/dumps/Test_conceal_cul_wcr_01.dump4
-rw-r--r--src/testdir/dumps/Test_conceal_cul_wcr_02.dump4
-rw-r--r--src/testdir/dumps/Test_conceal_cul_wcr_03.dump4
-rw-r--r--src/testdir/dumps/Test_conceal_cul_wcr_rl_01.dump4
-rw-r--r--src/testdir/dumps/Test_conceal_cul_wcr_rl_02.dump4
-rw-r--r--src/testdir/dumps/Test_conceal_cul_wcr_rl_03.dump4
-rw-r--r--src/testdir/dumps/Test_conceal_double_width_1.dump4
-rw-r--r--src/testdir/dumps/Test_conceal_double_width_2.dump4
-rw-r--r--src/testdir/dumps/Test_conceal_double_width_3.dump4
-rw-r--r--src/testdir/dumps/Test_conceal_double_width_4.dump4
-rw-r--r--src/testdir/dumps/Test_conceal_double_width_wrap_1.dump4
-rw-r--r--src/testdir/dumps/Test_conceal_double_width_wrap_2.dump4
-rw-r--r--src/testdir/dumps/Test_conceal_double_width_wrap_3.dump4
-rw-r--r--src/testdir/dumps/Test_conceal_double_width_wrap_4.dump4
-rw-r--r--src/testdir/dumps/Test_conceal_ve_after_eol_1.dump3
-rw-r--r--src/testdir/dumps/Test_conceal_ve_after_eol_2.dump3
-rw-r--r--src/testdir/dumps/Test_conceal_ve_after_eol_3.dump3
-rw-r--r--src/testdir/dumps/Test_conceal_ve_after_eol_4.dump3
-rw-r--r--src/testdir/dumps/Test_conceal_ve_after_eol_5.dump3
-rw-r--r--src/testdir/dumps/Test_conceal_ve_after_eol_rl_1.dump3
-rw-r--r--src/testdir/dumps/Test_conceal_ve_after_eol_rl_2.dump3
-rw-r--r--src/testdir/dumps/Test_conceal_ve_after_eol_rl_3.dump3
-rw-r--r--src/testdir/dumps/Test_conceal_ve_after_eol_rl_4.dump3
-rw-r--r--src/testdir/dumps/Test_conceal_ve_after_eol_rl_5.dump3
-rw-r--r--src/testdir/dumps/Test_cursorline_with_visualmode_01.dump12
-rw-r--r--src/testdir/dumps/Test_difffunc_diffexpr_1.dump12
-rw-r--r--src/testdir/dumps/Test_display_scroll_update_visual.dump2
-rw-r--r--src/testdir/dumps/Test_drop_modified_1.dump10
-rw-r--r--src/testdir/dumps/Test_echowin_showmode.dump2
-rw-r--r--src/testdir/dumps/Test_hlsearch_visual_1.dump6
-rw-r--r--src/testdir/dumps/Test_matchparen_win_execute_1.dump5
-rw-r--r--src/testdir/dumps/Test_number_insert_delete_lines_1.dump8
-rw-r--r--src/testdir/dumps/Test_number_insert_delete_lines_2.dump8
-rw-r--r--src/testdir/dumps/Test_number_insert_delete_lines_3.dump8
-rw-r--r--src/testdir/dumps/Test_popup_command_03.dump2
-rw-r--r--src/testdir/dumps/Test_prop_above_below_empty_1.dump20
-rw-r--r--src/testdir/dumps/Test_prop_above_below_empty_2.dump20
-rw-r--r--src/testdir/dumps/Test_prop_above_below_empty_3.dump20
-rw-r--r--src/testdir/dumps/Test_prop_above_below_empty_4.dump20
-rw-r--r--src/testdir/dumps/Test_prop_above_below_empty_5.dump20
-rw-r--r--src/testdir/dumps/Test_prop_above_below_empty_6.dump16
-rw-r--r--src/testdir/dumps/Test_prop_inserts_text_1.dump2
-rw-r--r--src/testdir/dumps/Test_prop_inserts_text_2.dump2
-rw-r--r--src/testdir/dumps/Test_prop_inserts_text_3.dump2
-rw-r--r--src/testdir/dumps/Test_prop_inserts_text_4.dump2
-rw-r--r--src/testdir/dumps/Test_prop_inserts_text_5.dump2
-rw-r--r--src/testdir/dumps/Test_prop_inserts_text_6.dump2
-rw-r--r--src/testdir/dumps/Test_prop_inserts_text_visual_block_2.dump8
-rw-r--r--src/testdir/dumps/Test_prop_inserts_text_visual_block_3.dump8
-rw-r--r--src/testdir/dumps/Test_prop_inserts_text_visual_block_4.dump8
-rw-r--r--src/testdir/dumps/Test_prop_inserts_text_visual_block_5.dump8
-rw-r--r--src/testdir/dumps/Test_prop_inserts_text_visual_block_6.dump8
-rw-r--r--src/testdir/dumps/Test_prop_inserts_text_visual_block_7.dump8
-rw-r--r--src/testdir/dumps/Test_prop_wincolor_1.dump8
-rw-r--r--src/testdir/dumps/Test_prop_wincolor_2.dump8
-rw-r--r--src/testdir/dumps/Test_prop_wincolor_3.dump8
-rw-r--r--src/testdir/dumps/Test_prop_wincolor_4.dump8
-rw-r--r--src/testdir/dumps/Test_prop_wincolor_5.dump8
-rw-r--r--src/testdir/dumps/Test_prop_wincolor_6.dump8
-rw-r--r--src/testdir/dumps/Test_prop_wincolor_7.dump8
-rw-r--r--src/testdir/dumps/Test_prop_wincolor_8.dump8
-rw-r--r--src/testdir/dumps/Test_prop_wincolor_9.dump8
-rw-r--r--src/testdir/dumps/Test_prop_with_text_above_6.dump2
-rw-r--r--src/testdir/dumps/Test_prop_with_text_above_7.dump2
-rw-r--r--src/testdir/dumps/Test_prop_with_text_empty_line_6.dump4
-rw-r--r--src/testdir/dumps/Test_prop_with_text_override_2.dump2
-rw-r--r--src/testdir/dumps/Test_relnr_colors_wrapped_1.dump20
-rw-r--r--src/testdir/dumps/Test_relnr_colors_wrapped_2.dump20
-rw-r--r--src/testdir/dumps/Test_relnr_colors_wrapped_3.dump20
-rw-r--r--src/testdir/dumps/Test_relnr_colors_wrapped_4.dump20
-rw-r--r--src/testdir/dumps/Test_relnr_colors_wrapped_5.dump20
-rw-r--r--src/testdir/dumps/Test_statusline_showcmd_3.dump6
-rw-r--r--src/testdir/dumps/Test_syntax_c_01.dump4
-rw-r--r--src/testdir/dumps/Test_tabline_showcmd_3.dump6
-rw-r--r--src/testdir/dumps/Test_terminal_popup_7.dump2
-rw-r--r--src/testdir/dumps/Test_textprop_hl_override_2.dump2
-rw-r--r--src/testdir/dumps/Test_vim9_no_redraw.dump2
-rw-r--r--src/testdir/dumps/Test_virtual_text_overlap_with_highlight_1.dump8
-rw-r--r--src/testdir/dumps/Test_visual_block_with_virtualedit.dump6
-rw-r--r--src/testdir/dumps/Test_visual_block_with_virtualedit2.dump6
-rw-r--r--src/testdir/dumps/Test_visual_ends_before_showbreak.dump6
-rw-r--r--src/testdir/dumps/Test_visual_hl_with_showbreak.dump2
-rw-r--r--src/testdir/dumps/Test_visual_sbr_1.dump2
-rw-r--r--src/testdir/dumps/Test_visual_starts_before_skipcol_1.dump2
-rw-r--r--src/testdir/dumps/Test_visual_starts_before_skipcol_2.dump2
-rw-r--r--src/testdir/dumps/Test_visual_starts_before_skipcol_3.dump2
-rw-r--r--src/testdir/dumps/Test_visual_starts_before_skipcol_4.dump2
-rw-r--r--src/testdir/dumps/Test_win_gotoid_2.dump2
-rw-r--r--src/testdir/dumps/Test_wincolor_01.dump4
-rw-r--r--src/testdir/shared.vim5
-rw-r--r--src/testdir/test_autocmd.vim165
-rw-r--r--src/testdir/test_breakindent.vim84
-rw-r--r--src/testdir/test_clientserver.vim2
-rw-r--r--src/testdir/test_cmdline.vim52
-rw-r--r--src/testdir/test_cmdwin.vim115
-rw-r--r--src/testdir/test_comments.vim6
-rw-r--r--src/testdir/test_conceal.vim398
-rw-r--r--src/testdir/test_diffmode.vim309
-rw-r--r--src/testdir/test_display.vim20
-rw-r--r--src/testdir/test_edit.vim35
-rw-r--r--src/testdir/test_excmd.vim27
-rw-r--r--src/testdir/test_execute_func.vim24
-rw-r--r--src/testdir/test_exists.vim49
-rw-r--r--src/testdir/test_expand.vim13
-rw-r--r--src/testdir/test_filetype.vim78
-rw-r--r--src/testdir/test_filter_map.vim142
-rw-r--r--src/testdir/test_format.vim168
-rw-r--r--src/testdir/test_functions.vim51
-rw-r--r--src/testdir/test_goto.vim13
-rw-r--r--src/testdir/test_gui.vim12
-rw-r--r--src/testdir/test_highlight.vim28
-rw-r--r--src/testdir/test_ins_complete.vim74
-rw-r--r--src/testdir/test_listchars.vim76
-rw-r--r--src/testdir/test_listlbr.vim8
-rw-r--r--src/testdir/test_listlbr_utf8.vim21
-rw-r--r--src/testdir/test_lua.vim22
-rw-r--r--src/testdir/test_mapping.vim20
-rw-r--r--src/testdir/test_matchparen.vim25
-rw-r--r--src/testdir/test_messages.vim12
-rw-r--r--src/testdir/test_mswin_event.vim54
-rw-r--r--src/testdir/test_normal.vim26
-rw-r--r--src/testdir/test_number.vim65
-rw-r--r--src/testdir/test_options.vim68
-rw-r--r--src/testdir/test_perl.vim17
-rw-r--r--src/testdir/test_popup.vim18
-rw-r--r--src/testdir/test_popupwin.vim18
-rw-r--r--src/testdir/test_prompt_buffer.vim45
-rw-r--r--src/testdir/test_put.vim38
-rw-r--r--src/testdir/test_python2.vim17
-rw-r--r--src/testdir/test_python3.vim17
-rw-r--r--src/testdir/test_quotestar.vim4
-rw-r--r--src/testdir/test_registers.vim18
-rw-r--r--src/testdir/test_remote.vim79
-rw-r--r--src/testdir/test_ruby.vim17
-rw-r--r--src/testdir/test_scroll_opt.vim38
-rw-r--r--src/testdir/test_startup.vim16
-rw-r--r--src/testdir/test_tabpage.vim96
-rw-r--r--src/testdir/test_tagjump.vim29
-rw-r--r--src/testdir/test_tcl.vim17
-rw-r--r--src/testdir/test_terminal2.vim8
-rw-r--r--src/testdir/test_textprop.vim134
-rw-r--r--src/testdir/test_undo.vim2
-rw-r--r--src/testdir/test_user_func.vim19
-rw-r--r--src/testdir/test_utf8_comparisons.vim35
-rw-r--r--src/testdir/test_vim9_assign.vim97
-rw-r--r--src/testdir/test_vim9_builtin.vim30
-rw-r--r--src/testdir/test_vim9_class.vim758
-rw-r--r--src/testdir/test_vim9_disassemble.vim195
-rw-r--r--src/testdir/test_vim9_expr.vim27
-rw-r--r--src/testdir/test_vim9_import.vim49
-rw-r--r--src/testdir/test_vim9_script.vim25
-rw-r--r--src/testdir/test_vim9_typealias.vim4
-rw-r--r--src/testdir/test_virtualedit.vim17
-rw-r--r--src/testdir/test_visual.vim341
-rw-r--r--src/testdir/test_window_cmd.vim339
-rw-r--r--src/testdir/test_winfixbuf.vim3286
-rw-r--r--src/testing.c2
-rw-r--r--src/textformat.c46
-rw-r--r--src/textobject.c2
-rw-r--r--src/textprop.c23
-rw-r--r--src/typval.c10
-rw-r--r--src/undo.c38
-rw-r--r--src/userfunc.c113
-rw-r--r--src/version.c366
-rw-r--r--src/vim.h7
-rw-r--r--src/vim9class.c417
-rw-r--r--src/vim9compile.c12
-rw-r--r--src/vim9expr.c42
-rw-r--r--src/window.c409
-rw-r--r--src/xxd/Makefile2
-rw-r--r--src/xxd/xxd.c44
-rw-r--r--tools/rename.bat44
814 files changed, 27325 insertions, 5706 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 6ebaeda..f8ea87e 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -9,21 +9,15 @@
# So if a pull request only touches javascript files, only these owners
# will be requested to review.
+nsis/lang/russian.nsi @RestorerZ
runtime/autoload/freebasic.vim @dkearns
-runtime/autoload/getscript.vim @cecamp
runtime/autoload/haskell.vim @alx741
runtime/autoload/javascript.vim @jsit
runtime/autoload/modula2.vim @dkearns
-runtime/autoload/netrw.vim @cecamp
-runtime/autoload/netrwFileHandlers.vim @cecamp
-runtime/autoload/netrwSettings.vim @cecamp
runtime/autoload/php.vim @david-szabo97
runtime/autoload/rubycomplete.vim @segfault @dkearns
runtime/autoload/rust.vim @lilyball
-runtime/autoload/tar.vim @cecamp
-runtime/autoload/vimball.vim @cecamp
runtime/autoload/xmlformat.vim @chrisbra
-runtime/autoload/zip.vim @cecamp
runtime/autoload/dist/json.vim @habamax
runtime/colors/blue.vim @habamax @romainl @neutaaaaan
runtime/colors/darkblue.vim @habamax @romainl @neutaaaaan
@@ -108,12 +102,6 @@ runtime/compiler/xmllint.vim @dkearns
runtime/compiler/xo.vim @dkearns
runtime/compiler/yamllint.vim @romainl
runtime/compiler/zsh.vim @dkearns
-runtime/doc/pi_getscript.txt @cecamp
-runtime/doc/pi_logipat.txt @cecamp
-runtime/doc/pi_netrw.txt @cecamp
-runtime/doc/pi_tar.txt @cecamp
-runtime/doc/pi_vimball.txt @cecamp
-runtime/doc/pi_zip.txt @cecamp
runtime/doc/ps1.txt @heaths
runtime/ftplugin/abaqus.vim @costerwi
runtime/ftplugin/apache.vim @dubgeiser
@@ -127,6 +115,7 @@ runtime/ftplugin/cs.vim @nickspoons
runtime/ftplugin/csh.vim @dkearns
runtime/ftplugin/css.vim @dkearns
runtime/ftplugin/cucumber.vim @tpope
+runtime/ftplugin/deb822sources.vim @jamessan
runtime/ftplugin/debchangelog.vim @jamessan
runtime/ftplugin/debcontrol.vim @jamessan
runtime/ftplugin/debsources.vim @jamessan
@@ -182,7 +171,6 @@ runtime/ftplugin/lynx.vim @dkearns
runtime/ftplugin/m3build.vim @dkearns
runtime/ftplugin/m3quake.vim @dkearns
runtime/ftplugin/markdown.vim @tpope
-runtime/ftplugin/matlab.vim @cecamp
runtime/ftplugin/meson.vim @Liambeguin
runtime/ftplugin/modula2.vim @dkearns
runtime/ftplugin/modula3.vim @dkearns
@@ -205,14 +193,9 @@ runtime/ftplugin/pymanifest.vim @ObserverOfTime
runtime/ftplugin/python.vim @tpict
runtime/ftplugin/qb64.vim @dkearns
runtime/ftplugin/qml.vim @ChaseKnowlden
-runtime/ftplugin/r.vim @jalvesaq
runtime/ftplugin/racket.vim @benknoble
runtime/ftplugin/readline.vim @dkearns
-runtime/ftplugin/rhelp.vim @jalvesaq
-runtime/ftplugin/rmd.vim @jalvesaq
-runtime/ftplugin/rnoweb.vim @jalvesaq
runtime/ftplugin/routeros.vim @zainin
-runtime/ftplugin/rrst.vim @jalvesaq
runtime/ftplugin/rst.vim @marshallward
runtime/ftplugin/ruby.vim @tpope @dkearns
runtime/ftplugin/rust.vim @lilyball
@@ -302,14 +285,9 @@ runtime/indent/prolog.vim @dkearns
runtime/indent/ps1.vim @heaths
runtime/indent/qb64.vim @dkearns
runtime/indent/qml.vim @ChaseKnowlden
-runtime/indent/r.vim @jalvesaq
runtime/indent/racket.vim @benknoble
runtime/indent/rapid.vim @KnoP-01
runtime/indent/readline.vim @dkearns
-runtime/indent/rhelp.vim @jalvesaq
-runtime/indent/rmd.vim @jalvesaq
-runtime/indent/rnoweb.vim @jalvesaq
-runtime/indent/rrst.vim @jalvesaq
runtime/indent/ruby.vim @AndrewRadev @dkearns
runtime/indent/sass.vim @tpope
runtime/indent/scala.vim @derekwyatt
@@ -327,21 +305,19 @@ runtime/indent/xml.vim @chrisbra
runtime/indent/zsh.vim @chrisbra
runtime/keymap/armenian-eastern_utf-8.vim @blinskey
runtime/keymap/armenian-western_utf-8.vim @blinskey
+runtime/keymap/russian-typograph.vim @RestorerZ
runtime/keymap/tamil_tscii.vim @yegappan
runtime/lang/menu_en_gb.latin1.vim @mrdubya
+runtime/lang/menu_ru_ru.cp1251.vim @RestorerZ
+runtime/lang/menu_ru_ru.koi8-r.vim @RestorerZ
+runtime/lang/menu_ru_ru.utf-8.vim @RestorerZ
runtime/pack/dist/opt/cfilter/plugin/cfilter.vim @yegappan
runtime/pack/dist/opt/matchit/ @chrisbra
-runtime/plugin/getscriptPlugin.vim @cecamp
-runtime/plugin/logiPat.vim @cecamp
-runtime/plugin/netrwPlugin.vim @cecamp
-runtime/plugin/tarPlugin.vim @cecamp
-runtime/plugin/vimballPlugin.vim @cecamp
-runtime/plugin/zipPlugin.vim @cecamp
runtime/plugin/manpager.vim @Konfekt
runtime/syntax/shared/hgcommitDiff.vim @vegerot
runtime/syntax/abaqus.vim @costerwi
runtime/syntax/aidl.vim @dpelle
-runtime/syntax/amiga.vim @cecamp
+runtime/syntax/ant.vim @dkearns
runtime/syntax/arduino.vim @johshoff
runtime/syntax/asciidoc.vim @aerostitch
runtime/syntax/asm.vim @dkearns
@@ -358,14 +334,13 @@ runtime/syntax/cabalconfig.vim @coot
runtime/syntax/cabalproject.vim @coot
runtime/syntax/cf.vim @ernstvanderlinden
runtime/syntax/chatito.vim @ObserverOfTime
+runtime/syntax/chuck.vim @gacallea
runtime/syntax/clojure.vim @axvr
runtime/syntax/cs.vim @nickspoons
-runtime/syntax/csh.vim @cecamp
runtime/syntax/cucumber.vim @tpope
runtime/syntax/d.vim @JesseKPhillips
runtime/syntax/dart.vim @pr3d4t0r
runtime/syntax/datascript.vim @dpelle
-runtime/syntax/dcl.vim @cecamp
runtime/syntax/deb822sources.vim @jamessan
runtime/syntax/debchangelog.vim @jamessan
runtime/syntax/debcontrol.vim @jamessan
@@ -381,11 +356,9 @@ runtime/syntax/dtd.vim @chrisbra
runtime/syntax/dts.vim @zonque
runtime/syntax/editorconfig.vim @gpanders
runtime/syntax/eiffel.vim @jocelyn
-runtime/syntax/elmfilt.vim @cecamp
runtime/syntax/erlang.vim @hcs42
runtime/syntax/eruby.vim @tpope @dkearns
runtime/syntax/expect.vim @dkearns
-runtime/syntax/exports.vim @cecamp
runtime/syntax/falcon.vim @steveno
runtime/syntax/fennel.vim @gpanders
runtime/syntax/fetchmail.vim @dkearns
@@ -412,6 +385,7 @@ runtime/syntax/gyp.vim @ObserverOfTime
runtime/syntax/haml.vim @tpope
runtime/syntax/hare.vim @rsaihe
runtime/syntax/haskell.vim @coot
+runtime/syntax/help_ru.vim @RestorerZ
runtime/syntax/hgcommit.vim @k-takata
runtime/syntax/hitest.vim @lacygoill
runtime/syntax/hog.vim @wtfbbqhax
@@ -430,9 +404,7 @@ runtime/syntax/kconfig.vim @chrisbra
runtime/syntax/kotlin.vim @udalov
runtime/syntax/krl.vim @KnoP-01
runtime/syntax/less.vim @genoma
-runtime/syntax/lex.vim @cecamp
runtime/syntax/liquid.vim @tpope
-runtime/syntax/lisp.vim @cecamp
runtime/syntax/lua.vim @marcuscf
runtime/syntax/lyrics.vim @ObserverOfTime
runtime/syntax/lynx.vim @dkearns
@@ -441,7 +413,6 @@ runtime/syntax/m3quake.vim @dkearns
runtime/syntax/mailcap.vim @dkearns
runtime/syntax/make.vim @rohieb
runtime/syntax/mallard.vim @jhradilek
-runtime/syntax/maple.vim @cecamp
runtime/syntax/markdown.vim @tpope
runtime/syntax/mason.vim @petdance
runtime/syntax/meson.vim @Liambeguin
@@ -451,7 +422,6 @@ runtime/syntax/modula2/opt/pim.vim @trijezdci
runtime/syntax/modula2/opt/r10.vim @trijezdci
runtime/syntax/modula3.vim @dkearns
runtime/syntax/n1ql.vim @pr3d4t0r
-runtime/syntax/netrw.vim @cecamp
runtime/syntax/nginx.vim @chr4
runtime/syntax/ninja.vim @nico
runtime/syntax/nix.vim @equill
@@ -476,7 +446,6 @@ runtime/syntax/psl.vim @danielkho
runtime/syntax/pymanifest.vim @ObserverOfTime
runtime/syntax/qb64.vim @dkearns
runtime/syntax/qml.vim @ChaseKnowlden
-runtime/syntax/r.vim @jalvesaq
runtime/syntax/racket.vim @benknoble
runtime/syntax/raml.vim @in3d
runtime/syntax/rapid.vim @KnoP-01
@@ -486,11 +455,8 @@ runtime/syntax/rcs.vim @hdima
runtime/syntax/rebol.vim @mrdubya
runtime/syntax/rego.vim @zenmatic
runtime/syntax/resolv.vim @rid9
-runtime/syntax/rmd.vim @jalvesaq
runtime/syntax/rng.vim @jhradilek
runtime/syntax/routeros.vim @zainin
-runtime/syntax/rpcgen.vim @cecamp
-runtime/syntax/rrst.vim @jalvesaq
runtime/syntax/rst.vim @marshallward
runtime/syntax/ruby.vim @dkearns
runtime/syntax/sass.vim @tpope
@@ -498,9 +464,7 @@ runtime/syntax/scala.vim @derekwyatt
runtime/syntax/scss.vim @tpope
runtime/syntax/sdoc.vim @gpanders
runtime/syntax/sed.vim @dkearns
-runtime/syntax/sh.vim @cecamp
runtime/syntax/shared/debversions.vim @jamessan
-runtime/syntax/sm.vim @cecamp
runtime/syntax/solidity.vim @cothi
runtime/syntax/spec.vim @ignatenkobrain
runtime/syntax/sqloracle.vim @chrisbra
@@ -514,11 +478,9 @@ runtime/syntax/svn.vim @hdima
runtime/syntax/swayconfig.vim @jamespeapen
runtime/syntax/swig.vim @jmarrec
runtime/syntax/systemverilog.vim @Kocha
-runtime/syntax/tags.vim @cecamp
runtime/syntax/tap.vim @petdance
runtime/syntax/tcsh.vim @dkearns
runtime/syntax/teraterm.vim @k-takata
-runtime/syntax/tex.vim @cecamp
runtime/syntax/tidy.vim @dkearns
runtime/syntax/tmux.vim @ericpruitt
runtime/syntax/toml.vim @averms
@@ -530,7 +492,6 @@ runtime/syntax/typescriptcommon.vim @HerringtonDarkholme
runtime/syntax/typescriptreact.vim @HerringtonDarkholme
runtime/syntax/unison.vim @chuwy
runtime/syntax/vdf.vim @ObserverOfTime
-runtime/syntax/vim.vim @cecamp
runtime/syntax/vroom.vim @dbarnett
runtime/syntax/wast.vim @rhysd
runtime/syntax/wdl.vim @zenmatic
@@ -538,18 +499,18 @@ runtime/syntax/wget.vim @dkearns
runtime/syntax/wget2.vim @dkearns
runtime/syntax/xbl.vim @dkearns
runtime/syntax/xcompose.vim @ObserverOfTime
-runtime/syntax/xmath.vim @cecamp
runtime/syntax/xml.vim @chrisbra
runtime/syntax/xs.vim @petdance
runtime/syntax/xslt.vim @Boobies
-runtime/syntax/xxd.vim @cecamp
-runtime/syntax/yacc.vim @cecamp
runtime/syntax/zserio.vim @dpelle
runtime/syntax/zsh.vim @chrisbra
runtime/tutor/tutor.eo @dpelle
runtime/tutor/tutor.eo.utf-8 @dpelle
runtime/tutor/tutor.fr @dpelle
runtime/tutor/tutor.fr.utf-8 @dpelle
+runtime/tutor/tutor.ru @RestorerZ
+runtime/tutor/tutor.ru.cp1251 @RestorerZ
+runtime/tutor/tutor.ru.utf-8 @RestorerZ
src/iscygpty.* @k-takata
src/libvterm/ @leonerd
src/po/ca.po @nfdisco
@@ -561,6 +522,7 @@ src/po/fr.po @dpelle
src/po/ga.po @kscanne
src/po/it.po @azc100
src/po/ja.po @k-takata
+src/po/ru.po @RestorerZ
src/po/sr.po @eevan78
src/po/tr.po @bitigchi
src/po/uk.po @sakhnik
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b51cade..0120c8f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -22,7 +22,7 @@ jobs:
env:
CC: ${{ matrix.compiler }}
GCC_VER: 13
- CLANG_VER: 17
+ CLANG_VER: 18
TEST: test
SRCDIR: ./src
LEAK_CFLAGS: -DEXITFREE
@@ -90,6 +90,10 @@ jobs:
- run: sudo dpkg --add-architecture i386
if: matrix.architecture == 'i386'
+ - name: Uninstall snap
+ run: |
+ sudo bash ci/remove_snap.sh
+
- name: Install packages
run: |
PKGS=( \
@@ -265,7 +269,13 @@ jobs:
if: contains(matrix.extra, 'vimtags')
run: |
# This will exit with an error code if the generated vim tags differs from source.
- git diff --exit-code -- runtime/doc/tags
+ (
+ cd runtime/doc
+ git diff --exit-code -- tags
+ make html; rm *.html tags.ref;
+ test -f errors.log && exit 3;
+ true
+ )
- name: Generate gcov files
if: matrix.coverage
@@ -276,9 +286,10 @@ jobs:
- name: Codecov
timeout-minutes: 20
if: matrix.coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
+ token: ${{ secrets.CODECOV_TOKEN }}
- name: ASan logs
if: contains(matrix.extra, 'asan') && !cancelled()
@@ -289,7 +300,7 @@ jobs:
done
macos:
- runs-on: macos-latest
+ runs-on: ${{ matrix.runner }}
env:
CC: clang
@@ -302,6 +313,7 @@ jobs:
fail-fast: false
matrix:
features: [tiny, normal, huge]
+ runner: [macos-latest, macos-14]
steps:
- name: Checkout repository from github
@@ -310,8 +322,14 @@ jobs:
- name: Install packages
if: matrix.features == 'huge'
run: |
- brew install lua
- echo "LUA_PREFIX=/usr/local" >> $GITHUB_ENV
+ brew install lua libtool
+ echo "LUA_PREFIX=$(brew --prefix)" >> $GITHUB_ENV
+
+ - name: Grant microphone access for macos-14
+ if: matrix.runner == 'macos-14'
+ run: |
+ # Temporary fix to fix microphone permission issues for macos-14 when playing sound.
+ sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR IGNORE INTO access VALUES ('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159,NULL,NULL,'UNUSED',1687786159);"
- name: Set up environment
run: |
@@ -355,6 +373,11 @@ jobs:
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
+ - name: Install packages for testing
+ run: |
+ # Apple diff is broken. Use GNU diff instead. See #14032.
+ brew install diffutils
+
- name: Test
timeout-minutes: 20
run: |
@@ -385,11 +408,11 @@ jobs:
# winpty
WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
# libsodium
- SODIUM_VER: '1.0.18'
+ SODIUM_VER: '1.0.19'
SODIUM_MSVC_URL: https://download.libsodium.org/libsodium/releases/libsodium-%SODIUM_VER%-stable-msvc.zip
SODIUM_MSVC_VER: v143
SODIUM_MINGW_URL: https://download.libsodium.org/libsodium/releases/libsodium-%SODIUM_VER%-stable-mingw.tar.gz
- SODIUM_MINGW_VER: 23
+ SODIUM_MINGW_VER: 26
# Escape sequences
COL_RED: "\x1b[31m"
COL_GREEN: "\x1b[32m"
@@ -451,7 +474,10 @@ jobs:
echo "SODIUM_LIB=${SODIUM_DIR}\\${{ matrix.arch == 'x64' && 'x64' || 'Win32' }}\\Release\\${SODIUM_MSVC_VER}\\dynamic" >> $GITHUB_ENV
else
SODIUM_DIR=D:\\libsodium-win${{ matrix.arch == 'x64' && '64' || '32' }}
+ # do not want \L to end up in pathdef.c and compiler complaining about unknown escape sequences \l
+ SODIUM_DIR_SLASH=D:/libsodium-win${{ matrix.arch == 'x64' && '64' || '32' }}
echo "SODIUM_LIB=${SODIUM_DIR}\\bin" >> $GITHUB_ENV
+ echo "SODIUM_DIR_SLASH=${SODIUM_DIR_SLASH}" >> $GITHUB_ENV
fi
echo "SODIUM_DIR=${SODIUM_DIR}" >> $GITHUB_ENV
@@ -477,7 +503,7 @@ jobs:
echo %SODIUM_VER%>> urls.txt
- name: Cache downloaded files
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: downloads
key: ${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('urls.txt') }}
@@ -575,7 +601,7 @@ jobs:
DYNAMIC_PYTHON=yes PYTHON=${PYTHON_DIR} \
DYNAMIC_PYTHON3=yes PYTHON3=${PYTHON3_DIR} \
DYNAMIC_PYTHON3_STABLE_ABI=${PYTHON3_STABLE} \
- DYNAMIC_SODIUM=yes SODIUM=${SODIUM_DIR} \
+ DYNAMIC_SODIUM=yes SODIUM=${SODIUM_DIR_SLASH} \
STATIC_STDCPLUS=yes COVERAGE=${{ matrix.coverage }}
else
mingw32-make -f Make_ming.mak -j2 \
@@ -660,7 +686,8 @@ jobs:
- name: Codecov
timeout-minutes: 20
if: matrix.coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
directory: src
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}
+ token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.gitignore b/.gitignore
index 3a55d25..5244447 100644
--- a/.gitignore
+++ b/.gitignore
@@ -97,6 +97,11 @@ src/kword_test
# Generated by "make install"
runtime/doc/doctags
+# Temporarily generated by "runtime/syntax/generator/make"
+runtime/syntax/generator/generator.err
+runtime/syntax/generator/sanity_check.err
+runtime/syntax/generator/vim.vim.rc
+
# Generated by "make shadow". The directory names could be anything but we
# restrict them to shadow (the default) or shadow-*
src/shadow
diff --git a/Filelist b/Filelist
index d4fbca3..b7b3907 100644
--- a/Filelist
+++ b/Filelist
@@ -1,7 +1,7 @@
# List of distributed Vim files.
# Used by Makefile.
-# source files for all source archives
+# Source files for all source archives.
SRC_ALL = \
.cirrus.yml \
.gitattributes \
@@ -20,6 +20,7 @@ SRC_ALL = \
ci/config.mk*.sed \
ci/if_ver*.vim \
ci/setup-xvfb.sh \
+ ci/remove_snap.sh \
src/Make_all.mak \
src/README.md \
src/alloc.c \
@@ -429,7 +430,7 @@ SRC_ALL = \
src/xdiff/xutils.h \
-# source files for Unix only
+# Source files for Unix-like only.
SRC_UNIX = \
Makefile \
Filelist \
@@ -495,7 +496,7 @@ SRC_UNIX = \
src/which.sh \
src/xxd/Makefile \
-# source files for both DOS and Unix
+# Source files for both MS Windows and Unix-like.
SRC_DOS_UNIX = \
src/gui_xim.c \
src/if_cscope.c \
@@ -521,7 +522,7 @@ SRC_DOS_UNIX = \
src/proto/if_tcl.pro \
src/typemap \
-# source files for MS-Windows (also in the extra archive)
+# Source files for MS Windows (also in the extra archive).
SRC_DOS = \
src/GvimExt/*.mak \
src/GvimExt/GvimExt.reg \
@@ -597,7 +598,7 @@ SRC_DOS = \
nsis/lang/*.nsi \
uninstall.txt \
-# source files for DOS without CR/LF translation (also in the extra archive)
+# Source files for MS Windows without CR/LF translation (also in the extra archive).
SRC_DOS_BIN = \
src/tearoff.bmp \
src/tools.bmp \
@@ -614,10 +615,10 @@ SRC_DOS_BIN = \
runtime/bitmaps/vim.ico \
nsis/icons.zip \
-# source files for Amiga, DOS, etc. (also in the extra archive)
+# Source files for Amiga, DOS, etc. (also in the extra archive).
SRC_AMI_DOS = \
-# source files for Amiga (also in the extra archive)
+# Source files for Amiga (also in the extra archive).
SRC_AMI = \
README_amisrc.txt \
README_amisrc.txt.info \
@@ -631,7 +632,7 @@ SRC_AMI = \
src/testdir/amiga.vim \
src/xxd/Make_amiga.mak \
-# source files for Haiku (also in the extra archive)
+# Source files for Haiku (also in the extra archive).
SRC_HAIKU = \
README_haiku.txt \
src/os_haiku.h \
@@ -640,7 +641,7 @@ SRC_HAIKU = \
src/gui_haiku.h \
src/proto/gui_haiku.pro \
-# source files for the Mac (also in the extra archive)
+# Source files for the Mac (also in the extra archive).
SRC_MAC = \
src/INSTALLmac.txt \
src/os_mac.h \
@@ -649,7 +650,7 @@ SRC_MAC = \
src/proto/os_mac_conv.pro \
src/proto/os_macosx.pro \
-# source files for VMS (in the extra archive)
+# Source files for VMS (in the extra archive).
SRC_VMS = \
src/INSTALLvms.txt \
src/Make_vms.mms \
@@ -663,7 +664,7 @@ SRC_VMS = \
src/xxd/Make_vms.mms \
vimtutor.com \
-# source files for QNX (in the extra archive)
+# Source files for QNX (in the extra archive).
SRC_QNX = \
src/os_qnx.c \
src/os_qnx.h \
@@ -671,7 +672,7 @@ SRC_QNX = \
src/proto/gui_photon.pro \
src/proto/os_qnx.pro \
-# source files for the extra archive (all sources that are not for Unix)
+# Source files for the extra archive (all sources that are not for Unix).
SRC_EXTRA = \
$(SRC_AMI) \
$(SRC_AMI_DOS) \
@@ -686,7 +687,7 @@ SRC_EXTRA = \
src/os_vms_fix.com \
src/toolbar.phi \
-# runtime files for all distributions
+# Runtime files for all distributions.
RT_ALL = \
README.txt \
README.md \
@@ -777,12 +778,12 @@ RT_ALL = \
runtime/pack/dist/opt/swapmouse/plugin/swapmouse.vim \
runtime/pack/dist/opt/termdebug/plugin/termdebug.vim \
-# runtime files for all distributions without CR-NL translation
+# Runtime files for all distributions without CR/LF translation.
RT_ALL_BIN = \
runtime/doc/tags \
runtime/print/*.ps \
-# runtime script files
+# Runtime script files.
RT_SCRIPTS = \
runtime/filetype.vim \
runtime/scripts.vim \
@@ -824,10 +825,17 @@ RT_SCRIPTS = \
runtime/syntax/Makefile \
runtime/syntax/testdir/README.txt \
runtime/syntax/testdir/runtest.vim \
+ runtime/syntax/testdir/ftplugin/*.* \
runtime/syntax/testdir/input/*.* \
+ runtime/syntax/testdir/input/setup/*.* \
runtime/syntax/testdir/dumps/*.dump \
+ runtime/syntax/generator/Makefile \
+ runtime/syntax/generator/README.md \
+ runtime/syntax/generator/gen_syntax_vim.vim \
+ runtime/syntax/generator/update_date.vim \
+ runtime/syntax/generator/vim.vim.base \
-# Unix runtime
+# Unix-like runtime.
RT_UNIX = \
README_unix.txt \
runtime/hi16-action-make.png \
@@ -835,7 +843,7 @@ RT_UNIX = \
runtime/gvim.desktop \
runtime/vim.desktop \
-# Unix and DOS runtime without CR-LF translation
+# Unix-like and MS Windows runtime without CR/LF translation.
RT_UNIX_DOS_BIN = \
runtime/vim16x16.gif \
runtime/vim16x16.png \
@@ -847,10 +855,10 @@ RT_UNIX_DOS_BIN = \
runtime/vim48x48.png \
runtime/vim48x48.xpm \
-# runtime not for unix or extra
+# Runtime not for Unix-like or extra.
RT_NO_UNIX = \
-# runtime for Amiga (also in the extra archive)
+# Runtime for Amiga (also in the extra archive).
RT_AMI_DOS = \
runtime/doc/evim.man \
runtime/doc/vim.man \
@@ -858,20 +866,22 @@ RT_AMI_DOS = \
runtime/doc/vimtutor.man \
runtime/doc/xxd.man \
-# DOS runtime (also in the extra archive)
+# MS Windows runtime (also in the extra archive).
RT_DOS = \
README_dos.txt \
runtime/doc/Make_mvc.mak \
+ runtime/indent/Make_mvc.mak \
runtime/tutor/Make_mvc.mak \
runtime/lang/Make_mvc.mak \
vimtutor.bat \
-# DOS runtime without CR-LF translation (also in the extra archive)
+# MS Windows runtime without CR/LF translation (also in the extra archive).
RT_DOS_BIN = \
runtime/vimlogo.cdr \
runtime/vimlogo.eps \
runtime/vimlogo.gif \
runtime/vimlogo.pdf \
+ runtime/vimlogo.svg \
# Amiga runtime (also in the extra archive)
RT_AMI = \
@@ -893,7 +903,7 @@ RT_AMI = \
runtime/tutor.info \
runtime/tutor/*.info \
-# runtime files in extra archive
+# Runtime files in extra archive.
RT_EXTRA = \
$(RT_AMI) \
$(RT_AMI_DOS) \
@@ -901,46 +911,46 @@ RT_EXTRA = \
$(RT_DOS_BIN) \
README_mac.txt \
-# included in all Amiga archives
+# Included in all Amiga archives.
ROOT_AMI = \
Contents \
Contents.info \
runtime.info \
vimdir.info \
-# root files for the extra archive
+# Root files for the extra archive.
ROOT_EXTRA = \
$(ROOT_AMI) \
-# files for Amiga small binary (also in extra archive)
+# Files for Amiga small binary (also in extra archive).
BIN_AMI = \
README_amibin.txt \
README_amibin.txt.info \
Vim.info \
Xxd.info \
-# files for DOS binary (also in extra archive)
+# Files for MS Windows binary (also in extra archive).
BIN_DOS = \
README_bindos.txt \
uninstall.txt \
-# files for Win32 OLE binary (also in extra archive)
+# Files for Win32 OLE binary (also in extra archive).
BIN_OLE = \
README_ole.txt \
-# files for Win32s binary (also in extra archive)
+# Files for Win32s binary (also in extra archive).
BIN_W32S = \
README_w32s.txt \
-# files for VMS binary (also in extra archive)
+# Files for VMS binary (also in extra archive).
BIN_VMS = \
README_vms.txt \
-# files for OS/2 binary (also in extra archive)
+# Files for OS/2 binary (also in extra archive).
BIN_OS2 = \
README_os2.txt \
-# binary files for extra archive
+# Binary files for extra archive.
BIN_EXTRA = \
$(BIN_AMI) \
$(BIN_DOS) \
@@ -949,7 +959,7 @@ BIN_EXTRA = \
$(BIN_VMS) \
$(BIN_OS2) \
-# all files for extra archive
+# All files for extra archive.
EXTRA = \
$(BIN_EXTRA) \
$(ROOT_EXTRA) \
@@ -958,7 +968,7 @@ EXTRA = \
README_extra.txt \
runtime/vimlogo.xpm \
-# files in READMEdir that are included from the top dir
+# Files in READMEdir that are included from the top dir.
IN_README_DIR = \
README.txt.info \
README_ami.txt \
@@ -978,6 +988,7 @@ IN_README_DIR = \
README_src.txt \
README_srcdos.txt \
README_unix.txt \
+ README_vimlogo.txt \
README_vms.txt \
README_w32s.txt \
Contents \
@@ -988,7 +999,7 @@ IN_README_DIR = \
src.info \
vimdir.info \
-# generic language files
+# Generic language files.
LANG_GEN = \
runtime/doc/*-da.1 \
runtime/doc/*-da.UTF-8.1 \
@@ -1041,7 +1052,7 @@ LANG_GEN = \
runtime/spell/main.aap \
runtime/spell/*.vim \
-# generic language files, binary
+# Generic language files, binary.
LANG_GEN_BIN = \
runtime/spell/README_en.txt \
runtime/spell/en.ascii.spl \
@@ -1051,7 +1062,7 @@ LANG_GEN_BIN = \
runtime/spell/en.latin1.sug \
runtime/spell/en.utf-8.sug \
-# all files for lang archive
+# All files for lang archive.
LANG_SRC = \
src/po/README.txt \
src/po/README_mingw.txt \
@@ -1071,7 +1082,7 @@ LANG_SRC = \
src/po/big5corr.c \
src/po/*.po \
-# the language files for the Win32 lang archive
+# The language files for the Win32 lang archive.
LANG_DOS = \
src/po/*.mo \
diff --git a/READMEdir/README_vimlogo.txt b/READMEdir/README_vimlogo.txt
new file mode 100644
index 0000000..9798b10
--- /dev/null
+++ b/READMEdir/README_vimlogo.txt
@@ -0,0 +1,11 @@
+The Python project that creates `vimlogo.svg` can be found at
+`https://github.com/ShayHill/vimlogo`. The Vim license applies.
+
+`vimlogo.svg` is an effort to remove errors and inadvertant inconsistencies
+from the original vim logo while maintaing the original design. `vimlogo.svg`
+is based on the `vimlogo.svg` file (previously?) found at
+`https://www.vim.org/logos.php`
+
+As of 2024 Jan 30, `vimlogo.svg` is a separate project from `vimlogo.cdr`,
+`vimlogo.eps`, `vimlogo.gif`, `vimlogo.pdf`, and `vimlogo.xpm`, all of which
+are slightly different from each other.
diff --git a/ci/remove_snap.sh b/ci/remove_snap.sh
new file mode 100644
index 0000000..a812307
--- /dev/null
+++ b/ci/remove_snap.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env sh
+pushd /etc/apt/preferences.d/
+cat > nosnap.pref <<EOF
+# To prevent repository packages from triggering the installation of snap,
+# this file forbids snapd from being installed by APT.
+
+Package: snapd
+Pin: release a=*
+Pin-Priority: -10
+EOF
+popd
+snap remove --purge $(snap list | awk '!/^Name|^core/ {print $1}')
+apt-get purge -y snapd
diff --git a/nsis/README.txt b/nsis/README.txt
index e1abc4a..a47201c 100644
--- a/nsis/README.txt
+++ b/nsis/README.txt
@@ -29,18 +29,26 @@ To build the installable .exe:
4. Get a "diff.exe" program. If you skip this the built-in diff will always
be used (which is fine for most users). If you do have your own
- "diff.exe" put it in the "../.." directory (above the "vim90" directory,
+ "diff.exe" put it in the "../.." directory (above the "vim91" directory,
it's the same for all Vim versions).
You can find one in previous Vim versions or in this archive:
- http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz
+ http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz
-5 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim90"
+5. Also put "winpty32.dll" and "winpty-agent.exe" in "../.." (above the "vim91"
directory). This is required for the terminal window.
-6. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have
+6. To use stronger encryption, add the Sodium library. You can get it here:
+ https://github.com/jedisct1/libsodium/releases/download/1.0.19-RELEASE/libsodium-1.0.19-msvc.zip
+ Unpack the archive. Put the "libsodium.dll" from
+ path/to/libsodium/Win32/Release/v143/dynamic for the 32â€bit version or
+ path/to/libsodium/X64/Release/v143/dynamic for the 64â€bit version in the
+ "../.." directory (above the "vim91" directory, where "diff.exe" and
+ "winpty32.dll").
+
+7. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have
to do this on Unix. Make sure the file is in DOS file format!
-7. Get gettext and iconv DLLs from the following site:
+8. Get gettext and iconv DLLs from the following site:
https://github.com/mlocati/gettext-iconv-windows/releases
Both 64- and 32-bit versions are needed.
Download the files gettextX.X.X.X-iconvX.XX-shared-{32,64}.zip, extract
diff --git a/nsis/gvim.nsi b/nsis/gvim.nsi
index adb38a4..ec65361 100644
--- a/nsis/gvim.nsi
+++ b/nsis/gvim.nsi
@@ -1,6 +1,6 @@
# NSIS file to create a self-installing exe for Vim.
# It requires NSIS version 3.0 or later.
-# Last Change: 2014 Nov 5
+# Last Change: 2024 Mar 17
Unicode true
@@ -58,6 +58,37 @@ Unicode true
!include "Sections.nsh"
!include "x64.nsh"
+# See https://nsis.sourceforge.io/LogicLib
+;FileExists is already part of LogicLib, but returns true for directories
+;as well as files
+!macro _FileExists2 _a _b _t _f
+ !insertmacro _LOGICLIB_TEMP
+ StrCpy $_LOGICLIB_TEMP "0"
+;if path is not blank, continue to next check
+ StrCmp `${_b}` `` +4 0
+;if path exists, continue to next check (IfFileExists returns true if this
+;is a directory)
+ IfFileExists `${_b}` `0` +3
+;if path is not a directory, continue to confirm exists
+ IfFileExists `${_b}\*.*` +2 0
+ StrCpy $_LOGICLIB_TEMP "1" ;file exists
+;now we have a definitive value - the file exists or it does not
+ StrCmp $_LOGICLIB_TEMP "1" `${_t}` `${_f}`
+!macroend
+!undef FileExists
+!define FileExists `"" FileExists2`
+!macro _DirExists _a _b _t _f
+ !insertmacro _LOGICLIB_TEMP
+ StrCpy $_LOGICLIB_TEMP "0"
+;if path is not blank, continue to next check
+ StrCmp `${_b}` `` +3 0
+;if directory exists, continue to confirm exists
+ IfFileExists `${_b}\*.*` 0 +2
+ StrCpy $_LOGICLIB_TEMP "1"
+ StrCmp $_LOGICLIB_TEMP "1" `${_t}` `${_f}`
+!macroend
+!define DirExists `"" DirExists`
+
!define PRODUCT "Vim ${VER_MAJOR}.${VER_MINOR}"
!define UNINST_REG_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall"
!define UNINST_REG_KEY_VIM "${UNINST_REG_KEY}\${PRODUCT}"
@@ -167,9 +198,11 @@ Page custom SetCustom ValidateCustom
!include "lang\danish.nsi"
!include "lang\dutch.nsi"
!include "lang\german.nsi"
+ !include "lang\greek.nsi"
!include "lang\italian.nsi"
!include "lang\japanese.nsi"
!include "lang\russian.nsi"
+ !include "lang\serbian.nsi"
!include "lang\simpchinese.nsi"
!include "lang\tradchinese.nsi"
!include "lang\turkish.nsi"
@@ -364,9 +397,6 @@ Section "$(str_section_exe)" id_section_exe
!if /FileExists "${VIMSRC}\vim${BIT}.dll"
File ${VIMSRC}\vim${BIT}.dll
!endif
-!if /FileExists "${VIMRT}\libsodium.dll"
- File ${VIMRT}\libsodium.dll
-!endif
File /oname=install.exe ${VIMSRC}\installw32.exe
File /oname=uninstall.exe ${VIMSRC}\uninstallw32.exe
File ${VIMSRC}\vimrun.exe
@@ -377,9 +407,18 @@ Section "$(str_section_exe)" id_section_exe
File ..\uninstall.txt
File ${VIMRT}\*.vim
+!if /FileExists "${VIMTOOLS}\diff.exe"
File ${VIMTOOLS}\diff.exe
+!endif
+!if /FileExists "${VIMTOOLS}\winpty${BIT}.dll"
File ${VIMTOOLS}\winpty${BIT}.dll
+!endif
+!if /FileExists "${VIMTOOLS}\winpty-agent.exe"
File ${VIMTOOLS}\winpty-agent.exe
+!endif
+!if /FileExists "${VIMTOOLS}\libsodium.dll"
+ File ${VIMTOOLS}\libsodium.dll
+!endif
SetOutPath $0\colors
File /r ${VIMRT}\colors\*.*
@@ -388,17 +427,22 @@ Section "$(str_section_exe)" id_section_exe
File ${VIMRT}\compiler\*.*
SetOutPath $0\doc
- File ${VIMRT}\doc\*.txt
+ File /x uganda.nsis.txt ${VIMRT}\doc\*.txt
File ${VIMRT}\doc\tags
SetOutPath $0\ftplugin
File ${VIMRT}\ftplugin\*.*
SetOutPath $0\indent
- File ${VIMRT}\indent\*.*
+ File ${VIMRT}\indent\README.txt
+ File ${VIMRT}\indent\*.vim
+
+ SetOutPath $0\keymap
+ File ${VIMRT}\keymap\README.txt
+ File ${VIMRT}\keymap\*.vim
SetOutPath $0\macros
- File /r ${VIMRT}\macros\*.*
+ File /r /x *.info ${VIMRT}\macros\*.*
SetOutPath $0\pack
File /r ${VIMRT}\pack\*.*
@@ -416,7 +460,7 @@ Section "$(str_section_exe)" id_section_exe
File ${VIMSRC}\vim.ico
SetOutPath $0\syntax
- File /r /x testdir ${VIMRT}\syntax\*.*
+ File /r /x testdir /x generator /x Makefile ${VIMRT}\syntax\*.*
SetOutPath $0\spell
File ${VIMRT}\spell\*.txt
@@ -428,7 +472,7 @@ Section "$(str_section_exe)" id_section_exe
File ${VIMRT}\tools\*.*
SetOutPath $0\tutor
- File ${VIMRT}\tutor\*.*
+ File /x Makefile /x *.info ${VIMRT}\tutor\*.*
SectionEnd
##########################################################
@@ -559,10 +603,7 @@ Section "$(str_section_nls)" id_section_nls
SectionIn 1 3
SetOutPath $0\lang
- File /r ${VIMRT}\lang\*.*
- SetOutPath $0\keymap
- File ${VIMRT}\keymap\README.txt
- File ${VIMRT}\keymap\*.vim
+ File /r /x Makefile ${VIMRT}\lang\*.*
SetOutPath $0
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
"${GETTEXT}\gettext${BIT}\libintl-8.dll" \
@@ -942,7 +983,7 @@ Section "un.$(str_unsection_register)" id_unsection_register
SectionIn RO
# Apparently $INSTDIR is set to the directory where the uninstaller is
- # created. Thus the "vim61" directory is included in it.
+ # created. Thus the "vim91" directory is included in it.
StrCpy $0 "$INSTDIR"
# delete the context menu entry and batch files
@@ -1039,6 +1080,7 @@ Section "un.$(str_unsection_exe)" id_unsection_exe
RMDir /r $0\tutor
RMDir /r $0\lang
RMDir /r $0\keymap
+ RMDir /r $0\bitmaps
Delete $0\*.exe
Delete $0\*.bat
Delete $0\*.vim
@@ -1048,14 +1090,17 @@ Section "un.$(str_unsection_exe)" id_unsection_exe
MessageBox MB_OK|MB_ICONEXCLAMATION $(str_msg_rm_exe_fail) /SD IDOK
${EndIf}
- # No error message if the "vim62" directory can't be removed, the
+ # No error message if the "vim91" directory can't be removed, the
# gvimext.dll may still be there.
RMDir $0
SectionEnd
# Remove "vimfiles" directory under the specified directory.
!macro RemoveVimfiles dir
- ${If} ${FileExists} ${dir}\vimfiles
+ ${If} ${FileExists} ${dir}\_viminfo
+ Delete ${dir}\_viminfo
+ ${EndIf}
+ ${If} ${DirExists} ${dir}\vimfiles
RMDir ${dir}\vimfiles\colors
RMDir ${dir}\vimfiles\compiler
RMDir ${dir}\vimfiles\doc
@@ -1065,6 +1110,9 @@ SectionEnd
RMDir ${dir}\vimfiles\keymap
RMDir ${dir}\vimfiles\plugin
RMDir ${dir}\vimfiles\syntax
+ ${If} ${FileExists} ${dir}\vimfiles\.netrwhist*
+ Delete ${dir}\vimfiles\.netrwhist*
+ ${EndIf}
RMDir ${dir}\vimfiles
${EndIf}
!macroend
diff --git a/nsis/lang/greek.nsi b/nsis/lang/greek.nsi
new file mode 100644
index 0000000..5175dd5
--- /dev/null
+++ b/nsis/lang/greek.nsi
@@ -0,0 +1,276 @@
+# vi:set ts=8 sts=4 sw=4 et fdm=marker:
+#
+# greek.nsi: Greek language strings for gvim NSIS installer.
+#
+# Locale ID : 1032
+# fileencoding : UTF-8
+# Author : Christos Longros
+
+!insertmacro MUI_LANGUAGE "Greek"
+
+
+# Overwrite the default translation.
+# These strings should be always English. Otherwise dosinst.c fails.
+LangString ^SetupCaption ${LANG_GREEK} \
+ "$(^Name) Setup"
+LangString ^UninstallCaption ${LANG_GREEK} \
+ "$(^Name) Uninstall"
+
+##############################################################################
+# MUI Configuration Strings {{{1
+##############################################################################
+
+#LangString str_dest_folder ${LANG_GREEK} \
+# "Φάκελος Ï€ÏοοÏισμός (ΠÏέπει να τελειώνει σε $\"vim$\")"
+
+LangString str_show_readme ${LANG_GREEK} \
+ "Εμφάνιση README μετά την ολοκλήÏωση της εγκατάστασης"
+
+# Install types:
+LangString str_type_typical ${LANG_GREEK} \
+ "Typical"
+
+LangString str_type_minimal ${LANG_GREEK} \
+ "Minimal"
+
+LangString str_type_full ${LANG_GREEK} \
+ "Full"
+
+
+##############################################################################
+# Section Titles & Description {{{1
+##############################################################################
+
+LangString str_section_old_ver ${LANG_GREEK} \
+ "Απεγκατάσταση υπάÏχουσων εκδόσεων"
+LangString str_desc_old_ver ${LANG_GREEK} \
+ "Απεγκατάσταση υπάÏχουσων εκδόσεων Vim από το σÏστημά σας."
+
+LangString str_section_exe ${LANG_GREEK} \
+ "Vim GUI and runtime files"
+LangString str_desc_exe ${LANG_GREEK} \
+ "Vim GUI executables and runtime files. This component is required."
+
+LangString str_section_console ${LANG_GREEK} \
+ "Vim console program"
+LangString str_desc_console ${LANG_GREEK} \
+ "Console version of Vim (vim.exe)."
+
+LangString str_section_batch ${LANG_GREEK} \
+ "ΔημιουÏγία αÏχείων .bat"
+LangString str_desc_batch ${LANG_GREEK} \
+ "ΔημιουÏγία αÏχείων .bat από παÏάγωγα Vim στον κατάλογο των Windows για \
+ χÏήση γÏαμμής εντολών."
+
+LangString str_group_icons ${LANG_GREEK} \
+ "ΔημιουÏγία εικονιδίων Vim"
+LangString str_desc_icons ${LANG_GREEK} \
+ "ΔημιουÏγία εικονιδίων για τον Vim σε διάφοÏες τοποθεσίες για την διευκόλυνση της Ï€Ïοσβασιμότητας."
+
+LangString str_section_desktop ${LANG_GREEK} \
+ "Στην επιφάνεια εÏγασίας"
+LangString str_desc_desktop ${LANG_GREEK} \
+ "ΔημιουÏγία εικονιδίων για gVim εκτελέσιμα στην επιφάνεια εÏγασίας."
+
+LangString str_section_start_menu ${LANG_GREEK} \
+ "In the Start Menu Programs Folder"
+LangString str_desc_start_menu ${LANG_GREEK} \
+ "ΠÏοσθήκη του Vim στον φάκελο Ï€ÏογÏαμμάτων του Î¼ÎµÎ½Î¿Ï ÎµÎºÎºÎ¯Î½Î·ÏƒÎ·Ï‚."
+
+#LangString str_section_quick_launch ${LANG_GREEK} \
+# "In the Quick Launch Bar"
+#LangString str_desc_quick_launch ${LANG_GREEK} \
+# "Add Vim shortcut in the quick launch bar."
+
+LangString str_section_edit_with ${LANG_GREEK} \
+ "Add Vim Context Menu"
+LangString str_desc_edit_with ${LANG_GREEK} \
+ "Add Vim to the $\"Open With...$\" context menu list."
+
+#LangString str_section_edit_with32 ${LANG_GREEK} \
+# "32-bit Version"
+#LangString str_desc_edit_with32 ${LANG_GREEK} \
+# "Add Vim to the $\"Open With...$\" context menu list \
+# for 32-bit applications."
+
+#LangString str_section_edit_with64 ${LANG_GREEK} \
+# "64-bit Version"
+#LangString str_desc_edit_with64 ${LANG_GREEK} \
+# "Add Vim to the $\"Open With...$\" context menu list \
+# for 64-bit applications."
+
+LangString str_section_vim_rc ${LANG_GREEK} \
+ "ΔημιουÏγία Ï€Ïοεπιλεγμένων Ïυθμίσεων"
+LangString str_desc_vim_rc ${LANG_GREEK} \
+ "ΔημιουÏγία Ï€Ïοεπιλεγμένου αÏχείου Ïυθμίσεων (_vimrc) αν δεν υπάÏχει ήδη."
+
+LangString str_group_plugin ${LANG_GREEK} \
+ "ΔημιουÏγία καταλόγων Plugin"
+LangString str_desc_plugin ${LANG_GREEK} \
+ "ΔημιουÏγία καταλόγων plugin. Οι κατάλογοι Plugin επιτÏέπουν την επέκταση του Vim \
+ με την μεταφοÏά ενός αÏχείου σε έναν κατάλογο."
+
+LangString str_section_plugin_home ${LANG_GREEK} \
+ "Private"
+LangString str_desc_plugin_home ${LANG_GREEK} \
+ "ΔημιουÏγία καταλόγων plugin στον κατάλογο HOME."
+
+LangString str_section_plugin_vim ${LANG_GREEK} \
+ "Shared"
+LangString str_desc_plugin_vim ${LANG_GREEK} \
+ "ΔημιουÏγία καταλόγων plugin στον κατάλογο εγκατάστασης του Vim, χÏησιμοποιείται από \
+ όλους στο σÏστημα."
+
+LangString str_section_nls ${LANG_GREEK} \
+ "Native Language Support"
+LangString str_desc_nls ${LANG_GREEK} \
+ "Install files for native language support."
+
+LangString str_unsection_register ${LANG_GREEK} \
+ "Unregister Vim"
+LangString str_desc_unregister ${LANG_GREEK} \
+ "Unregister Vim from the system."
+
+LangString str_unsection_exe ${LANG_GREEK} \
+ "Remove Vim Executables/Runtime Files"
+LangString str_desc_rm_exe ${LANG_GREEK} \
+ "Remove all Vim executables and runtime files."
+
+LangString str_ungroup_plugin ${LANG_GREEK} \
+ "Remove plugin directories"
+LangString str_desc_rm_plugin ${LANG_GREEK} \
+ "Remove the plugin directories if they are empty."
+
+LangString str_unsection_plugin_home ${LANG_GREEK} \
+ "Private"
+LangString str_desc_rm_plugin_home ${LANG_GREEK} \
+ "Remove the plugin directories from HOME directory."
+
+LangString str_unsection_plugin_vim ${LANG_GREEK} \
+ "Shared"
+LangString str_desc_rm_plugin_vim ${LANG_GREEK} \
+ "Remove the plugin directories from Vim install directory."
+
+LangString str_unsection_rootdir ${LANG_GREEK} \
+ "Remove the Vim root directory"
+LangString str_desc_rm_rootdir ${LANG_GREEK} \
+ "Remove the Vim root directory. It contains your Vim configuration files!"
+
+
+##############################################################################
+# Messages {{{1
+##############################################################################
+
+#LangString str_msg_too_many_ver ${LANG_GREEK} \
+# "Found $vim_old_ver_count Vim versions on your system.$\r$\n\
+# This installer can only handle ${VIM_MAX_OLD_VER} versions \
+# at most.$\r$\n\
+# Please remove some versions and start again."
+
+#LangString str_msg_invalid_root ${LANG_GREEK} \
+# "Invalid install path: $vim_install_root!$\r$\n\
+# It should end with $\"vim$\"."
+
+#LangString str_msg_bin_mismatch ${LANG_GREEK} \
+# "Binary path mismatch!$\r$\n$\r$\n\
+# Expect the binary path to be $\"$vim_bin_path$\",$\r$\n\
+# but system indicates the binary path is $\"$INSTDIR$\"."
+
+#LangString str_msg_vim_running ${LANG_GREEK} \
+# "Vim is still running on your system.$\r$\n\
+# Please close all instances of Vim before you continue."
+
+#LangString str_msg_register_ole ${LANG_GREEK} \
+# "Attempting to register Vim with OLE. \
+# There is no message indicates whether this works or not."
+
+#LangString str_msg_unreg_ole ${LANG_GREEK} \
+# "Attempting to unregister Vim with OLE. \
+# There is no message indicates whether this works or not."
+
+#LangString str_msg_rm_start ${LANG_GREEK} \
+# "Uninstalling the following version:"
+
+#LangString str_msg_rm_fail ${LANG_GREEK} \
+# "Fail to uninstall the following version:"
+
+#LangString str_msg_no_rm_key ${LANG_GREEK} \
+# "Cannot find uninstaller registry key."
+
+#LangString str_msg_no_rm_reg ${LANG_GREEK} \
+# "Cannot find uninstaller from registry."
+
+#LangString str_msg_no_rm_exe ${LANG_GREEK} \
+# "Cannot access uninstaller."
+
+#LangString str_msg_rm_copy_fail ${LANG_GREEK} \
+# "Fail to copy uninstaller to temporary directory."
+
+#LangString str_msg_rm_run_fail ${LANG_GREEK} \
+# "Αποτυχία εκτέλεσης της λειτουÏγίας απεγκατάστασης."
+
+#LangString str_msg_abort_install ${LANG_GREEK} \
+# "Installer will abort."
+
+LangString str_msg_install_fail ${LANG_GREEK} \
+ "Η εγκατάσταση απέτυχε. Better luck next time."
+
+LangString str_msg_rm_exe_fail ${LANG_GREEK} \
+ "ΜεÏικά αÏχεία στο $0 δεν έχουν διαγÏαφεί!$\r$\n\
+ ΠÏέπει να το κάνετε χειÏοκίνητα."
+
+#LangString str_msg_rm_root_fail ${LANG_GREEK} \
+# "ΠΡΟΕΙΔΟΠΟΙΗΣΗ: ΑδÏνατη η αφαίÏεση $\"$vim_install_root$\", δεν είναι κενό!"
+
+LangString str_msg_uninstalling ${LANG_GREEK} \
+ "Απεγκατάσταση παλιάς έκδοσης the old version..."
+
+LangString str_msg_registering ${LANG_GREEK} \
+ "ΚαταχώÏηση..."
+
+LangString str_msg_unregistering ${LANG_GREEK} \
+ "Unregistering..."
+
+
+##############################################################################
+# Dialog Box {{{1
+##############################################################################
+
+LangString str_vimrc_page_title ${LANG_GREEK} \
+ "Επιλογή Ïυθμίσεων _vimrc"
+LangString str_vimrc_page_subtitle ${LANG_GREEK} \
+ "Choose the settings for enhancement, keyboard and mouse."
+
+LangString str_msg_compat_title ${LANG_GREEK} \
+ " ΣυμπεÏιφοÏά Vi / Vim "
+LangString str_msg_compat_desc ${LANG_GREEK} \
+ "&Compatibility and enhancements"
+LangString str_msg_compat_vi ${LANG_GREEK} \
+ "Vi compatible"
+LangString str_msg_compat_vim ${LANG_GREEK} \
+ "Vim original"
+LangString str_msg_compat_defaults ${LANG_GREEK} \
+ "Vim with some enhancements (load defaults.vim)"
+LangString str_msg_compat_all ${LANG_GREEK} \
+ "Vim with all enhancements (load vimrc_example.vim) (Default)"
+
+LangString str_msg_keymap_title ${LANG_GREEK} \
+ " Mappings "
+LangString str_msg_keymap_desc ${LANG_GREEK} \
+ "&Remap a few keys for Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)"
+LangString str_msg_keymap_default ${LANG_GREEK} \
+ "Do not remap keys (Default)"
+LangString str_msg_keymap_windows ${LANG_GREEK} \
+ "Remap a few keys"
+
+LangString str_msg_mouse_title ${LANG_GREEK} \
+ " Ποντίκι "
+LangString str_msg_mouse_desc ${LANG_GREEK} \
+ "&Behavior of right and left buttons"
+LangString str_msg_mouse_default ${LANG_GREEK} \
+ "Right: popup menu, Left: visual mode (Default)"
+LangString str_msg_mouse_windows ${LANG_GREEK} \
+ "Right: popup menu, Left: select mode (Windows)"
+LangString str_msg_mouse_unix ${LANG_GREEK} \
+ "Right: extends selection, Left: visual mode (Unix)"
+
diff --git a/nsis/lang/russian.nsi b/nsis/lang/russian.nsi
index e451208..e4b01e3 100644
--- a/nsis/lang/russian.nsi
+++ b/nsis/lang/russian.nsi
@@ -22,20 +22,20 @@ LangString ^UninstallCaption ${LANG_RUSSIAN} \
##############################################################################
#LangString str_dest_folder ${LANG_RUSSIAN} \
-# "Маршрут к каталогу уÑтановки (должен оканчиватьÑÑ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ð¾Ð¼ $\"vim$\")"
+# "Маршрут уÑтановки программы (должен завершатьÑÑ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ð¾Ð¼ $\"vim$\")"
LangString str_show_readme ${LANG_RUSSIAN} \
- "ПоÑле Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ ÑƒÑтановки ознакомитьÑÑ Ñ ÐºÑ€Ð°Ñ‚ÐºÐ¸Ð¼ опиÑанием"
+ " ОзнакомитьÑÑ Ñ ÐºÑ€Ð°Ñ‚ÐºÐ¸Ð¼ опиÑанием программы"
# Install types:
LangString str_type_typical ${LANG_RUSSIAN} \
- "СтандартнаÑ"
+ "Стандартный"
LangString str_type_minimal ${LANG_RUSSIAN} \
- "МинимальнаÑ"
+ "Минимальный"
LangString str_type_full ${LANG_RUSSIAN} \
- "ПолнаÑ"
+ "Полный"
##############################################################################
@@ -50,59 +50,61 @@ LangString str_desc_old_ver ${LANG_RUSSIAN} \
LangString str_section_exe ${LANG_RUSSIAN} \
"ГрафичеÑкий Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð¸ вÑпомогательные файлы"
LangString str_desc_exe ${LANG_RUSSIAN} \
- "ГрафичеÑкий Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¼Ñ‹ Vim и вÑе необходимые Ð´Ð»Ñ Ñтого файлы. \
+ "ИÑполнÑемые файлы и вÑе необходимые Ð´Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ программы файлы. \
Это обÑзательный компонент"
LangString str_section_console ${LANG_RUSSIAN} \
"КонÑÐ¾Ð»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¼Ð° Vim"
LangString str_desc_console ${LANG_RUSSIAN} \
- "Вариант редактора Vim (vim.exe), иÑпользуемый в командной оболочке"
+ "Вариант редактора Vim (vim.exe), иÑпользуемый Ð´Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ в командной \
+ оболочке"
LangString str_section_batch ${LANG_RUSSIAN} \
"Создать командные файлы"
LangString str_desc_batch ${LANG_RUSSIAN} \
- "Создание командных bat-файлов позволÑющих работать Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¾Ñ€Ð¾Ð¼ \
- Vim из командной Ñтроки Windows"
+ "Создание командных bat-файлов в каталоге Windows Ð´Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¾Ñ€Ð¾Ð¼ \
+ Vim из командной Ñтроки"
LangString str_group_icons ${LANG_RUSSIAN} \
"Создать Ñрлыки Ð´Ð»Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¾Ñ€Ð° Vim"
LangString str_desc_icons ${LANG_RUSSIAN} \
- "Создание Ñрлыков редактора Vim Ð´Ð»Ñ Ð¾Ð±Ð»ÐµÐ³Ñ‡ÐµÐ½Ð¸Ñ Ð·Ð°Ð¿ÑƒÑка программы"
+ "Создание Ñрлыков программы Ð´Ð»Ñ ÑƒÐ´Ð¾Ð±Ð½Ð¾Ð³Ð¾ и быÑтрого запуÑка редактора Vim"
LangString str_section_desktop ${LANG_RUSSIAN} \
"Ðа Рабочем Ñтоле"
LangString str_desc_desktop ${LANG_RUSSIAN} \
- "Создание Ñрлыков программы Gvim на Рабочем Ñтоле"
+ "Создание Ñрлыков редактора Vim на Рабочем Ñтоле"
LangString str_section_start_menu ${LANG_RUSSIAN} \
"Ð’ меню кнопки ПуÑк"
LangString str_desc_start_menu ${LANG_RUSSIAN} \
- "Создание Ñрлыков программы Gvim в меню кнопки ПуÑк"
+ "Создание Ñрлыков редактора Vim в меню кнопки ПуÑк"
#LangString str_section_quick_launch ${LANG_RUSSIAN} \
# "Ðа панели быÑтрого запуÑка"
#LangString str_desc_quick_launch ${LANG_RUSSIAN} \
-# "Создание Ñрлыков программы GVim на панели быÑтрого запуÑка"
+# "Создание Ñрлыков редактора Vim на панели быÑтрого запуÑка"
LangString str_section_edit_with ${LANG_RUSSIAN} \
- "Ð’ контекÑтном меню"
+ "ЗапуÑк редактора Vim из контекÑтного меню"
LangString str_desc_edit_with ${LANG_RUSSIAN} \
- "Добавление вызова программы Gvim в пункт $\"Открыть Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ...$\" контекÑтного меню"
+ "Добавление необходимой Ñтроки в пункт контекÑтного меню \
+ «Открыть Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ...»"
#LangString str_section_edit_with32 ${LANG_RUSSIAN} \
-# "32-разрÑÐ´Ð½Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¼Ñ‹"
+# "Ð”Ð»Ñ 32-разрÑдной верÑии программы"
#LangString str_desc_edit_with32 ${LANG_RUSSIAN} \
-# "Добавление вызова программы Gvim в пункт $\"Открыть Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ...$\" контекÑтного меню \
-# Ð´Ð»Ñ 32-разрÑдных приложений"
+# "Добавление в пункт контекÑтного меню \
+# «Открыть Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ...» 32-разрÑдных приложений"
#LangString str_section_edit_with64 ${LANG_RUSSIAN} \
-# "64-разрÑÐ´Ð½Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¼Ñ‹"
+# "Ð”Ð»Ñ 64-разрÑдной верÑии программы"
#LangString str_desc_edit_with64 ${LANG_RUSSIAN} \
-# "Добавление вызова программы Gvim в пункт $\"Открыть Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ...$\" контекÑтного меню \
-# Ð´Ð»Ñ 64-разрÑдных приложений"
+# "Добавление в пункт контекÑтного меню \
+# «Открыть Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ...» 64-разрÑдных приложений"
LangString str_section_vim_rc ${LANG_RUSSIAN} \
- "ÐаÑтройки программы по умолчанию"
+ "ÐÐ°Ñ‡Ð°Ð»ÑŒÐ½Ð°Ñ Ð½Ð°Ñтройка программы"
LangString str_desc_vim_rc ${LANG_RUSSIAN} \
"Создание файла _vimrc Ñ Ð¿Ñ€ÐµÐ´ÑƒÑтановленными наÑтройками, еÑли нет других \
файлов наÑтроек"
@@ -110,25 +112,31 @@ LangString str_desc_vim_rc ${LANG_RUSSIAN} \
LangString str_group_plugin ${LANG_RUSSIAN} \
"Создать каталог Ð´Ð»Ñ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡Ð°ÐµÐ¼Ñ‹Ñ… модулей"
LangString str_desc_plugin ${LANG_RUSSIAN} \
- "Создание каталога Ð´Ð»Ñ Ñ€Ð°Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡Ð°ÐµÐ¼Ñ‹Ñ… модулей, которые раÑширÑÑŽÑ‚ \
- возможноÑти редактора Vim"
+ "Создание каталога Ð´Ð»Ñ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡Ð°ÐµÐ¼Ñ‹Ñ… модулей, которые раÑширÑÑŽÑ‚ возможноÑти \
+ редактора Vim"
LangString str_section_plugin_home ${LANG_RUSSIAN} \
"Личный каталог"
LangString str_desc_plugin_home ${LANG_RUSSIAN} \
- "Создание каталога Ð´Ð»Ñ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡Ð°ÐµÐ¼Ñ‹Ñ… модулей в домашнем каталоге пользователÑ"
+ "Ð’ домашнем каталоге пользователÑ. Модули в Ñтом каталоге доÑтупны только \
+ Ñтому пользователю"
LangString str_section_plugin_vim ${LANG_RUSSIAN} \
"Общий каталог"
LangString str_desc_plugin_vim ${LANG_RUSSIAN} \
- "Создание каталога Ð´Ð»Ñ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡Ð°ÐµÐ¼Ñ‹Ñ… модулей в каталоге уÑтановки редактора Vim. \
- Модули в Ñтом каталоге будут доÑтупны Ð´Ð»Ñ Ð»ÑŽÐ±Ð¾Ð³Ð¾ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ \
- зарегиÑтрировавшегоÑÑ Ð² ÑиÑтеме"
+ "Ð’ каталоге уÑтановки редактора Vim. Модули в Ñтом каталоге доÑтупны Ð´Ð»Ñ \
+ вÑех пользователей"
+
+#LangString str_section_vis_vim ${LANG_RUSSIAN} \
+# "Подключаемый модуль VisVim"
+#LangString str_desc_vis_vim ${LANG_RUSSIAN} \
+# "Подключаемый модуль VisVim иÑпользуетÑÑ Ð´Ð»Ñ Ð¸Ð½Ñ‚ÐµÐ³Ñ€Ð°Ñ†Ð¸Ð¸ Ñ \
+# Microsoft Visual Studio"
LangString str_section_nls ${LANG_RUSSIAN} \
"Поддержка региональных Ñзыков"
LangString str_desc_nls ${LANG_RUSSIAN} \
- "УÑтановка файлов Ð´Ð»Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶ÐºÐ¸ региональных Ñзыков операционной ÑиÑтемы"
+ "УÑтановка файлов Ð´Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ программе на различных региональных Ñзыках"
LangString str_unsection_register ${LANG_RUSSIAN} \
"Отменить региÑтрацию компонентов программы Vim"
@@ -158,8 +166,8 @@ LangString str_desc_rm_plugin_vim ${LANG_RUSSIAN} \
LangString str_unsection_rootdir ${LANG_RUSSIAN} \
"Удалить оÑновной каталог программы Vim"
LangString str_desc_rm_rootdir ${LANG_RUSSIAN} \
- "Удаление оÑновного каталога программы Vim. Ð’ Ñтом каталоге находÑÑ‚ÑÑ Ñ„Ð°Ð¹Ð»Ñ‹ \
- наÑтроек!"
+ "Удаление оÑновного каталога программы Vim. Ð’ Ñтом каталоге находÑÑ‚ÑÑ \
+ файлы наÑтроек!"
##############################################################################
@@ -199,10 +207,11 @@ LangString str_desc_rm_rootdir ${LANG_RUSSIAN} \
# "Произошёл Ñбой при выполнении ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ñледующих верÑий программы:"
#LangString str_msg_no_rm_key ${LANG_RUSSIAN} \
-# "Ðе удалоÑÑŒ найти раздел рееÑтра, Ñодержащий информацию об удалении программы"
+# "Ðе удалоÑÑŒ найти раздел рееÑтра, Ñодержащий информацию об удалении \
+# программы"
#LangString str_msg_no_rm_reg ${LANG_RUSSIAN} \
-# "Ðе удалоÑÑŒ найти программу выполнÑющую удаление, указанную в разделе рееÑтра"
+# "Ðе удалоÑÑŒ найти указанную в рееÑтре программу, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½Ñет удаление"
#LangString str_msg_no_rm_exe ${LANG_RUSSIAN} \
# "ОтÑутÑтвуют права на доÑтуп к программе, выполнÑющей удаление"
@@ -219,14 +228,15 @@ LangString str_desc_rm_rootdir ${LANG_RUSSIAN} \
LangString str_msg_install_fail ${LANG_RUSSIAN} \
"Произошла ошибка при уÑтановке программы. Попробуйте повторить уÑтановку \
немного попозже"
-# когда луна будет в другой фазе и ветер должен дуть Ñ ÑŽÐ³Ð¾â€Ð·Ð°Ð¿Ð°Ð´Ð°
+# когда Луна будет в другой фазе и ветер должен дуть Ñ ÑŽÐ³Ð¾â€Ð·Ð°Ð¿Ð°Ð´Ð°
LangString str_msg_rm_exe_fail ${LANG_RUSSIAN} \
"Ðекоторые файлы не были удалены из каталога $0 $\r$\n\
Ðеобходимо выполнить их удаление ÑамоÑтоÑтельно"
#LangString str_msg_rm_root_fail ${LANG_RUSSIAN} \
-# "Внимание! Ð’ каталоге $\"$vim_install_root$\" ÑодержатÑÑ Ñ„Ð°Ð¹Ð»Ñ‹. Удаление каталога не выполнено"
+# "Внимание! Ð’ каталоге $\"$vim_install_root$\" ÑодержатÑÑ Ñ„Ð°Ð¹Ð»Ñ‹. Удаление \
+# каталога не выполнено"
LangString str_msg_uninstalling ${LANG_RUSSIAN} \
"Удаление предыдущих верÑий программ..."
@@ -245,7 +255,8 @@ LangString str_msg_unregistering ${LANG_RUSSIAN} \
LangString str_vimrc_page_title ${LANG_RUSSIAN} \
"УÑтановка параметров программы"
LangString str_vimrc_page_subtitle ${LANG_RUSSIAN} \
- "Параметры, иÑпользуемые Ð´Ð»Ñ ÐºÐ»Ð°Ð²Ð¸Ð°Ñ‚ÑƒÑ€Ñ‹, «мыши» и функциональноÑти программы"
+ "Параметры, иÑпользуемые Ð´Ð»Ñ ÐºÐ»Ð°Ð²Ð¸Ð°Ñ‚ÑƒÑ€Ñ‹, манипулÑтора «мышь» и \
+ функциональноÑти программы"
LangString str_msg_compat_title ${LANG_RUSSIAN} \
" Варианты иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¼Ñ‹ "
@@ -256,27 +267,26 @@ LangString str_msg_compat_vi ${LANG_RUSSIAN} \
LangString str_msg_compat_vim ${LANG_RUSSIAN} \
"Работа в варианте функциональноÑти редактора Vim"
LangString str_msg_compat_defaults ${LANG_RUSSIAN} \
- "Работа редактора Vim Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ð¼Ð¸ улучшениÑми (файл defaults.vim)"
+ "Включить некоторые ÑƒÐ»ÑƒÑ‡ÑˆÐµÐ½Ð¸Ñ (из файла defaults.vim)"
LangString str_msg_compat_all ${LANG_RUSSIAN} \
- "Работа редактора Vim Ñо вÑеми улучшениÑми (файл vimrc_example.vim). \
- ИÑпользуетÑÑ Ð¿Ð¾ умолчанию"
+ "Включить вÑе ÑƒÐ»ÑƒÑ‡ÑˆÐµÐ½Ð¸Ñ (из файла vimrc_example.vim). Стандартно"
LangString str_msg_keymap_title ${LANG_RUSSIAN} \
" Клавиатурные команды "
LangString str_msg_keymap_desc ${LANG_RUSSIAN} \
- "Клавиатурные команды иÑпользуемые в ОС Windows (CTRL+V, CTRL+C, CTRL+S, CTRL+F и Ñ‚. п.)"
+ "Изменение клавиатурных команд CTRL+V, CTRL+C, CTRL+S, CTRL+F и т. п."
LangString str_msg_keymap_default ${LANG_RUSSIAN} \
- "Ðе изменÑÑ‚ÑŒ клавиатурные команды. ИÑпользовать принÑтые в редакторе Vim"
+ "Без изменениÑ, иÑпользовать как принÑто в редакторе Vim"
LangString str_msg_keymap_windows ${LANG_RUSSIAN} \
- "Изменить указанные клавиатурные команды"
+ "Изменить и иÑпользовать как принÑто в ОС Windows"
LangString str_msg_mouse_title ${LANG_RUSSIAN} \
" МанипулÑтор «мышь» "
LangString str_msg_mouse_desc ${LANG_RUSSIAN} \
- "ДейÑтвий правой и левой кнопки манипулÑтора «мышь»"
+ "ДейÑÑ‚Ð²Ð¸Ñ Ð¿Ñ€Ð°Ð²Ð¾Ð¹ и левой кнопки манипулÑтора «мышь»"
LangString str_msg_mouse_default ${LANG_RUSSIAN} \
- "ÐŸÑ€Ð°Ð²Ð°Ñ ÐºÐ½Ð¾Ð¿ÐºÐ° — вÑплывающее меню, Ð»ÐµÐ²Ð°Ñ ÐºÐ½Ð¾Ð¿ÐºÐ° — режим визуальный"
+ "ÐŸÑ€Ð°Ð²Ð°Ñ â€” вÑплывающее меню, Ð»ÐµÐ²Ð°Ñ â€” режим визуальный (Vim)"
LangString str_msg_mouse_windows ${LANG_RUSSIAN} \
- "ÐŸÑ€Ð°Ð²Ð°Ñ ÐºÐ½Ð¾Ð¿ÐºÐ° — вÑплывающее меню, Ð»ÐµÐ²Ð°Ñ ÐºÐ½Ð¾Ð¿ÐºÐ° — режим выборки (как в ОС Windows)"
+ "ÐŸÑ€Ð°Ð²Ð°Ñ â€” вÑплывающее меню, Ð»ÐµÐ²Ð°Ñ â€” режим выборки (Windows)"
LangString str_msg_mouse_unix ${LANG_RUSSIAN} \
- "ÐŸÑ€Ð°Ð²Ð°Ñ ÐºÐ½Ð¾Ð¿ÐºÐ° — раÑширÑемый режим выбора, Ð»ÐµÐ²Ð°Ñ ÐºÐ½Ð¾Ð¿ÐºÐ° — режим визуальный (как в UNIXâ€Ð¿Ð¾Ð´Ð¾Ð±Ð½Ñ‹Ñ… ОС)"
+ "ÐŸÑ€Ð°Ð²Ð°Ñ â€” раÑширение выборки, Ð»ÐµÐ²Ð°Ñ â€” режим визуальный (UNIX)"
diff --git a/nsis/lang/serbian.nsi b/nsis/lang/serbian.nsi
index 9912ec5..11d889a 100644
--- a/nsis/lang/serbian.nsi
+++ b/nsis/lang/serbian.nsi
@@ -6,7 +6,7 @@
# fileencoding : UTF-8
# Author : Ivan Pešić
-!insertmacro MUI_LANGUAGE "СрпÑки"
+!insertmacro MUI_LANGUAGE "Serbian"
# Overwrite the default translation.
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
index 9d0f2ee..1462830 100644
--- a/runtime/autoload/dist/ft.vim
+++ b/runtime/autoload/dist/ft.vim
@@ -3,7 +3,7 @@ vim9script
# Vim functions for file type detection
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
-# Last Change: 2024 Jan 05
+# Last Change: 2024 Feb 18
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
# These functions are moved here from runtime/filetype.vim to make startup
@@ -531,7 +531,7 @@ def IsLProlog(): bool
enddef
def IsModula2(): bool
- return getline(nextnonblank(1)) =~ '\<MODULE\s\+\w\+\s*;\|^\s*(\*'
+ return getline(nextnonblank(1)) =~ '\<MODULE\s\+\w\+\s*\%(\[.*]\s*\)\=;\|^\s*(\*'
enddef
def SetFiletypeModula2()
@@ -1293,4 +1293,4 @@ export def FTvba()
enddef
# Uncomment this line to check for compilation errors early
-defcompile
+# defcompile
diff --git a/runtime/autoload/dist/man.vim b/runtime/autoload/dist/man.vim
index 7f7d137..708e106 100644
--- a/runtime/autoload/dist/man.vim
+++ b/runtime/autoload/dist/man.vim
@@ -3,7 +3,7 @@
" Maintainer: Jason Franklin <jason@oneway.dev>
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Autoload Split: Bram Moolenaar
-" Last Change: 2023 Jun 28
+" Last Change: 2024 Jan 17 (make it work on AIX, see #13847)
let s:cpo_save = &cpo
set cpo-=C
@@ -13,14 +13,26 @@ let s:man_tag_depth = 0
let s:man_sect_arg = ""
let s:man_find_arg = "-w"
try
- if !has("win32") && $OSTYPE !~ 'cygwin\|linux' && system('uname -s') =~ "SunOS" && system('uname -r') =~ "^5"
- let s:man_sect_arg = "-s"
- let s:man_find_arg = "-l"
+ if !has("win32") && $OSTYPE !~ 'cygwin\|linux'
+ " cache the value
+ let uname_s = system('uname -s')
+
+ if uname_s =~ "SunOS" && system('uname -r') =~ "^5"
+ " Special Case for Man on SunOS
+ let s:man_sect_arg = "-s"
+ let s:man_find_arg = "-l"
+ elseif uname_s =~? 'AIX'
+ " Special Case for Man on AIX
+ let s:man_sect_arg = ""
+ let s:man_find_arg = ""
+ endif
endif
catch /E145:/
" Ignore the error in restricted mode
endtry
+unlet! uname_s
+
func s:ParseIntoPageAndSection()
" Accommodate a reference that terminates in a hyphen.
"
diff --git a/runtime/autoload/dist/vimindent.vim b/runtime/autoload/dist/vimindent.vim
index a5e04a5..07b2153 100644
--- a/runtime/autoload/dist/vimindent.vim
+++ b/runtime/autoload/dist/vimindent.vim
@@ -3,6 +3,9 @@ vim9script
# Language: Vim script
# Maintainer: github user lacygoill
# Last Change: 2023 Jun 29
+#
+# Includes Changes from Vim:
+# - 2024 Feb 09: Fix indent after literal Dict (A. Radev via #13966)
# NOTE: Whenever you change the code, make sure the tests are still passing:
#
@@ -381,7 +384,7 @@ const LINE_CONTINUATION_AT_EOL: string = '\%('
# It can be the start of a dictionary or a block.
# We only want to match the former.
.. '\|' .. $'^\%({STARTS_CURLY_BLOCK}\)\@!.*\zs{{'
- .. '\)\s*\%(\s#.*\)\=$'
+ .. '\)\s*\%(\s#[^{].*\)\=$'
# }}}2
# SOL {{{2
# BACKSLASH_AT_SOL {{{3
diff --git a/runtime/autoload/getscript.vim b/runtime/autoload/getscript.vim
index 1b14fe1..1fd4e63 100644
--- a/runtime/autoload/getscript.vim
+++ b/runtime/autoload/getscript.vim
@@ -1,6 +1,7 @@
" ---------------------------------------------------------------------
" getscript.vim
-" Author: Charles E. Campbell
+" Maintainer: This runtime file is looking for a new maintainer.
+" Original Author: Charles E. Campbell
" Date: Jan 21, 2014
" Version: 36
" Installing: :help glvs-install
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index 748ac22..2206c21 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -1,11 +1,14 @@
" netrw.vim: Handles file transfer and remote directory listing across
" AUTOLOAD SECTION
-" Date: May 03, 2023
+" Maintainer: This runtime file is looking for a new maintainer.
+" Date: May 03, 2023
" Version: 173a
" Last Change:
" 2023 Nov 21 by Vim Project: ignore wildignore when expanding $COMSPEC (v173a)
" 2023 Nov 22 by Vim Project: fix handling of very long filename on longlist style (v173a)
-" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" 2024 Feb 19 by Vim Project: (announce adoption)
+" 2024 Feb 29 by Vim Project: handle symlinks in tree mode correctly
+" Former Maintainer: Charles E Campbell
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
@@ -2020,7 +2023,7 @@ fun! NetrwStatusLine()
if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list")
" restore user's status line
- let &stl = s:netrw_users_stl
+ let &l:stl = s:netrw_users_stl
let &laststatus = s:netrw_users_ls
if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif
if exists("w:netrw_explore_line") |unlet w:netrw_explore_line |endif
@@ -2121,9 +2124,9 @@ fun! netrw#NetRead(mode,...)
let wholechoice = wholechoice . " " . choice
let ichoice = ichoice + 1
if ichoice > a:0
- if !exists("g:netrw_quiet")
- call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",3)
- endif
+ if !exists("g:netrw_quiet")
+ call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",3)
+ endif
" call Dret("netrw#NetRead :2 getcwd<".getcwd().">")
return
endif
@@ -2544,9 +2547,9 @@ fun! netrw#NetWrite(...) range
let wholechoice= wholechoice . " " . choice
let ichoice = ichoice + 1
if choice > a:0
- if !exists("g:netrw_quiet")
- call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",13)
- endif
+ if !exists("g:netrw_quiet")
+ call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",13)
+ endif
" call Dret("netrw#NetWrite")
return
endif
@@ -2817,7 +2820,7 @@ fun! netrw#NetWrite(...) range
if a:firstline == 1 && a:lastline == line("$")
" restore modifiability; usually equivalent to set nomod
- let &mod= mod
+ let &l:mod= mod
" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
elseif !exists("leavemod")
" indicate that the buffer has not been modified since last written
@@ -3006,7 +3009,7 @@ fun! s:NetrwGetFile(readcmd, tfile, method)
setl isk-=/
filetype detect
" call Decho("..local filetype<".&ft."> for buf#".bufnr()."<".bufname().">")
- let &isk= iskkeep
+ let &l:isk= iskkeep
" call Dredir("ls!","NetrwGetFile (renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">)")
let line1 = 1
let line2 = line("$")
@@ -5003,12 +5006,12 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
if g:netrw_chgwin >= 1
" call Decho("edit-a-file: changing window to #".g:netrw_chgwin.": (due to g:netrw_chgwin)",'~'.expand("<slnum>"))
if winnr("$")+1 == g:netrw_chgwin
- " if g:netrw_chgwin is set to one more than the last window, then
- " vertically split the last window to make that window available.
- let curwin= winnr()
- exe "NetrwKeepj keepalt ".winnr("$")."wincmd w"
- vs
- exe "NetrwKeepj keepalt ".g:netrw_chgwin."wincmd ".curwin
+ " if g:netrw_chgwin is set to one more than the last window, then
+ " vertically split the last window to make that window available.
+ let curwin= winnr()
+ exe "NetrwKeepj keepalt ".winnr("$")."wincmd w"
+ vs
+ exe "NetrwKeepj keepalt ".g:netrw_chgwin."wincmd ".curwin
endif
exe "NetrwKeepj keepalt ".g:netrw_chgwin."wincmd w"
endif
@@ -6127,7 +6130,7 @@ fun! s:NetrwServerEdit(islocal,fname)
" used something like <cr>.
" call Decho("user must have closed server AND did not use ctrl-r",'~'.expand("<slnum>"))
if exists("g:netrw_browse_split")
- unlet g:netrw_browse_split
+ unlet g:netrw_browse_split
endif
let g:netrw_browse_split= 0
if exists("s:netrw_browse_split_".winnr())
@@ -6161,7 +6164,7 @@ fun! s:NetrwServerEdit(islocal,fname)
if !ctrlr
" call Decho("server<".g:netrw_servername."> not available and ctrl-r not used",'~'.expand("<slnum>"))
if exists("g:netrw_browse_split")
- unlet g:netrw_browse_split
+ unlet g:netrw_browse_split
endif
let g:netrw_browse_split= 0
call s:NetrwBrowse(islocal,s:NetrwBrowseChgDir(islocal,a:fname))
@@ -6679,14 +6682,14 @@ fun! s:NetrwMaps(islocal)
nmap <buffer> <2-leftmouse> <Plug>Netrw2Leftmouse
imap <buffer> <leftmouse> <Plug>ILeftmouse
imap <buffer> <middlemouse> <Plug>IMiddlemouse
- nno <buffer> <silent> <Plug>NetrwLeftmouse <leftmouse>:call <SID>NetrwLeftmouse(1)<cr>
- nno <buffer> <silent> <Plug>NetrwCLeftmouse <leftmouse>:call <SID>NetrwCLeftmouse(1)<cr>
- nno <buffer> <silent> <Plug>NetrwMiddlemouse <leftmouse>:call <SID>NetrwPrevWinOpen(1)<cr>
- nno <buffer> <silent> <Plug>NetrwSLeftmouse <leftmouse>:call <SID>NetrwSLeftmouse(1)<cr>
- nno <buffer> <silent> <Plug>NetrwSLeftdrag <leftmouse>:call <SID>NetrwSLeftdrag(1)<cr>
+ nno <buffer> <silent> <Plug>NetrwLeftmouse :exec "norm! \<lt>leftmouse>"<bar>call <SID>NetrwLeftmouse(1)<cr>
+ nno <buffer> <silent> <Plug>NetrwCLeftmouse :exec "norm! \<lt>leftmouse>"<bar>call <SID>NetrwCLeftmouse(1)<cr>
+ nno <buffer> <silent> <Plug>NetrwMiddlemouse :exec "norm! \<lt>leftmouse>"<bar>call <SID>NetrwPrevWinOpen(1)<cr>
+ nno <buffer> <silent> <Plug>NetrwSLeftmouse :exec "norm! \<lt>leftmouse>"<bar>call <SID>NetrwSLeftmouse(1)<cr>
+ nno <buffer> <silent> <Plug>NetrwSLeftdrag :exec "norm! \<lt>leftmouse>"<bar>call <SID>NetrwSLeftdrag(1)<cr>
nmap <buffer> <silent> <Plug>Netrw2Leftmouse -
- exe 'nnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
- exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
+ exe 'nnoremap <buffer> <silent> <rightmouse> :exec "norm! \<lt>leftmouse>"<bar>call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
+ exe 'vnoremap <buffer> <silent> <rightmouse> :exec "norm! \<lt>leftmouse>"<bar>call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
endif
exe 'nnoremap <buffer> <silent> <nowait> <del> :call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
exe 'nnoremap <buffer> <silent> <nowait> D :call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
@@ -6780,22 +6783,22 @@ fun! s:NetrwMaps(islocal)
nnoremap <buffer> <silent> <Plug>NetrwRefresh :call <SID>NetrwRefresh(0,<SID>NetrwBrowseChgDir(0,'./'))<cr>
if g:netrw_mousemaps == 1
nmap <buffer> <leftmouse> <Plug>NetrwLeftmouse
- nno <buffer> <silent> <Plug>NetrwLeftmouse <leftmouse>:call <SID>NetrwLeftmouse(0)<cr>
+ nno <buffer> <silent> <Plug>NetrwLeftmouse :exec "norm! \<lt>leftmouse>"<bar>call <SID>NetrwLeftmouse(0)<cr>
nmap <buffer> <c-leftmouse> <Plug>NetrwCLeftmouse
- nno <buffer> <silent> <Plug>NetrwCLeftmouse <leftmouse>:call <SID>NetrwCLeftmouse(0)<cr>
+ nno <buffer> <silent> <Plug>NetrwCLeftmouse :exec "norm! \<lt>leftmouse>"<bar>call <SID>NetrwCLeftmouse(0)<cr>
nmap <buffer> <s-leftmouse> <Plug>NetrwSLeftmouse
- nno <buffer> <silent> <Plug>NetrwSLeftmouse <leftmouse>:call <SID>NetrwSLeftmouse(0)<cr>
+ nno <buffer> <silent> <Plug>NetrwSLeftmouse :exec "norm! \<lt>leftmouse>"<bar>call <SID>NetrwSLeftmouse(0)<cr>
nmap <buffer> <s-leftdrag> <Plug>NetrwSLeftdrag
- nno <buffer> <silent> <Plug>NetrwSLeftdrag <leftmouse>:call <SID>NetrwSLeftdrag(0)<cr>
+ nno <buffer> <silent> <Plug>NetrwSLeftdrag :exec "norm! \<lt>leftmouse>"<bar>call <SID>NetrwSLeftdrag(0)<cr>
nmap <middlemouse> <Plug>NetrwMiddlemouse
- nno <buffer> <silent> <middlemouse> <Plug>NetrwMiddlemouse <leftmouse>:call <SID>NetrwPrevWinOpen(0)<cr>
+ nno <buffer> <silent> <middlemouse> <Plug>NetrwMiddlemouse :exec "norm! \<lt>leftmouse>"<bar>call <SID>NetrwPrevWinOpen(0)<cr>
nmap <buffer> <2-leftmouse> <Plug>Netrw2Leftmouse
nmap <buffer> <silent> <Plug>Netrw2Leftmouse -
imap <buffer> <leftmouse> <Plug>ILeftmouse
imap <buffer> <middlemouse> <Plug>IMiddlemouse
imap <buffer> <s-leftmouse> <Plug>ISLeftmouse
- exe 'nnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
- exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+ exe 'nnoremap <buffer> <silent> <rightmouse> :exec "norm! \<lt>leftmouse>"<bar>call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+ exe 'vnoremap <buffer> <silent> <rightmouse> :exec "norm! \<lt>leftmouse>"<bar>call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
endif
exe 'nnoremap <buffer> <silent> <nowait> <del> :call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
exe 'nnoremap <buffer> <silent> <nowait> d :call <SID>NetrwMakeDir("'.mapsafeusermach.'")<cr>'
@@ -7506,7 +7509,7 @@ fun! s:NetrwMarkFileExe(islocal,enbloc)
for fname in s:netrwmarkfilelist_{curbufnr}
if a:islocal
if g:netrw_keepdir
- let fname= s:ShellEscape(netrw#WinPath(s:ComposePath(curdir,fname)))
+ let fname= s:ShellEscape(netrw#WinPath(s:ComposePath(curdir,fname)))
endif
else
let fname= s:ShellEscape(netrw#WinPath(b:netrw_curdir.fname))
@@ -7862,7 +7865,7 @@ fun! s:NetrwMarkFileMove(islocal)
let movecmd = netrw#WinPath(movecmd).movecmdargs
" call Decho("windows exception: movecmd<".movecmd."> (#1: had a space)",'~'.expand("<slnum>"))
else
- let movecmd = netrw#WinPath(movecmd)
+ let movecmd = netrw#WinPath(g:netrw_localmovecmd)
" call Decho("windows exception: movecmd<".movecmd."> (#2: no space)",'~'.expand("<slnum>"))
endif
else
@@ -7876,10 +7879,6 @@ fun! s:NetrwMarkFileMove(islocal)
endif
if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
let fname= substitute(fname,'/','\\','g')
- if g:netrw_keepdir
- " Jul 19, 2022: fixing file move when g:netrw_keepdir is 1
- let fname= b:netrw_curdir."\\".fname
- endif
endif
" call Decho("system(".movecmd." ".s:ShellEscape(fname)." ".tgt.")",'~'.expand("<slnum>"))
let ret= system(movecmd.g:netrw_localmovecmdopt." ".s:ShellEscape(fname)." ".tgt)
@@ -9478,7 +9477,7 @@ fun! s:NetrwTreeDir(islocal)
" call Decho("treedir<".treedir.">",'~'.expand("<slnum>"))
elseif curline =~ '@$'
" call Decho("handle symbolic link from current line",'~'.expand("<slnum>"))
- let treedir= resolve(substitute(substitute(getline('.'),'@.*$','','e'),'^|*\s*','','e'))
+ let potentialdir= resolve(substitute(substitute(getline('.'),'@.*$','','e'),'^|*\s*','','e'))
" call Decho("treedir<".treedir.">",'~'.expand("<slnum>"))
else
" call Decho("do not extract tree subdirectory from current line and set treedir to empty",'~'.expand("<slnum>"))
@@ -9503,7 +9502,6 @@ fun! s:NetrwTreeDir(islocal)
" call Decho("COMBAK#23 : mod=".&mod." win#".winnr())
" call Decho("islocal=".a:islocal." curline<".curline.">",'~'.expand("<slnum>"))
- let potentialdir= s:NetrwFile(substitute(curline,'^'.s:treedepthstring.'\+ \(.*\)@$','\1',''))
" call Decho("potentialdir<".potentialdir."> isdir=".isdirectory(potentialdir),'~'.expand("<slnum>"))
" call Decho("COMBAK#24 : mod=".&mod." win#".winnr())
@@ -9516,8 +9514,15 @@ fun! s:NetrwTreeDir(islocal)
" " call Decho("newdir <".newdir.">",'~'.expand("<slnum>"))
" else
" call Decho("apply NetrwTreePath to treetop<".w:netrw_treetop.">",'~'.expand("<slnum>"))
- let treedir = s:NetrwTreePath(w:netrw_treetop)
-" endif
+ if a:islocal && curline =~ '@$'
+ if isdirectory(s:NetrwFile(potentialdir))
+ let treedir = w:netrw_treetop.'/'.potentialdir.'/'
+ let w:netrw_treetop = treedir
+ endif
+ else
+ let potentialdir= s:NetrwFile(substitute(curline,'^'.s:treedepthstring.'\+ \(.*\)@$','\1',''))
+ let treedir = s:NetrwTreePath(w:netrw_treetop)
+ endif
endif
" call Decho("COMBAK#25 : mod=".&mod." win#".winnr())
@@ -10215,7 +10220,7 @@ fun! s:SetupNetrwStatusLine(statline)
" set up status line (may use User9 highlighting)
" insure that windows have a statusline
" make sure statusline is displayed
- let &stl=a:statline
+ let &l:stl=a:statline
setl laststatus=2
" call Decho("stl=".&stl,'~'.expand("<slnum>"))
redraw
@@ -10331,7 +10336,7 @@ fun! s:NetrwRemoteFtpCmd(path,listcmd)
setl ff=unix
" restore settings
- let &ff= ffkeep
+ let &l:ff= ffkeep
" call Dret("NetrwRemoteFtpCmd")
return
@@ -10368,7 +10373,7 @@ fun! s:NetrwRemoteFtpCmd(path,listcmd)
endif
" restore settings " {{{3
- let &ff= ffkeep
+ let &l:ff= ffkeep
" call Dret("NetrwRemoteFtpCmd")
endfun
@@ -10672,7 +10677,7 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all)
NetrwKeepj call netrw#ErrorMsg(s:ERROR,"for some reason b:netrw_curdir doesn't exist!",53)
let ok="q"
else
- let remotedir= substitute(b:netrw_curdir,'^.*//[^/]\+/\(.*\)$','\1','')
+ let remotedir= substitute(b:netrw_curdir,'^.\{-}//[^/]\+/\(.*\)$','\1','')
" call Decho("netrw_rm_cmd<".netrw_rm_cmd.">",'~'.expand("<slnum>"))
" call Decho("remotedir<".remotedir.">",'~'.expand("<slnum>"))
" call Decho("rmfile<".a:rmfile.">",'~'.expand("<slnum>"))
@@ -10685,7 +10690,7 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all)
let ret= system(netrw_rm_cmd)
if v:shell_error != 0
if exists("b:netrw_curdir") && b:netrw_curdir != getcwd() && !g:netrw_keepdir
- call netrw#ErrorMsg(s:ERROR,"remove failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-cd)",102)
+ call netrw#ErrorMsg(s:ERROR,"remove failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-cd)",102)
else
call netrw#ErrorMsg(s:WARNING,"cmd<".netrw_rm_cmd."> failed",60)
endif
@@ -11193,16 +11198,16 @@ fun! s:LocalListing()
" call Decho("pfile <".pfile.">",'~'.expand("<slnum>"))
if w:netrw_liststyle == s:LONGLIST
- let longfile= printf("%-".g:netrw_maxfilenamelen."S",pfile)
- let sz = getfsize(filename)
- let szlen = 15 - (strdisplaywidth(longfile) - g:netrw_maxfilenamelen)
- let szlen = (szlen > 0) ? szlen : 0
+ let longfile = printf("%-".g:netrw_maxfilenamelen."S",pfile)
+ let sz = getfsize(filename)
+ let szlen = 15 - (strdisplaywidth(longfile) - g:netrw_maxfilenamelen)
+ let szlen = (szlen > 0) ? szlen : 0
if g:netrw_sizestyle =~# "[hH]"
let sz= s:NetrwHumanReadable(sz)
endif
let fsz = printf("%".szlen."S",sz)
- let pfile = longfile." ".fsz." ".strftime(g:netrw_timefmt,getftime(filename))
+ let pfile= longfile." ".fsz." ".strftime(g:netrw_timefmt,getftime(filename))
" call Decho("longlist support: sz=".sz." fsz=".fsz,'~'.expand("<slnum>"))
endif
@@ -11587,7 +11592,7 @@ endfun
" netrw#RFC2396: converts %xx into characters {{{2
fun! netrw#RFC2396(fname)
" call Dfunc("netrw#RFC2396(fname<".a:fname.">)")
- let fname = escape(substitute(a:fname,'%\(\x\x\)','\=nr2char("0x".submatch(1))','ge')," \t")
+ let fname = escape(substitute(a:fname,'%\(\x\x\)','\=printf("%c","0x".submatch(1))','ge')," \t")
" call Dret("netrw#RFC2396 ".fname)
return fname
endfun
@@ -12222,7 +12227,7 @@ fun! s:NetrwLcd(newdir)
if (has("win32") || has("win95") || has("win64") || has("win16")) && !g:netrw_cygwin
if a:newdir =~ '^\\\\\w\+' || a:newdir =~ '^//\w\+'
let dirname = '\'
- exe 'NetrwKeepj sil lcd '.fnameescape(dirname)
+ exe 'NetrwKeepj sil lcd '.fnameescape(dirname)
endif
endif
catch /^Vim\%((\a\+)\)\=:E472/
diff --git a/runtime/autoload/netrwFileHandlers.vim b/runtime/autoload/netrwFileHandlers.vim
index d07235c..2b6f8f7 100644
--- a/runtime/autoload/netrwFileHandlers.vim
+++ b/runtime/autoload/netrwFileHandlers.vim
@@ -1,6 +1,7 @@
" netrwFileHandlers: contains various extension-based file handlers for
" netrw's browsers' x command ("eXecute launcher")
-" Author: Charles E. Campbell
+" Maintainer: This runtime file is looking for a new maintainer.
+" Original Author: Charles E. Campbell
" Date: Sep 18, 2020
" Version: 11
" Copyright: Copyright (C) 1999-2012 Charles E. Campbell {{{1
diff --git a/runtime/autoload/netrwSettings.vim b/runtime/autoload/netrwSettings.vim
index d65f831..5525c0d 100644
--- a/runtime/autoload/netrwSettings.vim
+++ b/runtime/autoload/netrwSettings.vim
@@ -1,6 +1,7 @@
" netrwSettings.vim: makes netrw settings simpler
" Date: Nov 15, 2021
-" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E Campbell
" Version: 18
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
diff --git a/runtime/autoload/tar.vim b/runtime/autoload/tar.vim
index adfc10c..9c4f16d 100644
--- a/runtime/autoload/tar.vim
+++ b/runtime/autoload/tar.vim
@@ -2,7 +2,8 @@
" AUTOLOAD PORTION
" Date: Nov 14, 2023
" Version: 32b (with modifications from the Vim Project)
-" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E Campbell
" License: Vim License (see vim's :help license)
"
" Contains many ideas from Michael Toren's <tar.vim>
@@ -163,9 +164,9 @@ fun! tar#Browse(tarfile)
" call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
- elseif tarfile =~# '\.\(tgz\)$' || tarfile =~# '\.\(tbz\)$' || tarfile =~# '\.\(txz\)$' || tarfile =~# '\.\(tzs\)$'
+ elseif tarfile =~# '\.\(tgz\)$' || tarfile =~# '\.\(tbz\)$' || tarfile =~# '\.\(txz\)$' || tarfile =~# '\.\(tzst\)$'
if has("unix") && executable("file")
- let filekind= system("file ".shellescape(tarfile,1)) =~ "bzip2"
+ let filekind= system("file ".shellescape(tarfile,1))
else
let filekind= ""
endif
@@ -192,7 +193,7 @@ fun! tar#Browse(tarfile)
elseif tarfile =~# '\.\(xz\|txz\)$'
" call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
- elseif tarfile =~# '\.\(zst\|tzs\)$'
+ elseif tarfile =~# '\.\(zst\|tzst\)$'
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
else
if tarfile =~ '^\s*-'
@@ -230,7 +231,7 @@ fun! tar#Browse(tarfile)
" set up maps supported for tar
setlocal noma nomod ro
noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
- noremap <silent> <buffer> x :call tar#Extract()<cr>
+ noremap <silent> <buffer> x :call tar#Extract()<cr>
if &mouse != ""
noremap <silent> <buffer> <leftmouse> <leftmouse>:call <SID>TarBrowseSelect()<cr>
endif
@@ -468,9 +469,9 @@ fun! tar#Write(fname)
let compress= "xz -- ".shellescape(tarfile,0)
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.zst'
- call system("zstd --decompress -- ".shellescape(tarfile,0))
+ call system("zstd --decompress --rm -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.zst','','e')
- let compress= "zstd -- ".shellescape(tarfile,0)
+ let compress= "zstd --rm -- ".shellescape(tarfile,0)
elseif tarfile =~# '\.lzma'
call system("lzma -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.lzma','','e')
@@ -486,7 +487,7 @@ fun! tar#Write(fname)
else
" call Decho("tarfile<".tarfile."> fname<".fname.">")
-
+
if fname =~ '/'
let dirpath = substitute(fname,'/[^/]\+$','','e')
if has("win32unix") && executable("cygpath")
@@ -502,7 +503,7 @@ fun! tar#Write(fname)
let tarfile = substitute(tarfile, '-', './-', '')
endif
" call Decho("tarfile<".tarfile."> fname<".fname.">")
-
+
if exists("g:tar_secure")
let tar_secure= " -- "
else
@@ -512,7 +513,7 @@ fun! tar#Write(fname)
if has("win32unix") && executable("cygpath")
let tarfile = substitute(system("cygpath ".shellescape(tarfile,0)),'\n','','e')
endif
-
+
" delete old file from tarfile
" call Decho("system(".g:tar_cmd." ".g:tar_delfile." ".shellescape(tarfile,0)." -- ".shellescape(fname,0).")")
call system(g:tar_cmd." ".g:tar_delfile." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
@@ -521,8 +522,8 @@ fun! tar#Write(fname)
" call Decho("***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname))
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
else
-
- " update tarfile with new file
+
+ " update tarfile with new file
" call Decho(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
call system(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
if v:shell_error != 0
@@ -555,7 +556,7 @@ fun! tar#Write(fname)
unlet s:tblfile_{winnr()}
endif
endif
-
+
" cleanup and restore current directory
cd ..
call s:Rmdir("_ZIPVIM_")
@@ -696,13 +697,13 @@ fun! tar#Extract()
echo "***note*** successfully extracted ".fname
endif
- elseif filereadable(tarbase.".tzs")
+ elseif filereadable(tarbase.".tzst")
let extractcmd= substitute(extractcmd,"-","--zstd","")
-" call Decho("system(".extractcmd." ".shellescape(tarbase).".tzs ".shellescape(fname).")")
- call system(extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname))
+" call Decho("system(".extractcmd." ".shellescape(tarbase).".tzst ".shellescape(fname).")")
+ call system(extractcmd." ".shellescape(tarbase).".tzst ".shellescape(fname))
if v:shell_error != 0
- echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tzs ".fname.": failed!" | echohl NONE
-" call Decho("***error*** ".extractcmd." ".tarbase.".tzs ".fname.": failed!")
+ echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tzst ".fname.": failed!" | echohl NONE
+" call Decho("***error*** ".extractcmd." ".tarbase.".tzst ".fname.": failed!")
else
echo "***note*** successfully extracted ".fname
endif
@@ -710,7 +711,7 @@ fun! tar#Extract()
elseif filereadable(tarbase.".tar.zst")
let extractcmd= substitute(extractcmd,"-","--zstd","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.zst ".shellescape(fname).")")
- call system(extractcmd." ".shellescape(tarbase).".tar.xz ".shellescape(fname))
+ call system(extractcmd." ".shellescape(tarbase).".tar.zst ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.zst ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd." ".tarbase.".tar.zst ".fname.": failed!")
diff --git a/runtime/autoload/vimball.vim b/runtime/autoload/vimball.vim
index 9c7dcbd..774b798 100644
--- a/runtime/autoload/vimball.vim
+++ b/runtime/autoload/vimball.vim
@@ -1,6 +1,7 @@
" vimball.vim : construct a file containing both paths and files
-" Author: Charles E. Campbell
-" Date: Apr 11, 2016
+" Maintainer: This runtime file is looking for a new maintainer.
+" Original Author: Charles E. Campbell
+" Date: Apr 11, 2016
" Version: 37
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
" Copyright: (c) 2004-2011 by Charles E. Campbell
diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim
index e61293c..c0034f8 100644
--- a/runtime/autoload/zip.vim
+++ b/runtime/autoload/zip.vim
@@ -2,7 +2,8 @@
" AUTOLOAD PORTION
" Date: Mar 12, 2023
" Version: 33
-" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E Campbell
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
diff --git a/runtime/colors/blue.vim b/runtime/colors/blue.vim
index c53f44f..f95cf27 100644
--- a/runtime/colors/blue.vim
+++ b/runtime/colors/blue.vim
@@ -4,7 +4,7 @@
" Maintainer: Original maintainer Steven Vertigan <steven@vertigan.wattle.id.au>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
-" Last Updated: Fri 15 Dec 2023 20:05:33
+" Last Updated: Mon 08 Jan 2024 09:42:49 AM AEDT
" Generated by Colortemplate v2.2.3
@@ -76,8 +76,8 @@ hi Underlined guifg=NONE guibg=NONE gui=underline ctermfg=NONE ctermbg=NONE cter
hi Label guifg=#ffd700 guibg=NONE gui=NONE cterm=NONE
hi! link Terminal Normal
hi! link Debug Special
-hi! link diffAdded String
-hi! link diffRemoved WarningMsg
+hi! link Added String
+hi! link Removed WarningMsg
hi! link diffOnly WarningMsg
hi! link diffNoEOL WarningMsg
hi! link diffIsA WarningMsg
@@ -186,8 +186,8 @@ if s:t_Co >= 256
hi Label ctermfg=220 ctermbg=NONE cterm=NONE
hi! link Terminal Normal
hi! link Debug Special
- hi! link diffAdded String
- hi! link diffRemoved WarningMsg
+ hi! link Added String
+ hi! link Removed WarningMsg
hi! link diffOnly WarningMsg
hi! link diffNoEOL WarningMsg
hi! link diffIsA WarningMsg
@@ -299,8 +299,8 @@ if s:t_Co >= 16
hi Label ctermfg=yellow ctermbg=NONE cterm=NONE
hi! link Terminal Normal
hi! link Debug Special
- hi! link diffAdded String
- hi! link diffRemoved WarningMsg
+ hi! link Added String
+ hi! link Removed WarningMsg
hi! link diffOnly WarningMsg
hi! link diffNoEOL WarningMsg
hi! link diffIsA WarningMsg
@@ -411,8 +411,8 @@ if s:t_Co >= 8
hi Label ctermfg=yellow ctermbg=NONE cterm=NONE
hi! link Terminal Normal
hi! link Debug Special
- hi! link diffAdded String
- hi! link diffRemoved WarningMsg
+ hi! link Added String
+ hi! link Removed WarningMsg
hi! link diffOnly WarningMsg
hi! link diffNoEOL WarningMsg
hi! link diffIsA WarningMsg
diff --git a/runtime/colors/darkblue.vim b/runtime/colors/darkblue.vim
index 207d1ea..b792b90 100644
--- a/runtime/colors/darkblue.vim
+++ b/runtime/colors/darkblue.vim
@@ -4,7 +4,7 @@
" Maintainer: Original author Bohdan Vlasyuk <bohdan@vstu.edu.ua>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
-" Last Updated: Fri 15 Dec 2023 20:05:33
+" Last Updated: Mon 08 Jan 2024 09:43:03 AM AEDT
" Generated by Colortemplate v2.2.3
@@ -54,8 +54,8 @@ hi! link Structure Type
hi! link Tag Special
hi! link Typedef Type
hi! link Debug Special
-hi! link diffAdded String
-hi! link diffRemoved WarningMsg
+hi! link Added String
+hi! link Removed WarningMsg
hi! link diffOnly WarningMsg
hi! link diffNoEOL WarningMsg
hi! link diffIsA WarningMsg
@@ -162,8 +162,8 @@ if s:t_Co >= 256
hi! link Tag Special
hi! link Typedef Type
hi! link Debug Special
- hi! link diffAdded String
- hi! link diffRemoved WarningMsg
+ hi! link Added String
+ hi! link Removed WarningMsg
hi! link diffOnly WarningMsg
hi! link diffNoEOL WarningMsg
hi! link diffIsA WarningMsg
diff --git a/runtime/colors/evening.vim b/runtime/colors/evening.vim
index 3ac3242..2753daa 100644
--- a/runtime/colors/evening.vim
+++ b/runtime/colors/evening.vim
@@ -4,7 +4,7 @@
" Maintainer: Original maintainer Steven Vertigan <steven@vertigan.wattle.id.au>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
-" Last Updated: Fri 15 Dec 2023 20:05:35
+" Last Updated: Mon 08 Jan 2024 09:43:27 AM AEDT
" Generated by Colortemplate v2.2.3
@@ -28,8 +28,8 @@ hi! link CursorIM Cursor
hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link Debug Special
-hi! link diffAdded String
-hi! link diffRemoved WarningMsg
+hi! link Added String
+hi! link Removed WarningMsg
hi! link diffOnly WarningMsg
hi! link diffNoEOL WarningMsg
hi! link diffIsA WarningMsg
@@ -136,8 +136,8 @@ if s:t_Co >= 256
hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link Debug Special
- hi! link diffAdded String
- hi! link diffRemoved WarningMsg
+ hi! link Added String
+ hi! link Removed WarningMsg
hi! link diffOnly WarningMsg
hi! link diffNoEOL WarningMsg
hi! link diffIsA WarningMsg
@@ -247,8 +247,8 @@ if s:t_Co >= 16
hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link Debug Special
- hi! link diffAdded String
- hi! link diffRemoved WarningMsg
+ hi! link Added String
+ hi! link Removed WarningMsg
hi! link diffOnly WarningMsg
hi! link diffNoEOL WarningMsg
hi! link diffIsA WarningMsg
diff --git a/runtime/colors/habamax.vim b/runtime/colors/habamax.vim
index 4880482..f32a549 100644
--- a/runtime/colors/habamax.vim
+++ b/runtime/colors/habamax.vim
@@ -4,7 +4,7 @@
" Maintainer: Maxim Kim <habamax@gmail.com>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
-" Last Updated: Fri 15 Dec 2023 20:05:35
+" Last Updated: Mon 08 Jan 2024 09:39:53 AM AEDT
" Generated by Colortemplate v2.2.3
@@ -106,8 +106,9 @@ hi Ignore guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Debug guifg=#5f8787 guibg=NONE gui=NONE cterm=NONE
hi DiffAdd guifg=#dadada guibg=#5f875f gui=NONE cterm=NONE
hi DiffDelete guifg=#af875f guibg=NONE gui=NONE cterm=NONE
-hi diffAdded guifg=#87af87 guibg=NONE gui=NONE cterm=NONE
-hi diffRemoved guifg=#d75f5f guibg=NONE gui=NONE cterm=NONE
+hi Added guifg=#87af87 guibg=NONE gui=NONE cterm=NONE
+hi Changed guifg=#5f8787 guibg=NONE gui=NONE cterm=NONE
+hi Removed guifg=#d75f5f guibg=NONE gui=NONE cterm=NONE
hi diffSubname guifg=#af87af guibg=NONE gui=NONE cterm=NONE
hi DiffText guifg=#dadada guibg=#878787 gui=NONE cterm=NONE
hi DiffChange guifg=#bcbcbc guibg=#5f5f5f gui=NONE cterm=NONE
@@ -199,8 +200,9 @@ if s:t_Co >= 256
hi Debug ctermfg=66 ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=253 ctermbg=65 cterm=NONE
hi DiffDelete ctermfg=137 ctermbg=NONE cterm=NONE
- hi diffAdded ctermfg=108 ctermbg=NONE cterm=NONE
- hi diffRemoved ctermfg=167 ctermbg=NONE cterm=NONE
+ hi Added ctermfg=108 ctermbg=NONE cterm=NONE
+ hi Changed ctermfg=66 ctermbg=NONE cterm=NONE
+ hi Removed ctermfg=167 ctermbg=NONE cterm=NONE
hi diffSubname ctermfg=139 ctermbg=NONE cterm=NONE
hi DiffText ctermfg=253 ctermbg=102 cterm=NONE
hi DiffChange ctermfg=250 ctermbg=59 cterm=NONE
@@ -277,8 +279,9 @@ if s:t_Co >= 16
hi Debug ctermfg=darkcyan ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=white ctermbg=darkgreen cterm=NONE
hi DiffDelete ctermfg=darkyellow ctermbg=NONE cterm=NONE
- hi diffAdded ctermfg=darkgreen ctermbg=NONE cterm=NONE
- hi diffRemoved ctermfg=darkred ctermbg=NONE cterm=NONE
+ hi Added ctermfg=darkgreen ctermbg=NONE cterm=NONE
+ hi Changed ctermfg=darkcyan ctermbg=NONE cterm=NONE
+ hi Removed ctermfg=darkred ctermbg=NONE cterm=NONE
hi diffSubname ctermfg=darkmagenta ctermbg=NONE cterm=NONE
hi DiffText ctermfg=white ctermbg=lightgrey cterm=NONE
hi DiffChange ctermfg=white ctermbg=darkgray cterm=NONE
@@ -355,8 +358,9 @@ if s:t_Co >= 8
hi Debug ctermfg=darkcyan ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=white ctermbg=darkgreen cterm=NONE
hi DiffDelete ctermfg=darkyellow ctermbg=NONE cterm=NONE
- hi diffAdded ctermfg=darkgreen ctermbg=NONE cterm=NONE
- hi diffRemoved ctermfg=darkred ctermbg=NONE cterm=NONE
+ hi Added ctermfg=darkgreen ctermbg=NONE cterm=NONE
+ hi Changed ctermfg=darkcyan ctermbg=NONE cterm=NONE
+ hi Removed ctermfg=darkred ctermbg=NONE cterm=NONE
hi diffSubname ctermfg=darkmagenta ctermbg=NONE cterm=NONE
hi DiffText ctermfg=white ctermbg=black cterm=bold,reverse
hi DiffChange ctermfg=black ctermbg=white cterm=NONE
diff --git a/runtime/colors/lists/csscolors.vim b/runtime/colors/lists/csscolors.vim
index 7495522..986333d 100644
--- a/runtime/colors/lists/csscolors.vim
+++ b/runtime/colors/lists/csscolors.vim
@@ -4,6 +4,9 @@
" Similar in spirit to rgb.txt, this plugin establishes a human-friendly name
" for every color listed in the CSS standard:
"
+" Note: the color names should be in lower case, because Vim will lookup the
+" a color by its lower case name.
+"
" https://www.w3.org/TR/css-color-3/
let s:keepcpo= &cpo
@@ -26,7 +29,6 @@ call extend(v:colornames, {
\ 'css_blue': '#0000FF',
\ 'css_teal': '#008080',
\ 'css_aqua': '#00FFFF',
- \
\ 'css_aliceblue': '#f0f8ff',
\ 'css_antiquewhite': '#faebd7',
\ 'css_aquamarine': '#7fffd4',
@@ -160,6 +162,14 @@ call extend(v:colornames, {
\ 'css_yellowgreen': '#9acd32',
\ }, 'keep')
+" all keys should be in lower case, convert keys that are not yet
+for [key, val] in items(filter(copy(v:colornames), { key -> key =~ '\u'}))
+ call remove(v:colornames, key)
+ if !has_key(v:colornames, tolower(key))
+ call extend(v:colornames, {tolower(key): val}, 'keep')
+ endif
+endfor
+
let &cpo= s:keepcpo
unlet s:keepcpo
diff --git a/runtime/colors/lists/default.vim b/runtime/colors/lists/default.vim
index 7d81c6f..c8df0c9 100644
--- a/runtime/colors/lists/default.vim
+++ b/runtime/colors/lists/default.vim
@@ -1,17 +1,50 @@
" Maintainer: Drew Vogel <dvogel@sidejump.org>
-" Last Change: 2023 Apr 19
+" Last Change: 2024 Mar 20
"
" Replaced rgb.txt as the source of de facto standard color names. This is
" sourced each time the colorscheme command is run. It is also sourced each
" time the highlight command fails to recognize a gui color. You can override
" these colors by introducing a new colors/lists/default.vim file earlier in
" the runtimepath.
+" Note: the color names should be in lower case, because Vim will lookup the
+" a color by its lower case name.
" make sure line continuation works
let s:keepcpo = &cpo
set cpo&vim
-call extend(v:colornames, {
+function! s:Cleanup()
+ let &cpo = s:keepcpo
+ unlet s:keepcpo
+endfunction
+
+function! s:AddColors(cnames) abort
+ call extend(v:colornames, a:cnames, 'keep')
+
+ " all keys should be in lower case, convert keys that are not yet
+ let len_after = len(v:colornames)
+ if len_after == len(a:cnames)
+ " after extend(): v:colornames has all the keys of default_cnames
+ " checked: v:colornames also has no extra keys
+ " => keys are the same, and keys(default_cnames) are known to be ok
+ return
+ endif
+
+ for [key, val] in items(filter(copy(v:colornames), { key -> key =~ '\u'}))
+ call remove(v:colornames, key)
+ if !has_key(v:colornames, tolower(key))
+ call extend(v:colornames, {tolower(key): val}, 'keep')
+ endif
+ endfor
+endfunction
+
+if exists('s:default_cnames')
+ call s:AddColors(s:default_cnames)
+ call s:Cleanup()
+ finish
+endif
+
+let s:default_cnames = {
\ 'snow': '#fffafa',
\ 'ghost white': '#f8f8ff',
\ 'ghostwhite': '#f8f8ff',
@@ -800,9 +833,9 @@ call extend(v:colornames, {
\ 'rebeccapurple': '#663399',
\ 'silver': '#c0c0c0',
\ 'teal': '#008080'
- \ }, 'keep')
+ \ }
-let &cpo = s:keepcpo
-unlet s:keepcpo
+call s:AddColors(s:default_cnames)
+call s:Cleanup()
"vim: sw=4
diff --git a/runtime/colors/lunaperche.vim b/runtime/colors/lunaperche.vim
index 4e4678e..3546710 100644
--- a/runtime/colors/lunaperche.vim
+++ b/runtime/colors/lunaperche.vim
@@ -4,7 +4,7 @@
" Maintainer: Maxim Kim <habamax@gmail.com>
" Website: https://www.github.com/vim/colorschemes
" License: Vim License (see `:help license`)
-" Last Updated: Fri 15 Dec 2023 20:05:37
+" Last Updated: Mon 08 Jan 2024 09:41:03 AM AEDT
" Generated by Colortemplate v2.2.3
@@ -164,8 +164,9 @@ if &background ==# 'dark'
hi DiffChange guifg=#c6c6c6 guibg=#5f5f5f gui=NONE cterm=NONE
hi DiffText guifg=#afffff guibg=#5f8787 gui=NONE cterm=NONE
hi DiffDelete guifg=#d78787 guibg=NONE gui=NONE cterm=NONE
- hi diffAdded guifg=#5fd75f guibg=NONE gui=NONE cterm=NONE
- hi diffRemoved guifg=#d78787 guibg=NONE gui=NONE cterm=NONE
+ hi Added guifg=#5fd75f guibg=NONE gui=NONE cterm=NONE
+ hi Changed guifg=#5fafff guibg=NONE gui=NONE cterm=NONE
+ hi Removed guifg=#d78787 guibg=NONE gui=NONE cterm=NONE
hi diffSubname guifg=#ff87ff guibg=NONE gui=NONE cterm=NONE
hi dirType guifg=#d787d7 guibg=NONE gui=NONE cterm=NONE
hi dirPermissionUser guifg=#5faf5f guibg=NONE gui=NONE cterm=NONE
@@ -254,8 +255,9 @@ else
hi DiffChange guifg=#000000 guibg=#d0d0d0 gui=NONE cterm=NONE
hi DiffText guifg=#000000 guibg=#5fd7d7 gui=NONE cterm=NONE
hi DiffDelete guifg=#870000 guibg=NONE gui=NONE cterm=NONE
- hi diffAdded guifg=#008700 guibg=NONE gui=NONE cterm=NONE
- hi diffRemoved guifg=#d70000 guibg=NONE gui=NONE cterm=NONE
+ hi Added guifg=#008700 guibg=NONE gui=NONE cterm=NONE
+ hi Changed guifg=#005fd7 guibg=NONE gui=NONE cterm=NONE
+ hi Removed guifg=#d70000 guibg=NONE gui=NONE cterm=NONE
hi diffSubname guifg=#af00af guibg=NONE gui=NONE cterm=NONE
hi dirType guifg=#005f5f guibg=NONE gui=NONE cterm=NONE
hi dirPermissionUser guifg=#af5f00 guibg=NONE gui=NONE cterm=NONE
@@ -421,8 +423,9 @@ if s:t_Co >= 256
hi DiffChange ctermfg=251 ctermbg=59 cterm=NONE
hi DiffText ctermfg=159 ctermbg=66 cterm=NONE
hi DiffDelete ctermfg=174 ctermbg=NONE cterm=NONE
- hi diffAdded ctermfg=77 ctermbg=NONE cterm=NONE
- hi diffRemoved ctermfg=174 ctermbg=NONE cterm=NONE
+ hi Added ctermfg=77 ctermbg=NONE cterm=NONE
+ hi Changed ctermfg=75 ctermbg=NONE cterm=NONE
+ hi Removed ctermfg=174 ctermbg=NONE cterm=NONE
hi diffSubname ctermfg=213 ctermbg=NONE cterm=NONE
hi dirType ctermfg=176 ctermbg=NONE cterm=NONE
hi dirPermissionUser ctermfg=71 ctermbg=NONE cterm=NONE
@@ -506,8 +509,9 @@ if s:t_Co >= 256
hi DiffChange ctermfg=16 ctermbg=252 cterm=NONE
hi DiffText ctermfg=16 ctermbg=80 cterm=NONE
hi DiffDelete ctermfg=88 ctermbg=NONE cterm=NONE
- hi diffAdded ctermfg=28 ctermbg=NONE cterm=NONE
- hi diffRemoved ctermfg=160 ctermbg=NONE cterm=NONE
+ hi Added ctermfg=28 ctermbg=NONE cterm=NONE
+ hi Changed ctermfg=26 ctermbg=NONE cterm=NONE
+ hi Removed ctermfg=160 ctermbg=NONE cterm=NONE
hi diffSubname ctermfg=127 ctermbg=NONE cterm=NONE
hi dirType ctermfg=23 ctermbg=NONE cterm=NONE
hi dirPermissionUser ctermfg=130 ctermbg=NONE cterm=NONE
@@ -596,8 +600,9 @@ if s:t_Co >= 16
hi DiffChange ctermfg=white ctermbg=darkgreen cterm=NONE
hi DiffText ctermfg=black ctermbg=cyan cterm=NONE
hi DiffDelete ctermfg=darkred ctermbg=NONE cterm=NONE
- hi diffAdded ctermfg=green ctermbg=NONE cterm=NONE
- hi diffRemoved ctermfg=darkred ctermbg=NONE cterm=NONE
+ hi Added ctermfg=green ctermbg=NONE cterm=NONE
+ hi Changed ctermfg=blue ctermbg=NONE cterm=NONE
+ hi Removed ctermfg=darkred ctermbg=NONE cterm=NONE
hi diffSubname ctermfg=magenta ctermbg=NONE cterm=NONE
hi dirType ctermfg=darkmagenta ctermbg=NONE cterm=NONE
hi dirPermissionUser ctermfg=darkgreen ctermbg=NONE cterm=NONE
@@ -681,8 +686,9 @@ if s:t_Co >= 16
hi DiffChange ctermfg=black ctermbg=lightgray cterm=NONE
hi DiffText ctermfg=black ctermbg=cyan cterm=NONE
hi DiffDelete ctermfg=darkred ctermbg=NONE cterm=NONE
- hi diffAdded ctermfg=darkgreen ctermbg=NONE cterm=NONE
- hi diffRemoved ctermfg=red ctermbg=NONE cterm=NONE
+ hi Added ctermfg=darkgreen ctermbg=NONE cterm=NONE
+ hi Changed ctermfg=darkblue ctermbg=NONE cterm=NONE
+ hi Removed ctermfg=red ctermbg=NONE cterm=NONE
hi diffSubname ctermfg=darkmagenta ctermbg=NONE cterm=NONE
hi dirType ctermfg=darkcyan ctermbg=NONE cterm=NONE
hi dirPermissionUser ctermfg=darkyellow ctermbg=NONE cterm=NONE
diff --git a/runtime/colors/murphy.vim b/runtime/colors/murphy.vim
index b829d49..a6a08ed 100644
--- a/runtime/colors/murphy.vim
+++ b/runtime/colors/murphy.vim
@@ -4,7 +4,7 @@
" Maintainer: Original maintainer Ron Aaron <ron@ronware.org>.
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
-" Last Updated: Fri 15 Dec 2023 20:05:38
+" Last Updated: Mon 08 Jan 2024 09:50:15 AM AEDT
" Generated by Colortemplate v2.2.3
@@ -28,6 +28,7 @@ hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
+hi! link Added Constant
hi Normal guifg=#87ff87 guibg=#000000 gui=NONE cterm=NONE
hi EndOfBuffer guifg=#0000ff guibg=#000000 gui=NONE cterm=NONE
hi StatusLine guifg=#ffffff guibg=#00008b gui=NONE cterm=NONE
@@ -100,6 +101,7 @@ if s:t_Co >= 256
hi! link StatusLineTermNC StatusLineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
+ hi! link Added Constant
hi Normal ctermfg=120 ctermbg=16 cterm=NONE
hi EndOfBuffer ctermfg=21 ctermbg=16 cterm=NONE
hi StatusLine ctermfg=231 ctermbg=18 cterm=NONE
diff --git a/runtime/colors/wildcharm.vim b/runtime/colors/wildcharm.vim
index 31facfa..ee1f376 100644
--- a/runtime/colors/wildcharm.vim
+++ b/runtime/colors/wildcharm.vim
@@ -4,7 +4,7 @@
" Maintainer: Maxim Kim <habamax@gmail.com>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
-" Last Updated: Fri 15 Dec 2023 20:05:43
+" Last Updated: Mon 08 Jan 2024 09:40:36 AM AEDT
" Generated by Colortemplate v2.2.3
@@ -93,8 +93,9 @@ if &background ==# 'dark'
hi DiffChange guifg=#d0d0d0 guibg=#5f5f5f gui=NONE cterm=NONE
hi DiffText guifg=#afffff guibg=#5f8787 gui=NONE cterm=NONE
hi DiffDelete guifg=#ffafaf guibg=#875f5f gui=NONE cterm=NONE
- hi diffAdded guifg=#00af5f guibg=NONE gui=NONE cterm=NONE
- hi diffRemoved guifg=#d7005f guibg=NONE gui=NONE cterm=NONE
+ hi Added guifg=#00af5f guibg=NONE gui=NONE cterm=NONE
+ hi Changed guifg=#0087d7 guibg=NONE gui=NONE cterm=NONE
+ hi Removed guifg=#d7005f guibg=NONE gui=NONE cterm=NONE
else
" Light background
if (has('termguicolors') && &termguicolors) || has('gui_running')
@@ -167,8 +168,9 @@ else
hi DiffChange guifg=#262626 guibg=#dadada gui=NONE cterm=NONE
hi DiffText guifg=#005f5f guibg=#afd7d7 gui=NONE cterm=NONE
hi DiffDelete guifg=#875f5f guibg=#ffd7d7 gui=NONE cterm=NONE
- hi diffAdded guifg=#008700 guibg=NONE gui=NONE cterm=NONE
- hi diffRemoved guifg=#d70000 guibg=NONE gui=NONE cterm=NONE
+ hi Added guifg=#5faf5f guibg=NONE gui=NONE cterm=NONE
+ hi Changed guifg=#0087d7 guibg=NONE gui=NONE cterm=NONE
+ hi Removed guifg=#d70000 guibg=NONE gui=NONE cterm=NONE
endif
if s:t_Co >= 256
@@ -247,8 +249,9 @@ if s:t_Co >= 256
hi DiffChange ctermfg=252 ctermbg=59 cterm=NONE
hi DiffText ctermfg=159 ctermbg=66 cterm=NONE
hi DiffDelete ctermfg=217 ctermbg=95 cterm=NONE
- hi diffAdded ctermfg=35 ctermbg=NONE cterm=NONE
- hi diffRemoved ctermfg=161 ctermbg=NONE cterm=NONE
+ hi Added ctermfg=35 ctermbg=NONE cterm=NONE
+ hi Changed ctermfg=32 ctermbg=NONE cterm=NONE
+ hi Removed ctermfg=161 ctermbg=NONE cterm=NONE
else
" Light background
hi Normal ctermfg=16 ctermbg=231 cterm=NONE
@@ -316,8 +319,9 @@ if s:t_Co >= 256
hi DiffChange ctermfg=235 ctermbg=253 cterm=NONE
hi DiffText ctermfg=23 ctermbg=152 cterm=NONE
hi DiffDelete ctermfg=95 ctermbg=224 cterm=NONE
- hi diffAdded ctermfg=28 ctermbg=NONE cterm=NONE
- hi diffRemoved ctermfg=160 ctermbg=NONE cterm=NONE
+ hi Added ctermfg=71 ctermbg=NONE cterm=NONE
+ hi Changed ctermfg=32 ctermbg=NONE cterm=NONE
+ hi Removed ctermfg=160 ctermbg=NONE cterm=NONE
endif
unlet s:t_Co
finish
@@ -386,12 +390,13 @@ if s:t_Co >= 16
hi Directory ctermfg=blue ctermbg=NONE cterm=bold
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
- hi DiffAdd ctermfg=black ctermbg=darkmagenta cterm=NONE
+ hi DiffAdd ctermfg=black ctermbg=darkgreen cterm=NONE
hi DiffChange ctermfg=black ctermbg=lightgray cterm=NONE
hi DiffText ctermfg=black ctermbg=cyan cterm=NONE
hi DiffDelete ctermfg=black ctermbg=darkred cterm=NONE
- hi diffAdded ctermfg=darkgreen ctermbg=NONE cterm=NONE
- hi diffRemoved ctermfg=darkred ctermbg=NONE cterm=NONE
+ hi Added ctermfg=darkgreen ctermbg=NONE cterm=NONE
+ hi Changed ctermfg=darkblue ctermbg=NONE cterm=NONE
+ hi Removed ctermfg=darkred ctermbg=NONE cterm=NONE
else
" Light background
hi Normal ctermfg=black ctermbg=white cterm=NONE
@@ -455,12 +460,13 @@ if s:t_Co >= 16
hi Directory ctermfg=darkblue ctermbg=NONE cterm=bold
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
- hi DiffAdd ctermfg=black ctermbg=darkmagenta cterm=NONE
+ hi DiffAdd ctermfg=black ctermbg=darkgreen cterm=NONE
hi DiffChange ctermfg=black ctermbg=lightgray cterm=NONE
hi DiffText ctermfg=black ctermbg=cyan cterm=NONE
hi DiffDelete ctermfg=black ctermbg=darkred cterm=NONE
- hi diffAdded ctermfg=darkgreen ctermbg=NONE cterm=NONE
- hi diffRemoved ctermfg=red ctermbg=NONE cterm=NONE
+ hi Added ctermfg=green ctermbg=NONE cterm=NONE
+ hi Changed ctermfg=blue ctermbg=NONE cterm=NONE
+ hi Removed ctermfg=red ctermbg=NONE cterm=NONE
endif
unlet s:t_Co
finish
@@ -510,7 +516,7 @@ if s:t_Co >= 8
hi VisualNOS ctermfg=black ctermbg=darkblue cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline
hi CursorColumn ctermfg=black ctermbg=darkyellow cterm=NONE
- hi Folded ctermfg=black ctermbg=NONE cterm=bold
+ hi Folded ctermfg=grey ctermbg=NONE cterm=bold
hi ColorColumn ctermfg=black ctermbg=darkyellow cterm=NONE
hi SpellBad ctermfg=darkred ctermbg=NONE cterm=reverse
hi SpellCap ctermfg=darkcyan ctermbg=NONE cterm=reverse
@@ -519,20 +525,20 @@ if s:t_Co >= 8
hi Comment ctermfg=NONE ctermbg=NONE cterm=bold
hi Constant ctermfg=darkred ctermbg=NONE cterm=NONE
hi String ctermfg=darkgreen ctermbg=NONE cterm=NONE
- hi Identifier ctermfg=NONE ctermbg=NONE cterm=NONE
- hi Statement ctermfg=darkblue ctermbg=NONE cterm=bold
+ hi Identifier ctermfg=darkmagenta ctermbg=NONE cterm=NONE
+ hi Statement ctermfg=darkblue ctermbg=NONE cterm=NONE
hi Type ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi PreProc ctermfg=darkcyan ctermbg=NONE cterm=NONE
- hi Special ctermfg=darkcyan ctermbg=NONE cterm=NONE
+ hi Special ctermfg=darkmagenta ctermbg=NONE cterm=NONE
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline
hi Title ctermfg=NONE ctermbg=NONE cterm=bold
hi Directory ctermfg=darkblue ctermbg=NONE cterm=bold
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
- hi DiffAdd ctermfg=black ctermbg=darkmagenta cterm=NONE
- hi DiffChange ctermfg=black ctermbg=darkcyan cterm=NONE
- hi DiffText ctermfg=black ctermbg=grey cterm=NONE
- hi DiffDelete ctermfg=darkred ctermbg=NONE cterm=NONE
+ hi DiffAdd ctermfg=black ctermbg=darkgreen cterm=NONE
+ hi DiffChange ctermfg=black ctermbg=darkblue cterm=NONE
+ hi DiffText ctermfg=black ctermbg=darkmagenta cterm=NONE
+ hi DiffDelete ctermfg=black ctermbg=darkred cterm=NONE
else
" Light background
hi Normal ctermfg=black ctermbg=grey cterm=NONE
@@ -586,20 +592,20 @@ if s:t_Co >= 8
hi Comment ctermfg=NONE ctermbg=NONE cterm=bold
hi Constant ctermfg=darkred ctermbg=NONE cterm=NONE
hi String ctermfg=darkgreen ctermbg=NONE cterm=NONE
- hi Identifier ctermfg=NONE ctermbg=NONE cterm=NONE
- hi Statement ctermfg=darkblue ctermbg=NONE cterm=bold
+ hi Identifier ctermfg=darkmagenta ctermbg=NONE cterm=NONE
+ hi Statement ctermfg=darkblue ctermbg=NONE cterm=NONE
hi Type ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi PreProc ctermfg=darkcyan ctermbg=NONE cterm=NONE
- hi Special ctermfg=darkcyan ctermbg=NONE cterm=NONE
+ hi Special ctermfg=darkmagenta ctermbg=NONE cterm=NONE
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline
hi Title ctermfg=NONE ctermbg=NONE cterm=bold
hi Directory ctermfg=darkblue ctermbg=NONE cterm=bold
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
- hi DiffAdd ctermfg=black ctermbg=darkmagenta cterm=NONE
- hi DiffChange ctermfg=black ctermbg=darkcyan cterm=NONE
- hi DiffText ctermfg=grey ctermbg=black cterm=NONE
- hi DiffDelete ctermfg=darkred ctermbg=NONE cterm=NONE
+ hi DiffAdd ctermfg=black ctermbg=darkgreen cterm=NONE
+ hi DiffChange ctermfg=black ctermbg=darkblue cterm=NONE
+ hi DiffText ctermfg=black ctermbg=darkmagenta cterm=NONE
+ hi DiffDelete ctermfg=black ctermbg=darkred cterm=NONE
endif
unlet s:t_Co
finish
@@ -700,7 +706,7 @@ endif
" Color: colorlC #ff5fff 207 magenta
" Color: colorDim #878787 102 grey
" Color: colorMP #ff00af 199 magenta
-" Color: diffAdd #5f875f 65 darkmagenta
+" Color: diffAdd #5f875f 65 darkgreen
" Color: diffAddFg #afffaf 157 black
" Color: diffDelete #875f5f 95 darkred
" Color: diffDeleteFg #ffafaf 217 black
@@ -739,7 +745,7 @@ endif
" Color: colorDim #626262 241 darkgrey
" Color: colorSt #5f5f5f 59 darkgrey
" Color: colorMP #ff00af 199 magenta
-" Color: diffAdd #afd7af 151 darkmagenta
+" Color: diffAdd #afd7af 151 darkgreen
" Color: diffAddFg #005f00 22 black
" Color: diffDelete #ffd7d7 224 darkred
" Color: diffDeleteFg #875f5f 95 black
diff --git a/runtime/doc/Make_mvc.mak b/runtime/doc/Make_mvc.mak
index 656cf75..850d86b 100644
--- a/runtime/doc/Make_mvc.mak
+++ b/runtime/doc/Make_mvc.mak
@@ -39,6 +39,9 @@ ICONV = "$(ICONV_PATH)\iconv.exe"
!ENDIF
RM = del /q
+PS = PowerShell.exe
+
+PSFLAGS = -NoLogo -NoProfile -Command
.SUFFIXES :
.SUFFIXES : .c .o .txt .html
@@ -49,9 +52,9 @@ all : tags perlhtml $(CONVERTED)
# Use "doctags" to generate the tags file. Only works for English!
tags : doctags $(DOCS)
doctags.exe $(DOCS) | sort /L C /O tags
- powershell -nologo -noprofile -Command \
- "(Get-Content -Raw tags | Get-Unique | % {$$_ -replace \"`r\", \"\"}) \
- | New-Item -Force -Path . -ItemType file -Name tags"
+ $(PS) $(PSFLAGS) \
+ (Get-Content -Raw tags ^| Get-Unique ^| %%{$$_ -replace \"`r\", \"\"})\
+ ^| New-Item -Force -Path . -ItemType file -Name tags
doctags : doctags.c
$(CC) doctags.c
@@ -64,12 +67,10 @@ vimtags : $(DOCS)
uganda.nsis.txt : uganda.???
- !@powershell -nologo -noprofile -Command \
- $$ext=(Get-Item $?).Extension; (Get-Content $? ^| \
- % {$$_ -replace '\s*\*[-a-zA-Z0-9.]*\*', '' -replace 'vim:tw=78:.*', ''}) \
+ !@$(PS) $(PSFLAGS) $$ext=(Get-Item $?).Extension; (Get-Content $? ^| \
+ %%{$$_ -replace '\s*\*[-a-zA-Z0-9.]*\*', '' -replace 'vim:tw=78:.*', ''})\
^| Set-Content $*$$ext
- !@powershell -nologo -noprofile -Command \
- $$ext=(Get-Item $?).Extension; \
+ !@$(PS) $(PSFLAGS) $$ext=(Get-Item $?).Extension; \
(Get-Content -Raw $(@B)$$ext).Trim() -replace '(\r\n){3,}', '$$1$$1' \
^| Set-Content $(@B)$$ext
@@ -105,7 +106,7 @@ perlhtml : tags $(DOCS)
# Check URLs in the help with "curl" or "powershell".
test_urls :
- "$(VIMEXE)" -S test_urls.vim
+ "$(VIMEXE)" --clean -S test_urls.vim
clean :
$(RM) doctags.exe doctags.obj
@@ -203,7 +204,7 @@ os_win32.txt :
<<
convert-all : $(CONVERTED)
-!IF [powershell -nologo -noprofile "exit $$psversiontable.psversion.major"] == 2
+!IF [$(PS) $(PSFLAGS) "exit $$psversiontable.psversion.major"] == 2
!ERROR The program "PowerShell" version 3.0 or higher is required to work
!ENDIF
@@ -212,7 +213,7 @@ vim-da.UTF-8.1 : vim-da.1
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -222,7 +223,7 @@ vimdiff-da.UTF-8.1 : vimdiff-da.1
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -232,7 +233,7 @@ vimtutor-da.UTF-8.1 : vimtutor-da.1
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -242,7 +243,7 @@ vim-de.UTF-8.1 : vim-de.1
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -252,7 +253,7 @@ evim-fr.UTF-8.1 : evim-fr.1
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -262,7 +263,7 @@ vim-fr.UTF-8.1 : vim-fr.1
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -272,7 +273,7 @@ vimdiff-fr.UTF-8.1 : vimdiff-fr.1
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -282,7 +283,7 @@ vimtutor-fr.UTF-8.1 : vimtutor-fr.1
$(ICONV) -f ISO-8859-1 -t utf-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -292,7 +293,7 @@ xxd-fr.UTF-8.1 : xxd-fr.1
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -302,7 +303,7 @@ evim-it.UTF-8.1 : evim-it.1
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -312,7 +313,7 @@ vim-it.UTF-8.1 : vim-it.1
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -322,7 +323,7 @@ vimdiff-it.UTF-8.1 : vimdiff-it.1
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -332,7 +333,7 @@ vimtutor-it.UTF-8.1 : vimtutor-it.1
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -342,7 +343,7 @@ xxd-it.UTF-8.1 : xxd-it.1
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -352,7 +353,7 @@ evim-pl.UTF-8.1 : evim-pl.1
$(ICONV) -f ISO-8859-2 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -362,7 +363,7 @@ vim-pl.UTF-8.1 : vim-pl.1
$(ICONV) -f ISO-8859-2 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -372,7 +373,7 @@ vimdiff-pl.UTF-8.1 : vimdiff-pl.1
$(ICONV) -f ISO-8859-2 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -382,7 +383,7 @@ vimtutor-pl.UTF-8.1 : vimtutor-pl.1
$(ICONV) -f ISO-8859-2 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -392,7 +393,7 @@ xxd-pl.UTF-8.1 : xxd-pl.1
$(ICONV) -f ISO-8859-2 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -402,7 +403,7 @@ evim-ru.UTF-8.1 : evim-ru.1
$(ICONV) -f KOI8-R -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -412,7 +413,7 @@ vim-ru.UTF-8.1 : vim-ru.1
$(ICONV) -f KOI8-R -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -422,7 +423,7 @@ vimdiff-ru.UTF-8.1 : vimdiff-ru.1
$(ICONV) -f KOI8-R -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -432,7 +433,7 @@ vimtutor-ru.UTF-8.1 : vimtutor-ru.1
$(ICONV) -f KOI8-R -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -442,7 +443,7 @@ xxd-ru.UTF-8.1 : xxd-ru.1
$(ICONV) -f KOI8-R -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -452,7 +453,7 @@ evim-tr.UTF-8.1 : evim-tr.1
$(ICONV) -f ISO-8859-9 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -462,7 +463,7 @@ vim-tr.UTF-8.1 : vim-tr.1
$(ICONV) -f ISO-8859-9 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -472,7 +473,7 @@ vimdiff-tr.UTF-8.1 : vimdiff-tr.1
$(ICONV) -f ISO-8859-9 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
@@ -482,7 +483,7 @@ vimtutor-tr.UTF-8.1 : vimtutor-tr.1
$(ICONV) -f ISO-8859-9 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
- powershell -nologo -noprofile -Command \
+ $(PS) $(PSFLAGS) \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
diff --git a/runtime/doc/Makefile b/runtime/doc/Makefile
index fc04287..eecce55 100644
--- a/runtime/doc/Makefile
+++ b/runtime/doc/Makefile
@@ -18,6 +18,7 @@ include Make_all.mak
.SUFFIXES:
.SUFFIXES: .c .o .txt .html
+.PHONY: all vimtags noerrors perlhtml clean test_urls
all: tags vim.man evim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED)
@@ -28,26 +29,26 @@ vimtags: $(DOCS)
# Use "doctags" to generate the tags file. Only works for English!
tags: doctags $(DOCS)
- ./doctags $(DOCS) | LANG=C LC_ALL=C sort >tags
+ ./doctags $(DOCS) | LANG=C LC_ALL=C sort >$@
uniq -d -2 tags
doctags: doctags.c
$(CC) doctags.c -o doctags
vim.man: vim.1
- nroff -man vim.1 | sed -e s/.//g > vim.man
+ nroff -man $< | sed -e s/.//g > $@
evim.man: evim.1
- nroff -man evim.1 | sed -e s/.//g > evim.man
+ nroff -man $< | sed -e s/.//g > $@
vimdiff.man: vimdiff.1
- nroff -man vimdiff.1 | sed -e s/.//g > vimdiff.man
+ nroff -man $< | sed -e s/.//g > $@
vimtutor.man: vimtutor.1
- nroff -man vimtutor.1 | sed -e s/.//g > vimtutor.man
+ nroff -man $< | sed -e s/.//g > $@
xxd.man: xxd.1
- nroff -man xxd.1 | sed -e s/.//g > xxd.man
+ nroff -man $< | sed -e s/.//g > $@
uganda.nsis.txt: uganda.txt
sed -e 's/[ ]*\*[-a-zA-Z0-9.]*\*//g' -e 's/vim:tw=78:.*//' \
@@ -68,10 +69,10 @@ $(HTMLS): tags.ref
# index.html is the starting point for HTML, but for the help files it is
# help.txt. Therefore use vimindex.html for index.txt.
index.html: help.txt
- $(AWK) -f makehtml.awk help.txt >index.html
+ $(AWK) -f makehtml.awk $< >$@
vimindex.html: index.txt
- $(AWK) -f makehtml.awk index.txt >vimindex.html
+ $(AWK) -f makehtml.awk $< >$@
tags.ref tags.html: tags
$(AWK) -f maketags.awk tags >tags.html
@@ -84,7 +85,7 @@ perlhtml: tags $(DOCS)
# Check URLs in the help with "curl".
test_urls:
- vim -S test_urls.vim
+ $(VIMEXE) --clean -S test_urls.vim
clean:
-rm -f doctags *.html tags.ref
@@ -92,58 +93,58 @@ clean:
# These files are in the extra archive, skip if not present
arabic.txt:
- touch arabic.txt
+ touch $@
farsi.txt:
- touch farsi.txt
+ touch $@
hebrew.txt:
- touch hebrew.txt
+ touch $@
russian.txt:
- touch russian.txt
+ touch $@
gui_w32.txt:
- touch gui_w32.txt
+ touch $@
if_ole.txt:
- touch if_ole.txt
+ touch $@
os_390.txt:
- touch os_390.txt
+ touch $@
os_amiga.txt:
- touch os_amiga.txt
+ touch $@
os_beos.txt:
- touch os_beos.txt
+ touch $@
os_dos.txt:
- touch os_dos.txt
+ touch $@
os_haiku.txt:
- touch os_haiku.txt
+ touch $@
os_mac.txt:
- touch os_mac.txt
+ touch $@
os_mint.txt:
- touch os_mint.txt
+ touch $@
os_msdos.txt:
- touch os_msdos.txt
+ touch $@
os_os2.txt:
- touch os_os2.txt
+ touch $@
os_qnx.txt:
- touch os_qnx.txt
+ touch $@
os_risc.txt:
- touch os_risc.txt
+ touch $@
os_win32.txt:
- touch os_win32.txt
+ touch $@
# Note that $< works with GNU make while $> works for BSD make.
# Is there a solution that works for both??
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 2ac0247..5f9f51e 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 9.1. Last change: 2023 May 20
+*autocmd.txt* For Vim version 9.1. Last change: 2024 Jan 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -340,6 +340,7 @@ Name triggered by ~
|GUIEnter| after starting the GUI successfully
|GUIFailed| after starting the GUI failed
|TermResponse| after the terminal response to |t_RV| is received
+|TermResponseAll| after the terminal response to |t_RV| and others is received
|QuitPre| when using `:quit`, before deciding whether to exit
|ExitPre| when using a command that may make Vim exit
@@ -380,6 +381,7 @@ Name triggered by ~
|CursorMoved| the cursor was moved in Normal mode
|CursorMovedI| the cursor was moved in Insert mode
+|WinNewPre| before creating a new window
|WinNew| after creating a new window
|TabNew| after creating a new tab page
|WinClosed| after closing a window
@@ -1097,7 +1099,7 @@ SafeState When nothing is pending, going to wait for the
- Command line completion is active
You can use `mode()` to find out what state
Vim is in. That may be:
- - VIsual mode
+ - Visual mode
- Normal mode
- Insert mode
- Command-line mode
@@ -1220,6 +1222,24 @@ TermResponse After the response to |t_RV| is received from
triggered halfway executing another event,
especially if file I/O, a shell command or
anything else that takes time is involved.
+ *TermResponseAll*
+TermResponseAll After the response to |t_RV|, |t_RC|, |t_RS|,
+ |t_RB|, |t_RF|, or |t_u7| are received from
+ the terminal. The value of |v:termresponse|,
+ |v:termblinkresp|, |v:termstyleresp|,
+ |v:termrbgresp|, |v:termrfgresp|, and
+ |v:termu7resp|, correspondingly, can be used.
+ <amatch> will be set to any of:
+ "version",
+ "cursorblink",
+ "cursorshape",
+ "background",
+ "foreground",
+ "ambiguouswidth"
+ Note that this event may be triggered halfway
+ executing another event, especially if file I/O,
+ a shell command or anything else that takes time
+ is involved.
*TextChanged*
TextChanged After a change was made to the text in the
current buffer in Normal mode. That is after
@@ -1371,6 +1391,18 @@ WinLeave Before leaving a window. If the window to be
WinLeave autocommands (but not for ":new").
Not used for ":qa" or ":q" when exiting Vim.
+ *WinNewPre*
+WinNewPre Before creating a new window. Triggered
+ before commands that modify window layout by
+ creating a split or new tab page. Not done for
+ the first window, when Vim has just started.
+ It is not allowed to modify window layout
+ while executing commands for the WinNewPre
+ event.
+ Most useful to store current window layout
+ and compare it with the new layout after the
+ Window has been created.
+
*WinNew*
WinNew When a new window was created. Not done for
the first window, when Vim has just started.
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 9ac79c6..ec70220 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -1,4 +1,4 @@
-*builtin.txt* For Vim version 9.1. Last change: 2024 Jan 05
+*builtin.txt* For Vim version 9.1. Last change: 2024 Mar 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -147,6 +147,8 @@ delete({fname} [, {flags}]) Number delete the file or directory {fname}
deletebufline({buf}, {first} [, {last}])
Number delete lines from buffer {buf}
did_filetype() Number |TRUE| if FileType autocmd event used
+diff({fromlist}, {tolist} [, {options}])
+ List diff two Lists of strings
diff_filler({lnum}) Number diff filler lines about {lnum}
diff_hlID({lnum}, {col}) Number diff highlighting at {lnum}/{col}
digraph_get({chars}) String get the |digraph| of {chars}
@@ -198,6 +200,8 @@ foldclosedend({lnum}) Number last line of fold at {lnum} if closed
foldlevel({lnum}) Number fold level at {lnum}
foldtext() String line displayed for closed fold
foldtextresult({lnum}) String text for closed fold at {lnum}
+foreach({expr1}, {expr2}) List/Dict/Blob/String
+ for each item in {expr1} call {expr2}
foreground() Number bring the Vim window to the foreground
fullcommand({name} [, {vim9}]) String get full command from {name}
funcref({name} [, {arglist}] [, {dict}])
@@ -259,6 +263,8 @@ getqflist({what}) Dict get specific quickfix list properties
getreg([{regname} [, 1 [, {list}]]])
String or List contents of a register
getreginfo([{regname}]) Dict information about a register
+getregion({pos1}, {pos2} [, {opts}])
+ List get the text from {pos1} to {pos2}
getregtype([{regname}]) String type of a register
getscriptinfo([{opts}]) List list of sourced scripts
gettabinfo([{expr}]) List list of tab pages
@@ -2044,6 +2050,72 @@ did_filetype() Returns |TRUE| when autocommands are being executed and the
editing another buffer to set 'filetype' and load a syntax
file.
+diff({fromlist}, {tolist} [, {options}]) *diff()*
+ Returns a String or a List containing the diff between the
+ strings in {fromlist} and {tolist}. Uses the Vim internal
+ diff library to compute the diff.
+
+ *E106*
+ The optional "output" item in {options} specifies the returned
+ diff format. The following values are supported:
+ indices Return a List of the starting and ending
+ indices and a count of the strings in each
+ diff hunk.
+ unified Return the unified diff output as a String.
+ This is the default.
+
+ If the "output" item in {options} is "indices", then a List is
+ returned. Each List item contains a Dict with the following
+ items for each diff hunk:
+ from_idx start index in {fromlist} for this diff hunk.
+ from_count number of strings in {fromlist} that are
+ added/removed/modified in this diff hunk.
+ to_idx start index in {tolist} for this diff hunk.
+ to_count number of strings in {tolist} that are
+ added/removed/modified in this diff hunk.
+
+ The {options} Dict argument also specifies diff options
+ (similar to 'diffopt') and supports the following items:
+ algorithm Dict specifying the diff algorithm to
+ use. Supported boolean items are
+ "myers", "minimal", "patience" and
+ "histogram".
+ context diff context length. Default is 0.
+ iblank ignore changes where lines are all
+ blank.
+ icase ignore changes in case of text.
+ indent-heuristic use the indent heuristic for the
+ internal diff library.
+ iwhite ignore changes in amount of white
+ space.
+ iwhiteall ignore all white space changes.
+ iwhiteeol ignore white space changes at end of
+ line.
+ For more information about these options, refer to 'diffopt'.
+
+ To compute the unified diff, all the items in {fromlist} are
+ concatenated into a string using a newline separator and the
+ same for {tolist}. The unified diff output uses line numbers.
+
+ Returns an empty List or String if {fromlist} and {tolist} are
+ identical.
+
+ Examples: >
+ :echo diff(['abc'], ['xxx'])
+ @@ -1 +1 @@
+ -abc
+ +xxx
+
+ :echo diff(['abc'], ['xxx'], {'output': 'indices'})
+ [{'from_idx': 0, 'from_count': 1, 'to_idx': 0, 'to_count': 1}]
+ :echo diff(readfile('oldfile'), readfile('newfile'))
+ :echo diff(getbufline(5, 1, '$'), getbufline(6, 1, '$'))
+<
+ For more examples, refer to |diff-func-examples|
+
+ Can also be used as a |method|: >
+ GetFromList->diff(to_list)
+<
diff_filler({lnum}) *diff_filler()*
Returns the number of filler lines above line {lnum}.
These are the lines that were inserted at this point in
@@ -2193,6 +2265,8 @@ empty({expr}) *empty()*
- A |Job| is empty when it failed to start.
- A |Channel| is empty when it is closed.
- A |Blob| is empty when its length is zero.
+ - An |Object| is empty, when the |empty()| builtin method in
+ the object (if present) returns true.
For a long |List| this is much faster than comparing the
length with zero.
@@ -2333,11 +2407,11 @@ exists({expr}) The result is a Number, which is |TRUE| if {expr} is defined,
varname internal variable (see
dict.key |internal-variables|). Also works
list[i] for |curly-braces-names|, |Dictionary|
- import.Func entries, |List| items, imported
- items, etc.
- Does not work for local variables in a
- compiled `:def` function.
- Also works for a function in |Vim9|
+ import.Func entries, |List| items, class and
+ class.Func object methods, imported items, etc.
+ object.Func Does not work for local variables in a
+ class.varname compiled `:def` function.
+ object.varname Also works for a function in |Vim9|
script, since it can be used as a
function reference.
Beware that evaluating an index may
@@ -2468,6 +2542,9 @@ expand({string} [, {nosuf} [, {list}]]) *expand()*
for a non-existing file is not included, unless {string} does
not start with '%', '#' or '<', see below.
+ For a |:terminal| window '%' expands to a '!' followed by
+ the command or shell that is run |terminal-bufname|
+
When {string} starts with '%', '#' or '<', the expansion is
done like for the |cmdline-special| variables with their
associated modifiers. Here is a short overview:
@@ -2995,6 +3072,45 @@ foldtextresult({lnum}) *foldtextresult()*
Can also be used as a |method|: >
GetLnum()->foldtextresult()
+
+foreach({expr1}, {expr2}) *foreach()*
+ {expr1} must be a |List|, |String|, |Blob| or |Dictionary|.
+ For each item in {expr1} execute {expr2}. {expr1} is not
+ modified; its values may be, as with |:lockvar| 1. |E741|
+ See |map()| and |filter()| to modify {expr1}.
+
+ {expr2} must be a |string| or |Funcref|.
+
+ If {expr2} is a |string|, inside {expr2} |v:val| has the value
+ of the current item. For a |Dictionary| |v:key| has the key
+ of the current item and for a |List| |v:key| has the index of
+ the current item. For a |Blob| |v:key| has the index of the
+ current byte. For a |String| |v:key| has the index of the
+ current character.
+ Examples: >
+ call foreach(mylist, 'used[v:val] = true')
+< This records the items that are in the {expr1} list.
+
+ Note that {expr2} is the result of expression and is then used
+ as a command. Often it is good to use a |literal-string| to
+ avoid having to double backslashes.
+
+ If {expr2} is a |Funcref| it must take two arguments:
+ 1. the key or the index of the current item.
+ 2. the value of the current item.
+ With a legacy script lambda you don't get an error if it only
+ accepts one argument, but with a Vim9 lambda you get "E1106:
+ One argument too many", the number of arguments must match.
+ If the function returns a value, it is ignored.
+
+ Returns {expr1} in all cases.
+ When an error is encountered while executing {expr2} no
+ further items in {expr1} are processed.
+ When {expr2} is a Funcref errors inside a function are ignored,
+ unless it was defined with the "abort" flag.
+
+ Can also be used as a |method|: >
+ mylist->foreach(expr2)
<
*foreground()*
foreground() Move the Vim window to the foreground. Useful when sent from
@@ -3203,6 +3319,8 @@ getbufinfo([{dict}])
bufnr Buffer number.
changed TRUE if the buffer is modified.
changedtick Number of changes made to the buffer.
+ command TRUE if the buffer belongs to the
+ command-line window |cmdwin|.
hidden TRUE if the buffer is hidden.
lastused Timestamp in seconds, like
|localtime()|, when the buffer was
@@ -3427,7 +3545,7 @@ getcharmod() *getcharmod()*
32 mouse double click
64 mouse triple click
96 mouse quadruple click (== 32 + 64)
- 128 command (Macintosh only)
+ 128 command (Mac) or super (GTK)
Only the modifiers that have not been included in the
character itself are obtained. Thus Shift-a results in "A"
without a modifier. Returns 0 if no modifiers are used.
@@ -4155,6 +4273,59 @@ getreginfo([{regname}]) *getreginfo()*
Can also be used as a |method|: >
GetRegname()->getreginfo()
+getregion({pos1}, {pos2} [, {opts}]) *getregion()*
+ Returns the list of strings from {pos1} to {pos2} from a
+ buffer.
+
+ {pos1} and {pos2} must both be |List|s with four numbers.
+ See |getpos()| for the format of the list. It's possible
+ to specify positions from a different buffer, but please
+ note the limitations at |getregion-notes|.
+
+ The optional argument {opts} is a Dict and supports the
+ following items:
+
+ type Specify the region's selection type
+ (default: "v"):
+ "v" for |characterwise| mode
+ "V" for |linewise| mode
+ "<CTRL-V>" for |blockwise-visual| mode
+
+ exclusive If |TRUE|, use exclusive selection
+ for the end position
+ (default: follow 'selection')
+
+ You can get the last selection type by |visualmode()|.
+ If Visual mode is active, use |mode()| to get the Visual mode
+ (e.g., in a |:vmap|).
+ This function is useful to get text starting and ending in
+ different columns, such as a |characterwise-visual| selection.
+
+ *getregion-notes*
+ Note that:
+ - Order of {pos1} and {pos2} doesn't matter, it will always
+ return content from the upper left position to the lower
+ right position.
+ - If 'virtualedit' is enabled and the region is past the end
+ of the lines, resulting lines are padded with spaces.
+ - If the region is blockwise and it starts or ends in the
+ middle of a multi-cell character, it is not included but
+ its selected part is substituted with spaces.
+ - If {pos1} and {pos2} are not in the same buffer, an empty
+ list is returned.
+ - {pos1} and {pos2} must belong to a |bufloaded()| buffer.
+ - It is evaluated in current window context, which makes a
+ difference if the buffer is displayed in a window with
+ different 'virtualedit' or 'list' values.
+
+ Examples: >
+ :xnoremap <CR>
+ \ <Cmd>echow getregion(
+ \ getpos('v'), getpos('.'), #{ type: mode() })<CR>
+<
+ Can also be used as a |method|: >
+ getpos('.')->getregion(getpos("'a"))
+<
getregtype([{regname}]) *getregtype()*
The result is a String, which is type of register {regname}.
The value will be one of:
@@ -4381,14 +4552,16 @@ getwinpos([{timeout}]) *getwinpos()*
getwinposx() The result is a Number, which is the X coordinate in pixels of
the left hand side of the GUI Vim window. Also works for an
xterm (uses a timeout of 100 msec).
- The result will be -1 if the information is not available.
+ The result will be -1 if the information is not available
+ (e.g. on the Wayland backend).
The value can be used with `:winpos`.
*getwinposy()*
getwinposy() The result is a Number, which is the Y coordinate in pixels of
the top of the GUI Vim window. Also works for an xterm (uses
a timeout of 100 msec).
- The result will be -1 if the information is not available.
+ The result will be -1 if the information is not available
+ (e.g. on the Wayland backend).
The value can be used with `:winpos`.
getwinvar({winnr}, {varname} [, {def}]) *getwinvar()*
@@ -5312,7 +5485,9 @@ len({expr}) The result is a Number, which is the length of the argument.
When {expr} is a |Blob| the number of bytes is returned.
When {expr} is a |Dictionary| the number of entries in the
|Dictionary| is returned.
- Otherwise an error is given and returns zero.
+ When {expr} is an |Object|, invokes the |len()| method in the
+ object (if present) to get the length. Otherwise returns
+ zero.
Can also be used as a |method|: >
mylist->len()
@@ -5933,6 +6108,7 @@ match({expr}, {pat} [, {start} [, {count}]]) *match()*
Note that when {count} is added the way {start} works changes,
see above.
+ *match-pattern*
See |pattern| for the patterns that are accepted.
The 'ignorecase' option is used to set the ignore-caseness of
the pattern. 'smartcase' is NOT used. The matching is always
@@ -6073,31 +6249,34 @@ matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict}])
For each match, a |Dict| with the following items is returned:
byteidx starting byte index of the match
-    lnum line number where there is a match
-    text matched string
+ lnum line number where there is a match
+ text matched string
Note that there can be multiple matches in a single line.
This function works only for loaded buffers. First call
|bufload()| if needed.
+ See |match-pattern| for information about the effect of some
+ option settings on the pattern.
+
When {buf} is not a valid buffer, the buffer is not loaded or
{lnum} or {end} is not valid then an error is given and an
empty |List| is returned.
Examples: >
-    " Assuming line 3 in buffer 5 contains "a"
-    :echo matchbufline(5, '\<\k\+\>', 3, 3)
-    [{'lnum': 3, 'byteidx': 0, 'text': 'a'}]
-    " Assuming line 4 in buffer 10 contains "tik tok"
-    :echo matchbufline(10, '\<\k\+\>', 1, 4)
-    [{'lnum': 4, 'byteidx': 0, 'text': 'tik'}, {'lnum': 4, 'byteidx': 4, 'text': 'tok'}]
+ " Assuming line 3 in buffer 5 contains "a"
+ :echo matchbufline(5, '\<\k\+\>', 3, 3)
+ [{'lnum': 3, 'byteidx': 0, 'text': 'a'}]
+ " Assuming line 4 in buffer 10 contains "tik tok"
+ :echo matchbufline(10, '\<\k\+\>', 1, 4)
+ [{'lnum': 4, 'byteidx': 0, 'text': 'tik'}, {'lnum': 4, 'byteidx': 4, 'text': 'tok'}]
<
If {submatch} is present and is v:true, then submatches like
- "\1", "\2", etc. are also returned.  Example: >
-    " Assuming line 2 in buffer 2 contains "acd"
-    :echo matchbufline(2, '\(a\)\?\(b\)\?\(c\)\?\(.*\)', 2, 2
+ "\1", "\2", etc. are also returned. Example: >
+ " Assuming line 2 in buffer 2 contains "acd"
+ :echo matchbufline(2, '\(a\)\?\(b\)\?\(c\)\?\(.*\)', 2, 2
\ {'submatches': v:true})
-    [{'lnum': 2, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]
+ [{'lnum': 2, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]
< The "submatches" List always contains 9 items. If a submatch
is not found, then an empty string is returned for that
submatch.
@@ -6254,11 +6433,14 @@ matchstrlist({list}, {pat} [, {dict}])
submatches a List of submatches. Present only if
"submatches" is set to v:true in {dict}.
+ See |match-pattern| for information about the effect of some
+ option settings on the pattern.
+
Example: >
-    :echo matchstrlist(['tik tok'], '\<\k\+\>')
-    [{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}]
-    :echo matchstrlist(['a', 'b'], '\<\k\+\>')
-    [{'idx': 0, 'byteidx': 0, 'text': 'a'}, {'idx': 1, 'byteidx': 0, 'text': 'b'}]
+ :echo matchstrlist(['tik tok'], '\<\k\+\>')
+ [{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}]
+ :echo matchstrlist(['a', 'b'], '\<\k\+\>')
+ [{'idx': 0, 'byteidx': 0, 'text': 'a'}, {'idx': 1, 'byteidx': 0, 'text': 'b'}]
<
If "submatches" is present and is v:true, then submatches like
"\1", "\2", etc. are also returned. Example: >
@@ -6923,6 +7105,9 @@ printf({fmt}, {expr1} ...) *printf()*
echo printf("%1$*2$.*3$f", 1.4142135, 6, 2)
< 1.41
+ You will get an overflow error |E1510|, when the field-width
+ or precision will result in a string longer than 6400 chars.
+
*E1500*
You cannot mix positional and non-positional arguments: >
echo printf("%s%1$s", "One", "Two")
@@ -7798,6 +7983,7 @@ search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])
When a match has been found its line number is returned.
If there is no match a 0 is returned and the cursor doesn't
move. No error message is given.
+ To get the matched string, use |matchbufline()|.
{flags} is a String, which can contain these character flags:
'b' search Backward instead of forward
@@ -8882,7 +9068,8 @@ slice({expr}, {start} [, {end}]) *slice()*
Similar to using a |slice| "expr[start : end]", but "end" is
used exclusive. And for a string the indexes are used as
character indexes instead of byte indexes, like in
- |vim9script|. Also, composing characters are not counted.
+ |vim9script|. Also, composing characters are treated as a
+ part of the preceding base character.
When {end} is omitted the slice continues to the last item.
When {end} is -1 the last item is omitted.
Returns an empty value if {start} or {end} are invalid.
@@ -9279,8 +9466,8 @@ strcharpart({src}, {start} [, {len} [, {skipcc}]]) *strcharpart()*
of byte index and length.
When {skipcc} is omitted or zero, composing characters are
counted separately.
- When {skipcc} set to 1, Composing characters are ignored,
- similar to |slice()|.
+ When {skipcc} set to 1, composing characters are treated as a
+ part of the preceding base character, similar to |slice()|.
When a character index is used where a character does not
exist it is omitted and counted as one character. For
example: >
@@ -9298,7 +9485,7 @@ strchars({string} [, {skipcc}]) *strchars()*
in String {string}.
When {skipcc} is omitted or zero, composing characters are
counted separately.
- When {skipcc} set to 1, Composing characters are ignored.
+ When {skipcc} set to 1, composing characters are ignored.
|strcharlen()| always does this.
Returns zero on error.
@@ -9416,6 +9603,10 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
replaced by "[...]" or "{...}". Using eval() on the result
will then fail.
+ For an object, invokes the |string()| method to get a textual
+ representation of the object. If the method is not present,
+ then the default representation is used.
+
Can also be used as a |method|: >
mylist->string()
@@ -10642,17 +10833,16 @@ win_screenpos({nr}) *win_screenpos()*
[1, 1], unless there is a tabline, then it is [2, 1].
{nr} can be the window number or the |window-ID|. Use zero
for the current window.
- Returns [0, 0] if the window cannot be found in the current
- tabpage.
+ Returns [0, 0] if the window cannot be found.
Can also be used as a |method|: >
GetWinid()->win_screenpos()
<
win_splitmove({nr}, {target} [, {options}]) *win_splitmove()*
- Move the window {nr} to a new split of the window {target}.
- This is similar to moving to {target}, creating a new window
- using |:split| but having the same contents as window {nr}, and
- then closing {nr}.
+ Temporarily switch to window {target}, then move window {nr}
+ to a new split adjacent to {target}.
+ Unlike commands such as |:split|, no new windows are created
+ (the |window-ID| of window {nr} is unchanged after the move).
Both {nr} and {target} can be window numbers or |window-ID|s.
Both must be in the current tab page.
@@ -10761,7 +10951,9 @@ winnr([{arg}]) The result is a Number, which is the number of the current
# the number of the last accessed window (where
|CTRL-W_p| goes to). If there is no previous
window or it is in another tab page 0 is
- returned.
+ returned. May refer to the current window in
+ some cases (e.g. when evaluating 'statusline'
+ expressions).
{N}j the number of the Nth window below the
current window (where |CTRL-W_j| goes to).
{N}k the number of the Nth window above the current
diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt
index 91b0047..e3abbde 100644
--- a/runtime/doc/diff.txt
+++ b/runtime/doc/diff.txt
@@ -1,4 +1,4 @@
-*diff.txt* For Vim version 9.1. Last change: 2023 Apr 04
+*diff.txt* For Vim version 9.1. Last change: 2024 Feb 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -476,4 +476,48 @@ Otherwise, the expression is evaluated in the context of the script where the
option was set, thus script-local items are available.
+DIFF FUNCTION EXAMPLES *diff-func-examples*
+
+Some examples for using the |diff()| function to compute the diff indices
+between two Lists of strings are below.
+>
+ " some lines are changed
+ :echo diff(['abc', 'def', 'ghi'], ['abx', 'rrr', 'xhi'], {'output': 'indices'})
+ [{'from_idx': 0, 'from_count': 3, 'to_idx': 0, 'to_count': 3}]
+
+ " few lines added at the beginning
+ :echo diff(['ghi'], ['abc', 'def', 'ghi'], {'output': 'indices'})
+ [{'from_idx': 0, 'from_count': 0, 'to_idx': 0, 'to_count': 2}]
+
+ " few lines removed from the beginning
+ :echo diff(['abc', 'def', 'ghi'], ['ghi'], {'output': 'indices'})
+ [{'from_idx': 0, 'from_count': 2, 'to_idx': 0, 'to_count': 0}]
+
+ " few lines added in the middle
+ :echo diff(['abc', 'jkl'], ['abc', 'def', 'ghi', 'jkl'], {'output': 'indices'})
+ [{'from_idx': 1, 'from_count': 0, 'to_idx': 1, 'to_count': 2}]
+
+ " few lines removed in the middle
+ :echo diff(['abc', 'def', 'ghi', 'jkl'], ['abc', 'jkl'], {'output': 'indices'})
+ [{'from_idx': 1, 'from_count': 2, 'to_idx': 1, 'to_count': 0}]
+
+ " few lines added at the end
+ :echo diff(['abc'], ['abc', 'def', 'ghi'], {'output': 'indices'})
+ [{'from_idx': 1, 'from_count': 0, 'to_idx': 1, 'to_count': 2}]
+
+ " few lines removed from the end
+ :echo diff(['abc', 'def', 'ghi'], ['abc'], {'output': 'indices'})
+ [{'from_idx': 1, 'from_count': 2, 'to_idx': 1, 'to_count': 0}]
+
+ " disjointed changes
+ :echo diff(['ab', 'def', 'ghi', 'jkl'], ['abc', 'def', 'ghi', 'jk'], {'output': 'indices', 'context': 0})
+ [{'from_idx': 0, 'from_count': 1, 'to_idx': 0, 'to_count': 1},
+ {'from_idx': 3, 'from_count': 1, 'to_idx': 3, 'to_count': 1}]
+
+ " disjointed changes with context length 1
+ :echo diff(['ab', 'def', 'ghi', 'jkl'], ['abc', 'def', 'ghi', 'jk'], {'output': 'indices', 'context': 1})
+ [{'from_idx': 0, 'from_count': 4, 'to_idx': 0, 'to_count': 4}]
+
+<
+
vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index 2ea6839..d0f8938 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -1,4 +1,4 @@
-*editing.txt* For Vim version 9.1. Last change: 2023 Sep 27
+*editing.txt* For Vim version 9.1. Last change: 2024 Jan 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1329,8 +1329,9 @@ b:browsefilter variable. You would most likely set b:browsefilter in a
filetype plugin, so that the browse dialog would contain entries related to
the type of file you are currently editing. Disadvantage: This makes it
difficult to start editing a file of a different type. To overcome this, you
-may want to add "All Files\t*.*\n" as the final filter, so that the user can
-still access any desired file.
+may want to add "All Files (*.*)\t*\n" as the final filter on Windows or "All
+Files (*)\t*\n" on other platforms, so that the user can still access any
+desired file.
To avoid setting browsefilter when Vim does not actually support it, you can
use has("browsefilter"): >
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index d52f7fe..f2ff3a8 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 9.1. Last change: 2023 Dec 09
+*eval.txt* For Vim version 9.1. Last change: 2024 Mar 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -303,10 +303,15 @@ List concatenation ~
*list-concatenation*
Two lists can be concatenated with the "+" operator: >
:let longlist = mylist + [5, 6]
- :let mylist += [7, 8]
+ :let longlist = [5, 6] + mylist
+To prepend or append an item, turn it into a list by putting [] around it.
-To prepend or append an item, turn the item into a list by putting [] around
-it. To change a list in-place, refer to |list-modification| below.
+A list can be concatenated with another one in-place using |:let+=| or
+|extend()|: >
+ :let mylist += [7, 8]
+ :call extend(mylist, [7, 8])
+<
+See |list-modification| below for more about changing a list in-place.
Sublist ~
@@ -425,6 +430,18 @@ To change part of a list you can specify the first and last item to be
modified. The value must at least have the number of items in the range: >
:let list[3:5] = [3, 4, 5]
+To add items to a List in-place, you can use |:let+=| (|list-concatenation|): >
+ :let listA = [1, 2]
+ :let listA += [3, 4]
+<
+When two variables refer to the same List, changing one List in-place will
+cause the referenced List to be changed in-place: >
+ :let listA = [1, 2]
+ :let listB = listA
+ :let listB += [3, 4]
+ :echo listA
+ [1, 2, 3, 4]
+<
Adding and removing items from a list is done with functions. Here are a few
examples: >
:call insert(list, 'a') " prepend item 'a'
@@ -745,12 +762,15 @@ This calls Doit() with 0x11, 0x22 and 0x33.
Blob concatenation ~
-
+ *blob-concatenation*
Two blobs can be concatenated with the "+" operator: >
:let longblob = myblob + 0z4455
+ :let longblob = 0z4455 + myblob
+<
+A blob can be concatenated with another one in-place using |:let+=|: >
:let myblob += 0z6677
-
-To change a blob in-place see |blob-modification| below.
+<
+See |blob-modification| below for more about changing a blob in-place.
Part of a blob ~
@@ -793,6 +813,18 @@ To change part of a blob you can specify the first and last byte to be
modified. The value must have the same number of bytes in the range: >
:let blob[3:5] = 0z334455
+To add items to a Blob in-place, you can use |:let+=| (|blob-concatenation|): >
+ :let blobA = 0z1122
+ :let blobA += 0z3344
+<
+When two variables refer to the same Blob, changing one Blob in-place will
+cause the referenced Blob to be changed in-place: >
+ :let blobA = 0z1122
+ :let blobB = blobA
+ :let blobB += 0z3344
+ :echo blobA
+ 0z11223344
+<
You can also use the functions |add()|, |remove()| and |insert()|.
@@ -2005,9 +2037,14 @@ v:collate The current locale setting for collation order of the runtime
*v:colornames*
v:colornames A dictionary that maps color names to hex color strings. These
color names can be used with the |highlight-guifg|,
- |highlight-guibg|, and |highlight-guisp| parameters. Updating
- an entry in v:colornames has no immediate effect on the syntax
- highlighting. The highlight commands (probably in a
+ |highlight-guibg|, and |highlight-guisp| parameters.
+
+ The key values in the dictionary (the color names) should be
+ lower cased, because Vim looks up a color by its lower case
+ name.
+
+ Updating an entry in v:colornames has no immediate effect on
+ the syntax highlighting. The highlight commands (probably in a
colorscheme script) need to be re-evaluated in order to use
the updated color values. For example: >
@@ -2039,6 +2076,10 @@ v:colornames A dictionary that maps color names to hex color strings. These
both automatically load all `colors/lists/default.vim` color
scripts.
+ You can make changes to that file, but make sure to add new
+ keys instead of updating existing ones, otherwise Vim will skip
+ loading the file (thinking is hasn't been changed).
+
*v:completed_item* *completed_item-variable*
v:completed_item
|Dictionary| containing the |complete-items| for the most
@@ -2568,8 +2609,9 @@ v:termresponse The escape sequence returned by the terminal for the |t_RV|
'c', with only digits and ';' in between.
When this option is set, the TermResponse autocommand event is
fired, so that you can react to the response from the
- terminal. You can use |terminalprops()| to see what Vim
- figured out about the terminal.
+ terminal. The TermResponseAll event is also fired, with
+ <amatch> set to "version". You can use |terminalprops()| to see
+ what Vim figured out about the terminal.
The response from a new xterm is: "<Esc>[> Pp ; Pv ; Pc c". Pp
is the terminal type: 0 for vt100 and 1 for vt220. Pv is the
patch level (since this was introduced in patch 95, it's
@@ -2581,27 +2623,37 @@ v:termresponse The escape sequence returned by the terminal for the |t_RV|
*v:termblinkresp*
v:termblinkresp The escape sequence returned by the terminal for the |t_RC|
termcap entry. This is used to find out whether the terminal
- cursor is blinking. This is used by |term_getcursor()|.
+ cursor is blinking. This is used by |term_getcursor()|. When
+ this option is set, the TermResponseAll autocommand event is
+ fired, with <amatch> set to "cursorblink".
*v:termstyleresp*
v:termstyleresp The escape sequence returned by the terminal for the |t_RS|
termcap entry. This is used to find out what the shape of the
- cursor is. This is used by |term_getcursor()|.
+ cursor is. This is used by |term_getcursor()|. When this
+ option is set, the TermResponseAll autocommand event is fired,
+ with <amatch> set to "cursorshape".
*v:termrbgresp*
v:termrbgresp The escape sequence returned by the terminal for the |t_RB|
termcap entry. This is used to find out what the terminal
- background color is, see 'background'.
+ background color is; see 'background'. When this option is
+ set, the TermResponseAll autocommand event is fired, with
+ <amatch> set to "background".
*v:termrfgresp*
v:termrfgresp The escape sequence returned by the terminal for the |t_RF|
termcap entry. This is used to find out what the terminal
- foreground color is.
+ foreground color is. When this option is set, the
+ TermResponseAll autocommand event is fired, with <amatch> set
+ to "foreground".
*v:termu7resp*
v:termu7resp The escape sequence returned by the terminal for the |t_u7|
termcap entry. This is used to find out what the terminal
- does with ambiguous width characters, see 'ambiwidth'.
+ does with ambiguous width characters, see 'ambiwidth'. When
+ this option is set, the TermResponseAll autocommand event is
+ fired, with <amatch> set to "ambiguouswidth".
*v:testing* *testing-variable*
v:testing Must be set before using `test_garbagecollect_now()`.
@@ -2793,6 +2845,8 @@ declarations and assignments do not use a command. |vim9-declaration|
:let {var} ..= {expr1} Like ":let {var} = {var} .. {expr1}".
These fail if {var} was not set yet and when the type
of {var} and {expr1} don't fit the operator.
+ `+=` modifies a |List| or a |Blob| in-place instead of
+ creating a new one.
`.=` is not supported with Vim script version 2 and
later, see |vimscript-version|.
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 4876e3d..41b27cc 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -1,4 +1,4 @@
-*filetype.txt* For Vim version 9.1. Last change: 2024 Jan 04
+*filetype.txt* For Vim version 9.1. Last change: 2024 Feb 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -496,7 +496,7 @@ g:changelog_new_date_format
%% insert a single '%' character
%d insert the date from above
%u insert the user from above
- %p insert result of b:changelog_entry_prefix
+ %p insert result of b:changelog_entry_prefix
%c where to position cursor when done
The default is "%d %u\n\n\t* %p%c\n\n", which produces
something like (| is where cursor will be, unless at
@@ -510,7 +510,7 @@ g:changelog_new_entry_format
The format used when creating a new entry.
The following table describes special tokens in the
string:
- %p insert result of b:changelog_entry_prefix
+ %p insert result of b:changelog_entry_prefix
%c where to position cursor when done
The default is "\t*%c", which produces something
similar to >
@@ -564,6 +564,18 @@ under it. If not found, a new entry and item is prepended to the beginning of
the Changelog.
+ASCIIDOC *ft-asciidoc-plugin*
+
+To enable |folding| use this: >
+ let g:asciidoc_folding = 1
+
+To disable nesting of folded headers use this: >
+ let g:asciidoc_foldnested = 0
+
+To disable folding everything under the title use this: >
+ let asciidoc_fold_under_title = 0
+
+
FORTRAN *ft-fortran-plugin*
Options:
diff --git a/runtime/doc/ft_ada.txt b/runtime/doc/ft_ada.txt
index 80ed728..35dd534 100644
--- a/runtime/doc/ft_ada.txt
+++ b/runtime/doc/ft_ada.txt
@@ -172,7 +172,7 @@ GNAT OBJECT ~
*g:gnat.Make()*
g:gnat.Make()
Calls |g:gnat.Make_Command| and displays the result inside a
- |quickfix| window.
+ |quickfix| window.
*g:gnat.Pretty()*
g:gnat.Pretty()
diff --git a/runtime/doc/ft_sql.txt b/runtime/doc/ft_sql.txt
index f98b062..110784d 100644
--- a/runtime/doc/ft_sql.txt
+++ b/runtime/doc/ft_sql.txt
@@ -371,7 +371,7 @@ This command breaks down as: >
'sqlKeyword' - Display the items for the sqlKeyword highlight
group
'sqlKeyword\w*' - A second option available with Vim 7.4 which
- uses a regular expression to determine which
+ uses a regular expression to determine which
syntax groups to use
)<CR> - Execute the :let command
<C-X><C-O> - Trigger the standard omni completion key stroke.
diff --git a/runtime/doc/gui_w32.txt b/runtime/doc/gui_w32.txt
index 780c0a0..c6f5725 100644
--- a/runtime/doc/gui_w32.txt
+++ b/runtime/doc/gui_w32.txt
@@ -1,4 +1,4 @@
-*gui_w32.txt* For Vim version 9.1. Last change: 2022 Mar 09
+*gui_w32.txt* For Vim version 9.1. Last change: 2024 Jan 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -454,4 +454,38 @@ You may need to get the vim16x16.xpm file from github:
https://github.com/vim/vim/blob/master/runtime/vim16x16.xpm
+Keycode translation strategy *w32-experimental-keycode-trans-strategy*
+
+In Patch v8.2.4807 W32 GVIM was changed over to experimental keycode
+translation method with the aim to be able to use more keyboard shortcuts and
+especially supporting non-standard keyboard layouts. In order to implement
+this support Win API TranslateMessage() call was dropped, and instead the
+recognition of keycode was changed over to ToUnicode() Win API call. This
+approach uncovered numerous corner cases, which are apparently covered by
+TranslateMessage() implementation, each of it is necessary to be dealt with on
+an individual basis. Therefore the decision was taken to declare this
+functionality experimental for the time being and to recover "classic" keycode
+translation method as default again.
+
+Discussion about use of "experimental" keycode translation method will
+probably last some time yet. In the meantime, if you are impacted by this
+change over back to "classic" keycode translation method in W32 GVIM, you can
+enable "experimental" translation method again in your vimrc using following
+snippet:
+>
+ :call test_mswin_event('set_keycode_trans_strategy', {'strategy': 'experimental'})
+<
+Similarly, in case you need to turn back "classic" keycode translation method
+(for example for testing purposes), please use:
+>
+ :call test_mswin_event('set_keycode_trans_strategy', {'strategy': 'classic'})
+<
+Alternatively (this method is especially useful for the TINY GVIM build, where
+test_mswin_event() cannot be called), an environment variable
+VIM_KEYCODE_TRANS_STRATEGY can be set to the desired value ("experimental" or
+"classic"), to override the default, e.g., type in dos prompt:
+>
+ set VIM_KEYCODE_TRANS_STRATEGY=experimental
+ gvim.exe
+<
vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/gui_x11.txt b/runtime/doc/gui_x11.txt
index 23633f1..bc2ba54 100644
--- a/runtime/doc/gui_x11.txt
+++ b/runtime/doc/gui_x11.txt
@@ -1,4 +1,4 @@
-*gui_x11.txt* For Vim version 9.1. Last change: 2022 Apr 03
+*gui_x11.txt* For Vim version 9.1. Last change: 2024 Jan 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -580,7 +580,8 @@ command line argument).
*gui-x11-kde*
There is no KDE version of Vim. There has been some work on a port using the
Qt toolkit, but it never worked properly and it has been abandoned. Work
-continues on Yzis: https://github.com/chrizel/Yzis.
+continues on Yzis: https://github.com/chrizel/Yzis but it seems also
+abandoned.
==============================================================================
8. Compiling *gui-x11-compiling*
@@ -647,6 +648,15 @@ versions. This will cause problems. For example, using header files for
X11R5 with a library for X11R6 probably doesn't work (although the linking
won't give an error message, Vim will crash later).
+ *gui-wayland*
+Initial support for the Wayland display server protocol has landed in patch
+9.1.0064. To enable it, you need to set the environment variable
+"$GVIM_ENABLE_WAYLAND" in your shell.
+
+Note: The Wayland protocol is subject to some restrictions, so the following
+functions won't work: |getwinpos()|, |getwinposx()|, |getwinposy()| and the
+|v:windowid| variable won't be available.
+
==============================================================================
9. X11 selection mechanism *x11-selection*
diff --git a/runtime/doc/if_ole.txt b/runtime/doc/if_ole.txt
index b08fa98..c546e97 100644
--- a/runtime/doc/if_ole.txt
+++ b/runtime/doc/if_ole.txt
@@ -39,9 +39,9 @@ instance), code similar to the following should be used:
$vim = new Win32::OLE 'Vim.Application';
[C#] >
- // Add a reference to Vim in your project.
- // Choose the COM tab.
- // Select "Vim Ole Interface 1.1 Type Library"
+ // Add a reference to Vim in your project.
+ // Choose the COM tab.
+ // Select "Vim Ole Interface 1.1 Type Library"
Vim.Vim vimobj = new Vim.Vim();
Vim does not support acting as a "hidden" OLE server, like some other OLE
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index 7865bb6..fe24505 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -1,4 +1,4 @@
-*indent.txt* For Vim version 9.1. Last change: 2023 Dec 27
+*indent.txt* For Vim version 9.1. Last change: 2024 Feb 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1255,5 +1255,11 @@ Example of configuration: >
This variable is equivalent to `g:vim_indent.line_continuation`.
It's supported for backward compatibility.
+YAML *ft-yaml-indent*
+
+By default, the yaml indent script does not try to detect multiline scalars.
+If you want to enable this, set the following variable: >
+
+ let g:yaml_indent_multiline_scalar = 1
vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 1b012b7..d26592a 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1172,6 +1172,8 @@ tag command action ~
|:>| :> shift lines one 'shiftwidth' right
|:@| :@ execute contents of a register
|:@@| :@@ repeat the previous ":@"
+|:2match| :2mat[ch] define a second match to highlight
+|:3match| :3mat[ch] define a third match to highlight
|:Next| :N[ext] go to previous file in the argument list
|:Print| :P[rint] print lines
|:X| :X ask for encryption key
diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt
index 185796f..120d65d 100644
--- a/runtime/doc/intro.txt
+++ b/runtime/doc/intro.txt
@@ -1,4 +1,4 @@
-*intro.txt* For Vim version 9.1. Last change: 2023 Nov 18
+*intro.txt* For Vim version 9.1. Last change: 2024 Jan 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -475,7 +475,7 @@ notation meaning equivalent decimal value(s) ~
<C-...> control-key *control* *ctrl* *<C-*
<M-...> alt-key or meta-key *meta* *alt* *<M-*
<A-...> same as <M-...> *<A-*
-<D-...> command-key (Macintosh only) *<D-*
+<D-...> command-key (Mac) / super (GTK) *<D-*
<t_xx> key with "xx" entry in termcap
-----------------------------------------------------------------------
diff --git a/runtime/doc/maketags.awk b/runtime/doc/maketags.awk
index c6b2cd9..20b2b08 100644
--- a/runtime/doc/maketags.awk
+++ b/runtime/doc/maketags.awk
@@ -21,6 +21,13 @@ NR == 1 { nf=split(FILENAME,f,".")
gsub(/%/,"\\&#37;");
nf=split($0,tag," ");
+ if (counttag[tag[1]] > 0)
+ {
+ print "==============" > "errors.log"
+ print "Duplicate Tag " tag[1] > "errors.log"
+ print "==============" > "errors.log"
+ }
+ counttag[tag[1]]++
tagkey[t]=tag[1];tagref[t]=tag[2];tagnum[t]=NR;
print $1 " " $2 " line " NR >"tags.ref"
n=split($2,w,".");
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 7d4d530..1229726 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1,4 +1,4 @@
-*map.txt* For Vim version 9.1. Last change: 2024 Jan 04
+*map.txt* For Vim version 9.1. Last change: 2024 Jan 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -21,9 +21,10 @@ manual.
1.9 Using mappings |map-typing|
1.10 Mapping alt-keys |:map-alt-keys|
1.11 Mapping meta-keys |:map-meta-keys|
- 1.12 Mapping in modifyOtherKeys mode |modifyOtherKeys|
- 1.13 Mapping with Kitty keyboard protocol |kitty-keyboard-protocol|
- 1.14 Mapping an operator |:map-operator|
+ 1.12 Mapping super-keys or command keys |:map-super-keys|
+ 1.13 Mapping in modifyOtherKeys mode |modifyOtherKeys|
+ 1.14 Mapping with Kitty keyboard protocol |kitty-keyboard-protocol|
+ 1.15 Mapping an operator |:map-operator|
2. Abbreviations |abbreviations|
3. Local mappings and functions |script-local|
4. User-defined commands |user-commands|
@@ -591,7 +592,7 @@ displayed in the first line. Also a key map will also display where it was
last defined. Example: >
:verbose map <C-W>*
- Kitty keyboard protocol: Cleared
+ Kitty keyboard protocol: Cleared
n <C-W>* * <C-W><C-S>*
Last set from /home/abcd/.vimrc
@@ -985,8 +986,17 @@ For the Meta modifier the "T" character is used. For example, to map Meta-b
in Insert mode: >
:imap <T-b> terrible
+1.12 MAPPING SUPER-KEYS or COMMAND-KEYS *:map-super-keys* *:map-cmd-key*
-1.12 MAPPING IN modifyOtherKeys mode *modifyOtherKeys*
+The Super modifier is available in GUI mode (when |gui_running| is 1) for
+GVim on Linux and MacVim on Mac OS. If you're on a Mac, this represents the
+Command key, on Linux with the GTK GUI it represents the Super key.
+The character "D" is used for the Super / Command modifier.
+
+For example, to map Command-b in Insert mode: >
+ :imap <D-b> barritone
+
+1.13 MAPPING IN modifyOtherKeys mode *modifyOtherKeys*
Xterm and a few other terminals can be put in a mode where keys with modifiers
are sent with a special escape code. Vim recognizes these codes and can then
@@ -1048,7 +1058,7 @@ When the 'esckeys' option is off, then modifyOtherKeys will be disabled in
Insert mode to avoid every key with a modifier causing Insert mode to end.
-1.13 MAPPING WITH KITTY KEYBOARD PROTOCOL *kitty-keyboard-protocol*
+1.14 MAPPING WITH KITTY KEYBOARD PROTOCOL *kitty-keyboard-protocol*
If the value of 'term' contains "kitty" then Vim will send out an escape
sequence to enable the Kitty keyboard protocol. This can be changed with the
@@ -1075,7 +1085,7 @@ translated). The meaning of {value}:
previous state is unknown
-1.14 MAPPING AN OPERATOR *:map-operator*
+1.15 MAPPING AN OPERATOR *:map-operator*
An operator is used before a {motion} command. To define your own operator
you must create a mapping that first sets the 'operatorfunc' option and then
diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt
index 133d47a..6453b95 100644
--- a/runtime/doc/message.txt
+++ b/runtime/doc/message.txt
@@ -1,4 +1,4 @@
-*message.txt* For Vim version 9.1. Last change: 2023 Dec 20
+*message.txt* For Vim version 9.1. Last change: 2024 Mar 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -122,6 +122,13 @@ wiped out a buffer which contains a mark or is referenced in another way.
You cannot have two buffers with exactly the same name. This includes the
path leading to the file.
+ *E1513*
+ Cannot switch buffer. 'winfixbuf' is enabled ~
+
+If a window has 'winfixbuf' enabled, you cannot change that window's current
+buffer. You need to set 'nowinfixbuf' before continuing. You may use [!] to
+force the window to switch buffers, if your command supports it.
+
*E72*
Close error on swap file ~
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 4dff6b5..a79e0b2 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 9.1. Last change: 2024 Jan 03
+*options.txt* For Vim version 9.1. Last change: 2024 Mar 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -333,6 +333,7 @@ created, thus they behave slightly differently:
Option Reason ~
'previewwindow' there can only be a single one
'scroll' specific to existing window
+ 'winfixbuf' specific to existing window
'winfixheight' specific to existing window
'winfixwidth' specific to existing window
@@ -365,11 +366,24 @@ created, thus they behave slightly differently:
For a global option the global value is
shown (but that might change in the future).
-:setl[ocal] {option}< Set the local value of {option} to its global value by
- copying the value.
-
-:se[t] {option}< For |global-local| options: Remove the local value of
- {option}, so that the global value will be used.
+:se[t] {option}< Set the effective value of {option} to its global
+ value.
+ For string |global-local| options, the local value is
+ removed, so that the global value will be used.
+ For all other options, the global value is copied to
+ the local value.
+
+:setl[ocal] {option}< Set the effective value of {option} to its global
+ value.
+ For number and boolean |global-local| options, the
+ local value is removed, so that the global value will
+ be used.
+ For all other options, including string |global-local|
+ options, the global value is copied to the local
+ value.
+
+Note that the behaviour for |global-local| options is slightly different
+between string and number-based options.
*:setg* *:setglobal*
:setg[lobal][!] ... Like ":set" but set only the global value for a local
@@ -2919,7 +2933,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Use the indent heuristic for the internal
diff library.
- algorithm:{text} Use the specified diff algorithm with the
+ algorithm:{text} Use the specified diff algorithm with the
internal diff engine. Currently supported
algorithms are:
myers the default algorithm
@@ -3478,12 +3492,10 @@ A jump table for the options with a short description can be found at |Q_op|.
*'fillchars'* *'fcs'*
'fillchars' 'fcs' string (default "vert:|,fold:-,eob:~")
global or local to window |global-local|
- {not available when compiled without the |+folding|
- feature}
Characters to fill the statuslines, vertical separators and special
lines in the window.
It is a comma-separated list of items. Each item has a name, a colon
- and the value of that item:
+ and the value of that item: |E1511|
item name default Used for ~
stl ' ' statusline of the current window
@@ -3504,7 +3516,7 @@ A jump table for the options with a short description can be found at |Q_op|.
<
For the "stl", "stlnc", "foldopen", "foldclose" and "foldsep" items
single-byte and multibyte characters are supported. But double-width
- characters are not supported.
+ characters are not supported. |E1512|
The highlighting used for these items:
item name highlight group ~
@@ -4002,7 +4014,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'guiligatures'* *'gli'* *E1243*
'guiligatures' 'gli' string (default "")
global
- {only for GTK GUI}
+ {only for GTK and Win32 GUI}
List of ASCII characters that, when combined together, can create more
complex shapes. Each character must be a printable ASCII character
with a value in the 32-127 range.
@@ -5243,7 +5255,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'listchars' 'lcs' string (default "eol:$")
global or local to window |global-local|
Strings to use in 'list' mode and for the |:list| command. It is a
- comma-separated list of string settings.
+ comma-separated list of string settings. *E1511*
*lcs-eol*
eol:c Character to show at the end of each line. When
omitted, there is no extra character at the end of the
@@ -5319,7 +5331,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The characters ':' and ',' should not be used. UTF-8 characters can
be used when 'encoding' is "utf-8", otherwise only printable
- characters are allowed. All characters must be single width.
+ characters are allowed. All characters must be single width. *E1512*
Each character can be specified as hex: >
set listchars=eol:\\x24
@@ -6456,7 +6468,7 @@ A jump table for the options with a short description can be found at |Q_op|.
this option at the default "on". Only switch it off when working with
old Vi scripts.
- *'renderoptions'* *'rop'*
+ *'renderoptions'* *'rop'*
'renderoptions' 'rop' string (default: empty)
global
{only available when compiled with GUI and DIRECTX on
@@ -7242,7 +7254,7 @@ A jump table for the options with a short description can be found at |Q_op|.
q use "recording" instead of "recording @a" *shm-q*
F don't give the file info when editing a file, like *shm-F*
`:silent` was used for the command; note that this also
- affects messages from autocommands
+ affects messages from autocommands and 'autoread' reloading
S do not show search count message when searching, e.g. *shm-S*
"[1/5]"
@@ -8010,6 +8022,8 @@ A jump table for the options with a short description can be found at |Q_op|.
"split" when both are present.
uselast If included, jump to the previously used window when
jumping to errors with |quickfix| commands.
+ If a window has 'winfixbuf' enabled, 'switchbuf' is currently not
+ applied to the split window.
*'synmaxcol'* *'smc'*
'synmaxcol' 'smc' number (default 3000)
@@ -8583,8 +8597,11 @@ A jump table for the options with a short description can be found at |Q_op|.
will not work (except in the GUI).
If the title cannot be restored, it is set to the value of 'titleold'.
You might want to restore the title outside of Vim then.
- When using an xterm from a remote machine you can use this command:
+ When using an xterm from a remote machine you can use this command: >
+
rsh machine_name xterm -display $DISPLAY &
+ ssh -X machine_name xterm &
+<
then the WINDOWID environment variable should be inherited and the
title of the window should change back to what it should be after
exiting Vim.
@@ -9457,6 +9474,15 @@ A jump table for the options with a short description can be found at |Q_op|.
Note: Do not confuse this with the height of the Vim window, use
'lines' for that.
+ *'winfixbuf'*
+'winfixbuf' 'wfb' boolean (default off)
+ local to window
+ If enabled, the window and the buffer it is displaying are paired.
+ For example, attempting to change the buffer with |:edit| will fail.
+ Other commands which change a window's buffer such as |:cnext| will
+ also skip any window with 'winfixbuf' enabled. However if an Ex
+ command has a "!" modifier, it can force switching buffers.
+
*'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'*
'winfixheight' 'wfh' boolean (default off)
local to window |local-noglobal|
diff --git a/runtime/doc/os_vms.txt b/runtime/doc/os_vms.txt
index ff43548..862f31d 100644
--- a/runtime/doc/os_vms.txt
+++ b/runtime/doc/os_vms.txt
@@ -753,7 +753,7 @@ Solution 2. Different directories: >
$ say "IA64 platform"
$ define/nolog VIM RF10:[UTIL.IA64_EXE] ! IA64 executables
$ endif
- $! VIMRUNTIME must be defined in order to find runtime files
+ $! VIMRUNTIME must be defined in order to find runtime files
$ define/nolog VIMRUNTIME RF10:[UTIL.VIM73]
A good example for this approach is the [GNU]gnu_tools.com script from
diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt
index 07d70c8..2b22105 100644
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -1,4 +1,4 @@
-*pi_netrw.txt* For Vim version 9.1. Last change: 2023 May 14
+*pi_netrw.txt* For Vim version 9.1. Last change: 2023 Jun 19
------------------------------------------------
NETRW REFERENCE MANUAL by Charles E. Campbell
@@ -642,7 +642,7 @@ additional prompting.
work with your ftp client. Otherwise the script will
prompt for user-id and password.
- (*3) for ftp, "machine" may be machine#port or machine:port
+ (*3) for ftp, "machine" may be machine#port or machine:port
if a different port is needed than the standard ftp port
(*4) for http:..., if wget is available it will be used. Otherwise,
@@ -788,7 +788,7 @@ below, a {netfile} is a URL to a remote file.
(related: |netrw-userpass|)
:NetrwSettings This command is described in |netrw-settings| -- used to
- display netrw settings and change netrw behavior.
+ display netrw settings and change netrw behavior.
==============================================================================
@@ -1625,10 +1625,8 @@ A further approach is to delete files which match a pattern.
This will cause the matching files to be marked. Then,
press "D".
-If your vim has 7.4 with patch#1107, then |g:netrw_localrmdir| no longer
-is used to remove directories; instead, vim's |delete()| is used with
-the "d" option. Please note that only empty directories may be deleted
-with the "D" mapping. Regular files are deleted with |delete()|, too.
+Please note that only empty directories may be deleted with the "D" mapping.
+Regular files are deleted with |delete()|, too.
The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are
used to control the attempts to remove remote files and directories. The
@@ -1647,8 +1645,7 @@ to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
|g:netrw_rmf_cmd|: ssh HOSTNAME rm -f
Related topics: |netrw-d|
-Associated setting variable: |g:netrw_localrmdir| |g:netrw_rm_cmd|
- |g:netrw_rmdir_cmd| |g:netrw_ssh_cmd|
+Associated setting variable: |g:netrw_rm_cmd| |g:netrw_ssh_cmd|
*netrw-explore* *netrw-hexplore* *netrw-nexplore* *netrw-pexplore*
@@ -1691,7 +1688,11 @@ DIRECTORY EXPLORATION COMMANDS {{{2
to 2; edits will thus preferentially be made in window#2.
The [N] specifies a |g:netrw_winsize| just for the new :Lexplore
- window.
+ window. That means that
+ if [N] < 0 : use |N| columns for the Lexplore window
+ if [N] = 0 : a normal split is made
+ if [N] > 0 : use N% of the current window will be used for the
+ new window
Those who like this method often also like tree style displays;
see |g:netrw_liststyle|.
@@ -2863,14 +2864,6 @@ your browsing preferences. (see also: |netrw-settings|)
=" /c move" Windows
Options for |g:netrw_localmovecmd|
- *g:netrw_localrmdir* ="rmdir" Linux/Unix/MacOS/Cygwin
- =expand("$COMSPEC") Windows
- Remove directory command (rmdir)
- This variable is only used if your vim is
- earlier than 7.4 or if your vim doesn't
- have patch#1107. Otherwise, |delete()|
- is used with the "d" option.
-
*g:netrw_maxfilenamelen* =32 by default, selected so as to make long
listings fit on 80 column displays.
If your screen is wider, and you have file
@@ -3781,7 +3774,7 @@ Example: Clear netrw's marked file list via a mapping on gu >
Netrw uses several system level commands to do things (see
|g:netrw_localcopycmd|, |g:netrw_localmovecmd|,
- |g:netrw_localrmdir|, |g:netrw_mkdir_cmd|).
+ |g:netrw_mkdir_cmd|).
You may need to adjust the default commands for one or more of
these commands by setting them properly in your .vimrc. Another
@@ -3907,8 +3900,13 @@ netrw:
==============================================================================
12. History *netrw-history* {{{1
- v172: Apr 22, 2023 * removed g:netrw_localrmdiropt
- removed g:netrw_localrmdir
+ v172: Sep 02, 2021 * (Bram Moolenaar) Changed "l:go" to "go"
+ * (Bram Moolenaar) no need for "b" in
+ netrw-safe guioptions
+ Nov 15, 2021 * removed netrw_localrm and netrw_localrmdir
+ references
+ Aug 18, 2022 * (Miguel Barro) improving compatability with
+ powershell
v171: Oct 09, 2020 * included code in s:NetrwOptionsSafe()
to allow |'bh'| to be set to delete when
rather than hide when g:netrw_fastbrowse
@@ -3996,7 +3994,6 @@ netrw:
|g:netrw_localcopydircmdopt|
|g:netrw_localmkdiropt|
|g:netrw_localmovecmdopt|
- g:netrw_localrmdiropt
Nov 21, 2016 * (mattn) provided a patch for preview; swapped
winwidth() with winheight()
Nov 22, 2016 * (glacambre) reported that files containing
@@ -4056,7 +4053,7 @@ netrw:
refreshes. However, inside a |:map-<expr>|,
tab and window changes are disallowed. Fixed.
(affects netrw's s:LocalBrowseRefresh())
- * |g:netrw_localrmdir| not used any more, but
+ * g:netrw_localrmdir not used any more, but
the relevant patch that causes |delete()| to
take over was #1107 (not #1109).
* |expand()| is now used on |g:netrw_home|;
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
index 325f592..ae3bfb5 100644
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -378,14 +378,14 @@ processing a quickfix or location list command, it will be aborted.
List all errors.
:cl[ist]! +{count} List the current and next {count} error lines. This
- is useful to see unrecognized lines after the current
+ is useful to see unrecognized lines after the current
one. For example, if ":clist" shows:
- 8384 testje.java:252: error: cannot find symbol ~
- Then using ":cl! +3" shows the reason:
- 8384 testje.java:252: error: cannot find symbol ~
- 8385: ZexitCode = Fmainx(); ~
- 8386: ^ ~
- 8387: symbol: method Fmainx() ~
+ 8384 testje.java:252: error: cannot find symbol ~
+ Then using ":cl! +3" shows the reason:
+ 8384 testje.java:252: error: cannot find symbol ~
+ 8385: ZexitCode = Fmainx(); ~
+ 8386: ^ ~
+ 8387: symbol: method Fmainx() ~
:lli[st] [from] [, [to]] *:lli* *:llist*
Same as ":clist", except the location list for the
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index dcbb520..517fa30 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -1,4 +1,4 @@
-*quickref.txt* For Vim version 9.1. Last change: 2023 Dec 05
+*quickref.txt* For Vim version 9.1. Last change: 2024 Mar 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1005,6 +1005,7 @@ Short explanation of each option: *option-list*
'winaltkeys' 'wak' when the windows system handles ALT keys
'wincolor' 'wcr' window-local highlighting
'window' 'wi' nr of lines to scroll for CTRL-F and CTRL-B
+'winfixbuf' 'wfb' keep window focused on a single buffer
'winfixheight' 'wfh' keep window height when opening/closing windows
'winfixwidth' 'wfw' keep window width when opening/closing windows
'winheight' 'wh' minimum number of lines for the current window
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index ff069ca..a757445 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -1,4 +1,4 @@
-*starting.txt* For Vim version 9.1. Last change: 2023 Oct 20
+*starting.txt* For Vim version 9.1. Last change: 2024 Mar 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -113,10 +113,10 @@ Additional characters may follow, they are ignored. For example, you can have
"gvim-8" to start the GUI. You must have an executable by that name then, of
course.
-On Unix, you would normally have one executable called Vim, and links from the
-different startup-names to that executable. If your system does not support
-links and you do not want to have several copies of the executable, you could
-use an alias instead. For example: >
+On Unix, you would normally have one executable called "vim", and links from
+the different startup-names to that executable. If your system does not
+support links and you do not want to have several copies of the executable,
+you could use an alias instead. For example, in a C shell descendant: >
alias view vim -R
alias gvim vim -g
<
@@ -194,7 +194,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
--cmd {command} *--cmd*
{command} will be executed before processing any vimrc file.
- Otherwise it acts like -c {command}. You can use up to 10 of
+ Otherwise, it acts like -c {command}. You can use up to 10 of
these commands, independently from "-c" commands.
*-S*
@@ -279,7 +279,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
*-s-ex*
-s Silent or batch mode. Only when Vim was started as "ex" or
- when preceded with the "-e" argument. Otherwise see |-s|,
+ when preceded with the "-e" argument. Otherwise, see |-s|,
which does take an argument while this use of "-s" doesn't.
To be used when Vim is used to execute Ex commands from a file
instead of a terminal. Switches off most prompts and
@@ -289,12 +289,12 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
:list
:number
:set to display option values.
- When 'verbose' is non-zero messages are printed (for
+ When 'verbose' is non-zero, messages are printed (for
debugging, to stderr).
'term' and $TERM are not used.
- If Vim appears to be stuck try typing "qa!<Enter>". You don't
- get a prompt thus you can't see Vim is waiting for you to type
- something.
+ If Vim appears to be stuck, try typing "qa!<Enter>". You
+ don't get a prompt, thus you can't see Vim is waiting for you
+ to type something.
Initializations are skipped (except the ones given with the
"-u" argument).
Example: >
@@ -317,7 +317,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
*-A*
-A Arabic mode. Sets the 'arabic' option on. {only when
compiled with the |+arabic| features (which include
- |+rightleft|), otherwise Vim gives an error message
+ |+rightleft|), otherwise, Vim gives an error message
and exits}
*-F*
@@ -326,7 +326,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
*-H*
-H Hebrew mode. Sets the 'hkmap' and 'rightleft' options on.
- {only when compiled with the |+rightleft| feature, otherwise
+ {only when compiled with the |+rightleft| feature, otherwise,
Vim gives an error message and exits}
*-V* *verbose*
@@ -407,7 +407,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
few windows will be editing an empty file.
*-O*
--O[N] Open N windows, split vertically. Otherwise it's like -o.
+-O[N] Open N windows, split vertically. Otherwise, it's like -o.
If both the -o and the -O option are given, the last one on
the command line determines how the windows will be split.
@@ -483,8 +483,10 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
This can be used to start Vim in a special mode, with special
mappings and settings. A shell alias can be used to make
- this easy to use. For example: >
- alias vimc vim -u ~/.c_vimrc !*
+ this easy to use. For example, in a C shell descendant: >
+ alias vimc 'vim -u ~/.c_vimrc \!*'
+< And in a Bash shell: >
+ alias vimc='vim -u ~/.c_vimrc'
< Also consider using autocommands; see |autocommand|.
When {vimrc} is equal to "NONE" (all uppercase), all
@@ -544,9 +546,9 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
window title and copy/paste using the X clipboard. This
avoids a long startup time when running Vim in a terminal
emulator and the connection to the X server is slow.
- See |--startuptime| to find out if affects you.
+ See |--startuptime| to find out if this affects you.
Only makes a difference on Unix or VMS, when compiled with the
- |+X11| feature. Otherwise it's ignored.
+ |+X11| feature. Otherwise, it's ignored.
To disable the connection only for specific terminals, see the
'clipboard' option.
When the X11 Session Management Protocol (XSMP) handler has
@@ -575,8 +577,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
":source!". When the "scriptout" file already exists, new
characters are appended. See also |complex-repeat|.
{scriptout} cannot start with a digit.
- If you want to record what is typed in a human readable for
- you can use |ch_logfile()|, It adds "raw key input" lines.
+ If you want to record what is typed in a human readable form,
+ you can use |ch_logfile()|. It adds "raw key input" lines.
Also see |--log|.
*-W*
@@ -666,7 +668,7 @@ If the executable is called "ex", Vim will start in "Ex" mode. This means it
will accept only ":" commands. But when the "-v" argument is given, Vim will
start in Normal mode anyway.
-Additional arguments are available on unix like systems when compiled with
+Additional arguments are available on Unix like systems when compiled with
X11 GUI support. See |gui-resources|.
==============================================================================
@@ -740,7 +742,7 @@ In Evim these options are changed from their default value:
:set incsearch show matches halfway typing a pattern
:set mouse=a use the mouse in all modes
:set hlsearch highlight all matches for a search pattern
- :set whichwrap+=<,>,[,] <Left> and <Right> wrap around line breaks
+ :set whichwrap+=<,>,[,] <Left> and <Right> wrap around line breaks
:set guioptions-=a non-Unix only: don't do auto-select
Key mappings:
@@ -833,7 +835,7 @@ accordingly. Vim proceeds in this order:
initializations until 4. are skipped. Only the "-u" option is
interpreted.
*evim.vim*
- a. If vim was started as |evim| or |eview| or with the |-y| argument, the
+ a. If Vim was started as |evim| or |eview| or with the |-y| argument, the
script $VIMRUNTIME/evim.vim will be loaded.
*system-vimrc*
b. For Unix, MS-Windows, VMS, Macintosh and Amiga the system vimrc file
@@ -929,7 +931,7 @@ accordingly. Vim proceeds in this order:
This means that Vim will figure out the values of 'shellpipe' and
'shellredir' for you, unless you have set them yourself.
-6. Set 'updatecount' to zero, if "-n" command argument used
+6. Set 'updatecount' to zero, if "-n" command argument used.
7. Set binary options
If the "-b" flag was given to Vim, the options for binary editing will
@@ -973,7 +975,7 @@ Some hints on using initializations ~
Standard setup:
Create a vimrc file to set the default settings and mappings for all your edit
-sessions. Put it in a place so that it will be found by 3b:
+sessions. Put it in a place so that it will be found by 3b.:
~/.vimrc (Unix)
s:.vimrc (Amiga)
$VIM\_vimrc (Win32)
@@ -1087,11 +1089,11 @@ Avoiding trojan horses ~
*trojan-horse*
While reading the "vimrc" or the "exrc" file in the current directory, some
commands can be disabled for security reasons by setting the 'secure' option.
-This is always done when executing the command from a tags file. Otherwise it
-would be possible that you accidentally use a vimrc or tags file that somebody
-else created and contains nasty commands. The disabled commands are the ones
-that start a shell, the ones that write to a file, and ":autocmd". The ":map"
-commands are echoed, so you can see which keys are being mapped.
+This is always done when executing the command from a tags file. Otherwise,
+it would be possible that you accidentally use a vimrc or tags file that
+somebody else created and contains nasty commands. The disabled commands are
+the ones that start a shell, the ones that write to a file, and ":autocmd".
+The ":map" commands are echoed, so you can see which keys are being mapped.
If you want Vim to execute all commands in a local vimrc file, you
can reset the 'secure' option in the EXINIT or VIMINIT environment variable or
in the global "exrc" or "vimrc" file. This is not possible in "vimrc" or
@@ -1248,9 +1250,9 @@ continue if you make it the foreground job again. On other systems, CTRL-Z
will start a new shell. This is the same as the ":sh" command. Vim will
continue if you exit from the shell.
-In X-windows the selection is disowned when Vim suspends. this means you
-can't paste it in another application (since Vim is going to sleep an attempt
-to get the selection would make the program hang).
+In the X Window System environment, the selection is disowned when Vim
+suspends. This means you can't paste it in another application (since Vim is
+going to sleep, an attempt to get the selection would make the program hang).
==============================================================================
7. Exiting *exiting*
@@ -1295,7 +1297,7 @@ will be set to the same values. The options 'columns', 'endofline',
dependent. Note that the options 'binary', 'paste' and 'readonly' are
included, this might not always be what you want.
-When special keys are used in mappings, The 'cpoptions' option will be
+When special keys are used in mappings, the 'cpoptions' option will be
temporarily set to its Vim default, to avoid the mappings to be
misinterpreted. This makes the file incompatible with Vi, but makes sure it
can be used with different terminals.
@@ -1356,8 +1358,8 @@ All this is {not available when compiled without the |+mksession| feature}.
*:mks* *:mksession*
:mks[ession][!] [file] Write a Vim script that restores the current editing
session.
- When [!] is included an existing file is overwritten.
- When [file] is omitted "Session.vim" is used.
+ When [!] is included, an existing file is overwritten.
+ When [file] is omitted, "Session.vim" is used.
The output of ":mksession" is like ":mkvimrc", but additional commands are
added to the file. Which ones depends on the 'sessionoptions' option. The
@@ -1369,16 +1371,16 @@ resulting file, when executed with a ":source" command:
3. Closes all windows in the current tab page, except the current one; closes
all tab pages except the current one (this results in currently loaded
buffers to be unloaded, some may become hidden if 'hidden' is set or
- otherwise specified); wipes out the current buffer, if it is empty
- and unnamed.
-4. Restores the current directory if 'sessionoptions' contains "curdir", or
- sets the current directory to where the Session file is if 'sessionoptions'
- contains "sesdir".
+ otherwise specified); wipes out the current buffer, if it is empty and
+ unnamed.
+4. Restores the current directory, if 'sessionoptions' contains "curdir", or
+ sets the current directory to where the Session file is, if
+ 'sessionoptions' contains "sesdir".
5. Restores GUI Vim window position, if 'sessionoptions' contains "winpos".
6. Restores screen size, if 'sessionoptions' contains "resize".
7. Reloads the buffer list, with the last cursor positions. If
'sessionoptions' contains "buffers" then all buffers are restored,
- including hidden and unloaded buffers. Otherwise only buffers in windows
+ including hidden and unloaded buffers. Otherwise, only buffers in windows
are restored.
8. Restores all windows with the same layout. If 'sessionoptions' contains
"help", help windows are restored. If 'sessionoptions' contains "blank",
@@ -1405,14 +1407,14 @@ A session includes all tab pages, unless "tabpages" was removed from
The |SessionLoadPost| autocmd event is triggered after a session file is
loaded/sourced.
*SessionLoad-variable*
-While the session file is loading the SessionLoad global variable is set to 1.
-Plugins can use this to postpone some work until the SessionLoadPost event is
-triggered.
+While the session file is loading, the SessionLoad global variable is set to
+1. Plugins can use this to postpone some work until the SessionLoadPost event
+is triggered.
*:mkvie* *:mkview*
:mkvie[w][!] [file] Write a Vim script that restores the contents of the
current window.
- When [!] is included an existing file is overwritten.
+ When [!] is included, an existing file is overwritten.
When [file] is omitted or is a number from 1 to 9, a
name is generated and 'viewdir' prepended. When the
last path part of 'viewdir' does not exist, this
@@ -1427,14 +1429,13 @@ triggered.
The output of ":mkview" contains these items:
1. The argument list used in the window. When the global argument list is
- used it is reset to the global list.
+ used, it is reset to the global list.
The index in the argument list is also restored.
2. The file being edited in the window. If there is no file, the window is
made empty.
-3. Restore mappings, abbreviations and options local to the window if
- 'viewoptions' contains "options" or "localoptions". For the options it
- restores only values that are local to the current buffer and values local
- to the window.
+3. Restore mappings, abbreviations and options local to the window, if
+ 'viewoptions' contains "options" or "localoptions". Only option values
+ that are local to the current buffer and the current window are restored.
When storing the view as part of a session and "options" is in
'sessionoptions', global values for local options will be stored too.
4. Restore folds when using manual folding and 'viewoptions' contains
@@ -1468,7 +1469,7 @@ Note that Views and Sessions are not perfect:
The combination of ":mkview" and ":loadview" can be used to store up to ten
different views of a file. These are remembered in the directory specified
with the 'viewdir' option. The views are stored using the file name. If a
-file is renamed or accessed through a (symbolic) link the view will not be
+file is renamed or accessed through a (symbolic) link, the view will not be
found.
You might want to clean up your 'viewdir' directory now and then.
@@ -1541,12 +1542,13 @@ always kept. This is used for:
- The search string history.
- The input-line history.
- Contents of non-empty registers.
-- The jump list
-- File marks
+- The jump list.
+- File marks.
+
The timestamp feature was added before Vim 8.0. Older versions of Vim,
starting with 7.4.1131, will keep the items with timestamp, but not use them.
-Thus when using both an older and a newer version of Vim the most recent data
-will be kept.
+Thus, when using both an older and a newer version of Vim, the most recent
+data will be kept.
Notes for Unix:
- The file protection for the viminfo file will be set to prevent other users
@@ -1558,7 +1560,7 @@ Notes for Unix:
allow just anybody to read and write your viminfo file!
- Vim will not overwrite a viminfo file that is not writable by the current
"real" user. This helps for when you did "su" to become root, but your
- $HOME is still set to a normal user's home directory. Otherwise Vim would
+ $HOME is still set to a normal user's home directory. Otherwise, Vim would
create a viminfo file owned by root that nobody else can read.
- The viminfo file cannot be a symbolic link. This is to avoid security
issues.
@@ -1590,11 +1592,11 @@ using this command: >
vim -c "normal '0"
-In a csh compatible shell you could make an alias for it: >
+In a C shell descendant, you could make an alias for it: >
alias lvim vim -c '"'normal "'"0'"'
-For a bash-like shell: >
+For a Bash-like shell: >
alias lvim='vim -c "normal '\''0"'
@@ -1639,14 +1641,14 @@ MANUALLY READING AND WRITING *viminfo-read-write*
Two commands can be used to read and write the viminfo file manually. This
can be used to exchange registers between two running Vim programs: First
type ":wv" in one and then ":rv" in the other. Note that if the register
-already contained something, then ":rv!" would be required. Also note
-however that this means everything will be overwritten with information from
+already contained something, then ":rv!" would be required. Also note,
+however, that this means everything will be overwritten with information from
the first Vim, including the command line history, etc.
The viminfo file itself can be edited by hand too, although we suggest you
start with an existing one to get the format right. It is reasonably
self-explanatory once you're in there. This can be useful in order to
-create a second file, say "~/.my_viminfo" which could contain certain
+create a second file, say "~/.my_viminfo", which could contain certain
settings that you always want when you first start Vim. For example, you
can preload registers with particular data, or put certain commands in the
command line history. A line in your .vimrc file like >
@@ -1670,7 +1672,7 @@ most of the information will be restored).
|viminfo-file-name| above).
If [!] is given, then any information that is
already set (registers, marks, |v:oldfiles|, etc.)
- will be overwritten
+ will be overwritten.
*:wv* *:wviminfo* *E137* *E138* *E574* *E886* *E929*
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see
@@ -1682,10 +1684,10 @@ most of the information will be restored).
the old information is not read first, only the
internal info is written. If 'viminfo' is empty, marks
for up to 100 files will be written.
- When you get error "E929: Too many viminfo temp files"
- check that no old temp files were left behind (e.g.
- ~/.viminf*) and that you can write in the directory of
- the .viminfo file.
+ When you get error "E929: Too many viminfo temp
+ files", check that no old temp files were left behind
+ (e.g. ~/.viminf*) and that you can write in the
+ directory of the .viminfo file.
*:ol* *:oldfiles*
:ol[dfiles] List the files that have marks stored in the viminfo
@@ -1703,7 +1705,7 @@ most of the information will be restored).
the list is edited.
If you get the |press-enter| prompt you can press "q"
and still get the prompt to enter a file number.
- Use ! to abandon a modified buffer. |abandon|
+ Use [!] to abandon a modified buffer. |abandon|
{not when compiled with tiny features}
vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 6715f65..de8a665 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 9.1. Last change: 2024 Jan 06
+*syntax.txt* For Vim version 9.1. Last change: 2024 Mar 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1026,6 +1026,8 @@ Variable Highlight ~
*c_no_c99* don't highlight C99 standard items
*c_no_c11* don't highlight C11 standard items
*c_no_bsd* don't highlight BSD specific types
+*c_functions* highlight function calls and definitions
+*c_function_pointers* highlight function pointers definitions
When 'foldmethod' is set to "syntax" then /* */ comments and { } blocks will
become a fold. If you don't want comments to become a fold use: >
@@ -1329,12 +1331,15 @@ Stack Overflow -
https://stackoverflow.com/questions/12407800/which-comment-style-should-i-use-in-batch-files
-To allow the use of the :: idiom for comments in the Windows Command
-Interpreter or working with MS-DOS bat files, set the
-dosbatch_colons_comment variable to anything: >
+To allow the use of the :: idiom for comments in command blocks with the
+Windows Command Interpreter set the dosbatch_colons_comment variable to
+anything: >
:let dosbatch_colons_comment = 1
+If this variable is set then a :: comment that is the last line in a command
+block will be highlighted as an error.
+
There is an option that covers whether *.btm files should be detected as type
"dosbatch" (MS-DOS batch files) or type "btm" (4DOS batch files). The latter
is used by default. You may select the former with the following line: >
@@ -1592,13 +1597,11 @@ edit F# or Fortran at all, use this in your startup vimrc: >
FORTRAN *fortran.vim* *ft-fortran-syntax*
Default highlighting and dialect ~
-Vim highlights according to Fortran 2023 (the most recent standard) by
-default. This choice should be appropriate for most users most of the time
-because Fortran 2023 is almost a superset of previous versions (Fortran 2018,
-2008, 2003, 95, 90, and 77). A small number of features new to Fortran 2018
-and Fortran 2023 may have been omitted at present; the transition to Fortran
-2023 will be completed in the near future. A few legacy constructs deleted or
-declared obsolescent in recent Fortran standards are highlighted as todo
+Vim highlights according to Fortran 2023 (the most recent standard). This
+choice should be appropriate for most users most of the time because Fortran
+2023 is almost a superset of previous versions (Fortran 2018, 2008, 2003, 95,
+90, 77, and 66). A few legacy constructs deleted or declared obsolescent,
+respectively, in recent Fortran standards are highlighted as errors and todo
items.
The syntax script no longer supports Fortran dialects. The variable
@@ -2233,10 +2236,19 @@ MARKDOWN *ft-markdown-syntax*
If you have long regions there might be wrong highlighting. At the cost of
slowing down displaying, you can have the engine look further back to sync on
-the start of a region, for example 500 lines: >
+the start of a region, for example 500 lines (default is 50): >
:let g:markdown_minlines = 500
+If you want to enable fenced code block syntax highlighting in your markdown
+documents you can enable like this: >
+
+ :let g:markdown_fenced_languages = ['html', 'python', 'bash=sh']
+
+To disable markdown syntax concealing add the following to your vimrc: >
+
+ :let g:markdown_syntax_conceal = 0
+
MATHEMATICA *mma.vim* *ft-mma-syntax* *ft-mathematica-syntax*
@@ -5265,7 +5277,8 @@ ctermul={color-nr} *highlight-ctermul*
"cterm=" argument AFTER the "ctermfg=" or "ctermbg=" argument. Or use
a number instead of a color name.
- The case of the color names is ignored.
+ The case of the color names is ignored, however Vim will use lower
+ case color names when reading from the |v:colornames| dictionary.
Note that for 16 color ansi style terminals (including xterms), the
numbers in the NR-8 column is used. Here '*' means 'add 8' so that
Blue is 12, DarkGray is 8 etc.
@@ -5304,6 +5317,14 @@ ctermul={color-nr} *highlight-ctermul*
command is given. If the Normal group colors are changed later, the
"fg" and "bg" colors will not be adjusted.
+ctermfont={font-nr} *highlight-ctermfont*
+ This gives the alternative font number to use in the terminal. The
+ available fonts depend on the terminal, and if the terminal is not set
+ up for alternative fonts this simply won't do anything. The range of
+ {font-nr} is 0-10 where 0 resets the font to the default font, 1-9
+ selects one of the 9 alternate fonts, and 10 selects the Fraktur font.
+ For more information see your terminal's handling of SGR parameters
+ 10-20. |t_CF|
3. highlight arguments for the GUI
@@ -5376,8 +5397,8 @@ guisp={color-name} *highlight-guisp*
:highlight Comment guifg=#11f0c3 guibg=#ff00ff
<
If you are authoring a color scheme and use the same hexadecimal value
- repeatedly, you can define a name for it in |v:colornames|. For
- example: >
+ repeatedly, you can define a (lower case) name for it in |v:colornames|.
+ For example: >
# provide a default value for this color but allow the user to
# override it.
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 1b55fa1..8dd4db2 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -1024,6 +1024,7 @@ $quote eval.txt /*$quote*
't_AU' term.txt /*'t_AU'*
't_BD' term.txt /*'t_BD'*
't_BE' term.txt /*'t_BE'*
+'t_CF' term.txt /*'t_CF'*
't_CS' term.txt /*'t_CS'*
't_CV' term.txt /*'t_CV'*
't_Ce' term.txt /*'t_Ce'*
@@ -1293,6 +1294,7 @@ $quote eval.txt /*$quote*
'winaltkeys' options.txt /*'winaltkeys'*
'wincolor' options.txt /*'wincolor'*
'window' options.txt /*'window'*
+'winfixbuf' options.txt /*'winfixbuf'*
'winfixheight' options.txt /*'winfixheight'*
'winfixwidth' options.txt /*'winfixwidth'*
'winheight' options.txt /*'winheight'*
@@ -2872,6 +2874,7 @@ $quote eval.txt /*$quote*
:map-arguments map.txt /*:map-arguments*
:map-buffer map.txt /*:map-buffer*
:map-cmd map.txt /*:map-cmd*
+:map-cmd-key map.txt /*:map-cmd-key*
:map-commands map.txt /*:map-commands*
:map-expression map.txt /*:map-expression*
:map-local map.txt /*:map-local*
@@ -2884,6 +2887,7 @@ $quote eval.txt /*$quote*
:map-special map.txt /*:map-special*
:map-special-chars map.txt /*:map-special-chars*
:map-special-keys map.txt /*:map-special-keys*
+:map-super-keys map.txt /*:map-super-keys*
:map-undo map.txt /*:map-undo*
:map-unique map.txt /*:map-unique*
:map-verbose map.txt /*:map-verbose*
@@ -4134,6 +4138,7 @@ E1056 vim9.txt /*E1056*
E1057 vim9.txt /*E1057*
E1058 vim9.txt /*E1058*
E1059 vim9.txt /*E1059*
+E106 builtin.txt /*E106*
E1060 vim9.txt /*E1060*
E1061 vim9.txt /*E1061*
E1062 eval.txt /*E1062*
@@ -4513,6 +4518,8 @@ E1409 vim9class.txt /*E1409*
E141 message.txt /*E141*
E1410 vim9class.txt /*E1410*
E1411 vim9class.txt /*E1411*
+E1412 vim9class.txt /*E1412*
+E1413 vim9class.txt /*E1413*
E142 message.txt /*E142*
E143 autocmd.txt /*E143*
E144 various.txt /*E144*
@@ -4535,6 +4542,9 @@ E1508 editing.txt /*E1508*
E1509 editing.txt /*E1509*
E151 helphelp.txt /*E151*
E1510 change.txt /*E1510*
+E1511 options.txt /*E1511*
+E1512 options.txt /*E1512*
+E1513 message.txt /*E1513*
E152 helphelp.txt /*E152*
E153 helphelp.txt /*E153*
E154 helphelp.txt /*E154*
@@ -5706,6 +5716,7 @@ TabNew autocmd.txt /*TabNew*
Tcl if_tcl.txt /*Tcl*
TermChanged autocmd.txt /*TermChanged*
TermResponse autocmd.txt /*TermResponse*
+TermResponseAll autocmd.txt /*TermResponseAll*
TermdebugStartPost terminal.txt /*TermdebugStartPost*
TermdebugStartPre terminal.txt /*TermdebugStartPre*
TermdebugStopPost terminal.txt /*TermdebugStopPost*
@@ -5779,6 +5790,7 @@ WinClosed autocmd.txt /*WinClosed*
WinEnter autocmd.txt /*WinEnter*
WinLeave autocmd.txt /*WinLeave*
WinNew autocmd.txt /*WinNew*
+WinNewPre autocmd.txt /*WinNewPre*
WinResized autocmd.txt /*WinResized*
WinResized-event windows.txt /*WinResized-event*
WinScrolled autocmd.txt /*WinScrolled*
@@ -5964,6 +5976,7 @@ added-7.4 version7.txt /*added-7.4*
added-8.1 version8.txt /*added-8.1*
added-8.2 version8.txt /*added-8.2*
added-9.1 version9.txt /*added-9.1*
+added-9.2 version9.txt /*added-9.2*
added-BeOS version5.txt /*added-BeOS*
added-Mac version5.txt /*added-Mac*
added-VMS version5.txt /*added-VMS*
@@ -6116,6 +6129,7 @@ binary-number eval.txt /*binary-number*
bitwise-function usr_41.txt /*bitwise-function*
bitwise-shift eval.txt /*bitwise-shift*
blob eval.txt /*blob*
+blob-concatenation eval.txt /*blob-concatenation*
blob-functions usr_41.txt /*blob-functions*
blob-identity eval.txt /*blob-identity*
blob-index eval.txt /*blob-index*
@@ -6164,12 +6178,14 @@ bug-fixes-7 version7.txt /*bug-fixes-7*
bug-fixes-8 version8.txt /*bug-fixes-8*
bug-fixes-9 version9.txt /*bug-fixes-9*
bug-fixes-9.1 version9.txt /*bug-fixes-9.1*
+bug-fixes-9.2 version9.txt /*bug-fixes-9.2*
bug-reports intro.txt /*bug-reports*
bugreport.vim intro.txt /*bugreport.vim*
bugs intro.txt /*bugs*
builtin-function-details builtin.txt /*builtin-function-details*
builtin-function-list builtin.txt /*builtin-function-list*
builtin-functions builtin.txt /*builtin-functions*
+builtin-object-methods vim9class.txt /*builtin-object-methods*
builtin-terms term.txt /*builtin-terms*
builtin-tools gui.txt /*builtin-tools*
builtin.txt builtin.txt /*builtin.txt*
@@ -6278,6 +6294,8 @@ c_ansi_typedefs syntax.txt /*c_ansi_typedefs*
c_comment_strings syntax.txt /*c_comment_strings*
c_curly_error syntax.txt /*c_curly_error*
c_digraph cmdline.txt /*c_digraph*
+c_function_pointers syntax.txt /*c_function_pointers*
+c_functions syntax.txt /*c_functions*
c_gnu syntax.txt /*c_gnu*
c_no_ansi syntax.txt /*c_no_ansi*
c_no_bracket_error syntax.txt /*c_no_bracket_error*
@@ -6346,6 +6364,7 @@ changed-7.4 version7.txt /*changed-7.4*
changed-8.1 version8.txt /*changed-8.1*
changed-8.2 version8.txt /*changed-8.2*
changed-9.1 version9.txt /*changed-9.1*
+changed-9.2 version9.txt /*changed-9.2*
changelist motion.txt /*changelist*
changelog.vim syntax.txt /*changelog.vim*
changenr() builtin.txt /*changenr()*
@@ -6428,6 +6447,7 @@ cino-{ indent.txt /*cino-{*
cino-} indent.txt /*cino-}*
cinoptions-values indent.txt /*cinoptions-values*
class vim9class.txt /*class*
+class-compile vim9class.txt /*class-compile*
class-method vim9class.txt /*class-method*
clear-undo undo.txt /*clear-undo*
clearmatches() builtin.txt /*clearmatches()*
@@ -6483,6 +6503,7 @@ compile-changes-6 version6.txt /*compile-changes-6*
compile-changes-7 version7.txt /*compile-changes-7*
compile-changes-8 version8.txt /*compile-changes-8*
compile-changes-9 version9.txt /*compile-changes-9*
+compile-changes-9.2 version9.txt /*compile-changes-9.2*
compiler-compaqada ft_ada.txt /*compiler-compaqada*
compiler-decada ft_ada.txt /*compiler-decada*
compiler-dotnet quickfix.txt /*compiler-dotnet*
@@ -6749,7 +6770,9 @@ dict-identity eval.txt /*dict-identity*
dict-modification eval.txt /*dict-modification*
did_filetype() builtin.txt /*did_filetype()*
diff diff.txt /*diff*
+diff() builtin.txt /*diff()*
diff-diffexpr diff.txt /*diff-diffexpr*
+diff-func-examples diff.txt /*diff-func-examples*
diff-mode diff.txt /*diff-mode*
diff-options diff.txt /*diff-options*
diff-original-file diff.txt /*diff-original-file*
@@ -7147,6 +7170,7 @@ foldtextresult() builtin.txt /*foldtextresult()*
font-sizes gui_x11.txt /*font-sizes*
fontset mbyte.txt /*fontset*
forced-motion motion.txt /*forced-motion*
+foreach() builtin.txt /*foreach()*
foreground() builtin.txt /*foreground()*
fork os_unix.txt /*fork*
form.vim syntax.txt /*form.vim*
@@ -7176,6 +7200,7 @@ ft-ada-syntax ft_ada.txt /*ft-ada-syntax*
ft-ada-variables ft_ada.txt /*ft-ada-variables*
ft-ant-syntax syntax.txt /*ft-ant-syntax*
ft-apache-syntax syntax.txt /*ft-apache-syntax*
+ft-asciidoc-plugin filetype.txt /*ft-asciidoc-plugin*
ft-asm-syntax syntax.txt /*ft-asm-syntax*
ft-asm68k-syntax syntax.txt /*ft-asm68k-syntax*
ft-asmh8300-syntax syntax.txt /*ft-asmh8300-syntax*
@@ -7344,6 +7369,7 @@ ft-xhtml-omni insert.txt /*ft-xhtml-omni*
ft-xml-omni insert.txt /*ft-xml-omni*
ft-xml-syntax syntax.txt /*ft-xml-syntax*
ft-xpm-syntax syntax.txt /*ft-xpm-syntax*
+ft-yaml-indent indent.txt /*ft-yaml-indent*
ft-yaml-syntax syntax.txt /*ft-yaml-syntax*
ft-zimbu-plugin filetype.txt /*ft-zimbu-plugin*
ft-zsh-syntax syntax.txt /*ft-zsh-syntax*
@@ -7535,7 +7561,6 @@ g:netrw_localmkdir pi_netrw.txt /*g:netrw_localmkdir*
g:netrw_localmkdiropt pi_netrw.txt /*g:netrw_localmkdiropt*
g:netrw_localmovecmd pi_netrw.txt /*g:netrw_localmovecmd*
g:netrw_localmovecmdopt pi_netrw.txt /*g:netrw_localmovecmdopt*
-g:netrw_localrmdir pi_netrw.txt /*g:netrw_localrmdir*
g:netrw_maxfilenamelen pi_netrw.txt /*g:netrw_maxfilenamelen*
g:netrw_menu pi_netrw.txt /*g:netrw_menu*
g:netrw_mkdir_cmd pi_netrw.txt /*g:netrw_mkdir_cmd*
@@ -7741,6 +7766,8 @@ getqflist() builtin.txt /*getqflist()*
getqflist-examples quickfix.txt /*getqflist-examples*
getreg() builtin.txt /*getreg()*
getreginfo() builtin.txt /*getreginfo()*
+getregion() builtin.txt /*getregion()*
+getregion-notes builtin.txt /*getregion-notes*
getregtype() builtin.txt /*getregtype()*
getscript pi_getscript.txt /*getscript*
getscript-autoinstall pi_getscript.txt /*getscript-autoinstall*
@@ -7859,6 +7886,7 @@ gui-w32-start gui_w32.txt /*gui-w32-start*
gui-w32-various gui_w32.txt /*gui-w32-various*
gui-w32-windowid gui_w32.txt /*gui-w32-windowid*
gui-w32s os_win32.txt /*gui-w32s*
+gui-wayland gui_x11.txt /*gui-wayland*
gui-win32-maximized gui_w32.txt /*gui-win32-maximized*
gui-x11 gui_x11.txt /*gui-x11*
gui-x11-athena gui_x11.txt /*gui-x11-athena*
@@ -7945,6 +7973,7 @@ highlight-clear syntax.txt /*highlight-clear*
highlight-cterm syntax.txt /*highlight-cterm*
highlight-ctermbg syntax.txt /*highlight-ctermbg*
highlight-ctermfg syntax.txt /*highlight-ctermfg*
+highlight-ctermfont syntax.txt /*highlight-ctermfont*
highlight-ctermul syntax.txt /*highlight-ctermul*
highlight-default syntax.txt /*highlight-default*
highlight-font syntax.txt /*highlight-font*
@@ -8228,6 +8257,7 @@ improvements-6 version6.txt /*improvements-6*
improvements-7 version7.txt /*improvements-7*
improvements-8 version8.txt /*improvements-8*
improvements-9 version9.txt /*improvements-9*
+improvements-9.2 version9.txt /*improvements-9.2*
in_bot channel.txt /*in_bot*
in_buf channel.txt /*in_buf*
in_io-buffer channel.txt /*in_io-buffer*
@@ -8244,6 +8274,7 @@ incompatible-6 version6.txt /*incompatible-6*
incompatible-7 version7.txt /*incompatible-7*
incompatible-8 version8.txt /*incompatible-8*
incompatible-9 version9.txt /*incompatible-9*
+incompatible-9.2 version9.txt /*incompatible-9.2*
indent() builtin.txt /*indent()*
indent-expression indent.txt /*indent-expression*
indent.txt indent.txt /*indent.txt*
@@ -8591,6 +8622,7 @@ masm.vim syntax.txt /*masm.vim*
match() builtin.txt /*match()*
match-highlight pattern.txt /*match-highlight*
match-parens tips.txt /*match-parens*
+match-pattern builtin.txt /*match-pattern*
matchadd() builtin.txt /*matchadd()*
matchaddpos() builtin.txt /*matchaddpos()*
matcharg() builtin.txt /*matcharg()*
@@ -9042,6 +9074,7 @@ new-options-5.2 version5.txt /*new-options-5.2*
new-options-5.4 version5.txt /*new-options-5.4*
new-other-8.2 version8.txt /*new-other-8.2*
new-other-9.1 version9.txt /*new-other-9.1*
+new-other-9.2 version9.txt /*new-other-9.2*
new-perl-python version5.txt /*new-perl-python*
new-persistent-undo version7.txt /*new-persistent-undo*
new-plugins version6.txt /*new-plugins*
@@ -9124,9 +9157,12 @@ o_object-select motion.txt /*o_object-select*
o_v motion.txt /*o_v*
object vim9class.txt /*object*
object-const-variable vim9class.txt /*object-const-variable*
+object-empty() vim9class.txt /*object-empty()*
object-final-variable vim9class.txt /*object-final-variable*
+object-len() vim9class.txt /*object-len()*
object-motions motion.txt /*object-motions*
object-select motion.txt /*object-select*
+object-string() vim9class.txt /*object-string()*
objects index.txt /*objects*
obtaining-exted netbeans.txt /*obtaining-exted*
ocaml.vim syntax.txt /*ocaml.vim*
@@ -9211,8 +9247,10 @@ patches-8.1 version8.txt /*patches-8.1*
patches-8.2 version8.txt /*patches-8.2*
patches-9 version9.txt /*patches-9*
patches-9.1 version9.txt /*patches-9.1*
+patches-9.2 version9.txt /*patches-9.2*
patches-after-8.2 version9.txt /*patches-after-8.2*
patches-after-9.0 version9.txt /*patches-after-9.0*
+patches-after-9.1 version9.txt /*patches-after-9.1*
pathshorten() builtin.txt /*pathshorten()*
pattern pattern.txt /*pattern*
pattern-atoms pattern.txt /*pattern-atoms*
@@ -10145,6 +10183,7 @@ t_AL term.txt /*t_AL*
t_AU term.txt /*t_AU*
t_BD term.txt /*t_BD*
t_BE term.txt /*t_BE*
+t_CF term.txt /*t_CF*
t_CS term.txt /*t_CS*
t_CTRL-W_. terminal.txt /*t_CTRL-W_.*
t_CTRL-W_: terminal.txt /*t_CTRL-W_:*
@@ -10503,6 +10542,7 @@ termdebug_winbar terminal.txt /*termdebug_winbar*
terminal terminal.txt /*terminal*
terminal-api terminal.txt /*terminal-api*
terminal-autoshelldir terminal.txt /*terminal-autoshelldir*
+terminal-bufname terminal.txt /*terminal-bufname*
terminal-client-server terminal.txt /*terminal-client-server*
terminal-close terminal.txt /*terminal-close*
terminal-colors os_unix.txt /*terminal-colors*
@@ -10999,6 +11039,7 @@ version-8.1 version8.txt /*version-8.1*
version-8.2 version8.txt /*version-8.2*
version-9.0 version9.txt /*version-9.0*
version-9.1 version9.txt /*version-9.1*
+version-9.2 version9.txt /*version-9.2*
version-variable eval.txt /*version-variable*
version4.txt version4.txt /*version4.txt*
version5.txt version5.txt /*version5.txt*
@@ -11015,6 +11056,7 @@ version8.2 version8.txt /*version8.2*
version8.txt version8.txt /*version8.txt*
version9.0 version9.txt /*version9.0*
version9.1 version9.txt /*version9.1*
+version9.2 version9.txt /*version9.2*
version9.txt version9.txt /*version9.txt*
versionlong-variable eval.txt /*versionlong-variable*
vi intro.txt /*vi*
@@ -11034,6 +11076,7 @@ vim-8.2 version8.txt /*vim-8.2*
vim-9 version9.txt /*vim-9*
vim-9.0 version9.txt /*vim-9.0*
vim-9.1 version9.txt /*vim-9.1*
+vim-9.2 version9.txt /*vim-9.2*
vim-additions vi_diff.txt /*vim-additions*
vim-announce intro.txt /*vim-announce*
vim-arguments starting.txt /*vim-arguments*
@@ -11180,6 +11223,7 @@ vt100-cursor-keys term.txt /*vt100-cursor-keys*
vt100-function-keys term.txt /*vt100-function-keys*
w motion.txt /*w*
w32-clientserver remote.txt /*w32-clientserver*
+w32-experimental-keycode-trans-strategy gui_w32.txt /*w32-experimental-keycode-trans-strategy*
w32-xpm-support gui_w32.txt /*w32-xpm-support*
w: eval.txt /*w:*
w:current_syntax syntax.txt /*w:current_syntax*
diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt
index aa7b9dd..d3d549a 100644
--- a/runtime/doc/tagsrch.txt
+++ b/runtime/doc/tagsrch.txt
@@ -1,4 +1,4 @@
-*tagsrch.txt* For Vim version 9.1. Last change: 2023 Feb 13
+*tagsrch.txt* For Vim version 9.1. Last change: 2024 Mar 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -407,19 +407,24 @@ the pattern.
*tag-!*
If the tag is in the current file this will always work. Otherwise the
performed actions depend on whether the current file was changed, whether a !
-is added to the command and on the 'autowrite' option:
-
- tag in file autowrite ~
-current file changed ! option action ~
------------------------------------------------------------------------------
- yes x x x goto tag
- no no x x read other file, goto tag
- no yes yes x abandon current file, read other file, goto
- tag
- no yes no on write current file, read other file, goto
- tag
- no yes no off fail
------------------------------------------------------------------------------
+is added to the command and on the 'autowrite' and 'winfixbuf' options:
+
+ tag in file winfixbuf autowrite ~
+current file changed ! option option action ~
+ -----------------------------------------------------------------------------
+ yes x x off x goto tag
+ no no x off x read other file, goto tag
+ no yes yes off x abandon current file,
+ read other file, goto tag
+ no yes no off on write current file,
+ read other file, goto tag
+ no yes no off off fail
+ yes x yes x x goto tag
+ no no no on x fail
+ no yes no on x fail
+ no yes no on on fail
+ no yes no on off fail
+ -----------------------------------------------------------------------------
- If the tag is in the current file, the command will always work.
- If the tag is in another file and the current file was not changed, the
@@ -435,6 +440,8 @@ current file changed ! option action ~
the changes, use the ":w" command and then use ":tag" without an argument.
This works because the tag is put on the stack anyway. If you want to lose
the changes you can use the ":tag!" command.
+- If the tag is in another file and the window includes 'winfixbuf', the
+ command will fail. If the tag is in the same file then it may succeed.
*tag-security*
Note that Vim forbids some commands, for security reasons. This works like
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index 546b0bf..d958229 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -1,4 +1,4 @@
-*term.txt* For Vim version 9.1. Last change: 2023 Dec 09
+*term.txt* For Vim version 9.1. Last change: 2024 Feb 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -345,7 +345,7 @@ versions (and will then also end up in terminfo/termcap).
*xterm-kitty* *kitty-terminal*
The Kitty terminal is a special case. Mainly because it works differently
-from most other terminals, but also because, instead of trying the fit in and
+from most other terminals, but also because, instead of trying to fit in and
make it behave like other terminals by default, it dictates how applications
need to work when using Kitty. This makes it very difficult for Vim to work
in a Kitty terminal. Some exceptions have been hard coded, but it is not at
@@ -448,6 +448,7 @@ Added by Vim (there are no standard codes for these):
t_AU set underline color (ANSI) *t_AU* *'t_AU'*
t_Ce undercurl and underline end *t_Ce* *'t_Ce'*
t_Cs undercurl (curly underline) mode *t_Cs* *'t_Cs'*
+ t_CF set alternate font (using index 0 - 10) *t_CF* *'t_CF'*
t_Us double underline mode *t_Us* *'t_Us'*
t_ds dotted underline mode *t_ds* *'t_ds'*
t_Ds dashed underline mode *t_Ds* *'t_Ds'*
diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt
index c5331fa..c99b882 100644
--- a/runtime/doc/terminal.txt
+++ b/runtime/doc/terminal.txt
@@ -1,4 +1,4 @@
-*terminal.txt* For Vim version 9.1. Last change: 2023 Nov 08
+*terminal.txt* For Vim version 9.1. Last change: 2024 Mar 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -208,6 +208,7 @@ Command syntax ~
[command]. Use `:execute` if you must have a Vim
command following in the same line.
+ *terminal-bufname*
A new buffer will be created, using [command] or
'shell' as the name, prefixed with a "!". If a buffer
by this name already exists a number is added in
@@ -302,6 +303,12 @@ current window into a terminal window. If there are unsaved changes this
fails, use ! to force, as usual.
*terminal-close*
+When the terminal job finishes and no [command] was given (e.g. the 'shell'
+command was executed), the terminal window will be closed by default (unless
+the buffer in next window receiving the space has the 'nobuflisted' option set,
+in which case the terminal window would not be closed automatically, but a new
+empty buffer would be opened in that window).
+
When the terminal window is closed, e.g. when the shell exits and "++close"
argument was used, and this is the last normal Vim window, then Vim will exit.
This is like using |:quit| in a normal window. Help and preview windows are
@@ -1024,17 +1031,17 @@ This can be used to pass the current directory from a shell to Vim.
Put this in your .vimrc: >
def g:Tapi_lcd(_, path: string)
if isdirectory(path)
- execute 'silent lcd ' .. fnameescape(path)
- endif
+ execute 'silent lcd ' .. fnameescape(path)
+ endif
enddef
<
And, in a bash init file: >
- if [[ -n "$VIM_TERMINAL" ]]; then
- PROMPT_COMMAND='_vim_sync_PWD'
- function _vim_sync_PWD() {
- printf '\033]51;["call", "Tapi_lcd", "%q"]\007' "$PWD"
- }
- fi
+ if [[ -n "$VIM_TERMINAL" ]]; then
+ PROMPT_COMMAND='_vim_sync_PWD'
+ function _vim_sync_PWD() {
+ printf '\033]51;["call", "Tapi_lcd", "%q"]\007' "$PWD"
+ }
+ fi
<
Or, for zsh: >
if [[ -n "$VIM_TERMINAL" ]]; then
@@ -1402,8 +1409,8 @@ Other commands ~
*:Asm* jump to the window with the disassembly, create it if there
isn't one
*:Var* jump to the window with the local and argument variables,
- create it if there isn't one. This window updates whenever the
- program is stopped
+ create it if there isn't one. This window updates whenever the
+ program is stopped
Events ~
*termdebug-events*
diff --git a/runtime/doc/testing.txt b/runtime/doc/testing.txt
index dabdd32..356d74e 100644
--- a/runtime/doc/testing.txt
+++ b/runtime/doc/testing.txt
@@ -1,4 +1,4 @@
-*testing.txt* For Vim version 9.1. Last change: 2023 May 18
+*testing.txt* For Vim version 9.1. Last change: 2024 Feb 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -234,6 +234,8 @@ test_mswin_event({event}, {args}) *test_mswin_event()*
{event} is a String and the supported values are:
"mouse" mouse event.
"key" keyboard event.
+ "set_keycode_trans_strategy"
+ Change the key translation method.
"mouse":
Inject either a mouse button click, or a mouse move, event.
@@ -290,6 +292,15 @@ test_mswin_event({event}, {args}) *test_mswin_event()*
unprocessed key events. All other {args}
items are optional when this is set and true.
+ "set_keycode_trans_strategy":
+ |w32-experimental-keycode-trans-strategy|
+ Switch the keycode translation method. The supported methods
+ are:
+ experimental: The method used after Patch v8.2.4807
+ using ToUnicode() Win API call.
+ classic: The method used pre Patch v8.2.4807
+ using the TranslateMessage() Win API call.
+
Returns TRUE if the event is successfully added or executed,
FALSE if there is a failure.
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 9847ff7..2b4a70a 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 9.1. Last change: 2023 Dec 14
+*todo.txt* For Vim version 9.1. Last change: 2024 Mar 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -130,11 +130,8 @@ Further Vim9 improvements:
Issue #11822: any.Func() can be a dict or an object call, need to handle
this at runtime. Also see #12198 for an example.
Possibly issue #11981 can be fixed at the same time (has two examples).
- - Make ":defcompile ClassName" compile all functions and methods in the
- class.
- Forward declaration of a class? E.g. for Clone() function.
Email lifepillar 2023 Mar 26
- - object empty(), len() - can class define a method to be used for them?
- When "Meta" is a class, is "const MetaAlias = Meta" allowed? It should
either work or given an error. Possibly give an error now and implement it
later (using a typedef). #12006
@@ -958,9 +955,6 @@ When 'sidescrolloff' is set, using "zl" to go to the end of the line, suddenly
scrolls back. Should allow for this scrolling, like 'scrolloff' does when
using CTRL-E. (Yee Cheng Chin, #3721)
-Add function to make use of internal diff, working on two lists and returning
-unified diff (list of lines).
-
When splitting a window with few text lines, the relative cursor position is
kept, which means part of the text isn't displayed. Better show all the text
when possible. (Dylan Lloyd, #3973)
@@ -1123,9 +1117,6 @@ When t_Co is changed from termresponse, the OptionSet autocommand event isn't
triggered. Use the code from the end of set_num_option() in
set_color_count().
-Add another autocommand like TermResponse that is fired for the other terminal
-responses, such as bg and fg. Use "bg", "fg", "blink", etc. for the name.
-
When using command line window, CmdlineLeave is triggered without
CmdlineEnter. (xtal8, 2017 Oct 30, #2263)
Add some way to get the nested state. Although CmdwinEnter is obviously
@@ -4672,7 +4663,6 @@ GUI:
Autocommands:
-9 Add WinNewPre - before creating a new window. #10635
9 When triggering WinNew provide the window ID somehow. #10633
9 Rework the code from FEAT_OSFILETYPE for autocmd-osfiletypes to use
'filetype'. Only for when the current buffer is known.
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 2286d48..04a9afb 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1,4 +1,4 @@
-*usr_41.txt* For Vim version 9.1. Last change: 2023 May 06
+*usr_41.txt* For Vim version 9.1. Last change: 2024 Feb 25
VIM USER MANUAL - by Bram Moolenaar
@@ -69,7 +69,7 @@ The output of the example code is:
In the first line the `vim9script` command makes clear this is a new, |Vim9|
script file. That matters for how the rest of the file is used. It is
-recommended to put it in the very fist line, before any comments.
+recommended to put it in the very first line, before any comments.
*vim9-declarations*
The `var i = 1` command declares the "i" variable and initializes it. The
generic form is: >
@@ -798,6 +798,7 @@ List manipulation: *list-functions*
filter() remove selected items from a List
map() change each List item
mapnew() make a new List with changed items
+ foreach() apply function to List items
reduce() reduce a List to a value
slice() take a slice of a List
sort() sort a List
@@ -829,6 +830,7 @@ Dictionary manipulation: *dict-functions*
filter() remove selected entries from a Dictionary
map() change each Dictionary entry
mapnew() make a new Dictionary with changed items
+ foreach() apply function to Dictionary items
keys() get List of Dictionary keys
values() get List of Dictionary values
items() get List of Dictionary key-value pairs
@@ -927,6 +929,7 @@ Cursor and mark position: *cursor-functions* *mark-functions*
Working with text in the current buffer: *text-functions*
getline() get a line or list of lines from the buffer
+ getregion() get a region of text from the buffer
setline() replace a line in the buffer
append() append line or list of lines in the buffer
indent() indent of a specific line
@@ -1366,6 +1369,7 @@ Various: *various-functions*
changenr() return number of most recent change
cscope_connection() check if a cscope connection exists
did_filetype() check if a FileType autocommand was used
+ diff() diff two Lists of strings
eventhandler() check if invoked by an event handler
getpid() get process ID of Vim
getscriptinfo() get list of sourced vim scripts
diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt
index 697fd79..bf16d49 100644
--- a/runtime/doc/version9.txt
+++ b/runtime/doc/version9.txt
@@ -1,4 +1,4 @@
-*version9.txt* For Vim version 9.1. Last change: 2024 Jan 05
+*version9.txt* For Vim version 9.1. Last change: 2024 Mar 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41535,4 +41535,88 @@ Patch 9.0.2190
Problem: proto files need update
Solution: re-generate them
+==============================================================================
+VERSION 9.2 *version-9.2* *version9.2* *vim-9.2*
+
+This section is about improvements made between version 9.1 and 9.2
+and is a work in progress.
+
+Support for Wayland UI.
+
+Vim9 script
+-----------
+Add support for internal builtin functions with vim9 objects, see
+|builtin-object-methods|
+
+Other improvements *new-other-9.2*
+------------------
+
+Changed *changed-9.2*
+-------
+
+Added *added-9.2*
+-----
+
+Various syntax, indent and other plugins were added.
+
+Functions: ~
+
+|diff()| diff two Lists of strings
+|foreach()| apply function to List items
+|matchbufline()| all the matches of a pattern in a buffer
+|matchstrlist()| all the matches of a pattern in a List of strings
+|getregion()| get a region of text from a buffer
+
+
+Autocommands: ~
+
+|TermResponseAll| after the terminal response to |t_RV| and others is
+ received
+|WinNewPre| before creating a new window
+
+
+Commands: ~
+
+
+Options: ~
+
+'winfixbuf' Keep buffer focused in a window
+
+==============================================================================
+INCOMPATIBLE CHANGES *incompatible-9.2*
+
+Improved/Different MS-Windows mapping support
+|w32-experimental-keycode-trans-strategy|
+
+==============================================================================
+IMPROVEMENTS *improvements-9.2*
+
+Support for command-line completion of 'keymap' option values.
+
+Support for compiling all the methods in a Vim9 class using |:defcompile|.
+
+Support for alternate font highlighting using |t_CF| terminal code.
+
+Support for Super key mappings in GTK using <D-Key>.
+
+Improved visual highlighting.
+
+Python3 support in OpenVMS.
+
+==============================================================================
+COMPILE TIME CHANGES *compile-changes-9.2*
+
+Support for building with Ruby 3.3.
+
+Support for building Vim 9 in z/OS (MVS).
+
+==============================================================================
+PATCHES *patches-9.2* *bug-fixes-9.2*
+ *patches-after-9.1*
+
+The list of patches that got included since 9.1.0. This includes all the new
+features, but does not include runtime file changes (syntax, indent, ftplugin,
+documentation, etc.)
+
+
vim:tw=78:ts=8:noet:ft=help:norl:fdm=manual:
diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt
index b12b1cc..7dd2ab0 100644
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -1,4 +1,4 @@
-*vim9.txt* For Vim version 9.1. Last change: 2023 Dec 24
+*vim9.txt* For Vim version 9.1. Last change: 2024 Jan 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1260,10 +1260,12 @@ Script-local variables in a |Vim9| script must be declared at the script
level. They cannot be created in a function, also not in a legacy function.
*:defc* *:defcompile*
-:defc[ompile] Compile functions defined in the current script that
- were not compiled yet.
- This will report any errors found during compilation.
- This excludes functions defined inside a class.
+:defc[ompile] Compile functions and classes (|class-compile|)
+ defined in the current script that were not compiled
+ yet. This will report any errors found during
+ compilation.
+
+:defc[ompile] MyClass Compile all methods in a class. |class-compile|
:defc[ompile] {func}
:defc[ompile] debug {func}
@@ -1718,8 +1720,8 @@ an example for each category: >
Vim does not have a familiar null value; it has various null_<type> predefined
values, for example |null_string|, |null_list|, |null_job|. Primitives do not
have a null_<type>. The typical use cases for null_<type> are:
-- to `clear a variable` and release its resources;
-- as a `default for a parameter` in a function definition, see |null-compare|.
+- to clear a variable and release its resources;
+- as a default for a parameter in a function definition, see |null-compare|.
For a specialized variable, like `job`, null_<type> is used to clear the
resources. For a container variable, resources can also be cleared by
@@ -1771,7 +1773,7 @@ an empty container, do not use null_<type> in a comparison: >
F(null_list) # output: "null"
F([]) # output: "not null, empty"
F(['']) # output: "not null, not empty"
-The above function takes a `list of strings` and reports on it.
+The above function takes a list of strings and reports on it.
Change the above function signature to accept different types of arguments: >
def F(arg: list<any> = null_list) # any type of list
def F(arg: any = null) # any type
@@ -1789,18 +1791,18 @@ with vim9 null semantics, the programmer may chose to use null_<type> in
comparisons and/or other situations.
Elsewhere in the documentation it says:
- Quite often a null value is handled the same as an
- empty value, but not always
+ Quite often a null value is handled the same as an empty value, but
+ not always
Here's an example: >
vim9script
var s1: list<string>
var s2: list<string> = null_list
echo s1 # output: "[]"
echo s2 # output: "[]"
-
+
echo s1 + ['a'] # output: "['a']"
echo s2 + ['a'] # output: "['a']"
-
+
echo s1->add('a') # output: "['a']"
echo s2->add('a') # E1130: Can not add to null list
<
@@ -2022,7 +2024,7 @@ Note that this does not work for variables, only for functions.
*import-legacy* *legacy-import*
`:import` can also be used in legacy Vim script. The imported namespace still
becomes script-local, even when the "s:" prefix is not given. For example: >
- import "myfile.vim"
+ import "myfile.vim"
call s:myfile.MyFunc()
And using the "as name" form: >
diff --git a/runtime/doc/vim9class.txt b/runtime/doc/vim9class.txt
index 6e94e84..a00a5b7 100644
--- a/runtime/doc/vim9class.txt
+++ b/runtime/doc/vim9class.txt
@@ -1,4 +1,4 @@
-*vim9class.txt* For Vim version 9.1. Last change: 2024 Jan 06
+*vim9class.txt* For Vim version 9.1. Last change: 2024 Mar 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -710,6 +710,32 @@ The initialization isn't needed, the list is empty by default.
*E1330*
Some types cannot be used, such as "void", "null" and "v:none".
+Builtin Object Methods ~
+ *builtin-object-methods*
+Some of the builtin functions like |empty()|, |len()| and |string()| can be
+used with an object. An object can implement a method with the same name as
+these builtin functions to return an object-specific value.
+
+ *E1412*
+The following builtin methods are supported:
+ *object-empty()*
+ empty() Invoked by the |empty()| function to check whether an object is
+ empty. If this method is missing, then true is returned. This
+ method should not accept any arguments and must return a boolean.
+ *object-len()*
+ len() Invoked by the |len()| function to return the length of an
+ object. If this method is missing in the class, then an error is
+ given and zero is returned. This method should not accept any
+ arguments and must return a number.
+ *object-string()*
+ string() Invoked by the |string()| function to get a textual
+ representation of an object. Also used by the |:echo| command
+ for an object. If this method is missing in the class, then a
+ built-in default textual representation is used. This method
+ should not accept any arguments and must return a string.
+
+ *E1413*
+A class method cannot be used as a builtin method.
Defining an interface ~
*Interface* *:interface* *:endinterface*
@@ -830,7 +856,14 @@ Note that the method name must start with "new". If there is no method called
"new()" then the default constructor is added, even though there are other
constructor methods.
+Compiling methods in a Class ~
+ *class-compile*
+The |:defcompile| command can be used to compile all the class and object
+methods defined in a class: >
+ defcompile MyClass # Compile class "MyClass"
+ defcompile # Compile the classes in the current script
+<
==============================================================================
7. Type definition *typealias* *Vim9-type* *:type*
diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt
index 8064748..e264e51 100644
--- a/runtime/doc/windows.txt
+++ b/runtime/doc/windows.txt
@@ -1,4 +1,4 @@
-*windows.txt* For Vim version 9.1. Last change: 2022 Nov 27
+*windows.txt* For Vim version 9.1. Last change: 2024 Feb 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -519,35 +519,33 @@ horizontally split windows. CTRL-W H does it the other way around.
*CTRL-W_K*
CTRL-W K Move the current window to be at the very top, using the full
- width of the screen. This works like closing the current
- window and then creating another one with ":topleft split",
- except that the current window contents is used for the new
- window.
+ width of the screen. This works like `:topleft split`, except
+ it is applied to the current window and no new window is
+ created.
*CTRL-W_J*
CTRL-W J Move the current window to be at the very bottom, using the
- full width of the screen. This works like closing the current
- window and then creating another one with ":botright split",
- except that the current window contents is used for the new
- window.
+ full width of the screen. This works like `:botright split`,
+ except it is applied to the current window and no new window
+ is created.
*CTRL-W_H*
CTRL-W H Move the current window to be at the far left, using the
- full height of the screen. This works like closing the
- current window and then creating another one with
- `:vert topleft split`, except that the current window contents
- is used for the new window.
+ full height of the screen. This works like
+ `:vert topleft split`, except it is applied to the current
+ window and no new window is created.
*CTRL-W_L*
CTRL-W L Move the current window to be at the far right, using the full
- height of the screen. This works like closing the
- current window and then creating another one with
- `:vert botright split`, except that the current window
- contents is used for the new window.
+ height of the screen. This works like `:vert botright split`,
+ except it is applied to the current window and no new window
+ is created.
*CTRL-W_T*
CTRL-W T Move the current window to a new tab page. This fails if
there is only one window in the current tab page.
+ This works like `:tab split`, except the previous window is
+ closed.
When a count is specified the new tab page will be opened
before the tab page with this index. Otherwise it comes after
the current tab page.
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 0c2869a..d53671a 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -317,6 +317,9 @@ au BufRead,BufNewFile *.chai setf chaiscript
" Chatito
au BufNewFile,BufRead *.chatito setf chatito
+" Chuck
+au BufNewFile,BufRead *.ck setf chuck
+
" Comshare Dimension Definition Language
au BufNewFile,BufRead *.cdl setf cdl
@@ -531,6 +534,9 @@ au BufNewFile,BufRead *.csp,*.fdr setf csp
au BufNewFile,BufRead *.pld setf cupl
au BufNewFile,BufRead *.si setf cuplsim
+" Dafny
+au BufNewFile,BufRead *.dfy setf dafny
+
" Dart
au BufRead,BufNewfile *.dart,*.drt setf dart
@@ -643,8 +649,8 @@ au BufNewFile,BufRead *.dsl
" DTD (Document Type Definition for XML)
au BufNewFile,BufRead *.dtd setf dtd
-" DTS/DSTI (device tree files)
-au BufNewFile,BufRead *.dts,*.dtsi setf dts
+" DTS/DSTI/DTSO (device tree files)
+au BufNewFile,BufRead *.dts,*.dtsi,*.dtso,*.its setf dts
" EDIF (*.edf,*.edif,*.edn,*.edo) or edn
au BufNewFile,BufRead *.ed\(f\|if\|o\) setf edif
@@ -856,7 +862,7 @@ au BufNewFile,BufRead *.gts setf typescript.glimmer
au BufNewFile,BufRead *.gjs setf javascript.glimmer
" Gnuplot scripts
-au BufNewFile,BufRead *.gpi,.gnuplot setf gnuplot
+au BufNewFile,BufRead *.gpi,*.gnuplot setf gnuplot
" Go (Google)
au BufNewFile,BufRead *.go setf go
@@ -1138,7 +1144,7 @@ au BufNewFile,BufRead *.kt,*.ktm,*.kts setf kotlin
au BufNewFile,BufRead *.ks setf kscript
" Kconfig
-au BufNewFile,BufRead Kconfig,Kconfig.debug setf kconfig
+au BufNewFile,BufRead Kconfig,Kconfig.debug,Config.in setf kconfig
" Lace (ISE)
au BufNewFile,BufRead *.ace,*.ACE setf lace
@@ -1241,6 +1247,9 @@ au BufNewFile,BufRead *.lua setf lua
" Luau
au BufNewFile,BufRead *.luau setf luau
+" Luau config
+au BufNewFile,BufRead .luaurc setf jsonc
+
" Luacheck
au BufNewFile,BufRead .luacheckrc setf lua
@@ -2002,7 +2011,7 @@ au BufNewFile,BufRead catalog setf catalog
" Gentoo ebuilds, Arch Linux PKGBUILDs and Alpine Linux APKBUILDs are actually
" bash scripts.
" NOTE: Patterns ending in a star are further down, these have lower priority.
-au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.ebuild,*.bash,*.eclass,PKGBUILD,APKBUILD call dist#ft#SetFileTypeSH("bash")
+au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.ebuild,*.bash,*.eclass,PKGBUILD,APKBUILD,*.bats call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1))
@@ -2391,6 +2400,9 @@ au BufRead,BufNewFile *.vdmpp,*.vpp setf vdmpp
au BufRead,BufNewFile *.vdmrt setf vdmrt
au BufRead,BufNewFile *.vdmsl,*.vdm setf vdmsl
+" Vento
+au BufNewFile,BufRead *.vto setf vento
+
" Vera
au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera
@@ -2774,7 +2786,7 @@ au! BufNewFile,BufRead *jarg*
au BufNewFile,BufRead *.properties_??_??_* call s:StarSetf('jproperties')
" Kconfig
-au BufNewFile,BufRead Kconfig.* call s:StarSetf('kconfig')
+au BufNewFile,BufRead Kconfig.*,Config.in.* call s:StarSetf('kconfig')
" Lilo: Linux loader
au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo')
diff --git a/runtime/ftplugin/aap.vim b/runtime/ftplugin/aap.vim
index df839c9..cd7e2a4 100644
--- a/runtime/ftplugin/aap.vim
+++ b/runtime/ftplugin/aap.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Aap recipe
" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2023 Aug 10
+" Last Change: 2024 Jan 14
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
@@ -28,6 +28,11 @@ setlocal commentstring=#\ %s
setlocal expandtab
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Aap Recipe Files (*.aap)\t*.aap\nAll Files (*.*)\t*.*\n"
+ let b:browsefilter = "Aap Recipe Files (*.aap)\t*.aap\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/abap.vim b/runtime/ftplugin/abap.vim
index 61db809..8b2040e 100644
--- a/runtime/ftplugin/abap.vim
+++ b/runtime/ftplugin/abap.vim
@@ -3,7 +3,8 @@
" Author: Steven Oliver <oliver.steven@gmail.com>
" Copyright: Copyright (c) 2013 Steven Oliver
" License: You may redistribute this under the same terms as Vim itself
-" Last Change: 2023 Aug 28 by Vim Project (undo_ftplugin)
+" Last Change: 2023 Aug 28 by Vim Project (undo_ftplugin)
+" 2024 Jan 14 by Vim Project (browsefilter)
" --------------------------------------------------------------------------
" Only do this when not done yet for this buffer
@@ -21,10 +22,14 @@ setlocal suffixesadd=.abap
let b:undo_ftplugin = "setl sts< sua< sw<"
" Windows allows you to filter the open file dialog
-if has("gui_win32") && !exists("b:browsefilter")
- let b:browsefilter = "ABAP Source Files (*.abap)\t*.abap\n" .
- \ "All Files (*.*)\t*.*\n"
- let b:undo_ftplugin .= " | unlet! b:browsefilter"
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
+ let b:browsefilter = "ABAP Source Files (*.abap)\t*.abap\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
+ let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
let &cpo = s:cpo_save
diff --git a/runtime/ftplugin/abaqus.vim b/runtime/ftplugin/abaqus.vim
index 5931cd9..c16e7b0 100644
--- a/runtime/ftplugin/abaqus.vim
+++ b/runtime/ftplugin/abaqus.vim
@@ -2,6 +2,7 @@
" Language: Abaqus finite element input file (www.abaqus.com)
" Maintainer: Carl Osterwisch <costerwi@gmail.com>
" Last Change: 2022 Oct 08
+" 2024 Jan 14 by Vim Project (browsefilter)
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif
@@ -49,8 +50,12 @@ endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Abaqus Input Files (*.inp *.inc)\t*.inp;*.inc\n" .
\ "Abaqus Results (*.dat)\t*.dat\n" .
- \ "Abaqus Messages (*.pre *.msg *.sta)\t*.pre;*.msg;*.sta\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "Abaqus Messages (*.pre, *.msg, *.sta)\t*.pre;*.msg;*.sta\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin .= "|unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/ant.vim b/runtime/ftplugin/ant.vim
index aee07ca..65e01a1 100644
--- a/runtime/ftplugin/ant.vim
+++ b/runtime/ftplugin/ant.vim
@@ -1,10 +1,11 @@
" Vim filetype plugin file
-" Language: ant
+" Language: ant
"
" This runtime file is looking for a new maintainer.
"
" Former maintainer: Dan Sharp
-" Last Changed: 20 Jan 2009
+" Last Change: 2009 Jan 20
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin") | finish | endif
@@ -15,8 +16,12 @@ set cpo-=C
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
-let s:browsefilter = "XML Files (*.xml)\t*.xml\n" .
- \ "All Files (*.*)\t*.*\n"
+let s:browsefilter = "XML Files (*.xml)\t*.xml\n"
+if has("win32")
+ let s:browsefilter .= "All Files (*.*)\t*\n"
+else
+ let s:browsefilter .= "All Files (*)\t*\n"
+endif
runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim
let b:did_ftplugin = 1
@@ -30,7 +35,7 @@ if exists("b:browsefilter")
endif
" Change the :browse e filter to primarily show Ant-related files.
-if has("gui_win32")
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Build Files (build.xml)\tbuild.xml\n" .
\ "Java Files (*.java)\t*.java\n" .
\ "Properties Files (*.prop*)\t*.prop*\n" .
diff --git a/runtime/ftplugin/asciidoc.vim b/runtime/ftplugin/asciidoc.vim
new file mode 100644
index 0000000..5974e28
--- /dev/null
+++ b/runtime/ftplugin/asciidoc.vim
@@ -0,0 +1,67 @@
+" Vim filetype plugin file
+" Original Author: Maxim Kim <habamax@gmail.com>
+" Language: asciidoc
+" Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
+" Last Change: 2024 Jan 16
+
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin = 1
+
+if exists('b:undo_ftplugin')
+ let b:undo_ftplugin .= "|setl cms< com< fo< flp< inex< efm< cfu< fde< fdm<"
+else
+ let b:undo_ftplugin = "setl cms< com< fo< flp< inex< efm< cfu< fde< fdm<"
+endif
+
+" gf to open include::file.ext[] and link:file.ext[] files
+setlocal includeexpr=substitute(v:fname,'\\(link:\\\|include::\\)\\(.\\{-}\\)\\[.*','\\2','g')
+
+setlocal comments=
+setlocal commentstring=//\ %s
+
+setlocal formatoptions+=cqn
+setlocal formatlistpat=^\\s*[\\[({]\\?\\([0-9]\\+
+setlocal formatlistpat+=\\\|[a-zA-Z]\\)[\\]:.)}]\\s\\+
+setlocal formatlistpat+=\\\|^\\s*-\\s\\+
+setlocal formatlistpat+=\\\|^\\s*[*]\\+\\s\\+
+setlocal formatlistpat+=\\\|^\\s*[.]\\+\\s\\+
+
+function AsciidocFold()
+ let line = getline(v:lnum)
+
+ if (v:lnum == 1) && (line =~ '^----*$')
+ return ">1"
+ endif
+
+ let nested = get(g:, "asciidoc_foldnested", 1)
+
+ " Regular headers
+ let depth = match(line, '\(^=\+\)\@<=\( .*$\)\@=')
+
+ " Do not fold nested regular headers
+ if depth > 1 && !nested
+ let depth = 1
+ endif
+
+ if depth > 0
+ " fold all sections under title
+ if depth > 1 && !get(g:, "asciidoc_fold_under_title", 1)
+ let depth -= 1
+ endif
+ " check syntax, it should be asciidocTitle or asciidocH
+ let syncode = synstack(v:lnum, 1)
+ if len(syncode) > 0 && synIDattr(syncode[0], 'name') =~ 'asciidoc\%(H[1-6]\)\|Title'
+ return ">" . depth
+ endif
+ endif
+
+ return "="
+endfunction
+
+if has("folding") && get(g:, 'asciidoc_folding', 0)
+ setlocal foldexpr=AsciidocFold()
+ setlocal foldmethod=expr
+ let b:undo_ftplugin .= "|setl foldexpr< foldmethod< foldtext<"
+endif
diff --git a/runtime/ftplugin/aspvbs.vim b/runtime/ftplugin/aspvbs.vim
index 70a130d..6979bb8 100644
--- a/runtime/ftplugin/aspvbs.vim
+++ b/runtime/ftplugin/aspvbs.vim
@@ -1,10 +1,11 @@
" Vim filetype plugin file
-" Language: aspvbs
+" Language: aspvbs
"
" This runtime file is looking for a new maintainer.
"
" Former maintainer: Dan Sharp
-" Last Changed: 20 Jan 2009
+" Last Change: 2009 Jan 20
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin") | finish | endif
@@ -15,8 +16,12 @@ set cpo-=C
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
-let s:browsefilter = "HTML Files (*.html, *.htm)\t*.htm*\n" .
- \ "All Files (*.*)\t*.*\n"
+let s:browsefilter = "HTML Files (*.html, *.htm)\t*.htm*\n"
+if has("win32")
+ let s:browsefilter .= "All Files (*.*)\t*\n"
+else
+ let s:browsefilter .= "All Files (*)\t*\n"
+endif
let s:match_words = ""
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
@@ -51,7 +56,7 @@ if exists("loaded_matchit")
endif
" Change the :browse e filter to primarily show ASP-related files.
-if has("gui_win32")
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter="ASP Files (*.asp)\t*.asp\n" . s:browsefilter
endif
diff --git a/runtime/ftplugin/awk.vim b/runtime/ftplugin/awk.vim
index 40fe304..bcd7723 100644
--- a/runtime/ftplugin/awk.vim
+++ b/runtime/ftplugin/awk.vim
@@ -2,7 +2,7 @@
" Language: awk, nawk, gawk, mawk
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Antonio Colombo <azc100@gmail.com>
-" Last Change: 2020 Sep 28
+" Last Change: 2024 Jan 14
" This plugin was prepared by Mark Sikora
" This plugin was updated as proposed by Doug Kearns
@@ -25,8 +25,7 @@ setlocal formatoptions-=t formatoptions+=croql
setlocal define=function
setlocal suffixesadd+=.awk
-let b:undo_ftplugin = "setl fo< com< cms< def< sua<" .
- \ " | unlet! b:browsefilter"
+let b:undo_ftplugin = "setl fo< com< cms< def< sua<"
" TODO: set this in scripts.vim?
if exists("g:awk_is_gawk")
@@ -49,8 +48,13 @@ if exists("g:awk_is_gawk")
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Awk Source Files (*.awk,*.gawk)\t*.awk;*.gawk\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Awk Source Files (*.awk, *.gawk)\t*.awk;*.gawk\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
+ let b:undo_ftplugin .= " | unlet! b:browsefilter"
endif
let &cpo = s:cpo_save
diff --git a/runtime/ftplugin/basic.vim b/runtime/ftplugin/basic.vim
index 4399fbf..32f713b 100644
--- a/runtime/ftplugin/basic.vim
+++ b/runtime/ftplugin/basic.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: BASIC (QuickBASIC 4.5)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2022 Jun 22
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -45,8 +45,12 @@ endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "BASIC Source Files (*.bas)\t*.bas\n" ..
- \ "BASIC Include Files (*.bi, *.bm)\t*.bi;*.bm\n" ..
- \ "All Files (*.*)\t*.*\n"
+ \ "BASIC Include Files (*.bi, *.bm)\t*.bi;*.bm\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:basic_set_browsefilter = 1
let b:undo_ftplugin ..= " | unlet! b:browsefilter b:basic_set_browsefilter"
endif
diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim
index 4ddc4a5..e2eebc5 100644
--- a/runtime/ftplugin/c.vim
+++ b/runtime/ftplugin/c.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: C
" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2023 Aug 10
+" Last Change: 2023 Aug 22
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
@@ -48,24 +48,26 @@ if !exists("b:match_words")
let b:undo_ftplugin ..= " | unlet! b:match_skip b:match_words"
endif
-" Win32 can filter files in the browse dialog
+" Win32 and GTK can filter files in the browse dialog
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
if &ft == "cpp"
- let b:browsefilter = "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" .
- \ "C Header Files (*.h)\t*.h\n" .
- \ "C Source Files (*.c)\t*.c\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "C++ Source Files (*.cpp, *.c++)\t*.cpp;*.c++\n" ..
+ \ "C Header Files (*.h)\t*.h\n" ..
+ \ "C Source Files (*.c)\t*.c\n"
elseif &ft == "ch"
- let b:browsefilter = "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" .
- \ "C Header Files (*.h)\t*.h\n" .
- \ "C Source Files (*.c)\t*.c\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Ch Source Files (*.ch, *.chf)\t*.ch;*.chf\n" ..
+ \ "C Header Files (*.h)\t*.h\n" ..
+ \ "C Source Files (*.c)\t*.c\n"
else
- let b:browsefilter = "C Source Files (*.c)\t*.c\n" .
- \ "C Header Files (*.h)\t*.h\n" .
- \ "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" .
- \ "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "C Source Files (*.c)\t*.c\n" ..
+ \ "C Header Files (*.h)\t*.h\n" ..
+ \ "Ch Source Files (*.ch, *.chf)\t*.ch;*.chf\n" ..
+ \ "C++ Source Files (*.cpp, *.c++)\t*.cpp;*.c++\n"
+ endif
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/clojure.vim b/runtime/ftplugin/clojure.vim
index c922d75..4da7554 100644
--- a/runtime/ftplugin/clojure.vim
+++ b/runtime/ftplugin/clojure.vim
@@ -6,6 +6,7 @@
" URL: https://github.com/clojure-vim/clojure.vim
" License: Vim (see :h license)
" Last Change: 2022-03-24
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin")
finish
@@ -66,10 +67,14 @@ endif
" Filter files in the browse dialog
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "All Files\t*\n" .
- \ "Clojure Files\t*.clj;*.cljc;*.cljs;*.cljx\n" .
+ let b:browsefilter = "Clojure Files\t*.clj;*.cljc;*.cljs;*.cljx\n" .
\ "EDN Files\t*.edn\n" .
\ "Java Files\t*.java\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin .= ' | unlet! b:browsefilter'
endif
diff --git a/runtime/ftplugin/cobol.vim b/runtime/ftplugin/cobol.vim
index ec1e954..5e52702 100644
--- a/runtime/ftplugin/cobol.vim
+++ b/runtime/ftplugin/cobol.vim
@@ -3,6 +3,7 @@
" Maintainer: Ankit Jain <ajatkj@yahoo.co.in>
" (formerly Tim Pope <vimNOSPAM@tpope.info>)
" Last Update: By Ankit Jain (add gtk support) on 15.08.2020
+" 2024 Jan 14 by Vim Project (browsefilter)
" Insert mode mappings: <C-T> <C-D> <Tab>
" Normal mode mappings: < > << >> [[ ]] [] ][
@@ -39,8 +40,12 @@ endif
" add gtk support
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "COBOL Source Files (*.cbl, *.cob)\t*.cbl;*.cob;*.lib\n".
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "COBOL Source Files (*.cbl, *.cob)\t*.cbl;*.cob;*.lib\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
let b:undo_ftplugin = "setlocal com< cms< fo< et< tw<" .
diff --git a/runtime/ftplugin/config.vim b/runtime/ftplugin/config.vim
index 73136cb..595fc65 100644
--- a/runtime/ftplugin/config.vim
+++ b/runtime/ftplugin/config.vim
@@ -1,10 +1,11 @@
" Vim filetype plugin file
-" Language: config
+" Language: config
"
" This runtime file is looking for a new maintainer.
"
" Former maintainer: Dan Sharp
-" Last Changed: 20 Jan 2009
+" Last Change: 2009 Jan 20
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin") | finish | endif
@@ -15,8 +16,12 @@ set cpo-=C
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
-let s:browsefilter = "Bourne Shell Files (*.sh)\t*.sh\n" .
- \ "All Files (*.*)\t*.*\n"
+let s:browsefilter = "Bourne Shell Files (*.sh)\t*.sh\n"
+if has("win32")
+ let s:browsefilter .= "All Files (*.*)\t*\n"
+else
+ let s:browsefilter .= "All Files (*)\t*\n"
+endif
let s:match_words = ""
runtime! ftplugin/sh.vim ftplugin/sh_*.vim ftplugin/sh/*.vim
@@ -31,7 +36,7 @@ if exists("b:browsefilter")
endif
" Change the :browse e filter to primarily show configure-related files.
-if has("gui_win32")
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter="Configure Scripts (configure.*, config.*)\tconfigure*;config.*\n" .
\ s:browsefilter
endif
diff --git a/runtime/ftplugin/cs.vim b/runtime/ftplugin/cs.vim
index 0734d11..ada7131 100644
--- a/runtime/ftplugin/cs.vim
+++ b/runtime/ftplugin/cs.vim
@@ -3,6 +3,7 @@
" Maintainer: Nick Jensen <nickspoon@gmail.com>
" Former Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change: 2022-11-16
+" 2024 Jan 14 by Vim Project (browsefilter)
" License: Vim (see :h license)
" Repository: https://github.com/nickspoons/vim-cs
@@ -31,10 +32,14 @@ if exists('loaded_matchit') && !exists('b:match_words')
endif
if (has('gui_win32') || has('gui_gtk')) && !exists('b:browsefilter')
- let b:browsefilter = "C# Source Files (*.cs *.csx)\t*.cs;*.csx\n" .
+ let b:browsefilter = "C# Source Files (*.cs, *.csx)\t*.cs;*.csx\n" .
\ "C# Project Files (*.csproj)\t*.csproj\n" .
- \ "Visual Studio Solution Files (*.sln)\t*.sln\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "Visual Studio Solution Files (*.sln)\t*.sln\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin .= ' | unlet! b:browsefilter'
endif
diff --git a/runtime/ftplugin/csh.vim b/runtime/ftplugin/csh.vim
index 2feec57..a22bee3 100644
--- a/runtime/ftplugin/csh.vim
+++ b/runtime/ftplugin/csh.vim
@@ -3,7 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Dan Sharp
" Contributor: Johannes Zellner <johannes@zellner.org>
-" Last Change: 2023 Oct 09
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -44,8 +44,12 @@ if exists("loaded_matchit") && !exists("b:match_words")
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "csh Scripts (*.csh)\t*.csh\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "csh Scripts (*.csh)\t*.csh\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:csh_set_browsefilter = 1
let b:undo_ftplugin ..= " | unlet! b:browsefilter b:csh_set_browsefilter"
endif
diff --git a/runtime/ftplugin/deb822sources.vim b/runtime/ftplugin/deb822sources.vim
new file mode 100644
index 0000000..4936f42
--- /dev/null
+++ b/runtime/ftplugin/deb822sources.vim
@@ -0,0 +1,16 @@
+" Language: Debian sources.list
+" Maintainer: Debian Vim Maintainers <team+vim@tracker.debian.org>
+" Last Change: 2024 Mar 20
+" License: Vim License
+" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/deb822sources.vim
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin=1
+
+setlocal comments=:#
+setlocal commentstring=#%s
+setlocal formatoptions-=t
+
+let b:undo_ftplugin = 'setlocal comments< commentstring< formatoptions<'
diff --git a/runtime/ftplugin/diff.vim b/runtime/ftplugin/diff.vim
index f2a0820..2daa48a 100644
--- a/runtime/ftplugin/diff.vim
+++ b/runtime/ftplugin/diff.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Diff
" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2023 Aug 10
+" Last Change: 2023 Aug 22
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
@@ -19,6 +19,11 @@ setlocal nomodeline
let &l:commentstring = "# %s"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Diff Files (*.diff)\t*.diff\nPatch Files (*.patch)\t*.h\nAll Files (*.*)\t*.*\n"
+ let b:browsefilter = "Diff Files (*.diff)\t*.diff\nPatch Files (*.patch)\t*.h\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/dosbatch.vim b/runtime/ftplugin/dosbatch.vim
index f02f26b..5001cf6 100644
--- a/runtime/ftplugin/dosbatch.vim
+++ b/runtime/ftplugin/dosbatch.vim
@@ -2,6 +2,7 @@
" Language: MS-DOS/Windows .bat files
" Maintainer: Mike Williams <mrmrdubya@gmail.com>
" Last Change: 12th February 2023
+" 2024 Jan 14 by Vim Project (browsefilter)
"
" Options Flags:
" dosbatch_colons_comment - any value to treat :: as comment line
@@ -37,12 +38,17 @@ if executable('help.exe')
endif
" Define patterns for the browse file filter
-if has("gui_win32") && !exists("b:browsefilter")
- let b:browsefilter = "DOS Batch Files (*.bat, *.cmd)\t*.bat;*.cmd\nAll Files (*.*)\t*.*\n"
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
+ let b:browsefilter = "DOS Batch Files (*.bat, *.cmd)\t*.bat;*.cmd\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
endif
let b:undo_ftplugin = "setlocal comments< formatoptions< keywordprg<"
- \ . "| unlet! b:browsefiler"
+ \ . "| unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/ftplugin/dtd.vim b/runtime/ftplugin/dtd.vim
index a046118..bea8c5c 100644
--- a/runtime/ftplugin/dtd.vim
+++ b/runtime/ftplugin/dtd.vim
@@ -1,10 +1,11 @@
" Vim filetype plugin file
-" Language: dtd
+" Language: dtd
"
" This runtime file is looking for a new maintainer.
"
" Former maintainer: Dan Sharp
-" Last Changed: 20 Jan 2009
+" Last Change: 2009 Jan 20
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -27,10 +28,14 @@ if exists("loaded_matchit")
endif
" Change the :browse e filter to primarily show Java-related files.
-if has("gui_win32")
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter="DTD Files (*.dtd)\t*.dtd\n" .
- \ "XML Files (*.xml)\t*.xml\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "XML Files (*.xml)\t*.xml\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
" Undo the stuff we changed.
diff --git a/runtime/ftplugin/eiffel.vim b/runtime/ftplugin/eiffel.vim
index 216fdde..e193110 100644
--- a/runtime/ftplugin/eiffel.vim
+++ b/runtime/ftplugin/eiffel.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Eiffel
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2010 Aug 29
+" Last Change: 2024 Jan 14
if (exists("b:did_ftplugin"))
finish
@@ -18,8 +18,12 @@ setlocal formatoptions-=t formatoptions+=croql
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Eiffel Source Files (*.e)\t*.e\n" .
- \ "Eiffel Control Files (*.ecf, *.ace, *.xace)\t*.ecf;*.ace;*.xace\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "Eiffel Control Files (*.ecf, *.ace, *.xace)\t*.ecf;*.ace;*.xace\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
if exists("loaded_matchit") && !exists("b:match_words")
diff --git a/runtime/ftplugin/eruby.vim b/runtime/ftplugin/eruby.vim
index 893fa58..b5c4665 100644
--- a/runtime/ftplugin/eruby.vim
+++ b/runtime/ftplugin/eruby.vim
@@ -4,6 +4,7 @@
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 May 15
+" 2024 Jan 14 by Vim Project (browsefilter)
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -15,7 +16,11 @@ set cpo-=C
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
-let s:browsefilter = "All Files (*.*)\t*.*\n"
+if has("win32")
+ let s:browsefilter = "All Files (*.*)\t*\n"
+else
+ let s:browsefilter = "All Files (*)\t*\n"
+endif
let s:match_words = ""
if !exists("g:eruby_default_subtype")
@@ -109,8 +114,8 @@ exe 'cmap <buffer><script><expr> <Plug><cfile> ErubyAtCursor() ? ' . maparg('<Pl
exe 'cmap <buffer><script><expr> <Plug><ctag> ErubyAtCursor() ? ' . maparg('<Plug><ctag>', 'c') . ' : ' . get(s:ctagmap, 'rhs', '"\022\027"')
unlet s:cfilemap s:ctagmap s:include s:path s:suffixesadd
-" Change the browse dialog on Win32 to show mainly eRuby-related files
-if has("gui_win32")
+" Change the browse dialog on Win32 and GTK to show mainly eRuby-related files
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter="eRuby Files (*.erb, *.rhtml)\t*.erb;*.rhtml\n" . s:browsefilter
endif
diff --git a/runtime/ftplugin/expect.vim b/runtime/ftplugin/expect.vim
index a4c6af9..b4db154 100644
--- a/runtime/ftplugin/expect.vim
+++ b/runtime/ftplugin/expect.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Expect
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2022 Jul 16
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -14,8 +14,12 @@ let s:cpo_save = &cpo
set cpo&vim
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Expect Command Files (*.exp)\t*.exp\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Expect Command Files (*.exp)\t*.exp\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
endif
let &cpo = s:cpo_save
diff --git a/runtime/ftplugin/falcon.vim b/runtime/ftplugin/falcon.vim
index affca38..1000b62 100644
--- a/runtime/ftplugin/falcon.vim
+++ b/runtime/ftplugin/falcon.vim
@@ -4,6 +4,7 @@
" Copyright: Copyright (c) 2009-2013 Steven Oliver
" License: You may redistribute this under the same terms as Vim itself
" Last Update: 2020 Oct 10
+" 2024 Jan 14 by Vim Project (browsefilter)
" --------------------------------------------------------------------------
" Only do this when not done yet for this buffer
@@ -34,14 +35,18 @@ endif
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
" Windows allows you to filter the open file dialog
-if has("gui_win32") && !exists("b:browsefilter")
- let b:browsefilter = "Falcon Source Files (*.fal *.ftd)\t*.fal;*.ftd\n" .
- \ "All Files (*.*)\t*.*\n"
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
+ let b:browsefilter = "Falcon Source Files (*.fal, *.ftd)\t*.fal;*.ftd\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
endif
let b:undo_ftplugin = "setlocal tabstop< shiftwidth< expandtab< fileencoding<"
\ . " suffixesadd< comments<"
- \ . "| unlet! b:browsefiler"
+ \ . "| unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/ftplugin/forth.vim b/runtime/ftplugin/forth.vim
index d28c848..df4694f 100644
--- a/runtime/ftplugin/forth.vim
+++ b/runtime/ftplugin/forth.vim
@@ -2,6 +2,7 @@
" Language: Forth
" Maintainer: Johan Kotlinski <kotlinski@gmail.com>
" Last Change: 2023 Sep 15
+" 2024 Jan 14 by Vim Project (browsefilter)
" URL: https://github.com/jkotlinski/forth.vim
if exists("b:did_ftplugin")
@@ -62,8 +63,12 @@ if exists("loaded_matchit") && !exists("b:match_words")
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Forth Source Files (*.f *.fs *.ft *.fth *.4th)\t*.f;*.fs;*.ft;*.fth;*.4th\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Forth Source Files (*.f, *.fs, *.ft, *.fth, *.4th)\t*.f;*.fs;*.ft;*.fth;*.4th\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/fortran.vim b/runtime/ftplugin/fortran.vim
index d714a4a..3c32581 100644
--- a/runtime/ftplugin/fortran.vim
+++ b/runtime/ftplugin/fortran.vim
@@ -9,6 +9,8 @@
" Since then, useful suggestions and contributions have been made, in order, by:
" Stefano Zacchiroli, Hendrik Merx, Ben Fritz, David Barnett, Eisuke Kawashima,
" Doug Kearns, and Fritz Reese.
+" Last Change: 2023 Dec 22
+" 2024 Jan 14 by Vim Project (browsefilter)
" Only do these settings when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -135,8 +137,12 @@ endif
" File filters for :browse e
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Fortran Files (*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn)\t*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Fortran Files (*.f, *.for, *.f77, *.f90, *.f95, *.f03, *.f08, *.fpp, *.ftn)\t*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
let b:undo_ftplugin = "setl fo< com< tw< cms< et< inc< sua<"
diff --git a/runtime/ftplugin/fpcmake.vim b/runtime/ftplugin/fpcmake.vim
index 8d95083..e365ba7 100644
--- a/runtime/ftplugin/fpcmake.vim
+++ b/runtime/ftplugin/fpcmake.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Free Pascal Makefile Generator
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2021 Apr 23
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -13,11 +13,15 @@ set cpo&vim
runtime! ftplugin/make.vim
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Free Pascal Makefile Definition Files (*.fpc)\t*.fpc\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Free Pascal Makefile Definition Files (*.fpc)\t*.fpc\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
+ let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
-let b:undo_ftplugin = b:undo_ftplugin .. " | unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/ftplugin/freebasic.vim b/runtime/ftplugin/freebasic.vim
index 1680e84..8eadb44 100644
--- a/runtime/ftplugin/freebasic.vim
+++ b/runtime/ftplugin/freebasic.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: FreeBASIC
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2022 Jun 24
+" Last Change: 2023 Aug 22
" Setup {{{1
if exists("b:did_ftplugin")
@@ -70,8 +70,12 @@ endif
if (has("gui_win32") || has("gui_gtk")) && exists("b:basic_set_browsefilter")
let b:browsefilter = "FreeBASIC Source Files (*.bas)\t*.bas\n" ..
- \ "FreeBASIC Header Files (*.bi)\t*.bi\n" ..
- \ "All Files (*.*)\t*.*\n"
+ \ "FreeBASIC Header Files (*.bi)\t*.bi\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
endif
" Cleanup {{{1
diff --git a/runtime/ftplugin/haml.vim b/runtime/ftplugin/haml.vim
index 6f30169..910d9c7 100644
--- a/runtime/ftplugin/haml.vim
+++ b/runtime/ftplugin/haml.vim
@@ -2,6 +2,7 @@
" Language: Haml
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2019 Dec 05
+" 2024 Jan 14 by Vim Project (browsefilter)
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -13,7 +14,11 @@ set cpo-=C
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
-let s:browsefilter = "All Files (*.*)\t*.*\n"
+if has("win32")
+ let s:browsefilter = "All Files (*.*)\t*\n"
+else
+ let s:browsefilter = "All Files (*)\t*\n"
+endif
let s:match_words = ""
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
@@ -44,14 +49,14 @@ if exists("b:undo_ftplugin")
let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin
endif
if exists ("b:browsefilter")
- let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter
+ let s:browsefilter = substitute(b:browsefilter,'\cAll Files (.*)\t\*\n','','') . s:browsefilter
endif
if exists("b:match_words")
let s:match_words = b:match_words . ',' . s:match_words
endif
-" Change the browse dialog on Win32 to show mainly Haml-related files
-if has("gui_win32")
+" Change the browse dialog on Win32 and GTK to show mainly Haml-related files
+if has("gui_win32") || has("gui_gtk")
let b:browsefilter="Haml Files (*.haml)\t*.haml\nSass Files (*.sass)\t*.sass\n" . s:browsefilter
endif
@@ -62,7 +67,7 @@ endif
setlocal comments= commentstring=-#\ %s
-let b:undo_ftplugin = "setl def< cms< com< "
+let b:undo_ftplugin = "setl def< cms< com< " .
\ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
let &cpo = s:save_cpo
diff --git a/runtime/ftplugin/html.vim b/runtime/ftplugin/html.vim
index 94cb626..3aa60a8 100644
--- a/runtime/ftplugin/html.vim
+++ b/runtime/ftplugin/html.vim
@@ -2,7 +2,7 @@
" Language: HTML
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Dan Sharp
-" Last Changed: 2022 Jul 20
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -43,10 +43,14 @@ endif
" Change the :browse e filter to primarily show HTML-related files.
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "HTML Files (*.html *.htm)\t*.htm;*.html\n" ..
+ let b:browsefilter = "HTML Files (*.html, *.htm)\t*.html;*.htm\n" ..
\ "JavaScript Files (*.js)\t*.js\n" ..
- \ "Cascading StyleSheets (*.css)\t*.css\n" ..
- \ "All Files (*.*)\t*.*\n"
+ \ "Cascading StyleSheets (*.css)\t*.css\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:html_set_browsefilter = 1
let b:undo_ftplugin ..= " | unlet! b:browsefilter b:html_set_browsefilter"
endif
diff --git a/runtime/ftplugin/hurl.vim b/runtime/ftplugin/hurl.vim
new file mode 100644
index 0000000..10a3131
--- /dev/null
+++ b/runtime/ftplugin/hurl.vim
@@ -0,0 +1,11 @@
+" Vim filetype plugin file
+" Language: hurl
+" Maintainer: Melker Ulander <melker.ulander@pm.me>
+" Last Changed: 2024 01 26
+
+if exists("b:did_ftplugin") | finish | endif
+
+let b:did_ftplugin = 1
+setlocal commentstring=#\ %s
+
+let b:undo_ftplugin = "setlocal commentstring<"
diff --git a/runtime/ftplugin/icon.vim b/runtime/ftplugin/icon.vim
index 33a86df..10411c8 100644
--- a/runtime/ftplugin/icon.vim
+++ b/runtime/ftplugin/icon.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Icon
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2022 Jun 16
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -18,15 +18,19 @@ setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl fo< com< cms<"
if exists("loaded_matchit")
- " let b:match_ignorecase = 0
- let b:match_words = '^\s*$\s*if\(def\|ndef\)\=\>:^\s*$\s*elif\>:^\s*$\s*else\>:^\s*$\s*endif\>,' .
+ let b:match_ignorecase = 0
+ let b:match_words = '^\s*$\s*if\(def\|ndef\)\=\>:^\s*$\s*elif\>:^\s*$\s*else\>:^\s*$\s*endif\>,' ..
\ '\<procedure\>:\<\%(initial\|return\|suspend\|fail\)\>:\<end\>'
- let b:undo_ftplugin ..= " | unlet! b:match_words"
+ let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Icon Source Files (*.icn)\t*.icn\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Icon Source Files (*.icn)\t*.icn\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/ishd.vim b/runtime/ftplugin/ishd.vim
index b160349..5e33efd 100644
--- a/runtime/ftplugin/ishd.vim
+++ b/runtime/ftplugin/ishd.vim
@@ -2,7 +2,7 @@
" Language: InstallShield (ft=ishd)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
-" Last Change: 2023 Aug 28
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -29,8 +29,12 @@ if exists("loaded_matchit")
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "InstallShield Files (*.rul)\t*.rul\n" .
- \ "All Files (*.*)\t*\n"
+ let b:browsefilter = "InstallShield Files (*.rul)\t*.rul\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin .= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/j.vim b/runtime/ftplugin/j.vim
index ae235ab..8335ea0 100644
--- a/runtime/ftplugin/j.vim
+++ b/runtime/ftplugin/j.vim
@@ -3,6 +3,7 @@
" Maintainer: David Bürgin <dbuergin@gluet.ch>
" URL: https://gitlab.com/glts/vim-j
" Last Change: 2022-08-06
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists('b:did_ftplugin')
finish
@@ -67,7 +68,11 @@ endif
" Browse dialog filter on Windows and GTK (see ":help browsefilter")
if (has('gui_win32') || has('gui_gtk')) && !exists('b:browsefilter')
let b:browsefilter = "J Script Files (*.ijs)\t*.ijs\n"
- \ . "All Files (*.*)\t*.*\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin .= ' | unlet! b:browsefilter'
endif
diff --git a/runtime/ftplugin/java.vim b/runtime/ftplugin/java.vim
index 74c8e8d..bb7e7cd 100644
--- a/runtime/ftplugin/java.vim
+++ b/runtime/ftplugin/java.vim
@@ -1,10 +1,11 @@
" Vim filetype plugin file
-" Language: Java
+" Language: Java
"
" This runtime file is looking for a new maintainer.
"
" Former maintainer: Dan Sharp
-" Last Change: 2012 Mar 11
+" Last Change: 2012 Mar 11
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -36,11 +37,15 @@ setlocal comments& comments^=sO:*\ -,mO:*\ \ ,exO:*/
setlocal commentstring=//%s
" Change the :browse e filter to primarily show Java-related files.
-if has("gui_win32")
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter="Java Files (*.java)\t*.java\n" .
\ "Properties Files (*.prop*)\t*.prop*\n" .
- \ "Manifest Files (*.mf)\t*.mf\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "Manifest Files (*.mf)\t*.mf\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
" Undo the stuff we changed.
diff --git a/runtime/ftplugin/javascript.vim b/runtime/ftplugin/javascript.vim
index 9a0b29e..2633954 100644
--- a/runtime/ftplugin/javascript.vim
+++ b/runtime/ftplugin/javascript.vim
@@ -1,8 +1,8 @@
" Vim filetype plugin file
" Language: Javascript
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2020 Jun 23
" Contributor: Romain Lafourcade <romainlafourcade@gmail.com>
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -34,7 +34,11 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
\ .. "JavaScript Modules (*.es, *.es6, *.cjs, *.mjs, *.jsm)\t*.es;*.es6;*.cjs;*.mjs;*.jsm\n"
\ .. "Vue Templates (*.vue)\t*.vue\n"
\ .. "JSON Files (*.json)\t*.json\n"
- \ .. "All Files (*.*)\t*.*\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
endif
" The following suffixes should be implied when resolving filenames
diff --git a/runtime/ftplugin/json5.vim b/runtime/ftplugin/json5.vim
index 2560857..302ed76 100644
--- a/runtime/ftplugin/json5.vim
+++ b/runtime/ftplugin/json5.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: JSON5
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2023 Oct 19
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -19,8 +19,12 @@ let b:undo_ftplugin = "setl fo< com< cms<"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "JSON5 Files (*.json5)\t*.json5\n" ..
- \ "JSON Files (*.json)\t*.json\n" ..
- \ "All Files (*.*)\t*.*\n"
+ \ "JSON Files (*.json)\t*.json\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/jsp.vim b/runtime/ftplugin/jsp.vim
index 18136cc..cc70232 100644
--- a/runtime/ftplugin/jsp.vim
+++ b/runtime/ftplugin/jsp.vim
@@ -1,10 +1,11 @@
" Vim filetype plugin file
-" Language: jsp
+" Language: jsp
"
" This runtime file is looking for a new maintainer.
"
" Former maintainer: Dan Sharp
-" Last Changed: 20 Jan 2009
+" Last Change: 2009 Jan 20
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin") | finish | endif
@@ -16,8 +17,12 @@ set cpo-=C
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
let s:browsefilter = "Java Files (*.java)\t*.java\n" .
- \ "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "HTML Files (*.html, *.htm)\t*.html;*.htm\n"
+if has("win32")
+ let s:browsefilter .= "All Files (*.*)\t*\n"
+else
+ let s:browsefilter .= "All Files (*)\t*\n"
+endif
let s:match_words = ""
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
@@ -57,7 +62,7 @@ if exists("loaded_matchit")
endif
" Change the :browse e filter to primarily show JSP-related files.
-if has("gui_win32")
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter="JSP Files (*.jsp)\t*.jsp\n" . s:browsefilter
endif
diff --git a/runtime/ftplugin/kotlin.vim b/runtime/ftplugin/kotlin.vim
index b21de60..5c07088 100644
--- a/runtime/ftplugin/kotlin.vim
+++ b/runtime/ftplugin/kotlin.vim
@@ -3,7 +3,7 @@
" Maintainer: Alexander Udalov
" URL: https://github.com/udalov/kotlin-vim
" Last Change: 7 November 2021
-" 2023 Sep 17 by Vim Project (browsefilter)
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists('b:did_ftplugin') | finish | endif
let b:did_ftplugin = 1
@@ -24,8 +24,12 @@ let b:undo_ftplugin = "setlocal comments< commentstring< ".
\ "formatoptions< includeexpr< suffixesadd<"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Kotlin Source Files (*.kt, *kts)\t*.kt;*.kts\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Kotlin Source Files (*.kt, *kts)\t*.kt;*.kts\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin .= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/kwt.vim b/runtime/ftplugin/kwt.vim
index 05b40d4..b37c7fa 100644
--- a/runtime/ftplugin/kwt.vim
+++ b/runtime/ftplugin/kwt.vim
@@ -2,6 +2,7 @@
" Language: Kimwitu++
" Maintainer: Michael Piefel <entwurf@piefel.de>
" Last Change: 10 March 2012
+" 2024 Jan 14 by Vim Project (browsefilter)
" Behaves almost like C++
runtime! ftplugin/cpp.vim ftplugin/cpp_*.vim ftplugin/cpp/*.vim
@@ -10,11 +11,15 @@ let s:cpo_save = &cpo
set cpo&vim
" Limit the browser to related files
-if has("gui_win32") && !exists("b:browsefilter")
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Kimwitu/Kimwitu++ Files (*.k)\t*.k\n" .
\ "Lex/Flex Files (*.l)\t*.l\n" .
- \ "Yacc/Bison Files (*.y)\t*.y\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "Yacc/Bison Files (*.y)\t*.y\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
endif
" Set the errorformat for the Kimwitu++ compiler
@@ -22,10 +27,10 @@ set efm+=kc%.%#:\ error\ at\ %f:%l:\ %m
if exists("b:undo_ftplugin")
let b:undo_ftplugin = b:undo_ftplugin . " | setlocal efm<"
- \ . "| unlet! b:browsefiler"
+ \ . "| unlet! b:browsefilter"
else
let b:undo_ftplugin = "setlocal efm<"
- \ . "| unlet! b:browsefiler"
+ \ . "| unlet! b:browsefilter"
endif
let &cpo = s:cpo_save
diff --git a/runtime/ftplugin/lua.vim b/runtime/ftplugin/lua.vim
index 3529e1e..80cbba7 100644
--- a/runtime/ftplugin/lua.vim
+++ b/runtime/ftplugin/lua.vim
@@ -5,7 +5,7 @@
" Contributor: Dorai Sitaram <ds26@gte.com>
" C.D. MacEachern <craig.daniel.maceachern@gmail.com>
" Tyler Miller <tmillr@proton.me>
-" Last Change: 2023 Mar 24
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -39,8 +39,12 @@ if exists("loaded_matchit") && !exists("b:match_words")
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Lua Source Files (*.lua)\t*.lua\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Lua Source Files (*.lua)\t*.lua\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/lynx.vim b/runtime/ftplugin/lynx.vim
index bf8410d..4afed0a 100644
--- a/runtime/ftplugin/lynx.vim
+++ b/runtime/ftplugin/lynx.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Lynx Web Browser Configuration
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2023 Nov 09
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -18,8 +18,12 @@ setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl cms< com< fo<"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Lynx Configuration Files (lynx.cfg, .lynxrc)\tlynx.cfg;.lynxrc\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Lynx Configuration Files (lynx.cfg, .lynxrc)\tlynx.cfg;.lynxrc\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/m3build.vim b/runtime/ftplugin/m3build.vim
index c910eae..71960ce 100644
--- a/runtime/ftplugin/m3build.vim
+++ b/runtime/ftplugin/m3build.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Modula-3 Makefile
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2022 June 12
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -13,8 +13,12 @@ set cpo&vim
runtime! ftplugin/m3quake.vim
if (has("gui_win32") || has("gui_gtk")) && exists("b:m3quake_set_browsefilter")
- let b:browsefilter = "Modula-3 Makefile (m3makefile m3overrides)\tm3makefile;m3overrides\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Modula-3 Makefile (m3makefile, m3overrides)\tm3makefile;m3overrides\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
endif
let &cpo = s:cpo_save
diff --git a/runtime/ftplugin/m3quake.vim b/runtime/ftplugin/m3quake.vim
index 7762875..33ba633 100644
--- a/runtime/ftplugin/m3quake.vim
+++ b/runtime/ftplugin/m3quake.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Modula-3 Quake
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2022 June 12
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -23,8 +23,12 @@ if exists("loaded_matchit") && !exists("b:match_words")
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Modula-3 Quake Source Files (*.quake)\t*.quake\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Modula-3 Quake Source Files (*.quake)\t*.quake\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:m3quake_set_browsefilter = 1
let b:undo_ftplugin ..= " | unlet! b:browsefilter b:m3quake_set_browsefilter"
endif
diff --git a/runtime/ftplugin/meson.vim b/runtime/ftplugin/meson.vim
index 1ce9a03..17ffd53 100644
--- a/runtime/ftplugin/meson.vim
+++ b/runtime/ftplugin/meson.vim
@@ -4,6 +4,7 @@
" Maintainer: Liam Beguin <liambeguin@gmail.com>
" Original Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
" Last Change: 2018 Nov 27
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -30,8 +31,12 @@ if exists("loaded_matchit") && !exists("b:match_words")
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Meson Build Files (meson.build)\tmeson.build\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Meson Build Files (meson.build)\tmeson.build\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin .= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/mf.vim b/runtime/ftplugin/mf.vim
index 5c8c571..7e7dfa7 100644
--- a/runtime/ftplugin/mf.vim
+++ b/runtime/ftplugin/mf.vim
@@ -5,6 +5,7 @@ vim9script
# Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
# Former Maintainers: Nikolai Weibull <now@bitwi.se>
# Latest Revision: 2022 Aug 12
+# 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin")
finish
@@ -75,7 +76,11 @@ endif
if (has('gui_win32') || has('gui_gtk')) && !exists('b:browsefilter')
b:browsefilter = "METAFONT Source Files (*.mf)\t*.mf\n"
- .. "All Files (*.*)\t*.*\n"
+ if has("win32")
+ b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ b:browsefilter ..= "All Files (*)\t*\n"
+ endif
b:undo_ftplugin ..= ' | unlet! b:browsefilter'
endif
diff --git a/runtime/ftplugin/modula2.vim b/runtime/ftplugin/modula2.vim
index e230636..9c1acc2 100644
--- a/runtime/ftplugin/modula2.vim
+++ b/runtime/ftplugin/modula2.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Modula-2
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2021 Apr 08
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -39,8 +39,12 @@ if exists("loaded_matchit") && !exists("b:match_words")
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Modula-2 Source Files (*.def *.mod)\t*.def;*.mod\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Modula-2 Source Files (*.def, *.mod)\t*.def;*.mod\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/modula3.vim b/runtime/ftplugin/modula3.vim
index 1f8ab35..45dd7ca 100644
--- a/runtime/ftplugin/modula3.vim
+++ b/runtime/ftplugin/modula3.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Modula-3
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2022 June 12
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -31,8 +31,12 @@ if exists("loaded_matchit") && !exists("b:match_words")
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Modula-3 Source Files (*.m3)\t*.m3\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Modula-3 Source Files (*.m3, *.i3, *.mg, *ig)\t*.m3;*.i3;*.mg;*.ig\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/mp.vim b/runtime/ftplugin/mp.vim
index bc5116e..87ad9f8 100644
--- a/runtime/ftplugin/mp.vim
+++ b/runtime/ftplugin/mp.vim
@@ -5,6 +5,7 @@ vim9script
# Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
# Former Maintainers: Nikolai Weibull <now@bitwi.se>
# Latest Revision: 2022 Aug 12
+# 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin")
finish
@@ -84,7 +85,11 @@ endif
if (has('gui_win32') || has('gui_gtk')) && !exists('b:browsefilter')
b:browsefilter = "MetaPost Source Files (*.mp)\t*.mp\n"
- .. "All Files (*.*)\t*.*\n"
+ if has("win32")
+ b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ b:browsefilter ..= "All Files (*)\t*\n"
+ endif
b:undo_ftplugin ..= ' | unlet! b:browsefilter'
endif
diff --git a/runtime/ftplugin/msmessages.vim b/runtime/ftplugin/msmessages.vim
index 791eafe..c4cbd94 100644
--- a/runtime/ftplugin/msmessages.vim
+++ b/runtime/ftplugin/msmessages.vim
@@ -2,6 +2,7 @@
" Language: MS Message files (*.mc)
" Maintainer: Kevin Locke <kwl7@cornell.edu>
" Last Change: 2008 April 09
+" 2024 Jan 14 by Vim Project (browsefilter)
" Location: http://kevinlocke.name/programs/vim/syntax/msmessages.vim
" Based on c.vim
@@ -29,11 +30,15 @@ setlocal fo-=ct fo+=roql
setlocal comments=:;,:;//,:;\ //,s:;\ /*\ ,m:;\ \ *\ ,e:;\ \ */
setlocal commentstring=;\ //\ %s
-" Win32 can filter files in the browse dialog
-if has("gui_win32") && !exists("b:browsefilter")
+" Win32 and GTK can filter files in the browse dialog
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "MS Message Files (*.mc)\t*.mc\n" .
- \ "Resource Files (*.rc)\t*.rc\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "Resource Files (*.rc)\t*.rc\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
let &cpo = s:cpo_save
diff --git a/runtime/ftplugin/occam.vim b/runtime/ftplugin/occam.vim
index e9b7c01..0eb510f 100644
--- a/runtime/ftplugin/occam.vim
+++ b/runtime/ftplugin/occam.vim
@@ -3,6 +3,7 @@
" Copyright: Christian Jacobsen <clj3@kent.ac.uk>, Mario Schweigler <ms44@kent.ac.uk>
" Maintainer: Mario Schweigler <ms44@kent.ac.uk>
" Last Change: 23 April 2003
+" 2024 Jan 14 by Vim Project (browsefilter)
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -30,19 +31,23 @@ setlocal textwidth=78
"}}}
"{{{ File browsing filters
-" Win32 can filter files in the browse dialog
-if has("gui_win32") && !exists("b:browsefilter")
- let b:browsefilter = "All Occam Files (*.occ *.inc)\t*.occ;*.inc\n" .
+" Win32 and GTK can filter files in the browse dialog
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
+ let b:browsefilter = "All Occam Files (*.occ, *.inc)\t*.occ;*.inc\n" .
\ "Occam Include Files (*.inc)\t*.inc\n" .
- \ "Occam Source Files (*.occ)\t*.occ\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "Occam Source Files (*.occ)\t*.occ\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
"}}}
"{{{ Undo settings
let b:undo_ftplugin = "setlocal shiftwidth< softtabstop< expandtab<"
\ . " formatoptions< comments< textwidth<"
- \ . "| unlet! b:browsefiler"
+ \ . "| unlet! b:browsefilter"
"}}}
let &cpo = s:keepcpo
diff --git a/runtime/ftplugin/octave.vim b/runtime/ftplugin/octave.vim
index 7cab7c2..480b46a 100644
--- a/runtime/ftplugin/octave.vim
+++ b/runtime/ftplugin/octave.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: GNU Octave
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2021 Sep 02
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -50,8 +50,12 @@ if exists("loaded_matchit") && !exists("b:match_words")
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "GNU Octave Source Files (*.m)\t*.m\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "GNU Octave Source Files (*.m)\t*.m\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
endif
let b:undo_ftplugin = "setl com< cms< fo< kp< " ..
diff --git a/runtime/ftplugin/odin.vim b/runtime/ftplugin/odin.vim
new file mode 100644
index 0000000..9d94a57
--- /dev/null
+++ b/runtime/ftplugin/odin.vim
@@ -0,0 +1,20 @@
+vim9script
+
+# Vim filetype plugin file
+# Language: Odin
+# Maintainer: Maxim Kim <habamax@gmail.com>
+# Website: https://github.com/habamax/vim-odin
+# Last Change: 2024-01-15
+
+if exists("b:did_ftplugin")
+ finish
+endif
+b:did_ftplugin = 1
+
+b:undo_ftplugin = 'setlocal commentstring<'
+ \ .. '| setlocal comments<'
+ \ .. '| setlocal suffixesadd<'
+
+setlocal suffixesadd=.odin
+setlocal commentstring=//%s
+setlocal comments=s1:/*,mb:*,ex:*/,://
diff --git a/runtime/ftplugin/pascal.vim b/runtime/ftplugin/pascal.vim
index aba1e54..9abd7dd 100644
--- a/runtime/ftplugin/pascal.vim
+++ b/runtime/ftplugin/pascal.vim
@@ -2,7 +2,7 @@
" Language: Pascal
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Dan Sharp
-" Last Change: 2021 Apr 23
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -37,8 +37,12 @@ if exists("loaded_matchit")
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Pascal Source Files (*.pas *.pp *.inc)\t*.pas;*.pp;*.inc\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Pascal Source Files (*.pas, *.pp, *.inc)\t*.pas;*.pp;*.inc\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
endif
let b:undo_ftplugin = "setl fo< cms< com< " ..
diff --git a/runtime/ftplugin/perl.vim b/runtime/ftplugin/perl.vim
index c63bd3f..8c6a80e 100644
--- a/runtime/ftplugin/perl.vim
+++ b/runtime/ftplugin/perl.vim
@@ -7,6 +7,7 @@
" Last Change: 2021 Nov 10
" 2023 Sep 07 by Vim Project (safety check: don't execute perl
" from current directory)
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -95,8 +96,12 @@ let b:undo_ftplugin .= " | setlocal pa<"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" .
\ "Perl Modules (*.pm)\t*.pm\n" .
- \ "Perl Documentation Files (*.pod)\t*.pod\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "Perl Documentation Files (*.pod)\t*.pod\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin .= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/php.vim b/runtime/ftplugin/php.vim
index 540653e..f03f145 100644
--- a/runtime/ftplugin/php.vim
+++ b/runtime/ftplugin/php.vim
@@ -2,7 +2,7 @@
" Language: PHP
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Dan Sharp
-" Last Changed: 2022 Jul 20
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -15,8 +15,12 @@ set cpo&vim
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
-let s:browsefilter = "HTML Files (*.html, *.htm)\t*.html;*.htm\n" ..
- \ "All Files (*.*)\t*.*\n"
+let s:browsefilter = "HTML Files (*.html, *.htm)\t*.html;*.htm\n"
+if has("win32")
+ let s:browsefilter ..= "All Files (*.*)\t*\n"
+else
+ let s:browsefilter ..= "All Files (*)\t*\n"
+endif
let s:match_words = ""
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
diff --git a/runtime/ftplugin/pod.vim b/runtime/ftplugin/pod.vim
index 61a4aa0..81b0011 100644
--- a/runtime/ftplugin/pod.vim
+++ b/runtime/ftplugin/pod.vim
@@ -6,6 +6,8 @@
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
" License: Vim License (see :help license)
" Last Change: 2023 Jul 05
+" Last Change: 2021 Oct 19
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin")
finish
@@ -33,8 +35,12 @@ endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "POD Source Files (*.pod)\t*.pod\n" .
\ "Perl Source Files (*.pl)\t*.pl\n" .
- \ "Perl Modules (*.pm)\t*.pm\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "Perl Modules (*.pm)\t*.pm\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin .= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/poke.vim b/runtime/ftplugin/poke.vim
index 2be8669..4e31700 100644
--- a/runtime/ftplugin/poke.vim
+++ b/runtime/ftplugin/poke.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: GNU Poke
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2021 March 11
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -18,14 +18,18 @@ setlocal formatoptions-=t formatoptions+=croql
setlocal include=load
setlocal suffixesadd=.pk
+let b:undo_ftplugin = "setl fo< com< cms< inc< sua<"
+
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Poke Files (*.pk)\t*.pk\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Poke Files (*.pk)\t*.pk\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
+ let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
-let b:undo_ftplugin = "setl fo< com< cms< inc< sua<" .
- \ " | unlet! b:browsefilter"
-
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/ftplugin/postscr.vim b/runtime/ftplugin/postscr.vim
index 3bdd2e6..b4c5e06 100644
--- a/runtime/ftplugin/postscr.vim
+++ b/runtime/ftplugin/postscr.vim
@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: PostScript
" Maintainer: Mike Williams <mrw@eandem.co.uk>
-" Last Change: 24th April 2012
+" Last Change: 24th April 2012
+" 2024 Jan 14 by Vim Project (browsefilter)
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -25,14 +26,18 @@ if !exists("b:match_words")
endif
" Define patterns for the browse file filter
-if has("gui_win32") && !exists("b:browsefilter")
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "PostScript Files (*.ps)\t*.ps\n" .
- \ "EPS Files (*.eps)\t*.eps\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "EPS Files (*.eps)\t*.eps\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
let b:undo_ftplugin = "setlocal comments< formatoptions<"
- \ . "| unlet! b:browsefiler b:match_ignorecase b:match_words"
+ \ . "| unlet! b:browsefilter b:match_ignorecase b:match_words"
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/ftplugin/ps1.vim b/runtime/ftplugin/ps1.vim
index aac3bc9..d6ab010 100644
--- a/runtime/ftplugin/ps1.vim
+++ b/runtime/ftplugin/ps1.vim
@@ -2,6 +2,7 @@
" Language: Windows PowerShell
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2021 Apr 02
+" 2024 Jan 14 by Vim Project (browsefilter)
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif
@@ -19,14 +20,18 @@ setlocal formatoptions=tcqro
" e.g. Get-Content or Get-ADUser
setlocal iskeyword+=-
-" Change the browse dialog on Win32 to show mainly PowerShell-related files
-if has("gui_win32")
+" Change the browse dialog on Win32 and GTK to show mainly PowerShell-related files
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter =
\ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" .
\ "PowerShell Script Files (*.ps1)\t*.ps1\n" .
\ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" .
- \ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
" Look up keywords by Get-Help:
diff --git a/runtime/ftplugin/ps1xml.vim b/runtime/ftplugin/ps1xml.vim
index 837a330..17bb181 100644
--- a/runtime/ftplugin/ps1xml.vim
+++ b/runtime/ftplugin/ps1xml.vim
@@ -2,6 +2,7 @@
" Language: Windows PowerShell
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2021 Apr 02
+" 2024 Jan 14 by Vim Project (browsefilter)
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif
@@ -16,14 +17,18 @@ setlocal tw=0
setlocal commentstring=#%s
setlocal formatoptions=tcqro
-" Change the browse dialog on Win32 to show mainly PowerShell-related files
-if has("gui_win32")
+" Change the browse dialog on Win32 and GTK to show mainly PowerShell-related files
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter =
\ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" .
\ "PowerShell Script Files (*.ps1)\t*.ps1\n" .
\ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" .
- \ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
" Undo the stuff we changed
diff --git a/runtime/ftplugin/pyrex.vim b/runtime/ftplugin/pyrex.vim
index 251da39..ec25476 100644
--- a/runtime/ftplugin/pyrex.vim
+++ b/runtime/ftplugin/pyrex.vim
@@ -3,6 +3,7 @@
" Maintainer: Marco Barisione <marco.bari@people.it>
" URL: http://marcobari.altervista.org/pyrex_vim.html
" Last Change: 2012 May 18
+" 2024 Jan 14 by Vim Project (browsefilter)
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -14,13 +15,17 @@ set cpo&vim
" Behaves just like Python
runtime! ftplugin/python.vim ftplugin/python_*.vim ftplugin/python/*.vim
-if has("gui_win32") && exists("b:browsefilter")
- let b:browsefilter = "Pyrex files (*.pyx,*.pxd)\t*.pyx;*.pxd\n" .
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
+ let b:browsefilter = "Pyrex files (*.pyx, *.pxd)\t*.pyx;*.pxd\n" .
\ "Python Files (*.py)\t*.py\n" .
\ "C Source Files (*.c)\t*.c\n" .
\ "C Header Files (*.h)\t*.h\n" .
- \ "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "C++ Source Files (*.cpp, *.c++)\t*.cpp;*.c++\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
let &cpo = s:keepcpo
diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim
index 000ddf5..79acaa6 100644
--- a/runtime/ftplugin/python.vim
+++ b/runtime/ftplugin/python.vim
@@ -4,6 +4,7 @@
" Previous Maintainer: James Sully <sullyj3@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change: Mon, 5 October 2020
+" 2024 Jan 14 by Vim Project (browsefilter)
" https://github.com/tpict/vim-ftplugin-python
if exists("b:did_ftplugin") | finish | endif
@@ -110,8 +111,12 @@ if !exists('*<SID>Python_jump')
endif
if has("browsefilter") && !exists("b:browsefilter")
- let b:browsefilter = "Python Files (*.py)\t*.py\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Python Files (*.py)\t*.py\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
if !exists("g:python_recommended_style") || g:python_recommended_style != 0
diff --git a/runtime/ftplugin/qml.vim b/runtime/ftplugin/qml.vim
index fd5ddbb..aa05c11 100644
--- a/runtime/ftplugin/qml.vim
+++ b/runtime/ftplugin/qml.vim
@@ -2,6 +2,7 @@
" Language: QML
" Maintainer: Chase Knowlden <haroldknowlden@gmail.com>
" Last Change: 2023 Aug 16
+" 2023 Aug 23 by Vim Project (browsefilter)
if exists( 'b:did_ftplugin' )
finish
@@ -14,10 +15,15 @@ set cpoptions&vim
" command for undo
let b:undo_ftplugin = "setlocal formatoptions< comments< commentstring<"
-if (has("gui_win32") || has("gui_gtk")) && !exists( 'b:browsefilter' )
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter =
- \ 'QML Files (*.qml,*.qbs)\t*.qml;*.qbs\n' .
- \ 'All Files\t*\n'
+ \ "QML Files (*.qml, *.qbs)\t*.qml;*.qbs\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
+ let b:undo_ftplugin .= " | unlet! b:browsefilter"
endif
" Set 'comments' to format dashed lists in comments.
diff --git a/runtime/ftplugin/r.vim b/runtime/ftplugin/r.vim
index 2896636..6b07744 100644
--- a/runtime/ftplugin/r.vim
+++ b/runtime/ftplugin/r.vim
@@ -1,8 +1,9 @@
" Vim filetype plugin file
-" Language: R
-" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
-" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Sun Apr 24, 2022 09:14AM
+" Language: R
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: 2024 Feb 28 by Vim Project
" Only do this when not yet done for this buffer
if exists("b:did_ftplugin")
@@ -22,8 +23,12 @@ setlocal comments=:#',:###,:##,:#
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "R Source Files (*.R)\t*.R\n" .
- \ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "Files that include R (*.Rnw, *.Rd, *.Rmd, *.Rrst, *.qmd)\t*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
let b:undo_ftplugin = "setl cms< com< fo< isk< | unlet! b:browsefilter"
diff --git a/runtime/ftplugin/racket.vim b/runtime/ftplugin/racket.vim
index 3aa4133..84f5422 100644
--- a/runtime/ftplugin/racket.vim
+++ b/runtime/ftplugin/racket.vim
@@ -4,6 +4,7 @@
" Previous Maintainer: Will Langstroth <will@langstroth.com>
" URL: https://github.com/benknoble/vim-racket
" Last Change: 2022 Aug 29
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin")
finish
@@ -68,8 +69,12 @@ endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter =
- \ "Racket Source Files (*.rkt *.rktl)\t*.rkt;*.rktl\n"
- \. "All Files (*.*)\t*.*\n"
+ \ "Racket Source Files (*.rkt, *.rktl)\t*.rkt;*.rktl\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin .= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/readline.vim b/runtime/ftplugin/readline.vim
index 181d8ac..f5934ce 100644
--- a/runtime/ftplugin/readline.vim
+++ b/runtime/ftplugin/readline.vim
@@ -2,7 +2,7 @@
" Language: readline(3) configuration file
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Last Change: 2022 Dec 09
+" Last Change: 2023 Aug 22
if exists("b:did_ftplugin")
finish
@@ -25,8 +25,12 @@ if exists("loaded_matchit") && !exists("b:match_words")
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Readline Initialization Files (inputrc .inputrc)\tinputrc;*.inputrc\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Readline Intialization Files (inputrc, .inputrc)\tinputrc;*.inputrc\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/registry.vim b/runtime/ftplugin/registry.vim
index 385785a..bb851c5 100644
--- a/runtime/ftplugin/registry.vim
+++ b/runtime/ftplugin/registry.vim
@@ -2,6 +2,7 @@
" Language: Windows Registry export with regedit (*.reg)
" Maintainer: Cade Forester <ahx2323@gmail.com>
" Latest Revision: 2014-01-09
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin")
finish
@@ -12,18 +13,22 @@ let s:cpo_save = &cpo
set cpo&vim
let b:undo_ftplugin =
- \ 'let b:browsefilter = "" | ' .
\ 'setlocal ' .
\ 'comments< '.
\ 'commentstring< ' .
- \ 'formatoptions< '
+ \ 'formatoptions<'
-if has( 'gui_win32' )
+if ( has( 'gui_win32' ) || has( 'gui_gtk' ) )
\ && !exists( 'b:browsefilter' )
let b:browsefilter =
- \ 'registry files (*.reg)\t*.reg\n' .
- \ 'All files (*.*)\t*.*\n'
+ \ "registry files (*.reg)\t*.reg\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
+ let b:undo_ftplugin .= " | unlet! b:browsefilter"
endif
setlocal comments=:;
diff --git a/runtime/ftplugin/rhelp.vim b/runtime/ftplugin/rhelp.vim
index 2fde487..0fa1e56 100644
--- a/runtime/ftplugin/rhelp.vim
+++ b/runtime/ftplugin/rhelp.vim
@@ -1,8 +1,9 @@
" Vim filetype plugin file
-" Language: R help file
-" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
-" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Sun Apr 24, 2022 09:12AM
+" Language: R help file
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: 2024 Feb 28 by Vim Project
" Only do this when not yet done for this buffer
if exists("b:did_ftplugin")
@@ -18,8 +19,12 @@ set cpo&vim
setlocal iskeyword=@,48-57,_,.
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "R Source Files (*.R, *.Rnw, *.Rd, *.Rmd, *.Rrst, *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
let b:undo_ftplugin = "setl isk< | unlet! b:browsefilter"
diff --git a/runtime/ftplugin/rmd.vim b/runtime/ftplugin/rmd.vim
index a407c23..a537017 100644
--- a/runtime/ftplugin/rmd.vim
+++ b/runtime/ftplugin/rmd.vim
@@ -1,8 +1,9 @@
" Vim filetype plugin file
-" Language: R Markdown file
-" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
-" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Mon May 29, 2023 06:31AM
+" Language: R Markdown file
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: 2024 Feb 28 by Vim Project
" Original work by Alex Zvoleff (adjusted from R help for rmd by Michel Kuhlmann)
" Only do this when not yet done for this buffer
@@ -64,8 +65,12 @@ runtime ftplugin/pandoc.vim
let b:did_ftplugin = 1
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "R Source Files (*.R, *.Rnw, *.Rd, *.Rmd, *.Rrst, *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
if exists('b:undo_ftplugin')
diff --git a/runtime/ftplugin/rnoweb.vim b/runtime/ftplugin/rnoweb.vim
index 26c1ab4..8dfdf1e 100644
--- a/runtime/ftplugin/rnoweb.vim
+++ b/runtime/ftplugin/rnoweb.vim
@@ -1,8 +1,9 @@
" Vim filetype plugin file
-" Language: Rnoweb
-" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
-" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Mon Feb 27, 2023 07:16PM
+" Language: Rnoweb
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: 2024 Feb 28 by Vim Project
" Only do this when not yet done for this buffer
if exists("b:did_ftplugin")
@@ -25,8 +26,12 @@ setlocal suffixesadd=.bib,.tex
setlocal comments=b:%,b:#,b:##,b:###,b:#'
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "R Source Files (*.R, *.Rnw, *.Rd, *.Rmd, *.Rrst, *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
function SetRnwCommentStr()
diff --git a/runtime/ftplugin/routeros.vim b/runtime/ftplugin/routeros.vim
index c6e4799..9cd0b10 100644
--- a/runtime/ftplugin/routeros.vim
+++ b/runtime/ftplugin/routeros.vim
@@ -2,6 +2,7 @@
" Language: MikroTik RouterOS Script
" Maintainer: zainin <z@wintr.dev>
" Last Change: 2021 Nov 14
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin")
finish
@@ -18,8 +19,12 @@ setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setlocal com< cms< fo<"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "RouterOS Script Files (*.rsc)\t*.rsc\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "RouterOS Script Files (*.rsc)\t*.rsc\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/rrst.vim b/runtime/ftplugin/rrst.vim
index d9df5e5..d088f98 100644
--- a/runtime/ftplugin/rrst.vim
+++ b/runtime/ftplugin/rrst.vim
@@ -1,8 +1,9 @@
" Vim filetype plugin file
-" Language: reStructuredText documentation format with R code
-" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
-" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Mon Feb 27, 2023 07:16PM
+" Language: reStructuredText documentation format with R code
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: 2024 Feb 28 by Vim Project
" Original work by Alex Zvoleff
" Only do this when not yet done for this buffer
@@ -38,8 +39,12 @@ if !exists("g:rrst_dynamic_comments") || (exists("g:rrst_dynamic_comments") && g
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "R Source Files (*.R, *.Rnw, *.Rd, *.Rmd, *.Rrst, *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
if exists('b:undo_ftplugin')
diff --git a/runtime/ftplugin/ruby.vim b/runtime/ftplugin/ruby.vim
index b07ed53..ab0a325 100644
--- a/runtime/ftplugin/ruby.vim
+++ b/runtime/ftplugin/ruby.vim
@@ -3,6 +3,7 @@
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby
" Last Change: 2023 Dec 31
+" 2024 Jan 14 by Vim Project (browsefilter)
if (exists("b:did_ftplugin"))
finish
@@ -147,8 +148,12 @@ if exists('s:ruby_paths') && stridx(&l:tags, join(map(copy(s:ruby_paths),'v:val.
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Ruby Source Files (*.rb)\t*.rb\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Ruby Source Files (*.rb)\t*.rb\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
let b:undo_ftplugin = "setl inc= sua= path= tags= fo< com< cms< kp="
diff --git a/runtime/ftplugin/rust.vim b/runtime/ftplugin/rust.vim
index 7f1a86e..fb15b44 100644
--- a/runtime/ftplugin/rust.vim
+++ b/runtime/ftplugin/rust.vim
@@ -1,7 +1,7 @@
" Language: Rust
" Description: Vim ftplugin for Rust
" Maintainer: Chris Morgan <me@chrismorgan.info>
-" Last Change: 2023-09-11
+" Last Change: 2024-03-17
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
if exists("b:did_ftplugin")
@@ -94,14 +94,15 @@ if has('conceal') && get(g:, 'rust_conceal', 0)
endif
" Motion Commands {{{1
-
-" Bind motion commands to support hanging indents
-nnoremap <silent> <buffer> [[ :call rust#Jump('n', 'Back')<CR>
-nnoremap <silent> <buffer> ]] :call rust#Jump('n', 'Forward')<CR>
-xnoremap <silent> <buffer> [[ :call rust#Jump('v', 'Back')<CR>
-xnoremap <silent> <buffer> ]] :call rust#Jump('v', 'Forward')<CR>
-onoremap <silent> <buffer> [[ :call rust#Jump('o', 'Back')<CR>
-onoremap <silent> <buffer> ]] :call rust#Jump('o', 'Forward')<CR>
+if !exists("g:no_plugin_maps") && !exists("g:no_rust_maps")
+ " Bind motion commands to support hanging indents
+ nnoremap <silent> <buffer> [[ :call rust#Jump('n', 'Back')<CR>
+ nnoremap <silent> <buffer> ]] :call rust#Jump('n', 'Forward')<CR>
+ xnoremap <silent> <buffer> [[ :call rust#Jump('v', 'Back')<CR>
+ xnoremap <silent> <buffer> ]] :call rust#Jump('v', 'Forward')<CR>
+ onoremap <silent> <buffer> [[ :call rust#Jump('o', 'Back')<CR>
+ onoremap <silent> <buffer> ]] :call rust#Jump('o', 'Forward')<CR>
+endif
" Commands {{{1
@@ -176,12 +177,12 @@ let b:undo_ftplugin = "
\|delcommand -buffer RustInfoToClipboard
\|delcommand -buffer RustInfoToFile
\|delcommand -buffer RustTest
- \|nunmap <buffer> [[
- \|nunmap <buffer> ]]
- \|xunmap <buffer> [[
- \|xunmap <buffer> ]]
- \|ounmap <buffer> [[
- \|ounmap <buffer> ]]
+ \|silent! nunmap <buffer> [[
+ \|silent! nunmap <buffer> ]]
+ \|silent! xunmap <buffer> [[
+ \|silent! xunmap <buffer> ]]
+ \|silent! ounmap <buffer> [[
+ \|silent! ounmap <buffer> ]]
\|setlocal matchpairs-=<:>
\|unlet b:match_skip
\"
diff --git a/runtime/ftplugin/sed.vim b/runtime/ftplugin/sed.vim
index 0073872..acd0890 100644
--- a/runtime/ftplugin/sed.vim
+++ b/runtime/ftplugin/sed.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: sed
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2020 Apr 1
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -18,8 +18,12 @@ setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl com< cms< fo<"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "sed Script Files (*.sed)\t*.sed\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "sed Script Files (*.sed)\t*.sed\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/sgml.vim b/runtime/ftplugin/sgml.vim
index ef52125..b6dbf1a 100644
--- a/runtime/ftplugin/sgml.vim
+++ b/runtime/ftplugin/sgml.vim
@@ -1,10 +1,11 @@
" Vim filetype plugin file
-" Language: sgml
+" Language: sgml
"
" This runtime file is looking for a new maintainer.
"
" Former maintainer: Dan Sharp
-" Last Changed: 20 Jan 2009
+" Last Change: 2009 Jan 20
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin") | finish | endif
@@ -15,8 +16,12 @@ set cpo-=C
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
-let s:browsefilter = "XML Files (*.xml)\t*.xml\n" .
- \ "All Files (*.*)\t*.*\n"
+let s:browsefilter = "XML Files (*.xml)\t*.xml\n"
+if has("win32")
+ let s:browsefilter .= "All Files (*.*)\t*\n"
+else
+ let s:browsefilter .= "All Files (*)\t*\n"
+endif
runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim
let b:did_ftplugin = 1
@@ -30,7 +35,7 @@ if exists("b:browsefilter")
endif
" Change the :browse e filter to primarily show xml-related files.
-if has("gui_win32")
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter="SGML Files (*.sgml,*.sgm)\t*.sgm*\n" . s:browsefilter
endif
diff --git a/runtime/ftplugin/sh.vim b/runtime/ftplugin/sh.vim
index c1a6bc5..6d2093b 100644
--- a/runtime/ftplugin/sh.vim
+++ b/runtime/ftplugin/sh.vim
@@ -4,7 +4,7 @@
" Previous Maintainer: Dan Sharp
" Contributor: Enno Nagel <ennonagel+vim@gmail.com>
" Eisuke Kawashima
-" Last Change: 2023 Sep 28
+" Last Change: 2024 Feb 27
if exists("b:did_ftplugin")
finish
@@ -14,7 +14,7 @@ let b:did_ftplugin = 1
let s:save_cpo = &cpo
set cpo-=C
-setlocal comments=:#
+setlocal comments=b:#
setlocal commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
@@ -33,10 +33,14 @@ if exists("loaded_matchit") && !exists("b:match_words")
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Bourne Shell Scripts (*.sh)\t*.sh\n" ..
- \ "Korn Shell Scripts (*.ksh)\t*.ksh\n" ..
- \ "Bash Shell Scripts (*.bash)\t*.bash\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Bourne Shell Scripts (*.sh)\t*.sh\n" ..
+ \ "Korn Shell Scripts (*.ksh)\t*.ksh\n" ..
+ \ "Bash Shell Scripts (*.bash)\t*.bash\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/solution.vim b/runtime/ftplugin/solution.vim
index bd30c7b..19ec392 100644
--- a/runtime/ftplugin/solution.vim
+++ b/runtime/ftplugin/solution.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Microsoft Visual Studio Solution
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2021 Dec 15
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -26,8 +26,12 @@ if exists("loaded_matchit") && !exists("b:match_words")
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Microsoft Visual Studio Solution Files\t*.sln\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Microsoft Visual Studio Solution Files(*.sln)\t*.sln\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/sql.vim b/runtime/ftplugin/sql.vim
index 7a29d39..c85232f 100644
--- a/runtime/ftplugin/sql.vim
+++ b/runtime/ftplugin/sql.vim
@@ -3,6 +3,7 @@
" Version: 12.0
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Last Change: 2017 Mar 07
+" 2024 Jan 14 by Vim Project (browsefilter)
" Download: http://vim.sourceforge.net/script.php?script_id=454
" For more details please use:
@@ -272,10 +273,14 @@ let b:undo_ftplugin = "setl comments< formatoptions< define< omnifunc<" .
let b:did_ftplugin = 1
let b:current_ftplugin = 'sql'
-" Win32 can filter files in the browse dialog
-if has("gui_win32") && !exists("b:browsefilter")
- let b:browsefilter = "SQL Files (*.sql)\t*.sql\n" .
- \ "All Files (*.*)\t*.*\n"
+" Win32 and GTK can filter files in the browse dialog
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
+ let b:browsefilter = "SQL Files (*.sql)\t*.sql\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
" Some standard expressions for use with the matchit strings
diff --git a/runtime/ftplugin/svg.vim b/runtime/ftplugin/svg.vim
index 6f16b1a..4ee9e4b 100644
--- a/runtime/ftplugin/svg.vim
+++ b/runtime/ftplugin/svg.vim
@@ -1,10 +1,11 @@
" Vim filetype plugin file
-" Language: svg
+" Language: svg
"
" This runtime file is looking for a new maintainer.
"
" Former maintainer: Dan Sharp
-" Last Changed: 20 Jan 2009
+" Last Change: 2009 Jan 20
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin") | finish | endif
@@ -15,8 +16,12 @@ set cpo-=C
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
-let s:browsefilter = "XML Files (*.xml)\t*.xml\n" .
- \ "All Files (*.*)\t*.*\n"
+let s:browsefilter = "XML Files (*.xml)\t*.xml\n"
+if has("win32")
+ let s:browsefilter .= "All Files (*.*)\t*\n"
+else
+ let s:browsefilter .= "All Files (*)\t*\n"
+endif
runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim
let b:did_ftplugin = 1
@@ -30,7 +35,7 @@ if exists("b:browsefilter")
endif
" Change the :browse e filter to primarily show xml-related files.
-if has("gui_win32")
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter="SVG Files (*.svg)\t*.svg\n" . s:browsefilter
endif
diff --git a/runtime/ftplugin/tcl.vim b/runtime/ftplugin/tcl.vim
index 1cc24d3..fa90009 100644
--- a/runtime/ftplugin/tcl.vim
+++ b/runtime/ftplugin/tcl.vim
@@ -2,6 +2,7 @@
" Language: Tcl
" Maintainer: Robert L Hicks <sigzero@gmail.com>
" Latest Revision: 2009-05-01
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin")
finish
@@ -18,10 +19,14 @@ setlocal commentstring=#%s
setlocal formatoptions+=croql
" Change the browse dialog on Windows to show mainly Tcl-related files
-if has("gui_win32")
- let b:browsefilter = "Tcl Source Files (.tcl)\t*.tcl\n" .
- \ "Tcl Test Files (.test)\t*.test\n" .
- \ "All Files (*.*)\t*.*\n"
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
+ let b:browsefilter = "Tcl Source Files (*.tcl)\t*.tcl\n" .
+ \ "Tcl Test Files (*.test)\t*.test\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
"-----------------------------------------------------------------------------
diff --git a/runtime/ftplugin/tcsh.vim b/runtime/ftplugin/tcsh.vim
index b2467b4..74095aa 100644
--- a/runtime/ftplugin/tcsh.vim
+++ b/runtime/ftplugin/tcsh.vim
@@ -2,7 +2,7 @@
" Language: tcsh
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Dan Sharp
-" Last Change: 2023 Oct 09
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -13,8 +13,12 @@ set cpo-=C
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
-let s:browsefilter = "csh Files (*.csh)\t*.csh\n" ..
- \ "All Files (*.*)\t*.*\n"
+let s:browsefilter = "csh Files (*.csh)\t*.csh\n"
+if has("win32")
+ let s:browsefilter ..= "All Files (*.*)\t*\n"
+else
+ let s:browsefilter ..= "All Files (*)\t*\n"
+endif
runtime! ftplugin/csh.vim ftplugin/csh_*.vim ftplugin/csh/*.vim
let b:did_ftplugin = 1
diff --git a/runtime/ftplugin/tidy.vim b/runtime/ftplugin/tidy.vim
index b81b66d..9a61379 100644
--- a/runtime/ftplugin/tidy.vim
+++ b/runtime/ftplugin/tidy.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: HTML Tidy Configuration
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2020 Sep 4
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -15,17 +15,21 @@ setlocal comments=:#,://
setlocal commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
+let b:undo_ftplugin = "setl fo< com< cms<"
+
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "HTML Tidy Files (tidyrc, .tidyrc, tidy.conf)\ttidyrc;.tidyrc;tidy.conf\n" .
\ "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
\ "XHTML Files (*.xhtml, *.xhtm)\t*.xhtml;*.xhtm\n" .
- \ "XML Files (*.xml)\t*.xml\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "XML Files (*.xml)\t*.xml\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
+ let b:undo_ftplugin .= " | unlet! b:browsefilter"
endif
-let b:undo_ftplugin = "setl fo< com< cms<" .
- \ " | unlet! b:browsefilter"
-
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/ftplugin/typescript.vim b/runtime/ftplugin/typescript.vim
index f701ae9..680521d 100644
--- a/runtime/ftplugin/typescript.vim
+++ b/runtime/ftplugin/typescript.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: TypeScript
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2019 Aug 30
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -22,6 +22,8 @@ setlocal commentstring=//%s
setlocal suffixesadd+=.ts,.d.ts,.tsx,.js,.jsx,.cjs,.mjs
+let b:undo_ftplugin = "setl fo< com< cms< sua<"
+
" Change the :browse e filter to primarily show TypeScript-related files.
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter="TypeScript Files (*.ts)\t*.ts\n" .
@@ -29,11 +31,14 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
\ "TSX Files (*.tsx)\t*.tsx\n" .
\ "JavaScript Files (*.js)\t*.js\n" .
\ "JavaScript Modules (*.es, *.cjs, *.mjs)\t*.es;*.cjs;*.mjs\n" .
- \ "JSON Files (*.json)\t*.json\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "JSON Files (*.json)\t*.json\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
+ let b:undo_ftplugin .= " | unlet! b:browsefilter"
endif
-let b:undo_ftplugin = "setl fo< com< cms< sua< | unlet! b:browsefilter"
-
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/ftplugin/vb.vim b/runtime/ftplugin/vb.vim
index 5a95481..94a2f35 100644
--- a/runtime/ftplugin/vb.vim
+++ b/runtime/ftplugin/vb.vim
@@ -2,7 +2,7 @@
" Language: Visual Basic (ft=vb)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
-" Last Change: 2021 Nov 17
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -62,8 +62,12 @@ endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Visual Basic Source Files (*.bas)\t*.bas\n" .
- \ "Visual Basic Form Files (*.frm)\t*.frm\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "Visual Basic Form Files (*.frm)\t*.frm\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin .= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/verilog.vim b/runtime/ftplugin/verilog.vim
index cbf30a3..83c3754 100644
--- a/runtime/ftplugin/verilog.vim
+++ b/runtime/ftplugin/verilog.vim
@@ -2,6 +2,7 @@
" Language: Verilog HDL
" Maintainer: Chih-Tsun Huang <cthuang@cs.nthu.edu.tw>
" Last Change: 2017 Aug 25 by Chih-Tsun Huang
+" 2024 Jan 14 by Vim Project (browsefilter)
" URL: http://www.cs.nthu.edu.tw/~cthuang/vim/ftplugin/verilog.vim
"
" Credits:
@@ -36,10 +37,14 @@ if &textwidth == 0
setlocal tw=78
endif
-" Win32 can filter files in the browse dialog
-if has("gui_win32") && !exists("b:browsefilter")
- let b:browsefilter = "Verilog Source Files (*.v)\t*.v\n" .
- \ "All Files (*.*)\t*.*\n"
+" Win32 and GTK can filter files in the browse dialog
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
+ let b:browsefilter = "Verilog Source Files (*.v)\t*.v\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
" Let the matchit plugin know what items can be matched.
diff --git a/runtime/ftplugin/vhdl.vim b/runtime/ftplugin/vhdl.vim
index ff56166..3850c70 100644
--- a/runtime/ftplugin/vhdl.vim
+++ b/runtime/ftplugin/vhdl.vim
@@ -3,6 +3,7 @@
" Maintainer: R.Shankar <shankar.pec?gmail.com>
" Modified By: Gerald Lai <laigera+vim?gmail.com>
" Last Change: 2011 Dec 11
+" 2024 Jan 14 by Vim Project (browsefilter)
" 2023 Aug 28 by Vim Project (undo_ftplugin, commentstring)
" Only do this when not done yet for this buffer
@@ -28,14 +29,15 @@ setlocal commentstring=--\ %s
" Format comments to be up to 78 characters long
"setlocal tw=75
-" let b:undo_ftplugin = "setl cms< com< fo< tw<"
-
let b:undo_ftplugin = "setl cms< "
-" Win32 can filter files in the browse dialog
-"if has("gui_win32") && !exists("b:browsefilter")
-" let b:browsefilter = "Verilog Source Files (*.v)\t*.v\n" .
-" \ "All Files (*.*)\t*.*\n"
+" Win32 and GTK can filter files in the browse dialog
+"if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
+" if has("win32")
+" let b:browsefilter ..= "All Files (*.*)\t*\n"
+" else
+" let b:browsefilter ..= "All Files (*)\t*\n"
+" endif
" let b:undo_ftplugin .= " | unlet! b:browsefilter"
"endif
diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim
index 1d340e4..575af74 100644
--- a/runtime/ftplugin/vim.vim
+++ b/runtime/ftplugin/vim.vim
@@ -58,7 +58,7 @@ endif
" Set 'comments' to format dashed lists in comments, both in Vim9 and legacy
" script.
-setlocal com=sO:#\ -,mO:#\ \ ,eO:##,:#,sO:\"\ -,mO:\"\ \ ,eO:\"\",:\"
+setlocal com=sO:#\ -,mO:#\ \ ,eO:##,:#\\\ ,:#,sO:\"\ -,mO:\"\ \ ,eO:\"\",:\"\\\ ,:\"
" set 'include' to recognize import commands
setlocal include=\\v^\\s*import\\s*(autoload)?
diff --git a/runtime/ftplugin/wget.vim b/runtime/ftplugin/wget.vim
index db3b621..c7fdec2 100644
--- a/runtime/ftplugin/wget.vim
+++ b/runtime/ftplugin/wget.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Wget configuration file (/etc/wgetrc ~/.wgetrc)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2022 Apr 28
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -18,8 +18,12 @@ setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl fo< com< cms<"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Wget Configuration File (wgetrc, .wgetrc)\twgetrc;.wgetrc\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Wget Configuration File (wgetrc, .wgetrc)\twgetrc;.wgetrc\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/wget2.vim b/runtime/ftplugin/wget2.vim
index 8cfcd51..40da5c5 100644
--- a/runtime/ftplugin/wget2.vim
+++ b/runtime/ftplugin/wget2.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Wget2 configuration file (/etc/wget2rc ~/.wget2rc)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2022 Apr 28
+" Last Change: 2024 Jan 14
if exists("b:did_ftplugin")
finish
@@ -18,8 +18,12 @@ setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl fo< com< cms<"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter = "Wget2 Configuration File (wget2rc, .wget2rc)\twget2rc;.wget2rc\n" ..
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Wget2 Configuration File (wget2rc, .wget2rc)\twget2rc;.wget2rc\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
diff --git a/runtime/ftplugin/xhtml.vim b/runtime/ftplugin/xhtml.vim
index d2a1c0b..8a45ba7 100644
--- a/runtime/ftplugin/xhtml.vim
+++ b/runtime/ftplugin/xhtml.vim
@@ -1,10 +1,11 @@
" Vim filetype plugin file
-" Language: xhtml
+" Language: xhtml
"
" This runtime file is looking for a new maintainer.
"
" Former maintainer: Dan Sharp
-" Last Changed: 20 Jan 2009
+" Last Changed: 2009 Jan 20
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin") | finish | endif
@@ -16,8 +17,12 @@ set cpo-=C
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
let s:browsefilter = "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
- \ "XML Files (*.xml)\t*.xml\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "XML Files (*.xml)\t*.xml\n"
+if has("win32")
+ let s:browsefilter .= "All Files (*.*)\t*\n"
+else
+ let s:browsefilter .= "All Files (*)\t*\n"
+endif
let s:match_words = ""
runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim
@@ -57,7 +62,7 @@ if exists("loaded_matchit")
endif
" Change the :browse e filter to primarily show tcsh-related files.
-if has("gui_win32")
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter="XHTML files (*.xhtml, *.xhtm)\t*.xhtml;*.xhtm\n" . s:browsefilter
endif
diff --git a/runtime/ftplugin/xml.vim b/runtime/ftplugin/xml.vim
index 9aa188c..b81c398 100644
--- a/runtime/ftplugin/xml.vim
+++ b/runtime/ftplugin/xml.vim
@@ -2,6 +2,7 @@
" Language: xml
" Maintainer: Christian Brabandt <cb@256bit.org>
" Last Changed: Dec 07th, 2018
+" 2024 Jan 14 by Vim Project (browsefilter)
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" Previous Maintainer: Dan Sharp
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
@@ -52,8 +53,12 @@ command! -nargs=? XMLent call xmlcomplete#CreateEntConnection(<f-args>)
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter="XML Files (*.xml)\t*.xml\n" .
\ "DTD Files (*.dtd)\t*.dtd\n" .
- \ "XSD Files (*.xsd)\t*.xsd\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "XSD Files (*.xsd)\t*.xsd\n"
+ if has("win32")
+ let b:browsefilter .= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter .= "All Files (*)\t*\n"
+ endif
endif
" Undo the stuff we changed.
diff --git a/runtime/ftplugin/xsd.vim b/runtime/ftplugin/xsd.vim
index 7d3efbb..aaec8a0 100644
--- a/runtime/ftplugin/xsd.vim
+++ b/runtime/ftplugin/xsd.vim
@@ -1,10 +1,11 @@
" Vim filetype plugin file
-" Language: xsd
+" Language: xsd
"
" This runtime file is looking for a new maintainer.
"
" Former maintainer: Dan Sharp
-" Last Changed: 20 Jan 2009
+" Last Changed: 2009 Jan 20
+" 2024 Jan 14 by Vim Project (browsefilter)
if exists("b:did_ftplugin") | finish | endif
@@ -15,8 +16,12 @@ set cpo-=C
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
-let s:browsefilter = "XML Files (*.xml)\t*.xml\n" .
- \ "All Files (*.*)\t*.*\n"
+let s:browsefilter = "XML Files (*.xml)\t*.xml\n"
+if has("win32")
+ let s:browsefilter .= "All Files (*.*)\t*\n"
+else
+ let s:browsefilter .= "All Files (*)\t*\n"
+endif
runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim
let b:did_ftplugin = 1
@@ -30,7 +35,7 @@ if exists("b:browsefilter")
endif
" Change the :browse e filter to primarily show xsd-related files.
-if has("gui_win32")
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter="XSD Files (*.xsd)\t*.xsd\n" . s:browsefilter
endif
diff --git a/runtime/ftplugin/xslt.vim b/runtime/ftplugin/xslt.vim
index 47e78eb..70986c9 100644
--- a/runtime/ftplugin/xslt.vim
+++ b/runtime/ftplugin/xslt.vim
@@ -14,5 +14,5 @@ let b:did_ftplugin = 1
" Change the :browse e filter to primarily show xsd-related files.
if (has("gui_win32") || has("gui_gtk")) && exists("b:browsefilter")
- let b:browsefilter = "XSLT Files (*.xsl,*.xslt)\t*.xsl;*.xslt\n" . b:browsefilter
+ let b:browsefilter = "XSLT Files (*.xsl, *.xslt)\t*.xsl;*.xslt\n" . b:browsefilter
endif
diff --git a/runtime/indent/Make_mvc.mak b/runtime/indent/Make_mvc.mak
new file mode 100644
index 0000000..0f73d7f
--- /dev/null
+++ b/runtime/indent/Make_mvc.mak
@@ -0,0 +1,21 @@
+# Makefile for running indent tests on OS Windows.
+# Made on the base of a indent/Makefile.
+# Restorer, 13.03.2024
+
+.SUFFIXES:
+
+VIM = vim.exe
+VIMRUNTIME = ..
+
+# Run the tests that didn't run yet or failed previously.
+# If a test succeeds a testdir\*.out file will be written.
+# If a test fails a testdir\*.fail file will be written.
+test :
+ @ set "VIMRUNTIME=$(VIMRUNTIME)"
+ $(VIM) --clean --not-a-term -u testdir\runtest.vim
+
+
+clean testclean :
+ @ if exist testdir\*.fail del /q testdir\*.fail
+ @ if exist testdir\*.out del /q testdir\*.out
+
diff --git a/runtime/indent/Makefile b/runtime/indent/Makefile
index f6c4473..66ded80 100644
--- a/runtime/indent/Makefile
+++ b/runtime/indent/Makefile
@@ -1,5 +1,8 @@
# Portable Makefile for running indent tests.
+.SUFFIXES:
+.PHONY: test clean testclean
+
VIM = vim
VIMRUNTIME = ..
diff --git a/runtime/indent/odin.vim b/runtime/indent/odin.vim
new file mode 100644
index 0000000..e3318c4
--- /dev/null
+++ b/runtime/indent/odin.vim
@@ -0,0 +1,119 @@
+vim9script
+
+# Vim indent plugin file
+# Language: Odin
+# Maintainer: Maxim Kim <habamax@gmail.com>
+# Website: https://github.com/habamax/vim-odin
+# Last Change: 2024-01-15
+
+if exists("b:did_indent")
+ finish
+endif
+b:did_indent = 1
+
+b:undo_indent = 'setlocal cindent< cinoptions< cinkeys< indentexpr<'
+
+setlocal cindent
+setlocal cinoptions=L0,m1,(s,j1,J1,l1,+0,:0,#1
+setlocal cinkeys=0{,0},0),0],!^F,:,o,O
+
+setlocal indentexpr=GetOdinIndent(v:lnum)
+
+def PrevLine(lnum: number): number
+ var plnum = lnum - 1
+ var pline: string
+ while plnum > 1
+ plnum = prevnonblank(plnum)
+ pline = getline(plnum)
+ # XXX: take into account nested multiline /* /* */ */ comments
+ if pline =~ '\*/\s*$'
+ while getline(plnum) !~ '/\*' && plnum > 1
+ plnum -= 1
+ endwhile
+ if getline(plnum) =~ '^\s*/\*'
+ plnum -= 1
+ else
+ break
+ endif
+ elseif pline =~ '^\s*//'
+ plnum -= 1
+ else
+ break
+ endif
+ endwhile
+ return plnum
+enddef
+
+def GetOdinIndent(lnum: number): number
+ var plnum = PrevLine(lnum)
+ var pline = getline(plnum)
+ var pindent = indent(plnum)
+ # workaround of cindent "hang"
+ # if the previous line looks like:
+ # : #{}
+ # : #whatever{whateverelse}
+ # and variations where : # { } are in the string
+ # cindent(lnum) hangs
+ if pline =~ ':\s\+#.*{.*}'
+ return pindent
+ endif
+
+ var indent = cindent(lnum)
+ var line = getline(lnum)
+
+ if line =~ '^\s*#\k\+'
+ if pline =~ '[{:]\s*$'
+ indent = pindent + shiftwidth()
+ else
+ indent = pindent
+ endif
+ elseif pline =~ 'switch\s.*{\s*$'
+ indent = pindent
+ elseif pline =~ 'case\s*.*,\s*\(//.*\)\?$' # https://github.com/habamax/vim-odin/issues/8
+ indent = pindent + matchstr(pline, 'case\s*')->strcharlen()
+ elseif line =~ '^\s*case\s\+.*,\s*$'
+ indent = pindent - shiftwidth()
+ elseif pline =~ 'case\s*.*:\s*\(//.*\)\?$'
+ if line !~ '^\s*}\s*$' && line !~ '^\s*case[[:space:]:]'
+ indent = pindent + shiftwidth()
+ endif
+ elseif pline =~ '^\s*@.*' && line !~ '^\s*}'
+ indent = pindent
+ elseif pline =~ ':[:=].*}\s*$'
+ indent = pindent
+ elseif pline =~ '^\s*}\s*$'
+ if line !~ '^\s*}' && line !~ 'case\s*.*:\s*$'
+ indent = pindent
+ else
+ indent = pindent - shiftwidth()
+ endif
+ elseif pline =~ '\S:\s*$'
+ # looking up for a case something,
+ # whatever,
+ # anything:
+ # ... 20 lines before
+ for idx in range(plnum - 1, plnum - 21, -1)
+ if plnum < 1
+ break
+ endif
+ if getline(idx) =~ '^\s*case\s.*,\s*$'
+ indent = indent(idx) + shiftwidth()
+ break
+ endif
+ endfor
+ elseif pline =~ '{[^{]*}\s*$' && line !~ '^\s*[})]\s*$' # https://github.com/habamax/vim-odin/issues/2
+ indent = pindent
+ elseif pline =~ '^\s*}\s*$' # https://github.com/habamax/vim-odin/issues/3
+ # Find line with opening { and check if there is a label:
+ # If there is, return indent of the closing }
+ cursor(plnum, 1)
+ silent normal! %
+ var brlnum = line('.')
+ var brline = getline('.')
+ if plnum != brlnum && (brline =~ '^\s*\k\+:\s\+for' || brline =~ '^\s*\k\+\s*:=')
+ indent = pindent
+ endif
+ endif
+
+ return indent
+enddef
diff --git a/runtime/indent/qml.vim b/runtime/indent/qml.vim
index 8c9fa91..cf0ba41 100644
--- a/runtime/indent/qml.vim
+++ b/runtime/indent/qml.vim
@@ -1,7 +1,7 @@
" Vim indent file
" Language: QML
" Maintainer: Chase Knowlden <haroldknowlden@gmail.com>
-" Last Change: 2023 Aug 16
+" Last Change: 2024 Jan 24 by Vim Project
"
" Improved JavaScript indent script.
@@ -40,10 +40,10 @@ function! s:GetQmlIndent()
" bracket/brace/paren blocks
if pline =~ '[{[(]$'
- let ind += &sw
+ let ind += shiftwidth()
endif
if line =~ '^[}\])]'
- let ind -= &sw
+ let ind -= shiftwidth()
endif
" '/*' comments
diff --git a/runtime/indent/r.vim b/runtime/indent/r.vim
index f7956e4..339c46b 100644
--- a/runtime/indent/r.vim
+++ b/runtime/indent/r.vim
@@ -1,8 +1,10 @@
" Vim indent file
" Language: R
-" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
-" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Sun Oct 08, 2023 10:45AM
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: 2023 Oct 08 10:45AM
+" 2024 Feb 19 by Vim Project (announce adoption)
" Only load this indent file when no other was loaded.
diff --git a/runtime/indent/racket.vim b/runtime/indent/racket.vim
index 2d45d89..d301cd6 100644
--- a/runtime/indent/racket.vim
+++ b/runtime/indent/racket.vim
@@ -3,7 +3,7 @@
" Maintainer: D. Ben Knoble <ben.knoble+github@gmail.com>
" Previous Maintainer: Will Langstroth <will@langstroth.com>
" URL: https://github.com/benknoble/vim-racket
-" Last Change: 2023 Jul 17
+" Last Change: 2024 Jan 31
if exists("b:did_indent")
finish
@@ -66,4 +66,4 @@ setlocal lispwords+=if-view,case-view,cond-view,list-view,dyn-view
setlocal lispwords+=case/dep
setlocal lispwords+=define/obs
-let b:undo_indent = "setlocal indentexpr< lisp< lispoptions< ai< si< lw<"
+let b:undo_indent = "setlocal lisp< ai< si< lw<" .. (has('vim9script') ? ' indentexpr< lispoptions<' : '')
diff --git a/runtime/indent/rhelp.vim b/runtime/indent/rhelp.vim
index 334802a..97820ae 100644
--- a/runtime/indent/rhelp.vim
+++ b/runtime/indent/rhelp.vim
@@ -1,8 +1,10 @@
" Vim indent file
" Language: R Documentation (Help), *.Rd
-" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
-" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Mon Feb 27, 2023 07:01PM
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: 2023 Feb 27 07:01PM
+" 2024 Feb 19 by Vim Project (announce adoption)
" Only load this indent file when no other was loaded.
diff --git a/runtime/indent/rmd.vim b/runtime/indent/rmd.vim
index a043b0c..f2d34a3 100644
--- a/runtime/indent/rmd.vim
+++ b/runtime/indent/rmd.vim
@@ -1,8 +1,10 @@
" Vim indent file
" Language: Rmd
-" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
-" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Wed Nov 09, 2022 09:44PM
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: 2022 Nov 09 09:44PM
+" 2024 Feb 19 by Vim Project (announce adoption)
" Only load this indent file when no other was loaded.
diff --git a/runtime/indent/rnoweb.vim b/runtime/indent/rnoweb.vim
index 668cdb7..1bdf7f3 100644
--- a/runtime/indent/rnoweb.vim
+++ b/runtime/indent/rnoweb.vim
@@ -1,8 +1,10 @@
" Vim indent file
" Language: Rnoweb
-" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
-" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Mon Feb 27, 2023 07:17PM
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: 2024 Feb 27 07:17PM
+" 2024 Feb 19 by Vim Project (announce adoption)
" Only load this indent file when no other was loaded.
diff --git a/runtime/indent/rrst.vim b/runtime/indent/rrst.vim
index 585c5e6..73c8b04 100644
--- a/runtime/indent/rrst.vim
+++ b/runtime/indent/rrst.vim
@@ -1,8 +1,10 @@
" Vim indent file
" Language: Rrst
-" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
-" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Feb 25, 2023
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: 2023 Feb 25
+" 2024 Feb 19 by Vim Project (announce adoption)
" Only load this indent file when no other was loaded.
diff --git a/runtime/indent/testdir/runtest.vim b/runtime/indent/testdir/runtest.vim
index 882a140..dde8c5c 100644
--- a/runtime/indent/testdir/runtest.vim
+++ b/runtime/indent/testdir/runtest.vim
@@ -2,7 +2,7 @@
"
" Current directory must be runtime/indent.
-" Only do this with the +eval feature
+" Only do this with the +eval feature.
if 1
set nocp
@@ -18,7 +18,7 @@ au! SwapExists * call HandleSwapExists()
func HandleSwapExists()
" Ignore finding a swap file for the test input and output, the user might be
" editing them and that's OK.
- if expand('<afile>') =~ '.*\.\(in\|out\|fail\|ok\)'
+ if expand('<afile>') =~ '.*\.\%(in\|out\|fail\|ok\)'
let v:swapchoice = 'e'
endif
endfunc
@@ -30,19 +30,19 @@ for fname in glob('testdir/*.in', 1, 1)
" Execute the test if the .out file does not exist of when the .in file is
" newer.
let in_time = getftime(fname)
- let out_time = getftime(root . '.out')
+ let out_time = getftime(root .. '.out')
if out_time < 0 || in_time > out_time
- call delete(root . '.fail')
- call delete(root . '.out')
+ call delete(root .. '.fail')
+ call delete(root .. '.out')
set sw& ts& filetype=
- exe 'split ' . fname
+ exe 'split ' .. fname
let did_some = 0
let failed = 0
let end = 1
while 1
- " Indent all the lines between "START_INDENT" and "END_INDENT"
+ " Indent all the lines between "START_INDENT" and "END_INDENT".
exe end
let start = search('\<START_INDENT\>')
let end = search('\<END_INDENT\>')
@@ -63,7 +63,7 @@ for fname in glob('testdir/*.in', 1, 1)
exe lnum + 1
let lnum_exe = search('\<INDENT_EXE\>')
exe lnum + 1
- let indent_at = search('\<INDENT_\(AT\|NEXT\|PREV\)\>')
+ let indent_at = search('\<INDENT_\%(AT\|NEXT\|PREV\)\>')
if lnum_exe > 0 && lnum_exe < end && (indent_at <= 0 || lnum_exe < indent_at)
exe substitute(getline(lnum_exe), '.*INDENT_EXE', '', '')
let lnum = lnum_exe
@@ -87,15 +87,15 @@ for fname in glob('testdir/*.in', 1, 1)
exe start + 1
if pattern == ''
try
- exe 'normal =' . (end - 1) . 'G'
+ exe 'normal =' .. (end - 1) .. 'G'
catch
- call append(indent_at, 'ERROR: ' . v:exception)
+ call append(indent_at, 'ERROR: ' .. v:exception)
let failed = 1
endtry
else
let lnum = search(pattern)
if lnum <= 0
- call append(indent_at, 'ERROR: pattern not found: ' . pattern)
+ call append(indent_at, 'ERROR: pattern not found: ' .. pattern)
let failed = 1
break
endif
@@ -109,7 +109,7 @@ for fname in glob('testdir/*.in', 1, 1)
try
normal ==
catch
- call append(indent_at, 'ERROR: ' . v:exception)
+ call append(indent_at, 'ERROR: ' .. v:exception)
let failed = 1
endtry
endif
@@ -118,21 +118,21 @@ for fname in glob('testdir/*.in', 1, 1)
if !failed
" Check the resulting text equals the .ok file.
- if getline(1, '$') != readfile(root . '.ok')
+ if getline(1, '$') != readfile(root .. '.ok')
let failed = 1
endif
endif
if failed
let failed_count += 1
- exe 'write ' . root . '.fail'
- echoerr 'Test ' . fname . ' FAILED!'
+ exe 'write ' .. root .. '.fail'
+ echoerr 'Test ' .. fname .. ' FAILED!'
else
- exe 'write ' . root . '.out'
- echo "Test " . fname . " OK\n"
+ exe 'write ' .. root .. '.out'
+ echo "Test " .. fname .. " OK\n"
endif
- quit! " close the indented file
+ quit! " Close the indented file.
endif
endfor
@@ -140,7 +140,7 @@ endfor
endif
if failed_count > 0
- " have make report an error
+ " Have make report an error.
cquit
endif
qall!
diff --git a/runtime/indent/testdir/vim.in b/runtime/indent/testdir/vim.in
index c2e149a..1ff2d0d 100644
--- a/runtime/indent/testdir/vim.in
+++ b/runtime/indent/testdir/vim.in
@@ -946,3 +946,8 @@ Blue
Black
endenum
" END_INDENT
+
+" START_INDENT
+call prop_type_add('indent_after_literal_dict', #{ foo: 'bar' })
+call prop_type_delete('indent_after_literal_dict')
+" END_INDENT
diff --git a/runtime/indent/testdir/vim.ok b/runtime/indent/testdir/vim.ok
index b10e081..fa8869b 100644
--- a/runtime/indent/testdir/vim.ok
+++ b/runtime/indent/testdir/vim.ok
@@ -946,3 +946,8 @@ enum Color
Black
endenum
" END_INDENT
+
+" START_INDENT
+call prop_type_add('indent_after_literal_dict', #{ foo: 'bar' })
+call prop_type_delete('indent_after_literal_dict')
+" END_INDENT
diff --git a/runtime/indent/yaml.vim b/runtime/indent/yaml.vim
index 93fd8ea..e5daf9f 100644
--- a/runtime/indent/yaml.vim
+++ b/runtime/indent/yaml.vim
@@ -3,6 +3,7 @@
" Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
" Last Updates: Lukas Reineke, "lacygoill"
" Last Change: 2022 Jun 17
+" 2024 Feb 29 disable mulitline indent by default (The Vim project)
" Only load this indent file when no other was loaded.
if exists('b:did_indent')
@@ -138,11 +139,13 @@ function GetYAMLIndent(lnum)
else
return indent(prevmapline)
endif
- elseif prevline =~# '^\s*- '
+ elseif get(g:, 'yaml_indent_multiline_scalar', 0) &&
+ \ prevline =~# '^\s*- '
" - List with
" multiline scalar
return previndent+2
- elseif prevline =~# s:mapkeyregex .. '\v\s*%(%(' .. s:c_ns_tag_property ..
+ elseif get(g:, 'yaml_indent_multiline_scalar', 0) &&
+ \ prevline =~# s:mapkeyregex .. '\v\s*%(%(' .. s:c_ns_tag_property ..
\ '\v|' .. s:c_ns_anchor_property ..
\ '\v|' .. s:block_scalar_header ..
\ '\v)%(\s+|\s*%(\#.*)?$))*'
diff --git a/runtime/lang/Make_mvc.mak b/runtime/lang/Make_mvc.mak
index ced72cd..c864718 100644
--- a/runtime/lang/Make_mvc.mak
+++ b/runtime/lang/Make_mvc.mak
@@ -25,100 +25,94 @@ ICONV = "$(ICONV_PATH)\iconv.exe"
!ENDIF
RM = del /q
+PS = PowerShell.exe
+
+PSFLAGS = -NoLogo -NoProfile -Command
all : $(CONVERTED)
# Convert menu_zh_cn.utf-8.vim to create menu_chinese_gb.936.vim.
menu_chinese_gb.936.vim : menu_zh_cn.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP936 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(936))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(936)) -replace \
'scriptencoding utf-8', 'scriptencoding cp936' -replace \
- ' Original translations', ' Generated from menu_zh_cn.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(936))
# Convert menu_zh_tw.utf-8.vim to create menu_chinese_taiwan.950.vim.
menu_chinese_taiwan.950.vim : menu_zh_tw.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP950 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(950))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(950)) -replace \
'scriptencoding utf-8', 'scriptencoding cp950' -replace \
- ' Original translations', ' Generated from menu_zh_tw.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(950))
# Convert menu_cs_cz.utf-8.vim to create menu_cs_cz.iso_8859-2.vim.
menu_cs_cz.iso_8859-2.vim : menu_cs_cz.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28592))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(28592)) -replace \
' Czech \(UTF-8\)', ' Czech (ISO-8859-2)' -replace \
\"scriptencoding utf-8\", \"scriptencoding iso-8859-2\" -replace \
- \" Original translations\", \" Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT\"; \
+ \" Original translations\", \" Generated from $?, DO NOT EDIT\"; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(28592))
# Convert menu_cs_cz.utf-8.vim to create menu_czech_czech_republic.1250.vim.
menu_czech_czech_republic.1250.vim : menu_cs_cz.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1250 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1250))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1250)) -replace \
' Czech \(UTF-8\)', ' Czech (CP1250)' -replace \
\"scriptencoding utf-8\", \"scriptencoding cp1250\" -replace \
- \" Original translations\", \" Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT\"; \
+ \" Original translations\", \" Generated from $?, DO NOT EDIT\"; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1250))
# Convert menu_cs_cz.utf-8.vim to create menu_czech_czech_republic.ascii.vim.
menu_czech_czech_republic.ascii.vim : menu_cs_cz.utf-8.vim
- $(RM) $@
- powershell -nologo -noprofile -Command \
- [System.IO.File]::ReadAllText(\"$?\", \
+ -$(RM) $@
+ $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)) -replace \
'scriptencoding utf-8', 'scriptencoding latin1' -replace \
- ' Original translations', ' Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT' -replace \
+ ' Original translations', ' Generated from $?, DO NOT EDIT' -replace \
'Czech \(UTF-8\)', 'Czech (ASCII - without diacritics)' -creplace \
[char]193, 'A' -creplace [char]225, 'a' -creplace [char]268, 'C' -creplace \
[char]269, 'c' -creplace [char]270, 'D' -creplace [char]271, 'd' -creplace \
@@ -134,234 +128,211 @@ menu_czech_czech_republic.ascii.vim : menu_cs_cz.utf-8.vim
# Convert menu_hu_hu.utf-8.vim to create menu_hu_hu.iso_8859-2.vim.
menu_hu_hu.iso_8859-2.vim : menu_hu_hu.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28592))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(28592)) -replace \
'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \
- ' Original translations', ' Generated from menu_hu_hu.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(28592))
# Convert menu_ja_jp.utf-8.vim to create menu_ja_jp.euc-jp.vim.
menu_ja_jp.euc-jp.vim : menu_ja_jp.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t EUC-JP $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(51932))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(51932)) -replace \
'Japanese \(UTF-8\)', 'Japanese (EUC-JP)' -replace \
'scriptencoding utf-8', 'scriptencoding euc-jp' -replace \
- ' Original translations', ' Generated from menu_ja_jp.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(51932))
# Convert menu_ja_jp.utf-8.vim to create menu_japanese_japan.932.vim.
menu_japanese_japan.932.vim : menu_ja_jp.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP932 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(932))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(932)) -replace \
'Japanese \(UTF-8\)', 'Japanese (CP932)' -replace \
'scriptencoding utf-8', 'scriptencoding cp932' -replace \
- ' Original translations', ' Generated from menu_ja_jp.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(932))
# Convert menu_ko_kr.utf-8.vim to create menu_ko_kr.euckr.vim.
menu_ko_kr.euckr.vim : menu_ko_kr.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t EUC-KR $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(51949))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(51949)) -replace \
'scriptencoding utf-8', 'scriptencoding euc-kr' -replace \
- ' Original translations', ' Generated from menu_ko_kr.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(51949))
# Convert menu_pl_pl.utf-8.vim to create menu_pl_pl.iso_8859-2.vim.
menu_pl_pl.iso_8859-2.vim : menu_pl_pl.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28592))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(28592)) -replace \
'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \
- ' Original translations', ' Generated from menu_pl_pl.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(28592))
# Convert menu_pl_pl.utf-8.vim to create menu_polish_poland.1250.vim.
menu_polish_poland.1250.vim : menu_pl_pl.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1250 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1250))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1250)) -replace \
'scriptencoding utf-8', 'scriptencoding cp1250' -replace \
- ' Original translations', ' Generated from menu_pl_pl.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1250))
# Convert menu_ru_ru.utf-8.vim to create menu_ru_ru.cp1251.vim.
menu_ru_ru.cp1251.vim : menu_ru_ru.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1251 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1251))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1251)) -replace \
'scriptencoding utf-8', 'scriptencoding cp1251' -replace \
- ' Original translations', ' Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1251))
# Convert menu_ru_ru.utf-8.vim to create menu_ru_ru.koi8-r.vim.
menu_ru_ru.koi8-r.vim : menu_ru_ru.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t KOI8-R $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(20866))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(20866)) -replace \
'scriptencoding utf-8', 'scriptencoding koi8-r' -replace \
- ' Original translations', ' Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(20866))
# Convert menu_slovak_slovak_republic.1250.vim to create menu_sk_sk.iso_8859-2.vim.
menu_sk_sk.iso_8859-2.vim : menu_slovak_slovak_republic.1250.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f CP1250 -t ISO-8859-2 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(1250)), \
[System.Text.Encoding]::GetEncoding(28592))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(28592)) -replace \
'scriptencoding cp1250', 'scriptencoding iso-8859-2' -replace \
- ' Original translations', ' Generated from menu_slovak_slovak_republic.1250.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(28592))
# Convert menu_sl_si.utf-8.vim to create menu_sl_si.cp1250.vim.
menu_sl_si.cp1250.vim : menu_sl_si.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1250 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1250))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1250)) -replace \
'scriptencoding utf-8', 'scriptencoding cp1250' -replace \
- ' Original translations', ' Generated from menu_sl_si.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1250))
# Convert menu_sl_si.utf-8.vim to create menu_sl_si.latin2.vim.
menu_sl_si.latin2.vim : menu_sl_si.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28592))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(28592)) -replace \
'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \
- ' Original translations', ' Generated from menu_sl_si.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(28592))
# Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.ascii.vim.
menu_sr_rs.ascii.vim : menu_sr_rs.utf-8.vim
- $(RM) $@
- powershell -nologo -noprofile -Command \
- [System.IO.File]::ReadAllText(\"$?\", \
+ -$(RM) $@
+ $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)) -replace \
'scriptencoding utf-8', 'scriptencoding latin1' -replace \
- ' Original translations', ' Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT' -creplace \
+ ' Original translations', ' Generated from $?, DO NOT EDIT' -creplace \
[char]1072, 'a' -creplace [char]1073, 'b' -creplace [char]1074, 'v' -creplace \
[char]1075, 'g' -creplace [char]1076, 'd' -creplace [char]1106, 'dj' -creplace \
[char]1077, 'e' -creplace [char]1078, 'z' -creplace [char]1079, 'z' -creplace \
@@ -386,9 +357,8 @@ menu_sr_rs.ascii.vim : menu_sr_rs.utf-8.vim
# Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.iso_8859-2.vim.
menu_sr_rs.iso_8859-2.vim : menu_sr_rs.utf-8.vim
- $(RM) $@
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$?\", \
+ -$(RM) $@
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)) -creplace \
[char]1072, 'a' -creplace [char]1073, 'b' -creplace [char]1074, 'v' -creplace \
[char]1075, 'g' -creplace [char]1076, 'd' -creplace [char]1106, [char]273 -creplace \
@@ -411,107 +381,100 @@ menu_sr_rs.iso_8859-2.vim : menu_sr_rs.utf-8.vim
[char]1060, 'F' -creplace [char]1061, 'H' -creplace [char]1062, 'C' -creplace \
[char]1063, [char]268 -creplace [char]1039, 'Dz' -creplace [char]1064, [char]352 -replace \
'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \
- ' Original translations', ' Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, [System.Text.Encoding]::GetEncoding(28592))
# Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.iso_8859-5.vim.
menu_sr_rs.iso_8859-5.vim : menu_sr_rs.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-5 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28595))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(28595)) -replace \
'scriptencoding utf-8', 'scriptencoding iso-8859-5' -replace \
- ' Original translations', ' Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(28595))
# Convert menu_tr_tr.utf-8.vim to create menu_tr_tr.cp1254.vim.
menu_tr_tr.cp1254.vim : menu_tr_tr.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1254 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1254))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1254)) -replace \
'scriptencoding utf-8', 'scriptencoding cp1254' -replace \
- ' Original translations', ' Generated from menu_tr_tr.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1254))
# Convert menu_tr_tr.utf-8.vim to create menu_tr_tr.iso_8859-9.vim.
menu_tr_tr.iso_8859-9.vim : menu_tr_tr.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-9 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28599))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(28599)) -replace \
'scriptencoding utf-8', 'scriptencoding iso-8859-9' -replace \
- ' Original translations', ' Generated from menu_tr_tr.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(28599))
# Convert menu_uk_ua.utf-8.vim to create menu_uk_ua.cp1251.vim.
menu_uk_ua.cp1251.vim : menu_uk_ua.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1251 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1251))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1251)) -replace \
'scriptencoding utf-8', 'scriptencoding cp1251' -replace \
- ' Original translations', ' Generated from menu_uk_ua.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1251))
# Convert menu_uk_ua.utf-8.vim to create menu_uk_ua.koi8-u.vim.
menu_uk_ua.koi8-u.vim : menu_uk_ua.utf-8.vim
- $(RM) $@
+ -$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t KOI8-U $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(21866))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(21866)) -replace \
'scriptencoding utf-8', 'scriptencoding koi8-u' -replace \
- ' Original translations', ' Generated from menu_uk_ua.utf-8.vim, DO NOT EDIT'; \
+ ' Original translations', ' Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(21866))
+clean :
+ @for %%G in ($(CONVERTED)) do (if exist .\%%G ($(RM) %%G))
+
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make:
diff --git a/runtime/lang/Makefile b/runtime/lang/Makefile
index 9ce56b4..d5f2ed6 100644
--- a/runtime/lang/Makefile
+++ b/runtime/lang/Makefile
@@ -5,6 +5,8 @@ include Make_all.mak
SED = LANG=C sed
+.PHONY: all clean
+
all: $(CONVERTED)
@@ -30,7 +32,7 @@ menu_cs_cz.iso_8859-2.vim: menu_cs_cz.utf-8.vim
iconv -f UTF-8 -t ISO-8859-2 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
- -e 's/\(" Menu Translations:.*\)(.*)/\1(ISO8859-2)/' \
+ -e 's/\(" Menu Translations:.*\)(.*)/\1(ISO-8859-2)/' \
> $@
# Convert menu_cs_cz.utf-8.vim to create menu_czech_czech_republic.1250.vim.
@@ -226,3 +228,7 @@ menu_sk_sk.iso_8859-2.vim: menu_slovak_slovak_republic.1250.vim
$(SED) -e 's/scriptencoding cp1250/scriptencoding iso-8859-2/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
+
+clean:
+ for G in $(CONVERTED); do if [ -f $$G ]; then rm -f $$G; fi; done
+# -rm -f $(CONVERTED)
diff --git a/runtime/lang/menu_cs_cz.iso_8859-2.vim b/runtime/lang/menu_cs_cz.iso_8859-2.vim
index 6cc8695..3d95a09 100644
--- a/runtime/lang/menu_cs_cz.iso_8859-2.vim
+++ b/runtime/lang/menu_cs_cz.iso_8859-2.vim
@@ -1,4 +1,4 @@
-" Menu Translations: Czech (ISO8859-2)
+" Menu Translations: Czech (ISO-8859-2)
" Maintainer: Jiri Sedlak <jiri_sedlak@users.sourceforge.net>
" Previous maintainer: Jiri Brezina
" Based on: menu.vim (2012-10-21)
diff --git a/runtime/macros/less.vim b/runtime/macros/less.vim
index 95a4127..03a0e90 100644
--- a/runtime/macros/less.vim
+++ b/runtime/macros/less.vim
@@ -1,6 +1,6 @@
" Vim script to work like "less"
" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2023 Aug 10
+" Last Change: 2024 Feb 15
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Avoid loading this file twice, allow the user to define his own script.
@@ -227,67 +227,181 @@ noremap q :q<CR>
" Switch to editing (switch off less mode)
map v :silent call <SID>End()<CR>
fun! s:End()
- set ma
+ set modifiable noreadonly
if exists('s:lz')
let &lz = s:lz
endif
- unmap h
- unmap H
- unmap <Space>
- unmap <C-V>
- unmap f
- unmap <C-F>
- unmap z
- unmap <Esc><Space>
- unmap F
- unmap d
- unmap <C-D>
- unmap <CR>
- unmap <C-N>
- unmap e
- unmap <C-E>
- unmap j
- unmap <C-J>
- unmap b
- unmap <C-B>
- unmap w
- unmap <Esc>v
- unmap u
- unmap <C-U>
- unmap k
- unmap y
- unmap <C-Y>
- unmap <C-P>
- unmap <C-K>
- unmap r
- unmap <C-R>
- unmap R
- unmap g
- unmap <
- unmap <Esc><
- unmap G
- unmap >
- unmap <Esc>>
- unmap %
- unmap p
- unmap n
- unmap N
- unmap q
- unmap v
- unmap /
- unmap ?
- unmap <Up>
- unmap <Down>
- unmap <PageDown>
- unmap <kPageDown>
- unmap <PageUp>
- unmap <kPageUp>
- unmap <S-Down>
- unmap <S-Up>
- unmap <Home>
- unmap <kHome>
- unmap <End>
- unmap <kEnd>
+ if !empty(maparg('h'))
+ unmap h
+ endif
+ if !empty(maparg('H'))
+ unmap H
+ endif
+ if !empty(maparg('<Space>'))
+ unmap <Space>
+ endif
+ if !empty(maparg('<C-V>'))
+ unmap <C-V>
+ endif
+ if !empty(maparg('f'))
+ unmap f
+ endif
+ if !empty(maparg('<C-F>'))
+ unmap <C-F>
+ endif
+ if !empty(maparg('z'))
+ unmap z
+ endif
+ if !empty(maparg('<Esc><Space>'))
+ unmap <Esc><Space>
+ endif
+ if !empty(maparg('F'))
+ unmap F
+ endif
+ if !empty(maparg('d'))
+ unmap d
+ endif
+ if !empty(maparg('<C-D>'))
+ unmap <C-D>
+ endif
+ if !empty(maparg('<CR>'))
+ unmap <CR>
+ endif
+ if !empty(maparg('<C-N>'))
+ unmap <C-N>
+ endif
+ if !empty(maparg('e'))
+ unmap e
+ endif
+ if !empty(maparg('<C-E>'))
+ unmap <C-E>
+ endif
+ if !empty(maparg('j'))
+ unmap j
+ endif
+ if !empty(maparg('<C-J>'))
+ unmap <C-J>
+ endif
+ if !empty(maparg('b'))
+ unmap b
+ endif
+ if !empty(maparg('<C-B>'))
+ unmap <C-B>
+ endif
+ if !empty(maparg('w'))
+ unmap w
+ endif
+ if !empty(maparg('<Esc>v'))
+ unmap <Esc>v
+ endif
+ if !empty(maparg('u'))
+ unmap u
+ endif
+ if !empty(maparg('<C-U>'))
+ unmap <C-U>
+ endif
+ if !empty(maparg('k'))
+ unmap k
+ endif
+ if !empty(maparg('y'))
+ unmap y
+ endif
+ if !empty(maparg('<C-Y>'))
+ unmap <C-Y>
+ endif
+ if !empty(maparg('<C-P>'))
+ unmap <C-P>
+ endif
+ if !empty(maparg('<C-K>'))
+ unmap <C-K>
+ endif
+ if !empty(maparg('r'))
+ unmap r
+ endif
+ if !empty(maparg('<C-R>'))
+ unmap <C-R>
+ endif
+ if !empty(maparg('R'))
+ unmap R
+ endif
+ if !empty(maparg('g'))
+ unmap g
+ endif
+ if !empty(maparg('<'))
+ unmap <
+ endif
+ if !empty(maparg('<Esc><'))
+ unmap <Esc><
+ endif
+ if !empty(maparg('G'))
+ unmap G
+ endif
+ if !empty(maparg('>'))
+ unmap >
+ endif
+ if !empty(maparg('<Esc>>'))
+ unmap <Esc>>
+ endif
+ if !empty(maparg('%'))
+ unmap %
+ endif
+ if !empty(maparg('p'))
+ unmap p
+ endif
+ if !empty(maparg('n'))
+ unmap n
+ endif
+ if !empty(maparg('N'))
+ unmap N
+ endif
+ if !empty(maparg('q'))
+ unmap q
+ endif
+ if !empty(maparg('v'))
+ unmap v
+ endif
+ if !empty(maparg('/'))
+ unmap /
+ endif
+ if !empty(maparg('?'))
+ unmap ?
+ endif
+ if !empty(maparg('<Up>'))
+ unmap <Up>
+ endif
+ if !empty(maparg('<Down>'))
+ unmap <Down>
+ endif
+ if !empty(maparg('<PageDown>'))
+ unmap <PageDown>
+ endif
+ if !empty(maparg('<kPageDown>'))
+ unmap <kPageDown>
+ endif
+ if !empty(maparg('<PageUp>'))
+ unmap <PageUp>
+ endif
+ if !empty(maparg('<kPageUp>'))
+ unmap <kPageUp>
+ endif
+ if !empty(maparg('<S-Down>'))
+ unmap <S-Down>
+ endif
+ if !empty(maparg('<S-Up>'))
+ unmap <S-Up>
+ endif
+ if !empty(maparg('<Home>'))
+ unmap <Home>
+ endif
+ if !empty(maparg('<kHome>'))
+ unmap <kHome>
+ endif
+ if !empty(maparg('<End>'))
+ unmap <End>
+ endif
+ if !empty(maparg('<kEnd>'))
+ unmap <kEnd>
+ endif
endfun
" vim: sw=2
diff --git a/runtime/mswin.vim b/runtime/mswin.vim
index 1c28cad..b2a3670 100644
--- a/runtime/mswin.vim
+++ b/runtime/mswin.vim
@@ -1,7 +1,7 @@
" Set options and add mapping such that Vim behaves a lot like MS-Windows
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2023 Aug 10
+" Last Change: 2024 Mar 13
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Bail out if this isn't wanted.
@@ -24,6 +24,9 @@ set backspace=indent,eol,start whichwrap+=<,>,[,]
" backspace in Visual mode deletes selection
vnoremap <BS> d
+" the better solution would be to use has("clipboard_working"),
+" but that may not be available yet while starting up, so let's just check if
+" clipboard support has been compiled in and assume it will be working :/
if has("clipboard")
" CTRL-X and SHIFT-Del are Cut
vnoremap <C-X> "+x
@@ -39,6 +42,23 @@ if has("clipboard")
cmap <C-V> <C-R>+
cmap <S-Insert> <C-R>+
+else
+ " Use the unnamed register when clipboard support not available
+
+ " CTRL-X and SHIFT-Del are Cut
+ vnoremap <C-X> x
+ vnoremap <S-Del> x
+
+ " CTRL-C and CTRL-Insert are Copy
+ vnoremap <C-C> y
+ vnoremap <C-Insert> y
+
+ " CTRL-V and SHIFT-Insert are Paste
+ noremap <C-V> gP
+ noremap <S-Insert> gP
+
+ inoremap <C-V> <C-R>"
+ inoremap <S-Insert> <C-R>"
endif
" Pasting blockwise and linewise selections is not possible in Insert and
@@ -47,7 +67,7 @@ endif
" Uses the paste.vim autoload script.
" Use CTRL-G u to have CTRL-Z only undo the paste.
-if 1
+if has("clipboard")
exe 'inoremap <script> <C-V> <C-G>u' . paste#paste_cmd['i']
exe 'vnoremap <script> <C-V> ' . paste#paste_cmd['v']
endif
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 6e133ce..d3e1605 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -482,6 +482,7 @@ if has("statusline")
call <SID>AddOption("statusline", gettext("alternate format to be used for a status line"))
call <SID>OptionG("stl", &stl)
endif
+call append("$", "\t" .. s:local_to_window)
call <SID>AddOption("equalalways", gettext("make all windows the same size when adding/removing windows"))
call <SID>BinOptionG("ea", &ea)
call <SID>AddOption("eadirection", gettext("in which direction 'equalalways' works: \"ver\", \"hor\" or \"both\""))
@@ -490,6 +491,8 @@ call <SID>AddOption("winheight", gettext("minimal number of lines used for the c
call append("$", " \tset wh=" . &wh)
call <SID>AddOption("winminheight", gettext("minimal number of lines used for any window"))
call append("$", " \tset wmh=" . &wmh)
+call <SID>AddOption("winfixbuf", gettext("keep window focused on a single buffer"))
+call <SID>OptionG("wfb", &wfb)
call <SID>AddOption("winfixheight", gettext("keep the height of the window"))
call append("$", "\t" .. s:local_to_window)
call <SID>BinOptionL("wfh")
diff --git a/runtime/pack/dist/opt/justify/plugin/justify.vim b/runtime/pack/dist/opt/justify/plugin/justify.vim
index 4ef3bf9..57be790 100644
--- a/runtime/pack/dist/opt/justify/plugin/justify.vim
+++ b/runtime/pack/dist/opt/justify/plugin/justify.vim
@@ -80,7 +80,7 @@
" conformant with :left, :right and :center.
"
" If joinspaces is set, an extra space is added after '.', '?' and '!'.
-" If 'cpooptions' include 'j', extra space is only added after '.'.
+" If 'cpoptions' include 'j', extra space is only added after '.'.
" (This may on occasion conflict with maxspaces.)
diff --git a/runtime/plugin/getscriptPlugin.vim b/runtime/plugin/getscriptPlugin.vim
index 8faa029..6029b65 100644
--- a/runtime/plugin/getscriptPlugin.vim
+++ b/runtime/plugin/getscriptPlugin.vim
@@ -1,6 +1,7 @@
" ---------------------------------------------------------------------
" getscriptPlugin.vim
-" Author: Charles E. Campbell
+" Maintainer: This runtime file is looking for a new maintainer.
+" Original Author: Charles E. Campbell
" Date: Nov 29, 2013
" Installing: :help glvs-install
" Usage: :help glvs
diff --git a/runtime/plugin/logiPat.vim b/runtime/plugin/logiPat.vim
index 47fabe9..a8c154e 100644
--- a/runtime/plugin/logiPat.vim
+++ b/runtime/plugin/logiPat.vim
@@ -1,5 +1,6 @@
" LogiPat: Boolean logical pattern matcher
-" Author: Charles E. Campbell
+" Maintainer: This runtime file is looking for a new maintainer.
+" Original Author: Charles E. Campbell
" Date: Apr 04, 2016
" Version: 4
" Purpose: to do Boolean-logic based regular expression pattern matching
diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim
index 4235a0d..96c54ee 100644
--- a/runtime/plugin/matchparen.vim
+++ b/runtime/plugin/matchparen.vim
@@ -22,7 +22,8 @@ let s:has_matchaddpos = exists('*matchaddpos')
augroup matchparen
" Replace all matchparen autocommands
- autocmd! CursorMoved,CursorMovedI,WinEnter,BufWinEnter,WinScrolled * call s:Highlight_Matching_Pair()
+ autocmd! CursorMoved,CursorMovedI,WinEnter,WinScrolled * call s:Highlight_Matching_Pair()
+ autocmd! BufWinEnter * autocmd SafeState * ++once call s:Highlight_Matching_Pair()
autocmd! WinLeave,BufLeave * call s:Remove_Matches()
if exists('##TextChanged')
autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair()
diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim
index a347781..ed6f7dc 100644
--- a/runtime/plugin/netrwPlugin.vim
+++ b/runtime/plugin/netrwPlugin.vim
@@ -1,7 +1,8 @@
" netrwPlugin.vim: Handles file transfer and remote directory listing across a network
" PLUGIN SECTION
+" Maintainer: This runtime file is looking for a new maintainer.
" Date: Feb 09, 2021
-" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Former Maintainer: Charles E Campbell
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2021 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
diff --git a/runtime/plugin/tarPlugin.vim b/runtime/plugin/tarPlugin.vim
index d55492a..40d2242 100644
--- a/runtime/plugin/tarPlugin.vim
+++ b/runtime/plugin/tarPlugin.vim
@@ -45,7 +45,7 @@ augroup tar
au BufReadCmd *.tar.xz call tar#Browse(expand("<amatch>"))
au BufReadCmd *.txz call tar#Browse(expand("<amatch>"))
au BufReadCmd *.tar.zst call tar#Browse(expand("<amatch>"))
- au BufReadCmd *.tzs call tar#Browse(expand("<amatch>"))
+ au BufReadCmd *.tzst call tar#Browse(expand("<amatch>"))
augroup END
com! -nargs=? -complete=file Vimuntar call tar#Vimuntar(<q-args>)
diff --git a/runtime/plugin/vimballPlugin.vim b/runtime/plugin/vimballPlugin.vim
index cd14efa..e78805f 100644
--- a/runtime/plugin/vimballPlugin.vim
+++ b/runtime/plugin/vimballPlugin.vim
@@ -1,5 +1,6 @@
" vimballPlugin : construct a file containing both paths and files
-" Author: Charles E. Campbell
+" Maintainer: This runtime file is looking for a new maintainer.
+" Original Author: Charles E. Campbell
" Copyright: (c) 2004-2014 by Charles E. Campbell
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
" (see |copyright|) except use "Vimball" instead of "Vim".
diff --git a/runtime/plugin/zipPlugin.vim b/runtime/plugin/zipPlugin.vim
index c3118a3..2af119b 100644
--- a/runtime/plugin/zipPlugin.vim
+++ b/runtime/plugin/zipPlugin.vim
@@ -1,7 +1,8 @@
" zipPlugin.vim: Handles browsing zipfiles
" PLUGIN PORTION
" Date: Dec 07, 2021
-" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E Campbell
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005-2016 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
diff --git a/runtime/syntax/Makefile b/runtime/syntax/Makefile
index f3b578c..bc6de0b 100644
--- a/runtime/syntax/Makefile
+++ b/runtime/syntax/Makefile
@@ -1,5 +1,8 @@
# Portable Makefile for running syntax tests.
+# To run the test manually:
+# ../../src/vim -u 'testdir/runtest.vim' --cmd 'breakadd func RunTest'
+
# Override this if needed, the default assumes Vim was build in the src dir.
#VIMPROG = vim
VIMPROG = ../../src/vim
@@ -11,6 +14,8 @@ VIMRUNTIME = ../..
# VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=45 --log-file=valgrind.$*
# ENVVARS = LC_ALL=C LANG=C LANGUAGE=C
+# Run the syntax tests with a C locale
+ENVVARS = LC_ALL=C
RUN_VIMTEST = VIMRUNTIME=$(VIMRUNTIME) $(VALGRIND) $(ENVVARS) ../$(VIMPROG) -f $(GUI_FLAG)
@@ -25,11 +30,11 @@ test:
@# the "vimcmd" file is used by the screendump utils
@echo "../$(VIMPROG)" > testdir/vimcmd
@echo "$(RUN_VIMTEST)" >> testdir/vimcmd
- VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term $(DEBUGLOG) -u testdir/runtest.vim
+ VIMRUNTIME=$(VIMRUNTIME) $(ENVVARS) $(VIMPROG) --clean --not-a-term $(DEBUGLOG) -u testdir/runtest.vim
@# FIXME: Temporarily show the whole file to find out what goes wrong
@#if [ -f testdir/messages ]; then tail -n 6 testdir/messages; fi
@if [ -f testdir/messages ]; then cat testdir/messages; fi
clean testclean:
- rm -f testdir/failed/* testdir/done/* testdir/vimcmd testdir/messages
+ rm -f testdir/failed/* testdir/done/* testdir/vimcmd testdir/messages testdir/Xtestscript
diff --git a/runtime/syntax/amiga.vim b/runtime/syntax/amiga.vim
index 5a664c4..9402196 100644
--- a/runtime/syntax/amiga.vim
+++ b/runtime/syntax/amiga.vim
@@ -1,9 +1,10 @@
" Vim syntax file
" Language: AmigaDos
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E. Campbell
" Last Change: Aug 31, 2016
" Version: 10
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_AMIGA
+" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_AMIGA
" quit when a syntax file was already loaded
if exists("b:current_syntax")
diff --git a/runtime/syntax/ant.vim b/runtime/syntax/ant.vim
index 6696f96..b023123 100644
--- a/runtime/syntax/ant.vim
+++ b/runtime/syntax/ant.vim
@@ -1,9 +1,9 @@
" Vim syntax file
-" Language: ANT build file (xml)
-" Maintainer: Johannes Zellner <johannes@zellner.org>
-" Last Change: Tue Apr 27 13:05:59 CEST 2004
-" Filenames: build.xml
-" $Id: ant.vim,v 1.1 2004/06/13 18:13:18 vimboss Exp $
+" Language: ANT build file (xml)
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
+" Last Change: 2024 Jan 27
+" Filenames: build.xml
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -44,48 +44,48 @@ call AntSyntaxScript('jpython', 'python.vim')
syn cluster xmlTagHook add=antElement
-syn keyword antElement display WsdlToDotnet addfiles and ant antcall antstructure apply archives arg argument
-syn keyword antElement display assertions attrib attribute available basename bcc blgenclient bootclasspath
-syn keyword antElement display borland bottom buildnumber buildpath buildpathelement bunzip2 bzip2 cab
-syn keyword antElement display catalogpath cc cccheckin cccheckout cclock ccmcheckin ccmcheckintask ccmcheckout
-syn keyword antElement display ccmcreatetask ccmkattr ccmkbl ccmkdir ccmkelem ccmklabel ccmklbtype
-syn keyword antElement display ccmreconfigure ccrmtype ccuncheckout ccunlock ccupdate checksum chgrp chmod
-syn keyword antElement display chown classconstants classes classfileset classpath commandline comment
-syn keyword antElement display compilerarg compilerclasspath concat concatfilter condition copy copydir
-syn keyword antElement display copyfile coveragepath csc custom cvs cvschangelog cvspass cvstagdiff cvsversion
-syn keyword antElement display daemons date defaultexcludes define delete deletecharacters deltree depend
-syn keyword antElement display depends dependset depth description different dirname dirset disable dname
-syn keyword antElement display doclet doctitle dtd ear echo echoproperties ejbjar element enable entity entry
-syn keyword antElement display env equals escapeunicode exclude excludepackage excludesfile exec execon
-syn keyword antElement display existing expandproperties extdirs extension extensionSet extensionset factory
-syn keyword antElement display fail filelist filename filepath fileset filesmatch filetokenizer filter
-syn keyword antElement display filterchain filterreader filters filterset filtersfile fixcrlf footer format
-syn keyword antElement display from ftp generic genkey get gjdoc grant group gunzip gzip header headfilter http
-syn keyword antElement display ignoreblank ilasm ildasm import importtypelib include includesfile input iplanet
-syn keyword antElement display iplanet-ejbc isfalse isreference isset istrue jar jarlib-available
-syn keyword antElement display jarlib-manifest jarlib-resolve java javac javacc javadoc javadoc2 jboss jdepend
-syn keyword antElement display jjdoc jjtree jlink jonas jpcoverage jpcovmerge jpcovreport jsharpc jspc
-syn keyword antElement display junitreport jvmarg lib libfileset linetokenizer link loadfile loadproperties
-syn keyword antElement display location macrodef mail majority manifest map mapper marker mergefiles message
-syn keyword antElement display metainf method mimemail mkdir mmetrics modified move mparse none not options or
-syn keyword antElement display os outputproperty package packageset parallel param patch path pathconvert
-syn keyword antElement display pathelement patternset permissions prefixlines present presetdef project
-syn keyword antElement display property propertyfile propertyref propertyset pvcs pvcsproject record reference
-syn keyword antElement display regexp rename renameext replace replacefilter replaceregex replaceregexp
-syn keyword antElement display replacestring replacetoken replacetokens replacevalue replyto report resource
-syn keyword antElement display revoke rmic root rootfileset rpm scp section selector sequential serverdeploy
-syn keyword antElement display setproxy signjar size sleep socket soscheckin soscheckout sosget soslabel source
-syn keyword antElement display sourcepath sql src srcfile srcfilelist srcfiles srcfileset sshexec stcheckin
-syn keyword antElement display stcheckout stlabel stlist stringtokenizer stripjavacomments striplinebreaks
-syn keyword antElement display striplinecomments style subant substitution support symlink sync sysproperty
-syn keyword antElement display syspropertyset tabstospaces tag taglet tailfilter tar tarfileset target
-syn keyword antElement display targetfile targetfilelist targetfileset taskdef tempfile test testlet text title
-syn keyword antElement display to token tokenfilter touch transaction translate triggers trim tstamp type
-syn keyword antElement display typedef unjar untar unwar unzip uptodate url user vbc vssadd vsscheckin
-syn keyword antElement display vsscheckout vsscp vsscreate vssget vsshistory vsslabel waitfor war wasclasspath
-syn keyword antElement display webapp webinf weblogic weblogictoplink websphere whichresource wlclasspath
-syn keyword antElement display wljspc wsdltodotnet xmlcatalog xmlproperty xmlvalidate xslt zip zipfileset
-syn keyword antElement display zipgroupfileset
+syn keyword antElement WsdlToDotnet addfiles and ant antcall antstructure apply archives arg argument
+syn keyword antElement assertions attrib attribute available basename bcc blgenclient bootclasspath
+syn keyword antElement borland bottom buildnumber buildpath buildpathelement bunzip2 bzip2 cab
+syn keyword antElement catalogpath cc cccheckin cccheckout cclock ccmcheckin ccmcheckintask ccmcheckout
+syn keyword antElement ccmcreatetask ccmkattr ccmkbl ccmkdir ccmkelem ccmklabel ccmklbtype
+syn keyword antElement ccmreconfigure ccrmtype ccuncheckout ccunlock ccupdate checksum chgrp chmod
+syn keyword antElement chown classconstants classes classfileset classpath commandline comment
+syn keyword antElement compilerarg compilerclasspath concat concatfilter condition copy copydir
+syn keyword antElement copyfile coveragepath csc custom cvs cvschangelog cvspass cvstagdiff cvsversion
+syn keyword antElement daemons date defaultexcludes define delete deletecharacters deltree depend
+syn keyword antElement depends dependset depth description different dirname dirset disable dname
+syn keyword antElement doclet doctitle dtd ear echo echoproperties ejbjar element enable entity entry
+syn keyword antElement env equals escapeunicode exclude excludepackage excludesfile exec execon
+syn keyword antElement existing expandproperties extdirs extension extensionSet extensionset factory
+syn keyword antElement fail filelist filename filepath fileset filesmatch filetokenizer filter
+syn keyword antElement filterchain filterreader filters filterset filtersfile fixcrlf footer format
+syn keyword antElement from ftp generic genkey get gjdoc grant group gunzip gzip header headfilter http
+syn keyword antElement ignoreblank ilasm ildasm import importtypelib include includesfile input iplanet
+syn keyword antElement iplanet-ejbc isfalse isreference isset istrue jar jarlib-available
+syn keyword antElement jarlib-manifest jarlib-resolve java javac javacc javadoc javadoc2 jboss jdepend
+syn keyword antElement jjdoc jjtree jlink jonas jpcoverage jpcovmerge jpcovreport jsharpc jspc
+syn keyword antElement junitreport jvmarg lib libfileset linetokenizer link loadfile loadproperties
+syn keyword antElement location macrodef mail majority manifest map mapper marker mergefiles message
+syn keyword antElement metainf method mimemail mkdir mmetrics modified move mparse none not options or
+syn keyword antElement os outputproperty package packageset parallel param patch path pathconvert
+syn keyword antElement pathelement patternset permissions prefixlines present presetdef project
+syn keyword antElement property propertyfile propertyref propertyset pvcs pvcsproject record reference
+syn keyword antElement regexp rename renameext replace replacefilter replaceregex replaceregexp
+syn keyword antElement replacestring replacetoken replacetokens replacevalue replyto report resource
+syn keyword antElement revoke rmic root rootfileset rpm scp section selector sequential serverdeploy
+syn keyword antElement setproxy signjar size sleep socket soscheckin soscheckout sosget soslabel source
+syn keyword antElement sourcepath sql src srcfile srcfilelist srcfiles srcfileset sshexec stcheckin
+syn keyword antElement stcheckout stlabel stlist stringtokenizer stripjavacomments striplinebreaks
+syn keyword antElement striplinecomments style subant substitution support symlink sync sysproperty
+syn keyword antElement syspropertyset tabstospaces tag taglet tailfilter tar tarfileset target
+syn keyword antElement targetfile targetfilelist targetfileset taskdef tempfile test testlet text title
+syn keyword antElement to token tokenfilter touch transaction translate triggers trim tstamp type
+syn keyword antElement typedef unjar untar unwar unzip uptodate url user vbc vssadd vsscheckin
+syn keyword antElement vsscheckout vsscp vsscreate vssget vsshistory vsslabel waitfor war wasclasspath
+syn keyword antElement webapp webinf weblogic weblogictoplink websphere whichresource wlclasspath
+syn keyword antElement wljspc wsdltodotnet xmlcatalog xmlproperty xmlvalidate xslt zip zipfileset
+syn keyword antElement zipgroupfileset
hi def link antElement Statement
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index 5ed8fdc..30db943 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -252,7 +252,7 @@ if exists("c_gnu")
syn keyword cOperator typeof __typeof__
syn keyword cOperator __real__ __imag__
syn keyword cStorageClass __attribute__ __const__ __extension__
- syn keyword cStorageClass inline __inline__
+ syn keyword cStorageClass inline __inline __inline__
syn keyword cStorageClass __restrict__ __volatile__ __noreturn__
endif
syn keyword cType int long short char void
@@ -444,6 +444,14 @@ syn match cUserLabel display "\I\i*" contained
syn match cBitField display "^\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
syn match cBitField display ";\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
+if exists("c_functions")
+ syn match cFunction "\<\h\w*\ze\_s*("
+ endif
+
+if exists("c_function_pointers")
+ syn match cFunctionPointer "\%((\s*\*\s*\)\@<=\h\w*\ze\s*)\_s*(.*)"
+endif
+
if exists("c_minlines")
let b:c_minlines = c_minlines
else
@@ -513,6 +521,8 @@ hi def link cCppOutSkip cCppOutIf2
hi def link cCppInElse2 cCppOutIf2
hi def link cCppOutIf2 cCppOut
hi def link cCppOut Comment
+hi def link cFunction Function
+hi def link cFunctionPointer Function
let b:current_syntax = "c"
diff --git a/runtime/syntax/chuck.vim b/runtime/syntax/chuck.vim
new file mode 100644
index 0000000..6fcf40c
--- /dev/null
+++ b/runtime/syntax/chuck.vim
@@ -0,0 +1,187 @@
+" Vim syntax file
+" Language: ChucK
+" Maintainer: Andrea Callea
+" URL: https://github.com/gacallea/chuck.vim
+" Last Change: 2024 Jan 21 by Andrea Callea
+
+" Sources used for this syntax
+" https://chuck.cs.princeton.edu/doc/language/
+" https://chuck.cs.princeton.edu/doc/reference/
+
+" HISTORY:
+" 2024 Jan 21 - Initial revision
+
+" quit when a syntax file was already loaded
+if exists("b:current_syntax")
+ finish
+endif
+
+" https://chuck.cs.princeton.edu/doc/language/type.html
+syn keyword chuckPrimitiveType int float time dur void vec3 vec4
+syn keyword chuckComplexType complex polar
+syn keyword chuckReferenceType Object Event UGen array string
+syn keyword chuckBoolean true false maybe
+syn keyword chuckBoolean null NULL
+
+" https://chuck.cs.princeton.edu/doc/language/oper.html
+syn match chuckOperator "=>"
+syn match chuckOperator "@=>"
+
+syn match chuckOperator "=^"
+
+syn match chuckOperator "+"
+syn match chuckOperator "-"
+syn match chuckOperator "*"
+syn match chuckOperator "/"
+syn match chuckOperator "%"
+syn match chuckOperator "!"
+syn match chuckOperator "&"
+syn match chuckOperator "|"
+syn match chuckOperator "\^"
+
+syn match chuckOperator "+=>"
+syn match chuckOperator "-=>"
+syn match chuckOperator "*=>"
+syn match chuckOperator "/=>"
+syn match chuckOperator "%=>"
+syn match chuckOperator "!=>"
+syn match chuckOperator "&=>"
+syn match chuckOperator "|=>"
+syn match chuckOperator "\^=>"
+
+syn match chuckOperator "&&"
+syn match chuckOperator "||"
+syn match chuckOperator "=="
+syn match chuckOperator "!="
+syn match chuckOperator ">"
+syn match chuckOperator ">="
+syn match chuckOperator "<"
+syn match chuckOperator "<="
+
+syn match chuckOperator ">>"
+syn match chuckOperator "<<"
+
+syn match chuckOperator "++"
+syn match chuckOperator "--"
+syn match chuckOperator "<<<"
+syn match chuckOperator ">>>"
+
+syn keyword chuckOperator new
+
+" https://chuck.cs.princeton.edu/doc/language/ctrl.html
+syn keyword chuckConditional if else
+syn keyword chuckRepeat while do until for each
+
+" https://chuck.cs.princeton.edu/doc/language/time.html
+syn keyword chuckTimeAndDuration samp ms second minute hour day week
+syn keyword chuckTimeAndDuration now later
+
+" these may need some additional keywords I missed, for a future revision
+syn keyword chuckKeyword dac adc
+syn keyword chuckKeyword fun function
+syn keyword chuckKeyword return
+syn keyword chuckKeyword const
+syn match chuckKeyword "@"
+syn keyword chuckKeyword pi
+syn keyword chuckKeyword me
+syn keyword chuckKeyword repeat break continue
+syn keyword chuckKeyword class extends public private static pure this
+syn keyword chuckKeyword spork
+syn keyword chuckKeyword cherr chout
+
+" https://chuck.cs.princeton.edu/doc/reference/
+syn keyword chuckBaseClasses Shred Math Machine Std
+
+" https://chuck.cs.princeton.edu/doc/reference/
+syn keyword chuckBasicUGen Gain Impulse Step SndBuf SndBuf2
+syn keyword chuckBasicUGen ADSR Envelope Delay DelayL DelayA Echo
+syn keyword chuckBasicUGen Noise CNoise Osc SinOsc TriOsc SawOsc PulseOsc SqrOsc
+syn keyword chuckBasicUGen Phasor HalfRect FullRect
+syn keyword chuckBasicUGen Chugraph Chugen UGen_Multi UGen_Stereo Mix2 Pan2
+
+" https://chuck.cs.princeton.edu/doc/reference/
+syn keyword chuckFilterUGen FilterBasic LPF HPF BPF BRF BiQuad ResonZ
+syn keyword chuckFilterUGen OnePole OneZero TwoPole TwoZero PoleZero
+
+" https://chuck.cs.princeton.edu/doc/reference/
+syn keyword chuckSTKUGen JCRev NRev PRCRev
+syn keyword chuckSTKUGen Chorus Modulate PitShift SubNoise
+syn keyword chuckSTKUGen BLT Blit BlitSaw BlitSquare FilterStk
+syn keyword chuckSTKUGen WvIn WaveLoop WvOut WvOut2 StkInstrument
+syn keyword chuckSTKUGen BandedWG BlowBotl BlowHole
+syn keyword chuckSTKUGen Bowed Brass Clarinet Flute Mandolin
+syn keyword chuckSTKUGen ModalBar Moog Saxofony Shakers Sitar StifKarp
+syn keyword chuckSTKUGen VoicForm KrstlChr FM BeeThree FMVoices
+syn keyword chuckSTKUGen HevyMetl HnkyTonk FrencHrn PercFlut Rhodey TubeBell Wurley
+
+" https://chuck.cs.princeton.edu/doc/reference/
+syn keyword chuckAdvancedUGen LiSa LiSa2 LiSa6 LiSa8 LiSa10
+syn keyword chuckAdvancedUGen LiSa16 GenX Gen5 Gen7 Gen9 Gen10 Gen17
+syn keyword chuckAdvancedUGen CurveTable WarpTable Dyno
+
+" https://chuck.cs.princeton.edu/doc/reference/
+syn keyword chuckChugin ABSaturator AmbPan3 Bitcrusher Elliptic ExpDelay ExpEnv FIR
+syn keyword chuckChugin FoldbackSaturator GVerb KasFilter MagicSine Mesh2D
+syn keyword chuckChugin Multicomb Pan4 Pan8 Pan16 PitchTrack PowerADSR RegEx
+syn keyword chuckChugin Sigmund Spectacle WinFuncEnv WPDiodeLadder WPKorg35
+
+" https://chuck.cs.princeton.edu/doc/reference/
+syn keyword chuckUnitAnalyzer UAna UAnaBlob Windowing
+syn keyword chuckUnitAnalyzer FFT IFFT DCT IDCT
+syn keyword chuckUnitAnalyzer Centroid Flux RMS RollOff
+syn keyword chuckUnitAnalyzer Flip UnFlip XCorr
+syn keyword chuckUnitAnalyzer Chroma Kurtosis MFCC SFM ZeroX AutoCorr FeatureCollector
+
+" https://chuck.cs.princeton.edu/doc/reference/
+syn keyword chuckChAI MLP KNN KNN2 HMM SVM Word2Vec PCA Wekinator AI
+
+" https://chuck.cs.princeton.edu/doc/reference/
+syn keyword chuckInputOutput IO FileIO OscIn OscOut OscMsg
+syn keyword chuckInputOutput Hid HidMsg KBHit SerialIO
+syn keyword chuckInputOutput MidiIn MidiOut MidiMsg MidiFileIn
+
+" https://chuck.cs.princeton.edu/doc/reference/
+syn keyword chuckUtilities CKDoc StringTokenizer ConsoleInput
+
+" https://github.com/wilsaj/chuck.vim/blob/master/syntax/chuck.vim
+syn match chuckNumber /\%(\i\|\$\)\@<![-]\?\d\+/ display
+syn match chuckHex /\<0[xX]\x\+[lL]\=\>/ display
+syn match chuckFloat /\%(\i\|\$\)\@<![-]\?\%(\d*\.\d\+\|\d\+\.\)/ display
+
+" this may need fixing/improvements
+syn match chuckComment "//.*$"
+syn region chuckComment start="/\*" end="\*/"
+syn match chuckSpecialChar contained "\\n"
+syn match chuckSpecialChar contained "\\t"
+syn match chuckSpecialChar contained "\\a"
+syn match chuckSpecialChar contained /\\"/
+syn match chuckSpecialChar contained "\\0"
+syn region chuckString start=/"/ end=/"/ display contains=chuckSpecialChar
+
+hi def link chuckPrimitiveType Type
+hi def link chuckComplexType Type
+hi def link chuckReferenceType Type
+hi def link chuckBoolean Boolean
+hi def link chuckOperator Operator
+hi def link chuckConditional Conditional
+hi def link chuckRepeat Repeat
+hi def link chuckTimeAndDuration Keyword
+hi def link chuckKeyword Keyword
+hi def link chuckBaseClasses Special
+hi def link chuckBasicUGen Structure
+hi def link chuckFilterUGen Structure
+hi def link chuckSTKUGen Structure
+hi def link chuckAdvancedUGen Structure
+hi def link chuckChugin Structure
+hi def link chuckUnitAnalyzer Structure
+hi def link chuckChAI Structure
+hi def link chuckInputOutput Special
+hi def link chuckUtilities Special
+hi def link chuckNumber Number
+hi def link chuckHex Number
+hi def link chuckFloat Float
+hi def link chuckComment Comment
+hi def link chuckSpecialChar SpecialChar
+hi def link chuckString String
+
+let b:current_syntax = "chuck"
diff --git a/runtime/syntax/csh.vim b/runtime/syntax/csh.vim
index 6a056c7..0ad85ad 100644
--- a/runtime/syntax/csh.vim
+++ b/runtime/syntax/csh.vim
@@ -1,9 +1,10 @@
" Vim syntax file
" Language: C-shell (csh)
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E. Campbell
" Last Change: Aug 31, 2016
" Version: 14
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_CSH
+" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_CSH
" quit when a syntax file was already loaded
if exists("b:current_syntax")
diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim
index f8104ea..f4d09cf 100644
--- a/runtime/syntax/css.vim
+++ b/runtime/syntax/css.vim
@@ -7,7 +7,7 @@
" Nikolai Weibull (Add CSS2 support)
" URL: https://github.com/vim-language-dept/css-syntax.vim
" Maintainer: Jay Sitter <jay@jaysitter.com>
-" Last Change: 2021 Oct 20
+" Last Change: 2024 Mar 2
" quit when a syntax file was already loaded
if !exists("main_syntax")
@@ -127,7 +127,7 @@ syn match cssColor contained "#\x\{8\}\>" contains=cssUnitDecorators
syn region cssURL contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline
syn region cssMathGroup contained matchgroup=cssMathParens start="(" end=")" containedin=cssFunction,cssMathGroup contains=cssCustomProp,cssValue.*,cssFunction,cssColor,cssStringQ,cssStringQQ oneline
-syn region cssFunction contained matchgroup=cssFunctionName start="\<\(var\|calc\)\s*(" end=")" contains=cssCustomProp,cssValue.*,cssFunction,cssColor,cssStringQ,cssStringQQ oneline
+syn region cssFunction contained matchgroup=cssFunctionName start="\<\(var\|calc\)\s*(" end=")" contains=cssCustomProp,cssValue.*,cssFunction,cssURL,cssColor,cssStringQ,cssStringQQ oneline
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\|color-stop\|from\|to\)\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma,cssFunction
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\|conic-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma
@@ -176,6 +176,8 @@ syn keyword cssBackgroundAttr contained cover contain
syn match cssBorderProp contained "\<border\(-\(top\|right\|bottom\|left\)\)\=\(-\(width\|color\|style\)\)\=\>"
syn match cssBorderProp contained "\<border\(-\(top\|bottom\)-\(left\|right\)\)\=-radius\>"
+syn match cssBorderProp contained "\<border-\(inline\|block\)\(-\(start\|end\)\)\=\(-\(style\|width\|color\)\)\=\>"
+syn match cssBorderProp contained "\<border-\(start\|end\)-\(start\|end\)-radius\>"
syn match cssBorderProp contained "\<border-image\(-\(outset\|repeat\|slice\|source\|width\)\)\=\>"
syn match cssBorderProp contained "\<box-decoration-break\>"
syn match cssBorderProp contained "\<box-shadow\>"
@@ -195,6 +197,7 @@ syn keyword cssBorderAttr contained clone slice
syn match cssBoxProp contained "\<padding\(-\(top\|right\|bottom\|left\)\)\=\>"
syn match cssBoxProp contained "\<margin\(-\(top\|right\|bottom\|left\)\)\=\>"
+syn match cssBoxProp contained "\<\(margin\|padding\)\(-\(inline\|block\)\(-\(start\|end\)\)\)\=\>"
syn match cssBoxProp contained "\<overflow\(-\(x\|y\|style\)\)\=\>"
syn match cssBoxProp contained "\<rotation\(-point\)\=\>"
syn keyword cssBoxAttr contained visible hidden scroll auto
@@ -227,7 +230,7 @@ syn match cssFlexibleBoxAttr contained "\<space\(-\(between\|around\|evenly\)\)\
" CSS Fonts Module Level 3
" http://www.w3.org/TR/css-fonts-3/
-syn match cssFontProp contained "\<font\(-\(family\|\|feature-settings\|kerning\|language-override\|size\(-adjust\)\=\|stretch\|style\|synthesis\|variant\(-\(alternates\|caps\|east-asian\|ligatures\|numeric\|position\)\)\=\|weight\)\)\=\>"
+syn match cssFontProp contained "\<font\(-\(display\|family\|feature-settings\|kerning\|language-override\|size\(-adjust\)\=\|stretch\|style\|synthesis\|variant\(-\(alternates\|caps\|east-asian\|ligatures\|numeric\|position\)\)\=\|weight\)\)\=\>"
" font attributes
syn keyword cssFontAttr contained icon menu caption
@@ -248,6 +251,8 @@ syn keyword cssFontAttr contained italic oblique
syn keyword cssFontAttr contained weight style
" font-weight attributes
syn keyword cssFontAttr contained bold bolder lighter
+" font-display attributes
+syn keyword cssFontAttr contained auto block swap fallback optional
" TODO: font-variant-* attributes
"------------------------------------------------
@@ -282,7 +287,7 @@ syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>"
" https://www.w3.org/TR/css-grid-1/
syn match cssGridProp contained "\<grid\>"
syn match cssGridProp contained "\<grid-template\(-\(columns\|rows\|areas\)\)\=\>"
-syn match cssGridProp contained "\<grid-\(column\|row\)\(-\(start\|end\|gap\)\)\=\>"
+syn match cssGridProp contained "\<\(grid-\)\=\(column\|row\)\(-\(start\|end\|gap\)\)\=\>"
syn match cssGridProp contained "\<grid-\(area\|gap\)\>"
syn match cssGridProp contained "\<gap\>"
syn match cssGridProp contained "\<grid-auto-\(flow\|rows\|columns\)\>"
@@ -452,12 +457,12 @@ syn match cssAttrComma ","
" Pseudo class
" https://www.w3.org/TR/selectors-4/
syn match cssPseudoClass ":[A-Za-z0-9_-]*" contains=cssNoise,cssPseudoClassId,cssUnicodeEscape,cssVendor,cssPseudoClassFn
-syn keyword cssPseudoClassId contained link visited active hover before after left right any-link
-syn keyword cssPseudoClassId contained root empty target enabled disabled checked invalid default defined autofill fullscreen host indeterminate in-range modal optional out-of-range picture-in-picture placeholder-shown paused playing read-only read-write required scope
+syn keyword cssPseudoClassId contained link visited active hover before after left right
+syn keyword cssPseudoClassId contained root empty target enabled disabled checked invalid
syn match cssPseudoClassId contained "\<first-\(line\|letter\)\>"
syn match cssPseudoClassId contained "\<\(first\|last\|only\)-\(of-type\|child\)\>"
syn match cssPseudoClassId contained "\<focus\(-within\|-visible\)\=\>"
-syn region cssPseudoClassFn contained matchgroup=cssFunctionName start="\<\(where\|has\|host\|not\|is\|lang\|\(nth\|nth-last\)-\(of-type\|child\)\)(" end=")" contains=cssStringQ,cssStringQQ,cssTagName,cssAttributeSelector,cssClassName,cssIdentifier
+syn region cssPseudoClassFn contained matchgroup=cssFunctionName start="\<\(not\|is\|lang\|\(nth\|nth-last\)-\(of-type\|child\)\)(" end=")" contains=cssStringQ,cssStringQQ,cssTagName,cssAttributeSelector,cssClassName,cssIdentifier
" ------------------------------------
" Vendor specific properties
syn match cssPseudoClassId contained "\<selection\>"
diff --git a/runtime/syntax/dcl.vim b/runtime/syntax/dcl.vim
index 530fbdb..1987ebb 100644
--- a/runtime/syntax/dcl.vim
+++ b/runtime/syntax/dcl.vim
@@ -1,9 +1,10 @@
" Vim syntax file
" Language: DCL (Digital Command Language - vms)
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E. Campbell
" Last Change: Mar 26, 2019
" Version: 13
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_DCL
+" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_DCL
" quit when a syntax file was already loaded
if exists("b:current_syntax")
diff --git a/runtime/syntax/deb822sources.vim b/runtime/syntax/deb822sources.vim
index 8111361..f7d337f 100644
--- a/runtime/syntax/deb822sources.vim
+++ b/runtime/syntax/deb822sources.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Debian deb822-format source list file
" Maintainer: Debian Vim Maintainers
-" Last Change: 2023 May 25
+" Last Change: 2024 Jan 30
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/deb822sources.vim
" Standard syntax initialization
@@ -12,19 +12,19 @@ endif
" case insensitive
syn case ignore
+" A bunch of useful keywords
+syn match deb822sourcesType /\<\(deb-src\|deb\)\ */ contained
+syn match deb822sourcesFreeComponent /\<\(main\|universe\)\> */ contained
+syn match deb822sourcesNonFreeComponent /\<\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)\> */ contained
+
" Comments are matched from the first character of a line to the end-of-line
syn region deb822sourcesComment start="^#" end="$"
-" A bunch of useful keywords
-syn match deb822sourcesType /\(deb-src\|deb\)/
-syn match deb822sourcesFreeComponent /\(main\|universe\)/
-syn match deb822sourcesNonFreeComponent /\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)/
-
" Include Debian versioning information
runtime! syntax/shared/debversions.vim
-exe 'syn match deb822sourcesSupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedSupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\)+'
-exe 'syn match deb822sourcesUnsupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedUnsupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\)+'
+exe 'syn match deb822sourcesSupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedSupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\) *+'
+exe 'syn match deb822sourcesUnsupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedUnsupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\) *+'
unlet g:debSharedSupportedVersions
unlet g:debSharedUnsupportedVersions
@@ -37,13 +37,13 @@ syn keyword deb822sourcesYesNo contained yes no
" Match uri's
syn match deb822sourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+'
-syn match deb822sourcesEntryField "^\%(Types\|URIs\|Suites\|Components\): *"
-syn match deb822sourcesOptionField "^\%(Signed-By\|Check-Valid-Until\|Valid-Until-Min\|Valid-Until-Max\|Date-Max-Future\|InRelease-Path\): *"
-syn match deb822sourcesMultiValueOptionField "^\%(Architectures\|Languages\|Targets\)\%(-Add\|-Remove\)\?: *"
-
+syn region deb822sourcesStrictField matchgroup=deb822sourcesEntryField start="^\%(Types\|URIs\|Suites\|Components\): *" end="$" contains=deb822sourcesType,deb822sourcesUri,deb822sourcesSupportedSuites,deb822sourcesUnsupportedSuites,deb822sourcesFreeComponent,deb822sourcesNonFreeComponent oneline
+syn region deb822sourcesField matchgroup=deb822sourcesOptionField start="^\%(Signed-By\|Check-Valid-Until\|Valid-Until-Min\|Valid-Until-Max\|Date-Max-Future\|InRelease-Path\): *" end="$" oneline
+syn region deb822sourcesField matchgroup=deb822sourcesMultiValueOptionField start="^\%(Architectures\|Languages\|Targets\)\%(-Add\|-Remove\)\?: *" end="$" oneline
syn region deb822sourcesStrictField matchgroup=deb822sourcesBooleanOptionField start="^\%(PDiffs\|Allow-Insecure\|Allow-Weak\|Allow-Downgrade-To-Insecure\|Trusted\|Check-Date\): *" end="$" contains=deb822sourcesYesNo oneline
syn region deb822sourcesStrictField matchgroup=deb822sourcesForceBooleanOptionField start="^\%(By-Hash\): *" end="$" contains=deb822sourcesForce,deb822sourcesYesNo oneline
+hi def link deb822sourcesField Default
hi def link deb822sourcesComment Comment
hi def link deb822sourcesEntryField Keyword
hi def link deb822sourcesOptionField Special
diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim
index 9846cfd..76b52cf 100644
--- a/runtime/syntax/debsources.vim
+++ b/runtime/syntax/debsources.vim
@@ -2,7 +2,7 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
-" Last Change: 2023 Oct 11
+" Last Change: 2024 Jan 30
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debsources.vim
" Standard syntax initialization
@@ -14,9 +14,9 @@ endif
syn case match
" A bunch of useful keywords
-syn match debsourcesType /\(deb-src\|deb\)/
-syn match debsourcesFreeComponent /\(main\|universe\)/
-syn match debsourcesNonFreeComponent /\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)/
+syn match debsourcesType /\<\(deb-src\|deb\)\>/ contained
+syn match debsourcesFreeComponent /\<\(main\|universe\)\>/ contained
+syn match debsourcesNonFreeComponent /\<\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)\>/ contained
" Match comments
syn match debsourcesComment /#.*/ contains=@Spell
@@ -34,7 +34,6 @@ unlet g:debSharedUnsupportedVersions
syn match debsourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+'
syn region debsourcesLine start="^" end="$" contains=debsourcesType,debsourcesFreeComponent,debsourcesNonFreeComponent,debsourcesComment,debsourcesUri,debsourcesDistrKeyword,debsourcesUnsupportedDistrKeyword oneline
-
" Associate our matches and regions with pretty colours
hi def link debsourcesType Statement
hi def link debsourcesFreeComponent Statement
diff --git a/runtime/syntax/dosbatch.vim b/runtime/syntax/dosbatch.vim
index a75771b..5560199 100644
--- a/runtime/syntax/dosbatch.vim
+++ b/runtime/syntax/dosbatch.vim
@@ -2,11 +2,11 @@
" Language: MS-DOS/Windows batch file (with NT command extensions)
" Maintainer: Mike Williams <mrmrdubya@gmail.com>
" Filenames: *.bat
-" Last Change: 12th February 2023
+" Last Change: 3rd February 2024
"
" Options Flags:
" dosbatch_cmdextversion - 1 = Windows NT, 2 = Windows 2000 [default]
-" dosbatch_colons_comment - any value to treat :: as comment line
+" dosbatch_colons_comment - any value to allow :: comments in code blocks
"
" quit when a syntax file was already loaded
@@ -88,18 +88,22 @@ syn match dosbatchLabel "\<goto\s\+\h\w*\>"lc=4
syn match dosbatchLabel ":\h\w*\>"
" Comments - usual rem but also two colons as first non-space is an idiom
-syn match dosbatchComment "^rem\($\|\s.*$\)"lc=3 contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
-syn match dosbatchComment "^@rem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
-syn match dosbatchComment "\srem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
-syn match dosbatchComment "\s@rem\($\|\s.*$\)"lc=5 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
+syn match dosbatchRemComment "^rem\($\|\s.*$\)"lc=3 contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
+syn match dosbatchRemComment "^@rem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
+syn match dosbatchRemComment "\srem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
+syn match dosbatchRemComment "\s@rem\($\|\s.*$\)"lc=5 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
+syn match dosbatchColonComment "\s*:\s*:.*$" contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
+
+" Commands code blocks
+syn cluster dosbatchCodeBlockComment contains=dosbatchRemComment
if exists("dosbatch_colons_comment")
- syn match dosbatchComment "\s*:\s*:.*$" contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
+ syn cluster dosbatchCodeBlockComment add=dosbatchColonComment
else
- syn match dosbatchError "\s*:\s*:.*$"
+ syn match dosbatchColonCommentErr contained "\s*:\s*:.*$"
endif
-
-" Comments in ()'s - still to handle spaces before rem
-syn match dosbatchComment "(rem\([^)]\|\^\@<=)\)*"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
+syn match dosbatchColonCommentErr contained "\s*:\s*:[^)]*\(\(\n\s*\)\?)\)\@="
+syn region dosbatchCodeBlock transparent start=+(+ end=+)+ contains=dosbatchString,dosbatchVariable,dosBatchArgument,@dosbatchNumber,dosbatchImplicit,dosbatchStatement,dosbatchConditional,dosbatchRepeat,dosbatchOperator,@dosbatchCodeBlockComment,dosbatchColonCommentErr,dosbatchCodeBlock
+syn match dosbatchCodeBlockErr ")"
syn keyword dosbatchImplicit append assoc at attrib break cacls cd chcp chdir
syn keyword dosbatchImplicit chkdsk chkntfs cls cmd color comp compact convert copy
@@ -116,6 +120,8 @@ syn keyword dosbatchImplicit vol xcopy
hi def link dosbatchTodo Todo
hi def link dosbatchError Error
+hi def link dosbatchCodeBlockErr dosbatchError
+hi def link dosbatchColonCommentErr dosbatchError
hi def link dosbatchStatement Statement
hi def link dosbatchCommands dosbatchStatement
@@ -140,6 +146,9 @@ hi def link dosbatchBinary dosbatchNumber
hi def link dosbatchOctal dosbatchNumber
hi def link dosbatchComment Comment
+hi def link dosbatchRemComment dosbatchComment
+hi def link dosbatchColonComment dosbatchComment
+
hi def link dosbatchImplicit Function
hi def link dosbatchSwitch Special
diff --git a/runtime/syntax/elmfilt.vim b/runtime/syntax/elmfilt.vim
index d995853..aa1b57c 100644
--- a/runtime/syntax/elmfilt.vim
+++ b/runtime/syntax/elmfilt.vim
@@ -1,9 +1,10 @@
" Vim syntax file
" Language: Elm Filter rules
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E. Campbell
" Last Change: Aug 31, 2016
" Version: 9
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_ELMFILT
+" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_ELMFILT
" quit when a syntax file was already loaded
if exists("b:current_syntax")
diff --git a/runtime/syntax/exports.vim b/runtime/syntax/exports.vim
index 05a3f1a..00b7d80 100644
--- a/runtime/syntax/exports.vim
+++ b/runtime/syntax/exports.vim
@@ -1,10 +1,11 @@
" Vim syntax file
" Language: exports
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E. Campbell
" Last Change: Aug 31, 2016
" Version: 8
" Notes: This file includes both SysV and BSD 'isms
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_EXPORTS
+" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_EXPORTS
" quit when a syntax file was already loaded
if exists("b:current_syntax")
diff --git a/runtime/syntax/fortran.vim b/runtime/syntax/fortran.vim
index 1fb8a1c..8167e4d 100644
--- a/runtime/syntax/fortran.vim
+++ b/runtime/syntax/fortran.vim
@@ -1,6 +1,6 @@
" Vim syntax file
" Language: Fortran 2023 (and Fortran 2018, 2008, 2003, 95, 90, and 77)
-" Version: (v110) 2024 January 03
+" Version: (v113) 2024 February 01
" Maintainers: Ajit J. Thakkar <ajit@unb.ca>; <https://ajit.ext.unb.ca/>
" Joshua Hollett <j.hollett@uwinnipeg.ca>
" Usage: For instructions, do :help fortran-syntax from Vim
@@ -25,7 +25,7 @@ set cpo&vim
" Choose between fixed and free source form if this hasn't been done yet
if !exists("b:fortran_fixed_source")
if exists("fortran_free_source")
- " User guarantees free source form for all fortran files
+ " User guarantees free source form for all Fortran files
let b:fortran_fixed_source = 0
elseif exists("fortran_fixed_source")
" User guarantees fixed source form for all fortran files
@@ -37,7 +37,7 @@ if !exists("b:fortran_fixed_source")
" Fixed-form file extension defaults
let b:fortran_fixed_source = 1
else
- " Modern fortran compilers still allow both free and fixed source form.
+ " Modern Fortran compilers still allow both free and fixed source form.
" Assume fixed source form unless signs of free source form
" are detected in the first five columns of the first s:lmax lines.
" Detection becomes more accurate and time-consuming if more lines
@@ -61,6 +61,9 @@ if !exists("b:fortran_fixed_source")
endif
endif
+" Group names ending in 'Del' and 'Ob', respectively, indicate features deleted and obsolescent in Fortran 2018 and later
+" Deleted features are highlighted as errors
+" Obsolescent features are highlighted as todo items
syn case ignore
if b:fortran_fixed_source == 1
@@ -78,59 +81,68 @@ syn match fortranConstructName "\%(\<end\s*forall\s\+\)\@15<=\a\w*\>"
syn match fortranConstructName "\%(\<end\s*critical\s\+\)\@17<=\a\w*\>"
syn match fortranConstructName "\%(\<end\s*associate\s\+\)\@18<=\a\w*\>"
-syn match fortranUnitName "\%(\<\%(end\s*\)\?\%(subroutine\|function\|module\|program\|submodule\)\s\+\)\@12<=\a\w\+"
+syn match fortranUnitName "\%(\<\%(end\s*\)\?\%(subroutine\|function\|module\|program\|submodule\)\s\+\)\@12<=\a\w*"
syn match fortranUnitHeader "\<end\>\ze\s*\%(!.*\)\?$"
-syn keyword fortranIntrinsic abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh
+syn keyword fortranIntrinsic abs acos aimag aint anint asin atan atan2 cmplx conjg cos cosh exp ichar index int log log10 max min nint sin sinh sqrt tan tanh
syn keyword fortranIntrinsicR achar iachar transfer dble dprod dim lge lgt lle llt mod
syn keyword fortranIntrinsic command_argument_count get_command get_command_argument get_environment_variable is_iostat_end is_iostat_eor move_alloc new_line same_type_as extends_type_of
-syn keyword fortranIntrinsic selected_real_kind selected_int_kind selected_logical_kind selected_char_kind
+syn keyword fortranIntrinsic selected_real_kind selected_int_kind selected_logical_kind selected_char_kind next previous
syn keyword fortranIntrinsic acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2
syn keyword fortranIntrinsic adjustl adjustr all allocated any associated bit_size btest ceiling cshift date_and_time digits
syn keyword fortranIntrinsic dot_product eoshift exponent floor fraction iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc merge minexponent minloc
-syn keyword fortranIntrinsic modulo mvbits nearest pack precision present radix random_number random_seed range repeat reshape rrspacing scale scan set_exponent shape size spacing
-"syn keyword fortranIntrinsic count epsilon maxval minval product sum huge tiny
+syn keyword fortranIntrinsic modulo mvbits nearest pack precision present radix random_number random_seed range repeat reshape rrspacing scale scan set_exponent shape spacing
" intrinsic names often used for variables in older Fortran code
-syn match fortranIntrinsic '\<\%(count\|epsilon\|maxval\|minval\|product\|sum\|huge\|tiny\)\>\ze\s*('
-syn keyword fortranIntrinsic spread system_clock transpose trim ubound unpack verify
+syn match fortranIntrinsic '\<\%(count\|epsilon\|maxval\|minval\|product\|sum\|huge\|tiny\|char\)\>\ze\s*('
+syn keyword fortranIntrinsic spread system_clock transpose trim ubound unpack verify is_contiguous event_query
syn keyword fortranIntrinsic atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits
syn keyword fortranIntrinsic bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image
syn keyword fortranIntrinsic null cpu_time failed_images stopped_images image_status co_broadcast co_max co_min co_sum co_reduce
syn keyword fortranIntrinsic atomic_add atomic_and atomic_or atomic_xor atomic_fetch_add atomic_fetch_and atomic_fetch_or atomic_fetch_xor atomic_cas
-syn keyword fortranIntrinsic ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode
-syn keyword fortranIntrinsic ieee_max ieee_max_mag ieee_min ieee_min_mag split tokenize ieee_support_subnormal ieee_get_modes ieee_set_modes
-syn keyword fortranIntrinsic ieee_set_status ieee_get_rounding_mode ieee_set_rounding_mode
-syn keyword fortranIntrinsic iso_c_binding c_loc c_funloc c_sizeof c_associated c_f_pointer c_f_procpointer
-syn keyword fortranIntrinsic out_of_range reduce random_init coshape
+syn keyword fortranIntrinsic ieee_arithmetic ieee_features ieee_exceptions
+syn keyword fortranIntrinsic ieee_class ieee_copy_sign ieee_fma ieee_get_rounding_mode ieee_get_underflow_mode ieee_int ieee_is_finite
+syn keyword fortranIntrinsic ieee_is_nan ieee_is_negative ieee_is_normal ieee_logb ieee_max ieee_max_mag ieee_max_num ieee_max_num_mag
+syn keyword fortranIntrinsic ieee_min ieee_min_mag ieee_min_num ieee_min_num_mag ieee_next_after ieee_next_down ieee_next_up ieee_quiet_eq
+syn keyword fortranIntrinsic ieee_quiet_ge ieee_quiet_gt ieee_quiet_le ieee_quiet_lt ieee_quiet_ne ieee_real ieee_rem ieee_rint ieee_scalb
+syn keyword fortranIntrinsic ieee_selected_real_kind ieee_set_rounding_mode ieee_set_underflow_mode ieee_signaling_eq ieee_signaling_ge
+syn keyword fortranIntrinsic ieee_signaling_gt ieee_signaling_le ieee_signaling_lt ieee_signaling_ne ieee_signbit ieee_support_datatype
+syn keyword fortranIntrinsic ieee_support_denormal ieee_support_divide ieee_support_inf ieee_support_io ieee_support_nan ieee_support_rounding
+syn keyword fortranIntrinsic ieee_support_sqrt ieee_support_subnormal ieee_support_standard ieee_support_underflow_control
+syn keyword fortranIntrinsic ieee_unordered ieee_value ieee_get_flag ieee_get_halting_mode ieee_get_modes ieee_get_status
+syn keyword fortranIntrinsic ieee_set_flag ieee_set_halting_mode ieee_set_modes ieee_set_status ieee_support_flag ieee_support_halting
+syn keyword fortranIntrinsic iso_c_binding c_loc c_funloc c_sizeof c_associated c_f_pointer c_f_procpointer c_f_strpointer f_c_string
+syn keyword fortranIntrinsic iso_fortran_env compiler_options compiler_version
+syn keyword fortranIntrinsic out_of_range reduce random_init coshape get_team split tokenize
syn keyword fortranIntrinsic acosd asind atand atan2d cosd sind tand acospi asinpi atanpi atan2pi cospi sinpi tanpi
-syn keyword fortranIntrinsic compiler_options compiler_version get_team team_number
-syn match fortranIntrinsic "\<real\s*("me=s+4
-syn match fortranIntrinsic "\<logical\s*("me=s+7
-syn match fortranIntrinsic "\<not\s*("me=s+3
-syn match fortranIntrinsic "\<len\s*("me=s+3
-syn match fortranIntrinsic "\<kind\s*("me=s+4
-" obsolescent type-specific intrinsics
+syn match fortranIntrinsic "\%(^\s*\|type *is *(\s*\)\@12<!\<real\ze\s*("
+syn match fortranIntrinsic '\<\%(logical\|not\|len\|kind\|rank\)\>\ze\s*('
+syn match fortranIntrinsic '\<\%(sign\|size\|team_number\)\>\ze\s*('
+" Obsolescent type-specific intrinsics
syn keyword fortranIntrinsicOb alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl
-" Extra intrinsics provided by some vendors
-syn keyword fortranExtraIntrinsic algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh
+if exists("fortran_vendor_intrinsics")
+ syn keyword fortranIntrinsicVen algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh
+endif
-syn keyword fortranType generic final enumerator import
-syn keyword fortranType c_ptr c_funptr elemental pure impure recursive non_recursive
-syn match fortranTypeOb "^\s*\zs\%(character\s*\)\@15<=\*"
-syn match fortranType "^\s*\zs\%(implicit\s\+\)\?\%(real\|integer\|logical\|complex\|character\|type\)\>"
+syn keyword fortranType generic final enumerator import classof typeof team_type event_type lock_type notify_type
+syn keyword fortranType ieee_flag_type ieee_modes_type ieee_status_type ieee_class_type ieee_round_type ieee_features_type
+syn keyword fortranType c_ptr c_funptr elemental pure impure recursive non_recursive simple
+syn match fortranType "^\s*\%(implicit\s\+\)\?\%(real\|double\s*precision\|integer\|logical\|complex\|character\|type\)\>"
+syn match fortranTypeOb "^\s*\%(character\s*\)\@15<=\*"
syn match fortranType "^\s*\zsimplicit\s\+none\>"
-syn match fortranType "\<\%(class\|type\)\%(of\)\?\>"
+syn match fortranType "\<class\>"
+syn match fortranType "\%(\<type\s\+is\s\+[(]\s*\)\@15<=\%(real\|double\s*precision\|integer\|logical\|complex\|character\)\>"
syn match fortranType "\<\%(end\s*\)\?interface\>"
syn match fortranType "\<enum\s*,\s*bind\s*(\s*c\s*)"
syn match fortranType "\<end\s*\%(enum\|type\)\>"
-syn match fortranType "\<\%(end\s*\)\?enumeration\s\+type"
+syn match fortranType "\<\%(end\s*\)\?enumeration\s\+type\>"
syn match fortranType "\<\%(end\s*\)\?\%(module\s\+\)\?procedure\>"
+syn match fortranType "\%(simple \|pure \|impure \|recursive \|non_recursive \|elemental \|module \)\@17<=\%(real\|double precision\|integer\|logical\|complex\|character\)"
syn match fortranTypeR display "\<double\s*precision\>"
syn match fortranTypeR display "\<double\s\+complex\>"
-syn keyword fortranAttribute value bind deferred contiguous intrinsic non_intrinsic
-syn keyword fortranAttribute asynchronous nopass non_overridable pass volatile extends
-syn keyword fortranAttribute abstract external private public protected intent optional
-syn keyword fortranAttribute pointer target allocatable dimension codimension sequence parameter save
+syn keyword fortranAttribute abstract allocatable bind codimension contiguous deferred dimension extends
+syn keyword fortranAttribute external intent intrinsic non_intrinsic non_overridable nopass optional parameter pass
+syn keyword fortranAttribute pointer private protected public save sequence target value volatile
+syn match fortranAttribute "\<asynchronous\>\ze\s*\%(::\|,\|(\)"
syn keyword fortranUnitHeader result operator assignment
syn match fortranUnitHeader "\<\%(end\s*\)\?\%(subroutine\|function\|module\|program\|submodule\)\>"
@@ -149,17 +161,17 @@ syn keyword fortranTodo contained bug note debug todo fixme
syn region fortranParen transparent start="(" end=")" contains=ALLBUT,fortranParenError,@fortranCommentGroup,cIncluded,@spell
syn match fortranParenError ")"
-syn match fortranOperator "\.\s*n\=eqv\s*\."
+syn match fortranOperator "\.\s*n\?eqv\s*\."
syn match fortranOperator "\.\s*\%(and\|or\|not\)\s*\."
syn match fortranOperator "\%(+\|-\|/\|\*\)"
-syn match fortranOperator "\%(\%(>\|<\)=\=\|==\|/=\|=\)"
+syn match fortranOperator "\%(\%(>\|<\)=\?\|==\|/=\|=\)"
syn match fortranOperator "\%(%\|?\|=>\)"
syn match fortranOperator "\%([\|]\)"
syn match fortranOperatorR "\.\s*[gl][et]\s*\."
syn match fortranOperatorR "\.\s*\%(eq\|ne\)\s*\."
syn keyword fortranReadWrite print flush
-syn match fortranReadWrite '\<\%(backspace\|close\|endfile\|inquire\|open\|read\|rewind\|write\)\ze\s*('
+syn match fortranReadWrite '\<\%(backspace\|close\|endfile\|inquire\|open\|read\|rewind\|wait\|write\)\ze\s*('
"If tabs are allowed then the left margin checks do not work
if exists("fortran_have_tabs")
@@ -170,17 +182,17 @@ endif
"Numbers of various sorts
" Integers
-syn match fortranNumber display "\<\d\+\%(_\a\w*\)\=\>"
+syn match fortranNumber display "\<\d\+\%(_\a\w*\)\?\>"
" floating point number, without a decimal point
-syn match fortranFloatIll display "\<\d\+[deq][-+]\=\d\+\%(_\a\w*\)\=\>"
+syn match fortranFloatIll display "\<\d\+[deq][-+]\?\d\+\%(_\a\w*\)\?\>"
" floating point number, starting with a decimal point
-syn match fortranFloatIll display "\.\d\+\%([deq][-+]\=\d\+\)\=\%(_\a\w*\)\=\>"
+syn match fortranFloatIll display "\.\d\+\%([deq][-+]\?\d\+\)\?\%(_\a\w*\)\?\>"
" floating point number, no digits after decimal
-syn match fortranFloatIll display "\<\d\+\.\%([deq][-+]\=\d\+\)\=\%(_\a\w*\)\=\>"
+syn match fortranFloatIll display "\<\d\+\.\%([deq][-+]\?\d\+\)\?\%(_\a\w*\)\?\>"
" floating point number, D or Q exponents
-syn match fortranFloatIll display "\<\d\+\.\d\+\%([dq][-+]\=\d\+\)\=\%(_\a\w*\)\=\>"
+syn match fortranFloatIll display "\<\d\+\.\d\+\%([dq][-+]\?\d\+\)\?\%(_\a\w*\)\?\>"
" floating point number
-syn match fortranFloat display "\<\d\+\.\d\+\%(e[-+]\=\d\+\)\=\%(_\a\w*\)\=\>"
+syn match fortranFloat display "\<\d\+\.\d\+\%(e[-+]\?\d\+\)\?\%(_\a\w*\)\?\>"
" binary number
syn match fortranBinary display "b["'][01]\+["']"
" octal number
@@ -189,52 +201,59 @@ syn match fortranOctal display "o["'][0-7]\+["']"
syn match fortranHex display "z["'][0-9A-F]\+["']"
" Numbers in formats
syn match fortranFormatSpec display "\d*f\d\+\.\d\+"
-syn match fortranFormatSpec display "\d*e[sn]\=\d\+\.\d\+\%(e\d+\>\)\="
-syn match fortranFormatSpec display "\d*\%(d\|q\|g\)\d\+\.\d\+\%(e\d+\)\="
+syn match fortranFormatSpec display "\d*e[sn]\?\d\+\.\d\+\%(e\d+\>\)\?"
+syn match fortranFormatSpec display "\d*\%(d\|q\|g\)\d\+\.\d\+\%(e\d+\)\?"
syn match fortranFormatSpec display "\d\+x\>"
" The next match cannot be used because it would pick up identifiers as well
" syn match fortranFormatSpec display "\<\%(a\|i\)\d\+"
" Numbers as labels
-syn match fortranLabelNumber display "^\zs\d\{1,5}\ze\s"
-syn match fortranLabelNumber display "^ \zs\d\{1,4}\ze\s"
-syn match fortranLabelNumber display "^ \zs\d\{1,3}\ze\s"
-syn match fortranLabelNumber display "^ \zs\d\d\=\ze\s"
-syn match fortranLabelNumber display "^ \zs\d\ze\s"
+if (b:fortran_fixed_source == 1)
+ syn match fortranLabelNumber display "^\zs\d\{1,5}\ze\s"
+ syn match fortranLabelNumber display "^ \zs\d\{1,4}\ze\s"
+ syn match fortranLabelNumber display "^ \zs\d\{1,3}\ze\s"
+ syn match fortranLabelNumber display "^ \zs\d\d\?\ze\s"
+ syn match fortranLabelNumber display "^ \zs\d\ze\s"
+else
+ syn match fortranLabelNumber display "^\s*\zs\d\{1,5}\ze\s*\a"
+ syn match fortranLabelNumberOb display "^\s*\zs\d\{1,5}\ze *end\s*\%(do\|if\)\>\ze"
+endif
" Numbers as targets
-syn match fortranTarget display "\%(\<if\s*(.\+)\s*\)\@<=\%(\d\+\s*,\s*\)\{2}\d\+\>"
-syn match fortranTarget display "\%(\<do\s\+\)\@11<=\d\+\>"
-syn match fortranTarget display "\%(\<go\s*to\s*(\=\)\@11<=\%(\d\+\s*,\s*\)*\d\+\>"
+syn match fortranTarget display "\%(\<if\s*(.\+)\s*\)\@<=\%(\d\+\s*,\s*\)\{2}\d\+\>"
+syn match fortranTargetOb display "\%(\<do\s*,\?\s*\)\@11<=\d\+\>"
+syn match fortranTarget display "\%(\<go\s*to\s*(\?\)\@11<=\%(\d\+\s*,\s*\)*\d\+\>"
syn match fortranBoolean "\.\s*\%(true\|false\)\s*\."
-syn keyword fortranKeyword call
-syn keyword fortranKeyword use only contains
+syn keyword fortranKeyword call use only continue allocate deallocate nullify return cycle exit contains
syn match fortranKeyword "\<fail\s\+image\>"
-syn match fortranKeyword "\<\%(error\s\+\)\=stop\>"
-syn keyword fortranKeyword continue
+syn match fortranKeyword "\<\%(error\s\+\)\?stop\>"
syn match fortranKeyword "\<go\s*to\>"
syn match fortranKeywordDel "\<go\s*to\ze\s\+.*,\s*(.*$"
syn match fortranKeywordOb "\<go\s*to\ze\s*(\d\+.*$"
-syn keyword fortranKeywordDel assign pause
-syn keyword fortranKeyword allocate deallocate nullify return cycle exit
+syn keyword fortranKeywordDel pause
+syn match fortranKeywordDel "assign\s*\d\+\s*to\s\+\a\w*"
+syn match fortranStringDel display "[/(,] *\d\+H"
syn region fortranString start=+'+ end=+'+ contains=fortranLeftMargin,fortranContinueMark,fortranSerialNumber
syn region fortranString start=+"+ end=+"+ contains=fortranLeftMargin,fortranContinueMark,fortranSerialNumber
-syn match fortranIO '\%(\%((\|,\|, *&\n\)\s*\)\@<=\%(access\|blank\|direct\|exist\|file\|fmt\|form\|formatted\|iostat\|name\|named\|nextrec\|number\|opened\|rec\|recl\|sequential\|status\|unformatted\|unit\)\ze\s*='
+syn match fortranSpecifier '\%(\%((\|,\|, *&\n\)\s*\)\@<=\%(access\|acquired_lock\|action\|advance\|asynchronous\|blank\|decimal\|delim\|direct\|encoding\|end\|eor\|err\)\ze\s*='
+syn match fortranSpecifier '\%(\%((\|,\|, *&\n\)\s*\)\@<=\%(errmsg\|exist\|file\|fmt\|form\|formatted\|id\|iolength\|iomsg\|iostat\|leading_zero\|mold\|name\|named\)\ze\s*='
+syn match fortranSpecifier '\%(\%((\|,\|, *&\n\)\s*\)\@<=\%(new_index\|newunit\|nextrec\|nml\|notify\|number\|opened\|pad\|pending\|pos\|position\|quiet\)\ze\s*='
+syn match fortranSpecifier '\%(\%((\|,\|, *&\n\)\s*\)\@<=\%(read\|readwrite\|rec\|recl\|round\|sequential\|sign\|size\)\ze\s*='
+syn match fortranSpecifier '\%(\%((\|,\|, *&\n\)\s*\)\@<=\%(source\|stat\|status\|stream\|team\|team_number\|unformatted\|unit\|until_count\|write\)\ze\s*='
+syn match fortranSpecifier "\%((\s*\)\@<=\%(un\)\?formatted\ze\s*)"
+syn match fortranSpecifier "\%(local\|local_init\|reduce\|shared\)\ze\s*("
+syn match fortranSpecifier "\<default\s*(\s*none\s*)"
syn keyword fortranIOR format namelist
-syn keyword fortranIO pad position action delim readwrite
-syn keyword fortranIO eor advance nml
-syn keyword fortranIO newunit decimal round iomsg
-syn match fortranIO contains=fortranOperator "\<e\%(nd\|rr\)\s*=\s*\d\+"
syn keyword fortranConditional else then where elsewhere
-syn match fortranConditional "\<if\>"
-syn match fortranConditional "\<else\s*if\>"
+syn match fortranConditional "\<\%(else\s*\)\?if\>"
syn match fortranConditional "\<\%(end\s*\)\?\%(if\|where\|select\)\>"
-syn match fortranConditional "\<select\s\+\%(case\|rank\|type\)\>"
+syn match fortranConditional "\<select\s*\%(case\|rank\|type\)\>"
+syn match fortranConditional "\<\%(case\|rank\|class\)\s\+default\>"
+syn match fortranConditional "^\s*\zs\%(case\|rank\)\ze\s\+("
syn match fortranConditional "\<\%(class\|type\)\s\+is\>"
-syn match fortranConditional "\<\%(case\|rank\)\%(\s\+default\)\?\>"
syn match fortranConditionalDel "\<if\s*(.*)\s*\d\+\s*,\s*\d\+\s*,\s*\d\+\s*$"
syn keyword fortranInclude include
@@ -248,22 +267,26 @@ syn match fortranImageControl "\<notify\s\+wait\ze\s*("
syn keyword fortranUnitHeaderOb entry
syn match fortranUnitHeaderOb display "\<block\s*data\>"
-syn keyword fortranStorageClass in out
-syn match fortranStorageClass "\<in\s*out\>"
-syn match fortranStorageClass "\<kind\s*="me=s+4
-syn match fortranStorageClass "\<len\s*="me=s+3
-syn match fortranStorageClass "^\s*\zsdata\>\%(\s\+\a\w*\s*/\)\@="
-syn match fortranStorageClassOb "^\s*\zscommon\>"
-syn match fortranStorageClassOb "^\s*\zscommon\>\%(\s*/\)\@="
-syn keyword fortranStorageClassOb equivalence
-
-syn keyword fortranConstant c_null_char c_alert c_backspace c_form_feed c_new_line c_carriage_return c_horizontal_tab c_vertical_tab
-syn keyword fortranConstant c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr
-syn keyword fortranConstant iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit stat_failed_image stat_unlocked_failed_image
-syn keyword fortranConstant int8 int16 int32 int64 real16 real32 real64 real128 character_kinds integer_kinds logical_kinds real_kinds iostat_inquire_internal_unit
-syn keyword fortranConstant ieee_negative_subnormal ieee_positive_subnormal
-
-" CUDA fortran
+syn keyword fortranStorageClass in out inout
+syn match fortranStorageClass '\<\%(kind\|len\)\>\ze\s*='
+syn match fortranStorageClass "^\s*data\>\ze\%(\s\+\a\)\@="
+syn match fortranStorageClassOb "\<common\>\%(\s*\%(/\|\a\)\)\@="
+syn match fortranStorageClassOb "\<equivalence\>\%(\s*(\)\@="
+
+syn keyword fortranConstant c_null_char c_alert c_backspace c_form_feed c_new_line c_carriage_return c_horizontal_tab c_vertical_tab c_ptrdiff_t
+syn keyword fortranConstant c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr
+syn keyword fortranConstant character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit stat_failed_image stat_locked stat_locked_other_image stat_stopped_image stat_unlocked stat_unlocked_failed_image
+syn keyword fortranConstant int8 int16 int32 int64 real16 real32 real64 real128 character_kinds integer_kinds logical_kinds real_kinds iostat_inquire_internal_unit initial_team current_team parent_team
+syn keyword fortranConstant ieee_invalid ieee_overflow ieee_divide_by_zero ieee_underflow ieee_inexact ieee_usual ieee_all
+syn keyword fortranConstant ieee_signaling_nan ieee_quiet_nan ieee_negative_inf ieee_negative_normal ieee_negative_subnormal
+syn keyword fortranConstant ieee_negative_zero ieee_positive_zero ieee_positive_subnormal ieee_positive_normal ieee_positive_inf
+syn keyword fortranConstant ieee_other_value ieee_negative_denormal ieee_positive_denormal ieee_negative_subnormal
+syn keyword fortranConstant ieee_positive_subnormal ieee_nearest ieee_to_zero ieee_up ieee_down ieee_away ieee_other ieee_datatype
+syn keyword fortranConstant ieee_denormal ieee_divide ieee_halting ieee_inexact_flag ieee_inf ieee_invalid_flag ieee_nan
+syn keyword fortranConstant ieee_rounding ieee_sqrt ieee_subnormal ieee_underflow_flag
+syn match fortranConstant "\.\s*nil\s*\."
+
+" CUDA Fortran
if exists("fortran_CUDA")
syn match fortranTypeCUDA "\<attributes\>"
syn keyword fortranTypeCUDA host global device
@@ -324,7 +347,7 @@ else
endif
syn match fortranComment excludenl "!.*$" contains=@fortranCommentGroup,@spell
-syn match fortranOpenMP excludenl "^\s*\zs!\$\%(OMP\)\=&\=\s.*$"
+syn match fortranOpenMP excludenl "^\s*\zs!\$\%(OMP\)\?&\?\s.*$"
syn match fortranEndStatement display ";"
"cpp is often used with Fortran
@@ -333,7 +356,6 @@ syn match cPreProc "^\s*#\s*\%(elif\|if\)\>.*"
syn match cPreProc "^\s*#\s*\%(ifndef\|undef\)\>.*"
syn match cPreCondit "^\s*#\s*\%(else\|endif\)\>.*"
syn region cIncluded contained start=+"[^("]+ skip=+\\\\\|\\"+ end=+"+ contains=fortranLeftMargin,fortranContinueMark,fortranSerialNumber
-"syn region cIncluded contained start=+"[^("]+ skip=+\\\\\|\\"+ end=+"+
syn match cIncluded contained "<[^>]*>"
syn match cInclude "^\s*#\s*include\>\s*["<]" contains=cIncluded
@@ -352,43 +374,43 @@ if exists("fortran_fold")
setlocal foldmethod=syntax
endif
if (b:fortran_fixed_source == 1)
- syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*\%(program\%(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranModule
- syn region fortranModule transparent fold keepend start="^\s*submodule\s\+(\a\w*\s*\%(:\a\w*\s*\)*)\s*\z\(\a\w*\)" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*\%(submodule\%(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram,fortranModule
- syn region fortranModule transparent fold keepend start="^\s*module\s\+\%(procedure\)\@!\z(\a\w*\)" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*\%(module\%(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram
- syn region fortranFunction transparent fold keepend extend start="^\s*\%(elemental \|pure \|impure \|module \|recursive \)\=\s*\%(\%(\%(real \|integer \|logical \|complex \|double \s*precision \)\s*\%((\%(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \%((\%(\s*len\s*=\)\=\s*\d\+\s*)\|(\%(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*\%($\|function\%(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
- syn region fortranSubroutine transparent fold keepend extend start="^\s*\%(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*\%($\|subroutine\%(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
- syn region fortranBlockData transparent fold keepend start="\<block\>" skip="^\s*[!#].*$" excludenl end="\<end\s*block\>" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
- syn region fortranAssociate transparent fold keepend start="^\s*\<associate\s\+" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*associate" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
- syn region fortranCritical transparent fold keepend start="^\s*\<critical\s\+" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*critical" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
- syn region fortranTeam transparent fold keepend start="^\s*\<change\s\+team\>" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*team\>" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
- syn region fortranInterface transparent fold keepend extend start="^\s*\%(abstract \)\=\s*interface\>" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
- syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\%(,\s*\%(public\|private\|abstract\)\)\=\s*::" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface
+ syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*\%(program\%(\s\+\z1\>\)\?\|$\)" contains=ALLBUT,fortranModule
+ syn region fortranModule transparent fold keepend start="^\s*submodule\s\+(\a\w*\s*\%(:\a\w*\s*\)*)\s*\z\(\a\w*\)" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*\%(submodule\%(\s\+\z1\>\)\?\|$\)" contains=ALLBUT,fortranProgram,fortranModule
+ syn region fortranModule transparent fold keepend start="^\s*module\s\+\%(procedure\)\@9!\z(\a\w*\)" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*\%(module\%(\s\+\z1\>\)\?\|$\)" contains=ALLBUT,fortranProgram
+ syn region fortranFunction transparent fold keepend extend start="\<function\s\+\z(\a\w*\)" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*\%($\|function\%(\s\+\z1\>\)\?\)" contains=ALLBUT,fortranProgram,fortranModule
+ syn region fortranSubroutine transparent fold keepend extend start="\<subroutine\s\+\z(\a\w*\)" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*\%($\|subroutine\%(\s\+\z1\>\)\?\)" contains=ALLBUT,fortranProgram,fortranModule
+ syn region fortranBlockData transparent fold keepend start="\<block\>" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*block\>" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
+ syn region fortranAssociate transparent fold keepend start="\<associate\s\+" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*associate" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
+ syn region fortranCritical transparent fold keepend start="\<critical\s\+" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*critical" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
+ syn region fortranTeam transparent fold keepend start="\<change\s\+team\>" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*team\>" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
+ syn region fortranInterface transparent fold keepend extend start="\<\%(abstract \)\?\s*interface\>" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
+ syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\%(,\s*\%(abstract\|private\|public\|bind(c)\|extends(\a\w*)\)\)\{0,4}\s*::\s*\z(\a\w*\)" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*type\>\%(\s\+\z1\>\)\?" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
syn region fortranMultiComments fold start="^\zs[!c*].*\_s*[!c*]" skip="^[!c*]" end='^\ze\s*[^!c*]'
else
- syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\%(program\%(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranModule
- syn region fortranModule transparent fold keepend start="^\s*submodule\s\+(\a\w*\s*\%(:\a\w*\s*\)*)\s*\z\(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\%(submodule\%(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram,fortranModule
- syn region fortranModule transparent fold keepend start="^\s*module\s\+\%(procedure\)\@!\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\%(module\%(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram
- syn region fortranFunction transparent fold keepend extend start="^\s*\%(elemental \|pure \|impure \|module \|recursive \)\=\s*\%(\%(\%(real \|integer \|logical \|complex \|double \s*precision \)\s*\%((\%(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \%((\%(\s*len\s*=\)\=\s*\d\+\s*)\|(\%(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\%($\|function\%(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
- syn region fortranSubroutine transparent fold keepend extend start="^\s*\%(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\%($\|subroutine\%(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
+ syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\%(program\%(\s\+\z1\>\)\?\|$\)" contains=ALLBUT,fortranModule
+ syn region fortranModule transparent fold keepend start="^\s*submodule\s\+(\a\w*\s*\%(:\a\w*\s*\)*)\s*\z\(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\%(submodule\%(\s\+\z1\>\)\?\|$\)" contains=ALLBUT,fortranProgram,fortranModule
+ syn region fortranModule transparent fold keepend start="^\s*module\s\+\%(procedure\)\@9!\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\%(module\%(\s\+\z1\>\)\?\|$\)" contains=ALLBUT,fortranProgram
+ syn region fortranFunction transparent fold keepend extend start="\<function\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\%($\|function\%(\s\+\z1\>\)\?\)" contains=ALLBUT,fortranProgram,fortranModule
+ syn region fortranSubroutine transparent fold keepend extend start="\<subroutine\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\%($\|subroutine\%(\s\+\z1\>\)\?\)" contains=ALLBUT,fortranProgram,fortranModule
syn region fortranBlockData transparent fold keepend start="\<block\>" skip="^\s*[!#].*$" excludenl end="\<end\s*block\>" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
syn region fortranAssociate transparent fold keepend start="\<associate\>" skip="^\s*[!#].*$" excludenl end="\<end\s*associate\>" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
syn region fortranCritical transparent fold keepend start="\<critical\>" skip="^\s*[!#].*$" excludenl end="\<end\s*critical\>" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
syn region fortranTeam transparent fold keepend start="\<change\s\+team\>" skip="^\s*[!#].*$" excludenl end="\<end\s*team\>" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
- syn region fortranInterface transparent fold keepend extend start="^\s*\%(abstract \)\=\s*interface\>" skip="^\s*[!#].*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
- syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\%(,\s*\%(public\|private\|abstract\)\)\=\s*::" skip="^\s*[!#].*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface
+ syn region fortranInterface transparent fold keepend extend start="\<\%(abstract \)\?\s*interface\>" skip="^\s*[!#].*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
+ syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\%(,\s*\%(abstract\|private\|public\|bind(c)\|extends(\a\w*)\)\)\{0,4}\s*::\s*\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*type\>\%(\s\+\z1\>\)\?" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
syn region fortranMultiComments fold start="^\zs\s*!.*\_s*!" skip="^\s*!" end='^\ze\s*[^!]'
endif
if exists("fortran_fold_conditionals")
if (b:fortran_fixed_source == 1)
syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranAttribute,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
- syn region fortran90Loop transparent fold keepend extend start="\%(\<end\s\+\)\@<!\<do\%(\s\+\a\|\s*$\)" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranAttribute,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
- syn region fortranIfBlock transparent fold keepend extend start="\%(\<e\%(nd\|lse\)\s\+\)\@<!\<if\s*(.\+)\s*then\>" skip="^\%([!c*]\|\s*#\).*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranAttribute,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
+ syn region fortran90Loop transparent fold keepend extend start="\%(\<end\s\+\)\@5<!\<do\%(\s\+\a\|\s*$\)" skip="^\%([!c*]\|\s*#\).*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranAttribute,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
+ syn region fortranIfBlock transparent fold keepend extend start="\%(\<e\%(nd\|lse\)\s\+\)\@6<!\<if\s*(.\+)\s*then\>" skip="^\%([!c*]\|\s*#\).*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranAttribute,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortranCase transparent fold keepend extend start="\<select\s*\%(case\|type\|rank\)\>" skip="^\%([!c*]\|\s*#\).*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranAttribute,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
else
syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranAttribute,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
- syn region fortran90Loop transparent fold keepend extend start="\%(\<end\s\+\)\@<!\<do\%(\s\+\a\|\s*$\)" skip="^\s*[!#].*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranAttribute,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
- syn region fortranIfBlock transparent fold keepend extend start="\%(\<e\%(nd\|lse\)\s\+\)\@<!\<if\s*(\%(.\|&\s*\n\)\+)\%(\s\|&\s*\n\)*then\>" skip="^\s*[!#].*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranAttribute,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
+ syn region fortran90Loop transparent fold keepend extend start="\%(\<end\s\+\)\@5<!\<do\%(\s\+\a\|\s*$\)" skip="^\s*[!#].*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranAttribute,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
+ syn region fortranIfBlock transparent fold keepend extend start="\%(\<e\%(nd\|lse\)\s\+\)\@6<!\<if\s*(\%(.\|&\s*\n\)\+)\%(\s\|&\s*\n\)*then\>" skip="^\s*[!#].*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranAttribute,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortranCase transparent fold keepend extend start="\<select\s*\%(case\|type\|rank\)\>" skip="^\s*[!#].*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranAttribute,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
endif
endif
@@ -396,92 +418,70 @@ if exists("fortran_fold")
endif
" Define the default highlighting.
-hi def link fortranKeyword Keyword
-hi def link fortranConstructName Identifier
-hi def link fortranConditional Conditional
-hi def link fortranRepeat Repeat
-hi def link fortranTodo Todo
-hi def link fortranContinueMark Special
-hi def link fortranEndStatement Special
-hi def link fortranString String
-hi def link fortranNumber Number
-hi def link fortranBinary Number
-hi def link fortranOctal Number
-hi def link fortranHex Number
-hi def link fortranOperator Operator
hi def link fortranBoolean Boolean
+hi def link fortranComment Comment
+hi def link fortranMultiComments Comment
+hi def link fortranBlock Conditional
+hi def link fortranConditional Conditional
+hi def link fortranConstant Constant
+hi def link fortranConditionalDel Error
+hi def link fortranKeywordDel Error
hi def link fortranLabelError Error
-hi def link fortranObsolescent Todo
-hi def link fortranType Type
-hi def link fortranAttribute Type
-hi def link fortranBlock fortranConditional
-hi def link fortranImageControl Keyword
-hi def link fortranStorageClass StorageClass
-hi def link fortranIntrinsic Function
+hi def link fortranParenError Error
+hi def link fortranStringDel Error
+hi def link fortranTab Error
+hi def link fortranFloat Float
+hi def link fortranFloatIll Float
hi def link fortranCalled Function
+hi def link fortranIntrinsic Function
+hi def link fortranIntrinsicCUDA Function
+hi def link fortranIntrinsicR Function
+hi def link fortranIntrinsicVen Function
hi def link fortranUnitName Function
-hi def link fortranUnitHeader fortranPreCondit
-hi def link fortranReadWrite Keyword
-hi def link fortranIO Keyword
-hi def link fortranConstant Constant
-
+hi def link fortranConstructName Identifier
+hi def link fortranFormatSpec Identifier
+hi def link cInclude Include
hi def link fortranInclude Include
+hi def link fortranIOR Keyword
+hi def link fortranImageControl Keyword
+hi def link fortranKeyword Keyword
+hi def link fortranReadWrite Keyword
+hi def link fortranSpecifier Keyword
+hi def link fortranBinary Number
+hi def link fortranHex Number
+hi def link fortranNumber Number
+hi def link fortranBinary Number
+hi def link fortranOctal Number
+hi def link fortranOperator Operator
+hi def link fortranOperatorR Operator
+hi def link cPreCondit PreCondit
+hi def link fortranUnitHeader PreCondit
+hi def link fortranOpenMP PreProc
+hi def link cPreProc PreProc
+hi def link fortranRepeat Repeat
+hi def link fortranRepeatR Repeat
+hi def link fortranContinueMark Special
+hi def link fortranEndStatement Special
hi def link fortranLabelNumber Special
hi def link fortranTarget Special
-hi def link fortranFloatIll fortranFloat
-
-" Redundant features which may one day become obsolescent
-hi def link fortranIntrinsicR fortranIntrinsic
-hi def link fortranTypeR fortranType
-hi def link fortranStorageClassR fortranStorageClass
-hi def link fortranOperatorR fortranOperator
-hi def link fortranIOR fortranIO
-hi def link fortranRepeatR fortranRepeat
-
-" features deleted or declared obsolescent in Fortran 2023
-if (b:fortran_fixed_source == 1)
- hi def link fortranUnitHeaderOb fortranUnitHeader
- hi def link fortranKeywordOb fortranKeyword
- hi def link fortranKeywordDel fortranKeyword
- hi def link fortranConditionalDel fortranConditional
- hi def link fortranTypeOb fortranType
- hi def link fortranStorageClassOb fortranStorageClass
- hi def link fortranRepeatOb fortranRepeat
- hi def link fortranIntrinsicOb fortranIntrinsic
-else
- hi def link fortranUnitHeaderOb fortranObsolescent
- hi def link fortranKeywordOb fortranObsolescent
- hi def link fortranKeywordDel fortranObsolescent
- hi def link fortranConditionalDel fortranObsolescent
- hi def link fortranTypeOb fortranObsolescent
- hi def link fortranStorageClassOb fortranObsolescent
- hi def link fortranRepeatOb fortranObsolescent
- hi def link fortranIntrinsicOb fortranObsolescent
-endif
-
-hi def link fortranFormatSpec Identifier
-hi def link fortranFloat Float
-hi def link fortranPreCondit PreCondit
-hi def link cIncluded fortranString
-hi def link cInclude Include
-hi def link cPreProc PreProc
-hi def link cPreCondit PreCondit
-hi def link fortranOpenMP PreProc
-hi def link fortranParenError Error
-hi def link fortranComment Comment
-hi def link fortranMultiComments Comment
-hi def link fortranSerialNumber Todo
-hi def link fortranTab Error
-
-if exists("fortran_CUDA")
- hi def link fortranIntrinsicCUDA fortranIntrinsic
- hi def link fortranTypeCUDA fortranType
- hi def link fortranStringCUDA fortranString
-endif
-
-if exists("fortran_vendor_intrinsics")
- hi def link fortranExtraIntrinsic Function
-endif
+hi def link fortranStorageClass StorageClass
+hi def link cIncluded String
+hi def link fortranString String
+hi def link fortranStringCUDA String
+hi def link fortranIntrinsicOb Todo
+hi def link fortranKeywordOb Todo
+hi def link fortranLabelNumberOb Todo
+hi def link fortranRepeatOb Todo
+hi def link fortranSerialNumber Todo
+hi def link fortranStorageClassOb Todo
+hi def link fortranTargetOb Todo
+hi def link fortranTodo Todo
+hi def link fortranTypeOb Todo
+hi def link fortranUnitHeaderOb Todo
+hi def link fortranAttribute Type
+hi def link fortranType Type
+hi def link fortranTypeCUDA Type
+hi def link fortranTypeR Type
let b:current_syntax = "fortran"
diff --git a/runtime/syntax/generator/Makefile b/runtime/syntax/generator/Makefile
new file mode 100644
index 0000000..3cf4b95
--- /dev/null
+++ b/runtime/syntax/generator/Makefile
@@ -0,0 +1,43 @@
+VIM_SRCDIR = ../../../src
+RUN_VIM = $(VIM_SRCDIR)/vim -N -u NONE -i NONE -n
+REVISION ?= $(shell date +%Y-%m-%dT%H:%M:%S%:z)
+
+SRC = $(VIM_SRCDIR)/eval.c $(VIM_SRCDIR)/ex_cmds.h $(VIM_SRCDIR)/ex_docmd.c \
+ $(VIM_SRCDIR)/fileio.c $(VIM_SRCDIR)/option.c $(VIM_SRCDIR)/syntax.c
+
+export VIM_SRCDIR
+
+.PHONY: generate clean
+all: generate
+
+generate: vim.vim
+
+vim.vim: vim.vim.rc update_date.vim
+ @echo "Generating vim.vim ..."
+ @cp -f vim.vim.rc ../vim.vim
+ @$(RUN_VIM) -S update_date.vim
+ @echo "done."
+
+vim.vim.rc: gen_syntax_vim.vim vim.vim.base $(SRC)
+ @echo "Generating vim.vim.rc ..."
+ @rm -f sanity_check.err generator.err
+ @$(RUN_VIM) -S gen_syntax_vim.vim
+ @if test -f sanity_check.err ; then \
+ echo ; \
+ echo "Sanity errors:" ; \
+ cat sanity_check.err ; \
+ exit 1 ; \
+ fi
+ @if test -f generator.err ; then \
+ echo ; \
+ echo "Generator errors:" ; \
+ cat generator.err ; \
+ echo ; \
+ exit 1 ; \
+ fi
+ @echo "done."
+
+clean:
+ rm -f vim.vim.rc
+ rm -f vim.vim
+ rm -f sanity_check.err generator.err
diff --git a/runtime/syntax/generator/README.md b/runtime/syntax/generator/README.md
new file mode 100644
index 0000000..83aceda
--- /dev/null
+++ b/runtime/syntax/generator/README.md
@@ -0,0 +1,26 @@
+# Generator of Vim Script Syntax File
+
+This directory contains a Vim Script generator, that will parse the Vim source file and
+generate a vim.vim syntax file.
+
+Files in this directory where copied from https://github.com/vim-jp/syntax-vim-ex/
+and included here on Feb, 13th, 2024 for the Vim Project.
+
+- Maintainer: Hirohito Higashi
+- License: Vim License
+
+## How to generate
+
+ $ make
+
+This will generate `../vim.vim`
+
+## Files
+
+Name |Description
+---------------------|------------------------------------------------------
+`Makefile` |Makefile to generate ../vim.vim
+`README.md` |This file
+`gen_syntax_vim.vim` |Script to generate vim.vim
+`update_date.vim` |Script to update "Last Change:"
+`vim.vim.base` |Template for vim.vim
diff --git a/runtime/syntax/generator/gen_syntax_vim.vim b/runtime/syntax/generator/gen_syntax_vim.vim
new file mode 100644
index 0000000..b4feeed
--- /dev/null
+++ b/runtime/syntax/generator/gen_syntax_vim.vim
@@ -0,0 +1,704 @@
+" Vim syntax file generator
+" Language: Vim script
+" Maintainer: Hirohito Higashi (h_east)
+" URL: https://github.com/vim-jp/syntax-vim-ex
+" Last Change: 2024 Mar 14
+" Version: 2.0.6
+
+let s:keepcpo= &cpo
+set cpo&vim
+
+language C
+
+function! s:parse_vim_option(opt, missing_opt, term_out_code)
+ try
+ let file_name = $VIM_SRCDIR . '/optiondefs.h'
+ let item = {}
+
+ new
+ exec 'read ' . file_name
+ norm! gg
+ exec '/^.*\s*options\[\]\s*=\s*$/+1;/^\s*#\s*define\s*p_term(/-1yank a'
+ exec '/^#define\s\+p_term(/+1;/^};$/-1yank b'
+ %delete _
+
+ put a
+ " workaround for 'shortname'
+ g/^#\s*ifdef\s*SHORT_FNAME\>/j
+ g/^#/d
+ g/^\s*{\s*"\w\+"\%(\s*,\s*[^,]*\)\{2}[^,]$/j
+ g/^\s*{\s*"\w\+"\s*,.*$/j
+ g!/^\s*{\s*"\w\+"\s*,.*$/d
+
+ for line in getline(1, line('$'))
+ let list = matchlist(line, '^\s*{\s*"\(\w\+\)"\s*,\s*\%("\(\w\+\)"\|NULL\)\s*,\s*\%([^,]*\(P_BOOL\)[^,]*\|[^,]*\)\s*,\s*\([^,]*NULL\)\?.*')
+ let item.name = list[1]
+ let item.short_name = list[2]
+ let item.is_bool = empty(list[3]) ? 0 : 1
+ if empty(list[4])
+ call add(a:opt, copy(item))
+ else
+ call add(a:missing_opt, copy(item))
+ endif
+ endfor
+ if empty(a:opt)
+ throw 'opt is empty'
+ endif
+ if empty(a:missing_opt)
+ throw 'missing_opt is empty'
+ endif
+
+ %delete _
+ put b
+ g!/^\s*p_term(\s*"\w\+"\s*,.*$/d
+
+ for line in getline(1, line('$'))
+ let list = matchlist(line, '^\s*p_term(\s*"\(\w\+\)"\s*,')
+ let item.name = list[1]
+ call add(a:term_out_code, copy(item))
+ endfor
+ quit!
+ if empty(a:term_out_code)
+ throw 'term_out_code is empty'
+ endif
+ catch /.*/
+ call s:err_gen('')
+ throw 'exit'
+ endtry
+endfunc
+
+function! s:append_syn_vimopt(lnum, str_info, opt_list, prefix, bool_only)
+ let ret_lnum = a:lnum
+ let str = a:str_info.start
+
+ for o in a:opt_list
+ if !a:bool_only || o.is_bool
+ if !empty(o.short_name)
+ let str .= ' ' . a:prefix . o.short_name
+ endif
+ let str .= ' ' . a:prefix . o.name
+ if len(str) > s:line_break_len
+ if !empty(a:str_info.end)
+ let str .= ' ' . a:str_info.end
+ endif
+ call append(ret_lnum, str)
+ let str = a:str_info.start
+ let ret_lnum += 1
+ endif
+ endif
+ endfor
+ if str !=# a:str_info.start
+ if !empty(a:str_info.end)
+ let str .= ' ' . a:str_info.end
+ endif
+ call append(ret_lnum, str)
+ let ret_lnum += 1
+ endif
+ return ret_lnum
+endfunc
+
+" ------------------------------------------------------------------------------
+function! s:parse_vim_command(cmd)
+ try
+ let file_name = $VIM_SRCDIR . '/ex_cmds.h'
+ let item = {}
+
+ new
+ exec 'read ' . file_name
+ norm! gg
+ exec '/^}\?\s*cmdnames\[\]\s*=\s*$/+1;/^};/-1yank'
+ %delete _
+ put
+ g!/^EXCMD(/d
+
+ let lcmd = {}
+ for key in range(char2nr('a'), char2nr('z'))
+ let lcmd[nr2char(key)] = []
+ endfor
+ let lcmd['~'] = []
+
+ for line in getline(1, line('$'))
+ let list = matchlist(line, '^EXCMD(\w\+\s*,\s*"\(\a\w*\)"\s*,')
+ if !empty(list)
+ " Small ascii character or other.
+ let key = (list[1][:0] =~# '\l') ? list[1][:0] : '~'
+ call add(lcmd[key], list[1])
+ endif
+ endfor
+ quit!
+
+ for key in sort(keys(lcmd))
+ for my in range(len(lcmd[key]))
+ let omit_idx = 0
+ if my > 0
+ let omit_idx = (key =~# '\l') ? 1 : 0
+ for idx in range(1, strlen(lcmd[key][my]))
+ let spec=0
+ if lcmd[key][my] ==# 'ex'
+ let spec=1
+ echo "cmd name:" lcmd[key][my]
+ endif
+ let matched = 0
+ for pre in range(my - 1, 0, -1)
+ if spec
+ echo "pre:" pre ", my:" my
+ endif
+ if pre == my
+ if spec
+ echo "continue"
+ endif
+ continue
+ endif
+ " for weird abbreviations for delete. (See :help :d)
+ " And k{char} is used as mark. (See :help :k)
+ if lcmd[key][my][:idx] ==# lcmd[key][pre][:idx] ||
+ \ (key ==# 'd' &&
+ \ lcmd[key][my][:idx] =~# '^d\%[elete][lp]$')
+ \ || (key ==# 'k' &&
+ \ lcmd[key][my][:idx] =~# '^k[a-zA-Z]$')
+ let matched = 1
+ let omit_idx = idx + 1
+ if spec
+ echo "match. break. omit_idx:" omit_idx
+ endif
+ break
+ endif
+ endfor
+ if !matched
+ if spec
+ echo "not match. break"
+ endif
+ break
+ endif
+ endfor
+ endif
+
+ let item.name = lcmd[key][my]
+ let item.type = s:get_vim_command_type(item.name)
+ if omit_idx + 1 < strlen(item.name)
+ let item.omit_idx = omit_idx
+ let item.syn_str = item.name[:omit_idx] . '[' .
+ \ item.name[omit_idx+1:] . ']'
+ else
+ let item.omit_idx = -1
+ let item.syn_str = item.name
+ endif
+ call add(a:cmd, copy(item))
+ endfor
+ endfor
+
+ " Check exists in the help. (Usually it does not check...)
+ let doc_dir = './vim/runtime/doc'
+ if 0
+ for vimcmd in a:cmd
+ let find_ptn = '^|:' . vimcmd.name . '|\s\+'
+ exec "silent! vimgrep /" . find_ptn . "/gj " . doc_dir . "/index.txt"
+ let li = getqflist()
+ if empty(li)
+ call s:err_sanity(printf('Ex-cmd `:%s` is not found in doc/index.txt.', vimcmd.name))
+ elseif len(li) > 1
+ call s:err_sanity(printf('Ex-cmd `:%s` is duplicated in doc/index.txt.', vimcmd.name))
+ else
+ let doc_syn_str = substitute(li[0].text, find_ptn . '\(\S\+\)\s\+.*', '\1', '')
+ if doc_syn_str ==# vimcmd.syn_str
+ call s:err_sanity(printf('Ex-cmd `%s` short name differ in doc/index.txt. code: `%s`, document: `%s`', vimcmd.name, vimcmd.syn_str, doc_syn_str))
+ endif
+ endif
+
+ if 1
+ for i in range(2)
+ if i || vimcmd.omit_idx >= 0
+ if !i
+ let base_ptn = vimcmd.name[:vimcmd.omit_idx]
+ else
+ let base_ptn = vimcmd.name
+ endif
+ let find_ptn = '\*:' . base_ptn . '\*'
+ exec "silent! vimgrep /" . find_ptn . "/gj " . doc_dir . "/*.txt"
+ let li = getqflist()
+ if empty(li)
+ call s:err_sanity(printf('Ex-cmd `:%s`%s is not found in the help tag.', base_ptn, !i ? ' (short name of `:' . vimcmd.name . '`)' : ''))
+ elseif len(li) > 1
+ call s:err_sanity(printf('Ex-cmd `:%s`%s is duplicated in the help tag.', base_ptn, !i ? ' (short name of `:' . vimcmd.name . '`)' : ''))
+ endif
+ endif
+ endfor
+ endif
+ endfor
+ endif
+
+ " Add weird abbreviations for delete. (See :help :d)
+ for i in ['l', 'p']
+ let str = 'delete'
+ let item.name = str . i
+ let item.type = s:get_vim_command_type(item.name)
+ let item.omit_idx = -1
+ for x in range(strlen(str))
+ let item.syn_str = str[:x] . i
+ if item.syn_str !=# "del"
+ call add(a:cmd, copy(item))
+ endif
+ endfor
+ endfor
+
+ " Required for original behavior
+ let item.name = 'a' " append
+ let item.type = 0
+ let item.omit_idx = -1
+ let item.syn_str = item.name
+ call add(a:cmd, copy(item))
+ let item.name = 'i' " insert
+ let item.syn_str = item.name
+ call add(a:cmd, copy(item))
+
+ if empty(a:cmd)
+ throw 'cmd is empty'
+ endif
+ catch /.*/
+ call s:err_gen('')
+ throw 'exit'
+ endtry
+endfunc
+
+function! s:get_vim_command_type(cmd_name)
+ " Return value:
+ " 0: normal
+ " 1: (Reserved)
+ " 2: abbrev (without un)
+ " 3: menu
+ " 4: map
+ " 5: mapclear
+ " 6: unmap
+ " 99: (Exclude registration of "syn keyword")
+ let menu_prefix = '^\%([acinostvx]\?\|tl\)'
+ let map_prefix = '^[acilnostvx]\?'
+ let exclude_list = [
+ \ 'map', 'mapclear',
+ \ 'substitute', 'smagic', 'snomagic',
+ \ 'setlocal', 'setglobal', 'set', 'var',
+ \ 'autocmd', 'augroup', 'doautocmd', 'doautoall',
+ \ 'echo', 'echoconsole', 'echoerr', 'echohl', 'echomsg', 'echon', 'echowindow',
+ \ 'execute',
+ \ 'function', 'endfunction', 'def', 'enddef',
+ \ 'behave', 'augroup', 'normal', 'syntax',
+ \ 'append', 'insert',
+ \ 'Next', 'Print', 'X',
+ \ 'new', 'popup',
+ \ ]
+ " Required for original behavior
+ " \ 'global', 'vglobal'
+
+ if index(exclude_list, a:cmd_name) != -1
+ let ret = 99
+ elseif a:cmd_name =~# '^\%(\%(un\)\?abbreviate\|noreabbrev\|\l\%(nore\|un\)\?abbrev\)$'
+ let ret = 2
+ elseif a:cmd_name =~# menu_prefix . '\%(nore\|un\)\?menu$'
+ let ret = 3
+ elseif a:cmd_name =~# map_prefix . '\%(nore\)\?map$'
+ let ret = 4
+ elseif a:cmd_name =~# map_prefix . 'mapclear$'
+ let ret = 5
+ elseif a:cmd_name =~# map_prefix . 'unmap$'
+ let ret = 6
+ else
+ let ret = 0
+ endif
+ return ret
+endfunc
+
+function! s:append_syn_vimcmd(lnum, str_info, cmd_list, type)
+ let ret_lnum = a:lnum
+ let str = a:str_info.start
+
+ for o in a:cmd_list
+ if o.type == a:type
+ let str .= ' ' . o.syn_str
+ if len(str) > s:line_break_len
+ if !empty(a:str_info.end)
+ let str .= ' ' . a:str_info.end
+ endif
+ call append(ret_lnum, str)
+ let str = a:str_info.start
+ let ret_lnum += 1
+ endif
+ endif
+ endfor
+ if str !=# a:str_info.start
+ if !empty(a:str_info.end)
+ let str .= ' ' . a:str_info.end
+ endif
+ call append(ret_lnum, str)
+ let ret_lnum += 1
+ endif
+ return ret_lnum
+endfunc
+
+" ------------------------------------------------------------------------------
+function! s:parse_vim_event(li)
+ try
+ let file_name = $VIM_SRCDIR . '/autocmd.c'
+ let item = {}
+
+ new
+ exec 'read ' . file_name
+ norm! gg
+ exec '/^}\s*event_names\[\]\s*=\s*$/+1;/^};/-1yank'
+ %delete _
+
+ put
+ g!/^\s*{\s*"\w\+"\s*,.*$/d
+
+ for line in getline(1, line('$'))
+ let list = matchlist(line, '^\s*{\s*"\(\w\+\)"\s*,')
+ let item.name = list[1]
+ call add(a:li, copy(item))
+ endfor
+
+ quit!
+
+ if empty(a:li)
+ throw 'event is empty'
+ endif
+ catch /.*/
+ call s:err_gen('')
+ throw 'exit'
+ endtry
+endfunc
+
+" ------------------------------------------------------------------------------
+function! s:parse_vim_function(li)
+ try
+ let file_name = $VIM_SRCDIR . '/evalfunc.c'
+ let item = {}
+
+ new
+ exec 'read ' . file_name
+ norm! gg
+ exec '/^static\s\+funcentry_T\s\+global_functions\[\]\s*=\s*$/+1;/^};/-1yank'
+ %delete _
+
+ put
+ g!/^\s*{\s*"\w\+"\s*,.*$/d
+ g/^\s*{\s*"test"\s*,.*$/d
+ g@//\s*obsolete@d
+ g@/\*\s*obsolete\s*\*/@d
+
+ for line in getline(1, line('$'))
+ let list = matchlist(line, '^\s*{\s*"\(\w\+\)"\s*,')
+ let item.name = list[1]
+ call add(a:li, copy(item))
+ endfor
+
+ quit!
+
+ if empty(a:li)
+ throw 'function is empty'
+ endif
+ catch /.*/
+ call s:err_gen('')
+ throw 'exit'
+ endtry
+endfunc
+
+" ------------------------------------------------------------------------------
+function! s:parse_vim_hlgroup(li)
+ try
+ let file_name = $VIM_SRCDIR . '/highlight.c'
+ let item = {}
+
+ new
+ exec 'read ' . file_name
+ call cursor(1, 1)
+ exec '/^static\s\+char\s\+\*(highlight_init_both\[\])\s*=\%(\s*{\)\?$/+1;/^\s*};/-1yank a'
+ exec '/^static\s\+char\s\+\*(highlight_init_light\[\])\s*=\%(\s*{\)\?$/+1;/^\s*};/-1yank b'
+ exec '/^set_normal_colors(\%(void\)\?)$/+1;/^}$/-1yank d'
+ %delete _
+ put a
+ for line in getline(1, line('$'))
+ let list = matchlist(line, '^\s*\%(CENT(\)\?"\%(default\s\+link\s\+\)\?\(\a\+\).*",.*')
+ if !empty(list)
+ let item.name = list[1]
+ let item.type = 'both'
+ call add(a:li, copy(item))
+ endif
+ endfor
+
+ %delete _
+ put b
+ for line in getline(1, line('$'))
+ let list = matchlist(line, '^\s*\%(CENT(\)\?"\%(default\s\+link\s\+\)\?\(\a\+\).*",.*')
+ if !empty(list)
+ let item.name = list[1]
+ let item.type = 'light'
+ call add(a:li, copy(item))
+ endif
+ endfor
+
+ %delete _
+ put d
+ for line in getline(1, line('$'))
+ let list = matchlist(line, '^\s*if\s*(set_group_colors(.*"\(\a\+\)",')
+ if !empty(list) && list[1] !=# 'Normal'
+ let item.name = list[1]
+ let item.type = 'gui'
+ call add(a:li, copy(item))
+ endif
+ endfor
+
+ let item.name = 'CursorIM'
+ let item.type = 'gui'
+ call add(a:li, copy(item))
+
+ " The following highlight groups cannot be extracted from highlight.c
+ " (TODO: extract from HIGHLIGHT_INIT ?)
+ let item.name = 'LineNrAbove'
+ let item.type = 'both'
+ call add(a:li, copy(item))
+
+ let item.name = 'LineNrBelow'
+ let item.type = 'both'
+ call add(a:li, copy(item))
+
+ quit!
+
+ if empty(a:li)
+ throw 'hlgroup is empty'
+ endif
+ catch /.*/
+ call s:err_gen('')
+ throw 'exit'
+ endtry
+endfunc
+
+" ------------------------------------------------------------------------------
+function! s:parse_vim_complete_name(li)
+ try
+ let file_name = $VIM_SRCDIR . '/usercmd.c'
+ let item = {}
+
+ new
+ exec 'read ' . file_name
+ norm! gg
+ exec '/^}\s*command_complete\[\]\s*=\s*$/+1;/^};/-1yank'
+ %delete _
+
+ put
+ g!/^\s*{.*"\w\+"\s*}\s*,.*$/d
+ g/"custom\(list\)\?"/d
+
+ for line in getline(1, line('$'))
+ let list = matchlist(line, '^\s*{.*"\(\w\+\)"\s*}\s*,')
+ let item.name = list[1]
+ call add(a:li, copy(item))
+ endfor
+
+ quit!
+
+ if empty(a:li)
+ throw 'complete_name is empty'
+ endif
+ catch /.*/
+ call s:err_gen('')
+ throw 'exit'
+ endtry
+endfunc
+
+" ------------------------------------------------------------------------------
+function! s:append_syn_any(lnum, str_info, li)
+ let ret_lnum = a:lnum
+ let str = a:str_info.start
+
+ for o in a:li
+ let str .= ' ' . o.name
+ if len(str) > s:line_break_len
+ if !empty(a:str_info.end)
+ let str .= ' ' . a:str_info.end
+ endif
+ call append(ret_lnum, str)
+ let str = a:str_info.start
+ let ret_lnum += 1
+ endif
+ endfor
+ if str !=# a:str_info.start
+ if !empty(a:str_info.end)
+ let str .= ' ' . a:str_info.end
+ endif
+ call append(ret_lnum, str)
+ let ret_lnum += 1
+ endif
+ return ret_lnum
+endfunc
+
+function! s:update_syntax_vim_file(vim_info)
+ try
+ function! s:search_and_check(kword, base_fname, str_info)
+ let a:str_info.start = ''
+ let a:str_info.end = ''
+
+ let pattern = '^" GEN_SYN_VIM: ' . a:kword . '\s*,'
+ let lnum = search(pattern)
+ if lnum == 0
+ throw 'Search pattern ''' . pattern . ''' not found in ' .
+ \ a:base_fname
+ endif
+ let li = matchlist(getline(lnum), pattern . '\s*START_STR\s*=\s*''\(.\{-}\)''\s*,\s*END_STR\s*=\s*''\(.\{-}\)''')
+ if empty(li)
+ throw 'Bad str_info line:' . getline(lnum)
+ endif
+ let a:str_info.start = li[1]
+ let a:str_info.end = li[2]
+ return lnum
+ endfunc
+
+ let target_fname = 'vim.vim.rc'
+ let base_fname = 'vim.vim.base'
+ let str_info = {}
+ let str_info.start = ''
+ let str_info.end = ''
+
+ new
+ exec 'edit ' . target_fname
+ %d _
+ exec 'read ' . base_fname
+ 1delete _
+ call cursor(1, 1)
+
+ " vimCommand
+ let li = a:vim_info.cmd
+ " vimCommand - normal
+ let lnum = s:search_and_check('vimCommand normal', base_fname, str_info)
+ let lnum = s:append_syn_vimcmd(lnum, str_info, li, 0)
+
+ " vimOption
+ let kword = 'vimOption'
+ let li = a:vim_info.opt
+ " vimOption - normal
+ let lnum = s:search_and_check(kword . ' normal', base_fname, str_info)
+ let lnum = s:append_syn_vimopt(lnum, str_info, li, '', 0)
+ " vimOption - turn-off
+ let lnum = s:search_and_check(kword . ' turn-off', base_fname, str_info)
+ let lnum = s:append_syn_vimopt(lnum, str_info, li, 'no', 1)
+ " vimOption - invertible
+ let lnum = s:search_and_check(kword . ' invertible', base_fname, str_info)
+ let lnum = s:append_syn_vimopt(lnum, str_info, li, 'inv', 1)
+ " vimOption - term output code
+ let li = a:vim_info.term_out_code
+ let lnum = s:search_and_check(kword . ' term output code', base_fname, str_info)
+ let lnum = s:append_syn_any(lnum, str_info, li)
+
+ " Missing vimOption
+ let li = a:vim_info.missing_opt
+ let lnum = s:search_and_check('Missing vimOption', base_fname, str_info)
+ let lnum = s:append_syn_vimopt(lnum, str_info, li, '', 0)
+ let lnum = s:append_syn_vimopt(lnum, str_info, li, 'no', 1)
+ let lnum = s:append_syn_vimopt(lnum, str_info, li, 'inv', 1)
+
+ " vimAutoEvent
+ let li = a:vim_info.event
+ let lnum = s:search_and_check('vimAutoEvent', base_fname, str_info)
+ let lnum = s:append_syn_any(lnum, str_info, li)
+
+ " vimHLGroup
+ let li = a:vim_info.hlgroup
+ let lnum = s:search_and_check('vimHLGroup', base_fname, str_info)
+ let lnum = s:append_syn_any(lnum, str_info, li)
+
+ " vimFuncName
+ let li = a:vim_info.func
+ let lnum = s:search_and_check('vimFuncName', base_fname, str_info)
+ let lnum = s:append_syn_any(lnum, str_info, li)
+
+ " vimUserAttrbCmplt
+ let li = a:vim_info.compl_name
+ let lnum = s:search_and_check('vimUserAttrbCmplt', base_fname, str_info)
+ let lnum = s:append_syn_any(lnum, str_info, li)
+
+ " vimCommand - abbrev
+ let kword = 'vimCommand'
+ let li = a:vim_info.cmd
+ let lnum = s:search_and_check(kword . ' abbrev', base_fname, str_info)
+ let lnum = s:append_syn_vimcmd(lnum, str_info, li, 2)
+ " vimCommand - map
+ let lnum = s:search_and_check(kword . ' map', base_fname, str_info)
+ let lnum = s:append_syn_vimcmd(lnum, str_info, li, 4)
+ let lnum = s:search_and_check(kword . ' mapclear', base_fname, str_info)
+ let lnum = s:append_syn_vimcmd(lnum, str_info, li, 5)
+ let lnum = s:search_and_check(kword . ' unmap', base_fname, str_info)
+ let lnum = s:append_syn_vimcmd(lnum, str_info, li, 6)
+ " vimCommand - menu
+ let lnum = s:search_and_check(kword . ' menu', base_fname, str_info)
+ let lnum = s:append_syn_vimcmd(lnum, str_info, li, 3)
+
+ update
+ quit!
+
+ catch /.*/
+ call s:err_gen('')
+ throw 'exit'
+ endtry
+endfunc
+
+" ------------------------------------------------------------------------------
+function! s:err_gen(arg)
+ call s:write_error(a:arg, 'generator.err')
+endfunc
+
+function! s:err_sanity(arg)
+ call s:write_error(a:arg, 'sanity_check.err')
+endfunc
+
+function! s:write_error(arg, fname)
+ let li = []
+ if !empty(v:throwpoint)
+ call add(li, v:throwpoint)
+ endif
+ if !empty(v:exception)
+ call add(li, v:exception)
+ endif
+ if type(a:arg) == type([])
+ call extend(li, a:arg)
+ elseif type(a:arg) == type("")
+ if !empty(a:arg)
+ call add(li, a:arg)
+ endif
+ endif
+ if !empty(li)
+ call writefile(li, a:fname, 'a')
+ else
+ call writefile(['UNKNOWN'], a:fname, 'a')
+ endif
+endfunc
+
+" ------------------------------------------------------------------------------
+try
+ let s:line_break_len = 768
+ let s:vim_info = {}
+ let s:vim_info.opt = []
+ let s:vim_info.missing_opt = []
+ let s:vim_info.term_out_code = []
+ let s:vim_info.cmd = []
+ let s:vim_info.event = []
+ let s:vim_info.func = []
+ let s:vim_info.hlgroup = []
+ let s:vim_info.compl_name = []
+
+ set lazyredraw
+ silent call s:parse_vim_option(s:vim_info.opt, s:vim_info.missing_opt,
+ \ s:vim_info.term_out_code)
+ silent call s:parse_vim_command(s:vim_info.cmd)
+ silent call s:parse_vim_event(s:vim_info.event)
+ silent call s:parse_vim_function(s:vim_info.func)
+ silent call s:parse_vim_hlgroup(s:vim_info.hlgroup)
+ silent call s:parse_vim_complete_name(s:vim_info.compl_name)
+
+ call s:update_syntax_vim_file(s:vim_info)
+ set nolazyredraw
+
+finally
+ quitall!
+endtry
+
+" ---------------------------------------------------------------------
+let &cpo = s:keepcpo
+unlet s:keepcpo
+" vim:ts=2 sw=2
diff --git a/runtime/syntax/generator/update_date.vim b/runtime/syntax/generator/update_date.vim
new file mode 100644
index 0000000..3556189
--- /dev/null
+++ b/runtime/syntax/generator/update_date.vim
@@ -0,0 +1,14 @@
+" Update the date of following line in vim.vim.rc.
+" '" Last Change: '
+"
+language C
+silent new ../vim.vim
+normal gg
+let pat = '^"\s*Last\s*Change:\s\+'
+let lnum = search(pat, 'We', 10)
+if lnum > 0
+ exec 'norm! lD"=strftime("%Y %b %d")' . "\rp"
+ silent update
+endif
+quitall!
+" vim:ts=4 sw=4 et
diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base
new file mode 100644
index 0000000..8f0f05e
--- /dev/null
+++ b/runtime/syntax/generator/vim.vim.base
@@ -0,0 +1,1192 @@
+" Vim syntax file
+" Language: Vim script
+" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
+" Doug Kearns <dougkearns@gmail.com>
+" URL: https://github.com/vim-jp/syntax-vim-ex
+" Last Change: 2024 Mar 22
+" Former Maintainer: Charles E. Campbell
+" Base File URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
+" Base File Version: 9.0-25
+
+" DO NOT CHANGE DIRECTLY.
+" THIS FILE PARTLY GENERATED BY gen_syntax_vim.vim.
+" (Search string "GEN_SYN_VIM:" in this file)
+
+" Automatically generated keyword lists: {{{1
+
+" Quit when a syntax file was already loaded {{{2
+if exists("b:current_syntax")
+ finish
+endif
+let s:keepcpo= &cpo
+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
+" GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR=''
+
+syn keyword vimCommand contained 2mat[ch] 3mat[ch]
+
+" Lower priority for _new_ to distinguish constructors from the command.
+syn match vimCommand contained "\<new\>(\@!"
+syn match vimCommand contained "\<z[-+^.=]\=\>"
+syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man Over Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Until Winbar XMLent XMLns
+
+" vimOptions are caught only when contained in a vimSet {{{2
+" GEN_SYN_VIM: vimOption normal, START_STR='syn keyword vimOption contained', END_STR=''
+
+" vimOptions: These are the turn-off setting variants {{{2
+" GEN_SYN_VIM: vimOption turn-off, START_STR='syn keyword vimOption contained', END_STR=''
+
+" vimOptions: These are the invertible variants {{{2
+" GEN_SYN_VIM: vimOption invertible, START_STR='syn keyword vimOption contained', END_STR=''
+
+" termcap codes (which can also be set) {{{2
+" GEN_SYN_VIM: vimOption term output code, START_STR='syn keyword vimOption contained', END_STR=''
+" term key codes
+syn keyword vimOption contained t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 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_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_ku
+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;"
+
+" unsupported settings: some were supported by vi but don't do anything in vim {{{2
+" GEN_SYN_VIM: Missing vimOption, START_STR='syn keyword vimErrSetting contained', END_STR=''
+
+" AutoCmd Events {{{2
+syn case ignore
+" GEN_SYN_VIM: vimAutoEvent, START_STR='syn keyword vimAutoEvent contained', END_STR=''
+
+" 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
+" GEN_SYN_VIM: vimHLGroup, START_STR='syn keyword vimHLGroup contained', END_STR=''
+syn case match
+
+" Function Names {{{2
+" GEN_SYN_VIM: vimFuncName, START_STR='syn keyword vimFuncName contained', END_STR=''
+
+"--- syntax here and above generated by mkvimvim ---
+" Special Vim Highlighting (not automatic) {{{1
+
+" Set up folding commands for this syntax highlighting file {{{2
+if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[afhlmpPrt]'
+ if g:vimsyn_folding =~# 'a'
+ com! -nargs=* VimFolda <args> fold
+ else
+ com! -nargs=* VimFolda <args>
+ endif
+ if g:vimsyn_folding =~# 'f'
+ com! -nargs=* VimFoldf <args> fold
+ else
+ com! -nargs=* VimFoldf <args>
+ endif
+ if g:vimsyn_folding =~# 'h'
+ com! -nargs=* VimFoldh <args> fold
+ else
+ com! -nargs=* VimFoldh <args>
+ endif
+ if g:vimsyn_folding =~# 'l'
+ com! -nargs=* VimFoldl <args> fold
+ else
+ com! -nargs=* VimFoldl <args>
+ endif
+ if g:vimsyn_folding =~# 'm'
+ com! -nargs=* VimFoldm <args> fold
+ else
+ com! -nargs=* VimFoldm <args>
+ endif
+ if g:vimsyn_folding =~# 'p'
+ com! -nargs=* VimFoldp <args> fold
+ else
+ com! -nargs=* VimFoldp <args>
+ endif
+ if g:vimsyn_folding =~# 'P'
+ com! -nargs=* VimFoldP <args> fold
+ else
+ com! -nargs=* VimFoldP <args>
+ endif
+ if g:vimsyn_folding =~# 'r'
+ com! -nargs=* VimFoldr <args> fold
+ else
+ com! -nargs=* VimFoldr <args>
+ endif
+ if g:vimsyn_folding =~# 't'
+ com! -nargs=* VimFoldt <args> fold
+ else
+ com! -nargs=* VimFoldt <args>
+ endif
+else
+ com! -nargs=* VimFolda <args>
+ com! -nargs=* VimFoldf <args>
+ com! -nargs=* VimFoldh <args>
+ com! -nargs=* VimFoldl <args>
+ com! -nargs=* VimFoldm <args>
+ com! -nargs=* VimFoldp <args>
+ com! -nargs=* VimFoldP <args>
+ com! -nargs=* VimFoldr <args>
+ com! -nargs=* VimFoldt <args>
+endif
+
+" Deprecated variable options {{{2
+if exists("g:vim_minlines")
+ let g:vimsyn_minlines= g:vim_minlines
+endif
+if exists("g:vim_maxlines")
+ let g:vimsyn_maxlines= g:vim_maxlines
+endif
+if exists("g:vimsyntax_noerror")
+ let g:vimsyn_noerror= g:vimsyntax_noerror
+endif
+
+" Variable options {{{2
+if exists("g:vim_maxlines")
+ let s:vimsyn_maxlines= g:vim_maxlines
+else
+ let s:vimsyn_maxlines= 60
+endif
+
+" Numbers {{{2
+" =======
+syn case ignore
+syn match vimNumber '\<\d\+\%(\.\d\+\%(e[+-]\=\d\+\)\=\)\=' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
+syn match vimNumber '\<0b[01]\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
+syn match vimNumber '\<0o\=\o\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
+syn match vimNumber '\<0x\x\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
+syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
+syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
+syn case match
+
+" All vimCommands are contained by vimIsCommand. {{{2
+syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimDef,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNotFunc,vimNorm,vimSet,vimSyntax,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate
+syn match vimCmdSep "[:|]\+" skipwhite nextgroup=@vimCmdList,vimSubst1
+syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" contains=vimCommand
+syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>"
+syn match vimVar "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>"
+syn match vimVar "\s\zs&\%([lg]:\)\=\a\+\>"
+syn match vimVar "\s\zs&t_\S[a-zA-Z0-9]\>"
+syn match vimVar "\s\zs&t_k;"
+syn match vimFBVar contained "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>"
+syn keyword vimCommand contained in
+
+syn cluster vimExprList contains=vimEnvvar,vimFunc,vimFuncVar,vimNumber,vimOper,vimOperParen,vimLetRegister,vimString,vimVar
+
+" Insertions And Appends: insert append {{{2
+" (buftype != nofile test avoids having append, change, insert show up in the command window)
+" =======================
+if &buftype != 'nofile'
+ syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$""
+ syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$""
+ syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$""
+endif
+
+" Behave! {{{2
+" =======
+if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nobehaveerror")
+ syn match vimBehaveError contained "[^ ]\+"
+endif
+syn match vimBehave "\<be\%[have]\>" nextgroup=vimBehaveBang,vimBehaveModel,vimBehaveError skipwhite
+syn match vimBehaveBang contained "\a\@1<=!" nextgroup=vimBehaveModel skipwhite
+syn keyword vimBehaveModel contained mswin xterm
+
+" Filetypes {{{2
+" =========
+syn match vimFiletype "\<filet\%[ype]\(\s\+\I\i*\)*" skipwhite contains=vimFTCmd,vimFTOption,vimFTError
+if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimFTError")
+ syn match vimFTError contained "\I\i*"
+endif
+syn keyword vimFTCmd contained filet[ype]
+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=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
+syn match vimAugroup "\<aug\%[roup]\>" contains=vimAugroupKey,vimAugroupBang skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup
+if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a'
+ syn region vimAugroup fold start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+" matchgroup=vimAugroupKey end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList,vimAugroupkey skipwhite nextgroup=vimAugroupEnd
+else
+ syn region vimAugroup start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+" matchgroup=vimAugroupKey end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList,vimAugroupkey skipwhite nextgroup=vimAugroupEnd
+endif
+if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror")
+ syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
+endif
+
+syn match vimAutoCmdGroup contained "\S\+"
+syn match vimAugroupEnd contained "\c\<END\>"
+syn match vimAugroupBang contained "\a\@1<=!" skipwhite nextgroup=vimAutoCmdGroup
+syn keyword vimAugroupKey contained aug[roup] skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup,vimAugroupEnd
+
+" Operators: {{{2
+" =========
+syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,@vimContinue,vim9Comment,vimVar
+syn match vimOper "||\|&&\|[-+*/%.!]" skipwhite nextgroup=vimString,vimSpecFile
+syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\|!\~#\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
+syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile
+syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup
+syn region vimOperParen matchgroup=vimSep start="#\={" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
+if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror")
+ syn match vimOperError ")"
+endif
+
+" Functions : Tag is provided for those who wish to highlight tagged functions {{{2
+" =========
+syn cluster vimFuncList contains=vimFuncBang,vimFunctionError,vimFuncKey,vimFuncSID,Tag
+syn cluster vimDefList contains=vimFuncBang,vimFunctionError,vimDefKey,vimFuncSID,Tag
+syn cluster vimFuncBodyList contains=@vimCmdList,vimCmplxRepeat,vimComment,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimLetHereDoc,vimLineComment,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst
+syn cluster vimDefBodyList contains=@vimCmdList,vimCmplxRepeat,vim9Comment,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vim9LineComment,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst
+
+syn region vimFuncPattern contained matchgroup=vimOper start="/" end="$" contains=@vimSubstList
+syn match vimFunction "\<fu\%[nction]\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimFuncKey
+syn match vimDef "\<def\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimDefKey
+
+syn match vimFunction "\<fu\%[nction]\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimFuncList skipwhite nextgroup=vimFuncParams
+syn match vimDef "\<def\s\+new\%(\i\|{.\{-1,}}\)\+" contains=@vimDefList nextgroup=vimDefParams
+syn match vimDef "\<def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimDefList nextgroup=vimDefParams
+
+syn match vimFuncComment contained +".*+ skipwhite skipnl nextgroup=vimFuncBody,vimEndfunction
+syn match vimDefComment contained "#.*" skipwhite skipnl nextgroup=vimDefBody,vimEnddef
+
+syn match vimFuncBang contained "!"
+syn match vimFuncSID contained "\c<sid>"
+syn match vimFuncSID contained "\<[sg]:"
+syn keyword vimFuncKey contained fu[nction]
+syn keyword vimDefKey contained def
+
+syn region vimFuncParams contained matchgroup=Delimiter start="(" skip=+\n\s*\\\|\n\s*"\\ + end=")" skipwhite skipnl nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod contains=vimFuncParam,@vimContinue
+syn region vimDefParams contained matchgroup=Delimiter start="(" end=")" skipwhite skipnl nextgroup=vimDefBody,vimDefComment,vimEnddef,vimReturnType contains=vimDefParam,vim9Comment
+syn match vimFuncParam contained "\<\h\w*\>\|\.\.\." skipwhite nextgroup=vimFuncParamEquals
+syn match vimDefParam contained "\<\h\w*\>" skipwhite nextgroup=vimParamType,vimFuncParamEquals
+
+syn match vimFuncParamEquals contained "=" skipwhite nextgroup=@vimExprList
+syn match vimFuncMod contained "\<\%(abort\|closure\|dict\|range\)\>" skipwhite skipnl nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod
+
+syn region vimFuncBody contained start="^" matchgroup=vimCommand end="\<endfu\%[nction]\>" contains=@vimFuncBodyList
+syn region vimDefBody contained start="^" matchgroup=vimCommand end="\<enddef\>" contains=@vimDefBodyList
+
+syn match vimEndfunction "\<endf\%[unction]\>"
+syn match vimEnddef "\<enddef\>"
+
+if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
+ syn region vimFuncFold start="\<fu\%[nction]\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+\s*(" end="\<endf\%[unction]\>" contains=vimFunction fold keepend transparent
+ syn region vimFuncFold start="\<def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+(" end="\<enddef\>" contains=vimDef fold keepend transparent
+ syn region vimFuncFold start="\<def\s\+new\%(\i\|{.\{-1,}}\)\+(" end="\<enddef\>" contains=vimDef fold keepend transparent
+endif
+
+syn match vimFuncVar contained "a:\%(\K\k*\|\d\+\)\>"
+syn match vimFuncBlank contained "\s\+"
+
+" Types: {{{2
+" =====
+" vimTypes : new for vim9
+syn region vimReturnType contained start=":\s" end="$" matchgroup=vim9Comment end="\ze#" skipwhite skipnl nextgroup=vimDefBody,vimDefComment,vimEnddef contains=vimTypeSep transparent
+syn match vimParamType contained ":\s\+\a" skipwhite skipnl nextgroup=vimFuncParamEquals contains=vimTypeSep,@vimType
+
+syn match vimTypeSep contained ":\s\@=" skipwhite nextgroup=@vimType
+syn keyword vimType contained any blob bool channel float job number string void
+syn match vimType contained "\<func\>"
+syn region vimCompoundType contained matchgroup=vimType start="\<func(" end=")" nextgroup=vimTypeSep contains=@vimType oneline transparent
+syn region vimCompoundType contained matchgroup=vimType start="\<\%(list\|dict\)<" end=">" contains=@vimType oneline transparent
+syn match vimUserType contained "\<\u\w*\>"
+
+syn cluster vimType contains=vimType,vimCompoundType,vimUserType
+
+" Keymaps: (Vim Project Addition) {{{2
+" =======
+
+" TODO: handle Vim9 script comments when something like #13104 is merged
+syn match vimKeymapStart "^" contained skipwhite nextgroup=vimKeymapLhs,vimKeymapLineComment
+syn match vimKeymapLhs "\S\+" contained skipwhite nextgroup=vimKeymapRhs contains=vimNotation
+syn match vimKeymapRhs "\S\+" contained skipwhite nextgroup=vimKeymapTailComment contains=vimNotation
+syn match vimKeymapTailComment "\S.*" contained
+syn match vimKeymapLineComment +".*+ contained contains=@vimCommentGroup,vimCommentString,vimCommentTitle
+
+syn region vimKeymap matchgroup=vimCommand start="\<loadk\%[eymap]\>" end="\%$" contains=vimKeymapStart
+
+" Special Filenames, Modifiers, Extension Removal: {{{2
+" ===============================================
+syn match vimSpecFile "<c\(word\|WORD\)>" nextgroup=vimSpecFileMod,vimSubst1
+syn match vimSpecFile "<\([acs]file\|amatch\|abuf\)>" nextgroup=vimSpecFileMod,vimSubst1
+syn match vimSpecFile "\s%[ \t:]"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst1
+syn match vimSpecFile "\s%$"ms=s+1 nextgroup=vimSpecFileMod,vimSubst1
+syn match vimSpecFile "\s%<"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst1
+syn match vimSpecFile "#\d\+\|[#%]<\>" nextgroup=vimSpecFileMod,vimSubst1
+syn match vimSpecFileMod "\(:[phtre]\)\+" contained
+
+" User-Specified Commands: {{{2
+" =======================
+syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange
+syn keyword vimUserCommand contained com[mand]
+syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter
+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
+syn case ignore
+syn keyword vimUserAttrbKey contained bar ban[g] cou[nt] ra[nge] com[plete] n[args] re[gister]
+" GEN_SYN_VIM: vimUserAttrbCmplt, START_STR='syn keyword vimUserAttrbCmplt contained', END_STR=''
+syn keyword vimUserAttrbCmplt contained custom customlist nextgroup=vimUserAttrbCmpltFunc,vimUserCmdError
+syn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*\%([.#]\h\w*\)\+\|\h\w*\)"hs=s+1 nextgroup=vimUserCmdError
+
+syn case match
+syn match vimUserAttrbCmplt contained "custom,\u\w*"
+
+" Lower Priority Comments: after some vim commands... {{{2
+" =======================
+syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString
+syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString
+syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString
+syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
+" Vim9 comments - TODO: might be highlighted while they don't work
+syn match vim9Comment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCommentString
+syn match vim9Comment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString
+syn match vim9Comment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString
+" Vim9 comment inside expression
+syn match vim9Comment +\s\zs#[^{].*$+ms=s+1 contains=@vimCommentGroup,vimCommentString
+syn match vim9Comment +^\s*#[^{].*$+ contains=@vimCommentGroup,vimCommentString
+syn match vim9Comment +^\s*#$+ contains=@vimCommentGroup,vimCommentString
+
+" Environment Variables: {{{2
+" =====================
+syn match vimEnvvar "\$\I\i*"
+syn match vimEnvvar "\${\I\i*}"
+
+" In-String Specials: {{{2
+" Try to catch strings, if nothing else matches (therefore it must precede the others!)
+" vimEscapeBrace handles ["] []"] (ie. "s don't terminate string inside [])
+syn region vimEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\zs\^\=\]\=" skip="\\\\\|\\\]" end="]"me=e-1
+syn match vimPatSepErr contained "\\)"
+syn match vimPatSep contained "\\|"
+syn region vimPatSepZone oneline contained matchgroup=vimPatSepZ start="\\%\=\ze(" skip="\\\\" end="\\)\|[^\\]['"]" contains=@vimStringGroup
+syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline
+syn match vimNotPatSep contained "\\\\"
+syn cluster vimStringGroup contains=vimEscape,vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell
+syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ contains=@vimStringGroup
+syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]'+lc=1 end=+'+
+"syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup " see tst45.vim
+syn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont
+syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+
+syn match vimEscape contained "\\."
+" syn match vimEscape contained +\\[befnrt\"]+
+syn match vimEscape contained "\\\o\{1,3}\|\\[xX]\x\{1,2}\|\\u\x\{1,4}\|\\U\x\{1,8}"
+syn match vimEscape contained "\\<" contains=vimNotation
+syn match vimEscape contained "\\<\*[^>]*>\=>"
+
+syn region vimString oneline start=+$'+ skip=+''+ end=+'+ contains=vimStringInterpolationBrace,vimStringInterpolationExpr
+syn region vimString oneline start=+$"+ end=+"+ contains=@vimStringGroup,vimStringInterpolationBrace,vimStringInterpolationExpr
+syn region vimStringInterpolationExpr oneline contained matchgroup=vimSep start=+{+ end=+}+ contains=@vimExprList
+syn match vimStringInterpolationBrace contained "{{"
+syn match vimStringInterpolationBrace contained "}}"
+
+" Substitutions: {{{2
+" =============
+syn cluster vimSubstList contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation
+syn cluster vimSubstRepList contains=vimSubstSubstr,vimSubstTwoBS,vimNotation
+syn cluster vimSubstList add=vimCollection
+syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)\>[\"#|]\@!" nextgroup=vimSubstPat
+syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)_\@=" nextgroup=vimSubstPat
+syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)\ze#.\{-}#.\{-}#" nextgroup=vimSubstPat
+syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)\>[\"#|]\@!" nextgroup=vimSubstPat
+syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)_\@=" nextgroup=vimSubstPat
+syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)\ze#.\{-}#.\{-}#" nextgroup=vimSubstPat
+" TODO: Vim9 illegal separators for abbreviated :s form are [-.:], :su\%[...] required
+" : # is allowed but "not recommended" (see :h pattern-delimiter)
+syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)"rs=s+1 skip="\\\\\|\\\z1" end="\z1"re=e-1,me=e-1 contains=@vimSubstList nextgroup=vimSubstRep4 oneline
+syn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline
+syn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass
+syn match vimCollClassErr contained "\[:.\{-\}:\]"
+syn match vimCollClass contained transparent "\%#=1\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|retu\%[rn]\|tab\|escape\|backspace\):\]"
+syn match vimSubstSubstr contained "\\z\=\d"
+syn match vimSubstTwoBS contained "\\\\"
+syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags
+syn match vimSubstFlags contained "[&cegiIlnpr#]\+"
+
+" 'String': {{{2
+syn match vimString "[^(,]'[^']\{-}\zs'"
+
+" Marks, Registers, Addresses, Filters: {{{2
+syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
+syn match vimMark "'[<>]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
+syn match vimMark ",\zs'[<>]\ze" nextgroup=vimFilter,vimMarkNumber,vimSubst1
+syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
+syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
+syn match vimMarkNumber "[-+]\d\+" contained contains=vimOper nextgroup=vimSubst1
+syn match vimPlainMark contained "'[a-zA-Z0-9]"
+syn match vimRange "[`'][a-zA-Z0-9],[`'][a-zA-Z0-9]" contains=vimMark skipwhite nextgroup=vimFilter
+
+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 '@"'
+syn match vimPlainRegister contained '"[a-zA-Z0-9\-:.%#*+=]'
+syn match vimLetRegister contained '@["0-9\-a-zA-Z#=*+_/]'
+
+syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1
+syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1
+
+syn match vimFilter "^!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
+syn match vimFilter contained "!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
+syn match vimComFilter contained "|!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
+
+" Complex Repeats: (:h complex-repeat) {{{2
+" ===============
+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="\%(\\\\\)*\\.\n\@!" end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vim9Comment,vimSetString,vimSetMod
+syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]"me=e-1 end="$" contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar
+syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
+syn match vimSetSep contained "[,:]"
+syn match vimSetMod contained "&vim\=\|[!&?<]\|all&"
+
+" Let And Var: {{{2
+" ===========
+syn keyword vimLet let skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc,vimLetRegister,vimVarList
+syn keyword vimConst cons[t] skipwhite nextgroup=vimVar,vimLetHereDoc,vimVarList
+syn region vimVarList contained start="\[" end="]" contains=vimVar,vimContinue
+
+syn keyword vimUnlet unl[et] skipwhite nextgroup=vimUnletBang,vimUnletVars
+syn match vimUnletBang contained "!" skipwhite nextgroup=vimUnletVars
+syn region vimUnletVars contained start="$\I\|\h" skip="\n\s*\\" end="$" end="|" contains=vimVar,vimEnvvar,vimContinue,vimString,vimNumber
+
+VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s*\%(trim\s\+\%(eval\s\+\)\=\|eval\s\+\%(trim\s\+\)\=\)\=\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$'
+syn keyword vimLet var skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc
+
+" For: {{{2
+" ===
+syn keyword vimFor for skipwhite nextgroup=vimVar,vimVarList
+
+" Abbreviations: {{{2
+" =============
+" GEN_SYN_VIM: vimCommand abbrev, START_STR='syn keyword vimAbb', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs'
+
+" Autocmd: {{{2
+" =======
+syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace
+syn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList
+syn match vimAutoCmdSfxList contained "\S*" skipwhite nextgroup=vimAutoCmdMod
+syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList
+syn match vimAutoCmdMod "\(++\)\=\(once\|nested\)"
+
+" Echo And Execute: -- prefer strings! {{{2
+" ================
+" NOTE: No trailing comments
+
+syn region vimEcho
+ \ matchgroup=vimCommand
+ \ start="\<ec\%[ho]\>"
+ \ start="\<echoe\%[rr]\>"
+ \ start="\<echom\%[sg]\>"
+ \ start="\<echoc\%[onsole]\>"
+ \ start="\<echon\>"
+ \ start="\<echow\%[indow]\>"
+ \ skip=+\\|\|\n\s*\\\|\n\s*"\\ +
+ \ matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimExprList transparent
+
+syn match vimEchohl "\<echohl\=\>" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchohlNone
+syn case ignore
+syn keyword vimEchohlNone contained none
+syn case match
+
+syn cluster vimEcho contains=vimEcho,vimEchohl
+
+syn region vimExecute matchgroup=vimCommand start="\<exe\%[cute]\>" skip=+\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimExprList transparent
+
+" Maps: {{{2
+" ====
+syn match vimMap "\<map\>\ze\s*(\@!" skipwhite nextgroup=vimMapMod,vimMapLhs
+syn match vimMap "\<map!" contains=vimMapBang skipwhite nextgroup=vimMapMod,vimMapLhs
+" GEN_SYN_VIM: vimCommand map, START_STR='syn keyword vimMap', END_STR='skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs'
+" GEN_SYN_VIM: vimCommand mapclear, START_STR='syn keyword vimMap', END_STR='skipwhite nextgroup=vimMapMod'
+syn keyword vimMap mapc[lear] skipwhite nextgroup=vimMapBang,vimMapMod
+" GEN_SYN_VIM: vimCommand unmap, START_STR='syn keyword vimUnmap', END_STR='skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs'
+syn match vimMapLhs contained "\%(.\|\S\)\+" contains=vimCtrlChar,vimNotation skipwhite nextgroup=vimMapRhs
+syn match vimMapLhs contained "\%(.\|\S\)\+\ze\s*$" contains=vimCtrlChar,vimNotation skipwhite skipnl nextgroup=vimMapRhsContinue
+syn match vimMapBang contained "\a\@1<=!" skipwhite nextgroup=vimMapMod,vimMapLhs
+syn match vimMapMod contained "\%#=1\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
+syn region vimMapRhs contained start="\S" skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation skipnl nextgroup=vimMapRhsContinue
+" assume a continuation comment introduces the RHS
+syn region vimMapRhsContinue contained start=+^\s*\%(\\\|"\\ \)+ skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation
+syn case ignore
+syn keyword vimMapModKey contained buffer expr leader localleader nowait plug script sid silent unique
+syn case match
+
+" Menus: {{{2
+" =====
+" NOTE: tail comments disallowed
+" GEN_SYN_VIM: vimCommand menu, START_STR='syn keyword vimMenu', END_STR='skipwhite nextgroup=vimMenuBang,vimMenuMod,vimMenuName,vimMenuPriority,vimMenuStatus'
+syn keyword vimMenu popu[p] skipwhite nextgroup=vimMenuBang,vimMenuName
+syn region vimMenuRhs contained contains=@vimContinue,vimNotation start="|\@!\S" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + end="$" matchgroup=vimSep end="|"
+syn region vimMenuRhsContinue contained contains=@vimContinue,vimNotation start=+^\s*\%(\\\|"\\ \)+ skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + end="$" matchgroup=vimSep end="|"
+syn match vimMenuName "\.\@!\%(\\\s\|\S\)\+" contained contains=vimMenuNotation,vimNotation skipwhite nextgroup=vimCmdSep,vimMenuRhs
+syn match vimMenuName "\.\@!\%(\\\s\|\S\)\+\ze\s*$" contained contains=vimMenuNotation,vimNotation skipwhite skipnl nextgroup=vimCmdSep,vimMenuRhsContinue
+syn match vimMenuNotation "&\a\|&&\|\\\s\|\\\." contained
+syn match vimMenuPriority "\<\d\+\%(\.\d\+\)*\>" contained skipwhite nextgroup=vimMenuName
+syn match vimMenuMod "\c<\%(script\|silent\|special\)>" contained skipwhite nextgroup=vimMenuName,vimMenuPriority,vimMenuMod contains=vimMapModKey,vimMapModErr
+syn keyword vimMenuStatus enable disable nextgroup=vimMenuName skipwhite
+syn match vimMenuBang "\a\@1<=!" contained skipwhite nextgroup=vimMenuName,vimMenuMod
+
+syn region vimMenutranslate
+ \ matchgroup=vimCommand start="\<menut\%[ranslate]\>"
+ \ skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ +
+ \ end="$" matchgroup=vimCmdSep end="|" matchgroup=vimMenuClear end="\<clear\ze\s*\%(["#|]\|$\)"
+ \ contains=@vimContinue,vimMenutranslateName keepend transparent
+" oneline is sufficient to match the current formatting in runtime/lang/*.vim
+syn match vimMenutranslateName "\%(\\\s\|\S\)\+" contained contains=vimMenuNotation,vimNotation
+syn match vimMenutranslateComment +".*+ contained containedin=vimMenutranslate
+
+" Angle-Bracket Notation: (tnx to Michael Geddes) {{{2
+" ======================
+syn case ignore
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}x\=\%(f\d\{1,2}\|[^ \t:]\|space\|bar\|bslash\|nl\|newline\|lf\|linefeed\|cr\|retu\%[rn]\|enter\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|csi\|right\|paste\%(start\|end\)\|left\|help\|undo\|k\=insert\|ins\|mouse\|[kz]\=home\|[kz]\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\%(page\)\=\%(\|down\|up\|k\d\>\)\)>" contains=vimBracket
+
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(net\|dec\|jsb\|pterm\|urxvt\|sgr\)mouse>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(left\|middle\|right\)\%(mouse\|drag\|release\)>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}left\%(mouse\|release\)nm>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}x[12]\%(mouse\|drag\|release\)>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}sgrmouserelease>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}mouse\%(up\|down\|move\)>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}scrollwheel\%(up\|down\|right\|left\)>" contains=vimBracket
+
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%(sid\|nop\|nul\|lt\|drop\)>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%(snr\|plug\|cursorhold\|ignore\|cmd\|scriptcmd\|focus\%(gained\|lost\)\)>" contains=vimBracket
+syn match vimNotation '\%(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
+syn match vimNotation '\%#=1\%(\\\|<lt>\)\=<\%(q-\)\=\%(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([cas]file\|abuf\|amatch\|cexpr\|cword\|cWORD\|client\|stack\|script\|sf\=lnum\)>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}char-\%(\d\+\|0\o\+\|0x\x\+\)>" contains=vimBracket
+
+syn match vimBracket contained "[\\<>]"
+syn case match
+
+" User Function Highlighting: {{{2
+" (following Gautam Iyer's suggestion)
+" ==========================
+syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncEcho,vimFuncName,vimUserFunc,vimExecute
+syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation
+syn keyword vimFuncEcho contained ec ech echo
+
+" User Command Highlighting: {{{2
+syn match vimUsrCmd '^\s*\zs\u\%(\w*\)\@>\%([(#[]\|\s\+\%([-+*/%]\=\|\.\.\)=\)\@!'
+
+" Errors And Warnings: {{{2
+" ====================
+if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
+ " TODO: The new-prefix exception should only apply to constructor definitions.
+ syn match vimFunctionError "\s\zs\%(new\)\@![a-z0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank
+ syn match vimFunctionError "\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\d\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank
+ syn match vimElseIfErr "\<else\s\+if\>"
+ syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/
+endif
+
+syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<retu\%[rn]\>\|\<while\>" skipwhite nextgroup=vimOper,vimOperParen,vimVar,vimFunc,vimNotation
+
+" Norm: {{{2
+" ====
+syn match vimNorm "\<norm\%[al]!\=" skipwhite nextgroup=vimNormCmds
+syn match vimNormCmds contained ".*$"
+
+" Syntax: {{{2
+"=======
+syn match vimGroupList contained "[^[:space:],]\+\%(\s*,\s*[^[:space:],]\+\)*" contains=vimGroupSpecial
+syn region vimGroupList contained start=/^\s*["#]\\ \|^\s*\\\|[^[:space:],]\+\s*,/ skip=/\s*\n\s*\\\|\s*\n\s*["#]\\ \|^\s*\\\|^\s*["#]\\ / end=/[^[:space:],]\s*$\|[^[:space:],]\ze\s\+\w/ contains=@vimContinue,vimGroupSpecial
+syn keyword vimGroupSpecial contained ALL ALLBUT CONTAINED TOP
+
+if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynerror")
+ syn match vimSynError contained "\i\+"
+ syn match vimSynError contained "\i\+=" nextgroup=vimGroupList
+endif
+syn match vimSynContains contained "\<contain\%(s\|edin\)=" skipwhite skipnl nextgroup=vimGroupList
+syn match vimSynKeyContainedin contained "\<containedin=" skipwhite skipnl nextgroup=vimGroupList
+syn match vimSynNextgroup contained "\<nextgroup=" skipwhite skipnl nextgroup=vimGroupList
+if has("conceal")
+ " no whitespace allowed after '='
+ syn match vimSynCchar contained "\<cchar=" nextgroup=vimSynCcharValue
+ syn match vimSynCcharValue contained "\S"
+endif
+
+syn match vimSyntax "\<sy\%[ntax]\>" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment,vim9Comment
+syn cluster vimFuncBodyList add=vimSyntax
+
+" Syntax: case {{{2
+syn keyword vimSynType contained case skipwhite nextgroup=vimSynCase,vimSynCaseError
+if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncaseerror")
+ syn match vimSynCaseError contained "\i\+"
+endif
+syn keyword vimSynCase contained ignore match
+
+" Syntax: clear {{{2
+syn keyword vimSynType contained clear skipwhite nextgroup=vimGroupList
+
+" Syntax: cluster {{{2
+syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName
+syn region vimClusterName contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="$\||" contains=@vimContinue,vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
+syn match vimGroupAdd contained keepend "\<add=" skipwhite skipnl nextgroup=vimGroupList
+syn match vimGroupRem contained keepend "\<remove=" skipwhite skipnl nextgroup=vimGroupList
+
+" Syntax: foldlevel {{{2
+syn keyword vimSynType contained foldlevel skipwhite nextgroup=vimSynFoldMethod,vimSynFoldMethodError
+if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynfoldmethoderror")
+ syn match vimSynFoldMethodError contained "\i\+"
+endif
+syn keyword vimSynFoldMethod contained start minimum
+
+" Syntax: iskeyword {{{2
+syn keyword vimSynType contained iskeyword skipwhite nextgroup=vimIskList
+syn match vimIskList contained '\S\+' contains=vimIskSep
+syn match vimIskSep contained ','
+
+" Syntax: include {{{2
+syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList
+
+" Syntax: keyword {{{2
+syn cluster vimSynKeyGroup contains=@vimContinue,vimSynCchar,vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin
+syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion
+syn region vimSynKeyRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynKeyGroup
+syn match vimSynKeyOpt contained "\%#=1\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
+
+" Syntax: match {{{2
+syn cluster vimSynMtchGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation,vimMtchComment
+syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
+syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynMtchGroup
+syn match vimSynMtchOpt contained "\%#=1\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
+
+" Syntax: off and on {{{2
+syn keyword vimSynType contained enable list manual off on reset
+
+" Syntax: region {{{2
+syn cluster vimSynRegPatGroup contains=@vimContinue,vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation
+syn cluster vimSynRegGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp
+syn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion
+syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + end="|\|$" contains=@vimSynRegGroup
+syn match vimSynRegOpt contained "\%#=1\<\(conceal\(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>"
+syn match vimSynReg contained "\<\%(start\|skip\|end\)=" nextgroup=vimSynRegPat
+syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup
+syn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip=/\\\\\|\\\z1\|\n\s*\\\|\n\s*"\\ / end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg
+syn match vimSynPatMod contained "\%#=1\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\="
+syn match vimSynPatMod contained "\%#=1\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod
+syn match vimSynPatMod contained "lc=\d\+"
+syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod
+syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]"
+syn match vimSynNotPatRange contained "\\\\\|\\\["
+syn match vimMtchComment contained '"[^"]\+$'
+
+" Syntax: sync {{{2
+" ============
+syn keyword vimSynType contained sync skipwhite nextgroup=vimSyncC,vimSyncLines,vimSyncMatch,vimSyncError,vimSyncLinebreak,vimSyncLinecont,vimSyncRegion
+if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncerror")
+ syn match vimSyncError contained "\i\+"
+endif
+syn keyword vimSyncC contained ccomment clear fromstart
+syn keyword vimSyncMatch contained match skipwhite nextgroup=vimSyncGroupName
+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 vimSyncKey contained "\<groupthere\|grouphere\>" skipwhite nextgroup=vimSyncGroup
+syn match vimSyncGroup contained "\h\w*" skipwhite nextgroup=vimSynRegPat,vimSyncNone
+syn keyword vimSyncNone contained NONE
+
+" Additional IsCommand: here by reasons of precedence {{{2
+" ====================
+syn match vimIsCommand "<Bar>\s*\a\+" transparent contains=vimCommand,vimNotation
+
+" Highlighting: {{{2
+" ============
+syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment,vim9Comment
+if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror")
+ syn match vimHiCtermError contained "\D\i*"
+endif
+syn match vimHighlight "\<hi\%[ghlight]\>" skipwhite nextgroup=vimHiBang,@vimHighlightCluster
+syn match vimHiBang contained "\a\@1<=!" skipwhite nextgroup=@vimHighlightCluster
+
+syn match vimHiGroup contained "\i\+"
+syn case ignore
+syn keyword vimHiAttrib contained none bold inverse italic nocombine reverse standout strikethrough underline undercurl underdashed underdotted underdouble
+syn keyword vimFgBgAttrib contained none bg background fg foreground
+syn case match
+syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib
+syn match vimHiAttribList contained "\i\+,"he=e-1 contains=vimHiAttrib nextgroup=vimHiAttribList
+syn case ignore
+syn keyword vimHiCtermColor contained black blue brown cyan darkblue darkcyan darkgray darkgreen darkgrey darkmagenta darkred darkyellow gray green grey grey40 grey50 grey90 lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightred lightyellow magenta red seagreen white yellow
+syn match vimHiCtermColor contained "\<color\d\{1,3}\>"
+
+syn case match
+syn match vimHiFontname contained "[a-zA-Z\-*]\+"
+syn match vimHiGuiFontname contained "'[a-zA-Z\-* ]\+'"
+syn match vimHiGuiRgb contained "#\x\{6}"
+
+" Highlighting: hi group key=arg ... {{{2
+syn cluster vimHiCluster contains=vimGroup,vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiCtermul,vimHiCtermfont,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation,vimComment,vim9comment
+syn region vimHiKeyList contained start="\i\+" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimHiCluster
+if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimhikeyerror")
+ syn match vimHiKeyError contained "\i\+="he=e-1
+endif
+syn match vimHiTerm contained "\cterm="he=e-1 nextgroup=vimHiAttribList
+syn match vimHiStartStop contained "\c\%(start\|stop\)="he=e-1 nextgroup=vimHiTermcap,vimOption
+syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList
+syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
+syn match vimHiCtermul contained "\cctermul="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
+syn match vimHiCtermfont contained "\cctermfont="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
+syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList
+syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname
+syn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib
+syn match vimHiTermcap contained "\S\+" contains=vimNotation
+syn match vimHiNmbr contained '\d\+'
+
+" Highlight: clear {{{2
+syn keyword vimHiClear contained clear skipwhite nextgroup=vimGroup,vimHiGroup
+
+" Highlight: link {{{2
+" see tst24 (hi def vs hi) (Jul 06, 2018)
+"syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
+" TODO: simplify and allow line continuations --djk
+syn region vimHiLink contained matchgroup=Type start="\%(\<hi\%[ghlight]!\=\s\+\)\@<=\%(\%(def\%[ault]\s\+\)\=link\>\|\<def\%[ault]\>\)" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimHiCluster
+
+" Control Characters: {{{2
+" ==================
+syn match vimCtrlChar "[- -]"
+
+" Beginners - Patterns that involve ^ {{{2
+" =========
+syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle,vimComment
+syn match vimLineComment +^[ \t:]*"\("[^"]*"\|[^"]\)*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
+syn match vim9LineComment +^[ \t:]\+#.*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
+syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
+" Note: Look-behind to work around nextgroup skipnl consuming leading whitespace and preventing a match
+syn match vimContinue "^\s*\zs\\"
+syn match vimContinueComment '^\s*\zs["#]\\ .*' contained
+syn cluster vimContinue contains=vimContinue,vimContinueComment
+syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue
+syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained
+
+" Searches And Globals: {{{2
+" ====================
+syn match vimSearch '^\s*[/?].*' contains=vimSearchDelim
+syn match vimSearchDelim '^\s*\zs[/?]\|[/?]$' contained
+syn region vimGlobal matchgroup=Statement start='\<g\%[lobal]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1
+syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1
+
+" Embedded Scripts: {{{2
+" ================
+" perl,ruby : Benoit Cerrina
+" python,tcl : Johannes Zellner
+" mzscheme, lua : Charles Campbell
+
+" Allows users to specify the type of embedded script highlighting
+" they want: (perl/python/ruby/tcl support)
+" g:vimsyn_embed == 0 : don't embed any scripts
+" g:vimsyn_embed =~# 'l' : embed lua (but only if vim supports it)
+" g:vimsyn_embed =~# 'm' : embed mzscheme (but only if vim supports it)
+" g:vimsyn_embed =~# 'p' : embed perl (but only if vim supports it)
+" g:vimsyn_embed =~# 'P' : embed python (but only if vim supports it)
+" g:vimsyn_embed =~# 'r' : embed ruby (but only if vim supports it)
+" g:vimsyn_embed =~# 't' : embed tcl (but only if vim supports it)
+if !exists("g:vimsyn_embed")
+ let g:vimsyn_embed= "lmpPr"
+endif
+
+" [-- lua --] {{{3
+let s:luapath= fnameescape(expand("<sfile>:p:h")."/lua.vim")
+if !filereadable(s:luapath)
+ for s:luapath in split(globpath(&rtp,"syntax/lua.vim"),"\n")
+ if filereadable(fnameescape(s:luapath))
+ let s:luapath= fnameescape(s:luapath)
+ break
+ endif
+ endfor
+endif
+if (g:vimsyn_embed =~# 'l' && has("lua")) && filereadable(s:luapath)
+ unlet! b:current_syntax
+ syn cluster vimFuncBodyList add=vimLuaRegion
+ exe "syn include @vimLuaScript ".s:luapath
+ VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript
+ VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript
+ syn cluster vimFuncBodyList add=vimLuaRegion
+else
+ syn region vimEmbedError start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+
+ syn region vimEmbedError start=+lua\s*<<\s*$+ end=+\.$+
+endif
+unlet s:luapath
+
+" [-- perl --] {{{3
+let s:perlpath= fnameescape(expand("<sfile>:p:h")."/perl.vim")
+if !filereadable(s:perlpath)
+ for s:perlpath in split(globpath(&rtp,"syntax/perl.vim"),"\n")
+ if filereadable(fnameescape(s:perlpath))
+ let s:perlpath= fnameescape(s:perlpath)
+ break
+ endif
+ endfor
+endif
+if (g:vimsyn_embed =~# 'p' && has("perl")) && filereadable(s:perlpath)
+ unlet! b:current_syntax
+ syn cluster vimFuncBodyList add=vimPerlRegion
+ exe "syn include @vimPerlScript ".s:perlpath
+ VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(\S*\)\ze\(\s*["#].*\)\=$+ end=+^\z1\ze\(\s*[#"].*\)\=$+ contains=@vimPerlScript
+ VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript
+ syn cluster vimFuncBodyList add=vimPerlRegion
+else
+ syn region vimEmbedError start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+
+ syn region vimEmbedError start=+pe\%[rl]\s*<<\s*$+ end=+\.$+
+endif
+unlet s:perlpath
+
+" [-- ruby --] {{{3
+let s:rubypath= fnameescape(expand("<sfile>:p:h")."/ruby.vim")
+if !filereadable(s:rubypath)
+ for s:rubypath in split(globpath(&rtp,"syntax/ruby.vim"),"\n")
+ if filereadable(fnameescape(s:rubypath))
+ let s:rubypath= fnameescape(s:rubypath)
+ break
+ endif
+ endfor
+endif
+if (g:vimsyn_embed =~# 'r' && has("ruby")) && filereadable(s:rubypath)
+ syn cluster vimFuncBodyList add=vimRubyRegion
+ unlet! b:current_syntax
+ exe "syn include @vimRubyScript ".s:rubypath
+ VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimRubyScript
+ syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*$+ end=+\.$+ contains=@vimRubyScript
+ syn cluster vimFuncBodyList add=vimRubyRegion
+else
+ syn region vimEmbedError start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+
+ syn region vimEmbedError start=+rub[y]\s*<<\s*$+ end=+\.$+
+endif
+unlet s:rubypath
+
+" [-- python --] {{{3
+let s:pythonpath= fnameescape(expand("<sfile>:p:h")."/python.vim")
+if !filereadable(s:pythonpath)
+ for s:pythonpath in split(globpath(&rtp,"syntax/python.vim"),"\n")
+ if filereadable(fnameescape(s:pythonpath))
+ let s:pythonpath= fnameescape(s:pythonpath)
+ break
+ endif
+ endfor
+endif
+if g:vimsyn_embed =~# 'P' && has("pythonx") && filereadable(s:pythonpath)
+ unlet! b:current_syntax
+ syn cluster vimFuncBodyList add=vimPythonRegion
+ exe "syn include @vimPythonScript ".s:pythonpath
+ VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*\%(trim\s*\)\=\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript
+ VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*\%(trim\s*\)\=$+ end=+\.$+ contains=@vimPythonScript
+ VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\%(trim\s*\)\=\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript
+ VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*\%(trim\s*\)\=$+ end=+\.$+ contains=@vimPythonScript
+ syn cluster vimFuncBodyList add=vimPythonRegion
+else
+ syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
+ syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+
+endif
+unlet s:pythonpath
+
+" [-- tcl --] {{{3
+if has("win32") || has("win95") || has("win64") || has("win16")
+ " apparently has("tcl") has been hanging vim on some windows systems with cygwin
+ let s:trytcl= (&shell !~ '\<\%(bash\>\|4[nN][tT]\|\<zsh\)\>\%(\.exe\)\=$')
+else
+ let s:trytcl= 1
+endif
+if s:trytcl
+ let s:tclpath= fnameescape(expand("<sfile>:p:h")."/tcl.vim")
+ if !filereadable(s:tclpath)
+ for s:tclpath in split(globpath(&rtp,"syntax/tcl.vim"),"\n")
+ if filereadable(fnameescape(s:tclpath))
+ let s:tclpath= fnameescape(s:tclpath)
+ break
+ endif
+ endfor
+ endif
+ if (g:vimsyn_embed =~# 't' && has("tcl")) && filereadable(s:tclpath)
+ unlet! b:current_syntax
+ syn cluster vimFuncBodyList add=vimTclRegion
+ exe "syn include @vimTclScript ".s:tclpath
+ VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript
+ VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript
+ syn cluster vimFuncBodyList add=vimTclScript
+ else
+ syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
+ syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+
+ endif
+ unlet s:tclpath
+else
+ syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
+ syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+
+endif
+unlet s:trytcl
+
+" [-- mzscheme --] {{{3
+let s:mzschemepath= fnameescape(expand("<sfile>:p:h")."/scheme.vim")
+if !filereadable(s:mzschemepath)
+ for s:mzschemepath in split(globpath(&rtp,"syntax/mzscheme.vim"),"\n")
+ if filereadable(fnameescape(s:mzschemepath))
+ let s:mzschemepath= fnameescape(s:mzschemepath)
+ break
+ endif
+ endfor
+endif
+if (g:vimsyn_embed =~# 'm' && has("mzscheme")) && filereadable(s:mzschemepath)
+ unlet! b:current_syntax
+ let s:iskKeep= &isk
+ syn cluster vimFuncBodyList add=vimMzSchemeRegion
+ exe "syn include @vimMzSchemeScript ".s:mzschemepath
+ let &isk= s:iskKeep
+ unlet s:iskKeep
+ VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimMzSchemeScript
+ VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+ contains=@vimMzSchemeScript
+ syn cluster vimFuncBodyList add=vimMzSchemeRegion
+else
+ syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+
+ syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+
+endif
+unlet s:mzschemepath
+
+" Synchronize (speed) {{{2
+"============
+if exists("g:vimsyn_minlines")
+ exe "syn sync minlines=".g:vimsyn_minlines
+endif
+exe "syn sync maxlines=".s:vimsyn_maxlines
+syn sync linecont "^\s\+\\"
+syn sync linebreaks=1
+syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]"
+
+" ====================
+" Highlighting Settings {{{2
+" ====================
+
+if !exists("skip_vim_syntax_inits")
+ if !exists("g:vimsyn_noerror")
+ hi def link vimBehaveError vimError
+ hi def link vimCollClassErr vimError
+ hi def link vimErrSetting vimError
+ hi def link vimEmbedError vimError
+ hi def link vimFTError vimError
+ hi def link vimFunctionError vimError
+ hi def link vimFunc vimError
+ hi def link vimHiAttribList vimError
+ hi def link vimHiCtermError vimError
+ hi def link vimHiKeyError vimError
+ hi def link vimMapModErr vimError
+ hi def link vimSubstFlagErr vimError
+ hi def link vimSynCaseError vimError
+ hi def link vimSynFoldMethodError vimError
+ hi def link vimBufnrWarn vimWarn
+ endif
+
+ hi def link vimAbb vimCommand
+ hi def link vimAddress vimMark
+ hi def link vimAugroupBang vimBang
+ hi def link vimAugroupError vimError
+ hi def link vimAugroupKey vimCommand
+ hi def link vimAutoCmd vimCommand
+ hi def link vimAutoEvent Type
+ hi def link vimAutoCmdMod Special
+ hi def link vimBang vimOper
+ hi def link vimBehaveBang vimBang
+ hi def link vimBehaveModel vimBehave
+ hi def link vimBehave vimCommand
+ hi def link vimBracket Delimiter
+ hi def link vimCmplxRepeat SpecialChar
+ hi def link vimCommand Statement
+ hi def link vimComment Comment
+ hi def link vim9Comment Comment
+ hi def link vimCommentString vimString
+ hi def link vimCommentTitle PreProc
+ hi def link vimCondHL vimCommand
+ hi def link vimConst vimCommand
+ hi def link vimContinue Special
+ hi def link vimContinueComment vimComment
+ hi def link vimCtrlChar SpecialChar
+ hi def link vimDefComment vimComment
+ hi def link vimDefKey vimCommand
+ hi def link vimDefParam vimVar
+ hi def link vimEcho vimCommand
+ hi def link vimEchohlNone vimGroup
+ hi def link vimEchohl vimCommand
+ hi def link vimElseIfErr Error
+ hi def link vimEndfunction vimCommand
+ hi def link vimEnddef vimCommand
+ hi def link vimEnvvar PreProc
+ hi def link vimError Error
+ hi def link vimEscape Special
+ hi def link vimFBVar vimVar
+ hi def link vimFgBgAttrib vimHiAttrib
+ hi def link vimFuncEcho vimCommand
+ hi def link vimFor vimCommand
+ hi def link vimFTCmd vimCommand
+ hi def link vimFTOption vimSynType
+ hi def link vimFuncBang vimBang
+ hi def link vimFuncComment vimComment
+ hi def link vimFuncKey vimCommand
+ hi def link vimFuncName Function
+ hi def link vimFuncMod Special
+ hi def link vimFuncParam vimVar
+ hi def link vimFuncParamEquals vimOper
+ hi def link vimFuncSID Special
+ hi def link vimFuncVar Identifier
+ hi def link vimGroupAdd vimSynOption
+ hi def link vimGroupName vimGroup
+ hi def link vimGroupRem vimSynOption
+ hi def link vimGroupSpecial Special
+ hi def link vimGroup Type
+ hi def link vimHiAttrib PreProc
+ hi def link vimHiBang vimBang
+ hi def link vimHiClear Type
+ hi def link vimHiCtermColor Constant
+ hi def link vimHiCtermFgBg vimHiTerm
+ hi def link vimHiCtermfont vimHiTerm
+ hi def link vimHiCtermul vimHiTerm
+ hi def link vimHiCTerm vimHiTerm
+ hi def link vimHighlight vimCommand
+ hi def link vimHiGroup vimGroupName
+ hi def link vimHiGuiFgBg vimHiTerm
+ hi def link vimHiGuiFont vimHiTerm
+ hi def link vimHiGuiRgb vimNumber
+ hi def link vimHiGui vimHiTerm
+ hi def link vimHiNmbr Number
+ hi def link vimHiStartStop vimHiTerm
+ hi def link vimHiTerm Type
+ hi def link vimHLGroup vimGroup
+ hi def link vimInsert vimString
+ hi def link vimIskSep Delimiter
+ hi def link vimKeymapLineComment vimComment
+ hi def link vimKeymapTailComment vimComment
+ hi def link vimLet vimCommand
+ hi def link vimLetHereDoc vimString
+ hi def link vimLetHereDocStart Special
+ hi def link vimLetHereDocStop Special
+ hi def link vimLetRegister Special
+ hi def link vimLineComment vimComment
+ hi def link vim9LineComment vimComment
+ hi def link vimMapBang vimBang
+ hi def link vimMapModKey vimFuncSID
+ hi def link vimMapMod vimBracket
+ hi def link vimMap vimCommand
+ hi def link vimMark Number
+ hi def link vimMarkNumber vimNumber
+ hi def link vimMenuBang vimBang
+ hi def link vimMenuClear Special
+ hi def link vimMenuMod vimMapMod
+ hi def link vimMenuName PreProc
+ hi def link vimMenu vimCommand
+ hi def link vimMenuNotation vimNotation
+ hi def link vimMenuPriority Number
+ hi def link vimMenuStatus Special
+ hi def link vimMenutranslateComment vimComment
+ hi def link vimMtchComment vimComment
+ hi def link vimNorm vimCommand
+ hi def link vimNotation Special
+ hi def link vimNotFunc vimCommand
+ hi def link vimNotPatSep vimString
+ hi def link vimNumber Number
+ hi def link vimOperError Error
+ hi def link vimOper Operator
+ hi def link vimOption PreProc
+ hi def link vimParenSep Delimiter
+ hi def link vimPatSepErr vimError
+ hi def link vimPatSepR vimPatSep
+ hi def link vimPatSep SpecialChar
+ hi def link vimPatSepZone vimString
+ hi def link vimPatSepZ vimPatSep
+ hi def link vimPattern Type
+ hi def link vimPlainMark vimMark
+ hi def link vimPlainRegister vimRegister
+ hi def link vimRegister SpecialChar
+ hi def link vimScriptDelim Comment
+ hi def link vimSearchDelim Statement
+ hi def link vimSearch vimString
+ hi def link vimSep Delimiter
+ hi def link vimSetMod vimOption
+ hi def link vimSetSep Statement
+ hi def link vimSetString vimString
+ hi def link vimSpecFile Identifier
+ hi def link vimSpecFileMod vimSpecFile
+ hi def link vimSpecial Type
+ hi def link vimStringCont vimString
+ hi def link vimString String
+ hi def link vimStringEnd vimString
+ hi def link vimStringInterpolationBrace vimEscape
+ hi def link vimSubst1 vimSubst
+ hi def link vimSubstDelim Delimiter
+ hi def link vimSubstFlags Special
+ hi def link vimSubstSubstr SpecialChar
+ hi def link vimSubstTwoBS vimString
+ hi def link vimSubst vimCommand
+ hi def link vimSynCaseError Error
+ hi def link vimSynCase Type
+ hi def link vimSyncC Type
+ hi def link vimSyncError Error
+ hi def link vimSyncGroupName vimGroupName
+ hi def link vimSyncGroup vimGroupName
+ hi def link vimSyncKey Type
+ hi def link vimSyncNone Type
+ hi def link vimSynContains vimSynOption
+ hi def link vimSynError Error
+ hi def link vimSynFoldMethodError Error
+ hi def link vimSynFoldMethod Type
+ hi def link vimSynKeyContainedin vimSynContains
+ hi def link vimSynKeyOpt vimSynOption
+ hi def link vimSynCchar vimSynOption
+ hi def link vimSynCcharValue Character
+ hi def link vimSynMtchGrp vimSynOption
+ hi def link vimSynMtchOpt vimSynOption
+ hi def link vimSynNextgroup vimSynOption
+ hi def link vimSynNotPatRange vimSynRegPat
+ hi def link vimSynOption Special
+ hi def link vimSynPatRange vimString
+ hi def link vimSynRegOpt vimSynOption
+ hi def link vimSynRegPat vimString
+ hi def link vimSynReg Type
+ hi def link vimSyntax vimCommand
+ hi def link vimSynType vimSpecial
+ hi def link vimTodo Todo
+ hi def link vimType Type
+ hi def link vimUnlet vimCommand
+ hi def link vimUnletBang vimBang
+ hi def link vimUnmap vimMap
+ hi def link vimUserAttrbCmpltFunc Special
+ hi def link vimUserAttrbCmplt vimSpecial
+ hi def link vimUserAttrbKey vimOption
+ hi def link vimUserAttrb vimSpecial
+ hi def link vimUserAttrbError Error
+ hi def link vimUserCmdError Error
+ hi def link vimUserCommand vimCommand
+ hi def link vimUserFunc Normal
+ hi def link vimVar Identifier
+ hi def link vimWarn WarningMsg
+endif
+
+" Current Syntax Variable: {{{2
+let b:current_syntax = "vim"
+
+" ---------------------------------------------------------------------
+" Cleanup: {{{1
+delc VimFolda
+delc VimFoldf
+delc VimFoldl
+delc VimFoldm
+delc VimFoldp
+delc VimFoldP
+delc VimFoldr
+delc VimFoldt
+let &cpo = s:keepcpo
+unlet s:keepcpo
+" vim:ts=18 fdm=marker ft=vim
diff --git a/runtime/syntax/go.vim b/runtime/syntax/go.vim
index 4272e80..8685867 100644
--- a/runtime/syntax/go.vim
+++ b/runtime/syntax/go.vim
@@ -5,7 +5,8 @@
" go.vim: Vim syntax file for Go.
" Language: Go
" Maintainer: Billie Cleek <bhcleek@gmail.com>
-" Latest Revision: 2023-08-21
+" Latest Revision: 2024-03-17
+" 2024-03-17: - fix goPackageComment highlight (by Vim Project)
" License: BSD-style. See LICENSE file in source repository.
" Repository: https://github.com/fatih/vim-go
@@ -230,21 +231,31 @@ endif
" import
if s:FoldEnable('import')
syn region goImport start='import (' end=')' transparent fold contains=goImport,goImportString,goComment
+ syn match goImport /^import ()/ transparent fold contains=goImport
else
syn region goImport start='import (' end=')' transparent contains=goImport,goImportString,goComment
+ syn match goImport /^import ()/ transparent contains=goImport
endif
" var, const
if s:FoldEnable('varconst')
syn region goVar start='var (' end='^\s*)$' transparent fold
- \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
+ \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
+ syn match goVar /var ()/ transparent fold
+ \ contains=goVar
syn region goConst start='const (' end='^\s*)$' transparent fold
- \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
+ \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
+ syn match goConst /const ()/ transparent fold
+ \ contains=goConst
else
syn region goVar start='var (' end='^\s*)$' transparent
- \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
+ \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
+ syn match goVar /var ()/ transparent
+ \ contains=goVar
syn region goConst start='const (' end='^\s*)$' transparent
- \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
+ \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
+ syn match goConst /const ()/ transparent
+ \ contains=goConst
endif
" Single-line var, const, and import.
@@ -521,12 +532,12 @@ if s:HighlightBuildConstraints() || s:FoldEnable('package_comment')
" matched as comments to avoid looking like working build constraints.
" The he, me, and re options let the "package" itself be highlighted by
" the usual rules.
- exe 'syn region goPackageComment start=/\v(\/\/.*\n)+\s*package/'
- \ . ' end=/\v\n\s*package/he=e-7,me=e-7,re=e-7'
+ exe 'syn region goPackageComment start=/\v(\/\/.*\n)+\s*package\s/'
+ \ . ' end=/\v\n\s*package\s/he=e-8,me=e-8,re=e-8'
\ . ' contains=@goCommentGroup,@Spell'
\ . (s:FoldEnable('package_comment') ? ' fold' : '')
- exe 'syn region goPackageComment start=/\v^\s*\/\*.*\n(.*\n)*\s*\*\/\npackage/'
- \ . ' end=/\v\*\/\n\s*package/he=e-7,me=e-7,re=e-7'
+ exe 'syn region goPackageComment start=/\v^\s*\/\*.*\n(.*\n)*\s*\*\/\npackage\s/'
+ \ . ' end=/\v\*\/\n\s*package\s/he=e-8,me=e-8,re=e-8'
\ . ' contains=@goCommentGroup,@Spell'
\ . (s:FoldEnable('package_comment') ? ' fold' : '')
hi def link goPackageComment Comment
diff --git a/runtime/syntax/gpg.vim b/runtime/syntax/gpg.vim
index c7f3584..f132a52 100644
--- a/runtime/syntax/gpg.vim
+++ b/runtime/syntax/gpg.vim
@@ -1,9 +1,13 @@
" Vim syntax file
" Language: gpg(1) configuration file
+" Maintainer: This runtime file is looking for a maintainer.
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2010-10-14
-" Updated: 2023-01-23 @ObserverOfTime: added a couple of keywords
+" Latest Revision: 2024-02-11
+" Updated:
+" 2023-01-23 @ObserverOfTime: added a couple of keywords
" 2023-03-21 Todd Zullinger <tmz@pobox.com>: sync with gnupg-2.4.0
+" 2024-02-10 Daniel Kahn Gillmor <dkg@fifthhorseman.net>:
+" mark use-embedded-filename as warning for security reasons
if exists("b:current_syntax")
finish
@@ -21,7 +25,7 @@ syn region gpgComment contained display oneline start='#' end='$'
syn match gpgID contained display '\<\(0x\)\=\x\{8,}\>'
-syn match gpgBegin display '^' skipwhite nextgroup=gpgComment,gpgOption,gpgCommand
+syn match gpgBegin display '^' skipwhite nextgroup=gpgComment,gpgOption,gpgOptionDeprecated,gpgCommand
syn keyword gpgCommand contained skipwhite nextgroup=gpgArg
\ change-passphrase check-sig check-signatures
@@ -41,6 +45,7 @@ syn keyword gpgCommand contained skipwhite nextgroup=gpgArg
\ quick-set-expire quick-set-primary-uid quick-sign-key
\ quick-update-pref receive-keys recv-keys refresh-keys
\ search-keys show-key show-keys sign-key tofu-policy
+
syn keyword gpgCommand contained skipwhite nextgroup=gpgArgError
\ card-edit card-status change-pin check-trustdb
\ clear-sign clearsign dearmor dearmour decrypt
@@ -97,6 +102,7 @@ syn keyword gpgOption contained skipwhite nextgroup=gpgArg
\ trusted-key trust-model try-secret-key ttyname
\ ttytype ungroup user verify-options weak-digest
\ xauthority
+
syn keyword gpgOption contained skipwhite nextgroup=gpgArgError
\ allow-freeform-uid allow-multiple-messages
\ allow-multisig-verification allow-non-selfsigned-uid
@@ -145,7 +151,7 @@ syn keyword gpgOption contained skipwhite nextgroup=gpgArgError
\ no-sk-comments no-skip-hidden-recipients
\ no-symkey-cache not-dash-escaped no-textmode
\ no-throw-keyids no-tty no-use-agent
- \ no-use-embedded-filename no-utf8-strings no-verbose
+ \ no-utf8-strings no-verbose
\ no-version only-sign-text-ids openpgp
\ override-compliance-check pgp6 pgp7 pgp8
\ preserve-permissions print-dane-records quiet
@@ -155,7 +161,7 @@ syn keyword gpgOption contained skipwhite nextgroup=gpgArgError
\ show-notation show-photos show-policy-url
\ show-session-key sk-comments skip-hidden-recipients
\ skip-verify textmode throw-keyids try-all-secrets
- \ unwrap use-agent use-embedded-filename use-keyboxd
+ \ unwrap use-agent use-keyboxd
\ use-only-openpgp-card utf8-strings verbose version
\ warranty with-colons with-fingerprint
\ with-icao-spelling with-key-data with-keygrip
@@ -164,6 +170,10 @@ syn keyword gpgOption contained skipwhite nextgroup=gpgArgError
\ with-subkey-fingerprints with-tofu-info with-wkd-hash
\ yes
+" depcrated for security reasons
+syn keyword gpgOptionDeprecated contained skipwhite nextgroup=gpgArgError
+ \ use-embedded-filename no-use-embedded-filename
+
syn match gpgArg contained display '\S\+\(\s\+\S\+\)*' contains=gpgID
syn match gpgArgError contained display '\S\+\(\s\+\S\+\)*'
@@ -171,6 +181,7 @@ hi def link gpgComment Comment
hi def link gpgTodo Todo
hi def link gpgID Number
hi def link gpgOption Keyword
+hi def link gpgOptionDeprecated WarningMsg
hi def link gpgCommand Error
hi def link gpgArgError Error
diff --git a/runtime/syntax/i3config.vim b/runtime/syntax/i3config.vim
index d451252..8131639 100644
--- a/runtime/syntax/i3config.vim
+++ b/runtime/syntax/i3config.vim
@@ -2,8 +2,8 @@
" Language: i3 config file
" Original Author: Josef Litos (JosefLitos/i3config.vim)
" Maintainer: Quentin Hibon (github user hiqua)
-" Version: 1.0.0
-" Last Change: 2023-11-11
+" Version: 1.0.2
+" Last Change: 2023-12-28
" References:
" http://i3wm.org/docs/userguide.html#configuring
@@ -137,8 +137,7 @@ syn match i3ConfigIpcKeyword /ipc-socket/ contained
syn match i3ConfigParamLine /^ipc-socket .*$/ contains=i3ConfigIpcKeyword
" 4.24 Focus follows mouse
-syn keyword i3ConfigFocusFollowsMouseOpts always contained
-syn match i3ConfigKeyword /^focus_follows_mouse \(yes\|no\|always\)$/ contains=i3ConfigBoolean,i3ConfigFocusFollowsMouseOpts
+syn match i3ConfigKeyword /^focus_follows_mouse \(yes\|no\)$/ contains=i3ConfigBoolean
" 4.25 Mouse warping
syn keyword i3ConfigMouseWarpingOpts output container none contained
@@ -298,7 +297,6 @@ hi def link i3ConfigWorkspaceDir i3ConfigOption
hi def link i3ConfigDotOperator i3ConfigOperator
hi def link i3ConfigClientOpts i3ConfigOption
hi def link i3ConfigIpcKeyword i3ConfigKeyword
-hi def link i3ConfigFocusFollowsMouseOpts i3ConfigOption
hi def link i3ConfigMouseWarpingOpts i3ConfigOption
hi def link i3ConfigPopupFullscreenOpts i3ConfigOption
hi def link i3ConfigFocusWrappingOpts i3ConfigOption
diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim
index 00d6071..fe0cabf 100644
--- a/runtime/syntax/java.vim
+++ b/runtime/syntax/java.vim
@@ -2,7 +2,7 @@
" Language: Java
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: https://github.com/fleiner/vim/blob/master/runtime/syntax/java.vim
-" Last Change: 2022 Jun 08
+" Last Change: 2024 Mar 22
" Please check :help java.vim for comments on some of the options available.
@@ -37,6 +37,14 @@ syn keyword javaBoolean true false
syn keyword javaConstant null
syn keyword javaTypedef this super
syn keyword javaOperator var new instanceof
+" Since the yield statement, which could take a parenthesised operand,
+" and _qualified_ yield methods get along within the switch block
+" (JLS-17, §3.8), it seems futile to make a region definition for this
+" block; instead look for the _yield_ word alone, and if found,
+" backtrack (arbitrarily) 80 bytes, at most, on the matched line and,
+" if necessary, on the line before that (h: \@<=), trying to match
+" neither a method reference nor a qualified method invocation.
+syn match javaOperator "\%(\%(::\|\.\)[[:space:]\n]*\)\@80<!\<yield\>"
syn keyword javaType boolean char byte short int long float double
syn keyword javaType void
syn keyword javaStatement return
@@ -56,6 +64,7 @@ syn keyword javaBranch break continue nextgroup=javaUserLabelRef skipwhite
syn match javaUserLabelRef "\k\+" contained
syn match javaVarArg "\.\.\."
syn keyword javaScopeDecl public protected private abstract
+syn match javaConceptKind "\<default\>\%(\s*\%(:\|->\)\)\@!"
function s:isModuleInfoDeclarationCurrentBuffer() abort
return fnamemodify(bufname("%"), ":t") =~ '^module-info\%(\.class\>\)\@!'
@@ -142,32 +151,54 @@ if exists("java_space_errors")
endif
endif
-syn region javaLabelRegion transparent matchgroup=javaLabel start="\<case\>" end="->" matchgroup=NONE end=":" contains=javaNumber,javaCharacter,javaString
-syn match javaUserLabel "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=javaLabel
-syn keyword javaLabel default
+syn match javaUserLabel "^\s*\<\K\k*\>\%(\<default\>\)\@<!\s*:"he=e-1
+syn region javaLabelRegion transparent matchgroup=javaLabel start="\<case\>" matchgroup=NONE end=":\|->" contains=javaLabelCastType,javaLabelNumber,javaCharacter,javaString,javaConstant,@javaClasses,javaLabelDefault,javaLabelVarType,javaLabelWhenClause
+syn region javaLabelRegion transparent matchgroup=javaLabel start="\<default\>\%(\s*\%(:\|->\)\)\@=" matchgroup=NONE end=":\|->" oneline
+" Consider grouped _default_ _case_ labels, i.e.
+" case null, default ->
+" case null: default:
+syn keyword javaLabelDefault contained default
+syn keyword javaLabelVarType contained var
+syn keyword javaLabelCastType contained char byte short int
+" Allow for the contingency of the enclosing region not being able to
+" _keep_ its _end_, e.g. case ':':.
+syn region javaLabelWhenClause contained transparent matchgroup=javaLabel start="\<when\>" matchgroup=NONE end=":"me=e-1 end="->"me=e-2 contains=TOP,javaExternal
+syn match javaLabelNumber contained "\<0\>[lL]\@!"
+syn match javaLabelNumber contained "\<\%(0\%([xX]\x\%(_*\x\)*\|_*\o\%(_*\o\)*\|[bB][01]\%(_*[01]\)*\)\|[1-9]\%(_*\d\)*\)\>[lL]\@!"
+hi def link javaLabelDefault javaLabel
+hi def link javaLabelVarType javaOperator
+hi def link javaLabelNumber javaNumber
+hi def link javaLabelCastType javaType
" highlighting C++ keywords as errors removed, too many people find it
" annoying. Was: if !exists("java_allow_cpp_keywords")
" The following cluster contains all java groups except the contained ones
-syn cluster javaTop add=javaExternal,javaError,javaBranch,javaLabelRegion,javaLabel,javaConditional,javaRepeat,javaBoolean,javaConstant,javaTypedef,javaOperator,javaType,javaStatement,javaStorageClass,javaAssert,javaExceptions,javaMethodDecl,javaClassDecl,javaScopeDecl,javaError2,javaUserLabel,javaLangObject,javaAnnotation,javaVarArg
+syn cluster javaTop add=javaExternal,javaError,javaBranch,javaLabelRegion,javaConditional,javaRepeat,javaBoolean,javaConstant,javaTypedef,javaOperator,javaType,javaStatement,javaStorageClass,javaAssert,javaExceptions,javaMethodDecl,javaClassDecl,javaScopeDecl,javaConceptKind,javaError2,javaUserLabel,javaLangObject,javaAnnotation,javaVarArg
" Comments
syn keyword javaTodo contained TODO FIXME XXX
+
if exists("java_comment_strings")
syn region javaCommentString contained start=+"+ end=+"+ end=+$+ end=+\*/+me=s-1,he=s-1 contains=javaSpecial,javaCommentStar,javaSpecialChar,@Spell
- syn region javaComment2String contained start=+"+ end=+$\|"+ contains=javaSpecial,javaSpecialChar,@Spell
+ syn region javaCommentString contained start=+"""[ \t\x0c\r]*$+hs=e+1 end=+"""+he=s-1 contains=javaSpecial,javaCommentStar,javaSpecialChar,@Spell,javaSpecialError,javaTextBlockError
+ syn region javaComment2String contained start=+"+ end=+$\|"+ contains=javaSpecial,javaSpecialChar,@Spell
syn match javaCommentCharacter contained "'\\[^']\{1,6\}'" contains=javaSpecialChar
syn match javaCommentCharacter contained "'\\''" contains=javaSpecialChar
syn match javaCommentCharacter contained "'[^\\]'"
- syn cluster javaCommentSpecial add=javaCommentString,javaCommentCharacter,javaNumber
- syn cluster javaCommentSpecial2 add=javaComment2String,javaCommentCharacter,javaNumber
+ syn cluster javaCommentSpecial add=javaCommentString,javaCommentCharacter,javaNumber,javaStrTempl
+ syn cluster javaCommentSpecial2 add=javaComment2String,javaCommentCharacter,javaNumber,javaStrTempl
endif
-syn region javaComment start="/\*" end="\*/" contains=@javaCommentSpecial,javaTodo,@Spell
+
+syn region javaComment start="/\*" end="\*/" contains=@javaCommentSpecial,javaTodo,javaSpaceError,@Spell
syn match javaCommentStar contained "^\s*\*[^/]"me=e-1
syn match javaCommentStar contained "^\s*\*$"
-syn match javaLineComment "//.*" contains=@javaCommentSpecial2,javaTodo,@Spell
+syn match javaLineComment "//.*" contains=@javaCommentSpecial2,javaTodo,javaCommentMarkupTag,javaSpaceError,@Spell
+syn match javaCommentMarkupTag contained "@\%(end\|highlight\|link\|replace\|start\)\>" nextgroup=javaCommentMarkupTagAttr skipwhite
+syn match javaCommentMarkupTagAttr contained "\<region\>" nextgroup=javaCommentMarkupTagAttr skipwhite
+syn region javaCommentMarkupTagAttr contained transparent matchgroup=htmlArg start=/\<\%(re\%(gex\|gion\|placement\)\|substring\|t\%(arget\|ype\)\)\%(\s*=\)\@=/ matchgroup=htmlString end=/\%(=\s*\)\@<=\%("[^"]\+"\|'[^']\+'\|\%([.-]\|\k\)\+\)/ nextgroup=javaCommentMarkupTagAttr skipwhite oneline
+hi def link javaCommentMarkupTagAttr htmlArg
hi def link javaCommentString javaString
hi def link javaComment2String javaString
hi def link javaCommentCharacter javaCharacter
@@ -184,15 +215,19 @@ if !exists("java_ignore_javadoc") && main_syntax != 'jsp'
" here.
syntax spell default
- syn region javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaDocSeeTag,javaTodo,@Spell
- syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*" matchgroup=javaCommentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,@Spell,javaDocTags,javaDocSeeTag
-
- syn region javaDocTags contained start="{@\(code\|link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}"
+ syn region javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaDocSeeTag,javaDocCodeTag,javaDocSnippetTag,javaTodo,javaSpaceError,@Spell
+ syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*" matchgroup=javaCommentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,javaSpaceError,@Spell,javaDocTags,javaDocSeeTag,javaDocCodeTag,javaDocSnippetTag
+ syn region javaDocTags contained start="{@\%(li\%(teral\|nk\%(plain\)\=\)\|inherit[Dd]oc\|doc[rR]oot\|value\)\>" end="}"
syn match javaDocTags contained "@\(param\|exception\|throws\|since\)\s\+\S\+" contains=javaDocParam
syn match javaDocParam contained "\s\S\+"
syn match javaDocTags contained "@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>"
syn region javaDocSeeTag contained matchgroup=javaDocTags start="@see\s\+" matchgroup=NONE end="\_."re=e-1 contains=javaDocSeeTagParam
syn match javaDocSeeTagParam contained @"\_[^"]\+"\|<a\s\+\_.\{-}</a>\|\(\k\|\.\)*\(#\k\+\((\_[^)]\+)\)\=\)\=@ extend
+ syn region javaCodeSkipBlock contained transparent start="{\%(@code\>\)\@!" end="}" contains=javaCodeSkipBlock,javaDocCodeTag
+ syn region javaDocCodeTag contained start="{@code\>" end="}" contains=javaDocCodeTag,javaCodeSkipBlock
+ syn region javaDocSnippetTagAttr contained transparent matchgroup=htmlArg start=/\<\%(class\|file\|id\|lang\|region\)\%(\s*=\)\@=/ matchgroup=htmlString end=/:$/ end=/\%(=\s*\)\@<=\%("[^"]\+"\|'[^']\+'\|\%([.-]\|\k\)\+\)/ nextgroup=javaDocSnippetTagAttr skipwhite skipnl
+ syn region javaSnippetSkipBlock contained transparent start="{\%(@snippet\>\)\@!" end="}" contains=javaSnippetSkipBlock,javaDocSnippetTag,javaCommentMarkupTag
+ syn region javaDocSnippetTag contained start="{@snippet\>" end="}" contains=javaDocSnippetTag,javaSnippetSkipBlock,javaDocSnippetTagAttr,javaCommentMarkupTag
syntax case match
endif
@@ -202,22 +237,35 @@ syn match javaComment "/\*\*/"
" Strings and constants
syn match javaSpecialError contained "\\."
syn match javaSpecialCharError contained "[^']"
-syn match javaSpecialChar contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)"
+" Escape Sequences (JLS-17, §3.10.7):
+syn match javaSpecialChar contained "\\\%(u\x\x\x\x\|[0-3]\o\o\|\o\o\=\|[bstnfr"'\\]\)"
syn region javaString start=+"+ end=+"+ end=+$+ contains=javaSpecialChar,javaSpecialError,@Spell
-" next line disabled, it can cause a crash for a long line
-"syn match javaStringError +"\([^"\\]\|\\.\)*$+
+syn region javaString start=+"""[ \t\x0c\r]*$+hs=e+1 end=+"""+he=s-1 contains=javaSpecialChar,javaSpecialError,javaTextBlockError,@Spell
+syn match javaTextBlockError +"""\s*"""+
+syn region javaStrTemplEmbExp contained matchgroup=javaStrTempl start="\\{" end="}" contains=TOP
+syn region javaStrTempl start=+\%(\.[[:space:]\n]*\)\@<="+ end=+"+ contains=javaStrTemplEmbExp,javaSpecialChar,javaSpecialError,@Spell
+syn region javaStrTempl start=+\%(\.[[:space:]\n]*\)\@<="""[ \t\x0c\r]*$+hs=e+1 end=+"""+he=s-1 contains=javaStrTemplEmbExp,javaSpecialChar,javaSpecialError,javaTextBlockError,@Spell
+" The next line is commented out, it can cause a crash for a long line
+"syn match javaStringError +"\%([^"\\]\|\\.\)*$+
syn match javaCharacter "'[^']*'" contains=javaSpecialChar,javaSpecialCharError
syn match javaCharacter "'\\''" contains=javaSpecialChar
syn match javaCharacter "'[^\\]'"
-syn match javaNumber "\<\(0[bB][0-1]\+\|0[0-7]*\|0[xX]\x\+\|\d\(\d\|_\d\)*\)[lL]\=\>"
-syn match javaNumber "\(\<\d\(\d\|_\d\)*\.\(\d\(\d\|_\d\)*\)\=\|\.\d\(\d\|_\d\)*\)\([eE][-+]\=\d\(\d\|_\d\)*\)\=[fFdD]\="
-syn match javaNumber "\<\d\(\d\|_\d\)*[eE][-+]\=\d\(\d\|_\d\)*[fFdD]\=\>"
-syn match javaNumber "\<\d\(\d\|_\d\)*\([eE][-+]\=\d\(\d\|_\d\)*\)\=[fFdD]\>"
-
-" unicode characters
-syn match javaSpecial "\\u\d\{4\}"
-
-syn cluster javaTop add=javaString,javaCharacter,javaNumber,javaSpecial,javaStringError
+" Integer literals (JLS-17, §3.10.1):
+syn keyword javaNumber 0 0l 0L
+syn match javaNumber "\<\%(0\%([xX]\x\%(_*\x\)*\|_*\o\%(_*\o\)*\|[bB][01]\%(_*[01]\)*\)\|[1-9]\%(_*\d\)*\)[lL]\=\>"
+" Decimal floating-point literals (JLS-17, §3.10.2):
+" Against "\<\d\+\>\.":
+syn match javaNumber "\<\d\%(_*\d\)*\."
+syn match javaNumber "\%(\<\d\%(_*\d\)*\.\%(\d\%(_*\d\)*\)\=\|\.\d\%(_*\d\)*\)\%([eE][-+]\=\d\%(_*\d\)*\)\=[fFdD]\=\>"
+syn match javaNumber "\<\d\%(_*\d\)*[eE][-+]\=\d\%(_*\d\)*[fFdD]\=\>"
+syn match javaNumber "\<\d\%(_*\d\)*\%([eE][-+]\=\d\%(_*\d\)*\)\=[fFdD]\>"
+" Hexadecimal floating-point literals (JLS-17, §3.10.2):
+syn match javaNumber "\<0[xX]\%(\x\%(_*\x\)*\.\=\|\%(\x\%(_*\x\)*\)\=\.\x\%(_*\x\)*\)[pP][-+]\=\d\%(_*\d\)*[fFdD]\=\>"
+
+" Unicode characters
+syn match javaSpecial "\\u\x\x\x\x"
+
+syn cluster javaTop add=javaString,javaStrTempl,javaCharacter,javaNumber,javaSpecial,javaStringError,javaTextBlockError
if exists("java_highlight_functions")
if java_highlight_functions == "indent"
@@ -231,26 +279,36 @@ if exists("java_highlight_functions")
" 1. class names are always capitalized (ie: Button)
" 2. method names are never capitalized (except constructors, of course)
"syn region javaFuncDef start=+^\s\+\(\(public\|protected\|private\|static\|abstract\|final\|native\|synchronized\)\s\+\)*\(\(void\|boolean\|char\|byte\|short\|int\|long\|float\|double\|\([A-Za-z_][A-Za-z0-9_$]*\.\)*[A-Z][A-Za-z0-9_$]*\)\(<[^>]*>\)\=\(\[\]\)*\s\+[a-z][A-Za-z0-9_$]*\|[A-Z][A-Za-z0-9_$]*\)\s*([^0-9]+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,javaComment,javaLineComment,@javaClasses
- syn region javaFuncDef start=+^\s\+\(\(public\|protected\|private\|static\|abstract\|final\|native\|synchronized\)\s\+\)*\(<.*>\s\+\)\?\(\(void\|boolean\|char\|byte\|short\|int\|long\|float\|double\|\([A-Za-z_][A-Za-z0-9_$]*\.\)*[A-Z][A-Za-z0-9_$]*\)\(<[^(){}]*>\)\=\(\[\]\)*\s\+[a-z][A-Za-z0-9_$]*\|[A-Z][A-Za-z0-9_$]*\)\s*(+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,javaComment,javaLineComment,@javaClasses,javaAnnotation
+ syn region javaFuncDef start=+^\s\+\%(\%(public\|protected\|private\|static\|\%(abstract\|default\)\|final\|native\|synchronized\)\s\+\)*\%(<.*>\s\+\)\?\%(\%(void\|boolean\|char\|byte\|short\|int\|long\|float\|double\|\%([A-Za-z_][A-Za-z0-9_$]*\.\)*[A-Z][A-Za-z0-9_$]*\)\%(<[^(){}]*>\)\=\%(\[\]\)*\s\+[a-z][A-Za-z0-9_$]*\|[A-Z][A-Za-z0-9_$]*\)\s*(+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,javaComment,javaLineComment,@javaClasses,javaAnnotation
endif
- syn match javaLambdaDef "[a-zA-Z_][a-zA-Z0-9_]*\s*->"
+ syn match javaLambdaDef "\<\K\k*\>\%(\<default\>\)\@<!\s*->"
syn match javaBraces "[{}]"
syn cluster javaTop add=javaFuncDef,javaBraces,javaLambdaDef
endif
if exists("java_highlight_debug")
-
" Strings and constants
- syn match javaDebugSpecial contained "\\\d\d\d\|\\."
+ syn match javaDebugSpecial contained "\\\%(u\x\x\x\x\|[0-3]\o\o\|\o\o\=\|[bstnfr"'\\]\)"
syn region javaDebugString contained start=+"+ end=+"+ contains=javaDebugSpecial
- syn match javaDebugStringError +"\([^"\\]\|\\.\)*$+
+ syn region javaDebugString contained start=+"""[ \t\x0c\r]*$+hs=e+1 end=+"""+he=s-1 contains=javaDebugSpecial,javaDebugTextBlockError
+ " The highlight groups of java{StrTempl,Debug{,Paren,StrTempl}}\,
+ " share one colour by default. Do not conflate unrelated parens.
+ syn region javaDebugStrTemplEmbExp contained matchgroup=javaDebugStrTempl start="\\{" end="}" contains=javaComment,javaLineComment,javaDebug\%(Paren\)\@!.*
+ syn region javaDebugStrTempl contained start=+\%(\.[[:space:]\n]*\)\@<="+ end=+"+ contains=javaDebugStrTemplEmbExp,javaDebugSpecial
+ syn region javaDebugStrTempl contained start=+\%(\.[[:space:]\n]*\)\@<="""[ \t\x0c\r]*$+hs=e+1 end=+"""+he=s-1 contains=javaDebugStrTemplEmbExp,javaDebugSpecial,javaDebugTextBlockError
+ " The next line is commented out, it can cause a crash for a long line
+" syn match javaDebugStringError contained +"\%([^"\\]\|\\.\)*$+
+ syn match javaDebugTextBlockError contained +"""\s*"""+
syn match javaDebugCharacter contained "'[^\\]'"
syn match javaDebugSpecialCharacter contained "'\\.'"
syn match javaDebugSpecialCharacter contained "'\\''"
- syn match javaDebugNumber contained "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>"
- syn match javaDebugNumber contained "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\="
- syn match javaDebugNumber contained "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>"
- syn match javaDebugNumber contained "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"
+ syn keyword javaDebugNumber contained 0 0l 0L
+ syn match javaDebugNumber contained "\<\d\%(_*\d\)*\."
+ syn match javaDebugNumber contained "\<\%(0\%([xX]\x\%(_*\x\)*\|_*\o\%(_*\o\)*\|[bB][01]\%(_*[01]\)*\)\|[1-9]\%(_*\d\)*\)[lL]\=\>"
+ syn match javaDebugNumber contained "\%(\<\d\%(_*\d\)*\.\%(\d\%(_*\d\)*\)\=\|\.\d\%(_*\d\)*\)\%([eE][-+]\=\d\%(_*\d\)*\)\=[fFdD]\=\>"
+ syn match javaDebugNumber contained "\<\d\%(_*\d\)*[eE][-+]\=\d\%(_*\d\)*[fFdD]\=\>"
+ syn match javaDebugNumber contained "\<\d\%(_*\d\)*\%([eE][-+]\=\d\%(_*\d\)*\)\=[fFdD]\>"
+ syn match javaDebugNumber contained "\<0[xX]\%(\x\%(_*\x\)*\.\=\|\%(\x\%(_*\x\)*\)\=\.\x\%(_*\x\)*\)[pP][-+]\=\d\%(_*\d\)*[fFdD]\=\>"
syn keyword javaDebugBoolean contained true false
syn keyword javaDebugType contained null this super
syn region javaDebugParen start=+(+ end=+)+ contained contains=javaDebug.*,javaDebugParen
@@ -265,7 +323,9 @@ if exists("java_highlight_debug")
hi def link javaDebug Debug
hi def link javaDebugString DebugString
+ hi def link javaDebugStrTempl Macro
hi def link javaDebugStringError javaError
+ hi def link javaDebugTextBlockError javaDebugStringError
hi def link javaDebugType DebugType
hi def link javaDebugBoolean DebugBoolean
hi def link javaDebugNumber Debug
@@ -326,17 +386,20 @@ hi def link javaStorageClass StorageClass
hi def link javaMethodDecl javaStorageClass
hi def link javaClassDecl javaStorageClass
hi def link javaScopeDecl javaStorageClass
+hi def link javaConceptKind NonText
hi def link javaBoolean Boolean
hi def link javaSpecial Special
hi def link javaSpecialError Error
hi def link javaSpecialCharError Error
hi def link javaString String
+hi def link javaStrTempl Macro
hi def link javaCharacter Character
hi def link javaSpecialChar SpecialChar
hi def link javaNumber Number
hi def link javaError Error
hi def link javaStringError Error
+hi def link javaTextBlockError javaStringError
hi def link javaStatement Statement
hi def link javaOperator Operator
hi def link javaComment Comment
@@ -349,6 +412,8 @@ hi def link javaAnnotation PreProc
hi def link javaCommentTitle SpecialComment
hi def link javaDocTags Special
+hi def link javaDocCodeTag Special
+hi def link javaDocSnippetTag Special
hi def link javaDocParam Function
hi def link javaDocSeeTagParam Function
hi def link javaCommentStar javaComment
@@ -358,6 +423,8 @@ hi def link javaExternal Include
hi def link htmlComment Special
hi def link htmlCommentPart Special
+hi def link htmlArg Type
+hi def link htmlString String
hi def link javaSpaceError Error
if s:isModuleInfoDeclarationCurrentBuffer()
diff --git a/runtime/syntax/lex.vim b/runtime/syntax/lex.vim
index 82197ad..b05148e 100644
--- a/runtime/syntax/lex.vim
+++ b/runtime/syntax/lex.vim
@@ -1,9 +1,11 @@
" Vim syntax file
" Language: Lex and Flex
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E. Campbell
" Contributor: Robert A. van Engelen <engelen@acm.org>
-" Last Change: Apr 24, 2020
" Version: 18
+" Last Change: Apr 24, 2020
+" 2024 Feb 19 by Vim Project (announce adoption)
" quit when a syntax file was already loaded
if exists("b:current_syntax")
diff --git a/runtime/syntax/lisp.vim b/runtime/syntax/lisp.vim
index 90513e3..5350b4d 100644
--- a/runtime/syntax/lisp.vim
+++ b/runtime/syntax/lisp.vim
@@ -1,9 +1,11 @@
" Vim syntax file
" Language: Lisp
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E. Campbell
" Last Change: Nov 10, 2021
+" 2024 Feb 19 by Vim Project (announce adoption)
" Version: 31
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP
+" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP
"
" Thanks to F Xavier Noria for a list of 978 Common Lisp symbols taken from HyperSpec
" Clisp additions courtesy of http://clisp.cvs.sourceforge.net/*checkout*/clisp/clisp/emacs/lisp.vim
diff --git a/runtime/syntax/mail.vim b/runtime/syntax/mail.vim
index 0cd48fc..9beeba6 100644
--- a/runtime/syntax/mail.vim
+++ b/runtime/syntax/mail.vim
@@ -2,7 +2,7 @@
" Language: Mail file
" Previous Maintainer: Felix von Leitner <leitner@math.fu-berlin.de>
" Maintainer: GI <a@b.c>, where a='gi1242+vim', b='gmail', c='com'
-" Last Change: Wed 14 Aug 2013 08:24:52 AM PDT
+" Last Change: Thu 25 Jan 2024 10:34:02 AM EST
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -12,6 +12,8 @@ endif
let s:cpo_save = &cpo
set cpo&vim
+syn spell toplevel
+
" The mail header is recognized starting with a "keyword:" line and ending
" with an empty line or other line that can't be in the header. All lines of
" the header are highlighted. Headers of quoted messages (quoted with >) are
@@ -61,6 +63,9 @@ syn region mailVerbatim contains=@mailQuoteExps,@NoSpell keepend start="^\z(\(>
syn match mailURL contains=@NoSpell `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' <>"]+)[a-z0-9/]`
syn match mailEmail contains=@NoSpell "\v[_=a-z\./+0-9-]+\@[a-z0-9._-]+\a{2}"
+" Don't spell emojis
+syn match mailEmoji contains=@NoSpell "\%#=2\v[\U1f300-\U1f64f\U1f900-\U1f9ff]"
+
" Make sure quote markers in regions (header / signature) have correct color
syn match mailQuoteExp1 contained "\v^(\> ?)"
syn match mailQuoteExp2 contained "\v^(\> ?){2}"
@@ -86,14 +91,14 @@ endif
" Define the default highlighting.
hi def link mailVerbatim Special
-hi def link mailHeader Statement
+hi def link mailHeader PreProc
hi def link mailHeaderKey Type
-hi def link mailSignature PreProc
+hi def link mailSignature Comment
hi def link mailHeaderEmail mailEmail
-hi def link mailEmail Special
-hi def link mailURL String
-hi def link mailSubject Title
-hi def link mailQuoted1 Comment
+hi def link mailEmail String
+hi def link mailURL Constant
+hi def link mailSubject Statement
+hi def link mailQuoted1 Function
hi def link mailQuoted3 mailQuoted1
hi def link mailQuoted5 mailQuoted1
hi def link mailQuoted2 Identifier
diff --git a/runtime/syntax/maple.vim b/runtime/syntax/maple.vim
index 78f2b4e..b0bd9aa 100644
--- a/runtime/syntax/maple.vim
+++ b/runtime/syntax/maple.vim
@@ -1,9 +1,11 @@
" Vim syntax file
" Language: Maple V (based on release 4)
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer:Charles E. Campbell
" Last Change: Mar 26, 2019
+" 2024 Feb 19 by Vim Project (announce adoption)
" Version: 17
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_MAPLE
+" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_MAPLE
"
" Package Function Selection: {{{1
" Because there are a lot of packages, and because of the potential for namespace
diff --git a/runtime/syntax/netrw.vim b/runtime/syntax/netrw.vim
index 1f02bbe..f5b7fdc 100644
--- a/runtime/syntax/netrw.vim
+++ b/runtime/syntax/netrw.vim
@@ -1,6 +1,8 @@
" Language : Netrw Listing Syntax
-" Maintainer : Charles E. Campbell
-" Last change: Nov 07, 2019
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E. Campbell
+" Last Change: Nov 07, 2019
+" 2024 Feb 19 by Vim Project (announce adoption)
" Version : 20
" ---------------------------------------------------------------------
if exists("b:current_syntax")
diff --git a/runtime/syntax/odin.vim b/runtime/syntax/odin.vim
new file mode 100644
index 0000000..6bf06f6
--- /dev/null
+++ b/runtime/syntax/odin.vim
@@ -0,0 +1,103 @@
+vim9script
+
+# Vim indent plugin file
+# Language: Odin
+# Maintainer: Maxim Kim <habamax@gmail.com>
+# Website: https://github.com/habamax/vim-odin
+# Last Change: 2024-01-15
+
+if exists("b:current_syntax")
+ finish
+endif
+
+syntax keyword odinKeyword using transmute cast distinct opaque where dynamic
+syntax keyword odinKeyword struct enum union const bit_field bit_set
+syntax keyword odinKeyword package proc map import export foreign
+syntax keyword odinKeyword size_of offset_of type_info_of typeid_of type_of align_of
+syntax keyword odinKeyword return defer
+syntax keyword odinKeyword or_return or_else
+syntax keyword odinKeyword inline no_inline
+
+syntax keyword odinConditional if when else do for switch case continue break
+syntax keyword odinType string cstring bool b8 b16 b32 b64 rune any rawptr
+syntax keyword odinType f16 f32 f64 f16le f16be f32le f32be f64le f64be
+syntax keyword odinType u8 u16 u32 u64 u128 u16le u32le u64le u128le u16be
+syntax keyword odinType u32be u64be u128be uint uintptr i8 i16 i32 i64 i128
+syntax keyword odinType i16le i32le i64le i128le i16be i32be i64be i128be
+syntax keyword odinType int complex complex32 complex64 complex128 matrix typeid
+syntax keyword odinType quaternion quaternion64 quaternion128 quaternion256
+syntax keyword odinBool true false
+syntax keyword odinNull nil
+syntax match odinUninitialized '\s\+---\(\s\|$\)'
+
+syntax keyword odinOperator in notin not_in
+syntax match odinOperator "?" display
+syntax match odinOperator "->" display
+
+syntax match odinTodo "TODO" contained
+syntax match odinTodo "XXX" contained
+syntax match odinTodo "FIXME" contained
+syntax match odinTodo "HACK" contained
+
+syntax region odinRawString start=+`+ end=+`+
+syntax region odinChar start=+'+ skip=+\\\\\|\\'+ end=+'+
+syntax region odinString start=+"+ skip=+\\\\\|\\'+ end=+"+ contains=odinEscape
+syntax match odinEscape display contained /\\\([nrt\\'"]\|x\x\{2}\)/
+
+syntax match odinProcedure "\v<\w*>(\s*::\s*proc)@="
+
+syntax match odinAttribute "@\ze\<\w\+\>" display
+syntax region odinAttribute
+ \ matchgroup=odinAttribute
+ \ start="@\ze(" end="\ze)"
+ \ transparent oneline
+
+syntax match odinInteger "\-\?\<\d\+\>" display
+syntax match odinFloat "\-\?\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\%([eE][+-]\=[0-9_]\+\)\=" display
+syntax match odinHex "\<0[xX][0-9A-Fa-f]\+\>" display
+syntax match odinDoz "\<0[zZ][0-9a-bA-B]\+\>" display
+syntax match odinOct "\<0[oO][0-7]\+\>" display
+syntax match odinBin "\<0[bB][01]\+\>" display
+
+syntax match odinAddressOf "&" display
+syntax match odinDeref "\^" display
+
+syntax match odinMacro "#\<\w\+\>" display
+
+syntax match odinTemplate "$\<\w\+\>"
+
+syntax region odinLineComment start=/\/\// end=/$/ contains=@Spell,odinTodo
+syntax region odinBlockComment start=/\/\*/ end=/\*\// contains=@Spell,odinTodo,odinBlockComment
+syn sync ccomment odinBlockComment
+
+highlight def link odinKeyword Statement
+highlight def link odinConditional Conditional
+highlight def link odinOperator Operator
+
+highlight def link odinString String
+highlight def link odinRawString String
+highlight def link odinChar Character
+highlight def link odinEscape Special
+
+highlight def link odinProcedure Function
+
+highlight def link odinMacro PreProc
+
+highlight def link odinLineComment Comment
+highlight def link odinBlockComment Comment
+
+highlight def link odinTodo Todo
+
+highlight def link odinAttribute Statement
+highlight def link odinType Type
+highlight def link odinBool Boolean
+highlight def link odinNull Constant
+highlight def link odinUninitialized Constant
+highlight def link odinInteger Number
+highlight def link odinFloat Float
+highlight def link odinHex Number
+highlight def link odinOct Number
+highlight def link odinBin Number
+highlight def link odinDoz Number
+
+b:current_syntax = "odin"
diff --git a/runtime/syntax/quarto.vim b/runtime/syntax/quarto.vim
index d5d4ee2..f83071d 100644
--- a/runtime/syntax/quarto.vim
+++ b/runtime/syntax/quarto.vim
@@ -1,7 +1,9 @@
" Language: Quarto (Markdown with chunks of R, Python and other languages)
-" Provisory Maintainer: Jakson Aquino <jalvesaq@gmail.com>
-" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Fri Feb 24, 2023 08:26AM
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: 2023 Feb 24 08:26AM
+" 2024 Feb 19 by Vim Project (announce adoption)
"
" The developers of tools for Quarto maintain Vim runtime files in their
" Github repository and, if required, I will hand over the maintenance of
diff --git a/runtime/syntax/r.vim b/runtime/syntax/r.vim
index 1932d24..fa73194 100644
--- a/runtime/syntax/r.vim
+++ b/runtime/syntax/r.vim
@@ -1,12 +1,14 @@
" Vim syntax file
" Language: R (GNU S)
-" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
-" Former Maintainers: Vaidotas Zemlys <zemlys@gmail.com>
-" Tom Payne <tom@tompayne.org>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainers: Jakson Aquino <jalvesaq@gmail.com>
+" Vaidotas Zemlys <zemlys@gmail.com>
+" Tom Payne <tom@tompayne.org>
" Contributor: Johannes Ranke <jranke@uni-bremen.de>
-" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Sun Dec 24, 2023 08:05AM
-" Filenames: *.R *.r *.Rhistory *.Rt
+" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
+" Filenames: *.R *.r *.Rhistory *.Rt
+" Last Change: 2023 Dec 24 08:05AM
+" 2024 Feb 19 by Vim Project (announce adoption)
"
" NOTE: The highlighting of R functions might be defined in
" runtime files created by a filetype plugin, if installed.
diff --git a/runtime/syntax/rhelp.vim b/runtime/syntax/rhelp.vim
index 8cac585..7407538 100644
--- a/runtime/syntax/rhelp.vim
+++ b/runtime/syntax/rhelp.vim
@@ -1,9 +1,11 @@
" Vim syntax file
" Language: R Help File
-" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
-" Former Maintainer: Johannes Ranke <jranke@uni-bremen.de>
-" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Tue Jun 28, 2016 08:53AM
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainers: Jakson Aquino <jalvesaq@gmail.com>
+" Johannes Ranke <jranke@uni-bremen.de>
+" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: 2016 Jun 28 08:53AM
+" 2024 Feb 19 by Vim Project (announce adoption)
" Remarks: - Includes R syntax highlighting in the appropriate
" sections if an r.vim file is in the same directory or in the
" default debian location.
diff --git a/runtime/syntax/rmd.vim b/runtime/syntax/rmd.vim
index 7b8b7fe..4b4db1e 100644
--- a/runtime/syntax/rmd.vim
+++ b/runtime/syntax/rmd.vim
@@ -1,7 +1,9 @@
" Language: Markdown with chunks of R, Python and other languages
-" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
-" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Sun Dec 24, 2023 07:21AM
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: 2023 Dec 24 07:21AM
+" 2024 Feb 19 by Vim Project (announce adoption)
"
" For highlighting pandoc extensions to markdown like citations and TeX and
" many other advanced features like folding of markdown sections, it is
diff --git a/runtime/syntax/rpcgen.vim b/runtime/syntax/rpcgen.vim
index 60c9b8c..e5a0b0b 100644
--- a/runtime/syntax/rpcgen.vim
+++ b/runtime/syntax/rpcgen.vim
@@ -1,9 +1,11 @@
" Vim syntax file
" Language: rpcgen
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E. Campbell
" Last Change: Aug 31, 2016
+" 2024 Feb 19 by Vim Project (announce adoption)
" Version: 13
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_RPCGEN
+" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_RPCGEN
if exists("b:current_syntax")
finish
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index a83c020..97e74d2 100644
--- a/runtime/syntax/sh.vim
+++ b/runtime/syntax/sh.vim
@@ -1,10 +1,11 @@
" Vim syntax file
" Language: shell (sh) Korn shell (ksh) bash (sh)
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
-" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
-" Last Change: Feb 28, 2023
+" Maintainer: This runtime file is looking for a new maintainer.
+" Previous Maintainers: Charles E. Campbell
+" Lennart Schultz <Lennart.Schultz@ecmwf.int>
+" Last Change: 2024 Mar 04 by Vim Project
" Version: 208
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
+" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) and heredoc fixes from Felipe Contreras
@@ -138,17 +139,17 @@ endif
syn cluster shArithParenList contains=shArithmetic,shArithParen,shCaseEsac,shComment,shDeref,shDo,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shHereString,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor,shFunctionKey,shFunctionOne,shFunctionTwo
syn cluster shArithList contains=@shArithParenList,shParenError
syn cluster shCaseEsacList contains=shCaseStart,shCaseLabel,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange
-syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSubBQ,shComment,shDblBrace,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
+syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shComment,shDblBrace,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
if exists("b:is_kornshell") || exists("b:is_bash")
syn cluster shCaseList add=shForPP,shDblParen
endif
syn cluster shCommandSubList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shComment,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial
" COMBAK: removing shEscape from shDblQuoteList fails ksh04:43 -- Jun 09, 2022: I don't see the problem with ksh04, so am reinstating shEscape
-syn cluster shDblQuoteList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial,shSpecialDQ
+syn cluster shDblQuoteList contains=shArithmetic,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial,shSpecialDQ
syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS
syn cluster shDerefVarList contains=shDerefOffset,shDerefOp,shDerefVarArray,shDerefOpError
-syn cluster shEchoList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDeref,shDerefSimple,shEscape,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
+syn cluster shEchoList contains=shArithmetic,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shDeref,shDerefSimple,shEscape,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest
syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq
@@ -159,24 +160,29 @@ endif
syn cluster shHereBeginList contains=@shCommandSubList
syn cluster shHereList contains=shBeginHere,shHerePayload
syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload
-syn cluster shIdList contains=shArithmetic,shCommandSub,shCommandSubBQ,shWrapLineOperator,shSetOption,shComment,shDeref,shDerefSimple,shHereString,shNumber,shOperator,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
+syn cluster shIdList contains=shArithmetic,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shWrapLineOperator,shSetOption,shComment,shDeref,shDerefSimple,shHereString,shNumber,shOperator,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shIf,shOption,shSet,shTest,shTestOpr,shTouch
if exists("b:is_kornshell") || exists("b:is_bash")
syn cluster shLoopList add=shForPP,shDblParen
endif
-syn cluster shPPSLeftList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
+syn cluster shPPSLeftList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shSubshare,shValsub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
syn cluster shPPSRightList contains=shDeref,shDerefSimple,shEscape,shPosnParm
-syn cluster shSubShList contains=@shCommandSubList,shCommandSubBQ,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
-syn cluster shTestList contains=shArithmetic,shCharClass,shCommandSub,shCommandSubBQ,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shSpecialDQ,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
+syn cluster shSubShList contains=@shCommandSubList,shCommandSubBQ,shSubshare,shValsub,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
+syn cluster shTestList contains=shArithmetic,shCharClass,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shSpecialDQ,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
syn cluster shNoZSList contains=shSpecialNoZS
-syn cluster shForList contains=shTestOpr,shNumber,shDerefSimple,shDeref,shCommandSub,shCommandSubBQ,shArithmetic
+syn cluster shForList contains=shTestOpr,shNumber,shDerefSimple,shDeref,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shArithmetic
" Echo: {{{1
" ====
" This one is needed INSIDE a CommandSub, so that `echo bla` be correct
-syn region shEcho matchgroup=shStatement start="\<echo\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment
-syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment
+if exists("b:is_kornshell")
+ syn region shEcho matchgroup=shStatement start="\<echo\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`}]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 end="\ze[ \t\n;]}" contains=@shEchoList skipwhite nextgroup=shQuickComment
+ syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`}]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 end="\ze[ \t\n;]}" contains=@shEchoList skipwhite nextgroup=shQuickComment
+else
+ syn region shEcho matchgroup=shStatement start="\<echo\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment
+ syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment
+endif
if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
syn region shEchoDeref contained matchgroup=shStatement start="\<echo\>" skip="\\$" matchgroup=shEchoDelim end="$" end="[<>;&|()`}]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment
syn region shEchoDeref contained matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" end="[<>;&|()`}]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment
@@ -336,6 +342,10 @@ syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' nextgroup=shComment
" an Error under /bin/sh. By consensus of vimdev'ers!
if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
syn region shCommandSub matchgroup=shCmdSubRegion start="\$(\ze[^(]" skip='\\\\\|\\.' end=")" contains=@shCommandSubList
+ if exists("b:is_kornshell")
+ syn region shSubshare matchgroup=shCmdSubRegion start="\${\ze[ \t\n<]" skip='\\\\\|\\.' end="\zs[ \t\n;]}" contains=@shCommandSubList
+ syn region shValsub matchgroup=shCmdSubRegion start="\${|" skip='\\\\\|\\.' end="}" contains=@shCommandSubList
+ endif
syn region shArithmetic matchgroup=shArithRegion start="\$((" skip='\\\\\|\\.' end="))" contains=@shArithList
syn region shArithmetic matchgroup=shArithRegion start="\$\[" skip='\\\\\|\\.' end="\]" contains=@shArithList
syn match shSkipInitWS contained "^\s\+"
@@ -343,7 +353,7 @@ if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
elseif !exists("g:sh_no_error")
syn region shCommandSub matchgroup=Error start="\$(" end=")" contains=@shCommandSubList
endif
-syn region shCmdParenRegion matchgroup=shCmdSubRegion start="(\ze[^(]" skip='\\\\\|\\.' end=")" contains=@shCommandSubList
+syn region shCmdParenRegion matchgroup=shCmdSubRegion start="((\@!" skip='\\\\\|\\.' end=")" contains=@shCommandSubList
if exists("b:is_bash")
syn cluster shCommandSubList add=bashSpecialVariables,bashStatement
@@ -491,7 +501,11 @@ if !exists("g:sh_no_error")
syn match shDerefWordError "[^}$[~]" contained
endif
syn match shDerefSimple "\$\%(\h\w*\|\d\)" nextgroup=@shNoZSList
-syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray nextgroup=shSpecialStart
+if exists("b:is_kornshell")
+ syn region shDeref matchgroup=PreProc start="\${\ze[^ \t\n<|]" end="}" contains=@shDerefList,shDerefVarArray nextgroup=shSpecialStart
+else
+ syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray nextgroup=shSpecialStart
+endif
syn match shDerefSimple "\$[-#*@!?]" nextgroup=@shNoZSList
syn match shDerefSimple "\$\$" nextgroup=@shNoZSList
syn match shDerefSimple "\${\d}" nextgroup=@shNoZSList nextgroup=shSpecialStart
@@ -754,6 +768,8 @@ if !exists("skip_sh_syntax_inits")
hi def link shSnglCase Statement
hi def link shCommandSub Special
hi def link shCommandSubBQ shCommandSub
+ hi def link shSubshare shCommandSub
+ hi def link shValsub shCommandSub
hi def link shComment Comment
hi def link shConditional Conditional
hi def link shCtrlSeq Special
diff --git a/runtime/syntax/shared/debversions.vim b/runtime/syntax/shared/debversions.vim
index 6c944cd..4aec246 100644
--- a/runtime/syntax/shared/debversions.vim
+++ b/runtime/syntax/shared/debversions.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Debian version information
" Maintainer: Debian Vim Maintainers
-" Last Change: 2023 Nov 01
+" Last Change: 2024 Jan 25
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/shared/debversions.vim
let s:cpo = &cpo
@@ -11,7 +11,7 @@ let g:debSharedSupportedVersions = [
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy',
\ 'bullseye', 'bookworm', 'trixie', 'forky',
\
- \ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'lunar', 'mantic', 'noble',
+ \ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'mantic', 'noble',
\ 'devel'
\ ]
let g:debSharedUnsupportedVersions = [
@@ -23,7 +23,7 @@ let g:debSharedUnsupportedVersions = [
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
- \ 'disco', 'eoan', 'hirsute', 'impish', 'kinetic', 'groovy'
+ \ 'disco', 'eoan', 'hirsute', 'impish', 'kinetic', 'lunar', 'groovy'
\ ]
let &cpo=s:cpo
diff --git a/runtime/syntax/sm.vim b/runtime/syntax/sm.vim
index a16575c..13a5bf1 100644
--- a/runtime/syntax/sm.vim
+++ b/runtime/syntax/sm.vim
@@ -1,9 +1,11 @@
" Vim syntax file
" Language: sendmail
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E. Campbell
" Last Change: Oct 25, 2016
+" 2024 Feb 19 by Vim Project (announce adoption)
" Version: 9
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SM
+" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SM
if exists("b:current_syntax")
finish
endif
diff --git a/runtime/syntax/spec.vim b/runtime/syntax/spec.vim
index aed04bc..12ce8d5 100644
--- a/runtime/syntax/spec.vim
+++ b/runtime/syntax/spec.vim
@@ -102,7 +102,7 @@ syn case ignore
"%% PreAmble Section %%
"Copyright and Serial were deprecated by License and Epoch
syn region specPreAmbleDeprecated oneline matchgroup=specError start='^\(Copyright\|Serial\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier
-syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Recommends\|Suggests\|Supplements\|Enhances\|Icon\|URL\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier
+syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Recommends\|Suggests\|Supplements\|Enhances\|Icon\|URL\|SourceLicense\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier
"%% Description Section %%
syn region specDescriptionArea matchgroup=specSection start='^%description' end='^%'me=e-1 contains=specDescriptionOpts,specEmail,specURL,specNumber,specMacroIdentifier,specComment
diff --git a/runtime/syntax/swayconfig.vim b/runtime/syntax/swayconfig.vim
index 7b1c889..69fe26d 100644
--- a/runtime/syntax/swayconfig.vim
+++ b/runtime/syntax/swayconfig.vim
@@ -2,8 +2,8 @@
" Language: sway config file
" Original Author: Josef Litos (JosefLitos/i3config.vim)
" Maintainer: James Eapen <james.eapen@vai.org>
-" Version: 1.0.0
-" Last Change: 2023-09-14
+" Version: 1.0.2
+" Last Change: 2023-12-28
" References:
" http://i3wm.org/docs/userguide.html#configuring
@@ -43,6 +43,12 @@ syn region swayConfigExecBlock start=/exec\(_always\)\? {/ end=/^}$/ contains=i3
syn keyword swayConfigFloatingModifierOpts normal inverse contained
syn match i3ConfigKeyword /^floating_modifier [$a-zA-Z0-9+]\+ \(normal\|inverse\)$/ contains=i3ConfigVariable,i3ConfigBindModkey,swayConfigFloatingModifierOpts
+syn keyword swayConfigSmartGapsOpts toggle contained
+syn match i3ConfigKeyword /^smart_gaps toggle$/ contains=i3ConfigSmartGapOpts,i3ConfigBoolean,swayConfigSmartGapsOpts
+
+syn keyword swayConfigFocusFollowsMouseOpts always contained
+syn match i3ConfigKeyword /^focus_follows_mouse always$/ contains=i3ConfigBoolean,swayConfigFocusFollowsMouseOpts
+
syn match i3ConfigKeyword /^hide_edge_borders --i3 \w*$/ contains=i3ConfigEdgeKeyword,i3ConfigShParam
syn keyword i3ConfigBarOpts swaybar_command gaps height pango_markup status_edge_padding status_padding wrap_scroll tray_bindcode tray_bindsym icon_theme contained
@@ -118,7 +124,9 @@ syn region swayConfigOutput start=/^output/ skip=/\\$/ end=/$/ contains=swayCon
syn region swayConfigOutput start=/^output .* {$/ end=/}$/ contains=swayConfigOutputKeyword,swayConfigOutputMode,swayConfigOutputOpts,swayConfigOutputOptVals,i3ConfigVariable,i3ConfigNumber,i3ConfigString,i3ConfigColor,i3ConfigBoolean,swayConfigDeviceOps,i3ConfigParen keepend extend
" Define the highlighting.
+hi def link swayConfigSmartGapsOpts i3ConfigOption
hi def link swayConfigFloatingModifierOpts i3ConfigOption
+hi def link swayConfigFocusFollowsMouseOpts i3ConfigOption
hi def link swayConfigBindKeyword i3ConfigBindKeyword
hi def link swayConfigXOpt i3ConfigOption
hi def link swayConfigInhibitKeyword i3ConfigCommand
diff --git a/runtime/syntax/tags.vim b/runtime/syntax/tags.vim
index 4c06dc1..e87e3fc 100644
--- a/runtime/syntax/tags.vim
+++ b/runtime/syntax/tags.vim
@@ -1,8 +1,10 @@
" Language: tags
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E. Campbell
" Last Change: Oct 26, 2016
+" 2024 Feb 19 by Vim Project (announce adoption)
" Version: 8
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TAGS
+" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TAGS
" quit when a syntax file was already loaded
if exists("b:current_syntax")
diff --git a/runtime/syntax/testdir/README.txt b/runtime/syntax/testdir/README.txt
index 22b6084..9c12648 100644
--- a/runtime/syntax/testdir/README.txt
+++ b/runtime/syntax/testdir/README.txt
@@ -26,14 +26,43 @@ Creating a syntax plugin test
-----------------------------
Create a source file in the language you want to test in the "input"
-directory. Make sure to include some interesting constructs with complicated
-highlighting.
-
-Use the filetype name as the base and a file name extension matching the
-filetype. Let's use Java as an example. The file would then be
+directory. Use the filetype name as the base and a file name extension
+matching the filetype. Let's use Java as an example. The file would then be
"input/java.java".
+Make sure to include some interesting constructs with plenty of complicated
+highlighting. Optionally, pre-configure the testing environment by including
+setup commands at the top of the input file. The format for these lines is:
+
+ VIM_TEST_SETUP {command}
+
+where {command} is any valid Ex command, which extends to the end of the line.
+The first 20 lines of the input file are ALWAYS scanned for setup commands and
+these will be executed before the syntax highlighting is enabled. Typically,
+these lines would be included as comments so as not to introduce any syntax
+errors in the input file but this is not required.
+
+Continuing the Java example:
+
+ // VIM_TEST_SETUP let g:java_space_errors = 1
+ // VIM_TEST_SETUP let g:java_minlines = 5
+ class Test { }
+
+As an alternative, setup commands can be included in an external Vim script
+file in the "input/setup" directory. This script file must have the same base
+name as the input file.
+
+So, the equivalent example configuration using this method would be to create
+an "input/setup/java.vim" script file with the following lines:
+
+ let g:java_space_errors = 1
+ let g:java_minlines = 5
+
+Both inline setup commands and setup scripts may be used at the same time, the
+script file will be sourced before any VIM_TEST_SETUP commands are executed.
+
If there is no further setup required, you can now run the tests:
+
make test
The first time this will fail with an error for a missing screendump. The
@@ -69,8 +98,10 @@ are covered by the test. You can follow these steps:
pass, but if you fixed syntax highlighting that was already visible in the
input file, carefully check that the changes in the screendump are
intentional:
+
let fname = '{name}_99.dump'
call term_dumpdiff('failed/' .. fname, 'dumps/' .. fname)
+
Fix the syntax plugin until the result is good.
2. Edit the input file for your language to add the items you have improved.
(TODO: how to add another screendump?).
@@ -82,6 +113,7 @@ are covered by the test. You can follow these steps:
test" should succeed.
3. Prepare a pull request with the modified files:
- syntax plugin: syntax/{name}.vim
+ - Vim setup file: syntax/testdir/input/setup/{name}.vim (if any)
- test input file: syntax/testdir/input/{name}.{ext}
- test dump files: syntax/testdir/dumps/{name}_99.dump
@@ -91,7 +123,6 @@ test.
-TODO: run test for one specific filetype
-TODO: testing with various option values
+TODO: run test for one specific filetype
TODO: test syncing by jumping around
diff --git a/runtime/syntax/testdir/dumps/c_00.dump b/runtime/syntax/testdir/dumps/c_00.dump
index d32cbd2..ac52727 100644
--- a/runtime/syntax/testdir/dumps/c_00.dump
+++ b/runtime/syntax/testdir/dumps/c_00.dump
@@ -1,4 +1,5 @@
>/+0#0000e05#ffffff0|*| |v|i|:|s|e|t| |t|s|=|8+0#e000002&| +0#0000e05&|s|t|s|=|4+0#e000002&| +0#0000e05&|s|w|=|4+0#e000002&| +0#0000e05&|n|o|e|t|:| +0#0000000&@43
+| +0#0000e05&|*| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|c|_|c|o|m@1|e|n|t|_|s|t|r|i|n|g|s| |=| |1+0#e000002&| +0#0000000&@29
| +0#0000e05&|*| +0#0000000&@72
| +0#0000e05&|*| |V|I|M| |-| |V|i| |I|M|p|r|o|v|e|d| @3|b|y| |B|r|a|m| |M|o@1|l|e|n|a@1|r| +0#0000000&@33
| +0#0000e05&|*| +0#0000000&@72
@@ -16,5 +17,4 @@
@32|/+0#0000e05&@1| |c|y|g|w|i|n|_|c|o|n|v|_|p|a|t|h|(|)| +0#0000000&@21
|#+0#e000e06&| |i|n|c|l|u|d|e| |<+0#e000002&|l|i|m|i|t|s|.|h|>| +0#0000000&@54
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
-@75
-|"|i|n|p|u|t|/|c|.|c|"| |1|2@1|L|,| |3|1|7|4|B| @33|1|,|1| @10|T|o|p|
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/c_01.dump b/runtime/syntax/testdir/dumps/c_01.dump
index cd6ae05..dd69a19 100644
--- a/runtime/syntax/testdir/dumps/c_01.dump
+++ b/runtime/syntax/testdir/dumps/c_01.dump
@@ -1,9 +1,10 @@
-|#+0#e000e06#ffffff0| |i|n|c|l|u|d|e| |<+0#e000002&|c|y|g|w|i|n|/|v|e|r|s|i|o|n|.|h|>| +0#0000000&@46
+|#+0#e000e06#ffffff0|i|f|d|e|f| |_@1|C|Y|G|W|I|N|_@1| +0#0000000&@57
+|#+0#e000e06&| |i|n|c|l|u|d|e| |<+0#e000002&|c|y|g|w|i|n|/|v|e|r|s|i|o|n|.|h|>| +0#0000000&@46
|#+0#e000e06&| |i|n|c|l|u|d|e| |<+0#e000002&|s|y|s|/|c|y|g|w|i|n|.|h|>| +0#0000000&@7|/+0#0000e05&@1| |f|o|r| |c|y|g|w|i|n|_|c|o|n|v|_|t|o|_|p|o|s|i|x|_|p|a|t|h|(|)| |a|n|d|/|o|r| +0#0000000&@1
@32|/+0#0000e05&@1| |c|y|g|w|i|n|_|c|o|n|v|_|p|a|t|h|(|)| +0#0000000&@21
|#+0#e000e06&| |i|n|c|l|u|d|e| |<+0#e000002&|l|i|m|i|t|s|.|h|>| +0#0000000&@54
-|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
-> @74
+>#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
+@75
|#+0#e000e06&|i|f| |d|e|f|i|n|e|d|(|M|S|W|I|N|)| |&@1| |(|!|d|e|f|i|n|e|d|(|F|E|A|T|_|G|U|I|_|M|S|W|I|N|)| ||@1| |d|e|f|i|n|e|d|(|V|I|M|D|L@1|)@1| +0#0000000&@7
|#+0#e000e06&| |i|n|c|l|u|d|e| |"+0#e000002&|i|s|c|y|g|p|t|y|.|h|"| +0#0000000&@52
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
@@ -16,5 +17,4 @@
|#+0#e000e06&|d|e|f|i|n|e| |E|D|I|T|_|T|A|G| @3|3+0#e000002&| +0#e000e06&@6|/+0#0000e05&@1| |t|a|g| |n|a|m|e| |a|r|g|u|m|e|n|t| |g|i|v|e|n|,| |u|s|e| |t|a|g|n|a|m|e| +0#0000000&@7
|#+0#e000e06&|d|e|f|i|n|e| |E|D|I|T|_|Q|F| @4|4+0#e000002&| +0#e000e06&@6|/+0#0000e05&@1| |s|t|a|r|t| |i|n| |q|u|i|c|k|f|i|x| |m|o|d|e| +0#0000000&@21
@75
-|#+0#e000e06&|i|f| |(|d|e|f|i|n|e|d|(|U|N|I|X|)| ||@1| |d|e|f|i|n|e|d|(|V|M|S|)@1| |&@1| |!|d|e|f|i|n|e|d|(|N|O|_|V|I|M|_|M|A|I|N|)| +0#0000000&@14
-@57|1|9|,|0|-|1| @7|1|2|%|
+@57|1|9|,|1| @9|1|2|%|
diff --git a/runtime/syntax/testdir/dumps/c_02.dump b/runtime/syntax/testdir/dumps/c_02.dump
index 82820ff..72ab11f 100644
--- a/runtime/syntax/testdir/dumps/c_02.dump
+++ b/runtime/syntax/testdir/dumps/c_02.dump
@@ -1,9 +1,10 @@
-|s+0#00e0003#ffffff0|t|a|t|i|c| +0#0000000&|i+0#00e0003&|n|t| +0#0000000&|f|i|l|e|_|o|w|n|e|d|(|c+0#00e0003&|h|a|r| +0#0000000&|*|f|n|a|m|e|)|;| @39
+|#+0#e000e06#ffffff0|i|f| |(|d|e|f|i|n|e|d|(|U|N|I|X|)| ||@1| |d|e|f|i|n|e|d|(|V|M|S|)@1| |&@1| |!|d|e|f|i|n|e|d|(|N|O|_|V|I|M|_|M|A|I|N|)| +0#0000000&@14
+|s+0#00e0003&|t|a|t|i|c| +0#0000000&|i+0#00e0003&|n|t| +0#0000000&|f|i|l|e|_|o|w|n|e|d|(|c+0#00e0003&|h|a|r| +0#0000000&|*|f|n|a|m|e|)|;| @39
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|m|a|i|n|e|r@1|(|i+0#00e0003&|n|t|,+0#0000000&| |c|h|a|r|_|u| |*|)|;| @39
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|e|a|r|l|y|_|a|r|g|_|s|c|a|n|(|m|p|a|r|m|_|T| |*|p|a|r|m|p|)|;| @31
-|#+0#e000e06&|i|f|n|d|e|f| |N|O|_|V|I|M|_|M|A|I|N| +0#0000000&@55
->s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|u|s|a|g|e|(|v+0#00e0003&|o|i|d|)+0#0000000&|;| @50
+>#+0#e000e06&|i|f|n|d|e|f| |N|O|_|V|I|M|_|M|A|I|N| +0#0000000&@55
+|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|u|s|a|g|e|(|v+0#00e0003&|o|i|d|)+0#0000000&|;| @50
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|p|a|r|s|e|_|c|o|m@1|a|n|d|_|n|a|m|e|(|m|p|a|r|m|_|T| |*|p|a|r|m|p|)|;| @27
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|c|o|m@1|a|n|d|_|l|i|n|e|_|s|c|a|n|(|m|p|a|r|m|_|T| |*|p|a|r|m|p|)|;| @28
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|c|h|e|c|k|_|t@1|y|(|m|p|a|r|m|_|T| |*|p|a|r|m|p|)|;| @36
@@ -16,5 +17,4 @@
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|m|a|i|n|_|s|t|a|r|t|_|g|u|i|(|v+0#00e0003&|o|i|d|)+0#0000000&|;| @41
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|c|h|e|c|k|_|s|w|a|p|_|e|x|i|s|t|s|_|a|c|t|i|o|n|(|v+0#00e0003&|o|i|d|)+0#0000000&|;| @31
|#+0#e000e06&| |i|f|d|e|f| |F|E|A|T|_|E|V|A|L| +0#0000000&@57
-|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|s|e|t|_|p|r|o|g|p|a|t|h|(|c|h|a|r|_|u| |*|a|r|g|v|0|)|;| @34
-@57|3|7|,|1| @9|3|0|%|
+@57|3|7|,|1| @9|2|9|%|
diff --git a/runtime/syntax/testdir/dumps/c_03.dump b/runtime/syntax/testdir/dumps/c_03.dump
index 5f0e8d8..17c6f3b 100644
--- a/runtime/syntax/testdir/dumps/c_03.dump
+++ b/runtime/syntax/testdir/dumps/c_03.dump
@@ -1,9 +1,10 @@
-|s+0#00e0003#ffffff0|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|s|e|t|_|p|r|o|g|p|a|t|h|(|c|h|a|r|_|u| |*|a|r|g|v|0|)|;| @34
+|#+0#e000e06#ffffff0| |i|f|d|e|f| |F|E|A|T|_|E|V|A|L| +0#0000000&@57
+|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|s|e|t|_|p|r|o|g|p|a|t|h|(|c|h|a|r|_|u| |*|a|r|g|v|0|)|;| @34
|#+0#e000e06&| |e|n|d|i|f| +0#0000000&@67
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
@75
-@75
->/+0#0000e05&|*| +0#0000000&@72
+> @74
+|/+0#0000e05&|*| +0#0000000&@72
| +0#0000e05&|*| |D|i|f@1|e|r|e|n|t| |t|y|p|e|s| |o|f| |e|r@1|o|r| |m|e|s@1|a|g|e|s|.| +0#0000000&@37
| +0#0000e05&|*|/| +0#0000000&@71
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|c+0#00e0003&|h|a|r| +0#0000000&|*|(|m|a|i|n|_|e|r@1|o|r|s|[|]|)| |=| @44
@@ -16,5 +17,4 @@
|#+0#e000e06&|d|e|f|i|n|e| |M|E|_|A|R|G|_|M|I|S@1|I|N|G| @9|2+0#e000002&| +0#0000000&@41
@4|N|_|(|"+0#e000002&|G|a|r|b|a|g|e| |a|f|t|e|r| |o|p|t|i|o|n| |a|r|g|u|m|e|n|t|"|)+0#0000000&|,| @34
|#+0#e000e06&|d|e|f|i|n|e| |M|E|_|G|A|R|B|A|G|E| @13|3+0#e000002&| +0#0000000&@41
-|@+0#4040ff13&@2| @71
-| +0#0000000&@56|5@1|,|1| @9|4|7|%|
+@57|5@1|,|0|-|1| @7|4|7|%|
diff --git a/runtime/syntax/testdir/dumps/c_04.dump b/runtime/syntax/testdir/dumps/c_04.dump
index 9864b88..03804a5 100644
--- a/runtime/syntax/testdir/dumps/c_04.dump
+++ b/runtime/syntax/testdir/dumps/c_04.dump
@@ -3,8 +3,8 @@
|#+0#e000e06&|d|e|f|i|n|e| |M|E|_|E|X|T|R|A|_|C|M|D| @11|4+0#e000002&| +0#0000000&@41
@4|N|_|(|"+0#e000002&|I|n|v|a|l|i|d| |a|r|g|u|m|e|n|t| |f|o|r|"|)+0#0000000&|,| @43
|#+0#e000e06&|d|e|f|i|n|e| |M|E|_|I|N|V|A|L|I|D|_|A|R|G| @9|5+0#e000002&| +0#0000000&@41
-|}|;| @72
-> @74
+>}|;| @72
+@75
|#+0#e000e06&|i|f|n|d|e|f| |P|R|O|T|O| @10|/+0#0000e05&@1| |d|o|n|'|t| |w|a|n|t| |a| |p|r|o|t|o|t|y|p|e| |f|o|r| |m|a|i|n|(|)| +0#0000000&@14
@75
|/+0#0000e05&@1| |V|a|r|i|o|u|s| |p|a|r|a|m|e|t|e|r|s| |p|a|s@1|e|d| |b|e|t|w|e@1|n| |m|a|i|n|(|)| |a|n|d| |o|t|h|e|r| |f|u|n|c|t|i|o|n|s|.| +0#0000000&@10
@@ -17,4 +17,4 @@
|#+0#e000e06&|i|f|n|d|e|f| |N|O|_|V|I|M|_|M|A|I|N| @4|/+0#0000e05&@1| |s|k|i|p| |t|h|i|s| |f|o|r| |u|n|i|t@1|e|s|t|s| +0#0000000&@24
@75
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|c|h|a|r|_|u| |*|s|t|a|r|t|_|d|i|r| |=| |N+0#e000002&|U|L@1|;+0#0000000&| @7|/+0#0000e05&@1| |c|u|r@1|e|n|t| |w|o|r|k|i|n|g| |d|i|r| |o|n| |s|t|a|r|t|u|p| +0#0000000&@1
-@57|7|3|,|0|-|1| @7|6|4|%|
+@57|7|3|,|1| @9|6|4|%|
diff --git a/runtime/syntax/testdir/dumps/c_05.dump b/runtime/syntax/testdir/dumps/c_05.dump
index 5b977ea..6871cd0 100644
--- a/runtime/syntax/testdir/dumps/c_05.dump
+++ b/runtime/syntax/testdir/dumps/c_05.dump
@@ -1,9 +1,10 @@
-| +0&#ffffff0@74
+|s+0#00e0003#ffffff0|t|a|t|i|c| +0#0000000&|c|h|a|r|_|u| |*|s|t|a|r|t|_|d|i|r| |=| |N+0#e000002&|U|L@1|;+0#0000000&| @7|/+0#0000e05&@1| |c|u|r@1|e|n|t| |w|o|r|k|i|n|g| |d|i|r| |o|n| |s|t|a|r|t|u|p| +0#0000000&@1
+@75
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|i+0#00e0003&|n|t| +0#0000000&|h|a|s|_|d|a|s|h|_|c|_|a|r|g| |=| |F|A|L|S|E|;| @40
@75
|#+0#e000e06&| |i|f|d|e|f| |V|I|M|D|L@1| +0#0000000&@60
-|_@1|d|e|c|l|s|p|e|c|(|d|l@1|e|x|p|o|r|t|)| @53
->#+0#e000e06&| |e|n|d|i|f| +0#0000000&@67
+>_@1|d|e|c|l|s|p|e|c|(|d|l@1|e|x|p|o|r|t|)| @53
+|#+0#e000e06&| |e|n|d|i|f| +0#0000000&@67
@4|i+0#00e0003&|n|t| +0#0000000&@67
|#+0#e000e06&| |i|f|d|e|f| |M|S|W|I|N| +0#0000000&@61
|V|i|m|M|a|i|n| @67
@@ -16,5 +17,4 @@
@4|i+0#00e0003&|n|t| +0#0000000&@8|i|;| @56
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
@75
-@4|/+0#0000e05&|*| +0#0000000&@68
-@57|9|1|,|1| @9|8|2|%|
+@57|9|1|,|1| @9|8|1|%|
diff --git a/runtime/syntax/testdir/dumps/c_06.dump b/runtime/syntax/testdir/dumps/c_06.dump
index fd7fe90..55b9f38 100644
--- a/runtime/syntax/testdir/dumps/c_06.dump
+++ b/runtime/syntax/testdir/dumps/c_06.dump
@@ -1,9 +1,10 @@
-| +0&#ffffff0@3|/+0#0000e05&|*| +0#0000000&@68
+| +0&#ffffff0@74
+@4|/+0#0000e05&|*| +0#0000000&@68
| +0#0000e05&@4|*| |D|o| |a|n|y| |s|y|s|t|e|m|-|s|p|e|c|i|f|i|c| |i|n|i|t|i|a|l|i|s|a|t|i|o|n|s|.| @1|T|h|e|s|e| |c|a|n| |N|O|T| |u|s|e| |I|O|b|u|f@1| |o|r
| @4|*| |N|a|m|e|B|u|f@1|.| @1|T|h|u|s| |e|m|s|g|2|(|)| |c|a|n@1|o|t| |b|e| |c|a|l@1|e|d|!| +0#0000000&@26
| +0#0000e05&@4|*|/| +0#0000000&@67
-@4|m|c|h|_|e|a|r|l|y|_|i|n|i|t|(|)|;| @53
-> @74
+@4>m|c|h|_|e|a|r|l|y|_|i|n|i|t|(|)|;| @53
+@75
@4|/+0#0000e05&@1| |S|o|u|r|c|e| |s|t|a|r|t|u|p| |s|c|r|i|p|t|s|.| +0#0000000&@44
@4|s|o|u|r|c|e|_|s|t|a|r|t|u|p|_|s|c|r|i|p|t|s|(|&|p|a|r|a|m|s|)|;| @38
@75
@@ -16,5 +17,4 @@
|#+0#e000e06&|e|l|s|e| +0#0000000&@69
@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|v|i|m|_|m|a|i|n|2|(|)|;| @51
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
-|}| @73
-@57|1|0|9|,|0|-|1| @6|B|o|t|
+@57|1|0|9|,|5| @8|9@1|%|
diff --git a/runtime/syntax/testdir/dumps/c_99.dump b/runtime/syntax/testdir/dumps/c_99.dump
index 14b51cd..1af9a49 100644
--- a/runtime/syntax/testdir/dumps/c_99.dump
+++ b/runtime/syntax/testdir/dumps/c_99.dump
@@ -17,4 +17,4 @@
@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|v|i|m|_|m|a|i|n|2|(|)|;| @51
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
>}| @73
-@57|1|2@1|,|1| @8|B|o|t|
+@57|1|2|3|,|1| @8|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/java_comments_00.dump b/runtime/syntax/testdir/dumps/java_comments_00.dump
new file mode 100644
index 0000000..bc1f359
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_comments_00.dump
@@ -0,0 +1,20 @@
+>/+0#0000e05#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |u|n|l|e|t|!| |g+0&#5fd7ff255|:+0&#ffffff0|j|a|v|a|_|i|g|n|o|r|e|_|j+0&#ffd7d7255|a|v|a|d|o|c| +0&#ffffff0|g|:|j|a|v|a|_|n|o|_|t|r|a|i|l|_|s|p|a|c|e|_|e|r@1|o|r| +0#ffffff16#ff404010
+|/+0#0000e05#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |u|n|l|e|t|!| |g+0&#5fd7ff255|:+0&#ffffff0|j|a|v|a|_|n|o|_|t|a|b|_|s|p|a|c|e|_|e|r@1|o|r| +0#ffffff16#ff404010@1| +0#0000000#ffffff0@22
+|/+0#0000e05&@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |[|g|:|j|a|v|a|_|s|p|a|c|e|_|e|r@1|o|r|s|,|g|:|j|a|v|a|_|c|o|m@1|e|n|t|_|s|t|r|i|n|g|s|]| |=| |[|1+0#e000002&|,+0#0000e05&|1+0#e000002&|]+0#0000e05&| +0#0000000&
+|/+0#0000e05&@1| +0#ffffff16#ff404010| +0#0000e05#ffffff0|V|I|M|_|T|E|S|T|_|S|E|T|U|P| |s+0&#ffd7d7255|e|t|l|o|c|a|l| +0&#ffffff0|s|p|e|l@1| +0#0000000&@41
+|c+0#00e0003&|l|a|s@1| +0#0000000&|C|o|m@1|e|n|t|s|T|e|s|t|s| @55
+|{| @2|/+0#0000e05&|*| +0#ffffff16#ff404010| +0#0000e05#ffffff0|T|R|A|I|L|I|N|G| |B|L|A|N|K|S| |A|N|D| |M+0&#ffd7d7255|E|S@1|P|I|L@1|I|N|G|S| +0&#ffffff0|A|R|E| |S|I|G|N|I|F|I|C|A|N|T|!| |*|/| +0#ffffff16#ff404010@3| +0#0000000#ffffff0@10
+@4|/+0#0000e05&|*@1| +0#ffffff16#ff404010| +0#0000000#ffffff0@66
+| +0#0000e05&@4|*| +0#e000e06&|T|h|e| |m|e|t|h|o|d| |{|@|c|o|d|e| |m|a|i|n|}| |m|u|s|t| |b|e| |d|e|c|l|a|r|e|d| |{|@|c|o|d|e| |p|u|b|l|i|c|}|,| |{|@|c|o|d|e| +0#0000000&@4
+| +0#e000e06&@4|*| |s|t|a|t|i|c|}|,| |a|n|d| |{|@|c|o|d|e| |v|o|i|d|}|.| +0#0000e05&@1|I|t| |m|u|s|t| |s|p|e|c|i|f|y| |a| |f|o|r|m|a|l| |p|a|r|a|m|e|t|e|r| +0#0000000&@5
+| +0#0000e05&@4|*| |w|h|o|s|e| |d|e|c|l|a|r|e|d| |t|y|p|e| |i|s| |a|r@1|a|y| |o|f| |{+0#e000e06&|@|l|i|n|k| |S|t|r|i|n|g|}|.+0#0000e05&| @1|T|h|e|r|e|f|o|r|e|,| +0#0000000&@8
+| +0#0000e05&@4|*| |e|i|t|h|e|r| |o|f| |t|h|e| |f|o|l@1|o|w|i|n|g| |d|e|c|l|a|r|a|t|i|o|n|s| |i|s| |a|c@1|e|p|t|a|b|l|e|:| +0#0000000&@16
+| +0#0000e05&@4|*| +0#ffffff16#ff404010| +0#0000e05#ffffff0|{+0#e000e06&|@|s|n|i|p@1|e|t| |l+0#00e0003&|a|n|g|=+0#e000e06&|"+0#e000002&|j|a|v|a|"|:+0#e000e06&| +0#0000000&@44
+| +0#e000e06&@4|*| |/@1| |@+0#0000000&|h|i|g|h|l|i|g|h|t| +0#e000e06&|s+0#00e0003&|u|b|s|t|r|i|n|g|=+0#e000e06&|"+0#e000002&|m|a|i|n|"| +0#e000e06&|t+0#00e0003&|y|p|e|=+0#e000e06&|"+0#e000002&|i|t|a|l|i|c|"|:+0#e000e06&| +0#0000000&@22
+| +0#e000e06&@4|*| |p|u|b|l|i|c| |s|t|a|t|i|c| |v|o|i|d| |m|a|i|n|(|S|t|r|i|n|g|[|]| |a|r|g|s|)| |{| |}| +0#0000000&@25
+| +0#e000e06&@4|*| |}|<+0#00e0e07&|b+0#af5f00255&|r| +0#00e0e07&|/|>|<|p+0#af5f00255&|r|e| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|s|n|i|p@1|e|t|"|>+0#00e0e07&| +0#0000000&@39
+| +0#0000e05&@4|*|{+0#e000e06&|@|c|o|d|e| |p|u|b|l|i|c| |s|t|a|t|i|c| |v|o|i|d| |m|a|i|n|(|S|t|r|i|n|g|.@2| |a|r|g|s|)| |{| |}@1|<+0#00e0e07&|/|p+0#af5f00255&|r|e|>+0#00e0e07&| +0#0000000&@11
+| +0#0000e05&@4|*| +0#0000000&@68
+| +0#0000e05&@4|*| |@+0#e000e06&|p|a|r|a|m| +0#00e0e07&|a|r|g|s| +0#0000e05&|o|p|t|i|o|n|a|l| |c+0&#ffd7d7255|o|m@1|a|n|d|e|-+0&#ffffff0|l|i|n|e| |a|r|g|u|m|e|n|t|s| +0#ffffff16#ff404010| +0#0000000#ffffff0@22
+| +0#0000e05&@4|*| |@|j+0&#ffd7d7255|l|s| +0&#ffffff0|1|2|.|1|.|4| |I|n|v|o|k|e| |{+0#e000e06&|@|c|o|d|e| |T|e|s|t|.|m|a|i|n|}| +0#0000000&@31
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/java_comments_01.dump b/runtime/syntax/testdir/dumps/java_comments_01.dump
new file mode 100644
index 0000000..9f92f83
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_comments_01.dump
@@ -0,0 +1,20 @@
+| +0#e000e06#ffffff0@4|*| |p|u|b|l|i|c| |s|t|a|t|i|c| |v|o|i|d| |m|a|i|n|(|S|t|r|i|n|g|[|]| |a|r|g|s|)| |{| |}| +0#0000000&@25
+| +0#e000e06&@4|*| |}|<+0#00e0e07&|b+0#af5f00255&|r| +0#00e0e07&|/|>|<|p+0#af5f00255&|r|e| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|s|n|i|p@1|e|t|"|>+0#00e0e07&| +0#0000000&@39
+| +0#0000e05&@4|*|{+0#e000e06&|@|c|o|d|e| |p|u|b|l|i|c| |s|t|a|t|i|c| |v|o|i|d| |m|a|i|n|(|S|t|r|i|n|g|.@2| |a|r|g|s|)| |{| |}@1|<+0#00e0e07&|/|p+0#af5f00255&|r|e|>+0#00e0e07&| +0#0000000&@11
+| +0#0000e05&@4|*| +0#0000000&@68
+| +0#0000e05&@4|*| |@+0#e000e06&|p|a|r|a|m| +0#00e0e07&|a|r|g|s| +0#0000e05&|o|p|t|i|o|n|a|l| |c+0&#ffd7d7255|o|m@1|a|n|d|e|-+0&#ffffff0|l|i|n|e| |a|r|g|u|m|e|n|t|s| +0#ffffff16#ff404010| +0#0000000#ffffff0@22
+| +0#0000e05&@4>*| |@|j+0&#ffd7d7255|l|s| +0&#ffffff0|1|2|.|1|.|4| |I|n|v|o|k|e| |{+0#e000e06&|@|c|o|d|e| |T|e|s|t|.|m|a|i|n|}| +0#0000000&@31
+| +0#0000e05&@4|*|/| +0#0000000&@67
+@4|/+0#0000e05&@1| |@+0#0000000&|s|t|a|r|t| +0#0000e05&|r+0#00e0003&|e|g|i|o|n| +0#0000e05&|=| |m+0#e000002&|a|i|n| +0#0000000&@47
+@4|/+0#0000e05&@1| |@+0#0000000&|l|i|n|k| +0#0000e05&|s+0#00e0003&|u|b|s|t|r|i|n|g| +0#0000e05&|=| |'+0#e000002&|S|t|r|i|n|g|'| +0#0000e05&|t+0#00e0003&|a|r|g|e|t| +0#0000e05&|=| |'+0#e000002&|j|a|v|a|.|l|a|n|g|.|S|t|r|i|n|g|'| +0#0000e05&|:| +0#0000000&@11
+@4|p+0#00e0003&|u|b|l|i|c| +0#0000000&|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|m|a|i|n|(|S|t|r|i|n|g|[|]| |a|r|g|s|)| |{| |}| @28
+@4|/+0#0000e05&@1| |@+0#0000000&|e|n|d| @63
+|}| @73
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|9|,|3|-|6| @7|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/java_comments_99.dump b/runtime/syntax/testdir/dumps/java_comments_99.dump
new file mode 100644
index 0000000..024dc48
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_comments_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@3|/+0#0000e05&|*@1| +0#ffffff16#ff404010| +0#0000000#ffffff0@66
+| +0#0000e05&@4|*| +0#e000e06&|T|h|e| |m|e|t|h|o|d| |{|@|c|o|d|e| |m|a|i|n|}| |m|u|s|t| |b|e| |d|e|c|l|a|r|e|d| |{|@|c|o|d|e| |p|u|b|l|i|c|}|,| |{|@|c|o|d|e| +0#0000000&@4
+| +0#e000e06&@4|*| |s|t|a|t|i|c|}|,| |a|n|d| |{|@|c|o|d|e| |v|o|i|d|}|.| +0#0000e05&@1|I|t| |m|u|s|t| |s|p|e|c|i|f|y| |a| |f|o|r|m|a|l| |p|a|r|a|m|e|t|e|r| +0#0000000&@5
+| +0#0000e05&@4|*| |w|h|o|s|e| |d|e|c|l|a|r|e|d| |t|y|p|e| |i|s| |a|r@1|a|y| |o|f| |{+0#e000e06&|@|l|i|n|k| |S|t|r|i|n|g|}|.+0#0000e05&| @1|T|h|e|r|e|f|o|r|e|,| +0#0000000&@8
+| +0#0000e05&@4|*| |e|i|t|h|e|r| |o|f| |t|h|e| |f|o|l@1|o|w|i|n|g| |d|e|c|l|a|r|a|t|i|o|n|s| |i|s| |a|c@1|e|p|t|a|b|l|e|:| +0#0000000&@16
+| +0#0000e05&@4|*| +0#ffffff16#ff404010| +0#0000e05#ffffff0|{+0#e000e06&|@|s|n|i|p@1|e|t| |l+0#00e0003&|a|n|g|=+0#e000e06&|"+0#e000002&|j|a|v|a|"|:+0#e000e06&| +0#0000000&@44
+| +0#e000e06&@4|*| |/@1| |@+0#0000000&|h|i|g|h|l|i|g|h|t| +0#e000e06&|s+0#00e0003&|u|b|s|t|r|i|n|g|=+0#e000e06&|"+0#e000002&|m|a|i|n|"| +0#e000e06&|t+0#00e0003&|y|p|e|=+0#e000e06&|"+0#e000002&|i|t|a|l|i|c|"|:+0#e000e06&| +0#0000000&@22
+| +0#e000e06&@4|*| |p|u|b|l|i|c| |s|t|a|t|i|c| |v|o|i|d| |m|a|i|n|(|S|t|r|i|n|g|[|]| |a|r|g|s|)| |{| |}| +0#0000000&@25
+| +0#e000e06&@4|*| |}|<+0#00e0e07&|b+0#af5f00255&|r| +0#00e0e07&|/|>|<|p+0#af5f00255&|r|e| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|s|n|i|p@1|e|t|"|>+0#00e0e07&| +0#0000000&@39
+| +0#0000e05&@4|*|{+0#e000e06&|@|c|o|d|e| |p|u|b|l|i|c| |s|t|a|t|i|c| |v|o|i|d| |m|a|i|n|(|S|t|r|i|n|g|.@2| |a|r|g|s|)| |{| |}@1|<+0#00e0e07&|/|p+0#af5f00255&|r|e|>+0#00e0e07&| +0#0000000&@11
+| +0#0000e05&@4|*| +0#0000000&@68
+| +0#0000e05&@4|*| |@+0#e000e06&|p|a|r|a|m| +0#00e0e07&|a|r|g|s| +0#0000e05&|o|p|t|i|o|n|a|l| |c+0&#ffd7d7255|o|m@1|a|n|d|e|-+0&#ffffff0|l|i|n|e| |a|r|g|u|m|e|n|t|s| +0#ffffff16#ff404010| +0#0000000#ffffff0@22
+| +0#0000e05&@4|*| |@|j+0&#ffd7d7255|l|s| +0&#ffffff0|1|2|.|1|.|4| |I|n|v|o|k|e| |{+0#e000e06&|@|c|o|d|e| |T|e|s|t|.|m|a|i|n|}| +0#0000000&@31
+| +0#0000e05&@4|*|/| +0#0000000&@67
+@4|/+0#0000e05&@1| |@+0#0000000&|s|t|a|r|t| +0#0000e05&|r+0#00e0003&|e|g|i|o|n| +0#0000e05&|=| |m+0#e000002&|a|i|n| +0#0000000&@47
+@4|/+0#0000e05&@1| |@+0#0000000&|l|i|n|k| +0#0000e05&|s+0#00e0003&|u|b|s|t|r|i|n|g| +0#0000e05&|=| |'+0#e000002&|S|t|r|i|n|g|'| +0#0000e05&|t+0#00e0003&|a|r|g|e|t| +0#0000e05&|=| |'+0#e000002&|j|a|v|a|.|l|a|n|g|.|S|t|r|i|n|g|'| +0#0000e05&|:| +0#0000000&@11
+@4|p+0#00e0003&|u|b|l|i|c| +0#0000000&|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|m|a|i|n|(|S|t|r|i|n|g|[|]| |a|r|g|s|)| |{| |}| @28
+@4|/+0#0000e05&@1| |@+0#0000000&|e|n|d| @63
+>}| @73
+@57|2|5|,|1| @9|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/java_escapes_00.dump b/runtime/syntax/testdir/dumps/java_escapes_00.dump
new file mode 100644
index 0000000..d47fb4c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_escapes_00.dump
@@ -0,0 +1,20 @@
+>c+0#00e0003#ffffff0|l|a|s@1| +0#0000000&|E|s|c|a|p|e|s|T|e|s|t|s| @56
+|{| @2|/+0#0000e05&@1| |j|a|v|a|p| |-|c|o|n|s|t|a|n|t|s| |E|s|c|a|p|e|s|T|e|s|t|s|.|c|l|a|s@1| +0#0000000&@32
+@4|/+0#0000e05&@1| |s|t|a|t|i|c| |f|i|n|a|l| |S|t|r|i|n|g| |h|e|l@1|o| |=| |"|h|e|l@1|o|"|;| +0#0000000&@31
+@4|\+0#e000e06&|u|0@1|7|3|\|u|0@1|7|4|\|u|0@1|6|1|\|u|0@1|7|4|\|u|0@1|6|9|\|u|0@1|6|3| +0#0000000&@34
+@4|\+0#e000e06&|u|0@1|6@1|\|u|0@1|6|9|\|u|0@1|6|e|\|u|0@1|6|1|\|u|0@1|6|c| +0#0000000&@40
+@4|\+0#e000e06&|u|0@1|5|3|\|u|0@1|7|4|\|u|0@1|7|2|\|u|0@1|6|9|\|u|0@1|6|e|\|u|0@1|6|7| +0#0000000&@34
+@4|\+0#e000e06&|u|0@1|6|8|\|u|0@1|6|5|\|u|0@1|6|c|\|u|0@1|6|c|\|u|0@1|6|f| +0#0000000&@40
+@4|\+0#e000e06&|u|0@1|3|d| +0#0000000&@64
+@4|\+0#e000e06&|u|0@1|2@1|\|u|0@1|6|8|\|u|0@1|6|5|\|u|0@1|6|c|\|u|0@1|6|c|\|u|0@1|6|f|\|u|0@1|2@1| +0#0000000&@28
+@4|\+0#e000e06&|u|0@1|3|b| +0#0000000&@64
+@75
+@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|{| @62
+@8|c+0#00e0003&|h|a|r| +0#0000000&|e@1|[|]| |=| |{| @53
+@12|'+0#e000002&|\+0#e000e06&|b|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|s|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|t|'+0#e000002&|,+0#0000000&| @45
+@12|'+0#e000002&|\+0#e000e06&|n|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|f|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|r|'+0#e000002&|,+0#0000000&| @45
+@12|'+0#e000002&|\+0#e000e06&|"|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|'|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&@1|'+0#e000002&|,+0#0000000&| @45
+@8|}|;| @64
+@75
+@8|S|y|s|t|e|m|.|o|u|t|.|p|r|i|n|t|l|n|(|n+0#af5f00255&|e|w| +0#0000000&|S|t|r|i|n|g|[|]| |{| @33
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/java_escapes_01.dump b/runtime/syntax/testdir/dumps/java_escapes_01.dump
new file mode 100644
index 0000000..e5080e9
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_escapes_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@11|'+0#e000002&|\+0#e000e06&|b|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|s|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|t|'+0#e000002&|,+0#0000000&| @45
+@12|'+0#e000002&|\+0#e000e06&|n|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|f|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|r|'+0#e000002&|,+0#0000000&| @45
+@12|'+0#e000002&|\+0#e000e06&|"|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|'|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&@1|'+0#e000002&|,+0#0000000&| @45
+@8|}|;| @64
+@75
+@8>S|y|s|t|e|m|.|o|u|t|.|p|r|i|n|t|l|n|(|n+0#af5f00255&|e|w| +0#0000000&|S|t|r|i|n|g|[|]| |{| @33
+@12|"+0#e000002&|\+0#e000e06&|b|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|s|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|t|"+0#e000002&|,+0#0000000&| @45
+@12|"+0#e000002&|\+0#e000e06&|n|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|f|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|r|"+0#e000002&|,+0#0000000&| @45
+@12|"+0#e000002&|\+0#e000e06&|"|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|'|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&@1|"+0#e000002&|,+0#0000000&| @45
+@8|}|)|;| @63
+@75
+@8|c+0#00e0003&|h|a|r| +0#0000000&|o@1|[|]| |=| |{| @53
+@12|'+0#e000002&|\+0#e000e06&|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|7|'+0#e000002&|,+0#0000000&| @15
+@75
+@8|'+0#e000002&|\+0#e000e06&|0@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|7|'+0#e000002&|,+0#0000000&| @11
+@75
+@4|'+0#e000002&|\+0#e000e06&|0@2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0@1|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0@1|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0@1|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0@1|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0@1|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0@1|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0@1|7|'+0#e000002&|,+0#0000000&| @7
+@75
+@8|'+0#e000002&|\+0#e000e06&|1|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|7|'+0#e000002&|,+0#0000000&| @11
+@57|1|9|,|3|-|9| @7|1|2|%|
diff --git a/runtime/syntax/testdir/dumps/java_escapes_02.dump b/runtime/syntax/testdir/dumps/java_escapes_02.dump
new file mode 100644
index 0000000..da8b1a9
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_escapes_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|'+0#e000002&|\+0#e000e06&|1|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|7|'+0#e000002&|,+0#0000000&| @11
+@8|'+0#e000002&|\+0#e000e06&|2|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|7|'+0#e000002&|,+0#0000000&| @11
+@8|'+0#e000002&|\+0#e000e06&|3|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|7|'+0#e000002&|,+0#0000000&| @11
+@8|'+0#e000002&|\+0#e000e06&|4|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|4|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|4|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|4|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|4@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|4|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|4|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|4|7|'+0#e000002&|,+0#0000000&| @11
+@8|'+0#e000002&|\+0#e000e06&|5|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|5|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|5|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|5|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|5|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|5@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|5|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|5|7|'+0#e000002&|,+0#0000000&| @11
+@8>'+0#e000002&|\+0#e000e06&|6|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|6|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|6|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|6|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|6|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|6|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|6@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|6|7|'+0#e000002&|,+0#0000000&| @11
+@8|'+0#e000002&|\+0#e000e06&|7|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|7|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|7|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|7|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|7|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|7|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|7|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|7@1|'+0#e000002&|,+0#0000000&| @11
+@75
+@4|'+0#e000002&|\+0#e000e06&|0|1|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|1@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|1|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|1|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|1|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|1|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|1|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|1|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|0|2|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|2|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|2@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|2|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|2|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|2|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|2|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|2|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|0|3|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|3|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|3|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|3@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|3|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|3|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|3|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|3|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|0|4|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|4|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|4|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|4|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|4@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|4|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|4|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|4|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|0|5|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|5|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|5|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|5|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|5|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|5@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|5|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|5|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|0|6|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|6|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|6|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|6|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|6|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|6|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|6@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|6|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|0|7|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|7|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|7|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|7|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|7|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|7|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|7|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|7@1|'+0#e000002&|,+0#0000000&| @7
+@75
+@4|'+0#e000002&|\+0#e000e06&|1|0@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|0|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|0|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|0|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|0|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|0|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|0|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|0|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|1@1|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1@2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1@1|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1@1|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1@1|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1@1|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1@1|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1@1|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|1|2|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2|7|'+0#e000002&|,+0#0000000&| @7
+@57|3|7|,|3|-|9| @7|2|9|%|
diff --git a/runtime/syntax/testdir/dumps/java_escapes_03.dump b/runtime/syntax/testdir/dumps/java_escapes_03.dump
new file mode 100644
index 0000000..920ab1c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_escapes_03.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@3|'+0#e000002&|\+0#e000e06&|1|2|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|2|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|1|3|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|3|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|3|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|3@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|3|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|3|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|3|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|3|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|1|4|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|4|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|4|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|4|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|4@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|4|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|4|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|4|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|1|5|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|5|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|5|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|5|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|5|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|5@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|5|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|5|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|1|6|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|6|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|6|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|6|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|6|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|6|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|6@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|6|7|'+0#e000002&|,+0#0000000&| @7
+@4>'+0#e000002&|\+0#e000e06&|1|7|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|7|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|7|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|7|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|7|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|7|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|7|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|1|7@1|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|2|0@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|0|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|0|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|0|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|0|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|0|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|0|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|0|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|2|1|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|1@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|1|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|1|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|1|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|1|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|1|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|1|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|2@1|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2@1|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2@2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2@1|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2@1|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2@1|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2@1|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2@1|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|2|3|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|3|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|3|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|3@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|3|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|3|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|3|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|3|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|2|4|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|4|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|4|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|4|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|4@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|4|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|4|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|4|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|2|5|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|5|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|5|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|5|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|5|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|5@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|5|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|5|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|2|6|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|6|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|6|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|6|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|6|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|6|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|6@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|6|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|2|7|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|7|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|7|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|7|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|7|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|7|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|7|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|2|7@1|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|3|0@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|0|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|0|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|0|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|0|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|0|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|0|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|0|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|3|1|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|1@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|1|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|1|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|1|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|1|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|1|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|1|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|3|2|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|2|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|2@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|2|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|2|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|2|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|2|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|2|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|3@1|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3@1|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3@1|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3@2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3@1|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3@1|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3@1|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3@1|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|3|4|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|4|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|4|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|4|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|4@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|4|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|4|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|4|7|'+0#e000002&|,+0#0000000&| @7
+@57|5@1|,|2|-|5| @7|4|7|%|
diff --git a/runtime/syntax/testdir/dumps/java_escapes_04.dump b/runtime/syntax/testdir/dumps/java_escapes_04.dump
new file mode 100644
index 0000000..79f11f1
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_escapes_04.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@3|'+0#e000002&|\+0#e000e06&|3|4|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|4|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|4|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|4|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|4@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|4|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|4|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|4|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|3|5|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|5|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|5|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|5|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|5|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|5@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|5|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|5|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|3|6|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|6|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|6|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|6|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|6|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|6|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|6@1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|6|7|'+0#e000002&|,+0#0000000&| @7
+@4|'+0#e000002&|\+0#e000e06&|3|7|0|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|7|1|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|7|2|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|7|3|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|7|4|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|7|5|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|7|6|'+0#e000002&|,+0#0000000&| |'+0#e000002&|\+0#e000e06&|3|7@1|'+0#e000002&|,+0#0000000&| @7
+@8|}|;| @64
+> @74
+@8|S|y|s|t|e|m|.|o|u|t|.|p|r|i|n|t|l|n|(|n+0#af5f00255&|e|w| +0#0000000&|S|t|r|i|n|g|[|]| |{| @33
+@12|"+0#e000002&|\+0#e000e06&|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|7|"+0#e000002&|,+0#0000000&| @15
+@75
+@8|"+0#e000002&|\+0#e000e06&|0@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|7|"+0#e000002&|,+0#0000000&| @11
+@75
+@4|"+0#e000002&|\+0#e000e06&|0@2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0@1|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0@1|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0@1|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0@1|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0@1|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0@1|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0@1|7|"+0#e000002&|,+0#0000000&| @7
+@75
+@8|"+0#e000002&|\+0#e000e06&|1|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|7|"+0#e000002&|,+0#0000000&| @11
+@8|"+0#e000002&|\+0#e000e06&|2|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|7|"+0#e000002&|,+0#0000000&| @11
+@8|"+0#e000002&|\+0#e000e06&|3|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|7|"+0#e000002&|,+0#0000000&| @11
+@8|"+0#e000002&|\+0#e000e06&|4|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|4|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|4|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|4|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|4@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|4|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|4|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|4|7|"+0#e000002&|,+0#0000000&| @11
+@8|"+0#e000002&|\+0#e000e06&|5|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|5|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|5|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|5|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|5|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|5@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|5|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|5|7|"+0#e000002&|,+0#0000000&| @11
+@8|"+0#e000002&|\+0#e000e06&|6|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|6|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|6|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|6|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|6|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|6|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|6@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|6|7|"+0#e000002&|,+0#0000000&| @11
+@57|7|3|,|0|-|1| @7|6|4|%|
diff --git a/runtime/syntax/testdir/dumps/java_escapes_05.dump b/runtime/syntax/testdir/dumps/java_escapes_05.dump
new file mode 100644
index 0000000..487198a
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_escapes_05.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|"+0#e000002&|\+0#e000e06&|6|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|6|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|6|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|6|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|6|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|6|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|6@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|6|7|"+0#e000002&|,+0#0000000&| @11
+@8|"+0#e000002&|\+0#e000e06&|7|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|7|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|7|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|7|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|7|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|7|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|7|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|7@1|"+0#e000002&|,+0#0000000&| @11
+@75
+@4|"+0#e000002&|\+0#e000e06&|0|1|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|1@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|1|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|1|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|1|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|1|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|1|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|1|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|0|2|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|2|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|2@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|2|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|2|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|2|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|2|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|2|7|"+0#e000002&|,+0#0000000&| @7
+@4>"+0#e000002&|\+0#e000e06&|0|3|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|3|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|3|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|3@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|3|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|3|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|3|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|3|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|0|4|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|4|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|4|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|4|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|4@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|4|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|4|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|4|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|0|5|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|5|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|5|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|5|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|5|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|5@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|5|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|5|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|0|6|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|6|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|6|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|6|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|6|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|6|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|6@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|6|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|0|7|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|7|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|7|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|7|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|7|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|7|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|7|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|0|7@1|"+0#e000002&|,+0#0000000&| @7
+@75
+@4|"+0#e000002&|\+0#e000e06&|1|0@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|0|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|0|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|0|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|0|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|0|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|0|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|0|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|1@1|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1@2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1@1|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1@1|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1@1|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1@1|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1@1|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1@1|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|1|2|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|2|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|2@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|2|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|2|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|2|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|2|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|2|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|1|3|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|3|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|3|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|3@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|3|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|3|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|3|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|3|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|1|4|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|4|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|4|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|4|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|4@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|4|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|4|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|4|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|1|5|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|5|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|5|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|5|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|5|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|5@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|5|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|5|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|1|6|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|6|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|6|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|6|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|6|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|6|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|6@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|6|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|1|7|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|7|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|7|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|7|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|7|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|7|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|7|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|7@1|"+0#e000002&|,+0#0000000&| @7
+@57|9|1|,|2|-|5| @7|8|1|%|
diff --git a/runtime/syntax/testdir/dumps/java_escapes_06.dump b/runtime/syntax/testdir/dumps/java_escapes_06.dump
new file mode 100644
index 0000000..01d73c5
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_escapes_06.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@3|"+0#e000002&|\+0#e000e06&|1|7|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|7|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|7|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|7|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|7|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|7|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|7|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|1|7@1|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|2|0@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|0|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|0|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|0|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|0|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|0|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|0|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|0|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|2|1|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|1@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|1|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|1|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|1|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|1|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|1|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|1|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|2@1|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2@1|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2@2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2@1|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2@1|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2@1|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2@1|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2@1|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|2|3|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|3|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|3|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|3@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|3|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|3|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|3|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|3|7|"+0#e000002&|,+0#0000000&| @7
+@4>"+0#e000002&|\+0#e000e06&|2|4|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|4|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|4|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|4|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|4@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|4|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|4|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|4|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|2|5|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|5|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|5|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|5|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|5|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|5@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|5|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|5|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|2|6|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|6|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|6|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|6|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|6|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|6|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|6@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|6|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|2|7|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|7|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|7|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|7|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|7|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|7|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|7|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|7@1|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3|0@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|0|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|0|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|0|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|0|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|0|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|0|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|0|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3|1|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|1@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|1|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|1|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|1|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|1|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|1|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|1|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3|2|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|2|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|2@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|2|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|2|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|2|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|2|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|2|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3@1|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3@1|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3@1|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3@2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3@1|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3@1|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3@1|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3@1|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3|4|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|4|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|4|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|4|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|4@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|4|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|4|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|4|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3|5|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|5|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|5|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|5|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|5|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|5@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|5|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|5|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3|6|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|6|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|6|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|6|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|6|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|6|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|6@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|6|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3|7|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|7|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|7|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|7|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|7|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|7|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|7|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|7@1|"+0#e000002&|,+0#0000000&| @7
+@8|}|)|;| @63
+@4|}| @69
+@57|1|0|9|,|2|-|5| @6|9@1|%|
diff --git a/runtime/syntax/testdir/dumps/java_escapes_99.dump b/runtime/syntax/testdir/dumps/java_escapes_99.dump
new file mode 100644
index 0000000..617317c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_escapes_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@3|"+0#e000002&|\+0#e000e06&|2|0@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|0|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|0|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|0|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|0|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|0|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|0|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|0|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|2|1|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|1@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|1|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|1|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|1|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|1|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|1|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|1|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|2@1|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2@1|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2@2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2@1|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2@1|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2@1|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2@1|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2@1|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|2|3|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|3|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|3|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|3@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|3|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|3|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|3|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|3|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|2|4|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|4|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|4|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|4|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|4@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|4|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|4|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|4|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|2|5|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|5|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|5|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|5|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|5|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|5@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|5|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|5|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|2|6|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|6|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|6|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|6|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|6|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|6|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|6@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|6|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|2|7|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|7|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|7|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|7|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|7|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|7|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|7|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|2|7@1|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3|0@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|0|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|0|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|0|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|0|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|0|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|0|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|0|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3|1|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|1@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|1|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|1|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|1|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|1|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|1|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|1|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3|2|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|2|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|2@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|2|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|2|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|2|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|2|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|2|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3@1|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3@1|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3@1|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3@2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3@1|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3@1|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3@1|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3@1|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3|4|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|4|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|4|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|4|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|4@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|4|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|4|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|4|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3|5|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|5|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|5|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|5|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|5|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|5@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|5|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|5|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3|6|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|6|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|6|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|6|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|6|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|6|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|6@1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|6|7|"+0#e000002&|,+0#0000000&| @7
+@4|"+0#e000002&|\+0#e000e06&|3|7|0|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|7|1|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|7|2|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|7|3|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|7|4|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|7|5|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|7|6|"+0#e000002&|,+0#0000000&| |"+0#e000002&|\+0#e000e06&|3|7@1|"+0#e000002&|,+0#0000000&| @7
+@8|}|)|;| @63
+@4|}| @69
+>}| @73
+@57|1|2|3|,|1| @8|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/java_numbers_00.dump b/runtime/syntax/testdir/dumps/java_numbers_00.dump
new file mode 100644
index 0000000..6ffb5d1
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_numbers_00.dump
@@ -0,0 +1,20 @@
+>c+0#00e0003#ffffff0|l|a|s@1| +0#0000000&|N|u|m|b|e|r|s|T|e|s|t|s| @56
+|{| @73
+@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|{| @62
+@8|d+0#00e0003&|o|u|b|l|e|[+0#0000000&|]| |d@1| |=| |{| @51
+@12|0+0#e000002&|x|.|0|p|0|,+0#0000000&| |0+0#e000002&|x|0|.|p|0|,+0#0000000&| |0+0#e000002&|x|0|.|0|p|0|,+0#0000000&| |0+0#e000002&|x|0|P|0|,+0#0000000&| @31
+@12|0+0#e000002&|x|.|0|p|0|d|,+0#0000000&| |0+0#e000002&|x|0|.|p|0|d|,+0#0000000&| |0+0#e000002&|x|0|.|0|p|0|d|,+0#0000000&| |0+0#e000002&|x|0|P|0|D|,+0#0000000&| @27
+@12|0+0#e000002&|x|.|0|p|0|f|,+0#0000000&| |0+0#e000002&|x|0|.|p|0|f|,+0#0000000&| |0+0#e000002&|x|0|.|0|p|0|f|,+0#0000000&| |0+0#e000002&|x|0|P|0|F|,+0#0000000&| @27
+@12|0+0#e000002&|x|.|0|p|0|,+0#0000000&| |0+0#e000002&|x|0|.|p|0|,+0#0000000&| |0+0#e000002&|x|0|.|0|p|0|,+0#0000000&| |0+0#e000002&|x|0|P|0|,+0#0000000&| @31
+@12|0+0#e000002&|x|.|0|p|0|d|,+0#0000000&| |0+0#e000002&|x|0|.|p|0|d|,+0#0000000&| |0+0#e000002&|x|0|.|0|p|0|d|,+0#0000000&| |0+0#e000002&|x|0|P|0|D|,+0#0000000&| @27
+@12|0+0#e000002&|x|.|0|p|0|f|,+0#0000000&| |0+0#e000002&|x|0|.|p|0|f|,+0#0000000&| |0+0#e000002&|x|0|.|0|p|0|f|,+0#0000000&| |0+0#e000002&|x|0|P|0|F|,+0#0000000&| @27
+@12|0+0#e000002&|x|.|0|p|-|0|,+0#0000000&| |0+0#e000002&|x|0|.|p|-|0|,+0#0000000&| |0+0#e000002&|x|0|.|0|p|-|0|,+0#0000000&| |0+0#e000002&|x|0|P|-|0|,+0#0000000&| @27
+@12|0+0#e000002&|x|.|0|p|-|0|d|,+0#0000000&| |0+0#e000002&|x|0|.|p|-|0|d|,+0#0000000&| |0+0#e000002&|x|0|.|0|p|-|0|d|,+0#0000000&| |0+0#e000002&|x|0|P|-|0|D|,+0#0000000&| @23
+@12|0+0#e000002&|x|.|0|p|-|0|f|,+0#0000000&| |0+0#e000002&|x|0|.|p|-|0|f|,+0#0000000&| |0+0#e000002&|x|0|.|0|p|-|0|f|,+0#0000000&| |0+0#e000002&|x|0|P|-|0|F|,+0#0000000&| @23
+@12|0+0#e000002&|x|.|0|p|+|0|,+0#0000000&| |0+0#e000002&|x|0|.|p|+|0|,+0#0000000&| |0+0#e000002&|x|0|.|0|p|+|0|,+0#0000000&| |0+0#e000002&|x|0|P|+|0|,+0#0000000&| @27
+@12|0+0#e000002&|x|.|0|p|+|0|d|,+0#0000000&| |0+0#e000002&|x|0|.|p|+|0|d|,+0#0000000&| |0+0#e000002&|x|0|.|0|p|+|0|d|,+0#0000000&| |0+0#e000002&|x|0|P|+|0|D|,+0#0000000&| @23
+@12|0+0#e000002&|x|.|0|p|+|0|f|,+0#0000000&| |0+0#e000002&|x|0|.|p|+|0|f|,+0#0000000&| |0+0#e000002&|x|0|.|0|p|+|0|f|,+0#0000000&| |0+0#e000002&|x|0|P|+|0|F|,+0#0000000&| @23
+@75
+@12|1+0#e000002&|.|,+0#0000000&| |1+0#e000002&|.|2|,+0#0000000&| |1+0#e000002&|.|2|e|3|,+0#0000000&| |1+0#e000002&|.|2|e|3|d|,+0#0000000&| |1+0#e000002&|.|2|e|3|f|,+0#0000000&| @31
+@16|1+0#e000002&|.|2|e|-|3|,+0#0000000&| |1+0#e000002&|.|2|e|-|3|d|,+0#0000000&| |1+0#e000002&|.|2|E|-|3|F|,+0#0000000&| @33
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/java_numbers_01.dump b/runtime/syntax/testdir/dumps/java_numbers_01.dump
new file mode 100644
index 0000000..a66487a
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_numbers_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@11|0+0#e000002&|x|.|0|p|+|0|,+0#0000000&| |0+0#e000002&|x|0|.|p|+|0|,+0#0000000&| |0+0#e000002&|x|0|.|0|p|+|0|,+0#0000000&| |0+0#e000002&|x|0|P|+|0|,+0#0000000&| @27
+@12|0+0#e000002&|x|.|0|p|+|0|d|,+0#0000000&| |0+0#e000002&|x|0|.|p|+|0|d|,+0#0000000&| |0+0#e000002&|x|0|.|0|p|+|0|d|,+0#0000000&| |0+0#e000002&|x|0|P|+|0|D|,+0#0000000&| @23
+@12|0+0#e000002&|x|.|0|p|+|0|f|,+0#0000000&| |0+0#e000002&|x|0|.|p|+|0|f|,+0#0000000&| |0+0#e000002&|x|0|.|0|p|+|0|f|,+0#0000000&| |0+0#e000002&|x|0|P|+|0|F|,+0#0000000&| @23
+@75
+@12|1+0#e000002&|.|,+0#0000000&| |1+0#e000002&|.|2|,+0#0000000&| |1+0#e000002&|.|2|e|3|,+0#0000000&| |1+0#e000002&|.|2|e|3|d|,+0#0000000&| |1+0#e000002&|.|2|e|3|f|,+0#0000000&| @31
+@16>1+0#e000002&|.|2|e|-|3|,+0#0000000&| |1+0#e000002&|.|2|e|-|3|d|,+0#0000000&| |1+0#e000002&|.|2|E|-|3|F|,+0#0000000&| @33
+@16|1+0#e000002&|.|2|e|+|3|,+0#0000000&| |1+0#e000002&|.|2|E|+|3|D|,+0#0000000&| |1+0#e000002&|.|2|e|+|3|f|,+0#0000000&| @33
+@12|.+0#e000002&|2|,+0#0000000&| |.+0#e000002&|2|e|3|,+0#0000000&| |.+0#e000002&|2|e|3|d|,+0#0000000&| |.+0#e000002&|2|e|3|f|,+0#0000000&| @39
+@16|.+0#e000002&|2|e|-|3|,+0#0000000&| |.+0#e000002&|2|e|-|3|d|,+0#0000000&| |.+0#e000002&|2|E|-|3|F|,+0#0000000&| @36
+@16|.+0#e000002&|2|e|+|3|,+0#0000000&| |.+0#e000002&|2|E|+|3|D|,+0#0000000&| |.+0#e000002&|2|e|+|3|f|,+0#0000000&| @36
+@12|1+0#e000002&|e|3|,+0#0000000&| |1+0#e000002&|e|3|d|,+0#0000000&| |1+0#e000002&|e|3|f|,+0#0000000&| @46
+@16|1+0#e000002&|e|-|3|,+0#0000000&| |1+0#e000002&|e|-|3|d|,+0#0000000&| |1+0#e000002&|E|-|3|F|,+0#0000000&| @39
+@16|1+0#e000002&|e|+|3|,+0#0000000&| |1+0#e000002&|E|+|3|D|,+0#0000000&| |1+0#e000002&|e|+|3|f|,+0#0000000&| @39
+@12|1+0#e000002&|d|,+0#0000000&| |1+0#e000002&|D|,+0#0000000&| |1+0#e000002&|f|,+0#0000000&| |1+0#e000002&|F|,+0#0000000&| @47
+@75
+|/+0#0000e05&@3| |M|A|L|F|O|R|M|E|D|:| |:|l|e|t| |g|:|j|a|v|a|_|c|o|m@1|e|n|t|_|s|t|r|i|n|g|s| |=| |1| ||| |d|o|a|u|t|o|c|m|d| |S|y|n|t|a|x| +0#0000000&@8
+|/+0#0000e05&@1| @9|0|_|x|.|0|p|0|,| |0|x|.|_|0|p|0|,| |0|x|.|0|_|p|0|,| |0|x|.|0|p|_|0|,| |0|x|.|0|p|0|_|,| +0#0000000&@18
+|/+0#0000e05&@1| @9|0|x|0|_|.|0|p|0|,| |0|x|_|0|.|0|p|0|,| |0|x|p|0|,| +0#0000000&@37
+@8|}|;| @64
+@57|1|9|,|5|-|1|7| @6|1|8|%|
diff --git a/runtime/syntax/testdir/dumps/java_numbers_02.dump b/runtime/syntax/testdir/dumps/java_numbers_02.dump
new file mode 100644
index 0000000..73f2e8e
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_numbers_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|}|;| @64
+@75
+@8|i+0#00e0003&|n|t| +0#0000000&|O| |=| |0+0#e000002&|;+0#0000000&| @56
+@8|i+0#00e0003&|n|t| +0#0000000&|O@1| |=| |0+0#e000002&@1|;+0#0000000&| @54
+@8|i+0#00e0003&|n|t| +0#0000000&|O|x|O| |=| |0+0#e000002&|x|0|;+0#0000000&| @52
+> @74
+@8|i+0#00e0003&|n|t| +0#0000000&|x| |=| |0+0#e000002&|x|1|2|_|3|4|5|_|6|7|8|;+0#0000000&| @45
+@8|i+0#00e0003&|n|t| +0#0000000&|y| |=| |0+0#e000002&|b|0|1|_|0|1|_|0|1|_|0|1|_|0|1|;+0#0000000&| @41
+@8|i+0#00e0003&|n|t| +0#0000000&|z| |=| |0+0#e000002&|_@1|1|_@1|2|_@1|3|_@1|4|_@1|5|_@1|6|_@1|7|;+0#0000000&| @35
+@75
+@8|/+0#0000e05&@1| |S|t|r|i|n|g|.|f|o|r|m|a|t|(|"|%|a|"|,| |-|1|.|0|)| +0#0000000&@38
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|m|i|n|u|s|_|o|n|e|_|d| |=| |-|0+0#e000002&|x|1|.|0|p|0|;+0#0000000&| @36
+@75
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|z|_|d| |=| |-|0+0#e000002&|x|.|0|p|0|;+0#0000000&| @45
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|y|_|d| |=| |0+0#e000002&|x|a|p|1|_@1|0|_@1|0|;+0#0000000&| @41
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|x|_|d| |=| |.+0#e000002&|0|_@1|1|_@1|2|_@1|3|_@1|4|_@1|5|_@1|6|_@1|7|_@1|8|_@1|9|;+0#0000000&| @23
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|d|o|t|_|O| |=| |.+0#e000002&|0|;+0#0000000&| @48
+@75
+@8|/+0#0000e05&@1| |J|L|S|,| |§|3|.|1|0|.|2|:| +0#0000000&@50
+@57|3|7|,|0|-|1| @7|4@1|%|
diff --git a/runtime/syntax/testdir/dumps/java_numbers_03.dump b/runtime/syntax/testdir/dumps/java_numbers_03.dump
new file mode 100644
index 0000000..e3b5dba
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_numbers_03.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|/+0#0000e05&@1| |J|L|S|,| |§|3|.|1|0|.|2|:| +0#0000000&@50
+@8|f+0#00e0003&|l|o|a|t| +0#0000000&|m|a|x|_|d|e|c|_|f| |=| |3+0#e000002&|.|4|0|2|8|2|3|5|e|3|8|f|;+0#0000000&| @34
+@8|f+0#00e0003&|l|o|a|t| +0#0000000&|m|a|x|_|h|e|x|_|f| |=| |0+0#e000002&|x|1|.|f@4|e|P|+|1|2|7|f|;+0#0000000&| @31
+@8|f+0#00e0003&|l|o|a|t| +0#0000000&|m|i|n|_|d|e|c|_|f| |=| |1+0#e000002&|.|4|e|-|4|5|f|;+0#0000000&| @39
+@8|f+0#00e0003&|l|o|a|t| +0#0000000&|m|i|n|_|h|e|x|_|f|_|a| |=| |0+0#e000002&|x|0|.|0@4|2|P|-|1|2|6|f|;+0#0000000&| @29
+@8>f+0#00e0003&|l|o|a|t| +0#0000000&|m|i|n|_|h|e|x|_|f|_|b| |=| |0+0#e000002&|x|1|.|0|P|-|1|4|9|f|;+0#0000000&| @34
+@75
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|m|a|x|_|d|e|c|_|d| |=| |1+0#e000002&|.|7|9|7|6|9|3|1|3|4|8|6|2|3|1|5|7|e|3|_@1|0|_@1|8|;+0#0000000&| @20
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|m|a|x|_|h|e|x|_|d| |=| |0+0#e000002&|x|1|.|f|_|f@3|_|f@3|_|f@3|P|+|1|0|2|3|;+0#0000000&| @20
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|m|i|n|_|d|e|c|_|d| |=| |4+0#e000002&|.|9|e|-|3|_@1|2|_@1|4|;+0#0000000&| @34
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|m|i|n|_|h|e|x|_|d|_|a| |=| |0+0#e000002&|x|0|.|0|_|0@3|_|0@3|_|0@2|1|P|-|1|0|2@1|;+0#0000000&| @18
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|m|i|n|_|h|e|x|_|d|_|b| |=| |0+0#e000002&|x|1|.|0|P|-|1|0|7|4|;+0#0000000&| @33
+@75
+@8|/+0#0000e05&@1| |J|L|S|,| |§|3|.|1|0|.|1|:| +0#0000000&@50
+@8|i+0#00e0003&|n|t| +0#0000000&|m|a|x|_|h|e|x| |=| |0+0#e000002&|x|7|f@2|_|f@3|;+0#0000000&| @40
+@8|i+0#00e0003&|n|t| +0#0000000&|m|a|x|_|o|c|t| |=| |0+0#e000002&|1|7@1|_|7@3|_|7@3|;+0#0000000&| @37
+@8|i+0#00e0003&|n|t| +0#0000000&|m|a|x|_|b|i|n| |=| |0+0#e000002&|b|0|1@2|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|;+0#0000000&| @10
+@75
+@8|i+0#00e0003&|n|t| +0#0000000&|m|i|n|_|h|e|x| |=| |0+0#e000002&|x|8|0@2|_|0@3|;+0#0000000&| @40
+@57|5@1|,|3|-|9| @7|7|1|%|
diff --git a/runtime/syntax/testdir/dumps/java_numbers_04.dump b/runtime/syntax/testdir/dumps/java_numbers_04.dump
new file mode 100644
index 0000000..d03904d
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_numbers_04.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|i+0#00e0003&|n|t| +0#0000000&|m|i|n|_|h|e|x| |=| |0+0#e000002&|x|8|0@2|_|0@3|;+0#0000000&| @40
+@8|i+0#00e0003&|n|t| +0#0000000&|m|i|n|_|o|c|t| |=| |0+0#e000002&|2|0@1|_|0@3|_|0@3|;+0#0000000&| @37
+@8|i+0#00e0003&|n|t| +0#0000000&|m|i|n|_|b|i|n| |=| |0+0#e000002&|b|1|0@2|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|;+0#0000000&| @10
+@75
+@8|i+0#00e0003&|n|t| +0#0000000&|m|i|n|u|s|_|o|n|e|_|h|e|x| |=| |0+0#e000002&|x|f@3|_|f@3|;+0#0000000&| @34
+@8>i+0#00e0003&|n|t| +0#0000000&|m|i|n|u|s|_|o|n|e|_|o|c|t| |=| |0+0#e000002&|3|7@1|_|7@3|_|7@3|;+0#0000000&| @31
+@8|i+0#00e0003&|n|t| +0#0000000&|m|i|n|u|s|_|o|n|e|_|b|i|n| |=| |0+0#e000002&|b|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|;+0#0000000&| @4
+@75
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|a|x|_|h|e|x|_|l| |=| |0+0#e000002&|x|7|f@2|_|f@3|_|f@3|_|f@3|L|;+0#0000000&| @26
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|a|x|_|o|c|t|_|l| |=| |0+0#e000002&|7|_|7@3|_|7@3|_|7@3|_|7@3|_|7@3|L|;+0#0000000&| @20
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|a|x|_|b|i|n|_|l| |=| |0+0#e000002&|b|0|1@2|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@2
+@1|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|L|;+0#0000000&| @41
+@75
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|i|n|_|h|e|x|_|l| |=| |0+0#e000002&|x|8|0@2|_|0@3|_|0@3|_|0@3|L|;+0#0000000&| @26
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|i|n|_|o|c|t|_|l| |=| |0+0#e000002&|1|0|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|L|;+0#0000000&| @19
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|i|n|_|b|i|n|_|l| |=| |0+0#e000002&|b|1|0@2|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|_|0@2
+@1|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|L|;+0#0000000&| @41
+@75
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|i|n|u|s|_|o|n|e|_|h|e|x|_|l| |=| |0+0#e000002&|x|f@3|_|f@3|_|f@3|_|f@3|L|;+0#0000000&| @20
+@57|7|3|,|3|-|9| @7|9|4|%|
diff --git a/runtime/syntax/testdir/dumps/java_numbers_99.dump b/runtime/syntax/testdir/dumps/java_numbers_99.dump
new file mode 100644
index 0000000..7637b85
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_numbers_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|i+0#00e0003&|n|t| +0#0000000&|m|i|n|u|s|_|o|n|e|_|o|c|t| |=| |0+0#e000002&|3|7@1|_|7@3|_|7@3|;+0#0000000&| @31
+@8|i+0#00e0003&|n|t| +0#0000000&|m|i|n|u|s|_|o|n|e|_|b|i|n| |=| |0+0#e000002&|b|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|;+0#0000000&| @4
+@75
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|a|x|_|h|e|x|_|l| |=| |0+0#e000002&|x|7|f@2|_|f@3|_|f@3|_|f@3|L|;+0#0000000&| @26
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|a|x|_|o|c|t|_|l| |=| |0+0#e000002&|7|_|7@3|_|7@3|_|7@3|_|7@3|_|7@3|L|;+0#0000000&| @20
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|a|x|_|b|i|n|_|l| |=| |0+0#e000002&|b|0|1@2|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@2
+@1|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|L|;+0#0000000&| @41
+@75
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|i|n|_|h|e|x|_|l| |=| |0+0#e000002&|x|8|0@2|_|0@3|_|0@3|_|0@3|L|;+0#0000000&| @26
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|i|n|_|o|c|t|_|l| |=| |0+0#e000002&|1|0|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|L|;+0#0000000&| @19
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|i|n|_|b|i|n|_|l| |=| |0+0#e000002&|b|1|0@2|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|_|0@2
+@1|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|_|0@3|L|;+0#0000000&| @41
+@75
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|i|n|u|s|_|o|n|e|_|h|e|x|_|l| |=| |0+0#e000002&|x|f@3|_|f@3|_|f@3|_|f@3|L|;+0#0000000&| @20
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|i|n|u|s|_|o|n|e|_|o|c|t|_|l| |=| |0+0#e000002&|1|7|_|7@3|_|7@3|_|7@3|_|7@3|_|7@3|L|;+0#0000000&| @13
+@8|l+0#00e0003&|o|n|g| +0#0000000&|m|i|n|u|s|_|o|n|e|_|b|i|n|_|l| |=| |0+0#e000002&|b|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@1
+@2|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|_|1@3|L|;+0#0000000&| @35
+@4|}| @69
+>}| @73
+@57|8@1|,|1| @9|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/java_string_00.dump b/runtime/syntax/testdir/dumps/java_string_00.dump
new file mode 100644
index 0000000..0d2f148
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_string_00.dump
@@ -0,0 +1,20 @@
+>c+0#00e0003#ffffff0|l|a|s@1| +0#0000000&|S|t|r|i|n|g|T|e|s|t|s| @2|/+0#0000e05&@1| |J|D|K| |2|1|+| |(|-@1|e|n|a|b|l|e|-|p|r|e|v|i|e|w| |-@1|r|e|l|e|a|s|e| |2|1|)|.| +0#0000000&@11
+|{| @73
+@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|{| @62
+@8|S|t|r|i|n|g| |s|1| |=| |"+0#e000002&|A| |q|u|i|c|k| |b|r|o|w|n| |f|o|x| |j|u|m|p|s| |o|v|e|r| |t|h|e| |l|a|z|y| |d|o|g|"|;+0#0000000&| @10
+@8|S|t|r|i|n|g| |s|2| |=| |"+0#e000002&|\+0#e000e06&|"|W+0#e000002&|o@1|f|\+0#e000e06&|s|!+0#e000002&|\+0#e000e06&|"|"+0#e000002&|;+0#0000000&| @40
+@8|S|t|r|i|n|g| |s|3| |=| |"@2| @51
+| +0#e000002&@11|A|\+0#e000e06&|s|\+0#e000002&| +0#0000000&@58
+| +0#e000002&@11|q|u|i|c|k| |\| +0#0000000&@55
+| +0#e000002&@11|b|r|o|w|n|\+0#e000e06&|s|\+0#e000002&| +0#0000000&@54
+| +0#e000002&@11|f|o|x| |\| +0#0000000&@57
+| +0#e000002&@11|j|u|m|p|s|\+0#e000e06&|s|\+0#e000002&| +0#0000000&@54
+| +0#e000002&@11|o|v|e|r| |\| +0#0000000&@56
+| +0#e000002&@11|t|h|e|\+0#e000e06&|s|\+0#e000002&| +0#0000000&@56
+| +0#e000002&@11|l|a|z|y| |\| +0#0000000&@56
+| +0#e000002&@11|d|o|g|"+0#0000000&@2|;| @55
+@8|S|t|r|i|n|g| |s|4| |=| |"@2| @51
+| +0#e000002&@11|"|W|o@1|f|\+0#e000e06&|s|!+0#e000002&|\+0#e000e06&|"|"+0#0000000&@2|;| @48
+@8|S|t|r|i|n|g| |s|5| |=| |"@2| @51
+| +0#e000002&@7|S|t|r|i|n|g| |s|3| |=| |\+0#e000e06&|"|"+0#e000002&@1| +0#0000000&@50
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/java_string_01.dump b/runtime/syntax/testdir/dumps/java_string_01.dump
new file mode 100644
index 0000000..84b6494
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_string_01.dump
@@ -0,0 +1,20 @@
+| +0#e000002#ffffff0@11|l|a|z|y| |\| +0#0000000&@56
+| +0#e000002&@11|d|o|g|"+0#0000000&@2|;| @55
+@8|S|t|r|i|n|g| |s|4| |=| |"@2| @51
+| +0#e000002&@11|"|W|o@1|f|\+0#e000e06&|s|!+0#e000002&|\+0#e000e06&|"|"+0#0000000&@2|;| @48
+@8|S|t|r|i|n|g| |s|5| |=| |"@2| @51
+| +0#e000002&@7>S|t|r|i|n|g| |s|3| |=| |\+0#e000e06&|"|"+0#e000002&@1| +0#0000000&@50
+| +0#e000002&@11|A|\+0#e000e06&@1|s+0#e000002&|\+0#e000e06&@1| +0#0000000&@56
+| +0#e000002&@11|q|u|i|c|k| |\+0#e000e06&@1| +0#0000000&@54
+| +0#e000002&@11|b|r|o|w|n|\+0#e000e06&@1|s+0#e000002&|\+0#e000e06&@1| +0#0000000&@52
+| +0#e000002&@11|f|o|x| |\+0#e000e06&@1| +0#0000000&@56
+| +0#e000002&@11|j|u|m|p|s|\+0#e000e06&@1|s+0#e000002&|\+0#e000e06&@1| +0#0000000&@52
+| +0#e000002&@11|o|v|e|r| |\+0#e000e06&@1| +0#0000000&@55
+| +0#e000002&@11|t|h|e|\+0#e000e06&@1|s+0#e000002&|\+0#e000e06&@1| +0#0000000&@54
+| +0#e000002&@11|l|a|z|y| |\+0#e000e06&@1| +0#0000000&@55
+| +0#e000002&@11|d|o|g|\+0#e000e06&|"|"+0#e000002&@1|;|"+0#0000000&@2|;| @50
+@75
+@8|/+0#0000e05&@1| |T|h|e|r|e| |a|r|e| |S|P|A|C|E|,| |F@1|,| |H|T|,| |C|R|,| |a|n|d| |L|F| |a|f|t|e|r| |"@2|.| +0#0000000&@17
+@8|S|t|r|i|n|g| |e|m|p|t|y| |=| |"@2| |^+0#0000e05&|L| +0#0000000&@2|^+0#0000e05&|M| +0#0000000&@40
+| +0#e000002&@11|"+0#0000000&@2|;| @58
+@57|1|9|,|3|-|9| @7|1|5|%|
diff --git a/runtime/syntax/testdir/dumps/java_string_02.dump b/runtime/syntax/testdir/dumps/java_string_02.dump
new file mode 100644
index 0000000..ef6549f
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_string_02.dump
@@ -0,0 +1,20 @@
+| +0#e000002#ffffff0@11|"+0#0000000&@2|;| @58
+@75
+@8|S|y|s|t|e|m|.|o|u|t|.|p|r|i|n|t|l|n|(|"@2| @44
+| +0#e000002&@7|"| +0#0000000&@65
+| +0#e000002&@7|"@1| +0#0000000&@64
+| +0#e000002&@7>"@1|\+0#e000e06&|u|0@1|5|c|"+0#e000002&| +0#0000000&@57
+| +0#e000002&@7|"@1|\+0#e000e06&|u|0@1|5|c|"+0#e000002&@1| +0#0000000&@56
+| +0#e000002&@7|"@1|\+0#e000e06&|"|\|u|0@1|2@1|\|u|0@1|2@1| +0#0000000&@50
+| +0#e000002&@7|"@1|\+0#e000e06&|"|"+0#e000002&@1|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1| +0#0000000&@48
+| +0#e000002&@7|"@1|\+0#e000e06&|"|"+0#e000002&@1|\+0#e000e06&|"|"+0#e000002&| +0#0000000&@57
+| +0#e000002&@7|"@1|\+0#e000e06&|"|"+0#e000002&@1|\+0#e000e06&|"|"+0#e000002&|\+0#e000e06&|"|"+0#0000000&@2|)|;| @50
+@75
+@8|S|y|s|t|e|m|.|o|u|t|.|p|r|i|n|t|l|n|(|S|T|R|.|"@2| @40
+| +0#e000e06&@7|"| +0#0000000&@65
+| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&| +0#0000000&@57
+| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|{|"+0#e000002&|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1|"+0#e000002&|}+0#e000e06&| +0#0000000&@40
+| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|{|"+0#e000002&|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1|"+0#e000002&|}+0#e000e06&|"| +0#0000000&@39
+| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"|\|{|"+0#e000002&|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1|\|u|0@1|5|c|\|u|0@1|2@1|"+0#e000002&|}+0#e000e06&| +0#0000000&@26
+| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|{|"+0#e000002&|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1|"+0#e000002&|}+0#e000e06&| +0#0000000&@29
+@57|3|7|,|3|-|9| @7|3|6|%|
diff --git a/runtime/syntax/testdir/dumps/java_string_03.dump b/runtime/syntax/testdir/dumps/java_string_03.dump
new file mode 100644
index 0000000..9e88372
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_string_03.dump
@@ -0,0 +1,20 @@
+| +0#e000e06#ffffff0@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|{|"+0#e000002&|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1|"+0#e000002&|}+0#e000e06&| +0#0000000&@29
+| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"@1| +0#0000000&@43
+| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"@1|\|"|"+0#0000000&@2|)|;| @5|/+0#0000e05&@1| |J|D|K| |2|1|+|.| +0#0000000&@19
+@75
+@8|S|t|r|i|n|g| |w|o@1|f| |=| |"+0#e000002&|W|o@1|f|"|,+0#0000000&| |d|o|g| |=| |"+0#e000002&|d|o|g|"|,+0#0000000&| |f|o|x| |=| |"+0#e000002&|f|o|x|"|;+0#0000000&| @19
+> @74
+@8|S|t|r|i|n|g| |s|6| |=| |S|T|R| @51
+@12|.|"+0#e000e06&|A| |q|u|i|c|k| |b|r|o|w|n| |\|{|f+0#0000000&|o|x|}+0#e000e06&| |j|u|m|p|s| |o|v|e|r| |t|h|e| |l|a|z|y| |\|{|d+0#0000000&|o|g|}+0#e000e06&|"|;+0#0000000&| @11
+@8|S|t|r|i|n|g| |s|7| |=| |S|T|R|.|p|r|o|c|e|s@1|(|S|t|r|i|n|g|T|e|m|p|l|a|t|e|.|R|A|W| @24
+@12|.|"+0#e000e06&|\|"|\|{|w+0#0000000&|o@1|f|}+0#e000e06&|\|s|!|\|"@1|)+0#0000000&|;| @43
+@8|S|t|r|i|n|g| |s|8| |=| |S|T|R|.|"@2| @47
+| +0#e000e06&@11|A|\|s|\| +0#0000000&@58
+| +0#e000e06&@11|q|u|i|c|k| |\| +0#0000000&@55
+| +0#e000e06&@11|b|r|o|w|n|\|s|\| +0#0000000&@54
+| +0#e000e06&@11|\|{|f+0#0000000&|o|x|}+0#e000e06&| |\| +0#0000000&@54
+| +0#e000e06&@11|j|u|m|p|s|\|s|\| +0#0000000&@54
+| +0#e000e06&@11|o|v|e|r| |\| +0#0000000&@56
+| +0#e000e06&@11|t|h|e|\|s|\| +0#0000000&@56
+| +0#e000e06&@11|l|a|z|y| |\| +0#0000000&@56
+@57|5@1|,|0|-|1| @7|5|7|%|
diff --git a/runtime/syntax/testdir/dumps/java_string_04.dump b/runtime/syntax/testdir/dumps/java_string_04.dump
new file mode 100644
index 0000000..4336a92
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_string_04.dump
@@ -0,0 +1,20 @@
+| +0#e000e06#ffffff0@11|l|a|z|y| |\| +0#0000000&@56
+| +0#e000e06&@11|\|{|d+0#0000000&|o|g|}+0#e000e06&|"+0#0000000&@2|;| @52
+@8|S|t|r|i|n|g| |s|9| |=| |S|T|R|.|p|r|o|c|e|s@1|(|S|t|r|i|n|g|T|e|m|p|l|a|t|e|.|R|A|W| @24
+@12|.| @61
+@12|"@2| @59
+| +0#e000e06&@11>"|\|{|w+0#0000000&|o@1|f|}+0#e000e06&|\|s|!|\|"|"+0#0000000&@2|)|;| @44
+@8|S|t|r|i|n|g| |s|1|0| |=| |j|a|v|a|.|u|t|i|l|.|F|o|r|m|a|t|P|r|o|c|e|s@1|o|r|.|F|M|T| @24
+@12|.| |"+0#e000e06&|%|-|1|4|s|\|{|"+0#e000002&|A|\+0#e000e06&|s|"+0#e000002&| +0#0000000&|+| |S|T|R| |.| |"+0#e000e06&|q|u|i|c|k|"| +0#0000000&|+| |"+0#e000002&|b|r|o|w|n|"|}+0#e000e06&|%|s|\|{|f+0#0000000&|o|x|}+0#e000e06&| |"| +0#0000000&@10
+@12|+| |j|a|v|a|.|u|t|i|l|.|F|o|r|m|a|t|P|r|o|c|e|s@1|o|r|.|F|M|T| @31
+@12|.| |"+0#e000e06&|%|-|2|0|s|\|{|"+0#e000002&|j|u|m|p|s|\+0#e000e06&|s|o+0#e000002&|v|e|r| |t|h|e|\+0#e000e06&|s|"+0#e000002&| +0#0000000&@33
+@20|+| |S|T|R| |.| |"+0#e000e06&|l|a|z|y|"|}|%|s|\|{|d+0#0000000&|o|g|}+0#e000e06&|"|;+0#0000000&| @29
+@8|S|t|r|i|n|g| |s|1@1| |=| |S|T|R|.|"@2| @46
+| +0#e000e06&@11|\|"|\|{| +0#0000000&@11|/+0#0000e05&@1| |A| |n|e|s|t|e|d| |c|o|m@1|e|n|t|.| +0#0000000&@26
+@8|(|n+0#af5f00255&|e|w| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|S|t|r|i|n|g|,| |S|t|r|i|n|g|>|(|)| |{| @14
+@12|p+0#00e0003&|u|b|l|i|c| +0#0000000&|S|t|r|i|n|g| |a|p@1|l|y|(|S|t|r|i|n|g| |b|a|y|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|b|a|y|;| |}|;| @14
+@8|}|)|.|a|p@1|l|y|(|w|o@1|f|)| @52
+@12|}+0#e000e06&|\|s|!|\|"|"+0#0000000&@2|;| @52
+@8|S|t|r|i|n|g| |s|1|2| |=| |j|a|v|a|.|u|t|i|l|.|F|o|r|m|a|t|P|r|o|c|e|s@1|o|r|.|F|M|T| @24
+@12|.|"@2| @58
+@57|7|3|,|4|-|1|3| @6|7|8|%|
diff --git a/runtime/syntax/testdir/dumps/java_string_05.dump b/runtime/syntax/testdir/dumps/java_string_05.dump
new file mode 100644
index 0000000..47804a9
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_string_05.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@11|.|"@2| @58
+| +0#e000e06&@11|%|-|1|4|s|\|{|S+0#0000000&|T|R|.|"@2| @48
+| +0#e000e06&@15|A|\|s|\| +0#0000000&@54
+| +0#e000e06&@15|\|{| +0#0000000&|"+0#e000002&|q|u|i|c|k|"| +0#0000000&|}+0#e000e06&| |\| +0#0000000&@44
+| +0#e000e06&@15|b|r|o|w|n|"+0#0000000&@2|}+0#e000e06&|\| +0#0000000&@48
+| +0#e000e06&@11>%|s|\|{| +0#0000000&|f|o|x| |}+0#e000e06&| |\| +0#0000000&@50
+| +0#e000e06&@11|%|-|2|0|s|\|{|S+0#0000000&|T|R|.|"@2| @48
+| +0#e000e06&@15|j|u|m|p|s|\|s|\| +0#0000000&@50
+| +0#e000e06&@15|o|v|e|r| |\| +0#0000000&@52
+| +0#e000e06&@15|t|h|e|\|s|\| +0#0000000&@52
+| +0#e000e06&@15|\|{| +0#0000000&|"+0#e000002&|l|a|z|y|"| +0#0000000&|}+0#e000e06&| |"+0#0000000&@2|}+0#e000e06&|\| +0#0000000&@41
+| +0#e000e06&@11|%|s|\|{| +0#0000000&|d|o|g| |}+0#e000e06&|"+0#0000000&@2|;| @48
+@8|S|t|r|i|n|g| |s|1|3| |=| |S|T|R| @50
+@12|.|"+0#e000e06&|\|"|\|{| +0#0000000&@9|/+0#0000e05&|*| |A| |n|e|s|t|e|d| |c|o|m@1|e|n|t|.| |*|/| +0#0000000&@23
+@8|(@1|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|S|t|r|i|n|g|,| |S|t|r|i|n|g|>|)| |b|a|y| |-|>| |b|a|y|)| @8
+@28|.|a|p@1|l|y|(|w|o@1|f|)| @34
+@12|}+0#e000e06&|\|s|!|\|"@1|;+0#0000000&| @54
+@4|}| @69
+|}| @73
+@57|9|1|,|4|-|1|3| @6|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/java_string_99.dump b/runtime/syntax/testdir/dumps/java_string_99.dump
new file mode 100644
index 0000000..a401ad6
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_string_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@11|.|"@2| @58
+| +0#e000e06&@11|%|-|1|4|s|\|{|S+0#0000000&|T|R|.|"@2| @48
+| +0#e000e06&@15|A|\|s|\| +0#0000000&@54
+| +0#e000e06&@15|\|{| +0#0000000&|"+0#e000002&|q|u|i|c|k|"| +0#0000000&|}+0#e000e06&| |\| +0#0000000&@44
+| +0#e000e06&@15|b|r|o|w|n|"+0#0000000&@2|}+0#e000e06&|\| +0#0000000&@48
+| +0#e000e06&@11|%|s|\|{| +0#0000000&|f|o|x| |}+0#e000e06&| |\| +0#0000000&@50
+| +0#e000e06&@11|%|-|2|0|s|\|{|S+0#0000000&|T|R|.|"@2| @48
+| +0#e000e06&@15|j|u|m|p|s|\|s|\| +0#0000000&@50
+| +0#e000e06&@15|o|v|e|r| |\| +0#0000000&@52
+| +0#e000e06&@15|t|h|e|\|s|\| +0#0000000&@52
+| +0#e000e06&@15|\|{| +0#0000000&|"+0#e000002&|l|a|z|y|"| +0#0000000&|}+0#e000e06&| |"+0#0000000&@2|}+0#e000e06&|\| +0#0000000&@41
+| +0#e000e06&@11|%|s|\|{| +0#0000000&|d|o|g| |}+0#e000e06&|"+0#0000000&@2|;| @48
+@8|S|t|r|i|n|g| |s|1|3| |=| |S|T|R| @50
+@12|.|"+0#e000e06&|\|"|\|{| +0#0000000&@9|/+0#0000e05&|*| |A| |n|e|s|t|e|d| |c|o|m@1|e|n|t|.| |*|/| +0#0000000&@23
+@8|(@1|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|S|t|r|i|n|g|,| |S|t|r|i|n|g|>|)| |b|a|y| |-|>| |b|a|y|)| @8
+@28|.|a|p@1|l|y|(|w|o@1|f|)| @34
+@12|}+0#e000e06&|\|s|!|\|"@1|;+0#0000000&| @54
+@4|}| @69
+>}| @73
+@57|1|0|4|,|1| @8|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/java_switch_00.dump b/runtime/syntax/testdir/dumps/java_switch_00.dump
new file mode 100644
index 0000000..95e0142
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_switch_00.dump
@@ -0,0 +1,20 @@
+>c+0#00e0003#ffffff0|l|a|s@1| +0#0000000&|S|w|i|t|c|h|T|e|s|t|s| @2|/+0#0000e05&@1| |J|D|K| |2|1|+|.| +0#0000000&@43
+|{| @73
+@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|e|c|h|o|(|O|b|j|e|c|t| |o|)| |{| |S|y|s|t|e|m|.|o|u|t|.|p|r|i|n|t|l|n|(|o|)|;| |}| @17
+@75
+@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|{| @62
+@8|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|Y|i|e|l|d|a|b|l|e|<|T|>| @44
+@8|{| @65
+@12|T| |y+0#af5f00255&|i|e|l|d|(+0#0000000&|)|;| @52
+@12|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|Y|i|e|l|d|a|b|l|e|<|T|>| |d|e|f|a|u|l|t|_|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|t+0#00e0003&|h|i|s|;+0#0000000&| |}| @14
+@12|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|Y|i|e|l|d|a|b|l|e|<|T|>| |w|h|e|n|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|t+0#00e0003&|h|i|s|;+0#0000000&| |}| @18
+@8|}| @65
+@75
+@8|/+0#0000e05&@1| |T|h|e|r|e| |a|r|e| |8|0| |b|y|t|e|s| |(|\|@|8|0|<|!|)| |b|e|t|w|e@1|n| |"|:@1|"| |a|n|d| |"|y|i|e|l|d|;|"|.| +0#0000000&@9
+@8|Y|i|e|l|d|a|b|l|e|<|?|>| |y| |=| |(@1|Y|i|e|l|d|a|b|l|e|<|?|>|)| |(|)| |-|>| |0+0#e000002&|)+0#0000000&|:@1| @23
+@75
+@4|y|i|e|l|d|;| @64
+@8|(@1|Y|i|e|l|d|a|b|l|e|<|?|>|)| |(|)| |-|>| |0+0#e000002&|)+0#0000000&|.|w|h|e|n|(|)|.|d|e|f|a|u|l|t|_|(|)|.|y|i|e|l|d|(|)|;| @15
+@75
+@8|e+0#00e0003&|n|u|m| +0#0000000&|L|e|t@1|e|r|s| |{| |O|T|H|E|R|,| |A|L|P|H|A|,| |B|E|T|A| |}| @31
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/java_switch_01.dump b/runtime/syntax/testdir/dumps/java_switch_01.dump
new file mode 100644
index 0000000..0a76a87
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_switch_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+@4|y|i|e|l|d|;| @64
+@8|(@1|Y|i|e|l|d|a|b|l|e|<|?|>|)| |(|)| |-|>| |0+0#e000002&|)+0#0000000&|.|w|h|e|n|(|)|.|d|e|f|a|u|l|t|_|(|)|.|y|i|e|l|d|(|)|;| @15
+@75
+@8|e+0#00e0003&|n|u|m| +0#0000000&|L|e|t@1|e|r|s| |{| |O|T|H|E|R|,| |A|L|P|H|A|,| |B|E|T|A| |}| @31
+> @74
+@8|L|e|t@1|e|r|s| |w|h|e|n| |=| |L|e|t@1|e|r|s|.|O|T|H|E|R|;| @37
+@75
+@8|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|w|h|e|n|)| |{| @51
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|A|L|P|H|A|:| |{| |e|c|h|o|(|L|e|t@1|e|r|s|.|A|L|P|H|A|)|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @23
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|B|E|T|A|:| @1|{| |e|c|h|o|(|L|e|t@1|e|r|s|.|B|E|T|A|)|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @24
+@8|d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| @3|{| |e|c|h|o|(|L|e|t@1|e|r|s|.|O|T|H|E|R|)|;| |}| @30
+@8|}| @65
+@75
+@8|e|c|h|o|(|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|w|h|e|n|)| |{| @46
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|A|L|P|H|A| @1|-|>| |L|e|t@1|e|r|s|.|A|L|P|H|A|;| @33
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|B|E|T|A| @2|-|>| |L|e|t@1|e|r|s|.|B|E|T|A|;| @34
+@12|d+0#af5f00255&|e|f|a|u|l|t| +0#0000000&@4|-|>| |{| |y+0#af5f00255&|i|e|l|d|(+0#0000000&|L|e|t@1|e|r|s|.|O|T|H|E|R|)|;| |}| @22
+@8|}|)|;| @63
+@57|1|9|,|0|-|1| @7|1|3|%|
diff --git a/runtime/syntax/testdir/dumps/java_switch_02.dump b/runtime/syntax/testdir/dumps/java_switch_02.dump
new file mode 100644
index 0000000..cf213ed
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_switch_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|}|)|;| @63
+@75
+@8|S|t|r|i|n|g| |y+0#af5f00255&|i|e|l|d| +0#0000000&|=| |n+0#e000002&|u|l@1|;+0#0000000&| @46
+@75
+@8|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|y+0#af5f00255&|i|e|l|d|)+0#0000000&| |{| @50
+@8>c+0#af5f00255&|a|s|e| +0#0000000&|"+0#e000002&|A|"|:+0#0000000&| |c+0#af5f00255&|a|s|e| +0#0000000&|"+0#e000002&|B|"|:+0#0000000&| |{| |e|c|h|o|(|"+0#e000002&|A| |o|r| |B|"|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @20
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|"+0#e000002&|:|"|:+0#0000000&| @6|{| |e|c|h|o|(|"+0#e000002&|C|o|l|o|n|"|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @25
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|S|t|r|i|n|g| |s|t|r| |w+0#af5f00255&|h|e|n| +0#0000000&|!|s|t|r|.|e|q|u|a|l|s|(|"+0#e000002&@1|)+0#0000000&|:| @29
+@20|{| |e|c|h|o|(|"+0#e000002&|<|n|o|n|-|e|m|p|t|y|>|"|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @23
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|n+0#e000002&|u|l@1|:+0#0000000&| |d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| |{| |e|c|h|o|(|"+0#e000002&|O|t|h|e|r|"|)+0#0000000&|;| |}| @28
+@8|}| @65
+@75
+@8|e|c|h|o|(|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|y+0#af5f00255&|i|e|l|d|)+0#0000000&| |{| @45
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|"+0#e000002&|A|"|,+0#0000000&| |"+0#e000002&|B|"| +0#0000000&@6|-|>| |{| |y+0#af5f00255&|i|e|l|d|(+0#0000000&|"+0#e000002&|A| |o|r| |B|"|)+0#0000000&|;| |}| @19
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|"+0#e000002&|-|>|"| +0#0000000&@6|-|>| |"+0#e000002&|A|r@1|o|w|"|;+0#0000000&| @35
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|S|t|r|i|n|g| |s|t|r| |w+0#af5f00255&|h|e|n| +0#0000000&|!|s|t|r|.|e|q|u|a|l|s|(|"+0#e000002&@1|)+0#0000000&| @26
+@24|-|>| |"+0#e000002&|<|n|o|n|-|e|m|p|t|y|>|"|;+0#0000000&| @33
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|n+0#e000002&|u|l@1|,+0#0000000&| |d+0#af5f00255&|e|f|a|u|l|t| +0#0000000&@1|-|>| |"+0#e000002&|O|t|h|e|r|"|;+0#0000000&| @31
+@8|}|)|;| @63
+@57|3|7|,|3|-|9| @7|3|0|%|
diff --git a/runtime/syntax/testdir/dumps/java_switch_03.dump b/runtime/syntax/testdir/dumps/java_switch_03.dump
new file mode 100644
index 0000000..7766af3
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_switch_03.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|}|)|;| @63
+@75
+@8|O|b|j|e|c|t| |o| |=| |n+0#af5f00255&|e|w| +0#0000000&|O|b|j|e|c|t|(|)|;| @42
+@75
+@8|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|o|)| |{| @54
+@8>c+0#af5f00255&|a|s|e| +0#0000000&|n+0#e000002&|u|l@1|:+0#0000000&| @5|{| |e|c|h|o|(|"+0#e000002&|n|u|l@1|"|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @26
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|L|e|t@1|e|r|s|[|]| |l@1|:| @1|{| |e|c|h|o|(|"+0#e000002&|S|w|i|t|c|h|T|e|s|t|s|$|1|L|e|t@1|e|r|s|[|]|"|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @4
+@8|d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| @7|{| |e|c|h|o|(|"+0#e000002&|j|a|v|a|.|l|a|n|g|.|O|b|j|e|c|t|"|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @14
+@8|}|;| @64
+@75
+@8|e|c|h|o|(|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|o|)| |{| @49
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|n+0#e000002&|u|l@1| +0#0000000&@6|-|>| |"+0#e000002&|n|u|l@1|"|;+0#0000000&| @36
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|L|e|t@1|e|r|s|[|]| |l@1| @2|-|>| |"+0#e000002&|S|w|i|t|c|h|T|e|s|t|s|$|1|L|e|t@1|e|r|s|[|]|"|;+0#0000000&| @14
+@12|d+0#af5f00255&|e|f|a|u|l|t| +0#0000000&@8|-|>| |"+0#e000002&|j|a|v|a|.|l|a|n|g|.|O|b|j|e|c|t|"|;+0#0000000&| @24
+@8|}|)|;| @63
+@75
+@8|c+0#00e0003&|h|a|r| +0#0000000&|c|h| |=| |'+0#e000002&|c|'|;+0#0000000&| @52
+@75
+@8|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|c|h|)| |{| @53
+@57|5@1|,|3|-|9| @7|4|7|%|
diff --git a/runtime/syntax/testdir/dumps/java_switch_04.dump b/runtime/syntax/testdir/dumps/java_switch_04.dump
new file mode 100644
index 0000000..38dfe40
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_switch_04.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|c|h|)| |{| @53
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|'+0#e000002&|a|'|:+0#0000000&| @6|{| |e|c|h|o|(|'+0#e000002&|a|'|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @29
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|'+0#e000002&|b|'|:+0#0000000&| @6|{| |e|c|h|o|(|'+0#e000002&|b|'|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @29
+@8|d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| @7|{| |e|c|h|o|(|'+0#e000002&|\+0#e000e06&|u|0@3|'+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @24
+@8|}|;| @64
+> @74
+@8|e|c|h|o|(|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|c|h|)| |{| @48
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|'+0#e000002&|a|'| +0#0000000&@3|-|>| |'+0#e000002&|a|'|;+0#0000000&| @43
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|'+0#e000002&|b|'| +0#0000000&@3|-|>| |'+0#e000002&|b|'|;+0#0000000&| @43
+@12|d+0#af5f00255&|e|f|a|u|l|t| +0#0000000&@4|-|>| |'+0#e000002&|\+0#e000e06&|u|0@3|'+0#e000002&|;+0#0000000&| @38
+@8|}|)|;| @63
+@75
+@8|b+0#00e0003&|y|t|e| +0#0000000&|b| |=| |(|b+0#00e0003&|y|t|e|)+0#0000000&| |2+0#e000002&|;+0#0000000&| @48
+@75
+@8|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|b|)| |{| @54
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|(@1|b+0#00e0003&|y|t|e|)+0#0000000&| |0+0#e000002&|)+0#0000000&|:| @3|{| |e|c|h|o|(@1|b+0#00e0003&|y|t|e|)+0#0000000&| |0+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @20
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|(@1|b+0#00e0003&|y|t|e|)+0#0000000&| |1+0#e000002&|)+0#0000000&|:| @3|{| |e|c|h|o|(@1|b+0#00e0003&|y|t|e|)+0#0000000&| |1+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @20
+@8|d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| @7|{| |e|c|h|o|(@1|b+0#00e0003&|y|t|e|)+0#0000000&| |-|1+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @23
+@8|}|;| @64
+@57|7|3|,|0|-|1| @7|6|5|%|
diff --git a/runtime/syntax/testdir/dumps/java_switch_05.dump b/runtime/syntax/testdir/dumps/java_switch_05.dump
new file mode 100644
index 0000000..3a25667
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_switch_05.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|}|;| @64
+@75
+@8|e|c|h|o|(|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|b|)| |{| @49
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|(@1|b+0#00e0003&|y|t|e|)+0#0000000&| |0+0#e000002&|)+0#0000000&| |-|>| |(|b+0#00e0003&|y|t|e|)+0#0000000&| |0+0#e000002&|;+0#0000000&| @34
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|(@1|b+0#00e0003&|y|t|e|)+0#0000000&| |1+0#e000002&|)+0#0000000&| |-|>| |(|b+0#00e0003&|y|t|e|)+0#0000000&| |1+0#e000002&|;+0#0000000&| @34
+@12>d+0#af5f00255&|e|f|a|u|l|t| +0#0000000&@4|-|>| |(|b+0#00e0003&|y|t|e|)+0#0000000&| |-|1+0#e000002&|;+0#0000000&| @37
+@8|}|)|;| @63
+@75
+@8|s+0#00e0003&|h|o|r|t| +0#0000000&|s|h| |=| |(|s+0#00e0003&|h|o|r|t|)+0#0000000&| |2+0#e000002&|;+0#0000000&| @45
+@75
+@8|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|s|h|)| |{| @53
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|(@1|s+0#00e0003&|h|o|r|t|)+0#0000000&| |0+0#e000002&|)+0#0000000&|:| @2|{| |e|c|h|o|(@1|s+0#00e0003&|h|o|r|t|)+0#0000000&| |0+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @19
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|(@1|s+0#00e0003&|h|o|r|t|)+0#0000000&| |1+0#e000002&|)+0#0000000&|:| @2|{| |e|c|h|o|(@1|s+0#00e0003&|h|o|r|t|)+0#0000000&| |1+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @19
+@8|d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| @7|{| |e|c|h|o|(@1|s+0#00e0003&|h|o|r|t|)+0#0000000&| |-|1+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @22
+@8|}|;| @64
+@75
+@8|e|c|h|o|(|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|s|h|)| |{| @48
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|(@1|s+0#00e0003&|h|o|r|t|)+0#0000000&| |0+0#e000002&|)+0#0000000&| @3|-|>| |(|s+0#00e0003&|h|o|r|t|)+0#0000000&| |0+0#e000002&|;+0#0000000&| @29
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|(@1|s+0#00e0003&|h|o|r|t|)+0#0000000&| |1+0#e000002&|)+0#0000000&| @3|-|>| |(|s+0#00e0003&|h|o|r|t|)+0#0000000&| |1+0#e000002&|;+0#0000000&| @29
+@57|9|1|,|4|-|1|3| @6|8|2|%|
diff --git a/runtime/syntax/testdir/dumps/java_switch_06.dump b/runtime/syntax/testdir/dumps/java_switch_06.dump
new file mode 100644
index 0000000..9e72cc7
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_switch_06.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@11|c+0#af5f00255&|a|s|e| +0#0000000&|(@1|s+0#00e0003&|h|o|r|t|)+0#0000000&| |1+0#e000002&|)+0#0000000&| @3|-|>| |(|s+0#00e0003&|h|o|r|t|)+0#0000000&| |1+0#e000002&|;+0#0000000&| @29
+@12|d+0#af5f00255&|e|f|a|u|l|t| +0#0000000&@8|-|>| |(|s+0#00e0003&|h|o|r|t|)+0#0000000&| |-|1+0#e000002&|;+0#0000000&| @32
+@8|}|)|;| @63
+@75
+@8|i+0#00e0003&|n|t| +0#0000000&|i| |=| |2+0#e000002&|;+0#0000000&| @56
+> @74
+@8|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|i|)| |{| @54
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|0+0#e000002&|b|0|_@1|0@1|_@2|0@2|:+0#0000000&| |{| |e|c|h|o|(|0+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @27
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|0+0#e000002&|x|0@2|_@2|0@1|_@1|1|:+0#0000000&| |{| |e|c|h|o|(|1+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @27
+@8|d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| @7|{| |e|c|h|o|(|-|1+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @30
+@8|}|;| @64
+@75
+@8|e|c|h|o|(|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|i|)| |{| @49
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|0+0#e000002&|_|0|_|0|_|0|_|0| +0#0000000&@1|-|>| |0+0#e000002&|;+0#0000000&| @41
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|1+0#e000002&| +0#0000000&@5|-|>| |1+0#e000002&|;+0#0000000&| @45
+@12|d+0#af5f00255&|e|f|a|u|l|t| +0#0000000&@4|-|>| |-|1+0#e000002&|;+0#0000000&| @44
+@8|}|)|;| @63
+@4|}| @69
+|}| @73
+@57|1|0|9|,|0|-|1| @6|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/java_switch_99.dump b/runtime/syntax/testdir/dumps/java_switch_99.dump
new file mode 100644
index 0000000..f275382
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_switch_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@11|c+0#af5f00255&|a|s|e| +0#0000000&|(@1|s+0#00e0003&|h|o|r|t|)+0#0000000&| |1+0#e000002&|)+0#0000000&| @3|-|>| |(|s+0#00e0003&|h|o|r|t|)+0#0000000&| |1+0#e000002&|;+0#0000000&| @29
+@12|d+0#af5f00255&|e|f|a|u|l|t| +0#0000000&@8|-|>| |(|s+0#00e0003&|h|o|r|t|)+0#0000000&| |-|1+0#e000002&|;+0#0000000&| @32
+@8|}|)|;| @63
+@75
+@8|i+0#00e0003&|n|t| +0#0000000&|i| |=| |2+0#e000002&|;+0#0000000&| @56
+@75
+@8|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|i|)| |{| @54
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|0+0#e000002&|b|0|_@1|0@1|_@2|0@2|:+0#0000000&| |{| |e|c|h|o|(|0+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @27
+@8|c+0#af5f00255&|a|s|e| +0#0000000&|0+0#e000002&|x|0@2|_@2|0@1|_@1|1|:+0#0000000&| |{| |e|c|h|o|(|1+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @27
+@8|d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| @7|{| |e|c|h|o|(|-|1+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @30
+@8|}|;| @64
+@75
+@8|e|c|h|o|(|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|i|)| |{| @49
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|0+0#e000002&|_|0|_|0|_|0|_|0| +0#0000000&@1|-|>| |0+0#e000002&|;+0#0000000&| @41
+@12|c+0#af5f00255&|a|s|e| +0#0000000&|1+0#e000002&| +0#0000000&@5|-|>| |1+0#e000002&|;+0#0000000&| @45
+@12|d+0#af5f00255&|e|f|a|u|l|t| +0#0000000&@4|-|>| |-|1+0#e000002&|;+0#0000000&| @44
+@8|}|)|;| @63
+@4|}| @69
+>}| @73
+@57|1|2@1|,|1| @8|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/markdown_conceal_00.dump b/runtime/syntax/testdir/dumps/markdown_conceal_00.dump
new file mode 100644
index 0000000..f90a2b4
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/markdown_conceal_00.dump
@@ -0,0 +1,20 @@
+>I+0&#ffffff0|t|a|l|i|c|,| |I|t|a|l|i|c|.| @1|B+0#0000001#ffff4012|o|l|d|,+0#0000000#ffffff0| |B+0#0000001#ffff4012|o|l|d|.+0#0000000#ffffff0| @46
+|B+2&&|o|l|d| |I|t|a|l|i|c|,+0&&| |B+2&&|o|l|d| |I|t|a|l|i|c|.+0&&| @49
+|S+1024&&|t|r|i|k|e|t|h|r|o|u|g|h|,+0&&| |S̶|t̶|r̶|i̶|k̶|e̶|t̶|h̶|r̶|o̶|u̶|g̶|h̶|.| @45
+@75
+@75
+|<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&| +0#0000000&@71
+|<+0#00e0e07&|d+0#af5f00255&|e|l|>+0#00e0e07&|S+1024#0000000&|t|r|i|k|e|t|h|r|o|u|g|h|<+0#00e0e07&|/|d+0#af5f00255&|e|l|>+0#00e0e07&|,+0#0000000&| |<+0#00e0e07&|s+0#af5f00255&|>+0#00e0e07&|S+1024#0000000&|t|r|i|k|e|t|h|r|o|u|g|h|<+0#00e0e07&|/|s+0#af5f00255&|>+0#00e0e07&|.+0#0000000&|<+0#00e0e07&|b+0#af5f00255&|r| +0#00e0e07&|/|>| +0#0000000&@21
+@75
+@75
+@75
+|<+0#00e0e07&|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|<|e+0#af5f00255&|m|>+0#00e0e07&|B+2#0000000&|o|l|d| |I|t|a|l|i|c|<+0#00e0e07&|/|e+0#af5f00255&|m|>+0#00e0e07&|<|/|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|.+0#0000000&| @36
+|<+0#00e0e07&|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|<|e+0#af5f00255&|m|>+0#00e0e07&|B+2#0000000&|o|l|d| |I|t|a|l|i|c|<+0#00e0e07&|/|e+0#af5f00255&|m|>+0#00e0e07&|<|/|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|.+0#0000000&|<+0#00e0e07&|b+0#af5f00255&|r| +0#00e0e07&|/|>| +0#0000000&@30
+|<+0#00e0e07&|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|B+0#0000001#ffff4012|o|l|d|<+0#00e0e07#ffffff0|/|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|,+0#0000000&| |<+0#00e0e07&|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|B+0#0000001#ffff4012|o|l|d|<+0#00e0e07#ffffff0|/|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|.+0#0000000&| @29
+|<+0#00e0e07&|e+0#af5f00255&|m|>+0#00e0e07&|I+0#0000000&|t|a|l|i|c|<+0#00e0e07&|/|e+0#af5f00255&|m|>+0#00e0e07&|,+0#0000000&| |<+0#00e0e07&|e+0#af5f00255&|m|>+0#00e0e07&|I+0#0000000&|t|a|l|i|c|<+0#00e0e07&|/|e+0#af5f00255&|m|>+0#00e0e07&|.+0#0000000&| @41
+@75
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|,|1| @10|A|l@1|
diff --git a/runtime/syntax/testdir/dumps/markdown_conceal_99.dump b/runtime/syntax/testdir/dumps/markdown_conceal_99.dump
new file mode 100644
index 0000000..d0b6be1
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/markdown_conceal_99.dump
@@ -0,0 +1,20 @@
+|I+0&#ffffff0|t|a|l|i|c|,| |I|t|a|l|i|c|.| @1|B+0#0000001#ffff4012|o|l|d|,+0#0000000#ffffff0| |B+0#0000001#ffff4012|o|l|d|.+0#0000000#ffffff0| @46
+|B+2&&|o|l|d| |I|t|a|l|i|c|,+0&&| |B+2&&|o|l|d| |I|t|a|l|i|c|.+0&&| @49
+|S+1024&&|t|r|i|k|e|t|h|r|o|u|g|h|,+0&&| |S̶|t̶|r̶|i̶|k̶|e̶|t̶|h̶|r̶|o̶|u̶|g̶|h̶|.| @45
+@75
+@75
+|<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&| +0#0000000&@71
+|<+0#00e0e07&|d+0#af5f00255&|e|l|>+0#00e0e07&|S+1024#0000000&|t|r|i|k|e|t|h|r|o|u|g|h|<+0#00e0e07&|/|d+0#af5f00255&|e|l|>+0#00e0e07&|,+0#0000000&| |<+0#00e0e07&|s+0#af5f00255&|>+0#00e0e07&|S+1024#0000000&|t|r|i|k|e|t|h|r|o|u|g|h|<+0#00e0e07&|/|s+0#af5f00255&|>+0#00e0e07&|.+0#0000000&|<+0#00e0e07&|b+0#af5f00255&|r| +0#00e0e07&|/|>| +0#0000000&@21
+@75
+@75
+@75
+|<+0#00e0e07&|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|<|e+0#af5f00255&|m|>+0#00e0e07&|B+2#0000000&|o|l|d| |I|t|a|l|i|c|<+0#00e0e07&|/|e+0#af5f00255&|m|>+0#00e0e07&|<|/|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|.+0#0000000&| @36
+|<+0#00e0e07&|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|<|e+0#af5f00255&|m|>+0#00e0e07&|B+2#0000000&|o|l|d| |I|t|a|l|i|c|<+0#00e0e07&|/|e+0#af5f00255&|m|>+0#00e0e07&|<|/|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|.+0#0000000&|<+0#00e0e07&|b+0#af5f00255&|r| +0#00e0e07&|/|>| +0#0000000&@30
+|<+0#00e0e07&|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|B+0#0000001#ffff4012|o|l|d|<+0#00e0e07#ffffff0|/|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|,+0#0000000&| |<+0#00e0e07&|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|B+0#0000001#ffff4012|o|l|d|<+0#00e0e07#ffffff0|/|s+0#af5f00255&|t|r|o|n|g|>+0#00e0e07&|.+0#0000000&| @29
+|<+0#00e0e07&|e+0#af5f00255&|m|>+0#00e0e07&|I+0#0000000&|t|a|l|i|c|<+0#00e0e07&|/|e+0#af5f00255&|m|>+0#00e0e07&|,+0#0000000&| |<+0#00e0e07&|e+0#af5f00255&|m|>+0#00e0e07&|I+0#0000000&|t|a|l|i|c|<+0#00e0e07&|/|e+0#af5f00255&|m|>+0#00e0e07&|.+0#0000000&| @41
+> @74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|5|,|1| @9|A|l@1|
diff --git a/runtime/syntax/testdir/dumps/modula2_iso_00.dump b/runtime/syntax/testdir/dumps/modula2_iso_00.dump
index 797376f..0c24cb8 100644
--- a/runtime/syntax/testdir/dumps/modula2_iso_00.dump
+++ b/runtime/syntax/testdir/dumps/modula2_iso_00.dump
@@ -17,4 +17,4 @@
|(+0#0000e05&|*| |p|r|e|d|e|f|i|n|e|d| |c|o|n|s|t|a|n|t|s| |*|)| +0#0000000&@48
|F+0#e000002&|A|L|S|E| +0#0000000&|N+0#e000002&|I|L| +0#0000000&|T+0#e000002&|R|U|E| +0#0000000&|I+0#e000002&|N|T|E|R@1|U|P|T|I|B|L|E| +0#0000000&|U+0#e000002&|N|I|N|T|E|R@1|U|P|T|I|B|L|E| +0#0000000&@30
@75
-|"|i|n|p|u|t|/|m|o|d|u|l|a|2|_|i|s|o|.|d|e|f|"| |1@1|4|L|,| |2|3|1|8|B| @21|1|,|1| @10|T|o|p|
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/modula2_pim_00.dump b/runtime/syntax/testdir/dumps/modula2_pim_00.dump
index 5e85b7a..36aa0de 100644
--- a/runtime/syntax/testdir/dumps/modula2_pim_00.dump
+++ b/runtime/syntax/testdir/dumps/modula2_pim_00.dump
@@ -17,4 +17,4 @@
|F+0#e000002&|A|L|S|E| +0#0000000&|N+0#e000002&|I|L| +0#0000000&|T+0#e000002&|R|U|E| +0#0000000&@60
@75
|(+0#0000e05&|*| |p|r|e|d|e|f|i|n|e|d| |t|y|p|e|s| |*|)| +0#0000000&@52
-|"|i|n|p|u|t|/|m|o|d|u|l|a|2|_|p|i|m|.|d|e|f|"| |1@2|L|,| |2|1|9|7|B| @21|1|,|1| @10|T|o|p|
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/modula2_r10_00.dump b/runtime/syntax/testdir/dumps/modula2_r10_00.dump
index ab4167a..a2e475e 100644
--- a/runtime/syntax/testdir/dumps/modula2_r10_00.dump
+++ b/runtime/syntax/testdir/dumps/modula2_r10_00.dump
@@ -17,4 +17,4 @@
|N+0#e000002&|I|L| +0#0000000&|F+0#e000002&|A|L|S|E| +0#0000000&|T+0#e000002&|R|U|E| +0#0000000&@60
@75
|(+0#0000e05&|*| |p|r|e|d|e|f|i|n|e|d| |t|y|p|e|s| |*|)| +0#0000000&@52
-|"|i|n|p|u|t|/|m|o|d|u|l|a|2|_|r|1|0|.|d|e|f|"| |1|4|6|L|,| |2|9|8|3|B| @21|1|,|1| @10|T|o|p|
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/sh_10_00.dump b/runtime/syntax/testdir/dumps/sh_10_00.dump
new file mode 100644
index 0000000..b0c98ea
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/sh_10_00.dump
@@ -0,0 +1,20 @@
+>#+0#0000e05#ffffff0|!|/|b|i|n|/|k|s|h| +0#0000000&@64
+@75
+|#+0#0000e05&| |T|h|i|s| |s|c|r|i|p|t| |i|s| |a| |t|e|s|t| |f|i|l|e| |f|o|r| |k|s|h|9|3| |s|h|a|r|e|d|-|s|t|a|t|e| +0#0000000&@23
+|#+0#0000e05&| |c|o|m@1|a|n|d| |s|u|b|s|t|i|t|u|t|i|o|n|s| |(|s|u|b|s|h|a|r|e|s|)| |a|n|d| |m|k|s|h| |v|a|l|u|e| +0#0000000&@24
+|#+0#0000e05&| |s|u|b|s|t|i|t|u|t|i|o|n|s| |(|v|a|l|s|u|b|s|)|.| +0#0000000&@48
+@75
+|#+0#0000e05&| |=@5| +0#0000000&@66
+|#+0#0000e05&| |B|e|l|o|w| |i|s| |s|u|b|s|h|a|r|e| |s|y|n|t|a|x| |s|u|p@1|o|r|t|e|d| |b|y| |b|o|t|h| |k|s|h|9|3| |a|n|d| |m|k|s|h|.| +0#0000000&@14
+|p+0#af5f00255&|r|i|n|t| +0#e000002&|$+0#e000e06&|{| |e+0#af5f00255&|c|h|o| +0#e000002&|o|n|e| +0#e000e06&|}| +0#0000000&@55
+|p+0#af5f00255&|r|i|n|t| +0#e000002&|$+0#e000e06&|{| @7|e+0#af5f00255&|c|h|o| +0#e000002&|t|w|o| +0#0000000&@50
+|}+0#e000e06&| +0#0000000&@73
+|p+0#af5f00255&|r|i|n|t| +0#e000002&|$+0#e000e06&|{| +0#0000000&@66
+|e+0#af5f00255&|c|h|o| +0#e000002&|t|h|r|e@1| +0#e000e06&@5|}| +0#0000000&@57
+|p+0#af5f00255&|r|i|n|t| +0#e000002&|$+0#e000e06&|{| |e+0#af5f00255&|c|h|o| +0#e000002&|'+0#af5f00255&|f+0#e000002&|o|u|r|'+0#af5f00255&|;| +0#e000e06&|}| +0#0000000&@51
+|p+0#af5f00255&|r|i|n|t| +0#e000002&|$+0#e000e06&|{| |e+0#af5f00255&|c|h|o| +0#e000002&|'+0#af5f00255&|f+0#e000002&|i|v|e|'+0#af5f00255&| +0#e000002&|;+0#e000e06&|}| +0#0000000&@51
+|p+0#af5f00255&|r|i|n|t| +0#e000002&|$+0#e000e06&|{| |e+0#af5f00255&|c|h|o| +0#e000002&|'+0#af5f00255&|s+0#e000002&|i|x|'+0#af5f00255&| +0#0000000&@55
+|}+0#e000e06&| +0#0000000&@73
+|p+0#af5f00255&|r|i|n|t| +0#e000002&|$+0#e000e06&|{| @7|e+0#af5f00255&|c|h|o| +0#e000002&|'+0#af5f00255&|s+0#e000002&|e|v|e|n|'+0#af5f00255&| +0#e000e06&@3|}| +0#0000000&@41
+|e+0#af5f00255&|c|h|o| +0#e000002&|$+0#e000e06&|{| |p+0#af5f00255&|r|i|n|t| +0#e000002&|'+0#af5f00255&|e+0#e000002&|i|g|h|t|'+0#af5f00255&| +0#e000e06&@2|}| +0#0000000&@49
+|i|s|_|k|o|r|n|s|h|e|l@1|:| |1|,| @40|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/sh_10_01.dump b/runtime/syntax/testdir/dumps/sh_10_01.dump
new file mode 100644
index 0000000..c1d3531
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/sh_10_01.dump
@@ -0,0 +1,20 @@
+|p+0#af5f00255#ffffff0|r|i|n|t| +0#e000002&|$+0#e000e06&|{| |e+0#af5f00255&|c|h|o| +0#e000002&|'+0#af5f00255&|f+0#e000002&|o|u|r|'+0#af5f00255&|;| +0#e000e06&|}| +0#0000000&@51
+|p+0#af5f00255&|r|i|n|t| +0#e000002&|$+0#e000e06&|{| |e+0#af5f00255&|c|h|o| +0#e000002&|'+0#af5f00255&|f+0#e000002&|i|v|e|'+0#af5f00255&| +0#e000002&|;+0#e000e06&|}| +0#0000000&@51
+|p+0#af5f00255&|r|i|n|t| +0#e000002&|$+0#e000e06&|{| |e+0#af5f00255&|c|h|o| +0#e000002&|'+0#af5f00255&|s+0#e000002&|i|x|'+0#af5f00255&| +0#0000000&@55
+|}+0#e000e06&| +0#0000000&@73
+|p+0#af5f00255&|r|i|n|t| +0#e000002&|$+0#e000e06&|{| @7|e+0#af5f00255&|c|h|o| +0#e000002&|'+0#af5f00255&|s+0#e000002&|e|v|e|n|'+0#af5f00255&| +0#e000e06&@3|}| +0#0000000&@41
+>e+0#af5f00255&|c|h|o| +0#e000002&|$+0#e000e06&|{| |p+0#af5f00255&|r|i|n|t| +0#e000002&|'+0#af5f00255&|e+0#e000002&|i|g|h|t|'+0#af5f00255&| +0#e000e06&@2|}| +0#0000000&@49
+|t+0#af5f00255&|y|p|e|s|e|t| +0#0000000&|n+0#00e0e07&|i|n|e|=+0#0000000&|$+0#e000e06&|{| |p+0#af5f00255&|w|d|;| +0#e000e06&|}| +0#0000000&@52
+@75
+|#+0#0000e05&| |=@5| +0#0000000&@66
+|#+0#0000e05&| |V|a|l|u|e| |s|u|b|s|t|i|t|u|t|i|o|n|s| |o|f| |t|h|e| |f|o|r|m| |$|{|||c|o|m@1|a|n|d|}| |a|r|e| |o|n|l|y| +0#0000000&@20
+|#+0#0000e05&| |s|u|p@1|o|r|t|e|d| |b|y| |m|k|s|h|,| |n|o|t| |k|s|h|9|3|.| +0#0000000&@43
+|i+0#af5f00255&|f| |!| +0#0000000&|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|e+0#af5f00255&|v|a|l| +0#0000000&|'+0#af5f00255&|(+0#e000002&@1|.|s|h|.|v|e|r|s|i|o|n| |>|=| |2|0@1|7|0|7|0|3|)@1|'+0#af5f00255&| +0#0000000&|2+0#e000002&|>+0#af5f00255&|/+0#0000000&|d|e|v|/|n|u|l@1|;+0#af5f00255&| +0#0000000&|t+0#af5f00255&|h|e|n| +0#0000000&@9
+| +0#00e0e07&@7|v|a|l|s|u|b|f|u|n|c|(|)| |{| +0#0000000&@52
+@16|R+0#e000e06&|E|P|L|Y|=+0#af5f00255&|$+0#e000e06&|1| +0#0000000&@50
+@8|}+0#00e0e07&| +0#0000000&@65
+@8|e+0#af5f00255&|c|h|o| +0#e000002&|$+0#e000e06&|{|||v|a|l|s|u|b|f|u|n|c| |t|e|n|}| +0#0000000&@43
+@8|p+0#af5f00255&|r|i|n|t| +0#e000002&|"+0#af5f00255&|$+0#e000e06&|{|||v|a|l|s|u|b|f|u|n|c| |e|l|e|v|e|n|;+0#af5f00255&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@36
+@8|p+0#af5f00255&|r|i|n|t|f| +0#0000000&|'+0#af5f00255&|%+0#e000002&|s|'+0#af5f00255&| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|{|||v|a|l|s|u|b|f|u|n|c| |t|w|e|l|v|e| @6|}|"+0#af5f00255&| +0#0000000&@24
+@8|u+0#00e0e07&|n|l|u|c|k|y|=+0#0000000&|$+0#e000e06&|{|||v|a|l|s|u|b|f|u|n|c| |t|h|i|r|t|e@1|n| +0#0000000&@36
+@57|1|9|,|1| @9|4|3|%|
diff --git a/runtime/syntax/testdir/dumps/sh_10_02.dump b/runtime/syntax/testdir/dumps/sh_10_02.dump
new file mode 100644
index 0000000..e03c3f8
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/sh_10_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|u+0#00e0e07&|n|l|u|c|k|y|=+0#0000000&|$+0#e000e06&|{|||v|a|l|s|u|b|f|u|n|c| |t|h|i|r|t|e@1|n| +0#0000000&@36
+|}+0#e000e06&| +0#0000000&@73
+@8|t+0#af5f00255&|y|p|e|s|e|t| +0#0000000&|n+0#00e0e07&|o|t|a|f|l|o|a|t|=+0#0000000&|$+0#e000e06&|{|||v|a|l|s|u|b|f|u|n|c| |n|o|t|a|n|u|m|b|e|r| @5|}| +0#0000000&@17
+@8|p+0#af5f00255&|r|i|n|t| +0#e000002&|$+0#e000e06&|u|n|l|u|c|k|y| +0#e000002&|$+0#e000e06&|n|o|t|a|n|u|m|b|e|r| +0#0000000&@40
+@8|$+0#e000e06&|{|||e+0#af5f00255&|c|h|o| +0#e000002&|f|o@1|}+0#e000e06&| +0#0000000&@54
+@8>$+0#e000e06&|{|||e+0#af5f00255&|c|h|o| +0#e000002&|b|a|r| +0#0000000&@55
+|}+0#e000e06&| +0#0000000&@73
+|f+0#af5f00255&|i| +0#0000000&@72
+@75
+|#+0#0000e05&| |=@5| +0#0000000&@66
+|#+0#0000e05&| |S|h|a|r|e|d|-|s|t|a|t|e| |c|o|m@1|a|n|d| |s|u|b|s|t|i|t|u|t|i|o|n|s| |u|s|i|n|g| |t|h|e| |s|y|n|t|a|x| |$|{|<|f|i|l|e|;|}| +0#0000000&@11
+|#+0#0000e05&| |a|r|e| |o|n|l|y| |s|u|p@1|o|r|t|e|d| |b|y| |k|s|h|9|3|,| |n|o|t| |m|k|s|h|.| +0#0000000&@34
+|e+0#af5f00255&|c|h|o| +0#e000002&|$+0#e000e06&|{| +0#0000000&@67
+| +0#e000e06&@7|p+0#af5f00255&|r|i|n|t|f| +0#e000e06&|%|s| |s|t|r| +0#0000000&@53
+|}+0#e000e06&| +0#e000002&|>+0#af5f00255&| +0#0000000&|/|t|m|p|/|s|t|r|f|i|l|e| @58
+|e+0#af5f00255&|c|h|o| +0#e000002&|$+0#e000e06&|{|<+0#af5f00255&|/+0#e000e06&|t|m|p|/|s|t|r|f|i|l|e|;|}| +0#0000000&@52
+@75
+|e+0#af5f00255&|x|i|t| +0#0000000&|0+0#e000002&| +0#0000000&@68
+|~+0#4040ff13&| @73
+| +0#0000000&@56|3|7|,|2|-|9| @7|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/sh_10_99.dump b/runtime/syntax/testdir/dumps/sh_10_99.dump
new file mode 100644
index 0000000..f97ea32
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/sh_10_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|p+0#af5f00255&|r|i|n|t|f| +0#0000000&|'+0#af5f00255&|%+0#e000002&|s|'+0#af5f00255&| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|{|||v|a|l|s|u|b|f|u|n|c| |t|w|e|l|v|e| @6|}|"+0#af5f00255&| +0#0000000&@24
+@8|u+0#00e0e07&|n|l|u|c|k|y|=+0#0000000&|$+0#e000e06&|{|||v|a|l|s|u|b|f|u|n|c| |t|h|i|r|t|e@1|n| +0#0000000&@36
+|}+0#e000e06&| +0#0000000&@73
+@8|t+0#af5f00255&|y|p|e|s|e|t| +0#0000000&|n+0#00e0e07&|o|t|a|f|l|o|a|t|=+0#0000000&|$+0#e000e06&|{|||v|a|l|s|u|b|f|u|n|c| |n|o|t|a|n|u|m|b|e|r| @5|}| +0#0000000&@17
+@8|p+0#af5f00255&|r|i|n|t| +0#e000002&|$+0#e000e06&|u|n|l|u|c|k|y| +0#e000002&|$+0#e000e06&|n|o|t|a|n|u|m|b|e|r| +0#0000000&@40
+@8|$+0#e000e06&|{|||e+0#af5f00255&|c|h|o| +0#e000002&|f|o@1|}+0#e000e06&| +0#0000000&@54
+@8|$+0#e000e06&|{|||e+0#af5f00255&|c|h|o| +0#e000002&|b|a|r| +0#0000000&@55
+|}+0#e000e06&| +0#0000000&@73
+|f+0#af5f00255&|i| +0#0000000&@72
+@75
+|#+0#0000e05&| |=@5| +0#0000000&@66
+|#+0#0000e05&| |S|h|a|r|e|d|-|s|t|a|t|e| |c|o|m@1|a|n|d| |s|u|b|s|t|i|t|u|t|i|o|n|s| |u|s|i|n|g| |t|h|e| |s|y|n|t|a|x| |$|{|<|f|i|l|e|;|}| +0#0000000&@11
+|#+0#0000e05&| |a|r|e| |o|n|l|y| |s|u|p@1|o|r|t|e|d| |b|y| |k|s|h|9|3|,| |n|o|t| |m|k|s|h|.| +0#0000000&@34
+|e+0#af5f00255&|c|h|o| +0#e000002&|$+0#e000e06&|{| +0#0000000&@67
+| +0#e000e06&@7|p+0#af5f00255&|r|i|n|t|f| +0#e000e06&|%|s| |s|t|r| +0#0000000&@53
+|}+0#e000e06&| +0#e000002&|>+0#af5f00255&| +0#0000000&|/|t|m|p|/|s|t|r|f|i|l|e| @58
+|e+0#af5f00255&|c|h|o| +0#e000002&|$+0#e000e06&|{|<+0#af5f00255&|/+0#e000e06&|t|m|p|/|s|t|r|f|i|l|e|;|}| +0#0000000&@52
+@75
+>e+0#af5f00255&|x|i|t| +0#0000000&|0+0#e000002&| +0#0000000&@68
+@57|4|9|,|1| @9|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/sh_11_00.dump b/runtime/syntax/testdir/dumps/sh_11_00.dump
new file mode 100644
index 0000000..f2d1d27
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/sh_11_00.dump
@@ -0,0 +1,20 @@
+>#+0#0000e05#ffffff0|!|/|b|i|n|/|b|a|s|h| +0#0000000&@63
+@75
+|#+0#0000e05&| |I|s@1|u|e| |#|9|6|2| +0#0000000&@62
+@75
+|a+0#00e0e07&|r@1|=+0#0000000&|(+0#e000e06&| +0#0000000&@69
+@2|1+0#e000002&| +0#0000000&|2+0#e000002&| +0#0000000&|3+0#e000002&| +0#0000000&|4+0#e000002&| +0#0000000&@65
+|)+0#e000e06&| +0#0000000&|#+0#0000e05&| |o|k| +0#0000000&@68
+@75
+|i+0#af5f00255&|f| |t|r|u|e|;| +0#0000000&|t+0#af5f00255&|h|e|n| +0#0000000&@61
+@75
+@2|a+0#00e0e07&|r@1|=+0#0000000&|(+0#e000e06&|1+0#e000002&| +0#0000000&|2+0#e000002&| +0#0000000&|3+0#e000002&| +0#0000000&|4+0#e000002&|)+0#e000e06&| +0#0000000&|#+0#0000e05&| |o|k| +0#0000000&@54
+@75
+@2|a+0#00e0e07&|r@1|=+0#0000000&|(+0#e000e06&| +0#0000000&|1+0#e000002&| +0#0000000&|2+0#e000002&| +0#0000000&|3+0#e000002&| +0#0000000&|4+0#e000002&| +0#0000000&|)+0#e000e06&| +0#0000000&|#+0#0000e05&| |o|k| +0#0000000&@52
+@75
+@2|a+0#00e0e07&|r@1|=+0#0000000&|(+0#e000e06&| +0#0000000&@67
+@4|1+0#e000002&| +0#0000000&|2+0#e000002&| +0#0000000&|3+0#e000002&| +0#0000000&|4+0#e000002&| +0#0000000&@63
+@2|)+0#e000e06&| +0#0000000&|#+0#0000e05&| |p|a|r|e|n| |e|r@1|o|r|!| +0#0000000&@56
+@75
+|f+0#af5f00255&|i| +0#0000000&@72
+|i|s|_|b|a|s|h|:| |1|,| @45|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/sh_11_99.dump b/runtime/syntax/testdir/dumps/sh_11_99.dump
new file mode 100644
index 0000000..9612dab
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/sh_11_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|#+0#0000e05&| |I|s@1|u|e| |#|9|6|2| +0#0000000&@62
+@75
+|a+0#00e0e07&|r@1|=+0#0000000&|(+0#e000e06&| +0#0000000&@69
+@2|1+0#e000002&| +0#0000000&|2+0#e000002&| +0#0000000&|3+0#e000002&| +0#0000000&|4+0#e000002&| +0#0000000&@65
+|)+0#e000e06&| +0#0000000&|#+0#0000e05&| |o|k| +0#0000000&@68
+@75
+|i+0#af5f00255&|f| |t|r|u|e|;| +0#0000000&|t+0#af5f00255&|h|e|n| +0#0000000&@61
+@75
+@2|a+0#00e0e07&|r@1|=+0#0000000&|(+0#e000e06&|1+0#e000002&| +0#0000000&|2+0#e000002&| +0#0000000&|3+0#e000002&| +0#0000000&|4+0#e000002&|)+0#e000e06&| +0#0000000&|#+0#0000e05&| |o|k| +0#0000000&@54
+@75
+@2|a+0#00e0e07&|r@1|=+0#0000000&|(+0#e000e06&| +0#0000000&|1+0#e000002&| +0#0000000&|2+0#e000002&| +0#0000000&|3+0#e000002&| +0#0000000&|4+0#e000002&| +0#0000000&|)+0#e000e06&| +0#0000000&|#+0#0000e05&| |o|k| +0#0000000&@52
+@75
+@2|a+0#00e0e07&|r@1|=+0#0000000&|(+0#e000e06&| +0#0000000&@67
+@4|1+0#e000002&| +0#0000000&|2+0#e000002&| +0#0000000&|3+0#e000002&| +0#0000000&|4+0#e000002&| +0#0000000&@63
+@2|)+0#e000e06&| +0#0000000&|#+0#0000e05&| |p|a|r|e|n| |e|r@1|o|r|!| +0#0000000&@56
+@75
+|f+0#af5f00255&|i| +0#0000000&@72
+> @74
+@57|2|0|,|0|-|1| @7|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_abbreviate_00.dump b/runtime/syntax/testdir/dumps/vim_ex_abbreviate_00.dump
new file mode 100644
index 0000000..5224a4f
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_abbreviate_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|a|b@1|r|e|v|i|a|t|e| |c|o|m@1|a|n|d|s| +0#0000000&@48
+@75
+|a+0#af5f00255&|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|f|o@1| |f|o@1|b|a|r| @48
+|c+0#af5f00255&|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|c|f|o@1| |c|f|o@1|b|a|r| @45
+|i+0#af5f00255&|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|i|f|o@1| |c|f|o@1|b|a|r| @45
+@75
+|a+0#af5f00255&|b@1|r|e|v| +0#0000000&|<+0#e000e06&|e|x|p|r|>| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|f|o@1| |f|o@1|b|a|r| @41
+|c+0#af5f00255&|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|e|x|p|r|>| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|c|f|o@1| |c|f|o@1|b|a|r| @38
+|i+0#af5f00255&|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|e|x|p|r|>| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|i|f|o@1| |c|f|o@1|b|a|r| @38
+@75
+|n+0#af5f00255&|o|r|e|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|f|o@1| |f|o@1|b|a|r| @44
+|c+0#af5f00255&|n|o|r|e|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|c|f|o@1| |c|f|o@1|b|a|r| @41
+|i+0#af5f00255&|n|o|r|e|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|i|f|o@1| |c|f|o@1|b|a|r| @41
+@75
+|a+0#af5f00255&|b@1|r|e|v| +0#0000000&|<+0#e000e06&|e|x|p|r|>| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|f|o@1| |f|o@1|b|a|r| @41
+|c+0#af5f00255&|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|e|x|p|r|>| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|c|f|o@1| |c|f|o@1|b|a|r| @38
+|i+0#af5f00255&|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|e|x|p|r|>| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|i|f|o@1| |c|f|o@1|b|a|r| @38
+@75
+|u+0#af5f00255&|n|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|f|o@1| @53
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_abbreviate_01.dump b/runtime/syntax/testdir/dumps/vim_ex_abbreviate_01.dump
new file mode 100644
index 0000000..c5cc26f
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_abbreviate_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|a+0#af5f00255&|b@1|r|e|v| +0#0000000&|<+0#e000e06&|e|x|p|r|>| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|f|o@1| |f|o@1|b|a|r| @41
+|c+0#af5f00255&|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|e|x|p|r|>| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|c|f|o@1| |c|f|o@1|b|a|r| @38
+|i+0#af5f00255&|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|e|x|p|r|>| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|i|f|o@1| |c|f|o@1|b|a|r| @38
+@75
+>u+0#af5f00255&|n|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|f|o@1| @53
+|c+0#af5f00255&|u|n|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|c|f|o@1| @51
+|i+0#af5f00255&|u|n|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|i|f|o@1| @51
+@75
+|a+0#af5f00255&|b|c|l|e|a|r| +0#0000000&|<+0#af5f00255&|b|u|f@1|e|r|>| +0#0000000&@58
+|c+0#af5f00255&|a|b|c|l|e|a|r| +0#0000000&|<+0#af5f00255&|b|u|f@1|e|r|>| +0#0000000&@57
+|i+0#af5f00255&|a|b|c|l|e|a|r| +0#0000000&|<+0#af5f00255&|b|u|f@1|e|r|>| +0#0000000&@57
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|9|,|1| @9|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_abbreviate_99.dump b/runtime/syntax/testdir/dumps/vim_ex_abbreviate_99.dump
new file mode 100644
index 0000000..5cec5ee
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_abbreviate_99.dump
@@ -0,0 +1,20 @@
+|a+0#af5f00255#ffffff0|b@1|r|e|v| +0#0000000&|<+0#e000e06&|e|x|p|r|>| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|f|o@1| |f|o@1|b|a|r| @41
+|c+0#af5f00255&|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|e|x|p|r|>| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|c|f|o@1| |c|f|o@1|b|a|r| @38
+|i+0#af5f00255&|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|e|x|p|r|>| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|i|f|o@1| |c|f|o@1|b|a|r| @38
+@75
+|n+0#af5f00255&|o|r|e|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|f|o@1| |f|o@1|b|a|r| @44
+|c+0#af5f00255&|n|o|r|e|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|c|f|o@1| |c|f|o@1|b|a|r| @41
+|i+0#af5f00255&|n|o|r|e|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|i|f|o@1| |c|f|o@1|b|a|r| @41
+@75
+|a+0#af5f00255&|b@1|r|e|v| +0#0000000&|<+0#e000e06&|e|x|p|r|>| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|f|o@1| |f|o@1|b|a|r| @41
+|c+0#af5f00255&|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|e|x|p|r|>| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|c|f|o@1| |c|f|o@1|b|a|r| @38
+|i+0#af5f00255&|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|e|x|p|r|>| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|i|f|o@1| |c|f|o@1|b|a|r| @38
+@75
+|u+0#af5f00255&|n|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|f|o@1| @53
+|c+0#af5f00255&|u|n|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|c|f|o@1| @51
+|i+0#af5f00255&|u|n|a|b@1|r|e|v| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|i|f|o@1| @51
+@75
+|a+0#af5f00255&|b|c|l|e|a|r| +0#0000000&|<+0#af5f00255&|b|u|f@1|e|r|>| +0#0000000&@58
+|c+0#af5f00255&|a|b|c|l|e|a|r| +0#0000000&|<+0#af5f00255&|b|u|f@1|e|r|>| +0#0000000&@57
+>i+0#af5f00255&|a|b|c|l|e|a|r| +0#0000000&|<+0#af5f00255&|b|u|f@1|e|r|>| +0#0000000&@57
+@57|2|5|,|1| @9|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_augroup_00.dump b/runtime/syntax/testdir/dumps/vim_ex_augroup_00.dump
new file mode 100644
index 0000000..0424482
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_augroup_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|a|u|g|r|o|u|p| |c|o|m@1|a|n|d| +0#0000000&@52
+@75
+|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|f|o@1| @63
+@2|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&|B+0#00e0003&|u|f|R|e|a|d| +0#0000000&|*| |e+0#af5f00255&|c|h|o|m|s|g| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@41
+|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @63
+@75
+|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|f|o@1| ||| |a+0#af5f00255&|u|t|o|c|m|d|!| +0#0000000&||| |a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @38
+|a+0#af5f00255&|u|g|r|o|u|p|!| +0#0000000&|f|o@1| @62
+@75
+|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|!|@|#|$|%|^|&|*|(|)|_|+| @54
+@2|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&|B+0#00e0003&|u|f|R|e|a|d| +0#0000000&|*| |e+0#af5f00255&|c|h|o|m|s|g| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@41
+|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @63
+@75
+|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|!|@|#|$|%|^|&|*|(|)|_|+| ||| |a+0#af5f00255&|u|t|o|c|m|d|!| +0#0000000&||| |a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @29
+|a+0#af5f00255&|u|g|r|o|u|p|!| +0#0000000&|!|@|#|$|%|^|&|*|(|)|_|+| @53
+@75
+|"+0#0000e05&| |l|i|s|t| |g|r|o|u|p|s| +0#0000000&@61
+|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&@67
+@75
+@57|1|,|1| @10|A|l@1|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_augroup_99.dump b/runtime/syntax/testdir/dumps/vim_ex_augroup_99.dump
new file mode 100644
index 0000000..1e07f5b
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_augroup_99.dump
@@ -0,0 +1,20 @@
+|"+0#0000e05#ffffff0| |V|i|m| |:|a|u|g|r|o|u|p| |c|o|m@1|a|n|d| +0#0000000&@52
+@75
+|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|f|o@1| @63
+@2|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&|B+0#00e0003&|u|f|R|e|a|d| +0#0000000&|*| |e+0#af5f00255&|c|h|o|m|s|g| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@41
+|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @63
+@75
+|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|f|o@1| ||| |a+0#af5f00255&|u|t|o|c|m|d|!| +0#0000000&||| |a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @38
+|a+0#af5f00255&|u|g|r|o|u|p|!| +0#0000000&|f|o@1| @62
+@75
+|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|!|@|#|$|%|^|&|*|(|)|_|+| @54
+@2|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&|B+0#00e0003&|u|f|R|e|a|d| +0#0000000&|*| |e+0#af5f00255&|c|h|o|m|s|g| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@41
+|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @63
+@75
+|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|!|@|#|$|%|^|&|*|(|)|_|+| ||| |a+0#af5f00255&|u|t|o|c|m|d|!| +0#0000000&||| |a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @29
+|a+0#af5f00255&|u|g|r|o|u|p|!| +0#0000000&|!|@|#|$|%|^|&|*|(|)|_|+| @53
+@75
+|"+0#0000e05&| |l|i|s|t| |g|r|o|u|p|s| +0#0000000&@61
+|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&@67
+> @74
+@57|1|9|,|0|-|1| @7|A|l@1|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_behave_00.dump b/runtime/syntax/testdir/dumps/vim_ex_behave_00.dump
new file mode 100644
index 0000000..b3c57de
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_behave_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |b|e|h|a|v|e| |c|o|m@1|a|n|d| +0#0000000&@54
+@75
+|b+0#af5f00255&|e|h|a|v|e| +0#0000000&|m+0#af5f00255&|s|w|i|n| +0#0000000&@62
+|b+0#af5f00255&|e|h|a|v|e| +0#0000000&|x+0#af5f00255&|t|e|r|m| +0#0000000&@62
+@75
+|b+0#af5f00255&|e|h|a|v|e|!| +0#0000000&|m+0#af5f00255&|s|w|i|n| +0#0000000&@61
+|b+0#af5f00255&|e|h|a|v|e|!| +0#0000000&|x+0#af5f00255&|t|e|r|m| +0#0000000&@61
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|,|1| @10|A|l@1|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_behave_99.dump b/runtime/syntax/testdir/dumps/vim_ex_behave_99.dump
new file mode 100644
index 0000000..c3fefeb
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_behave_99.dump
@@ -0,0 +1,20 @@
+|"+0#0000e05#ffffff0| |V|i|m| |b|e|h|a|v|e| |c|o|m@1|a|n|d| +0#0000000&@54
+@75
+|b+0#af5f00255&|e|h|a|v|e| +0#0000000&|m+0#af5f00255&|s|w|i|n| +0#0000000&@62
+|b+0#af5f00255&|e|h|a|v|e| +0#0000000&|x+0#af5f00255&|t|e|r|m| +0#0000000&@62
+@75
+|b+0#af5f00255&|e|h|a|v|e|!| +0#0000000&|m+0#af5f00255&|s|w|i|n| +0#0000000&@61
+>b+0#af5f00255&|e|h|a|v|e|!| +0#0000000&|x+0#af5f00255&|t|e|r|m| +0#0000000&@61
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|7|,|1| @10|A|l@1|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_command_00.dump b/runtime/syntax/testdir/dumps/vim_ex_command_00.dump
new file mode 100644
index 0000000..3123889
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_command_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|c|o|m@1|a|n|d| |c|o|m@1|a|n|d| +0#0000000&@52
+@75
+|"+0#0000e05&| |I|s@1|u|e| |#|1|4|1|3|5| +0#0000000&@60
+@75
+|c+0#af5f00255&|o|m| +0#0000000&|F|o@1| |c+0#af5f00255&|a|l@1| +0#0000000&|s+0#00e0e07&|y|s|t|e|m|(+0#0000000&|'+0#e000002&|l|s|'|)+0#0000000&| @49
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|,|1| @10|A|l@1|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_command_99.dump b/runtime/syntax/testdir/dumps/vim_ex_command_99.dump
new file mode 100644
index 0000000..96cfa16
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_command_99.dump
@@ -0,0 +1,20 @@
+|"+0#0000e05#ffffff0| |V|i|m| |:|c|o|m@1|a|n|d| |c|o|m@1|a|n|d| +0#0000000&@52
+@75
+|"+0#0000e05&| |I|s@1|u|e| |#|1|4|1|3|5| +0#0000000&@60
+@75
+>c+0#af5f00255&|o|m| +0#0000000&|F|o@1| |c+0#af5f00255&|a|l@1| +0#0000000&|s+0#00e0e07&|y|s|t|e|m|(+0#0000000&|'+0#e000002&|l|s|'|)+0#0000000&| @49
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|5|,|1| @10|A|l@1|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_00.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_00.dump
index bb68b0c..863ae38 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_00.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_00.dump
@@ -13,8 +13,8 @@
|:| |h+0#af5f00255&|e|l|p| +0#0000000&@68
@1|:| |h+0#af5f00255&|e|l|p| +0#0000000&@67
@75
+|:|2+0#af5f00255&|m|a|t|c|h| +0#0000000&@67
+|:|3+0#af5f00255&|m|a|t|c|h| +0#0000000&@67
|:+0#af5f00255&|a|p@1|e|n|d| +0#0000000&@67
| +0#e000002&@3|t|e|x|t| +0#0000000&@66
-|.+0#af5f00255&| +0#0000000&@73
-|:|a+0#af5f00255&|b@1|r|e|v|i|a|t|e| +0#0000000&@63
-|"|i|n|p|u|t|/|v|i|m|_|e|x|_|c|o|m@1|a|n|d|s|.|v|i|m|"| |1@1|9|1|L|,| |1|7|2|4|5|B| @15|1|,|1| @10|T|o|p|
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_01.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_01.dump
index 25a889c..23936b8 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_01.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_01.dump
@@ -1,9 +1,11 @@
| +0&#ffffff0|:| |h+0#af5f00255&|e|l|p| +0#0000000&@67
@75
+|:|2+0#af5f00255&|m|a|t|c|h| +0#0000000&@67
+|:|3+0#af5f00255&|m|a|t|c|h| +0#0000000&@67
|:+0#af5f00255&|a|p@1|e|n|d| +0#0000000&@67
-| +0#e000002&@3|t|e|x|t| +0#0000000&@66
+| +0#e000002&@3>t|e|x|t| +0#0000000&@66
|.+0#af5f00255&| +0#0000000&@73
->:|a+0#af5f00255&|b@1|r|e|v|i|a|t|e| +0#0000000&@63
+|:|a+0#af5f00255&|b@1|r|e|v|i|a|t|e| +0#0000000&@63
|:|a+0#af5f00255&|b|c|l|e|a|r| +0#0000000&@66
|:|a+0#af5f00255&|b|o|v|e|l|e|f|t| +0#0000000&@64
|:|a+0#af5f00255&|l@1| +0#0000000&@70
@@ -15,6 +17,4 @@
|:|a+0#af5f00255&|r|g|d|e|l|e|t|e| +0#0000000&@64
|:|a+0#af5f00255&|r|g|e|d|i|t| +0#0000000&@66
|:|a+0#af5f00255&|r|g|d|o| +0#0000000&@68
-|:|a+0#af5f00255&|r|g@1|l|o|b|a|l| +0#0000000&@64
-|:|a+0#af5f00255&|r|g|l|o|c|a|l| +0#0000000&@65
-@57|1|9|,|1| @10|1|%|
+@57|1|9|,|5| @10|1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_02.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_02.dump
index 2fb09df..0a2fbfa 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_02.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_02.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|a+0#af5f00255&|r|g|l|o|c|a|l| +0#0000000&@65
+|:+0&#ffffff0|a+0#af5f00255&|r|g|d|o| +0#0000000&@68
+|:|a+0#af5f00255&|r|g@1|l|o|b|a|l| +0#0000000&@64
+|:|a+0#af5f00255&|r|g|l|o|c|a|l| +0#0000000&@65
|:|a+0#af5f00255&|r|g|u|m|e|n|t| +0#0000000&@65
|:|a+0#af5f00255&|s|c|i@1| +0#0000000&@68
-|:|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&@66
+>:|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&@66
|:|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|F|o@1| @62
->:|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @62
+|:|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @62
|:|a+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@66
|:|b+0#af5f00255&|u|f@1|e|r| +0#0000000&@67
|:|b+0#af5f00255&|N|e|x|t| +0#0000000&@68
@@ -15,6 +17,4 @@
|:|b+0#af5f00255&|e|h|a|v|e| +0#0000000&|x+0#af5f00255&|t|e|r|m| +0#0000000&@61
|:|b+0#af5f00255&|e|l|o|w|r|i|g|h|t| +0#0000000&@63
|:|b+0#af5f00255&|f|i|r|s|t| +0#0000000&@67
-|:|b+0#af5f00255&|l|a|s|t| +0#0000000&@68
-|:|b+0#af5f00255&|m|o|d|i|f|i|e|d| +0#0000000&@64
@57|3|7|,|1| @10|2|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_03.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_03.dump
index 1cb1136..9986dbb 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_03.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_03.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|b+0#af5f00255&|m|o|d|i|f|i|e|d| +0#0000000&@64
+|:+0&#ffffff0|b+0#af5f00255&|f|i|r|s|t| +0#0000000&@67
+|:|b+0#af5f00255&|l|a|s|t| +0#0000000&@68
+|:|b+0#af5f00255&|m|o|d|i|f|i|e|d| +0#0000000&@64
|:|b+0#af5f00255&|n|e|x|t| +0#0000000&@68
|:|b+0#af5f00255&|o|t|r|i|g|h|t| +0#0000000&@65
-|:|b+0#af5f00255&|p|r|e|v|i|o|u|s| +0#0000000&@64
+>:|b+0#af5f00255&|p|r|e|v|i|o|u|s| +0#0000000&@64
|:|b+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@66
->:|b+0#af5f00255&|r|e|a|k| +0#0000000&@68
+|:|b+0#af5f00255&|r|e|a|k| +0#0000000&@68
|:|b+0#af5f00255&|r|e|a|k|a|d@1| +0#0000000&@65
|:|b+0#af5f00255&|r|e|a|k|d|e|l| +0#0000000&@65
|:|b+0#af5f00255&|r|e|a|k|l|i|s|t| +0#0000000&@64
@@ -15,6 +17,4 @@
|:+0#af5f00255&|c|h|a|n|g|e| +0#0000000&@67
| +0#e000002&@3|t|e|x|t| +0#0000000&@66
|.+0#af5f00255&| +0#0000000&@73
-|:|c+0#af5f00255&|N|e|x|t| +0#0000000&@68
-|:|c+0#af5f00255&|N|f|i|l|e| +0#0000000&@67
@57|5@1|,|1| @10|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_04.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_04.dump
index 4d514b0..a22dd93 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_04.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_04.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|c+0#af5f00255&|N|f|i|l|e| +0#0000000&@67
+|.+0#af5f00255#ffffff0| +0#0000000&@73
+|:|c+0#af5f00255&|N|e|x|t| +0#0000000&@68
+|:|c+0#af5f00255&|N|f|i|l|e| +0#0000000&@67
|:|c+0#af5f00255&|a|b@1|r|e|v| +0#0000000&@66
|:|c+0#af5f00255&|a|b|c|l|e|a|r| +0#0000000&@65
-|:|c+0#af5f00255&|a|b|o|v|e| +0#0000000&@67
+>:|c+0#af5f00255&|a|b|o|v|e| +0#0000000&@67
|:|c+0#af5f00255&|a|d@1|b|u|f@1|e|r| +0#0000000&@63
->:|c+0#af5f00255&|a|d@1|e|x|p|r| +0#0000000&@65
+|:|c+0#af5f00255&|a|d@1|e|x|p|r| +0#0000000&@65
|:|c+0#af5f00255&|a|d@1|f|i|l|e| +0#0000000&@65
|:|c+0#af5f00255&|a|f|t|e|r| +0#0000000&@67
|:|c+0#af5f00255&|a|l@1| +0#0000000&@69
@@ -15,6 +17,4 @@
|:|c+0#af5f00255&@1| +0#0000000&@71
|:|c+0#af5f00255&@1|l|o|s|e| +0#0000000&@67
|:|c+0#af5f00255&|d| +0#0000000&@71
-|:|c+0#af5f00255&|d|o| +0#0000000&@70
-|:|c+0#af5f00255&|f|d|o| +0#0000000&@69
@57|7|3|,|1| @10|5|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_05.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_05.dump
index 15c72f8..f280535 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_05.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_05.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|c+0#af5f00255&|f|d|o| +0#0000000&@69
+|:+0&#ffffff0|c+0#af5f00255&|d| +0#0000000&@71
+|:|c+0#af5f00255&|d|o| +0#0000000&@70
+|:|c+0#af5f00255&|f|d|o| +0#0000000&@69
|:|c+0#af5f00255&|e|n|t|e|r| +0#0000000&@67
|:|c+0#af5f00255&|e|x|p|r| +0#0000000&@68
-|:|c+0#af5f00255&|f|i|l|e| +0#0000000&@68
+>:|c+0#af5f00255&|f|i|l|e| +0#0000000&@68
|:|c+0#af5f00255&|f|i|r|s|t| +0#0000000&@67
->:|c+0#af5f00255&|g|e|t|b|u|f@1|e|r| +0#0000000&@63
+|:|c+0#af5f00255&|g|e|t|b|u|f@1|e|r| +0#0000000&@63
|:|c+0#af5f00255&|g|e|t|e|x|p|r| +0#0000000&@65
|:|c+0#af5f00255&|g|e|t|f|i|l|e| +0#0000000&@65
|:|c+0#af5f00255&|h|a|n|g|e|s| +0#0000000&@66
@@ -15,6 +17,4 @@
|:|c+0#af5f00255&|l|a|s|t| +0#0000000&@68
|:|c+0#af5f00255&|l|e|a|r|j|u|m|p|s| +0#0000000&@63
|:|c+0#af5f00255&|l|i|s|t| +0#0000000&@68
-|:|c+0#af5f00255&|l|o|s|e| +0#0000000&@68
-|:|c+0#af5f00255&|m|a|p| +0#0000000&@69
@57|9|1|,|1| @10|7|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_06.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_06.dump
index 368df37..1e7b7b5 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_06.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_06.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|c+0#af5f00255&|m|a|p| +0#0000000&@69
+|:+0&#ffffff0|c+0#af5f00255&|l|i|s|t| +0#0000000&@68
+|:|c+0#af5f00255&|l|o|s|e| +0#0000000&@68
+|:|c+0#af5f00255&|m|a|p| +0#0000000&@69
|:|c+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@64
|:|c+0#af5f00255&|m|e|n|u| +0#0000000&@68
-|:|c+0#af5f00255&|n|e|x|t| +0#0000000&@68
+>:|c+0#af5f00255&|n|e|x|t| +0#0000000&@68
|:|c+0#af5f00255&|n|e|w|e|r| +0#0000000&@67
->:|c+0#af5f00255&|n|f|i|l|e| +0#0000000&@67
+|:|c+0#af5f00255&|n|f|i|l|e| +0#0000000&@67
|:|c+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@65
|:|c+0#af5f00255&|n|o|r|e|a|b@1|r|e|v| +0#0000000&@62
|:|c+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@64
@@ -15,6 +17,4 @@
|:|c+0#af5f00255&|o|m|p|i|l|e|r| +0#0000000&@65
|:|c+0#af5f00255&|o|n|t|i|n|u|e| +0#0000000&@65
|:|c+0#af5f00255&|o|n|f|i|r|m| +0#0000000&@66
-|:|c+0#af5f00255&|o|n|s|t| +0#0000000&@68
-|:|c+0#af5f00255&|o|p|e|n| +0#0000000&@68
@57|1|0|9|,|1| @9|8|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_07.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_07.dump
index 7507a13..e5f9736 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_07.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_07.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|c+0#af5f00255&|o|p|e|n| +0#0000000&@68
+|:+0&#ffffff0|c+0#af5f00255&|o|n|f|i|r|m| +0#0000000&@66
+|:|c+0#af5f00255&|o|n|s|t| +0#0000000&@68
+|:|c+0#af5f00255&|o|p|e|n| +0#0000000&@68
|:|c+0#af5f00255&|p|r|e|v|i|o|u|s| +0#0000000&@64
|:|c+0#af5f00255&|p|f|i|l|e| +0#0000000&@67
-|:|c+0#af5f00255&|q|u|i|t| +0#0000000&@68
+>:|c+0#af5f00255&|q|u|i|t| +0#0000000&@68
|:|c+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@66
->:|c+0#af5f00255&|s|c|o|p|e| +0#0000000&@67
+|:|c+0#af5f00255&|s|c|o|p|e| +0#0000000&@67
|:|c+0#af5f00255&|s|t|a|g| +0#0000000&@68
|:|c+0#af5f00255&|u|n|m|a|p| +0#0000000&@67
|:|c+0#af5f00255&|u|n|a|b@1|r|e|v| +0#0000000&@64
@@ -15,6 +17,4 @@
|:|d+0#af5f00255&|e|f| +0#0000000&@70
|:|d+0#af5f00255&|e|f|c|o|m|p|i|l|e| +0#0000000&@63
|:|d+0#af5f00255&|e|f|e|r| +0#0000000&@68
-|:|d+0#af5f00255&|e|l|c|o|m@1|a|n|d| +0#0000000&@63
-|:|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&@62
@57|1|2|7|,|1| @8|1|0|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_08.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_08.dump
index 970062e..2f41043 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_08.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_08.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&@62
+|:+0&#ffffff0|d+0#af5f00255&|e|f|e|r| +0#0000000&@68
+|:|d+0#af5f00255&|e|l|c|o|m@1|a|n|d| +0#0000000&@63
+|:|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&@62
|:|d+0#af5f00255&|e|l|m|a|r|k|s| +0#0000000&@65
|:|d+0#af5f00255&|i|f@1|u|p|d|a|t|e| +0#0000000&@63
-|:|d+0#af5f00255&|i|f@1|g|e|t| +0#0000000&@66
+>:|d+0#af5f00255&|i|f@1|g|e|t| +0#0000000&@66
|:|d+0#af5f00255&|i|f@1|o|f@1| +0#0000000&@66
->:|d+0#af5f00255&|i|f@1|p|a|t|c|h| +0#0000000&@64
+|:|d+0#af5f00255&|i|f@1|p|a|t|c|h| +0#0000000&@64
|:|d+0#af5f00255&|i|f@1|p|u|t| +0#0000000&@66
|:|d+0#af5f00255&|i|f@1|s|p|l|i|t| +0#0000000&@64
|:|d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@65
@@ -15,6 +17,4 @@
|:|d+0#af5f00255&|l|i|s|t| +0#0000000&@68
|:|d+0#af5f00255&|o|a|u|t|o|c|m|d| +0#0000000&@64
|:|d+0#af5f00255&|o|a|u|t|o|a|l@1| +0#0000000&@64
-|:|d+0#af5f00255&|p| +0#0000000&@71
-|:|d+0#af5f00255&|r|o|p| +0#0000000&@69
@57|1|4|5|,|1| @8|1@1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_09.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_09.dump
index 686a6e5..ffe0524 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_09.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_09.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|d+0#af5f00255&|r|o|p| +0#0000000&@69
+|:+0&#ffffff0|d+0#af5f00255&|o|a|u|t|o|a|l@1| +0#0000000&@64
+|:|d+0#af5f00255&|p| +0#0000000&@71
+|:|d+0#af5f00255&|r|o|p| +0#0000000&@69
|:|d+0#af5f00255&|s|e|a|r|c|h| +0#0000000&@66
|:|d+0#af5f00255&|s|p|l|i|t| +0#0000000&@67
-|:|e+0#af5f00255&|d|i|t| +0#0000000&@69
+>:|e+0#af5f00255&|d|i|t| +0#0000000&@69
|:|e+0#af5f00255&|a|r|l|i|e|r| +0#0000000&@66
->:|e+0#af5f00255&|c|h|o| +0#0000000&@69
+|:|e+0#af5f00255&|c|h|o| +0#0000000&@69
|:|e+0#af5f00255&|c|h|o|c|o|n|s|o|l|e| +0#0000000&@62
|:|e+0#af5f00255&|c|h|o|e|r@1| +0#0000000&@66
|:|e+0#af5f00255&|c|h|o|h|l| +0#0000000&@67
@@ -15,6 +17,4 @@
|:|e+0#af5f00255&|m|e|n|u| +0#0000000&@68
|:|e+0#af5f00255&|n|d|c|l|a|s@1| +0#0000000&@65
|:|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@67
-|:|e+0#af5f00255&|n|d|i|f| +0#0000000&@68
-|:|e+0#af5f00255&|n|d|f|o|r| +0#0000000&@67
@57|1|6|3|,|1| @8|1|3|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_10.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_10.dump
index 0229d84..22b28eb 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_10.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_10.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|e+0#af5f00255&|n|d|f|o|r| +0#0000000&@67
+|:+0&#ffffff0|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@67
+|:|e+0#af5f00255&|n|d|i|f| +0#0000000&@68
+|:|e+0#af5f00255&|n|d|f|o|r| +0#0000000&@67
|:|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@62
|:|e+0#af5f00255&|n|d|t|r|y| +0#0000000&@67
-|:|e+0#af5f00255&|n|d|w|h|i|l|e| +0#0000000&@65
+>:|e+0#af5f00255&|n|d|w|h|i|l|e| +0#0000000&@65
|:|e+0#af5f00255&|n|e|w| +0#0000000&@69
->:|e+0#af5f00255&|v|a|l| +0#0000000&@69
+|:|e+0#af5f00255&|v|a|l| +0#0000000&@69
|:|e+0#af5f00255&|x| +0#0000000&@71
|:|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&@66
|:|e+0#af5f00255&|x|i|t| +0#0000000&@69
@@ -15,6 +17,4 @@
|:|f+0#af5f00255&|i|l|t|e|r| +0#0000000&@67
|:|f+0#af5f00255&|i|n|d| +0#0000000&@69
|:|f+0#af5f00255&|i|n|a|l| +0#0000000&@68
-|:|f+0#af5f00255&|i|n|a|l@1|y| +0#0000000&@66
-|:|f+0#af5f00255&|i|n|i|s|h| +0#0000000&@67
@57|1|8|1|,|1| @8|1|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_11.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_11.dump
index 44856a1..7b9a19f 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_11.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_11.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|f+0#af5f00255&|i|n|i|s|h| +0#0000000&@67
+|:+0&#ffffff0|f+0#af5f00255&|i|n|a|l| +0#0000000&@68
+|:|f+0#af5f00255&|i|n|a|l@1|y| +0#0000000&@66
+|:|f+0#af5f00255&|i|n|i|s|h| +0#0000000&@67
|:|f+0#af5f00255&|i|r|s|t| +0#0000000&@68
|:|f+0#af5f00255&|i|x|d|e|l| +0#0000000&@67
-|:|f+0#af5f00255&|o|l|d| +0#0000000&@69
+>:|f+0#af5f00255&|o|l|d| +0#0000000&@69
|:|f+0#af5f00255&|o|l|d|c|l|o|s|e| +0#0000000&@64
->:|f+0#af5f00255&|o|l|d@1|o@1|p|e|n| +0#0000000&@63
+|:|f+0#af5f00255&|o|l|d@1|o@1|p|e|n| +0#0000000&@63
|:|f+0#af5f00255&|o|l|d@1|o|c|l|o|s|e|d| +0#0000000&@61
|:|f+0#af5f00255&|o|l|d|o|p|e|n| +0#0000000&@65
|:|f+0#af5f00255&|o|r| +0#0000000&@70
@@ -15,6 +17,4 @@
|:|g+0#af5f00255&|u|i| +0#0000000&@70
|:|g+0#af5f00255&|v|i|m| +0#0000000&@69
|:|h+0#af5f00255&|a|r|d|c|o|p|y| +0#0000000&@65
-|:|h+0#af5f00255&|e|l|p| +0#0000000&@69
-|:|h+0#af5f00255&|e|l|p|c|l|o|s|e| +0#0000000&@64
@57|1|9@1|,|1| @8|1|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_12.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_12.dump
index 2c0567a..03c5b96 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_12.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_12.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|h+0#af5f00255&|e|l|p|c|l|o|s|e| +0#0000000&@64
+|:+0&#ffffff0|h+0#af5f00255&|a|r|d|c|o|p|y| +0#0000000&@65
+|:|h+0#af5f00255&|e|l|p| +0#0000000&@69
+|:|h+0#af5f00255&|e|l|p|c|l|o|s|e| +0#0000000&@64
|:|h+0#af5f00255&|e|l|p|f|i|n|d| +0#0000000&@65
|:|h+0#af5f00255&|e|l|p|g|r|e|p| +0#0000000&@65
-|:|h+0#af5f00255&|e|l|p|t|a|g|s| +0#0000000&@65
+>:|h+0#af5f00255&|e|l|p|t|a|g|s| +0#0000000&@65
|:|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&@64
->:|h+0#af5f00255&|i|d|e| +0#0000000&@69
+|:|h+0#af5f00255&|i|d|e| +0#0000000&@69
|:|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@66
|:|h+0#af5f00255&|o|r|i|z|o|n|t|a|l| +0#0000000&@63
|:+0#af5f00255&|i|n|s|e|r|t| +0#0000000&@67
@@ -15,6 +17,4 @@
|:|i+0#af5f00255&|j|u|m|p| +0#0000000&@68
|:|i+0#af5f00255&|l|i|s|t| +0#0000000&@68
|:|i+0#af5f00255&|m|a|p| +0#0000000&@69
-|:|i+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@64
-|:|i+0#af5f00255&|m|e|n|u| +0#0000000&@68
-@57|2|1|7|,|1| @8|1|8|%|
+@57|2|1|7|,|1| @8|1|7|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_13.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_13.dump
index 07aba0a..5671882 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_13.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_13.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|i+0#af5f00255&|m|e|n|u| +0#0000000&@68
+|:+0&#ffffff0|i+0#af5f00255&|m|a|p| +0#0000000&@69
+|:|i+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@64
+|:|i+0#af5f00255&|m|e|n|u| +0#0000000&@68
|:|i+0#af5f00255&|m|p|o|r|t| +0#0000000&@67
|:|i+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@65
-|:|i+0#af5f00255&|n|o|r|e|a|b@1|r|e|v| +0#0000000&@62
+>:|i+0#af5f00255&|n|o|r|e|a|b@1|r|e|v| +0#0000000&@62
|:|i+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@64
->:|i+0#af5f00255&|n|t|r|o| +0#0000000&@68
+|:|i+0#af5f00255&|n|t|r|o| +0#0000000&@68
|:|i+0#af5f00255&|s|e|a|r|c|h| +0#0000000&@66
|:|i+0#af5f00255&|s|p|l|i|t| +0#0000000&@67
|:|i+0#af5f00255&|u|n|m|a|p| +0#0000000&@67
@@ -15,6 +17,4 @@
|:|k+0#af5f00255&|e@1|p|a|l|t| +0#0000000&@66
|:|k+0#af5f00255&|e@1|p|m|a|r|k|s| +0#0000000&@64
|:|k+0#af5f00255&|e@1|p|j|u|m|p|s| +0#0000000&@64
-|:|k+0#af5f00255&|e@1|p@1|a|t@1|e|r|n|s| +0#0000000&@61
-|:|l+0#af5f00255&|N|e|x|t| +0#0000000&@68
@57|2|3|5|,|1| @8|1|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_14.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_14.dump
index 155ecc0..1442dfd 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_14.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_14.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|l+0#af5f00255&|N|e|x|t| +0#0000000&@68
+|:+0&#ffffff0|k+0#af5f00255&|e@1|p|j|u|m|p|s| +0#0000000&@64
+|:|k+0#af5f00255&|e@1|p@1|a|t@1|e|r|n|s| +0#0000000&@61
+|:|l+0#af5f00255&|N|e|x|t| +0#0000000&@68
|:|l+0#af5f00255&|N|f|i|l|e| +0#0000000&@67
|:|l+0#af5f00255&|i|s|t| +0#0000000&@69
-|:|l+0#af5f00255&|a|b|o|v|e| +0#0000000&@67
+>:|l+0#af5f00255&|a|b|o|v|e| +0#0000000&@67
|:|l+0#af5f00255&|a|d@1|e|x|p|r| +0#0000000&@65
->:|l+0#af5f00255&|a|d@1|b|u|f@1|e|r| +0#0000000&@63
+|:|l+0#af5f00255&|a|d@1|b|u|f@1|e|r| +0#0000000&@63
|:|l+0#af5f00255&|a|d@1|f|i|l|e| +0#0000000&@65
|:|l+0#af5f00255&|a|f|t|e|r| +0#0000000&@67
|:|l+0#af5f00255&|a|s|t| +0#0000000&@69
@@ -15,6 +17,4 @@
|:|l+0#af5f00255&|b|u|f@1|e|r| +0#0000000&@66
|:|l+0#af5f00255&|c|d| +0#0000000&@70
|:|l+0#af5f00255&|c|h|d|i|r| +0#0000000&@67
-|:|l+0#af5f00255&|c|l|o|s|e| +0#0000000&@67
-|:|l+0#af5f00255&|c|s|c|o|p|e| +0#0000000&@66
@57|2|5|3|,|1| @8|2|1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_15.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_15.dump
index 6fad409..d72931b 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_15.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_15.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|l+0#af5f00255&|c|s|c|o|p|e| +0#0000000&@66
+|:+0&#ffffff0|l+0#af5f00255&|c|h|d|i|r| +0#0000000&@67
+|:|l+0#af5f00255&|c|l|o|s|e| +0#0000000&@67
+|:|l+0#af5f00255&|c|s|c|o|p|e| +0#0000000&@66
|:|l+0#af5f00255&|d|o| +0#0000000&@70
|:|l+0#af5f00255&|f|d|o| +0#0000000&@69
-|:|l+0#af5f00255&|e|f|t| +0#0000000&@69
+>:|l+0#af5f00255&|e|f|t| +0#0000000&@69
|:|l+0#af5f00255&|e|f|t|a|b|o|v|e| +0#0000000&@64
->:|l+0#af5f00255&|e|g|a|c|y| +0#0000000&@67
+|:|l+0#af5f00255&|e|g|a|c|y| +0#0000000&@67
|:|l+0#af5f00255&|e|t| +0#0000000&@70
|:|l+0#af5f00255&|e|x|p|r| +0#0000000&@68
|:|l+0#af5f00255&|f|i|l|e| +0#0000000&@68
@@ -15,6 +17,4 @@
|:|l+0#af5f00255&|g|r|e|p|a|d@1| +0#0000000&@65
|:|l+0#af5f00255&|h|e|l|p|g|r|e|p| +0#0000000&@64
|:|l+0#af5f00255&|h|i|s|t|o|r|y| +0#0000000&@65
-|:|l+0#af5f00255&@1| +0#0000000&@71
-|:|l+0#af5f00255&@1|a|s|t| +0#0000000&@68
@57|2|7|1|,|1| @8|2@1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_16.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_16.dump
index 1c63c08..31d88a6 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_16.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_16.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|l+0#af5f00255&@1|a|s|t| +0#0000000&@68
+|:+0&#ffffff0|l+0#af5f00255&|h|i|s|t|o|r|y| +0#0000000&@65
+|:|l+0#af5f00255&@1| +0#0000000&@71
+|:|l+0#af5f00255&@1|a|s|t| +0#0000000&@68
|:|l+0#af5f00255&@1|i|s|t| +0#0000000&@68
|:|l+0#af5f00255&|m|a|k|e| +0#0000000&@68
-|:|l+0#af5f00255&|m|a|p| +0#0000000&@69
+>:|l+0#af5f00255&|m|a|p| +0#0000000&@69
|:|l+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@64
->:|l+0#af5f00255&|n|e|x|t| +0#0000000&@68
+|:|l+0#af5f00255&|n|e|x|t| +0#0000000&@68
|:|l+0#af5f00255&|n|e|w|e|r| +0#0000000&@67
|:|l+0#af5f00255&|n|f|i|l|e| +0#0000000&@67
|:|l+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@65
@@ -15,6 +17,4 @@
|:|l+0#af5f00255&|o|p|e|n| +0#0000000&@68
|:|l+0#af5f00255&|p|r|e|v|i|o|u|s| +0#0000000&@64
|:|l+0#af5f00255&|p|f|i|l|e| +0#0000000&@67
-|:|l+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@66
-|:|l+0#af5f00255&|s| +0#0000000&@71
@57|2|8|9|,|1| @8|2|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_17.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_17.dump
index 4988382..58d654d 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_17.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_17.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|l+0#af5f00255&|s| +0#0000000&@71
+|:+0&#ffffff0|l+0#af5f00255&|p|f|i|l|e| +0#0000000&@67
+|:|l+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@66
+|:|l+0#af5f00255&|s| +0#0000000&@71
|:|l+0#af5f00255&|t|a|g| +0#0000000&@69
|:|l+0#af5f00255&|u|n|m|a|p| +0#0000000&@67
-|:|l+0#af5f00255&|u|a| +0#0000000&@70
+>:|l+0#af5f00255&|u|a| +0#0000000&@70
|:|l+0#af5f00255&|u|a|d|o| +0#0000000&@68
->:|l+0#af5f00255&|u|a|f|i|l|e| +0#0000000&@66
+|:|l+0#af5f00255&|u|a|f|i|l|e| +0#0000000&@66
|:|l+0#af5f00255&|v|i|m|g|r|e|p| +0#0000000&@65
|:|l+0#af5f00255&|v|i|m|g|r|e|p|a|d@1| +0#0000000&@62
|:|l+0#af5f00255&|w|i|n|d|o|w| +0#0000000&@66
@@ -15,6 +17,4 @@
|:|m+0#af5f00255&|a|p|c|l|e|a|r| +0#0000000&@65
|:|m+0#af5f00255&|a|r|k|s| +0#0000000&@68
|:|m+0#af5f00255&|a|t|c|h| +0#0000000&@68
-|:|m+0#af5f00255&|e|n|u| +0#0000000&@69
-|:|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&@60
@57|3|0|7|,|1| @8|2|5|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_18.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_18.dump
index 5015a82..a2539b5 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_18.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_18.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&@60
+|:+0&#ffffff0|m+0#af5f00255&|a|t|c|h| +0#0000000&@68
+|:|m+0#af5f00255&|e|n|u| +0#0000000&@69
+|:|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&@60
|:|m+0#af5f00255&|e|s@1|a|g|e|s| +0#0000000&@65
|:|m+0#af5f00255&|k|e|x|r|c| +0#0000000&@67
-|:|m+0#af5f00255&|k|s|e|s@1|i|o|n| +0#0000000&@64
+>:|m+0#af5f00255&|k|s|e|s@1|i|o|n| +0#0000000&@64
|:|m+0#af5f00255&|k|s|p|e|l@1| +0#0000000&@66
->:|m+0#af5f00255&|k|v|i|m|r|c| +0#0000000&@66
+|:|m+0#af5f00255&|k|v|i|m|r|c| +0#0000000&@66
|:|m+0#af5f00255&|k|v|i|e|w| +0#0000000&@67
|:|m+0#af5f00255&|o|d|e| +0#0000000&@69
|:|m+0#af5f00255&|z|s|c|h|e|m|e| +0#0000000&@65
@@ -15,6 +17,4 @@
|:|n+0#af5f00255&|e|w| +0#0000000&@70
|:|n+0#af5f00255&|m|a|p| +0#0000000&@69
|:|n+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@64
-|:|n+0#af5f00255&|m|e|n|u| +0#0000000&@68
-|:|n+0#af5f00255&@1|o|r|e|m|a|p| +0#0000000&@65
@57|3|2|5|,|1| @8|2|7|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_19.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_19.dump
index 31b87c1..b7f7203 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_19.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_19.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|n+0#af5f00255&@1|o|r|e|m|a|p| +0#0000000&@65
+|:+0&#ffffff0|n+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@64
+|:|n+0#af5f00255&|m|e|n|u| +0#0000000&@68
+|:|n+0#af5f00255&@1|o|r|e|m|a|p| +0#0000000&@65
|:|n+0#af5f00255&@1|o|r|e|m|e|n|u| +0#0000000&@64
|:|n+0#af5f00255&|o|a|u|t|o|c|m|d| +0#0000000&@64
-|:|n+0#af5f00255&|o|r|e|m|a|p| +0#0000000&@66
+>:|n+0#af5f00255&|o|r|e|m|a|p| +0#0000000&@66
|:|n+0#af5f00255&|o|h|l|s|e|a|r|c|h| +0#0000000&@63
->:|n+0#af5f00255&|o|r|e|a|b@1|r|e|v| +0#0000000&@63
+|:|n+0#af5f00255&|o|r|e|a|b@1|r|e|v| +0#0000000&@63
|:|n+0#af5f00255&|o|r|e|m|e|n|u| +0#0000000&@65
|:|n+0#af5f00255&|o|r|m|a|l| +0#0000000&@67
|:|n+0#af5f00255&|o|s|w|a|p|f|i|l|e| +0#0000000&@63
@@ -15,6 +17,4 @@
|:|o+0#af5f00255&|m|a|p| +0#0000000&@69
|:|o+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@64
|:|o+0#af5f00255&|m|e|n|u| +0#0000000&@68
-|:|o+0#af5f00255&|n|l|y| +0#0000000&@69
-|:|o+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@65
@57|3|4|3|,|1| @8|2|8|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_20.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_20.dump
index de2714a..cedd6ab 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_20.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_20.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|o+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@65
+|:+0&#ffffff0|o+0#af5f00255&|m|e|n|u| +0#0000000&@68
+|:|o+0#af5f00255&|n|l|y| +0#0000000&@69
+|:|o+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@65
|:|o+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@64
|:|o+0#af5f00255&|p|t|i|o|n|s| +0#0000000&@66
-|:|o+0#af5f00255&|u|n|m|a|p| +0#0000000&@67
+>:|o+0#af5f00255&|u|n|m|a|p| +0#0000000&@67
|:|o+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@66
->:|o+0#af5f00255&|w|n|s|y|n|t|a|x| +0#0000000&@64
+|:|o+0#af5f00255&|w|n|s|y|n|t|a|x| +0#0000000&@64
|:|p+0#af5f00255&|a|c|k|a|d@1| +0#0000000&@66
|:|p+0#af5f00255&|a|c|k|l|o|a|d|a|l@1| +0#0000000&@62
|:|p+0#af5f00255&|c|l|o|s|e| +0#0000000&@67
@@ -15,6 +17,4 @@
|:|p+0#af5f00255&|r|o|m|p|t|f|i|n|d| +0#0000000&@63
|:|p+0#af5f00255&|r|o|m|p|t|r|e|p|l| +0#0000000&@63
|:|p+0#af5f00255&|e|r|l|d|o| +0#0000000&@67
-|:|p+0#af5f00255&|o|p| +0#0000000&@70
-|:|p+0#af5f00255&|o|p|u|p| +0#0000000&@68
@57|3|6|1|,|1| @8|3|0|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_21.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_21.dump
index edfad45..b81c5ee 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_21.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_21.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|p+0#af5f00255&|o|p|u|p| +0#0000000&@68
+|:+0&#ffffff0|p+0#af5f00255&|e|r|l|d|o| +0#0000000&@67
+|:|p+0#af5f00255&|o|p| +0#0000000&@70
+|:|p+0#af5f00255&|o|p|u|p| +0#0000000&@68
|:|p+0#af5f00255&@1|o|p| +0#0000000&@69
|:|p+0#af5f00255&|r|e|s|e|r|v|e| +0#0000000&@65
-|:|p+0#af5f00255&|r|e|v|i|o|u|s| +0#0000000&@65
+>:|p+0#af5f00255&|r|e|v|i|o|u|s| +0#0000000&@65
|:|p+0#af5f00255&|s|e|a|r|c|h| +0#0000000&@66
->:|p+0#af5f00255&|t|a|g| +0#0000000&@69
+|:|p+0#af5f00255&|t|a|g| +0#0000000&@69
|:|p+0#af5f00255&|t|N|e|x|t| +0#0000000&@67
|:|p+0#af5f00255&|t|f|i|r|s|t| +0#0000000&@66
|:|p+0#af5f00255&|t|j|u|m|p| +0#0000000&@67
@@ -15,6 +17,4 @@
|:|p+0#af5f00255&|u|b|l|i|c| +0#0000000&@67
|:|p+0#af5f00255&|u|t| +0#0000000&@70
|:|p+0#af5f00255&|w|d| +0#0000000&@70
-|:|p+0#af5f00255&|y|3| +0#0000000&@70
-|:|p+0#af5f00255&|y|t|h|o|n|3| +0#0000000&@66
@57|3|7|9|,|1| @8|3|1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_22.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_22.dump
index 3cc8e92..5007492 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_22.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_22.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|p+0#af5f00255&|y|t|h|o|n|3| +0#0000000&@66
+|:+0&#ffffff0|p+0#af5f00255&|w|d| +0#0000000&@70
+|:|p+0#af5f00255&|y|3| +0#0000000&@70
+|:|p+0#af5f00255&|y|t|h|o|n|3| +0#0000000&@66
|:|p+0#af5f00255&|y|3|d|o| +0#0000000&@68
|:|p+0#af5f00255&|y|3|f|i|l|e| +0#0000000&@66
-|:|p+0#af5f00255&|y|t|h|o|n| +0#0000000&@67
+>:|p+0#af5f00255&|y|t|h|o|n| +0#0000000&@67
|:|p+0#af5f00255&|y|d|o| +0#0000000&@69
->:|p+0#af5f00255&|y|f|i|l|e| +0#0000000&@67
+|:|p+0#af5f00255&|y|f|i|l|e| +0#0000000&@67
|:|p+0#af5f00255&|y|x| +0#0000000&@70
|:|p+0#af5f00255&|y|t|h|o|n|x| +0#0000000&@66
|:|p+0#af5f00255&|y|x|d|o| +0#0000000&@68
@@ -15,6 +17,4 @@
|:|r+0#af5f00255&|e|c|o|v|e|r| +0#0000000&@66
|:|r+0#af5f00255&|e|d|o| +0#0000000&@69
|:|r+0#af5f00255&|e|d|i|r| +0#0000000&@68
-|:|r+0#af5f00255&|e|d|r|a|w| +0#0000000&@67
-|:|r+0#af5f00255&|e|d|r|a|w|s|t|a|t|u|s| +0#0000000&@61
@57|3|9|7|,|1| @8|3@1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_23.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_23.dump
index d71dfa7..6baf838 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_23.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_23.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|r+0#af5f00255&|e|d|r|a|w|s|t|a|t|u|s| +0#0000000&@61
+|:+0&#ffffff0|r+0#af5f00255&|e|d|i|r| +0#0000000&@68
+|:|r+0#af5f00255&|e|d|r|a|w| +0#0000000&@67
+|:|r+0#af5f00255&|e|d|r|a|w|s|t|a|t|u|s| +0#0000000&@61
|:|r+0#af5f00255&|e|d|r|a|w|t|a|b|l|i|n|e| +0#0000000&@60
|:|r+0#af5f00255&|e|g|i|s|t|e|r|s| +0#0000000&@64
-|:|r+0#af5f00255&|e|s|i|z|e| +0#0000000&@67
+>:|r+0#af5f00255&|e|s|i|z|e| +0#0000000&@67
|:|r+0#af5f00255&|e|t|a|b| +0#0000000&@68
->:|r+0#af5f00255&|e|t|u|r|n| +0#0000000&@67
+|:|r+0#af5f00255&|e|t|u|r|n| +0#0000000&@67
|:|r+0#af5f00255&|e|w|i|n|d| +0#0000000&@67
|:|r+0#af5f00255&|i|g|h|t| +0#0000000&@68
|:|r+0#af5f00255&|i|g|h|t|b|e|l|o|w| +0#0000000&@63
@@ -13,8 +15,6 @@
|:|r+0#af5f00255&|u|n|d|o| +0#0000000&@68
|:|r+0#af5f00255&|u|n|t|i|m|e| +0#0000000&@66
|:|r+0#af5f00255&|v|i|m|i|n|f|o| +0#0000000&@65
-|:+0#af5f00255&|s|u|b|s|t|i|t|u|t|e| +0#0000000&@63
+|:|s+0#af5f00255&|u|b|s|t|i|t|u|t|e| +0#0000000&@63
|:|s+0#af5f00255&|N|e|x|t| +0#0000000&@68
-|:|s+0#af5f00255&|a|n|d|b|o|x| +0#0000000&@66
-|:|s+0#af5f00255&|a|r|g|u|m|e|n|t| +0#0000000&@64
@57|4|1|5|,|1| @8|3|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_24.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_24.dump
index fd97b1e..4c937c2 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_24.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_24.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|s+0#af5f00255&|a|r|g|u|m|e|n|t| +0#0000000&@64
+|:+0&#ffffff0|s+0#af5f00255&|N|e|x|t| +0#0000000&@68
+|:|s+0#af5f00255&|a|n|d|b|o|x| +0#0000000&@66
+|:|s+0#af5f00255&|a|r|g|u|m|e|n|t| +0#0000000&@64
|:|s+0#af5f00255&|a|l@1| +0#0000000&@69
|:|s+0#af5f00255&|a|v|e|a|s| +0#0000000&@67
-|:|s+0#af5f00255&|b|u|f@1|e|r| +0#0000000&@66
+>:|s+0#af5f00255&|b|u|f@1|e|r| +0#0000000&@66
|:|s+0#af5f00255&|b|N|e|x|t| +0#0000000&@67
->:|s+0#af5f00255&|b|a|l@1| +0#0000000&@68
+|:|s+0#af5f00255&|b|a|l@1| +0#0000000&@68
|:|s+0#af5f00255&|b|f|i|r|s|t| +0#0000000&@66
|:|s+0#af5f00255&|b|l|a|s|t| +0#0000000&@67
|:|s+0#af5f00255&|b|m|o|d|i|f|i|e|d| +0#0000000&@63
@@ -15,6 +17,4 @@
|:|s+0#af5f00255&|c|r|i|p|t|v|e|r|s|i|o|n| +0#0000000&@60
|:|s+0#af5f00255&|c|s|c|o|p|e| +0#0000000&@66
|:|s+0#af5f00255&|e|t| +0#0000000&@70
-|:|s+0#af5f00255&|e|t|f|i|l|e|t|y|p|e| +0#0000000&@62
-|:|s+0#af5f00255&|e|t|g|l|o|b|a|l| +0#0000000&@64
@57|4|3@1|,|1| @8|3|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_25.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_25.dump
index d073ef7..6b40f2c 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_25.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_25.dump
@@ -1,20 +1,20 @@
-|:+0&#ffffff0|s+0#af5f00255&|e|t|g|l|o|b|a|l| +0#0000000&@64
+|:+0&#ffffff0|s+0#af5f00255&|e|t| +0#0000000&@70
+|:|s+0#af5f00255&|e|t|f|i|l|e|t|y|p|e| +0#0000000&@62
+|:|s+0#af5f00255&|e|t|g|l|o|b|a|l| +0#0000000&@64
|:|s+0#af5f00255&|e|t|l|o|c|a|l| +0#0000000&@65
|:|s+0#af5f00255&|f|i|n|d| +0#0000000&@68
-|:|s+0#af5f00255&|f|i|r|s|t| +0#0000000&@67
+>:|s+0#af5f00255&|f|i|r|s|t| +0#0000000&@67
|:|s+0#af5f00255&|h|e|l@1| +0#0000000&@68
->:|s+0#af5f00255&|i|m|a|l|t| +0#0000000&@67
+|:|s+0#af5f00255&|i|m|a|l|t| +0#0000000&@67
|:|s+0#af5f00255&|i|g|n| +0#0000000&@69
|:|s+0#af5f00255&|i|l|e|n|t| +0#0000000&@67
|:|s+0#af5f00255&|l|e@1|p| +0#0000000&@68
|:|s+0#af5f00255&|l|e@1|p|!| +0#0000000&@67
|:|s+0#af5f00255&|l|a|s|t| +0#0000000&@68
-|:+0#af5f00255&|s|m|a|g|i|c| +0#0000000&@67
+|:|s+0#af5f00255&|m|a|g|i|c| +0#0000000&@67
|:|s+0#af5f00255&|m|a|p| +0#0000000&@69
|:|s+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@64
|:|s+0#af5f00255&|m|e|n|u| +0#0000000&@68
|:|s+0#af5f00255&|m|i|l|e| +0#0000000&@68
|:|s+0#af5f00255&|n|e|x|t| +0#0000000&@68
-|:+0#af5f00255&|s|n|o|m|a|g|i|c| +0#0000000&@65
-|:|s+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@65
@57|4|5|1|,|1| @8|3|7|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_26.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_26.dump
index 20610ed..f388e4f 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_26.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_26.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|s+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@65
+|:+0&#ffffff0|s+0#af5f00255&|n|e|x|t| +0#0000000&@68
+|:|s+0#af5f00255&|n|o|m|a|g|i|c| +0#0000000&@65
+|:|s+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@65
|:|s+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@64
|:|s+0#af5f00255&|o|r|t| +0#0000000&@69
-|:|s+0#af5f00255&|o|u|r|c|e| +0#0000000&@67
+>:|s+0#af5f00255&|o|u|r|c|e| +0#0000000&@67
|:|s+0#af5f00255&|p|e|l@1|d|u|m|p| +0#0000000&@64
->:|s+0#af5f00255&|p|e|l@1|g|o@1|d| +0#0000000&@64
+|:|s+0#af5f00255&|p|e|l@1|g|o@1|d| +0#0000000&@64
|:|s+0#af5f00255&|p|e|l@1|i|n|f|o| +0#0000000&@64
|:|s+0#af5f00255&|p|e|l@1|r|a|r|e| +0#0000000&@64
|:|s+0#af5f00255&|p|e|l@1|r|e|p|a|l@1| +0#0000000&@62
@@ -15,6 +17,4 @@
|:|s+0#af5f00255&|t|o|p| +0#0000000&@69
|:|s+0#af5f00255&|t|a|g| +0#0000000&@69
|:|s+0#af5f00255&|t|a|r|t|i|n|s|e|r|t| +0#0000000&@62
-|:|s+0#af5f00255&|t|a|r|t|g|r|e|p|l|a|c|e| +0#0000000&@60
-|:|s+0#af5f00255&|t|a|r|t|r|e|p|l|a|c|e| +0#0000000&@61
@57|4|6|9|,|1| @8|3|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_27.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_27.dump
index 99b374e..c2bba89 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_27.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_27.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|s+0#af5f00255&|t|a|r|t|r|e|p|l|a|c|e| +0#0000000&@61
+|:+0&#ffffff0|s+0#af5f00255&|t|a|r|t|i|n|s|e|r|t| +0#0000000&@62
+|:|s+0#af5f00255&|t|a|r|t|g|r|e|p|l|a|c|e| +0#0000000&@60
+|:|s+0#af5f00255&|t|a|r|t|r|e|p|l|a|c|e| +0#0000000&@61
|:|s+0#af5f00255&|t|a|t|i|c| +0#0000000&@67
|:|s+0#af5f00255&|t|o|p|i|n|s|e|r|t| +0#0000000&@63
-|:|s+0#af5f00255&|t|j|u|m|p| +0#0000000&@67
+>:|s+0#af5f00255&|t|j|u|m|p| +0#0000000&@67
|:|s+0#af5f00255&|t|s|e|l|e|c|t| +0#0000000&@65
->:|s+0#af5f00255&|u|n|h|i|d|e| +0#0000000&@66
+|:|s+0#af5f00255&|u|n|h|i|d|e| +0#0000000&@66
|:|s+0#af5f00255&|u|n|m|a|p| +0#0000000&@67
|:|s+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@66
|:|s+0#af5f00255&|u|s|p|e|n|d| +0#0000000&@66
@@ -15,6 +17,4 @@
|:|t+0#af5f00255&| +0#0000000&@72
|:|t+0#af5f00255&|N|e|x|t| +0#0000000&@68
|:|t+0#af5f00255&|a|b|N|e|x|t| +0#0000000&@66
-|:|t+0#af5f00255&|a|b|c|l|o|s|e| +0#0000000&@65
-|:|t+0#af5f00255&|a|b|d|o| +0#0000000&@68
-@57|4|8|7|,|1| @8|4|1|%|
+@57|4|8|7|,|1| @8|4|0|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_28.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_28.dump
index e7bcfa9..f575c6f 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_28.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_28.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|t+0#af5f00255&|a|b|d|o| +0#0000000&@68
+|:+0&#ffffff0|t+0#af5f00255&|a|b|N|e|x|t| +0#0000000&@66
+|:|t+0#af5f00255&|a|b|c|l|o|s|e| +0#0000000&@65
+|:|t+0#af5f00255&|a|b|d|o| +0#0000000&@68
|:|t+0#af5f00255&|a|b|e|d|i|t| +0#0000000&@66
|:|t+0#af5f00255&|a|b|f|i|n|d| +0#0000000&@66
-|:|t+0#af5f00255&|a|b|f|i|r|s|t| +0#0000000&@65
+>:|t+0#af5f00255&|a|b|f|i|r|s|t| +0#0000000&@65
|:|t+0#af5f00255&|a|b|l|a|s|t| +0#0000000&@66
->:|t+0#af5f00255&|a|b|m|o|v|e| +0#0000000&@66
+|:|t+0#af5f00255&|a|b|m|o|v|e| +0#0000000&@66
|:|t+0#af5f00255&|a|b|n|e|w| +0#0000000&@67
|:|t+0#af5f00255&|a|b|n|e|x|t| +0#0000000&@66
|:|t+0#af5f00255&|a|b|o|n|l|y| +0#0000000&@66
@@ -15,6 +17,4 @@
|:|t+0#af5f00255&|a|g|s| +0#0000000&@69
|:|t+0#af5f00255&|c|d| +0#0000000&@70
|:|t+0#af5f00255&|c|h|d|i|r| +0#0000000&@67
-|:|t+0#af5f00255&|c|l| +0#0000000&@70
-|:|t+0#af5f00255&|c|l|d|o| +0#0000000&@68
@57|5|0|5|,|1| @8|4|2|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_29.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_29.dump
index 52f113e..261cf89 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_29.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_29.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|t+0#af5f00255&|c|l|d|o| +0#0000000&@68
+|:+0&#ffffff0|t+0#af5f00255&|c|h|d|i|r| +0#0000000&@67
+|:|t+0#af5f00255&|c|l| +0#0000000&@70
+|:|t+0#af5f00255&|c|l|d|o| +0#0000000&@68
|:|t+0#af5f00255&|c|l|f|i|l|e| +0#0000000&@66
|:|t+0#af5f00255&|e|a|r|o|f@1| +0#0000000&@66
-|:|t+0#af5f00255&|e|r|m|i|n|a|l| +0#0000000&@65
+>:|t+0#af5f00255&|e|r|m|i|n|a|l| +0#0000000&@65
|:|t+0#af5f00255&|f|i|r|s|t| +0#0000000&@67
->:|t+0#af5f00255&|h|r|o|w| +0#0000000&@68
+|:|t+0#af5f00255&|h|r|o|w| +0#0000000&@68
|:|t+0#af5f00255&|j|u|m|p| +0#0000000&@68
|:|t+0#af5f00255&|l|a|s|t| +0#0000000&@68
|:|t+0#af5f00255&|l|m|e|n|u| +0#0000000&@67
@@ -15,6 +17,4 @@
|:|t+0#af5f00255&|n|e|x|t| +0#0000000&@68
|:|t+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@65
|:|t+0#af5f00255&|o|p|l|e|f|t| +0#0000000&@66
-|:|t+0#af5f00255&|p|r|e|v|i|o|u|s| +0#0000000&@64
-|:|t+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@66
-@57|5|2|3|,|1| @8|4@1|%|
+@57|5|2|3|,|1| @8|4|3|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_30.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_30.dump
index ae4b19d..d00225d 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_30.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_30.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|t+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@66
+|:+0&#ffffff0|t+0#af5f00255&|o|p|l|e|f|t| +0#0000000&@66
+|:|t+0#af5f00255&|p|r|e|v|i|o|u|s| +0#0000000&@64
+|:|t+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@66
|:|t+0#af5f00255&|r|y| +0#0000000&@70
|:|t+0#af5f00255&|s|e|l|e|c|t| +0#0000000&@66
-|:|t+0#af5f00255&|u|n|m|a|p| +0#0000000&@67
+>:|t+0#af5f00255&|u|n|m|a|p| +0#0000000&@67
|:|t+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@66
->:|u+0#af5f00255&|n|d|o| +0#0000000&@69
+|:|u+0#af5f00255&|n|d|o| +0#0000000&@69
|:|u+0#af5f00255&|n|d|o|j|o|i|n| +0#0000000&@65
|:|u+0#af5f00255&|n|d|o|l|i|s|t| +0#0000000&@65
|:|u+0#af5f00255&|n|a|b@1|r|e|v|i|a|t|e| +0#0000000&@61
@@ -15,6 +17,4 @@
|:|u+0#af5f00255&|n|m|e|n|u| +0#0000000&@67
|:|u+0#af5f00255&|n|s|i|l|e|n|t| +0#0000000&@65
|:|u+0#af5f00255&|p|d|a|t|e| +0#0000000&@67
-|:|v+0#af5f00255&|g|l|o|b|a|l|/|.+0#0000000&@2|/+0#af5f00255&| +0#0000000&@61
-|:|v+0#af5f00255&|a|r| +0#0000000&@70
@57|5|4|1|,|1| @8|4|5|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_31.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_31.dump
index 575a94f..07075f7 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_31.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_31.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|v+0#af5f00255&|a|r| +0#0000000&@70
+|:+0&#ffffff0|u+0#af5f00255&|p|d|a|t|e| +0#0000000&@67
+|:|v+0#af5f00255&|g|l|o|b|a|l|/|.+0#0000000&@2|/+0#af5f00255&| +0#0000000&@61
+|:|v+0#af5f00255&|a|r| +0#0000000&@70
|:|v+0#af5f00255&|e|r|s|i|o|n| +0#0000000&@66
|:|v+0#af5f00255&|e|r|b|o|s|e| +0#0000000&@66
-|:|v+0#af5f00255&|e|r|t|i|c|a|l| +0#0000000&@65
+>:|v+0#af5f00255&|e|r|t|i|c|a|l| +0#0000000&@65
|:|v+0#af5f00255&|i|m|9|c|m|d| +0#0000000&@66
->:|v+0#af5f00255&|i|m|9|s|c|r|i|p|t| +0#0000000&@63
+|:|v+0#af5f00255&|i|m|9|s|c|r|i|p|t| +0#0000000&@63
|:|v+0#af5f00255&|i|m|g|r|e|p| +0#0000000&@66
|:|v+0#af5f00255&|i|m|g|r|e|p|a|d@1| +0#0000000&@63
|:|v+0#af5f00255&|i|s|u|a|l| +0#0000000&@67
@@ -15,6 +17,4 @@
|:|v+0#af5f00255&|n|e|w| +0#0000000&@69
|:|v+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@65
|:|v+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@64
-|:|v+0#af5f00255&|s|p|l|i|t| +0#0000000&@67
-|:|v+0#af5f00255&|u|n|m|a|p| +0#0000000&@67
@57|5@1|9|,|1| @8|4|7|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_32.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_32.dump
index 2a225b8..25eecd9 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_32.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_32.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|v+0#af5f00255&|u|n|m|a|p| +0#0000000&@67
+|:+0&#ffffff0|v+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@64
+|:|v+0#af5f00255&|s|p|l|i|t| +0#0000000&@67
+|:|v+0#af5f00255&|u|n|m|a|p| +0#0000000&@67
|:|v+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@66
|:|w+0#af5f00255&|i|n|d|o| +0#0000000&@68
-|:|w+0#af5f00255&|r|i|t|e| +0#0000000&@68
+>:|w+0#af5f00255&|r|i|t|e| +0#0000000&@68
|:|w+0#af5f00255&|N|e|x|t| +0#0000000&@68
->:|w+0#af5f00255&|a|l@1| +0#0000000&@69
+|:|w+0#af5f00255&|a|l@1| +0#0000000&@69
|:|w+0#af5f00255&|h|i|l|e| +0#0000000&@68
|:|w+0#af5f00255&|i|n|s|i|z|e| +0#0000000&@66
|:|w+0#af5f00255&|i|n|c|m|d| +0#0000000&@67
@@ -15,6 +17,4 @@
|:|w+0#af5f00255&|u|n|d|o| +0#0000000&@68
|:|w+0#af5f00255&|v|i|m|i|n|f|o| +0#0000000&@65
|:|x+0#af5f00255&|i|t| +0#0000000&@70
-|:|x+0#af5f00255&|a|l@1| +0#0000000&@69
-|:|x+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@64
@57|5|7@1|,|1| @8|4|8|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_33.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_33.dump
index 4168e67..1339b80 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_33.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_33.dump
@@ -1,9 +1,11 @@
-|:+0&#ffffff0|x+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@64
+|:+0&#ffffff0|x+0#af5f00255&|i|t| +0#0000000&@70
+|:|x+0#af5f00255&|a|l@1| +0#0000000&@69
+|:|x+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@64
|:|x+0#af5f00255&|m|a|p| +0#0000000&@69
|:|x+0#af5f00255&|m|e|n|u| +0#0000000&@68
-|:|x+0#af5f00255&|r|e|s|t|o|r|e| +0#0000000&@65
+>:|x+0#af5f00255&|r|e|s|t|o|r|e| +0#0000000&@65
|:|x+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@65
->:|x+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@64
+|:|x+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@64
|:|x+0#af5f00255&|u|n|m|a|p| +0#0000000&@67
|:|x+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@66
|:|y+0#af5f00255&|a|n|k| +0#0000000&@69
@@ -14,7 +16,5 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|||h+0#af5f00255&|e|l|p| +0#0000000&@58
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)||+0#0000000&| |h+0#af5f00255&|e|l|p| +0#0000000&@58
@75
-|"+0#0000e05&| |F+0#0000001#ffff4012|I|X|M|E| +0#0000000#ffffff0@67
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a|p@1|e|n|d| @55
-@4|t|e|x|t| @66
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |2+0#af5f00255&|m|a|t|c|h| +0#0000000&@55
@57|5|9|5|,|1| @8|5|0|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_34.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_34.dump
index bf88d4f..2c442cb 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_34.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_34.dump
@@ -1,9 +1,13 @@
-| +0&#ffffff0@3|t|e|x|t| @66
-|.+0#af5f00255&| +0#0000000&@73
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |2+0#af5f00255&|m|a|t|c|h| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |3+0#af5f00255&|m|a|t|c|h| +0#0000000&@55
+|"+0#0000e05&| |F+0#0000001#ffff4012|I|X|M|E| +0#0000000#ffffff0@67
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a|p@1|e|n|d| @55
+@4|t|e|x|t| @66
+>.+0#af5f00255&| +0#0000000&@73
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|b@1|r|e|v|i|a|t|e| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|b|c|l|e|a|r| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|b|o|v|e|l|e|f|t| +0#0000000&@52
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|l@1| +0#0000000&@58
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|l@1| +0#0000000&@58
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|m|e|n|u| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|r|g|s| +0#0000000&@57
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|r|g|e|d|i|t| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|r|g|d|o| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|r|g@1|l|o|b|a|l| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|r|g|l|o|c|a|l| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|r|g|u|m|e|n|t| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|s|c|i@1| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&@54
@57|6|1|3|,|1| @8|5|1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_35.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_35.dump
index 01cefde..fcc0eb0 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_35.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_35.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|F|o@1| ||| |a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @36
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|r|g@1|l|o|b|a|l| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|r|g|l|o|c|a|l| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|r|g|u|m|e|n|t| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|s|c|i@1| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&@54
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|F|o@1| ||| |a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @36
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |a+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|u|f@1|e|r| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|N|e|x|t| +0#0000000&@56
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|a|l@1| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|a|l@1| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|a|d@1| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|a|l|t| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|d|e|l|e|t|e| +0#0000000&@54
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|f|i|r|s|t| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|l|a|s|t| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|m|o|d|i|f|i|e|d| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|n|e|x|t| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|o|t|r|i|g|h|t| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|p|r|e|v|i|o|u|s| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@54
@57|6|3|1|,|1| @8|5|3|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_36.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_36.dump
index 3658621..816aed4 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_36.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_36.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|r|e|a|k| +0#0000000&@56
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|m|o|d|i|f|i|e|d| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|n|e|x|t| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|o|t|r|i|g|h|t| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|p|r|e|v|i|o|u|s| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@54
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|r|e|a|k| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|r|e|a|k|a|d@1| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|r|e|a|k|d|e|l| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|r|e|a|k|l|i|s|t| +0#0000000&@52
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|r|o|w|s|e| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|r|o|w|s|e| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|u|f|d|o| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|u|f@1|e|r|s| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|u|n|l|o|a|d| +0#0000000&@54
@@ -13,8 +17,4 @@
@4|t|e|x|t| @66
|.+0#af5f00255&| +0#0000000&@73
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|N|e|x|t| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|N|f|i|l|e| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|a|b@1|r|e|v| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|a|b|c|l|e|a|r| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|a|b|o|v|e| +0#0000000&@55
@57|6|4|9|,|1| @8|5|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_37.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_37.dump
index 3da296c..4e7a780 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_37.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_37.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|a|b|o|v|e| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|a|d@1|b|u|f@1|e|r| +0#0000000&@51
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|N|e|x|t| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|N|f|i|l|e| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|a|b@1|r|e|v| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|a|b|c|l|e|a|r| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|a|b|o|v|e| +0#0000000&@55
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|a|d@1|b|u|f@1|e|r| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|a|d@1|e|x|p|r| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|a|d@1|f|i|l|e| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|a|f|t|e|r| +0#0000000&@55
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|a|l@1| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|a|l@1| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|a|t|c|h| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|b|e|f|o|r|e| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|b|e|l|o|w| +0#0000000&@55
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&@1|l|o|s|e| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|d| +0#0000000&@59
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|d|o| +0#0000000&@58
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|f|d|o| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|e|n|t|e|r| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|e|x|p|r| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|f|i|l|e| +0#0000000&@56
@57|6@1|7|,|1| @8|5|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_38.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_38.dump
index 33e2088..51f5a8c 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_38.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_38.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|f|i|l|e| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|f|i|r|s|t| +0#0000000&@55
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|d|o| +0#0000000&@58
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|f|d|o| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|e|n|t|e|r| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|e|x|p|r| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|f|i|l|e| +0#0000000&@56
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|f|i|r|s|t| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|g|e|t|b|u|f@1|e|r| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|g|e|t|e|x|p|r| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|g|e|t|f|i|l|e| +0#0000000&@53
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|h|a|n|g|e|s| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|h|a|n|g|e|s| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|h|d|i|r| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|h|e|c|k|p|a|t|h| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|h|e|c|k|t|i|m|e| +0#0000000&@52
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|l|e|a|r|j|u|m|p|s| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|l|i|s|t| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|l|o|s|e| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|m|a|p| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|m|e|n|u| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|n|e|x|t| +0#0000000&@56
@57|6|8|5|,|1| @8|5|7|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_39.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_39.dump
index ef99508..35d89fb 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_39.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_39.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|n|e|x|t| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|n|e|w|e|r| +0#0000000&@55
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|l|o|s|e| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|m|a|p| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|m|e|n|u| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|n|e|x|t| +0#0000000&@56
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|n|e|w|e|r| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|n|f|i|l|e| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|n|o|r|e|a|b@1|r|e|v| +0#0000000&@50
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|o|p|y| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|o|l|d|e|r| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|o|l|o|r|s|c|h|e|m|e| +0#0000000&@50
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|o|n|t|i|n|u|e| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|o|n|f|i|r|m| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|o|n|s|t| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|o|p|e|n| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|p|r|e|v|i|o|u|s| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|p|f|i|l|e| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|q|u|i|t| +0#0000000&@56
@57|7|0|3|,|1| @8|5|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_40.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_40.dump
index 29d35c5..a4c2e52 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_40.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_40.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|q|u|i|t| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@54
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|o|n|s|t| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|o|p|e|n| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|p|r|e|v|i|o|u|s| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|p|f|i|l|e| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|q|u|i|t| +0#0000000&@56
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|s|c|o|p|e| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|s|t|a|g| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|u|n|m|a|p| +0#0000000&@55
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|u|n|a|b@1|r|e|v| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|u|n|a|b@1|r|e|v| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|w|i|n|d|o|w| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|e|l|e|t|e| +0#0000000&@55
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|e|f|c|o|m|p|i|l|e| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|e|f|e|r| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|e|l|c|o|m@1|a|n|d| +0#0000000&@51
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&@50
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|e|l|m|a|r|k|s| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|i|f@1|u|p|d|a|t|e| +0#0000000&@51
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|i|f@1|g|e|t| +0#0000000&@54
-@57|7|2|1|,|1| @8|6|1|%|
+@57|7|2|1|,|1| @8|6|0|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_41.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_41.dump
index 426028d..f9fb600 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_41.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_41.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|i|f@1|g|e|t| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|i|f@1|o|f@1| +0#0000000&@54
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|e|l|c|o|m@1|a|n|d| +0#0000000&@51
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&@50
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|e|l|m|a|r|k|s| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|i|f@1|u|p|d|a|t|e| +0#0000000&@51
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|i|f@1|g|e|t| +0#0000000&@54
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|i|f@1|o|f@1| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|i|f@1|p|a|t|c|h| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|i|f@1|p|u|t| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|i|f@1|s|p|l|i|t| +0#0000000&@52
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|i|g|r|a|p|h|s| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|i|s|p|l|a|y| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|i|s|a|s@1|e|m|b|l|e| +0#0000000&@50
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|o|a|u|t|o|c|m|d| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|o|a|u|t|o|a|l@1| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|p| +0#0000000&@59
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|r|o|p| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|s|e|a|r|c|h| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|s|p|l|i|t| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|d|i|t| +0#0000000&@57
@57|7|3|9|,|1| @8|6|2|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_42.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_42.dump
index 97e291f..12db3d0 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_42.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_42.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|d|i|t| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|a|r|l|i|e|r| +0#0000000&@54
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|p| +0#0000000&@59
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|r|o|p| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|s|e|a|r|c|h| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |d+0#af5f00255&|s|p|l|i|t| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|d|i|t| +0#0000000&@57
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|a|r|l|i|e|r| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|c|h|o|c|o|n|s|o|l|e| +0#0000000&@50
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|c|h|o|e|r@1| +0#0000000&@54
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|c|h|o|h|l| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|c|h|o|h|l| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|c|h|o|m|s|g| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|c|h|o|n| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|c|h|o|w|i|n|d|o|w| +0#0000000&@51
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|n|d|c|l|a|s@1| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|n|d|i|f| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|n|d|f|o|r| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@50
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|n|d|t|r|y| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|n|d|w|h|i|l|e| +0#0000000&@53
-@57|7|5|7|,|1| @8|6|4|%|
+@57|7|5|7|,|1| @8|6|3|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_43.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_43.dump
index 6764cea..fd68f59 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_43.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_43.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|n|d|w|h|i|l|e| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|n|e|w| +0#0000000&@57
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|n|d|i|f| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|n|d|f|o|r| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@50
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|n|d|t|r|y| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|n|d|w|h|i|l|e| +0#0000000&@53
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|n|e|w| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|v|a|l| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|x| +0#0000000&@59
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&@54
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|x|i|t| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|x|i|t| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|x|p|o|r|t| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |e+0#af5f00255&|x|u|s|a|g|e| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|i|l|e| +0#0000000&@57
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|i|n|d| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|i|n|a|l| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|i|n|a|l@1|y| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|i|n|i|s|h| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|i|r|s|t| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|i|x|d|e|l| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|o|l|d| +0#0000000&@57
@57|7@1|5|,|1| @8|6|5|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_44.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_44.dump
index 7456c8d..34a09b1 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_44.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_44.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|o|l|d| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|o|l|d|c|l|o|s|e| +0#0000000&@52
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|i|n|a|l@1|y| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|i|n|i|s|h| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|i|r|s|t| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|i|x|d|e|l| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|o|l|d| +0#0000000&@57
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|o|l|d|c|l|o|s|e| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|o|l|d@1|o@1|p|e|n| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|o|l|d@1|o|c|l|o|s|e|d| +0#0000000&@49
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|o|l|d|o|p|e|n| +0#0000000&@53
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|o|r| +0#0000000&@58
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|o|r| +0#0000000&@58
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |g+0#af5f00255&|l|o|b|a|l|/|.+0#0000000&@2|/+0#af5f00255&| +0#0000000&@50
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |g+0#af5f00255&|o|t|o| +0#0000000&@57
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |g+0#af5f00255&|v|i|m| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|a|r|d|c|o|p|y| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|e|l|p| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|e|l|p|c|l|o|s|e| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|e|l|p|f|i|n|d| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|e|l|p|g|r|e|p| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|e|l|p|t|a|g|s| +0#0000000&@53
-@57|7|9|3|,|1| @8|6|7|%|
+@57|7|9|3|,|1| @8|6@1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_45.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_45.dump
index df10b4b..25f608e 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_45.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_45.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|e|l|p|t|a|g|s| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&@52
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|e|l|p| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|e|l|p|c|l|o|s|e| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|e|l|p|f|i|n|d| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|e|l|p|g|r|e|p| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|e|l|p|t|a|g|s| +0#0000000&@53
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|i|d|e| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |h+0#af5f00255&|o|r|i|z|o|n|t|a|l| +0#0000000&@51
->"+0#0000e05&| |F+0#0000001#ffff4012|I|X|M|E| +0#0000000#ffffff0@67
+|"+0#0000e05&| |F+0#0000001#ffff4012|I|X|M|E| +0#0000000#ffffff0@67
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i|n|s|e|r|t| @55
@4|t|e|x|t| @66
|.+0#af5f00255&| +0#0000000&@73
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|j|u|m|p| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|l|i|s|t| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|m|a|p| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|m|e|n|u| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|m|p|o|r|t| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@53
@57|8|1@1|,|1| @8|6|8|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_46.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_46.dump
index af1fcde..662461b 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_46.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_46.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|n|o|r|e|a|b@1|r|e|v| +0#0000000&@50
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|m|a|p| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|m|e|n|u| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|m|p|o|r|t| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@53
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|n|o|r|e|a|b@1|r|e|v| +0#0000000&@50
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|n|t|r|o| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|s|e|a|r|c|h| +0#0000000&@54
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|s|p|l|i|t| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|s|p|l|i|t| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|u|n|m|a|p| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|u|n|a|b@1|r|e|v| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |i+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@54
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |k+0#af5f00255&|e@1|p|a|l|t| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |k+0#af5f00255&|e@1|p|m|a|r|k|s| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |k+0#af5f00255&|e@1|p|j|u|m|p|s| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |k+0#af5f00255&|e@1|p@1|a|t@1|e|r|n|s| +0#0000000&@49
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|N|e|x|t| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|N|f|i|l|e| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|i|s|t| +0#0000000&@57
-@57|8|2|9|,|1| @8|7|0|%|
+@57|8|2|9|,|1| @8|6|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_47.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_47.dump
index bf31154..48dcb9c 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_47.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_47.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|i|s|t| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|a|b|o|v|e| +0#0000000&@55
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |k+0#af5f00255&|e@1|p|j|u|m|p|s| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |k+0#af5f00255&|e@1|p@1|a|t@1|e|r|n|s| +0#0000000&@49
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|N|e|x|t| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|N|f|i|l|e| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|i|s|t| +0#0000000&@57
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|a|b|o|v|e| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|a|d@1|e|x|p|r| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|a|d@1|b|u|f@1|e|r| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|a|d@1|f|i|l|e| +0#0000000&@53
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|a|f|t|e|r| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|a|f|t|e|r| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|a|s|t| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|a|n|g|u|a|g|e| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|a|t|e|r| +0#0000000&@56
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|b|u|f@1|e|r| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|c|d| +0#0000000&@58
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|c|h|d|i|r| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|c|l|o|s|e| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|c|s|c|o|p|e| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|d|o| +0#0000000&@58
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|f|d|o| +0#0000000&@57
@57|8|4|7|,|1| @8|7|1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_48.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_48.dump
index 0ef0613..6952669 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_48.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_48.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|f|d|o| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|e|f|t| +0#0000000&@57
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|c|h|d|i|r| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|c|l|o|s|e| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|c|s|c|o|p|e| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|d|o| +0#0000000&@58
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|f|d|o| +0#0000000&@57
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|e|f|t| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|e|f|t|a|b|o|v|e| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|e|g|a|c|y| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|e|t| +0#0000000&@58
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|e|x|p|r| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|e|x|p|r| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|f|i|l|e| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|f|i|r|s|t| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|g|e|t|b|u|f@1|e|r| +0#0000000&@51
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|g|r|e|p|a|d@1| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|h|e|l|p|g|r|e|p| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|h|i|s|t|o|r|y| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&@1| +0#0000000&@59
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&@1|a|s|t| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&@1|i|s|t| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|m|a|k|e| +0#0000000&@56
@57|8|6|5|,|1| @8|7|3|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_49.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_49.dump
index f451055..3f47c96 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_49.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_49.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|m|a|k|e| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|m|a|p| +0#0000000&@57
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|h|i|s|t|o|r|y| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&@1| +0#0000000&@59
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&@1|a|s|t| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&@1|i|s|t| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|m|a|k|e| +0#0000000&@56
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|m|a|p| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|n|e|x|t| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|n|e|w|e|r| +0#0000000&@55
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|n|f|i|l|e| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|n|f|i|l|e| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|o|a|d|k|e|y|m|a|p| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|o|a|d|v|i|e|w| +0#0000000&@53
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|o|p|e|n| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|p|r|e|v|i|o|u|s| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|p|f|i|l|e| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|s| +0#0000000&@59
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|t|a|g| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|u|n|m|a|p| +0#0000000&@55
@57|8@1|3|,|1| @8|7|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_50.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_50.dump
index 1cd5033..01a8246 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_50.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_50.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|u|n|m|a|p| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|u|a| +0#0000000&@58
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|p|f|i|l|e| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|s| +0#0000000&@59
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|t|a|g| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|u|n|m|a|p| +0#0000000&@55
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|u|a| +0#0000000&@58
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|u|a|d|o| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|u|a|f|i|l|e| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|v|i|m|g|r|e|p| +0#0000000&@53
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|v|i|m|g|r|e|p|a|d@1| +0#0000000&@50
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|v|i|m|g|r|e|p|a|d@1| +0#0000000&@50
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |l+0#af5f00255&|w|i|n|d|o|w| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|o|v|e| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|a|r|k| +0#0000000&@57
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|a|p|c|l|e|a|r| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|a|r|k|s| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|a|t|c|h| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|e|n|u| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&@48
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|e|s@1|a|g|e|s| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|k|e|x|r|c| +0#0000000&@55
@57|9|0|1|,|1| @8|7|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_51.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_51.dump
index b9d0601..0fb8f18 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_51.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_51.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|k|e|x|r|c| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|k|s|e|s@1|i|o|n| +0#0000000&@52
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|a|t|c|h| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|e|n|u| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&@48
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|e|s@1|a|g|e|s| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|k|e|x|r|c| +0#0000000&@55
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|k|s|e|s@1|i|o|n| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|k|s|p|e|l@1| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|k|v|i|m|r|c| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|k|v|i|e|w| +0#0000000&@55
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|o|d|e| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|o|d|e| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|z|s|c|h|e|m|e| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |m+0#af5f00255&|z|f|i|l|e| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|b|c|l|o|s|e| +0#0000000&@54
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|e|w| +0#0000000&@58
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|m|a|p| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|m|e|n|u| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&@1|o|r|e|m|a|p| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&@1|o|r|e|m|e|n|u| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|o|a|u|t|o|c|m|d| +0#0000000&@52
@57|9|1|9|,|1| @8|7@1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_52.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_52.dump
index 7ebe287..810f100 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_52.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_52.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|o|a|u|t|o|c|m|d| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|o|r|e|m|a|p| +0#0000000&@54
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|m|e|n|u| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&@1|o|r|e|m|a|p| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&@1|o|r|e|m|e|n|u| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|o|a|u|t|o|c|m|d| +0#0000000&@52
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|o|r|e|m|a|p| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|o|h|l|s|e|a|r|c|h| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|o|r|e|a|b@1|r|e|v| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|o|r|e|m|e|n|u| +0#0000000&@53
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|o|r|m|a|l| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|o|r|m|a|l| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|o|s|w|a|p|f|i|l|e| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|u|m|b|e|r| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |n+0#af5f00255&|u|n|m|a|p| +0#0000000&@55
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|m|a|p| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|m|e|n|u| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|n|l|y| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|p|t|i|o|n|s| +0#0000000&@54
@57|9|3|7|,|1| @8|7|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_53.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_53.dump
index 420001c..80238a6 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_53.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_53.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|p|t|i|o|n|s| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|u|n|m|a|p| +0#0000000&@55
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|m|e|n|u| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|n|l|y| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|p|t|i|o|n|s| +0#0000000&@54
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|u|n|m|a|p| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |o+0#af5f00255&|w|n|s|y|n|t|a|x| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|a|c|k|a|d@1| +0#0000000&@54
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|a|c|k|l|o|a|d|a|l@1| +0#0000000&@50
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|a|c|k|l|o|a|d|a|l@1| +0#0000000&@50
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|c|l|o|s|e| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|e|d|i|t| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|e|r|l| +0#0000000&@57
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|r|o|m|p|t|f|i|n|d| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|r|o|m|p|t|r|e|p|l| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|e|r|l|d|o| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|o|p| +0#0000000&@58
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|o|p|u|p| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&@1|o|p| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|r|e|s|e|r|v|e| +0#0000000&@53
@57|9|5@1|,|1| @8|8|0|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_54.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_54.dump
index 2d16427..67137ba 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_54.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_54.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|r|e|s|e|r|v|e| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|r|e|v|i|o|u|s| +0#0000000&@53
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|e|r|l|d|o| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|o|p| +0#0000000&@58
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|o|p|u|p| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&@1|o|p| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|r|e|s|e|r|v|e| +0#0000000&@53
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|r|e|v|i|o|u|s| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|s|e|a|r|c|h| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|t|a|g| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|t|N|e|x|t| +0#0000000&@55
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|t|f|i|r|s|t| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|t|f|i|r|s|t| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|t|j|u|m|p| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|t|l|a|s|t| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|t|n|e|x|t| +0#0000000&@55
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|u|b|l|i|c| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|u|t| +0#0000000&@58
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|w|d| +0#0000000&@58
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|3| +0#0000000&@58
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|t|h|o|n|3| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|3|d|o| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|3|f|i|l|e| +0#0000000&@54
@57|9|7|3|,|1| @8|8|2|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_55.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_55.dump
index d172d88..361f834 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_55.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_55.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|3|f|i|l|e| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|t|h|o|n| +0#0000000&@55
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|w|d| +0#0000000&@58
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|3| +0#0000000&@58
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|t|h|o|n|3| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|3|d|o| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|3|f|i|l|e| +0#0000000&@54
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|t|h|o|n| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|d|o| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|f|i|l|e| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|x| +0#0000000&@58
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|t|h|o|n|x| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|t|h|o|n|x| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|x|d|o| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |p+0#af5f00255&|y|x|f|i|l|e| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |q+0#af5f00255&|u|i|t| +0#0000000&@57
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|c|o|v|e|r| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|d|o| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|d|i|r| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|d|r|a|w| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|d|r|a|w|s|t|a|t|u|s| +0#0000000&@49
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|d|r|a|w|t|a|b|l|i|n|e| +0#0000000&@48
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|g|i|s|t|e|r|s| +0#0000000&@52
-@57|9@1|1|,|1| @8|8|4|%|
+@57|9@1|1|,|1| @8|8|3|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_56.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_56.dump
index 847d6db..ba57541 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_56.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_56.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|g|i|s|t|e|r|s| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|s|i|z|e| +0#0000000&@55
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|d|i|r| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|d|r|a|w| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|d|r|a|w|s|t|a|t|u|s| +0#0000000&@49
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|d|r|a|w|t|a|b|l|i|n|e| +0#0000000&@48
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|g|i|s|t|e|r|s| +0#0000000&@52
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|s|i|z|e| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|t|a|b| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|e|w|i|n|d| +0#0000000&@55
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|i|g|h|t| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|i|g|h|t| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|i|g|h|t|b|e|l|o|w| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|u|b|y| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|u|b|y|d|o| +0#0000000&@55
@@ -11,10 +15,6 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|u|n|d|o| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|u|n|t|i|m|e| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |r+0#af5f00255&|v|i|m|i|n|f|o| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||+0#af5f00255&| |s|u|b|s|t|i|t|u|t|e| +0#0000000&@51
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|u|b|s|t|i|t|u|t|e| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|N|e|x|t| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|a|n|d|b|o|x| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|a|r|g|u|m|e|n|t| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|a|l@1| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|a|v|e|a|s| +0#0000000&@55
@57|1|0@1|9|,|1| @7|8|5|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_57.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_57.dump
index 38ade08..031d9c4 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_57.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_57.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|a|v|e|a|s| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|b|u|f@1|e|r| +0#0000000&@54
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|N|e|x|t| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|a|n|d|b|o|x| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|a|r|g|u|m|e|n|t| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|a|l@1| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|a|v|e|a|s| +0#0000000&@55
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|b|u|f@1|e|r| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|b|N|e|x|t| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|b|a|l@1| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|b|f|i|r|s|t| +0#0000000&@54
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|b|l|a|s|t| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|b|l|a|s|t| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|b|m|o|d|i|f|i|e|d| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|b|n|e|x|t| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|b|p|r|e|v|i|o|u|s| +0#0000000&@51
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|c|r|i|p|t|v|e|r|s|i|o|n| +0#0000000&@48
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|c|s|c|o|p|e| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&@58
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|e|t|f|i|l|e|t|y|p|e| +0#0000000&@50
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|e|t|g|l|o|b|a|l| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|e|t|l|o|c|a|l| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|f|i|n|d| +0#0000000&@56
-@57|1|0|2|7|,|1| @7|8|7|%|
+@57|1|0|2|7|,|1| @7|8|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_58.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_58.dump
index a35547c..1d24fd5 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_58.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_58.dump
@@ -1,20 +1,20 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|f|i|n|d| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|f|i|r|s|t| +0#0000000&@55
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&@58
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|e|t|f|i|l|e|t|y|p|e| +0#0000000&@50
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|e|t|g|l|o|b|a|l| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|e|t|l|o|c|a|l| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|f|i|n|d| +0#0000000&@56
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|f|i|r|s|t| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|h|e|l@1| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|i|m|a|l|t| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|i|g|n| +0#0000000&@57
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|i|l|e|n|t| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|i|l|e|n|t| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|l|e@1|p| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|l|e@1|p|!| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|l|a|s|t| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||+0#af5f00255&| |s|m|a|g|i|c| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|m|a|g|i|c| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|m|a|p| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|m|e|n|u| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|m|i|l|e| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|n|e|x|t| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||+0#af5f00255&| |s|n|o|m|a|g|i|c| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|o|r|t| +0#0000000&@57
@57|1|0|4|5|,|1| @7|8@1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_59.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_59.dump
index 85800e5..920861c 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_59.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_59.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|o|r|t| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|o|u|r|c|e| +0#0000000&@55
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|n|e|x|t| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|n|o|m|a|g|i|c| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|o|r|t| +0#0000000&@57
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|o|u|r|c|e| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|p|e|l@1|d|u|m|p| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|p|e|l@1|g|o@1|d| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|p|e|l@1|i|n|f|o| +0#0000000&@52
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|p|e|l@1|r|a|r|e| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|p|e|l@1|r|a|r|e| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|p|e|l@1|r|e|p|a|l@1| +0#0000000&@50
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|p|e|l@1|u|n|d|o| +0#0000000&@52
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|p|e|l@1|w|r|o|n|g| +0#0000000&@51
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|o|p| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|a|g| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|a|r|t|i|n|s|e|r|t| +0#0000000&@50
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|a|r|t|g|r|e|p|l|a|c|e| +0#0000000&@48
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|a|r|t|r|e|p|l|a|c|e| +0#0000000&@49
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|a|t|i|c| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|o|p|i|n|s|e|r|t| +0#0000000&@51
-@57|1|0|6|3|,|1| @7|9|0|%|
+@57|1|0|6|3|,|1| @7|8|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_60.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_60.dump
index 79f5e1e..9733757 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_60.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_60.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|o|p|i|n|s|e|r|t| +0#0000000&@51
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|j|u|m|p| +0#0000000&@55
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|a|r|t|i|n|s|e|r|t| +0#0000000&@50
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|a|r|t|g|r|e|p|l|a|c|e| +0#0000000&@48
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|a|r|t|r|e|p|l|a|c|e| +0#0000000&@49
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|a|t|i|c| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|o|p|i|n|s|e|r|t| +0#0000000&@51
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|j|u|m|p| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|t|s|e|l|e|c|t| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|u|n|h|i|d|e| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|u|n|m|a|p| +0#0000000&@55
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|u|s|p|e|n|d| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|v|i|e|w| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|w|a|p|n|a|m|e| +0#0000000&@53
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&| +0#0000000&@60
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|N|e|x|t| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|N|e|x|t| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|c|l|o|s|e| +0#0000000&@53
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|d|o| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|e|d|i|t| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|f|i|n|d| +0#0000000&@54
@57|1|0|8|1|,|1| @7|9|1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_61.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_61.dump
index efb27e8..f278eb5 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_61.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_61.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|f|i|n|d| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|f|i|r|s|t| +0#0000000&@53
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|N|e|x|t| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|c|l|o|s|e| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|d|o| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|e|d|i|t| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|f|i|n|d| +0#0000000&@54
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|f|i|r|s|t| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|l|a|s|t| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|m|o|v|e| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|n|e|w| +0#0000000&@55
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|n|e|x|t| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|n|e|x|t| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|o|n|l|y| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|p|r|e|v|i|o|u|s| +0#0000000&@50
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|b|r|e|w|i|n|d| +0#0000000&@52
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|a|g|s| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|c|d| +0#0000000&@58
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|c|h|d|i|r| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|c|l| +0#0000000&@58
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|c|l|d|o| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|c|l|f|i|l|e| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|e|a|r|o|f@1| +0#0000000&@54
-@57|1|0|9@1|,|1| @7|9|3|%|
+@57|1|0|9@1|,|1| @7|9|2|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_62.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_62.dump
index 8b85dd9..933f7a0 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_62.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_62.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|e|a|r|o|f@1| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|e|r|m|i|n|a|l| +0#0000000&@53
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|c|h|d|i|r| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|c|l| +0#0000000&@58
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|c|l|d|o| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|c|l|f|i|l|e| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|e|a|r|o|f@1| +0#0000000&@54
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|e|r|m|i|n|a|l| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|f|i|r|s|t| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|h|r|o|w| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|j|u|m|p| +0#0000000&@56
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|l|a|s|t| +0#0000000&@56
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|l|a|s|t| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|l|m|e|n|u| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|l|n|o|r|e|m|e|n|u| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|l|u|n|m|e|n|u| +0#0000000&@53
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|n|e|x|t| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|o|p|l|e|f|t| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|p|r|e|v|i|o|u|s| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|r|y| +0#0000000&@58
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|s|e|l|e|c|t| +0#0000000&@54
@57|1@2|7|,|1| @7|9|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_63.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_63.dump
index cf5d08b..f93ac7c 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_63.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_63.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|s|e|l|e|c|t| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|u|n|m|a|p| +0#0000000&@55
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|o|p|l|e|f|t| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|p|r|e|v|i|o|u|s| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|r|e|w|i|n|d| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|r|y| +0#0000000&@58
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|s|e|l|e|c|t| +0#0000000&@54
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|u|n|m|a|p| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |t+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |u+0#af5f00255&|n|d|o| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |u+0#af5f00255&|n|d|o|j|o|i|n| +0#0000000&@53
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |u+0#af5f00255&|n|d|o|l|i|s|t| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |u+0#af5f00255&|n|d|o|l|i|s|t| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |u+0#af5f00255&|n|a|b@1|r|e|v|i|a|t|e| +0#0000000&@49
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |u+0#af5f00255&|n|a|b@1|r|e|v|i|a|t|e| +0#0000000&@49
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |u+0#af5f00255&|n|h|i|d|e| +0#0000000&@55
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |u+0#af5f00255&|n|m|e|n|u| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |u+0#af5f00255&|n|s|i|l|e|n|t| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |u+0#af5f00255&|p|d|a|t|e| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|g|l|o|b|a|l|/|.+0#0000000&@2|/+0#af5f00255&| +0#0000000&@49
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|a|r| +0#0000000&@58
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|e|r|s|i|o|n| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|e|r|b|o|s|e| +0#0000000&@54
@57|1@1|3|5|,|1| @7|9|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_64.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_64.dump
index bcffc89..5561d99 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_64.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_64.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|e|r|b|o|s|e| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|e|r|t|i|c|a|l| +0#0000000&@53
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |u+0#af5f00255&|p|d|a|t|e| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|g|l|o|b|a|l|/|.+0#0000000&@2|/+0#af5f00255&| +0#0000000&@49
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|a|r| +0#0000000&@58
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|e|r|s|i|o|n| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|e|r|b|o|s|e| +0#0000000&@54
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|e|r|t|i|c|a|l| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|i|m|9|c|m|d| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|i|m|9|s|c|r|i|p|t| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|i|m|g|r|e|p| +0#0000000&@54
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|i|m|g|r|e|p|a|d@1| +0#0000000&@51
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|i|m|g|r|e|p|a|d@1| +0#0000000&@51
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|i|s|u|a|l| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|i|u|s|a|g|e| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|i|e|w| +0#0000000&@57
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|n|e|w| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|s|p|l|i|t| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|u|n|m|a|p| +0#0000000&@55
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@54
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |w+0#af5f00255&|i|n|d|o| +0#0000000&@56
@57|1@1|5|3|,|1| @7|9|7|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_65.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_65.dump
index 8041747..0e96806 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_65.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_65.dump
@@ -1,9 +1,13 @@
-|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |w+0#af5f00255&|i|n|d|o| +0#0000000&@56
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |w+0#af5f00255&|r|i|t|e| +0#0000000&@56
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|s|p|l|i|t| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|u|n|m|a|p| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |v+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |w+0#af5f00255&|i|n|d|o| +0#0000000&@56
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |w+0#af5f00255&|r|i|t|e| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |w+0#af5f00255&|N|e|x|t| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |w+0#af5f00255&|a|l@1| +0#0000000&@57
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |w+0#af5f00255&|h|i|l|e| +0#0000000&@56
->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |w+0#af5f00255&|i|n|s|i|z|e| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |w+0#af5f00255&|i|n|s|i|z|e| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |w+0#af5f00255&|i|n|p|o|s| +0#0000000&@55
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |w+0#af5f00255&|n|e|x|t| +0#0000000&@56
@@ -13,8 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |w+0#af5f00255&|u|n|d|o| +0#0000000&@56
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |w+0#af5f00255&|v|i|m|i|n|f|o| +0#0000000&@53
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|i|t| +0#0000000&@58
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|a|l@1| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@52
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|m|a|p| +0#0000000&@57
-|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|m|e|n|u| +0#0000000&@56
@57|1@1|7|1|,|1| @7|9@1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_66.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_66.dump
new file mode 100644
index 0000000..cfb1298
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_66.dump
@@ -0,0 +1,20 @@
+|c+0#af5f00255#ffffff0|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|i|t| +0#0000000&@58
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|a|l@1| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|m|a|p| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|m|e|n|u| +0#0000000&@56
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|r|e|s|t|o|r|e| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|n|o|r|e|m|a|p| +0#0000000&@53
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|n|o|r|e|m|e|n|u| +0#0000000&@52
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|u|n|m|a|p| +0#0000000&@55
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@54
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |y+0#af5f00255&|a|n|k| +0#0000000&@57
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |z+0#af5f00255&| +0#0000000&@60
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1@1|8|9|,|1| @7|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_99.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_99.dump
index 869c6d3..2c0e2ec 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_99.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_99.dump
@@ -17,4 +17,4 @@
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |x+0#af5f00255&|u|n|m|e|n|u| +0#0000000&@54
|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |y+0#af5f00255&|a|n|k| +0#0000000&@57
>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |z+0#af5f00255&| +0#0000000&@60
-@57|1@1|9|1|,|1| @7|B|o|t|
+@57|1@1|9|5|,|1| @7|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_00.dump b/runtime/syntax/testdir/dumps/vim_ex_def_00.dump
new file mode 100644
index 0000000..4bc8858
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|d|e|f| |c|o|m@1|a|n|d| +0#0000000&@56
+@75
+@75
+|"+0#0000e05&| |l|i|s|t| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&@71
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1| @67
+|d+0#af5f00255&|e|f| +0#0000000&|/+0#af5f00255&|F+0#0000000&|o@1|.|*| @64
+@75
+|d+0#af5f00255&|e|f| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@58
+|d+0#af5f00255&|e|f| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@61
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1| ||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@54
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1| |"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+@75
+@75
+|"+0#0000e05&| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@62
+@75
+|"+0#0000e05&| |e|m|p|t|y| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@56
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_01.dump b/runtime/syntax/testdir/dumps/vim_ex_def_01.dump
new file mode 100644
index 0000000..c7b49de
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+@75
+|"+0#0000e05&| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@62
+@75
+|"+0#0000e05&| |e|m|p|t|y| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@56
+>d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|#+0#0000e05&| |c|u|r|l|y|-|b|r|a|c|e| |n|a|m|e|s| +0#0000000&@55
+|d+0#af5f00255&|e|f| +0#0000000&|{|"|F|"|}|o@1|(+0#e000e06&|)| +0#0000000&@61
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|{|"|o|"|}|o|(+0#e000e06&|)| +0#0000000&@61
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o|{|"|o|"|}|(+0#e000e06&|)| +0#0000000&@61
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|{|"|F|"|}|o|{|"|o|"|}|(+0#e000e06&|)| +0#0000000&@57
+@57|1|9|,|1| @9|1|2|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_02.dump b/runtime/syntax/testdir/dumps/vim_ex_def_02.dump
new file mode 100644
index 0000000..7ebe3c6
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_02.dump
@@ -0,0 +1,20 @@
+|d+0#af5f00255#ffffff0|e|f| +0#0000000&|{|"|F|"|}|o|{|"|o|"|}|(+0#e000e06&|)| +0#0000000&@57
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|{|"|F|"|}|{|"|o|"|}|{|"|o|"|}|(+0#e000e06&|)| +0#0000000&@53
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+> @74
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@57
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|#+0#0000e05&| |t|r|a|i|l|i|n|g| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@53
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@57
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@55
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@47
+@57|3|7|,|0|-|1| @7|2|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_03.dump b/runtime/syntax/testdir/dumps/vim_ex_def_03.dump
new file mode 100644
index 0000000..50fed41
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_03.dump
@@ -0,0 +1,20 @@
+|d+0#af5f00255#ffffff0|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@47
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f|!| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@56
+@2>r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|g+0#e000e06&|:|F+0#0000000&|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@55
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|s+0#e000e06&|:|F+0#0000000&|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@55
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|<+0#e000e06&|S|I|D|>|F+0#0000000&|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@52
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@57|5@1|,|3| @9|4|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_04.dump b/runtime/syntax/testdir/dumps/vim_ex_def_04.dump
new file mode 100644
index 0000000..64141b7
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_04.dump
@@ -0,0 +1,20 @@
+|e+0#af5f00255#ffffff0|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|f|o@1|#|b|a|r|#|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@49
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+> @74
+|"+0#0000e05&| |s|a|m|e| |n|a|m|e| |a|s| |a|n| |E|x| |c|o|m@1|a|n|d| +0#0000000&@46
+|d+0#af5f00255&|e|f| +0#0000000&|s+0#e000e06&|:|l+0#0000000&|s|(+0#e000e06&|)| +0#0000000&@64
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+@75
+|"+0#0000e05&| |r|e|t|u|r|n| |t|y|p|e|s| +0#0000000&@60
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |v+0#00e0003&|o|i|d| +0#0000000&@59
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |v+0#00e0003&|o|i|d| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@49
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+@57|7|3|,|0|-|1| @7|6|3|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_05.dump b/runtime/syntax/testdir/dumps/vim_ex_def_05.dump
new file mode 100644
index 0000000..9fc0cfa
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_05.dump
@@ -0,0 +1,20 @@
+|d+0#af5f00255#ffffff0|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |l+0#00e0003&|i|s|t|<|d|i|c|t|<|n|u|m|b|e|r|>@1| +0#0000000&@45
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |f+0#00e0003&|u|n|c|(|d|i|c|t|<|l|i|s|t|<|n|u|m|b|e|r|>@1|,+0#0000000&| |f+0#00e0003&|u|n|c|,+0#0000000&| |b+0#00e0003&|o@1|l|,+0#0000000&| |f+0#00e0003&|u|n|c|(|n|u|m|b|e|r|,+0#0000000&| |l+0#00e0003&|i|s|t|<|n|u|m|b|e|r|>|)@1
+|:+0#0000000&| |b+0#00e0003&|o@1|l| +0#0000000&@68
+>e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+@75
+|"+0#0000e05&| |:|e|n|d@1|e|f| |t|r|a|i|l|i|n|g| +0#0000000&@56
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65
+| +0#0000e05&@1|#| |t|r|a|i|l|i|n|g| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@51
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@55
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@58
+@57|9|1|,|1| @9|8|0|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_06.dump b/runtime/syntax/testdir/dumps/vim_ex_def_06.dump
new file mode 100644
index 0000000..f073026
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_06.dump
@@ -0,0 +1,20 @@
+|e+0#af5f00255#ffffff0|n|d@1|e|f| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@58
+@75
+@75
+|"+0#0000e05&| |p|a|r|a|m|e|t|e|r|s| +0#0000000&@62
+@75
+>d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|x+0#00e0e07&|:+0#0000000&| |b+0#00e0003&|o@1|l|,+0#0000000&| |y+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|4+0#e000002&|2|,+0#0000000&| |z+0#00e0e07&|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|z|e|d|"|)+0#e000e06&| +0#0000000&@31
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&| +0#0000000&@66
+@4|x+0#00e0e07&|:+0#0000000&| |b+0#00e0003&|o@1|l|,+0#0000000&| @62
+@4|y+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|4+0#e000002&|2|,+0#0000000&| @63
+@4|z+0#00e0e07&|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|z|e|d|"|)+0#e000e06&| +0#0000000&@52
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+@75
+|"+0#0000e05&| |c|o|m@1|e|n|t|s| +0#0000000&@64
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65
+| +0#0000e05&@1|#| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
+@57|1|0|9|,|1| @8|9|7|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_99.dump b/runtime/syntax/testdir/dumps/vim_ex_def_99.dump
new file mode 100644
index 0000000..2eca72a
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_99.dump
@@ -0,0 +1,20 @@
+|"+0#0000e05#ffffff0| |p|a|r|a|m|e|t|e|r|s| +0#0000000&@62
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|x+0#00e0e07&|:+0#0000000&| |b+0#00e0003&|o@1|l|,+0#0000000&| |y+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|4+0#e000002&|2|,+0#0000000&| |z+0#00e0e07&|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|z|e|d|"|)+0#e000e06&| +0#0000000&@31
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&| +0#0000000&@66
+@4|x+0#00e0e07&|:+0#0000000&| |b+0#00e0003&|o@1|l|,+0#0000000&| @62
+@4|y+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|4+0#e000002&|2|,+0#0000000&| @63
+@4|z+0#00e0e07&|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|z|e|d|"|)+0#e000e06&| +0#0000000&@52
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+@75
+|"+0#0000e05&| |c|o|m@1|e|n|t|s| +0#0000000&@64
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65
+| +0#0000e05&@1|#| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
+@2|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&@56
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+> @74
+@57|1|2|5|,|0|-|1| @6|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_00.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_00.dump
new file mode 100644
index 0000000..78659e7
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|d|e|f| |c|o|m@1|a|n|d| +0#0000000&@56
+|"+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|v|i|m|s|y|n|_|f|o|l|d|i|n|g| |=| |"+0#e000002&|f|"| +0#0000e05&||| |s|e|t| |f|d|m|=|s|y|n|t|a|x| +0#0000000&@14
+@75
+@75
+|"+0#0000e05&| |l|i|s|t| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&@71
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1| @67
+|d+0#af5f00255&|e|f| +0#0000000&|/+0#af5f00255&|F+0#0000000&|o@1|.|*| @64
+@75
+|d+0#af5f00255&|e|f| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@58
+|d+0#af5f00255&|e|f| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@61
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1| ||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@54
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1| |"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+@75
+@75
+|"+0#0000e05&| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@62
+@75
+|"+0#0000e05&| |e|m|p|t|y| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@56
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_01.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_01.dump
new file mode 100644
index 0000000..d1803d5
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_01.dump
@@ -0,0 +1,20 @@
+|d+0#af5f00255#ffffff0|e|f| +0#0000000&|F|o@1| |"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+@75
+@75
+|"+0#0000e05&| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@62
+@75
+>"+0#0000e05&| |e|m|p|t|y| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@56
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
+| +0#0000000#ffffff0@74
+|#+0#0000e05&| |c|u|r|l|y|-|b|r|a|c|e| |n|a|m|e|s| +0#0000000&@55
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |{|"|F|"|}|o@1|(|)|-@47
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|{|"|o|"|}|o|(|)|-@47
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o|{|"|o|"|}|(|)|-@47
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |{|"|F|"|}|o|{|"|o|"|}|(|)|-@43
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |{|"|F|"|}|{|"|o|"|}|{|"|o|"|}|(|)|-@39
+| +0#0000000#ffffff0@74
+@57|1|9|,|1| @9|1|2|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_02.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_02.dump
new file mode 100644
index 0000000..d9668cd
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o|{|"|o|"|}|(|)|-@47
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |{|"|F|"|}|o|{|"|o|"|}|(|)|-@43
+| +0#0000000#ffffff0@74
+>++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |{|"|F|"|}|{|"|o|"|}|{|"|o|"|}|(|)|-@39
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |n|u|m|b|e|r|-@43
+| +0#0000000#ffffff0@74
+|#+0#0000e05&| |t|r|a|i|l|i|n|g| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@53
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |n|u|m|b|e|r| @1|-@41
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)| |#| |c|o|m@1|e|n|t|-@41
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |n|u|m|b|e|r| |#| |c|o|m@1|e|n|t|-@33
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f|!| |F|o@1|(|)|:| |n|u|m|b|e|r|-@42
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |g|:|F|o@1|(|)|:| |n|u|m|b|e|r|-@41
+| +0#0000000#ffffff0@56|3|7|,|1| @9|3|0|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_03.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_03.dump
new file mode 100644
index 0000000..d20fb79
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_03.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)| |#| |c|o|m@1|e|n|t|-@41
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |n|u|m|b|e|r| |#| |c|o|m@1|e|n|t|-@33
+| +0#0000000#ffffff0@74
+>++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f|!| |F|o@1|(|)|:| |n|u|m|b|e|r|-@42
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |g|:|F|o@1|(|)|:| |n|u|m|b|e|r|-@41
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |s|:|F|o@1|(|)|:| |n|u|m|b|e|r|-@41
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |<|S|I|D|>|F|o@1|(|)|:| |n|u|m|b|e|r|-@38
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |f|o@1|#|b|a|r|#|F|o@1|(|)|:| |n|u|m|b|e|r|-@35
+| +0#0000000#ffffff0@74
+|"+0#0000e05&| |s|a|m|e| |n|a|m|e| |a|s| |a|n| |E|x| |c|o|m@1|a|n|d| +0#0000000&@46
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |s|:|l|s|(|)|-@50
+| +0#0000000#ffffff0@74
+@75
+@57|5@1|,|1| @9|4|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_04.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_04.dump
new file mode 100644
index 0000000..bc95a8b
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_04.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |s|:|F|o@1|(|)|:| |n|u|m|b|e|r|-@41
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |<|S|I|D|>|F|o@1|(|)|:| |n|u|m|b|e|r|-@38
+| +0#0000000#ffffff0@74
+>++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |f|o@1|#|b|a|r|#|F|o@1|(|)|:| |n|u|m|b|e|r|-@35
+| +0#0000000#ffffff0@74
+|"+0#0000e05&| |s|a|m|e| |n|a|m|e| |a|s| |a|n| |E|x| |c|o|m@1|a|n|d| +0#0000000&@46
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |s|:|l|s|(|)|-@50
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |r|e|t|u|r|n| |t|y|p|e|s| +0#0000000&@60
+@75
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |v|o|i|d|-@45
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |v|o|i|d| |#| |c|o|m@1|e|n|t|-@35
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |l|i|s|t|<|d|i|c|t|<|n|u|m|b|e|r|>@1|-@31
+| +0#0000000#ffffff0@74
+@57|7|3|,|1| @9|6|2|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_05.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_05.dump
new file mode 100644
index 0000000..cc31e3d
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_05.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |v|o|i|d| |#| |c|o|m@1|e|n|t|-@35
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |l|i|s|t|<|d|i|c|t|<|n|u|m|b|e|r|>@1|-@31
+| +0#0000000#ffffff0@74
+>++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |f|u|n|c|(|d|i|c|t|<|l|i|s|t|<|n|u|m|b|e|r|>@1|,| |f|u|n|c|,| |b|o@1|l|,| |f|u|n|c|(|n|u|m|b|e|r|,|
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |:|e|n|d@1|e|f| |t|r|a|i|l|i|n|g| +0#0000000&@56
+@75
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |p|a|r|a|m|e|t|e|r|s| +0#0000000&@62
+@75
+@57|9|1|,|1| @9|8|3|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_06.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_06.dump
new file mode 100644
index 0000000..c93c671
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_06.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |p|a|r|a|m|e|t|e|r|s| +0#0000000&@62
+> @74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|x|:| |b|o@1|l|,| |y| |=| |4|2|,| |z|:| |s|t|r|i|n|g| |=| |"|z|e|d|"|)|-@17
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|5| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|-@52
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |c|o|m@1|e|n|t|s| +0#0000000&@64
+@75
+|++0#0000e05#a8a8a8255|-@1| @1|4| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
+| +0#0000000#ffffff0@74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|0|9|,|0|-|1| @6|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_99.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_99.dump
new file mode 100644
index 0000000..0b4fce2
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |p|a|r|a|m|e|t|e|r|s| +0#0000000&@62
+@75
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|x|:| |b|o@1|l|,| |y| |=| |4|2|,| |z|:| |s|t|r|i|n|g| |=| |"|z|e|d|"|)|-@17
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|5| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|-@52
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |c|o|m@1|e|n|t|s| +0#0000000&@64
+@75
+|++0#0000e05#a8a8a8255|-@1| @1|4| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
+> +0#0000000#ffffff0@74
+@57|1|2|6|,|0|-|1| @6|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_echo_00.dump b/runtime/syntax/testdir/dumps/vim_ex_echo_00.dump
new file mode 100644
index 0000000..f42ea1d
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_echo_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|e|c|h|o| |c|o|m@1|a|n|d|s| +0#0000000&@54
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&@7|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48
+|e+0#af5f00255&|c|h|o|n| +0#0000000&@6|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48
+|e+0#af5f00255&|c|h|o|m|s|g| +0#0000000&@4|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48
+|e+0#af5f00255&|c|h|o|w|i|n|d|o|w| +0#0000000&@1|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48
+|e+0#af5f00255&|c|h|o|e|r@1| +0#0000000&@4|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48
+|e+0#af5f00255&|c|h|o|c|o|n|s|o|l|e| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |i|s| |:|||"| +0#0000000&||| ||| @40
+@75
+|e+0#af5f00255&|c|h|o|h|l| +0#0000000&|W+0#00e0003&|a|r|n|i|n|g|M|s|g| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|D|o|n|'|t| |p|a|n|i|c|!|"| +0#0000000&||| |e+0#af5f00255&|c|h|o|h|l| +0#0000000&|N+0#00e0003&|o|n|e| +0#0000000&@21
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&@58
+@5|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|4+0#e000002&|2| +0#0000000&@64
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&@70
+@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&@55
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_echo_01.dump b/runtime/syntax/testdir/dumps/vim_ex_echo_01.dump
new file mode 100644
index 0000000..21e7bd2
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_echo_01.dump
@@ -0,0 +1,20 @@
+|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&@58
+@5|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|4+0#e000002&|2| +0#0000000&@64
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&@70
+@6>\+0#e000e06&| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&@55
+@5|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|4+0#e000002&|2| +0#0000000&@64
+@75
+|"+0#0000e05&| |:|e|c|h|o| |w|i|t|h|o|u|t| |{|e|x|p|r|}| +0#0000000&@52
+|e+0#af5f00255&|c|h|o||+0#0000000&| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@58
+@75
+|"+0#0000e05&| |t|r|a|i|l|i|n|g| |c|o|m@1|e|n|t| |n|e@1|d|s| ||| +0#0000000&@48
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|f|o@1|"| +0#0000000&||| |"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@52
+@75
+@75
+|"+0#0000e05&| |I|s@1|u|e| |#|9@1|8|7| |(|p|a|r|e|n|t|h|e|s|i|s|e|d| |a|r|g|u|m|e|n|t| |-| |n|o|t| |a| |f|u|n|c|t|i|o|n| |c|a|l@1|)| +0#0000000&@14
+@75
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&|'+0#e000002&|e|n|d|'|:+0#0000000&| |1+0#e000002&|2|3|}+0#e000e06&| +0#0000000&@52
+@57|1|9|,|7| @9|6|8|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_echo_99.dump b/runtime/syntax/testdir/dumps/vim_ex_echo_99.dump
new file mode 100644
index 0000000..db81b40
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_echo_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@4|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|4+0#e000002&|2| +0#0000000&@64
+@75
+|"+0#0000e05&| |:|e|c|h|o| |w|i|t|h|o|u|t| |{|e|x|p|r|}| +0#0000000&@52
+|e+0#af5f00255&|c|h|o||+0#0000000&| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@58
+@75
+|"+0#0000e05&| |t|r|a|i|l|i|n|g| |c|o|m@1|e|n|t| |n|e@1|d|s| ||| +0#0000000&@48
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|f|o@1|"| +0#0000000&||| |"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@52
+@75
+@75
+|"+0#0000e05&| |I|s@1|u|e| |#|9@1|8|7| |(|p|a|r|e|n|t|h|e|s|i|s|e|d| |a|r|g|u|m|e|n|t| |-| |n|o|t| |a| |f|u|n|c|t|i|o|n| |c|a|l@1|)| +0#0000000&@14
+@75
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&|'+0#e000002&|e|n|d|'|:+0#0000000&| |1+0#e000002&|2|3|}+0#e000e06&| +0#0000000&@52
+@75
+|i+0#af5f00255&|f| +0#0000000&|1+0#e000002&|2|3| +0#0000000&@68
+@8|e+0#af5f00255&|c|h|o| +0#0000000&|(+0#e000e06&|f+0#00e0e07&|o@1|.+0#af5f00255&|e+0#00e0e07&|n|d|)+0#e000e06&| +0#0000000&@52
+|e+0#af5f00255&|l|s|e| +0#0000000&@70
+@8|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|b|a|r|'| +0#0000000&@56
+>e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+@57|3|8|,|1| @9|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_execute_00.dump b/runtime/syntax/testdir/dumps/vim_ex_execute_00.dump
new file mode 100644
index 0000000..55d88af
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_execute_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|e|x|e|c|u|t|e| |c|o|m@1|a|n|d| +0#0000000&@52
+@75
+|"+0#0000e05&| |:|h|e|l|p| |:|e|x|e|c|u|t|e| +0#0000000&@58
+@75
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|b|u|f@1|e|r|"| +0#0000000&|n+0#00e0e07&|e|x|t|b|u|f| +0#0000000&@50
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|n|o|r|m|a|l|"| +0#0000000&|c+0#00e0e07&|o|u|n|t| +0#0000000&|.+0#af5f00255&@1| +0#0000000&|"+0#e000002&|w|"| +0#0000000&@45
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|'+0#e000002&|!|l|s|'| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|t|h|e@1|n|d|"| +0#0000000&@45
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|n|o|r|m|a|l| |i|x@2|\+0#e000e06&|<|E|s|c|>|"+0#e000002&| +0#0000000&@47
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|e| |"| +0#0000000&|.+0#af5f00255&@1| +0#0000000&|f+0#00e0e07&|n|a|m|e@1|s|c|a|p|e|(+0#e000e06&|f+0#00e0e07&|i|l|e|n|a|m|e|)+0#e000e06&| +0#0000000&@37
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|!|l|s| |"| +0#0000000&|.+0#af5f00255&@1| +0#0000000&|s+0#00e0e07&|h|e|l@1|e|s|c|a|p|e|(+0#e000e06&|f+0#00e0e07&|i|l|e|n|a|m|e|,+0#0000000&| |1+0#e000002&|)+0#e000e06&| +0#0000000&@32
+|i+0#af5f00255&|f| +0#0000000&|0+0#e000002&| +0#0000000&@70
+@1|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|'+0#e000002&|w|h|i|l|e| |i| |>| |5|'| +0#0000000&@52
+@2|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|t|e|s|t|"| +0#0000000&@61
+@1|e+0#af5f00255&|n|d|w|h|i|l|e| +0#0000000&@65
+|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|'+0#e000002&|w|h|i|l|e| |i| |<| |5| ||| |e|c|h|o| |i| ||| |l|e|t| |i| |=| |i| |+| |1| ||| |e|n|d|w|h|i|l|e|'| +0#0000000&@17
+@75
+|"+0#0000e05&| |f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |i|s| |:|||"| +0#0000000&@48
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|c|a|l@1| |F|o@1|(|)|"| +0#0000000&||| ||| @50
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_execute_01.dump b/runtime/syntax/testdir/dumps/vim_ex_execute_01.dump
new file mode 100644
index 0000000..5330ff3
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_execute_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0|e+0#af5f00255&|n|d|w|h|i|l|e| +0#0000000&@65
+|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|'+0#e000002&|w|h|i|l|e| |i| |<| |5| ||| |e|c|h|o| |i| ||| |l|e|t| |i| |=| |i| |+| |1| ||| |e|n|d|w|h|i|l|e|'| +0#0000000&@17
+@75
+|"+0#0000e05&| |f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |i|s| |:|||"| +0#0000000&@48
+>e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|c|a|l@1| |F|o@1|(|)|"| +0#0000000&||| ||| @50
+@75
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|c|a|l@1|"| +0#0000000&@60
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|F|o@1|(|)|"| +0#0000000&@59
+@75
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&@67
+@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|c|a|l@1|"| +0#0000000&@60
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|F|o@1|(|)|"| +0#0000000&@59
+@75
+|"+0#0000e05&| |:|e|x|e|c|u|t|e| |w|i|t|h|o|u|t| |{|e|x|p|r|}| +0#0000000&@49
+|e+0#af5f00255&|x|e|c|u|t|e||+0#0000000&| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@55
+@75
+@57|1|9|,|1| @9|5|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_execute_02.dump b/runtime/syntax/testdir/dumps/vim_ex_execute_02.dump
new file mode 100644
index 0000000..fbc1fea
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_execute_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|"+0#0000e05&| |t|r|a|i|l|i|n|g| |c|o|m@1|e|n|t| |n|e@1|d|s| ||| +0#0000000&@48
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|f|o@1|"| +0#0000000&||| |"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@49
+@75
+@75
+>"+0#0000e05&| |I|s@1|u|e| |#|9@1|8|7| |(|p|a|r|e|n|t|h|e|s|i|s|e|d| |a|r|g|u|m|e|n|t| |-| |n|o|t| |a| |f|u|n|c|t|i|o|n| |c|a|l@1|)| +0#0000000&@14
+@75
+|"+0#0000e05&| +0#0000000&|F+0#0000001#ffff4012|I|X|M|E|:+0#e000e06#ffffff0| +0#0000e05&|e|x|e|c|u|t|e| |i|s| |e|x| |c|o|m@1|a|n|d| |n|o|t| |b|u|i|l|t|i|n| |f|u|n|c|t|i|o|n| +0#0000000&@23
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&|'+0#e000002&|a|r|g|'|:+0#0000000&| |"+0#e000002&|c|a|l@1| |F|o@1|(|)|"|}+0#e000e06&| +0#0000000&@43
+|e+0#00e0e07&|x|e|c|u|t|e| +0#0000000&|(+0#e000e06&|f+0#00e0e07&|o@1|.+0#af5f00255&|a+0#00e0e07&|r|g|)+0#e000e06&| +0#0000000&@57
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|3|7|,|1| @9|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_execute_99.dump b/runtime/syntax/testdir/dumps/vim_ex_execute_99.dump
new file mode 100644
index 0000000..afc498c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_execute_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|"+0#e000002&|F|o@1|(|)|"| +0#0000000&@59
+@75
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&@67
+@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|c|a|l@1|"| +0#0000000&@60
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|F|o@1|(|)|"| +0#0000000&@59
+@75
+|"+0#0000e05&| |:|e|x|e|c|u|t|e| |w|i|t|h|o|u|t| |{|e|x|p|r|}| +0#0000000&@49
+|e+0#af5f00255&|x|e|c|u|t|e||+0#0000000&| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@55
+@75
+|"+0#0000e05&| |t|r|a|i|l|i|n|g| |c|o|m@1|e|n|t| |n|e@1|d|s| ||| +0#0000000&@48
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|f|o@1|"| +0#0000000&||| |"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@49
+@75
+@75
+|"+0#0000e05&| |I|s@1|u|e| |#|9@1|8|7| |(|p|a|r|e|n|t|h|e|s|i|s|e|d| |a|r|g|u|m|e|n|t| |-| |n|o|t| |a| |f|u|n|c|t|i|o|n| |c|a|l@1|)| +0#0000000&@14
+@75
+|"+0#0000e05&| +0#0000000&|F+0#0000001#ffff4012|I|X|M|E|:+0#e000e06#ffffff0| +0#0000e05&|e|x|e|c|u|t|e| |i|s| |e|x| |c|o|m@1|a|n|d| |n|o|t| |b|u|i|l|t|i|n| |f|u|n|c|t|i|o|n| +0#0000000&@23
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&|'+0#e000002&|a|r|g|'|:+0#0000000&| |"+0#e000002&|c|a|l@1| |F|o@1|(|)|"|}+0#e000e06&| +0#0000000&@43
+>e+0#00e0e07&|x|e|c|u|t|e| +0#0000000&|(+0#e000e06&|f+0#00e0e07&|o@1|.+0#af5f00255&|a+0#00e0e07&|r|g|)+0#e000e06&| +0#0000000&@57
+@57|4|1|,|1| @9|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_func_00.dump b/runtime/syntax/testdir/dumps/vim_ex_func_00.dump
new file mode 100644
index 0000000..d89f64e
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_func_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |Y|N|T|A|X|_|E|X|E| |l|e|t| |g|:|v|i|m|s|y|n|_|n|o|e|r@1|o|r| |=| |1| +0#0000000&@38
+@75
+|f+0#af5f00255&|u|n|c| +0#0000000&|d+0#ffffff16#ff404010|o|i|t|(+0#e000e06#ffffff0|)| +0#0000000&@63
+@75
+|e+0#af5f00255&|n|d|f|u|n|c| +0#0000000&@67
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@74
diff --git a/runtime/syntax/testdir/dumps/vim_ex_func_99.dump b/runtime/syntax/testdir/dumps/vim_ex_func_99.dump
new file mode 100644
index 0000000..f4ec08f
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_func_99.dump
@@ -0,0 +1,20 @@
+|"+0#0000e05#ffffff0| |Y|N|T|A|X|_|E|X|E| |l|e|t| |g|:|v|i|m|s|y|n|_|n|o|e|r@1|o|r| |=| |1| +0#0000000&@38
+@75
+|f+0#af5f00255&|u|n|c| +0#0000000&|d+0#ffffff16#ff404010|o|i|t|(+0#e000e06#ffffff0|)| +0#0000000&@63
+@75
+>e+0#af5f00255&|n|d|f|u|n|c| +0#0000000&@67
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@74
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_00.dump b/runtime/syntax/testdir/dumps/vim_ex_function_00.dump
new file mode 100644
index 0000000..5c67fd8
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|f|u|n|c|t|i|o|n| |c|o|m@1|a|n|d| +0#0000000&@51
+@75
+@75
+|"+0#0000e05&| |l|i|s|t| +0#0000000&@68
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&@66
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1| @62
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|/+0#af5f00255&|F+0#0000000&|o@1|.|*| @59
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@53
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@56
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1| ||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@49
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1| |"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@52
+@75
+@75
+|"+0#0000e05&| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@62
+@75
+|"+0#0000e05&| |e|m|p|t|y| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@56
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_01.dump b/runtime/syntax/testdir/dumps/vim_ex_function_01.dump
new file mode 100644
index 0000000..8e169ef
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+@75
+|"+0#0000e05&| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@62
+@75
+|"+0#0000e05&| |e|m|p|t|y| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@56
+>f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|"+0#0000e05&| |c|u|r|l|y|-|b|r|a|c|e| |n|a|m|e|s| +0#0000000&@55
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|{|"|F|"|}|o@1|(+0#e000e06&|)| +0#0000000&@56
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|{|"|o|"|}|o|(+0#e000e06&|)| +0#0000000&@56
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o|{|"|o|"|}|(+0#e000e06&|)| +0#0000000&@56
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|{|"|F|"|}|o|{|"|o|"|}|(+0#e000e06&|)| +0#0000000&@52
+@57|1|9|,|1| @10|7|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_02.dump b/runtime/syntax/testdir/dumps/vim_ex_function_02.dump
new file mode 100644
index 0000000..a6a5eff
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_02.dump
@@ -0,0 +1,20 @@
+|f+0#af5f00255#ffffff0|u|n|c|t|i|o|n| +0#0000000&|{|"|F|"|}|o|{|"|o|"|}|(+0#e000e06&|)| +0#0000000&@52
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|{|"|F|"|}|{|"|o|"|}|{|"|o|"|}|(+0#e000e06&|)| +0#0000000&@48
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+> @74
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|"+0#0000e05&| |t|r|a|i|l|i|n|g| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@53
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@50
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+@57|3|7|,|0|-|1| @7|1|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_03.dump b/runtime/syntax/testdir/dumps/vim_ex_function_03.dump
new file mode 100644
index 0000000..af74e02
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_03.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@59
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+>f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|g+0#e000e06&|:|F+0#0000000&|o@1|(+0#e000e06&|)| +0#0000000&@58
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|s+0#e000e06&|:|F+0#0000000&|o@1|(+0#e000e06&|)| +0#0000000&@58
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|<+0#e000e06&|S|I|D|>|F+0#0000000&|o@1|(+0#e000e06&|)| +0#0000000&@55
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|f|o@1|#|b|a|r|#|F|o@1|(+0#e000e06&|)| +0#0000000&@52
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+@57|5@1|,|1| @9|3|0|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_04.dump b/runtime/syntax/testdir/dumps/vim_ex_function_04.dump
new file mode 100644
index 0000000..a862ede
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_04.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@1|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|"+0#0000e05&| |s|a|m|e| |n|a|m|e| |a|s| |a|n| |E|x| |c|o|m@1|a|n|d| +0#0000000&@46
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|s+0#e000e06&|:|l+0#0000000&|s|(+0#e000e06&|)| +0#0000000&@59
+>e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+@75
+|"+0#0000e05&| |m|o|d|i|f|i|e|r|s| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|r+0#e000e06&|a|n|g|e| +0#0000000&@54
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|r+0#e000e06&|a|n|g|e| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@44
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|r+0#e000e06&|a|n|g|e| +0#0000000&@54
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@57|7|3|,|1| @9|4|1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_05.dump b/runtime/syntax/testdir/dumps/vim_ex_function_05.dump
new file mode 100644
index 0000000..10b56cc
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_05.dump
@@ -0,0 +1,20 @@
+|e+0#af5f00255#ffffff0|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|a+0#e000e06&|b|o|r|t| +0#0000000&@54
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+> @74
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|d+0#e000e06&|i|c|t| +0#0000000&@55
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|c+0#e000e06&|l|o|s|u|r|e| +0#0000000&@52
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|r+0#e000e06&|a|n|g|e| +0#0000000&|a+0#e000e06&|b|o|r|t| +0#0000000&|d+0#e000e06&|i|c|t| +0#0000000&|c+0#e000e06&|l|o|s|u|r|e| +0#0000000&@35
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|r+0#e000e06&|a|n|g|e| +0#0000000&@53
+@57|9|1|,|0|-|1| @7|5|2|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_06.dump b/runtime/syntax/testdir/dumps/vim_ex_function_06.dump
new file mode 100644
index 0000000..036e16a
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_06.dump
@@ -0,0 +1,20 @@
+|f+0#af5f00255#ffffff0|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|r+0#e000e06&|a|n|g|e| +0#0000000&@53
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|a+0#e000e06&|b|o|r|t| +0#0000000&@53
+@2>r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|d+0#e000e06&|i|c|t| +0#0000000&@54
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|c+0#e000e06&|l|o|s|u|r|e| +0#0000000&@51
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|r+0#e000e06&|a|n|g|e| +0#0000000&|a+0#e000e06&|b|o|r|t| +0#0000000&|d+0#e000e06&|i|c|t| +0#0000000&|c+0#e000e06&|l|o|s|u|r|e| +0#0000000&@34
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@57|1|0|9|,|3| @8|6|3|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_07.dump b/runtime/syntax/testdir/dumps/vim_ex_function_07.dump
new file mode 100644
index 0000000..40b00b0
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_07.dump
@@ -0,0 +1,20 @@
+|e+0#af5f00255#ffffff0|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+@75
+|"+0#0000e05&| |:|e|n|d|f|u|n|c|t|i|o|n| |t|r|a|i|l|i|n|g| +0#0000000&@51
+@75
+>f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+| +0#0000e05&@1|"| |t|r|a|i|l|i|n|g| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@51
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@50
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@53
+@75
+@75
+@57|1|2|7|,|1| @8|7|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_08.dump b/runtime/syntax/testdir/dumps/vim_ex_function_08.dump
new file mode 100644
index 0000000..37b31ce
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_08.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|"+0#0000e05&| |p|a|r|a|m|e|t|e|r|s| +0#0000000&@62
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|x+0#00e0e07&|,+0#0000000&| |y+0#00e0e07&|,+0#0000000&| |z+0#00e0e07&|,+0#0000000&| |.+0#00e0e07&@2|)+0#e000e06&| +0#0000000&@48
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+>e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&| +0#0000000&@61
+@6|\+0#e000e06&| +0#0000000&|x+0#00e0e07&|,+0#0000000&| @64
+@6|\+0#e000e06&| +0#0000000&|y+0#00e0e07&|,+0#0000000&| @64
+@6|\+0#e000e06&| +0#0000000&|z+0#00e0e07&|,+0#0000000&| @64
+@6|\+0#e000e06&| +0#0000000&|.+0#00e0e07&@2|)+0#e000e06&| +0#0000000&@62
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|x+0#00e0e07&|,+0#0000000&| |y+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|4+0#e000002&|2|,+0#0000000&| |z+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|z|e|d|"|)+0#e000e06&| +0#0000000&@40
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+@57|1|4|5|,|1| @8|8|5|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_09.dump b/runtime/syntax/testdir/dumps/vim_ex_function_09.dump
new file mode 100644
index 0000000..94f80da
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_09.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&| +0#0000000&@61
+@6|\+0#e000e06&| +0#0000000&|x+0#00e0e07&|,+0#0000000&| @64
+@6|\+0#e000e06&| +0#0000000&|y+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|4+0#e000002&|2|,+0#0000000&| @59
+@6|\+0#e000e06&| +0#0000000&|z+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|z|e|d|"|)+0#e000e06&| +0#0000000&@56
+@2>r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+@75
+|"+0#0000e05&| |c|o|m@1|e|n|t|s| +0#0000000&@64
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
+| +0#0000e05&@1|"| |L|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@49
+@2|#| |4+0#e000002&|2| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@58
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+@75
+|"+0#0000e05&| |d|e|l|e|t|e| |f|u|n|c|t|i|o|n| +0#0000000&@57
+@57|1|6|3|,|3| @8|9|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_99.dump b/runtime/syntax/testdir/dumps/vim_ex_function_99.dump
new file mode 100644
index 0000000..7eed707
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_99.dump
@@ -0,0 +1,20 @@
+|e+0#af5f00255#ffffff0|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+@75
+|"+0#0000e05&| |c|o|m@1|e|n|t|s| +0#0000000&@64
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
+| +0#0000e05&@1|"| |L|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@49
+@2|#| |4+0#e000002&|2| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@58
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+@75
+|"+0#0000e05&| |d|e|l|e|t|e| |f|u|n|c|t|i|o|n| +0#0000000&@57
+@75
+|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&|F|o@1| @59
+|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&|f|o@1|.+0#af5f00255&|b+0#0000000&|a|r| @55
+|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1| @58
+|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&|f|o@1|.+0#af5f00255&|b+0#0000000&|a|r| @55
+> @74
+@57|1|8|2|,|0|-|1| @6|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_00.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_00.dump
new file mode 100644
index 0000000..fb83fde
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|f|u|n|c|t|i|o|n| |c|o|m@1|a|n|d| +0#0000000&@51
+|"+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|v|i|m|s|y|n|_|f|o|l|d|i|n|g| |=| |"+0#e000002&|f|"| +0#0000e05&||| |s|e|t| |f|d|m|=|s|y|n|t|a|x| +0#0000000&@14
+@75
+@75
+|"+0#0000e05&| |l|i|s|t| +0#0000000&@68
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&@66
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1| @62
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|/+0#af5f00255&|F+0#0000000&|o@1|.|*| @59
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@53
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@56
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1| ||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@49
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1| |"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@52
+@75
+@75
+|"+0#0000e05&| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@62
+@75
+|"+0#0000e05&| |e|m|p|t|y| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@56
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_01.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_01.dump
new file mode 100644
index 0000000..461531d
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_01.dump
@@ -0,0 +1,20 @@
+|f+0#af5f00255#ffffff0|u|n|c|t|i|o|n| +0#0000000&|F|o@1| |"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@52
+@75
+@75
+|"+0#0000e05&| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@62
+@75
+>"+0#0000e05&| |e|m|p|t|y| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@56
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)|-@46
+| +0#0000000#ffffff0@74
+|"+0#0000e05&| |c|u|r|l|y|-|b|r|a|c|e| |n|a|m|e|s| +0#0000000&@55
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |{|"|F|"|}|o@1|(|)|-@42
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|{|"|o|"|}|o|(|)|-@42
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o|{|"|o|"|}|(|)|-@42
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |{|"|F|"|}|o|{|"|o|"|}|(|)|-@38
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |{|"|F|"|}|{|"|o|"|}|{|"|o|"|}|(|)|-@34
+| +0#0000000#ffffff0@74
+@57|1|9|,|1| @10|8|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_02.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_02.dump
new file mode 100644
index 0000000..3a64c7f
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o|{|"|o|"|}|(|)|-@42
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |{|"|F|"|}|o|{|"|o|"|}|(|)|-@38
+| +0#0000000#ffffff0@74
+>++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |{|"|F|"|}|{|"|o|"|}|{|"|o|"|}|(|)|-@34
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)|-@46
+| +0#0000000#ffffff0@74
+|"+0#0000e05&| |t|r|a|i|l|i|n|g| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@53
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| @1|-@44
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| |"| |c|o|m@1|e|n|t|-@36
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n|!| |F|o@1|(|)|-@45
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |g|:|F|o@1|(|)|-@44
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |s|:|F|o@1|(|)|-@44
+| +0#0000000#ffffff0@56|3|7|,|1| @9|1|8|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_03.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_03.dump
new file mode 100644
index 0000000..3f26306
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_03.dump
@@ -0,0 +1,20 @@
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| @1|-@44
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| |"| |c|o|m@1|e|n|t|-@36
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n|!| |F|o@1|(|)|-@45
+> +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |g|:|F|o@1|(|)|-@44
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |s|:|F|o@1|(|)|-@44
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |<|S|I|D|>|F|o@1|(|)|-@41
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |f|o@1|#|b|a|r|#|F|o@1|(|)|-@38
+| +0#0000000#ffffff0@74
+|"+0#0000e05&| |s|a|m|e| |n|a|m|e| |a|s| |a|n| |E|x| |c|o|m@1|a|n|d| +0#0000000&@46
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |s|:|l|s|(|)|-@45
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |m|o|d|i|f|i|e|r|s| +0#0000000&@63
+@57|5@1|,|0|-|1| @7|2|8|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_04.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_04.dump
new file mode 100644
index 0000000..52423a2
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_04.dump
@@ -0,0 +1,20 @@
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |<|S|I|D|>|F|o@1|(|)|-@41
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |f|o@1|#|b|a|r|#|F|o@1|(|)|-@38
+| +0#0000000#ffffff0@74
+|"+0#0000e05&| |s|a|m|e| |n|a|m|e| |a|s| |a|n| |E|x| |c|o|m@1|a|n|d| +0#0000000&@46
+>++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |s|:|l|s|(|)|-@45
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |m|o|d|i|f|i|e|r|s| +0#0000000&@63
+@75
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| |r|a|n|g|e|-@40
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| |r|a|n|g|e| |"| |c|o|m@1|e|n|t|-@30
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| |r|a|n|g|e|-@40
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| |a|b|o|r|t|-@40
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| |d|i|c|t|-@41
+| +0#0000000#ffffff0@56|7|3|,|1| @9|4|1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_05.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_05.dump
new file mode 100644
index 0000000..d2acafc
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_05.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| |r|a|n|g|e| |"| |c|o|m@1|e|n|t|-@30
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| |r|a|n|g|e|-@40
+| +0#0000000#ffffff0@74
+>++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| |a|b|o|r|t|-@40
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| |d|i|c|t|-@41
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| |c|l|o|s|u|r|e|-@38
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| |r|a|n|g|e| |a|b|o|r|t| |d|i|c|t| |c|l|o|s|u|r|e|-@21
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n|!| |F|o@1|(|)| |r|a|n|g|e|-@39
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n|!| |F|o@1|(|)| |a|b|o|r|t|-@39
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n|!| |F|o@1|(|)| |d|i|c|t|-@40
+| +0#0000000#ffffff0@74
+@57|9|1|,|1| @9|5|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_06.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_06.dump
new file mode 100644
index 0000000..354af8e
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_06.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)| |r|a|n|g|e| |a|b|o|r|t| |d|i|c|t| |c|l|o|s|u|r|e|-@21
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n|!| |F|o@1|(|)| |r|a|n|g|e|-@39
+| +0#0000000#ffffff0@74
+>++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n|!| |F|o@1|(|)| |a|b|o|r|t|-@39
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n|!| |F|o@1|(|)| |d|i|c|t|-@40
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n|!| |F|o@1|(|)| |c|l|o|s|u|r|e|-@37
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n|!| |F|o@1|(|)| |r|a|n|g|e| |a|b|o|r|t| |d|i|c|t| |c|l|o|s|u|r|e|-@20
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |:|e|n|d|f|u|n|c|t|i|o|n| |t|r|a|i|l|i|n|g| +0#0000000&@51
+@75
+|++0#0000e05#a8a8a8255|-@1| @1|4| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)|-@46
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)|-@46
+| +0#0000000#ffffff0@56|1|0|9|,|1| @8|6|7|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_07.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_07.dump
new file mode 100644
index 0000000..fc403c5
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_07.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n|!| |F|o@1|(|)| |r|a|n|g|e| |a|b|o|r|t| |d|i|c|t| |c|l|o|s|u|r|e|-@20
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |:|e|n|d|f|u|n|c|t|i|o|n| |t|r|a|i|l|i|n|g| +0#0000000&@51
+> @74
+|++0#0000e05#a8a8a8255|-@1| @1|4| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)|-@46
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)|-@46
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)|-@46
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |p|a|r|a|m|e|t|e|r|s| +0#0000000&@62
+@75
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|x|,| |y|,| |z|,| |.@2|)|-@34
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|7| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|-@47
+| +0#0000000#ffffff0@74
+@57|1|2|7|,|0|-|1| @6|8|0|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_08.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_08.dump
new file mode 100644
index 0000000..4d519d0
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_08.dump
@@ -0,0 +1,20 @@
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)|-@46
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |p|a|r|a|m|e|t|e|r|s| +0#0000000&@62
+@75
+>++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|x|,| |y|,| |z|,| |.@2|)|-@34
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|7| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|-@47
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|x|,| |y| |=| |4|2|,| |z| |=| |"|z|e|d|"|)|-@26
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|6| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|-@47
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |c|o|m@1|e|n|t|s| +0#0000000&@64
+@75
+|++0#0000e05#a8a8a8255|-@1| @1|5| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)|-@46
+| +0#0000000#ffffff0@74
+@75
+@57|1|4|5|,|3|-|1| @6|9|5|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_09.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_09.dump
new file mode 100644
index 0000000..8ecc529
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_09.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|7| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|-@47
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|x|,| |y| |=| |4|2|,| |z| |=| |"|z|e|d|"|)|-@26
+| +0#0000000#ffffff0@74
+>++0#0000e05#a8a8a8255|-@1| @1|6| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|-@47
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |c|o|m@1|e|n|t|s| +0#0000000&@64
+@75
+|++0#0000e05#a8a8a8255|-@1| @1|5| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)|-@46
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |d|e|l|e|t|e| |f|u|n|c|t|i|o|n| +0#0000000&@57
+@75
+|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&|F|o@1| @59
+|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&|f|o@1|.+0#af5f00255&|b+0#0000000&|a|r| @55
+|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1| @58
+|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&|f|o@1|.+0#af5f00255&|b+0#0000000&|a|r| @55
+@57|1|6|3|,|7|-|1| @6|9@1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_99.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_99.dump
new file mode 100644
index 0000000..b6770ef
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_99.dump
@@ -0,0 +1,20 @@
+|++0#0000e05#a8a8a8255|-@1| @1|7| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|-@47
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|x|,| |y| |=| |4|2|,| |z| |=| |"|z|e|d|"|)|-@26
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|6| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|-@47
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |c|o|m@1|e|n|t|s| +0#0000000&@64
+@75
+|++0#0000e05#a8a8a8255|-@1| @1|5| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)|-@46
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |d|e|l|e|t|e| |f|u|n|c|t|i|o|n| +0#0000000&@57
+@75
+|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&|F|o@1| @59
+|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&|f|o@1|.+0#af5f00255&|b+0#0000000&|a|r| @55
+|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1| @58
+|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&|f|o@1|.+0#af5f00255&|b+0#0000000&|a|r| @55
+> @74
+@57|1|8|3|,|0|-|1| @6|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_highlight_00.dump b/runtime/syntax/testdir/dumps/vim_ex_highlight_00.dump
new file mode 100644
index 0000000..7b0f19f
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_highlight_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|h|i|g|h|l|i|g|h|t| |c|o|m@1|a|n|d| +0#0000000&@50
+@75
+|"+0#0000e05&| |l|i|s|t| +0#0000000&@68
+|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&@65
+|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@57
+@75
+|"+0#0000e05&| |r|e|s|e|t| +0#0000000&@67
+|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|c+0#00e0003&|l|e|a|r| +0#0000000&@59
+@75
+|"+0#0000e05&| |d|i|s|a|b|l|e| +0#0000000&@65
+|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|c+0#00e0003&|l|e|a|r| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@51
+|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&|N+0#00e0003&|O|N|E| +0#0000000&@52
+@75
+|"+0#0000e05&| |a|d@1|/|m|o|d|i|f|y| +0#0000000&@62
+|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&|c+0#00e0003&|t|e|r|m|=+0#0000000&|u+0#e000e06&|n|d|e|r|l|i|n|e| +0#0000000&@41
+|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&|t+0#00e0003&|e|r|m|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&@39
+@75
+|"+0#0000e05&| |l|i|n|k| +0#0000000&@68
+|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|l+0#00e0003&|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@48
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_highlight_01.dump b/runtime/syntax/testdir/dumps/vim_ex_highlight_01.dump
new file mode 100644
index 0000000..95e478d
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_highlight_01.dump
@@ -0,0 +1,20 @@
+|"+0#0000e05#ffffff0| |a|d@1|/|m|o|d|i|f|y| +0#0000000&@62
+|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&|c+0#00e0003&|t|e|r|m|=+0#0000000&|u+0#e000e06&|n|d|e|r|l|i|n|e| +0#0000000&@41
+|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&|t+0#00e0003&|e|r|m|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&@39
+@75
+|"+0#0000e05&| |l|i|n|k| +0#0000000&@68
+>h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|l+0#00e0003&|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@48
+|h+0#af5f00255&|i|g|h|l|i|g|h|t|!| +0#0000000&|l+0#00e0003&|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@47
+|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|l+0#00e0003&|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|N+0#00e0003&|O|N|E| +0#0000000&@51
+|h+0#af5f00255&|i|g|h|l|i|g|h|t|!| +0#0000000&|l+0#00e0003&|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|N+0#00e0003&|O|N|E| +0#0000000&@50
+@75
+|"+0#0000e05&| |d|e|f|a|u|l|t| |l|i|n|k| +0#0000000&@60
+|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| |l|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@40
+|h+0#af5f00255&|i|g|h|l|i|g|h|t|!| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| |l|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@39
+|h+0#af5f00255&|i|g|h|l|i|g|h|t| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| |l|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|N+0#00e0003&|O|N|E| +0#0000000&@43
+|h+0#af5f00255&|i|g|h|l|i|g|h|t|!| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| |l|i|n|k| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&|N+0#00e0003&|O|N|E| +0#0000000&@42
+@75
+@75
+|"+0#0000e05&| |l|i|n|e| |c|o|n|t|i|n|u|a|t|i|o|n| |a|n|d| |c|o|m@1|a|n|d| |s|e|p|a|r|a|t|o|r| +0#0000000&@33
+@75
+@57|1|9|,|1| @9|3|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_highlight_02.dump b/runtime/syntax/testdir/dumps/vim_ex_highlight_02.dump
new file mode 100644
index 0000000..38313aa
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_highlight_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|h+0#af5f00255&|i| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@64
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|t+0#00e0003&|e|r|m|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&@57
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6>\+0#e000e06&| +0#0000000&|c+0#00e0003&|t|e|r|m|f|g|=+0#0000000&|C+0#e000002&|y|a|n| +0#0000000&@54
+@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|f|g|=+0#0000000&|#+0#e000002&|8|0|a|0|f@1| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&@58
+@75
+|h+0#af5f00255&|i| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@64
+@6|\+0#e000e06&| +0#0000000&|t+0#00e0003&|e|r|m|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&@57
+@6|\+0#e000e06&| +0#0000000&|c+0#00e0003&|t|e|r|m|f|g|=+0#0000000&|C+0#e000002&|y|a|n| +0#0000000&@54
+@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|f|g|=+0#0000000&|#+0#e000002&|8|0|a|0|f@1| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@45
+@75
+|h+0#af5f00255&|i| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&|t+0#00e0003&|e|r|m|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&|c+0#00e0003&|t|e|r|m|f|g|=+0#0000000&|C+0#e000002&|y|a|n| +0#0000000&|g+0#00e0003&|u|i|f|g|=+0#0000000&|#+0#e000002&|8|0|a|0|f@1| +0#0000000&|g+0#00e0003&|u|i|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@5
+@75
+|h+0#af5f00255&|i| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| |l|i|n|k| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&@63
+@57|3|7|,|7| @9|8|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_highlight_99.dump b/runtime/syntax/testdir/dumps/vim_ex_highlight_99.dump
new file mode 100644
index 0000000..dbd86d4
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_highlight_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|c+0#00e0003&|t|e|r|m|f|g|=+0#0000000&|C+0#e000002&|y|a|n| +0#0000000&@54
+@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|f|g|=+0#0000000&|#+0#e000002&|8|0|a|0|f@1| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&@58
+@75
+|h+0#af5f00255&|i| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@64
+@6|\+0#e000e06&| +0#0000000&|t+0#00e0003&|e|r|m|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&@57
+@6|\+0#e000e06&| +0#0000000&|c+0#00e0003&|t|e|r|m|f|g|=+0#0000000&|C+0#e000002&|y|a|n| +0#0000000&@54
+@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|f|g|=+0#0000000&|#+0#e000002&|8|0|a|0|f@1| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|g+0#00e0003&|u|i|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@45
+@75
+|h+0#af5f00255&|i| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&|t+0#00e0003&|e|r|m|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&|c+0#00e0003&|t|e|r|m|f|g|=+0#0000000&|C+0#e000002&|y|a|n| +0#0000000&|g+0#00e0003&|u|i|f|g|=+0#0000000&|#+0#e000002&|8|0|a|0|f@1| +0#0000000&|g+0#00e0003&|u|i|=+0#0000000&|b+0#e000e06&|o|l|d| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@5
+@75
+|h+0#af5f00255&|i| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| |l|i|n|k| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&@63
+@6|\+0#e000e06&| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&@59
+@75
+|h+0#af5f00255&|i| +0#0000000&|d+0#00e0003&|e|f|a|u|l|t| |l|i|n|k| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|F+0#00e0003&|o@1| +0#0000000&@63
+@6>\+0#e000e06&| +0#0000000&|C+0#00e0003&|o|m@1|e|n|t| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@46
+@57|5@1|,|7| @9|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_map_00.dump b/runtime/syntax/testdir/dumps/vim_ex_map_00.dump
new file mode 100644
index 0000000..371c1ce
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_map_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|m|a|p| |c|o|m@1|a|n|d|s| +0#0000000&@55
+@75
+|m+0#af5f00255&|a|p|!| +0#0000000&@70
+|m+0#af5f00255&|a|p|!| +0#0000000&|l|h|s| |r|h|s| @62
+|m+0#af5f00255&|a|p| +0#0000000&@71
+|m+0#af5f00255&|a|p| +0#0000000&|l|h|s| |r|h|s| @63
+@75
+|c+0#af5f00255&|a|l@1| +0#0000000&|m+0#00e0e07&|a|p|(+0#e000e06&|l+0#00e0e07&|i|s|t|,+0#0000000&| |'+0#e000002&|v|:|v|a|l|'|)+0#e000e06&| +0#0000000&@51
+|c+0#af5f00255&|a|l@1| +0#0000000&|m+0#00e0e07&|a|p| +0#0000000&|(+0#e000e06&|l+0#00e0e07&|i|s|t|,+0#0000000&| |'+0#e000002&|v|:|v|a|l|'|)+0#e000e06&| +0#0000000&@50
+@75
+|m+0#af5f00255&|a|p|c|l|e|a|r| +0#0000000&@1|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+|m+0#af5f00255&|a|p|c|l|e|a|r|!| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+|n+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+|v+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+|x+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+|s+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+|o+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+|i+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+|l+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_map_01.dump b/runtime/syntax/testdir/dumps/vim_ex_map_01.dump
new file mode 100644
index 0000000..7b43533
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_map_01.dump
@@ -0,0 +1,20 @@
+|v+0#af5f00255#ffffff0|m|a|p|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+|x+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+|s+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+|o+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+|i+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+>l+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+|c+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+|t+0#af5f00255&|m|a|p|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@56
+@75
+@75
+|"+0#0000e05&| |:|h|e|l|p| |m|a|p|-|b|a|r| +0#0000000&@59
+@75
+|"+0#0000e05&| |<|B|a|r|>| @4|'|<|'| |i|s| |n|o|t| |i|n| |'|c|p|o|p|t|i|o|n|s|'| +0#0000000&@37
+|m+0#af5f00255&|a|p| +0#0000000&|_|l| |:|!|l|s| |<+0#e000e06&|B|a|r|>| +0#0000000&|m|o|r|e|^|M|:|e|c|h|o| |"|r|h|s|"|<+0#e000e06&|C|R|>| +0#0000000&@35
+|"+0#0000e05&| |\||| @7|'|b|'| |i|s| |n|o|t| |i|n| |'|c|p|o|p|t|i|o|n|s|'| +0#0000000&@37
+|m+0#af5f00255&|a|p| +0#0000000&|_|l| |:|!|l|s| |\||| |m|o|r|e|^|M|:|e|c|h|o| |"|r|h|s|"|<+0#e000e06&|C|R|>| +0#0000000&@38
+|"+0#0000e05&| |^|V||| @6|a|l|w|a|y|s|,| |i|n| |V|i|m| |a|n|d| |V|i| +0#0000000&@41
+|m+0#af5f00255&|a|p| +0#0000000&|_|l| |:|!|l|s| |^+0#0000e05&|V||+0#0000000&| |m|o|r|e|^|M|:|e|c|h|o| |"|r|h|s|"|<+0#e000e06&|C|R|>| +0#0000000&@37
+@75
+@57|1|9|,|1| @9|1|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_map_02.dump b/runtime/syntax/testdir/dumps/vim_ex_map_02.dump
new file mode 100644
index 0000000..c598781
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_map_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|m+0#af5f00255&|a|p| +0#0000000&|l|h|s| |:|s|e|a|r|c|h|(|'|f|o@1|\@1|||b|a|r|'|)|<+0#e000e06&|C|R|>|:+0#0000000&|e|c|h|o| |"|r|h|s|"|<+0#e000e06&|C|R|>| +0#0000000&@27
+@75
+@75
+|"+0#0000e05&| |m|u|l|t|i|l|i|n|e| |R|H|S| +0#0000000&@59
+> @74
+|m+0#af5f00255&|a|p| +0#0000000&|<+0#e000e06&|l|e|a|d|e|r|>|b+0#0000000&|a|z| @59
+@2|\+0#e000e06&| +0#0000000&|:|e|c|h|o| |(|<+0#e000e06&|b|a|r|>| +0#0000000&@58
+@2|\+0#e000e06&| +0#0000000&@71
+@2|\+0#e000e06&|'+0#0000000&|b|a|r|'|)|<+0#e000e06&|c|r|>| +0#0000000&@61
+@2|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@62
+@75
+|m+0#af5f00255&|a|p| +0#0000000&|l|h|s| @67
+@2|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@62
+@2|\+0#e000e06&| +0#0000000&|e|c|h|o| |"|f|o@1|"| @60
+@75
+|m+0#af5f00255&|a|p| +0#0000000&|l|h|s| @67
+@2|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@62
+@2|\+0#e000e06&| +0#0000000&|e|c|h|o| |"|f|o@1|"| @60
+@57|3|7|,|0|-|1| @7|4|5|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_map_03.dump b/runtime/syntax/testdir/dumps/vim_ex_map_03.dump
new file mode 100644
index 0000000..4ad6e82
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_map_03.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@1|\+0#e000e06&| +0#0000000&|e|c|h|o| |"|f|o@1|"| @60
+@75
+|m+0#af5f00255&|a|p| +0#0000000&|l|h|s|^+0#0000e05&|V| +0#0000000&@65
+@2|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@62
+@2|\+0#e000e06&| +0#0000000&|e|c|h|o| |"|f|o@1|"| @60
+> @74
+|m+0#af5f00255&|a|p| +0#0000000&|l|^+0#0000e05&|V| +0#0000000&|h|s| @64
+@2|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@62
+@2|\+0#e000e06&| +0#0000000&|e|c|h|o| |"|f|o@1|"| @60
+@75
+|m+0#af5f00255&|a|p| +0#0000000&|l|^+0#0000e05&|V| +0#0000000&|h|s| @64
+@2|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@62
+@2|\+0#e000e06&| +0#0000000&|e|c|h|o| |"|f|o@1|"| @60
+@75
+|m+0#af5f00255&|a|p| +0#0000000&|l|h|s| |r|h|s| @63
+|m+0#af5f00255&|a|p| +0#0000000&|l|^+0#0000e05&|V| +0#0000000&|h|^+0#0000e05&|V| +0#0000000&|s|^+0#0000e05&|V| +0#0000000&@1|r|h|s| @54
+@75
+|m+0#af5f00255&|a|p| +0#0000000&|l|h|s| @67
+@2|"+0#0000e05&|\| |c|o|m@1|e|n|t| |(|m|a|t|c|h|e|s| |a|s| |R|H|S| |b|u|t| |h|a|r|m|l|e|s@1|)| +0#0000000&@32
+@57|5@1|,|0|-|1| @7|7|2|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_map_04.dump b/runtime/syntax/testdir/dumps/vim_ex_map_04.dump
new file mode 100644
index 0000000..254fc91
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_map_04.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@1|"+0#0000e05&|\| |c|o|m@1|e|n|t| |(|m|a|t|c|h|e|s| |a|s| |R|H|S| |b|u|t| |h|a|r|m|l|e|s@1|)| +0#0000000&@32
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|c|l|e|a|r|"| +0#0000000&@62
+@75
+@75
+|"+0#0000e05&| |I|s@1|u|e| @1|#|1|2|6|7|2| +0#0000000&@59
+> @74
+|n+0#af5f00255&@1|o|r|e|m|a|p| +0#0000000&|<+0#e000e06&|l|e|a|d|e|r|>|f+0#0000000&|o@1| |:|e|c|h|o| |c|a|l@1|(| @42
+@2|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@62
+@2|\+0#e000e06&| +0#0000000&|{|x|-|>|x|}|,| @63
+@2|\+0#e000e06&| +0#0000000&|[|'|f|o@1|'|]|)|<+0#e000e06&|c|r|>| +0#0000000&@58
+@75
+|n+0#af5f00255&@1|o|r|e|m|a|p| +0#0000000&|<+0#e000e06&|l|e|a|d|e|r|>|b+0#0000000&|a|r| |:|e|c|h|o| |(| @46
+@2|\+0#e000e06&| +0#0000000&@71
+@2|\+0#e000e06&| +0#0000000&|'|b|a|r|'|)|<+0#e000e06&|c|r|>| +0#0000000&@60
+@75
+@75
+|"+0#0000e05&| +0#0000000&|E+0#e000e06&|x|a|m|p|l|e|:| +0#0000000&@64
+|"+0#0000e05&| @2|/|a|u|t|o|l|o|a|d|/|n|e|t|r|w|.|v|i|m| +0#0000000&@51
+@75
+@57|7|3|,|0|-|1| @7|9|8|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_map_99.dump b/runtime/syntax/testdir/dumps/vim_ex_map_99.dump
new file mode 100644
index 0000000..37ee7cf
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_map_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+@75
+|"+0#0000e05&| |I|s@1|u|e| @1|#|1|2|6|7|2| +0#0000000&@59
+@75
+|n+0#af5f00255&@1|o|r|e|m|a|p| +0#0000000&|<+0#e000e06&|l|e|a|d|e|r|>|f+0#0000000&|o@1| |:|e|c|h|o| |c|a|l@1|(| @42
+@2|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@62
+@2|\+0#e000e06&| +0#0000000&|{|x|-|>|x|}|,| @63
+@2|\+0#e000e06&| +0#0000000&|[|'|f|o@1|'|]|)|<+0#e000e06&|c|r|>| +0#0000000&@58
+@75
+|n+0#af5f00255&@1|o|r|e|m|a|p| +0#0000000&|<+0#e000e06&|l|e|a|d|e|r|>|b+0#0000000&|a|r| |:|e|c|h|o| |(| @46
+@2|\+0#e000e06&| +0#0000000&@71
+@2|\+0#e000e06&| +0#0000000&|'|b|a|r|'|)|<+0#e000e06&|c|r|>| +0#0000000&@60
+@75
+@75
+|"+0#0000e05&| +0#0000000&|E+0#e000e06&|x|a|m|p|l|e|:| +0#0000000&@64
+|"+0#0000e05&| @2|/|a|u|t|o|l|o|a|d|/|n|e|t|r|w|.|v|i|m| +0#0000000&@51
+@75
+>i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|h+0#00e0e07&|a|s|m|a|p|t|o|(+0#e000e06&|'+0#e000002&|<|P|l|u|g|>|N|e|t|r|w|O|p|e|n|F|i|l|e|'|)+0#e000e06&| +0#0000000&@9|||n+0#af5f00255&|m|a|p| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&|<+0#e000e06&|s|i|l|e|n|t|>| +0#0000000&|<+0#e000e06&|n|o|w|a|i
+|t|>| +0#0000000&|%| |<+0#e000e06&|P|l|u|g|>|N+0#0000000&|e|t|r|w|O|p|e|n|F|i|l|e|||e+0#af5f00255&|n|d|i|f| +0#0000000&@44
+@57|8|7|,|1| @9|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_menu_00.dump b/runtime/syntax/testdir/dumps/vim_ex_menu_00.dump
new file mode 100644
index 0000000..09c82c4
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_menu_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|m|e|n|u| |c|o|m@1|a|n|d|s| +0#0000000&@54
+@75
+|"+0#0000e05&| |:|h|e|l|p| |d|i|s|a|b|l|e| |m|e|n|u|s| +0#0000000&@53
+|m+0#af5f00255&|e|n|u| +0#0000000&|d+0#e000e06&|i|s|a|b|l|e| +0#0000000&|&+0#e000e06&|F|i|l|e|.|&|O|p|e|n|\|.|\|.|\|.| +0#0000000&@44
+|a+0#af5f00255&|m|e|n|u| +0#0000000&|e+0#e000e06&|n|a|b|l|e| +0#0000000&|*+0#e000e06&| +0#0000000&@60
+|a+0#af5f00255&|m|e|n|u| +0#0000000&|d+0#e000e06&|i|s|a|b|l|e| +0#0000000&|&+0#e000e06&|T|o@1|l|s|.|*| +0#0000000&@52
+@75
+@75
+|"+0#0000e05&| |:|h|e|l|p| |m|e|n|u|-|e|x|a|m|p|l|e|s| +0#0000000&@53
+|n+0#af5f00255&|m|e|n|u| +0#0000000&|W+0#e000e06&|o|r|d|s|.|A|d@1|\| |V|a|r| +0#0000000&@8|w|b|"|z|y|e|:|m|e|n|u|!| |W|o|r|d|s|.|<+0#e000e06&|C|-|R|>|z+0#0000000&| |<+0#e000e06&|C|-|R|>|z+0#0000000&|<+0#e000e06&|C|R|>| +0#0000000&@9
+|n+0#af5f00255&|m|e|n|u| +0#0000000&|W+0#e000e06&|o|r|d|s|.|R|e|m|o|v|e|\| |V|a|r| +0#0000000&@5|w|b|"|z|y|e|:|u|n|m|e|n|u|!| |W|o|r|d|s|.|<+0#e000e06&|C|-|R|>|z+0#0000000&|<+0#e000e06&|C|R|>| +0#0000000&@14
+|v+0#af5f00255&|m|e|n|u| +0#0000000&|W+0#e000e06&|o|r|d|s|.|A|d@1|\| |V|a|r| +0#0000000&@8|"|z|y|:|m|e|n|u|!| |W|o|r|d|s|.|<+0#e000e06&|C|-|R|>|z+0#0000000&| |<+0#e000e06&|C|-|R|>|z+0#0000000&| |<+0#e000e06&|C|R|>| +0#0000000&@11
+|v+0#af5f00255&|m|e|n|u| +0#0000000&|W+0#e000e06&|o|r|d|s|.|R|e|m|o|v|e|\| |V|a|r| +0#0000000&@5|"|z|y|:|u|n|m|e|n|u|!| |W|o|r|d|s|.|<+0#e000e06&|C|-|R|>|z+0#0000000&|<+0#e000e06&|C|R|>| +0#0000000&@17
+|i+0#af5f00255&|m|e|n|u| +0#0000000&|W+0#e000e06&|o|r|d|s|.|A|d@1|\| |V|a|r| +0#0000000&@8|<+0#e000e06&|E|s|c|>|w+0#0000000&|b|"|z|y|e|:|m|e|n|u|!| |W|o|r|d|s|.|<+0#e000e06&|C|-|R|>|z+0#0000000&| |<+0#e000e06&|C|-|R|>|z+0#0000000&|<+0#e000e06&|C|R|>|a+0#0000000&| @3
+|i+0#af5f00255&|m|e|n|u| +0#0000000&|W+0#e000e06&|o|r|d|s|.|R|e|m|o|v|e|\| |V|a|r| +0#0000000&@5|<+0#e000e06&|E|s|c|>|w+0#0000000&|b|"|z|y|e|:|u|n|m|e|n|u|!| |W|o|r|d|s|.|<+0#e000e06&|C|-|R|>|z+0#0000000&|<+0#e000e06&|C|R|>|a+0#0000000&| @8
+@75
+@75
+|"+0#0000e05&| |s|p|e|c|i|a|l| |k|e|y|s| +0#0000000&@60
+|m+0#af5f00255&|e|n|u| +0#0000000&|<+0#e000e06&|s|i|l|e|n|t|>| +0#0000000&|&+0#e000e06&|F|o@1|\| |b|a|r| +0#0000000&@1|:|e|c|h|o| |"|F|o@1|b|a|r|"|<+0#e000e06&|C|R|>| +0#0000000&@31
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_menu_01.dump b/runtime/syntax/testdir/dumps/vim_ex_menu_01.dump
new file mode 100644
index 0000000..9b60b2a
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_menu_01.dump
@@ -0,0 +1,20 @@
+|i+0#af5f00255#ffffff0|m|e|n|u| +0#0000000&|W+0#e000e06&|o|r|d|s|.|A|d@1|\| |V|a|r| +0#0000000&@8|<+0#e000e06&|E|s|c|>|w+0#0000000&|b|"|z|y|e|:|m|e|n|u|!| |W|o|r|d|s|.|<+0#e000e06&|C|-|R|>|z+0#0000000&| |<+0#e000e06&|C|-|R|>|z+0#0000000&|<+0#e000e06&|C|R|>|a+0#0000000&| @3
+|i+0#af5f00255&|m|e|n|u| +0#0000000&|W+0#e000e06&|o|r|d|s|.|R|e|m|o|v|e|\| |V|a|r| +0#0000000&@5|<+0#e000e06&|E|s|c|>|w+0#0000000&|b|"|z|y|e|:|u|n|m|e|n|u|!| |W|o|r|d|s|.|<+0#e000e06&|C|-|R|>|z+0#0000000&|<+0#e000e06&|C|R|>|a+0#0000000&| @8
+@75
+@75
+|"+0#0000e05&| |s|p|e|c|i|a|l| |k|e|y|s| +0#0000000&@60
+>m+0#af5f00255&|e|n|u| +0#0000000&|<+0#e000e06&|s|i|l|e|n|t|>| +0#0000000&|&+0#e000e06&|F|o@1|\| |b|a|r| +0#0000000&@1|:|e|c|h|o| |"|F|o@1|b|a|r|"|<+0#e000e06&|C|R|>| +0#0000000&@31
+|m+0#af5f00255&|e|n|u| +0#0000000&|<+0#e000e06&|s|p|e|c|i|a|l|>| +0#0000000&|&+0#e000e06&|F|o@1|\| |b|a|r| +0#0000000&|:|e|c|h|o| |"|F|o@1|b|a|r|"|<+0#e000e06&|C|R|>| +0#0000000&@31
+|m+0#af5f00255&|e|n|u| +0#0000000&|<+0#e000e06&|s|c|r|i|p|t|>| +0#0000000&|&+0#e000e06&|F|o@1|\| |b|a|r| +0#0000000&@1|:|e|c|h|o| |"|F|o@1|b|a|r|"|<+0#e000e06&|C|R|>| +0#0000000&@31
+|m+0#af5f00255&|e|n|u| +0#0000000&|<+0#e000e06&|s|i|l|e|n|t|>| +0#0000000&|<+0#e000e06&|s|p|e|c|i|a|l|>| +0#0000000&|&+0#e000e06&|F|o@1|\| |b|a|r| +0#0000000&|:|e|c|h|o| |"|F|o@1|b|a|r|"|<+0#e000e06&|C|R|>| +0#0000000&@22
+|m+0#af5f00255&|e|n|u| +0#0000000&|<+0#e000e06&|s|i|l|e|n|t|>| +0#0000000&|<+0#e000e06&|s|p|e|c|i|a|l|>| +0#0000000&|<+0#e000e06&|s|c|r|i|p|t|>| +0#0000000&|&+0#e000e06&|F|o@1|\| |b|a|r| +0#0000000&|:|e|c|h|o| |"|F|o@1|b|a|r|"|<+0#e000e06&|C|R|>| +0#0000000&@13
+@75
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
+@2|m+0#af5f00255&|e|n|u| +0#0000000&|<+0#e000e06&|s|i|l|e|n|t|>| +0#0000000&|&+0#e000e06&|F|o@1|\| |b|a|r| +0#0000000&|:|e|c|h|o| |"|F|o@1|b|a|r|"|<+0#e000e06&|C|R|>| +0#0000000&@30
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+@75
+|"+0#0000e05&| +0#0000000&|E+0#e000e06&|x|a|m|p|l|e|:| +0#0000e05&|r|u|n|t|i|m|e|/|m|e|n|u|.|v|i|m| |(|m|o|d|i|f|i|e|d|)| +0#0000000&@36
+|a+0#af5f00255&|n| +0#0000000&|<+0#e000e06&|s|i|l|e|n|t|>| +0#0000000&|1+0#e000002&|0|.|3@1|0| +0#0000000&|&+0#e000e06&|F|i|l|e|.|&|C|l|o|s|e|<|T|a|b|>|:|c|l|o|s|e| +0#0000000&|:|c|o|n|f|i|r|m| |c|l|o|s|e|<+0#e000e06&|C|R|>| +0#0000000&@13
+@57|1|9|,|1| @9|1|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_menu_02.dump b/runtime/syntax/testdir/dumps/vim_ex_menu_02.dump
new file mode 100644
index 0000000..a5c1acf
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_menu_02.dump
@@ -0,0 +1,20 @@
+|a+0#af5f00255#ffffff0|n| +0#0000000&|<+0#e000e06&|s|i|l|e|n|t|>| +0#0000000&|1+0#e000002&|0|.|3@1|0| +0#0000000&|&+0#e000e06&|F|i|l|e|.|&|C|l|o|s|e|<|T|a|b|>|:|c|l|o|s|e| +0#0000000&|:|c|o|n|f|i|r|m| |c|l|o|s|e|<+0#e000e06&|C|R|>| +0#0000000&@13
+@75
+|a+0#af5f00255&|n| +0#0000000&|<+0#e000e06&|s|i|l|e|n|t|>| +0#0000000&|1+0#e000002&|0|.|3@1|0| +0#0000000&|&+0#e000e06&|F|i|l|e|.|&|C|l|o|s|e|<|T|a|b|>|:|c|l|o|s|e| +0#0000000&@32
+@8|\+0#e000e06&| +0#0000000&|:|i|f| |w|i|n|h|e|i|g|h|t|(|2|)| |<| |0| |&@1| |t|a|b|p|a|g|e|w|i|n@1|r|(|2|)| |=@1| |0| |<+0#e000e06&|B|a|r|>| +0#0000000&@14
+@8|\+0#e000e06&| +0#0000000&@2|c|o|n|f|i|r|m| |e|n|e|w| |<+0#e000e06&|B|a|r|>| +0#0000000&@44
+@8>\+0#e000e06&| +0#0000000&|e|l|s|e| |<+0#e000e06&|B|a|r|>| +0#0000000&@54
+@8|\+0#e000e06&| +0#0000000&@2|c|o|n|f|i|r|m| |c|l|o|s|e| |<+0#e000e06&|B|a|r|>| +0#0000000&@43
+@8|\+0#e000e06&| +0#0000000&|e|n|d|i|f|<+0#e000e06&|C|R|>| +0#0000000&@55
+@75
+|a+0#af5f00255&|n| +0#0000000&|<+0#e000e06&|s|i|l|e|n|t|>| +0#0000000&|1+0#e000002&|0|.|3@1|0| +0#0000000&|&+0#e000e06&|F|i|l|e|.|&|C|l|o|s|e|<|T|a|b|>|:|c|l|o|s|e| +0#0000000&@32
+@8|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@56
+@8|\+0#e000e06&| +0#0000000&|:|i|f| |w|i|n|h|e|i|g|h|t|(|2|)| |<| |0| |&@1| |t|a|b|p|a|g|e|w|i|n@1|r|(|2|)| |=@1| |0| |<+0#e000e06&|B|a|r|>| +0#0000000&@14
+@8|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@56
+@8|\+0#e000e06&| +0#0000000&@2|c|o|n|f|i|r|m| |e|n|e|w| |<+0#e000e06&|B|a|r|>| +0#0000000&@44
+@8|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@56
+@8|\+0#e000e06&| +0#0000000&|e|l|s|e| |<+0#e000e06&|B|a|r|>| +0#0000000&@54
+@8|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@56
+@8|\+0#e000e06&| +0#0000000&@2|c|o|n|f|i|r|m| |c|l|o|s|e| |<+0#e000e06&|B|a|r|>| +0#0000000&@43
+@8|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@56
+@57|3|7|,|2|-|9| @7|4|5|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_menu_03.dump b/runtime/syntax/testdir/dumps/vim_ex_menu_03.dump
new file mode 100644
index 0000000..2ef89ec
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_menu_03.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|\+0#e000e06&| +0#0000000&|e|n|d|i|f|<+0#e000e06&|C|R|>| +0#0000000&@55
+@75
+|a+0#af5f00255&|n| +0#0000000&|<+0#e000e06&|s|i|l|e|n|t|>| +0#0000000&|1+0#e000002&|0|.|3@1|0| +0#0000000&|&+0#e000e06&|F|i|l|e|.|&|C|l|o|s|e|<|T|a|b|>|:|c|l|o|s|e| +0#0000000&|:|i|f| |w|i|n|h|e|i|g|h|t|(|2|)| |<| |0| |&@1| |t|a|b|p|a|g|e|w
+|i|n@1|r|(|2|)| |=@1| |0| |<+0#e000e06&|B|a|r|>| +0#0000000&@56
+@8|\+0#e000e06&| +0#0000000&@2|c|o|n|f|i|r|m| |e|n|e|w| |<+0#e000e06&|B|a|r|>| +0#0000000&@44
+@8>\+0#e000e06&| +0#0000000&|e|l|s|e| |<+0#e000e06&|B|a|r|>| +0#0000000&@54
+@8|\+0#e000e06&| +0#0000000&@2|c|o|n|f|i|r|m| |c|l|o|s|e| |<+0#e000e06&|B|a|r|>| +0#0000000&@43
+@8|\+0#e000e06&| +0#0000000&|e|n|d|i|f|<+0#e000e06&|C|R|>| +0#0000000&@55
+@75
+|a+0#af5f00255&|n| +0#0000000&|<+0#e000e06&|s|i|l|e|n|t|>| +0#0000000&|1+0#e000002&|0|.|3@1|0| +0#0000000&|&+0#e000e06&|F|i|l|e|.|&|C|l|o|s|e|<|T|a|b|>|:|c|l|o|s|e| +0#0000000&|:|i|f| |w|i|n|h|e|i|g|h|t|(|2|)| |<| |0| |&@1| |t|a|b|p|a|g|e|w
+|i|n@1|r|(|2|)| |=@1| |0| |<+0#e000e06&|B|a|r|>| +0#0000000&@56
+@8|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@56
+@8|\+0#e000e06&| +0#0000000&@2|c|o|n|f|i|r|m| |e|n|e|w| |<+0#e000e06&|B|a|r|>| +0#0000000&@44
+@8|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@56
+@8|\+0#e000e06&| +0#0000000&|e|l|s|e| |<+0#e000e06&|B|a|r|>| +0#0000000&@54
+@8|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@56
+@8|\+0#e000e06&| +0#0000000&@2|c|o|n|f|i|r|m| |c|l|o|s|e| |<+0#e000e06&|B|a|r|>| +0#0000000&@43
+@8|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@56
+@8|\+0#e000e06&| +0#0000000&|e|n|d|i|f|<+0#e000e06&|C|R|>| +0#0000000&@55
+@57|5@1|,|2|-|9| @7|7|1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_menu_04.dump b/runtime/syntax/testdir/dumps/vim_ex_menu_04.dump
new file mode 100644
index 0000000..ad079e6
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_menu_04.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+@75
+|"+0#0000e05&| |p|o|p|u|p| |m|e|n|u|s| +0#0000000&@61
+|p+0#af5f00255&|o|p|u|p| +0#0000000&|&+0#e000e06&|F|o@1| +0#0000000&@1||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@50
+|p+0#af5f00255&|o|p|u|p|!| +0#0000000&|&+0#e000e06&|F|o@1| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@50
+> @74
+@75
+|"+0#0000e05&| |I|s@1|u|e| |#|1|4|2|3|0| +0#0000000&@60
+@75
+|"+0#0000e05&| |a| |m|e|n|u| |i|t|e|m| |n|a|m|e| |c|a|n@1|o|t| |s|t|a|r|t| |w|i|t|h| |'|.|'| +0#0000000&@34
+@75
+|e+0#af5f00255&|x|p|o|r|t| +0#0000000&|d+0#af5f00255&|e|f| +0#0000000&|H|i|s|t|o|r|y|J|u|m|p|M|e|n|u|(+0#e000e06&|)| +0#0000000&@46
+@4|p+0#af5f00255&|o|p|u|p|.|F+0#0000000&|i|l|t|e|r|M|e|n|u|(+0#e000e06&|"+0#e000002&|J|u|m|p| |h|i|s|t|o|r|y|"|,+0#0000000&| |d+0#00e0e07&|i|r|_|h|i|s|t|,+0#0000000&| @28
+@8|(+0#e000e06&|r+0#00e0e07&|e|s|,+0#0000000&| |_+0#00e0e07&|)+0#e000e06&| +0#0000000&|=+0#af5f00255&|>| +0#0000000&|{+0#e000e06&| +0#0000000&@53
+@12|H|i|s|t|o|r|y|J|u|m|p|(+0#e000e06&|r+0#00e0e07&|e|s|.+0#af5f00255&|t+0#00e0e07&|e|x|t|)+0#e000e06&| +0#0000000&@41
+@8|}+0#e000e06&|)| +0#0000000&@64
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|p+0#af5f00255&|o|p|u|p|\+0#e000e06&|.|F|i|l|t|e|r|M|e|n|u|<|T|a|b|>|F|i|l|t|e|r|(|)|<|C|R|>| +0#0000000&@40
+@57|7|3|,|0|-|1| @7|9|8|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_menu_99.dump b/runtime/syntax/testdir/dumps/vim_ex_menu_99.dump
new file mode 100644
index 0000000..80608b7
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_menu_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|"+0#0000e05&| |p|o|p|u|p| |m|e|n|u|s| +0#0000000&@61
+|p+0#af5f00255&|o|p|u|p| +0#0000000&|&+0#e000e06&|F|o@1| +0#0000000&@1||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@50
+|p+0#af5f00255&|o|p|u|p|!| +0#0000000&|&+0#e000e06&|F|o@1| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@50
+@75
+@75
+|"+0#0000e05&| |I|s@1|u|e| |#|1|4|2|3|0| +0#0000000&@60
+@75
+|"+0#0000e05&| |a| |m|e|n|u| |i|t|e|m| |n|a|m|e| |c|a|n@1|o|t| |s|t|a|r|t| |w|i|t|h| |'|.|'| +0#0000000&@34
+@75
+|e+0#af5f00255&|x|p|o|r|t| +0#0000000&|d+0#af5f00255&|e|f| +0#0000000&|H|i|s|t|o|r|y|J|u|m|p|M|e|n|u|(+0#e000e06&|)| +0#0000000&@46
+@4|p+0#af5f00255&|o|p|u|p|.|F+0#0000000&|i|l|t|e|r|M|e|n|u|(+0#e000e06&|"+0#e000002&|J|u|m|p| |h|i|s|t|o|r|y|"|,+0#0000000&| |d+0#00e0e07&|i|r|_|h|i|s|t|,+0#0000000&| @28
+@8|(+0#e000e06&|r+0#00e0e07&|e|s|,+0#0000000&| |_+0#00e0e07&|)+0#e000e06&| +0#0000000&|=+0#af5f00255&|>| +0#0000000&|{+0#e000e06&| +0#0000000&@53
+@12|H|i|s|t|o|r|y|J|u|m|p|(+0#e000e06&|r+0#00e0e07&|e|s|.+0#af5f00255&|t+0#00e0e07&|e|x|t|)+0#e000e06&| +0#0000000&@41
+@8|}+0#e000e06&|)| +0#0000000&@64
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|p+0#af5f00255&|o|p|u|p|\+0#e000e06&|.|F|i|l|t|e|r|M|e|n|u|<|T|a|b|>|F|i|l|t|e|r|(|)|<|C|R|>| +0#0000000&@40
+> @74
+@57|8|7|,|0|-|1| @7|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_menutranslate_00.dump b/runtime/syntax/testdir/dumps/vim_ex_menutranslate_00.dump
new file mode 100644
index 0000000..82bcce4
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_menutranslate_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|m|e|n|u|t|r|a|n|s|l|a|t|e| |c|o|m@1|a|n|d| +0#0000000&@46
+@75
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&|c+0#e000e06&|l|e|a|r| +0#0000000&@55
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&|c+0#e000e06&|l|e|a|r| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@42
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&|c+0#e000e06&|l|e|a|r| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@45
+@75
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&|&+0#e000e06&|F|o+0#0000000&@1|\+0#e000e06&| |b+0#0000000&|a|r| |&+0#e000e06&|F|u+0#0000000&|B|a|r| ||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@31
+@75
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&|&+0#e000e06&|F|o+0#0000000&@1|\+0#e000e06&| |b+0#0000000&|a|r| |&+0#e000e06&|F|u+0#0000000&|B|a|r| |"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@34
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&|\|"|&+0#e000e06&|F|o+0#0000000&@1|"|\+0#e000e06&| |b+0#0000000&|a|r| |\|"|&+0#e000e06&|F|u+0#0000000&|B|a|r| @39
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&|&+0#e000e06&|F|o+0#0000000&@1|\+0#e000e06&| |"+0#0000000&|b|a|r|"| |&+0#e000e06&|F|u+0#0000000&|B|a|r| @42
+@75
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&|&+0#e000e06&|F|o+0#0000000&@1|\+0#e000e06&| |b+0#0000000&|a|r| @51
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|u+0#0000000&|b|a|r| ||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@47
+@75
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&@61
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|o+0#0000000&@1|\+0#e000e06&| |b+0#0000000&|a|r| @57
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|u+0#0000000&|b|a|r| ||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@47
+@75
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_menutranslate_01.dump b/runtime/syntax/testdir/dumps/vim_ex_menutranslate_01.dump
new file mode 100644
index 0000000..f479aeb
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_menutranslate_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|u+0#0000000&|b|a|r| ||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@47
+@75
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&@61
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|o+0#0000000&@1|\+0#e000e06&| |b+0#0000000&|a|r| @57
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|u+0#0000000&|b|a|r| ||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@47
+> @74
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&@61
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|o+0#0000000&@1|\+0#e000e06&| |b+0#0000000&|a|r| @57
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|u+0#0000000&|b|a|r||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@48
+@75
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&@61
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|o+0#0000000&@1|\+0#e000e06&| |b+0#0000000&|a|r| @57
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|u+0#0000000&|b|a|r| @60
+@6|\+0#e000e06&| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@54
+@75
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&|&+0#e000e06&|F|o+0#0000000&@1|\+0#e000e06&| |b+0#0000000&|a|r| @51
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|u+0#0000000&|b|a|r| ||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@47
+@75
+@57|1|9|,|0|-|1| @7|4|0|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_menutranslate_02.dump b/runtime/syntax/testdir/dumps/vim_ex_menutranslate_02.dump
new file mode 100644
index 0000000..7623f70
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_menutranslate_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&@61
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|o+0#0000000&@1|\+0#e000e06&| |b+0#0000000&|a|r| @57
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6>\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|u+0#0000000&|b|a|r| ||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@47
+@75
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&@61
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|o+0#0000000&@1|\+0#e000e06&| |b+0#0000000&|a|r| @57
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|u+0#0000000&|b|a|r||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@48
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@75
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&@61
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|o+0#0000000&@1|\+0#e000e06&| |b+0#0000000&|a|r| @57
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|u+0#0000000&|b|a|r| @60
+@6|\+0#e000e06&| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@54
+@57|3|7|,|7| @9|9|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_menutranslate_99.dump b/runtime/syntax/testdir/dumps/vim_ex_menutranslate_99.dump
new file mode 100644
index 0000000..7f6ccfc
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_menutranslate_99.dump
@@ -0,0 +1,20 @@
+|m+0#af5f00255#ffffff0|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&@61
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|o+0#0000000&@1|\+0#e000e06&| |b+0#0000000&|a|r| @57
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|u+0#0000000&|b|a|r| ||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@47
+@75
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&@61
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|o+0#0000000&@1|\+0#e000e06&| |b+0#0000000&|a|r| @57
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|u+0#0000000&|b|a|r||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@48
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@75
+|m+0#af5f00255&|e|n|u|t|r|a|n|s|l|a|t|e| +0#0000000&@61
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|o+0#0000000&@1|\+0#e000e06&| |b+0#0000000&|a|r| @57
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|&+0#e000e06&|F|u+0#0000000&|b|a|r| @60
+@6|\+0#e000e06&| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@54
+> @74
+@57|5|1|,|0|-|1| @7|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_substitute_00.dump b/runtime/syntax/testdir/dumps/vim_ex_substitute_00.dump
new file mode 100644
index 0000000..aea97ed
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_substitute_00.dump
@@ -0,0 +1,20 @@
+>s+0#af5f00255#ffffff0|u|b|s|t|i|t|u|t|e|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|&| +0#0000000&@54
+|s+0#af5f00255&|u|b|s|t|i|t|u|t|e|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|c|e|g|i|I|n|p|#|l|r| +0#0000000&@45
+@75
+|s+0#af5f00255&|n|o|m|a|g|i|c|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|&| +0#0000000&@56
+|s+0#af5f00255&|n|o|m|a|g|i|c|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|c|e|g|i|I|n|p|#|l|r| +0#0000000&@47
+@75
+|s+0#af5f00255&|m|a|g|i|c|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|&| +0#0000000&@58
+|s+0#af5f00255&|m|a|g|i|c|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|c|e|g|i|I|n|p|#|l|r| +0#0000000&@49
+@75
+|:|s+0#af5f00255&|u|b|s|t|i|t|u|t|e|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|&| +0#0000000&@53
+|:|s+0#af5f00255&|u|b|s|t|i|t|u|t|e|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|c|e|g|i|I|n|p|#|l|r| +0#0000000&@44
+@75
+|:|s+0#af5f00255&|n|o|m|a|g|i|c|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|&| +0#0000000&@55
+|:|s+0#af5f00255&|n|o|m|a|g|i|c|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|c|e|g|i|I|n|p|#|l|r| +0#0000000&@46
+@75
+|:|s+0#af5f00255&|m|a|g|i|c|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|&| +0#0000000&@57
+|:|s+0#af5f00255&|m|a|g|i|c|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|c|e|g|i|I|n|p|#|l|r| +0#0000000&@48
+@75
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|u|b|s|t|i|t|u|t|e|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|&| +0#0000000&@41
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_substitute_01.dump b/runtime/syntax/testdir/dumps/vim_ex_substitute_01.dump
new file mode 100644
index 0000000..806101c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_substitute_01.dump
@@ -0,0 +1,20 @@
+|:+0&#ffffff0|s+0#af5f00255&|n|o|m|a|g|i|c|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|c|e|g|i|I|n|p|#|l|r| +0#0000000&@46
+@75
+|:|s+0#af5f00255&|m|a|g|i|c|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|&| +0#0000000&@57
+|:|s+0#af5f00255&|m|a|g|i|c|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|c|e|g|i|I|n|p|#|l|r| +0#0000000&@48
+@75
+>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|u|b|s|t|i|t|u|t|e|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|&| +0#0000000&@41
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|u|b|s|t|i|t|u|t|e|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|c|e|g|i|I|n|p|#|l|r| +0#0000000&@32
+@75
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|n|o|m|a|g|i|c|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|&| +0#0000000&@43
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|n|o|m|a|g|i|c|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|c|e|g|i|I|n|p|#|l|r| +0#0000000&@34
+@75
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|m|a|g|i|c|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|&| +0#0000000&@45
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |s+0#af5f00255&|m|a|g|i|c|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&|c|e|g|i|I|n|p|#|l|r| +0#0000000&@36
+@75
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|s|t|r|-+0#af5f00255&|>|s+0#00e0e07&|u|b|s|t|i|t|u|t|e|(+0#e000e06&|s+0#00e0e07&|t|r|,+0#0000000&| |p+0#00e0e07&|a|t|,+0#0000000&| |s+0#00e0e07&|u|b|,+0#0000000&| |f+0#00e0e07&|l|a|g|s|)+0#e000e06&| +0#0000000&@27
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
+| +0#af5f00255&@1|s|u|b|s|t|i|t|u|t|e|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&| +0#0000000&@53
+@2|l+0#af5f00255&|e|t| +0#0000000&|b+0#00e0e07&|a|r| +0#0000000&|=+0#af5f00255&| +0#0000000&|s|t|r|-+0#af5f00255&|>|s+0#00e0e07&|u|b|s|t|i|t|u|t|e|(+0#e000e06&|s+0#00e0e07&|t|r|,+0#0000000&| |p+0#00e0e07&|a|t|,+0#0000000&| |s+0#00e0e07&|u|b|,+0#0000000&| |f+0#00e0e07&|l|a|g|s|)+0#e000e06&| +0#0000000&@25
+@57|1|9|,|1| @9|1|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_substitute_02.dump b/runtime/syntax/testdir/dumps/vim_ex_substitute_02.dump
new file mode 100644
index 0000000..b0e722d
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_substitute_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@1|l+0#af5f00255&|e|t| +0#0000000&|b+0#00e0e07&|a|r| +0#0000000&|=+0#af5f00255&| +0#0000000&|s|t|r|-+0#af5f00255&|>|s+0#00e0e07&|u|b|s|t|i|t|u|t|e|(+0#e000e06&|s+0#00e0e07&|t|r|,+0#0000000&| |p+0#00e0e07&|a|t|,+0#0000000&| |s+0#00e0e07&|u|b|,+0#0000000&| |f+0#00e0e07&|l|a|g|s|)+0#e000e06&| +0#0000000&@25
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65
+| +0#af5f00255&@1|s|u|b|s|t|i|t|u|t|e|/+0#e000e06&|f+0#0000000&|o@1|/+0#e000e06&|b+0#0000000&|a|r|/+0#e000e06&| +0#0000000&@53
+@2>l+0#af5f00255&|e|t| +0#0000000&|b+0#00e0e07&|a|r| +0#0000000&|=+0#af5f00255&| +0#0000000&|s|t|r|-+0#af5f00255&|>|s+0#00e0e07&|u|b|s|t|i|t|u|t|e|(+0#e000e06&|s+0#00e0e07&|t|r|,+0#0000000&| |p+0#00e0e07&|a|t|,+0#0000000&| |s+0#00e0e07&|u|b|,+0#0000000&| |f+0#00e0e07&|l|a|g|s|)+0#e000e06&| +0#0000000&@25
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|"+0#0000e05&| |v|a|r|i|o|u|s| |d|e|l|i|m|i|t|e|r|s| +0#0000000&@54
+@75
+|s+0#af5f00255&|!+0#e000e06&|/+0#0000000&|!+0#e000e06&|/+0#0000000&@1|!+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|"+0#0000e05&| |s|"|/|"|/@1|"| |"| |c|o|m@1|e|n|t| |(|w|o|r|k|s| |b|u|t| |d|i|s|a|l@1|o|w|e|d|)| +0#0000000&@32
+|s+0#af5f00255&|#+0#e000e06&|/+0#0000000&|#+0#e000e06&|/+0#0000000&@1|#+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|$+0#e000e06&|/+0#0000000&|$+0#e000e06&|/+0#0000000&@1|$+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|%+0#e000e06&|/+0#0000000&|%+0#e000e06&|/+0#0000000&@1|%+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|&+0#e000e06&|/+0#0000000&|&+0#e000e06&|/+0#0000000&@1|&+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|'+0#e000e06&|/+0#0000000&|'+0#e000e06&|/+0#0000000&@1|'+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|"+0#0000e05&| |F+0#0000001#ffff4012|I|X|M|E| +0#0000e05#ffffff0|-| |m|a|t|c|h|e|s| |v|i|m|U|s|e|r|F|u|n|c| +0#0000000&@45
+|"+0#0000e05&| |s|(|/|(|/@1|(| |"| |c|o|m@1|e|n|t| +0#0000000&@55
+@57|3|7|,|3| @9|4|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_substitute_03.dump b/runtime/syntax/testdir/dumps/vim_ex_substitute_03.dump
new file mode 100644
index 0000000..cb12bb3
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_substitute_03.dump
@@ -0,0 +1,20 @@
+|"+0#0000e05#ffffff0| |s|(|/|(|/@1|(| |"| |c|o|m@1|e|n|t| +0#0000000&@55
+|s+0#af5f00255&|)+0#e000e06&|/+0#0000000&|)+0#e000e06&|/+0#0000000&@1|)+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|*+0#e000e06&|/+0#0000000&|*+0#e000e06&|/+0#0000000&@1|*+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|++0#e000e06&|/+0#0000000&|++0#e000e06&|/+0#0000000&@1|++0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|,+0#e000e06&|/+0#0000000&|,+0#e000e06&|/+0#0000000&@1|,+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+>s+0#af5f00255&|-+0#e000e06&|/+0#0000000&|-+0#e000e06&|/+0#0000000&@1|-+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|.+0#e000e06&|/+0#0000000&|.+0#e000e06&|/+0#0000000&@1|.+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|/+0#e000e06&|X+0#0000000&|/+0#e000e06&|X+0#0000000&@1|/+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|:+0#e000e06&|/+0#0000000&|:+0#e000e06&|/+0#0000000&@1|:+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|;+0#e000e06&|/+0#0000000&|;+0#e000e06&|/+0#0000000&@1|;+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|<+0#e000e06&|/+0#0000000&|<+0#e000e06&|/+0#0000000&@1|<+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|=+0#e000e06&|/+0#0000000&|=+0#e000e06&|/+0#0000000&@1|=+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|>+0#e000e06&|/+0#0000000&|>+0#e000e06&|/+0#0000000&@1|>+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|?+0#e000e06&|/+0#0000000&|?+0#e000e06&|/+0#0000000&@1|?+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|@+0#e000e06&|/+0#0000000&|@+0#e000e06&|/+0#0000000&@1|@+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|[+0#e000e06&|/+0#0000000&|[+0#e000e06&|/+0#0000000&@1|[+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|"+0#0000e05&| |s|\|/|\|/@1|\| |"| |c|o|m@1|e|n|t| |(|d|i|s|a|l@1|o|w|e|d|)| +0#0000000&@42
+|s+0#af5f00255&|]+0#e000e06&|/+0#0000000&|]+0#e000e06&|/+0#0000000&@1|]+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|^+0#e000e06&|/+0#0000000&|^+0#e000e06&|/+0#0000000&@1|^+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+@57|5@1|,|1| @9|7|3|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_substitute_04.dump b/runtime/syntax/testdir/dumps/vim_ex_substitute_04.dump
new file mode 100644
index 0000000..b378260
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_substitute_04.dump
@@ -0,0 +1,20 @@
+|s+0#af5f00255#ffffff0|^+0#e000e06&|/+0#0000000&|^+0#e000e06&|/+0#0000000&@1|^+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|_+0#e000e06&|/+0#0000000&|_+0#e000e06&|/+0#0000000&@1|_+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|`+0#e000e06&|/+0#0000000&|`+0#e000e06&|/+0#0000000&@1|`+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|{+0#e000e06&|/+0#0000000&|{+0#e000e06&|/+0#0000000&@1|{+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|"+0#0000e05&| |s|||/|||/@1||| |"| |c|o|m@1|e|n|t| |(|d|i|s|a|l@1|o|w|e|d|)| +0#0000000&@42
+>s+0#af5f00255&|}+0#e000e06&|/+0#0000000&|}+0#e000e06&|/+0#0000000&@1|}+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|~+0#e000e06&|/+0#0000000&|~+0#e000e06&|/+0#0000000&@1|~+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+@75
+@75
+|"+0#0000e05&| |I|s@1|u|e| |#|1|3|8@1|3| +0#0000000&@60
+@75
+|s|t|r|[|s|]| @68
+|s|t|r|(+0#e000e06&|s+0#00e0e07&|)+0#e000e06&| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|T|e|s|t|(+0#e000e06&|)| +0#0000000&@64
+@2|s|t|r|[|s|]| @66
+@2|s|t|r|(+0#e000e06&|s+0#00e0e07&|)+0#e000e06&| +0#0000000&@66
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+@57|7|3|,|1| @9|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_substitute_99.dump b/runtime/syntax/testdir/dumps/vim_ex_substitute_99.dump
new file mode 100644
index 0000000..88cb7dc
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_substitute_99.dump
@@ -0,0 +1,20 @@
+|s+0#af5f00255#ffffff0|^+0#e000e06&|/+0#0000000&|^+0#e000e06&|/+0#0000000&@1|^+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|_+0#e000e06&|/+0#0000000&|_+0#e000e06&|/+0#0000000&@1|_+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|`+0#e000e06&|/+0#0000000&|`+0#e000e06&|/+0#0000000&@1|`+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|{+0#e000e06&|/+0#0000000&|{+0#e000e06&|/+0#0000000&@1|{+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|"+0#0000e05&| |s|||/|||/@1||| |"| |c|o|m@1|e|n|t| |(|d|i|s|a|l@1|o|w|e|d|)| +0#0000000&@42
+|s+0#af5f00255&|}+0#e000e06&|/+0#0000000&|}+0#e000e06&|/+0#0000000&@1|}+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+|s+0#af5f00255&|~+0#e000e06&|/+0#0000000&|~+0#e000e06&|/+0#0000000&@1|~+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@57
+@75
+@75
+|"+0#0000e05&| |I|s@1|u|e| |#|1|3|8@1|3| +0#0000000&@60
+@75
+|s|t|r|[|s|]| @68
+|s|t|r|(+0#e000e06&|s+0#00e0e07&|)+0#e000e06&| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|T|e|s|t|(+0#e000e06&|)| +0#0000000&@64
+@2|s|t|r|[|s|]| @66
+@2|s|t|r|(+0#e000e06&|s+0#00e0e07&|)+0#e000e06&| +0#0000000&@66
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+> @74
+@57|8|6|,|0|-|1| @7|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_00.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_00.dump
new file mode 100644
index 0000000..916f96d
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|s|y|n|t|a|x| |c|o|m@1|a|n|d| +0#0000000&@53
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|m+0#00e0003&|a|t|c|h| +0#0000000&|t+0#00e0003&|e|s|t|M|a|t|c|h| +0#0000000&|"+0#e000002&|p|a|t@1|e|r|n|"| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&|"+0#0000e05&| |t|a|i|l| |c|o|m@1|e|n|t| +0#0000000&@20
+|"+0#0000e05&| +0#0000000&|N+0#e000e06&|O|T|E|:| +0#0000e05&|c|o|m@1|e|n|t|s| |n|o|t| |c|u|r@1|e|n|t|l|y| |s|u|p@1|o|r|t|e|d| +0#0000000&@34
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|K|e|y|w|o|r|d| +0#0000000&|k|e|y|w|o|r|d| |c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&|"| |t|a|i|l| |c|o|m@1|e|n|t| @18
+|s+0#af5f00255&|y|n| +0#0000000&|r+0#00e0003&|e|g|i|o|n| +0#0000000&|t+0#00e0003&|e|s|t|R|e|g|i|o|n| +0#0000000&|s+0#00e0003&|t|a|r|t|=|"+0#e000002&|s|t|a|r|t|-|p|a|t@1|e|r|n|"| +0#0000000&|s+0#00e0003&|k|i|p|=|"+0#e000002&|s|k|i|p|-|p|a|t@1|e|r|n|"| +0#0000000&|e+0#00e0003&|n|d|=|"+0#e000002&|e|n|d|-|p|a
+|t@1|e|r|n|"| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&|"| |t|a|i|l| |c|o|m@1|e|n|t| @43
+@75
+|"+0#0000e05&| |M|u|l|t|i|l|i|n|e| |c|o|m@1|a|n|d|s| +0#0000000&@54
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|K|e|y|w|o|r|d| +0#0000000&@51
+@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@6|"+0#0000e05&|\| |c|o|n|c|e|a|l| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l| +0#0000000&@59
+@6|"+0#0000e05&|\| |c@1|h|a|r| |o|p|t|i|o|n| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&@1|h|a|r|=|&+0#e000002&| +0#0000000&@59
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&@57
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d|i|n| |o|p|t|i|o|n| +0#0000000&@47
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_01.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_01.dump
new file mode 100644
index 0000000..800e4a7
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|"+0#0000e05&|\| |c@1|h|a|r| |o|p|t|i|o|n| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&@1|h|a|r|=|&+0#e000002&| +0#0000000&@59
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&@57
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d|i|n| |o|p|t|i|o|n| +0#0000000&@47
+@6>\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d|i|n|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|r| @41
+@6|"+0#0000e05&|\| |n|e|x|t|g|r|o|u|p| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=|t+0#0000000&|e|s|t|N|e|x|t|0|,|@|t|e|s|t|C|l|u|s|t|e|r| @34
+@6|"+0#0000e05&|\| |t|r|a|n|s|p|a|r|e|n|t| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|t+0#e000e06&|r|a|n|s|p|a|r|e|n|t| +0#0000000&@55
+@6|"+0#0000e05&|\| |s|k|i|p|w|h|i|t|e| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|e|m|p|t|y| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|e|m|p|t|y| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|n|l| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
+@6|"+0#0000e05&|\| |K|E|Y|W|O|R|D|S| |L|I|S|T| +0#0000000&@52
+@6|"+0#0000e05&|\| |k|e|y|w|o|r|d| |1| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|1| @58
+@57|1|9|,|7| @10|8|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_02.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_02.dump
new file mode 100644
index 0000000..54d8734
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|1| @58
+@6|"+0#0000e05&|\| |k|e|y|w|o|r|d| |2| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|2| @58
+@6|"+0#0000e05&|\| |k|e|y|w|o|r|d| |3| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|3| @58
+> @74
+|s+0#af5f00255&|y|n| +0#0000000&|m+0#00e0003&|a|t|c|h| +0#0000000&|t+0#00e0003&|e|s|t|M|a|t|c|h| +0#0000000&@55
+@6|"+0#0000e05&|\| |M|A|T|C|H| |P|A|T@1|E|R|N| +0#0000000&@52
+@6|"+0#0000e05&|\| |p|a|t@1|e|r|n| |s|t|a|r|t| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|/+0#e000002&| +0#0000000&@65
+| +0#e000002&@5|"+0#0000e05&|\| |p|a|r|t| |1| |d|e|s|c|r|i|p|t|i|o|n| +0#0000000&@47
+| +0#e000002&@5|\+0#e000e06&|p+0#e000002&|a|t|1|a| |.|*| |p|a|t|1|b| +0#0000000&@53
+| +0#e000002&@5|"+0#0000e05&|\| |p|a|r|t| |2| |d|e|s|c|r|i|p|t|i|o|n| +0#0000000&@47
+| +0#e000002&@5|\+0#e000e06&|p+0#e000002&|a|t|2|a| |.|*| |p|a|t|2|b| +0#0000000&@53
+| +0#e000002&@5|"+0#0000e05&|\| |p|a|r|t| |3| |d|e|s|c|r|i|p|t|i|o|n| +0#0000000&@47
+| +0#e000002&@5|\+0#e000e06&|p+0#e000002&|a|t|3|a| |.|*| |p|a|t|3|b| +0#0000000&@53
+| +0#e000002&@5|"+0#0000e05&|\| |p|a|t@1|e|r|n| |e|n|d| +0#0000000&@54
+| +0#e000002&@5|\+0#e000e06&|/+0#e000002&| +0#0000000&@66
+@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@57|3|7|,|0|-|1| @7|1|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_03.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_03.dump
new file mode 100644
index 0000000..f0a2481
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_03.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@6|"+0#0000e05&|\| |c|o|n|c|e|a|l| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l| +0#0000000&@59
+@6|"+0#0000e05&|\| |c@1|h|a|r| |o|p|t|i|o|n| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&@1|h|a|r|=|&+0#e000002&| +0#0000000&@59
+@6>"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&@57
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d|i|n| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d|i|n|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|r| @41
+@6|"+0#0000e05&|\| |n|e|x|t|g|r|o|u|p| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=|t+0#0000000&|e|s|t|N|e|x|t|0|,|@|t|e|s|t|C|l|u|s|t|e|r| @34
+@6|"+0#0000e05&|\| |t|r|a|n|s|p|a|r|e|n|t| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|t+0#e000e06&|r|a|n|s|p|a|r|e|n|t| +0#0000000&@55
+@6|"+0#0000e05&|\| |s|k|i|p|w|h|i|t|e| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|e|m|p|t|y| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|e|m|p|t|y| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|n|l| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
+@57|5@1|,|7| @9|3|1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_04.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_04.dump
new file mode 100644
index 0000000..2298efb
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_04.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|s| |o|p|t|i|o|n| +0#0000000&@50
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|s|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|d|1|,|t|e|s|t|C|o|n|t|a|i|n|e|d|2| @28
+@6|"+0#0000e05&|\| |f|o|l|d| |o|p|t|i|o|n| +0#0000000&@54
+@6|\+0#e000e06&| +0#0000000&|f+0#e000e06&|o|l|d| +0#0000000&@62
+@6>"+0#0000e05&|\| |d|i|s|p|l|a|y| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|d+0#e000e06&|i|s|p|l|a|y| +0#0000000&@59
+@6|"+0#0000e05&|\| |e|x|t|e|n|d| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|t|e|n|d| +0#0000000&@60
+@6|"+0#0000e05&|\| |e|x|c|l|u|d|e|n|l| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|c|l|u|d|e|n|l| +0#0000000&@57
+@6|"+0#0000e05&|\| |k|e@1|p|e|n|d| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|k+0#e000e06&|e@1|p|e|n|d| +0#0000000&@59
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|r+0#00e0003&|e|g|i|o|n| +0#0000000&|t+0#00e0003&|e|s|t|R|e|g|i|o|n| +0#0000000&@53
+@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@6|"+0#0000e05&|\| |s|t|a|r|t| |o|p|t|i|o|n| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|s+0#00e0003&|t|a|r|t|=|"+0#e000002&|s|t|a|r|t|-|p|a|t@1|e|r|n|"| +0#0000000&@45
+@6|"+0#0000e05&|\| |s|k|i|p| |o|p|t|i|o|n| +0#0000000&@54
+@57|7|3|,|7| @9|4|2|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_05.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_05.dump
new file mode 100644
index 0000000..66a6b73
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_05.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|"+0#0000e05&|\| |s|k|i|p| |o|p|t|i|o|n| +0#0000000&@54
+@6|\+0#e000e06&| +0#0000000&|s+0#00e0003&|k|i|p|=|"+0#e000002&|s|k|i|p|-|p|a|t@1|e|r|n|"| +0#0000000&@47
+@6|"+0#0000e05&|\| |e|n|d| |o|p|t|i|o|n| +0#0000000&@55
+@6|\+0#e000e06&| +0#0000000&|e+0#00e0003&|n|d|=|"+0#e000002&|e|n|d|-|p|a|t@1|e|r|n|"| +0#0000000&@49
+@6|"+0#0000e05&|\| |c|o|n|c|e|a|l| |o|p|t|i|o|n| +0#0000000&@51
+@6>\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l| +0#0000000&@59
+@6|"+0#0000e05&|\| |c@1|h|a|r| |o|p|t|i|o|n| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&@1|h|a|r|=|&+0#e000002&| +0#0000000&@59
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&@57
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d|i|n| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d|i|n|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|r| @41
+@6|"+0#0000e05&|\| |n|e|x|t|g|r|o|u|p| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=|t+0#0000000&|e|s|t|N|e|x|t|0|,|@|t|e|s|t|C|l|u|s|t|e|r| @34
+@6|"+0#0000e05&|\| |t|r|a|n|s|p|a|r|e|n|t| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|t+0#e000e06&|r|a|n|s|p|a|r|e|n|t| +0#0000000&@55
+@6|"+0#0000e05&|\| |s|k|i|p|w|h|i|t|e| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|e|m|p|t|y| |o|p|t|i|o|n| +0#0000000&@49
+@57|9|1|,|7| @9|5|3|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_06.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_06.dump
new file mode 100644
index 0000000..12c1fbe
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_06.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|"+0#0000e05&|\| |s|k|i|p|e|m|p|t|y| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|e|m|p|t|y| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|n|l| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|s| |o|p|t|i|o|n| +0#0000000&@50
+@6>\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|s|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|d|1|,|t|e|s|t|C|o|n|t|a|i|n|e|d|2| @28
+@6|"+0#0000e05&|\| |o|n|e|l|i|n|e| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|o+0#e000e06&|n|e|l|i|n|e| +0#0000000&@59
+@6|"+0#0000e05&|\| |f|o|l|d| |o|p|t|i|o|n| +0#0000000&@54
+@6|\+0#e000e06&| +0#0000000&|f+0#e000e06&|o|l|d| +0#0000000&@62
+@6|"+0#0000e05&|\| |d|i|s|p|l|a|y| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|d+0#e000e06&|i|s|p|l|a|y| +0#0000000&@59
+@6|"+0#0000e05&|\| |e|x|t|e|n|d| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|t|e|n|d| +0#0000000&@60
+@6|"+0#0000e05&|\| |c|o|n|c|e|a|l|e|n|d|s| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l|e|n|d|s| +0#0000000&@55
+@6|"+0#0000e05&|\| |e|x|c|l|u|d|e|n|l| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|c|l|u|d|e|n|l| +0#0000000&@57
+@6|"+0#0000e05&|\| |k|e@1|p|e|n|d| |o|p|t|i|o|n| +0#0000000&@51
+@57|1|0|9|,|7| @8|6|5|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_07.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_07.dump
new file mode 100644
index 0000000..d7d1055
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_07.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|"+0#0000e05&|\| |k|e@1|p|e|n|d| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|k+0#e000e06&|e@1|p|e|n|d| +0#0000000&@59
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|c+0#00e0003&|l|u|s|t|e|r| +0#0000000&|t+0#00e0003&|e|s|t|C|l|u|s|t|e|r| +0#0000000&@51
+@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@6>"+0#0000e05&|\| |c|o|n|t|a|i|n|s| |o|p|t|i|o|n| +0#0000000&@50
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|s|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|d|1|,|t|e|s|t|C|o|n|t|a|i|n|e|d|2|,|t|e|s|t|C|o|n|t|a|i|n|e|d|3| @13
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|c+0#00e0003&|l|u|s|t|e|r| +0#0000000&|t+0#00e0003&|e|s|t|C|l|u|s|t|e|r| +0#0000000&@51
+@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@6|"+0#0000e05&|\| |a|d@1| |o|p|t|i|o|n| +0#0000000&@55
+@6|\+0#e000e06&| +0#0000000&|a+0#e000e06&|d@1|=|t+0#0000000&|e|s|t|A|d@1| @55
+@6|"+0#0000e05&|\| |r|e|m|o|v|e| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|r+0#e000e06&|e|m|o|v|e|=|t+0#0000000&|e|s|t|R|e|m|o|v|e| @49
+@75
+@75
+|"+0#0000e05&| |m|u|l|t|i|l|i|n|e| |g|r|o|u|p| |l|i|s|t| +0#0000000&@52
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|0| +0#0000000&|k|e|y|w|o|r|d| @45
+@57|1|2|7|,|7| @8|7|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_08.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_08.dump
new file mode 100644
index 0000000..4042d33
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_08.dump
@@ -0,0 +1,20 @@
+|s+0#af5f00255#ffffff0|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|0| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|1| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|2| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|3| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|4| +0#0000000&|k|e|y|w|o|r|d| @45
+>s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|5| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|6| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|7| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|8| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|9| +0#0000000&|k|e|y|w|o|r|d| @45
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|K|e|y|w|o|r|d| +0#0000000&@51
+@6|"+0#0000e05&|\| |n|e|x|t|g|r|o|u|p| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=| +0#0000000&@56
+@6|"+0#0000e05&|\| |a| |c|o|m@1|e|n|t| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|t|e|s|t|N|e|x|t|0| |,| |t|e|s|t|N|e|x|t|1| |,| @43
+@6|"+0#0000e05&|\| |a| |c|o|m@1|e|n|t| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|t|e|s|t|N|e|x|t|[|2|-|8|]|.|*| |,| @49
+@6|"+0#0000e05&|\| |a| |c|o|m@1|e|n|t| +0#0000000&@56
+@57|1|4|5|,|1| @8|8|7|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_09.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_09.dump
new file mode 100644
index 0000000..ade5bd5
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_09.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|"+0#0000e05&|\| |a| |c|o|m@1|e|n|t| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|t|e|s|t|N|e|x|t|9| |,| |@|t|e|s|t|C|l|u|s|t|e|r| |s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@32
+@6|"+0#0000e05&|\| |K|E|Y|W|O|R|D|S| |L|I|S|T| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|4| @58
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|5| @58
+@6>\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|6| @58
+@75
+@75
+|"+0#0000e05&| |l|e|a|k|i|n|g| |c|o|n|t|a|i|n|e|d| |g|r|o|u|p|s| +0#0000000&@48
+@75
+|"+0#0000e05&| +0#0000000&|E+0#e000e06&|x|a|m|p|l|e|:| +0#0000e05&|r|u|n|t|i|m|e|/|s|y|n|t|a|x|/|z|s|h|.|v|i|m| +0#0000000&@41
+|"+0#0000e05&| @2|"+0#e000002&|c|l|u|s|t|e|r|"| +0#0000e05&|s|h|o|u|l|d| |n|o|t| |b|e| |h|i|g|h|l|i|g|h|t|e|d| |o|u|t|s|i|d|e| |o|f| |:|s|y|n|t|a|x| |c|o|m@1|a|n|d|s| +0#0000000&@7
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|s+0#e000e06&|:|C+0#0000000&|o|n|t|a|i|n|e|d|G|r|o|u|p|(+0#e000e06&|)| +0#0000000&@46
+| +0#0000e05&@1|"| |.@2| +0#0000000&@67
+@2|f+0#af5f00255&|o|r| +0#0000000&|c+0#00e0e07&|l|u|s|t|e|r| +0#0000000&|i+0#af5f00255&|n| +0#0000000&|[|'+0#e000002&|m|a|r|k|d|o|w|n|H|i|g|h|l|i|g|h|t|_|z|s|h|'|,+0#0000000&| |'+0#e000002&|z|s|h|'|]+0#0000000&| @25
+| +0#0000e05&@3|"| |.@2| +0#0000000&@65
+@2|e+0#af5f00255&|n|d|f|o|r| +0#0000000&@66
+| +0#0000e05&@1|"| |.@2| +0#0000000&@67
+@57|1|6|3|,|7| @8|9@1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_99.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_99.dump
new file mode 100644
index 0000000..c1942c8
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|t|e|s|t|N|e|x|t|9| |,| |@|t|e|s|t|C|l|u|s|t|e|r| |s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@32
+@6|"+0#0000e05&|\| |K|E|Y|W|O|R|D|S| |L|I|S|T| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|4| @58
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|5| @58
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|6| @58
+@75
+@75
+|"+0#0000e05&| |l|e|a|k|i|n|g| |c|o|n|t|a|i|n|e|d| |g|r|o|u|p|s| +0#0000000&@48
+@75
+|"+0#0000e05&| +0#0000000&|E+0#e000e06&|x|a|m|p|l|e|:| +0#0000e05&|r|u|n|t|i|m|e|/|s|y|n|t|a|x|/|z|s|h|.|v|i|m| +0#0000000&@41
+|"+0#0000e05&| @2|"+0#e000002&|c|l|u|s|t|e|r|"| +0#0000e05&|s|h|o|u|l|d| |n|o|t| |b|e| |h|i|g|h|l|i|g|h|t|e|d| |o|u|t|s|i|d|e| |o|f| |:|s|y|n|t|a|x| |c|o|m@1|a|n|d|s| +0#0000000&@7
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|s+0#e000e06&|:|C+0#0000000&|o|n|t|a|i|n|e|d|G|r|o|u|p|(+0#e000e06&|)| +0#0000000&@46
+| +0#0000e05&@1|"| |.@2| +0#0000000&@67
+@2|f+0#af5f00255&|o|r| +0#0000000&|c+0#00e0e07&|l|u|s|t|e|r| +0#0000000&|i+0#af5f00255&|n| +0#0000000&|[|'+0#e000002&|m|a|r|k|d|o|w|n|H|i|g|h|l|i|g|h|t|_|z|s|h|'|,+0#0000000&| |'+0#e000002&|z|s|h|'|]+0#0000000&| @25
+| +0#0000e05&@3|"| |.@2| +0#0000000&@65
+@2|e+0#af5f00255&|n|d|f|o|r| +0#0000000&@66
+| +0#0000e05&@1|"| |.@2| +0#0000000&@67
+>e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@57|1|7@1|,|1| @8|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_00.dump b/runtime/syntax/testdir/dumps/vim_expr_00.dump
new file mode 100644
index 0000000..899b73c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_expr_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |S|t|r|i|n|g| +0#0000000&@66
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|I|t|'@1|s| |a| |s|t|r|i|n|g|'| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|t|a|b|:| |\|t|,| |n|e|w| |l|i|n|e|:| |\|n|,| |b|a|c|k|s|l|a|s|h|:| |\@1|'| +0#0000000&@31
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|t|a|b|:| |\+0#e000e06&|t|,+0#e000002&| |n|e|w| |l|i|n|e|:| |\+0#e000e06&|n|,+0#e000002&| |b|a|c|k|s|l|a|s|h|:| |\+0#e000e06&@1|"+0#e000002&| +0#0000000&@31
+@75
+|"+0#0000e05&| |S|t|r|i|n|g| |e|s|c|a|p|e| |s|e|q|u|e|n|c|e|s| +0#0000000&@49
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|\+0#e000e06&|3|1|6| +0#e000002&|-| |\+0#e000e06&|3|1| +0#e000002&|-| |\+0#e000e06&|3| +0#e000002&|-| |\+0#e000e06&|x|1|f| +0#e000002&|-| |\+0#e000e06&|x|f| +0#e000002&|-| |\+0#e000e06&|X|1|F| +0#e000002&|-| |\+0#e000e06&|X|F| +0#e000002&|-| |\+0#e000e06&|u|0|2|a|4| +0#e000002&|-| |\+0#e000e06&|U|0@4|2|a|4| +0#e000002&|-| |\+0#e000e06&|b| +0#e000002&
+|-| |\+0#e000e06&|e| +0#e000002&|-| |\+0#e000e06&|f| +0#e000002&|-| |\+0#e000e06&|n| +0#e000002&|-| |\+0#e000e06&|r| +0#e000002&|-| |\+0#e000e06&|t| +0#e000002&|-| |\+0#e000e06&@1| +0#e000002&|-| |\+0#e000e06&|"| +0#e000002&|-| |\+0#e000e06&|<|C|-|W|>|"+0#e000002&| +0#0000000&@30
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|\|3|1|6| |\|3|1| |\|3| |\|x|1|f| |\|x|f| |\|X|1|F| |\|X|F| |\|u|0|2|a|4| |\|U|0@4|2|a|4| |\|b| |\|e| |\|f| |\|n| |\|r| |\|t| |\@1|
+|\|"| |\|<|C|-|W|>|'| +0#0000000&@64
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|\+0#e000e06&|3|1|6|0+0#e000002&| |-| |\+0#e000e06&|x|1|f|0+0#e000002&| |-| |\+0#e000e06&|X|1|F|0+0#e000002&| |-| |\+0#e000e06&|u|0|2|a|4|0+0#e000002&| |-| |\+0#e000e06&|U|0@4|2|a|4|0+0#e000002&|"| +0#0000000&@22
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|"|\+0#e000e06&|3|1|6| +0#e000002&|-| |\+0#e000e06&|3|1| +0#e000002&|-| |\+0#e000e06&|3| +0#e000002&|-| |\+0#e000e06&|x|1|f| +0#e000002&|-| |\+0#e000e06&|x|f| +0#e000002&|-| |\+0#e000e06&|X|1|F| +0#e000002&|-| |\+0#e000e06&|X|F| +0#e000002&|-| |\+0#e000e06&|u|0|2|a|4| +0#e000002&|-| |\+0#e000e06&|U|0@4|2|a|4| +0#e000002&|-| |\+0#e000e06&|b
+| +0#e000002&|-| |\+0#e000e06&|e| +0#e000002&|-| |\+0#e000e06&|f| +0#e000002&|-| |\+0#e000e06&|n| +0#e000002&|-| |\+0#e000e06&|r| +0#e000002&|-| |\+0#e000e06&|t| +0#e000002&|-| |\+0#e000e06&@1| +0#e000002&|-| |\+0#e000e06&|"| +0#e000002&|-| |\+0#e000e06&|<|C|-|W|>|"+0#e000002&| +0#0000000&@29
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|'|\|3|1|6| |\|3|1| |\|3| |\|x|1|f| |\|x|f| |\|X|1|F| |\|X|F| |\|u|0|2|a|4| |\|U|0@4|2|a|4| |\|b| |\|e| |\|f| |\|n| |\|r| |\|t| |\@1
+| |\|"| |\|<|C|-|W|>|'| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|"|\+0#e000e06&|3|1|6|0+0#e000002&| |-| |\+0#e000e06&|x|1|f|0+0#e000002&| |-| |\+0#e000e06&|X|1|F|0+0#e000002&| |-| |\+0#e000e06&|u|0|2|a|4|0+0#e000002&| |-| |\+0#e000e06&|U|0@4|2|a|4|0+0#e000002&|"| +0#0000000&@21
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_01.dump b/runtime/syntax/testdir/dumps/vim_expr_01.dump
new file mode 100644
index 0000000..383c730
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_expr_01.dump
@@ -0,0 +1,20 @@
+|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|$+0#e000002&|'|\|3|1|6| |\|3|1| |\|3| |\|x|1|f| |\|x|f| |\|X|1|F| |\|X|F| |\|u|0|2|a|4| |\|U|0@4|2|a|4| |\|b| |\|e| |\|f| |\|n| |\|r| |\|t| |\@1
+| |\|"| |\|<|C|-|W|>|'| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|"|\+0#e000e06&|3|1|6|0+0#e000002&| |-| |\+0#e000e06&|x|1|f|0+0#e000002&| |-| |\+0#e000e06&|X|1|F|0+0#e000002&| |-| |\+0#e000e06&|u|0|2|a|4|0+0#e000002&| |-| |\+0#e000e06&|U|0@4|2|a|4|0+0#e000002&|"| +0#0000000&@21
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|\+0#e000e06&|<|C|-|a|>|"+0#e000002&| +0#0000000&@61
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|\+0#e000e06&|<|*|C|-|a|>|"+0#e000002&| +0#0000000&@60
+>e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|\+0#e000e06&|<|C|-|>@1|"+0#e000002&| +0#0000000&@61
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|\+0#e000e06&|<|*|C|-|>@1|"+0#e000002&| +0#0000000&@60
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|\+0#e000e06&|<|C|-|>@1|>+0#e000002&|"| +0#0000000&@60
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|\+0#e000e06&|<|*|C|-|>@1|>+0#e000002&|"| +0#0000000&@59
+@75
+|"+0#0000e05&| |S|t|r|i|n|g| |i|n|t|e|r|p|o|l|a|t|i|o|n| +0#0000000&@52
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|D|o|n|'@1|t| |h|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:| |{@1| |{|1| |+| |2|}| |}@1|'| +0#0000000&@22
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|D|o|n|'|t| |h|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:| |{@1| |{|1| |+| |2|}| |}@1|"| +0#0000000&@23
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|'|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\|t|{+0#e000e06&@1| +0#e000002&|{+0#e000e06&| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|{|'+0#e000002&|f|o@1|'|:+0#0000000&| |'+0#e000002&|b|a|r|'|}+0#e000e06&|)| +0#0000000&|}+0#e000e06&| +0#e000002&|}+0#e000e06&@1|'+0#e000002&| +0#0000000&@8
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|'|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\|t|{+0#e000e06&@1| +0#e000002&|{+0#e000e06&| +0#0000000&|$+0#e000002&|'|n|e|s|t|e|d|:| |{+0#e000e06&@1| +0#e000002&|{+0#e000e06&|1+0#e000002&| +0#0000000&|++0#af5f00255&| +0#0000000&|2+0#e000002&|}+0#e000e06&| +0#e000002&|}+0#e000e06&@1|'+0#e000002&| +0#0000000&|}+0#e000e06&| +0#e000002&|}+0#e000e06&@1|'+0#e000002&| +0#0000000&@6
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|"|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\+0#e000e06&|t|{@1| +0#e000002&|{+0#e000e06&| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|{|"+0#e000002&|f|o@1|"|:+0#0000000&| |"+0#e000002&|b|a|r|"|}+0#e000e06&|)| +0#0000000&|}+0#e000e06&| +0#e000002&|}+0#e000e06&@1|"+0#e000002&| +0#0000000&@8
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|"|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\+0#e000e06&|t|{@1| +0#e000002&|{+0#e000e06&| +0#0000000&|$+0#e000002&|"|n|e|s|t|e|d|:| |{+0#e000e06&@1| +0#e000002&|{+0#e000e06&|1+0#e000002&| +0#0000000&|++0#af5f00255&| +0#0000000&|2+0#e000002&|}+0#e000e06&| +0#e000002&|}+0#e000e06&@1|"+0#e000002&| +0#0000000&|}+0#e000e06&| +0#e000002&|}+0#e000e06&@1|"+0#e000002&| +0#0000000&@6
+@57|1|9|,|1| @9|2|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_02.dump b/runtime/syntax/testdir/dumps/vim_expr_02.dump
new file mode 100644
index 0000000..3bfab4c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_expr_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|"+0#0000e05&| |N|u|m|b|e|r| +0#0000000&@66
+@75
+|"+0#0000e05&| |H|e|x|a|d|e|c|i|m|a|l| +0#0000000&@61
+|e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|x|F@1| +0#0000000&@64
+>e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|X|F@1| +0#0000000&@64
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|x|F@1| +0#0000000&@64
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|X|F@1| +0#0000000&@64
+@75
+|"+0#0000e05&| |D|e|c|i|m|a|l| +0#0000000&@65
+|e+0#af5f00255&|c|h|o| +0#0000000&@1|2+0#e000002&|5@1| +0#0000000&@65
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|2+0#e000002&|5@1| +0#0000000&@65
+@75
+|"+0#0000e05&| |O|c|t|a|l| +0#0000000&@67
+|e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|3|7@1| +0#0000000&@64
+|e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|o|3|7@1| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|O|3|7@1| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|3|7@1| +0#0000000&@64
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|o|3|7@1| +0#0000000&@63
+@57|3|7|,|1| @9|5|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_03.dump b/runtime/syntax/testdir/dumps/vim_expr_03.dump
new file mode 100644
index 0000000..2322e7d
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_expr_03.dump
@@ -0,0 +1,20 @@
+|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|o|3|7@1| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|O|3|7@1| +0#0000000&@63
+@75
+|"+0#0000e05&| |B|i|n|a|r|y| +0#0000000&@66
+|e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|b|1@7| +0#0000000&@58
+>e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|B|1@7| +0#0000000&@58
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|b|1@7| +0#0000000&@58
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|B|1@7| +0#0000000&@58
+@75
+|"+0#0000e05&| |F|l|o|a|t| +0#0000000&@67
+|1+0#e000002&|2|3|.|4|5|6| +0#0000000&@67
+|++0#af5f00255&|0+0#e000002&|.|0@2|1| +0#0000000&@67
+|5+0#e000002&@1|.|0| +0#0000000&@70
+|-+0#af5f00255&|0+0#e000002&|.|1|2|3| +0#0000000&@68
+|1+0#e000002&|.|2|3|4|e|0|3| +0#0000000&@66
+|1+0#e000002&|.|0|E|-|6| +0#0000000&@68
+|-+0#af5f00255&|3+0#e000002&|.|1|4|1|6|e|+|8@1| +0#0000000&@63
+@75
+|"+0#0000e05&| |B|l|o|b| +0#0000000&@68
+@57|5@1|,|1| @9|9|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_99.dump b/runtime/syntax/testdir/dumps/vim_expr_99.dump
new file mode 100644
index 0000000..b8394fb
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_expr_99.dump
@@ -0,0 +1,20 @@
+|"+0#0000e05#ffffff0| |B|i|n|a|r|y| +0#0000000&@66
+|e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|b|1@7| +0#0000000&@58
+|e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|B|1@7| +0#0000000&@58
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|b|1@7| +0#0000000&@58
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|B|1@7| +0#0000000&@58
+@75
+|"+0#0000e05&| |F|l|o|a|t| +0#0000000&@67
+|1+0#e000002&|2|3|.|4|5|6| +0#0000000&@67
+|++0#af5f00255&|0+0#e000002&|.|0@2|1| +0#0000000&@67
+|5+0#e000002&@1|.|0| +0#0000000&@70
+|-+0#af5f00255&|0+0#e000002&|.|1|2|3| +0#0000000&@68
+|1+0#e000002&|.|2|3|4|e|0|3| +0#0000000&@66
+|1+0#e000002&|.|0|E|-|6| +0#0000000&@68
+|-+0#af5f00255&|3+0#e000002&|.|1|4|1|6|e|+|8@1| +0#0000000&@63
+@75
+|"+0#0000e05&| |B|l|o|b| +0#0000000&@68
+|e+0#af5f00255&|c|h|o| +0#0000000&|0+0#e000002&|z|F@1|0@1|E|D|0|1|5|D|A|F| +0#0000000&@55
+|e+0#af5f00255&|c|h|o| +0#0000000&|0+0#e000002&|z|F@1|0@1|.|E|D|0|1|.|5|D|A|F| +0#0000000&@53
+>e+0#af5f00255&|c|h|o| +0#0000000&|0+0#e000002&|z|F@1|.|0@1|.|E|D|.|0|1|.|5|D|.|A|F| +0#0000000&@50
+@57|7|1|,|1| @9|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_00.dump b/runtime/syntax/testdir/dumps/vim_key_notation_00.dump
new file mode 100644
index 0000000..ed58e2f
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_key_notation_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |K|e|y| |n|o|t|a|t|i|o|n| +0#0000000&@60
+@75
+|<+0#e000e06&|S|p|a|c|e|>| +0#0000000&@67
+|<+0#e000e06&|T|a|b|>| +0#0000000&@69
+|<+0#e000e06&|T|a|b|>| +0#0000000&@69
+|<+0#e000e06&|N|L|>| +0#0000000&@70
+|<+0#e000e06&|N|e|w|L|i|n|e|>| +0#0000000&@65
+|<+0#e000e06&|L|i|n|e|F|e@1|d|>| +0#0000000&@64
+|<+0#e000e06&|L|F|>| +0#0000000&@70
+|<+0#e000e06&|C|R|>| +0#0000000&@70
+|<+0#e000e06&|R|e|t|u|r|n|>| +0#0000000&@66
+|<+0#e000e06&|E|n|t|e|r|>| +0#0000000&@67
+|<+0#e000e06&|B|S|>| +0#0000000&@70
+|<+0#e000e06&|B|a|c|k|S|p|a|c|e|>| +0#0000000&@63
+|<+0#e000e06&|E|s|c|>| +0#0000000&@69
+|<+0#e000e06&|C|S|I|>| +0#0000000&@69
+|<+0#e000e06&|x|C|S|I|>| +0#0000000&@68
+|<+0#e000e06&|B|a|r|>| +0#0000000&@69
+|<+0#e000e06&|B|s|l|a|s|h|>| +0#0000000&@66
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_01.dump b/runtime/syntax/testdir/dumps/vim_key_notation_01.dump
new file mode 100644
index 0000000..0cbf0ee
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_key_notation_01.dump
@@ -0,0 +1,20 @@
+|<+0#e000e06#ffffff0|B|a|c|k|S|p|a|c|e|>| +0#0000000&@63
+|<+0#e000e06&|E|s|c|>| +0#0000000&@69
+|<+0#e000e06&|C|S|I|>| +0#0000000&@69
+|<+0#e000e06&|x|C|S|I|>| +0#0000000&@68
+|<+0#e000e06&|B|a|r|>| +0#0000000&@69
+><+0#e000e06&|B|s|l|a|s|h|>| +0#0000000&@66
+|<+0#e000e06&|D|e|l|>| +0#0000000&@69
+|<+0#e000e06&|D|e|l|e|t|e|>| +0#0000000&@66
+|<+0#e000e06&|k|D|e|l|>| +0#0000000&@68
+|<+0#e000e06&|U|p|>| +0#0000000&@70
+|<+0#e000e06&|D|o|w|n|>| +0#0000000&@68
+|<+0#e000e06&|L|e|f|t|>| +0#0000000&@68
+|<+0#e000e06&|R|i|g|h|t|>| +0#0000000&@67
+|<+0#e000e06&|x|U|p|>| +0#0000000&@69
+|<+0#e000e06&|x|D|o|w|n|>| +0#0000000&@67
+|<+0#e000e06&|x|L|e|f|t|>| +0#0000000&@67
+|<+0#e000e06&|x|R|i|g|h|t|>| +0#0000000&@66
+|<+0#e000e06&|P|a|s|t|e|S|t|a|r|t|>| +0#0000000&@62
+|<+0#e000e06&|P|a|s|t|e|E|n|d|>| +0#0000000&@64
+@57|1|9|,|1| @10|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_02.dump b/runtime/syntax/testdir/dumps/vim_key_notation_02.dump
new file mode 100644
index 0000000..01fca78
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_key_notation_02.dump
@@ -0,0 +1,20 @@
+|<+0#e000e06#ffffff0|P|a|s|t|e|E|n|d|>| +0#0000000&@64
+|<+0#e000e06&|F|1|>| +0#0000000&@70
+|<+0#e000e06&|F|2|>| +0#0000000&@70
+|<+0#e000e06&|F|3|>| +0#0000000&@70
+|<+0#e000e06&|F|4|>| +0#0000000&@70
+><+0#e000e06&|F|5|>| +0#0000000&@70
+|<+0#e000e06&|F|6|>| +0#0000000&@70
+|<+0#e000e06&|F|7|>| +0#0000000&@70
+|<+0#e000e06&|F|8|>| +0#0000000&@70
+|<+0#e000e06&|F|9|>| +0#0000000&@70
+|<+0#e000e06&|F|1|0|>| +0#0000000&@69
+|<+0#e000e06&|F|1@1|>| +0#0000000&@69
+|<+0#e000e06&|F|1|2|>| +0#0000000&@69
+|<+0#e000e06&|F|1|3|>| +0#0000000&@69
+|<+0#e000e06&|F|1|4|>| +0#0000000&@69
+|<+0#e000e06&|F|1|5|>| +0#0000000&@69
+|<+0#e000e06&|F|1|6|>| +0#0000000&@69
+|<+0#e000e06&|F|1|7|>| +0#0000000&@69
+|<+0#e000e06&|F|1|8|>| +0#0000000&@69
+@57|3|7|,|1| @9|2|1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_03.dump b/runtime/syntax/testdir/dumps/vim_key_notation_03.dump
new file mode 100644
index 0000000..dfdf890
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_key_notation_03.dump
@@ -0,0 +1,20 @@
+|<+0#e000e06#ffffff0|F|1|8|>| +0#0000000&@69
+|<+0#e000e06&|F|1|9|>| +0#0000000&@69
+|<+0#e000e06&|F|2|0|>| +0#0000000&@69
+|<+0#e000e06&|F|2|1|>| +0#0000000&@69
+|<+0#e000e06&|F|2@1|>| +0#0000000&@69
+><+0#e000e06&|F|2|3|>| +0#0000000&@69
+|<+0#e000e06&|F|2|4|>| +0#0000000&@69
+|<+0#e000e06&|F|2|5|>| +0#0000000&@69
+|<+0#e000e06&|F|2|6|>| +0#0000000&@69
+|<+0#e000e06&|F|2|7|>| +0#0000000&@69
+|<+0#e000e06&|F|2|8|>| +0#0000000&@69
+|<+0#e000e06&|F|2|9|>| +0#0000000&@69
+|<+0#e000e06&|F|3|0|>| +0#0000000&@69
+|<+0#e000e06&|F|3|1|>| +0#0000000&@69
+|<+0#e000e06&|F|3|2|>| +0#0000000&@69
+|<+0#e000e06&|F|3@1|>| +0#0000000&@69
+|<+0#e000e06&|F|3|4|>| +0#0000000&@69
+|<+0#e000e06&|F|3|5|>| +0#0000000&@69
+|<+0#e000e06&|F|3|6|>| +0#0000000&@69
+@57|5@1|,|1| @9|3|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_04.dump b/runtime/syntax/testdir/dumps/vim_key_notation_04.dump
new file mode 100644
index 0000000..8820c26
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_key_notation_04.dump
@@ -0,0 +1,20 @@
+|<+0#e000e06#ffffff0|F|3|6|>| +0#0000000&@69
+|<+0#e000e06&|F|3|7|>| +0#0000000&@69
+|<+0#e000e06&|x|F|1|>| +0#0000000&@69
+|<+0#e000e06&|x|F|2|>| +0#0000000&@69
+|<+0#e000e06&|x|F|3|>| +0#0000000&@69
+><+0#e000e06&|x|F|4|>| +0#0000000&@69
+|<+0#e000e06&|H|e|l|p|>| +0#0000000&@68
+|<+0#e000e06&|U|n|d|o|>| +0#0000000&@68
+|<+0#e000e06&|I|n|s|e|r|t|>| +0#0000000&@66
+|<+0#e000e06&|I|n|s|>| +0#0000000&@69
+|<+0#e000e06&|k|I|n|s|e|r|t|>| +0#0000000&@65
+|<+0#e000e06&|H|o|m|e|>| +0#0000000&@68
+|<+0#e000e06&|k|H|o|m|e|>| +0#0000000&@67
+|<+0#e000e06&|x|H|o|m|e|>| +0#0000000&@67
+|<+0#e000e06&|z|H|o|m|e|>| +0#0000000&@67
+|<+0#e000e06&|E|n|d|>| +0#0000000&@69
+|<+0#e000e06&|k|E|n|d|>| +0#0000000&@68
+|<+0#e000e06&|x|E|n|d|>| +0#0000000&@68
+|<+0#e000e06&|z|E|n|d|>| +0#0000000&@68
+@57|7|3|,|1| @9|4|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_05.dump b/runtime/syntax/testdir/dumps/vim_key_notation_05.dump
new file mode 100644
index 0000000..939bf89
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_key_notation_05.dump
@@ -0,0 +1,20 @@
+|<+0#e000e06#ffffff0|z|E|n|d|>| +0#0000000&@68
+|<+0#e000e06&|P|a|g|e|U|p|>| +0#0000000&@66
+|<+0#e000e06&|P|a|g|e|D|o|w|n|>| +0#0000000&@64
+|<+0#e000e06&|k|P|a|g|e|U|p|>| +0#0000000&@65
+|<+0#e000e06&|k|P|a|g|e|D|o|w|n|>| +0#0000000&@63
+><+0#e000e06&|k|P|l|u|s|>| +0#0000000&@67
+|<+0#e000e06&|k|M|i|n|u|s|>| +0#0000000&@66
+|<+0#e000e06&|k|D|i|v|i|d|e|>| +0#0000000&@65
+|<+0#e000e06&|k|M|u|l|t|i|p|l|y|>| +0#0000000&@63
+|<+0#e000e06&|k|E|n|t|e|r|>| +0#0000000&@66
+|<+0#e000e06&|k|P|o|i|n|t|>| +0#0000000&@66
+|<+0#e000e06&|k|0|>| +0#0000000&@70
+|<+0#e000e06&|k|1|>| +0#0000000&@70
+|<+0#e000e06&|k|2|>| +0#0000000&@70
+|<+0#e000e06&|k|3|>| +0#0000000&@70
+|<+0#e000e06&|k|4|>| +0#0000000&@70
+|<+0#e000e06&|k|5|>| +0#0000000&@70
+|<+0#e000e06&|k|6|>| +0#0000000&@70
+|<+0#e000e06&|k|7|>| +0#0000000&@70
+@57|9|1|,|1| @9|5|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_06.dump b/runtime/syntax/testdir/dumps/vim_key_notation_06.dump
new file mode 100644
index 0000000..e82c7f3
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_key_notation_06.dump
@@ -0,0 +1,20 @@
+|<+0#e000e06#ffffff0|k|7|>| +0#0000000&@70
+|<+0#e000e06&|k|8|>| +0#0000000&@70
+|<+0#e000e06&|k|9|>| +0#0000000&@70
+|<+0#e000e06&|l|t|>| +0#0000000&@70
+|<+0#e000e06&|M|o|u|s|e|>| +0#0000000&@67
+><+0#e000e06&|N|e|t|M|o|u|s|e|>| +0#0000000&@64
+|<+0#e000e06&|D|e|c|M|o|u|s|e|>| +0#0000000&@64
+|<+0#e000e06&|J|s|b|M|o|u|s|e|>| +0#0000000&@64
+|<+0#e000e06&|P|t|e|r|m|M|o|u|s|e|>| +0#0000000&@62
+|<+0#e000e06&|U|r|x|v|t|M|o|u|s|e|>| +0#0000000&@62
+|<+0#e000e06&|S|g|r|M|o|u|s|e|>| +0#0000000&@64
+|<+0#e000e06&|S|g|r|M|o|u|s|e|R|e|l|e|a|s|e|>| +0#0000000&@57
+|<+0#e000e06&|L|e|f|t|M|o|u|s|e|>| +0#0000000&@63
+|<+0#e000e06&|L|e|f|t|M|o|u|s|e|N|M|>| +0#0000000&@61
+|<+0#e000e06&|L|e|f|t|D|r|a|g|>| +0#0000000&@64
+|<+0#e000e06&|L|e|f|t|R|e|l|e|a|s|e|>| +0#0000000&@61
+|<+0#e000e06&|L|e|f|t|R|e|l|e|a|s|e|N|M|>| +0#0000000&@59
+|<+0#e000e06&|M|o|u|s|e|M|o|v|e|>| +0#0000000&@63
+|<+0#e000e06&|M|i|d@1|l|e|M|o|u|s|e|>| +0#0000000&@61
+@57|1|0|9|,|1| @8|7|1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_07.dump b/runtime/syntax/testdir/dumps/vim_key_notation_07.dump
new file mode 100644
index 0000000..3e21774
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_key_notation_07.dump
@@ -0,0 +1,20 @@
+|<+0#e000e06#ffffff0|M|i|d@1|l|e|M|o|u|s|e|>| +0#0000000&@61
+|<+0#e000e06&|M|i|d@1|l|e|D|r|a|g|>| +0#0000000&@62
+|<+0#e000e06&|M|i|d@1|l|e|R|e|l|e|a|s|e|>| +0#0000000&@59
+|<+0#e000e06&|R|i|g|h|t|M|o|u|s|e|>| +0#0000000&@62
+|<+0#e000e06&|R|i|g|h|t|D|r|a|g|>| +0#0000000&@63
+><+0#e000e06&|R|i|g|h|t|R|e|l|e|a|s|e|>| +0#0000000&@60
+|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|U|p|>| +0#0000000&@59
+|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|D|o|w|n|>| +0#0000000&@57
+|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|R|i|g|h|t|>| +0#0000000&@56
+|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|L|e|f|t|>| +0#0000000&@57
+|<+0#e000e06&|M|o|u|s|e|D|o|w|n|>| +0#0000000&@63
+|<+0#e000e06&|M|o|u|s|e|U|p|>| +0#0000000&@65
+|<+0#e000e06&|X|1|M|o|u|s|e|>| +0#0000000&@65
+|<+0#e000e06&|X|1|D|r|a|g|>| +0#0000000&@66
+|<+0#e000e06&|X|1|R|e|l|e|a|s|e|>| +0#0000000&@63
+|<+0#e000e06&|X|2|M|o|u|s|e|>| +0#0000000&@65
+|<+0#e000e06&|X|2|D|r|a|g|>| +0#0000000&@66
+|<+0#e000e06&|X|2|R|e|l|e|a|s|e|>| +0#0000000&@63
+|<+0#e000e06&|D|r|o|p|>| +0#0000000&@68
+@57|1|2|7|,|1| @8|8|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_08.dump b/runtime/syntax/testdir/dumps/vim_key_notation_08.dump
new file mode 100644
index 0000000..7337575
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_key_notation_08.dump
@@ -0,0 +1,20 @@
+|<+0#e000e06#ffffff0|D|r|o|p|>| +0#0000000&@68
+|<+0#e000e06&|N|u|l|>| +0#0000000&@69
+|<+0#e000e06&|S|N|R|>| +0#0000000&@69
+|<+0#e000e06&|P|l|u|g|>| +0#0000000&@68
+|<+0#e000e06&|C|u|r|s|o|r|H|o|l|d|>| +0#0000000&@62
+><+0#e000e06&|I|g|n|o|r|e|>| +0#0000000&@66
+|<+0#e000e06&|C|m|d|>| +0#0000000&@69
+|<+0#e000e06&|S|c|r|i|p|t|C|m|d|>| +0#0000000&@63
+|<+0#e000e06&|F|o|c|u|s|G|a|i|n|e|d|>| +0#0000000&@61
+|<+0#e000e06&|F|o|c|u|s|L|o|s|t|>| +0#0000000&@63
+@75
+|<+0#e000e06&|c|w|o|r|d|>| +0#0000000&@67
+|<+0#e000e06&|c|W|O|R|D|>| +0#0000000&@67
+|<+0#e000e06&|c|e|x|p|r|>| +0#0000000&@67
+|<+0#e000e06&|c|f|i|l|e|>| +0#0000000&@67
+|<+0#e000e06&|a|f|i|l|e|>| +0#0000000&@67
+|<+0#e000e06&|a|b|u|f|>| +0#0000000&@68
+|<+0#e000e06&|a|m|a|t|c|h|>| +0#0000000&@66
+|<+0#e000e06&|s|f|i|l|e|>| +0#0000000&@67
+@57|1|4|5|,|1| @8|9|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_key_notation_99.dump b/runtime/syntax/testdir/dumps/vim_key_notation_99.dump
new file mode 100644
index 0000000..67dac5f
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_key_notation_99.dump
@@ -0,0 +1,20 @@
+|<+0#e000e06#ffffff0|I|g|n|o|r|e|>| +0#0000000&@66
+|<+0#e000e06&|C|m|d|>| +0#0000000&@69
+|<+0#e000e06&|S|c|r|i|p|t|C|m|d|>| +0#0000000&@63
+|<+0#e000e06&|F|o|c|u|s|G|a|i|n|e|d|>| +0#0000000&@61
+|<+0#e000e06&|F|o|c|u|s|L|o|s|t|>| +0#0000000&@63
+@75
+|<+0#e000e06&|c|w|o|r|d|>| +0#0000000&@67
+|<+0#e000e06&|c|W|O|R|D|>| +0#0000000&@67
+|<+0#e000e06&|c|e|x|p|r|>| +0#0000000&@67
+|<+0#e000e06&|c|f|i|l|e|>| +0#0000000&@67
+|<+0#e000e06&|a|f|i|l|e|>| +0#0000000&@67
+|<+0#e000e06&|a|b|u|f|>| +0#0000000&@68
+|<+0#e000e06&|a|m|a|t|c|h|>| +0#0000000&@66
+|<+0#e000e06&|s|f|i|l|e|>| +0#0000000&@67
+|<+0#e000e06&|s|t|a|c|k|>| +0#0000000&@67
+|<+0#e000e06&|s|c|r|i|p|t|>| +0#0000000&@66
+|<+0#e000e06&|s|l|n|u|m|>| +0#0000000&@67
+|<+0#e000e06&|s|f|l|n|u|m|>| +0#0000000&@66
+><+0#e000e06&|c|l|i|e|n|t|>| +0#0000000&@66
+@57|1|6|3|,|1| @8|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_keymap_00.dump b/runtime/syntax/testdir/dumps/vim_keymap_00.dump
index 974c5ad..2c43e3d 100644
--- a/runtime/syntax/testdir/dumps/vim_keymap_00.dump
+++ b/runtime/syntax/testdir/dumps/vim_keymap_00.dump
@@ -17,4 +17,4 @@
|s+0#af5f00255&|c|r|i|p|t|e|n|c|o|d|i|n|g| +0#0000000&|u|t|f|-+0#af5f00255&|8+0#e000002&| +0#0000000&@54
@75
|@+0#4040ff13&@2| @71
-|"+0#0000000&|i|n|p|u|t|/|v|i|m|_|k|e|y|m|a|p|.|v|i|m|"| |2|6|L|,| |3|9@1|2|B| @23|1|,|1| @10|T|o|p|
+| +0#0000000&@56|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_line_continuation_00.dump b/runtime/syntax/testdir/dumps/vim_line_continuation_00.dump
new file mode 100644
index 0000000..d6b526f
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_line_continuation_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |l|i|n|e| |c|o|n|t|i|n|u|a|t|i|o|n|s| |w|i|t|h| |i|n|t|e|r|s|p|e|r|s|e|d| |c|o|m@1|e|n|t|s| +0#0000000&@23
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&| +0#0000000&@61
+@6|"+0#0000e05&|\| |p|a|r|a|m| |a| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|a+0#00e0e07&|,+0#0000000&| @64
+@6|"+0#0000e05&|\| |p|a|r|a|m| |b| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|b+0#00e0e07&|,+0#0000000&| @64
+@6|"+0#0000e05&|\| |p|a|r|a|m| |c| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|c+0#00e0e07&| +0#0000000&@65
+@6|\+0#e000e06&|)| +0#0000000&@66
+@2|e+0#af5f00255&|c|h|o|m|s|g| +0#0000000&@65
+@8|"+0#0000e05&|\| |s|t|a|r|t| |s|t|r|i|n|g| +0#0000000&@51
+@8|\+0#e000e06&| +0#0000000&|$|"| @62
+@8|"+0#0000e05&|\| |p|r|i|n|t| |a| +0#0000000&@56
+@8|\+0#e000e06&| +0#0000000&|a+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&|a+0#00e0e07&|:|a|}+0#e000e06&|,+0#0000000&| @54
+@8|"+0#0000e05&|\| |p|r|i|n|t| |b| +0#0000000&@56
+@8|\+0#e000e06&| +0#0000000&|b+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&|a+0#00e0e07&|:|b|}+0#e000e06&|,+0#0000000&| @54
+@8|"+0#0000e05&|\| |p|r|i|n|t| |c| +0#0000000&@56
+@8|\+0#e000e06&| +0#0000000&|c+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&|a+0#00e0e07&|:|c|}+0#e000e06&| +0#0000000&@55
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_line_continuation_01.dump b/runtime/syntax/testdir/dumps/vim_line_continuation_01.dump
new file mode 100644
index 0000000..e5a9a18
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_line_continuation_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|"+0#0000e05&|\| |p|r|i|n|t| |a| +0#0000000&@56
+@8|\+0#e000e06&| +0#0000000&|a+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&|a+0#00e0e07&|:|a|}+0#e000e06&|,+0#0000000&| @54
+@8|"+0#0000e05&|\| |p|r|i|n|t| |b| +0#0000000&@56
+@8|\+0#e000e06&| +0#0000000&|b+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&|a+0#00e0e07&|:|b|}+0#e000e06&|,+0#0000000&| @54
+@8|"+0#0000e05&|\| |p|r|i|n|t| |c| +0#0000000&@56
+@8>\+0#e000e06&| +0#0000000&|c+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&|a+0#00e0e07&|:|c|}+0#e000e06&| +0#0000000&@55
+@8|"+0#0000e05&|\| |e|n|d| |s|t|r|i|n|g| +0#0000000&@53
+@8|\+0#e000e06&|"+0#0000000&| @64
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&| +0#0000000&@65
+@6|"+0#0000e05&|\| |a|r|g| |1| +0#0000000&@60
+@6|\+0#e000e06&| +0#0000000&|1+0#e000002&@1|,+0#0000000&| @63
+@6|"+0#0000e05&|\| |a|r|g| |2| +0#0000000&@60
+@6|\+0#e000e06&| +0#0000000&|2+0#e000002&@1|,+0#0000000&| @63
+@6|"+0#0000e05&|\| |a|r|g| |3| +0#0000000&@60
+@6|\+0#e000e06&| +0#0000000&|3+0#e000002&@1| +0#0000000&@64
+@6|\+0#e000e06&|)| +0#0000000&@66
+@75
+@57|1|9|,|2|-|9| @7|4|3|%|
diff --git a/runtime/syntax/testdir/dumps/vim_line_continuation_02.dump b/runtime/syntax/testdir/dumps/vim_line_continuation_02.dump
new file mode 100644
index 0000000..c4ceded
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_line_continuation_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|l+0#af5f00255&|e|t| +0#0000000&|d+0#00e0e07&|i|c|t| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000e06&|{| +0#0000000&@61
+@6|"+0#0000e05&|\| |p|a|i|r| |1| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|a+0#00e0e07&|:+0#0000000&| |1+0#e000002&|,+0#0000000&| @61
+@6|"+0#0000e05&|\| |p|a|i|r| |2| +0#0000000&@59
+@6>\+0#e000e06&| +0#0000000&|b+0#00e0e07&|:+0#0000000&| |2+0#e000002&|,+0#0000000&| @61
+@6|"+0#0000e05&|\| |p|a|i|r| |3| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|c+0#00e0e07&|:+0#0000000&| |3+0#e000002&| +0#0000000&@62
+@6|\+0#e000e06&|}| +0#0000000&@66
+@75
+|l+0#af5f00255&|e|t| +0#0000000&|a+0#00e0e07&|r@1|a|y| +0#0000000&|=+0#af5f00255&| +0#0000000&|[| @61
+| +0#0000e05&@5|"|\| |e|l|e|m|e|n|t| |1| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|1+0#e000002&|,+0#0000000&| @64
+| +0#0000e05&@5|"|\| |e|l|e|m|e|n|t| |2| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|2+0#e000002&|,+0#0000000&| @64
+| +0#0000e05&@5|"|\| |e|l|e|m|e|n|t| |3| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|3+0#e000002&| +0#0000000&@65
+@6|\+0#e000e06&|]+0#0000000&| @66
+|~+0#4040ff13&| @73
+| +0#0000000&@56|3|7|,|7| @9|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_line_continuation_99.dump b/runtime/syntax/testdir/dumps/vim_line_continuation_99.dump
new file mode 100644
index 0000000..05ea464
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_line_continuation_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|\+0#e000e06&|)| +0#0000000&@66
+@75
+|l+0#af5f00255&|e|t| +0#0000000&|d+0#00e0e07&|i|c|t| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000e06&|{| +0#0000000&@61
+@6|"+0#0000e05&|\| |p|a|i|r| |1| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|a+0#00e0e07&|:+0#0000000&| |1+0#e000002&|,+0#0000000&| @61
+@6|"+0#0000e05&|\| |p|a|i|r| |2| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|b+0#00e0e07&|:+0#0000000&| |2+0#e000002&|,+0#0000000&| @61
+@6|"+0#0000e05&|\| |p|a|i|r| |3| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|c+0#00e0e07&|:+0#0000000&| |3+0#e000002&| +0#0000000&@62
+@6|\+0#e000e06&|}| +0#0000000&@66
+@75
+|l+0#af5f00255&|e|t| +0#0000000&|a+0#00e0e07&|r@1|a|y| +0#0000000&|=+0#af5f00255&| +0#0000000&|[| @61
+| +0#0000e05&@5|"|\| |e|l|e|m|e|n|t| |1| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|1+0#e000002&|,+0#0000000&| @64
+| +0#0000e05&@5|"|\| |e|l|e|m|e|n|t| |2| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|2+0#e000002&|,+0#0000000&| @64
+| +0#0000e05&@5|"|\| |e|l|e|m|e|n|t| |3| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|3+0#e000002&| +0#0000000&@65
+@6>\+0#e000e06&|]+0#0000000&| @66
+@57|4|9|,|7| @9|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_new_00.dump b/runtime/syntax/testdir/dumps/vim_new_00.dump
new file mode 100644
index 0000000..2ff76f4
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_new_00.dump
@@ -0,0 +1,20 @@
+>v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&@64
+@75
+|#+0#0000e05&| |V|i|m| |:|n|e|w| |c|o|m@1|a|n|d| |a|n|d| |c|l|a|s@1| |c|o|n|s|t|r|u|c|t|o|r|s|.| +0#0000000&@32
+|c+0#af5f00255&|l|a|s@1| +0#0000000&|T|e|s|t| @64
+@8|d+0#af5f00255&|e|f| +0#0000000&|n|e|w|(+0#e000e06&|)| +0#0000000&@57
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+@8|d+0#af5f00255&|e|f| +0#0000000&|n|e|w|O|t|h|e|r|(+0#e000e06&|)| +0#0000000&@52
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+@8|d+0#af5f00255&|e|f| +0#0000000&|n|e|w|y|e|t|a|n|o|t|h|e|r|(+0#e000e06&|)| +0#0000000&@47
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+|e+0#af5f00255&|n|d|c|l|a|s@1| +0#0000000&@66
+@75
+|T|e|s|t|.+0#af5f00255&|n+0#0000000&|e|w|(+0#e000e06&|)| +0#0000000&@64
+|T|e|s|t|.+0#af5f00255&|n+0#0000000&|e|w|O|t|h|e|r|(+0#e000e06&|)| +0#0000000&@59
+|T|e|s|t|.+0#af5f00255&|n+0#0000000&|e|w|y|e|t|a|n|o|t|h|e|r|(+0#e000e06&|)| +0#0000000&@54
+|n+0#af5f00255&|e|w| +0#0000000&@71
+|q+0#af5f00255&|u|i|t| +0#0000000&@70
+|~+0#4040ff13&| @73
+|~| @73
+| +0#0000000&@56|1|,|1| @10|A|l@1|
diff --git a/runtime/syntax/testdir/dumps/vim_new_99.dump b/runtime/syntax/testdir/dumps/vim_new_99.dump
new file mode 100644
index 0000000..a9fe50f
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_new_99.dump
@@ -0,0 +1,20 @@
+|v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&@64
+@75
+|#+0#0000e05&| |V|i|m| |:|n|e|w| |c|o|m@1|a|n|d| |a|n|d| |c|l|a|s@1| |c|o|n|s|t|r|u|c|t|o|r|s|.| +0#0000000&@32
+|c+0#af5f00255&|l|a|s@1| +0#0000000&|T|e|s|t| @64
+@8|d+0#af5f00255&|e|f| +0#0000000&|n|e|w|(+0#e000e06&|)| +0#0000000&@57
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+@8|d+0#af5f00255&|e|f| +0#0000000&|n|e|w|O|t|h|e|r|(+0#e000e06&|)| +0#0000000&@52
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+@8|d+0#af5f00255&|e|f| +0#0000000&|n|e|w|y|e|t|a|n|o|t|h|e|r|(+0#e000e06&|)| +0#0000000&@47
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+|e+0#af5f00255&|n|d|c|l|a|s@1| +0#0000000&@66
+@75
+|T|e|s|t|.+0#af5f00255&|n+0#0000000&|e|w|(+0#e000e06&|)| +0#0000000&@64
+|T|e|s|t|.+0#af5f00255&|n+0#0000000&|e|w|O|t|h|e|r|(+0#e000e06&|)| +0#0000000&@59
+|T|e|s|t|.+0#af5f00255&|n+0#0000000&|e|w|y|e|t|a|n|o|t|h|e|r|(+0#e000e06&|)| +0#0000000&@54
+|n+0#af5f00255&|e|w| +0#0000000&@71
+>q+0#af5f00255&|u|i|t| +0#0000000&@70
+|~+0#4040ff13&| @73
+|~| @73
+| +0#0000000&@56|1|7|,|1| @9|A|l@1|
diff --git a/runtime/syntax/testdir/dumps/vim_syntax_00.dump b/runtime/syntax/testdir/dumps/vim_syntax_00.dump
index db52967..916f96d 100644
--- a/runtime/syntax/testdir/dumps/vim_syntax_00.dump
+++ b/runtime/syntax/testdir/dumps/vim_syntax_00.dump
@@ -1,20 +1,20 @@
->"+0#0000e05#ffffff0| |V|i|m| |:|s|y|n|t|a|x| |h|i|g|h|l|i|g|h|t|i|n|g| +0#0000000&@48
+>"+0#0000e05#ffffff0| |V|i|m| |:|s|y|n|t|a|x| |c|o|m@1|a|n|d| +0#0000000&@53
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|m+0#00e0003&|a|t|c|h| +0#0000000&|t+0#00e0003&|e|s|t|M|a|t|c|h| +0#0000000&|"+0#e000002&|p|a|t@1|e|r|n|"| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&|"+0#0000e05&| |t|a|i|l| |c|o|m@1|e|n|t| +0#0000000&@20
+|"+0#0000e05&| +0#0000000&|N+0#e000e06&|O|T|E|:| +0#0000e05&|c|o|m@1|e|n|t|s| |n|o|t| |c|u|r@1|e|n|t|l|y| |s|u|p@1|o|r|t|e|d| +0#0000000&@34
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|K|e|y|w|o|r|d| +0#0000000&|k|e|y|w|o|r|d| |c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&|"| |t|a|i|l| |c|o|m@1|e|n|t| @18
+|s+0#af5f00255&|y|n| +0#0000000&|r+0#00e0003&|e|g|i|o|n| +0#0000000&|t+0#00e0003&|e|s|t|R|e|g|i|o|n| +0#0000000&|s+0#00e0003&|t|a|r|t|=|"+0#e000002&|s|t|a|r|t|-|p|a|t@1|e|r|n|"| +0#0000000&|s+0#00e0003&|k|i|p|=|"+0#e000002&|s|k|i|p|-|p|a|t@1|e|r|n|"| +0#0000000&|e+0#00e0003&|n|d|=|"+0#e000002&|e|n|d|-|p|a
+|t@1|e|r|n|"| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&|"| |t|a|i|l| |c|o|m@1|e|n|t| @43
+@75
+|"+0#0000e05&| |M|u|l|t|i|l|i|n|e| |c|o|m@1|a|n|d|s| +0#0000000&@54
@75
|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|K|e|y|w|o|r|d| +0#0000000&@51
+@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@6|"+0#0000e05&|\| |c|o|n|c|e|a|l| |o|p|t|i|o|n| +0#0000000&@51
@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l| +0#0000000&@59
+@6|"+0#0000e05&|\| |c@1|h|a|r| |o|p|t|i|o|n| +0#0000000&@53
@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&@1|h|a|r|=|&+0#e000002&| +0#0000000&@59
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d| |o|p|t|i|o|n| +0#0000000&@49
@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&@57
-@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d|i|n|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|r| @41
-@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=|t+0#0000000&|e|s|t|N|e|x|t|,|@|t|e|s|t|C|l|u|s|t|e|r| @35
-@6|\+0#e000e06&| +0#0000000&|t+0#e000e06&|r|a|n|s|p|a|r|e|n|t| +0#0000000&@55
-@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@57
-@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|e|m|p|t|y| +0#0000000&@57
-@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
-@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|1| @58
-@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|2| @58
-@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|3| @58
-@75
-|s+0#af5f00255&|y|n| +0#0000000&|m+0#00e0003&|a|t|c|h| +0#0000000&|t+0#00e0003&|e|s|t|M|a|t|c|h| +0#0000000&@55
-@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|p|a|t@1|e|r|n|"| +0#0000000&@57
-@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l| +0#0000000&@59
-|"|i|n|p|u|t|/|v|i|m|_|s|y|n|t|a|x|.|v|i|m|"| |7|5|L|,| |1|5|0|2|B| @23|1|,|1| @10|T|o|p|
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d|i|n| |o|p|t|i|o|n| +0#0000000&@47
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_syntax_01.dump b/runtime/syntax/testdir/dumps/vim_syntax_01.dump
index e09801d..800e4a7 100644
--- a/runtime/syntax/testdir/dumps/vim_syntax_01.dump
+++ b/runtime/syntax/testdir/dumps/vim_syntax_01.dump
@@ -1,20 +1,20 @@
-| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|2| @58
-@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|3| @58
-@75
-|s+0#af5f00255&|y|n| +0#0000000&|m+0#00e0003&|a|t|c|h| +0#0000000&|t+0#00e0003&|e|s|t|M|a|t|c|h| +0#0000000&@55
-@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|p|a|t@1|e|r|n|"| +0#0000000&@57
-@6>\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l| +0#0000000&@59
+| +0&#ffffff0@5|"+0#0000e05&|\| |c@1|h|a|r| |o|p|t|i|o|n| +0#0000000&@53
@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&@1|h|a|r|=|&+0#e000002&| +0#0000000&@59
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d| |o|p|t|i|o|n| +0#0000000&@49
@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&@57
-@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d|i|n|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|r| @41
-@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=|t+0#0000000&|e|s|t|N|e|x|t|,|@|t|e|s|t|C|l|u|s|t|e|r| @35
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d|i|n| |o|p|t|i|o|n| +0#0000000&@47
+@6>\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d|i|n|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|r| @41
+@6|"+0#0000e05&|\| |n|e|x|t|g|r|o|u|p| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=|t+0#0000000&|e|s|t|N|e|x|t|0|,|@|t|e|s|t|C|l|u|s|t|e|r| @34
+@6|"+0#0000e05&|\| |t|r|a|n|s|p|a|r|e|n|t| |o|p|t|i|o|n| +0#0000000&@47
@6|\+0#e000e06&| +0#0000000&|t+0#e000e06&|r|a|n|s|p|a|r|e|n|t| +0#0000000&@55
+@6|"+0#0000e05&|\| |s|k|i|p|w|h|i|t|e| |o|p|t|i|o|n| +0#0000000&@49
@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|e|m|p|t|y| |o|p|t|i|o|n| +0#0000000&@49
@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|e|m|p|t|y| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|n|l| |o|p|t|i|o|n| +0#0000000&@52
@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
-@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|s|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|d|1|,|t|e|s|t|C|o|n|t|a|i|n|e|d|2| @28
-@6|\+0#e000e06&| +0#0000000&|f+0#e000e06&|o|l|d| +0#0000000&@62
-@6|\+0#e000e06&| +0#0000000&|d+0#e000e06&|i|s|p|l|a|y| +0#0000000&@59
-@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|t|e|n|d| +0#0000000&@60
-@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|c|l|u|d|e|n|l| +0#0000000&@57
-@57|1|9|,|7| @9|2|3|%|
+@6|"+0#0000e05&|\| |K|E|Y|W|O|R|D|S| |L|I|S|T| +0#0000000&@52
+@6|"+0#0000e05&|\| |k|e|y|w|o|r|d| |1| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|1| @58
+@57|1|9|,|7| @10|8|%|
diff --git a/runtime/syntax/testdir/dumps/vim_syntax_02.dump b/runtime/syntax/testdir/dumps/vim_syntax_02.dump
index 063a33b..1caffc1 100644
--- a/runtime/syntax/testdir/dumps/vim_syntax_02.dump
+++ b/runtime/syntax/testdir/dumps/vim_syntax_02.dump
@@ -1,20 +1,20 @@
-| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|c|l|u|d|e|n|l| +0#0000000&@57
-@6|\+0#e000e06&| +0#0000000&|k+0#e000e06&|e@1|p|e|n|d| +0#0000000&@59
-@75
-|s+0#af5f00255&|y|n| +0#0000000&|r+0#00e0003&|e|g|i|o|n| +0#0000000&|t+0#00e0003&|e|s|t|R|e|g|i|o|n| +0#0000000&@53
-@6|\+0#e000e06&| +0#0000000&|s+0#00e0003&|t|a|r|t|=+0#0000000&|"+0#e000002&|s|t|a|r|t|-|p|a|t@1|e|r|n|"| +0#0000000&@45
-@6>\+0#e000e06&| +0#0000000&|e+0#00e0003&|n|d|=+0#0000000&|"+0#e000002&|e|n|d|-|p|a|t@1|e|r|n|"| +0#0000000&@49
-@6|\+0#e000e06&| +0#0000000&|s+0#00e0003&|k|i|p|=+0#0000000&|"+0#e000002&|s|k|i|p|-|p|a|t@1|e|r|n|"| +0#0000000&@47
-@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&@57
-@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l| +0#0000000&@59
-@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&@1|h|a|r|=|&+0#e000002&| +0#0000000&@59
-@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&@57
-@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d|i|n|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|r| @41
-@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=|t+0#0000000&|e|s|t|N|e|x|t|,|@|t|e|s|t|C|l|u|s|t|e|r| @35
-@6|\+0#e000e06&| +0#0000000&|t+0#e000e06&|r|a|n|s|p|a|r|e|n|t| +0#0000000&@55
-@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@57
-@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|e|m|p|t|y| +0#0000000&@57
-@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
-@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|s|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|d|1|,|t|e|s|t|C|o|n|t|a|i|n|e|d|2| @28
-@6|\+0#e000e06&| +0#0000000&|o+0#e000e06&|n|e|l|i|n|e| +0#0000000&@59
-@57|3|7|,|7| @9|5@1|%|
+| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|1| @58
+@6|"+0#0000e05&|\| |k|e|y|w|o|r|d| |2| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|2| @58
+@6|"+0#0000e05&|\| |k|e|y|w|o|r|d| |3| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|3| @58
+> @74
+|s+0#af5f00255&|y|n| +0#0000000&|m+0#00e0003&|a|t|c|h| +0#0000000&|t+0#00e0003&|e|s|t|M|a|t|c|h| +0#0000000&@55
+@6|"+0#0000e05&|\| |M|A|T|C|H| |P|A|T@1|E|R|N| +0#0000000&@52
+@6|"+0#0000e05&|\| |p|a|t@1|e|r|n| |s|t|a|r|t| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|/+0#e000002&| +0#0000000&@65
+| +0#e000002&@5|"+0#0000e05&|\| |p|a|r|t| |1| |d|e|s|c|r|i|p|t|i|o|n| +0#0000000&@47
+| +0#e000002&@5|\+0#e000e06&|p+0#e000002&|a|t|1|a| |.|*| |p|a|t|1|b| +0#0000000&@53
+| +0#e000002&@5|"+0#0000e05&|\| |p|a|r|t| |2| |d|e|s|c|r|i|p|t|i|o|n| +0#0000000&@47
+| +0#e000002&@5|\+0#e000e06&|p+0#e000002&|a|t|2|a| |.|*| |p|a|t|2|b| +0#0000000&@53
+| +0#e000002&@5|"+0#0000e05&|\| |p|a|r|t| |3| |d|e|s|c|r|i|p|t|i|o|n| +0#0000000&@47
+| +0#e000002&@5|\+0#e000e06&|p+0#e000002&|a|t|3|a| |.|*| |p|a|t|3|b| +0#0000000&@53
+| +0#e000002&@5|"+0#0000e05&|\| |p|a|t@1|e|r|n| |e|n|d| +0#0000000&@54
+| +0#e000002&@5|\+0#e000e06&|/+0#e000002&| +0#0000000&@66
+@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@57|3|7|,|0|-|1| @7|2|1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_syntax_03.dump b/runtime/syntax/testdir/dumps/vim_syntax_03.dump
index b3a23dd..31ab527 100644
--- a/runtime/syntax/testdir/dumps/vim_syntax_03.dump
+++ b/runtime/syntax/testdir/dumps/vim_syntax_03.dump
@@ -1,20 +1,20 @@
-| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|o+0#e000e06&|n|e|l|i|n|e| +0#0000000&@59
-@6|\+0#e000e06&| +0#0000000&|f+0#e000e06&|o|l|d| +0#0000000&@62
-@6|\+0#e000e06&| +0#0000000&|d+0#e000e06&|i|s|p|l|a|y| +0#0000000&@59
-@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|t|e|n|d| +0#0000000&@60
-@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l|e|n|d|s| +0#0000000&@55
-@6>\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|c|l|u|d|e|n|l| +0#0000000&@57
-@6|\+0#e000e06&| +0#0000000&|k+0#e000e06&|e@1|p|e|n|d| +0#0000000&@59
-@75
-|s+0#af5f00255&|y|n| +0#0000000&|c+0#00e0003&|l|u|s|t|e|r| +0#0000000&|t+0#00e0003&|e|s|t|C|l|u|s|t|e|r| +0#0000000&@51
-@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|s|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|d|1|,|t|e|s|t|C|o|n|t|a|i|n|e|d|2|,|t|e|s|t|C|o|n|t|a|i|n|e|d|3| @13
-@75
-|s+0#af5f00255&|y|n| +0#0000000&|c+0#00e0003&|l|u|s|t|e|r| +0#0000000&|t+0#00e0003&|e|s|t|C|l|u|s|t|e|r| +0#0000000&@51
-@6|\+0#e000e06&| +0#0000000&|a+0#e000e06&|d@1|=|t+0#0000000&|e|s|t|A|d@1| @55
-@6|\+0#e000e06&| +0#0000000&|r+0#e000e06&|e|m|o|v|e|=|t+0#0000000&|e|s|t|R|e|m|o|v|e| @49
-@75
-@75
-|"+0#0000e05&| |c|h|e|c|k| |m|u|l|t|i|l|i|n|e| |g|r|o|u|p| |l|i|s|t| +0#0000000&@46
-|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|K|e|y|w|o|r|d| +0#0000000&@51
-@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=| +0#0000000&@56
-@57|5@1|,|7| @9|8|7|%|
+| +0&#ffffff0@5|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@6|"+0#0000e05&|\| |c|o|n|c|e|a|l| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l| +0#0000000&@59
+@6|"+0#0000e05&|\| |c@1|h|a|r| |o|p|t|i|o|n| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&@1|h|a|r|=|&+0#e000002&| +0#0000000&@59
+@6>"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&@57
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d|i|n| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d|i|n|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|r| @41
+@6|"+0#0000e05&|\| |n|e|x|t|g|r|o|u|p| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=|t+0#0000000&|e|s|t|N|e|x|t|0|,|@|t|e|s|t|C|l|u|s|t|e|r| @34
+@6|"+0#0000e05&|\| |t|r|a|n|s|p|a|r|e|n|t| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|t+0#e000e06&|r|a|n|s|p|a|r|e|n|t| +0#0000000&@55
+@6|"+0#0000e05&|\| |s|k|i|p|w|h|i|t|e| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|e|m|p|t|y| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|e|m|p|t|y| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|n|l| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
+@57|5@1|,|7| @9|3@1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_syntax_04.dump b/runtime/syntax/testdir/dumps/vim_syntax_04.dump
new file mode 100644
index 0000000..d5d9f40
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_syntax_04.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|s| |o|p|t|i|o|n| +0#0000000&@50
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|s|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|d|1|,|t|e|s|t|C|o|n|t|a|i|n|e|d|2| @28
+@6|"+0#0000e05&|\| |f|o|l|d| |o|p|t|i|o|n| +0#0000000&@54
+@6|\+0#e000e06&| +0#0000000&|f+0#e000e06&|o|l|d| +0#0000000&@62
+@6>"+0#0000e05&|\| |d|i|s|p|l|a|y| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|d+0#e000e06&|i|s|p|l|a|y| +0#0000000&@59
+@6|"+0#0000e05&|\| |e|x|t|e|n|d| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|t|e|n|d| +0#0000000&@60
+@6|"+0#0000e05&|\| |e|x|c|l|u|d|e|n|l| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|c|l|u|d|e|n|l| +0#0000000&@57
+@6|"+0#0000e05&|\| |k|e@1|p|e|n|d| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|k+0#e000e06&|e@1|p|e|n|d| +0#0000000&@59
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|r+0#00e0003&|e|g|i|o|n| +0#0000000&|t+0#00e0003&|e|s|t|R|e|g|i|o|n| +0#0000000&@53
+@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@6|"+0#0000e05&|\| |s|t|a|r|t| |o|p|t|i|o|n| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|s+0#00e0003&|t|a|r|t|=|"+0#e000002&|s|t|a|r|t|-|p|a|t@1|e|r|n|"| +0#0000000&@45
+@6|"+0#0000e05&|\| |s|k|i|p| |o|p|t|i|o|n| +0#0000000&@54
+@57|7|3|,|7| @9|4|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_syntax_05.dump b/runtime/syntax/testdir/dumps/vim_syntax_05.dump
new file mode 100644
index 0000000..47d60c2
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_syntax_05.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|"+0#0000e05&|\| |s|k|i|p| |o|p|t|i|o|n| +0#0000000&@54
+@6|\+0#e000e06&| +0#0000000&|s+0#00e0003&|k|i|p|=|"+0#e000002&|s|k|i|p|-|p|a|t@1|e|r|n|"| +0#0000000&@47
+@6|"+0#0000e05&|\| |e|n|d| |o|p|t|i|o|n| +0#0000000&@55
+@6|\+0#e000e06&| +0#0000000&|e+0#00e0003&|n|d|=|"+0#e000002&|e|n|d|-|p|a|t@1|e|r|n|"| +0#0000000&@49
+@6|"+0#0000e05&|\| |c|o|n|c|e|a|l| |o|p|t|i|o|n| +0#0000000&@51
+@6>\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l| +0#0000000&@59
+@6|"+0#0000e05&|\| |c@1|h|a|r| |o|p|t|i|o|n| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&@1|h|a|r|=|&+0#e000002&| +0#0000000&@59
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&@57
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d|i|n| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d|i|n|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|r| @41
+@6|"+0#0000e05&|\| |n|e|x|t|g|r|o|u|p| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=|t+0#0000000&|e|s|t|N|e|x|t|0|,|@|t|e|s|t|C|l|u|s|t|e|r| @34
+@6|"+0#0000e05&|\| |t|r|a|n|s|p|a|r|e|n|t| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|t+0#e000e06&|r|a|n|s|p|a|r|e|n|t| +0#0000000&@55
+@6|"+0#0000e05&|\| |s|k|i|p|w|h|i|t|e| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|e|m|p|t|y| |o|p|t|i|o|n| +0#0000000&@49
+@57|9|1|,|7| @9|5|8|%|
diff --git a/runtime/syntax/testdir/dumps/vim_syntax_06.dump b/runtime/syntax/testdir/dumps/vim_syntax_06.dump
new file mode 100644
index 0000000..db1872c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_syntax_06.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|"+0#0000e05&|\| |s|k|i|p|e|m|p|t|y| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|e|m|p|t|y| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|n|l| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|s| |o|p|t|i|o|n| +0#0000000&@50
+@6>\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|s|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|d|1|,|t|e|s|t|C|o|n|t|a|i|n|e|d|2| @28
+@6|"+0#0000e05&|\| |o|n|e|l|i|n|e| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|o+0#e000e06&|n|e|l|i|n|e| +0#0000000&@59
+@6|"+0#0000e05&|\| |f|o|l|d| |o|p|t|i|o|n| +0#0000000&@54
+@6|\+0#e000e06&| +0#0000000&|f+0#e000e06&|o|l|d| +0#0000000&@62
+@6|"+0#0000e05&|\| |d|i|s|p|l|a|y| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|d+0#e000e06&|i|s|p|l|a|y| +0#0000000&@59
+@6|"+0#0000e05&|\| |e|x|t|e|n|d| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|t|e|n|d| +0#0000000&@60
+@6|"+0#0000e05&|\| |c|o|n|c|e|a|l|e|n|d|s| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l|e|n|d|s| +0#0000000&@55
+@6|"+0#0000e05&|\| |e|x|c|l|u|d|e|n|l| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|c|l|u|d|e|n|l| +0#0000000&@57
+@6|"+0#0000e05&|\| |k|e@1|p|e|n|d| |o|p|t|i|o|n| +0#0000000&@51
+@57|1|0|9|,|7| @8|7|1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_syntax_07.dump b/runtime/syntax/testdir/dumps/vim_syntax_07.dump
new file mode 100644
index 0000000..eb36317
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_syntax_07.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|"+0#0000e05&|\| |k|e@1|p|e|n|d| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|k+0#e000e06&|e@1|p|e|n|d| +0#0000000&@59
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|c+0#00e0003&|l|u|s|t|e|r| +0#0000000&|t+0#00e0003&|e|s|t|C|l|u|s|t|e|r| +0#0000000&@51
+@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@6>"+0#0000e05&|\| |c|o|n|t|a|i|n|s| |o|p|t|i|o|n| +0#0000000&@50
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|s|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|d|1|,|t|e|s|t|C|o|n|t|a|i|n|e|d|2|,|t|e|s|t|C|o|n|t|a|i|n|e|d|3| @13
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|c+0#00e0003&|l|u|s|t|e|r| +0#0000000&|t+0#00e0003&|e|s|t|C|l|u|s|t|e|r| +0#0000000&@51
+@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@6|"+0#0000e05&|\| |a|d@1| |o|p|t|i|o|n| +0#0000000&@55
+@6|\+0#e000e06&| +0#0000000&|a+0#e000e06&|d@1|=|t+0#0000000&|e|s|t|A|d@1| @55
+@6|"+0#0000e05&|\| |r|e|m|o|v|e| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|r+0#e000e06&|e|m|o|v|e|=|t+0#0000000&|e|s|t|R|e|m|o|v|e| @49
+@75
+@75
+|"+0#0000e05&| |m|u|l|t|i|l|i|n|e| |g|r|o|u|p| |l|i|s|t| +0#0000000&@52
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|0| +0#0000000&|k|e|y|w|o|r|d| @45
+@57|1|2|7|,|7| @8|8|3|%|
diff --git a/runtime/syntax/testdir/dumps/vim_syntax_08.dump b/runtime/syntax/testdir/dumps/vim_syntax_08.dump
new file mode 100644
index 0000000..3906e55
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_syntax_08.dump
@@ -0,0 +1,20 @@
+|s+0#af5f00255#ffffff0|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|0| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|1| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|2| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|3| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|4| +0#0000000&|k|e|y|w|o|r|d| @45
+>s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|5| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|6| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|7| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|8| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|9| +0#0000000&|k|e|y|w|o|r|d| @45
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|K|e|y|w|o|r|d| +0#0000000&@51
+@6|"+0#0000e05&|\| |n|e|x|t|g|r|o|u|p| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=| +0#0000000&@56
+@6|"+0#0000e05&|\| |a| |c|o|m@1|e|n|t| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|t|e|s|t|N|e|x|t|0| |,| |t|e|s|t|N|e|x|t|1| |,| @43
+@6|"+0#0000e05&|\| |a| |c|o|m@1|e|n|t| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|t|e|s|t|N|e|x|t|[|2|-|8|]|.|*| |,| @49
+@6|"+0#0000e05&|\| |a| |c|o|m@1|e|n|t| +0#0000000&@56
+@57|1|4|5|,|1| @8|9|5|%|
diff --git a/runtime/syntax/testdir/dumps/vim_syntax_99.dump b/runtime/syntax/testdir/dumps/vim_syntax_99.dump
index c50589d..4ca16c6 100644
--- a/runtime/syntax/testdir/dumps/vim_syntax_99.dump
+++ b/runtime/syntax/testdir/dumps/vim_syntax_99.dump
@@ -1,20 +1,20 @@
-| +0&#ffffff0@74
-|s+0#af5f00255&|y|n| +0#0000000&|c+0#00e0003&|l|u|s|t|e|r| +0#0000000&|t+0#00e0003&|e|s|t|C|l|u|s|t|e|r| +0#0000000&@51
-@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|s|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|d|1|,|t|e|s|t|C|o|n|t|a|i|n|e|d|2|,|t|e|s|t|C|o|n|t|a|i|n|e|d|3| @13
+|s+0#af5f00255#ffffff0|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|6| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|7| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|8| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|9| +0#0000000&|k|e|y|w|o|r|d| @45
@75
-|s+0#af5f00255&|y|n| +0#0000000&|c+0#00e0003&|l|u|s|t|e|r| +0#0000000&|t+0#00e0003&|e|s|t|C|l|u|s|t|e|r| +0#0000000&@51
-@6|\+0#e000e06&| +0#0000000&|a+0#e000e06&|d@1|=|t+0#0000000&|e|s|t|A|d@1| @55
-@6|\+0#e000e06&| +0#0000000&|r+0#e000e06&|e|m|o|v|e|=|t+0#0000000&|e|s|t|R|e|m|o|v|e| @49
-@75
-@75
-|"+0#0000e05&| |c|h|e|c|k| |m|u|l|t|i|l|i|n|e| |g|r|o|u|p| |l|i|s|t| +0#0000000&@46
|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|K|e|y|w|o|r|d| +0#0000000&@51
+@6|"+0#0000e05&|\| |n|e|x|t|g|r|o|u|p| |o|p|t|i|o|n| +0#0000000&@49
@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=| +0#0000000&@56
-@6|\+0#e000e06&| +0#0000000&|t|e|s|t|N|e|x|t| |,| @56
-@6|\+0#e000e06&| +0#0000000&|t|e|s|t|N|e|x|t|2| |,| @55
-@6|\+0#e000e06&| +0#0000000&|@|t|e|s|t|C|l|u|s|t|e|r| @54
-@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@57
+@6|"+0#0000e05&|\| |a| |c|o|m@1|e|n|t| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|t|e|s|t|N|e|x|t|0| |,| |t|e|s|t|N|e|x|t|1| |,| @43
+@6|"+0#0000e05&|\| |a| |c|o|m@1|e|n|t| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|t|e|s|t|N|e|x|t|[|2|-|8|]|.|*| |,| @49
+@6|"+0#0000e05&|\| |a| |c|o|m@1|e|n|t| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|t|e|s|t|N|e|x|t|9| |,| |@|t|e|s|t|C|l|u|s|t|e|r| |s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@32
+@6|"+0#0000e05&|\| |K|E|Y|W|O|R|D|S| |L|I|S|T| +0#0000000&@52
@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|4| @58
@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|5| @58
-@6>\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|6| @58
-@57|7|5|,|7| @9|B|o|t|
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|6| @58
+> @74
+@57|1|6|4|,|0|-|1| @6|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_variables_00.dump b/runtime/syntax/testdir/dumps/vim_variables_00.dump
index 9794113..da77064 100644
--- a/runtime/syntax/testdir/dumps/vim_variables_00.dump
+++ b/runtime/syntax/testdir/dumps/vim_variables_00.dump
@@ -17,4 +17,4 @@
|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|/+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59
|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|%+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59
|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|.+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59
-|"|i|n|p|u|t|/|v|i|m|_|v|a|r|i|a|b|l|e|s|.|v|i|m|"| |1|3|8|L|,| |1|5@1|4|B| @19|1|,|1| @10|T|o|p|
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_variables_01.dump b/runtime/syntax/testdir/dumps/vim_variables_01.dump
index f1ce29d..02f6819 100644
--- a/runtime/syntax/testdir/dumps/vim_variables_01.dump
+++ b/runtime/syntax/testdir/dumps/vim_variables_01.dump
@@ -14,7 +14,7 @@
@75
|l+0#af5f00255&|e|t| +0#0000000&|&+0#00e0e07&|f|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|e|x|p|r| @59
@75
-|l+0#af5f00255&|e|t| +0#0000000&|&+0#00e0e07&|t|_|k|1| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|\+0#e000e06&|<|E+0#e000002&|s|c|>|[|2|3|4|;|"| +0#0000000&@49
+|l+0#af5f00255&|e|t| +0#0000000&|&+0#00e0e07&|t|_|k|1| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|\+0#e000e06&|<|E|s|c|>|[+0#e000002&|2|3|4|;|"| +0#0000000&@49
@75
|l+0#af5f00255&|e|t| +0#0000000&|&+0#00e0e07&|f|o@1| +0#0000000&|.+0#af5f00255&|=| +0#0000000&|e|x|p|r| @58
@57|1|9|,|1| @9|1|0|%|
diff --git a/runtime/syntax/testdir/ftplugin/java.vim b/runtime/syntax/testdir/ftplugin/java.vim
new file mode 100644
index 0000000..da198e1
--- /dev/null
+++ b/runtime/syntax/testdir/ftplugin/java.vim
@@ -0,0 +1,5 @@
+" The Java source file uses long lines with tabs
+" so use a smaller tabstop value, so that no
+" soft-wrapping occurs (which may cause the syntax
+" tests to miss some lines during scrolling)
+setl ts=4
diff --git a/runtime/syntax/testdir/input/c.c b/runtime/syntax/testdir/input/c.c
index c96fb33..595721b 100644
--- a/runtime/syntax/testdir/input/c.c
+++ b/runtime/syntax/testdir/input/c.c
@@ -1,4 +1,5 @@
/* vi:set ts=8 sts=4 sw=4 noet:
+ * VIM_TEST_SETUP let g:c_comment_strings = 1
*
* VIM - Vi IMproved by Bram Moolenaar
*
diff --git a/runtime/syntax/testdir/input/java_comments.java b/runtime/syntax/testdir/input/java_comments.java
new file mode 100644
index 0000000..be347d7
--- /dev/null
+++ b/runtime/syntax/testdir/input/java_comments.java
@@ -0,0 +1,25 @@
+// VIM_TEST_SETUP unlet! g:java_ignore_javadoc g:java_no_trail_space_error
+// VIM_TEST_SETUP unlet! g:java_no_tab_space_error
+// VIM_TEST_SETUP let [g:java_space_errors,g:java_comment_strings] = [1,1]
+// VIM_TEST_SETUP setlocal spell
+class CommentsTests
+{ /* TRAILING BLANKS AND MESSPILLINGS ARE SIGNIFICANT! */
+ /**
+ * The method {@code main} must be declared {@code public}, {@code
+ * static}, and {@code void}. It must specify a formal parameter
+ * whose declared type is array of {@link String}. Therefore,
+ * either of the following declarations is acceptable:
+ * {@snippet lang="java":
+ * // @highlight substring="main" type="italic":
+ * public static void main(String[] args) { }
+ * }<br /><pre class="snippet">
+ *{@code public static void main(String... args) { }}</pre>
+ *
+ * @param args optional commande-line arguments
+ * @jls 12.1.4 Invoke {@code Test.main}
+ */
+ // @start region = main
+ // @link substring = 'String' target = 'java.lang.String' :
+ public static void main(String[] args) { }
+ // @end
+}
diff --git a/runtime/syntax/testdir/input/java_escapes.java b/runtime/syntax/testdir/input/java_escapes.java
new file mode 100644
index 0000000..eadaa42
--- /dev/null
+++ b/runtime/syntax/testdir/input/java_escapes.java
@@ -0,0 +1,123 @@
+class EscapesTests
+{ // javap -constants EscapesTests.class
+ // static final String hello = "hello";
+ \u0073\u0074\u0061\u0074\u0069\u0063
+ \u0066\u0069\u006e\u0061\u006c
+ \u0053\u0074\u0072\u0069\u006e\u0067
+ \u0068\u0065\u006c\u006c\u006f
+ \u003d
+ \u0022\u0068\u0065\u006c\u006c\u006f\u0022
+ \u003b
+
+ static {
+ char ee[] = {
+ '\b', '\s', '\t',
+ '\n', '\f', '\r',
+ '\"', '\'', '\\',
+ };
+
+ System.out.println(new String[] {
+ "\b", "\s", "\t",
+ "\n", "\f", "\r",
+ "\"", "\'", "\\",
+ });
+
+ char oo[] = {
+ '\0', '\1', '\2', '\3', '\4', '\5', '\6', '\7',
+
+ '\00', '\01', '\02', '\03', '\04', '\05', '\06', '\07',
+
+ '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+
+ '\10', '\11', '\12', '\13', '\14', '\15', '\16', '\17',
+ '\20', '\21', '\22', '\23', '\24', '\25', '\26', '\27',
+ '\30', '\31', '\32', '\33', '\34', '\35', '\36', '\37',
+ '\40', '\41', '\42', '\43', '\44', '\45', '\46', '\47',
+ '\50', '\51', '\52', '\53', '\54', '\55', '\56', '\57',
+ '\60', '\61', '\62', '\63', '\64', '\65', '\66', '\67',
+ '\70', '\71', '\72', '\73', '\74', '\75', '\76', '\77',
+
+ '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+ '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+ '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+ '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+ '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+ '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+ '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+
+ '\100', '\101', '\102', '\103', '\104', '\105', '\106', '\107',
+ '\110', '\111', '\112', '\113', '\114', '\115', '\116', '\117',
+ '\120', '\121', '\122', '\123', '\124', '\125', '\126', '\127',
+ '\130', '\131', '\132', '\133', '\134', '\135', '\136', '\137',
+ '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+ '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+ '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+ '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+ '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+ '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+ '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+ '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+ '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
+ '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
+ '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
+ '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
+ '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
+ '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
+ '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
+ '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
+ '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+ '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+ '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+ '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
+ };
+
+ System.out.println(new String[] {
+ "\0", "\1", "\2", "\3", "\4", "\5", "\6", "\7",
+
+ "\00", "\01", "\02", "\03", "\04", "\05", "\06", "\07",
+
+ "\000", "\001", "\002", "\003", "\004", "\005", "\006", "\007",
+
+ "\10", "\11", "\12", "\13", "\14", "\15", "\16", "\17",
+ "\20", "\21", "\22", "\23", "\24", "\25", "\26", "\27",
+ "\30", "\31", "\32", "\33", "\34", "\35", "\36", "\37",
+ "\40", "\41", "\42", "\43", "\44", "\45", "\46", "\47",
+ "\50", "\51", "\52", "\53", "\54", "\55", "\56", "\57",
+ "\60", "\61", "\62", "\63", "\64", "\65", "\66", "\67",
+ "\70", "\71", "\72", "\73", "\74", "\75", "\76", "\77",
+
+ "\010", "\011", "\012", "\013", "\014", "\015", "\016", "\017",
+ "\020", "\021", "\022", "\023", "\024", "\025", "\026", "\027",
+ "\030", "\031", "\032", "\033", "\034", "\035", "\036", "\037",
+ "\040", "\041", "\042", "\043", "\044", "\045", "\046", "\047",
+ "\050", "\051", "\052", "\053", "\054", "\055", "\056", "\057",
+ "\060", "\061", "\062", "\063", "\064", "\065", "\066", "\067",
+ "\070", "\071", "\072", "\073", "\074", "\075", "\076", "\077",
+
+ "\100", "\101", "\102", "\103", "\104", "\105", "\106", "\107",
+ "\110", "\111", "\112", "\113", "\114", "\115", "\116", "\117",
+ "\120", "\121", "\122", "\123", "\124", "\125", "\126", "\127",
+ "\130", "\131", "\132", "\133", "\134", "\135", "\136", "\137",
+ "\140", "\141", "\142", "\143", "\144", "\145", "\146", "\147",
+ "\150", "\151", "\152", "\153", "\154", "\155", "\156", "\157",
+ "\160", "\161", "\162", "\163", "\164", "\165", "\166", "\167",
+ "\170", "\171", "\172", "\173", "\174", "\175", "\176", "\177",
+ "\200", "\201", "\202", "\203", "\204", "\205", "\206", "\207",
+ "\210", "\211", "\212", "\213", "\214", "\215", "\216", "\217",
+ "\220", "\221", "\222", "\223", "\224", "\225", "\226", "\227",
+ "\230", "\231", "\232", "\233", "\234", "\235", "\236", "\237",
+ "\240", "\241", "\242", "\243", "\244", "\245", "\246", "\247",
+ "\250", "\251", "\252", "\253", "\254", "\255", "\256", "\257",
+ "\260", "\261", "\262", "\263", "\264", "\265", "\266", "\267",
+ "\270", "\271", "\272", "\273", "\274", "\275", "\276", "\277",
+ "\300", "\301", "\302", "\303", "\304", "\305", "\306", "\307",
+ "\310", "\311", "\312", "\313", "\314", "\315", "\316", "\317",
+ "\320", "\321", "\322", "\323", "\324", "\325", "\326", "\327",
+ "\330", "\331", "\332", "\333", "\334", "\335", "\336", "\337",
+ "\340", "\341", "\342", "\343", "\344", "\345", "\346", "\347",
+ "\350", "\351", "\352", "\353", "\354", "\355", "\356", "\357",
+ "\360", "\361", "\362", "\363", "\364", "\365", "\366", "\367",
+ "\370", "\371", "\372", "\373", "\374", "\375", "\376", "\377",
+ });
+ }
+}
diff --git a/runtime/syntax/testdir/input/java_numbers.java b/runtime/syntax/testdir/input/java_numbers.java
new file mode 100644
index 0000000..e926534
--- /dev/null
+++ b/runtime/syntax/testdir/input/java_numbers.java
@@ -0,0 +1,88 @@
+class NumbersTests
+{
+ static {
+ double[] dd = {
+ 0x.0p0, 0x0.p0, 0x0.0p0, 0x0P0,
+ 0x.0p0d, 0x0.p0d, 0x0.0p0d, 0x0P0D,
+ 0x.0p0f, 0x0.p0f, 0x0.0p0f, 0x0P0F,
+ 0x.0p0, 0x0.p0, 0x0.0p0, 0x0P0,
+ 0x.0p0d, 0x0.p0d, 0x0.0p0d, 0x0P0D,
+ 0x.0p0f, 0x0.p0f, 0x0.0p0f, 0x0P0F,
+ 0x.0p-0, 0x0.p-0, 0x0.0p-0, 0x0P-0,
+ 0x.0p-0d, 0x0.p-0d, 0x0.0p-0d, 0x0P-0D,
+ 0x.0p-0f, 0x0.p-0f, 0x0.0p-0f, 0x0P-0F,
+ 0x.0p+0, 0x0.p+0, 0x0.0p+0, 0x0P+0,
+ 0x.0p+0d, 0x0.p+0d, 0x0.0p+0d, 0x0P+0D,
+ 0x.0p+0f, 0x0.p+0f, 0x0.0p+0f, 0x0P+0F,
+
+ 1., 1.2, 1.2e3, 1.2e3d, 1.2e3f,
+ 1.2e-3, 1.2e-3d, 1.2E-3F,
+ 1.2e+3, 1.2E+3D, 1.2e+3f,
+ .2, .2e3, .2e3d, .2e3f,
+ .2e-3, .2e-3d, .2E-3F,
+ .2e+3, .2E+3D, .2e+3f,
+ 1e3, 1e3d, 1e3f,
+ 1e-3, 1e-3d, 1E-3F,
+ 1e+3, 1E+3D, 1e+3f,
+ 1d, 1D, 1f, 1F,
+
+//// MALFORMED: :let g:java_comment_strings = 1 | doautocmd Syntax
+// 0_x.0p0, 0x._0p0, 0x.0_p0, 0x.0p_0, 0x.0p0_,
+// 0x0_.0p0, 0x_0.0p0, 0xp0,
+ };
+
+ int O = 0;
+ int OO = 00;
+ int OxO = 0x0;
+
+ int x = 0x12_345_678;
+ int y = 0b01_01_01_01_01;
+ int z = 0__1__2__3__4__5__6__7;
+
+ // String.format("%a", -1.0)
+ double minus_one_d = -0x1.0p0;
+
+ double z_d = -0x.0p0;
+ double y_d = 0xap1__0__0;
+ double x_d = .0__1__2__3__4__5__6__7__8__9;
+ double dot_O = .0;
+
+ // JLS, §3.10.2:
+ float max_dec_f = 3.4028235e38f;
+ float max_hex_f = 0x1.fffffeP+127f;
+ float min_dec_f = 1.4e-45f;
+ float min_hex_f_a = 0x0.000002P-126f;
+ float min_hex_f_b = 0x1.0P-149f;
+
+ double max_dec_d = 1.7976931348623157e3__0__8;
+ double max_hex_d = 0x1.f_ffff_ffff_ffffP+1023;
+ double min_dec_d = 4.9e-3__2__4;
+ double min_hex_d_a = 0x0.0_0000_0000_0001P-1022;
+ double min_hex_d_b = 0x1.0P-1074;
+
+ // JLS, §3.10.1:
+ int max_hex = 0x7fff_ffff;
+ int max_oct = 0177_7777_7777;
+ int max_bin = 0b0111_1111_1111_1111_1111_1111_1111_1111;
+
+ int min_hex = 0x8000_0000;
+ int min_oct = 0200_0000_0000;
+ int min_bin = 0b1000_0000_0000_0000_0000_0000_0000_0000;
+
+ int minus_one_hex = 0xffff_ffff;
+ int minus_one_oct = 0377_7777_7777;
+ int minus_one_bin = 0b1111_1111_1111_1111_1111_1111_1111_1111;
+
+ long max_hex_l = 0x7fff_ffff_ffff_ffffL;
+ long max_oct_l = 07_7777_7777_7777_7777_7777L;
+ long max_bin_l = 0b0111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111L;
+
+ long min_hex_l = 0x8000_0000_0000_0000L;
+ long min_oct_l = 010_0000_0000_0000_0000_0000L;
+ long min_bin_l = 0b1000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000L;
+
+ long minus_one_hex_l = 0xffff_ffff_ffff_ffffL;
+ long minus_one_oct_l = 017_7777_7777_7777_7777_7777L;
+ long minus_one_bin_l = 0b1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111L;
+ }
+}
diff --git a/runtime/syntax/testdir/input/java_string.java b/runtime/syntax/testdir/input/java_string.java
new file mode 100644
index 0000000..43a7a05
--- /dev/null
+++ b/runtime/syntax/testdir/input/java_string.java
@@ -0,0 +1,104 @@
+class StringTests // JDK 21+ (--enable-preview --release 21).
+{
+ static {
+ String s1 = "A quick brown fox jumps over the lazy dog";
+ String s2 = "\"Woof\s!\"";
+ String s3 = """
+ A\s\
+ quick \
+ brown\s\
+ fox \
+ jumps\s\
+ over \
+ the\s\
+ lazy \
+ dog""";
+ String s4 = """
+ "Woof\s!\"""";
+ String s5 = """
+ String s3 = \"""
+ A\\s\\
+ quick \\
+ brown\\s\\
+ fox \\
+ jumps\\s\\
+ over \\
+ the\\s\\
+ lazy \\
+ dog\""";""";
+
+ // There are SPACE, FF, HT, CR, and LF after """.
+ String empty = """
+ """;
+
+ System.out.println("""
+ "
+ ""
+ ""\u005c"
+ ""\u005c""
+ ""\"\u0022\u0022
+ ""\"""\u005c\u0022
+ ""\"""\""
+ ""\"""\""\"""");
+
+ System.out.println(STR."""
+ "
+ \{"\"\""}
+ \{"\"\""}\{"\u005c\u0022"}
+ \{"\"\""}\{"\u005c\u0022"}"
+ \{"\"\""}\"\{"\u005c\u0022\u005c\u0022"}
+ \{"\"\""}\"\{"\"\""}\{"\u005c\u0022"}
+ \{"\"\""}\"\{"\"\""}\""
+ \{"\"\""}\"\{"\"\""}\""\""""); // JDK 21+.
+
+ String woof = "Woof", dog = "dog", fox = "fox";
+
+ String s6 = STR
+ ."A quick brown \{fox} jumps over the lazy \{dog}";
+ String s7 = STR.process(StringTemplate.RAW
+ ."\"\{woof}\s!\"");
+ String s8 = STR."""
+ A\s\
+ quick \
+ brown\s\
+ \{fox} \
+ jumps\s\
+ over \
+ the\s\
+ lazy \
+ \{dog}""";
+ String s9 = STR.process(StringTemplate.RAW
+ .
+ """
+ "\{woof}\s!\"""");
+ String s10 = java.util.FormatProcessor.FMT
+ . "%-14s\{"A\s" + STR . "quick" + "brown"}%s\{fox} "
+ + java.util.FormatProcessor.FMT
+ . "%-20s\{"jumps\sover the\s"
+ + STR . "lazy"}%s\{dog}";
+ String s11 = STR."""
+ \"\{ // A nested comment.
+ (new java.util.function.Function<String, String>() {
+ public String apply(String bay) { return bay; };
+ }).apply(woof)
+ }\s!\"""";
+ String s12 = java.util.FormatProcessor.FMT
+ ."""
+ %-14s\{STR."""
+ A\s\
+ \{ "quick" } \
+ brown"""}\
+ %s\{ fox } \
+ %-20s\{STR."""
+ jumps\s\
+ over \
+ the\s\
+ \{ "lazy" } """}\
+ %s\{ dog }""";
+ String s13 = STR
+ ."\"\{ /* A nested comment. */
+ ((java.util.function.Function<String, String>) bay -> bay)
+ .apply(woof)
+ }\s!\"";
+ }
+}
diff --git a/runtime/syntax/testdir/input/java_switch.java b/runtime/syntax/testdir/input/java_switch.java
new file mode 100644
index 0000000..14b2e11
--- /dev/null
+++ b/runtime/syntax/testdir/input/java_switch.java
@@ -0,0 +1,122 @@
+class SwitchTests // JDK 21+.
+{
+ static void echo(Object o) { System.out.println(o); }
+
+ static {
+ interface Yieldable<T>
+ {
+ T yield();
+ default Yieldable<T> default_() { return this; }
+ default Yieldable<T> when() { return this; }
+ }
+
+ // There are 80 bytes (\@80<!) between "::" and "yield;".
+ Yieldable<?> y = ((Yieldable<?>) () -> 0)::
+ yield;
+ ((Yieldable<?>) () -> 0).when().default_().yield();
+
+ enum Letters { OTHER, ALPHA, BETA }
+
+ Letters when = Letters.OTHER;
+
+ switch (when) {
+ case ALPHA: { echo(Letters.ALPHA); break; }
+ case BETA: { echo(Letters.BETA); break; }
+ default: { echo(Letters.OTHER); }
+ }
+
+ echo(switch (when) {
+ case ALPHA -> Letters.ALPHA;
+ case BETA -> Letters.BETA;
+ default -> { yield(Letters.OTHER); }
+ });
+
+ String yield = null;
+
+ switch (yield) {
+ case "A": case "B": { echo("A or B"); break; }
+ case ":": { echo("Colon"); break; }
+ case String str when !str.equals(""):
+ { echo("<non-empty>"); break; }
+ case null: default: { echo("Other"); }
+ }
+
+ echo(switch (yield) {
+ case "A", "B" -> { yield("A or B"); }
+ case "->" -> "Arrow";
+ case String str when !str.equals("")
+ -> "<non-empty>";
+ case null, default -> "Other";
+ });
+
+ Object o = new Object();
+
+ switch (o) {
+ case null: { echo("null"); break; }
+ case Letters[] ll: { echo("SwitchTests$1Letters[]"); break; }
+ default: { echo("java.lang.Object"); break; }
+ };
+
+ echo(switch (o) {
+ case null -> "null";
+ case Letters[] ll -> "SwitchTests$1Letters[]";
+ default -> "java.lang.Object";
+ });
+
+ char ch = 'c';
+
+ switch (ch) {
+ case 'a': { echo('a'); break; }
+ case 'b': { echo('b'); break; }
+ default: { echo('\u0000'); break; }
+ };
+
+ echo(switch (ch) {
+ case 'a' -> 'a';
+ case 'b' -> 'b';
+ default -> '\u0000';
+ });
+
+ byte b = (byte) 2;
+
+ switch (b) {
+ case ((byte) 0): { echo((byte) 0); break; }
+ case ((byte) 1): { echo((byte) 1); break; }
+ default: { echo((byte) -1); break; }
+ };
+
+ echo(switch (b) {
+ case ((byte) 0) -> (byte) 0;
+ case ((byte) 1) -> (byte) 1;
+ default -> (byte) -1;
+ });
+
+ short sh = (short) 2;
+
+ switch (sh) {
+ case ((short) 0): { echo((short) 0); break; }
+ case ((short) 1): { echo((short) 1); break; }
+ default: { echo((short) -1); break; }
+ };
+
+ echo(switch (sh) {
+ case ((short) 0) -> (short) 0;
+ case ((short) 1) -> (short) 1;
+ default -> (short) -1;
+ });
+
+ int i = 2;
+
+ switch (i) {
+ case 0b0__00___000: { echo(0); break; }
+ case 0x000___00__1: { echo(1); break; }
+ default: { echo(-1); break; }
+ };
+
+ echo(switch (i) {
+ case 0_0_0_0_0 -> 0;
+ case 1 -> 1;
+ default -> -1;
+ });
+ }
+}
diff --git a/runtime/syntax/testdir/input/markdown_conceal.markdown b/runtime/syntax/testdir/input/markdown_conceal.markdown
new file mode 100644
index 0000000..8049d68
--- /dev/null
+++ b/runtime/syntax/testdir/input/markdown_conceal.markdown
@@ -0,0 +1,15 @@
+_Italic_, *Italic*. __Bold__, **Bold**.
+___Bold Italic___, ***Bold Italic***.
+~~Strikethrough~~, S̶t̶r̶i̶k̶e̶t̶h̶r̶o̶u̶g̶h̶.
+
+~~~html
+<p>
+<del>Strikethrough</del>, <s>Strikethrough</s>.<br />
+~~~
+
+```html
+<strong><em>Bold Italic</em></strong>.
+<strong><em>Bold Italic</em></strong>.<br />
+<strong>Bold</strong>, <strong>Bold</strong>.
+<em>Italic</em>, <em>Italic</em>.
+```
diff --git a/runtime/syntax/testdir/input/setup/markdown_conceal.vim b/runtime/syntax/testdir/input/setup/markdown_conceal.vim
new file mode 100644
index 0000000..a1585b1
--- /dev/null
+++ b/runtime/syntax/testdir/input/setup/markdown_conceal.vim
@@ -0,0 +1,8 @@
+if has('conceal')
+ let g:markdown_syntax_conceal = 1
+ setlocal conceallevel=3 concealcursor=n
+endif
+
+let g:markdown_fenced_languages = ['html']
+highlight link markdownBold Todo
+highlight link htmlBold Todo
diff --git a/runtime/syntax/testdir/input/sh_10.sh b/runtime/syntax/testdir/input/sh_10.sh
new file mode 100644
index 0000000..be463c3
--- /dev/null
+++ b/runtime/syntax/testdir/input/sh_10.sh
@@ -0,0 +1,49 @@
+#!/bin/ksh
+
+# This script is a test file for ksh93 shared-state
+# command substitutions (subshares) and mksh value
+# substitutions (valsubs).
+
+# ======
+# Below is subshare syntax supported by both ksh93 and mksh.
+print ${ echo one }
+print ${ echo two
+}
+print ${
+echo three }
+print ${ echo 'four'; }
+print ${ echo 'five' ;}
+print ${ echo 'six'
+}
+print ${ echo 'seven' }
+echo ${ print 'eight' }
+typeset nine=${ pwd; }
+
+# ======
+# Value substitutions of the form ${|command} are only
+# supported by mksh, not ksh93.
+if ! command eval '((.sh.version >= 20070703))' 2>/dev/null; then
+ valsubfunc() {
+ REPLY=$1
+ }
+ echo ${|valsubfunc ten}
+ print "${|valsubfunc eleven;}"
+ printf '%s' "${|valsubfunc twelve }"
+ unlucky=${|valsubfunc thirteen
+}
+ typeset notafloat=${|valsubfunc notanumber }
+ print $unlucky $notanumber
+ ${|echo foo}
+ ${|echo bar
+}
+fi
+
+# ======
+# Shared-state command substitutions using the syntax ${<file;}
+# are only supported by ksh93, not mksh.
+echo ${
+ printf %s str
+} > /tmp/strfile
+echo ${</tmp/strfile;}
+
+exit 0
diff --git a/runtime/syntax/testdir/input/sh_11.sh b/runtime/syntax/testdir/input/sh_11.sh
new file mode 100644
index 0000000..6e192fc
--- /dev/null
+++ b/runtime/syntax/testdir/input/sh_11.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# Issue #962
+
+arr=(
+ 1 2 3 4
+) # ok
+
+if true; then
+
+ arr=(1 2 3 4) # ok
+
+ arr=( 1 2 3 4 ) # ok
+
+ arr=(
+ 1 2 3 4
+ ) # paren error!
+
+fi
+
diff --git a/runtime/syntax/testdir/input/vim_ex_abbreviate.vim b/runtime/syntax/testdir/input/vim_ex_abbreviate.vim
new file mode 100644
index 0000000..7360e38
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_abbreviate.vim
@@ -0,0 +1,25 @@
+" Vim :abbreviate commands
+
+abbrev <buffer> foo foobar
+cabbrev <buffer> cfoo cfoobar
+iabbrev <buffer> ifoo cfoobar
+
+abbrev <expr> <buffer> foo foobar
+cabbrev <expr> <buffer> cfoo cfoobar
+iabbrev <expr> <buffer> ifoo cfoobar
+
+noreabbrev <buffer> foo foobar
+cnoreabbrev <buffer> cfoo cfoobar
+inoreabbrev <buffer> ifoo cfoobar
+
+abbrev <expr> <buffer> foo foobar
+cabbrev <expr> <buffer> cfoo cfoobar
+iabbrev <expr> <buffer> ifoo cfoobar
+
+unabbrev <buffer> foo
+cunabbrev <buffer> cfoo
+iunabbrev <buffer> ifoo
+
+abclear <buffer>
+cabclear <buffer>
+iabclear <buffer>
diff --git a/runtime/syntax/testdir/input/vim_ex_augroup.vim b/runtime/syntax/testdir/input/vim_ex_augroup.vim
new file mode 100644
index 0000000..2dae59d
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_augroup.vim
@@ -0,0 +1,19 @@
+" Vim :augroup command
+
+augroup foo
+ autocmd BufRead * echomsg "Foo"
+augroup END
+
+augroup foo | autocmd! | augroup END
+augroup! foo
+
+augroup !@#$%^&*()_+
+ autocmd BufRead * echomsg "Foo"
+augroup END
+
+augroup !@#$%^&*()_+ | autocmd! | augroup END
+augroup! !@#$%^&*()_+
+
+" list groups
+augroup
+
diff --git a/runtime/syntax/testdir/input/vim_ex_behave.vim b/runtime/syntax/testdir/input/vim_ex_behave.vim
new file mode 100644
index 0000000..a1e99f0
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_behave.vim
@@ -0,0 +1,7 @@
+" Vim behave command
+
+behave mswin
+behave xterm
+
+behave! mswin
+behave! xterm
diff --git a/runtime/syntax/testdir/input/vim_ex_command.vim b/runtime/syntax/testdir/input/vim_ex_command.vim
new file mode 100644
index 0000000..9e98296
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_command.vim
@@ -0,0 +1,5 @@
+" Vim :command command
+
+" Issue #14135
+
+com Foo call system('ls')
diff --git a/runtime/syntax/testdir/input/vim_ex_commands.vim b/runtime/syntax/testdir/input/vim_ex_commands.vim
index 6826967..571fd7b 100644
--- a/runtime/syntax/testdir/input/vim_ex_commands.vim
+++ b/runtime/syntax/testdir/input/vim_ex_commands.vim
@@ -13,6 +13,8 @@
: help
: help
+:2match
+:3match
:append
text
.
@@ -603,6 +605,8 @@ call Foo() | help
call Foo() |help
call Foo()| help
+call Foo() | 2match
+call Foo() | 3match
" FIXME
call Foo() | append
text
diff --git a/runtime/syntax/testdir/input/vim_ex_def.vim b/runtime/syntax/testdir/input/vim_ex_def.vim
new file mode 100644
index 0000000..dd4ecd1
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_def.vim
@@ -0,0 +1,125 @@
+" Vim :def command
+
+
+" list
+
+def
+def Foo
+def /Foo.*
+
+def | echo "Foo"
+def " comment
+def Foo | echo "Foo"
+def Foo " comment
+
+
+" definition
+
+" empty definition
+def Foo()
+enddef
+
+# curly-brace names
+def {"F"}oo()
+enddef
+
+def F{"o"}o()
+enddef
+
+def Fo{"o"}()
+enddef
+
+def {"F"}o{"o"}()
+enddef
+
+def {"F"}{"o"}{"o"}()
+enddef
+
+def Foo(): number
+ return 42
+enddef
+
+# trailing whitespace
+def Foo(): number
+ return 42
+enddef
+
+def Foo() # comment
+enddef
+
+def Foo(): number # comment
+ return 42
+enddef
+
+def! Foo(): number
+ return 42
+enddef
+
+def g:Foo(): number
+ return 42
+enddef
+
+def s:Foo(): number
+ return 42
+enddef
+
+def <SID>Foo(): number
+ return 42
+enddef
+
+def foo#bar#Foo(): number
+ return 42
+enddef
+
+" same name as an Ex command
+def s:ls()
+enddef
+
+
+" return types
+
+def Foo(): void
+enddef
+
+def Foo(): void # comment
+enddef
+
+def Foo(): list<dict<number>>
+enddef
+
+def Foo(): func(dict<list<number>>, func, bool, func(number, list<number>)): bool
+enddef
+
+
+" :enddef trailing
+
+def Foo()
+ # trailing whitespace
+enddef
+
+def Foo()
+enddef | echo "Foo"
+
+def Foo()
+enddef " comment
+
+
+" parameters
+
+def Foo(x: bool, y = 42, z: string = "zed")
+enddef
+
+def Foo(
+ x: bool,
+ y = 42,
+ z: string = "zed")
+enddef
+
+
+" comments
+
+def Foo()
+ # Vim9-script comment
+ "useless string"
+enddef
+
diff --git a/runtime/syntax/testdir/input/vim_ex_def_fold.vim b/runtime/syntax/testdir/input/vim_ex_def_fold.vim
new file mode 100644
index 0000000..7ab3e3f
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_def_fold.vim
@@ -0,0 +1,126 @@
+" Vim :def command
+" VIM_TEST_SETUP let g:vimsyn_folding = "f" | set fdm=syntax
+
+
+" list
+
+def
+def Foo
+def /Foo.*
+
+def | echo "Foo"
+def " comment
+def Foo | echo "Foo"
+def Foo " comment
+
+
+" definition
+
+" empty definition
+def Foo()
+enddef
+
+# curly-brace names
+def {"F"}oo()
+enddef
+
+def F{"o"}o()
+enddef
+
+def Fo{"o"}()
+enddef
+
+def {"F"}o{"o"}()
+enddef
+
+def {"F"}{"o"}{"o"}()
+enddef
+
+def Foo(): number
+ return 42
+enddef
+
+# trailing whitespace
+def Foo(): number
+ return 42
+enddef
+
+def Foo() # comment
+enddef
+
+def Foo(): number # comment
+ return 42
+enddef
+
+def! Foo(): number
+ return 42
+enddef
+
+def g:Foo(): number
+ return 42
+enddef
+
+def s:Foo(): number
+ return 42
+enddef
+
+def <SID>Foo(): number
+ return 42
+enddef
+
+def foo#bar#Foo(): number
+ return 42
+enddef
+
+" same name as an Ex command
+def s:ls()
+enddef
+
+
+" return types
+
+def Foo(): void
+enddef
+
+def Foo(): void # comment
+enddef
+
+def Foo(): list<dict<number>>
+enddef
+
+def Foo(): func(dict<list<number>>, func, bool, func(number, list<number>)): bool
+enddef
+
+
+" :enddef trailing
+
+def Foo()
+ # trailing whitespace
+enddef
+
+def Foo()
+enddef | echo "Foo"
+
+def Foo()
+enddef " comment
+
+
+" parameters
+
+def Foo(x: bool, y = 42, z: string = "zed")
+enddef
+
+def Foo(
+ x: bool,
+ y = 42,
+ z: string = "zed")
+enddef
+
+
+" comments
+
+def Foo()
+ # Vim9-script comment
+ "useless string"
+enddef
+
diff --git a/runtime/syntax/testdir/input/vim_ex_echo.vim b/runtime/syntax/testdir/input/vim_ex_echo.vim
new file mode 100644
index 0000000..df2bf5c
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_echo.vim
@@ -0,0 +1,38 @@
+" Vim :echo commands
+
+echo "Answer = " 42
+echon "Answer = " 42
+echomsg "Answer = " 42
+echowindow "Answer = " 42
+echoerr "Answer = " 42
+echoconsole "Answer = " 42
+
+echo "following command is :|" | |
+
+echohl WarningMsg | echo "Don't panic!" | echohl None
+
+echo "Answer = "
+ "\ comment
+ \ 42
+
+echo
+ \ "Answer = "
+ "\ comment
+ \ 42
+
+" :echo without {expr}
+echo| echo "Foo"
+
+" trailing comment needs |
+echo "foo" | " comment
+
+
+" Issue #9987 (parenthesised argument - not a function call)
+
+let foo = {'end': 123}
+
+if 123
+ echo (foo.end)
+else
+ echo 'bar'
+endif
diff --git a/runtime/syntax/testdir/input/vim_ex_execute.vim b/runtime/syntax/testdir/input/vim_ex_execute.vim
new file mode 100644
index 0000000..2ec507e
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_execute.vim
@@ -0,0 +1,41 @@
+" Vim :execute command
+
+" :help :execute
+
+execute "buffer" nextbuf
+execute "normal" count .. "w"
+execute '!ls' | echo "theend"
+execute "normal ixxx\<Esc>"
+execute "e " .. fnameescape(filename)
+execute "!ls " .. shellescape(filename, 1)
+if 0
+ execute 'while i > 5'
+ echo "test"
+ endwhile
+endif
+execute 'while i < 5 | echo i | let i = i + 1 | endwhile'
+
+" following command is :|"
+execute "call Foo()" | |
+
+execute "call"
+ "\ comment
+ \ "Foo()"
+
+execute
+ \ "call"
+ "\ comment
+ \ "Foo()"
+
+" :execute without {expr}
+execute| echo "Foo"
+
+" trailing comment needs |
+execute "foo" | " comment
+
+
+" Issue #9987 (parenthesised argument - not a function call)
+
+" FIXME: execute is ex command not builtin function
+let foo = {'arg': "call Foo()"}
+execute (foo.arg)
diff --git a/runtime/syntax/testdir/input/vim_ex_function.vim b/runtime/syntax/testdir/input/vim_ex_function.vim
new file mode 100644
index 0000000..38213b4
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_function.vim
@@ -0,0 +1,182 @@
+" Vim :function command
+
+
+" list
+
+function
+function Foo
+function /Foo.*
+
+function | echo "Foo"
+function " comment
+function Foo | echo "Foo"
+function Foo " comment
+
+
+" definition
+
+" empty definition
+function Foo()
+endfunction
+
+" curly-brace names
+function {"F"}oo()
+endfunction
+
+function F{"o"}o()
+endfunction
+
+function Fo{"o"}()
+endfunction
+
+function {"F"}o{"o"}()
+endfunction
+
+function {"F"}{"o"}{"o"}()
+endfunction
+
+function Foo()
+ return 42
+endfunction
+
+" trailing whitespace
+function Foo()
+ return 42
+endfunction
+
+function Foo() " comment
+ return 42
+endfunction
+
+function! Foo()
+ return 42
+endfunction
+
+function g:Foo()
+ return 42
+endfunction
+
+function s:Foo()
+ return 42
+endfunction
+
+function <SID>Foo()
+ return 42
+endfunction
+
+function foo#bar#Foo()
+ return 42
+endfunction
+
+" same name as an Ex command
+function s:ls()
+endfunction
+
+
+" modifiers
+
+function Foo() range
+endfunction
+
+function Foo() range " comment
+endfunction
+
+function Foo() range
+ return 42
+endfunction
+
+function Foo() abort
+ return 42
+endfunction
+
+function Foo() dict
+ return 42
+endfunction
+
+function Foo() closure
+ return 42
+endfunction
+
+function Foo() range abort dict closure
+ return 42
+endfunction
+
+function! Foo() range
+ return 42
+endfunction
+
+function! Foo() abort
+ return 42
+endfunction
+
+function! Foo() dict
+ return 42
+endfunction
+
+function! Foo() closure
+ return 42
+endfunction
+
+function! Foo() range abort dict closure
+ return 42
+endfunction
+
+
+" :endfunction trailing
+
+function Foo()
+ return 42
+ " trailing whitespace
+endfunction
+
+function Foo()
+ return 42
+endfunction | echo "Foo"
+
+function Foo()
+ return 42
+endfunction " comment
+
+
+" parameters
+
+function Foo(x, y, z, ...)
+ return 42
+endfunction
+
+function Foo(
+ \ x,
+ \ y,
+ \ z,
+ \ ...)
+ return 42
+endfunction
+
+function Foo(x, y = 42, z = "zed")
+ return 42
+endfunction
+
+function Foo(
+ \ x,
+ \ y = 42,
+ \ z = "zed")
+ return 42
+endfunction
+
+
+" comments
+
+function Foo()
+ " Legacy-script comment
+ # 42 " comment
+ return 42
+endfunction
+
+
+" delete function
+
+delfunction Foo
+delfunction foo.bar
+delfunction! Foo
+delfunction foo.bar
+
diff --git a/runtime/syntax/testdir/input/vim_ex_function_fold.vim b/runtime/syntax/testdir/input/vim_ex_function_fold.vim
new file mode 100644
index 0000000..f9d9bee
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_function_fold.vim
@@ -0,0 +1,183 @@
+" Vim :function command
+" VIM_TEST_SETUP let g:vimsyn_folding = "f" | set fdm=syntax
+
+
+" list
+
+function
+function Foo
+function /Foo.*
+
+function | echo "Foo"
+function " comment
+function Foo | echo "Foo"
+function Foo " comment
+
+
+" definition
+
+" empty definition
+function Foo()
+endfunction
+
+" curly-brace names
+function {"F"}oo()
+endfunction
+
+function F{"o"}o()
+endfunction
+
+function Fo{"o"}()
+endfunction
+
+function {"F"}o{"o"}()
+endfunction
+
+function {"F"}{"o"}{"o"}()
+endfunction
+
+function Foo()
+ return 42
+endfunction
+
+" trailing whitespace
+function Foo()
+ return 42
+endfunction
+
+function Foo() " comment
+ return 42
+endfunction
+
+function! Foo()
+ return 42
+endfunction
+
+function g:Foo()
+ return 42
+endfunction
+
+function s:Foo()
+ return 42
+endfunction
+
+function <SID>Foo()
+ return 42
+endfunction
+
+function foo#bar#Foo()
+ return 42
+endfunction
+
+" same name as an Ex command
+function s:ls()
+endfunction
+
+
+" modifiers
+
+function Foo() range
+endfunction
+
+function Foo() range " comment
+endfunction
+
+function Foo() range
+ return 42
+endfunction
+
+function Foo() abort
+ return 42
+endfunction
+
+function Foo() dict
+ return 42
+endfunction
+
+function Foo() closure
+ return 42
+endfunction
+
+function Foo() range abort dict closure
+ return 42
+endfunction
+
+function! Foo() range
+ return 42
+endfunction
+
+function! Foo() abort
+ return 42
+endfunction
+
+function! Foo() dict
+ return 42
+endfunction
+
+function! Foo() closure
+ return 42
+endfunction
+
+function! Foo() range abort dict closure
+ return 42
+endfunction
+
+
+" :endfunction trailing
+
+function Foo()
+ return 42
+ " trailing whitespace
+endfunction
+
+function Foo()
+ return 42
+endfunction | echo "Foo"
+
+function Foo()
+ return 42
+endfunction " comment
+
+
+" parameters
+
+function Foo(x, y, z, ...)
+ return 42
+endfunction
+
+function Foo(
+ \ x,
+ \ y,
+ \ z,
+ \ ...)
+ return 42
+endfunction
+
+function Foo(x, y = 42, z = "zed")
+ return 42
+endfunction
+
+function Foo(
+ \ x,
+ \ y = 42,
+ \ z = "zed")
+ return 42
+endfunction
+
+
+" comments
+
+function Foo()
+ " Legacy-script comment
+ # 42 " comment
+ return 42
+endfunction
+
+
+" delete function
+
+delfunction Foo
+delfunction foo.bar
+delfunction! Foo
+delfunction foo.bar
+
diff --git a/runtime/syntax/testdir/input/vim_ex_highlight.vim b/runtime/syntax/testdir/input/vim_ex_highlight.vim
new file mode 100644
index 0000000..e23968a
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_highlight.vim
@@ -0,0 +1,55 @@
+" Vim :highlight command
+
+" list
+highlight
+highlight Comment
+
+" reset
+highlight clear
+
+" disable
+highlight clear Comment
+highlight Comment NONE
+
+" add/modify
+highlight Comment cterm=underline
+highlight default Comment term=bold
+
+" link
+highlight link Foo Comment
+highlight! link Foo Comment
+highlight link Foo NONE
+highlight! link Foo NONE
+
+" default link
+highlight default link Foo Comment
+highlight! default link Foo Comment
+highlight default link Foo NONE
+highlight! default link Foo NONE
+
+
+" line continuation and command separator
+
+hi Comment
+ "\ comment
+ \ term=bold
+ "\ comment
+ \ ctermfg=Cyan
+ \ guifg=#80a0ff
+ \ gui=bold
+
+hi Comment
+ \ term=bold
+ \ ctermfg=Cyan
+ \ guifg=#80a0ff
+ \ gui=bold | echo "Foo"
+
+hi Comment term=bold ctermfg=Cyan guifg=#80a0ff gui=bold | echo "Foo"
+
+hi default link
+ \ Foo
+ \ Comment
+
+hi default link
+ \ Foo
+ \ Comment | echo "Foo"
diff --git a/runtime/syntax/testdir/input/vim_ex_map.vim b/runtime/syntax/testdir/input/vim_ex_map.vim
new file mode 100644
index 0000000..95f4292
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_map.vim
@@ -0,0 +1,87 @@
+" Vim :map commands
+
+map!
+map! lhs rhs
+map
+map lhs rhs
+
+call map(list, 'v:val')
+call map (list, 'v:val')
+
+mapclear <buffer>
+mapclear! <buffer>
+nmapclear <buffer>
+vmapclear <buffer>
+xmapclear <buffer>
+smapclear <buffer>
+omapclear <buffer>
+imapclear <buffer>
+lmapclear <buffer>
+cmapclear <buffer>
+tmapclear <buffer>
+
+
+" :help map-bar
+
+" <Bar> '<' is not in 'cpoptions'
+map _l :!ls <Bar> more^M:echo "rhs"<CR>
+" \| 'b' is not in 'cpoptions'
+map _l :!ls \| more^M:echo "rhs"<CR>
+" ^V| always, in Vim and Vi
+map _l :!ls | more^M:echo "rhs"<CR>
+
+map lhs :search('foo\\|bar')<CR>:echo "rhs"<CR>
+
+
+" multiline RHS
+
+map <leader>baz
+ \ :echo (<bar>
+ \
+ \'bar')<cr>
+ "\ comment
+
+map lhs
+ "\ comment
+ \ echo "foo"
+
+map lhs
+ "\ comment
+ \ echo "foo"
+
+map lhs
+ "\ comment
+ \ echo "foo"
+
+map l hs
+ "\ comment
+ \ echo "foo"
+
+map l hs
+ "\ comment
+ \ echo "foo"
+
+map lhs rhs
+map l h s rhs
+
+map lhs
+ "\ comment (matches as RHS but harmless)
+echo "clear"
+
+
+" Issue #12672
+
+nnoremap <leader>foo :echo call(
+ "\ comment
+ \ {x->x},
+ \ ['foo'])<cr>
+
+nnoremap <leader>bar :echo (
+ \
+ \ 'bar')<cr>
+
+
+" Example:
+" /autoload/netrw.vim
+
+if !hasmapto('<Plug>NetrwOpenFile') |nmap <buffer> <silent> <nowait> % <Plug>NetrwOpenFile|endif
diff --git a/runtime/syntax/testdir/input/vim_ex_menu.vim b/runtime/syntax/testdir/input/vim_ex_menu.vim
new file mode 100644
index 0000000..fb737c2
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_menu.vim
@@ -0,0 +1,87 @@
+" Vim :menu commands
+
+" :help disable menus
+menu disable &File.&Open\.\.\.
+amenu enable *
+amenu disable &Tools.*
+
+
+" :help menu-examples
+nmenu Words.Add\ Var wb"zye:menu! Words.<C-R>z <C-R>z<CR>
+nmenu Words.Remove\ Var wb"zye:unmenu! Words.<C-R>z<CR>
+vmenu Words.Add\ Var "zy:menu! Words.<C-R>z <C-R>z <CR>
+vmenu Words.Remove\ Var "zy:unmenu! Words.<C-R>z<CR>
+imenu Words.Add\ Var <Esc>wb"zye:menu! Words.<C-R>z <C-R>z<CR>a
+imenu Words.Remove\ Var <Esc>wb"zye:unmenu! Words.<C-R>z<CR>a
+
+
+" special keys
+menu <silent> &Foo\ bar :echo "Foobar"<CR>
+menu <special> &Foo\ bar :echo "Foobar"<CR>
+menu <script> &Foo\ bar :echo "Foobar"<CR>
+menu <silent> <special> &Foo\ bar :echo "Foobar"<CR>
+menu <silent> <special> <script> &Foo\ bar :echo "Foobar"<CR>
+
+
+function Foo()
+ menu <silent> &Foo\ bar :echo "Foobar"<CR>
+endfunction
+
+
+" Example: runtime/menu.vim (modified)
+an <silent> 10.330 &File.&Close<Tab>:close :confirm close<CR>
+
+an <silent> 10.330 &File.&Close<Tab>:close
+ \ :if winheight(2) < 0 && tabpagewinnr(2) == 0 <Bar>
+ \ confirm enew <Bar>
+ \ else <Bar>
+ \ confirm close <Bar>
+ \ endif<CR>
+
+an <silent> 10.330 &File.&Close<Tab>:close
+ "\ comment
+ \ :if winheight(2) < 0 && tabpagewinnr(2) == 0 <Bar>
+ "\ comment
+ \ confirm enew <Bar>
+ "\ comment
+ \ else <Bar>
+ "\ comment
+ \ confirm close <Bar>
+ "\ comment
+ \ endif<CR>
+
+an <silent> 10.330 &File.&Close<Tab>:close :if winheight(2) < 0 && tabpagewinnr(2) == 0 <Bar>
+ \ confirm enew <Bar>
+ \ else <Bar>
+ \ confirm close <Bar>
+ \ endif<CR>
+
+an <silent> 10.330 &File.&Close<Tab>:close :if winheight(2) < 0 && tabpagewinnr(2) == 0 <Bar>
+ "\ comment
+ \ confirm enew <Bar>
+ "\ comment
+ \ else <Bar>
+ "\ comment
+ \ confirm close <Bar>
+ "\ comment
+ \ endif<CR>
+
+
+" popup menus
+popup &Foo | echo "Foo"
+popup! &Foo | echo "Foo"
+
+
+" Issue #14230
+
+" a menu item name cannot start with '.'
+
+export def HistoryJumpMenu()
+ popup.FilterMenu("Jump history", dir_hist,
+ (res, _) => {
+ HistoryJump(res.text)
+ })
+enddef
+
+popup\.FilterMenu<Tab>Filter()<CR>
+
diff --git a/runtime/syntax/testdir/input/vim_ex_menutranslate.vim b/runtime/syntax/testdir/input/vim_ex_menutranslate.vim
new file mode 100644
index 0000000..5e0289d
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_menutranslate.vim
@@ -0,0 +1,51 @@
+" Vim :menutranslate command
+
+menutranslate clear
+menutranslate clear | echo "Foo"
+menutranslate clear " comment
+
+menutranslate &Foo\ bar &FuBar | echo "Foo"
+
+menutranslate &Foo\ bar &FuBar " comment
+menutranslate \"&Foo"\ bar \"&FuBar
+menutranslate &Foo\ "bar" &FuBar
+
+menutranslate &Foo\ bar
+ \ &Fubar | echo "Foo"
+
+menutranslate
+ \ &Foo\ bar
+ \ &Fubar | echo "Foo"
+
+menutranslate
+ \ &Foo\ bar
+ \ &Fubar| echo "Foo"
+
+menutranslate
+ \ &Foo\ bar
+ \ &Fubar
+ \ | echo "Foo"
+
+menutranslate &Foo\ bar
+ "\ comment
+ \ &Fubar | echo "Foo"
+
+menutranslate
+ "\ comment
+ \ &Foo\ bar
+ "\ comment
+ \ &Fubar | echo "Foo"
+
+menutranslate
+ \ &Foo\ bar
+ "\ comment
+ \ &Fubar| echo "Foo"
+ "\ comment
+
+menutranslate
+ "\ comment
+ \ &Foo\ bar
+ "\ comment
+ \ &Fubar
+ \ | echo "Foo"
+
diff --git a/runtime/syntax/testdir/input/vim_ex_substitute.vim b/runtime/syntax/testdir/input/vim_ex_substitute.vim
new file mode 100644
index 0000000..340d573
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_substitute.vim
@@ -0,0 +1,86 @@
+substitute/foo/bar/&
+substitute/foo/bar/cegiInp#lr
+
+snomagic/foo/bar/&
+snomagic/foo/bar/cegiInp#lr
+
+smagic/foo/bar/&
+smagic/foo/bar/cegiInp#lr
+
+:substitute/foo/bar/&
+:substitute/foo/bar/cegiInp#lr
+
+:snomagic/foo/bar/&
+:snomagic/foo/bar/cegiInp#lr
+
+:smagic/foo/bar/&
+:smagic/foo/bar/cegiInp#lr
+
+call Foo() | substitute/foo/bar/&
+call Foo() | substitute/foo/bar/cegiInp#lr
+
+call Foo() | snomagic/foo/bar/&
+call Foo() | snomagic/foo/bar/cegiInp#lr
+
+call Foo() | smagic/foo/bar/&
+call Foo() | smagic/foo/bar/cegiInp#lr
+
+let foo = str->substitute(str, pat, sub, flags)
+
+function Foo()
+ substitute/foo/bar/
+ let bar = str->substitute(str, pat, sub, flags)
+endfunction
+
+def Foo()
+ substitute/foo/bar/
+ let bar = str->substitute(str, pat, sub, flags)
+enddef
+
+" various delimiters
+
+s!/!//! " comment
+" s"/"//" " comment (works but disallowed)
+s#/#//# " comment
+s$/$//$ " comment
+s%/%//% " comment
+s&/&//& " comment
+s'/'//' " comment
+" FIXME - matches vimUserFunc
+" s(/(//( " comment
+s)/)//) " comment
+s*/*//* " comment
+s+/+//+ " comment
+s,/,//, " comment
+s-/-//- " comment
+s././/. " comment
+s/X/XX/ " comment
+s:/://: " comment
+s;/;//; " comment
+s</<//< " comment
+s=/=//= " comment
+s>/>//> " comment
+s?/?//? " comment
+s@/@//@ " comment
+s[/[//[ " comment
+" s\/\//\ " comment (disallowed)
+s]/]//] " comment
+s^/^//^ " comment
+s_/_//_ " comment
+s`/`//` " comment
+s{/{//{ " comment
+" s|/|//| " comment (disallowed)
+s}/}//} " comment
+s~/~//~ " comment
+
+
+" Issue #13883
+
+str[s]
+str(s)
+
+def Test()
+ str[s]
+ str(s)
+enddef
+
diff --git a/runtime/syntax/testdir/input/vim_ex_syntax.vim b/runtime/syntax/testdir/input/vim_ex_syntax.vim
new file mode 100644
index 0000000..79437ff
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_syntax.vim
@@ -0,0 +1,177 @@
+" Vim :syntax command
+
+syn match testMatch "pattern" contained " tail comment
+" NOTE: comments not currently supported
+syn keyword testKeyword keyword contained " tail comment
+syn region testRegion start="start-pattern" skip="skip-pattern" end="end-pattern" contained " tail comment
+
+" Multiline commands
+
+syn keyword testKeyword
+ "\ OPTIONS
+ "\ conceal option
+ \ conceal
+ "\ cchar option
+ \ cchar=&
+ "\ contained option
+ \ contained
+ "\ containedin option
+ \ containedin=testContainer
+ "\ nextgroup option
+ \ nextgroup=testNext0,@testCluster
+ "\ transparent option
+ \ transparent
+ "\ skipwhite option
+ \ skipwhite
+ "\ skipempty option
+ \ skipempty
+ "\ skipnl option
+ \ skipnl
+ "\ KEYWORDS LIST
+ "\ keyword 1
+ \ keyword1
+ "\ keyword 2
+ \ keyword2
+ "\ keyword 3
+ \ keyword3
+
+syn match testMatch
+ "\ MATCH PATTERN
+ "\ pattern start
+ \ /
+ "\ part 1 description
+ \pat1a .* pat1b
+ "\ part 2 description
+ \pat2a .* pat2b
+ "\ part 3 description
+ \pat3a .* pat3b
+ "\ pattern end
+ \/
+ "\ OPTIONS
+ "\ conceal option
+ \ conceal
+ "\ cchar option
+ \ cchar=&
+ "\ contained option
+ \ contained
+ "\ containedin option
+ \ containedin=testContainer
+ "\ nextgroup option
+ \ nextgroup=testNext0,@testCluster
+ "\ transparent option
+ \ transparent
+ "\ skipwhite option
+ \ skipwhite
+ "\ skipempty option
+ \ skipempty
+ "\ skipnl option
+ \ skipnl
+ "\ contains option
+ \ contains=testContained1,testContained2
+ "\ fold option
+ \ fold
+ "\ display option
+ \ display
+ "\ extend option
+ \ extend
+ "\ excludenl option
+ \ excludenl
+ "\ keepend option
+ \ keepend
+
+syn region testRegion
+ "\ OPTIONS
+ "\ start option
+ \ start="start-pattern"
+ "\ skip option
+ \ skip="skip-pattern"
+ "\ end option
+ \ end="end-pattern"
+ "\ conceal option
+ \ conceal
+ "\ cchar option
+ \ cchar=&
+ "\ contained option
+ \ contained
+ "\ containedin option
+ \ containedin=testContainer
+ "\ nextgroup option
+ \ nextgroup=testNext0,@testCluster
+ "\ transparent option
+ \ transparent
+ "\ skipwhite option
+ \ skipwhite
+ "\ skipempty option
+ \ skipempty
+ "\ skipnl option
+ \ skipnl
+ "\ contains option
+ \ contains=testContained1,testContained2
+ "\ oneline option
+ \ oneline
+ "\ fold option
+ \ fold
+ "\ display option
+ \ display
+ "\ extend option
+ \ extend
+ "\ concealends option
+ \ concealends
+ "\ excludenl option
+ \ excludenl
+ "\ keepend option
+ \ keepend
+
+syn cluster testCluster
+ "\ OPTIONS
+ "\ contains option
+ \ contains=testContained1,testContained2,testContained3
+
+syn cluster testCluster
+ "\ OPTIONS
+ "\ add option
+ \ add=testAdd
+ "\ remove option
+ \ remove=testRemove
+
+
+" multiline group list
+
+syn keyword testNext0 keyword
+syn keyword testNext1 keyword
+syn keyword testNext2 keyword
+syn keyword testNext3 keyword
+syn keyword testNext4 keyword
+syn keyword testNext5 keyword
+syn keyword testNext6 keyword
+syn keyword testNext7 keyword
+syn keyword testNext8 keyword
+syn keyword testNext9 keyword
+
+syn keyword testKeyword
+ "\ nextgroup option
+ \ nextgroup=
+ "\ a comment
+ \ testNext0 , testNext1 ,
+ "\ a comment
+ \ testNext[2-8].* ,
+ "\ a comment
+ \ testNext9 , @testCluster skipwhite
+ "\ KEYWORDS LIST
+ \ keyword4
+ \ keyword5
+ \ keyword6
+
+
+" leaking contained groups
+
+" Example: runtime/syntax/zsh.vim
+" "cluster" should not be highlighted outside of :syntax commands
+
+function! s:ContainedGroup()
+ " ...
+ for cluster in ['markdownHighlight_zsh', 'zsh']
+ " ...
+ endfor
+ " ...
+endfunction
diff --git a/runtime/syntax/testdir/input/vim_expr.vim b/runtime/syntax/testdir/input/vim_expr.vim
new file mode 100644
index 0000000..cf5838c
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_expr.vim
@@ -0,0 +1,71 @@
+" String
+
+echo 'It''s a string'
+echo 'tab: \t, new line: \n, backslash: \\'
+echo "tab: \t, new line: \n, backslash: \\"
+
+" String escape sequences
+
+echo "\316 - \31 - \3 - \x1f - \xf - \X1F - \XF - \u02a4 - \U000002a4 - \b - \e - \f - \n - \r - \t - \\ - \" - \<C-W>"
+echo '\316 \31 \3 \x1f \xf \X1F \XF \u02a4 \U000002a4 \b \e \f \n \r \t \\ \" \<C-W>'
+echo "\3160 - \x1f0 - \X1F0 - \u02a40 - \U000002a40"
+
+echo $"\316 - \31 - \3 - \x1f - \xf - \X1F - \XF - \u02a4 - \U000002a4 - \b - \e - \f - \n - \r - \t - \\ - \" - \<C-W>"
+echo $'\316 \31 \3 \x1f \xf \X1F \XF \u02a4 \U000002a4 \b \e \f \n \r \t \\ \" \<C-W>'
+echo $"\3160 - \x1f0 - \X1F0 - \u02a40 - \U000002a40"
+
+echo "\<C-a>"
+echo "\<*C-a>"
+echo "\<C->>"
+echo "\<*C->>"
+echo "\<C->>>"
+echo "\<*C->>>"
+
+" String interpolation
+
+echo 'Don''t highlight interpolation: {{ {1 + 2} }}'
+echo "Don't highlight interpolation: {{ {1 + 2} }}"
+echo $'Highlight interpolation:\t{{ { string({'foo': 'bar'}) } }}'
+echo $'Highlight interpolation:\t{{ { $'nested: {{ {1 + 2} }}' } }}'
+echo $"Highlight interpolation:\t{{ { string({"foo": "bar"}) } }}"
+echo $"Highlight interpolation:\t{{ { $"nested: {{ {1 + 2} }}" } }}"
+
+" Number
+
+" Hexadecimal
+echo 0xFF
+echo 0XFF
+echo -0xFF
+echo -0XFF
+
+" Decimal
+echo 255
+echo -255
+
+" Octal
+echo 0377
+echo 0o377
+echo 0O377
+echo -0377
+echo -0o377
+echo -0O377
+
+" Binary
+echo 0b11111111
+echo 0B11111111
+echo -0b11111111
+echo -0B11111111
+
+" Float
+123.456
++0.0001
+55.0
+-0.123
+1.234e03
+1.0E-6
+-3.1416e+88
+
+" Blob
+echo 0zFF00ED015DAF
+echo 0zFF00.ED01.5DAF
+echo 0zFF.00.ED.01.5D.AF
diff --git a/runtime/syntax/testdir/input/vim_key_notation.vim b/runtime/syntax/testdir/input/vim_key_notation.vim
new file mode 100644
index 0000000..8bc128a
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_key_notation.vim
@@ -0,0 +1,163 @@
+" Key notation
+
+<Space>
+<Tab>
+<Tab>
+<NL>
+<NewLine>
+<LineFeed>
+<LF>
+<CR>
+<Return>
+<Enter>
+<BS>
+<BackSpace>
+<Esc>
+<CSI>
+<xCSI>
+<Bar>
+<Bslash>
+<Del>
+<Delete>
+<kDel>
+<Up>
+<Down>
+<Left>
+<Right>
+<xUp>
+<xDown>
+<xLeft>
+<xRight>
+<PasteStart>
+<PasteEnd>
+<F1>
+<F2>
+<F3>
+<F4>
+<F5>
+<F6>
+<F7>
+<F8>
+<F9>
+<F10>
+<F11>
+<F12>
+<F13>
+<F14>
+<F15>
+<F16>
+<F17>
+<F18>
+<F19>
+<F20>
+<F21>
+<F22>
+<F23>
+<F24>
+<F25>
+<F26>
+<F27>
+<F28>
+<F29>
+<F30>
+<F31>
+<F32>
+<F33>
+<F34>
+<F35>
+<F36>
+<F37>
+<xF1>
+<xF2>
+<xF3>
+<xF4>
+<Help>
+<Undo>
+<Insert>
+<Ins>
+<kInsert>
+<Home>
+<kHome>
+<xHome>
+<zHome>
+<End>
+<kEnd>
+<xEnd>
+<zEnd>
+<PageUp>
+<PageDown>
+<kPageUp>
+<kPageDown>
+<kPlus>
+<kMinus>
+<kDivide>
+<kMultiply>
+<kEnter>
+<kPoint>
+<k0>
+<k1>
+<k2>
+<k3>
+<k4>
+<k5>
+<k6>
+<k7>
+<k8>
+<k9>
+<lt>
+<Mouse>
+<NetMouse>
+<DecMouse>
+<JsbMouse>
+<PtermMouse>
+<UrxvtMouse>
+<SgrMouse>
+<SgrMouseRelease>
+<LeftMouse>
+<LeftMouseNM>
+<LeftDrag>
+<LeftRelease>
+<LeftReleaseNM>
+<MouseMove>
+<MiddleMouse>
+<MiddleDrag>
+<MiddleRelease>
+<RightMouse>
+<RightDrag>
+<RightRelease>
+<ScrollWheelUp>
+<ScrollWheelDown>
+<ScrollWheelRight>
+<ScrollWheelLeft>
+<MouseDown>
+<MouseUp>
+<X1Mouse>
+<X1Drag>
+<X1Release>
+<X2Mouse>
+<X2Drag>
+<X2Release>
+<Drop>
+<Nul>
+<SNR>
+<Plug>
+<CursorHold>
+<Ignore>
+<Cmd>
+<ScriptCmd>
+<FocusGained>
+<FocusLost>
+
+<cword>
+<cWORD>
+<cexpr>
+<cfile>
+<afile>
+<abuf>
+<amatch>
+<sfile>
+<stack>
+<script>
+<slnum>
+<sflnum>
+<client>
diff --git a/runtime/syntax/testdir/input/vim_line_continuation.vim b/runtime/syntax/testdir/input/vim_line_continuation.vim
new file mode 100644
index 0000000..a32666a
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_line_continuation.vim
@@ -0,0 +1,49 @@
+" Vim line continuations with interspersed comments
+
+function Foo(
+ "\ param a
+ \ a,
+ "\ param b
+ \ b,
+ "\ param c
+ \ c
+ \)
+ echomsg
+ "\ start string
+ \ $"
+ "\ print a
+ \ a = {a:a},
+ "\ print b
+ \ b = {a:b},
+ "\ print c
+ \ c = {a:c}
+ "\ end string
+ \"
+endfunction
+
+call Foo(
+ "\ arg 1
+ \ 11,
+ "\ arg 2
+ \ 22,
+ "\ arg 3
+ \ 33
+ \)
+
+let dict = #{
+ "\ pair 1
+ \ a: 1,
+ "\ pair 2
+ \ b: 2,
+ "\ pair 3
+ \ c: 3
+ \}
+
+let array = [
+ "\ element 1
+ \ 1,
+ "\ element 2
+ \ 2,
+ "\ element 3
+ \ 3
+ \]
diff --git a/runtime/syntax/testdir/input/vim_new.vim b/runtime/syntax/testdir/input/vim_new.vim
new file mode 100644
index 0000000..985cfd3
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_new.vim
@@ -0,0 +1,17 @@
+vim9script
+
+# Vim :new command and class constructors.
+class Test
+ def new()
+ enddef
+ def newOther()
+ enddef
+ def newyetanother()
+ enddef
+endclass
+
+Test.new()
+Test.newOther()
+Test.newyetanother()
+new
+quit
diff --git a/runtime/syntax/testdir/input/vim_syntax.vim b/runtime/syntax/testdir/input/vim_syntax.vim
deleted file mode 100644
index e8c112c..0000000
--- a/runtime/syntax/testdir/input/vim_syntax.vim
+++ /dev/null
@@ -1,75 +0,0 @@
-" Vim :syntax highlighting
-
-syn keyword testKeyword
- \ conceal
- \ cchar=&
- \ contained
- \ containedin=testContainer
- \ nextgroup=testNext,@testCluster
- \ transparent
- \ skipwhite
- \ skipempty
- \ skipnl
- \ keyword1
- \ keyword2
- \ keyword3
-
-syn match testMatch
- \ "pattern"
- \ conceal
- \ cchar=&
- \ contained
- \ containedin=testContainer
- \ nextgroup=testNext,@testCluster
- \ transparent
- \ skipwhite
- \ skipempty
- \ skipnl
- \ contains=testContained1,testContained2
- \ fold
- \ display
- \ extend
- \ excludenl
- \ keepend
-
-syn region testRegion
- \ start="start-pattern"
- \ end="end-pattern"
- \ skip="skip-pattern"
- \ contained
- \ conceal
- \ cchar=&
- \ contained
- \ containedin=testContainer
- \ nextgroup=testNext,@testCluster
- \ transparent
- \ skipwhite
- \ skipempty
- \ skipnl
- \ contains=testContained1,testContained2
- \ oneline
- \ fold
- \ display
- \ extend
- \ concealends
- \ excludenl
- \ keepend
-
-syn cluster testCluster
- \ contains=testContained1,testContained2,testContained3
-
-syn cluster testCluster
- \ add=testAdd
- \ remove=testRemove
-
-
-" check multiline group list
-syn keyword testKeyword
- \ nextgroup=
- \ testNext ,
- \ testNext2 ,
- \ @testCluster
- \ skipwhite
- \ keyword4
- \ keyword5
- \ keyword6
diff --git a/runtime/syntax/testdir/runtest.vim b/runtime/syntax/testdir/runtest.vim
index 80f1eff..e1cfdcf 100644
--- a/runtime/syntax/testdir/runtest.vim
+++ b/runtime/syntax/testdir/runtest.vim
@@ -85,163 +85,209 @@ func HandleSwapExists()
endif
endfunc
-let ok_count = 0
-let failed_tests = []
-let skipped_count = 0
-let MAX_FAILED_COUNT = 5
-for fname in glob('input/*.*', 1, 1)
- if fname =~ '\~$'
- " backup file, skip
- continue
- endif
-
- let linecount = readfile(fname)->len()
- let root = fnamemodify(fname, ':t:r')
- let filetype = substitute(root, '\([^_.]*\)[_.].*', '\1', '')
- let failed_root = 'failed/' .. root
-
- " Execute the test if the "done" file does not exist or when the input file
- " is newer.
- let in_time = getftime(fname)
- let out_time = getftime('done/' .. root)
- if out_time < 0 || in_time > out_time
- call ch_log('running tests for: ' .. fname)
-
- for dumpname in glob(failed_root .. '_\d*\.dump', 1, 1)
- call delete(dumpname)
- endfor
- call delete('done/' .. root)
-
- let lines =<< trim END
- syntax on
-
- " extra info for shell variables
- func ShellInfo()
- let msg = ''
- for [key, val] in items(b:)
- if key =~ '^is_'
- let msg ..= key .. ': ' .. val .. ', '
- endif
- endfor
- if msg != ''
- echomsg msg
- endif
- endfunc
-
- au! SwapExists * call HandleSwapExists()
- func HandleSwapExists()
- " Ignore finding a swap file for the test input, the user might be
- " editing it and that's OK.
- if expand('<afile>') =~ 'input[/\\].*\..*'
- let v:swapchoice = 'e'
- endif
- endfunc
- END
- call writefile(lines, 'Xtestscript')
+func RunTest()
+ let ok_count = 0
+ let failed_tests = []
+ let skipped_count = 0
+ let MAX_FAILED_COUNT = 5
+ " Create a map of setup configuration filenames with their basenames as keys.
+ let setup = glob('input/setup/*.vim', 1, 1)
+ \ ->reduce({d, f -> extend(d, {fnamemodify(f, ':t:r'): f})}, {})
+
+ for fname in glob('input/*.*', 1, 1)
+ if fname =~ '\~$'
+ " backup file, skip
+ continue
+ endif
- " close all but the last window
- while winnr('$') > 1
- close
- endwhile
+ let linecount = readfile(fname)->len()
+ let root = fnamemodify(fname, ':t:r')
+ let filetype = substitute(root, '\([^_.]*\)[_.].*', '\1', '')
+ let failed_root = 'failed/' .. root
+
+ " Execute the test if the "done" file does not exist or when the input file
+ " is newer.
+ let in_time = getftime(fname)
+ let out_time = getftime('done/' .. root)
+ if out_time < 0 || in_time > out_time
+ call ch_log('running tests for: ' .. fname)
+
+ for dumpname in glob(failed_root .. '_\d*\.dump', 1, 1)
+ call delete(dumpname)
+ endfor
+ call delete('done/' .. root)
- " Redraw to make sure that messages are cleared and there is enough space
- " for the terminal window.
- redraw
+ let lines =<< trim END
+ " extra info for shell variables
+ func ShellInfo()
+ let msg = ''
+ for [key, val] in items(b:)
+ if key =~ '^is_'
+ let msg ..= key .. ': ' .. val .. ', '
+ endif
+ endfor
+ if msg != ''
+ echomsg msg
+ endif
+ endfunc
+
+ au! SwapExists * call HandleSwapExists()
+ func HandleSwapExists()
+ " Ignore finding a swap file for the test input, the user might be
+ " editing it and that's OK.
+ if expand('<afile>') =~ 'input[/\\].*\..*'
+ let v:swapchoice = 'e'
+ endif
+ endfunc
+
+ func LoadFiletype(type)
+ for file in glob("ftplugin/" .. a:type .. "*.vim", 1, 1)
+ exe "source " .. file
+ endfor
+ redraw!
+ endfunc
+
+ func SetUpVim()
+ call cursor(1, 1)
+ " Defend against rogue VIM_TEST_SETUP commands.
+ for _ in range(20)
+ let lnum = search('\C\<VIM_TEST_SETUP\>', 'eW', 20)
+ if lnum < 1
+ break
+ endif
+ exe substitute(getline(lnum), '\C.*\<VIM_TEST_SETUP\>', '', '')
+ endfor
+ call cursor(1, 1)
+ " BEGIN [runtime/defaults.vim]
+ " Also, disable italic highlighting to avoid issues on some terminals.
+ set display=truncate ruler scrolloff=5 t_ZH= t_ZR=
+ syntax on
+ " END [runtime/defaults.vim]
+ redraw!
+ endfunc
+ END
+ call writefile(lines, 'Xtestscript')
+
+ " close all but the last window
+ while winnr('$') > 1
+ close
+ endwhile
+
+ " Redraw to make sure that messages are cleared and there is enough space
+ " for the terminal window.
+ redraw
+
+ " Let "Xtestscript#SetUpVim()" turn the syntax on.
+ let prefix = '-Nu NONE -S Xtestscript'
+ let path = get(setup, root, '')
+ " Source the found setup configuration file.
+ let args = !empty(path)
+ \ ? prefix .. ' -S ' .. path
+ \ : prefix
+ let buf = RunVimInTerminal(args, {})
+ " edit the file only after catching the SwapExists event
+ call term_sendkeys(buf, ":edit " .. fname .. "\<CR>")
+ " set up the testing environment
+ call term_sendkeys(buf, ":call SetUpVim()\<CR>")
+ " load filetype specific settings
+ call term_sendkeys(buf, ":call LoadFiletype('" .. filetype .. "')\<CR>")
+
+ if filetype == 'sh'
+ call term_sendkeys(buf, ":call ShellInfo()\<CR>")
+ endif
- let buf = RunVimInTerminal('-S Xtestscript', {})
- " edit the file only after catching the SwapExists event
- call term_sendkeys(buf, ":edit " .. fname .. "\<CR>")
+ " Screendump at the start of the file: failed/root_00.dump
+ let root_00 = root .. '_00'
+ call ch_log('First screendump for ' .. fname .. ': failed/' .. root_00 .. '.dump')
+ let fail = VerifyScreenDump(buf, root_00, {})
- if filetype == 'sh'
- call term_sendkeys(buf, ":call ShellInfo()\<CR>")
- endif
+ " clear the shell info if there are not enough lines to cause a scroll
+ if filetype == 'sh' && linecount <= 19
+ call term_sendkeys(buf, ":redraw\<CR>")
+ endif
- " Screendump at the start of the file: failed/root_00.dump
- let root_00 = root .. '_00'
- call ch_log('First screendump for ' .. fname .. ': failed/' .. root_00 .. '.dump')
- let fail = VerifyScreenDump(buf, root_00, {})
+ " Make a Screendump every 18 lines of the file: failed/root_NN.dump
+ let topline = 1
+ let nr = 1
+ while linecount - topline > 20
+ let topline += 18
+ call term_sendkeys(buf, printf("%dGzt", topline))
+ let root_next = root .. printf('_%02d', nr)
+ call ch_log('Next screendump for ' .. fname .. ': failed/' .. root_next .. '.dump')
+ let fail += VerifyScreenDump(buf, root_next, {})
+ let nr += 1
+ endwhile
+
+ " Screendump at the end of the file: failed/root_99.dump
+ call term_sendkeys(buf, 'Gzb')
+ let root_last = root .. '_99'
+ call ch_log('Last screendump for ' .. fname .. ': failed/' .. root_last .. '.dump')
+ let fail += VerifyScreenDump(buf, root_last, {})
+
+ call StopVimInTerminal(buf)
+ call delete('Xtestscript')
+
+ " redraw here to avoid the following messages to get mixed up with screen
+ " output.
+ redraw
+
+ " Add any assert errors to s:messages.
+ if len(v:errors) > 0
+ call extend(s:messages, v:errors)
+ " Echo the errors here, in case the script aborts or the "messages" file
+ " is not displayed later.
+ echomsg v:errors
+ let v:errors = []
+ let fail += 1
+ endif
- " clear the shell info if there are not enough lines to cause a scroll
- if filetype == 'sh' && linecount <= 19
- call term_sendkeys(buf, ":redraw\<CR>")
- endif
+ if fail == 0
+ call Message("Test " .. root .. " OK")
- " Make a Screendump every 18 lines of the file: failed/root_NN.dump
- let topline = 1
- let nr = 1
- while linecount - topline > 20
- let topline += 18
- call term_sendkeys(buf, printf("%dGzt", topline))
- let root_next = root .. printf('_%02d', nr)
- call ch_log('Next screendump for ' .. fname .. ': failed/' .. root_next .. '.dump')
- let fail += VerifyScreenDump(buf, root_next, {})
- let nr += 1
- endwhile
-
- " Screendump at the end of the file: failed/root_99.dump
- call term_sendkeys(buf, 'Gzb')
- let root_last = root .. '_99'
- call ch_log('Last screendump for ' .. fname .. ': failed/' .. root_last .. '.dump')
- let fail += VerifyScreenDump(buf, root_last, {})
-
- call StopVimInTerminal(buf)
- call delete('Xtestscript')
-
- " redraw here to avoid the following messages to get mixed up with screen
- " output.
- redraw
-
- " Add any assert errors to s:messages.
- if len(v:errors) > 0
- call extend(s:messages, v:errors)
- " Echo the errors here, in case the script aborts or the "messages" file
- " is not displayed later.
- echomsg v:errors
- let v:errors = []
- let fail += 1
- endif
+ call writefile(['OK'], 'done/' .. root)
- if fail == 0
- call Message("Test " .. root .. " OK")
+ let ok_count += 1
+ else
+ call Message("Test " .. root .. " FAILED")
- call writefile(['OK'], 'done/' .. root)
+ call delete('done/' .. root)
- let ok_count += 1
+ eval failed_tests->add(root)
+ if len(failed_tests) > MAX_FAILED_COUNT
+ call Message('')
+ call Message('Too many errors, aborting')
+ endif
+ endif
else
- call Message("Test " .. root .. " FAILED")
+ call Message("Test " .. root .. " skipped")
+ let skipped_count += 1
+ endif
- call delete('done/' .. root)
+ " Append messages to the file "testdir/messages"
+ call AppendMessages('Input file ' .. fname .. ':')
- eval failed_tests->add(root)
- if len(failed_tests) > MAX_FAILED_COUNT
- call Message('')
- call Message('Too many errors, aborting')
- endif
+ if len(failed_tests) > MAX_FAILED_COUNT
+ break
endif
- else
- call Message("Test " .. root .. " skipped")
- let skipped_count += 1
- endif
+ endfor
- " Append messages to the file "testdir/messages"
- call AppendMessages('Input file ' .. fname .. ':')
+ call Message(s:test_run_message)
+ call Message('OK: ' .. ok_count)
+ call Message('FAILED: ' .. len(failed_tests) .. ': ' .. string(failed_tests))
+ call Message('skipped: ' .. skipped_count)
+ call AppendMessages('== SUMMARY ==')
- if len(failed_tests) > MAX_FAILED_COUNT
- break
+ if len(failed_tests) > 0
+ " have make report an error
+ cquit
endif
-endfor
+endfunc
-call Message(s:test_run_message)
-call Message('OK: ' .. ok_count)
-call Message('FAILED: ' .. len(failed_tests) .. ': ' .. string(failed_tests))
-call Message('skipped: ' .. skipped_count)
-call AppendMessages('== SUMMARY ==')
+call RunTest()
" Matching "if 1" at the start.
endif
-if len(failed_tests) > 0
- " have make report an error
- cquit
-endif
qall!
+
+" vim:ts=8
diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim
index 5544fb6..d782bd4 100644
--- a/runtime/syntax/tex.vim
+++ b/runtime/syntax/tex.vim
@@ -1,9 +1,11 @@
" Vim syntax file
" Language: TeX
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E. Campbell
" Last Change: Apr 22, 2022
+" 2024 Feb 19 by Vim Project (announce adoption)
" Version: 121
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
+" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
"
diff --git a/runtime/syntax/tmux.vim b/runtime/syntax/tmux.vim
index d2b31e8..9766ed5 100644
--- a/runtime/syntax/tmux.vim
+++ b/runtime/syntax/tmux.vim
@@ -1,5 +1,5 @@
" Language: tmux(1) configuration file
-" Version: 3.3a (git-e7c829fc)
+" Version: 3.4 (git-608d1134)
" URL: https://github.com/ericpruitt/tmux.vim/
" Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
" License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
@@ -164,9 +164,9 @@ syn keyword tmuxCommands
syn keyword tmuxEnums
\ absolute-centre all always any arrows bar blinking-bar blinking-block
\ blinking-underline block both bottom centre color colour current default
-\ double emacs external failed heavy largest latest left manual next
-\ no-detached none number off on other padded previous right rounded simple
-\ single smallest top underline vi
+\ double emacs external failed heavy keep-group keep-last largest latest left
+\ manual next no-detached none number off on other padded previous right
+\ rounded simple single smallest top underline vi
let &cpo = s:original_cpo
unlet! s:original_cpo s:bg s:i
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index edfef43..b12b5c6 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -1,15 +1,17 @@
" Vim syntax file
-" Language: Vim 9.0 script
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
-" Last Change: May 09, 2023
-" 2023 Nov 12 by Vim Project (:let-heredoc improvements)
-" 2023 Nov 20 by Vim Project (:loadkeymap improvements)
-" 2023 Dec 06 by Vim Project (add missing assignment operators)
-" 2023 Dec 10 by Vim Project (improve variable matching)
-" 2023 Dec 21 by Vim Project (improve ex command matching)
-" 2023 Dec 30 by Vim Project (:syntax improvements)
-" Version: 9.0-25
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
+" Language: Vim script
+" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
+" Doug Kearns <dougkearns@gmail.com>
+" URL: https://github.com/vim-jp/syntax-vim-ex
+" Last Change: 2024 Mar 22
+" Former Maintainer: Charles E. Campbell
+" Base File URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
+" Base File Version: 9.0-25
+
+" DO NOT CHANGE DIRECTLY.
+" THIS FILE PARTLY GENERATED BY gen_syntax_vim.vim.
+" (Search string "GEN_SYN_VIM:" in this file)
+
" Automatically generated keyword lists: {{{1
" Quit when a syntax file was already loaded {{{2
@@ -25,39 +27,51 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
syn cluster vimCommentGroup contains=vimTodo,@Spell
" regular vim commands {{{2
-syn keyword vimCommand contained a ar[gs] argl[ocal] bad[d] bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] class cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] delep dell diffg[et] dig[raphs] do dsp[lit] echoe[rr] em[enu] endfo[r] eval f[ile] fina[lly] foldd[oopen] gr[ep] helpc[lose] his[tory] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] py3f[ile] pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoremenu spelli[nfo] spr[evious] sri star[tinsert] sts[elect] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] v vim9[cmd] vs[plit] win[size] wq xmapc[lear] xr[estore]
-syn keyword vimCommand contained ab arga[dd] argu[ment] balt bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletel delm[arks] diffo[ff] dir doau e[dit] echom[sg] en[dif] endinterface ex files fini[sh] folddoc[losed] grepa[dd] helpf[ind] hor[izontal] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] public py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir smenu so[urce] spellr[are] sr srl startg[replace] substitutepattern sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] ve[rsion] vim9s[cript] wN[ext] winc[md] wqa[ll] xme xunme
-syn keyword vimCommand contained abc[lear] argd[elete] as[cii] bd[elete] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletep delp diffp[atch] disa[ssemble] doaut ea echon endclass endt[ry] exi[t] filet fir[st] foldo[pen] gui helpg[rep] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] leg[acy] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] substituterepeat sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type unl verb[ose] vim[grep] w[rite] windo wundo xmenu xunmenu
-syn keyword vimCommand contained abo[veleft] argded[upe] au bel[owright] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] defer deletl dep diffpu[t] dj[ump] dp earlier echow[indow] enddef endw[hile] exp filetype fix[del] for gvim helpt[ags] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp static sun[hide] sy tN[ext] tabe[dit] tabnew tc[d] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unlo[ckvar] vert[ical] vimgrepa[dd] wa[ll] winp[os] wv[iminfo] xnoreme xwininfo
-syn keyword vimCommand contained abstract argdo bN[ext] bf[irst] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec el[se] endenum ene[w] export filt[er] fo[ld] fu[nction] h[elp] hi iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3do python3 qa[ll] redr[aw] retu[rn] rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stj[ump] sunme syn ta[g] tabf[ind] tabo[nly] tch[dir] tf[irst] tln tmapc[lear] try una[bbreviate] uns[ilent] vi[sual] viu[sage] wh[ile] wn[ext] x[it] xnoremenu y[ank]
-syn keyword vimCommand contained addd arge[dit] b[uffer] bl[ast] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delel delf[unction] dif[fupdate] difft[his] dli[st] ds[earch] echoc[onsole] elsei[f] endf[unction] enum exu[sage] fin[d] foldc[lose] go[to] ha[rdcopy] hid[e] if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes[sages] mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] stopi[nsert] sunmenu sync tab tabfir[st] tabp[revious] tcl th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] up[date] vie[w] vne[w] wi wp[revious] xa[ll] xprop z[^.=]
-syn keyword vimCommand contained al[l] argg[lobal] ba[ll] bm[odified]
+" GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR=''
+syn keyword vimCommand contained abc[lear] abo[veleft] abs[tract] al[l] ar[gs] arga[dd] argd[elete] argdo argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] bN[ext] ba[ll] bad[d] balt bd[elete] bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bo[tright] bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] bro[wse] buffers bufd[o] bun[load] bw[ipeout] c[hange] cN[ext] cNf[ile] cabc[lear] cabo[ve] cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cal[l] cat[ch] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] cd cdo ce[nter] cex[pr] cf[ile] cfd[o] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] chd[ir] changes che[ckpath] checkt[ime] chi[story] cl[ist] cla[st] class clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] co[py] col[der] colo[rscheme]
+syn keyword vimCommand contained com[mand] comc[lear] comp[iler] con[tinue] conf[irm] cons[t] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] d[elete] delm[arks] deb[ug] debugg[reedy] defc[ompile] defe[r] delc[ommand] delf[unction] di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] el[se] elsei[f] em[enu] en[dif] endin[terface] endc[lass] ende[num] endfo[r] endt[ry] endw[hile] ene[w] enu[m] ev[al] ex exi[t] exp[ort] exu[sage] f[ile] files filet[ype] filt[er] fin[d] fina[l] finall[y] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] foldo[pen] for g[lobal] go[to] gr[ep] grepa[dd] gu[i] gv[im] h[elp]
+syn keyword vimCommand contained helpc[lose] helpf[ind] helpg[rep] helpt[ags] ha[rdcopy] hi[ghlight] hid[e] his[tory] ho[rizontal] iabc[lear] if ij[ump] il[ist] imp[ort] int[ro] inte[rface] is[earch] isp[lit] j[oin] ju[mps] k kee[pmarks] keepj[umps] keepp[atterns] keepa[lt] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] lbel[ow] lbo[ttom] lc[d] lch[dir] lcl[ose] lcs[cope] ld[o] le[ft] lefta[bove] let lex[pr] leg[acy] lf[ile] lfd[o] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lgr[ep] lgrepa[dd] lh[elpgrep] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] loadk[eymap] loc[kmarks] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lua luad[o] luaf[ile]
+syn keyword vimCommand contained lv[imgrep] lvimgrepa[dd] lw[indow] ls m[ove] ma[rk] mak[e] marks mat[ch] menut[ranslate] mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] mz[scheme] mzf[ile] n[ext] nb[key] nbc[lose] nbs[tart] noa[utocmd] noh[lsearch] nos[wapfile] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pc[lose] pe[rl] perld[o] ped[it] po[p] pp[op] pre[serve] prev[ious] pro[mptfind] promptr[epl] prof[ile] profd[el] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pub[lic] pw[d] py[thon] pyd[o] pyf[ile] py3 py3d[o] python3 py3f[ile] pyx pyxd[o] pythonx pyxf[ile] q[uit] quita[ll] qa[ll] r[ead] rec[over] red[o] redi[r] redr[aw] redraws[tatus] redrawt[abline]
+syn keyword vimCommand contained reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] ru[ntime] rub[y] rubyd[o] rubyf[ile] rund[o] rv[iminfo] sN[ext] sa[rgument] sal[l] san[dbox] sav[eas] sb[uffer] sbN[ext] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] sc[riptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] si[malt] sig[n] sil[ent] sl[eep] sla[st] sn[ext] so[urce] sor[t] sp[lit] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sr[ewind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stat[ic] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] sw[apname] synti[me] sync[bind] smi[le] t tN[ext] ta[g] tags tab tabc[lose]
+syn keyword vimCommand contained tabd[o] tabe[dit] tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] tcl tcld[o] tclf[ile] te[aroff] ter[minal] tf[irst] th[row] thi[s] tj[ump] tl[ast] tn[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] ty[pe] u[ndo] undoj[oin] undol[ist] unh[ide] unl[et] unlo[ckvar] uns[ilent] up[date] v[global] ve[rsion] verb[ose] vert[ical] vi[sual] vie[w] vim[grep] vimgrepa[dd] vim9[cmd] vim9s[cript] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wh[ile] wi[nsize] winc[md] wind[o] winp[os] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i
+
+syn keyword vimCommand contained 2mat[ch] 3mat[ch]
+
+" Lower priority for _new_ to distinguish constructors from the command.
+syn match vimCommand contained "\<new\>(\@!"
syn match vimCommand contained "\<z[-+^.=]\=\>"
-syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Until Winbar XMLent XMLns
+syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man Over Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Until Winbar XMLent XMLns
" vimOptions are caught only when contained in a vimSet {{{2
-syn keyword vimOption contained acd ambw arshape aw backupskip beval bk bri bufhidden cdh ci cinsd cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr gli guifont guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langmap linebreak lm lsp makeencoding maxmem mh mmp more mousemoveevent mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome re restorescreen ro rulerformat scl scs sft shellslash shortmess showtabline slm smoothscroll spell spl srr statusline sw sxq tag tal tenc termwintype tgst titleold tpm ttm tw udir ur verbose viminfofile warn wfh wildchar wim winminheight wmh write
-syn keyword vimOption contained ai anti asd awa balloondelay bevalterm bkc briopt buflisted cdhome cin cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd go guifontset helpfile highlight hls imactivatekey iminsert include inf isk keymodel langmenu lines lmap luadll makeprg maxmempattern mis mmt mouse mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx readonly revins rop runtimepath scr sect sh shelltemp shortname shq sloc sms spellcapcheck splitbelow ss stl swapfile syn tagbsearch tb term terse thesaurus titlestring tr tty twk ul ut verbosefile virtualedit wb wfw wildcharm winaltkeys winminwidth wmnu writeany
-syn keyword vimOption contained akm antialias autochdir background ballooneval bex bl brk buftype cdpath cindent cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endoffile errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault gp guifontwide helpheight history hlsearch imaf ims includeexpr infercase iskeyword keyprotocol langnoremap linespace lnr lw mat maxmemtot mkspellmem mod mousef mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion redrawtime ri rs sb scroll sections shcf shelltype showbreak si sm sn spellfile splitkeep ssl stmp swapsync synmaxcol tagcase tbi termbidi textauto thesaurusfunc tl ts ttybuiltin tws undodir varsofttabstop vfile visualbell wc wh wildignore wincolor winptydll wmw writebackup
-syn keyword vimOption contained al ar autoindent backspace balloonevalterm bexpr bo browsedir casemap cedit cink clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm endofline errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepformat guiheadroom helplang hk ic imak imsearch incsearch insertmode isp keywordprg langremap lisp loadplugins lz matchpairs mco ml modeline mousefocus mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe regexpengine rightleft rtp sbo scrollbind secure shell shellxescape showcmd sidescroll smartcase so spelllang splitright ssop sts swb syntax tagfunc tbidi termencoding textmode tildeop tm tsl ttyfast twsl undofile vartabstop vi vop wcm whichwrap wildignorecase window winwidth wop writedelay
-syn keyword vimOption contained aleph arab autoread backup balloonexpr bg bomb bs cb cf cinkeys cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei eof esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn grepprg guiligatures hf hkmap icon imc imsf inde is isprint km laststatus lispoptions lop ma matchtime mef mle modelineexpr mousehide mousetime nf ofu para penc pm previewwindow printoptions pw qftf relativenumber rightleftcmd ru sbr scrollfocus sel shellcmdflag shellxquote showcmdloc sidescrolloff smartindent softtabstop spelloptions spo st su swf ta taglength tbis termguicolors textwidth timeout to tsr ttym twt undolevels vb viewdir vsts wcr wi wildmenu winfixheight wiv wrap ws
-syn keyword vimOption contained allowrevins arabic autoshelldir backupcopy bdir bh breakat bsdir cc cfu cino cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtl guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces jumpoptions kmp lazyredraw lispwords lpl macatsui maxcombine menc mls modelines mousem mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shiftround showfulltag signcolumn smarttab sol spellsuggest spr sta sua switchbuf tabline tagrelative tbs termwinkey tf timeoutlen toolbar tsrfu ttymouse tx undoreload vbs viewoptions vts wd wic wildmode winfixwidth wiw wrapmargin ww
-syn keyword vimOption contained altkeymap arabicshape autowrite backupdir bdlay bin breakindent bsk ccv ch cinoptions cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw gtt guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js jop kp lbr list lrm magic maxfuncdepth menuitems mm modifiable mousemev mps nu opendevice paste pex pmbfn printencoding pt pythonhome quoteescape renderoptions rlc ruf scb scrolloff selectmode shellquote shiftwidth showmatch siso smc sp spf sps stal suffixes sws tabpagemax tags tc termwinscroll tfu title toolbariconsize ttimeout ttyscroll uc updatecount vdir vif wa weirdinvert wig wildoptions winheight wm wrapscan xtermcodes
-syn keyword vimOption contained ambiwidth ari autowriteall backupext belloff binary breakindentopt bt cd charconvert cinscopedecls cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guicursor guitablabel hid hl im imdisable imstyle indk isi key kpc lcs listchars ls makeef maxmapdepth mfd mmd modified mousemodel msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll rdt report rnu ruler scf scrollopt sessionoptions shellredir shm showmode sj smd spc spk sr startofline suffixesadd sxe tabstop tagstack tcldll termwinsize tgc titlelen top ttimeoutlen ttytype udf updatetime ve viminfo wak
+" GEN_SYN_VIM: vimOption normal, START_STR='syn keyword vimOption contained', END_STR=''
+syn keyword vimOption contained al aleph ari allowrevins ambw ambiwidth arab arabic arshape arabicshape acd autochdir ai autoindent ar autoread asd autoshelldir aw autowrite awa autowriteall bg background bs backspace bk backup bkc backupcopy bdir backupdir bex backupext bsk backupskip bdlay balloondelay beval ballooneval bevalterm balloonevalterm bexpr balloonexpr bo belloff bin binary bomb brk breakat bri breakindent briopt breakindentopt bsdir browsedir bh bufhidden bl buflisted bt buftype cmp casemap cdh cdhome cd cdpath cedit ccv charconvert cin cindent cink cinkeys cino cinoptions cinsd cinscopedecls cinw cinwords cb clipboard ch cmdheight cwh cmdwinheight cc colorcolumn co columns com comments cms commentstring cp compatible cpt complete cfu completefunc
+syn keyword vimOption contained cot completeopt cpp completepopup csl completeslash cocu concealcursor cole conceallevel cf confirm ci copyindent cpo cpoptions cm cryptmethod cspc cscopepathcomp csprg cscopeprg csqf cscopequickfix csre cscoperelative cst cscopetag csto cscopetagorder csverb cscopeverbose crb cursorbind cuc cursorcolumn cul cursorline culopt cursorlineopt debug def define deco delcombine dict dictionary diff dex diffexpr dip diffopt dg digraph dir directory dy display ead eadirection ed edcompatible emo emoji enc encoding eof endoffile eol endofline ea equalalways ep equalprg eb errorbells ef errorfile efm errorformat ek esckeys ei eventignore et expandtab ex exrc fenc fileencoding fencs fileencodings ff fileformat ffs fileformats fic fileignorecase
+syn keyword vimOption contained ft filetype fcs fillchars fixeol fixendofline fcl foldclose fdc foldcolumn fen foldenable fde foldexpr fdi foldignore fdl foldlevel fdls foldlevelstart fmr foldmarker fdm foldmethod fml foldminlines fdn foldnestmax fdo foldopen fdt foldtext fex formatexpr flp formatlistpat fo formatoptions fp formatprg fs fsync gd gdefault gfm grepformat gp grepprg gcr guicursor gfn guifont gfs guifontset gfw guifontwide ghr guiheadroom gli guiligatures go guioptions guipty gtl guitablabel gtt guitabtooltip hf helpfile hh helpheight hlg helplang hid hidden hl highlight hi history hk hkmap hkp hkmapp hls hlsearch icon iconstring ic ignorecase imaf imactivatefunc imak imactivatekey imc imcmdline imd imdisable imi iminsert ims imsearch imsf imstatusfunc
+syn keyword vimOption contained imst imstyle inc include inex includeexpr is incsearch inde indentexpr indk indentkeys inf infercase im insertmode isf isfname isi isident isk iskeyword isp isprint js joinspaces jop jumpoptions key kmp keymap km keymodel kpc keyprotocol kp keywordprg lmap langmap lm langmenu lnr langnoremap lrm langremap ls laststatus lz lazyredraw lbr linebreak lines lsp linespace lisp lop lispoptions lw lispwords list lcs listchars lpl loadplugins luadll magic mef makeef menc makeencoding mp makeprg mps matchpairs mat matchtime mco maxcombine mfd maxfuncdepth mmd maxmapdepth mm maxmem mmp maxmempattern mmt maxmemtot mis menuitems msm mkspellmem ml modeline mle modelineexpr mls modelines ma modifiable mod modified more mouse mousef mousefocus
+syn keyword vimOption contained mh mousehide mousem mousemodel mousemev mousemoveevent mouses mouseshape mouset mousetime mzq mzquantum mzschemedll mzschemegcdll nf nrformats nu number nuw numberwidth ofu omnifunc odev opendevice opfunc operatorfunc pp packpath para paragraphs paste pt pastetoggle pex patchexpr pm patchmode pa path perldll pi preserveindent pvh previewheight pvp previewpopup pvw previewwindow pdev printdevice penc printencoding pexpr printexpr pfn printfont pheader printheader pmbcs printmbcharset pmbfn printmbfont popt printoptions prompt ph pumheight pw pumwidth pythondll pythonhome pythonthreedll pythonthreehome pyx pyxversion qftf quickfixtextfunc qe quoteescape ro readonly rdt redrawtime re regexpengine rnu relativenumber remap rop renderoptions
+syn keyword vimOption contained report rs restorescreen ri revins rl rightleft rlc rightleftcmd rubydll ru ruler ruf rulerformat rtp runtimepath scr scroll scb scrollbind scf scrollfocus sj scrolljump so scrolloff sbo scrollopt sect sections secure sel selection slm selectmode ssop sessionoptions sh shell shcf shellcmdflag sp shellpipe shq shellquote srr shellredir ssl shellslash stmp shelltemp st shelltype sxe shellxescape sxq shellxquote sr shiftround sw shiftwidth shm shortmess sn shortname sbr showbreak sc showcmd sloc showcmdloc sft showfulltag sm showmatch smd showmode stal showtabline ss sidescroll siso sidescrolloff scl signcolumn scs smartcase si smartindent sta smarttab sms smoothscroll sts softtabstop spell spc spellcapcheck spf spellfile spl spelllang
+syn keyword vimOption contained spo spelloptions sps spellsuggest sb splitbelow spk splitkeep spr splitright sol startofline stl statusline su suffixes sua suffixesadd swf swapfile sws swapsync swb switchbuf smc synmaxcol syn syntax tal tabline tpm tabpagemax ts tabstop tbs tagbsearch tc tagcase tfu tagfunc tl taglength tr tagrelative tag tags tgst tagstack tcldll term tbidi termbidi tenc termencoding tgc termguicolors twk termwinkey twsl termwinscroll tws termwinsize twt termwintype terse ta textauto tx textmode tw textwidth tsr thesaurus tsrfu thesaurusfunc top tildeop to timeout tm timeoutlen title titlelen titleold titlestring tb toolbar tbis toolbariconsize ttimeout ttm ttimeoutlen tbi ttybuiltin tf ttyfast ttym ttymouse tsl ttyscroll tty ttytype udir undodir
+syn keyword vimOption contained udf undofile ul undolevels ur undoreload uc updatecount ut updatetime vsts varsofttabstop vts vartabstop vbs verbose vfile verbosefile vdir viewdir vop viewoptions vi viminfo vif viminfofile ve virtualedit vb visualbell warn wiv weirdinvert ww whichwrap wc wildchar wcm wildcharm wig wildignore wic wildignorecase wmnu wildmenu wim wildmode wop wildoptions wak winaltkeys wcr wincolor wi window wfb winfixbuf wfh winfixheight wfw winfixwidth wh winheight wmh winminheight wmw winminwidth winptydll wiw winwidth wrap wm wrapmargin ws wrapscan write wa writeany wb writebackup wd writedelay xtermcodes
" vimOptions: These are the turn-off setting variants {{{2
-syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoindent noautowrite noawa noballoonevalterm nobin nobl nobri nocdhome nocin noconfirm nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noendoffile noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc noimdisable noinfercase nojoinspaces nolangremap nolinebreak nolnr nolrm nomacatsui noml nomodeline nomodified nomousefocus nomousemoveevent noodev nopi noprompt norelativenumber norevins norl nors noruler nosc noscf noscrollfocus nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosmoothscroll nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi noterse notextmode notgc notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
-syn keyword vimOption contained noai noaltkeymap noar noarabicshape noasd noautoread noautowriteall nobackup nobeval nobinary nobomb nobuflisted nocf nocindent nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noemo noendofline noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolisp noloadplugins nolz nomagic nomle nomodelineexpr nomore nomousehide nonu noopendevice nopreserveindent nopvw noremap nori nornu noru nosb noscb noscrollbind noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosms nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs notermguicolors notextauto notf notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup noxtermcodes
-syn keyword vimOption contained noakm noanti noarab noari noautochdir noautoshelldir noaw noballooneval nobevalterm nobk nobreakindent nocdh noci nocompatible nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noemoji noeof noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf nois nolangnoremap nolbr nolist nolpl noma nomh nomod nomodifiable nomousef nomousemev nonumber nopaste nopreviewwindow noreadonly norestorescreen norightleft noro
+" GEN_SYN_VIM: vimOption turn-off, START_STR='syn keyword vimOption contained', END_STR=''
+syn keyword vimOption contained noari noallowrevins noarab noarabic noarshape noarabicshape noacd noautochdir noai noautoindent noar noautoread noasd noautoshelldir noaw noautowrite noawa noautowriteall nobk nobackup nobeval noballooneval nobevalterm noballoonevalterm nobin nobinary nobomb nobri nobreakindent nobl nobuflisted nocdh nocdhome nocin nocindent nocp nocompatible nocf noconfirm noci nocopyindent nocsre nocscoperelative nocst nocscopetag nocsverb nocscopeverbose nocrb nocursorbind nocuc nocursorcolumn nocul nocursorline nodeco nodelcombine nodiff nodg nodigraph noed noedcompatible noemo noemoji noeof noendoffile noeol noendofline noea noequalalways noeb noerrorbells noek noesckeys noet noexpandtab noex noexrc nofic nofileignorecase nofixeol nofixendofline
+syn keyword vimOption contained nofen nofoldenable nofs nofsync nogd nogdefault noguipty nohid nohidden nohk nohkmap nohkp nohkmapp nohls nohlsearch noicon noic noignorecase noimc noimcmdline noimd noimdisable nois noincsearch noinf noinfercase noim noinsertmode nojs nojoinspaces nolnr nolangnoremap nolrm nolangremap nolz nolazyredraw nolbr nolinebreak nolisp nolist nolpl noloadplugins nomagic noml nomodeline nomle nomodelineexpr noma nomodifiable nomod nomodified nomore nomousef nomousefocus nomh nomousehide nomousemev nomousemoveevent nonu nonumber noodev noopendevice nopaste nopi nopreserveindent nopvw nopreviewwindow noprompt noro noreadonly nornu norelativenumber noremap nors norestorescreen nori norevins norl norightleft noru noruler noscb noscrollbind noscf noscrollfocus
+syn keyword vimOption contained nosecure nossl noshellslash nostmp noshelltemp nosr noshiftround nosn noshortname nosc noshowcmd nosft noshowfulltag nosm noshowmatch nosmd noshowmode noscs nosmartcase nosi nosmartindent nosta nosmarttab nosms nosmoothscroll nospell nosb nosplitbelow nospr nosplitright nosol nostartofline noswf noswapfile notbs notagbsearch notr notagrelative notgst notagstack notbidi notermbidi notgc notermguicolors noterse nota notextauto notx notextmode notop notildeop noto notimeout notitle nottimeout notbi nottybuiltin notf nottyfast noudf noundofile novb novisualbell nowarn nowiv noweirdinvert nowic nowildignorecase nowmnu nowildmenu nowfb nowinfixbuf nowfh nowinfixheight nowfw nowinfixwidth nowrap nows nowrapscan nowrite nowa nowriteany
+syn keyword vimOption contained nowb nowritebackup noxtermcodes
" vimOptions: These are the invertible variants {{{2
-syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoindent invautowrite invawa invballoonevalterm invbin invbl invbri invcdhome invcin invconfirm invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invendoffile inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc invimdisable invinfercase invjoinspaces invlangremap invlinebreak invlnr invlrm invmacatsui invml invmodeline invmodified invmousefocus invmousemoveevent invodev invpi invprompt invrelativenumber invrevins invrl invrs invruler invsc invscf invscrollfocus invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsmoothscroll invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invterse invtextmode invtgc invtildeop invtitle invtop invttimeout invttyfast invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
-syn keyword vimOption contained invai invaltkeymap invar invarabicshape invasd invautoread invautowriteall invbackup invbeval invbinary invbomb invbuflisted invcf invcindent invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invemo invendofline invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs invlazyredraw invlisp invloadplugins invlz invmagic invmle invmodelineexpr invmore invmousehide invnu invopendevice invpreserveindent invpvw invremap invri invrnu invru invsb invscb invscrollbind invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsms invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invtermguicolors invtextauto invtf invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv invwrap invwrite invwritebackup invxtermcodes
-syn keyword vimOption contained invakm invanti invarab invari invautochdir invautoshelldir invaw invballooneval invbevalterm invbk invbreakindent invcdh invci invcompatible invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible invemoji inveof inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invinf invis invlangnoremap invlbr invlist invlpl invma invmh invmod invmodifiable invmousef invmousemev invnumber invpaste invpreviewwindow invreadonly invrestorescreen invrightleft invro
+" GEN_SYN_VIM: vimOption invertible, START_STR='syn keyword vimOption contained', END_STR=''
+syn keyword vimOption contained invari invallowrevins invarab invarabic invarshape invarabicshape invacd invautochdir invai invautoindent invar invautoread invasd invautoshelldir invaw invautowrite invawa invautowriteall invbk invbackup invbeval invballooneval invbevalterm invballoonevalterm invbin invbinary invbomb invbri invbreakindent invbl invbuflisted invcdh invcdhome invcin invcindent invcp invcompatible invcf invconfirm invci invcopyindent invcsre invcscoperelative invcst invcscopetag invcsverb invcscopeverbose invcrb invcursorbind invcuc invcursorcolumn invcul invcursorline invdeco invdelcombine invdiff invdg invdigraph inved invedcompatible invemo invemoji inveof invendoffile inveol invendofline invea invequalalways inveb inverrorbells invek invesckeys
+syn keyword vimOption contained invet invexpandtab invex invexrc invfic invfileignorecase invfixeol invfixendofline invfen invfoldenable invfs invfsync invgd invgdefault invguipty invhid invhidden invhk invhkmap invhkp invhkmapp invhls invhlsearch invicon invic invignorecase invimc invimcmdline invimd invimdisable invis invincsearch invinf invinfercase invim invinsertmode invjs invjoinspaces invlnr invlangnoremap invlrm invlangremap invlz invlazyredraw invlbr invlinebreak invlisp invlist invlpl invloadplugins invmagic invml invmodeline invmle invmodelineexpr invma invmodifiable invmod invmodified invmore invmousef invmousefocus invmh invmousehide invmousemev invmousemoveevent invnu invnumber invodev invopendevice invpaste invpi invpreserveindent invpvw invpreviewwindow
+syn keyword vimOption contained invprompt invro invreadonly invrnu invrelativenumber invremap invrs invrestorescreen invri invrevins invrl invrightleft invru invruler invscb invscrollbind invscf invscrollfocus invsecure invssl invshellslash invstmp invshelltemp invsr invshiftround invsn invshortname invsc invshowcmd invsft invshowfulltag invsm invshowmatch invsmd invshowmode invscs invsmartcase invsi invsmartindent invsta invsmarttab invsms invsmoothscroll invspell invsb invsplitbelow invspr invsplitright invsol invstartofline invswf invswapfile invtbs invtagbsearch invtr invtagrelative invtgst invtagstack invtbidi invtermbidi invtgc invtermguicolors invterse invta invtextauto invtx invtextmode invtop invtildeop invto invtimeout invtitle invttimeout invtbi invttybuiltin
+syn keyword vimOption contained invtf invttyfast invudf invundofile invvb invvisualbell invwarn invwiv invweirdinvert invwic invwildignorecase invwmnu invwildmenu invwfb invwinfixbuf invwfh invwinfixheight invwfw invwinfixwidth invwrap invws invwrapscan invwrite invwa invwriteany invwb invwritebackup invxtermcodes
" termcap codes (which can also be set) {{{2
-syn keyword vimOption contained t_8b t_8u t_AF t_AL t_bc t_BE t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_Ds t_EI t_F2 t_F4 t_F6 t_F8 t_fd t_fs t_IE t_k1 t_k2 t_K3 t_K4 t_K5 t_K6 t_K7 t_K8 t_K9 t_kb t_KB t_kd t_KD t_KE t_KG t_KH t_KI t_KK t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_PE t_PS t_RB t_RC t_RF t_Ri t_RI t_RK t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_Si t_SI t_so t_sr t_SR t_ST t_te t_Te t_TE t_ti t_TI t_ts t_Ts t_u7 t_ue t_us t_Us t_ut t_vb t_ve t_vi t_vs t_VS t_WP t_WS t_XM t_xn t_xs t_ZH t_ZR
-syn keyword vimOption contained t_8f t_AB t_al t_AU t_BD t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_ds t_EC t_F1 t_F3 t_F5 t_F7 t_F9 t_fe t_GP t_IS t_K1 t_k3 t_k4 t_k5 t_k6 t_k7 t_k8 t_k9 t_KA t_kB t_KC t_kD t_ke t_KF t_kh t_kI t_KJ t_kl
+" GEN_SYN_VIM: vimOption term output code, START_STR='syn keyword vimOption contained', END_STR=''
+syn keyword vimOption contained t_AB t_AF t_AU t_AL t_al t_bc t_BE t_BD t_cd t_ce t_Ce t_CF t_cl t_cm t_Co t_CS t_Cs t_cs t_CV t_da t_db t_DL t_dl t_ds t_Ds t_EC t_EI t_fs t_fd t_fe t_GP t_IE t_IS t_ke t_ks t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RF t_RB t_RC t_RI t_Ri t_RK t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_SI t_Si t_so t_SR t_sr t_ST t_Te t_te t_TE t_ti t_TI t_Ts t_ts t_u7 t_ue t_us t_Us t_ut t_vb t_ve t_vi t_VS t_vs t_WP t_WS t_XM t_xn t_xs t_ZH t_ZR t_8f t_8b t_8u
+" term key codes
+syn keyword vimOption contained t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 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_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_ku
syn match vimOption contained "t_%1"
syn match vimOption contained "t_#2"
syn match vimOption contained "t_#4"
@@ -68,29 +82,35 @@ syn match vimOption contained "t_%i"
syn match vimOption contained "t_k;"
" unsupported settings: some were supported by vi but don't do anything in vim {{{2
-" others have been dropped along with msdos support
-syn keyword vimErrSetting contained bioskey biosk conskey consk autoprint beautify flash graphic hardtabs mesg novice open op optimize redraw slow slowopen sourceany w300 w1200 w9600 hardtabs ht nobioskey nobiosk noconskey noconsk noautoprint nobeautify noflash nographic nohardtabs nomesg nonovice noopen noop nooptimize noredraw noslow noslowopen nosourceany now300 now1200 now9600 w1200 w300 w9600
+" GEN_SYN_VIM: Missing vimOption, START_STR='syn keyword vimErrSetting contained', END_STR=''
+syn keyword vimErrSetting contained akm altkeymap anti antialias ap autoprint bf beautify biosk bioskey consk conskey fk fkmap fl flash gr graphic ht hardtabs macatsui mesg novice open opt optimize oft osfiletype redraw slow slowopen sourceany w1200 w300 w9600
+syn keyword vimErrSetting contained noakm noaltkeymap noanti noantialias noap noautoprint nobf nobeautify nobiosk nobioskey noconsk noconskey nofk nofkmap nofl noflash nogr nographic nomacatsui nomesg nonovice noopen noopt nooptimize noredraw noslow noslowopen nosourceany
+syn keyword vimErrSetting contained invakm invaltkeymap invanti invantialias invap invautoprint invbf invbeautify invbiosk invbioskey invconsk invconskey invfk invfkmap invfl invflash invgr invgraphic invmacatsui invmesg invnovice invopen invopt invoptimize invredraw invslow invslowopen invsourceany
" AutoCmd Events {{{2
syn case ignore
-syn keyword vimAutoEvent contained BufAdd BufDelete BufFilePost BufHidden BufNew BufRead BufReadPost BufUnload BufWinLeave BufWrite BufWritePost CmdlineChanged CmdlineLeave CmdwinEnter ColorScheme CompleteChanged CompleteDonePre CursorHoldI CursorMovedI DiffUpdated DirChanged DirChangedPre EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileExplorer FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave InsertLeavePre MenuPopup ModeChanged OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost ShellCmdPost ShellFilterPost SigUSR1 SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TextChanged TextChangedI TextChangedP TextChangedT TextYankPost User VimEnter VimLeave VimLeavePre VimResized VimResume VimSuspend WinClosed WinEnter WinLeave WinNew WinResized WinScrolled
-syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre BufLeave BufNewFile BufReadCmd BufReadPre BufWinEnter BufWipeout BufWriteCmd BufWritePre CmdlineEnter CmdUndefined CmdwinLeave ColorSchemePre CompleteDone CursorHold CursorMoved
+" GEN_SYN_VIM: vimAutoEvent, START_STR='syn keyword vimAutoEvent contained', END_STR=''
+syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWritePost BufWritePre BufWriteCmd CmdlineChanged CmdlineEnter CmdlineLeave CmdwinEnter CmdwinLeave CmdUndefined ColorScheme ColorSchemePre CompleteChanged CompleteDone CompleteDonePre CursorHold CursorHoldI CursorMoved CursorMovedI DiffUpdated DirChanged DirChangedPre EncodingChanged ExitPre FileEncoding FileAppendPost FileAppendPre FileAppendCmd FileChangedShell FileChangedShellPost FileChangedRO FileReadPost FileReadPre FileReadCmd FileType FileWritePost FileWritePre FileWriteCmd FilterReadPost FilterReadPre FilterWritePost FilterWritePre
+syn keyword vimAutoEvent contained FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertEnter InsertLeave InsertLeavePre InsertCharPre MenuPopup ModeChanged OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost ShellCmdPost ShellFilterPost SigUSR1 SourceCmd SourcePre SourcePost SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabNew TabClosed TabEnter TabLeave TermChanged TerminalOpen TerminalWinOpen TermResponse TermResponseAll TextChanged TextChangedI TextChangedP TextChangedT User VimEnter VimLeave VimLeavePre WinNewPre WinNew WinClosed WinEnter WinLeave WinResized WinScrolled VimResized TextYankPost VimSuspend VimResume
" 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 CurSearch Cursor CursorColumn CursorIM CursorLine CursorLineFold CursorLineNr CursorLineSign DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr LineNrAbove LineNrBelow MatchParen Menu MessageWindow ModeMsg MoreMsg NonText Normal Pmenu PmenuExtra PmenuExtraSel PmenuKind PmenuKindSel PmenuSbar PmenuSel PmenuThumb Question QuickFixLine Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC StatusLineTerm StatusLineTermNC TabLine TabLineFill TabLineSel Terminal Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
-syn match vimHLGroup contained "Conceal"
+" GEN_SYN_VIM: vimHLGroup, START_STR='syn keyword vimHLGroup contained', END_STR=''
+syn keyword vimHLGroup contained ErrorMsg IncSearch ModeMsg NonText StatusLine StatusLineNC EndOfBuffer VertSplit VisualNOS DiffText PmenuSbar TabLineSel TabLineFill Cursor lCursor QuickFixLine CursorLineSign CursorLineFold CurSearch PmenuKind PmenuKindSel PmenuExtra PmenuExtraSel Normal Directory LineNr CursorLineNr MoreMsg Question Search SpellBad SpellCap SpellRare SpellLocal PmenuThumb Pmenu PmenuSel SpecialKey Title WarningMsg WildMenu Folded FoldColumn SignColumn Visual DiffAdd DiffChange DiffDelete TabLine CursorColumn CursorLine ColorColumn Conceal MatchParen StatusLineTerm StatusLineTermNC ToolbarLine ToolbarButton Menu Tooltip Scrollbar CursorIM LineNrAbove LineNrBelow
syn case match
" Function Names {{{2
-syn keyword vimFuncName contained abs argc assert_equal assert_match atan balloon_show bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline digraph_set eval exists_compiled extendnew findfile fnameescape foldtextresult get getchangelist getcmdcompltype getcompletion getfperm getline getpid getscriptinfo getwininfo glob2regpat histadd hlID indexof inputsecret isinf job_setoptions js_encode libcall list2str log10 mapnew matchdelete matchstrpos mzeval popup_atcursor popup_filter_menu popup_getpos popup_move pow prompt_setinterrupt prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx substitute synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_gui_event test_null_dict test_null_string test_settime timer_pause toupper typename values winbufnr win_getid win_id2win winnr win_splitmove
-syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 balloon_split buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype digraph_setlist eventhandler exp feedkeys flatten fnamemodify foreground getbufinfo getchar getcmdline getcurpos getfsize getloclist getpos gettabinfo getwinpos globpath histdel hlset input insert islocked job_start json_decode libcallnr listener_add luaeval mapset matchend max nextnonblank popup_beval popup_filter_yesno popup_hide popup_notification prevnonblank prompt_setprompt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapfilelist synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_ignore_error test_null_function test_option_not_set test_srand_seed timer_start tr undofile virtcol wincol win_gettype winlayout winrestcmd winwidth
-syn keyword vimFuncName contained add arglistid assert_exception assert_notequal autocmd_add blob2list bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler echoraw executable expand filereadable flattennew foldclosed fullcommand getbufline getcharmod getcmdpos getcursorcharpos getftime getmarklist getqflist gettabvar getwinposx has histget hostname inputdialog interrupt isnan job_status json_encode line listener_flush map match matchfuzzy menu_info nr2char popup_clear popup_findecho popup_list popup_setoptions printf prop_add prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strutf16len swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_mswin_event test_null_job test_override test_unknown timer_stop trim undotree virtcol2col windowsversion win_gotoid winline winrestview wordcount
-syn keyword vimFuncName contained and argv assert_fails assert_notmatch autocmd_delete browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID empty execute expandcmd filewritable float2nr foldclosedend funcref getbufoneline getcharpos getcmdscreenpos getcwd getftype getmatches getreg gettabwinvar getwinposy has_key histnr iconv inputlist invert items job_stop keys line2byte listener_remove maparg matchadd matchfuzzypos min or popup_close popup_findinfo popup_locate popup_settext prompt_getprompt prop_add_list prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdline setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart strwidth swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_blob test_null_list test_refcount test_void timer_stopall trunc uniq visualmode win_execute winheight win_move_separator winsaveview writefile
-syn keyword vimFuncName contained append asin assert_false assert_report autocmd_get browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy digraph_get environ exepath expr10 filter floor foldlevel function getbufvar getcharsearch getcmdtype getenv getimstatus getmousepos getreginfo gettagstack getwinvar haslocaldir hlexists indent inputrestore isabsolutepath job_getchannel join keytrans lispindent localtime mapcheck matchaddpos matchlist mkdir pathshorten popup_create popup_findpreview popup_menu popup_show prompt_setcallback prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime submatch synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_channel test_null_partial test_setmouse timer_info tolower type utf16idx wildmenumode win_findbuf win_id2tabwin win_move_statusline win_screenpos xor
-syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true balloon_gettext bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete digraph_getlist escape exists extend finddir fmod foldtext garbagecollect getcellwidths getcharstr getcmdwintype getfontname getjumplist getmouseshape getregtype gettext glob hasmapto hlget index inputsave isdirectory job_info js_decode len list2blob log maplist matcharg matchstr mode perleval popup_dialog popup_getoptions
+" GEN_SYN_VIM: vimFuncName, START_STR='syn keyword vimFuncName contained', END_STR=''
+syn keyword vimFuncName contained abs acos add and append appendbufline argc argidx arglistid argv asin assert_beeps assert_equal assert_equalfile assert_exception assert_fails assert_false assert_inrange assert_match assert_nobeep assert_notequal assert_notmatch assert_report assert_true atan atan2 autocmd_add autocmd_delete autocmd_get balloon_gettext balloon_show balloon_split blob2list browse browsedir bufadd bufexists buflisted bufload bufloaded bufname bufnr bufwinid bufwinnr byte2line byteidx byteidxcomp call ceil ch_canread ch_close ch_close_in ch_evalexpr ch_evalraw ch_getbufnr ch_getjob ch_info ch_log ch_logfile ch_open ch_read ch_readblob ch_readraw ch_sendexpr ch_sendraw ch_setoptions ch_status changenr char2nr charclass charcol charidx chdir cindent
+syn keyword vimFuncName contained clearmatches col complete complete_add complete_check complete_info confirm copy cos cosh count cscope_connection cursor debugbreak deepcopy delete deletebufline did_filetype diff diff_filler diff_hlID digraph_get digraph_getlist digraph_set digraph_setlist echoraw empty environ err_teapot escape eval eventhandler executable execute exepath exists exists_compiled exp expand expandcmd extend extendnew feedkeys filereadable filewritable filter finddir findfile flatten flattennew float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreach foreground fullcommand funcref function garbagecollect get getbufinfo getbufline getbufoneline getbufvar getcellwidths getchangelist getchar getcharmod
+syn keyword vimFuncName contained getcharpos getcharsearch getcharstr getcmdcompltype getcmdline getcmdpos getcmdscreenpos getcmdtype getcmdwintype getcompletion getcurpos getcursorcharpos getcwd getenv getfontname getfperm getfsize getftime getftype getimstatus getjumplist getline getloclist getmarklist getmatches getmousepos getmouseshape getpid getpos getqflist getreg getreginfo getregion getregtype getscriptinfo gettabinfo gettabvar gettabwinvar gettagstack gettext getwininfo getwinpos getwinposx getwinposy getwinvar glob glob2regpat globpath has has_key haslocaldir hasmapto histadd histdel histget histnr hlID hlexists hlget hlset hostname iconv indent index indexof input inputdialog inputlist inputrestore inputsave inputsecret insert instanceof interrupt
+syn keyword vimFuncName contained invert isabsolutepath isdirectory isinf islocked isnan items job_getchannel job_info job_setoptions job_start job_status job_stop join js_decode js_encode json_decode json_encode keys keytrans len libcall libcallnr line line2byte lispindent list2blob list2str listener_add listener_flush listener_remove localtime log log10 luaeval map maparg mapcheck maplist mapnew mapset match matchadd matchaddpos matcharg matchbufline matchdelete matchend matchfuzzy matchfuzzypos matchlist matchstr matchstrlist matchstrpos max menu_info min mkdir mode mzeval nextnonblank nr2char or pathshorten perleval popup_atcursor popup_beval popup_clear popup_close popup_create popup_dialog popup_filter_menu popup_filter_yesno popup_findecho popup_findinfo
+syn keyword vimFuncName contained popup_findpreview popup_getoptions popup_getpos popup_hide popup_list popup_locate popup_menu popup_move popup_notification popup_setoptions popup_settext popup_show pow prevnonblank printf prompt_getprompt prompt_setcallback prompt_setinterrupt prompt_setprompt prop_add prop_add_list prop_clear prop_find prop_list prop_remove prop_type_add prop_type_change prop_type_delete prop_type_get prop_type_list pum_getpos pumvisible py3eval pyeval pyxeval rand range readblob readdir readdirex readfile reduce reg_executing reg_recording reltime reltimefloat reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remote_startserver remove rename repeat resolve reverse round rubyeval screenattr screenchar screenchars
+syn keyword vimFuncName contained screencol screenpos screenrow screenstring search searchcount searchdecl searchpair searchpairpos searchpos server2client serverlist setbufline setbufvar setcellwidths setcharpos setcharsearch setcmdline setcmdpos setcursorcharpos setenv setfperm setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar settagstack setwinvar sha256 shellescape shiftwidth sign_define sign_getdefined sign_getplaced sign_jump sign_place sign_placelist sign_undefine sign_unplace sign_unplacelist simplify sin sinh slice sort sound_clear sound_playevent sound_playfile sound_stop soundfold spellbadword spellsuggest split sqrt srand state str2float str2list str2nr strcharlen strcharpart strchars strdisplaywidth strftime strgetchar stridx
+syn keyword vimFuncName contained string strlen strpart strptime strridx strtrans strutf16len strwidth submatch substitute swapfilelist swapinfo swapname synID synIDattr synIDtrans synconcealed synstack system systemlist tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname term_dumpdiff term_dumpload term_dumpwrite term_getaltscreen term_getansicolors term_getattr term_getcursor term_getjob term_getline term_getscrolled term_getsize term_getstatus term_gettitle term_gettty term_list term_scrape term_sendkeys term_setansicolors term_setapi term_setkill term_setrestore term_setsize term_start term_wait terminalprops test_alloc_fail test_autochdir test_feedinput test_garbagecollect_now test_garbagecollect_soon test_getvalue test_gui_event test_ignore_error
+syn keyword vimFuncName contained test_mswin_event test_null_blob test_null_channel test_null_dict test_null_function test_null_job test_null_list test_null_partial test_null_string test_option_not_set test_override test_refcount test_setmouse test_settime test_srand_seed test_unknown test_void timer_info timer_pause timer_start timer_stop timer_stopall tolower toupper tr trim trunc type typename undofile undotree uniq utf16idx values virtcol virtcol2col visualmode wildmenumode win_execute win_findbuf win_getid win_gettype win_gotoid win_id2tabwin win_id2win win_move_separator win_move_statusline win_screenpos win_splitmove winbufnr wincol windowsversion winheight winlayout winline winnr winrestcmd winrestview winsaveview winwidth wordcount writefile xor
"--- syntax here and above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
@@ -154,9 +174,6 @@ else
com! -nargs=* VimFoldt <args>
endif
-" commands not picked up by the generator (due to non-standard format) {{{2
-syn keyword vimCommand contained py3
-
" Deprecated variable options {{{2
if exists("g:vim_minlines")
let g:vimsyn_minlines= g:vim_minlines
@@ -177,17 +194,19 @@ endif
" Numbers {{{2
" =======
-syn match vimNumber '\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=' skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment,vim9Comment
-syn match vimNumber '-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=' skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment,vim9Comment
-syn match vimNumber '\<0[xX]\x\+' skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment,vim9Comment
-syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment,vim9Comment
-syn match vimNumber '\<0[zZ][a-zA-Z0-9.]\+' skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment,vim9Comment
-syn match vimNumber '0[0-7]\+' skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment,vim9Comment
-syn match vimNumber '0[bB][01]\+' skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment,vim9Comment
+syn case ignore
+syn match vimNumber '\<\d\+\%(\.\d\+\%(e[+-]\=\d\+\)\=\)\=' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
+syn match vimNumber '\<0b[01]\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
+syn match vimNumber '\<0o\=\o\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
+syn match vimNumber '\<0x\x\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
+syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
+syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
+syn case match
" All vimCommands are contained by vimIsCommand. {{{2
-syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimEcho,vimEchoHL,vimExecute,vimIsCommand,vimExtCmd,vimFilter,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNorm,vimSet,vimSyntax,vimUnlet,vimUnmap,vimUserCmd
-syn match vimIsCommand "\<\h\w*\>" contains=vimCommand
+syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimDef,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNotFunc,vimNorm,vimSet,vimSyntax,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate
+syn match vimCmdSep "[:|]\+" skipwhite nextgroup=@vimCmdList,vimSubst1
+syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" contains=vimCommand
syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>"
syn match vimVar "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>"
syn match vimVar "\s\zs&\%([lg]:\)\=\a\+\>"
@@ -196,6 +215,8 @@ syn match vimVar "\s\zs&t_k;"
syn match vimFBVar contained "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>"
syn keyword vimCommand contained in
+syn cluster vimExprList contains=vimEnvvar,vimFunc,vimFuncVar,vimNumber,vimOper,vimOperParen,vimLetRegister,vimString,vimVar
+
" Insertions And Appends: insert append {{{2
" (buftype != nofile test avoids having append, change, insert show up in the command window)
" =======================
@@ -207,11 +228,12 @@ endif
" Behave! {{{2
" =======
-syn match vimBehave "\<be\%[have]\>" skipwhite nextgroup=vimBehaveModel,vimBehaveError
-syn keyword vimBehaveModel contained mswin xterm
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nobehaveerror")
syn match vimBehaveError contained "[^ ]\+"
endif
+syn match vimBehave "\<be\%[have]\>" nextgroup=vimBehaveBang,vimBehaveModel,vimBehaveError skipwhite
+syn match vimBehaveBang contained "\a\@1<=!" nextgroup=vimBehaveModel skipwhite
+syn keyword vimBehaveModel contained mswin xterm
" Filetypes {{{2
" =========
@@ -224,25 +246,29 @@ 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=vimAugroup,vimIsCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimNotFunc,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vim9Comment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue,vimOption
+syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
+syn match vimAugroup "\<aug\%[roup]\>" contains=vimAugroupKey,vimAugroupBang skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a'
- syn region vimAugroup fold matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
+ syn region vimAugroup fold start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+" matchgroup=vimAugroupKey end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList,vimAugroupkey skipwhite nextgroup=vimAugroupEnd
else
- syn region vimAugroup matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
+ syn region vimAugroup start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+" matchgroup=vimAugroupKey end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList,vimAugroupkey skipwhite nextgroup=vimAugroupEnd
endif
-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]\>"
+ syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
endif
-syn keyword vimAugroupKey contained aug[roup]
+
+syn match vimAutoCmdGroup contained "\S\+"
+syn match vimAugroupEnd contained "\c\<END\>"
+syn match vimAugroupBang contained "\a\@1<=!" skipwhite nextgroup=vimAutoCmdGroup
+syn keyword vimAugroupKey contained aug[roup] skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup,vimAugroupEnd
" Operators: {{{2
" =========
-syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimType,vimRegister,vimContinue,vim9Comment,vimVar
+syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,@vimContinue,vim9Comment,vimVar
syn match vimOper "||\|&&\|[-+*/%.!]" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\|!\~#\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile
-syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=vimoperStar,@vimOperGroup
+syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup
syn region vimOperParen matchgroup=vimSep start="#\={" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror")
syn match vimOperError ")"
@@ -250,33 +276,70 @@ 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,vim9Comment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimEnvvar,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLetHereDoc,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
-syn match vimFunction "\<\(fu\%[nction]\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
-syn match vimFunction "\<def!\=\s\+\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
-"syn match vimFunction "\<def!\=\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
+syn cluster vimFuncList contains=vimFuncBang,vimFunctionError,vimFuncKey,vimFuncSID,Tag
+syn cluster vimDefList contains=vimFuncBang,vimFunctionError,vimDefKey,vimFuncSID,Tag
+syn cluster vimFuncBodyList contains=@vimCmdList,vimCmplxRepeat,vimComment,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimLetHereDoc,vimLineComment,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst
+syn cluster vimDefBodyList contains=@vimCmdList,vimCmplxRepeat,vim9Comment,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vim9LineComment,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst
+
+syn region vimFuncPattern contained matchgroup=vimOper start="/" end="$" contains=@vimSubstList
+syn match vimFunction "\<fu\%[nction]\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimFuncKey
+syn match vimDef "\<def\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimDefKey
+
+syn match vimFunction "\<fu\%[nction]\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimFuncList skipwhite nextgroup=vimFuncParams
+syn match vimDef "\<def\s\+new\%(\i\|{.\{-1,}}\)\+" contains=@vimDefList nextgroup=vimDefParams
+syn match vimDef "\<def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimDefList nextgroup=vimDefParams
+
+syn match vimFuncComment contained +".*+ skipwhite skipnl nextgroup=vimFuncBody,vimEndfunction
+syn match vimDefComment contained "#.*" skipwhite skipnl nextgroup=vimDefBody,vimEnddef
+
+syn match vimFuncBang contained "!"
+syn match vimFuncSID contained "\c<sid>"
+syn match vimFuncSID contained "\<[sg]:"
+syn keyword vimFuncKey contained fu[nction]
+syn keyword vimDefKey contained def
+
+syn region vimFuncParams contained matchgroup=Delimiter start="(" skip=+\n\s*\\\|\n\s*"\\ + end=")" skipwhite skipnl nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod contains=vimFuncParam,@vimContinue
+syn region vimDefParams contained matchgroup=Delimiter start="(" end=")" skipwhite skipnl nextgroup=vimDefBody,vimDefComment,vimEnddef,vimReturnType contains=vimDefParam,vim9Comment
+syn match vimFuncParam contained "\<\h\w*\>\|\.\.\." skipwhite nextgroup=vimFuncParamEquals
+syn match vimDefParam contained "\<\h\w*\>" skipwhite nextgroup=vimParamType,vimFuncParamEquals
+
+syn match vimFuncParamEquals contained "=" skipwhite nextgroup=@vimExprList
+syn match vimFuncMod contained "\<\%(abort\|closure\|dict\|range\)\>" skipwhite skipnl nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod
+
+syn region vimFuncBody contained start="^" matchgroup=vimCommand end="\<endfu\%[nction]\>" contains=@vimFuncBodyList
+syn region vimDefBody contained start="^" matchgroup=vimCommand end="\<enddef\>" contains=@vimDefBodyList
+
+syn match vimEndfunction "\<endf\%[unction]\>"
+syn match vimEnddef "\<enddef\>"
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
- syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList
-else
- syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList
+ syn region vimFuncFold start="\<fu\%[nction]\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+\s*(" end="\<endf\%[unction]\>" contains=vimFunction fold keepend transparent
+ syn region vimFuncFold start="\<def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+(" end="\<enddef\>" contains=vimDef fold keepend transparent
+ syn region vimFuncFold start="\<def\s\+new\%(\i\|{.\{-1,}}\)\+(" end="\<enddef\>" contains=vimDef fold keepend transparent
endif
-syn match vimFuncVar contained "a:\(\K\k*\|\d\+\)"
-syn match vimFuncSID contained "\c<sid>\|\<s:"
-syn keyword vimFuncKey contained fu[nction]
-syn keyword vimFuncKey contained def
-syn match vimFuncBlank contained "\s\+"
-syn keyword vimPattern contained start skip end
+syn match vimFuncVar contained "a:\%(\K\k*\|\d\+\)\>"
+syn match vimFuncBlank contained "\s\+"
+" Types: {{{2
+" =====
" vimTypes : new for vim9
-syn match vimType ":\s*\zs\<\(bool\|number\|float\|string\|blob\|list<\|dict<\|job\|channel\|func\)\>"
+syn region vimReturnType contained start=":\s" end="$" matchgroup=vim9Comment end="\ze#" skipwhite skipnl nextgroup=vimDefBody,vimDefComment,vimEnddef contains=vimTypeSep transparent
+syn match vimParamType contained ":\s\+\a" skipwhite skipnl nextgroup=vimFuncParamEquals contains=vimTypeSep,@vimType
+
+syn match vimTypeSep contained ":\s\@=" skipwhite nextgroup=@vimType
+syn keyword vimType contained any blob bool channel float job number string void
+syn match vimType contained "\<func\>"
+syn region vimCompoundType contained matchgroup=vimType start="\<func(" end=")" nextgroup=vimTypeSep contains=@vimType oneline transparent
+syn region vimCompoundType contained matchgroup=vimType start="\<\%(list\|dict\)<" end=">" contains=@vimType oneline transparent
+syn match vimUserType contained "\<\u\w*\>"
+
+syn cluster vimType contains=vimType,vimCompoundType,vimUserType
" Keymaps: (Vim Project Addition) {{{2
" =======
-" TODO: autogenerated vimCommand keyword list does not handle all abbreviations
-" : handle Vim9 script comments when something like #13104 is merged
+" TODO: handle Vim9 script comments when something like #13104 is merged
syn match vimKeymapStart "^" contained skipwhite nextgroup=vimKeymapLhs,vimKeymapLineComment
syn match vimKeymapLhs "\S\+" contained skipwhite nextgroup=vimKeymapRhs contains=vimNotation
syn match vimKeymapRhs "\S\+" contained skipwhite nextgroup=vimKeymapTailComment contains=vimNotation
@@ -287,17 +350,17 @@ syn region vimKeymap matchgroup=vimCommand start="\<loadk\%[eymap]\>" end="\%$"
" Special Filenames, Modifiers, Extension Removal: {{{2
" ===============================================
-syn match vimSpecFile "<c\(word\|WORD\)>" nextgroup=vimSpecFileMod,vimSubst
-syn match vimSpecFile "<\([acs]file\|amatch\|abuf\)>" nextgroup=vimSpecFileMod,vimSubst
-syn match vimSpecFile "\s%[ \t:]"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst
-syn match vimSpecFile "\s%$"ms=s+1 nextgroup=vimSpecFileMod,vimSubst
-syn match vimSpecFile "\s%<"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst
-syn match vimSpecFile "#\d\+\|[#%]<\>" nextgroup=vimSpecFileMod,vimSubst
+syn match vimSpecFile "<c\(word\|WORD\)>" nextgroup=vimSpecFileMod,vimSubst1
+syn match vimSpecFile "<\([acs]file\|amatch\|abuf\)>" nextgroup=vimSpecFileMod,vimSubst1
+syn match vimSpecFile "\s%[ \t:]"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst1
+syn match vimSpecFile "\s%$"ms=s+1 nextgroup=vimSpecFileMod,vimSubst1
+syn match vimSpecFile "\s%<"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst1
+syn match vimSpecFile "#\d\+\|[#%]<\>" nextgroup=vimSpecFileMod,vimSubst1
syn match vimSpecFileMod "\(:[phtre]\)\+" contained
" User-Specified Commands: {{{2
" =======================
-syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
+syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange
syn keyword vimUserCommand contained com[mand]
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter
syn match vimUserAttrbError contained "-\a\+\ze\s"
@@ -314,9 +377,10 @@ if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror")
endif
syn case ignore
syn keyword vimUserAttrbKey contained bar ban[g] cou[nt] ra[nge] com[plete] n[args] re[gister]
-syn keyword vimUserAttrbCmplt contained augroup buffer behave color command compiler cscope dir environment event expression file file_in_path filetype function help highlight history locale mapping menu option packadd shellcmd sign syntax syntime tag tag_listfiles user var
+" GEN_SYN_VIM: vimUserAttrbCmplt, START_STR='syn keyword vimUserAttrbCmplt contained', END_STR=''
+syn keyword vimUserAttrbCmplt contained arglist augroup behave buffer color command compiler cscope diff_buffer dir environment event expression file file_in_path filetype function help highlight history keymap locale mapclear mapping menu messages syntax syntime option packadd runtime shellcmd sign tag tag_listfiles user var breakpoint scriptnames
syn keyword vimUserAttrbCmplt contained custom customlist nextgroup=vimUserAttrbCmpltFunc,vimUserCmdError
-syn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*\%(#\h\w*\)\+\|\h\w*\)"hs=s+1 nextgroup=vimUserCmdError
+syn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*\%([.#]\h\w*\)\+\|\h\w*\)"hs=s+1 nextgroup=vimUserCmdError
syn case match
syn match vimUserAttrbCmplt contained "custom,\u\w*"
@@ -353,45 +417,54 @@ syn match vimNotPatSep contained "\\\\"
syn cluster vimStringGroup contains=vimEscape,vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell
syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ contains=@vimStringGroup
syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]'+lc=1 end=+'+
-syn region vimString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=@vimStringGroup
-syn region vimString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=@vimStringGroup
"syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup " see tst45.vim
syn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont
syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+
syn match vimEscape contained "\\."
+" syn match vimEscape contained +\\[befnrt\"]+
+syn match vimEscape contained "\\\o\{1,3}\|\\[xX]\x\{1,2}\|\\u\x\{1,4}\|\\U\x\{1,8}"
+syn match vimEscape contained "\\<" contains=vimNotation
+syn match vimEscape contained "\\<\*[^>]*>\=>"
+
+syn region vimString oneline start=+$'+ skip=+''+ end=+'+ contains=vimStringInterpolationBrace,vimStringInterpolationExpr
+syn region vimString oneline start=+$"+ end=+"+ contains=@vimStringGroup,vimStringInterpolationBrace,vimStringInterpolationExpr
+syn region vimStringInterpolationExpr oneline contained matchgroup=vimSep start=+{+ end=+}+ contains=@vimExprList
+syn match vimStringInterpolationBrace contained "{{"
+syn match vimStringInterpolationBrace contained "}}"
" Substitutions: {{{2
" =============
syn cluster vimSubstList contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation
syn cluster vimSubstRepList contains=vimSubstSubstr,vimSubstTwoBS,vimNotation
syn cluster vimSubstList add=vimCollection
-syn match vimSubst "\(:\+\s*\|^\s*\||\s*\)\<\%(\<s\%[ubstitute]\>\|\<sm\%[agic]\>\|\<sno\%[magic]\>\)[:#[:alpha:]]\@!" nextgroup=vimSubstPat
-"syn match vimSubst "\%(^\|[^\\]\)\<s\%[ubstitute]\>[:#[:alpha:]]\@!" nextgroup=vimSubstPat contained
-syn match vimSubst "\%(^\|[^\\\"']\)\<s\%[ubstitute]\>[:#[:alpha:]\"']\@!" nextgroup=vimSubstPat contained
-syn match vimSubst "/\zs\<s\%[ubstitute]\>\ze/" nextgroup=vimSubstPat
-syn match vimSubst "\(:\+\s*\|^\s*\)s\ze#.\{-}#.\{-}#" nextgroup=vimSubstPat
-syn match vimSubst1 contained "\<s\%[ubstitute]\>" nextgroup=vimSubstPat
-syn match vimSubst2 contained "s\%[ubstitute]\>" nextgroup=vimSubstPat
-syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([^a-zA-Z( \t[\]&]\)"rs=s+1 skip="\\\\\|\\\z1" end="\z1"re=e-1,me=e-1 contains=@vimSubstList nextgroup=vimSubstRep4 oneline
-syn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline
-syn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass
-syn match vimCollClassErr contained "\[:.\{-\}:\]"
-syn match vimCollClass contained transparent "\%#=1\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|retu\%[rn]\|tab\|escape\|backspace\):\]"
-syn match vimSubstSubstr contained "\\z\=\d"
-syn match vimSubstTwoBS contained "\\\\"
-syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags
-syn match vimSubstFlags contained "[&cegiIlnpr#]\+"
+syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)\>[\"#|]\@!" nextgroup=vimSubstPat
+syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)_\@=" nextgroup=vimSubstPat
+syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)\ze#.\{-}#.\{-}#" nextgroup=vimSubstPat
+syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)\>[\"#|]\@!" nextgroup=vimSubstPat
+syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)_\@=" nextgroup=vimSubstPat
+syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)\ze#.\{-}#.\{-}#" nextgroup=vimSubstPat
+" TODO: Vim9 illegal separators for abbreviated :s form are [-.:], :su\%[...] required
+" : # is allowed but "not recommended" (see :h pattern-delimiter)
+syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)"rs=s+1 skip="\\\\\|\\\z1" end="\z1"re=e-1,me=e-1 contains=@vimSubstList nextgroup=vimSubstRep4 oneline
+syn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline
+syn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass
+syn match vimCollClassErr contained "\[:.\{-\}:\]"
+syn match vimCollClass contained transparent "\%#=1\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|retu\%[rn]\|tab\|escape\|backspace\):\]"
+syn match vimSubstSubstr contained "\\z\=\d"
+syn match vimSubstTwoBS contained "\\\\"
+syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags
+syn match vimSubstFlags contained "[&cegiIlnpr#]\+"
" 'String': {{{2
syn match vimString "[^(,]'[^']\{-}\zs'"
" Marks, Registers, Addresses, Filters: {{{2
-syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst
-syn match vimMark "'[<>]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst
-syn match vimMark ",\zs'[<>]\ze" nextgroup=vimFilter,vimMarkNumber,vimSubst
-syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst
-syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst
-syn match vimMarkNumber "[-+]\d\+" contained contains=vimOper nextgroup=vimSubst2
+syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
+syn match vimMark "'[<>]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
+syn match vimMark ",\zs'[<>]\ze" nextgroup=vimFilter,vimMarkNumber,vimSubst1
+syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
+syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
+syn match vimMarkNumber "[-+]\d\+" contained contains=vimOper nextgroup=vimSubst1
syn match vimPlainMark contained "'[a-zA-Z0-9]"
syn match vimRange "[`'][a-zA-Z0-9],[`'][a-zA-Z0-9]" contains=vimMark skipwhite nextgroup=vimFilter
@@ -437,9 +510,11 @@ syn keyword vimLet var skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc
" For: {{{2
" ===
syn keyword vimFor for skipwhite nextgroup=vimVar,vimVarList
+
" Abbreviations: {{{2
" =============
-syn keyword vimAbb ab[breviate] ca[bbrev] inorea[bbrev] cnorea[bbrev] norea[bbrev] ia[bbrev] skipwhite nextgroup=vimMapMod,vimMapLhs
+" GEN_SYN_VIM: vimCommand abbrev, START_STR='syn keyword vimAbb', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs'
+syn keyword vimAbb ab[breviate] ca[bbrev] cnorea[bbrev] cuna[bbrev] ia[bbrev] inorea[bbrev] iuna[bbrev] norea[bbrev] una[bbreviate] skipwhite nextgroup=vimMapMod,vimMapLhs
" Autocmd: {{{2
" =======
@@ -451,59 +526,104 @@ syn match vimAutoCmdMod "\(++\)\=\(once\|nested\)"
" Echo And Execute: -- prefer strings! {{{2
" ================
-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
+" NOTE: No trailing comments
+
+syn region vimEcho
+ \ matchgroup=vimCommand
+ \ start="\<ec\%[ho]\>"
+ \ start="\<echoe\%[rr]\>"
+ \ start="\<echom\%[sg]\>"
+ \ start="\<echoc\%[onsole]\>"
+ \ start="\<echon\>"
+ \ start="\<echow\%[indow]\>"
+ \ skip=+\\|\|\n\s*\\\|\n\s*"\\ +
+ \ matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimExprList transparent
+
+syn match vimEchohl "\<echohl\=\>" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchohlNone
syn case ignore
-syn keyword vimEchoHLNone none
+syn keyword vimEchohlNone contained none
syn case match
+syn cluster vimEcho contains=vimEcho,vimEchohl
+
+syn region vimExecute matchgroup=vimCommand start="\<exe\%[cute]\>" skip=+\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimExprList transparent
+
" Maps: {{{2
" ====
-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] tno[remap] tm[ap] vm[ap] vmapc[lear] vn[oremap] xm[ap] xn[oremap] 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] tunma[p] unm[ap] unm[ap] vu[nmap] xu[nmap] 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 vimMap "\<map\>\ze\s*(\@!" skipwhite nextgroup=vimMapMod,vimMapLhs
+syn match vimMap "\<map!" contains=vimMapBang skipwhite nextgroup=vimMapMod,vimMapLhs
+" GEN_SYN_VIM: vimCommand map, START_STR='syn keyword vimMap', END_STR='skipwhite nextgroup=vimMapBang,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] tma[p] tno[remap] vm[ap] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
+" GEN_SYN_VIM: vimCommand mapclear, START_STR='syn keyword vimMap', END_STR='skipwhite nextgroup=vimMapMod'
+syn keyword vimMap cmapc[lear] imapc[lear] lmapc[lear] nmapc[lear] omapc[lear] smapc[lear] tmapc[lear] vmapc[lear] xmapc[lear] skipwhite nextgroup=vimMapMod
+syn keyword vimMap mapc[lear] skipwhite nextgroup=vimMapBang,vimMapMod
+" GEN_SYN_VIM: vimCommand unmap, START_STR='syn keyword vimUnmap', END_STR='skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs'
+syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] tunma[p] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
+syn match vimMapLhs contained "\%(.\|\S\)\+" contains=vimCtrlChar,vimNotation skipwhite nextgroup=vimMapRhs
+syn match vimMapLhs contained "\%(.\|\S\)\+\ze\s*$" contains=vimCtrlChar,vimNotation skipwhite skipnl nextgroup=vimMapRhsContinue
+syn match vimMapBang contained "\a\@1<=!" skipwhite nextgroup=vimMapMod,vimMapLhs
syn match vimMapMod contained "\%#=1\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=vimContinue
+syn region vimMapRhs contained start="\S" skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation skipnl nextgroup=vimMapRhsContinue
+" assume a continuation comment introduces the RHS
+syn region vimMapRhsContinue contained start=+^\s*\%(\\\|"\\ \)+ skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation
syn case ignore
syn keyword vimMapModKey contained buffer expr leader localleader nowait plug script sid silent unique
syn case match
" Menus: {{{2
" =====
-syn cluster vimMenuList contains=vimMenuBang,vimMenuPriority,vimMenuName,vimMenuMod
-syn keyword vimCommand am[enu] an[oremenu] aun[menu] cme[nu] cnoreme[nu] cunme[nu] ime[nu] inoreme[nu] iunme[nu] me[nu] nme[nu] nnoreme[nu] noreme[nu] nunme[nu] ome[nu] onoreme[nu] ounme[nu] unme[nu] vme[nu] vnoreme[nu] vunme[nu] skipwhite nextgroup=@vimMenuList
-syn match vimMenuName "[^ \t\\<]\+" contained nextgroup=vimMenuNameMore,vimMenuMap
-syn match vimMenuPriority "\d\+\(\.\d\+\)*" contained skipwhite nextgroup=vimMenuName
-syn match vimMenuNameMore "\c\\\s\|<tab>\|\\\." contained nextgroup=vimMenuName,vimMenuNameMore contains=vimNotation
-syn match vimMenuMod contained "\c<\(script\|silent\)\+>" skipwhite contains=vimMapModKey,vimMapModErr nextgroup=@vimMenuList
-syn match vimMenuMap "\s" contained skipwhite nextgroup=vimMenuRhs
-syn match vimMenuRhs ".*$" contained contains=vimString,vimComment,vim9Comment,vimIsCommand
-syn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList
+" NOTE: tail comments disallowed
+" GEN_SYN_VIM: vimCommand menu, START_STR='syn keyword vimMenu', END_STR='skipwhite nextgroup=vimMenuBang,vimMenuMod,vimMenuName,vimMenuPriority,vimMenuStatus'
+syn keyword vimMenu am[enu] an[oremenu] aun[menu] cme[nu] cnoreme[nu] cunme[nu] ime[nu] inoreme[nu] iunme[nu] me[nu] nme[nu] nnoreme[nu] noreme[nu] nunme[nu] ome[nu] onoreme[nu] ounme[nu] sme[nu] snoreme[nu] sunme[nu] tlm[enu] tln[oremenu] tlu[nmenu] tm[enu] tu[nmenu] unme[nu] vme[nu] vnoreme[nu] vunme[nu] xme[nu] xnoreme[nu] xunme[nu] skipwhite nextgroup=vimMenuBang,vimMenuMod,vimMenuName,vimMenuPriority,vimMenuStatus
+syn keyword vimMenu popu[p] skipwhite nextgroup=vimMenuBang,vimMenuName
+syn region vimMenuRhs contained contains=@vimContinue,vimNotation start="|\@!\S" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + end="$" matchgroup=vimSep end="|"
+syn region vimMenuRhsContinue contained contains=@vimContinue,vimNotation start=+^\s*\%(\\\|"\\ \)+ skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + end="$" matchgroup=vimSep end="|"
+syn match vimMenuName "\.\@!\%(\\\s\|\S\)\+" contained contains=vimMenuNotation,vimNotation skipwhite nextgroup=vimCmdSep,vimMenuRhs
+syn match vimMenuName "\.\@!\%(\\\s\|\S\)\+\ze\s*$" contained contains=vimMenuNotation,vimNotation skipwhite skipnl nextgroup=vimCmdSep,vimMenuRhsContinue
+syn match vimMenuNotation "&\a\|&&\|\\\s\|\\\." contained
+syn match vimMenuPriority "\<\d\+\%(\.\d\+\)*\>" contained skipwhite nextgroup=vimMenuName
+syn match vimMenuMod "\c<\%(script\|silent\|special\)>" contained skipwhite nextgroup=vimMenuName,vimMenuPriority,vimMenuMod contains=vimMapModKey,vimMapModErr
+syn keyword vimMenuStatus enable disable nextgroup=vimMenuName skipwhite
+syn match vimMenuBang "\a\@1<=!" contained skipwhite nextgroup=vimMenuName,vimMenuMod
+
+syn region vimMenutranslate
+ \ matchgroup=vimCommand start="\<menut\%[ranslate]\>"
+ \ skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ +
+ \ end="$" matchgroup=vimCmdSep end="|" matchgroup=vimMenuClear end="\<clear\ze\s*\%(["#|]\|$\)"
+ \ contains=@vimContinue,vimMenutranslateName keepend transparent
+" oneline is sufficient to match the current formatting in runtime/lang/*.vim
+syn match vimMenutranslateName "\%(\\\s\|\S\)\+" contained contains=vimMenuNotation,vimNotation
+syn match vimMenutranslateComment +".*+ contained containedin=vimMenutranslate
" Angle-Bracket Notation: (tnx to Michael Geddes) {{{2
" ======================
syn case ignore
-syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cmd\|scriptcmd\|cr\|lf\|linefeed\|retu\%[rn]\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|mouse\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket
-syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket
-syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket
-syn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
-syn match vimNotation '\%#=1\(\\\|<lt>\)\=<\%(q-\)\=\(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket
-syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([cas]file\|abuf\|amatch\|cword\|cWORD\|client\)>" contains=vimBracket
-syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}char-\%(\d\+\|0\o\+\|0x\x\+\)>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}x\=\%(f\d\{1,2}\|[^ \t:]\|space\|bar\|bslash\|nl\|newline\|lf\|linefeed\|cr\|retu\%[rn]\|enter\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|csi\|right\|paste\%(start\|end\)\|left\|help\|undo\|k\=insert\|ins\|mouse\|[kz]\=home\|[kz]\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\%(page\)\=\%(\|down\|up\|k\d\>\)\)>" contains=vimBracket
+
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(net\|dec\|jsb\|pterm\|urxvt\|sgr\)mouse>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(left\|middle\|right\)\%(mouse\|drag\|release\)>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}left\%(mouse\|release\)nm>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}x[12]\%(mouse\|drag\|release\)>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}sgrmouserelease>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}mouse\%(up\|down\|move\)>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}scrollwheel\%(up\|down\|right\|left\)>" contains=vimBracket
+
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%(sid\|nop\|nul\|lt\|drop\)>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%(snr\|plug\|cursorhold\|ignore\|cmd\|scriptcmd\|focus\%(gained\|lost\)\)>" contains=vimBracket
+syn match vimNotation '\%(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
+syn match vimNotation '\%#=1\%(\\\|<lt>\)\=<\%(q-\)\=\%(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([cas]file\|abuf\|amatch\|cexpr\|cword\|cWORD\|client\|stack\|script\|sf\=lnum\)>" contains=vimBracket
+syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}char-\%(\d\+\|0\o\+\|0x\x\+\)>" contains=vimBracket
+
syn match vimBracket contained "[\\<>]"
syn case match
" User Function Highlighting: {{{2
" (following Gautam Iyer's suggestion)
" ==========================
-syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncEcho,vimFuncName,vimUserFunc,vimExecute
-syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation
-syn keyword vimFuncEcho contained ec ech echo
+syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncEcho,vimFuncName,vimUserFunc,vimExecute
+syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation
+syn keyword vimFuncEcho contained ec ech echo
" User Command Highlighting: {{{2
syn match vimUsrCmd '^\s*\zs\u\%(\w*\)\@>\%([(#[]\|\s\+\%([-+*/%]\=\|\.\.\)=\)\@!'
@@ -511,7 +631,8 @@ syn match vimUsrCmd '^\s*\zs\u\%(\w*\)\@>\%([(#[]\|\s\+\%([-+*/%]\=\|\.\.\)=\)\@
" Errors And Warnings: {{{2
" ====================
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
- syn match vimFunctionError "\s\zs[a-z0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank
+ " TODO: The new-prefix exception should only apply to constructor definitions.
+ syn match vimFunctionError "\s\zs\%(new\)\@![a-z0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank
syn match vimFunctionError "\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\d\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank
syn match vimElseIfErr "\<else\s\+if\>"
syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/
@@ -526,25 +647,24 @@ syn match vimNormCmds contained ".*$"
" Syntax: {{{2
"=======
-syn match vimGroupList contained "@\=[^[:space:],]\+" nextgroup=vimGroupListComma skipwhite skipnl
-syn match vimGroupListContinue contained "\\" nextgroup=vimGroupList skipwhite
-syn match vimGroupListComma contained "," nextgroup=vimGroupList,vimGroupListContinue skipwhite skipnl
-syn keyword vimGroupSpecial contained ALL ALLBUT CONTAINED TOP
+syn match vimGroupList contained "[^[:space:],]\+\%(\s*,\s*[^[:space:],]\+\)*" contains=vimGroupSpecial
+syn region vimGroupList contained start=/^\s*["#]\\ \|^\s*\\\|[^[:space:],]\+\s*,/ skip=/\s*\n\s*\\\|\s*\n\s*["#]\\ \|^\s*\\\|^\s*["#]\\ / end=/[^[:space:],]\s*$\|[^[:space:],]\ze\s\+\w/ contains=@vimContinue,vimGroupSpecial
+syn keyword vimGroupSpecial contained ALL ALLBUT CONTAINED TOP
+
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynerror")
syn match vimSynError contained "\i\+"
syn match vimSynError contained "\i\+=" nextgroup=vimGroupList
endif
-syn match vimSynContains contained "\<contain\(s\|edin\)=" nextgroup=vimGroupList,vimGroupListContinue skipwhite skipnl
-syn match vimSynKeyContainedin contained "\<containedin=" nextgroup=vimGroupList
-syn match vimSynNextgroup contained "nextgroup=" nextgroup=vimGroupList,vimGroupListContinue skipwhite skipnl
+syn match vimSynContains contained "\<contain\%(s\|edin\)=" skipwhite skipnl nextgroup=vimGroupList
+syn match vimSynKeyContainedin contained "\<containedin=" skipwhite skipnl nextgroup=vimGroupList
+syn match vimSynNextgroup contained "\<nextgroup=" skipwhite skipnl nextgroup=vimGroupList
if has("conceal")
+ " no whitespace allowed after '='
syn match vimSynCchar contained "\<cchar=" nextgroup=vimSynCcharValue
syn match vimSynCcharValue contained "\S"
endif
-
syn match vimSyntax "\<sy\%[ntax]\>" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment,vim9Comment
-syn match vimAuSyntax contained "\s+sy\%[ntax]" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment,vim9Comment
syn cluster vimFuncBodyList add=vimSyntax
" Syntax: case {{{2
@@ -559,10 +679,9 @@ 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="\\\\\|\\\|\n\s*\\" matchgroup=vimSep end="$\||" contains=vimContinue,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
+syn region vimClusterName contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="$\||" contains=@vimContinue,vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
+syn match vimGroupAdd contained keepend "\<add=" skipwhite skipnl nextgroup=vimGroupList
+syn match vimGroupRem contained keepend "\<remove=" skipwhite skipnl nextgroup=vimGroupList
" Syntax: foldlevel {{{2
syn keyword vimSynType contained foldlevel skipwhite nextgroup=vimSynFoldMethod,vimSynFoldMethodError
@@ -578,34 +697,31 @@ syn match vimIskSep contained ','
" Syntax: include {{{2
syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList
-syn cluster vimFuncBodyList add=vimSynType
" Syntax: keyword {{{2
-syn cluster vimSynKeyGroup contains=vimContinue,vimSynCchar,vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin
+syn cluster vimSynKeyGroup contains=@vimContinue,vimSynCchar,vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin
syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion
-syn region vimSynKeyRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|\|\n\s*\\" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup
+syn region vimSynKeyRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynKeyGroup
syn match vimSynKeyOpt contained "\%#=1\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
-syn cluster vimFuncBodyList add=vimSynType
" Syntax: match {{{2
-syn cluster vimSynMtchGroup contains=vimContinue,vimMtchComment,vimSynCchar,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation,vim9Comment
+syn cluster vimSynMtchGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation,vimMtchComment
syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
-syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip="\n\s*\\" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup
+syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynMtchGroup
syn match vimSynMtchOpt contained "\%#=1\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
-syn cluster vimFuncBodyList add=vimSynMtchGroup
" Syntax: off and on {{{2
syn keyword vimSynType contained enable list manual off on reset
" Syntax: region {{{2
-syn cluster vimSynRegPatGroup contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation
-syn cluster vimSynRegGroup contains=vimContinue,vimSynCchar,vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp
+syn cluster vimSynRegPatGroup contains=@vimContinue,vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation
+syn cluster vimSynRegGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp
syn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion
-syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\\|\n\s*\\" end="|\|$" contains=@vimSynRegGroup
+syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + end="|\|$" contains=@vimSynRegGroup
syn match vimSynRegOpt contained "\%#=1\<\(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 vimSynReg contained "\<\%(start\|skip\|end\)=" nextgroup=vimSynRegPat
syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup
-syn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip="\\\\\|\\\z1\|\n\s*\\" end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg
+syn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip=/\\\\\|\\\z1\|\n\s*\\\|\n\s*"\\ / end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg
syn match vimSynPatMod contained "\%#=1\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\="
syn match vimSynPatMod contained "\%#=1\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod
syn match vimSynPatMod contained "lc=\d\+"
@@ -613,7 +729,6 @@ syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod
syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]"
syn match vimSynNotPatRange contained "\\\\\|\\\["
syn match vimMtchComment contained '"[^"]\+$'
-syn cluster vimFuncBodyList add=vimSynType
" Syntax: sync {{{2
" ============
@@ -643,11 +758,11 @@ if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror")
syn match vimHiCtermError contained "\D\i*"
endif
syn match vimHighlight "\<hi\%[ghlight]\>" skipwhite nextgroup=vimHiBang,@vimHighlightCluster
-syn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster
+syn match vimHiBang contained "\a\@1<=!" skipwhite nextgroup=@vimHighlightCluster
syn match vimHiGroup contained "\i\+"
syn case ignore
-syn keyword vimHiAttrib contained none bold inverse italic nocombine reverse standout strikethrough underline undercurl
+syn keyword vimHiAttrib contained none bold inverse italic nocombine reverse standout strikethrough underline undercurl underdashed underdotted underdouble
syn keyword vimFgBgAttrib contained none bg background fg foreground
syn case match
syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib
@@ -662,16 +777,17 @@ syn match vimHiGuiFontname contained "'[a-zA-Z\-* ]\+'"
syn match vimHiGuiRgb contained "#\x\{6}"
" Highlighting: hi group key=arg ... {{{2
-syn cluster vimHiCluster contains=vimGroup,vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiCtermul,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation
-syn region vimHiKeyList contained oneline start="\i\+" skip="\\\\\|\\|" end="$\||" contains=@vimHiCluster
+syn cluster vimHiCluster contains=vimGroup,vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiCtermul,vimHiCtermfont,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation,vimComment,vim9comment
+syn region vimHiKeyList contained start="\i\+" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimHiCluster
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimhikeyerror")
syn match vimHiKeyError contained "\i\+="he=e-1
endif
syn match vimHiTerm contained "\cterm="he=e-1 nextgroup=vimHiAttribList
-syn match vimHiStartStop contained "\c\(start\|stop\)="he=e-1 nextgroup=vimHiTermcap,vimOption
+syn match vimHiStartStop contained "\c\%(start\|stop\)="he=e-1 nextgroup=vimHiTermcap,vimOption
syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList
syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
syn match vimHiCtermul contained "\cctermul="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
+syn match vimHiCtermfont contained "\cctermfont="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList
syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname
syn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib
@@ -679,13 +795,13 @@ syn match vimHiTermcap contained "\S\+" contains=vimNotation
syn match vimHiNmbr contained '\d\+'
" Highlight: clear {{{2
-syn keyword vimHiClear contained clear nextgroup=vimHiGroup
+syn keyword vimHiClear contained clear skipwhite nextgroup=vimGroup,vimHiGroup
" Highlight: link {{{2
" see tst24 (hi def vs hi) (Jul 06, 2018)
"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=@vimHiCluster
-syn cluster vimFuncBodyList add=vimHiLink
+" TODO: simplify and allow line continuations --djk
+syn region vimHiLink contained matchgroup=Type start="\%(\<hi\%[ghlight]!\=\s\+\)\@<=\%(\%(def\%[ault]\s\+\)\=link\>\|\<def\%[ault]\>\)" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimHiCluster
" Control Characters: {{{2
" ==================
@@ -698,7 +814,9 @@ syn match vimLineComment +^[ \t:]*"\("[^"]*"\|[^"]\)*$+ contains=@vimCommentGrou
syn match vim9LineComment +^[ \t:]\+#.*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
" Note: Look-behind to work around nextgroup skipnl consuming leading whitespace and preventing a match
-syn match vimContinue "\%(^\s*\)\@32<=\\"
+syn match vimContinue "^\s*\zs\\"
+syn match vimContinueComment '^\s*\zs["#]\\ .*' contained
+syn cluster vimContinue contains=vimContinue,vimContinueComment
syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue
syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained
@@ -706,8 +824,8 @@ syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained
" ====================
syn match vimSearch '^\s*[/?].*' contains=vimSearchDelim
syn match vimSearchDelim '^\s*\zs[/?]\|[/?]$' contained
-syn region vimGlobal matchgroup=Statement start='\<g\%[lobal]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst
-syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst
+syn region vimGlobal matchgroup=Statement start='\<g\%[lobal]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1
+syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1
" Embedded Scripts: {{{2
" ================
@@ -890,6 +1008,7 @@ if exists("g:vimsyn_minlines")
endif
exe "syn sync maxlines=".s:vimsyn_maxlines
syn sync linecont "^\s\+\\"
+syn sync linebreaks=1
syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]"
" ====================
@@ -908,7 +1027,6 @@ if !exists("skip_vim_syntax_inits")
hi def link vimHiAttribList vimError
hi def link vimHiCtermError vimError
hi def link vimHiKeyError vimError
- hi def link vimKeyCodeError vimError
hi def link vimMapModErr vimError
hi def link vimSubstFlagErr vimError
hi def link vimSynCaseError vimError
@@ -918,14 +1036,14 @@ if !exists("skip_vim_syntax_inits")
hi def link vimAbb vimCommand
hi def link vimAddress vimMark
+ hi def link vimAugroupBang vimBang
hi def link vimAugroupError vimError
hi def link vimAugroupKey vimCommand
- hi def link vimAuHighlight vimHighlight
- hi def link vimAutoCmdOpt vimOption
hi def link vimAutoCmd vimCommand
hi def link vimAutoEvent Type
hi def link vimAutoCmdMod Special
- hi def link vimAutoSet vimCommand
+ hi def link vimBang vimOper
+ hi def link vimBehaveBang vimBang
hi def link vimBehaveModel vimBehave
hi def link vimBehave vimCommand
hi def link vimBracket Delimiter
@@ -938,35 +1056,47 @@ if !exists("skip_vim_syntax_inits")
hi def link vimCondHL vimCommand
hi def link vimConst vimCommand
hi def link vimContinue Special
+ hi def link vimContinueComment vimComment
hi def link vimCtrlChar SpecialChar
- hi def link vimEchoHLNone vimGroup
- hi def link vimEchoHL vimCommand
+ hi def link vimDefComment vimComment
+ hi def link vimDefKey vimCommand
+ hi def link vimDefParam vimVar
+ hi def link vimEcho vimCommand
+ hi def link vimEchohlNone vimGroup
+ hi def link vimEchohl vimCommand
hi def link vimElseIfErr Error
- hi def link vimElseif vimCondHL
+ hi def link vimEndfunction vimCommand
+ hi def link vimEnddef vimCommand
hi def link vimEnvvar PreProc
hi def link vimError Error
hi def link vimEscape Special
hi def link vimFBVar vimVar
hi def link vimFgBgAttrib vimHiAttrib
hi def link vimFuncEcho vimCommand
- hi def link vimHiCtermul vimHiTerm
- hi def link vimFold Folded
hi def link vimFor vimCommand
hi def link vimFTCmd vimCommand
hi def link vimFTOption vimSynType
+ hi def link vimFuncBang vimBang
+ hi def link vimFuncComment vimComment
hi def link vimFuncKey vimCommand
hi def link vimFuncName Function
+ hi def link vimFuncMod Special
+ hi def link vimFuncParam vimVar
+ hi def link vimFuncParamEquals vimOper
hi def link vimFuncSID Special
hi def link vimFuncVar Identifier
hi def link vimGroupAdd vimSynOption
- hi def link vimGroupListContinue vimContinue
hi def link vimGroupName vimGroup
hi def link vimGroupRem vimSynOption
hi def link vimGroupSpecial Special
hi def link vimGroup Type
hi def link vimHiAttrib PreProc
- hi def link vimHiClear vimHighlight
+ hi def link vimHiBang vimBang
+ hi def link vimHiClear Type
+ hi def link vimHiCtermColor Constant
hi def link vimHiCtermFgBg vimHiTerm
+ hi def link vimHiCtermfont vimHiTerm
+ hi def link vimHiCtermul vimHiTerm
hi def link vimHiCTerm vimHiTerm
hi def link vimHighlight vimCommand
hi def link vimHiGroup vimGroupName
@@ -978,13 +1108,10 @@ if !exists("skip_vim_syntax_inits")
hi def link vimHiStartStop vimHiTerm
hi def link vimHiTerm Type
hi def link vimHLGroup vimGroup
- hi def link vimHLMod PreProc
hi def link vimInsert vimString
hi def link vimIskSep Delimiter
- hi def link vimKeyCode vimSpecFile
hi def link vimKeymapLineComment vimComment
hi def link vimKeymapTailComment vimComment
- hi def link vimKeyword Statement
hi def link vimLet vimCommand
hi def link vimLetHereDoc vimString
hi def link vimLetHereDocStart Special
@@ -992,15 +1119,21 @@ if !exists("skip_vim_syntax_inits")
hi def link vimLetRegister Special
hi def link vimLineComment vimComment
hi def link vim9LineComment vimComment
- hi def link vimMapBang vimCommand
+ hi def link vimMapBang vimBang
hi def link vimMapModKey vimFuncSID
hi def link vimMapMod vimBracket
hi def link vimMap vimCommand
hi def link vimMark Number
hi def link vimMarkNumber vimNumber
+ hi def link vimMenuBang vimBang
+ hi def link vimMenuClear Special
hi def link vimMenuMod vimMapMod
- hi def link vimMenuNameMore vimMenuName
hi def link vimMenuName PreProc
+ hi def link vimMenu vimCommand
+ hi def link vimMenuNotation vimNotation
+ hi def link vimMenuPriority Number
+ hi def link vimMenuStatus Special
+ hi def link vimMenutranslateComment vimComment
hi def link vimMtchComment vimComment
hi def link vimNorm vimCommand
hi def link vimNotation Special
@@ -1009,7 +1142,6 @@ if !exists("skip_vim_syntax_inits")
hi def link vimNumber Number
hi def link vimOperError Error
hi def link vimOper Operator
- hi def link vimOperStar vimOper
hi def link vimOption PreProc
hi def link vimParenSep Delimiter
hi def link vimPatSepErr vimError
@@ -1031,10 +1163,10 @@ if !exists("skip_vim_syntax_inits")
hi def link vimSpecFile Identifier
hi def link vimSpecFileMod vimSpecFile
hi def link vimSpecial Type
- hi def link vimStatement Statement
hi def link vimStringCont vimString
hi def link vimString String
hi def link vimStringEnd vimString
+ hi def link vimStringInterpolationBrace vimEscape
hi def link vimSubst1 vimSubst
hi def link vimSubstDelim Delimiter
hi def link vimSubstFlags Special
@@ -1071,7 +1203,7 @@ if !exists("skip_vim_syntax_inits")
hi def link vimTodo Todo
hi def link vimType Type
hi def link vimUnlet vimCommand
- hi def link vimUnletBang vimCommand
+ hi def link vimUnletBang vimBang
hi def link vimUnmap vimMap
hi def link vimUserAttrbCmpltFunc Special
hi def link vimUserAttrbCmplt vimSpecial
@@ -1100,4 +1232,4 @@ delc VimFoldr
delc VimFoldt
let &cpo = s:keepcpo
unlet s:keepcpo
-" vim:ts=18 fdm=marker
+" vim:ts=18 fdm=marker ft=vim
diff --git a/runtime/syntax/xmath.vim b/runtime/syntax/xmath.vim
index 37ae951..466c115 100644
--- a/runtime/syntax/xmath.vim
+++ b/runtime/syntax/xmath.vim
@@ -1,9 +1,11 @@
" Vim syntax file
" Language: xmath (a simulation tool)
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E. Campbell
" Last Change: Aug 31, 2016
+" 2024 Feb 19 by Vim Project (announce adoption)
" Version: 10
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XMATH
+" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XMATH
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
diff --git a/runtime/syntax/xxd.vim b/runtime/syntax/xxd.vim
index 2f90b6b..1c06b42 100644
--- a/runtime/syntax/xxd.vim
+++ b/runtime/syntax/xxd.vim
@@ -1,10 +1,12 @@
" Vim syntax file
" Language: bin using xxd
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Maintainer: This runtime file is looking for a new maintainer.
+" Former Maintainer: Charles E. Campbell
" Last Change: Aug 31, 2016
" Version: 11
+" 2024 Feb 19 by Vim Project (announce adoption)
" Notes: use :help xxd to see how to invoke it
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XXD
+" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XXD
" quit when a syntax file was already loaded
if exists("b:current_syntax")
diff --git a/runtime/syntax/yacc.vim b/runtime/syntax/yacc.vim
index 3aa01e8..8100489 100644
--- a/runtime/syntax/yacc.vim
+++ b/runtime/syntax/yacc.vim
@@ -1,9 +1,10 @@
" Vim syntax file
" Language: Yacc
-" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Former Maintainer: Charles E. Campbell
" Last Change: Mar 25, 2019
" Version: 17
-" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_YACC
+" 2024 Feb 19 by Vim Project (announce adoption)
+" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_YACC
"
" Options: {{{1
" g:yacc_uses_cpp : if this variable exists, then C++ is loaded rather than C
diff --git a/runtime/tutor/Make_mvc.mak b/runtime/tutor/Make_mvc.mak
index bd62016..1c5c315 100644
--- a/runtime/tutor/Make_mvc.mak
+++ b/runtime/tutor/Make_mvc.mak
@@ -27,6 +27,9 @@ ICONV = "$(ICONV_PATH)\iconv.exe"
RM = del /q
CP = copy /y
+PS = PowerShell.exe
+
+PSFLAGS = -NoLogo -NoProfile -Command
all : $(CONVERTED)
@@ -34,8 +37,7 @@ tutor.utf-8 : tutor
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::ReadAllText(\"$?\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -ItemType file -Path . -Name $@
!ENDIF
@@ -44,8 +46,7 @@ tutor.bar : tutor.bar.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-1 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28591))
@@ -55,8 +56,7 @@ tutor.ca.utf-8 : tutor.ca
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::ReadAllText(\"$?\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -ItemType file -Path . -Name $@
!ENDIF
@@ -65,8 +65,7 @@ tutor.de.utf-8 : tutor.de
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::ReadAllText(\"$?\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -ItemType file -Path . -Name $@
!ENDIF
@@ -75,8 +74,7 @@ tutor.el : tutor.el.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-7 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28597))
@@ -86,8 +84,7 @@ tutor.el.cp737 : tutor.el.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP737 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(737))
@@ -97,8 +94,7 @@ tutor.eo : tutor.eo.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-3 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28593))
@@ -108,8 +104,7 @@ tutor.es : tutor.es.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-1 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28591))
@@ -119,8 +114,7 @@ tutor.fr.utf-8 : tutor.fr
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::ReadAllText(\"$?\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -ItemType file -Path . -Name $@
!ENDIF
@@ -129,8 +123,7 @@ tutor.hr : tutor.hr.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28592))
@@ -140,8 +133,7 @@ tutor.hr.cp1250 : tutor.hr.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1250 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1250))
@@ -151,8 +143,7 @@ tutor.hu : tutor.hu.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28592))
@@ -162,8 +153,7 @@ tutor.hu.cp1250 : tutor.hu.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1250 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1250))
@@ -173,8 +163,7 @@ tutor.it.utf-8 : tutor.it
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::ReadAllText(\"$?\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -ItemType file -Path . -Name $@
!ENDIF
@@ -183,8 +172,7 @@ tutor.ja.sjis : tutor.ja.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP932 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(932))
@@ -194,8 +182,7 @@ tutor.ja.euc : tutor.ja.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t EUC-JP $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(51932))
@@ -205,8 +192,7 @@ tutor.ko.euc : tutor.ko.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t EUC-KR $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(51949))
@@ -216,8 +202,7 @@ tutor.nl : tutor.nl.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-1 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28591))
@@ -227,8 +212,7 @@ tutor.no.utf-8 : tutor.no
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::ReadAllText(\"$?\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -ItemType file -Path . -Name $@
!ENDIF
@@ -244,8 +228,7 @@ tutor.ru : tutor.ru.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t KOI8-R $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(20866))
@@ -255,8 +238,7 @@ tutor.ru.cp1251 : tutor.ru.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1251 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1251))
@@ -266,8 +248,7 @@ tutor.sv.utf-8 : tutor.sv
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::ReadAllText(\"$?\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -ItemType file -Path . -Name $@
!ENDIF
@@ -276,20 +257,18 @@ tutor.tr.iso9 : tutor.tr.utf-8
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-9 $? >$@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28599))
!ENDIF
tutor.zh.utf-8 : tutor.zh.big5
- powershell -nologo -noprofile -Command \
- [System.IO.File]::ReadAllText(\"$?\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(950)) ^| \
1>nul New-Item -Force -ItemType file -Path . -Name $@
-clean : $(CONVERTED)
- !$(RM) $**
+clean :
+ @for %%G in ($(CONVERTED)) do (if exist .\%%G ($(RM) %%G))
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make:
diff --git a/runtime/tutor/Makefile b/runtime/tutor/Makefile
index 484769e..3c0fe0a 100644
--- a/runtime/tutor/Makefile
+++ b/runtime/tutor/Makefile
@@ -8,83 +8,88 @@
# Common components
include Make_all.mak
+.PHONY: all clean
+
all: $(CONVERTED)
tutor.utf-8: tutor
- iconv -f ISO-8859-1 -t UTF-8 tutor > tutor.utf-8
+ iconv -f ISO-8859-1 -t UTF-8 $< >$@
tutor.bar: tutor.bar.utf-8
- iconv -f UTF-8 -t ISO-8859-1 tutor.bar.utf-8 > tutor.bar
+ iconv -f UTF-8 -t ISO-8859-1 $< >$@
tutor.ca.utf-8: tutor.ca
- iconv -f ISO-8859-1 -t UTF-8 tutor.ca > tutor.ca.utf-8
+ iconv -f ISO-8859-1 -t UTF-8 $< >$@
tutor.eo: tutor.eo.utf-8
- iconv -f UTF-8 -t ISO-8859-3 tutor.eo.utf-8 > tutor.eo
+ iconv -f UTF-8 -t ISO-8859-3 $< >$@
tutor.de.utf-8: tutor.de
- iconv -f ISO-8859-1 -t UTF-8 tutor.de > tutor.de.utf-8
+ iconv -f ISO-8859-1 -t UTF-8 $< >$@
tutor.el: tutor.el.utf-8
- iconv -f UTF-8 -t ISO-8859-7 tutor.el.utf-8 > tutor.el
+ iconv -f UTF-8 -t ISO-8859-7 $< >$@
tutor.el.cp737: tutor.el.utf-8
- iconv -f UTF-8 -t CP737 tutor.el.utf-8 > tutor.el.cp737
+ iconv -f UTF-8 -t CP737 $< >$@
tutor.es: tutor.es.utf-8
- iconv -f UTF-8 -t ISO-8859-1 tutor.es.utf-8 > tutor.es
+ iconv -f UTF-8 -t ISO-8859-1 $< >$@
tutor.fr.utf-8: tutor.fr
- iconv -f ISO-8859-1 -t UTF-8 tutor.fr > tutor.fr.utf-8
+ iconv -f ISO-8859-1 -t UTF-8 $< >$@
tutor.hu: tutor.hu.utf-8
- iconv -f UTF-8 -t ISO-8859-2 tutor.hu.utf-8 > tutor.hu
+ iconv -f UTF-8 -t ISO-8859-2 $< >$@
tutor.hu.cp1250: tutor.hu.utf-8
- iconv -f UTF-8 -t CP1250 tutor.hu.utf-8 > tutor.hu.cp1250
+ iconv -f UTF-8 -t CP1250 $< >$@
tutor.it.utf-8: tutor.it
- iconv -f ISO-8859-1 -t UTF-8 tutor.it > tutor.it.utf-8
+ iconv -f ISO-8859-1 -t UTF-8 $< >$@
tutor.hr: tutor.hr.utf-8
- iconv -f UTF-8 -t ISO-8859-2 tutor.hr.utf-8 > tutor.hr
+ iconv -f UTF-8 -t ISO-8859-2 $< >$@
tutor.hr.cp1250: tutor.hr.utf-8
- iconv -f UTF-8 -t CP1250 tutor.hr.utf-8 > tutor.hr.cp1250
+ iconv -f UTF-8 -t CP1250 $< >$@
tutor.ja.sjis: tutor.ja.utf-8
- iconv -f UTF-8 -t CP932 tutor.ja.utf-8 > tutor.ja.sjis
+ iconv -f UTF-8 -t CP932 $< >$@
tutor.ja.euc: tutor.ja.utf-8
- iconv -f UTF-8 -t EUC-JP tutor.ja.utf-8 > tutor.ja.euc
+ iconv -f UTF-8 -t EUC-JP $< >$@
tutor.ko.euc: tutor.ko.utf-8
- iconv -f UTF-8 -t EUC-KR tutor.ko.utf-8 > tutor.ko.euc
+ iconv -f UTF-8 -t EUC-KR $< >$@
tutor.nl: tutor.nl.utf-8
- iconv -f UTF-8 -t ISO-8859-1 tutor.nl.utf-8 > tutor.nl
+ iconv -f UTF-8 -t ISO-8859-1 $< >$@
tutor.no.utf-8: tutor.no
- iconv -f ISO-8859-1 -t UTF-8 tutor.no > tutor.no.utf-8
+ iconv -f ISO-8859-1 -t UTF-8 $< >$@
# nb is an alias for no
tutor.nb: tutor.no
- cp tutor.no tutor.nb
+ cp $< $@
tutor.nb.utf-8: tutor.no.utf-8
- cp tutor.no.utf-8 tutor.nb.utf-8
+ cp $< $@
tutor.ru: tutor.ru.utf-8
- iconv -f UTF-8 -t KOI8-R tutor.ru.utf-8 > tutor.ru
+ iconv -f UTF-8 -t KOI8-R $< >$@
tutor.ru.cp1251: tutor.ru.utf-8
- iconv -f UTF-8 -t CP1251 tutor.ru.utf-8 > tutor.ru.cp1251
+ iconv -f UTF-8 -t CP1251 $< >$@
tutor.tr.iso9: tutor.tr.utf-8
- iconv -f UTF-8 -t ISO-8859-9 tutor.tr.utf-8 > tutor.tr.iso9
+ iconv -f UTF-8 -t ISO-8859-9 $< >$@
tutor.sv.utf-8: tutor.sv
- iconv -f ISO-8859-1 -t UTF-8 tutor.sv > tutor.sv.utf-8
+ iconv -f ISO-8859-1 -t UTF-8 $< >$@
tutor.zh.utf-8: tutor.zh.big5
- iconv -f BIG-5 -t UTF-8 tutor.zh.big5 > tutor.zh.utf-8
+ iconv -f BIG-5 -t UTF-8 $< >$@
+
+clean:
+ for G in $(CONVERTED); do if [ -f $$G ]; then rm -f $$G; fi; done
diff --git a/runtime/tutor/tutor.lt.utf-8 b/runtime/tutor/tutor.lt.utf-8
new file mode 100644
index 0000000..c3b87bb
--- /dev/null
+++ b/runtime/tutor/tutor.lt.utf-8
@@ -0,0 +1,1061 @@
+===============================================================================
+= V I M p r a d ž i a m o k s l i s – 1.7 versija =
+===============================================================================
+
+ „Vim“ yra galingas tekstų redaktorius, turintis daug komandų – tiek daug,
+ kad tokiame pradžiamokslyje kaip šis jų visų aprašyti neįmanoma. Šio
+ pradžiamokslio tikslas – aprašyti tas komandas, kurių pagalba lengvai
+ iÅ¡moksite naudotis „Vim“ kaip visaverÄiu tekstų redaktoriumi.
+
+ VidutiniÅ¡kai Å¡iam pradžiamoksliui praeiti užtrunkama apie 30 minuÄių,
+ priklausomai nuo to, kiek laiko skiriama eksperimentams.
+
+ SVARBU:
+ PamokÄ—lių metu Å¡is tekstas bus keiÄiamas, tad mokymuisi pasidarykite Å¡io
+ failo kopiją (jei paleidote „vimtutor“ komandą, tai jau skaitote failo
+ kopijÄ…).
+
+ Neužmirškite, kad šis pradžiamokslis yra praktinis. Tai reiškia, kad
+ reikia paÄiam įvykdyti nurodytas komandas, jei norite jas tinkamai
+ išmokti. Jeigu tiktai skaitysite šį tekstą, komandas tiesiog užmiršite!
+
+ VERTÄ–JO PASTABOS:
+ „Vim“ komandas dažnai sudaro raidės. Turėkite omenyje, jog šių raidžių
+ registras (tai, ar jos didžiosios, ar mažosios) yra svarbus. Kai tekste
+ matysite instrukciją, panašią į „spustelėkite klavišą x“, tai reikš, jog
+ turėsite įvesti būtent mažąją raidę. Analogiškai, jei matysite
+ instrukciją, panašią į „spustelėkite klavišą X“, tai reikš, jog kalbama
+ būtent apie didžiąją raidę.
+
+ Šiame vertime naudojami angliški funkcinių klavišų pavadinimai. Jei jūs
+ naudojatės lietuviška klaviatūra, joje klavišas <ESC> žymimas užrašu <GR>,
+ klavišas <CTRL> – užrašu <VALD>, o klavišas <ENTER> – užrašu <ĮVESTI>.
+
+ Dabar įsitikinkite, kad yra išjungta didžiųjų raidžių veiksena
+ („Caps Lock“) ir spauskite klavišą j tol, kol 1.1 pamokos tekstas
+ visiškai užpildys ekraną.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 1.1 pamoka: ŽYMEKLIO VALDYMAS
+
+
+ ** Žymeklis valdomas klavišų h,j,k,l pagalba, kaip pavaizduota. **
+ ^
+ k Pastabos: klavišas h yra kairėje ir perkelia kairėn.
+ < h l > Klavišas l yra dešinėje ir perkelia dešinėn.
+ j Raidė „j“ kažkiek primena rodyklę žemyn.
+ v
+ 1. Judinkite žymeklį ekrane, kol apsiprasite.
+
+ 2. Nuspauskite klavišą žemyn (j), kol jo veiksmas ims kartotis.
+ Dabar žinote, kaip nukeliauti iki kitos pamokos.
+
+ 3. Naudodami klavišą žemyn, keliaukite iki 1.2 pamokos.
+
+PASTABA: Jei kada nebūtumėte tikri, kad nuspaudėte reikiamą klavišą,
+ spustelėkite klavišą <ESC> – taip sugrįšite į „Normaliąją“ veikseną.
+ Tada pakartokite norimÄ… komandÄ….
+
+PASTABA: Žymeklį paprastai galima valdyti ir rodyklių klaviÅ¡ais, taÄiau, įpratÄ™
+ naudoti hjkl, judÄ—site greiÄiau. Pažadame!
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 1.2 pamoka: DARBO SU „VIM“ PABAIGA
+
+
+ !! SVARBU: prieš bandydami toliau nurodytas komandas, !!
+ !! perskaitykite Å¡iÄ… pamokÄ… iki galo! !!
+
+ 1. Spustelėkite <ESC> klavišą
+ (taip užtikrinsite, jog esate „Normaliojoje“ veiksenoje).
+
+ 2. Surinkite: :q! <ENTER>
+ Šitaip užbaigsite redaktoriaus darbą NEĮRAŠYDAMI jokių atvertame faile
+ atliktų pakeitimų.
+
+ 3. Sugrįžkite atgal į šį pradžiamokslį, pakartodami ankstesnę jį
+ iškvietusią komandą. Pavyzdžiui: vimtutor <ENTER>.
+
+ 4. Jei šiuos žingsnius įsiminėte, įvykdykite punktus nuo 1 iki 3, kad
+ užbaigtumėte redaktoriaus darbą ir vėl jį atvertumėte.
+
+PASTABA: komanda :q! <ENTER> užbaigia redaktoriaus darbą, atmesdama bet kokius
+ juo atliktus, bet dar neįrašytus failo pakeitimus. Kaip pakeitimus
+ įrašyti, sužinosite paskesnėje pamokoje.
+
+ 5. Perkelkite žymeklį žemyn į 1.3 pamoką.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 1.3 pamoka: TEKSTO REDAGAVIMAS - Å ALINIMAS
+
+
+ ** Pašalinti ties žymekliu esantį rašmenį galite spustelėdami x klavišą. **
+
+ 1. Perkelkite žymeklį į žemiau esanÄiÄ… eilutÄ™, pažymÄ—tÄ… --->.
+
+ 2. Norėdami ištaisyti klaidas, perkelkite žymeklį ant rašmens, kurį
+ norite pašalinti.
+
+ 3. Spustelėkite klavišą x , kad pašalintumėte nereikalingą rašmenį.
+
+ 4. Kartokite punktus nuo 2 iki 4, kol ištaisysite visas klaidas sakinyje.
+
+---> KKarvė peršooko pperr mmmėnullį.
+
+ 5. Ištaisę klaidas sakinyje, eikite į 1.4 pamoką.
+
+PASTABA: šiame pradžiamokslyje komandas stenkitės įsiminti ne tik skaitydami
+ jų aprašymus, bet ir išbandydami jas praktiškai.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 1.4 pamoka: TEKSTO REDAGAVIMAS – ĮTERPIMAS
+
+
+ ** Įterpti tekstą galite, prieš tai spustelėję i raidę. **
+
+ 1. Perkelkite žymeklį į pirmąją eilutę žemiau, pažymėtą --->.
+
+ 2. Norėdami pirmą eilutę papildyti iki antrosios, perkelkite žymeklį ant
+ rašmens, PRIEŠ kurį norite įterpti tekstą.
+
+ 3. Spustelėkite klavišą i ir surinkite reikiamą tekstą.
+
+ 4. Ištaisę klaidą, spustelėkite <ESC>, kad sugrįžtumėte į „Normaliąją“
+ veikseną. Kartokite 2–4 žingsnius tol, kol sakinys bus ištaisytas.
+
+---> Šioje eiluje trūksta tiek .
+---> Šioje eilutėje trūksta šiek tiek teksto.
+
+ 5. Išmokę įterpti tekstą, keliaukite toliau į 1.5 pamoką.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 1.5 pamoka: TEKSTO REDAGAVIMAS – PRIDĖJIMAS EILUTĖS GALE
+
+
+ ** Pridėti teksto eilutės gale galite, prieš tai spustelėję A raidę. **
+
+ 1. Perkelkite žymeklį į pirmąją eilutę žemiau, pažymėtą --->.
+ Visiškai nesvarbu, ties kuriuo rašmeniu toje eilutėje bus žymeklis.
+
+ 2. Spustelėkite klavišą A ir įveskite pridedamą tekstą.
+
+ 3. Pridėję tekstą, spustelėkite klavišą <ESC>, kad sugrįžtumėte
+ į „Normaliąją“ veikseną.
+
+ 4. Perkelkite žymeklį į antrąją eilutę, pažymėtą ---> ir pataisykite sakinį
+ joje, pakartodami 2 ir 3 žingsnius.
+
+---> Šioje eilutėje trūksta ši
+ Šioje eilutėje trūksta šiek tiek teksto.
+---> Čia taip pat trūks
+ Čia taip pat trūksta šiek tiek teksto.
+
+ 5. Išmokę pridėti teksto eilutės gale, keliaukite toliau į 1.6 pamoką.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 1.6 pamoka: FAILO REDAGAVIMAS
+
+
+ ** Komanda :wq įrašo atvertą failą ir užbaigia redaktoriaus darbą. **
+
+ !! SVARBU: prieš bandydami toliau nurodytas komandas, !!
+ !! perskaitykite Å¡iÄ… pamokÄ… iki galo !!
+
+ 1. Jei galite naudotis kitu terminalu, tolesnius veiksmus atlikite jame.
+ Kitu atveju užverkite šį pradžiamokslį kaip ir 1.2 pamokoje: :q!
+
+ 2. Komandų eilutėje įveskite komandą: vim failas.txt <ENTER>
+ Čia „vim“ – komanda „Vim“ redaktoriui paleisti, o „failas.txt“ – norimo
+ redaguoti failo vardas. Naudokite failo, kurį galėsite keisti, vardą.
+
+ 3. Pridėkite ir/ar pašalinkite tekstą, kaip išmokote ankstesnėse pamokose.
+
+ 4. Įrašykite pakeistą failą ir užbaikite „Vim“ darbą: :wq <ENTER>
+
+ 5. Jei pirmajame žingsnyje užvėrėte pradžiamokslį, dabar jį vėl atverkite
+ komandos „vimtutor“ pagalba, tada keliaukite į pirmosios santrauką žemiau.
+
+ 6. PerskaitÄ™ ir įsiminÄ™ visus aukÅ¡Äiau apraÅ¡ytus žingsnius, atlikite juos.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 1 pamokos SANTRAUKA
+
+
+ 1. Žymeklis valdomas rodyklių arba hjkl klavišais.
+ h (kairėn) j (žemyn) k (aukštyn) l (dešinėn)
+
+ 2. Iš komandinės eilutės „Vim“ paleidžiamas taip: vim FAILO_VARDAS <ENTER>
+
+ 3. Darbo su „Vim“ pabaiga: <ESC> :q! <ENTER> – neįrašant jokių pakeitimų.
+ arba: <ESC> :wq <ENTER> – įrašant pakeitimus.
+
+ 4. Rašmens po žymekliu pašalinimas, esant „Normaliojoje“ veiksenoje: x
+
+ 5. Teksto įterpimas ar pridėjimas:
+ i įterpiamas tekstas <ESC> – įterpti tekstą prieš žymeklį
+ A pridedamas tekstas <ESC> – pridėti tekstą eilutės gale
+
+PASTABA: <ESC> paspaudimas grąžina į „Normaliąją“ veikseną arba nutraukia
+ nereikalingos komandos įvedimą.
+
+Dabar keliaukite į 2 pamoką.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 2.1 pamoka: Å ALINIMO KOMANDOS
+
+
+ ** Komanda dw šalina žodį. **
+
+ 1. Spustelėkite <ESC>, kad sugrįžtumėte į „Normaliąją“ veikseną.
+
+ 2. Perkelkite žymeklį į eilutę žemiau, pažymėtą --->.
+
+ 3. Perkelkite žymeklį į norimo pašalinti žodžio pradžią.
+
+ 4. Spustelėkite dw žodžio pašalinimui.
+
+PASTABA: RaidÄ— d pasirodys apatinÄ—je terminalo eilutÄ—je, spustelÄ—jus jos
+ klaviÅ¡Ä…. „Vim“ lauks, kol surinksite raidÄ™ w . Jei terminalo apaÄioje
+ matote kitą raidę ar suklydote ją rinkdami – spustelėkite <ESC> ir
+ rinkite komandą iš naujo.
+
+---> Yra mėlynas žodžių, kurie skėtis nepriklauso juokiasi šiam sakiniui.
+
+ 5. Kartokite 3 ir 4 punktus tol, kol sakinys bus ištaisytas. Tuomet
+ keliaukite į 2.2 pamoką.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 2.2 pamoka: DAUGIAU ŠALINIMO KOMANDŲ
+
+
+ ** Komanda d$ pašalinta tekstą iki eilutės pabaigos. **
+
+ 1. Spustelėkite <ESC>, kad sugrįžtumėte į „Normaliąją“ veikseną.
+
+ 2. Perkelkite žymeklį į eilutę žemiau, pažymėtą --->.
+
+ 3. Perkelkite žymeklį į pageidautiną eilutės pabaigą (PO pirmojo taško).
+
+ 4. Surinkite d$ nereikalingam tekstui iki eilutės pabaigos pašalinti.
+
+---> Kažkas šios eilutės pabaigą įvedė dukart. pabaigą įvedė dukart.
+
+
+ 5. Keliaukite į 2.3 pamoką. Ten sužinosite daugiau kaip vyksta šalinimas.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 2.3 pamoka: OPERATORIAI IR VEKTORIAI
+
+
+ Daugelį teksto redagavimo komandų sudaro operatorius ir vektorius.
+ Pavyzdžiui, šalinimo komandos su operatoriumi d formatas yra toks:
+
+ d vektorius
+ Kur:
+ d – šalinimo operatorius;
+ vektorius – nurodo, kuo komanda operuoja (išvardyta žemiau).
+
+ Trumpas vektorių sąrašas:
+ w – iki artimiausios žodžio pradžios, NEĮTRAUKIANT pirmojo jo rašmens;
+ e – iki artimiausios žodžio pabaigos, ĮTRAUKIANT paskutinį jo rašmenį;
+ $ – iki einamosios eilutės pabaigos, ĮTRAUKIANT paskutinį jos rašmenį.
+
+ Taigi, įvedę komandą de , pašalinsite tekstą nuo žymeklio pozicijos iki
+ atitinkamo žodžio pabaigos.
+
+PASTABA: „Normaliojoje“ veiksenoje spustelėjus tik vektoriaus klavišą, bet
+ nenurodžius operatoriaus, į atitinkamą poziciją bus perkeltas teksto
+ žymeklis.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 2.4 pamoka: VEKTORIAUS NAUDOJIMAS SU SKAITIKLIU
+
+
+ ** PrieÅ¡ vektoriaus ženklÄ… paraÅ¡ius skaiÄių, jis pakartojamas atitinkamÄ…
+ skaiÄių kartų. **
+
+ 1. Perkelkite žymeklį į eilutės žemiau, pažymėtos --->, pradžią.
+
+ 2. Įveskite 2w , kad perkeltumėte žymeklį per du žodžius pirmyn (į žodžio
+ pradžią).
+
+ 3. Ä®veskite 3e , kad perkeltumÄ—te žymeklį iki treÄiosios žodžio pabaigos
+ nuo einamosios jo vietos.
+
+ 4. Įveskite 0 (nulį), kad perkeltumėte žymeklį į eilutės pradžią.
+
+ 5. Pakartokite žingsnius 2 ir 3 su kitais skaiÄiais.
+
+---> Šioje eilutėje yra žodžių, po kuriuos galite pakilnoti žymeklį.
+
+ 6. Keliaukite toliau į 2.5 pamoką.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 2.5 pamoka: SKAITIKLIO NAUDOJIMAS Å ALINANT TEKSTÄ„
+
+
+ ** Kai skaiÄius naudojamas su operatoriumi, komanda pakartojama atitinkamÄ…
+ skaiÄių kartų. **
+
+ Ä® aukÅ¡Äiau minÄ—tÄ… teksto Å¡alinimo operatoriaus ir vektoriaus kombinacijÄ…
+ įterpÄ™ skaiÄių, galite paÅ¡alinti daugiau teksto:
+ d skaiÄius vektorius
+
+ 1. Perkelkite žymeklį ties pirmuoju DIDŽIOSIOMIS RAIDĖMIS parašytu žodžiu
+ eilutėje žemiau, pažymėtoje --->.
+
+ 2. Įveskite d2w , kad pašalintumėte du DIDŽIOSIOMIS RAIDĖMIS parašytus
+ žodžius.
+
+ 3. Kartokite žingsnius 1 ir 2 su kitais skaiÄiais, kad paÅ¡alintumÄ—te kitus
+ vienas po kito einanÄius žodžius DIDŽIOSIOMIS RAIDÄ–MIS vienos komandos
+ pagalba.
+
+---> Šis ABC DE sakinys FGHI JK LMN OP dabar išvalytas R STU VZŽ nuo šlamšto.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 2.6 pamoka: OPERAVIMAS VISOMIS EILUTÄ–MIS
+
+
+ ** Spustelėkite dd visai eilutei pašalinti. **
+
+ Kadangi visos eilutės šalinimas – gan dažna operacija, „Vi“ autoriai nutarė,
+ jog bus patogiau dukart spustelėti d visos eilutės pašalinimui.
+
+ 1. Perkelkite žymeklį į antrąją eilutę žemiau, pažymėtą --->.
+ 2. Surinkite dd visai eilutei pašalinti.
+ 3. Tada pereikite į ketvirtąją eilutę.
+ 4. Surinkite 2dd pašalinti iškart dviems eilutėms.
+
+---> 1) Apšerkšniję mūsų žiemos –
+---> 2) Sniegas maišos su purvu,
+---> 3) Balta, balta – kur dairais –
+---> 4) Dienos trumpos ir niūrios,
+---> 5) Gatvės ir keliai slidūs,
+---> 6) Ilgas pasakas mažiemus
+---> 7) Seka pirkioj vakarais.
+
+Operatoriaus dubliavimas, norint atlikti komandÄ… su visa eilute, veikia ir su
+kitais žemiau paminėtais operatoriais.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 2.7 pamoka: ATÅ AUKIMO KOMANDA
+
+
+ ** Spustelėkite u atšaukti paskutinės komandos pakeitimams,
+ arba U atšaukti visiems pakeitimams eilutėje. **
+
+ 1. Perkelkite žymeklį ties pirmąja klaida eilutėje žemiau, pažymėtoje --->.
+ 2. Spustelėkite x – taip pašalinsite nereikalingą simbolį.
+ 3. Dabar spustelÄ—kite u paskutinÄ—s komandos atliktiems pakeitimams
+ atšaukti.
+ 4. Šįkart iÅ¡taisykite visas eilutÄ—je esanÄias klaidas x komandos pagalba.
+ 5. Spustelėkite didžiąją U – taip atstatysite eilutę į pirminę būseną.
+ 6. Dabar keletą kartų spustelėkite u – taip atitaisysite U bei ankstesnių
+ komandų pakeitimus.
+ 7. Keletą kartų spustelėkite CTRL+R – taip pakartosite atšauktus veiksmus.
+
+---> Ištaisyykite klaidas šiioje eilutėje iir atšaukite paakeitimus.
+
+ 8. Šios komandos labai naudingos. Keliaukite į 2 pamokos santrauką.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 2 pamokos SANTRAUKA
+
+
+ 1. Tekstui pašalinti nuo žymeklio iki kito žodžio pradžios rinkite: dw
+ 2. Tekstui pašalinti nuo žymeklio iki einamojo žodžio pabaigos rinkite: de
+ 3. Tekstui pašalinti nuo žymeklio iki eilutės pabaigos rinkite: d$
+ 4. Visai eilutei pašalinti rinkite: dd
+
+ 5. Vektoriui pakartoti prieÅ¡ jį paraÅ¡ykite skaiÄių: 2w
+ 6. Pakeitimo komandos formatas yra toks:
+ komanda [skaiÄius] vektorius
+ kur:
+ komanda – atliktinas veiksmas, pavyzdžiui d – šalinimas
+ [skaiÄius] – skaitiklis, nurodantis, kiek kartų pakartoti veiksmÄ…
+ (neprivalomas)
+ vektorius – nurodo apimtį teksto, kuriuo norima operuoti, pavyzdžiui:
+ w (iki žodžio pradžios), e (iki žodžio pabaigos),
+ $ (iki eilutÄ—s pabaigos) ir pan.
+
+ 7. Žymekliui perkelti į eilutės pradžią surinkite nulį: 0
+
+ 8. Atšaukti pastariesiems pakeitimams rinkite: u (mažoji u)
+ Atšaukti visiems pakeitimams esamojoje eilutėje rinkite: U (didžioji U)
+ Pakartoti atšauktiems veiksmams spustelėkite: CTRL+R
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 3.1 pamoka: PATALPINIMO KOMANDA
+
+
+ ** Komanda p už žymeklio patalpina paskiausiai pašalintą tekstą. **
+
+ 1. Perkelkite žymeklį į pirmąją eilutę žemiau, pažymėtą --->.
+
+ 2. Spustelėkite dd – taip pašalinsite einamąją eilutę ir patalpinsite jos
+ turinį į „Vim“ iškarpinę.
+
+ 3. Perkelkite žymeklį į c) eilutę, VIRŠ tos vietos, kurioje turėtų atsidurti
+ pašalintoji eilutė.
+
+ 4. Spustelėkite p – taip pašalintą eilutę patalpinsite į reikiamą vietą.
+
+ 5. Kartokite 2-4 žingsnius ir perkelkite visas eilutes į savo vietas.
+
+---> d) Seka pirkioj vakarais.
+---> b) Balta, balta – kur dairais –
+---> c) Ilgas pasakas mažiemus
+---> a) Apšerkšniję mūsų žiemos –
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 3.2 pamoka: PAKEITIMO KOMANDA
+
+
+ ** Rašmenį, esantį ties žymekliu, galite pakeisti, spustelėdami r ir
+ naująjį rašmenį. **
+
+ 1. Perkelkite žymeklį į pirmąją eilutę žemiau, pažymėtą --->.
+
+ 2. Tada perkelkite žymeklį ties pirmuoju klaidingu rašmeniu.
+
+ 3. Spustelėkite r ir simbolį, kuriuo norite pakeisti klaidingą.
+
+ 4. Kartokite 2 ir 3 punktą kol eilutė bus ištaisyta.
+
+---> Kežkus, rinjdamss šį tekštą, pridėrė dauk kleidų!
+---> Kažkas, rinkdamas šį tekstą, pridarė daug klaidų!
+
+ 5. Tuomet keliaukite į 3.3 pamoką.
+
+PASTABA: MokykitÄ—s ne tik skaitydami, bet ir darydami.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 3.3 pamoka: KEITIMO KOMANDA
+
+
+ ** Kai norite pakeisti viską iki žodžio pabaigos, spustelėkite ce . **
+
+ 1. Perkelkite žymeklį į pirmąją eilutę žemiau, pažymėtą --->.
+
+ 2. Patalpinkite žymeklį ties raide „h“ žodyje „eilhhhja“.
+
+ 3. Spustelėkite ce ir ištaisykite žodį (šiuo atveju, surinkite „utėje“).
+
+ 4. Spustelėkite <ESC> ir perkelkite žymeklį ties kita klaida (pirmuoju
+ rašmeniu, kurį reikia pakeisti).
+
+ 5. Kartokite 3 ir 4 punktus, kol ištaisysite visą sakinį.
+
+---> Šioje eilhhhja yra keklasf žodžių, kowkshs reikia ištaisyti.
+---> Šioje eilutėje yra keletas žodžių, kuriuos reikia ištaisyti.
+
+PASTABA: komanda ce pašalina žodį ir įjungia įterpimo veikseną, o
+ komanda cc analogišką veiksmą atlieka su visa eilute.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 3.4 pamoka: KITI KEITIMAI NAUDOJANT c OPERATORIŲ
+
+
+ ** Keitimo komanda gali bÅ«ti naudojama su tais paÄiais vektoriais,
+ kaip ir Å¡alinimo. **
+
+ 1. Keitimo operatorius veikia labai panašiai kaip šalinimo.
+ Komandos formatas yra toks:
+
+ c [skaiÄius] vektorius
+
+ 2. Vektoriai yra tokie pat, kaip ir Å¡alinimo komandoje:
+ w (žodis), $ (iki eilutės pabaigos) ir pan.
+
+ 3. Perkelkite žymeklį į pirmąją eilutę žemiau, pažymėtą --->.
+
+ 4. Tuomet perkelkite žymeklį ties pirma klaida.
+
+ 5. SpustelÄ—kite c$ ir surinkite teisingÄ… eilutÄ—s pabaigÄ…,
+ tada spustelÄ—kite <ESC>.
+
+---> Šios eilutės pabaigą reikia perrašyti, kad ji būtų tokia pat, kaip kita.
+---> Å ios eilutÄ—s pabaigÄ… reikia pataisyti c$ komandos pagalba.
+
+PASTABA: rinkdami tekstą, klaidas pataisyti galite ir naudodamiesi įprastu
+ šalinimo kairėn klavišu.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 3 pamokos SANTRAUKA
+
+
+ 1. Norėdami patalpinti paskiausiai pašalintą tekstą, spustelėkite p – taip
+ jį patalpinsite iškart PO žymeklio. Jei buvo pašalinta visa eilutė, tuomet
+ ji bus patalpinta kaip nauja eilutÄ— po einamosios.
+
+ 2. Vienas raÅ¡muo pakeiÄiamas spustelint r ir raÅ¡menį, kuriuo norime
+ pakeisti esamąjį.
+
+ 3. Keitimo operatorius keiÄia nurodytÄ… teksto dalį nuo žymeklio. Pavyzdžiui,
+ spustelėdami ce , galite pakeisti tekstą nuo žymeklio iki žodžio
+ pabaigos, o c$ – iki eilutės pabaigos.
+
+ 4. Keitimo komandos formatas yra toks:
+
+ c [skaiÄius] vektorius
+
+Dabar keliaukite į kitą pamoką.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 4.1 pamoka: ŽYMEKLIO VIETA IR FAILO BŪSENA
+
+
+ ** Spustelėję CTRL+G, sužinosite žymeklio vietą faile ir failo būseną.
+ Spustelėję G , žymeklį perkelsite į nurodytą eilutę. **
+
+ PASTABA: perskaitykite visą šią pamoką prieš pradėdami vykdyti nurodymus!!
+
+ 1. SpustelÄ—kite CTRL+G klavišų kombinacijÄ…. Redaktoriaus apaÄioje atsiras
+ pranešimas su failo vardu ir žymeklio vieta jame. Įsidėmėkite, kurioje
+ eilutėje yra žymeklis, to reikės 3 punkte.
+
+PASTABA: žymeklio poziciją faile apatiniame dešiniajame redaktoriaus kampe
+ galima matyti ir nuolatos – tam galima įjungti parinktį „ruler“
+ (liniuotė) (žr. :help 'ruler' ).
+
+ 2. Spustelėkite G tam, kad nukeliautumėte į failo pabaigą.
+ Spustelėkite gg tam, kad nukeliautumėte į failo pradžią.
+
+ 3. Surinkite eilutės numerį, kurioje buvote pradžioje, tada
+ spustelėkite G – taip sugrįšite į nurodytą eilutę (jos numerį turėjote
+ pamatyti ir įsiminti pirmajame šios pamokos žingsnyje).
+
+ 4. Jei supratote, kaip tai daroma – įvykdykite punktus nuo 1 iki 3.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 4.2 pamoka: PAIEÅ KOS KOMANDA
+
+
+ ** Paieška vykdoma, spustelint / , tada surenkant ieškomą frazę. **
+
+ 1. Būdami „Normaliojoje“ veiksenoje, spustelėkite / klavišą. Šis ženklas ir
+ žymeklis atsiras „Vim“ sÄ…sajos apaÄioje, lygiai kaip ir : komandos
+ atveju.
+
+ 2. Surinkite žodį „kllaidda“ (kabuÄių nereikia) ir spustelÄ—kite <ENTER>.
+ Tai – žodis, kurio ieškosime.
+
+ 3. NorÄ—dami surasti kitÄ… tokiÄ… pat frazÄ™, spustelÄ—kite n .
+ Jei kitos frazės norite ieškoti priešinga kryptimi, spustelėkite N.
+
+ 4. Jei norite frazės iškart ieškoti ne pirmyn, bet atgal, vietoj / komandos
+ naudokite ? .
+
+ 5. Grįžti į ankstesnę vietą galite klavišų kombinacijos CTRL+O pagalba
+ (laikydami nuspaustą klavišą CTRL, spustelėkite raidę O). Kartodami šią
+ kombinacijÄ…, grįšite dar anksÄiau. Grįžti į vÄ—lesnÄ™ lankytÄ… vietÄ… galite
+ klavišų kombinacijos CTRL+I pagalba.
+
+---> „kllaidda“ yra žodis su klaida; „kllaidda“ yra klaida.
+
+PASTABA: paieškai pasiekus failo pabaigą, ji bus pratęsta nuo pradžios, nebent
+ būtų pakeista parinkties „wrapscan“ reikšmė.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 4.3 pamoka: PORINIŲ SKLIAUSTŲ PAIEŠKA
+
+
+ ** Spauskite % , jei norite surasti porinį ), ] ar } skliaustą. **
+
+ 1. Perkelkite žymeklį ties bet kuriuo (, [ ar { skliaustu, esanÄiu
+ eilutėje, pažymėtoje --->.
+
+ 2. Dabar spustelėkite % simbolį.
+
+ 3. Žymeklis peršoks ties poriniu dešiniuoju skliaustu.
+
+ 4. Dar kartą spustelėkite % – sugrįšite atgal ties atitinkamu
+ kairiuoju skliaustu.
+
+---> Teksto ( eilutė su ( visų, [ tipų ] ir { skliaustų } poromis. ))
+
+PASTABA: Ši komanda pravers derinant programas su skliaustų maišalyne.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 4.4 pamoka: PAKAITOS KOMANDA
+
+
+ ** Pakeisti vienÄ… frazÄ™ kita padÄ—s komanda :s/viena/kita/g . **
+
+ 1. Perkelkite žymeklį į eilutę žemiau, pažymėtą --->.
+
+ 2. Surinkite :s/išgalvuojau/išgalvojau <ENTER>. Taip pakeisite pirmąjį
+ eilutėje esantį žodį „išgalvuojau“ į „išgalvojau“.
+
+ 3. Dabar surinkite :s/išgalvuojau/išgalvojau/g <ENTER>. Pridėta gairė „g“
+ nurodo pakaitos komandÄ… vykdyti globaliai visoje eilutÄ—je, todÄ—l dabar
+ į „išgalvojau“ bus pakeisti visi eilutėje likę žodžiai „išgalvuojau“.
+
+---> išgalvuojau lietų, išgalvuojau giedrą, išgalvuojau jūrą ir kai ką daugiau
+
+ 4. Jeigu norite atlikti tokiÄ… pakaitÄ… rėžyje tarp dviejų eiluÄių,
+ surinkite :#,#s/viena/kita/g , kur #,# yra dviejų rėžį apibrėžianÄių
+ eiluÄių numeriai (pvz., 12,14).
+ Surinkite :%s/viena/kita/g , jei norite pakaitÄ… atlikti visame faile.
+ Surinkite :%s/viena/kita/gc , kad būtų surastos visos keistinos vietos
+ faile ir atskirai atsiklausta dÄ—l
+ kiekvienos iš jų pakeitimo.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 4 pamokos SANTRAUKA
+
+
+ 1. CTRl+G parodo padėtį faile ir failo būseną.
+ G perkelia žymeklį į failo pabaigą.
+ numeris G perkelia žymeklį į atitinkamą eilutę.
+ gg perkelia žymeklį į failo pradžią.
+
+ 2. Įvedę / ir frazę, atliksite šios frazės paiešką PIRMYN.
+ Įvedę ? ir frazę, atliksite šios frazės paiešką ATGAL.
+ PastarÄ…jÄ… paieÅ¡kÄ… galima pakartoti, spustelint n (ta paÄia kryptimi,
+ kaip ir vykusi paieška) arba N (priešinga kryptimi).
+ CTRL+O kombinacija padės grįžti į ankstesnę žymeklio vietą, o
+ CTRL+I – į paskesnę.
+
+ 3. Paspaudus % , kai žymeklis yra ties (,),[,],{, arba }, jis perkeliamas
+ ties atitinkanÄiu poriniu skliaustu.
+
+ 4. Pirmą „sena“ eilutėje pakeisti į „nauja“ galite, įvedę:
+ :s/sena/nauja
+ Visus „sena“ eilutėje pakeisti į „nauja“ galite, įvedę:
+ :s/sena/nauja/g
+ Visus frazÄ—s pasikartojimus tarp dviejų eiluÄių galite pakeisti, įvedÄ™:
+ :#,#s/sena/nauja/g
+ Pakeisti visus „sena“ pasikartojimus faile į „nauja“ galite, įvedę:
+ :%s/sena/nauja/g
+ Jei norite, kad prieš kiekvieną pakeitimą būtų prašoma patvirtinimo:
+ :%s/sena/nauja/gc
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 5.1 pamoka: KAIP ĮVYKDYTI IŠORINĘ KOMANDĄ
+
+
+ ** Surinkite :! ir norimą įvykdyti išorinę komandą – ir ji bus įvykdyta. **
+
+ 1. Įveskite jau pažįstamą komandą : , kad žymeklis atsidurtų redaktoriaus
+ apaÄioje.
+
+ 2. Dabar įveskite ! (šauktuką). Tai leis įvykdyti norimą išorinę komandą.
+
+ 3. Pavyzdžiui, po šauktuko surinkite ls ir spustelėkite <ENTER>. Tai
+ parodys jūsų esamo aplanko turinį – tarsi komandą būtumėte paleidę
+ tiesiogiai terminale. Jei ls neveikia – pabandykite komandą dir .
+
+PASTABA: Tokiu būdu galima įvykdyti bet kokią išorinę programą, taip pat ir su
+ argumentais.
+
+Pastaba: Visos : komandos pradedamos vykdyti paspaudus <ENTER>
+ TolesnÄ—se pamokose ne visada tai priminsime.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 5.2 pamoka: DAR APIE FAILŲ RAŠYMĄ
+
+
+ ** Jeigu norite įrašyti savo pakeitimus į failą, surinkite :w FAILO_VARDAS **
+
+ 1. Surinkite :!dir ar :!ls , kad pamatytumėte aplanko turinį.
+ Neužmirškite po to spustelėti <ENTER>.
+
+ 2. Sugalvokite failo vardą, kurio aplanke dar nėra, pavyzdžiui, TESTAS.
+
+ 3. Dabar surinkite :w TESTAS (Äia TESTAS – jÅ«sų pasirinktas failo vardas).
+
+ 4. Taip įrašysite visą failą (šį pradžiamokslį) vardu TESTAS.
+ Patikrinkite tai, pakartodami :!dir ar :!ls komandÄ….
+
+PASTABA: jei po šio žingsnio baigtumėte „Vim“ darbą, o tada vėl paleistumėte
+ redaktorių komandos vim TESTAS pagalba, atvertas failas būtų
+ tiksli jūsų įrašyto pradžiamokslio kopija.
+
+ 5. Dabar pašalinkite failą, surinkdami tokią komandą:
+ :!del TESTAS – jei naudojatės „Windows“,
+ arba :!rm TESTAS – jei naudojatės „Unix“
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 5.3 pamoka: ĮRAŠYTINO TEKSTO PAŽYMĖJIMAS
+
+
+ ** Norėdami įrašyti dalį failo, įveskite v vektorius :w FAILO_VARDAS **
+
+ 1. Perkelkite žymeklį į šią eilutę.
+
+ 2. Spustelėkite v , tada perkelkite žymeklį į penktąjį punktą žemiau.
+ Atkreipkite dėmesį, jog tekstas pažymimas.
+
+ 3. SpustelÄ—kite : – ekrano apaÄioje pamatysite raginimÄ… :'<,'> .
+
+ 4. Ä®veskite w TESTAS , kur TESTAS – tai dar neegzistuojanÄio failo vardas.
+ PrieÅ¡ spustelÄ—dami <ENTER>, įsitikinkite, jog redaktoriaus apaÄioje
+ matote eilutÄ™ :'<,'>w TESTAS .
+
+ 5. Spustelėjus <ENTER>, „Vim“ įrašys pasirinktą tekstą į failą TESTAS.
+ Įsitikinti, jog failas sukurtas, galite, įvykdę komandą :!dir ar :!ls .
+ Kol kas nepašalinkite šio failo, nes jį naudosime kitoje pamokoje.
+
+PASTABA: Spustelėjus v , pradedamas Vizualusis pažymėjimas. Pažymėto teksto
+ apimtį galite keisti žymeklio valdymo klavišais. Pasirinkę norimą
+ teksto fragmentą, galite panaudoti operatorių, kad kažką su tuo tekstu
+ atliktumėte. Pavyzdžiui, operatorius d pažymėtą tekstą pašalins.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 5.4 pamoka: FAILO ĮTERPIMAS
+
+
+** Jei norite į tekstą įterpti kito failo turinį, surinkite :r FAILO_VARDAS **
+
+ 1. Perkelkite žymeklį virš šios eilutės.
+
+PASTABA: Įvykdę 2 žingsnį, pamatysite 5.3 pamokos turinį. Tuomet grįžkite atgal
+ į šią pamoką.
+
+ 2. Dabar įterpkite failo TESTAS turinį į tekstą, pasinaudodami komanda
+ :r TESTAS , kur TESTAS – tai norimo įterpti failo vardas (šį failą
+ turėjote sukurti 5.3 pamokoje). Failo turinys bus įterptas iškart
+ po eilute, kurioje yra žymeklis.
+
+ 3. Kad įsitikintumėte, jog komanda buvo įvykdyta, šiek tiek sugrįžkite
+ aukštyn. Turėtumėte matyti dvi 5.3 pamokos kopijas.
+
+PASTABA: Panašiai galite įterpti ir išorinės komandos išvestą tekstą.
+ Pavyzdžiui, įvedę :r !ls , įterpsite ls komandos išvestį po eilute,
+ kurioje yra žymeklis.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 5 pamokos SANTRAUKA
+
+
+ 1. :!komanda įvykdo išorinę komandą.
+
+ Keletas naudingų pavyzdžių:
+ (Windows) (Unix)
+ :!dir :!ls – parodo aplanko turinį.
+ :!del FAILO_VARDAS :!rm FAILO_VARDAS – pašalina failą FAILO_VARDAS.
+
+ 2. :w FAILO_VARDAS įrašo redaguojamą tekstą į failą vardu FAILO_VARDAS.
+
+ 3. v vektorius :w FAILO_VARDAS įrašo vizualiai pažymėtą tekstą į failą
+ vardu FAILO_VARDAS.
+
+ 4. :r FAILO_VARDAS įterpia failo vardu FAILO_VARDAS turinį į redaguojamą
+ tekstą po eilute, kurioje yra žymeklis.
+
+ 5. :r !dir įterpia komandos dir išvestį į redaguojamą tekstą po eilute,
+ kurioje yra žymeklis.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 6.1 pamoka: NAUJOS EILUTĖS ĮTERPIMO IR REDAGAVIMO KOMANDA („OPEN“)
+
+
+ ** SpustelÄ—jus o , po žymekliu bus įterpta tuÅ¡Äia eilutÄ— ir persijungta
+ į Įterpimo joje veikseną. **
+
+ 1. Perkelkite žymeklį į pirmąją eilutę žemiau, pažymėtą --->.
+
+ 2. SpustelÄ—kite o – taip įterpsite tuÅ¡ÄiÄ… eilutÄ™ PO žymekliu, be to, bus
+ įjungta Įterpimo veiksena.
+
+ 3. Įveskite keletą žodžių ir spustelėkite <ESC>, kad grįžtumėte į
+ „Normaliąją“ veikseną
+
+---> Spustelėjus o , rašymo žymeklis bus perkeltas į naujai įterptą eilutę.
+
+ 4. Jei norite įterpti tuÅ¡ÄiÄ… eilutÄ™ VIRÅ  žymeklio, spustelÄ—kite didžiÄ…jÄ… O ,
+ o ne mažąjÄ…. IÅ¡bandykite tai su žemiau esanÄia eilute.
+
+---> Įterpkite naują eilutę virš šios, įvesdami O , kai žymeklis yra šioje.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 6.2 pamoka: TEKSTO ĮTERPIMO UŽ ŽYMEKLIO KOMANDA („APPEND“)
+
+
+ ** Kai norite rašyti tekstą už žymeklio, spustelėkite a . **
+
+ 1. Perkelkite žymeklį į pirmąją eilutę žemiau, pažymėtą --->.
+
+ 2. Spauskite e , kol žymeklis atsidurs žodžio „eilutė“ gale.
+
+ 3. Spustelėkite a (mažąją) tekstui įterpti už žymeklio.
+
+ 4. Užbaikite žodį, kad būtų toks pat, kaip eilutėje žemiau. Tada spustelėkite
+ <ESC>, kad išeitumėte iš Įterpimo veiksenos.
+
+ 5. Spauskite e , kad pereitumėte prie kito neužbaigto žodžio ir pakartokite
+ 3–5 žingsnius.
+
+---> Šioje eilutė pasimokykite įterp teks už žymeklio.
+---> Šioje eilutėje pasimokykite įterpti tekstą už žymeklio.
+
+PASTABA: komandos a, i ir A visos įjungia Įterpimo veikseną. Skiriasi tik
+ vieta, ties kuria tekstas bus pradėtas įterpti.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 6.3 pamoka: KITAS KEITIMO BŪDAS
+
+
+ ** Spustelėkite R , jeigu norite pakeisti daugiau nei vieną rašmenį. **
+
+ 1. Perkelkite žymeklį į pirmąją eilutę žemiau, pažymėtą --->. Perkelkite
+ žymeklį į pirmojo fragmento „xxx“ joje pradžią.
+
+ 3. SpustelÄ—kite R ir perraÅ¡ykite skaiÄių iÅ¡ kitos eilutÄ—s, kad jis pakeistų
+ fragmentÄ….
+
+ 4. Pakartokite žingsnius ir analogiškai perrašykite antrąjį „xxx“ fragmentą.
+
+---> Prie 123 pridÄ—jÄ™ xxx gausime xxx.
+---> Prie 123 pridÄ—jÄ™ 456 gausime 579.
+
+PASTABA: PerraÅ¡ymo veiksena yra analogiÅ¡ka Ä®terpimo veiksenai, taÄiau
+ kiekvienas joje įvedamas rašmuo perrašo esamą rašmenį.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 6.4 pamoka: TEKSTO KOPIJAVIMAS IR ĮKLIJAVIMAS
+
+
+ ** Tekstas kopijuojamas y operatoriumi, o įterpiamas p operatoriumi. **
+
+ 1. Perkelkite žymeklį į pirmąją eilutę žemiau, pažymėtą --->, tada
+ perkelkite jį už „a)“.
+
+ 2. Įjunkite Vizualiojo žymėjimo veikseną (komanda v ) ir perkelkite žymeklį
+ iki pozicijos prieš pat žodį „pirmas“.
+
+ 3. Spustelėkite y pažymėtam tekstui nukopijuoti į „Vim“ iškarpinę.
+
+ 4. Perkelkite žymeklį į kitos eilutės pabaigą: j$
+
+ 5. Spustelėkite p tekstui įterpti. Tada įveskite: antras <ESC> .
+
+ 6. Grįžkite į ankstesnę eilutę, Vizualiojo žymėjimo veiksenoje pažymėkite
+ tekstą „ elementas.“, nukopijuokite jį, spustelėdami y , tada vėl
+ pereikite į kitos eilutės pabaigą ( j$ ) ir įterpkite nukopijuotą tekstą,
+ spustelÄ—dami p .
+
+---> a) tai yra pirmas elementas.
+ b)
+
+ PASTABA: y galite naudoti ir kaip operatorių: yw nukopijuos vieną žodį,
+ yy – visą eilutę, o vėliau p šią eilutę įterps.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 6.5 pamoka: PARINKČIŲ NUSTATYMAS
+
+
+ ** Kad ieškant teksto nebūtų paisoma didžiųjų ir mažųjų raidžių skirtumo,
+ galima pakeisti atitinkamą parinktį. **
+
+ 1. Paieškokite žodžio „nepaisyti“: /nepaisyti <ENTER>
+ Pakartokite paiešką keletą kartų, spustelėdami n klavišą.
+
+ 2. Nustatykite 'ic' („ignore case“ / nepaisyti raidžių registro) parinktį:
+ :set ic
+
+ 3. Pratęskite žodžio „nepaisyti“ paiešką, spustelėdami n . Atkreipkite
+ dėmesį, jog dabar bus randami ir žodžiai „Nepaisyti“ bei „NEPAISYTI“.
+
+ 4. Nustatykite 'hlsearch' ir 'incsearch' parinktis: :set hls is
+
+ 5. Dar kartą įvykdykite paiešką ir pasižiūrėkite kas bus: /nepaisyti <ENTER>
+
+ 6. Kad ieškant raidžių registro vėl būtų paisoma, įveskite: :set noic
+
+PASTABA: Jei norite išjungti radinių paryškinimą, įveskite: :nohlsearch
+PASTABA: Jei norite raidžių registro nepaisyti tik vienos paieškos metu, frazę
+ papildykite \c sufiksu: /nepaisyti\c <ENTER>
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 6 pamokos SANTRAUKA
+
+
+ 1. Spustelėjus o , įterpiama nauja eilutė ŽEMIAU žymeklio, žymeklis
+ perkeliamas į ją ir įjungiama Įterpimo veiksena.
+ Spustelėjus O , eilutė bus įterpta VIRŠ žymeklio.
+
+ 2. Spustelėjus a , bus įjungta Įterpimo veiksena UŽ žymeklio.
+ Spustelėjus A , bus įjungta Įterpimo veiksena eilutės pabaigoje.
+
+ 3. Spustelėjus e , žymeklis perkeliamas į žodžio pabaigą.
+
+ 4. Spustelėjus y , pažymėtas tekstas nukopijuojamas į „Vim“ iškarpinę.
+ Spustelėjus p , „Vim“ iškarpinėje esantis tekstas įterpiamas.
+
+ 5. Spustelėjus R , įjungiama Perrašymo („Replace“) veiksena, iš kurios
+ išeinama spustelint <ESC>.
+
+ 6. Įvedus komandą „:set xxx“, yra įjungiama "xxx" parinktis. Keletas jų:
+ 'ic' arba 'ignorecase' – nepaisyti raidžių registro ieškant
+ 'is' arba 'incsearch' – rodyti dalinius ieškomos frazės atitikmenis
+ 'hls' arba 'hlsearch' – paryškinti visus radinius
+ Galima naudoti tiek trumpąjį, tiek ilgąjį parinkties vardus.
+
+ 7. Parinktį išjungti galite, prieš jos vardą pridėdami priešdėlį „no“, pvz.:
+ :set noic
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 7.1 pamoka: VIM ŽINYNO KOMANDOS
+
+
+ ** Naudokitės „Vim“ žinyno sistema. **
+
+ „Vim“ turi iÅ¡samų žinynÄ…. Pirmai pažinÄiai su juo, iÅ¡bandykite vienÄ… iÅ¡ Å¡ių
+ būdų:
+ - spustelėkite <HELP> klavišą (jei turite klaviatūroje)
+ - spustelėkite <F1> klavišą (jei turite klaviatūroje)
+ - surinkite :help <ENTER>
+
+ Perskaitykite tekstą žinyno lange, kad sužinotumėte, kaip jis veikia.
+ Nuspaudę CTRL+W CTRL+W , galite peršokti iš vieno lango į kitą.
+ Įveskite :q <ENTER> žinyno langui užverti.
+
+ Informacijos galima rasti įvairiausiomis temomis, perduodant „:help“
+ komandai raktinį žodį kaip argumentą. Pabandykite:
+
+ :help w <ENTER>
+ :help c_CTRL-D <ENTER>
+ :help insert-index <ENTER>
+ :help user-manual <ENTER>
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 7.2 pamoka: PALEISTIES SCENARIJAUS KŪRIMAS
+
+
+ ** Išnaudokite „Vim“ privalumus **
+
+ „Vim“ turi platesnį funkcionalumÄ… nei „Vi“, taÄiau dauguma Å¡ių galimybių
+ numatytuoju atveju išjungtos. Jei norite pradėti naudotis papildomomis
+ galimybėmis, pirmiausia susikurkite „vimrc“ failą.
+
+ 1. Pradėkite redaguoti „vimrc“ failą. Komanda priklauso nuo jūsų naudojamos
+ platformos:
+ :e ~/.vimrc – „Unix“ sistemose
+ :e ~/_vimrc – „Windows“ sistemose
+
+ 2. Įterpkite pavyzdinio „vimrc“ failo turinį:
+ :r $VIMRUNTIME/vimrc_example.vim
+
+ 3. Įrašykite redaguojamą failą:
+ :w
+
+ Kitąkart paleidę „Vim“, jau galėsite mėgautis sintaksės paryškinimu.
+ Visas pageidaujamas parinktis galite pridėti į šį „vimrc“ failą.
+ Išsamesnė informacija apie paleisties scenarijų – :help vimrc-intro .
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 7.3 pamoka: AUTOMATINIS UŽBAIGIMAS
+
+
+ ** Komandų užbaigimas naudojant CTRL+D ir <TAB> **
+
+ 1. Įsitikinkite, jog „Vim“ nėra suderinamumo veiksenoje: :set nocp
+
+ 2. Peržiūrėkite failų sąrašą aplanke: :!ls arba :!dir
+
+ 3. PradÄ—kite vesti komandos pavadinimÄ…: :e
+
+ 4. Nuspauskite CTRL+D – pamatysite komandų, prasidedanÄių raide „e“ sÄ…raÅ¡Ä….
+
+ 5. Įveskite d<TAB> , kad „Vim“ užbaigtų komandos pavadinimą iki „:edit“.
+
+ 6. Įveskite tarpą ir pradėkite vesti failo vardą: :edit FAIL
+
+ 7. Spustelėkite <TAB>. „Vim“ užbaigs failo vardą (jei failas taip
+ prasidedanÄiu vardu egzistuoja ir yra vienintelis).
+
+PASTABA: Automatinis užbaigimas veikia su daugeliu komandų. Jį išbandyti galite
+ klavišų kombinacijos CTRL+D ir klaviÅ¡o <TAB> pagalba. Jis ypaÄ
+ naudingas su komanda :help .
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 7 pamokos SANTRAUKA
+
+
+ 1. Įveskite :help , arba spustelėkite <F1> arba <HELP> žinynui atverti.
+
+ 2. Įveskite :help KOMANDA žinynui apie komandą „KOMANDA“ atverti.
+
+ 3. Nuspauskite CTRL+W CTRL+W , jeigu norite peršokti į kitą langą.
+
+ 4. Įveskite :q žinyno langui užverti.
+
+ 5. Susikurkite „vimrc“ paleisties scenarijaus failą norimoms išlaikyti
+ parinktims įrašyti.
+
+ 6. Rinkdami : prasidedanÄiÄ… komandÄ…, nuspauskite CTRL+D galimiems užbaigimo
+ variantams pamatyti, arba <TAB> užbaigimui atlikti.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Sveikiname, jūs pasiekėte „Vim“ pradžiamokslio pabaigą! Jo tikslas – pateikti
+ glaustą „Vim“ redaktoriaus apžvalgą, kurios pakaktų įgyti „Vim“ redaktoriaus
+ pagrindams. TaÄiau tai toli gražu ne visos galimybÄ—s, kuriomis „Vim“
+ pasižymi. Toliau patariame perskaityti naudotojo vadovą:
+ :help user-manual
+
+ Dar nuodugnesniam mokymuisi rekomenduojame knygÄ…:
+ Steve Oualline. Vim - Vi Improved
+ LeidÄ—jas: New Riders
+ Tai – pirmoji knyga, skirta vien tik „Vim“ redaktoriui. Ypatingai naudinga
+ pradedantiesiems. Knygoje nemažai pavyzdžių ir iliustracijų.
+ Išsamiau – https://iccf-holland.org/click5.html
+
+ Taip pat galime rekomenduoti Å¡iÄ… senesnÄ™ knygÄ…, nors ji ir skirta labiau
+ „Vi“, o ne „Vim“ redaktoriui:
+ Linda Lamb. "Learning the Vi Editor"
+ LeidÄ—jas: O'Reilly & Associates Inc.
+ Tai – gera knyga, kurioje išnagrinėtos beveik visos „Vi“ redaktoriaus
+ galimybės. Šeštame leidime pateikiama informacija ir apie „Vim“.
+
+ Šį pradžiamokslį parašė Michael C. Pierce ir Robert K. Ware, Colorado School
+ of Mines, pasinaudodami Charles Smith, Colorado State University, idÄ—jomis.
+ El. paštas: bware@mines.colorado.edu.
+
+ „Vim“ redaktoriui pritaikė Bram Moolenaar.
+
+ Ä® lietuvių kalbÄ… iÅ¡vertÄ— Laurynas StanÄikas (1.4 versijÄ…)
+ ir Rimas Kudelis (1.7 versijÄ…).
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/runtime/tutor/tutor.zh.euc b/runtime/tutor/tutor.zh.euc
index 16a031a..5cdf21c 100644
--- a/runtime/tutor/tutor.zh.euc
+++ b/runtime/tutor/tutor.zh.euc
@@ -905,7 +905,7 @@
2. ²é¿´Ò»Ïµ±Ç°Ä¿Â¼ÏÂÒѾ­´æÔÚÄÄЩÎļþ£¬ÊäÈ룺 :!ls »òÕß :!dir
- 3. ÏÖÔÚÊäÈëÒ»¸öĿ¼µÄÆðʼ²¿·Ö£¬ÀýÈçÊäÈ룺 :e
+ 3. ÏÖÔÚÊäÈëÒ»¸öÃüÁîµÄÆðʼ²¿·Ö£¬ÀýÈçÊäÈ룺 :e
4. ½Ó×Å°´ CTRL-D ¼ü£¬Vim »áÏÔʾÒÔ e ¿ªÊ¼µÄÃüÁîµÄÁÐ±í¡£
diff --git a/runtime/tutor/tutor.zh_cn.utf-8 b/runtime/tutor/tutor.zh_cn.utf-8
index cc8e575..34879a4 100644
--- a/runtime/tutor/tutor.zh_cn.utf-8
+++ b/runtime/tutor/tutor.zh_cn.utf-8
@@ -905,7 +905,7 @@
2. 查看一下当å‰ç›®å½•ä¸‹å·²ç»å­˜åœ¨å“ªäº›æ–‡ä»¶ï¼Œè¾“入: :!ls 或者 :!dir
- 3. 现在输入一个目录的起始部分,例如输入: :e
+ 3. 现在输入一个命令的起始部分,例如输入: :e
4. 接ç€æŒ‰ CTRL-D 键,Vim 会显示以 e 开始的命令的列表。
diff --git a/runtime/vimlogo.svg b/runtime/vimlogo.svg
new file mode 100644
index 0000000..2ed9ef6
--- /dev/null
+++ b/runtime/vimlogo.svg
@@ -0,0 +1,44 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" viewBox="0 0 294.609406 294.609406" width="294.609406" height="294.609406">
+ <metadata id="metadata1">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:title>vimlogo 1.1.0</dc:title>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Shay Hill</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:description>The classic Vim logo.</dc:description>
+ <dc:source>https://www.github.com/ShayHill/vimlogo</dc:source>
+ <dc:relation>https://github.com/vim/vim</dc:relation>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title>https://github.com/vim/vim/blob/master/LICENSE</dc:title>
+ </cc:Agent>
+ </dc:rights>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <path id="background" d="M20.281866,25.275865 V50.784065 L31.941378,62.443577 H36.406866 V111.397837 L0.5,147.304703 36.406866,183.211569 V251.086148 L49.003878,263.68316 H83.064923 L99.617166,246.421869 147.304703,294.109406 188.960759,252.45335 H274.354061 L283.082713,226.267395 H277.431021 L289.205557,190.943788 277.808372,175.402172 H266.011936 L294.109406,147.304703 243.343475,96.538772 287.338256,50.659391 V25.275865 L275.678745,13.616353 H179.326795 L169.873925,23.069222 147.304703,0.5 131.678339,16.126364 129.168328,13.616353 H31.941378Z" fill="#ffffff"/>
+ <g id="diamond">
+ <path id="diamond_outline" d="M287.632828,147.304703 147.304703,6.976577 6.976577,147.304703 147.304703,287.632828 192.751313,242.186218 H170.875178 L187.830252,191.320996 H182.178561 L184.062458,185.669304 H204.785326 L210.437017,191.320996 H216.088709 L221.7404,185.669304 H238.695474 L243.981851,190.955681Z" fill="#000000"/>
+ <path id="diamond_face" d="M273.466811,147.304703 147.304703,21.142595 21.142595,147.304703 147.304703,273.466811 178.585296,242.186218 H170.875178 L187.830252,191.320996 H182.178561 L184.062458,185.669304 H204.785326 L210.437017,191.320996 H216.088709 L221.7404,185.669304 H235.10221Z" fill="#009933"/>
+ <path id="diamond_bevel_0" d="M147.304703,21.142595 V12.664077 L12.664077,147.304703 H21.142595Z" fill="#87ff3c" stroke="#000000" stroke-width="0.216"/>
+ <path id="diamond_bevel_1" d="M273.466811,147.304703 H281.945329 L147.304703,12.664077 V21.142595Z" fill="#3edc3c" stroke="#000000" stroke-width="0.216"/>
+ <path id="diamond_bevel_2" d="M235.10221,185.669304 H238.695474 L241.138101,188.111931 281.945329,147.304703 H273.466811Z M147.304703,273.466811 V281.945329 L187.063814,242.186218 H178.585296Z" fill="#0d493c" stroke="#000000" stroke-width="0.216"/>
+ <path id="diamond_bevel_3" d="M21.142595,147.304703 H12.664077 L147.304703,281.945329 V273.466811Z" fill="#26973c" stroke="#000000" stroke-width="0.216"/>
+ </g>
+ <g id="letter_v">
+ <path id="v_outline" d="M24.789228,27.142875 33.808388,18.123715 H127.301318 L136.320478,27.142875 V48.917055 L127.301318,57.936215 H122.132978 V116.997042 L181.193805,57.936215 172.174645,48.917055 V27.142875 L181.193805,18.123715 H273.811734 L282.830895,27.142875 V48.847502 L81.14231,259.175798 H50.870888 L39.976728,248.281638 V57.936215 H33.808388 L24.789228,48.917055Z" fill="#000000"/>
+ <path id="v_lit_bevels" d="M30.476728,29.498715 36.164228,23.811215 H124.945478 L130.632978,29.498715 V46.561215 L124.945478,52.248715 H116.445478 V130.727882 L194.924645,52.248715 H183.549645 L177.862145,46.561215 V29.498715 L183.549645,23.811215 H271.455895 L277.143395,29.498715 V46.561215 L78.716311,253.488298 H53.226728 L46.601728,246.863298 V52.248715 H36.164228 L30.476728,46.561215Z" fill="#ffffff" stroke="#000000" stroke-width="0.216"/>
+ <path id="v_dim_bevel_0" d="M130.632978,29.498715 V46.561215 L124.945478,52.248715 H116.445478 V130.727882 L106.007978,152.540382 V46.561215 H122.589638 L124.945478,44.205375 V31.854555 L122.589638,29.498715Z" fill="#7f7f7f" stroke="#000000" stroke-width="0.216"/>
+ <path id="v_dim_bevel_1" d="M194.924645,52.248715 H183.549645 V44.205375 L185.905484,46.561215 H200.612145Z" fill="#7f7f7f" stroke="#000000" stroke-width="0.216"/>
+ <path id="v_dim_bevel_2" d="M277.143395,29.498715 V46.561215 L78.716311,253.488298 H53.226728 V245.444959 L55.582568,247.800798 H73.028811 L271.455895,40.873715 V31.854555 L269.100055,29.498715Z" fill="#7f7f7f" stroke="#000000" stroke-width="0.216"/>
+ <path id="v_dim_bevel_3" d="M46.601728,52.248715 H36.164228 V44.205375 L38.520068,46.561215 H53.226728Z" fill="#7f7f7f" stroke="#000000" stroke-width="0.216"/>
+ <path id="v_face" d="M36.164228,31.854555 38.520068,29.498715 H122.589638 L124.945478,31.854555 V44.205375 L122.589638,46.561215 H106.007978 V152.540382 L200.612145,57.936215 V46.561215 H185.905484 L183.549645,44.205375 V31.854555 L185.905484,29.498715 H269.100055 L271.455895,31.854555 V40.873715 L73.028811,247.800798 H55.582568 L53.226728,245.444959 V46.561215 H38.520068 L36.164228,44.205375Z" fill="#cccccc" stroke="#000000" stroke-width="0.216"/>
+ </g>
+ <g id="letters_im">
+ <path id="im_outline" d="M173.71296,177.227576 180.418734,172.198245 185.627991,156.570474 180.512675,148.897502 H164.269602 L157.563828,153.926832 152.354571,169.554603 157.469886,177.227576Z M160.86914,230.847027 177.824214,179.981804 H143.227146 L137.551582,197.008496 H143.203273 L126.248199,247.873718 H160.845268 L166.520831,230.847027Z M203.256825,230.847027 H197.605134 L205.11685,208.311878 H212.907467 L199.720187,247.873718 H234.317255 L239.992819,230.847027 H234.341128 L241.852844,208.311878 H249.643461 L236.456181,247.873718 H271.053249 L276.728813,230.847027 H271.077122 L284.11204,191.742272 275.487697,179.981804 H253.294709 L247.643017,185.633496 H246.703005 L241.051314,179.981804 H219.384561 L213.732869,185.633496 H212.792857 L207.141166,179.981804 H179.96314 L174.287576,197.008496 H179.939267 L162.984193,247.873718 H197.581261Z" fill="#000000"/>
+ <path id="im_face" d="M134.139184,242.186218 151.094258,191.320996 H145.442567 L147.326464,185.669304 H169.933229 L152.978155,236.534527 H158.629847 L156.745949,242.186218Z M158.629847,168.71423 162.397641,157.410847 166.165435,154.585002 H177.468818 L179.352715,157.410847 175.584921,168.71423 171.817126,171.540076 H160.513744Z M170.875178,242.186218 187.830252,191.320996 H182.178561 L184.062458,185.669304 H204.785326 L210.437017,191.320996 H216.088709 L221.7404,185.669304 H238.695474 L244.347166,191.320996 H249.998857 L255.650548,185.669304 H272.605623 L277.78634,192.733918 263.186137,236.534527 H268.837828 L266.953931,242.186218 H244.347166 L257.534446,202.624378 H237.753526 L226.450143,236.534527 H232.101834 L230.217937,242.186218 H207.611172 L220.798452,202.624378 H201.017532 L189.714149,236.534527 H195.36584 L193.481943,242.186218Z" fill="#cccccc"/>
+ </g>
+</svg>
diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak
index bc2516c..4db2298 100644
--- a/src/Make_mvc.mak
+++ b/src/Make_mvc.mak
@@ -374,9 +374,9 @@ DYNAMIC_SODIUM = yes
!if "$(SODIUM)" != "no"
! if "$(CPU)" == "AMD64"
-SOD_LIB = $(SODIUM)\x64\Release\v140\dynamic
+SOD_LIB = $(SODIUM)\x64\Release\v143\dynamic
! elseif "$(CPU)" == "i386"
-SOD_LIB = $(SODIUM)\Win32\Release\v140\dynamic
+SOD_LIB = $(SODIUM)\Win32\Release\v143\dynamic
! else
SODIUM = no
! endif
diff --git a/src/Makefile b/src/Makefile
index 59511d2..33903d3 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2070,7 +2070,7 @@ xxd/xxd$(EXEEXT): xxd/xxd.c
languages:
@if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
cd $(PODIR); \
- CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix); \
+ CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix) originals; \
fi
-@if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
cd $(PODIR); \
diff --git a/src/arglist.c b/src/arglist.c
index d28b31d..187e16e 100644
--- a/src/arglist.c
+++ b/src/arglist.c
@@ -502,7 +502,7 @@ do_arglist(
void
set_arglist(char_u *str)
{
- do_arglist(str, AL_SET, 0, FALSE);
+ do_arglist(str, AL_SET, 0, TRUE);
}
/*
@@ -682,6 +682,7 @@ do_argfile(exarg_T *eap, int argn)
int other;
char_u *p;
int old_arg_idx = curwin->w_arg_idx;
+ int is_split_cmd = *eap->cmd == 's';
if (ERROR_IF_ANY_POPUP_WINDOW)
return;
@@ -697,13 +698,18 @@ do_argfile(exarg_T *eap, int argn)
return;
}
+ if (!is_split_cmd
+ && (&ARGLIST[argn])->ae_fnum != curbuf->b_fnum
+ && !check_can_set_curbuf_forceit(eap->forceit))
+ return;
+
setpcmark();
#ifdef FEAT_GUI
need_mouse_correct = TRUE;
#endif
// split window or create new tab page first
- if (*eap->cmd == 's' || cmdmod.cmod_tab != 0)
+ if (is_split_cmd || cmdmod.cmod_tab != 0)
{
if (win_split(0, 0) == FAIL)
return;
@@ -1253,10 +1259,6 @@ do_arg_all(
// When the ":tab" modifier was used do this for all tab pages.
arg_all_close_unused_windows(&aall);
- // Now set the last used tabpage to where we started.
- if (valid_tabpage(new_lu_tp))
- lastused_tabpage = new_lu_tp;
-
// Open a window for files in the argument list that don't have one.
// ARGCOUNT may change while doing this, because of autocommands.
if (count > aall.opened_len || count <= 0)
@@ -1291,6 +1293,11 @@ do_arg_all(
// to window with first arg
if (valid_tabpage(aall.new_curtab))
goto_tabpage_tp(aall.new_curtab, TRUE, TRUE);
+
+ // Now set the last used tabpage to where we started.
+ if (valid_tabpage(new_lu_tp))
+ lastused_tabpage = new_lu_tp;
+
if (win_valid(aall.new_curwin))
win_enter(aall.new_curwin, FALSE);
diff --git a/src/auto/configure b/src/auto/configure
index 70ebb33..9712104 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -650,6 +650,7 @@ ac_subst_vars='LTLIBOBJS
LIBOBJS
LINK_AS_NEEDED
DEPEND_CFLAGS_FILTER
+MSGFMTCMD
MSGFMT_DESKTOP
MAKEMO
MSGFMT
@@ -6494,10 +6495,11 @@ printf "%s\n" "$vi_cv_perl_xsubpp" >&6; }
fi
- perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
+ perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
-e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
-e 's/-fdebug-prefix-map[^ ]*//g' \
-e 's/-pipe //' \
+ -e 's/-flto\(=auto\)\? //' \
-e 's/-W[^ ]*//g' \
-e 's/-D_FORTIFY_SOURCE=.//g'`
perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
@@ -10402,9 +10404,12 @@ system ("touch conf.gtktest");
tmp_version = g_strdup("$min_gtk_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gtk_version");
+ g_free(tmp_version);
exit(1);
}
+g_free(tmp_version);
+
if ((gtk_major_version > major) ||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
((gtk_major_version == major) && (gtk_minor_version == minor) &&
@@ -15960,6 +15965,18 @@ printf "%s\n" "yes" >&6; }
printf "%s\n" "no" >&6; }
fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --no-convert" >&5
+printf %s "checking if msgfmt supports --no-convert... " >&6; }
+ if "$MSGFMT" --help | grep -q -- '--no-convert' >/dev/null; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ MSGFMTCMD="OLD_PO_FILE_INPUT=yes msgfmt --no-convert -v"
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ MSGFMTCMD="OLD_PO_FILE_INPUT=yes msgfmt -v"
+ fi
+
fi
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
diff --git a/src/autocmd.c b/src/autocmd.c
index a78e78b..8e43b34 100644
--- a/src/autocmd.c
+++ b/src/autocmd.c
@@ -179,6 +179,7 @@ static struct event_name
{"TerminalOpen", EVENT_TERMINALOPEN},
{"TerminalWinOpen", EVENT_TERMINALWINOPEN},
{"TermResponse", EVENT_TERMRESPONSE},
+ {"TermResponseAll", EVENT_TERMRESPONSEALL},
{"TextChanged", EVENT_TEXTCHANGED},
{"TextChangedI", EVENT_TEXTCHANGEDI},
{"TextChangedP", EVENT_TEXTCHANGEDP},
@@ -187,6 +188,7 @@ static struct event_name
{"VimEnter", EVENT_VIMENTER},
{"VimLeave", EVENT_VIMLEAVE},
{"VimLeavePre", EVENT_VIMLEAVEPRE},
+ {"WinNewPre", EVENT_WINNEWPRE},
{"WinNew", EVENT_WINNEW},
{"WinClosed", EVENT_WINCLOSED},
{"WinEnter", EVENT_WINENTER},
@@ -1564,9 +1566,12 @@ aucmd_prepbuf(
}
aco->save_curwin_id = curwin->w_id;
- aco->save_curbuf = curbuf;
aco->save_prevwin_id = prevwin == NULL ? 0 : prevwin->w_id;
aco->save_State = State;
+#ifdef FEAT_JOB_CHANNEL
+ if (bt_prompt(curbuf))
+ aco->save_prompt_insert = curbuf->b_prompt_insert;
+#endif
if (win != NULL)
{
@@ -1602,7 +1607,7 @@ aucmd_prepbuf(
p_acd = FALSE;
#endif
- (void)win_split_ins(0, WSP_TOP, auc_win, 0);
+ (void)win_split_ins(0, WSP_TOP | WSP_FORCE_ROOM, auc_win, 0, NULL);
(void)win_comp_pos(); // recompute window positions
p_ea = save_ea;
#ifdef FEAT_AUTOCHDIR
@@ -1665,7 +1670,7 @@ win_found:
stop_insert_mode = save_stop_insert_mode;
#endif
// Remove the window and frame from the tree of frames.
- (void)winframe_remove(curwin, &dummy, NULL);
+ (void)winframe_remove(curwin, &dummy, NULL, NULL);
win_remove(curwin, NULL);
// The window is marked as not used, but it is not freed, it can be
@@ -1691,6 +1696,8 @@ win_found:
#ifdef FEAT_JOB_CHANNEL
// May need to restore insert mode for a prompt buffer.
entering_window(curwin);
+ if (bt_prompt(curbuf))
+ curbuf->b_prompt_insert = aco->save_prompt_insert;
#endif
prevwin = win_find_by_id(aco->save_prevwin_id);
#ifdef FEAT_EVAL
@@ -2100,7 +2107,8 @@ apply_autocmds_group(
{
if (event == EVENT_COLORSCHEME || event == EVENT_COLORSCHEMEPRE
|| event == EVENT_OPTIONSET
- || event == EVENT_MODECHANGED)
+ || event == EVENT_MODECHANGED
+ || event == EVENT_TERMRESPONSEALL)
autocmd_fname = NULL;
else if (fname != NULL && !ends_excmd(*fname))
autocmd_fname = fname;
@@ -2180,7 +2188,8 @@ apply_autocmds_group(
|| event == EVENT_USER
|| event == EVENT_WINCLOSED
|| event == EVENT_WINRESIZED
- || event == EVENT_WINSCROLLED)
+ || event == EVENT_WINSCROLLED
+ || event == EVENT_TERMRESPONSEALL)
{
fname = vim_strsave(fname);
autocmd_fname_full = TRUE; // don't expand it later
@@ -2418,6 +2427,11 @@ BYPASS_AU:
# ifdef FEAT_EVAL
static char_u *old_termresponse = NULL;
+static char_u *old_termu7resp = NULL;
+static char_u *old_termblinkresp = NULL;
+static char_u *old_termrbgresp = NULL;
+static char_u *old_termrfgresp = NULL;
+static char_u *old_termstyleresp = NULL;
# endif
/*
@@ -2430,7 +2444,14 @@ block_autocmds(void)
# ifdef FEAT_EVAL
// Remember the value of v:termresponse.
if (autocmd_blocked == 0)
+ {
old_termresponse = get_vim_var_str(VV_TERMRESPONSE);
+ old_termu7resp = get_vim_var_str(VV_TERMU7RESP);
+ old_termblinkresp = get_vim_var_str(VV_TERMBLINKRESP);
+ old_termrbgresp = get_vim_var_str(VV_TERMRBGRESP);
+ old_termrfgresp = get_vim_var_str(VV_TERMRFGRESP);
+ old_termstyleresp = get_vim_var_str(VV_TERMSTYLERESP);
+ }
# endif
++autocmd_blocked;
}
@@ -2441,12 +2462,37 @@ unblock_autocmds(void)
--autocmd_blocked;
# ifdef FEAT_EVAL
- // When v:termresponse was set while autocommands were blocked, trigger
- // the autocommands now. Esp. useful when executing a shell command
- // during startup (vimdiff).
- if (autocmd_blocked == 0
- && get_vim_var_str(VV_TERMRESPONSE) != old_termresponse)
- apply_autocmds(EVENT_TERMRESPONSE, NULL, NULL, FALSE, curbuf);
+ // When v:termresponse, etc, were set while autocommands were blocked,
+ // trigger the autocommands now. Esp. useful when executing a shell
+ // command during startup (vimdiff).
+ if (autocmd_blocked == 0)
+ {
+ if (get_vim_var_str(VV_TERMRESPONSE) != old_termresponse)
+ {
+ apply_autocmds(EVENT_TERMRESPONSE, NULL, NULL, FALSE, curbuf);
+ apply_autocmds(EVENT_TERMRESPONSEALL, (char_u *)"version", NULL, FALSE, curbuf);
+ }
+ if (get_vim_var_str(VV_TERMU7RESP) != old_termu7resp)
+ {
+ apply_autocmds(EVENT_TERMRESPONSEALL, (char_u *)"ambiguouswidth", NULL, FALSE, curbuf);
+ }
+ if (get_vim_var_str(VV_TERMBLINKRESP) != old_termblinkresp)
+ {
+ apply_autocmds(EVENT_TERMRESPONSEALL, (char_u *)"cursorblink", NULL, FALSE, curbuf);
+ }
+ if (get_vim_var_str(VV_TERMRBGRESP) != old_termrbgresp)
+ {
+ apply_autocmds(EVENT_TERMRESPONSEALL, (char_u *)"background", NULL, FALSE, curbuf);
+ }
+ if (get_vim_var_str(VV_TERMRFGRESP) != old_termrfgresp)
+ {
+ apply_autocmds(EVENT_TERMRESPONSEALL, (char_u *)"foreground", NULL, FALSE, curbuf);
+ }
+ if (get_vim_var_str(VV_TERMSTYLERESP) != old_termstyleresp)
+ {
+ apply_autocmds(EVENT_TERMRESPONSEALL, (char_u *)"cursorshape", NULL, FALSE, curbuf);
+ }
+ }
# endif
}
diff --git a/src/blob.c b/src/blob.c
index c5d7eae..9cdd504 100644
--- a/src/blob.c
+++ b/src/blob.c
@@ -641,25 +641,28 @@ blob_filter_map(
if (filter_map_one(&tv, expr, filtermap, fc, &newtv, &rem) == FAIL
|| did_emsg)
break;
- if (newtv.v_type != VAR_NUMBER && newtv.v_type != VAR_BOOL)
+ if (filtermap != FILTERMAP_FOREACH)
{
- clear_tv(&newtv);
- emsg(_(e_invalid_operation_for_blob));
- break;
- }
- if (filtermap != FILTERMAP_FILTER)
- {
- if (newtv.vval.v_number != val)
- blob_set(b_ret, i, newtv.vval.v_number);
- }
- else if (rem)
- {
- char_u *p = (char_u *)blob_arg->bv_ga.ga_data;
+ if (newtv.v_type != VAR_NUMBER && newtv.v_type != VAR_BOOL)
+ {
+ clear_tv(&newtv);
+ emsg(_(e_invalid_operation_for_blob));
+ break;
+ }
+ if (filtermap != FILTERMAP_FILTER)
+ {
+ if (newtv.vval.v_number != val)
+ blob_set(b_ret, i, newtv.vval.v_number);
+ }
+ else if (rem)
+ {
+ char_u *p = (char_u *)blob_arg->bv_ga.ga_data;
- mch_memmove(p + i, p + i + 1,
- (size_t)b->bv_ga.ga_len - i - 1);
- --b->bv_ga.ga_len;
- --i;
+ mch_memmove(p + i, p + i + 1,
+ (size_t)b->bv_ga.ga_len - i - 1);
+ --b->bv_ga.ga_len;
+ --i;
+ }
}
++idx;
}
diff --git a/src/buffer.c b/src/buffer.c
index 64e4926..243593a 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -919,10 +919,9 @@ buf_freeall(buf_T *buf, int flags)
ml_close(buf, TRUE); // close and delete the memline/memfile
buf->b_ml.ml_line_count = 0; // no lines in buffer
if ((flags & BFA_KEEP_UNDO) == 0)
- {
- u_blockfree(buf); // free the memory allocated for undo
- u_clearall(buf); // reset all undo information
- }
+ // free the memory allocated for undo
+ // and reset all undo information
+ u_clearallandblockfree(buf);
#ifdef FEAT_SYN_HL
syntax_clear(&buf->b_s); // reset syntax info
#endif
@@ -1371,6 +1370,13 @@ do_buffer_ext(
if ((flags & DOBUF_NOPOPUP) && bt_popup(buf) && !bt_terminal(buf))
return OK;
#endif
+ if (
+ action == DOBUF_GOTO
+ && buf != curbuf
+ && !check_can_set_curbuf_forceit((flags & DOBUF_FORCEIT) ? TRUE : FALSE))
+ // disallow navigating to another buffer when 'winfixbuf' is applied
+ return FAIL;
+
if ((action == DOBUF_GOTO || action == DOBUF_SPLIT)
&& (buf->b_flags & BF_DUMMY))
{
@@ -1791,6 +1797,7 @@ set_curbuf(buf_T *buf, int action)
bufref_T newbufref;
bufref_T prevbufref;
int valid;
+ int last_winid = get_last_winid();
setpcmark();
if ((cmdmod.cmod_flags & CMOD_KEEPALT) == 0)
@@ -1819,7 +1826,11 @@ set_curbuf(buf_T *buf, int action)
if (prevbuf == curwin->w_buffer)
reset_synblock(curwin);
#endif
- if (unload)
+ // autocommands may have opened a new window
+ // with prevbuf, grr
+ if (unload ||
+ (last_winid != get_last_winid() &&
+ strchr((char *)"wdu", prevbuf->b_p_bh[0]) != NULL))
close_windows(prevbuf, FALSE);
#if defined(FEAT_EVAL)
if (bufref_valid(&prevbufref) && !aborting())
@@ -1855,6 +1866,10 @@ set_curbuf(buf_T *buf, int action)
#endif
) || curwin->w_buffer == NULL)
{
+ // autocommands changed curbuf and we will move to another
+ // buffer soon, so decrement curbuf->b_nwindows
+ if (curbuf != NULL && prevbuf != curbuf)
+ curbuf->b_nwindows--;
// If the buffer is not valid but curwin->w_buffer is NULL we must
// enter some buffer. Using the last one is hopefully OK.
if (!valid)
@@ -2773,17 +2788,19 @@ ExpandBufnames(
char_u ***file,
int options)
{
- int count = 0;
+ int count;
buf_T *buf;
int round;
char_u *p;
- int attempt;
char_u *patc = NULL;
#ifdef FEAT_VIMINFO
bufmatch_T *matches = NULL;
#endif
int fuzzy;
fuzmatch_str_T *fuzmatch = NULL;
+ regmatch_T regmatch;
+ int score = 0;
+ int to_free = FALSE;
*num_file = 0; // return values in case of FAIL
*file = NULL;
@@ -2799,151 +2816,138 @@ ExpandBufnames(
// expression matching)
if (!fuzzy)
{
- if (*pat == '^')
+ if (*pat == '^' && pat[1] != NUL)
{
- patc = alloc(STRLEN(pat) + 11);
+ int len = (int)STRLEN(pat);
+ patc = alloc(len);
if (patc == NULL)
return FAIL;
- STRCPY(patc, "\\(^\\|[\\/]\\)");
- STRCPY(patc + 11, pat + 1);
+ STRNCPY(patc, pat + 1, len - 1);
+ patc[len - 1] = NUL;
+ to_free = TRUE;
}
+ else if (*pat == '^')
+ patc = (char_u *)"";
else
patc = pat;
+ regmatch.regprog = vim_regcomp(patc, RE_MAGIC);
}
- // attempt == 0: try match with '\<', match at start of word
- // attempt == 1: try match without '\<', match anywhere
- for (attempt = 0; attempt <= (fuzzy ? 0 : 1); ++attempt)
+ // round == 1: Count the matches.
+ // round == 2: Build the array to keep the matches.
+ for (round = 1; round <= 2; ++round)
{
- regmatch_T regmatch;
- int score = 0;
-
- if (!fuzzy)
- {
- if (attempt > 0 && patc == pat)
- break; // there was no anchor, no need to try again
- regmatch.regprog = vim_regcomp(patc + attempt * 11, RE_MAGIC);
- }
-
- // round == 1: Count the matches.
- // round == 2: Build the array to keep the matches.
- for (round = 1; round <= 2; ++round)
+ count = 0;
+ FOR_ALL_BUFFERS(buf)
{
- count = 0;
- FOR_ALL_BUFFERS(buf)
- {
- if (!buf->b_p_bl) // skip unlisted buffers
- continue;
+ if (!buf->b_p_bl) // skip unlisted buffers
+ continue;
#ifdef FEAT_DIFF
- if (options & BUF_DIFF_FILTER)
- // Skip buffers not suitable for
- // :diffget or :diffput completion.
- if (buf == curbuf || !diff_mode_buf(buf))
- continue;
+ if (options & BUF_DIFF_FILTER)
+ // Skip buffers not suitable for
+ // :diffget or :diffput completion.
+ if (buf == curbuf || !diff_mode_buf(buf))
+ continue;
#endif
- if (!fuzzy)
+ if (!fuzzy)
+ {
+ if (regmatch.regprog == NULL)
{
- if (regmatch.regprog == NULL)
- {
- // invalid pattern, possibly after recompiling
- if (patc != pat)
- vim_free(patc);
- return FAIL;
- }
- p = buflist_match(&regmatch, buf, p_wic);
+ // invalid pattern, possibly after recompiling
+ if (to_free)
+ vim_free(patc);
+ return FAIL;
}
- else
+ p = buflist_match(&regmatch, buf, p_wic);
+ }
+ else
+ {
+ p = NULL;
+ // first try matching with the short file name
+ if ((score = fuzzy_match_str(buf->b_sfname, pat)) != 0)
+ p = buf->b_sfname;
+ if (p == NULL)
{
- p = NULL;
- // first try matching with the short file name
- if ((score = fuzzy_match_str(buf->b_sfname, pat)) != 0)
- p = buf->b_sfname;
- if (p == NULL)
- {
- // next try matching with the full path file name
- if ((score = fuzzy_match_str(buf->b_ffname, pat)) != 0)
- p = buf->b_ffname;
- }
+ // next try matching with the full path file name
+ if ((score = fuzzy_match_str(buf->b_ffname, pat)) != 0)
+ p = buf->b_ffname;
}
+ }
- if (p == NULL)
- continue;
+ if (p == NULL)
+ continue;
- if (round == 1)
- {
- ++count;
- continue;
- }
+ if (round == 1)
+ {
+ ++count;
+ continue;
+ }
- if (options & WILD_HOME_REPLACE)
- p = home_replace_save(buf, p);
- else
- p = vim_strsave(p);
+ if (options & WILD_HOME_REPLACE)
+ p = home_replace_save(buf, p);
+ else
+ p = vim_strsave(p);
- if (!fuzzy)
- {
+ if (!fuzzy)
+ {
#ifdef FEAT_VIMINFO
- if (matches != NULL)
- {
- matches[count].buf = buf;
- matches[count].match = p;
- count++;
- }
- else
-#endif
- (*file)[count++] = p;
- }
- else
+ if (matches != NULL)
{
- fuzmatch[count].idx = count;
- fuzmatch[count].str = p;
- fuzmatch[count].score = score;
+ matches[count].buf = buf;
+ matches[count].match = p;
count++;
}
+ else
+#endif
+ (*file)[count++] = p;
}
- if (count == 0) // no match found, break here
- break;
- if (round == 1)
+ else
+ {
+ fuzmatch[count].idx = count;
+ fuzmatch[count].str = p;
+ fuzmatch[count].score = score;
+ count++;
+ }
+ }
+ if (count == 0) // no match found, break here
+ break;
+ if (round == 1)
+ {
+ if (!fuzzy)
{
- if (!fuzzy)
+ *file = ALLOC_MULT(char_u *, count);
+ if (*file == NULL)
{
- *file = ALLOC_MULT(char_u *, count);
- if (*file == NULL)
- {
- vim_regfree(regmatch.regprog);
- if (patc != pat)
- vim_free(patc);
- return FAIL;
- }
+ vim_regfree(regmatch.regprog);
+ if (to_free)
+ vim_free(patc);
+ return FAIL;
+ }
#ifdef FEAT_VIMINFO
- if (options & WILD_BUFLASTUSED)
- matches = ALLOC_MULT(bufmatch_T, count);
+ if (options & WILD_BUFLASTUSED)
+ matches = ALLOC_MULT(bufmatch_T, count);
#endif
- }
- else
+ }
+ else
+ {
+ fuzmatch = ALLOC_MULT(fuzmatch_str_T, count);
+ if (fuzmatch == NULL)
{
- fuzmatch = ALLOC_MULT(fuzmatch_str_T, count);
- if (fuzmatch == NULL)
- {
- *num_file = 0;
- *file = NULL;
- return FAIL;
- }
+ *num_file = 0;
+ *file = NULL;
+ return FAIL;
}
}
}
-
- if (!fuzzy)
- {
- vim_regfree(regmatch.regprog);
- if (count) // match(es) found, break here
- break;
- }
}
- if (!fuzzy && patc != pat)
- vim_free(patc);
+ if (!fuzzy)
+ {
+ vim_regfree(regmatch.regprog);
+ if (to_free)
+ vim_free(patc);
+ }
#ifdef FEAT_VIMINFO
if (!fuzzy)
@@ -4217,7 +4221,7 @@ build_stl_str_hl(
stl_hlrec_T **tabtab) // return: tab page nrs (can be NULL)
{
linenr_T lnum;
- size_t len;
+ colnr_T len;
char_u *p;
char_u *s;
char_u *t;
@@ -4324,12 +4328,12 @@ build_stl_str_hl(
// Get the byte value now, in case we need it below. This is more efficient
// than making a copy of the line.
- len = STRLEN(p);
- if (wp->w_cursor.col > (colnr_T)len)
+ len = ml_get_buf_len(wp->w_buffer, lnum);
+ if (wp->w_cursor.col > len)
{
// Line may have changed since checking the cursor column, or the lnum
// was adjusted above.
- wp->w_cursor.col = (colnr_T)len;
+ wp->w_cursor.col = len;
wp->w_cursor.coladd = 0;
byteval = 0;
}
@@ -5936,6 +5940,8 @@ buf_spname(buf_T *buf)
#endif
if (buf->b_fname != NULL)
return buf->b_fname;
+ if (buf == cmdwin_buf)
+ return (char_u *)_("[Command Line]");
#ifdef FEAT_JOB_CHANNEL
if (bt_prompt(buf))
return (char_u *)_("[Prompt]");
diff --git a/src/change.c b/src/change.c
index c0b8785..daf4fae 100644
--- a/src/change.c
+++ b/src/change.c
@@ -559,6 +559,12 @@ changed_common(
if (!redraw_not_allowed && wp->w_redr_type < UPD_VALID)
wp->w_redr_type = UPD_VALID;
+ // When inserting/deleting lines and the window has specific lines
+ // to be redrawn, w_redraw_top and w_redraw_bot may now be invalid,
+ // so just redraw everything.
+ if (xtra != 0 && wp->w_redraw_top != 0)
+ redraw_win_later(wp, UPD_NOT_VALID);
+
// Reset "w_skipcol" if the topline length has become smaller to
// such a degree that nothing will be visible anymore, accounting
// for 'smoothscroll' <<< or 'listchars' "precedes" marker.
@@ -656,22 +662,20 @@ changed_common(
set_topline(wp, wp->w_topline);
#endif
// If lines have been added or removed, relative numbering always
- // requires a redraw.
+ // requires an update even if cursor didn't move.
if (wp->w_p_rnu && xtra != 0)
- {
wp->w_last_cursor_lnum_rnu = 0;
- redraw_win_later(wp, UPD_VALID);
- }
+
#ifdef FEAT_SYN_HL
- // Cursor line highlighting probably need to be updated with
- // "UPD_VALID" if it's below the change.
- // If the cursor line is inside the change we need to redraw more.
- if (wp->w_p_cul)
+ if (wp->w_p_cul && wp->w_last_cursorline >= lnum)
{
- if (xtra == 0)
- redraw_win_later(wp, UPD_VALID);
- else if (lnum <= wp->w_last_cursorline)
- redraw_win_later(wp, UPD_SOME_VALID);
+ if (wp->w_last_cursorline < lnume)
+ // If 'cursorline' was inside the change, it has already
+ // been invalidated in w_lines[] by the loop above.
+ wp->w_last_cursorline = 0;
+ else
+ // If 'cursorline' was below the change, adjust its lnum.
+ wp->w_last_cursorline += xtra;
}
#endif
}
@@ -1052,7 +1056,7 @@ ins_char_bytes(char_u *buf, int charlen)
col = curwin->w_cursor.col;
oldp = ml_get(lnum);
- linelen = (int)STRLEN(oldp) + 1;
+ linelen = (int)ml_get_len(lnum) + 1;
// The lengths default to the values for when not replacing.
oldlen = 0;
@@ -1189,7 +1193,7 @@ ins_str(char_u *s)
col = curwin->w_cursor.col;
oldp = ml_get(lnum);
- oldlen = (int)STRLEN(oldp);
+ oldlen = (int)ml_get_len(lnum);
newp = alloc(oldlen + newlen + 1);
if (newp == NULL)
@@ -1268,7 +1272,7 @@ del_bytes(
int fixpos = fixpos_arg;
oldp = ml_get(lnum);
- oldlen = (int)STRLEN(oldp);
+ oldlen = (int)ml_get_len(lnum);
// Can't do anything when the cursor is on the NUL after the line.
if (col >= oldlen)
@@ -1360,6 +1364,7 @@ del_bytes(
mch_memmove(newp + newlen + 1, oldp + oldlen + 1,
(size_t)curbuf->b_ml.ml_line_len - oldlen - 1);
curbuf->b_ml.ml_line_len -= count;
+ curbuf->b_ml.ml_line_textlen = 0;
}
#endif
@@ -1431,12 +1436,12 @@ open_line(
#endif
// make a copy of the current line so we can mess with it
- saved_line = vim_strsave(ml_get_curline());
+ saved_line = vim_strnsave(ml_get_curline(), ml_get_curline_len());
if (saved_line == NULL) // out of memory!
return FALSE;
#ifdef FEAT_PROP_POPUP
- at_eol = curwin->w_cursor.col >= (int)STRLEN(saved_line);
+ at_eol = curwin->w_cursor.col >= (int)ml_get_curline_len();
#endif
if (State & VREPLACE_FLAG)
@@ -1449,7 +1454,7 @@ open_line(
// the line, replacing what was there before and pushing the right
// stuff onto the replace stack. -- webb.
if (curwin->w_cursor.lnum < orig_line_count)
- next_line = vim_strsave(ml_get(curwin->w_cursor.lnum + 1));
+ next_line = vim_strnsave(ml_get(curwin->w_cursor.lnum + 1), ml_get_len(curwin->w_cursor.lnum + 1));
else
next_line = vim_strsave((char_u *)"");
if (next_line == NULL) // out of memory!
@@ -2302,7 +2307,7 @@ open_line(
if (State & VREPLACE_FLAG)
{
// Put new line in p_extra
- p_extra = vim_strsave(ml_get_curline());
+ p_extra = vim_strnsave(ml_get_curline(), ml_get_curline_len());
if (p_extra == NULL)
goto theend;
@@ -2347,7 +2352,7 @@ truncate_line(int fixpos)
newp = vim_strsave((char_u *)"");
else
newp = vim_strnsave(old_line, col);
- deleted = (int)STRLEN(old_line) - col;
+ deleted = (int)ml_get_len(lnum) - col;
if (newp == NULL)
return FAIL;
diff --git a/src/channel.c b/src/channel.c
index 8d850c6..b99b3a9 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -1493,7 +1493,7 @@ channel_set_req_callback(
write_buf_line(buf_T *buf, linenr_T lnum, channel_T *channel)
{
char_u *line = ml_get_buf(buf, lnum, FALSE);
- int len = (int)STRLEN(line);
+ int len = ml_get_buf_len(buf, lnum);
char_u *p;
int i;
diff --git a/src/charset.c b/src/charset.c
index 0e4dbbe..5ae90da 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -971,6 +971,9 @@ init_chartabsize_arg(
cts->cts_vcol = col;
cts->cts_line = line;
cts->cts_ptr = ptr;
+#ifdef FEAT_LINEBREAK
+ cts->cts_bri_size = -1;
+#endif
#ifdef FEAT_PROP_POPUP
if (lnum > 0 && !ignore_text_props)
{
@@ -1123,7 +1126,6 @@ win_lbr_chartabsize(
int n;
char_u *sbr;
int no_sbr = FALSE;
- colnr_T vcol_start = 0; // start from where to consider linebreak
#endif
#if defined(FEAT_PROP_POPUP)
@@ -1158,8 +1160,12 @@ win_lbr_chartabsize(
* First get the normal size, without 'linebreak' or text properties
*/
size = win_chartabsize(wp, s, vcol);
- if (*s == NUL && !has_lcs_eol)
- size = 0; // NUL is not displayed
+ if (*s == NUL)
+ {
+ // 1 cell for EOL list char (if present), as opposed to the two cell ^@
+ // for a NUL character in the text.
+ size = has_lcs_eol ? 1 : 0;
+ }
# ifdef FEAT_LINEBREAK
int is_doublewidth = has_mbyte && size == 2 && MB_BYTE2LEN(*s) > 1;
# endif
@@ -1282,7 +1288,11 @@ win_lbr_chartabsize(
if (*sbr != NUL)
head_prev += vim_strsize(sbr);
if (wp->w_p_bri)
- head_prev += get_breakindent_win(wp, line);
+ {
+ if (cts->cts_bri_size < 0)
+ cts->cts_bri_size = get_breakindent_win(wp, line);
+ head_prev += cts->cts_bri_size;
+ }
if (wcol < head_prev)
{
head_prev -= wcol;
@@ -1303,7 +1313,11 @@ win_lbr_chartabsize(
if (*sbr != NUL)
head_mid += vim_strsize(sbr);
if (wp->w_p_bri)
- head_mid += get_breakindent_win(wp, line);
+ {
+ if (cts->cts_bri_size < 0)
+ cts->cts_bri_size = get_breakindent_win(wp, line);
+ head_mid += cts->cts_bri_size;
+ }
if (head_mid > 0 && wcol + size > wp->w_width)
{
// Calculate effective window width.
@@ -1341,22 +1355,21 @@ win_lbr_chartabsize(
if (headp != NULL)
*headp = head;
+ int need_lbr = FALSE;
/*
* If 'linebreak' set check at a blank before a non-blank if the line
- * needs a break here
+ * needs a break here.
*/
- if (wp->w_p_lbr && wp->w_p_wrap && wp->w_width != 0)
+ if (wp->w_p_lbr && wp->w_p_wrap && wp->w_width != 0
+ && VIM_ISBREAK((int)s[0]) && !VIM_ISBREAK((int)s[1]))
{
char_u *t = cts->cts_line;
while (VIM_ISBREAK((int)t[0]))
t++;
- vcol_start = t - cts->cts_line;
+ // 'linebreak' is only needed when not in leading whitespace.
+ need_lbr = s >= t;
}
- if (wp->w_p_lbr && vcol_start <= vcol
- && VIM_ISBREAK((int)s[0])
- && !VIM_ISBREAK((int)s[1])
- && wp->w_p_wrap
- && wp->w_width != 0)
+ if (need_lbr)
{
/*
* Count all characters from first non-blank after a blank up to next
@@ -1482,7 +1495,6 @@ getvcol(
{
colnr_T vcol;
char_u *ptr; // points to current char
- char_u *posptr; // points to char at pos->col
char_u *line; // start of the line
int incr;
int head;
@@ -1498,24 +1510,6 @@ getvcol(
vcol = 0;
line = ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
- if (pos->col == MAXCOL)
- posptr = NULL; // continue until the NUL
- else
- {
- colnr_T i;
-
- // In a few cases the position can be beyond the end of the line.
- for (i = 0; i < pos->col; ++i)
- if (ptr[i] == NUL)
- {
- pos->col = i;
- break;
- }
- posptr = ptr + pos->col;
- if (has_mbyte)
- // always start on the first byte
- posptr -= (*mb_head_off)(line, posptr);
- }
init_chartabsize_arg(&cts, wp, pos->lnum, 0, line, line);
cts.cts_max_head_vcol = -1;
@@ -1577,11 +1571,12 @@ getvcol(
incr = g_chartab[c] & CT_CELL_MASK;
}
- if (posptr != NULL && ptr >= posptr) // character at pos->col
+ char_u *next_ptr = ptr + (*mb_ptr2len)(ptr);
+ if (next_ptr - line > pos->col) // character at pos->col
break;
vcol += incr;
- MB_PTR_ADV(ptr);
+ ptr = next_ptr;
}
}
else
@@ -1609,12 +1604,12 @@ getvcol(
wp->w_virtcol_first_char = cts.cts_first_char;
#endif
- if (posptr != NULL && cts.cts_ptr >= posptr)
- // character at pos->col
+ char_u *next_ptr = cts.cts_ptr + (*mb_ptr2len)(cts.cts_ptr);
+ if (next_ptr - line > pos->col) // character at pos->col
break;
cts.cts_vcol += incr;
- MB_PTR_ADV(cts.cts_ptr);
+ cts.cts_ptr = next_ptr;
}
vcol = cts.cts_vcol;
ptr = cts.cts_ptr;
@@ -1695,7 +1690,7 @@ getvvcol(
endadd = 0;
// Cannot put the cursor on part of a wide character.
ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
- if (pos->col < (colnr_T)STRLEN(ptr))
+ if (pos->col < ml_get_buf_len(wp->w_buffer, pos->lnum))
{
int c = (*mb_ptr2char)(ptr + pos->col);
diff --git a/src/cindent.c b/src/cindent.c
index 6289422..cf18441 100644
--- a/src/cindent.c
+++ b/src/cindent.c
@@ -4108,7 +4108,8 @@ in_cinkeys(
}
else
// TODO: multi-byte
- if (keytyped == (int)p[-1] || (icase && keytyped < 256
+ if (keytyped == (int)p[-1] || (icase
+ && keytyped < 256 && keytyped >= 0
&& TOLOWER_LOC(keytyped) == TOLOWER_LOC((int)p[-1])))
{
line = ml_get_cursor();
diff --git a/src/clientserver.c b/src/clientserver.c
index cfc0ab6..340add3 100644
--- a/src/clientserver.c
+++ b/src/clientserver.c
@@ -566,6 +566,10 @@ build_drop_cmd(
char_u *p;
char_u *cdp;
char_u *cwd;
+ // reset wildignore temporarily
+ const char *wig[] =
+ { "<CR><C-\\><C-N>:let g:_wig=&wig|set wig=",
+ "<C-\\><C-N>:let &wig=g:_wig|unlet g:_wig<CR>"};
if (filec > 0 && filev[0][0] == '+')
{
@@ -599,6 +603,8 @@ build_drop_cmd(
ga_init2(&ga, 1, 100);
ga_concat(&ga, (char_u *)"<C-\\><C-N>:cd ");
ga_concat(&ga, cdp);
+ // reset wildignorecase temporarily
+ ga_concat(&ga, (char_u *)wig[0]);
// Call inputsave() so that a prompt for an encryption key works.
ga_concat(&ga, (char_u *)
@@ -650,6 +656,8 @@ build_drop_cmd(
ga_concat(&ga, cdp);
ga_concat(&ga, (char_u *)"'|cd -|endif|endif<CR>");
vim_free(cdp);
+ // reset wildignorecase
+ ga_concat(&ga, (char_u *)wig[1]);
if (sendReply)
ga_concat(&ga, (char_u *)":call SetupRemoteReplies()<CR>");
diff --git a/src/clipboard.c b/src/clipboard.c
index d80699b..8b9850e 100644
--- a/src/clipboard.c
+++ b/src/clipboard.c
@@ -1334,7 +1334,8 @@ did_set_clipboard(optset_T *args UNUSED)
#ifdef FEAT_GUI_GTK
if (gui.in_use)
{
- gui_gtk_set_selection_targets();
+ gui_gtk_set_selection_targets((GdkAtom)GDK_SELECTION_PRIMARY);
+ gui_gtk_set_selection_targets((GdkAtom)clip_plus.gtk_sel_atom);
gui_gtk_set_dnd_targets();
}
#endif
diff --git a/src/config.mk.in b/src/config.mk.in
index 4eb6928..2aaaf69 100644
--- a/src/config.mk.in
+++ b/src/config.mk.in
@@ -175,6 +175,7 @@ OS_EXTRA_OBJ = @OS_EXTRA_OBJ@
MAKEMO = @MAKEMO@
MSGFMT = @MSGFMT@
+MSGFMTCMD = @MSGFMTCMD@
MSGFMT_DESKTOP = @MSGFMT_DESKTOP@
### set if $SOURCE_DATE_EPOCH was set when running configure
diff --git a/src/configure.ac b/src/configure.ac
index ebe0d08..6311269 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -1163,11 +1163,13 @@ if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
dnl Remove "-fno-something", it breaks using cproto.
dnl Remove "-fdebug-prefix-map", it isn't supported by clang.
dnl Remove "FORTIFY_SOURCE", it will be defined twice.
- dnl remove -pipe and -Wxxx, it confuses cproto
+ dnl Remove -pipe and -Wxxx, it confuses cproto
+ dnl Remove -flto[=auto], it causes link failures for clang
perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
-e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[[^ ]]*//' \
-e 's/-fdebug-prefix-map[[^ ]]*//g' \
-e 's/-pipe //' \
+ -e 's/-flto\(=auto\)\? //' \
-e 's/-W[[^ ]]*//g' \
-e 's/-D_FORTIFY_SOURCE=.//g'`
dnl Remove "-lc", it breaks on FreeBSD when using "-pthread".
@@ -4521,6 +4523,15 @@ if test "$enable_nls" = "yes"; then
AC_MSG_RESULT([no])
fi
AC_SUBST(MSGFMT_DESKTOP)
+ AC_MSG_CHECKING([if msgfmt supports --no-convert])
+ if "$MSGFMT" --help | grep -q -- '--no-convert' >/dev/null; then
+ AC_MSG_RESULT([yes])
+ MSGFMTCMD="OLD_PO_FILE_INPUT=yes msgfmt --no-convert -v"
+ else
+ AC_MSG_RESULT([no])
+ MSGFMTCMD="OLD_PO_FILE_INPUT=yes msgfmt -v"
+ fi
+ AC_SUBST(MSGFMTCMD)
fi
else
AC_MSG_RESULT([no "po/Makefile" - disabled]);
diff --git a/src/dict.c b/src/dict.c
index cb22b42..508d00c 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -1329,8 +1329,8 @@ dict_extend_func(
}
/*
- * Implementation of map() and filter() for a Dict. Apply "expr" to every
- * item in Dict "d" and return the result in "rettv".
+ * Implementation of map(), filter(), foreach() for a Dict. Apply "expr" to
+ * every item in Dict "d" and return the result in "rettv".
*/
void
dict_filter_map(
@@ -1392,7 +1392,6 @@ dict_filter_map(
arg_errmsg, TRUE)))
break;
set_vim_var_string(VV_KEY, di->di_key, -1);
- newtv.v_type = VAR_UNKNOWN;
r = filter_map_one(&di->di_tv, expr, filtermap, fc, &newtv, &rem);
clear_tv(get_vim_var_tv(VV_KEY));
if (r == FAIL || did_emsg)
diff --git a/src/diff.c b/src/diff.c
index 9b8c816..c50670c 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -72,12 +72,19 @@ typedef struct {
long count_new;
} diffhunk_T;
+typedef enum {
+ DIO_OUTPUT_INDICES = 0, // default
+ DIO_OUTPUT_UNIFIED = 1 // unified diff format
+} dio_outfmt_T;
+
// two diff inputs and one result
typedef struct {
- diffin_T dio_orig; // original file input
- diffin_T dio_new; // new file input
- diffout_T dio_diff; // diff result
- int dio_internal; // using internal diff
+ diffin_T dio_orig; // original file input
+ diffin_T dio_new; // new file input
+ diffout_T dio_diff; // diff result
+ int dio_internal; // using internal diff
+ dio_outfmt_T dio_outfmt; // internal diff output format
+ int dio_ctxlen; // unified diff context length
} diffio_T;
static int diff_buf_idx(buf_T *buf);
@@ -97,7 +104,8 @@ static void diff_copy_entry(diff_T *dprev, diff_T *dp, int idx_orig, int idx_new
static diff_T *diff_alloc_new(tabpage_T *tp, diff_T *dprev, diff_T *dp);
static int parse_diff_ed(char_u *line, diffhunk_T *hunk);
static int parse_diff_unified(char_u *line, diffhunk_T *hunk);
-static int xdiff_out(long start_a, long count_a, long start_b, long count_b, void *priv);
+static int xdiff_out_indices(long start_a, long count_a, long start_b, long count_b, void *priv);
+static int xdiff_out_unified(void *priv, mmbuffer_t *mb, int nbuf);
#define FOR_ALL_DIFFBLOCKS_IN_TAB(tp, dp) \
for ((dp) = (tp)->tp_first_diff; (dp) != NULL; (dp) = (dp)->df_next)
@@ -754,7 +762,7 @@ diff_write_buffer(buf_T *buf, diffin_T *din)
// xdiff requires one big block of memory with all the text.
for (lnum = 1; lnum <= buf->b_ml.ml_line_count; ++lnum)
- len += (long)STRLEN(ml_get_buf(buf, lnum, FALSE)) + 1;
+ len += ml_get_buf_len(buf, lnum) + 1;
ptr = alloc(len);
if (ptr == NULL)
{
@@ -1140,9 +1148,12 @@ diff_file_internal(diffio_T *diffio)
if (diff_flags & DIFF_IBLANK)
param.flags |= XDF_IGNORE_BLANK_LINES;
- emit_cfg.ctxlen = 0; // don't need any diff_context here
+ emit_cfg.ctxlen = diffio->dio_ctxlen;
emit_cb.priv = &diffio->dio_diff;
- emit_cfg.hunk_func = xdiff_out;
+ if (diffio->dio_outfmt == DIO_OUTPUT_INDICES)
+ emit_cfg.hunk_func = xdiff_out_indices;
+ else
+ emit_cb.out_line = xdiff_out_unified;
if (xdl_diff(&diffio->dio_orig.din_mmfile,
&diffio->dio_new.din_mmfile,
&param, &emit_cfg, &emit_cb) < 0)
@@ -1509,6 +1520,7 @@ diff_win_options(
if (!wp->w_p_diff)
wp->w_p_wrap_save = wp->w_p_wrap;
wp->w_p_wrap = FALSE;
+ wp->w_skipcol = 0;
}
# ifdef FEAT_FOLDING
if (!wp->w_p_diff)
@@ -1572,8 +1584,11 @@ ex_diffoff(exarg_T *eap)
wp->w_p_crb = wp->w_p_crb_save;
if (!(diff_flags & DIFF_FOLLOWWRAP))
{
- if (!wp->w_p_wrap)
- wp->w_p_wrap = wp->w_p_wrap_save;
+ if (!wp->w_p_wrap && wp->w_p_wrap_save)
+ {
+ wp->w_p_wrap = TRUE;
+ wp->w_leftcol = 0;
+ }
}
#ifdef FEAT_FOLDING
free_string_option(wp->w_p_fdm);
@@ -3327,10 +3342,10 @@ parse_diff_unified(
/*
* Callback function for the xdl_diff() function.
- * Stores the diff output in a grow array.
+ * Stores the diff output (indices) in a grow array.
*/
static int
-xdiff_out(
+xdiff_out_indices(
long start_a,
long count_a,
long start_b,
@@ -3357,6 +3372,25 @@ xdiff_out(
return 0;
}
+/*
+ * Callback function for the xdl_diff() function.
+ * Stores the unified diff output in a grow array.
+ */
+ static int
+xdiff_out_unified(
+ void *priv,
+ mmbuffer_t *mb,
+ int nbuf)
+{
+ diffout_T *dout = (diffout_T *)priv;
+ int i;
+
+ for (i = 0; i < nbuf; i++)
+ ga_concat_len(&dout->dout_ga, (char_u *)mb[i].ptr, mb[i].size);
+
+ return 0;
+}
+
#endif // FEAT_DIFF
#if defined(FEAT_EVAL) || defined(PROTO)
@@ -3367,12 +3401,12 @@ xdiff_out(
void
f_diff_filler(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
{
-#ifdef FEAT_DIFF
+# ifdef FEAT_DIFF
if (in_vim9script() && check_for_lnum_arg(argvars, 0) == FAIL)
return;
rettv->vval.v_number = diff_check_fill(curwin, tv_get_lnum(argvars));
-#endif
+# endif
}
/*
@@ -3381,7 +3415,7 @@ f_diff_filler(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
void
f_diff_hlID(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
{
-#ifdef FEAT_DIFF
+# ifdef FEAT_DIFF
linenr_T lnum;
static linenr_T prev_lnum = 0;
static varnumber_T changedtick = 0;
@@ -3436,7 +3470,224 @@ f_diff_hlID(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
hlID = HLF_CHD; // changed line
}
rettv->vval.v_number = hlID == (hlf_T)0 ? 0 : (int)hlID;
-#endif
+# endif
+}
+
+# ifdef FEAT_DIFF
+/*
+ * Parse the diff options passed in "optarg" to the diff() function and return
+ * the options in "diffopts" and the diff algorithm in "diffalgo".
+ */
+ static int
+parse_diff_optarg(
+ typval_T *opts,
+ int *diffopts,
+ long *diffalgo,
+ dio_outfmt_T *diff_output_fmt,
+ int *diff_ctxlen)
+{
+ dict_T *d = opts->vval.v_dict;
+
+ char_u *algo = dict_get_string(d, "algorithm", FALSE);
+ if (algo != NULL)
+ {
+ if (STRNCMP(algo, "myers", 5) == 0)
+ *diffalgo = 0;
+ else if (STRNCMP(algo, "minimal", 7) == 0)
+ *diffalgo = XDF_NEED_MINIMAL;
+ else if (STRNCMP(algo, "patience", 8) == 0)
+ *diffalgo = XDF_PATIENCE_DIFF;
+ else if (STRNCMP(algo, "histogram", 9) == 0)
+ *diffalgo = XDF_HISTOGRAM_DIFF;
+ }
+
+ char_u *output_fmt = dict_get_string(d, "output", FALSE);
+ if (output_fmt != NULL)
+ {
+ if (STRNCMP(output_fmt, "unified", 7) == 0)
+ *diff_output_fmt = DIO_OUTPUT_UNIFIED;
+ else if (STRNCMP(output_fmt, "indices", 7) == 0)
+ *diff_output_fmt = DIO_OUTPUT_INDICES;
+ else
+ {
+ semsg(_(e_unsupported_diff_output_format_str), output_fmt);
+ return FAIL;
+ }
+ }
+
+ *diff_ctxlen = dict_get_number_def(d, "context", 0);
+ if (*diff_ctxlen < 0)
+ *diff_ctxlen = 0;
+
+ if (dict_get_bool(d, "iblank", FALSE))
+ *diffopts |= DIFF_IBLANK;
+ if (dict_get_bool(d, "icase", FALSE))
+ *diffopts |= DIFF_ICASE;
+ if (dict_get_bool(d, "iwhite", FALSE))
+ *diffopts |= DIFF_IWHITE;
+ if (dict_get_bool(d, "iwhiteall", FALSE))
+ *diffopts |= DIFF_IWHITEALL;
+ if (dict_get_bool(d, "iwhiteeol", FALSE))
+ *diffopts |= DIFF_IWHITEEOL;
+ if (dict_get_bool(d, "indent-heuristic", FALSE))
+ *diffalgo |= XDF_INDENT_HEURISTIC;
+
+ return OK;
+}
+
+/*
+ * Concatenate the List of strings in "l" and store the result in
+ * "din->din_mmfile.ptr" and the length in "din->din_mmfile.size".
+ */
+ static void
+list_to_diffin(list_T *l, diffin_T *din, int icase)
+{
+ garray_T ga;
+ listitem_T *li;
+ char_u *str;
+
+ ga_init2(&ga, 512, 4);
+
+ FOR_ALL_LIST_ITEMS(l, li)
+ {
+ str = tv_get_string(&li->li_tv);
+ if (icase)
+ {
+ str = strlow_save(str);
+ if (str == NULL)
+ continue;
+ }
+ ga_concat(&ga, str);
+ ga_concat(&ga, (char_u *)NL_STR);
+ if (icase)
+ vim_free(str);
+ }
+ if (ga.ga_len > 0)
+ ((char *)ga.ga_data)[ga.ga_len] = NUL;
+
+ din->din_mmfile.ptr = (char *)ga.ga_data;
+ din->din_mmfile.size = ga.ga_len;
+}
+
+/*
+ * Get the start and end indices from the diff "hunk".
+ */
+ static dict_T *
+get_diff_hunk_indices(diffhunk_T *hunk)
+{
+ dict_T *hunk_dict;
+
+ hunk_dict = dict_alloc();
+ if (hunk_dict == NULL)
+ return NULL;
+
+ dict_add_number(hunk_dict, "from_idx", hunk->lnum_orig - 1);
+ dict_add_number(hunk_dict, "from_count", hunk->count_orig);
+ dict_add_number(hunk_dict, "to_idx", hunk->lnum_new - 1);
+ dict_add_number(hunk_dict, "to_count", hunk->count_new);
+
+ return hunk_dict;
+}
+# endif
+
+/*
+ * "diff()" function
+ */
+ void
+f_diff(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+{
+# ifdef FEAT_DIFF
+ diffio_T dio;
+
+ if (check_for_nonnull_list_arg(argvars, 0) == FAIL
+ || check_for_nonnull_list_arg(argvars, 1) == FAIL
+ || check_for_opt_nonnull_dict_arg(argvars, 2) == FAIL)
+ return;
+
+ CLEAR_FIELD(dio);
+ dio.dio_internal = TRUE;
+ ga_init2(&dio.dio_diff.dout_ga, sizeof(char *), 1000);
+
+ list_T *orig_list = argvars[0].vval.v_list;
+ list_T *new_list = argvars[1].vval.v_list;
+
+ // Save the 'diffopt' option value and restore it after getting the diff.
+ int save_diff_flags = diff_flags;
+ long save_diff_algorithm = diff_algorithm;
+ diff_flags = DIFF_INTERNAL;
+ diff_algorithm = 0;
+ dio.dio_outfmt = DIO_OUTPUT_UNIFIED;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ if (parse_diff_optarg(&argvars[2], &diff_flags, &diff_algorithm,
+ &dio.dio_outfmt, &dio.dio_ctxlen) == FAIL)
+ return;
+
+ // Concatenate the List of strings into a single string using newline
+ // separator. Internal diff library expects a single string.
+ list_to_diffin(orig_list, &dio.dio_orig, diff_flags & DIFF_ICASE);
+ list_to_diffin(new_list, &dio.dio_new, diff_flags & DIFF_ICASE);
+
+ // If 'diffexpr' is set, then the internal diff is not used. Set
+ // 'diffexpr' to an empty string temporarily.
+ int restore_diffexpr = FALSE;
+ char_u cc = *p_dex;
+ if (*p_dex != NUL)
+ {
+ restore_diffexpr = TRUE;
+ *p_dex = NUL;
+ }
+
+ // Compute the diff
+ int diff_status = diff_file(&dio);
+
+ // restore 'diffexpr'
+ if (restore_diffexpr)
+ *p_dex = cc;
+
+ if (diff_status == FAIL)
+ goto done;
+
+ int hunk_idx = 0;
+ dict_T *hunk_dict;
+
+ if (dio.dio_outfmt == DIO_OUTPUT_INDICES)
+ {
+ if (rettv_list_alloc(rettv) != OK)
+ goto done;
+ list_T *l = rettv->vval.v_list;
+
+ // Process each diff hunk
+ diffhunk_T *hunk = NULL;
+ while (hunk_idx < dio.dio_diff.dout_ga.ga_len)
+ {
+ hunk = ((diffhunk_T **)dio.dio_diff.dout_ga.ga_data)[hunk_idx++];
+
+ hunk_dict = get_diff_hunk_indices(hunk);
+ if (hunk_dict == NULL)
+ goto done;
+
+ list_append_dict(l, hunk_dict);
+ }
+ }
+ else
+ {
+ ga_append(&dio.dio_diff.dout_ga, NUL);
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string =
+ vim_strsave((char_u *)dio.dio_diff.dout_ga.ga_data);
+ }
+
+done:
+ clear_diffin(&dio.dio_new);
+ if (dio.dio_outfmt == DIO_OUTPUT_INDICES)
+ clear_diffout(&dio.dio_diff);
+ else
+ ga_clear(&dio.dio_diff.dout_ga);
+ clear_diffin(&dio.dio_orig);
+ // Restore the 'diffopt' option value.
+ diff_flags = save_diff_flags;
+ diff_algorithm = save_diff_algorithm;
+# endif
}
#endif
diff --git a/src/drawline.c b/src/drawline.c
index 7bbe86d..a8de449 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -589,7 +589,7 @@ handle_showbreak_and_filler(win_T *wp, winlinevars_T *wlv)
// Correct end of highlighted area for 'showbreak',
// required when 'linebreak' is also set.
if (wlv->tocol == wlv->vcol)
- wlv->tocol += wlv->n_extra;
+ wlv->tocol = wlv->vcol_sbr;
// combine 'showbreak' with 'wincolor'
wlv->char_attr = hl_combine_attr(wlv->win_attr, HL_ATTR(HLF_AT));
# ifdef FEAT_SYN_HL
@@ -812,12 +812,12 @@ text_prop_position(
*p_extra = l;
*n_extra = n_used + before + after + padding;
*n_attr = mb_charlen(*p_extra);
- if (above)
- *n_attr -= padding + after;
-
// n_attr_skip will not be decremented before draw_state is
// WL_LINE
*n_attr_skip = before + (padding > 0 ? padding : 0);
+ *n_attr -= *n_attr_skip;
+ if (above)
+ *n_attr -= after;
}
}
}
@@ -832,9 +832,10 @@ text_prop_position(
* Call screen_line() using values from "wlv".
* Also takes care of putting "<<<" on the first line for 'smoothscroll'
* when 'showbreak' is not set.
+ * When "clear_end" is TRUE clear until the end of the screen line.
*/
static void
-wlv_screen_line(win_T *wp, winlinevars_T *wlv, int negative_width)
+wlv_screen_line(win_T *wp, winlinevars_T *wlv, int clear_end)
{
if (wlv->row == 0 && wp->w_skipcol > 0
#if defined(FEAT_LINEBREAK)
@@ -872,8 +873,8 @@ wlv_screen_line(win_T *wp, winlinevars_T *wlv, int negative_width)
}
screen_line(wp, wlv->screen_row, wp->w_wincol, wlv->col,
- negative_width ? -wp->w_width : wp->w_width,
- wlv->screen_line_flags);
+ clear_end ? wp->w_width : -wp->w_width,
+ wlv->vcol - 1, wlv->screen_line_flags);
}
/*
@@ -885,6 +886,7 @@ draw_screen_line(win_T *wp, winlinevars_T *wlv)
{
#ifdef FEAT_SYN_HL
long v;
+ int wcol;
// Highlight 'cursorcolumn' & 'colorcolumn' past end of the line.
if (wp->w_p_wrap)
@@ -892,9 +894,14 @@ draw_screen_line(win_T *wp, winlinevars_T *wlv)
else
v = wp->w_leftcol;
+ wcol =
+# ifdef FEAT_RIGHTLEFT
+ wp->w_p_rl ? wp->w_width - wlv->col - 1 :
+# endif
+ wlv->col;
// check if line ends before left margin
- if (wlv->vcol < v + wlv->col - win_col_off(wp))
- wlv->vcol = v + wlv->col - win_col_off(wp);
+ if (wlv->vcol < v + wcol - win_col_off(wp))
+ wlv->vcol = v + wcol - win_col_off(wp);
# ifdef FEAT_CONCEAL
// Get rid of the boguscols now, we want to draw until the right
// edge for 'cursorcolumn'.
@@ -917,11 +924,7 @@ draw_screen_line(win_T *wp, winlinevars_T *wlv)
# ifdef LINE_ATTR
|| wlv->line_attr != 0
# endif
- || wlv->win_attr != 0)
-# ifdef FEAT_RIGHTLEFT
- && !wp->w_p_rl
-# endif
- )
+ || wlv->win_attr != 0))
{
int rightmost_vcol = 0;
int i;
@@ -934,41 +937,61 @@ draw_screen_line(win_T *wp, winlinevars_T *wlv)
if (rightmost_vcol < wlv->color_cols[i])
rightmost_vcol = wlv->color_cols[i];
- while (wlv->col < wp->w_width)
+ while (
+# ifdef FEAT_RIGHTLEFT
+ wp->w_p_rl ? (wlv->col >= 0) :
+# endif
+ (wlv->col < wp->w_width))
{
ScreenLines[wlv->off] = ' ';
if (enc_utf8)
ScreenLinesUC[wlv->off] = 0;
- ScreenCols[wlv->off] = MAXCOL;
- ++wlv->col;
+
if (wlv->draw_color_col)
wlv->draw_color_col = advance_color_col(
VCOL_HLC, &wlv->color_cols);
int attr = wlv->win_attr;
- if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol)
- attr = HL_ATTR(HLF_CUC);
- else if (wlv->draw_color_col && VCOL_HLC == *wlv->color_cols)
- attr = HL_ATTR(HLF_MC);
# ifdef LINE_ATTR
- else if (wlv->line_attr != 0)
- attr = wlv->line_attr;
+ if (wlv->line_attr != 0)
+ attr = hl_combine_attr(attr, wlv->line_attr);
# endif
- ScreenAttrs[wlv->off++] = attr;
+ if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol
+ && wlv->lnum != wp->w_cursor.lnum)
+ attr = hl_combine_attr(attr, HL_ATTR(HLF_CUC));
+ else if (wlv->draw_color_col && VCOL_HLC == *wlv->color_cols)
+ attr = hl_combine_attr(attr, HL_ATTR(HLF_MC));
+ ScreenAttrs[wlv->off] = attr;
+ ScreenCols[wlv->off] = wlv->vcol;
+# ifdef FEAT_RIGHTLEFT
+ if (wp->w_p_rl)
+ {
+ --wlv->off;
+ --wlv->col;
+ }
+ else
+# endif
+ {
+ ++wlv->off;
+ ++wlv->col;
+ }
+ ++wlv->vcol;
- if (VCOL_HLC >= rightmost_vcol
+ if (VCOL_HLC > rightmost_vcol
# ifdef LINE_ATTR
&& wlv->line_attr == 0
# endif
&& wlv->win_attr == 0)
break;
-
- ++wlv->vcol;
}
}
#endif
- wlv_screen_line(wp, wlv, FALSE);
+ // Set increasing virtual columns in ScreenCols[] to set correct curswant
+ // (or "coladd" for 'virtualedit') when clicking after end of line.
+ wlv->screen_line_flags |= SLF_INC_VCOL;
+ wlv_screen_line(wp, wlv, TRUE);
+ wlv->screen_line_flags &= ~SLF_INC_VCOL;
++wlv->row;
++wlv->screen_row;
}
@@ -1091,7 +1114,8 @@ apply_cursorline_highlight(
/*
* Display line "lnum" of window "wp" on the screen.
* Start at row "startrow", stop when "endrow" is reached.
- * When "number_only" is TRUE only update the number column.
+ * When only updating the number column, "number_only" is set to the height of
+ * the line, otherwise it is set to 0.
* "spv" is used to store information for spell checking, kept between
* sequential calls for the same window.
* wp->w_virtcol needs to be valid.
@@ -1120,8 +1144,6 @@ win_line(
#if defined(FEAT_LINEBREAK) && defined(FEAT_PROP_POPUP)
int in_linebreak = FALSE; // n_extra set for showing linebreak
#endif
- static char_u *at_end_str = (char_u *)""; // used for p_extra when
- // displaying eol at end-of-line
int lcs_eol_one = wp->w_lcs_chars.eol; // eol until it's been used
int lcs_prec_todo = wp->w_lcs_chars.prec;
// prec until it's been used
@@ -1273,7 +1295,7 @@ win_line(
wlv.vcol_sbr = -1;
#endif
- if (!number_only)
+ if (number_only == 0)
{
// To speed up the loop below, set extra_check when there is linebreak,
// trailing white space and/or syntax processing to be done.
@@ -1486,7 +1508,7 @@ win_line(
#endif
#ifdef FEAT_SPELL
- if (spv->spv_has_spell && !number_only)
+ if (spv->spv_has_spell && number_only == 0)
{
// Prepare for spell checking.
extra_check = TRUE;
@@ -1534,7 +1556,7 @@ win_line(
}
else
{
- v = (long)STRLEN(line);
+ v = ml_get_buf_len(wp->w_buffer, lnum);
if (v < SPWORDLEN)
{
// Short line, use it completely and append the start of the
@@ -1571,7 +1593,7 @@ win_line(
// find start of trailing whitespace
if (wp->w_lcs_chars.trail)
{
- trailcol = (colnr_T)STRLEN(ptr);
+ trailcol = ml_get_buf_len(wp->w_buffer, lnum);
while (trailcol > (colnr_T)0 && VIM_ISWHITE(ptr[trailcol - 1]))
--trailcol;
trailcol += (colnr_T)(ptr - line);
@@ -1632,16 +1654,6 @@ win_line(
if (text_props[i].tp_id < 0)
last_textprop_text_idx = i;
- // When skipping virtual text the props need to be sorted. The
- // order is reversed!
- if (lnum == wp->w_topline && wp->w_skipcol > 0)
- {
- for (int i = 0; i < text_prop_count; ++i)
- text_prop_idxs[i] = i;
- sort_text_props(wp->w_buffer, text_props,
- text_prop_idxs, text_prop_count);
- }
-
// Text props "above" move the line number down to where the text
// is. Only count the ones that are visible, not those that are
// skipped because of w_skipcol.
@@ -1667,19 +1679,23 @@ win_line(
}
}
- if (number_only)
+ if (number_only > 0)
{
// skip over rows only used for virtual text above
wlv.row += wlv.text_prop_above_count;
- if (wlv.row > endrow)
+ if (wlv.row >= endrow)
+ {
+ vim_free(text_props);
+ vim_free(text_prop_idxs);
return wlv.row;
+ }
wlv.screen_row += wlv.text_prop_above_count;
}
#endif
#if defined(FEAT_LINEBREAK) || defined(FEAT_PROP_POPUP)
colnr_T vcol_first_char = 0;
- if (wp->w_p_lbr && !number_only)
+ if (wp->w_p_lbr && number_only == 0)
{
chartabsize_T cts;
init_chartabsize_arg(&cts, wp, lnum, 0, line, line);
@@ -1695,7 +1711,7 @@ win_line(
v = startrow == 0 ? wp->w_skipcol - skipcol_in_text_prop_above : 0;
else
v = wp->w_leftcol;
- if (v > 0 && !number_only)
+ if (v > 0 && number_only == 0)
{
char_u *prev_ptr = ptr;
chartabsize_T cts;
@@ -1840,7 +1856,7 @@ win_line(
}
#ifdef FEAT_SEARCH_EXTRA
- if (!number_only)
+ if (number_only == 0)
{
v = (long)(ptr - line);
area_highlighting |= prepare_search_hl_line(wp, lnum, (colnr_T)v,
@@ -1901,7 +1917,7 @@ win_line(
if (wlv.draw_state == WL_CMDLINE - 1 && wlv.n_extra == 0)
{
wlv.draw_state = WL_CMDLINE;
- if (cmdwin_type != 0 && wp == curwin)
+ if (wp == cmdwin_win)
{
// Draw the cmdline character.
wlv.n_extra = 1;
@@ -1933,6 +1949,38 @@ win_line(
wlv.draw_state = WL_NR;
handle_lnum_col(wp, &wlv, sign_present, num_attr);
}
+
+ // When only displaying the (relative) line number and that's done,
+ // stop here.
+ if (number_only > 0 && wlv.draw_state == WL_NR && wlv.n_extra == 0)
+ {
+ wlv_screen_line(wp, &wlv, FALSE);
+ // Need to update more screen lines if:
+ // - LineNrAbove or LineNrBelow is used, or
+ // - still drawing filler lines.
+ if ((wlv.row + 1 - wlv.startrow < number_only
+ && (HL_ATTR(HLF_LNA) != 0 || HL_ATTR(HLF_LNB) != 0))
+#ifdef FEAT_DIFF
+ || wlv.filler_todo > 0
+#endif
+ )
+ {
+ ++wlv.row;
+ ++wlv.screen_row;
+ if (wlv.row == endrow)
+ break;
+#ifdef FEAT_DIFF
+ --wlv.filler_todo;
+ if (wlv.filler_todo == 0 && wp->w_botfill)
+ break;
+#endif
+ win_line_start(wp, &wlv, TRUE);
+ continue;
+ }
+ else
+ break;
+ }
+
#ifdef FEAT_LINEBREAK
// Check if 'breakindent' applies and show it.
// May change wlv.draw_state to WL_BRI or WL_BRI - 1.
@@ -1957,24 +2005,15 @@ win_line(
if (wlv.cul_screenline && wlv.draw_state == WL_LINE
&& wlv.vcol >= left_curline_col
&& wlv.vcol < right_curline_col)
- {
apply_cursorline_highlight(&wlv, sign_present);
- }
#endif
// When still displaying '$' of change command, stop at cursor.
- // When only displaying the (relative) line number and that's done,
- // stop here.
- if (((dollar_vcol >= 0 && wp == curwin
- && lnum == wp->w_cursor.lnum
- && wlv.vcol >= (long)wp->w_virtcol)
- || (number_only && wlv.draw_state > WL_NR))
-#ifdef FEAT_DIFF
- && wlv.filler_todo <= 0
-#endif
- )
+ if (dollar_vcol >= 0 && wp == curwin
+ && lnum == wp->w_cursor.lnum
+ && wlv.vcol >= (long)wp->w_virtcol)
{
- wlv_screen_line(wp, &wlv, TRUE);
+ wlv_screen_line(wp, &wlv, FALSE);
// Pretend we have finished updating the window. Except when
// 'cursorcolumn' is set.
#ifdef FEAT_SYN_HL
@@ -2274,7 +2313,7 @@ win_line(
// If another text prop follows the condition below at
// the last window column must know.
- // If this is an "above" text prop and 'nowrap' the we
+ // If this is an "above" text prop and 'nowrap' then we
// must wrap anyway.
text_prop_above = above;
text_prop_follows |= other_tpi != -1
@@ -3212,7 +3251,7 @@ win_line(
// Make sure, the highlighting for the tab char will be
// correctly set further below (effectively reverts the
- // FIX_FOR_BOGSUCOLS macro).
+ // FIX_FOR_BOGUSCOLS macro).
if (wlv.n_extra == tab_len + vc_saved && wp->w_p_list
&& wp->w_lcs_chars.tab1)
tab_len += vc_saved;
@@ -3290,7 +3329,7 @@ win_line(
if (!(area_highlighting && virtual_active()
&& wlv.tocol != MAXCOL
&& wlv.vcol < wlv.tocol))
- wlv.p_extra = at_end_str;
+ wlv.p_extra = (char_u *)"";
wlv.n_extra = 0;
}
if (wp->w_p_list && wp->w_lcs_chars.eol > 0)
@@ -3481,6 +3520,21 @@ win_line(
else
c = ' ';
+ if (has_mbyte && (*mb_char2cells)(mb_c) > 1)
+ // When the first char to be concealed is double-width,
+ // need to advance one more virtual column.
+ wlv.n_extra++;
+
+ mb_c = c;
+ if (enc_utf8 && utf_char2len(c) > 1)
+ {
+ mb_utf8 = TRUE;
+ u8cc[0] = 0;
+ c = 0xc0;
+ }
+ else
+ mb_utf8 = FALSE; // don't draw as UTF-8
+
prev_syntax_id = syntax_seqnr;
if (wlv.n_extra > 0)
@@ -3509,15 +3563,6 @@ win_line(
is_concealing = TRUE;
skip_cells = 1;
}
- mb_c = c;
- if (enc_utf8 && utf_char2len(c) > 1)
- {
- mb_utf8 = TRUE;
- u8cc[0] = 0;
- c = 0xc0;
- }
- else
- mb_utf8 = FALSE; // don't draw as UTF-8
}
else
{
@@ -3535,10 +3580,12 @@ win_line(
#ifdef FEAT_CONCEAL
// In the cursor line and we may be concealing characters: correct
// the cursor column when we reach its position.
+ // With 'virtualedit' we may never reach cursor position, but we still
+ // need to correct the cursor column, so do that at end of line.
if (!did_wcol && wlv.draw_state == WL_LINE
&& wp == curwin && lnum == wp->w_cursor.lnum
&& conceal_cursor_line(wp)
- && (int)wp->w_virtcol <= wlv.vcol + skip_cells)
+ && (wlv.vcol + skip_cells >= wp->w_virtcol || c == NUL))
{
# ifdef FEAT_RIGHTLEFT
if (wp->w_p_rl)
@@ -3546,6 +3593,9 @@ win_line(
else
# endif
wp->w_wcol = wlv.col - wlv.boguscols;
+ if (wlv.vcol + skip_cells < wp->w_virtcol)
+ // Cursor beyond end of the line with 'virtualedit'.
+ wp->w_wcol += wp->w_virtcol - wlv.vcol - skip_cells;
wp->w_wrow = wlv.row;
did_wcol = TRUE;
curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
@@ -3740,7 +3790,7 @@ win_line(
}
#endif
ScreenAttrs[wlv.off] = wlv.char_attr;
- ScreenCols[wlv.off] = MAXCOL;
+ ScreenCols[wlv.off] = wlv.vcol;
#ifdef FEAT_RIGHTLEFT
if (wp->w_p_rl)
{
@@ -3972,10 +4022,21 @@ win_line(
#ifdef FEAT_CONCEAL
else if (wp->w_p_cole > 0 && is_concealing)
{
+ int concealed_wide = has_mbyte && (*mb_char2cells)(mb_c) > 1;
+
--skip_cells;
++wlv.vcol_off_co;
+ if (concealed_wide)
+ {
+ // When a double-width char is concealed,
+ // need to advance one more virtual column.
+ ++wlv.vcol;
+ ++wlv.vcol_off_co;
+ }
+
if (wlv.n_extra > 0)
wlv.vcol_off_co += wlv.n_extra;
+
if (wp->w_p_wrap)
{
// Special voodoo required if 'wrap' is on.
@@ -4008,8 +4069,7 @@ win_line(
n_attr = 0;
}
-
- if (has_mbyte && (*mb_char2cells)(mb_c) > 1)
+ if (concealed_wide)
{
// Need to fill two screen columns.
# ifdef FEAT_RIGHTLEFT
@@ -4102,35 +4162,72 @@ win_line(
|| text_prop_next <= last_textprop_text_idx
#endif
|| (wp->w_p_list && wp->w_lcs_chars.eol != NUL
- && wlv.p_extra != at_end_str)
+ && lcs_eol_one != -1)
|| (wlv.n_extra != 0 && (wlv.c_extra != NUL
|| *wlv.p_extra != NUL)))
)
{
#ifdef FEAT_CONCEAL
wlv.col -= wlv.boguscols;
- wlv_screen_line(wp, &wlv, FALSE);
+ // Apply 'cursorline' and 'wincolor' highlight.
+ if (wlv.boguscols != 0 && (
+# ifdef LINE_ATTR
+ wlv.line_attr != 0 ||
+# endif
+ wlv.win_attr != 0
+ )
+ )
+ {
+ int attr = wlv.win_attr;
+# ifdef LINE_ATTR
+ if (wlv.line_attr != 0)
+ attr = hl_combine_attr(attr, wlv.line_attr);
+# endif
+ while ((
+# ifdef FEAT_RIGHTLEFT
+ wp->w_p_rl ? wlv.col >= 0 :
+# endif
+ wlv.col < wp->w_width))
+ {
+ ScreenLines[wlv.off] = ' ';
+ if (enc_utf8)
+ ScreenLinesUC[wlv.off] = 0;
+ ScreenAttrs[wlv.off] = attr;
+ ScreenCols[wlv.off] = wlv.vcol - 1;
+# ifdef FEAT_RIGHTLEFT
+ if (wp->w_p_rl)
+ {
+ wlv.off--;
+ wlv.col--;
+ wlv.boguscols++;
+ }
+ else
+# endif
+ {
+ wlv.off++;
+ wlv.col++;
+ wlv.boguscols--;
+ }
+ }
+ }
+ wlv_screen_line(wp, &wlv, TRUE);
wlv.col += wlv.boguscols;
wlv.boguscols = 0;
wlv.vcol_off_co = 0;
#else
- wlv_screen_line(wp, &wlv, FALSE);
+ wlv_screen_line(wp, &wlv, TRUE);
#endif
++wlv.row;
++wlv.screen_row;
- // When not wrapping and finished diff lines, or when displayed
- // '$' and highlighting until last column, break here.
- if (((!wp->w_p_wrap
+ // When not wrapping and finished diff lines, break here.
+ if (!wp->w_p_wrap
#ifdef FEAT_DIFF
&& wlv.filler_todo <= 0
#endif
#ifdef FEAT_PROP_POPUP
&& !text_prop_above
-#endif
- ) || lcs_eol_one == -1)
-#ifdef FEAT_PROP_POPUP
- && !text_prop_follows
+ && !text_prop_follows
#endif
)
break;
diff --git a/src/drawscreen.c b/src/drawscreen.c
index a2f60a6..f8818ff 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -1028,7 +1028,8 @@ redraw_win_toolbar(win_T *wp)
}
wp->w_winbar_items[item_idx].wb_menu = NULL; // end marker
- screen_line(wp, wp->w_winrow, wp->w_wincol, wp->w_width, wp->w_width, 0);
+ screen_line(wp, wp->w_winrow, wp->w_wincol, wp->w_width, wp->w_width, -1,
+ 0);
}
#endif
@@ -1087,7 +1088,7 @@ fold_line(
// 1. Add the cmdwin_type for the command-line window
// Ignores 'rightleft', this window is never right-left.
- if (cmdwin_type != 0 && wp == curwin)
+ if (wp == cmdwin_win)
{
ScreenLines[off] = cmdwin_type;
ScreenAttrs[off] = HL_ATTR(HLF_AT);
@@ -1300,7 +1301,7 @@ fold_line(
&& (lnume < bot->lnum
|| (lnume == bot->lnum
&& (bot->col - (*p_sel == 'e'))
- >= (colnr_T)STRLEN(ml_get_buf(wp->w_buffer, lnume, FALSE)))))))
+ >= ml_get_buf_len(wp->w_buffer, lnume))))))
{
if (VIsual_mode == Ctrl_V)
{
@@ -1363,7 +1364,7 @@ fold_line(
#endif
screen_line(wp, row + W_WINROW(wp), wp->w_wincol,
- wp->w_width, wp->w_width, 0);
+ wp->w_width, wp->w_width, -1, 0);
// Update w_cline_height and w_cline_folded if the cursor line was
// updated (saves a call to plines() later).
@@ -1408,7 +1409,7 @@ fold_line(
* - if wp->w_buffer->b_mod_set set, update lines between
* b_mod_top and b_mod_bot.
* - if wp->w_redraw_top non-zero, redraw lines between
- * wp->w_redraw_top and wp->w_redr_bot.
+ * wp->w_redraw_top and wp->w_redraw_bot.
* - continue redrawing when syntax status is invalid.
* 4. if scrolled up, update lines at the bottom.
* This results in three areas that may need updating:
@@ -1537,7 +1538,7 @@ win_update(win_T *wp)
// Make sure skipcol is valid, it depends on various options and the window
// width.
- if (wp->w_skipcol > 0)
+ if (wp->w_skipcol > 0 && wp->w_width > win_col_off(wp))
{
int w = 0;
int width1 = wp->w_width - win_col_off(wp);
@@ -1567,14 +1568,6 @@ win_update(win_T *wp)
else
#endif
- if (buf->b_mod_set && buf->b_mod_xlines != 0 && wp->w_redraw_top != 0)
- {
- // When there are both inserted/deleted lines and specific lines to be
- // redrawn, w_redraw_top and w_redraw_bot may be invalid, just redraw
- // everything (only happens when redrawing is off for while).
- type = UPD_NOT_VALID;
- }
- else
{
// Set mod_top to the first line that needs displaying because of
// changes. Set mod_bot to the first line after the changes.
@@ -1699,11 +1692,6 @@ win_update(win_T *wp)
top_end = 1;
#endif
}
-
- // When line numbers are displayed need to redraw all lines below
- // inserted/deleted lines.
- if (mod_top != 0 && buf->b_mod_xlines != 0 && wp->w_p_nu)
- mod_bot = MAXLNUM;
}
wp->w_redraw_top = 0; // reset for next time
wp->w_redraw_bot = 0;
@@ -2503,7 +2491,7 @@ win_update(win_T *wp)
#endif
// Display one line.
- row = win_line(wp, lnum, srow, wp->w_height, FALSE, &spv);
+ row = win_line(wp, lnum, srow, wp->w_height, 0, &spv);
#ifdef FEAT_FOLDING
wp->w_lines[idx].wl_folded = FALSE;
@@ -2540,17 +2528,23 @@ win_update(win_T *wp)
}
else
{
- if (wp->w_p_rnu && wp->w_last_cursor_lnum_rnu != wp->w_cursor.lnum)
+ // If:
+ // - 'number' is set and below inserted/deleted lines, or
+ // - 'relativenumber' is set and cursor moved vertically,
+ // the text doesn't need to be redrawn, but the number column does.
+ if ((wp->w_p_nu && mod_top != 0
+ && lnum >= mod_bot && buf->b_mod_xlines != 0)
+ || (wp->w_p_rnu
+ && wp->w_last_cursor_lnum_rnu != wp->w_cursor.lnum))
{
#ifdef FEAT_FOLDING
- // 'relativenumber' set and the cursor moved vertically: The
- // text doesn't need to be drawn, but the number column does.
fold_count = foldedCount(wp, lnum, &win_foldinfo);
if (fold_count != 0)
fold_line(wp, fold_count, &win_foldinfo, lnum, row);
else
#endif
- (void)win_line(wp, lnum, srow, wp->w_height, TRUE, &spv);
+ (void)win_line(wp, lnum, srow, wp->w_height,
+ wp->w_lines[idx].wl_size, &spv);
}
// This line does not need to be drawn, advance to the next one.
@@ -3056,7 +3050,7 @@ redraw_asap(int type)
mch_memmove(ScreenLines2 + off,
screenline2 + r * cols,
(size_t)cols * sizeof(schar_T));
- screen_line(curwin, cmdline_row + r, 0, cols, cols, 0);
+ screen_line(curwin, cmdline_row + r, 0, cols, cols, -1, 0);
}
ret = 4;
}
diff --git a/src/edit.c b/src/edit.c
index cb6ae7e..69ec255 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -843,7 +843,12 @@ doESCkey:
if (cmdchar != 'r' && cmdchar != 'v' && c != Ctrl_C)
ins_apply_autocmds(EVENT_INSERTLEAVE);
did_cursorhold = FALSE;
- curbuf->b_last_changedtick = CHANGEDTICK(curbuf);
+
+ // ins_redraw() triggers TextChangedI only when no characters
+ // are in the typeahead buffer, so only reset curbuf->b_last_changedtick
+ // if the TextChangedI was not blocked by char_avail() (e.g. using :norm!)
+ if (!char_avail())
+ curbuf->b_last_changedtick = CHANGEDTICK(curbuf);
return (c == Ctrl_O);
}
continue;
@@ -2023,7 +2028,7 @@ insert_special(
* Only use mod_mask for special keys, to avoid things like <S-Space>,
* unless 'allow_modmask' is TRUE.
*/
-#ifdef MACOS_X
+#if defined(MACOS_X) || defined(FEAT_GUI_GTK)
// Command-key never produces a normal key
if (mod_mask & MOD_MASK_CMD)
allow_modmask = TRUE;
@@ -3217,7 +3222,7 @@ replace_do_bs(int limit_col)
{
// Do not adjust text properties for individual delete and insert
// operations, do it afterwards on the resulting text.
- len_before = STRLEN(ml_get_curline());
+ len_before = ml_get_curline_len();
++text_prop_frozen;
}
#endif
@@ -3232,14 +3237,14 @@ replace_do_bs(int limit_col)
{
(void)del_char_after_col(limit_col);
if (State & VREPLACE_FLAG)
- orig_len = (int)STRLEN(ml_get_cursor());
+ orig_len = ml_get_cursor_len();
replace_push(cc);
}
else
{
pchar_cursor(cc);
if (State & VREPLACE_FLAG)
- orig_len = (int)STRLEN(ml_get_cursor()) - 1;
+ orig_len = ml_get_cursor_len() - 1;
}
replace_pop_ins();
@@ -3247,7 +3252,7 @@ replace_do_bs(int limit_col)
{
// Get the number of screen cells used by the inserted characters
p = ml_get_cursor();
- ins_len = (int)STRLEN(p) - orig_len;
+ ins_len = ml_get_cursor_len() - orig_len;
vcol = start_vcol;
for (i = 0; i < ins_len; ++i)
{
@@ -3273,7 +3278,7 @@ replace_do_bs(int limit_col)
#ifdef FEAT_PROP_POPUP
if (curbuf->b_has_textprop)
{
- size_t len_now = STRLEN(ml_get_curline());
+ size_t len_now = ml_get_curline_len();
--text_prop_frozen;
adjust_prop_columns(curwin->w_cursor.lnum, curwin->w_cursor.col,
@@ -4063,7 +4068,7 @@ ins_bs(
(linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL)
return FALSE;
--Insstart.lnum;
- Insstart.col = (colnr_T)STRLEN(ml_get(Insstart.lnum));
+ Insstart.col = ml_get_len(Insstart.lnum);
}
/*
* In replace mode:
@@ -4096,12 +4101,30 @@ ins_bs(
&& has_format_option(FO_WHITE_PAR))
{
char_u *ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum,
- TRUE);
- int len;
+ FALSE);
+ int len = ml_get_curline_len();
- len = (int)STRLEN(ptr);
if (len > 0 && ptr[len - 1] == ' ')
- ptr[len - 1] = NUL;
+ {
+ char_u *newp = alloc(curbuf->b_ml.ml_line_len - 1);
+
+ if (newp != NULL)
+ {
+ mch_memmove(newp, ptr, len - 1);
+ newp[len - 1] = NUL;
+ if (curbuf->b_ml.ml_line_len > len + 1)
+ mch_memmove(newp + len, ptr + len + 1,
+ curbuf->b_ml.ml_line_len - len - 1);
+
+ if (curbuf->b_ml.ml_flags
+ & (ML_LINE_DIRTY | ML_ALLOCATED))
+ vim_free(curbuf->b_ml.ml_line_ptr);
+ curbuf->b_ml.ml_line_ptr = newp;
+ curbuf->b_ml.ml_line_len--;
+ curbuf->b_ml.ml_line_textlen--;
+ curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
+ }
+ }
}
(void)do_join(2, FALSE, FALSE, FALSE, FALSE);
@@ -4954,7 +4977,7 @@ ins_tab(void)
{
pos = curwin->w_cursor;
cursor = &pos;
- saved_line = vim_strsave(ml_get_curline());
+ saved_line = vim_strnsave(ml_get_curline(), ml_get_curline_len());
if (saved_line == NULL)
return FALSE;
ptr = saved_line + pos.col;
@@ -5065,6 +5088,7 @@ ins_tab(void)
vim_free(curbuf->b_ml.ml_line_ptr);
curbuf->b_ml.ml_line_ptr = newp;
curbuf->b_ml.ml_line_len -= i;
+ curbuf->b_ml.ml_line_textlen = 0;
curbuf->b_ml.ml_flags =
(curbuf->b_ml.ml_flags | ML_LINE_DIRTY) & ~ML_EMPTY;
}
@@ -5150,7 +5174,7 @@ ins_eol(int c)
// NL in reverse insert will always start in the end of
// current line.
if (revins_on)
- curwin->w_cursor.col += (colnr_T)STRLEN(ml_get_cursor());
+ curwin->w_cursor.col += ml_get_cursor_len();
#endif
AppendToRedobuff(NL_STR);
@@ -5371,6 +5395,9 @@ do_insert_char_pre(int c)
if (!has_insertcharpre())
return NULL;
+ if (c == Ctrl_RSB)
+ return NULL;
+
if (has_mbyte)
buf[(*mb_char2bytes)(c, buf)] = NUL;
else
diff --git a/src/errors.h b/src/errors.h
index dfb6ce6..5dccc63 100644
--- a/src/errors.h
+++ b/src/errors.h
@@ -258,8 +258,9 @@ EXTERN char e_escape_not_allowed_in_digraph[]
EXTERN char e_using_loadkeymap_not_in_sourced_file[]
INIT(= N_("E105: Using :loadkeymap not in a sourced file"));
#endif
-// E106 unused
#ifdef FEAT_EVAL
+EXTERN char e_unsupported_diff_output_format_str[]
+ INIT(= N_("E106: Unsupported diff output format: %s"));
EXTERN char e_missing_parenthesis_str[]
INIT(= N_("E107: Missing parentheses: %s"));
EXTERN char e_no_such_variable_str[]
@@ -471,8 +472,8 @@ EXTERN char e_no_digraphs_version[]
EXTERN char e_cannot_set_language_to_str[]
INIT(= N_("E197: Cannot set language to \"%s\""));
// E198 unused
-EXTERN char e_active_window_or_buffer_deleted[]
- INIT(= N_("E199: Active window or buffer deleted"));
+EXTERN char e_active_window_or_buffer_changed_or_deleted[]
+ INIT(= N_("E199: Active window or buffer changed or deleted"));
EXTERN char e_readpre_autocommands_made_file_unreadable[]
INIT(= N_("E200: *ReadPre autocommands made the file unreadable"));
EXTERN char e_readpre_autocommands_must_not_change_current_buffer[]
@@ -2525,9 +2526,11 @@ EXTERN char e_invalid_action_str_2[]
EXTERN char e_setting_v_str_to_value_with_wrong_type[]
INIT(= N_("E963: Setting v:%s to value with wrong type"));
#endif
-#ifdef FEAT_PROP_POPUP
+#if defined(FEAT_PROP_POPUP) || defined(FEAT_EVAL)
EXTERN char_u e_invalid_column_number_nr[]
INIT(= N_("E964: Invalid column number: %ld"));
+#endif
+#ifdef FEAT_PROP_POPUP
EXTERN char e_missing_property_type_name[]
INIT(= N_("E965: Missing property type name"));
#endif
@@ -3184,7 +3187,7 @@ EXTERN char e_separator_not_supported_str[]
EXTERN char e_no_white_space_allowed_before_separator_str[]
INIT(= N_("E1242: No white space allowed before separator: %s"));
#endif
-#ifdef FEAT_GUI_GTK
+#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)
EXTERN char e_ascii_code_not_in_range[]
INIT(= N_("E1243: ASCII code not in 32-127 range"));
#endif
@@ -3578,8 +3581,12 @@ EXTERN char e_const_variable_not_supported_in_interface[]
INIT(= N_("E1410: Const variable not supported in an interface"));
EXTERN char e_missing_dot_after_object_str[]
INIT(= N_("E1411: Missing dot after object \"%s\""));
+EXTERN char e_builtin_object_method_str_not_supported[]
+ INIT(= N_("E1412: Builtin object method \"%s\" not supported"));
+EXTERN char e_builtin_class_method_not_supported[]
+ INIT(= N_("E1413: Builtin class method not supported"));
#endif
-// E1412 - E1499 unused (reserved for Vim9 class support)
+// E1415 - E1499 unused (reserved for Vim9 class support)
EXTERN char e_cannot_mix_positional_and_non_positional_str[]
INIT(= N_("E1500: Cannot mix positional and non-positional arguments: %s"));
EXTERN char e_fmt_arg_nr_unused_str[]
@@ -3602,3 +3609,9 @@ EXTERN char e_xattr_other[]
INIT(= N_("E1509: Error occurred when reading or writing extended attribute"));
EXTERN char e_val_too_large[]
INIT(= N_("E1510: Value too large: %s"));
+EXTERN char e_wrong_number_of_characters_for_field_str[]
+ INIT(= N_("E1511: Wrong number of characters for field \"%s\""));
+EXTERN char e_wrong_character_width_for_field_str[]
+ INIT(= N_("E1512: Wrong character width for field \"%s\""));
+EXTERN char e_winfixbuf_cannot_go_to_buffer[]
+ INIT(= N_("E1513: Cannot switch buffer. 'winfixbuf' is enabled"));
diff --git a/src/eval.c b/src/eval.c
index 815d13d..69b8374 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1901,7 +1901,7 @@ set_var_lval(
&& !tv_check_lock(&di->di_tv, lp->ll_name, FALSE)))
&& tv_op(&tv, rettv, op) == OK)
set_var_const(lp->ll_name, lp->ll_sid, NULL, &tv, FALSE,
- ASSIGN_NO_DECL, 0);
+ ASSIGN_NO_DECL | ASSIGN_COMPOUND_OP, 0);
clear_tv(&tv);
}
}
@@ -2699,6 +2699,9 @@ eval_next_non_blank(char_u *arg, evalarg_T *evalarg, int *getnext)
/*
* To be called after eval_next_non_blank() sets "getnext" to TRUE.
* Only called for Vim9 script.
+ *
+ * If "arg" is not NULL, then the caller should assign the return value to
+ * "arg".
*/
char_u *
eval_next_line(char_u *arg, evalarg_T *evalarg)
@@ -2747,8 +2750,12 @@ eval_next_line(char_u *arg, evalarg_T *evalarg)
}
// Advanced to the next line, "arg" no longer points into the previous
- // line.
- evalarg->eval_using_cmdline = FALSE;
+ // line. The caller assigns the return value to "arg".
+ // If "arg" is NULL, then the return value is discarded. In that case,
+ // "arg" still points to the previous line. So don't reset
+ // "eval_using_cmdline".
+ if (arg != NULL)
+ evalarg->eval_using_cmdline = FALSE;
return skipwhite(line);
}
@@ -6311,36 +6318,9 @@ echo_string_core(
break;
case VAR_OBJECT:
- {
- garray_T ga;
- ga_init2(&ga, 1, 50);
- ga_concat(&ga, (char_u *)"object of ");
- object_T *obj = tv->vval.v_object;
- class_T *cl = obj == NULL ? NULL : obj->obj_class;
- ga_concat(&ga, cl == NULL ? (char_u *)"[unknown]"
- : cl->class_name);
- if (cl != NULL)
- {
- ga_concat(&ga, (char_u *)" {");
- for (int i = 0; i < cl->class_obj_member_count; ++i)
- {
- if (i > 0)
- ga_concat(&ga, (char_u *)", ");
- ocmember_T *m = &cl->class_obj_members[i];
- ga_concat(&ga, m->ocm_name);
- ga_concat(&ga, (char_u *)": ");
- char_u *tf = NULL;
- ga_concat(&ga, echo_string_core(
- (typval_T *)(obj + 1) + i,
- &tf, numbuf, copyID, echo_style,
- restore_copyID, composite_val));
- vim_free(tf);
- }
- ga_concat(&ga, (char_u *)"}");
- }
-
- *tofree = r = ga.ga_data;
- }
+ *tofree = r = object_string(tv->vval.v_object, numbuf, copyID,
+ echo_style, restore_copyID,
+ composite_val);
break;
case VAR_FLOAT:
@@ -6488,7 +6468,7 @@ var2fpos(
if (charcol)
len = (long)mb_charlen(ml_get(pos.lnum));
else
- len = (long)STRLEN(ml_get(pos.lnum));
+ len = (long)ml_get_len(pos.lnum);
// Get the column number
// We accept "$" for the column number: last column.
@@ -6594,7 +6574,7 @@ var2fpos(
if (charcol)
pos.col = (colnr_T)mb_charlen(ml_get_curline());
else
- pos.col = (colnr_T)STRLEN(ml_get_curline());
+ pos.col = ml_get_curline_len();
}
return &pos;
}
diff --git a/src/evalbuffer.c b/src/evalbuffer.c
index e611c52..6ec734d 100644
--- a/src/evalbuffer.c
+++ b/src/evalbuffer.c
@@ -653,6 +653,7 @@ get_buffer_info(buf_T *buf)
dict_add_number(dict, "changedtick", CHANGEDTICK(buf));
dict_add_number(dict, "hidden",
buf->b_ml.ml_mfp != NULL && buf->b_nwindows == 0);
+ dict_add_number(dict, "command", buf == cmdwin_buf);
// Get a reference to buffer variables
dict_add_dict(dict, "variables", buf->b_vars);
diff --git a/src/evalfunc.c b/src/evalfunc.c
index e37b3a4..14650ca 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -63,15 +63,16 @@ static void f_get(typval_T *argvars, typval_T *rettv);
static void f_getchangelist(typval_T *argvars, typval_T *rettv);
static void f_getcharpos(typval_T *argvars, typval_T *rettv);
static void f_getcharsearch(typval_T *argvars, typval_T *rettv);
+static void f_getcurpos(typval_T *argvars, typval_T *rettv);
+static void f_getcursorcharpos(typval_T *argvars, typval_T *rettv);
static void f_getenv(typval_T *argvars, typval_T *rettv);
static void f_getfontname(typval_T *argvars, typval_T *rettv);
static void f_getjumplist(typval_T *argvars, typval_T *rettv);
static void f_getpid(typval_T *argvars, typval_T *rettv);
-static void f_getcurpos(typval_T *argvars, typval_T *rettv);
-static void f_getcursorcharpos(typval_T *argvars, typval_T *rettv);
static void f_getpos(typval_T *argvars, typval_T *rettv);
static void f_getreg(typval_T *argvars, typval_T *rettv);
static void f_getreginfo(typval_T *argvars, typval_T *rettv);
+static void f_getregion(typval_T *argvars, typval_T *rettv);
static void f_getregtype(typval_T *argvars, typval_T *rettv);
static void f_gettagstack(typval_T *argvars, typval_T *rettv);
static void f_gettext(typval_T *argvars, typval_T *rettv);
@@ -607,10 +608,11 @@ arg_list_or_dict_or_blob_or_string_mod(
}
/*
- * Check second argument of map() or filter().
+ * Check second argument of map(), filter(), foreach().
*/
static int
-check_map_filter_arg2(type_T *type, argcontext_T *context, int is_map)
+check_map_filter_arg2(type_T *type, argcontext_T *context,
+ filtermap_T filtermap)
{
type_T *expected_member = NULL;
type_T *(args[2]);
@@ -663,12 +665,14 @@ check_map_filter_arg2(type_T *type, argcontext_T *context, int is_map)
{
where_T where = WHERE_INIT;
- if (is_map)
+ if (filtermap == FILTERMAP_MAP)
t_func_exp.tt_member = expected_member == NULL
|| type_any_or_unknown(type->tt_member)
? &t_any : expected_member;
- else
+ else if (filtermap == FILTERMAP_FILTER)
t_func_exp.tt_member = &t_bool;
+ else // filtermap == FILTERMAP_FOREACH
+ t_func_exp.tt_member = &t_unknown;
if (args[0] == NULL)
args[0] = &t_unknown;
if (type->tt_argcount == -1)
@@ -693,7 +697,7 @@ arg_filter_func(type_T *type, type_T *decl_type UNUSED, argcontext_T *context)
return OK;
if (type->tt_type == VAR_FUNC)
- return check_map_filter_arg2(type, context, FALSE);
+ return check_map_filter_arg2(type, context, FILTERMAP_FILTER);
semsg(_(e_string_or_function_required_for_argument_nr), 2);
return FAIL;
}
@@ -710,7 +714,24 @@ arg_map_func(type_T *type, type_T *decl_type UNUSED, argcontext_T *context)
return OK;
if (type->tt_type == VAR_FUNC)
- return check_map_filter_arg2(type, context, TRUE);
+ return check_map_filter_arg2(type, context, FILTERMAP_MAP);
+ semsg(_(e_string_or_function_required_for_argument_nr), 2);
+ return FAIL;
+}
+
+/*
+ * Check second argument of foreach(), the function.
+ */
+ static int
+arg_foreach_func(type_T *type, type_T *decl_type UNUSED, argcontext_T *context)
+{
+ if (type->tt_type == VAR_STRING
+ || type->tt_type == VAR_PARTIAL
+ || type_any_or_unknown(type))
+ return OK;
+
+ if (type->tt_type == VAR_FUNC)
+ return check_map_filter_arg2(type, context, FILTERMAP_FOREACH);
semsg(_(e_string_or_function_required_for_argument_nr), 2);
return FAIL;
}
@@ -965,6 +986,7 @@ arg_len1(type_T *type, type_T *decl_type UNUSED, argcontext_T *context)
|| type->tt_type == VAR_BLOB
|| type->tt_type == VAR_LIST
|| type->tt_type == VAR_DICT
+ || type->tt_type == VAR_OBJECT
|| type_any_or_unknown(type))
return OK;
@@ -1128,7 +1150,9 @@ static argcheck_T arg3_buffer_number_number[] = {arg_buffer, arg_number, arg_num
static argcheck_T arg3_buffer_string_any[] = {arg_buffer, arg_string, arg_any};
static argcheck_T arg3_buffer_string_dict[] = {arg_buffer, arg_string, arg_dict_any};
static argcheck_T arg3_dict_number_number[] = {arg_dict_any, arg_number, arg_number};
+static argcheck_T arg3_diff[] = {arg_list_string, arg_list_string, arg_dict_any};
static argcheck_T arg3_list_string_dict[] = {arg_list_any, arg_string, arg_dict_any};
+static argcheck_T arg3_list_list_dict[] = {arg_list_any, arg_list_any, arg_dict_any};
static argcheck_T arg3_lnum_number_bool[] = {arg_lnum, arg_number, arg_bool};
static argcheck_T arg3_number[] = {arg_number, arg_number, arg_number};
static argcheck_T arg3_number_any_dict[] = {arg_number, arg_any, arg_dict_any};
@@ -1173,6 +1197,7 @@ static argcheck_T arg1_len[] = {arg_len1};
static argcheck_T arg3_libcall[] = {arg_string, arg_string, arg_string_or_nr};
static argcheck_T arg14_maparg[] = {arg_string, arg_string, arg_bool, arg_bool};
static argcheck_T arg2_filter[] = {arg_list_or_dict_or_blob_or_string_mod, arg_filter_func};
+static argcheck_T arg2_foreach[] = {arg_list_or_dict_or_blob_or_string, arg_foreach_func};
static argcheck_T arg2_instanceof[] = {arg_object, varargs_class, NULL };
static argcheck_T arg2_map[] = {arg_list_or_dict_or_blob_or_string_mod, arg_map_func};
static argcheck_T arg2_mapnew[] = {arg_list_or_dict_or_blob_or_string, arg_any};
@@ -1929,6 +1954,8 @@ static funcentry_T global_functions[] =
ret_number_bool, f_deletebufline},
{"did_filetype", 0, 0, 0, NULL,
ret_number_bool, f_did_filetype},
+ {"diff", 2, 3, FEARG_1, arg3_diff,
+ ret_any, f_diff},
{"diff_filler", 1, 1, FEARG_1, arg1_lnum,
ret_number, f_diff_filler},
{"diff_hlID", 2, 2, FEARG_1, arg2_lnum_number,
@@ -2013,6 +2040,8 @@ static funcentry_T global_functions[] =
ret_string, f_foldtext},
{"foldtextresult", 1, 1, FEARG_1, arg1_lnum,
ret_string, f_foldtextresult},
+ {"foreach", 2, 2, FEARG_1, arg2_foreach,
+ ret_first_arg, f_foreach},
{"foreground", 0, 0, 0, NULL,
ret_void, f_foreground},
{"fullcommand", 1, 2, FEARG_1, arg2_string_bool,
@@ -2105,6 +2134,8 @@ static funcentry_T global_functions[] =
ret_getreg, f_getreg},
{"getreginfo", 0, 1, FEARG_1, arg1_string,
ret_dict_any, f_getreginfo},
+ {"getregion", 2, 3, FEARG_1, arg3_list_list_dict,
+ ret_list_string, f_getregion},
{"getregtype", 0, 1, FEARG_1, arg1_string,
ret_string, f_getregtype},
{"getscriptinfo", 0, 1, 0, arg1_dict_any,
@@ -3606,7 +3637,7 @@ get_col(typval_T *argvars, typval_T *rettv, int charcol)
{
// '> can be MAXCOL, get the length of the line then
if (fp->lnum <= curbuf->b_ml.ml_line_count)
- col = (colnr_T)STRLEN(ml_get(fp->lnum)) + 1;
+ col = ml_get_len(fp->lnum) + 1;
else
col = MAXCOL;
}
@@ -3951,7 +3982,7 @@ f_empty(typval_T *argvars, typval_T *rettv)
n = argvars[0].vval.v_class != NULL;
break;
case VAR_OBJECT:
- n = argvars[0].vval.v_object != NULL;
+ n = object_empty(argvars[0].vval.v_object);
break;
case VAR_BLOB:
@@ -5427,6 +5458,229 @@ f_getpos(typval_T *argvars, typval_T *rettv)
}
/*
+ * Convert from block_def to string
+ */
+ static char_u *
+block_def2str(struct block_def *bd)
+{
+ char_u *p, *ret;
+ size_t size = bd->startspaces + bd->endspaces + bd->textlen;
+
+ ret = alloc(size + 1);
+ if (ret != NULL)
+ {
+ p = ret;
+ vim_memset(p, ' ', bd->startspaces);
+ p += bd->startspaces;
+ mch_memmove(p, bd->textstart, bd->textlen);
+ p += bd->textlen;
+ vim_memset(p, ' ', bd->endspaces);
+ *(p + bd->endspaces) = NUL;
+ }
+ return ret;
+}
+
+/*
+ * "getregion()" function
+ */
+ static void
+f_getregion(typval_T *argvars, typval_T *rettv)
+{
+ linenr_T lnum;
+ oparg_T oa;
+ struct block_def bd;
+ char_u *akt = NULL;
+ int inclusive = TRUE;
+ int fnum1 = -1, fnum2 = -1;
+ pos_T p1, p2;
+ char_u *type;
+ buf_T *save_curbuf;
+ buf_T *findbuf;
+ char_u default_type[] = "v";
+ int save_virtual;
+ int l;
+ int region_type = -1;
+ int is_select_exclusive;
+
+ if (rettv_list_alloc(rettv) == FAIL)
+ return;
+
+ if (check_for_list_arg(argvars, 0) == FAIL
+ || check_for_list_arg(argvars, 1) == FAIL
+ || check_for_opt_dict_arg(argvars, 2) == FAIL)
+ return;
+
+ if (list2fpos(&argvars[0], &p1, &fnum1, NULL, FALSE) != OK
+ || list2fpos(&argvars[1], &p2, &fnum2, NULL, FALSE) != OK
+ || fnum1 != fnum2)
+ return;
+
+ if (argvars[2].v_type == VAR_DICT)
+ {
+ is_select_exclusive = dict_get_bool(
+ argvars[2].vval.v_dict, "exclusive", *p_sel == 'e');
+ type = dict_get_string(
+ argvars[2].vval.v_dict, "type", FALSE);
+ if (type == NULL)
+ type = default_type;
+ }
+ else
+ {
+ is_select_exclusive = *p_sel == 'e';
+ type = default_type;
+ }
+
+ if (type[0] == 'v' && type[1] == NUL)
+ region_type = MCHAR;
+ else if (type[0] == 'V' && type[1] == NUL)
+ region_type = MLINE;
+ else if (type[0] == Ctrl_V && type[1] == NUL)
+ region_type = MBLOCK;
+ else
+ {
+ semsg(_(e_invalid_value_for_argument_str_str), "type", type);
+ return;
+ }
+
+ findbuf = fnum1 != 0 ? buflist_findnr(fnum1) : curbuf;
+ if (findbuf == NULL || findbuf->b_ml.ml_mfp == NULL)
+ {
+ emsg(_(e_buffer_is_not_loaded));
+ return;
+ }
+
+ if (p1.lnum < 1 || p1.lnum > findbuf->b_ml.ml_line_count)
+ {
+ semsg(_(e_invalid_line_number_nr), p1.lnum);
+ return;
+ }
+ if (p1.col < 1 || p1.col > ml_get_buf_len(findbuf, p1.lnum) + 1)
+ {
+ semsg(_(e_invalid_column_number_nr), p1.col);
+ return;
+ }
+ if (p2.lnum < 1 || p2.lnum > findbuf->b_ml.ml_line_count)
+ {
+ semsg(_(e_invalid_line_number_nr), p2.lnum);
+ return;
+ }
+ if (p2.col < 1 || p2.col > ml_get_buf_len(findbuf, p2.lnum) + 1)
+ {
+ semsg(_(e_invalid_column_number_nr), p2.col);
+ return;
+ }
+
+ save_curbuf = curbuf;
+ curbuf = findbuf;
+ curwin->w_buffer = curbuf;
+ save_virtual = virtual_op;
+ virtual_op = virtual_active();
+
+ // NOTE: Adjust is needed.
+ p1.col--;
+ p2.col--;
+
+ if (!LT_POS(p1, p2))
+ {
+ // swap position
+ pos_T p;
+
+ p = p1;
+ p1 = p2;
+ p2 = p;
+ }
+
+ if (region_type == MCHAR)
+ {
+ // handle 'selection' == "exclusive"
+ if (is_select_exclusive && !EQUAL_POS(p1, p2))
+ {
+ if (p2.coladd > 0)
+ p2.coladd--;
+ else if (p2.col > 0)
+ {
+ p2.col--;
+
+ mb_adjustpos(curbuf, &p2);
+ }
+ else if (p2.lnum > 1)
+ {
+ p2.lnum--;
+ p2.col = ml_get_len(p2.lnum);
+ if (p2.col > 0)
+ {
+ p2.col--;
+
+ mb_adjustpos(curbuf, &p2);
+ }
+ }
+ }
+ // if fp2 is on NUL (empty line) inclusive becomes false
+ if (*ml_get_pos(&p2) == NUL && !virtual_op)
+ inclusive = FALSE;
+ }
+ else if (region_type == MBLOCK)
+ {
+ colnr_T sc1, ec1, sc2, ec2;
+
+ getvvcol(curwin, &p1, &sc1, NULL, &ec1);
+ getvvcol(curwin, &p2, &sc2, NULL, &ec2);
+ oa.motion_type = MBLOCK;
+ oa.inclusive = TRUE;
+ oa.op_type = OP_NOP;
+ oa.start = p1;
+ oa.end = p2;
+ oa.start_vcol = MIN(sc1, sc2);
+ if (is_select_exclusive && ec1 < sc2 && 0 < sc2 && ec2 > ec1)
+ oa.end_vcol = sc2 - 1;
+ else
+ oa.end_vcol = MAX(ec1, ec2);
+ }
+
+ // Include the trailing byte of a multi-byte char.
+ l = utfc_ptr2len((char_u *)ml_get_pos(&p2));
+ if (l > 1)
+ p2.col += l - 1;
+
+ for (lnum = p1.lnum; lnum <= p2.lnum; lnum++)
+ {
+ int ret = 0;
+
+ if (region_type == MLINE)
+ akt = vim_strsave(ml_get(lnum));
+ else if (region_type == MBLOCK)
+ {
+ block_prep(&oa, &bd, lnum, FALSE);
+ akt = block_def2str(&bd);
+ }
+ else if (p1.lnum < lnum && lnum < p2.lnum)
+ akt = vim_strsave(ml_get(lnum));
+ else
+ {
+ charwise_block_prep(p1, p2, &bd, lnum, inclusive);
+ akt = block_def2str(&bd);
+ }
+
+ if (akt)
+ {
+ ret = list_append_string(rettv->vval.v_list, akt, -1);
+ vim_free(akt);
+ }
+
+ if (akt == NULL || ret == FAIL)
+ {
+ clear_tv(rettv);
+ (void)rettv_list_alloc(rettv);
+ break;
+ }
+ }
+
+ curbuf = save_curbuf;
+ curwin->w_buffer = curbuf;
+ virtual_op = save_virtual;
+}
+
+/*
* Common between getreg(), getreginfo() and getregtype(): get the register
* name from the first argument.
* Returns zero on error.
@@ -7613,6 +7867,9 @@ f_len(typval_T *argvars, typval_T *rettv)
case VAR_DICT:
rettv->vval.v_number = dict_len(argvars[0].vval.v_dict);
break;
+ case VAR_OBJECT:
+ rettv->vval.v_number = object_len(argvars[0].vval.v_object);
+ break;
case VAR_UNKNOWN:
case VAR_ANY:
case VAR_VOID:
@@ -7625,7 +7882,6 @@ f_len(typval_T *argvars, typval_T *rettv)
case VAR_CHANNEL:
case VAR_INSTR:
case VAR_CLASS:
- case VAR_OBJECT:
case VAR_TYPEALIAS:
emsg(_(e_invalid_type_for_len));
break;
@@ -10878,7 +11134,7 @@ f_synID(typval_T *argvars UNUSED, typval_T *rettv)
trans = (int)tv_get_bool_chk(&argvars[2], &transerr);
if (!transerr && lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
- && col >= 0 && col < (long)STRLEN(ml_get(lnum)))
+ && col >= 0 && col < (long)ml_get_len(lnum))
id = syn_get_id(curwin, lnum, col, trans, NULL, FALSE);
#endif
@@ -11055,7 +11311,7 @@ f_synconcealed(typval_T *argvars UNUSED, typval_T *rettv)
if (rettv_list_alloc(rettv) == OK)
{
if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
- && col >= 0 && col <= (long)STRLEN(ml_get(lnum))
+ && col >= 0 && col <= (long)ml_get_len(lnum)
&& curwin->w_p_cole > 0)
{
(void)syn_get_id(curwin, lnum, col, FALSE, NULL, FALSE);
@@ -11112,7 +11368,7 @@ f_synstack(typval_T *argvars UNUSED, typval_T *rettv)
col = (colnr_T)tv_get_number(&argvars[1]) - 1; // -1 on type error
if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
- && col >= 0 && col <= (long)STRLEN(ml_get(lnum))
+ && col >= 0 && col <= (long)ml_get_len(lnum)
&& rettv_list_alloc(rettv) == OK)
{
(void)syn_get_id(curwin, lnum, col, FALSE, NULL, TRUE);
@@ -11290,7 +11546,7 @@ f_virtcol(typval_T *argvars, typval_T *rettv)
fp->col = 0;
else
{
- len = (int)STRLEN(ml_get(fp->lnum));
+ len = (int)ml_get_len(fp->lnum);
if (fp->col > len)
fp->col = len;
}
diff --git a/src/evalvars.c b/src/evalvars.c
index 8e42c5a..de9d5b2 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -3830,7 +3830,7 @@ set_var(
* If the variable already exists and "is_const" is FALSE the value is updated.
* Otherwise the variable is created.
*/
- void
+ int
set_var_const(
char_u *name,
scid_T sid,
@@ -3854,6 +3854,7 @@ set_var_const(
int var_in_autoload = FALSE;
int flags = flags_arg;
int free_tv_arg = !copy; // free tv_arg if not used
+ int rc = FAIL;
if (sid != 0)
{
@@ -3977,7 +3978,14 @@ set_var_const(
if (check_typval_is_value(&di->di_tv) == FAIL)
goto failed;
- if (var_in_vim9script && (flags & ASSIGN_FOR_LOOP) == 0)
+ // List and Blob types can be modified in-place using the "+="
+ // compound operator. For other types, this is not allowed.
+ int type_inplace_modifiable =
+ (di->di_tv.v_type == VAR_LIST || di->di_tv.v_type == VAR_BLOB);
+
+ if (var_in_vim9script && (flags & ASSIGN_FOR_LOOP) == 0
+ && ((flags & ASSIGN_COMPOUND_OP) == 0
+ || !type_inplace_modifiable))
{
where_T where = WHERE_INIT;
svar_T *sv = find_typval_in_script(&di->di_tv, sid, TRUE);
@@ -3998,7 +4006,11 @@ set_var_const(
}
}
- if ((flags & ASSIGN_FOR_LOOP) == 0
+ // Modifying a final variable with a List value using the "+="
+ // operator is allowed. For other types, it is not allowed.
+ if (((flags & ASSIGN_FOR_LOOP) == 0
+ && ((flags & ASSIGN_COMPOUND_OP) == 0
+ || !type_inplace_modifiable))
? var_check_permission(di, name) == FAIL
: var_check_ro(di->di_flags, name, FALSE))
goto failed;
@@ -4116,10 +4128,14 @@ set_var_const(
// values.
item_lock(dest_tv, DICT_MAXNEST, TRUE, TRUE);
+ rc = OK;
+
failed:
vim_free(name_tofree);
if (free_tv_arg)
clear_tv(tv_arg);
+
+ return rc;
}
/*
@@ -4832,6 +4848,7 @@ f_settabvar(typval_T *argvars, typval_T *rettv UNUSED)
{
tabpage_T *save_curtab;
tabpage_T *tp;
+ tabpage_T *save_lu_tp;
char_u *varname, *tabvarname;
typval_T *varp;
@@ -4851,6 +4868,7 @@ f_settabvar(typval_T *argvars, typval_T *rettv UNUSED)
return;
save_curtab = curtab;
+ save_lu_tp = lastused_tabpage;
goto_tabpage_tp(tp, FALSE, FALSE);
tabvarname = alloc(STRLEN(varname) + 3);
@@ -4862,9 +4880,13 @@ f_settabvar(typval_T *argvars, typval_T *rettv UNUSED)
vim_free(tabvarname);
}
- // Restore current tabpage
+ // Restore current tabpage and last accessed tabpage.
if (valid_tabpage(save_curtab))
+ {
goto_tabpage_tp(save_curtab, FALSE, FALSE);
+ if (valid_tabpage(save_lu_tp))
+ lastused_tabpage = save_lu_tp;
+ }
}
/*
@@ -4924,6 +4946,10 @@ f_setbufvar(typval_T *argvars, typval_T *rettv UNUSED)
if (*varname == '&')
{
aco_save_T aco;
+ // safe the current window position, it could
+ // change because of 'scrollbind' window-local
+ // options
+ linenr_T old_topline = curwin->w_topline;
// Set curbuf to be our buf, temporarily.
aucmd_prepbuf(&aco, buf);
@@ -4935,6 +4961,7 @@ f_setbufvar(typval_T *argvars, typval_T *rettv UNUSED)
// reset notion of buffer
aucmd_restbuf(&aco);
}
+ curwin->w_topline = old_topline;
}
else
{
diff --git a/src/evalwindow.c b/src/evalwindow.c
index fde90f2..ceca2c9 100644
--- a/src/evalwindow.c
+++ b/src/evalwindow.c
@@ -824,11 +824,15 @@ f_win_gotoid(typval_T *argvars, typval_T *rettv)
return;
id = tv_get_number(&argvars[0]);
- if (cmdwin_type != 0)
+ if (curwin->w_id == id)
{
- emsg(_(e_invalid_in_cmdline_window));
+ // Nothing to do.
+ rettv->vval.v_number = 1;
return;
}
+
+ if (text_or_buf_locked())
+ return;
#if defined(FEAT_PROP_POPUP) && defined(FEAT_TERMINAL)
if (popup_is_popup(curwin) && curbuf->b_term != NULL)
{
@@ -953,59 +957,17 @@ f_win_screenpos(typval_T *argvars, typval_T *rettv)
}
/*
- * Move the window wp into a new split of targetwin in a given direction
- */
- static void
-win_move_into_split(win_T *wp, win_T *targetwin, int size, int flags)
-{
- int dir;
- int height = wp->w_height;
- win_T *oldwin = curwin;
-
- if (wp == targetwin)
- return;
-
- // Jump to the target window
- if (curwin != targetwin)
- win_goto(targetwin);
-
- // Remove the old window and frame from the tree of frames
- (void)winframe_remove(wp, &dir, NULL);
- win_remove(wp, NULL);
- last_status(FALSE); // may need to remove last status line
- (void)win_comp_pos(); // recompute window positions
-
- // Split a window on the desired side and put the old window there
- (void)win_split_ins(size, flags, wp, dir);
-
- // If splitting horizontally, try to preserve height
- if (size == 0 && !(flags & WSP_VERT))
- {
- win_setheight_win(height, wp);
- if (p_ea)
- win_equal(wp, TRUE, 'v');
- }
-
-#if defined(FEAT_GUI)
- // When 'guioptions' includes 'L' or 'R' may have to remove or add
- // scrollbars. Have to update them anyway.
- gui_may_update_scrollbars();
-#endif
-
- if (oldwin != curwin)
- win_goto(oldwin);
-}
-
-/*
* "win_splitmove()" function
*/
void
f_win_splitmove(typval_T *argvars, typval_T *rettv)
{
- win_T *wp;
- win_T *targetwin;
+ win_T *wp, *targetwin;
+ win_T *oldwin = curwin;
int flags = 0, size = 0;
+ rettv->vval.v_number = -1;
+
if (in_vim9script()
&& (check_for_number_arg(argvars, 0) == FAIL
|| check_for_number_arg(argvars, 1) == FAIL
@@ -1020,7 +982,6 @@ f_win_splitmove(typval_T *argvars, typval_T *rettv)
|| win_valid_popup(wp) || win_valid_popup(targetwin))
{
emsg(_(e_invalid_window_number));
- rettv->vval.v_number = -1;
return;
}
@@ -1040,7 +1001,24 @@ f_win_splitmove(typval_T *argvars, typval_T *rettv)
size = (int)dict_get_number(d, "size");
}
- win_move_into_split(wp, targetwin, size, flags);
+ // Check if we're allowed to continue before we bother switching windows.
+ if (text_or_buf_locked() || check_split_disallowed(wp) == FAIL)
+ return;
+
+ if (curwin != targetwin)
+ win_goto(targetwin);
+
+ // Autocommands may have sent us elsewhere or closed "wp" or "oldwin".
+ if (curwin == targetwin && win_valid(wp))
+ {
+ if (win_splitmove(wp, size, flags) == OK)
+ rettv->vval.v_number = 0;
+ }
+ else
+ emsg(_(e_autocommands_caused_command_to_abort));
+
+ if (oldwin != curwin && win_valid(oldwin))
+ win_goto(oldwin);
}
/*
@@ -1076,7 +1054,7 @@ f_win_gettype(typval_T *argvars, typval_T *rettv)
else if (WIN_IS_POPUP(wp))
rettv->vval.v_string = vim_strsave((char_u *)"popup");
#endif
- else if (wp == curwin && cmdwin_type != 0)
+ else if (wp == cmdwin_win)
rettv->vval.v_string = vim_strsave((char_u *)"command");
#ifdef FEAT_QUICKFIX
else if (bt_quickfix(wp->w_buffer))
@@ -1373,13 +1351,8 @@ switch_win_noblock(
switchwin->sw_curtab = curtab;
if (no_display)
{
- curtab->tp_firstwin = firstwin;
- curtab->tp_lastwin = lastwin;
- curtab->tp_topframe = topframe;
- curtab = tp;
- firstwin = curtab->tp_firstwin;
- lastwin = curtab->tp_lastwin;
- topframe = curtab->tp_topframe;
+ unuse_tabpage(curtab);
+ use_tabpage(tp);
}
else
goto_tabpage_tp(tp, FALSE, FALSE);
@@ -1417,13 +1390,12 @@ restore_win_noblock(
{
if (no_display)
{
- curtab->tp_firstwin = firstwin;
- curtab->tp_lastwin = lastwin;
- curtab->tp_topframe = topframe;
- curtab = switchwin->sw_curtab;
- firstwin = curtab->tp_firstwin;
- lastwin = curtab->tp_lastwin;
- topframe = curtab->tp_topframe;
+ win_T *old_tp_curwin = curtab->tp_curwin;
+
+ unuse_tabpage(curtab);
+ // Don't change the curwin of the tabpage we temporarily visited.
+ curtab->tp_curwin = old_tp_curwin;
+ use_tabpage(switchwin->sw_curtab);
}
else
goto_tabpage_tp(switchwin->sw_curtab, FALSE, FALSE);
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index d8e891c..864f89d 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -323,7 +323,7 @@ sort_compare(const void *s1, const void *s2)
if (sort_nr)
{
if (l1.st_u.num.is_number != l2.st_u.num.is_number)
- result = l1.st_u.num.is_number - l2.st_u.num.is_number;
+ result = l1.st_u.num.is_number > l2.st_u.num.is_number ? 1 : -1;
else
result = l1.st_u.num.value == l2.st_u.num.value ? 0
: l1.st_u.num.value > l2.st_u.num.value ? 1 : -1;
@@ -489,7 +489,7 @@ ex_sort(exarg_T *eap)
for (lnum = eap->line1; lnum <= eap->line2; ++lnum)
{
s = ml_get(lnum);
- len = (int)STRLEN(s);
+ len = ml_get_len(lnum);
if (maxlen < len)
maxlen = len;
@@ -691,7 +691,7 @@ do_move(linenr_T line1, linenr_T line2, linenr_T dest)
return FAIL;
for (extra = 0, l = line1; l <= line2; l++)
{
- str = vim_strsave(ml_get(l + extra));
+ str = vim_strnsave(ml_get(l + extra), ml_get_len(l + extra));
if (str != NULL)
{
ml_append(dest + l - line1, str, (colnr_T)0, FALSE);
@@ -824,9 +824,9 @@ ex_copy(linenr_T line1, linenr_T line2, linenr_T n)
curwin->w_cursor.lnum = n;
while (line1 <= line2)
{
- // need to use vim_strsave() because the line will be unlocked within
+ // need to make a copy because the line will be unlocked within
// ml_append()
- p = vim_strsave(ml_get(line1));
+ p = vim_strnsave(ml_get(line1), ml_get_len(line1));
if (p != NULL)
{
ml_append(curwin->w_cursor.lnum, p, (colnr_T)0, FALSE);
@@ -2428,6 +2428,9 @@ getfile(
int retval;
char_u *free_me = NULL;
+ if (!check_can_set_curbuf_forceit(forceit))
+ return GETFILE_ERROR;
+
if (text_locked())
return GETFILE_ERROR;
if (curbuf_locked())
@@ -2782,9 +2785,16 @@ do_ecmd(
{
bufref_T save_au_new_curbuf;
int save_cmdwin_type = cmdwin_type;
+ win_T *save_cmdwin_win = cmdwin_win;
+
+ // Should only be possible to get here if the cmdwin is closed, or
+ // if it's opening and its buffer hasn't been set yet (the new
+ // buffer is for it).
+ assert(cmdwin_buf == NULL);
// BufLeave applies to the old buffer.
cmdwin_type = 0;
+ cmdwin_win = NULL;
/*
* Be careful: The autocommands may delete any buffer and change
@@ -2801,7 +2811,10 @@ do_ecmd(
save_au_new_curbuf = au_new_curbuf;
set_bufref(&au_new_curbuf, buf);
apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf);
+
cmdwin_type = save_cmdwin_type;
+ cmdwin_win = save_cmdwin_win;
+
if (!bufref_valid(&au_new_curbuf))
{
// new buffer has been deleted
@@ -4212,7 +4225,8 @@ ex_substitute(exarg_T *eap)
if (sub_firstline == NULL)
{
- sub_firstline = vim_strsave(ml_get(sub_firstlnum));
+ sub_firstline = vim_strnsave(ml_get(sub_firstlnum),
+ ml_get_len(sub_firstlnum));
if (sub_firstline == NULL)
{
vim_free(new_start);
@@ -4366,7 +4380,8 @@ ex_substitute(exarg_T *eap)
// really update the line, it would change
// what matches. Temporarily replace the line
// and change it back afterwards.
- orig_line = vim_strsave(ml_get(lnum));
+ orig_line = vim_strnsave(ml_get(lnum),
+ ml_get_len(lnum));
if (orig_line != NULL)
{
char_u *new_line = concat_str(new_start,
@@ -4712,7 +4727,8 @@ ex_substitute(exarg_T *eap)
{
sub_firstlnum += nmatch - 1;
vim_free(sub_firstline);
- sub_firstline = vim_strsave(ml_get(sub_firstlnum));
+ sub_firstline = vim_strnsave(ml_get(sub_firstlnum),
+ ml_get_len(sub_firstlnum));
// When going beyond the last line, stop substituting.
if (sub_firstlnum <= line2)
do_again = TRUE;
@@ -5425,8 +5441,7 @@ ex_smile(exarg_T *eap UNUSED)
/*
* ":drop"
- * Opens the first argument in a window. When there are two or more arguments
- * the argument list is redefined.
+ * Opens the first argument in a window, and the argument list is redefined.
*/
void
ex_drop(exarg_T *eap)
@@ -5463,6 +5478,8 @@ ex_drop(exarg_T *eap)
// edited in a window yet. It's like ":tab all" but without closing
// windows or tabs.
ex_all(eap);
+ cmdmod.cmod_tab = 0;
+ ex_rewind(eap);
return;
}
@@ -5486,6 +5503,8 @@ ex_drop(exarg_T *eap)
buf_check_timestamp(curbuf, FALSE);
curbuf->b_p_ar = save_ar;
}
+ if (curbuf->b_ml.ml_flags & ML_EMPTY)
+ ex_rewind(eap);
return;
}
}
diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index 4ae6cc2..bd26e81 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -521,7 +521,7 @@ EXCMD(CMD_doautoall, "doautoall", ex_doautoall,
EX_EXTRA|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
ADDR_NONE),
EXCMD(CMD_drop, "drop", ex_drop,
- EX_FILES|EX_CMDARG|EX_NEEDARG|EX_ARGOPT|EX_TRLBAR,
+ EX_BANG|EX_FILES|EX_CMDARG|EX_NEEDARG|EX_ARGOPT|EX_TRLBAR,
ADDR_NONE),
EXCMD(CMD_dsearch, "dsearch", ex_findpat,
EX_BANG|EX_RANGE|EX_DFLALL|EX_WHOLEFOLD|EX_EXTRA|EX_CMDWIN|EX_LOCK_OK,
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 0bde730..4a6f519 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -457,6 +457,36 @@ ex_listdo(exarg_T *eap)
tabpage_T *tp;
buf_T *buf = curbuf;
int next_fnum = 0;
+
+ if (curwin->w_p_wfb)
+ {
+ if ((eap->cmdidx == CMD_ldo || eap->cmdidx == CMD_lfdo) &&
+ !eap->forceit)
+ {
+ // Disallow :ldo if 'winfixbuf' is applied
+ emsg(_(e_winfixbuf_cannot_go_to_buffer));
+ return;
+ }
+
+ if (win_valid(prevwin) && !prevwin->w_p_wfb)
+ // 'winfixbuf' is set; attempt to change to a window without it.
+ win_goto(prevwin);
+ if (curwin->w_p_wfb)
+ {
+ // Split the window, which will be 'nowinfixbuf', and set curwin to
+ // that
+ (void)win_split(0, 0);
+
+ if (curwin->w_p_wfb)
+ {
+ // Autocommands set 'winfixbuf' or sent us to another window
+ // with it set, or we failed to split the window. Give up.
+ emsg(_(e_winfixbuf_cannot_go_to_buffer));
+ return;
+ }
+ }
+ }
+
#if defined(FEAT_SYN_HL)
char_u *save_ei = NULL;
#endif
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index c18a910..19b1d85 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -7164,6 +7164,9 @@ ex_resize(exarg_T *eap)
static void
ex_find(exarg_T *eap)
{
+ if (!check_can_set_curbuf_forceit(eap->forceit))
+ return;
+
char_u *fname;
int count;
char_u *file_to_find = NULL;
@@ -7245,6 +7248,14 @@ ex_open(exarg_T *eap)
static void
ex_edit(exarg_T *eap)
{
+ // Exclude commands which keep the window's current buffer
+ if (
+ eap->cmdidx != CMD_badd
+ && eap->cmdidx != CMD_balt
+ // All other commands must obey 'winfixbuf' / ! rules
+ && !check_can_set_curbuf_forceit(eap->forceit))
+ return;
+
do_exedit(eap, NULL);
}
@@ -9031,7 +9042,7 @@ ex_checkpath(exarg_T *eap)
{
find_pattern_in_path(NULL, 0, 0, FALSE, FALSE, CHECK_PATH, 1L,
eap->forceit ? ACTION_SHOW_ALL : ACTION_SHOW,
- (linenr_T)1, (linenr_T)MAXLNUM);
+ (linenr_T)1, (linenr_T)MAXLNUM, eap->forceit);
}
#if defined(FEAT_QUICKFIX)
@@ -9101,7 +9112,7 @@ ex_findpat(exarg_T *eap)
find_pattern_in_path(eap->arg, 0, (int)STRLEN(eap->arg),
whole, !eap->forceit,
*eap->cmd == 'd' ? FIND_DEFINE : FIND_ANY,
- n, action, eap->line1, eap->line2);
+ n, action, eap->line1, eap->line2, eap->forceit);
}
#endif
diff --git a/src/ex_getln.c b/src/ex_getln.c
index f2a960e..1731d29 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -4458,6 +4458,8 @@ open_cmdwin(void)
#ifdef FEAT_FOLDING
int save_KeyTyped;
#endif
+ int newbuf_status;
+ int cmdwin_valid;
// Can't do this when text or buffer is locked.
// Can't do this recursively. Can't do it when typing a password.
@@ -4491,25 +4493,50 @@ open_cmdwin(void)
ga_clear(&winsizes);
return K_IGNORE;
}
+ // win_split() autocommands may have messed with the old window or buffer.
+ // Treat it as abandoning this command-line.
+ if (!win_valid(old_curwin) || curwin == old_curwin
+ || !bufref_valid(&old_curbuf)
+ || old_curwin->w_buffer != old_curbuf.br_buf)
+ {
+ beep_flush();
+ ga_clear(&winsizes);
+ return Ctrl_C;
+ }
// Don't let quitting the More prompt make this fail.
got_int = FALSE;
- // Set "cmdwin_type" before any autocommands may mess things up.
+ // Set "cmdwin_..." variables before any autocommands may mess things up.
cmdwin_type = get_cmdline_type();
-
- // Create the command-line buffer empty.
- if (do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, NULL) == FAIL)
+ cmdwin_win = curwin;
+
+ // Create empty command-line buffer. Be especially cautious of BufLeave
+ // autocommands from do_ecmd(), as cmdwin restrictions do not apply to them!
+ newbuf_status = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE,
+ NULL);
+ cmdwin_valid = win_valid(cmdwin_win);
+ if (newbuf_status == FAIL || !cmdwin_valid || curwin != cmdwin_win ||
+ !win_valid(old_curwin) || !bufref_valid(&old_curbuf) ||
+ old_curwin->w_buffer != old_curbuf.br_buf)
{
- // Some autocommand messed it up?
- win_close(curwin, TRUE);
- ga_clear(&winsizes);
+ if (newbuf_status == OK)
+ set_bufref(&bufref, curbuf);
+ if (cmdwin_valid && !last_window())
+ win_close(cmdwin_win, TRUE);
+
+ // win_close() autocommands may have already deleted the buffer.
+ if (newbuf_status == OK && bufref_valid(&bufref) &&
+ bufref.br_buf != curbuf)
+ close_buffer(NULL, bufref.br_buf, DOBUF_WIPE, FALSE, FALSE);
+
cmdwin_type = 0;
+ cmdwin_win = NULL;
+ beep_flush();
+ ga_clear(&winsizes);
return Ctrl_C;
}
+ cmdwin_buf = curbuf;
- apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, curbuf);
- (void)setfname(curbuf, (char_u *)_("[Command Line]"), NULL, TRUE);
- apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf);
set_option_value_give_err((char_u *)"bt",
0L, (char_u *)"nofile", OPT_LOCAL);
curbuf->b_p_ma = TRUE;
@@ -4615,14 +4642,17 @@ open_cmdwin(void)
# endif
cmdwin_type = 0;
+ cmdwin_buf = NULL;
+ cmdwin_win = NULL;
exmode_active = save_exmode;
- // Safety check: The old window or buffer was deleted: It's a bug when
- // this happens!
- if (!win_valid(old_curwin) || !bufref_valid(&old_curbuf))
+ // Safety check: The old window or buffer was changed or deleted: It's a bug
+ // when this happens!
+ if (!win_valid(old_curwin) || !bufref_valid(&old_curbuf)
+ || old_curwin->w_buffer != old_curbuf.br_buf)
{
cmdwin_result = Ctrl_C;
- emsg(_(e_active_window_or_buffer_deleted));
+ emsg(_(e_active_window_or_buffer_changed_or_deleted));
}
else
{
diff --git a/src/fileio.c b/src/fileio.c
index 180fe39..53bfbea 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1246,7 +1246,7 @@ retry:
for (;;)
{
p = ml_get(read_buf_lnum) + read_buf_col;
- n = (int)STRLEN(p);
+ n = ml_get_len(read_buf_lnum) - read_buf_col;
if ((int)tlen + n + 1 > size)
{
// Filled up to "size", append partial line.
@@ -4489,8 +4489,14 @@ buf_reload(buf_T *buf, int orig_mode, int reload_options)
if (saved == OK)
{
+ int old_msg_silent = msg_silent;
+
curbuf->b_flags |= BF_CHECK_RO; // check for RO again
keep_filetype = TRUE; // don't detect 'filetype'
+
+ if (shortmess(SHM_FILEINFO))
+ msg_silent = 1;
+
if (readfile(buf->b_ffname, buf->b_fname, (linenr_T)0,
(linenr_T)0,
(linenr_T)MAXLNUM, &ea, flags) != OK)
@@ -4514,16 +4520,15 @@ buf_reload(buf_T *buf, int orig_mode, int reload_options)
// Mark the buffer as unmodified and free undo info.
unchanged(buf, TRUE, TRUE);
if ((flags & READ_KEEP_UNDO) == 0)
- {
- u_blockfree(buf);
- u_clearall(buf);
- }
+ u_clearallandblockfree(buf);
else
{
// Mark all undo states as changed.
u_unchanged(curbuf);
}
}
+
+ msg_silent = old_msg_silent;
}
vim_free(ea.cmd);
diff --git a/src/fold.c b/src/fold.c
index 5c41ed1..2cd4dcd 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -107,7 +107,7 @@ copyFoldingState(win_T *wp_from, win_T *wp_to)
// hasAnyFolding() {{{2
/*
- * Return TRUE if there may be folded lines in the current window.
+ * Return TRUE if there may be folded lines in window "win".
*/
int
hasAnyFolding(win_T *win)
@@ -551,7 +551,7 @@ checkCloseRec(garray_T *gap, linenr_T lnum, int level)
return retval;
}
-// foldCreateAllowed() {{{2
+// foldManualAllowed() {{{2
/*
* Return TRUE if it's allowed to manually create or delete a fold.
* Give an error message and return FALSE if not.
@@ -1061,7 +1061,6 @@ find_wl_entry(win_T *win, linenr_T lnum)
foldAdjustVisual(void)
{
pos_T *start, *end;
- char_u *ptr;
if (!VIsual_active || !hasAnyFolding(curwin))
return;
@@ -1082,8 +1081,7 @@ foldAdjustVisual(void)
if (!hasFolding(end->lnum, NULL, &end->lnum))
return;
- ptr = ml_get(end->lnum);
- end->col = (colnr_T)STRLEN(ptr);
+ end->col = ml_get_len(end->lnum);
if (end->col > 0 && *p_sel == 'o')
--end->col;
// prevent cursor from moving on the trail byte
@@ -1091,7 +1089,7 @@ foldAdjustVisual(void)
mb_adjust_cursor();
}
-// cursor_foldstart() {{{2
+// foldAdjustCursor() {{{2
/*
* Move the cursor to the first line of a closed fold.
*/
@@ -1799,7 +1797,7 @@ foldAddMarker(linenr_T lnum, char_u *marker, int markerlen)
// Allocate a new line: old-line + 'cms'-start + marker + 'cms'-end
line = ml_get(lnum);
- line_len = (int)STRLEN(line);
+ line_len = ml_get_len(lnum);
if (u_save(lnum - 1, lnum + 1) != OK)
return;
@@ -1887,7 +1885,7 @@ foldDelMarker(linenr_T lnum, char_u *marker, int markerlen)
if (u_save(lnum - 1, lnum + 1) == OK)
{
// Make new line: text-before-marker + text-after-marker
- newline = alloc(STRLEN(line) - len + 1);
+ newline = alloc(ml_get_len(lnum) - len + 1);
if (newline != NULL)
{
STRNCPY(newline, line, p - line);
diff --git a/src/getchar.c b/src/getchar.c
index 3427a9f..49a24f0 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1339,12 +1339,12 @@ gotchars(char_u *chars, int len)
}
/*
- * Record a <Nop> key.
+ * Record an <Ignore> key.
*/
void
-gotchars_nop(void)
+gotchars_ignore(void)
{
- char_u nop_buf[3] = { K_SPECIAL, KS_EXTRA, KE_NOP };
+ char_u nop_buf[3] = { K_SPECIAL, KS_EXTRA, KE_IGNORE };
gotchars(nop_buf, 3);
}
@@ -3666,9 +3666,9 @@ vgetorpeek(int advance)
#endif
if (timedout && c == ESC)
{
- // When recording there will be no timeout. Add a <Nop> after the ESC
- // to avoid that it forms a key code with following characters.
- gotchars_nop();
+ // When recording there will be no timeout. Add an <Ignore> after the
+ // ESC to avoid that it forms a key code with following characters.
+ gotchars_ignore();
}
--vgetc_busy;
diff --git a/src/globals.h b/src/globals.h
index b74ef35..f04f19d 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -976,7 +976,7 @@ EXTERN int clip_unnamed_saved INIT(= 0);
*/
EXTERN win_T *firstwin; // first window
EXTERN win_T *lastwin; // last window
-EXTERN win_T *prevwin INIT(= NULL); // previous window
+EXTERN win_T *prevwin INIT(= NULL); // previous window (may equal curwin)
#define ONE_WINDOW (firstwin == lastwin)
#define W_NEXT(wp) ((wp)->w_next)
@@ -1686,6 +1686,8 @@ EXTERN int km_startsel INIT(= FALSE);
EXTERN int cmdwin_type INIT(= 0); // type of cmdline window or 0
EXTERN int cmdwin_result INIT(= 0); // result of cmdline window or 0
+EXTERN buf_T *cmdwin_buf INIT(= NULL); // buffer of cmdline window or NULL
+EXTERN win_T *cmdwin_win INIT(= NULL); // window of cmdline window or NULL
EXTERN char_u no_lines_msg[] INIT(= N_("--No lines in buffer--"));
diff --git a/src/gui.c b/src/gui.c
index 16c1b54..1953691 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -455,8 +455,12 @@ gui_init_check(void)
gui.scrollbar_width = gui.scrollbar_height = SB_DEFAULT_WIDTH;
gui.prev_wrap = -1;
-#ifdef FEAT_GUI_GTK
- CLEAR_FIELD(gui.ligatures_map);
+#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)
+ // Note: gui_set_ligatures() might already have been called e.g. from .vimrc,
+ // and in that case we don't want to overwrite ligatures map that has already
+ // been correctly populated (as that would lead to a cleared ligatures maps).
+ if (*p_guiligatures == NUL)
+ CLEAR_FIELD(gui.ligatures_map);
#endif
#if defined(ALWAYS_USE_GUI) || defined(VIMDLL)
@@ -1064,7 +1068,7 @@ gui_get_wide_font(void)
return OK;
}
-#if defined(FEAT_GUI_GTK) || defined(PROTO)
+#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) || defined(PROTO)
/*
* Set list of ascii characters that combined can create ligature.
* Store them in char map for quick access from gui_gtk2_draw_string.
@@ -1589,8 +1593,11 @@ again:
// Only comparing Rows and Columns may be sufficient, but let's stay on
// the safe side.
if (gui.num_rows != screen_Rows || gui.num_cols != screen_Columns
- || gui.num_rows != Rows || gui.num_cols != Columns)
+ || gui.num_rows != Rows || gui.num_cols != Columns || gui.force_redraw)
+ {
shell_resized();
+ gui.force_redraw = 0;
+ }
#ifdef FEAT_GUI_HAIKU
vim_unlock_screen();
@@ -2688,7 +2695,7 @@ gui_undraw_cursor(void)
int startcol = gui.cursor_col > 0 ? gui.cursor_col - 1 : gui.cursor_col;
int endcol = gui.cursor_col;
-#ifdef FEAT_GUI_GTK
+#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)
gui_adjust_undraw_cursor_for_ligatures(&startcol, &endcol);
#endif
gui_redraw_block(gui.cursor_row, startcol,
@@ -3980,7 +3987,7 @@ gui_drag_scrollbar(scrollbar_T *sb, long value, int still_dragging)
if (hold_gui_events)
return;
- if (cmdwin_type != 0 && sb->wp != curwin)
+ if (cmdwin_type != 0 && sb->wp != cmdwin_win)
return;
if (still_dragging)
diff --git a/src/gui.h b/src/gui.h
index 0a1d274..f9fdd2d 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -176,7 +176,7 @@ typedef struct GuiScrollbar
// to reduce the count.
#endif
-#if FEAT_GUI_HAIKU
+#ifdef FEAT_GUI_HAIKU
VimScrollBar *id; // Pointer to real scroll bar
#endif
#ifdef FEAT_GUI_PHOTON
@@ -259,6 +259,7 @@ typedef struct Gui
int scrollbar_height; // Height of horizontal scrollbar
int left_sbar_x; // Calculated x coord for left scrollbar
int right_sbar_x; // Calculated x coord for right scrollbar
+ int force_redraw; // Force a redraw even e.g. not resized
#ifdef FEAT_MENU
# ifndef FEAT_GUI_GTK
@@ -388,10 +389,12 @@ typedef struct Gui
char_u *browse_fname; // file name from filedlg
guint32 event_time;
+#endif // FEAT_GUI_GTK
+#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)
char_u ligatures_map[256]; // ascii map for characters 0-255, value is
// 1 if in 'guiligatures'
-#endif // FEAT_GUI_GTK
+#endif
#if defined(FEAT_GUI_TABLINE) \
&& (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
diff --git a/src/gui_beval.c b/src/gui_beval.c
index ba8e32e..68b85ee 100644
--- a/src/gui_beval.c
+++ b/src/gui_beval.c
@@ -1011,6 +1011,7 @@ cancelBalloon(BalloonEval *beval)
createBalloonEvalWindow(BalloonEval *beval)
{
beval->balloonShell = gtk_window_new(GTK_WINDOW_POPUP);
+ gtk_window_set_transient_for(GTK_WINDOW(beval->balloonShell), GTK_WINDOW(gui.mainwin));
gtk_widget_set_app_paintable(beval->balloonShell, TRUE);
gtk_window_set_resizable(GTK_WINDOW(beval->balloonShell), FALSE);
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 87838b9..d4a8b93 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -116,6 +116,7 @@ enum
TARGET_TEXT,
TARGET_TEXT_URI_LIST,
TARGET_TEXT_PLAIN,
+ TARGET_TEXT_PLAIN_UTF8,
TARGET_VIM,
TARGET_VIMENC
};
@@ -132,7 +133,9 @@ static const GtkTargetEntry selection_targets[] =
{"UTF8_STRING", 0, TARGET_UTF8_STRING},
{"COMPOUND_TEXT", 0, TARGET_COMPOUND_TEXT},
{"TEXT", 0, TARGET_TEXT},
- {"STRING", 0, TARGET_STRING}
+ {"STRING", 0, TARGET_STRING},
+ {"text/plain;charset=utf-8", 0, TARGET_TEXT_PLAIN_UTF8},
+ {"text/plain", 0, TARGET_TEXT_PLAIN}
};
#define N_SELECTION_TARGETS ARRAY_LENGTH(selection_targets)
@@ -790,6 +793,36 @@ draw_event(GtkWidget *widget UNUSED,
return FALSE;
}
+
+# if GTK_CHECK_VERSION(3,10,0)
+ static gboolean
+scale_factor_event(GtkWidget *widget,
+ GParamSpec* pspec UNUSED,
+ gpointer user_data UNUSED)
+{
+ if (gui.surface != NULL)
+ cairo_surface_destroy(gui.surface);
+
+ int w, h;
+ gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h);
+ gui.surface = gdk_window_create_similar_surface(
+ gtk_widget_get_window(widget),
+ CAIRO_CONTENT_COLOR_ALPHA,
+ w, h);
+
+ int usable_height = h;
+ if (gtk_socket_id != 0)
+ usable_height -= (gui.char_height - (gui.char_height/2)); // sic.
+
+ gui_gtk_form_freeze(GTK_FORM(gui.formwin));
+ gui.force_redraw = 1;
+ gui_resize_shell(w, usable_height);
+ gui_gtk_form_thaw(GTK_FORM(gui.formwin));
+
+ return TRUE;
+}
+# endif // GTK_CHECK_VERSION(3,10,0)
+
#else // !GTK_CHECK_VERSION(3,0,0)
static gint
expose_event(GtkWidget *widget UNUSED,
@@ -1119,11 +1152,14 @@ modifiers_gdk2vim(guint state)
if (state & GDK_MOD1_MASK)
modifiers |= MOD_MASK_ALT;
#if GTK_CHECK_VERSION(2,10,0)
- if (state & GDK_SUPER_MASK)
+ if (state & GDK_META_MASK)
modifiers |= MOD_MASK_META;
-#endif
+ if (state & GDK_SUPER_MASK)
+ modifiers |= MOD_MASK_CMD;
+#else
if (state & GDK_MOD4_MASK)
- modifiers |= MOD_MASK_META;
+ modifiers |= MOD_MASK_CMD;
+#endif
return modifiers;
}
@@ -1528,6 +1564,8 @@ selection_get_cb(GtkWidget *widget UNUSED,
&& info != (guint)TARGET_VIMENC
&& info != (guint)TARGET_VIM
&& info != (guint)TARGET_COMPOUND_TEXT
+ && info != (guint)TARGET_TEXT_PLAIN
+ && info != (guint)TARGET_TEXT_PLAIN_UTF8
&& info != (guint)TARGET_TEXT)
return;
@@ -1659,11 +1697,12 @@ selection_get_cb(GtkWidget *widget UNUSED,
int
gui_mch_early_init_check(int give_message)
{
- char_u *p;
+ char_u *p, *q;
// Guess that when $DISPLAY isn't set the GUI can't start.
p = mch_getenv((char_u *)"DISPLAY");
- if (p == NULL || *p == NUL)
+ q = mch_getenv((char_u *)"WAYLAND_DISPLAY");
+ if ((p == NULL || *p == NUL) && (q == NULL || *q == NUL))
{
gui.dying = TRUE;
if (give_message)
@@ -1696,7 +1735,10 @@ gui_mch_init_check(void)
#if GTK_CHECK_VERSION(3,10,0)
// Vim currently assumes that Gtk means X11, so it cannot use native Gtk
// support for other backends such as Wayland.
- gdk_set_allowed_backends ("x11");
+ //
+ // Use an environment variable to enable unfinished Wayland support.
+ if (getenv("GVIM_ENABLE_WAYLAND") == NULL)
+ gdk_set_allowed_backends ("x11");
#endif
#ifdef FEAT_GUI_GNOME
@@ -2007,15 +2049,26 @@ button_press_event(GtkWidget *widget,
}
/*
- * GTK+ 2 abstracts scrolling via the GdkEventScroll.
+ * GTK+ abstracts scrolling via the GdkEventScroll.
*/
static gboolean
scroll_event(GtkWidget *widget,
GdkEventScroll *event,
gpointer data UNUSED)
{
- int button;
+ int button = 0; // silence gcc
int_u vim_modifiers;
+#if GTK_CHECK_VERSION(3,4,0)
+ static double acc_x, acc_y;
+#if !GTK_CHECK_VERSION(3,22,0)
+ static guint32 last_smooth_event_time;
+#endif
+#define DT_X11 1
+#define DT_WAYLAND 2
+ static int display_type;
+ if (!display_type)
+ display_type = gui_mch_get_display() ? DT_X11 : DT_WAYLAND;
+#endif
if (gtk_socket_id != 0 && !gtk_widget_has_focus(widget))
gtk_widget_grab_focus(widget);
@@ -2034,6 +2087,29 @@ scroll_event(GtkWidget *widget,
case GDK_SCROLL_RIGHT:
button = MOUSE_6;
break;
+#if GTK_CHECK_VERSION(3,4,0)
+ case GDK_SCROLL_SMOOTH:
+ if (event->is_stop)
+ {
+ acc_x = acc_y = 0;
+ // this event tells us to stop, without an actual moving
+ return FALSE;
+ }
+#if GTK_CHECK_VERSION(3,22,0)
+ if (gdk_device_get_axes(event->device) & GDK_AXIS_FLAG_WHEEL)
+ // this is from a wheel (as oppose to a touchpad / trackpoint)
+#else
+ if (event->time - last_smooth_event_time > 50)
+ // reset our accumulations after 50ms of silence
+#endif
+ acc_x = acc_y = 0;
+ acc_x += event->delta_x;
+ acc_y += event->delta_y;
+#if !GTK_CHECK_VERSION(3,22,0)
+ last_smooth_event_time = event->time;
+#endif
+ break;
+#endif
default: // This shouldn't happen
return FALSE;
}
@@ -2046,8 +2122,42 @@ scroll_event(GtkWidget *widget,
vim_modifiers = modifiers_gdk2mouse(event->state);
- gui_send_mouse_event(button, (int)event->x, (int)event->y,
- FALSE, vim_modifiers);
+#if GTK_CHECK_VERSION(3,4,0)
+ // on x11, despite not requested, when we copy into primary clipboard,
+ // we'll get smooth events. Unsmooth ones will also come along.
+ if (event->direction == GDK_SCROLL_SMOOTH && display_type == DT_WAYLAND)
+ {
+ while (acc_x >= 1.0)
+ { // right
+ acc_x = MAX(0.0, acc_x - 1.0);
+ gui_send_mouse_event(MOUSE_6, (int)event->x, (int)event->y,
+ FALSE, vim_modifiers);
+ }
+ while (acc_x <= -1.0)
+ { // left
+ acc_x = MIN(0.0, acc_x + 1.0);
+ gui_send_mouse_event(MOUSE_7, (int)event->x, (int)event->y,
+ FALSE, vim_modifiers);
+ }
+ while (acc_y >= 1.0)
+ { // down
+ acc_y = MAX(0.0, acc_y - 1.0);
+ gui_send_mouse_event(MOUSE_5, (int)event->x, (int)event->y,
+ FALSE, vim_modifiers);
+ }
+ while (acc_y <= -1.0)
+ { // up
+ acc_y = MIN(0.0, acc_y + 1.0);
+ gui_send_mouse_event(MOUSE_4, (int)event->x, (int)event->y,
+ FALSE, vim_modifiers);
+ }
+ }
+ else
+#undef DT_X11
+#undef DT_WAYLAND
+#endif
+ gui_send_mouse_event(button, (int)event->x, (int)event->y,
+ FALSE, vim_modifiers);
return TRUE;
}
@@ -2501,10 +2611,12 @@ setup_save_yourself(void)
// Fall back to old method
// first get the existing value
- GdkWindow * const mainwin_win = gtk_widget_get_window(gui.mainwin);
+ Display * dpy = gui_mch_get_display();
+ if (!dpy)
+ return;
- if (XGetWMProtocols(GDK_WINDOW_XDISPLAY(mainwin_win),
- GDK_WINDOW_XID(mainwin_win),
+ GdkWindow * const mainwin_win = gtk_widget_get_window(gui.mainwin);
+ if (XGetWMProtocols(dpy, GDK_WINDOW_XID(mainwin_win),
&existing_atoms, &count))
{
Atom *new_atoms;
@@ -2612,7 +2724,10 @@ mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED)
// When started with "--echo-wid" argument, write window ID on stdout.
if (echo_wid_arg)
{
- printf("WID: %ld\n", (long)GDK_WINDOW_XID(mainwin_win));
+ if (gui_mch_get_display())
+ printf("WID: %ld\n", (long)GDK_WINDOW_XID(mainwin_win));
+ else
+ printf("WID: 0\n");
fflush(stdout);
}
@@ -2647,27 +2762,30 @@ mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED)
setup_save_yourself();
#ifdef FEAT_CLIENTSERVER
- if (serverName == NULL && serverDelayedStartName != NULL)
+ if (gui_mch_get_display())
{
- // This is a :gui command in a plain vim with no previous server
- commWindow = GDK_WINDOW_XID(mainwin_win);
+ if (serverName == NULL && serverDelayedStartName != NULL)
+ {
+ // This is a :gui command in a plain vim with no previous server
+ commWindow = GDK_WINDOW_XID(mainwin_win);
- (void)serverRegisterName(GDK_WINDOW_XDISPLAY(mainwin_win),
- serverDelayedStartName);
- }
- else
- {
- /*
- * Cannot handle "XLib-only" windows with gtk event routines, we'll
- * have to change the "server" registration to that of the main window
- * If we have not registered a name yet, remember the window.
- */
- serverChangeRegisteredWindow(GDK_WINDOW_XDISPLAY(mainwin_win),
- GDK_WINDOW_XID(mainwin_win));
+ (void)serverRegisterName(GDK_WINDOW_XDISPLAY(mainwin_win),
+ serverDelayedStartName);
+ }
+ else
+ {
+ /*
+ * Cannot handle "XLib-only" windows with gtk event routines, we'll
+ * have to change the "server" registration to that of the main window
+ * If we have not registered a name yet, remember the window.
+ */
+ serverChangeRegisteredWindow(GDK_WINDOW_XDISPLAY(mainwin_win),
+ GDK_WINDOW_XID(mainwin_win));
+ }
+ gtk_widget_add_events(gui.mainwin, GDK_PROPERTY_CHANGE_MASK);
+ g_signal_connect(G_OBJECT(gui.mainwin), "property-notify-event",
+ G_CALLBACK(property_event), NULL);
}
- gtk_widget_add_events(gui.mainwin, GDK_PROPERTY_CHANGE_MASK);
- g_signal_connect(G_OBJECT(gui.mainwin), "property-notify-event",
- G_CALLBACK(property_event), NULL);
#endif
}
@@ -3533,30 +3651,28 @@ gui_mch_set_curtab(int nr)
* Add selection targets for PRIMARY and CLIPBOARD selections.
*/
void
-gui_gtk_set_selection_targets(void)
+gui_gtk_set_selection_targets(GdkAtom selection)
{
int i, j = 0;
- int n_targets = N_SELECTION_TARGETS;
- GtkTargetEntry targets[N_SELECTION_TARGETS];
+ static int n_targets = N_SELECTION_TARGETS;
+ static GtkTargetEntry targets[N_SELECTION_TARGETS];
- for (i = 0; i < (int)N_SELECTION_TARGETS; ++i)
+ if (targets[0].target == NULL)
{
- // OpenOffice tries to use TARGET_HTML and fails when we don't
- // return something, instead of trying another target. Therefore only
- // offer TARGET_HTML when it works.
- if (!clip_html && selection_targets[i].info == TARGET_HTML)
- n_targets--;
- else
- targets[j++] = selection_targets[i];
+ for (i = 0; i < (int)N_SELECTION_TARGETS; ++i)
+ {
+ // OpenOffice tries to use TARGET_HTML and fails when we don't
+ // return something, instead of trying another target. Therefore only
+ // offer TARGET_HTML when it works.
+ if (!clip_html && selection_targets[i].info == TARGET_HTML)
+ n_targets--;
+ else
+ targets[j++] = selection_targets[i];
+ }
}
- gtk_selection_clear_targets(gui.drawarea, (GdkAtom)GDK_SELECTION_PRIMARY);
- gtk_selection_clear_targets(gui.drawarea, (GdkAtom)clip_plus.gtk_sel_atom);
- gtk_selection_add_targets(gui.drawarea,
- (GdkAtom)GDK_SELECTION_PRIMARY,
- targets, n_targets);
- gtk_selection_add_targets(gui.drawarea,
- (GdkAtom)clip_plus.gtk_sel_atom,
+ gtk_selection_clear_targets(gui.drawarea, selection);
+ gtk_selection_add_targets(gui.drawarea, selection,
targets, n_targets);
}
@@ -3906,17 +4022,37 @@ gui_mch_init(void)
#endif
// Determine which events we will filter.
- gtk_widget_set_events(gui.drawarea,
- GDK_EXPOSURE_MASK |
- GDK_ENTER_NOTIFY_MASK |
- GDK_LEAVE_NOTIFY_MASK |
- GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_SCROLL_MASK |
- GDK_KEY_PRESS_MASK |
- GDK_KEY_RELEASE_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK);
+ gint event_mask =
+ GDK_EXPOSURE_MASK |
+ GDK_ENTER_NOTIFY_MASK |
+ GDK_LEAVE_NOTIFY_MASK |
+ GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_RELEASE_MASK |
+ GDK_KEY_PRESS_MASK |
+ GDK_KEY_RELEASE_MASK |
+ GDK_POINTER_MOTION_MASK |
+ GDK_POINTER_MOTION_HINT_MASK;
+#if GTK_CHECK_VERSION(3,4,0)
+ if (GDK_IS_X11_DISPLAY(gdk_display_get_default()))
+ {
+ // for X11, if we were using smooth scroll events, we
+ // would get an scroll without deltas on the very first user scroll* and
+ // get both "unsmooth" scroll and smooth scroll events after
+ // copying into the primary selection
+ //
+ // *: https://bugzilla.gnome.org/show_bug.cgi?id=675959
+ event_mask |= GDK_SCROLL_MASK;
+ }
+ else
+ {
+ // for Wayland, touchpads don't generate "unsmooth" scroll events. Both
+ // touchpads and wheels generate smooth scroll events expectedly.
+ event_mask |= GDK_SMOOTH_SCROLL_MASK;
+ }
+#else
+ event_mask |= GDK_SCROLL_MASK;
+#endif
+ gtk_widget_set_events(gui.drawarea, event_mask);
gtk_widget_show(gui.drawarea);
gui_gtk_form_put(GTK_FORM(gui.formwin), gui.drawarea, 0, 0);
@@ -4032,20 +4168,7 @@ gui_mch_init(void)
g_signal_connect(G_OBJECT(gui.drawarea), "button-release-event",
G_CALLBACK(button_release_event), NULL);
g_signal_connect(G_OBJECT(gui.drawarea), "scroll-event",
- G_CALLBACK(&scroll_event), NULL);
-
- /*
- * Add selection handler functions.
- */
- g_signal_connect(G_OBJECT(gui.drawarea), "selection-clear-event",
- G_CALLBACK(selection_clear_event), NULL);
- g_signal_connect(G_OBJECT(gui.drawarea), "selection-received",
- G_CALLBACK(selection_received_cb), NULL);
-
- gui_gtk_set_selection_targets();
-
- g_signal_connect(G_OBJECT(gui.drawarea), "selection-get",
- G_CALLBACK(selection_get_cb), NULL);
+ G_CALLBACK(scroll_event), NULL);
// Pretend we don't have input focus, we will get an event if we do.
gui.in_focus = FALSE;
@@ -4527,6 +4650,10 @@ gui_mch_open(void)
#endif
g_signal_connect(G_OBJECT(gui.formwin), "configure-event",
G_CALLBACK(form_configure_event), NULL);
+#if GTK_CHECK_VERSION(3,10,0)
+ g_signal_connect(G_OBJECT(gui.formwin), "notify::scale-factor",
+ G_CALLBACK(scale_factor_event), NULL);
+#endif
#ifdef FEAT_DND
// Set up for receiving DND items.
@@ -4579,6 +4706,17 @@ gui_mch_open(void)
#endif
}
+ /*
+ * Add selection handler functions.
+ */
+ g_signal_connect(G_OBJECT(gui.drawarea), "selection-clear-event",
+ G_CALLBACK(selection_clear_event), NULL);
+ g_signal_connect(G_OBJECT(gui.drawarea), "selection-received",
+ G_CALLBACK(selection_received_cb), NULL);
+
+ g_signal_connect(G_OBJECT(gui.drawarea), "selection-get",
+ G_CALLBACK(selection_get_cb), NULL);
+
return OK;
}
@@ -4599,8 +4737,12 @@ gui_mch_exit(int rc UNUSED)
int
gui_mch_get_winpos(int *x, int *y)
{
- gtk_window_get_position(GTK_WINDOW(gui.mainwin), x, y);
- return OK;
+ if (gui_mch_get_display())
+ {
+ gtk_window_get_position(GTK_WINDOW(gui.mainwin), x, y);
+ return OK;
+ }
+ return FAIL;
}
/*
@@ -6225,9 +6367,10 @@ gui_mch_haskey(char_u *name)
int
gui_get_x11_windis(Window *win, Display **dis)
{
- if (gui.mainwin != NULL && gtk_widget_get_window(gui.mainwin) != NULL)
+ Display * dpy = gui_mch_get_display();
+ if (dpy)
{
- *dis = GDK_WINDOW_XDISPLAY(gtk_widget_get_window(gui.mainwin));
+ *dis = dpy;
*win = GDK_WINDOW_XID(gtk_widget_get_window(gui.mainwin));
return OK;
}
@@ -6238,18 +6381,18 @@ gui_get_x11_windis(Window *win, Display **dis)
}
#endif
-#if defined(FEAT_CLIENTSERVER) \
- || (defined(FEAT_X11) && defined(FEAT_CLIPBOARD)) || defined(PROTO)
-
Display *
gui_mch_get_display(void)
{
- if (gui.mainwin != NULL && gtk_widget_get_window(gui.mainwin) != NULL)
+ if (gui.mainwin != NULL && gtk_widget_get_window(gui.mainwin) != NULL
+#if GTK_CHECK_VERSION(3,0,0)
+ && GDK_IS_X11_DISPLAY(gtk_widget_get_display(gui.mainwin))
+#endif
+ )
return GDK_WINDOW_XDISPLAY(gtk_widget_get_window(gui.mainwin));
else
return NULL;
}
-#endif
void
gui_mch_beep(void)
@@ -6911,9 +7054,10 @@ clip_mch_request_selection(Clipboard_T *cbd)
return;
}
- // Final fallback position - use the X CUT_BUFFER0 store
- yank_cut_buffer0(GDK_WINDOW_XDISPLAY(gtk_widget_get_window(gui.mainwin)),
- cbd);
+ if (gui_mch_get_display())
+ // Final fallback position - use the X CUT_BUFFER0 store
+ yank_cut_buffer0(GDK_WINDOW_XDISPLAY(gtk_widget_get_window(gui.mainwin)),
+ cbd);
}
/*
@@ -6935,10 +7079,18 @@ clip_mch_lose_selection(Clipboard_T *cbd UNUSED)
int
clip_mch_own_selection(Clipboard_T *cbd)
{
+ // If we're blocking autocmds, we are filling the register to offer the
+ // selection (inside selection-get)
+ if (is_autocmd_blocked())
+ return OK;
+
int success;
success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom,
gui.event_time);
+ // don't update on every visual selection change
+ if (!(cbd->owned && VIsual_active))
+ gui_gtk_set_selection_targets(cbd->gtk_sel_atom);
gui_mch_update();
return (success) ? OK : FAIL;
}
@@ -7071,9 +7223,11 @@ gui_mch_setmouse(int x, int y)
// Sorry for the Xlib call, but we can't avoid it, since there is no
// internal GDK mechanism present to accomplish this. (and for good
// reason...)
- XWarpPointer(GDK_WINDOW_XDISPLAY(gtk_widget_get_window(gui.drawarea)),
- (Window)0, GDK_WINDOW_XID(gtk_widget_get_window(gui.drawarea)),
- 0, 0, 0U, 0U, x, y);
+ Display * dpy = gui_mch_get_display();
+ if (dpy)
+ XWarpPointer(dpy, (Window)0,
+ GDK_WINDOW_XID(gtk_widget_get_window(gui.drawarea)),
+ 0, 0, 0U, 0U, x, y);
}
diff --git a/src/gui_w32.c b/src/gui_w32.c
index eb4c841..f628dd6 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -50,6 +50,86 @@ static int gui_mswin_get_menu_height(int fix_window);
# define gui_mswin_get_menu_height(fix_window) 0
#endif
+typedef struct keycode_trans_strategy {
+ void (*ptr_on_char) (HWND /*hwnd UNUSED*/, UINT /*cch*/, int /*cRepeat UNUSED*/);
+ void (*ptr_on_sys_char) (HWND /*hwnd UNUSED*/, UINT /*cch*/, int /*cRepeat UNUSED*/);
+ void (*ptr_process_message_usual_key) (UINT /*vk*/, const MSG* /*pmsg*/);
+ int (*ptr_get_active_modifiers)(void);
+ int (*is_experimental)(void);
+} keycode_trans_strategy;
+
+// forward declarations for input instance initializer
+static void _OnChar_experimental(HWND /*hwnd UNUSED*/, UINT /*cch*/, int /*cRepeat UNUSED*/);
+static void _OnSysChar_experimental(HWND /*hwnd UNUSED*/, UINT /*cch*/, int /*cRepeat UNUSED*/);
+static void process_message_usual_key_experimental(UINT /*vk*/, const MSG* /*pmsg*/);
+static int get_active_modifiers_experimental(void);
+static int is_experimental_true(void);
+
+keycode_trans_strategy keycode_trans_strategy_experimental = {
+ _OnChar_experimental // ptr_on_char
+ , _OnSysChar_experimental // ptr_on_sys_char
+ , process_message_usual_key_experimental // ptr_process_message_usual_key
+ , get_active_modifiers_experimental
+ , is_experimental_true
+};
+
+// forward declarations for input instance initializer
+static void _OnChar_classic(HWND /*hwnd UNUSED*/, UINT /*cch*/, int /*cRepeat UNUSED*/);
+static void _OnSysChar_classic(HWND /*hwnd UNUSED*/, UINT /*cch*/, int /*cRepeat UNUSED*/);
+static void process_message_usual_key_classic(UINT /*vk*/, const MSG* /*pmsg*/);
+static int get_active_modifiers_classic(void);
+static int is_experimental_false(void);
+
+keycode_trans_strategy keycode_trans_strategy_classic = {
+ _OnChar_classic // ptr_on_char
+ , _OnSysChar_classic // ptr_on_sys_char
+ , process_message_usual_key_classic // ptr_process_message_usual_key
+ , get_active_modifiers_classic
+ , is_experimental_false
+};
+
+keycode_trans_strategy *keycode_trans_strategy_used = NULL;
+
+static int is_experimental_true(void)
+{
+ return 1;
+}
+
+static int is_experimental_false(void)
+{
+ return 0;
+}
+
+/*
+ * Initialize the keycode translation strategy.
+ */
+static void keycode_trans_strategy_init(void)
+{
+ const char *strategy = NULL;
+
+ // set default value as fallback
+ keycode_trans_strategy_used = &keycode_trans_strategy_classic;
+
+ strategy = getenv("VIM_KEYCODE_TRANS_STRATEGY");
+ if (strategy == NULL)
+ {
+ return;
+ }
+
+ if (STRICMP(strategy, "classic") == 0)
+ {
+ keycode_trans_strategy_used = &keycode_trans_strategy_classic;
+ return;
+ }
+
+ if (STRICMP(strategy, "experimental") == 0)
+ {
+ keycode_trans_strategy_used = &keycode_trans_strategy_experimental;
+ return;
+ }
+
+}
+
#if defined(FEAT_RENDER_OPTIONS) || defined(PROTO)
int
gui_mch_set_rendering_options(char_u *s)
@@ -392,16 +472,6 @@ static int (WINAPI *pGetSystemMetricsForDpi)(int, UINT) = NULL;
static DPI_AWARENESS_CONTEXT (WINAPI *pSetThreadDpiAwarenessContext)(DPI_AWARENESS_CONTEXT dpiContext) = NULL;
static DPI_AWARENESS (WINAPI *pGetAwarenessFromDpiAwarenessContext)(DPI_AWARENESS_CONTEXT) = NULL;
- static UINT WINAPI
-stubGetDpiForSystem(void)
-{
- HWND hwnd = GetDesktopWindow();
- HDC hdc = GetWindowDC(hwnd);
- UINT dpi = GetDeviceCaps(hdc, LOGPIXELSY);
- ReleaseDC(hwnd, hdc);
- return dpi;
-}
-
static int WINAPI
stubGetSystemMetricsForDpi(int nIndex, UINT dpi UNUSED)
{
@@ -744,7 +814,7 @@ _OnDeadChar(
UINT ch UNUSED,
int cRepeat UNUSED)
{
- dead_key = 1;
+ dead_key = DEAD_KEY_SET_DEFAULT;
}
/*
@@ -841,8 +911,17 @@ char_to_string(int ch, char_u *string, int slen, int had_alt)
return len;
}
+/*
+ * Experimental implementation, introduced in v8.2.4807
+ * "processing key event in Win32 GUI is not ideal"
+ *
+ * TODO: since introduction, this experimental function started
+ * to be used as well outside of original key press/processing
+ * area, and usages not via "get_active_modifiers_via_ptr" should
+ * be watched.
+ */
static int
-get_active_modifiers(void)
+get_active_modifiers_experimental(void)
{
int modifiers = 0;
@@ -869,6 +948,46 @@ get_active_modifiers(void)
}
/*
+ * "Classic" implementation, existing prior to v8.2.4807
+ */
+ static int
+get_active_modifiers_classic(void)
+{
+ int modifiers = 0;
+
+ if (GetKeyState(VK_SHIFT) & 0x8000)
+ modifiers |= MOD_MASK_SHIFT;
+ /*
+ * Don't use caps-lock as shift, because these are special keys
+ * being considered here, and we only want letters to get
+ * shifted -- webb
+ */
+ /*
+ if (GetKeyState(VK_CAPITAL) & 0x0001)
+ modifiers ^= MOD_MASK_SHIFT;
+ */
+ if (GetKeyState(VK_CONTROL) & 0x8000)
+ modifiers |= MOD_MASK_CTRL;
+ if (GetKeyState(VK_MENU) & 0x8000)
+ modifiers |= MOD_MASK_ALT;
+
+ return modifiers;
+}
+
+ static int
+get_active_modifiers(void)
+{
+ return get_active_modifiers_experimental();
+}
+
+ static int
+get_active_modifiers_via_ptr(void)
+{
+ // marshal to corresponding implementation
+ return keycode_trans_strategy_used->ptr_get_active_modifiers();
+}
+
+/*
* Key hit, add it to the input buffer.
*/
static void
@@ -877,6 +996,20 @@ _OnChar(
UINT cch,
int cRepeat UNUSED)
{
+ // marshal to corresponding implementation
+ keycode_trans_strategy_used->ptr_on_char(hwnd, cch, cRepeat);
+}
+
+/*
+ * Experimental implementation, introduced in v8.2.4807
+ * "processing key event in Win32 GUI is not ideal"
+ */
+ static void
+_OnChar_experimental(
+ HWND hwnd UNUSED,
+ UINT cch,
+ int cRepeat UNUSED)
+{
char_u string[40];
int len = 0;
int modifiers;
@@ -890,7 +1023,7 @@ _OnChar(
if (dead_key != DEAD_KEY_TRANSIENT_IN_ON_CHAR)
dead_key = DEAD_KEY_OFF;
- modifiers = get_active_modifiers();
+ modifiers = get_active_modifiers_experimental();
ch = simplify_key(ch, &modifiers);
@@ -927,6 +1060,30 @@ _OnChar(
}
/*
+ * "Classic" implementation, existing prior to v8.2.4807
+ */
+ static void
+_OnChar_classic(
+ HWND hwnd UNUSED,
+ UINT ch,
+ int cRepeat UNUSED)
+{
+ char_u string[40];
+ int len = 0;
+
+ dead_key = 0;
+
+ len = char_to_string(ch, string, 40, FALSE);
+ if (len == 1 && string[0] == Ctrl_C && ctrl_c_interrupts)
+ {
+ trash_input_buf();
+ got_int = TRUE;
+ }
+
+ add_to_input_buf(string, len);
+}
+
+/*
* Alt-Key hit, add it to the input buffer.
*/
static void
@@ -935,6 +1092,20 @@ _OnSysChar(
UINT cch,
int cRepeat UNUSED)
{
+ // marshal to corresponding implementation
+ keycode_trans_strategy_used->ptr_on_sys_char(hwnd, cch, cRepeat);
+}
+
+/*
+ * Experimental implementation, introduced in v8.2.4807
+ * "processing key event in Win32 GUI is not ideal"
+ */
+ static void
+_OnSysChar_experimental(
+ HWND hwnd UNUSED,
+ UINT cch,
+ int cRepeat UNUSED)
+{
char_u string[40]; // Enough for multibyte character
int len;
int modifiers;
@@ -946,7 +1117,69 @@ _OnSysChar(
// ALT key pressed. Eg, if the user presses Alt-A, then ch == 'A'. Note
// that the system distinguishes Alt-a and Alt-A (Alt-Shift-a unless
// CAPSLOCK is pressed) at this point.
- modifiers = get_active_modifiers();
+ modifiers = get_active_modifiers_experimental();
+ ch = simplify_key(ch, &modifiers);
+ // remove the SHIFT modifier for keys where it's already included, e.g.,
+ // '(' and '*'
+ modifiers = may_remove_shift_modifier(modifiers, ch);
+
+ // Unify modifiers somewhat. No longer use ALT to set the 8th bit.
+ ch = extract_modifiers(ch, &modifiers, FALSE, NULL);
+ if (ch == CSI)
+ ch = K_CSI;
+
+ len = 0;
+ if (modifiers)
+ {
+ string[len++] = CSI;
+ string[len++] = KS_MODIFIER;
+ string[len++] = modifiers;
+ }
+
+ if (IS_SPECIAL((int)ch))
+ {
+ string[len++] = CSI;
+ string[len++] = K_SECOND((int)ch);
+ string[len++] = K_THIRD((int)ch);
+ }
+ else
+ {
+ // Although the documentation isn't clear about it, we assume "ch" is
+ // a Unicode character.
+ len += char_to_string(ch, string + len, 40 - len, TRUE);
+ }
+
+ add_to_input_buf(string, len);
+}
+
+/*
+ * "Classic" implementation, existing prior to v8.2.4807
+ */
+ static void
+_OnSysChar_classic(
+ HWND hwnd UNUSED,
+ UINT cch,
+ int cRepeat UNUSED)
+{
+ char_u string[40]; // Enough for multibyte character
+ int len;
+ int modifiers;
+ int ch = cch; // special keys are negative
+
+ dead_key = 0;
+
+ // TRACE("OnSysChar(%d, %c)\n", ch, ch);
+
+ // OK, we have a character key (given by ch) which was entered with the
+ // ALT key pressed. Eg, if the user presses Alt-A, then ch == 'A'. Note
+ // that the system distinguishes Alt-a and Alt-A (Alt-Shift-a unless
+ // CAPSLOCK is pressed) at this point.
+ modifiers = MOD_MASK_ALT;
+ if (GetKeyState(VK_SHIFT) & 0x8000)
+ modifiers |= MOD_MASK_SHIFT;
+ if (GetKeyState(VK_CONTROL) & 0x8000)
+ modifiers |= MOD_MASK_CTRL;
+
ch = simplify_key(ch, &modifiers);
// remove the SHIFT modifier for keys where it's already included, e.g.,
// '(' and '*'
@@ -1915,6 +2148,137 @@ outputDeadKey_rePost(MSG originalMsg)
}
/*
+ * Refactored out part of process_message(), responsible for
+ * handling the case of "not a special key"
+ */
+static void process_message_usual_key(UINT vk, const MSG *pmsg)
+{
+ // marshal to corresponding implementation
+ keycode_trans_strategy_used->ptr_process_message_usual_key(vk, pmsg);
+}
+
+/*
+ * Experimental implementation, introduced in v8.2.4807
+ * "processing key event in Win32 GUI is not ideal"
+ */
+static void process_message_usual_key_experimental(UINT vk, const MSG *pmsg)
+{
+ WCHAR ch[8];
+ int len;
+ int i;
+ UINT scan_code;
+ BYTE keyboard_state[256];
+
+ // Construct the state table with only a few modifiers, we don't
+ // really care about the presence of Ctrl/Alt as those modifiers are
+ // handled by Vim separately.
+ memset(keyboard_state, 0, 256);
+ if (GetKeyState(VK_SHIFT) & 0x8000)
+ keyboard_state[VK_SHIFT] = 0x80;
+ if (GetKeyState(VK_CAPITAL) & 0x0001)
+ keyboard_state[VK_CAPITAL] = 0x01;
+ // Alt-Gr is synthesized as Alt + Ctrl.
+ if ((GetKeyState(VK_RMENU) & 0x8000)
+ && (GetKeyState(VK_CONTROL) & 0x8000))
+ {
+ keyboard_state[VK_MENU] = 0x80;
+ keyboard_state[VK_CONTROL] = 0x80;
+ }
+
+ // Translate the virtual key according to the current keyboard
+ // layout.
+ scan_code = MapVirtualKey(vk, MAPVK_VK_TO_VSC);
+ // Convert the scan-code into a sequence of zero or more unicode
+ // codepoints.
+ // If this is a dead key ToUnicode returns a negative value.
+ len = ToUnicode(vk, scan_code, keyboard_state, ch, ARRAY_LENGTH(ch),
+ 0);
+ if (len < 0)
+ dead_key = DEAD_KEY_SET_DEFAULT;
+
+ if (len <= 0)
+ {
+ int wm_char = NUL;
+
+ if (dead_key == DEAD_KEY_SET_DEFAULT
+ && (GetKeyState(VK_CONTROL) & 0x8000))
+ {
+ if ( // AZERTY CTRL+dead_circumflex
+ (vk == 221 && scan_code == 26)
+ // QWERTZ CTRL+dead_circumflex
+ || (vk == 220 && scan_code == 41))
+ wm_char = '[';
+ if ( // QWERTZ CTRL+dead_two-overdots
+ (vk == 192 && scan_code == 27))
+ wm_char = ']';
+ }
+ if (wm_char != NUL)
+ {
+ // post WM_CHAR='[' - which will be interpreted with CTRL
+ // still hold as ESC
+ PostMessageW(pmsg->hwnd, WM_CHAR, wm_char, pmsg->lParam);
+ // ask _OnChar() to not touch this state, wait for next key
+ // press and maintain knowledge that we are "poisoned" with
+ // "dead state"
+ dead_key = DEAD_KEY_TRANSIENT_IN_ON_CHAR;
+ }
+ return;
+ }
+
+ // Post the message as TranslateMessage would do.
+ if (pmsg->message == WM_KEYDOWN)
+ {
+ for (i = 0; i < len; i++)
+ PostMessageW(pmsg->hwnd, WM_CHAR, ch[i], pmsg->lParam);
+ }
+ else
+ {
+ for (i = 0; i < len; i++)
+ PostMessageW(pmsg->hwnd, WM_SYSCHAR, ch[i], pmsg->lParam);
+ }
+}
+
+/*
+ * "Classic" implementation, existing prior to v8.2.4807
+ */
+static void process_message_usual_key_classic(UINT vk, const MSG *pmsg)
+{
+ char_u string[40];
+
+ // Some keys need C-S- where they should only need C-.
+ // Ignore 0xff, Windows XP sends it when NUMLOCK has changed since
+ // system startup (Helmut Stiegler, 2003 Oct 3).
+ if (vk != 0xff
+ && (GetKeyState(VK_CONTROL) & 0x8000)
+ && !(GetKeyState(VK_SHIFT) & 0x8000)
+ && !(GetKeyState(VK_MENU) & 0x8000))
+ {
+ // CTRL-6 is '^'; Japanese keyboard maps '^' to vk == 0xDE
+ if (vk == '6' || MapVirtualKey(vk, 2) == (UINT)'^')
+ {
+ string[0] = Ctrl_HAT;
+ add_to_input_buf(string, 1);
+ }
+ // vk == 0xBD AZERTY for CTRL-'-', but CTRL-[ for * QWERTY!
+ else if (vk == 0xBD) // QWERTY for CTRL-'-'
+ {
+ string[0] = Ctrl__;
+ add_to_input_buf(string, 1);
+ }
+ // CTRL-2 is '@'; Japanese keyboard maps '@' to vk == 0xC0
+ else if (vk == '2' || MapVirtualKey(vk, 2) == (UINT)'@')
+ {
+ string[0] = Ctrl_AT;
+ add_to_input_buf(string, 1);
+ }
+ else
+ TranslateMessage(pmsg);
+ }
+ else
+ TranslateMessage(pmsg);
+}
+
+/*
* Process a single Windows message.
* If one is not available we hang until one is.
*/
@@ -1930,7 +2294,14 @@ process_message(void)
#ifdef FEAT_MENU
static char_u k10[] = {K_SPECIAL, 'k', ';', 0};
#endif
- BYTE keyboard_state[256];
+ static int keycode_trans_strategy_initialized = 0;
+
+ // lazy initialize - first time only
+ if (!keycode_trans_strategy_initialized)
+ {
+ keycode_trans_strategy_initialized = 1;
+ keycode_trans_strategy_init();
+ }
GetMessageW(&msg, NULL, 0, 0);
@@ -1990,8 +2361,11 @@ process_message(void)
* We are at the moment after WM_CHAR with DEAD_KEY_SKIP_ON_CHAR event
* was handled by _WndProc, this keypress we want to process normally
*/
- if (dead_key == DEAD_KEY_SKIP_ON_CHAR)
+ if (keycode_trans_strategy_used->is_experimental()
+ && dead_key == DEAD_KEY_SKIP_ON_CHAR)
+ {
dead_key = DEAD_KEY_OFF;
+ }
if (dead_key != DEAD_KEY_OFF)
{
@@ -2013,7 +2387,8 @@ process_message(void)
* outputDeadKey_rePost() since we do not wish to reset dead_key
* value.
*/
- if (dead_key == DEAD_KEY_TRANSIENT_IN_ON_CHAR)
+ if (keycode_trans_strategy_used->is_experimental() &&
+ dead_key == DEAD_KEY_TRANSIENT_IN_ON_CHAR)
{
outputDeadKey_rePost_Ex(msg,
/*dead_key2set=*/DEAD_KEY_SKIP_ON_CHAR);
@@ -2100,7 +2475,7 @@ process_message(void)
NULL, NULL) == NULL)
break;
#endif
- modifiers = get_active_modifiers();
+ modifiers = get_active_modifiers_via_ptr();
if (special_keys[i].vim_code1 == NUL)
key = special_keys[i].vim_code0;
@@ -2141,78 +2516,7 @@ process_message(void)
// Not a special key.
if (special_keys[i].key_sym == 0)
{
- WCHAR ch[8];
- int len;
- int i;
- UINT scan_code;
-
- // Construct the state table with only a few modifiers, we don't
- // really care about the presence of Ctrl/Alt as those modifiers are
- // handled by Vim separately.
- memset(keyboard_state, 0, 256);
- if (GetKeyState(VK_SHIFT) & 0x8000)
- keyboard_state[VK_SHIFT] = 0x80;
- if (GetKeyState(VK_CAPITAL) & 0x0001)
- keyboard_state[VK_CAPITAL] = 0x01;
- // Alt-Gr is synthesized as Alt + Ctrl.
- if ((GetKeyState(VK_RMENU) & 0x8000)
- && (GetKeyState(VK_CONTROL) & 0x8000))
- {
- keyboard_state[VK_MENU] = 0x80;
- keyboard_state[VK_CONTROL] = 0x80;
- }
-
- // Translate the virtual key according to the current keyboard
- // layout.
- scan_code = MapVirtualKey(vk, MAPVK_VK_TO_VSC);
- // Convert the scan-code into a sequence of zero or more unicode
- // codepoints.
- // If this is a dead key ToUnicode returns a negative value.
- len = ToUnicode(vk, scan_code, keyboard_state, ch, ARRAY_LENGTH(ch),
- 0);
- if (len < 0)
- dead_key = DEAD_KEY_SET_DEFAULT;
-
- if (len <= 0)
- {
- int wm_char = NUL;
-
- if (dead_key == DEAD_KEY_SET_DEFAULT
- && (GetKeyState(VK_CONTROL) & 0x8000))
- {
- if ( // AZERTY CTRL+dead_circumflex
- (vk == 221 && scan_code == 26)
- // QWERTZ CTRL+dead_circumflex
- || (vk == 220 && scan_code == 41))
- wm_char = '[';
- if ( // QWERTZ CTRL+dead_two-overdots
- (vk == 192 && scan_code == 27))
- wm_char = ']';
- }
- if (wm_char != NUL)
- {
- // post WM_CHAR='[' - which will be interpreted with CTRL
- // still hold as ESC
- PostMessageW(msg.hwnd, WM_CHAR, wm_char, msg.lParam);
- // ask _OnChar() to not touch this state, wait for next key
- // press and maintain knowledge that we are "poisoned" with
- // "dead state"
- dead_key = DEAD_KEY_TRANSIENT_IN_ON_CHAR;
- }
- return;
- }
-
- // Post the message as TranslateMessage would do.
- if (msg.message == WM_KEYDOWN)
- {
- for (i = 0; i < len; i++)
- PostMessageW(msg.hwnd, WM_CHAR, ch[i], msg.lParam);
- }
- else
- {
- for (i = 0; i < len; i++)
- PostMessageW(msg.hwnd, WM_SYSCHAR, ch[i], msg.lParam);
- }
+ process_message_usual_key(vk, &msg);
}
}
#ifdef FEAT_MBYTE_IME
@@ -5286,7 +5590,7 @@ load_dpi_func(void)
fail:
// Disable PerMonitorV2 APIs.
- pGetDpiForSystem = stubGetDpiForSystem;
+ pGetDpiForSystem = vimGetDpiForSystem;
pGetDpiForWindow = NULL;
pGetSystemMetricsForDpi = stubGetSystemMetricsForDpi;
pSetThreadDpiAwarenessContext = NULL;
@@ -8885,6 +9189,43 @@ test_gui_w32_sendevent_keyboard(dict_T *args)
return TRUE;
}
+ static int
+test_gui_w32_sendevent_set_keycode_trans_strategy(dict_T *args)
+{
+ int handled = 0;
+ char_u *strategy = dict_get_string(args, "strategy", TRUE);
+
+ if (strategy)
+ {
+ if (STRICMP(strategy, "classic") == 0)
+ {
+ handled = 1;
+ keycode_trans_strategy_used = &keycode_trans_strategy_classic;
+ }
+ else if (STRICMP(strategy, "experimental") == 0)
+ {
+ handled = 1;
+ keycode_trans_strategy_used = &keycode_trans_strategy_experimental;
+ }
+ }
+
+ if (!handled)
+ {
+ if (strategy == NULL)
+ {
+ semsg(_(e_missing_argument_str), "strategy");
+ }
+ else
+ {
+ semsg(_(e_invalid_value_for_argument_str_str), "strategy", strategy);
+ vim_free(strategy);
+ }
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
int
test_gui_w32_sendevent(char_u *event, dict_T *args)
{
@@ -8892,6 +9233,8 @@ test_gui_w32_sendevent(char_u *event, dict_T *args)
return test_gui_w32_sendevent_keyboard(args);
else if (STRICMP(event, "mouse") == 0)
return test_gui_w32_sendevent_mouse(args);
+ else if (STRICMP(event, "set_keycode_trans_strategy") == 0)
+ return test_gui_w32_sendevent_set_keycode_trans_strategy(args);
else
{
semsg(_(e_invalid_value_for_argument_str_str), "event", event);
diff --git a/src/gui_xim.c b/src/gui_xim.c
index c9b1c6c..345b3a4 100644
--- a/src/gui_xim.c
+++ b/src/gui_xim.c
@@ -325,7 +325,7 @@ im_preedit_window_open(void)
#if GTK_CHECK_VERSION(3,16,0)
{
GtkStyleContext * const context
- = gtk_widget_get_style_context(gui.drawarea);
+ = gtk_widget_get_style_context(preedit_label);
GtkCssProvider * const provider = gtk_css_provider_new();
gchar *css = NULL;
const char * const fontname
@@ -349,7 +349,7 @@ im_preedit_window_open(void)
fontsize_propval = g_strdup_printf("inherit");
css = g_strdup_printf(
- "widget#vim-gui-preedit-area {\n"
+ "#vim-gui-preedit-area {\n"
" font-family: %s,monospace;\n"
" font-size: %s;\n"
" color: #%.2lx%.2lx%.2lx;\n"
@@ -1063,6 +1063,9 @@ xim_reset(void)
int
xim_queue_key_press_event(GdkEventKey *event, int down)
{
+#ifdef FEAT_GUI_GTK
+ if (event->state & GDK_SUPER_MASK) return FALSE;
+#endif
if (down)
{
// Workaround GTK2 XIM 'feature' that always converts keypad keys to
diff --git a/src/help.c b/src/help.c
index c33985e..a792bf3 100644
--- a/src/help.c
+++ b/src/help.c
@@ -720,7 +720,7 @@ fix_help_buffer(void)
for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count; ++lnum)
{
line = ml_get_buf(curbuf, lnum, FALSE);
- len = (int)STRLEN(line);
+ len = ml_get_buf_len(curbuf, lnum);
if (in_example && len > 0 && !VIM_ISWHITE(line[0]))
{
// End of example: non-white or '<' in first column.
diff --git a/src/highlight.c b/src/highlight.c
index 318564c..9b3b072 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -59,6 +59,7 @@ typedef struct
int sg_cterm_bg; // terminal bg color number + 1
int sg_cterm_ul; // terminal ul color number + 1
int sg_cterm_attr; // Screen attr for color term mode
+ int sg_cterm_font; // terminal alternative font (0 for normal)
// for when using the GUI
#if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
guicolor_T sg_gui_fg; // GUI foreground color handle
@@ -220,8 +221,8 @@ static char *(highlight_init_light[]) = {
CENT("SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue",
"SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue"),
#endif
- CENT("Visual term=reverse",
- "Visual term=reverse guibg=LightGrey"),
+ CENT("Visual ctermbg=Grey ctermfg=Black",
+ "Visual ctermbg=Grey ctermfg=Black guibg=LightGrey guifg=Black"),
#ifdef FEAT_DIFF
CENT("DiffAdd term=bold ctermbg=LightBlue",
"DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue"),
@@ -309,8 +310,8 @@ static char *(highlight_init_dark[]) = {
CENT("SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan",
"SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan"),
#endif
- CENT("Visual term=reverse",
- "Visual term=reverse guibg=DarkGrey"),
+ CENT("Visual ctermbg=Grey ctermfg=Black",
+ "Visual ctermbg=Grey ctermfg=Black guibg=#575757 guifg=LightGrey"),
#ifdef FEAT_DIFF
CENT("DiffAdd term=bold ctermbg=DarkBlue",
"DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue"),
@@ -432,19 +433,16 @@ init_highlight(
for (i = 0; pp[i] != NULL; ++i)
do_highlight((char_u *)pp[i], reset, TRUE);
- // Reverse looks ugly, but grey may not work for 8 colors. Thus let it
- // depend on the number of colors available.
+ // Reverse looks ugly, but grey may not work for less than 8 colors. Thus
+ // let it depend on the number of colors available.
+ if (t_colors < 8)
+ do_highlight((char_u *)"Visual term=reverse cterm=reverse ctermbg=NONE ctermfg=NONE",
+ FALSE, TRUE);
// With 8 colors brown is equal to yellow, need to use black for Search fg
// to avoid Statement highlighted text disappears.
// Clear the attributes, needed when changing the t_Co value.
- if (t_colors > 8)
- do_highlight((char_u *)(*p_bg == 'l'
- ? "Visual cterm=NONE ctermbg=LightGrey"
- : "Visual cterm=NONE ctermbg=DarkGrey"), FALSE, TRUE);
- else
+ if (t_colors <= 8)
{
- do_highlight((char_u *)"Visual cterm=reverse ctermbg=NONE",
- FALSE, TRUE);
if (*p_bg == 'l')
do_highlight((char_u *)"Search ctermfg=black", FALSE, TRUE);
}
@@ -1035,6 +1033,39 @@ highlight_set_ctermul(int idx, int color, int is_normal_group)
}
/*
+ * Set the cterm font for the highlight group at 'idx'.
+ * 'arg' is the color name or the numeric value as a string.
+ * 'init' is set to TRUE when initializing highlighting.
+ * Called for the ":highlight" command and the "hlset()" function.
+ *
+ * Returns TRUE if the font is set.
+ */
+ static int
+highlight_set_cterm_font(
+ int idx,
+ char_u *arg,
+ int init)
+{
+ int font;
+
+ if (init && (HL_TABLE()[idx].sg_set & SG_CTERM))
+ return FALSE;
+
+ if (!init)
+ HL_TABLE()[idx].sg_set |= SG_CTERM;
+
+ if (VIM_ISDIGIT(*arg))
+ font = atoi((char *)arg);
+ else if (STRICMP(arg, "NONE") == 0)
+ font = -1;
+ else
+ return FALSE;
+
+ HL_TABLE()[idx].sg_cterm_font = font + 1;
+ return TRUE;
+}
+
+/*
* Set the cterm fg/bg/ul color for the highlight group at 'idx'.
* 'key' is one of 'CTERMFG' or 'CTERMBG' or 'CTERMUL'.
* 'keystart' is the color name/value.
@@ -1679,6 +1710,14 @@ do_highlight(
break;
}
}
+ else if (STRCMP(key, "CTERMFONT") == 0)
+ {
+ if (!highlight_set_cterm_font(idx, arg, init))
+ {
+ error = TRUE;
+ break;
+ }
+ }
else if (STRCMP(key, "GUIFG") == 0)
{
#if defined(FEAT_GUI) || defined(FEAT_EVAL)
@@ -1865,6 +1904,7 @@ hl_has_settings(int idx, int check_link)
|| HL_TABLE()[idx].sg_cterm_attr != 0
|| HL_TABLE()[idx].sg_cterm_fg != 0
|| HL_TABLE()[idx].sg_cterm_bg != 0
+ || HL_TABLE()[idx].sg_cterm_font != 0
#ifdef FEAT_GUI
|| HL_TABLE()[idx].sg_gui_attr != 0
|| HL_TABLE()[idx].sg_gui_fg_name != NULL
@@ -1892,6 +1932,7 @@ highlight_clear(int idx)
HL_TABLE()[idx].sg_cterm_fg = 0;
HL_TABLE()[idx].sg_cterm_bg = 0;
HL_TABLE()[idx].sg_cterm_attr = 0;
+ HL_TABLE()[idx].sg_cterm_font = 0;
#if defined(FEAT_GUI) || defined(FEAT_EVAL)
HL_TABLE()[idx].sg_gui = 0;
VIM_CLEAR(HL_TABLE()[idx].sg_gui_fg_name);
@@ -2539,6 +2580,8 @@ get_attr_entry(garray_T *table, attrentry_T *aep)
== taep->ae_u.cterm.bg_color
&& aep->ae_u.cterm.ul_color
== taep->ae_u.cterm.ul_color
+ && aep->ae_u.cterm.font
+ == taep->ae_u.cterm.font
#ifdef FEAT_TERMGUICOLORS
&& aep->ae_u.cterm.fg_rgb
== taep->ae_u.cterm.fg_rgb
@@ -2609,6 +2652,7 @@ get_attr_entry(garray_T *table, attrentry_T *aep)
taep->ae_u.cterm.fg_color = aep->ae_u.cterm.fg_color;
taep->ae_u.cterm.bg_color = aep->ae_u.cterm.bg_color;
taep->ae_u.cterm.ul_color = aep->ae_u.cterm.ul_color;
+ taep->ae_u.cterm.font = aep->ae_u.cterm.font;
#ifdef FEAT_TERMGUICOLORS
taep->ae_u.cterm.fg_rgb = aep->ae_u.cterm.fg_rgb;
taep->ae_u.cterm.bg_rgb = aep->ae_u.cterm.bg_rgb;
@@ -2639,6 +2683,7 @@ get_cterm_attr_idx(int attr, int fg, int bg)
at_en.ae_u.cterm.fg_color = fg;
at_en.ae_u.cterm.bg_color = bg;
at_en.ae_u.cterm.ul_color = 0;
+ at_en.ae_u.cterm.font = 0;
return get_attr_entry(&cterm_attr_table, &at_en);
}
#endif
@@ -2809,6 +2854,8 @@ hl_combine_attr(int char_attr, int prim_attr)
new_en.ae_u.cterm.bg_color = prim_aep->ae_u.cterm.bg_color;
if (prim_aep->ae_u.cterm.ul_color > 0)
new_en.ae_u.cterm.ul_color = prim_aep->ae_u.cterm.ul_color;
+ if (prim_aep->ae_u.cterm.font > 0)
+ new_en.ae_u.cterm.font = prim_aep->ae_u.cterm.font;
#ifdef FEAT_TERMGUICOLORS
// If both fg and bg are not set fall back to cterm colors.
// Helps for SpellBad which uses undercurl in the GUI.
@@ -2948,6 +2995,8 @@ highlight_list_one(int id)
sgp->sg_cterm_bg, NULL, "ctermbg");
didh = highlight_list_arg(id, didh, LIST_INT,
sgp->sg_cterm_ul, NULL, "ctermul");
+ didh = highlight_list_arg(id, didh, LIST_INT,
+ sgp->sg_cterm_font, NULL, "ctermfont");
#if defined(FEAT_GUI) || defined(FEAT_EVAL)
didh = highlight_list_arg(id, didh, LIST_ATTR,
@@ -3138,7 +3187,7 @@ highlight_color(
return (HL_TABLE()[id - 1].sg_gui_sp_name);
return (HL_TABLE()[id - 1].sg_gui_bg_name);
}
- if (font || sp)
+ if (sp)
return NULL;
if (modec == 'c')
{
@@ -3146,6 +3195,8 @@ highlight_color(
n = HL_TABLE()[id - 1].sg_cterm_fg - 1;
else if (ul)
n = HL_TABLE()[id - 1].sg_cterm_ul - 1;
+ else if (font)
+ n = HL_TABLE()[id - 1].sg_cterm_font - 1;
else
n = HL_TABLE()[id - 1].sg_cterm_bg - 1;
if (n < 0)
@@ -3296,7 +3347,8 @@ set_hl_attr(
// For the color term mode: If there are other than "normal"
// highlighting attributes, need to allocate an attr number.
- if (sgp->sg_cterm_fg == 0 && sgp->sg_cterm_bg == 0 && sgp->sg_cterm_ul == 0
+ if (sgp->sg_cterm_fg == 0 && sgp->sg_cterm_bg == 0 &&
+ sgp->sg_cterm_ul == 0 && sgp->sg_cterm_font == 0
# ifdef FEAT_TERMGUICOLORS
&& sgp->sg_gui_fg == INVALCOLOR
&& sgp->sg_gui_bg == INVALCOLOR
@@ -3310,6 +3362,7 @@ set_hl_attr(
at_en.ae_u.cterm.fg_color = sgp->sg_cterm_fg;
at_en.ae_u.cterm.bg_color = sgp->sg_cterm_bg;
at_en.ae_u.cterm.ul_color = sgp->sg_cterm_ul;
+ at_en.ae_u.cterm.font = sgp->sg_cterm_font;
# ifdef FEAT_TERMGUICOLORS
at_en.ae_u.cterm.fg_rgb = GUI_MCH_GET_RGB2(sgp->sg_gui_fg);
at_en.ae_u.cterm.bg_rgb = GUI_MCH_GET_RGB2(sgp->sg_gui_bg);
@@ -3717,6 +3770,8 @@ combine_stl_hlt(
hlt[hlcnt + i].sg_cterm_fg = hlt[id - 1].sg_cterm_fg;
if (hlt[id - 1].sg_cterm_bg != hlt[id_S - 1].sg_cterm_bg)
hlt[hlcnt + i].sg_cterm_bg = hlt[id - 1].sg_cterm_bg;
+ if (hlt[id - 1].sg_cterm_font != hlt[id_S - 1].sg_cterm_font)
+ hlt[hlcnt + i].sg_cterm_font = hlt[id - 1].sg_cterm_font;
# if defined(FEAT_GUI) || defined(FEAT_EVAL)
hlt[hlcnt + i].sg_gui ^=
hlt[id - 1].sg_gui ^ hlt[id_S - 1].sg_gui;
@@ -4180,6 +4235,10 @@ highlight_get_info(int hl_idx, int resolve_link)
if (dict_add_string(dict, "ctermul",
highlight_color(hlgid, (char_u *)"ul", 'c')) == FAIL)
goto error;
+ if (sgp->sg_cterm_font != 0)
+ if (dict_add_string(dict, "ctermfont",
+ highlight_color(hlgid, (char_u *)"font", 'c')) == FAIL)
+ goto error;
if (sgp->sg_gui != 0)
{
attr_dict = highlight_get_attr_dict(sgp->sg_gui);
@@ -4408,6 +4467,7 @@ hlg_add_or_update(dict_T *dict)
char_u *ctermfg;
char_u *ctermbg;
char_u *ctermul;
+ char_u *ctermfont;
char_u *guifg;
char_u *guibg;
char_u *guisp;
@@ -4492,6 +4552,10 @@ hlg_add_or_update(dict_T *dict)
if (error)
return FALSE;
+ ctermfont = hldict_get_string(dict, (char_u *)"ctermfont", &error);
+ if (error)
+ return FALSE;
+
if (!hldict_attr_to_str(dict, (char_u *)"gui", gui_attr, sizeof(gui_attr)))
return FALSE;
@@ -4516,7 +4580,7 @@ hlg_add_or_update(dict_T *dict)
// If none of the attributes are specified, then do nothing.
if (term_attr[0] == NUL && start == NULL && stop == NULL
&& cterm_attr[0] == NUL && ctermfg == NULL && ctermbg == NULL
- && ctermul == NULL && gui_attr[0] == NUL
+ && ctermul == NULL && ctermfont == NULL && gui_attr[0] == NUL
# ifdef FEAT_GUI
&& font == NULL
# endif
@@ -4536,6 +4600,7 @@ hlg_add_or_update(dict_T *dict)
p = add_attr_and_value(p, (char_u *)" ctermfg=", 9, ctermfg);
p = add_attr_and_value(p, (char_u *)" ctermbg=", 9, ctermbg);
p = add_attr_and_value(p, (char_u *)" ctermul=", 9, ctermul);
+ p = add_attr_and_value(p, (char_u *)" ctermfont=", 9, ctermfont);
p = add_attr_and_value(p, (char_u *)" gui=", 5, gui_attr);
# ifdef FEAT_GUI
p = add_attr_and_value(p, (char_u *)" font=", 6, font);
diff --git a/src/if_lua.c b/src/if_lua.c
index 159a675..4d19c3e 100644
--- a/src/if_lua.c
+++ b/src/if_lua.c
@@ -2692,9 +2692,12 @@ ex_luado(exarg_T *eap)
luaV_emsg(L);
break;
}
+
// Catch the command switching to another buffer.
- if (curbuf != was_curbuf)
+ // Check the line number, the command may have deleted lines.
+ if (curbuf != was_curbuf || l > curbuf->b_ml.ml_line_count)
break;
+
if (lua_isstring(L, -1)) // update line?
{
#ifdef HAVE_SANDBOX
diff --git a/src/if_perl.xs b/src/if_perl.xs
index dd504d3..4f2f8ac 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -1368,7 +1368,7 @@ ex_perldo(exarg_T *eap)
PUSHMARK(sp);
perl_call_pv("VIM::perldo", G_SCALAR | G_EVAL);
str = SvPV(GvSV(PL_errgv), length);
- if (length || curbuf != was_curbuf)
+ if (length || curbuf != was_curbuf || i > curbuf->b_ml.ml_line_count)
break;
SPAGAIN;
if (SvTRUEx(POPs))
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 42db510..3e5993b 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -6136,7 +6136,8 @@ run_do(const char *cmd, void *arg UNUSED
goto err;
// Check that the command didn't switch to another buffer.
- if (curbuf != was_curbuf)
+ // Check the line number, the command my have deleted lines.
+ if (curbuf != was_curbuf || lnum > curbuf->b_ml.ml_line_count)
{
Py_XDECREF(ret);
goto err;
diff --git a/src/if_ruby.c b/src/if_ruby.c
index 7fab211..a018dcd 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -885,7 +885,7 @@ ex_rubydo(exarg_T *eap)
error_print(state);
break;
}
- if (was_curbuf != curbuf)
+ if (was_curbuf != curbuf || i > curbuf->b_ml.ml_line_count)
break;
line = rb_lastline_get();
if (!NIL_P(line))
diff --git a/src/if_tcl.c b/src/if_tcl.c
index d3d4639..eab321b 100644
--- a/src/if_tcl.c
+++ b/src/if_tcl.c
@@ -2012,7 +2012,8 @@ ex_tcldo(exarg_T *eap)
#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 5) || TCL_MAJOR_VERSION > 8
|| Tcl_LimitExceeded(tclinfo.interp)
#endif
- || curbuf != was_curbuf)
+ || curbuf != was_curbuf
+ || (linenr_T)rs > curbuf->b_ml.ml_line_count)
break;
line = (char *)Tcl_GetVar(tclinfo.interp, var_line, 0);
if (line)
diff --git a/src/indent.c b/src/indent.c
index 1858ecf..56032fa 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -434,20 +434,17 @@ get_indent_buf(buf_T *buf, linenr_T lnum)
get_indent_str(
char_u *ptr,
int ts,
- int list) // if TRUE, count only screen size for tabs
+ int no_ts) // if TRUE, count a tab as ^I
{
int count = 0;
for ( ; *ptr; ++ptr)
{
- if (*ptr == TAB)
+ if (*ptr == TAB) // count a tab for what it is worth
{
- if (!list || curwin->w_lcs_chars.tab1)
- // count a tab for what it is worth
+ if (!no_ts)
count += ts - (count % ts);
else
- // In list mode, when tab is not set, count screen char width
- // for Tab, displays: ^I
count += ptr2cells(ptr);
}
else if (*ptr == ' ')
@@ -462,10 +459,10 @@ get_indent_str(
/*
* Count the size (in window cells) of the indent in line "ptr", using
* variable tabstops.
- * if "list" is TRUE, count only screen size for tabs.
+ * If "no_ts" is TRUE, count a tab as ^I.
*/
int
-get_indent_str_vtab(char_u *ptr, int ts, int *vts, int list)
+get_indent_str_vtab(char_u *ptr, int ts, int *vts, int no_ts)
{
int count = 0;
@@ -473,11 +470,9 @@ get_indent_str_vtab(char_u *ptr, int ts, int *vts, int list)
{
if (*ptr == TAB) // count a tab for what it is worth
{
- if (!list || curwin->w_lcs_chars.tab1)
+ if (!no_ts)
count += tabstop_padding(count, ts, vts);
else
- // In list mode, when tab is not set, count screen char width
- // for Tab, displays: ^I
count += ptr2cells(ptr);
}
else if (*ptr == ' ')
@@ -925,61 +920,70 @@ get_breakindent_win(
{
static int prev_indent = 0; // cached indent value
static long prev_ts = 0L; // cached tabstop value
- static int prev_fnum = 0; // cached buffer number
- static char_u *prev_line = NULL; // cached copy of "line"
- static varnumber_T prev_tick = 0; // changedtick of cached value
# ifdef FEAT_VARTABS
static int *prev_vts = NULL; // cached vartabs values
# endif
- static int prev_list = 0; // cached list value
+ static int prev_fnum = 0; // cached buffer number
+ static char_u *prev_line = NULL; // cached copy of "line"
+ static varnumber_T prev_tick = 0; // changedtick of cached value
+ static int prev_list = 0; // cached list indent
static int prev_listopt = 0; // cached w_p_briopt_list value
+ static int prev_no_ts = FALSE; // cached no_ts value
+ static unsigned prev_dy_uhex = 0; // cached 'display' "uhex" value
// cached formatlistpat value
static char_u *prev_flp = NULL;
int bri = 0;
// window width minus window margin space, i.e. what rests for text
const int eff_wwidth = wp->w_width
- - ((wp->w_p_nu || wp->w_p_rnu)
- && (vim_strchr(p_cpo, CPO_NUMCOL) == NULL)
- ? number_width(wp) + 1 : 0);
-
- // used cached indent, unless
- // - buffer changed
- // - 'tabstop' changed
- // - buffer was changed
- // - 'briopt_list changed' changed or
- // - 'formatlistpattern' changed
- // - line changed
- // - 'vartabs' changed
+ - win_col_off(wp) + win_col_off2(wp);
+
+ // In list mode, if 'listchars' "tab" isn't set, a TAB is displayed as ^I.
+ int no_ts = wp->w_p_list && wp->w_lcs_chars.tab1 == NUL;
+
+ // Used cached indent, unless
+ // - buffer changed, or
+ // - 'tabstop' changed, or
+ // - 'vartabstop' changed, or
+ // - buffer was changed, or
+ // - 'breakindentopt' "list" changed, or
+ // - 'list' or 'listchars' "tab" changed, or
+ // - 'display' "uhex" flag changed, or
+ // - 'formatlistpat' changed, or
+ // - line changed.
if (prev_fnum != wp->w_buffer->b_fnum
|| prev_ts != wp->w_buffer->b_p_ts
+# ifdef FEAT_VARTABS
+ || prev_vts != wp->w_buffer->b_p_vts_array
+# endif
|| prev_tick != CHANGEDTICK(wp->w_buffer)
|| prev_listopt != wp->w_briopt_list
+ || prev_no_ts != no_ts
+ || prev_dy_uhex != (dy_flags & DY_UHEX)
|| prev_flp == NULL
|| STRCMP(prev_flp, get_flp_value(wp->w_buffer)) != 0
|| prev_line == NULL || STRCMP(prev_line, line) != 0
-# ifdef FEAT_VARTABS
- || prev_vts != wp->w_buffer->b_p_vts_array
-# endif
)
{
prev_fnum = wp->w_buffer->b_fnum;
vim_free(prev_line);
prev_line = vim_strsave(line);
prev_ts = wp->w_buffer->b_p_ts;
- prev_tick = CHANGEDTICK(wp->w_buffer);
# ifdef FEAT_VARTABS
prev_vts = wp->w_buffer->b_p_vts_array;
if (wp->w_briopt_vcol == 0)
prev_indent = get_indent_str_vtab(line,
(int)wp->w_buffer->b_p_ts,
- wp->w_buffer->b_p_vts_array, wp->w_p_list);
+ wp->w_buffer->b_p_vts_array, no_ts);
# else
if (wp->w_briopt_vcol == 0)
prev_indent = get_indent_str(line,
- (int)wp->w_buffer->b_p_ts, wp->w_p_list);
+ (int)wp->w_buffer->b_p_ts, no_ts);
# endif
+ prev_tick = CHANGEDTICK(wp->w_buffer);
prev_listopt = wp->w_briopt_list;
prev_list = 0;
+ prev_no_ts = no_ts;
+ prev_dy_uhex = (dy_flags & DY_UHEX);
vim_free(prev_flp);
prev_flp = vim_strsave(get_flp_value(wp->w_buffer));
// add additional indent for numbered lists
@@ -1605,7 +1609,7 @@ copy_indent(int size, char_u *src)
{
// Allocate memory for the result: the copied indent, new indent
// and the rest of the line.
- line_len = (int)STRLEN(ml_get_curline()) + 1;
+ line_len = ml_get_curline_len() + 1;
line = alloc(ind_len + line_len);
if (line == NULL)
return FALSE;
diff --git a/src/insexpand.c b/src/insexpand.c
index e870147..9b5e5de 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -653,7 +653,10 @@ ins_compl_infercase_gettext(
// getting to six bytes from the edge of IObuff switch to using a
// growarray. Add the character in the next round.
if (ga_grow(&gap, IOSIZE) == FAIL)
+ {
+ vim_free(wca);
return (char_u *)"[failed]";
+ }
*p = NUL;
STRCPY(gap.ga_data, IObuff);
gap.ga_len = (int)STRLEN(IObuff);
@@ -1350,7 +1353,13 @@ ins_compl_show_pum(void)
}
if (compl_match_array == NULL)
+ {
+#ifdef FEAT_EVAL
+ if (compl_started && has_completechanged())
+ trigger_complete_changed_event(cur);
+#endif
return;
+ }
// In Replace mode when a $ is displayed at the end of the line only
// part of the screen would be updated. We do need to redraw here.
@@ -1363,6 +1372,10 @@ ins_compl_show_pum(void)
pum_display(compl_match_array, compl_match_arraysize, cur);
curwin->w_cursor.col = col;
+ // After adding leader, set the current match to shown match.
+ if (compl_started && compl_curr_match != compl_shown_match)
+ compl_curr_match = compl_shown_match;
+
#ifdef FEAT_EVAL
if (has_completechanged())
trigger_complete_changed_event(cur);
@@ -3035,73 +3048,6 @@ ins_compl_update_sequence_numbers(void)
}
}
- static int
-info_add_completion_info(list_T *li)
-{
- compl_T *match;
- int forward = compl_dir_forward();
-
- if (compl_first_match == NULL)
- return OK;
-
- match = compl_first_match;
- // There are four cases to consider here:
- // 1) when just going forward through the menu,
- // compl_first_match should point to the initial entry with
- // number zero and CP_ORIGINAL_TEXT flag set
- // 2) when just going backwards,
- // compl-first_match should point to the last entry before
- // the entry with the CP_ORIGINAL_TEXT flag set
- // 3) when first going forwards and then backwards, e.g.
- // pressing C-N, C-P, compl_first_match points to the
- // last entry before the entry with the CP_ORIGINAL_TEXT
- // flag set and next-entry moves opposite through the list
- // compared to case 2, so pretend the direction is forward again
- // 4) when first going backwards and then forwards, e.g.
- // pressing C-P, C-N, compl_first_match points to the
- // first entry with the CP_ORIGINAL_TEXT
- // flag set and next-entry moves in opposite direction through the list
- // compared to case 1, so pretend the direction is backwards again
- //
- // But only do this when the 'noselect' option is not active!
-
- if (!compl_no_select)
- {
- if (forward && !match_at_original_text(match))
- forward = FALSE;
- else if (!forward && match_at_original_text(match))
- forward = TRUE;
- }
-
- // Skip the element with the CP_ORIGINAL_TEXT flag at the beginning, in case of
- // forward completion, or at the end, in case of backward completion.
- match = forward ? match->cp_next : (compl_no_select && match_at_original_text(match) ? match->cp_prev : match->cp_prev->cp_prev);
-
- while (match != NULL && !match_at_original_text(match))
- {
- dict_T *di = dict_alloc();
-
- if (di == NULL)
- return FAIL;
- if (list_append_dict(li, di) == FAIL)
- return FAIL;
- dict_add_string(di, "word", match->cp_str);
- dict_add_string(di, "abbr", match->cp_text[CPT_ABBR]);
- dict_add_string(di, "menu", match->cp_text[CPT_MENU]);
- dict_add_string(di, "kind", match->cp_text[CPT_KIND]);
- dict_add_string(di, "info", match->cp_text[CPT_INFO]);
- if (match->cp_user_data.v_type == VAR_UNKNOWN)
- // Add an empty string for backwards compatibility
- dict_add_string(di, "user_data", (char_u *)"");
- else
- dict_add_tv(di, "user_data", &match->cp_user_data);
-
- match = forward ? match->cp_next : match->cp_prev;
- }
-
- return OK;
-}
-
/*
* Get complete information
*/
@@ -3147,24 +3093,60 @@ get_complete_info(list_T *what_list, dict_T *retdict)
if (ret == OK && (what_flag & CI_WHAT_PUM_VISIBLE))
ret = dict_add_number(retdict, "pum_visible", pum_visible());
- if (ret == OK && (what_flag & CI_WHAT_ITEMS))
+ if (ret == OK && (what_flag & CI_WHAT_ITEMS || what_flag & CI_WHAT_SELECTED))
{
- list_T *li;
+ list_T *li = NULL;
+ dict_T *di;
+ compl_T *match;
+ int selected_idx = -1;
- li = list_alloc();
- if (li == NULL)
- return;
- ret = dict_add_list(retdict, "items", li);
- if (ret == OK)
- ret = info_add_completion_info(li);
- }
-
- if (ret == OK && (what_flag & CI_WHAT_SELECTED))
- {
- if (compl_curr_match != NULL && compl_curr_match->cp_number == -1)
- ins_compl_update_sequence_numbers();
- ret = dict_add_number(retdict, "selected", compl_curr_match != NULL
- ? compl_curr_match->cp_number - 1 : -1);
+ if (what_flag & CI_WHAT_ITEMS)
+ {
+ li = list_alloc();
+ if (li == NULL)
+ return;
+ ret = dict_add_list(retdict, "items", li);
+ }
+ if (ret == OK && what_flag & CI_WHAT_SELECTED)
+ if (compl_curr_match != NULL && compl_curr_match->cp_number == -1)
+ ins_compl_update_sequence_numbers();
+ if (ret == OK && compl_first_match != NULL)
+ {
+ int list_idx = 0;
+ match = compl_first_match;
+ do
+ {
+ if (!match_at_original_text(match))
+ {
+ if (what_flag & CI_WHAT_ITEMS)
+ {
+ di = dict_alloc();
+ if (di == NULL)
+ return;
+ ret = list_append_dict(li, di);
+ if (ret != OK)
+ return;
+ dict_add_string(di, "word", match->cp_str);
+ dict_add_string(di, "abbr", match->cp_text[CPT_ABBR]);
+ dict_add_string(di, "menu", match->cp_text[CPT_MENU]);
+ dict_add_string(di, "kind", match->cp_text[CPT_KIND]);
+ dict_add_string(di, "info", match->cp_text[CPT_INFO]);
+ if (match->cp_user_data.v_type == VAR_UNKNOWN)
+ // Add an empty string for backwards compatibility
+ dict_add_string(di, "user_data", (char_u *)"");
+ else
+ dict_add_tv(di, "user_data", &match->cp_user_data);
+ }
+ if (compl_curr_match != NULL && compl_curr_match->cp_number == match->cp_number)
+ selected_idx = list_idx;
+ list_idx += 1;
+ }
+ match = match->cp_next;
+ }
+ while (match != NULL && !is_first_match(match));
+ }
+ if (ret == OK && (what_flag & CI_WHAT_SELECTED))
+ ret = dict_add_number(retdict, "selected", selected_idx);
}
if (ret == OK && (what_flag & CI_WHAT_INSERTED))
@@ -3286,8 +3268,7 @@ process_next_cpt_value(
// buffer, so that word at start of buffer is found
// correctly.
st->first_match_pos.lnum = st->ins_buf->b_ml.ml_line_count;
- st->first_match_pos.col =
- (colnr_T)STRLEN(ml_get(st->first_match_pos.lnum));
+ st->first_match_pos.col = ml_get_len(st->first_match_pos.lnum);
}
st->last_match_pos = st->first_match_pos;
compl_type = 0;
@@ -3396,7 +3377,7 @@ get_next_include_file_completion(int compl_type)
(compl_type == CTRL_X_PATH_DEFINES
&& !(compl_cont_status & CONT_SOL))
? FIND_DEFINE : FIND_ANY, 1L, ACTION_EXPAND,
- (linenr_T)1, (linenr_T)MAXLNUM);
+ (linenr_T)1, (linenr_T)MAXLNUM, FALSE);
}
#endif
diff --git a/src/keymap.h b/src/keymap.h
index 6fddc7f..29e2a05 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -500,8 +500,8 @@ enum key_extra
#define MOD_MASK_2CLICK 0x20 // use MOD_MASK_MULTI_CLICK
#define MOD_MASK_3CLICK 0x40 // use MOD_MASK_MULTI_CLICK
#define MOD_MASK_4CLICK 0x60 // use MOD_MASK_MULTI_CLICK
-#ifdef MACOS_X
-# define MOD_MASK_CMD 0x80
+#if defined(MACOS_X) || defined(FEAT_GUI_GTK)
+# define MOD_MASK_CMD 0x80 // aka SUPER
#endif
#define MOD_MASK_MULTI_CLICK (MOD_MASK_2CLICK|MOD_MASK_3CLICK|MOD_MASK_4CLICK)
diff --git a/src/list.c b/src/list.c
index b50cb03..e9f1ae3 100644
--- a/src/list.c
+++ b/src/list.c
@@ -2325,7 +2325,7 @@ f_uniq(typval_T *argvars, typval_T *rettv)
}
/*
- * Handle one item for map() and filter().
+ * Handle one item for map(), filter(), foreach().
* Sets v:val to "tv". Caller must set v:key.
*/
int
@@ -2341,6 +2341,17 @@ filter_map_one(
int retval = FAIL;
copy_tv(tv, get_vim_var_tv(VV_VAL));
+
+ newtv->v_type = VAR_UNKNOWN;
+ if (filtermap == FILTERMAP_FOREACH && expr->v_type == VAR_STRING)
+ {
+ // foreach() is not limited to an expression
+ do_cmdline_cmd(expr->vval.v_string);
+ if (!did_emsg)
+ retval = OK;
+ goto theend;
+ }
+
argv[0] = *get_vim_var_tv(VV_KEY);
argv[1] = *get_vim_var_tv(VV_VAL);
if (eval_expr_typval(expr, FALSE, argv, 2, fc, newtv) == FAIL)
@@ -2360,6 +2371,8 @@ filter_map_one(
if (error)
goto theend;
}
+ else if (filtermap == FILTERMAP_FOREACH)
+ clear_tv(newtv);
retval = OK;
theend:
clear_tv(get_vim_var_tv(VV_VAL));
@@ -2367,8 +2380,8 @@ theend:
}
/*
- * Implementation of map() and filter() for a List. Apply "expr" to every item
- * in List "l" and return the result in "rettv".
+ * Implementation of map(), filter(), foreach() for a List. Apply "expr" to
+ * every item in List "l" and return the result in "rettv".
*/
static void
list_filter_map(
@@ -2421,7 +2434,8 @@ list_filter_map(
int stride = l->lv_u.nonmat.lv_stride;
// List from range(): loop over the numbers
- if (filtermap != FILTERMAP_MAPNEW)
+ // NOTE: foreach() returns the range_list_item
+ if (filtermap != FILTERMAP_MAPNEW && filtermap != FILTERMAP_FOREACH)
{
l->lv_first = NULL;
l->lv_u.mat.lv_last = NULL;
@@ -2444,27 +2458,30 @@ list_filter_map(
clear_tv(&newtv);
break;
}
- if (filtermap != FILTERMAP_FILTER)
+ if (filtermap != FILTERMAP_FOREACH)
{
- if (filtermap == FILTERMAP_MAP && argtype != NULL
+ if (filtermap != FILTERMAP_FILTER)
+ {
+ if (filtermap == FILTERMAP_MAP && argtype != NULL
&& check_typval_arg_type(
- argtype->tt_member, &newtv,
- func_name, 0) == FAIL)
+ argtype->tt_member, &newtv,
+ func_name, 0) == FAIL)
+ {
+ clear_tv(&newtv);
+ break;
+ }
+ // map(), mapnew(): always append the new value to the
+ // list
+ if (list_append_tv_move(filtermap == FILTERMAP_MAP
+ ? l : l_ret, &newtv) == FAIL)
+ break;
+ }
+ else if (!rem)
{
- clear_tv(&newtv);
- break;
+ // filter(): append the list item value when not rem
+ if (list_append_tv_move(l, &tv) == FAIL)
+ break;
}
- // map(), mapnew(): always append the new value to the
- // list
- if (list_append_tv_move(filtermap == FILTERMAP_MAP
- ? l : l_ret, &newtv) == FAIL)
- break;
- }
- else if (!rem)
- {
- // filter(): append the list item value when not rem
- if (list_append_tv_move(l, &tv) == FAIL)
- break;
}
val += stride;
@@ -2508,7 +2525,7 @@ list_filter_map(
break;
}
else if (filtermap == FILTERMAP_FILTER && rem)
- listitem_remove(l, li);
+ listitem_remove(l, li);
++idx;
}
}
@@ -2519,7 +2536,7 @@ list_filter_map(
}
/*
- * Implementation of map() and filter().
+ * Implementation of map(), filter() and foreach().
*/
static void
filter_map(typval_T *argvars, typval_T *rettv, filtermap_T filtermap)
@@ -2527,16 +2544,19 @@ filter_map(typval_T *argvars, typval_T *rettv, filtermap_T filtermap)
typval_T *expr;
char *func_name = filtermap == FILTERMAP_MAP ? "map()"
: filtermap == FILTERMAP_MAPNEW ? "mapnew()"
- : "filter()";
+ : filtermap == FILTERMAP_FILTER ? "filter()"
+ : "foreach()";
char_u *arg_errmsg = (char_u *)(filtermap == FILTERMAP_MAP
? N_("map() argument")
: filtermap == FILTERMAP_MAPNEW
? N_("mapnew() argument")
- : N_("filter() argument"));
+ : filtermap == FILTERMAP_FILTER
+ ? N_("filter() argument")
+ : N_("foreach() argument"));
int save_did_emsg;
type_T *type = NULL;
- // map() and filter() return the first argument, also on failure.
+ // map(), filter(), foreach() return the first argument, also on failure.
if (filtermap != FILTERMAP_MAPNEW && argvars[0].v_type != VAR_STRING)
copy_tv(&argvars[0], rettv);
@@ -2630,6 +2650,15 @@ f_mapnew(typval_T *argvars, typval_T *rettv)
}
/*
+ * "foreach()" function
+ */
+ void
+f_foreach(typval_T *argvars, typval_T *rettv)
+{
+ filter_map(argvars, rettv, FILTERMAP_FOREACH);
+}
+
+/*
* "add(list, item)" function
*/
static void
diff --git a/src/mbyte.c b/src/mbyte.c
index ee2834c..d6fb7ec 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -3454,6 +3454,8 @@ static convertStruct toLower[] =
{0x1e900,0x1e921,1,34}
};
+// Note: UnicodeData.txt does not define U+1E9E as being the corresponding upper
+// case letter for U+00DF (ß), however it is part of the toLower table
static convertStruct toUpper[] =
{
{0x61,0x7a,1,-32},
@@ -4186,32 +4188,12 @@ mb_copy_char(char_u **fp, char_u **tp)
int
mb_off_next(char_u *base, char_u *p)
{
- int i;
- int j;
+ int head_off = (*mb_head_off)(base, p);
- if (enc_utf8)
- {
- if (*p < 0x80) // be quick for ASCII
- return 0;
-
- // Find the next character that isn't 10xx.xxxx
- for (i = 0; (p[i] & 0xc0) == 0x80; ++i)
- ;
- if (i > 0)
- {
- // Check for illegal sequence.
- for (j = 0; p - j > base; ++j)
- if ((p[-j] & 0xc0) != 0x80)
- break;
- if (utf8len_tab[p[-j]] != i + j)
- return 0;
- }
- return i;
- }
+ if (head_off == 0)
+ return 0;
- // Only need to check if we're on a trail byte, it doesn't matter if we
- // want the offset to the next or current character.
- return (*mb_head_off)(base, p);
+ return (*mb_ptr2len)(p - head_off) - head_off;
}
/*
@@ -4396,7 +4378,7 @@ mb_adjustpos(buf_T *buf, pos_T *lp)
if (lp->col > 0 || lp->coladd > 1)
{
p = ml_get_buf(buf, lp->lnum, FALSE);
- if (*p == NUL || (int)STRLEN(p) < lp->col)
+ if (*p == NUL || ml_get_buf_len(buf, lp->lnum) < lp->col)
lp->col = 0;
else
lp->col -= (*mb_head_off)(p, p + lp->col);
@@ -5613,7 +5595,8 @@ tv_nr_compare(const void *a1, const void *a2)
listitem_T *li1 = *(listitem_T **)a1;
listitem_T *li2 = *(listitem_T **)a2;
- return li1->li_tv.vval.v_number - li2->li_tv.vval.v_number;
+ return li1->li_tv.vval.v_number == li2->li_tv.vval.v_number ? 0 :
+ li1->li_tv.vval.v_number > li2->li_tv.vval.v_number ? 1 : -1;
}
void
diff --git a/src/memline.c b/src/memline.c
index cf2dc8c..5ca50fc 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -1754,7 +1754,7 @@ ml_recover(int checkext)
for (idx = 1; idx <= lnum; ++idx)
{
// Need to copy one line, fetching the other one may flush it.
- p = vim_strsave(ml_get(idx));
+ p = vim_strnsave(ml_get(idx), ml_get_len(idx));
i = STRCMP(p, ml_get(idx + lnum));
vim_free(p);
if (i != 0)
@@ -2675,6 +2675,48 @@ ml_get_cursor(void)
curwin->w_cursor.col);
}
+// return length (excluding the NUL) of the given line
+ colnr_T
+ml_get_len(linenr_T lnum)
+{
+ return ml_get_buf_len(curbuf, lnum);
+}
+
+// return length (excluding the NUL) of the text after position "pos"
+ colnr_T
+ml_get_pos_len(pos_T *pos)
+{
+ return ml_get_buf_len(curbuf, pos->lnum) - pos->col;
+}
+
+// return length (excluding the NUL) of the cursor line
+ colnr_T
+ml_get_curline_len(void)
+{
+ return ml_get_buf_len(curbuf, curwin->w_cursor.lnum);
+}
+
+// return length (excluding the NUL) of the cursor position
+ colnr_T
+ml_get_cursor_len(void)
+{
+ return ml_get_buf_len(curbuf, curwin->w_cursor.lnum) - curwin->w_cursor.col;
+}
+
+// return length (excluding the NUL) of the given line in the given buffer
+ colnr_T
+ml_get_buf_len(buf_T *buf, linenr_T lnum)
+{
+ char_u *line;
+
+ if (*(line = ml_get_buf(buf, lnum, FALSE)) == NUL)
+ return 0;
+
+ if (buf->b_ml.ml_line_textlen <= 0)
+ buf->b_ml.ml_line_textlen = (int)STRLEN(line) + 1;
+ return buf->b_ml.ml_line_textlen - 1;
+}
+
/*
* Return a pointer to a line in a specific buffer
*
@@ -2706,6 +2748,7 @@ ml_get_buf(
errorret:
STRCPY(questions, "???");
buf->b_ml.ml_line_len = 4;
+ buf->b_ml.ml_line_textlen = buf->b_ml.ml_line_len;
buf->b_ml.ml_line_lnum = lnum;
return questions;
}
@@ -2715,6 +2758,7 @@ errorret:
if (buf->b_ml.ml_mfp == NULL) // there are no lines
{
buf->b_ml.ml_line_len = 1;
+ buf->b_ml.ml_line_textlen = buf->b_ml.ml_line_len;
return (char_u *)"";
}
@@ -2727,7 +2771,6 @@ errorret:
if (buf->b_ml.ml_line_lnum != lnum || mf_dont_release)
{
unsigned start, end;
- colnr_T len;
int idx;
ml_flush_line(buf);
@@ -2763,10 +2806,18 @@ errorret:
end = dp->db_txt_end;
else
end = ((dp->db_index[idx - 1]) & DB_INDEX_MASK);
- len = end - start;
buf->b_ml.ml_line_ptr = (char_u *)dp + start;
- buf->b_ml.ml_line_len = len;
+ buf->b_ml.ml_line_len = end - start;
+#if defined(FEAT_BYTEOFF) && defined(FEAT_PROP_POPUP)
+ // Text properties come after a NUL byte, so ml_line_len should be
+ // larger than the size of textprop_T if there is any.
+ if (buf->b_has_textprop
+ && (size_t)buf->b_ml.ml_line_len > sizeof(textprop_T))
+ buf->b_ml.ml_line_textlen = 0; // call STRLEN() later when needed
+ else
+#endif
+ buf->b_ml.ml_line_textlen = buf->b_ml.ml_line_len;
buf->b_ml.ml_line_lnum = lnum;
buf->b_ml.ml_flags &= ~(ML_LINE_DIRTY | ML_ALLOCATED);
}
@@ -3400,10 +3451,10 @@ ml_append_int(
#ifdef FEAT_NETBEANS_INTG
if (netbeans_active())
{
- if (STRLEN(line) > 0)
- netbeans_inserted(buf, lnum+1, (colnr_T)0, line, (int)STRLEN(line));
- netbeans_inserted(buf, lnum+1, (colnr_T)STRLEN(line),
- (char_u *)"\n", 1);
+ int line_len = (int)STRLEN(line);
+ if (line_len > 0)
+ netbeans_inserted(buf, lnum+1, (colnr_T)0, line, line_len);
+ netbeans_inserted(buf, lnum+1, (colnr_T)line_len, (char_u *)"\n", 1);
}
#endif
#ifdef FEAT_JOB_CHANNEL
@@ -3531,7 +3582,7 @@ ml_replace(linenr_T lnum, char_u *line, int copy)
* Replace a line for the current buffer. Like ml_replace() with:
* "len_arg" is the length of the text, excluding NUL.
* If "has_props" is TRUE then "line_arg" includes the text properties and
- * "len_arg" includes the NUL of the text.
+ * "len_arg" includes the NUL of the text and text properties.
* When "copy" is TRUE copy the text into allocated memory, otherwise
* "line_arg" must be allocated and will be consumed here.
*/
@@ -3571,7 +3622,7 @@ ml_replace_len(
#ifdef FEAT_NETBEANS_INTG
if (netbeans_active())
{
- netbeans_removed(curbuf, lnum, 0, (long)STRLEN(ml_get(lnum)));
+ netbeans_removed(curbuf, lnum, 0, (long)ml_get_len(lnum));
netbeans_inserted(curbuf, lnum, 0, line, (int)STRLEN(line));
}
#endif
@@ -3617,6 +3668,7 @@ ml_replace_len(
curbuf->b_ml.ml_line_ptr = line;
curbuf->b_ml.ml_line_len = len;
+ curbuf->b_ml.ml_line_textlen = !has_props ? len_arg + 1 : 0;
curbuf->b_ml.ml_line_lnum = lnum;
curbuf->b_ml.ml_flags = (curbuf->b_ml.ml_flags | ML_LINE_DIRTY) & ~ML_EMPTY;
@@ -5192,15 +5244,15 @@ findswapname(
{
char_u *name;
int dialog_result;
+ size_t len = STRLEN(_("Swap file \""));
name = alloc(STRLEN(fname)
- + STRLEN(_("Swap file \""))
+ + len
+ STRLEN(_("\" already exists!")) + 5);
if (name != NULL)
{
STRCPY(name, _("Swap file \""));
- home_replace(NULL, fname, name + STRLEN(name),
- 1000, TRUE);
+ home_replace(NULL, fname, name + len, 1000, TRUE);
STRCAT(name, _("\" already exists!"));
}
dialog_result = do_dialog(VIM_WARNING,
diff --git a/src/misc1.c b/src/misc1.c
index bf70e38..3085fc7 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -1404,9 +1404,6 @@ expand_env_esc(
int mustfree; // var was allocated, need to free it later
int at_start = TRUE; // at start of a name
int startstr_len = 0;
-#if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA)
- char_u *save_dst = dst;
-#endif
if (startstr != NULL)
startstr_len = (int)STRLEN(startstr);
@@ -1631,7 +1628,7 @@ expand_env_esc(
// with it, skip a character
if (after_pathsep(dst, dst + c)
#if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA)
- && (dst == save_dst || dst[-1] != ':')
+ && dst[c - 1] != ':'
#endif
&& vim_ispathsep(*tail))
++tail;
diff --git a/src/misc2.c b/src/misc2.c
index 169eb51..6df0d39 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -130,6 +130,7 @@ coladvance2(
colnr_T wcol = wcol_arg;
int idx;
char_u *line;
+ int linelen;
colnr_T col = 0;
int csize = 0;
int one_more;
@@ -142,10 +143,11 @@ coladvance2(
|| (VIsual_active && *p_sel != 'o')
|| ((get_ve_flags() & VE_ONEMORE) && wcol < MAXCOL);
line = ml_get_buf(curbuf, pos->lnum, FALSE);
+ linelen = ml_get_buf_len(curbuf, pos->lnum);
if (wcol >= MAXCOL)
{
- idx = (int)STRLEN(line) - 1 + one_more;
+ idx = linelen - 1 + one_more;
col = wcol;
if ((addspaces || finetune) && !VIsual_active)
@@ -255,7 +257,6 @@ coladvance2(
else
{
// Break a tab
- int linelen = (int)STRLEN(line);
int correct = wcol - col - csize + 1; // negative!!
char_u *newline;
int t, s = 0;
@@ -412,7 +413,7 @@ dec(pos_T *lp)
{
// past end of line
p = ml_get(lp->lnum);
- lp->col = (colnr_T)STRLEN(p);
+ lp->col = ml_get_len(lp->lnum);
if (has_mbyte)
lp->col -= (*mb_head_off)(p, p + lp->col);
return 0;
@@ -435,7 +436,7 @@ dec(pos_T *lp)
// there is a prior line
lp->lnum--;
p = ml_get(lp->lnum);
- lp->col = (colnr_T)STRLEN(p);
+ lp->col = ml_get_len(lp->lnum);
if (has_mbyte)
lp->col -= (*mb_head_off)(p, p + lp->col);
return 1;
@@ -515,7 +516,6 @@ get_cursor_rel_lnum(
void
check_pos(buf_T *buf, pos_T *pos)
{
- char_u *line;
colnr_T len;
if (pos->lnum > buf->b_ml.ml_line_count)
@@ -523,8 +523,7 @@ check_pos(buf_T *buf, pos_T *pos)
if (pos->col > 0)
{
- line = ml_get_buf(buf, pos->lnum, FALSE);
- len = (colnr_T)STRLEN(line);
+ len = ml_get_buf_len(buf, pos->lnum);
if (pos->col > len)
pos->col = len;
}
@@ -570,7 +569,7 @@ check_cursor_col_win(win_T *win)
colnr_T oldcoladd = win->w_cursor.col + win->w_cursor.coladd;
unsigned int cur_ve_flags = get_ve_flags();
- len = (colnr_T)STRLEN(ml_get_buf(win->w_buffer, win->w_cursor.lnum, FALSE));
+ len = ml_get_buf_len(win->w_buffer, win->w_cursor.lnum);
if (len == 0)
win->w_cursor.col = 0;
else if (win->w_cursor.col >= len)
@@ -649,7 +648,7 @@ check_visual_pos(void)
}
else
{
- int len = (int)STRLEN(ml_get(VIsual.lnum));
+ int len = ml_get_len(VIsual.lnum);
if (VIsual.col > len)
{
@@ -817,7 +816,7 @@ static struct modmasktable
{MOD_MASK_MULTI_CLICK, MOD_MASK_2CLICK, (char_u)'2'},
{MOD_MASK_MULTI_CLICK, MOD_MASK_3CLICK, (char_u)'3'},
{MOD_MASK_MULTI_CLICK, MOD_MASK_4CLICK, (char_u)'4'},
-#ifdef MACOS_X
+#if defined(MACOS_X) || defined(FEAT_GUI_GTK)
{MOD_MASK_CMD, MOD_MASK_CMD, (char_u)'D'},
#endif
// 'A' must be the last one
@@ -1130,7 +1129,7 @@ simplify_key(int key, int *modifiers)
int key0;
int key1;
- if (!(*modifiers & (MOD_MASK_SHIFT | MOD_MASK_CTRL | MOD_MASK_ALT)))
+ if (!(*modifiers & (MOD_MASK_SHIFT | MOD_MASK_CTRL)))
return key;
// TAB is a special case
@@ -1582,6 +1581,9 @@ may_remove_shift_modifier(int modifiers, int key)
{
if ((modifiers == MOD_MASK_SHIFT
|| modifiers == (MOD_MASK_SHIFT | MOD_MASK_ALT)
+#ifdef FEAT_GUI_GTK
+ || modifiers == (MOD_MASK_SHIFT | MOD_MASK_CMD)
+#endif
|| modifiers == (MOD_MASK_SHIFT | MOD_MASK_META))
&& ((key >= '!' && key <= '/')
|| (key >= ':' && key <= 'Z')
diff --git a/src/mouse.c b/src/mouse.c
index b283c64..af14af0 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -1696,7 +1696,7 @@ retnomove:
}
#if defined(FEAT_CLIPBOARD)
// Continue a modeless selection in another window.
- if (cmdwin_type != 0 && row < curwin->w_winrow)
+ if (cmdwin_type != 0 && row < cmdwin_win->w_winrow)
return IN_OTHER_WIN;
#endif
#ifdef FEAT_PROP_POPUP
@@ -1824,7 +1824,7 @@ retnomove:
# ifdef FEAT_RIGHTLEFT
wp->w_p_rl ? col < wp->w_width - wp->w_p_fdc :
# endif
- col >= wp->w_p_fdc + (cmdwin_type == 0 && wp == curwin ? 0 : 1)
+ col >= wp->w_p_fdc + (wp != cmdwin_win ? 0 : 1)
)
#endif
&& (flags & MOUSE_MAY_STOP_VIS))))
@@ -1832,7 +1832,7 @@ retnomove:
end_visual_mode_keep_button();
redraw_curbuf_later(UPD_INVERTED); // delete the inversion
}
- if (cmdwin_type != 0 && wp != curwin)
+ if (cmdwin_type != 0 && wp != cmdwin_win)
{
// A click outside the command-line window: Use modeless
// selection if possible. Allow dragging the status lines.
@@ -1844,7 +1844,7 @@ retnomove:
#else
row = 0;
col += wp->w_wincol;
- wp = curwin;
+ wp = cmdwin_win;
#endif
}
#if defined(FEAT_PROP_POPUP) && defined(FEAT_TERMINAL)
@@ -1937,7 +1937,7 @@ retnomove:
#if defined(FEAT_CLIPBOARD)
// Continue a modeless selection in another window.
- if (cmdwin_type != 0 && row < curwin->w_winrow)
+ if (cmdwin_type != 0 && row < cmdwin_win->w_winrow)
return IN_OTHER_WIN;
#endif
#ifdef FEAT_PROP_POPUP
@@ -2075,7 +2075,7 @@ retnomove:
# ifdef FEAT_RIGHTLEFT
curwin->w_p_rl ? col < curwin->w_width - curwin->w_p_fdc :
# endif
- col >= curwin->w_p_fdc + (cmdwin_type == 0 ? 0 : 1)
+ col >= curwin->w_p_fdc + (cmdwin_win != curwin ? 0 : 1)
)
mouse_char = ' ';
#endif
@@ -2098,35 +2098,7 @@ retnomove:
redraw_cmdline = TRUE; // show visual mode later
}
- if (col_from_screen == MAXCOL)
- {
- // When clicking after end of line, still need to set correct curswant
- int off_l = LineOffset[prev_row] + curwin->w_wincol;
- if (ScreenCols[off_l] < MAXCOL)
- {
- // Binary search to find last char in line
- int off_r = LineOffset[prev_row] + prev_col;
- int off_click = off_r;
- while (off_l < off_r)
- {
- int off_m = (off_l + off_r + 1) / 2;
- if (ScreenCols[off_m] < MAXCOL)
- off_l = off_m;
- else
- off_r = off_m - 1;
- }
- colnr_T eol_vcol = ScreenCols[off_r];
- if (eol_vcol < 0)
- // Empty line or whole line before w_leftcol,
- // with columns before buffer text
- eol_vcol = curwin->w_leftcol - 1;
- col = eol_vcol + (off_click - off_r);
- }
- else
- // Empty line or whole line before w_leftcol
- col = prev_col - curwin->w_wincol + curwin->w_leftcol;
- }
- else if (col_from_screen >= 0)
+ if (col_from_screen >= 0)
{
// Use the virtual column from ScreenCols[], it is accurate also after
// concealed characters.
@@ -2224,10 +2196,6 @@ nv_mousescroll(cmdarg_T *cap)
// Call the common mouse scroll function shared with other modes.
do_mousescroll(cap);
-#ifdef FEAT_SYN_HL
- if (curwin != old_curwin && curwin->w_p_cul)
- redraw_for_cursorline(curwin);
-#endif
curwin->w_redr_status = TRUE;
curwin = old_curwin;
curbuf = curwin->w_buffer;
diff --git a/src/move.c b/src/move.c
index 861d84b..9ea24c8 100644
--- a/src/move.c
+++ b/src/move.c
@@ -19,6 +19,7 @@
#include "vim.h"
+static void redraw_for_cursorline(win_T *wp);
static int scrolljump_value(void);
static int check_top_offset(void);
static void curs_rows(win_T *wp);
@@ -155,7 +156,7 @@ comp_botline(win_T *wp)
* Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
* set.
*/
- void
+ static void
redraw_for_cursorline(win_T *wp)
{
if ((wp->w_p_rnu
@@ -1067,7 +1068,7 @@ validate_cursor_col(void)
win_col_off(win_T *wp)
{
return (((wp->w_p_nu || wp->w_p_rnu) ? number_width(wp) + 1 : 0)
- + (cmdwin_type == 0 || wp != curwin ? 0 : 1)
+ + (wp != cmdwin_win ? 0 : 1)
#ifdef FEAT_FOLDING
+ wp->w_p_fdc
#endif
diff --git a/src/netbeans.c b/src/netbeans.c
index ebdf3a4..3b68869 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -932,7 +932,7 @@ nb_partialremove(linenr_T lnum, colnr_T first, colnr_T last)
int lastbyte = last;
oldtext = ml_get(lnum);
- oldlen = (int)STRLEN(oldtext);
+ oldlen = ml_get_len(lnum);
if (first >= (colnr_T)oldlen || oldlen == 0) // just in case
return;
if (lastbyte >= oldlen)
@@ -957,8 +957,8 @@ nb_joinlines(linenr_T first, linenr_T other)
int len_first, len_other;
char_u *p;
- len_first = (int)STRLEN(ml_get(first));
- len_other = (int)STRLEN(ml_get(other));
+ len_first = ml_get_len(first);
+ len_other = ml_get_len(other);
p = alloc(len_first + len_other + 1);
if (p == NULL)
return;
@@ -1285,8 +1285,7 @@ nb_do_cmd(
netbeansFireChanges = oldFire;
netbeansSuppressNoLines = oldSuppress;
- u_blockfree(buf->bufp);
- u_clearall(buf->bufp);
+ u_clearallandblockfree(buf->bufp);
}
nb_reply_nil(cmdno);
// =====================================================================
@@ -1403,7 +1402,7 @@ nb_do_cmd(
int col = pos == NULL ? 0 : pos->col;
// Insert halfway a line.
- newline = alloc(STRLEN(oldline) + len + 1);
+ newline = alloc(ml_get_len(lnum) + len + 1);
if (newline != NULL)
{
mch_memmove(newline, oldline, (size_t)col);
@@ -1456,8 +1455,7 @@ nb_do_cmd(
netbeansFireChanges = oldFire;
// Undo info is invalid now...
- u_blockfree(curbuf);
- u_clearall(curbuf);
+ u_clearallandblockfree(curbuf);
}
vim_free(to_free);
nb_reply_nil(cmdno); // or !error
@@ -3316,8 +3314,7 @@ get_buf_size(buf_T *bufp)
eol_size = 1;
for (lnum = 1; lnum <= bufp->b_ml.ml_line_count; ++lnum)
{
- char_count += (long)STRLEN(ml_get_buf(bufp, lnum, FALSE))
- + eol_size;
+ char_count += ml_get_buf_len(bufp, lnum) + eol_size;
// Check for a CTRL-C every 100000 characters
if (char_count > last_check)
{
diff --git a/src/normal.c b/src/normal.c
index fd89b00..5ef3a92 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -568,10 +568,10 @@ normal_cmd_get_more_chars(
++no_mapping;
// Vim may be in a different mode when the user types the next key,
// but when replaying a recording the next key is already in the
- // typeahead buffer, so record a <Nop> before that to prevent the
- // vpeekc() above from applying wrong mappings when replaying.
+ // typeahead buffer, so record an <Ignore> before that to prevent
+ // the vpeekc() above from applying wrong mappings when replaying.
++no_u_sync;
- gotchars_nop();
+ gotchars_ignore();
--no_u_sync;
}
}
@@ -3225,8 +3225,7 @@ nv_colon(cmdarg_T *cap)
clearop(cap->oap);
else if (cap->oap->op_type != OP_NOP
&& (cap->oap->start.lnum > curbuf->b_ml.ml_line_count
- || cap->oap->start.col >
- (colnr_T)STRLEN(ml_get(cap->oap->start.lnum))
+ || cap->oap->start.col > ml_get_len(cap->oap->start.lnum)
|| did_emsg
))
// The start of the operator has become invalid by the Ex command.
@@ -3675,7 +3674,7 @@ get_visual_text(
if (VIsual_mode == 'V')
{
*pp = ml_get_curline();
- *lenp = (int)STRLEN(*pp);
+ *lenp = (int)ml_get_curline_len();
}
else
{
@@ -4074,6 +4073,9 @@ nv_gotofile(cmdarg_T *cap)
return;
#endif
+ if (!check_can_set_curbuf_disabled())
+ return;
+
ptr = grab_file_name(cap->count1, &lnum);
if (ptr != NULL)
@@ -4476,7 +4478,8 @@ nv_brackets(cmdarg_T *cap)
SAFE_isupper(cap->nchar) ? ACTION_SHOW_ALL :
SAFE_islower(cap->nchar) ? ACTION_SHOW : ACTION_GOTO,
cap->cmdchar == ']' ? curwin->w_cursor.lnum + 1 : (linenr_T)1,
- (linenr_T)MAXLNUM);
+ (linenr_T)MAXLNUM,
+ FALSE);
vim_free(ptr);
curwin->w_set_curswant = TRUE;
}
@@ -4768,7 +4771,6 @@ nv_kundo(cmdarg_T *cap)
static void
nv_replace(cmdarg_T *cap)
{
- char_u *ptr;
int had_ctrl_v;
long n;
@@ -4835,9 +4837,8 @@ nv_replace(cmdarg_T *cap)
}
// Abort if not enough characters to replace.
- ptr = ml_get_cursor();
- if (STRLEN(ptr) < (unsigned)cap->count1
- || (has_mbyte && mb_charlen(ptr) < cap->count1))
+ if ((size_t)ml_get_cursor_len() < (unsigned)cap->count1
+ || (has_mbyte && mb_charlen(ml_get_cursor()) < cap->count1))
{
clearopbeep(cap->oap);
return;
@@ -4917,11 +4918,13 @@ nv_replace(cmdarg_T *cap)
}
else
{
+ char_u *ptr;
+
// Replace the characters within one line.
for (n = cap->count1; n > 0; --n)
{
- // Get ptr again, because u_save and/or showmatch() will have
- // released the line. This may also happen in ins_copychar().
+ // Get ptr again, because ins_copychar() and showmatch()
+ // will have released the line.
// At the same time we let know that the line will be changed.
if (cap->nchar == Ctrl_E || cap->nchar == Ctrl_Y)
{
@@ -4945,6 +4948,7 @@ nv_replace(cmdarg_T *cap)
if (netbeans_active())
{
colnr_T start = (colnr_T)(curwin->w_cursor.col - cap->count1);
+ ptr = ml_get_curline();
netbeans_removed(curbuf, curwin->w_cursor.lnum, start,
cap->count1);
@@ -5130,7 +5134,7 @@ n_swapchar(cmdarg_T *cap)
if (did_change)
{
ptr = ml_get(pos.lnum);
- count = (int)STRLEN(ptr) - pos.col;
+ count = (int)ml_get_len(pos.lnum) - pos.col;
netbeans_removed(curbuf, pos.lnum, pos.col,
(long)count);
// line may have been flushed, get it again
@@ -5919,7 +5923,7 @@ nv_gi_cmd(cmdarg_T *cap)
{
curwin->w_cursor = curbuf->b_last_insert;
check_cursor_lnum();
- i = (int)STRLEN(ml_get_curline());
+ i = (int)ml_get_curline_len();
if (curwin->w_cursor.col > (colnr_T)i)
{
if (virtual_active())
@@ -6717,7 +6721,7 @@ unadjust_for_sel(void)
else if (pp->lnum > 1)
{
--pp->lnum;
- pp->col = (colnr_T)STRLEN(ml_get(pp->lnum));
+ pp->col = ml_get_len(pp->lnum);
return TRUE;
}
}
@@ -7323,6 +7327,9 @@ nv_put_opt(cmdarg_T *cap, int fix_indent)
int dir;
int flags = 0;
int keep_registers = FALSE;
+#ifdef FEAT_FOLDING
+ int save_fen = curwin->w_p_fen;
+#endif
if (cap->oap->op_type != OP_NOP)
{
@@ -7388,6 +7395,12 @@ nv_put_opt(cmdarg_T *cap, int fix_indent)
reg1 = get_register(regname, TRUE);
}
+#ifdef FEAT_FOLDING
+ // Temporarily disable folding, as deleting a fold marker may cause
+ // the cursor to be included in a fold.
+ curwin->w_p_fen = FALSE;
+#endif
+
// Now delete the selected text. Avoid messages here.
cap->cmdchar = 'd';
cap->nchar = NUL;
@@ -7435,10 +7448,14 @@ nv_put_opt(cmdarg_T *cap, int fix_indent)
if (reg2 != NULL)
put_register(regname, reg2);
- // What to reselect with "gv"? Selecting the just put text seems to
- // be the most useful, since the original text was removed.
if (was_visual)
{
+#ifdef FEAT_FOLDING
+ if (save_fen)
+ curwin->w_p_fen = TRUE;
+#endif
+ // What to reselect with "gv"? Selecting the just put text seems to
+ // be the most useful, since the original text was removed.
curbuf->b_visual.vi_start = curbuf->b_op_start;
curbuf->b_visual.vi_end = curbuf->b_op_end;
// need to adjust cursor position
diff --git a/src/ops.c b/src/ops.c
index f6d765b..dbdf119 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -212,7 +212,7 @@ op_shift(oparg_T *oap, int curs_top, int amount)
// Set "'[" and "']" marks.
curbuf->b_op_start = oap->start;
curbuf->b_op_end.lnum = oap->end.lnum;
- curbuf->b_op_end.col = (colnr_T)STRLEN(ml_get(oap->end.lnum));
+ curbuf->b_op_end.col = ml_get_len(oap->end.lnum);
if (curbuf->b_op_end.col > 0)
--curbuf->b_op_end.col;
}
@@ -476,7 +476,7 @@ shift_block(oparg_T *oap, int amount)
STRMOVE(newp + (verbatim_copy_end - oldp) + fill, non_white);
}
// replace the line
- added = new_line_len - (int)STRLEN(oldp);
+ added = new_line_len - ml_get_curline_len();
ml_replace(curwin->w_cursor.lnum, newp, FALSE);
inserted_bytes(curwin->w_cursor.lnum, bd.textcol, added);
State = oldstate;
@@ -554,7 +554,7 @@ block_insert(
spaces = 0;
// Make sure the allocated size matches what is actually copied below.
- newp = alloc(STRLEN(oldp) + spaces + s_len
+ newp = alloc(ml_get_len(lnum) + spaces + s_len
+ (spaces > 0 && !bdp->is_short ? ts_val - spaces : 0)
+ count + 1);
if (newp == NULL)
@@ -800,7 +800,7 @@ op_delete(oparg_T *oap)
// Thus the number of characters may increase!
n = bd.textlen - bd.startspaces - bd.endspaces;
oldp = ml_get(lnum);
- newp = alloc(STRLEN(oldp) + 1 - n);
+ newp = alloc(ml_get_len(lnum) + 1 - n);
if (newp == NULL)
continue;
// copy up to deleted part
@@ -849,8 +849,8 @@ op_delete(oparg_T *oap)
}
else
beginline(0); // cursor in column 0
- truncate_line(FALSE); // delete the rest of the line
- // leave cursor past last char in line
+ truncate_line(FALSE); // delete the rest of the line,
+ // leaving cursor past last char in line
if (oap->line_count > 1)
u_clearline(); // "U" command not possible after "2cc"
}
@@ -920,8 +920,7 @@ op_delete(oparg_T *oap)
{
// fix up things for virtualedit-delete:
// break the tabs which are going to get in our way
- char_u *curline = ml_get_curline();
- int len = (int)STRLEN(curline);
+ int len = ml_get_curline_len();
if (oap->end.coladd != 0
&& (int)oap->end.col >= len - 1
@@ -990,13 +989,20 @@ setmarks:
static void
mb_adjust_opend(oparg_T *oap)
{
- char_u *p;
+ char_u *line;
+ char_u *ptr;
if (!oap->inclusive)
return;
- p = ml_get(oap->end.lnum);
- oap->end.col += mb_tail_off(p, p + oap->end.col);
+ line = ml_get(oap->end.lnum);
+ ptr = line + oap->end.col;
+ if (*ptr != NUL)
+ {
+ ptr -= (*mb_head_off)(line, ptr);
+ ptr += (*mb_ptr2len)(ptr) - 1;
+ oap->end.col = ptr - line;
+ }
}
/*
@@ -1109,7 +1115,7 @@ op_replace(oparg_T *oap, int c)
n += numc - bd.textlen;
oldp = ml_get_curline();
- oldlen = STRLEN(oldp);
+ oldlen = ml_get_curline_len();
newp = alloc(oldlen + 1 + n);
if (newp == NULL)
continue;
@@ -1167,7 +1173,7 @@ op_replace(oparg_T *oap, int c)
{
oap->start.col = 0;
curwin->w_cursor.col = 0;
- oap->end.col = (colnr_T)STRLEN(ml_get(oap->end.lnum));
+ oap->end.col = ml_get_len(oap->end.lnum);
if (oap->end.col)
--oap->end.col;
}
@@ -1313,7 +1319,7 @@ op_tilde(oparg_T *oap)
{
oap->start.col = 0;
pos.col = 0;
- oap->end.col = (colnr_T)STRLEN(ml_get(oap->end.lnum));
+ oap->end.col = ml_get_len(oap->end.lnum);
if (oap->end.col)
--oap->end.col;
}
@@ -1327,8 +1333,8 @@ op_tilde(oparg_T *oap)
for (;;)
{
did_change |= swapchars(oap->op_type, &pos,
- pos.lnum == oap->end.lnum ? oap->end.col + 1:
- (int)STRLEN(ml_get_pos(&pos)));
+ pos.lnum == oap->end.lnum ? oap->end.col + 1
+ : ml_get_pos_len(&pos));
if (LTOREQ_POS(oap->end, pos) || inc(&pos) == -1)
break;
}
@@ -1346,7 +1352,7 @@ op_tilde(oparg_T *oap)
while (pos.lnum < oap->end.lnum)
{
ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
- count = (int)STRLEN(ptr) - pos.col;
+ count = ml_get_buf_len(curbuf, pos.lnum) - pos.col;
netbeans_removed(curbuf, pos.lnum, pos.col, (long)count);
// get the line again, it may have been flushed
ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
@@ -1431,18 +1437,19 @@ swapchar(int op_type, pos_T *pos)
if (c >= 0x80 && op_type == OP_ROT13)
return FALSE;
- if (op_type == OP_UPPER && c == 0xdf
- && (enc_latin1like || STRCMP(p_enc, "iso-8859-2") == 0))
+ // ~ is OP_NOP, g~ is OP_TILDE, gU is OP_UPPER
+ if ((op_type == OP_UPPER || op_type == OP_NOP || op_type == OP_TILDE)
+ && c == 0xdf
+ && (enc_latin1like || STRCMP(p_enc, "iso-8859-2") == 0))
{
pos_T sp = curwin->w_cursor;
- // Special handling of German sharp s: change to "SS".
+ // Special handling for lowercase German sharp s (ß): convert to uppercase (ẞ).
curwin->w_cursor = *pos;
del_char(FALSE);
- ins_char('S');
- ins_char('S');
+ ins_char(0x1E9E);
curwin->w_cursor = sp;
- inc(pos);
+ return TRUE;
}
if (enc_dbcs != 0 && c >= 0x100) // No lower/uppercase letter
@@ -1487,16 +1494,13 @@ swapchar(int op_type, pos_T *pos)
void
op_insert(oparg_T *oap, long count1)
{
- long ins_len, pre_textlen = 0;
- char_u *firstline, *ins_text;
+ long pre_textlen = 0;
colnr_T ind_pre_col = 0, ind_post_col;
int ind_pre_vcol = 0, ind_post_vcol = 0;
struct block_def bd;
int i;
pos_T t1;
pos_T start_insert;
- // offset when cursor was moved in insert mode
- int offset = 0;
// edit() changes this - record it for OP_APPEND
bd.is_MAX = (curwin->w_curswant == MAXCOL);
@@ -1533,11 +1537,9 @@ op_insert(oparg_T *oap, long count1)
// Get indent information
ind_pre_col = (colnr_T)getwhitecols_curline();
ind_pre_vcol = get_indent();
- firstline = ml_get(oap->start.lnum) + bd.textcol;
-
+ pre_textlen = ml_get_len(oap->start.lnum) - bd.textcol;
if (oap->op_type == OP_APPEND)
- firstline += bd.textlen;
- pre_textlen = (long)STRLEN(firstline);
+ pre_textlen -= bd.textlen;
}
if (oap->op_type == OP_APPEND)
@@ -1591,10 +1593,14 @@ op_insert(oparg_T *oap, long count1)
if (oap->block_mode)
{
+ long ins_len;
+ char_u *firstline, *ins_text;
struct block_def bd2;
int did_indent = FALSE;
size_t len;
int add;
+ // offset when cursor was moved in insert mode
+ int offset = 0;
// If indent kicked in, the firstline might have changed
// but only do that, if the indent actually increased.
@@ -1678,7 +1684,7 @@ op_insert(oparg_T *oap, long count1)
* copy of the required string.
*/
firstline = ml_get(oap->start.lnum);
- len = STRLEN(firstline);
+ len = ml_get_len(oap->start.lnum);
add = bd.textcol;
if (oap->op_type == OP_APPEND)
{
@@ -1698,11 +1704,10 @@ op_insert(oparg_T *oap, long count1)
}
}
if ((size_t)add > len)
- firstline += len; // short line, point to the NUL
- else
- firstline += add;
- if (pre_textlen >= 0 && (ins_len =
- (long)STRLEN(firstline) - pre_textlen - offset) > 0)
+ add = len; // short line, point to the NUL
+ firstline += add;
+ len -= add;
+ if (pre_textlen >= 0 && (ins_len = len - pre_textlen - offset) > 0)
{
ins_text = vim_strnsave(firstline, ins_len);
if (ins_text != NULL)
@@ -1770,7 +1775,7 @@ op_change(oparg_T *oap)
|| gchar_cursor() == NUL))
coladvance_force(getviscol());
firstline = ml_get(oap->start.lnum);
- pre_textlen = (long)STRLEN(firstline);
+ pre_textlen = ml_get_len(oap->start.lnum);
pre_indent = (long)getwhitecols(firstline);
bd.textcol = curwin->w_cursor.col;
}
@@ -1804,7 +1809,7 @@ op_change(oparg_T *oap)
bd.textcol += new_indent - pre_indent;
}
- ins_len = (long)STRLEN(firstline) - pre_textlen;
+ ins_len = ml_get_len(oap->start.lnum) - pre_textlen;
if (ins_len > 0)
{
// Subsequent calls to ml_get() flush the firstline data - take a
@@ -1830,7 +1835,8 @@ op_change(oparg_T *oap)
else
vpos.coladd = 0;
oldp = ml_get(linenr);
- newp = alloc(STRLEN(oldp) + vpos.coladd + ins_len + 1);
+ newp = alloc(ml_get_len(linenr)
+ + vpos.coladd + ins_len + 1);
if (newp == NULL)
continue;
// copy up to block start
@@ -2414,6 +2420,84 @@ block_prep(
}
/*
+ * Get block text from "start" to "end"
+ */
+ void
+charwise_block_prep(
+ pos_T start,
+ pos_T end,
+ struct block_def *bdp,
+ linenr_T lnum,
+ int inclusive)
+{
+ colnr_T startcol = 0, endcol = MAXCOL;
+ int is_oneChar = FALSE;
+ colnr_T cs, ce;
+ char_u *p;
+
+ p = ml_get(lnum);
+ bdp->startspaces = 0;
+ bdp->endspaces = 0;
+
+ if (lnum == start.lnum)
+ {
+ startcol = start.col;
+ if (virtual_op)
+ {
+ getvcol(curwin, &start, &cs, NULL, &ce);
+ if (ce != cs && start.coladd > 0)
+ {
+ // Part of a tab selected -- but don't
+ // double-count it.
+ bdp->startspaces = (ce - cs + 1)
+ - start.coladd;
+ if (bdp->startspaces < 0)
+ bdp->startspaces = 0;
+ startcol++;
+ }
+ }
+ }
+
+ if (lnum == end.lnum)
+ {
+ endcol = end.col;
+ if (virtual_op)
+ {
+ getvcol(curwin, &end, &cs, NULL, &ce);
+ if (p[endcol] == NUL || (cs + end.coladd < ce
+ // Don't add space for double-wide
+ // char; endcol will be on last byte
+ // of multi-byte char.
+ && (*mb_head_off)(p, p + endcol) == 0))
+ {
+ if (start.lnum == end.lnum
+ && start.col == end.col)
+ {
+ // Special case: inside a single char
+ is_oneChar = TRUE;
+ bdp->startspaces = end.coladd
+ - start.coladd + inclusive;
+ endcol = startcol;
+ }
+ else
+ {
+ bdp->endspaces = end.coladd
+ + inclusive;
+ endcol -= inclusive;
+ }
+ }
+ }
+ }
+ if (endcol == MAXCOL)
+ endcol = ml_get_len(lnum);
+ if (startcol > endcol || is_oneChar)
+ bdp->textlen = 0;
+ else
+ bdp->textlen = endcol - startcol + inclusive;
+ bdp->textstart = p + startcol;
+}
+
+/*
* Handle the add/subtract operator.
*/
void
@@ -2479,13 +2563,13 @@ op_addsub(
{
curwin->w_cursor.col = 0;
pos.col = 0;
- length = (colnr_T)STRLEN(ml_get(pos.lnum));
+ length = ml_get_len(pos.lnum);
}
else // oap->motion_type == MCHAR
{
if (pos.lnum == oap->start.lnum && !oap->inclusive)
dec(&(oap->end));
- length = (colnr_T)STRLEN(ml_get(pos.lnum));
+ length = ml_get_len(pos.lnum);
pos.col = 0;
if (pos.lnum == oap->start.lnum)
{
@@ -2494,7 +2578,7 @@ op_addsub(
}
if (pos.lnum == oap->end.lnum)
{
- length = (int)STRLEN(ml_get(oap->end.lnum));
+ length = ml_get_len(oap->end.lnum);
if (oap->end.col >= length)
oap->end.col = length - 1;
length = oap->end.col - pos.col + 1;
@@ -2566,6 +2650,7 @@ do_addsub(
uvarnumber_T n;
uvarnumber_T oldn;
char_u *ptr;
+ int linelen;
int c;
int todel;
int do_hex;
@@ -2599,9 +2684,10 @@ do_addsub(
curwin->w_cursor = *pos;
ptr = ml_get(pos->lnum);
+ linelen = ml_get_len(pos->lnum);
col = pos->col;
- if (*ptr == NUL || col + !!save_coladd >= (int)STRLEN(ptr))
+ if (col + !!save_coladd >= linelen)
goto theend;
/*
@@ -2781,8 +2867,7 @@ do_addsub(
// get the number value (unsigned)
if (visual && VIsual_mode != 'V')
maxlen = (curbuf->b_visual.vi_curswant == MAXCOL
- ? (int)STRLEN(ptr) - col
- : length);
+ ? linelen - col : length);
int overflow = FALSE;
vim_str2nr(ptr + col, &pre, &length,
@@ -2962,14 +3047,12 @@ do_addsub(
// del_char() will also mark line needing displaying
if (todel > 0)
{
- int bytes_after = (int)STRLEN(ml_get_curline())
- - curwin->w_cursor.col;
+ int bytes_after = ml_get_curline_len() - curwin->w_cursor.col;
// Delete the one character before the insert.
curwin->w_cursor = save_pos;
(void)del_char(FALSE);
- curwin->w_cursor.col = (colnr_T)(STRLEN(ml_get_curline())
- - bytes_after);
+ curwin->w_cursor.col = ml_get_curline_len() - bytes_after;
--todel;
}
while (todel-- > 0)
@@ -3275,7 +3358,7 @@ cursor_pos_info(dict_T *dict)
validate_virtcol();
col_print(buf1, sizeof(buf1), (int)curwin->w_cursor.col + 1,
(int)curwin->w_virtcol + 1);
- col_print(buf2, sizeof(buf2), (int)STRLEN(p),
+ col_print(buf2, sizeof(buf2), ml_get_curline_len(),
linetabsize_str(p));
if (char_count_cursor == byte_count_cursor
@@ -3772,13 +3855,12 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
if (LT_POS(VIsual, curwin->w_cursor))
{
VIsual.col = 0;
- curwin->w_cursor.col =
- (colnr_T)STRLEN(ml_get(curwin->w_cursor.lnum));
+ curwin->w_cursor.col = ml_get_len(curwin->w_cursor.lnum);
}
else
{
curwin->w_cursor.col = 0;
- VIsual.col = (colnr_T)STRLEN(ml_get(VIsual.lnum));
+ VIsual.col = ml_get_len(VIsual.lnum);
}
VIsual_mode = 'v';
}
@@ -3809,7 +3891,7 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
|| oap->motion_type == MLINE)
&& hasFolding(curwin->w_cursor.lnum, NULL,
&curwin->w_cursor.lnum))
- curwin->w_cursor.col = (colnr_T)STRLEN(ml_get_curline());
+ curwin->w_cursor.col = ml_get_curline_len();
}
#endif
oap->end = curwin->w_cursor;
@@ -3830,7 +3912,7 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
NULL))
curwin->w_cursor.col = 0;
if (hasFolding(oap->start.lnum, NULL, &oap->start.lnum))
- oap->start.col = (colnr_T)STRLEN(ml_get(oap->start.lnum));
+ oap->start.col = ml_get_len(oap->start.lnum);
}
#endif
oap->end = oap->start;
@@ -4040,7 +4122,7 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
oap->motion_type = MLINE;
else
{
- oap->end.col = (colnr_T)STRLEN(ml_get(oap->end.lnum));
+ oap->end.col = ml_get_len(oap->end.lnum);
if (oap->end.col)
{
--oap->end.col;
diff --git a/src/option.c b/src/option.c
index 2372c1a..8123a2a 100644
--- a/src/option.c
+++ b/src/option.c
@@ -450,9 +450,10 @@ set_init_default_encoding(void)
char_u *p;
int opt_idx;
-# ifdef MSWIN
+# if defined(MSWIN) || defined(__MVS__)
// MS-Windows has builtin support for conversion to and from Unicode, using
// "utf-8" for 'encoding' should work best for most users.
+ // z/OS built should default to UTF-8 mode as setlocale does not respect utf-8 environment variable locales
p = vim_strsave((char_u *)ENC_DFLT);
# else
// enc_locale() will try to find the encoding of the current locale.
@@ -2857,10 +2858,10 @@ didset_options2(void)
check_opt_wim();
// Parse default for 'listchars'.
- (void)set_listchars_option(curwin, curwin->w_p_lcs, TRUE);
+ (void)set_listchars_option(curwin, curwin->w_p_lcs, TRUE, NULL, 0);
// Parse default for 'fillchars'.
- (void)set_fillchars_option(curwin, curwin->w_p_fcs, TRUE);
+ (void)set_fillchars_option(curwin, curwin->w_p_fcs, TRUE, NULL, 0);
#ifdef FEAT_CLIPBOARD
// Parse default for 'clipboard'
@@ -3268,27 +3269,6 @@ did_set_binary(optset_T *args)
return NULL;
}
-#if defined(FEAT_LINEBREAK) || defined(PROTO)
-/*
- * Called when the 'breakat' option changes value.
- */
- char *
-did_set_breakat(optset_T *args UNUSED)
-{
- char_u *p;
- int i;
-
- for (i = 0; i < 256; i++)
- breakat_flags[i] = FALSE;
-
- if (p_breakat != NULL)
- for (p = p_breakat; *p; p++)
- breakat_flags[*p] = TRUE;
-
- return NULL;
-}
-#endif
-
/*
* Process the updated 'buflisted' option value.
*/
@@ -4616,8 +4596,10 @@ set_bool_option(
#endif
comp_col(); // in case 'ruler' or 'showcmd' changed
+
if (curwin->w_curswant != MAXCOL
- && (options[opt_idx].flags & (P_CURSWANT | P_RALL)) != 0)
+ && (options[opt_idx].flags & (P_CURSWANT | P_RALL)) != 0
+ && (options[opt_idx].flags & P_HLONLY) == 0)
curwin->w_set_curswant = TRUE;
if ((opt_flags & OPT_NO_REDRAW) == 0)
@@ -4859,9 +4841,12 @@ set_num_option(
#endif
comp_col(); // in case 'columns' or 'ls' changed
+
if (curwin->w_curswant != MAXCOL
- && (options[opt_idx].flags & (P_CURSWANT | P_RALL)) != 0)
+ && (options[opt_idx].flags & (P_CURSWANT | P_RALL)) != 0
+ && (options[opt_idx].flags & P_HLONLY) == 0)
curwin->w_set_curswant = TRUE;
+
if ((opt_flags & OPT_NO_REDRAW) == 0)
check_redraw(options[opt_idx].flags);
@@ -4882,11 +4867,14 @@ check_redraw(long_u flags)
status_redraw_all();
if ((flags & P_RBUF) || (flags & P_RWIN) || all)
- changed_window_setting();
+ {
+ if (flags & P_HLONLY)
+ redraw_later(UPD_NOT_VALID);
+ else
+ changed_window_setting();
+ }
if (flags & P_RBUF)
redraw_curbuf_later(UPD_NOT_VALID);
- if (flags & P_RWINONLY)
- redraw_later(UPD_NOT_VALID);
if (doclear)
redraw_all_later(UPD_CLEAR);
else if (all)
@@ -6218,12 +6206,14 @@ unset_global_local_option(char_u *name, void *from)
break;
case PV_LCS:
clear_string_option(&((win_T *)from)->w_p_lcs);
- set_listchars_option((win_T *)from, ((win_T *)from)->w_p_lcs, TRUE);
+ set_listchars_option((win_T *)from, ((win_T *)from)->w_p_lcs, TRUE,
+ NULL, 0);
redraw_later(UPD_NOT_VALID);
break;
case PV_FCS:
clear_string_option(&((win_T *)from)->w_p_fcs);
- set_fillchars_option((win_T *)from, ((win_T *)from)->w_p_fcs, TRUE);
+ set_fillchars_option((win_T *)from, ((win_T *)from)->w_p_fcs, TRUE,
+ NULL, 0);
redraw_later(UPD_NOT_VALID);
break;
case PV_VE:
@@ -6430,6 +6420,7 @@ get_varp(struct vimoption *p)
#ifdef FEAT_LINEBREAK
case PV_NUW: return (char_u *)&(curwin->w_p_nuw);
#endif
+ case PV_WFB: return (char_u *)&(curwin->w_p_wfb);
case PV_WFH: return (char_u *)&(curwin->w_p_wfh);
case PV_WFW: return (char_u *)&(curwin->w_p_wfw);
#if defined(FEAT_QUICKFIX)
@@ -6629,8 +6620,8 @@ after_copy_winopt(win_T *wp)
fill_culopt_flags(NULL, wp);
check_colorcolumn(wp);
#endif
- set_listchars_option(wp, wp->w_p_lcs, TRUE);
- set_fillchars_option(wp, wp->w_p_fcs, TRUE);
+ set_listchars_option(wp, wp->w_p_lcs, TRUE, NULL, 0);
+ set_fillchars_option(wp, wp->w_p_fcs, TRUE, NULL, 0);
}
static char_u *
diff --git a/src/option.h b/src/option.h
index 646056b..bf889e4 100644
--- a/src/option.h
+++ b/src/option.h
@@ -38,8 +38,8 @@
#define P_RSTAT 0x1000 // redraw status lines
#define P_RWIN 0x2000 // redraw current window and recompute text
#define P_RBUF 0x4000 // redraw current buffer and recompute text
-#define P_RALL 0x6000 // redraw all windows
-#define P_RCLR 0x7000 // clear and redraw all
+#define P_RALL 0x6000 // redraw all windows and recompute text
+#define P_RCLR 0x7000 // clear and redraw all and recompute text
#define P_COMMA 0x8000 // comma separated list
#define P_ONECOMMA 0x18000L // P_COMMA and cannot have two consecutive
@@ -58,7 +58,7 @@
#define P_CURSWANT 0x4000000L // update curswant required; not needed when
// there is a redraw flag
#define P_NDNAME 0x8000000L // only normal dir name chars allowed
-#define P_RWINONLY 0x10000000L // only redraw current window
+#define P_HLONLY 0x10000000L // option only changes highlight, not text
#define P_MLE 0x20000000L // under control of 'modelineexpr'
#define P_FUNC 0x40000000L // accept a function reference or a lambda
#define P_COLON 0x80000000L // values use colons to create sublists
@@ -130,7 +130,7 @@ typedef enum {
#define ENC_UCSBOM "ucs-bom" // check for BOM at start of file
// default value for 'encoding'
-#ifdef MSWIN
+#if defined(MSWIN) || defined(__MVS__)
# define ENC_DFLT "utf-8"
#else
# define ENC_DFLT "latin1"
@@ -637,7 +637,7 @@ EXTERN char_u *p_guifontset; // 'guifontset'
EXTERN char_u *p_guifontwide; // 'guifontwide'
EXTERN int p_guipty; // 'guipty'
#endif
-#ifdef FEAT_GUI_GTK
+#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)
EXTERN char_u *p_guiligatures; // 'guiligatures'
# endif
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
@@ -1309,6 +1309,7 @@ enum
#ifdef FEAT_STL_OPT
, WV_STL
#endif
+ , WV_WFB
, WV_WFH
, WV_WFW
, WV_WRAP
diff --git a/src/optiondefs.h b/src/optiondefs.h
index 783b851..4ee2e20 100644
--- a/src/optiondefs.h
+++ b/src/optiondefs.h
@@ -215,6 +215,7 @@
# define PV_STL OPT_BOTH(OPT_WIN(WV_STL))
#endif
#define PV_UL OPT_BOTH(OPT_BUF(BV_UL))
+# define PV_WFB OPT_WIN(WV_WFB)
# define PV_WFH OPT_WIN(WV_WFH)
# define PV_WFW OPT_WIN(WV_WFW)
#define PV_WRAP OPT_WIN(WV_WRAP)
@@ -402,7 +403,7 @@ static struct vimoption options[] =
{"autowriteall","awa", P_BOOL|P_VI_DEF,
(char_u *)&p_awa, PV_NONE, NULL, NULL,
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
- {"background", "bg", P_STRING|P_VI_DEF|P_RCLR,
+ {"background", "bg", P_STRING|P_VI_DEF|P_RCLR|P_HLONLY,
(char_u *)&p_bg, PV_NONE, did_set_background, expand_set_background,
{
#if (defined(MSWIN)) && !defined(FEAT_GUI)
@@ -609,7 +610,7 @@ static struct vimoption options[] =
{"cmdwinheight", "cwh", P_NUM|P_VI_DEF,
(char_u *)&p_cwh, PV_NONE, NULL, NULL,
{(char_u *)7L, (char_u *)0L} SCTX_INIT},
- {"colorcolumn", "cc", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_RWIN,
+ {"colorcolumn", "cc", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_RWIN|P_HLONLY,
#ifdef FEAT_SYN_HL
(char_u *)VAR_WIN, PV_CC, did_set_colorcolumn, NULL,
#else
@@ -774,21 +775,21 @@ static struct vimoption options[] =
{"cursorbind", "crb", P_BOOL|P_VI_DEF,
(char_u *)VAR_WIN, PV_CRBIND, NULL, NULL,
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
- {"cursorcolumn", "cuc", P_BOOL|P_VI_DEF|P_RWINONLY,
+ {"cursorcolumn", "cuc", P_BOOL|P_VI_DEF|P_RWIN|P_HLONLY,
#ifdef FEAT_SYN_HL
(char_u *)VAR_WIN, PV_CUC, NULL, NULL,
#else
(char_u *)NULL, PV_NONE, NULL, NULL,
#endif
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
- {"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWINONLY,
+ {"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWIN|P_HLONLY,
#ifdef FEAT_SYN_HL
(char_u *)VAR_WIN, PV_CUL, NULL, NULL,
#else
(char_u *)NULL, PV_NONE, NULL, NULL,
#endif
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
- {"cursorlineopt", "culopt", P_STRING|P_VI_DEF|P_RWIN|P_ONECOMMA|P_NODUP,
+ {"cursorlineopt", "culopt", P_STRING|P_VI_DEF|P_RWIN|P_HLONLY|P_ONECOMMA|P_NODUP,
#ifdef FEAT_SYN_HL
(char_u *)VAR_WIN, PV_CULOPT,
did_set_cursorlineopt, expand_set_cursorlineopt,
@@ -1212,7 +1213,7 @@ static struct vimoption options[] =
{(char_u *)50L, (char_u *)0L} SCTX_INIT},
{"guiligatures", "gli", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP,
-#if defined(FEAT_GUI_GTK)
+#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)
(char_u *)&p_guiligatures, PV_NONE,
did_set_guiligatures, NULL,
{(char_u *)"", (char_u *)0L}
@@ -1304,7 +1305,7 @@ static struct vimoption options[] =
(char_u *)NULL, PV_NONE, NULL, NULL,
#endif
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
- {"hlsearch", "hls", P_BOOL|P_VI_DEF|P_VIM|P_RALL,
+ {"hlsearch", "hls", P_BOOL|P_VI_DEF|P_VIM|P_RALL|P_HLONLY,
#if defined(FEAT_SEARCH_EXTRA)
(char_u *)&p_hls, PV_NONE, did_set_hlsearch, NULL,
#else
@@ -2350,14 +2351,14 @@ static struct vimoption options[] =
{"sourceany", NULL, P_BOOL|P_VI_DEF,
(char_u *)NULL, PV_NONE, NULL, NULL,
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
- {"spell", NULL, P_BOOL|P_VI_DEF|P_RWIN,
+ {"spell", NULL, P_BOOL|P_VI_DEF|P_RWIN|P_HLONLY,
#ifdef FEAT_SPELL
(char_u *)VAR_WIN, PV_SPELL, did_set_spell, NULL,
#else
(char_u *)NULL, PV_NONE, NULL, NULL,
#endif
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
- {"spellcapcheck", "spc", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF,
+ {"spellcapcheck", "spc", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_HLONLY,
#ifdef FEAT_SPELL
(char_u *)&p_spc, PV_SPC, did_set_spellcapcheck, NULL,
{(char_u *)"[.?!]\\_[\\])'\" ]\\+", (char_u *)0L}
@@ -2377,7 +2378,7 @@ static struct vimoption options[] =
#endif
SCTX_INIT},
{"spelllang", "spl", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA
- |P_RBUF|P_EXPAND,
+ |P_RBUF|P_HLONLY|P_EXPAND,
#ifdef FEAT_SPELL
(char_u *)&p_spl, PV_SPL, did_set_spelllang, NULL,
{(char_u *)"en", (char_u *)0L}
@@ -2387,7 +2388,7 @@ static struct vimoption options[] =
#endif
SCTX_INIT},
{"spelloptions", "spo", P_STRING|P_ALLOCED|P_VI_DEF
- |P_ONECOMMA|P_NODUP|P_RBUF,
+ |P_ONECOMMA|P_NODUP|P_RBUF|P_HLONLY,
#ifdef FEAT_SPELL
(char_u *)&p_spo, PV_SPO, did_set_spelloptions, expand_set_spelloptions,
{(char_u *)"", (char_u *)0L}
@@ -2596,7 +2597,7 @@ static struct vimoption options[] =
(char_u *)FALSE,
#endif
(char_u *)0L} SCTX_INIT},
- {"textwidth", "tw", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
+ {"textwidth", "tw", P_NUM|P_VI_DEF|P_VIM|P_RBUF|P_HLONLY,
(char_u *)&p_tw, PV_TW, did_set_textwidth, NULL,
{(char_u *)0L, (char_u *)0L} SCTX_INIT},
{"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME,
@@ -2850,6 +2851,9 @@ static struct vimoption options[] =
{"window", "wi", P_NUM|P_VI_DEF,
(char_u *)&p_window, PV_NONE, did_set_window, NULL,
{(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"winfixbuf", "wfb", P_BOOL|P_VI_DEF|P_RWIN,
+ (char_u *)VAR_WIN, PV_WFB, NULL, NULL,
+ {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
{"winfixheight", "wfh", P_BOOL|P_VI_DEF|P_RSTAT,
(char_u *)VAR_WIN, PV_WFH, NULL, NULL,
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
@@ -2931,6 +2935,7 @@ static struct vimoption options[] =
p_term("t_cd", T_CD)
p_term("t_ce", T_CE)
p_term("t_Ce", T_UCE)
+ p_term("t_CF", T_CFO)
p_term("t_cl", T_CL)
p_term("t_cm", T_CM)
p_term("t_Co", T_CCO)
diff --git a/src/optionstr.c b/src/optionstr.c
index 65a80af..e5f4946 100644
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -233,7 +233,7 @@ illegal_char(char *errbuf, size_t errbuflen, int c)
{
if (errbuf == NULL)
return "";
- vim_snprintf((char *)errbuf, errbuflen, _(e_illegal_character_str),
+ vim_snprintf(errbuf, errbuflen, _(e_illegal_character_str),
(char *)transchar(c));
return errbuf;
}
@@ -1208,6 +1208,25 @@ expand_set_belloff(optexpand_T *args, int *numMatches, char_u ***matches)
#if defined(FEAT_LINEBREAK) || defined(PROTO)
/*
+ * The 'breakat' option is changed.
+ */
+ char *
+did_set_breakat(optset_T *args UNUSED)
+{
+ char_u *p;
+ int i;
+
+ for (i = 0; i < 256; i++)
+ breakat_flags[i] = FALSE;
+
+ if (p_breakat != NULL)
+ for (p = p_breakat; *p; p++)
+ breakat_flags[*p] = TRUE;
+
+ return NULL;
+}
+
+/*
* The 'breakindentopt' option is changed.
*/
char *
@@ -1350,7 +1369,8 @@ expand_set_clipboard(optexpand_T *args, int *numMatches, char_u ***matches)
* The global 'listchars' or 'fillchars' option is changed.
*/
static char *
-did_set_global_listfillchars(char_u *val, int opt_lcs, int opt_flags)
+did_set_global_listfillchars(char_u *val, int opt_lcs, int opt_flags,
+ char *errbuf, size_t errbuflen)
{
char *errmsg = NULL;
char_u **local_ptr = opt_lcs ? &curwin->w_p_lcs : &curwin->w_p_fcs;
@@ -1359,10 +1379,12 @@ did_set_global_listfillchars(char_u *val, int opt_lcs, int opt_flags)
// local value
if (opt_lcs)
errmsg = set_listchars_option(curwin, val,
- **local_ptr == NUL || !(opt_flags & OPT_GLOBAL));
+ **local_ptr == NUL || !(opt_flags & OPT_GLOBAL),
+ errbuf, errbuflen);
else
errmsg = set_fillchars_option(curwin, val,
- **local_ptr == NUL || !(opt_flags & OPT_GLOBAL));
+ **local_ptr == NUL || !(opt_flags & OPT_GLOBAL),
+ errbuf, errbuflen);
if (errmsg != NULL)
return errmsg;
@@ -1382,12 +1404,12 @@ did_set_global_listfillchars(char_u *val, int opt_lcs, int opt_flags)
if (opt_lcs)
{
if (*wp->w_p_lcs == NUL)
- (void)set_listchars_option(wp, wp->w_p_lcs, TRUE);
+ (void)set_listchars_option(wp, wp->w_p_lcs, TRUE, NULL, 0);
}
else
{
if (*wp->w_p_fcs == NUL)
- (void)set_fillchars_option(wp, wp->w_p_fcs, TRUE);
+ (void)set_fillchars_option(wp, wp->w_p_fcs, TRUE, NULL, 0);
}
}
@@ -1408,11 +1430,13 @@ did_set_chars_option(optset_T *args)
if ( varp == &p_lcs // global 'listchars'
|| varp == &p_fcs) // global 'fillchars'
errmsg = did_set_global_listfillchars(*varp, varp == &p_lcs,
- args->os_flags);
+ args->os_flags, args->os_errbuf, args->os_errbuflen);
else if (varp == &curwin->w_p_lcs) // local 'listchars'
- errmsg = set_listchars_option(curwin, *varp, TRUE);
+ errmsg = set_listchars_option(curwin, *varp, TRUE,
+ args->os_errbuf, args->os_errbuflen);
else if (varp == &curwin->w_p_fcs) // local 'fillchars'
- errmsg = set_fillchars_option(curwin, *varp, TRUE);
+ errmsg = set_fillchars_option(curwin, *varp, TRUE,
+ args->os_errbuf, args->os_errbuflen);
return errmsg;
}
@@ -2414,7 +2438,7 @@ did_set_guifontwide(optset_T *args UNUSED)
}
#endif
-#if defined(FEAT_GUI_GTK) || defined(PROTO)
+#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) || defined(PROTO)
/*
* The 'guiligatures' option is changed.
*/
@@ -3416,7 +3440,12 @@ did_set_showbreak(optset_T *args)
char *
did_set_showcmdloc(optset_T *args UNUSED)
{
- return did_set_opt_strings(p_sloc, p_sloc_values, FALSE);
+ char *errmsg = did_set_opt_strings(p_sloc, p_sloc_values, FALSE);
+
+ if (errmsg == NULL)
+ comp_col();
+
+ return errmsg;
}
int
@@ -4486,7 +4515,8 @@ did_set_string_option(
#endif
if (curwin->w_curswant != MAXCOL
- && (get_option_flags(opt_idx) & (P_CURSWANT | P_RALL)) != 0)
+ && (get_option_flags(opt_idx) & (P_CURSWANT | P_RALL)) != 0
+ && (get_option_flags(opt_idx) & P_HLONLY) == 0)
curwin->w_set_curswant = TRUE;
if ((opt_flags & OPT_NO_REDRAW) == 0)
@@ -4505,7 +4535,7 @@ did_set_string_option(
|| varp == &p_guifontset // 'guifontset'
# endif
|| varp == &p_guifontwide // 'guifontwide'
-# ifdef FEAT_GUI_GTK
+# if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)
|| varp == &p_guiligatures // 'guiligatures'
# endif
)
diff --git a/src/os_mswin.c b/src/os_mswin.c
index 21b7db3..512fa40 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -2747,19 +2747,22 @@ quality_id2name(DWORD id)
return qp->name;
}
+// The default font height in 100% scaling (96dpi).
+// (-12 in 96dpi equates to roughly 9pt)
+#define DEFAULT_FONT_HEIGHT (-12)
+
static const LOGFONTW s_lfDefault =
{
- -12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET,
+ DEFAULT_FONT_HEIGHT,
+ 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
PROOF_QUALITY, FIXED_PITCH | FF_DONTCARE,
- L"Fixedsys" // see _ReadVimIni
+ L"" // Default font name will be set later based on current language.
};
-// Initialise the "current height" to -12 (same as s_lfDefault) just
-// in case the user specifies a font in "guifont" with no size before a font
-// with an explicit size has been set. This defaults the size to this value
-// (-12 equates to roughly 9pt).
-int current_font_height = -12; // also used in gui_w32.c
+// This will be initialized when set_default_logfont() is called first time.
+// The value will be based on the system DPI.
+int current_font_height = 0; // also used in gui_w32.c
/*
* Convert a string representing a point size into pixels. The string should
@@ -3027,6 +3030,47 @@ utf16ascncmp(const WCHAR *w, const char *p, size_t n)
}
/*
+ * Equivalent of GetDpiForSystem().
+ */
+ UINT WINAPI
+vimGetDpiForSystem(void)
+{
+ HWND hwnd = GetDesktopWindow();
+ HDC hdc = GetWindowDC(hwnd);
+ UINT dpi = GetDeviceCaps(hdc, LOGPIXELSY);
+ ReleaseDC(hwnd, hdc);
+ return dpi;
+}
+
+/*
+ * Set default logfont based on current language.
+ */
+ static void
+set_default_logfont(LOGFONTW *lf)
+{
+ // Default font name for current language on MS-Windows.
+ // If not translated, falls back to "Consolas".
+ // This must be a fixed-pitch font.
+ const char *defaultfontname = N_("DefaultFontNameForWindows");
+ char *fontname = _(defaultfontname);
+
+ if (strcmp(fontname, defaultfontname) == 0)
+ fontname = "Consolas";
+
+ *lf = s_lfDefault;
+ lf->lfHeight = DEFAULT_FONT_HEIGHT * (int)vimGetDpiForSystem() / 96;
+ if (current_font_height == 0)
+ current_font_height = lf->lfHeight;
+
+ WCHAR *wfontname = enc_to_utf16((char_u*)fontname, NULL);
+ if (wfontname != NULL)
+ {
+ wcscpy_s(lf->lfFaceName, LF_FACESIZE, wfontname);
+ vim_free(wfontname);
+ }
+}
+
+/*
* Get font info from "name" into logfont "lf".
* Return OK for a valid name, FAIL otherwise.
*/
@@ -3043,7 +3087,7 @@ get_logfont(
static LOGFONTW *lastlf = NULL;
WCHAR *wname;
- *lf = s_lfDefault;
+ set_default_logfont(lf);
if (name == NULL)
return OK;
@@ -3083,7 +3127,7 @@ get_logfont(
lf->lfFaceName[p - wname] = NUL;
// First set defaults
- lf->lfHeight = -12;
+ lf->lfHeight = DEFAULT_FONT_HEIGHT * (int)vimGetDpiForSystem() / 96;
lf->lfWidth = 0;
lf->lfWeight = FW_NORMAL;
lf->lfItalic = FALSE;
diff --git a/src/os_unix.c b/src/os_unix.c
index af8f006..e98911e 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2320,12 +2320,11 @@ mch_settitle(char_u *title, char_u *icon)
#ifdef FEAT_X11
if (get_x11_windis() == OK)
type = 1;
-#else
-# if defined(FEAT_GUI_PHOTON) \
+#endif
+#if defined(FEAT_GUI_PHOTON) \
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU)
if (gui.in_use)
type = 1;
-# endif
#endif
/*
@@ -3049,7 +3048,7 @@ mch_copy_sec(char_u *from_file, char_u *to_file)
size = listxattr((char *)from_file, NULL, 0);
// not supported or no attributes to copy
- if (errno == ENOTSUP || size == 0)
+ if (size <= 0)
return;
for (index = 0 ; index < (int)(sizeof(smack_copied_attributes)
@@ -3113,8 +3112,8 @@ mch_copy_sec(char_u *from_file, char_u *to_file)
mch_copy_xattr(char_u *from_file, char_u *to_file)
{
char *xattr_buf;
- size_t size;
- size_t tsize;
+ ssize_t size;
+ ssize_t tsize;
ssize_t keylen, vallen, max_vallen = 0;
char *key;
char *val = NULL;
@@ -3126,7 +3125,7 @@ mch_copy_xattr(char_u *from_file, char_u *to_file)
// get the length of the extended attributes
size = listxattr((char *)from_file, NULL, 0);
// not supported or no attributes to copy
- if (errno == ENOTSUP || size == 0)
+ if (size <= 0)
return;
xattr_buf = (char*)alloc(size);
if (xattr_buf == NULL)
diff --git a/src/os_win32.c b/src/os_win32.c
index dbfc4ee..9947150 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -5155,8 +5155,7 @@ mch_system_piped(char *cmd, int options)
)
{
len = 0;
- if (!(options & SHELL_EXPAND)
- && ((options &
+ if (((options &
(SHELL_READ|SHELL_WRITE|SHELL_COOKED))
!= (SHELL_READ|SHELL_WRITE|SHELL_COOKED)
# ifdef FEAT_GUI
@@ -5176,7 +5175,7 @@ mch_system_piped(char *cmd, int options)
{
/*
* For pipes: Check for CTRL-C: send interrupt signal to
- * child. Check for CTRL-D: EOF, close pipe to child.
+ * child.
*/
if (len == 1 && cmd != NULL)
{
@@ -5186,10 +5185,22 @@ mch_system_piped(char *cmd, int options)
// now put 9 as SIGKILL
TerminateProcess(pi.hProcess, 9);
}
- if (ta_buf[ta_len] == Ctrl_D)
+ }
+
+ /*
+ * Check for CTRL-D: EOF, close pipe to child.
+ * Ctrl_D may be decorated by _OnChar()
+ */
+ if ((len == 1 || len == 4 ) && cmd != NULL)
+ {
+ if (ta_buf[0] == Ctrl_D
+ || (ta_buf[0] == CSI
+ && ta_buf[1] == KS_MODIFIER
+ && ta_buf[3] == Ctrl_D))
{
CloseHandle(g_hChildStd_IN_Wr);
g_hChildStd_IN_Wr = NULL;
+ len = 0;
}
}
diff --git a/src/po/Make_mvc.mak b/src/po/Make_mvc.mak
index eaf6867..fa6a1ba 100644
--- a/src/po/Make_mvc.mak
+++ b/src/po/Make_mvc.mak
@@ -1,16 +1,36 @@
# Makefile for the Vim message translations for MSVC
# (based on make_ming.mak)
#
-# Mike Williams <mrw@eandem.co.uk>
+# Mike Williams, <mrw@eandem.co.uk>
+# 06.01.24, Restorer, <restorer@mail2k.ru>
#
# Please read README_mvc.txt before using this file.
#
-!IF [powershell -nologo -noprofile "exit $$psversiontable.psversion.major"] == 2
+!IF [powershell.exe -nologo -noprofile "exit $$psversiontable.psversion.major"] == 2
!ERROR The program "PowerShell" version 3.0 or higher is required to work
!ENDIF
-# get LANGUAGES, MOFILES, MOCONVERTED and others
+!IFNDEF LANGUAGE
+! IF [powershell.exe -nologo -noprofile $$lng=(Get-UICulture).TwoLetterISOLanguageName; \
+ $$Env:LANGUAGE=$$lng;Set-Content -Path .\lng.tmp -Value "LANGUAGE=$$lng"]
+! ENDIF
+# In order for the "install" and "cleanup-po" rule to work.
+# The others work with just setting the environment variable.
+# And to show in the message.
+! INCLUDE lng.tmp
+! IF [del /q .\lng.tmp]
+! ENDIF
+! MESSAGE
+! MESSAGE The %LANGUAGE% environment variable is not set.
+! MESSAGE This variable will be temporarily set to "$(LANGUAGE)" while "nmake.exe" is running.
+! MESSAGE See README_mvc.txt for more information on the %LANGUAGE% environment variable.
+! MESSAGE
+!ELSE
+! MESSAGE LANGUAGE is already set "$(LANGUAGE)"
+!ENDIF
+
+# Get LANGUAGES, MOFILES, MOCONVERTED and others.
!INCLUDE Make_all.mak
!IFNDEF VIMRUNTIME
@@ -18,25 +38,34 @@ VIMRUNTIME = ..\..\runtime
!ENDIF
PACKAGE = vim
-# Correct the following line for the where executeable file vim is installed.
-VIM = ..\vim
+# Correct the following line for the where executeable file vim is
+# installed. Please do not put the path in quotes.
+VIM = ..\vim.exe
# Correct the following line for the directory where gettext et al is
# installed. Please do not put the path in quotes.
GETTEXT_PATH = D:\Programs\GetText\bin
-MSGFMT = "$(GETTEXT_PATH)\msgfmt" -v
-XGETTEXT = "$(GETTEXT_PATH)\xgettext"
-MSGMERGE = "$(GETTEXT_PATH)\msgmerge"
+# Starting from version 0.22, msgfmt forcibly converts text to UTF-8 regardless
+# of the value of the "charset" field.
+!IF [%comspec% /v:on /e:on /c "for /F "tokens=4 delims= " %G in \
+ ('"$(GETTEXT_PATH)\msgfmt.exe" --version^|findstr /rc:[0-9^]\.[0-9^][0-9^]') do \
+ @(set "v=%G" && if !v:~2^,2! GEQ 22 exit /b 1)"]
+MSGFMT = "$(GETTEXT_PATH)\msgfmt.exe" -v --no-convert
+!ELSE
+MSGFMT = "$(GETTEXT_PATH)\msgfmt.exe" -v
+!ENDIF
+XGETTEXT = "$(GETTEXT_PATH)\xgettext.exe"
+MSGMERGE = "$(GETTEXT_PATH)\msgmerge.exe"
# In case some package like GnuWin32, UnixUtils, gettext
# or something similar is installed on the system.
# If the "iconv" program is installed on the system, but it is not registered
# in the %PATH% environment variable, then specify the full path to this file.
!IF EXIST ("iconv.exe")
-ICONV = "iconv.exe"
+ICONV = iconv.exe
!ELSEIF EXIST ("$(GETTEXT_PATH)\iconv.exe")
-ICONV="$(GETTEXT_PATH)\iconv.exe"
+ICONV = "$(GETTEXT_PATH)\iconv.exe"
!ENDIF
# In case some package like GnuWin32, UnixUtils
@@ -54,8 +83,10 @@ CP = copy /y
RM = del /q
MKD = mkdir
LS = dir
+PS = PowerShell.exe
LSFLAGS = /b /on /l /s
+PSFLAGS = -NoLogo -NoProfile -Command
INSTALLDIR = $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES
@@ -64,8 +95,12 @@ INSTALLDIR = $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES
all: $(MOFILES) $(MOCONVERTED)
+originals : $(MOFILES)
+
+converted: $(MOCONVERTED)
+
.po.ck:
- $(VIM) -u NONE --noplugins -e -s -X --cmd "set enc=utf-8" -S check.vim \
+ "$(VIM)" -u NONE --noplugins -e -s -X --cmd "set enc=utf-8" -S check.vim \
-c "if error == 0 | q | else | num 2 | cq | endif" $<
$(TOUCH_TARGET)
@@ -74,13 +109,8 @@ check: $(CHECKFILES)
checkclean:
$(RM) *.ck
-converted: $(MOCONVERTED)
-
-checklanguage:
- @if "$(LANGUAGE)"=="" (echo Set the environment variable ^%LANGUAGE^%. See README_mvc.txt. && exit 1)
-
nl.po:
- @( echo \# > nl.po )
+ @( echo ^# >> nl.po )
# Norwegian/Bokmal: "nb" is an alias for "no".
nb.po: no.po
@@ -95,16 +125,14 @@ ja.sjis.po: ja.po
!ELSEIF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP932 $? | .\sjiscorr.exe > $@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(932))
type $@ | .\sjiscorr.exe > tmp.$@
@$(MV) tmp.$@ $@
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(932)) \
-replace \"`r`n\", \"`n\"; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
@@ -113,7 +141,7 @@ ja.sjis.po: ja.po
sjiscorr: sjiscorr.c
$(CC) sjiscorr.c
-# Convert ja.po to create ja.euc-jp.po
+# Convert ja.po to create ja.euc-jp.po.
ja.euc-jp.po: ja.po
-$(RM) $@
!IF EXIST ("$(GETTEXT_PATH)\msgconv.exe")
@@ -122,24 +150,21 @@ ja.euc-jp.po: ja.po
! IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t EUC-JP $? > $@
! ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(20932))
! ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(20932)) -replace \
'charset=utf-8', 'charset=EUC-JP'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(20932))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(20932)) -replace \
'# Original translations', \
- '# Generated from ja.po, DO NOT EDIT'; \
+ '# Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(20932))
@@ -152,24 +177,21 @@ cs.cp1250.po: cs.po
! IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-2 -t CP1250 $? > $@
! ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(28592)), \
[System.Text.Encoding]::GetEncoding(1250))
! ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1250)) -replace \
'charset=iso-8859-2', 'charset=CP1250'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1250))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1250)) -replace \
'# Original translations', \
- '# Generated from cs.po, DO NOT EDIT'; \
+ '# Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1250))
@@ -182,24 +204,21 @@ pl.cp1250.po: pl.po
! IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-2 -t CP1250 $? > $@
! ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(28592)), \
[System.Text.Encoding]::GetEncoding(1250))
! ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1250)) -replace \
'charset=iso-8859-2', 'charset=CP1250'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1250))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1250)) -replace \
'# Original translations', \
- '# Generated from pl.po, DO NOT EDIT'; \
+ '# Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1250))
@@ -212,20 +231,17 @@ pl.UTF-8.po: pl.po
! IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-2 -t UTF-8 $? > $@
! ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(28592)))
! ENDIF
- powershell -nologo -noprofile -Command \
- (Get-Content -Raw -Encoding UTF8 $@ \
+ $(PS) $(PSFLAGS) (Get-Content -Raw -Encoding UTF8 $@ \
^| % {$$_-replace 'charset=iso-8859-2', 'charset=UTF-8'}) \
^| 1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
- powershell -nologo -noprofile -Command \
- (Get-Content -Raw -Encoding UTF8 $@ \
+ $(PS) $(PSFLAGS) (Get-Content -Raw -Encoding UTF8 $@ \
^| % {$$_-replace '# Original translations', \
- '# Generated from pl.po, DO NOT EDIT'}) \
+ '# Generated from $?, DO NOT EDIT'}) \
^| 1>nul New-Item -Force -Path . -ItemType file -Name $@
# Convert sk.po to create sk.cp1250.po.
@@ -237,24 +253,21 @@ sk.cp1250.po: sk.po
! IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-2 -t CP1250 $? > $@
! ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(28592)), \
[System.Text.Encoding]::GetEncoding(1250))
! ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1250)) -replace \
'charset=iso-8859-2', 'charset=CP1250'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1250))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1250)) -replace \
'# Original translations', \
- '# Generated from sk.po, DO NOT EDIT'; \
+ '# Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1250))
@@ -267,25 +280,22 @@ zh_CN.po: zh_CN.UTF-8.po
! IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t GB2312 $? > $@
! ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(936))
! ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(936)) -replace \
'charset=UTF-8', 'charset=GB2312'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(936))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(936)) -replace \
'# Original translations', \
- '# Generated from zh_CN.UTF-8.po, DO NOT EDIT'; \
+ '# Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(936))
@@ -297,23 +307,21 @@ zh_CN.cp936.po: zh_CN.UTF-8.po
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP936 $? > $@
!ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(20936))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(20936)) \
-replace 'charset=UTF-8', 'charset=GBK'\
-replace '# Original translations', \
- '# Generated from zh_CN.UTF-8.po, DO NOT EDIT'; \
+ '# Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(20936))
-# Convert zh_TW.UTF-8.po to create zh_TW.po
+# Convert zh_TW.UTF-8.po to create zh_TW.po.
zh_TW.po: zh_TW.UTF-8.po
-$(RM) $@
!IF EXIST ("$(GETTEXT_PATH)\msgconv.exe")
@@ -322,31 +330,29 @@ zh_TW.po: zh_TW.UTF-8.po
! IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t BIG5 $? > $@
! ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(950))
! ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(950)) -replace \
'charset=UTF-8', 'charset=BIG5'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(950))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(950)) -replace \
'# Original translations', \
- '# Generated from zh_TW.UTF-8.po, DO NOT EDIT'; \
+ '# Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(950))
-# Convert zh_TW.UTF-8.po to create zh_TW.po with backslash characters
+# Convert zh_TW.UTF-8.po to create zh_TW.po with backslash characters.
# Requires doubling backslashes in the second byte. Don't depend on big5corr,
# it should only be compiled when zh_TW.po is outdated.
+
#
# 06.11.23, added by Restorer:
# For more details, see:
@@ -368,22 +374,20 @@ zh_TW.po: zh_TW.UTF-8.po
#!ELSEIF DEFINED (ICONV)
# $(ICONV) -f UTF-8 -t BIG5 $? | .\big5corr.exe > $@
#!ELSE
-# powershell -nologo -noprofile -Command \
-# [System.IO.File]::WriteAllText(\"$@\", \
+# $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
# [System.IO.File]::ReadAllText(\"$?\", \
# [System.Text.Encoding]::GetEncoding(65001)), \
# [System.Text.Encoding]::GetEncoding(950))
# type $@ | .\big5corr.exe > tmp.$@
# @$(MV) tmp.$@ $@
#!ENDIF
-# powershell -nologo -noprofile -Command \
-# $$out = [System.IO.File]::ReadAllText(\"$@\", \
+# $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
# [System.Text.Encoding]::GetEncoding(950)) \
# -replace \"`r`n\", \"`n\"; \
# [System.IO.File]::WriteAllText(\"$@\", $$out, \
# [System.Text.Encoding]::GetEncoding(950))
-# see above in the zh_TW.po conversion section for backslashes.
+# See above in the zh_TW.po conversion section for backslashes.
#big5corr: big5corr.c
# $(CC) big5corr.c
@@ -396,25 +400,22 @@ ko.po: ko.UTF-8.po
! IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t EUC-KR $? > $@
! ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(51949))
! ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(51949)) -replace \
'charset=UTF-8', 'charset=EUC-KR'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(51949))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(51949)) -replace \
'# Original translations', \
- '# Generated from ko.UTF-8.po, DO NOT EDIT'; \
+ '# Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(51949))
@@ -427,25 +428,22 @@ ru.cp1251.po: ru.po
! IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1251 $? > $@
! ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1251))
! ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1251)) -replace \
'charset=UTF-8', 'charset=CP1251'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1251))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1251)) -replace \
'# Original translations', \
- '# Generated from ru.po, DO NOT EDIT'; \
+ '# Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1251))
@@ -458,25 +456,22 @@ uk.cp1251.po: uk.po
! IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1251 $? > $@
! ELSE
- powershell -nologo -noprofile -Command \
- [System.IO.File]::WriteAllText(\"$@\", \
+ $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1251))
! ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1251)) -replace \
'charset=UTF-8', 'charset=CP1251'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1251))
!ENDIF
- powershell -nologo -noprofile -Command \
- $$out = [System.IO.File]::ReadAllText(\"$@\", \
+ $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1251)) -replace \
'# Original translations', \
- '# Generated from uk.po, DO NOT EDIT'; \
+ '# Generated from $?, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1251))
@@ -498,60 +493,61 @@ PO_INPUTLIST = \
files: $(PO_INPUTLIST)
$(LS) $(LSFLAGS) $(PO_INPUTLIST) > .\files
-first_time: checklanguage files
- $(VIM) -u NONE --not-a-term -S tojavascript.vim $(LANGUAGE).po \
+first_time: files
+ "$(VIM)" -u NONE --not-a-term -S tojavascript.vim $(LANGUAGE).po \
$(PO_VIM_INPUTLIST)
set OLD_PO_FILE_INPUT=yes
set OLD_PO_FILE_OUTPUT=yes
$(XGETTEXT) --default-domain=$(LANGUAGE) --add-comments $(XGETTEXT_KEYWORDS) \
--files-from=.\files $(PO_VIM_JSLIST)
- $(VIM) -u NONE --not-a-term -S fixfilenames.vim $(LANGUAGE).po \
+ "$(VIM)" -u NONE --not-a-term -S fixfilenames.vim $(LANGUAGE).po \
$(PO_VIM_INPUTLIST)
$(RM) *.js
$(PACKAGE).pot: files
- $(VIM) -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot \
+ "$(VIM)" -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot \
$(PO_VIM_INPUTLIST)
set OLD_PO_FILE_INPUT=yes
set OLD_PO_FILE_OUTPUT=yes
$(XGETTEXT) --default-domain=$(PACKAGE) --add-comments $(XGETTEXT_KEYWORDS) \
--files-from=.\files $(PO_VIM_JSLIST)
$(MV) $(PACKAGE).po $(PACKAGE).pot
- $(VIM) -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot \
+ "$(VIM)" -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot \
$(PO_VIM_INPUTLIST)
$(RM) *.js
-# When updating ja.sjis.po there are a bunch of errors and a crash.
+# Only original translations with default encoding should be updated.
# The files that are converted to a different encoding clearly state "DO NOT EDIT".
update-po: $(MOFILES:.mo=)
-# Don't add a dependency here, we only want to update the .po files manually
+# Don't add a dependency here, we only want to update the .po files manually.
$(LANGUAGES):
- @$(MAKE) -nologo -f Make_mvc.mak $(PACKAGE).pot GETTEXT_PATH="$(GETTEXT_PATH)"
+ @$(MAKE) -nologo -f Make_mvc.mak GETTEXT_PATH="$(GETTEXT_PATH)" $(PACKAGE).pot
$(CP) $@.po $@.po.orig
$(MV) $@.po $@.po.old
$(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po
$(RM) $@.po.old
-install: checklanguage $(LANGUAGE).mo
- if not exist $(INSTALLDIR) $(MKD) $(INSTALLDIR)
- $(CP) $(LANGUAGE).mo $(INSTALLDIR)\$(PACKAGE).mo
+install: $(LANGUAGE).mo
+ if not exist "$(INSTALLDIR)" $(MKD) "$(INSTALLDIR)"
+ $(CP) $(LANGUAGE).mo "$(INSTALLDIR)\$(PACKAGE).mo"
install-all: all
- for %%l in ($(LANGUAGES)) do @if not exist $(VIMRUNTIME)\lang\%%l\LC_MESSAGES \
- $(MKD) $(VIMRUNTIME)\lang\%%l\LC_MESSAGES
+ for %%l in ($(LANGUAGES)) do @if not exist "$(VIMRUNTIME)\lang\%%l\LC_MESSAGES" \
+ $(MKD) "$(VIMRUNTIME)\lang\%%l\LC_MESSAGES"
for %%l in ($(LANGUAGES)) do @$(CP) %%l.mo \
- $(VIMRUNTIME)\lang\%%l\LC_MESSAGES\$(PACKAGE).mo
+ "$(VIMRUNTIME)\lang\%%l\LC_MESSAGES\$(PACKAGE).mo"
-cleanup-po: checklanguage $(LANGUAGE).po
- $(VIM) -u NONE -e -X -S cleanup.vim -c wq $(LANGUAGE).po
+cleanup-po: $(LANGUAGE).po
+ "$(VIM)" -u NONE -e -X -S cleanup.vim -c wq $(LANGUAGE).po
cleanup-po-all: $(POFILES)
- !$(VIM) -u NONE -e -X -S cleanup.vim -c wq $**
+ !"$(VIM)" -u NONE -e -X -S cleanup.vim -c wq $**
clean: checkclean
$(RM) *.mo
$(RM) *.pot
+ $(RM) *.orig
$(RM) files
$(RM) sjiscorr.obj sjiscorr.exe
# $(RM) big5corr.obj big5corr.exe
diff --git a/src/po/Makefile b/src/po/Makefile
index 24f8104..cc4008f 100644
--- a/src/po/Makefile
+++ b/src/po/Makefile
@@ -3,30 +3,38 @@
# Include stuff found by configure.
include ../auto/config.mk
-# get LANGUAGES, MOFILES, MOCONVERTED and others
+# Get LANGUAGES, MOFILES, MOCONVERTED and others.
include Make_all.mak
# Note: ja.sjis, *.cp1250 and zh_CN.cp936 are only for MS-Windows, they are
-# not installed on Unix
+# not installed on Unix.
PACKAGE = vim
SHELL = /bin/sh
VIM = ../vim
-# MacOS sed is locale aware, set $LANG to avoid problems
+# MacOS sed is locale aware, set $LANG to avoid problems.
SED = LANG=C sed
# The OLD_PO_FILE_INPUT and OLD_PO_FILE_OUTPUT are for the new GNU gettext
# tools 0.10.37, which use a slightly different .po file format that is not
# compatible with Solaris (and old gettext implementations) unless these are
# set. gettext 0.10.36 will not work!
-MSGFMTCMD = OLD_PO_FILE_INPUT=yes $(MSGFMT) -v
+
+# MSGFMTCMD is defined by Configure in ../auto/config.mk
XGETTEXT = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes xgettext
MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
.SUFFIXES:
.SUFFIXES: .po .mo .pot .ck
-.PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES)
+.PHONY: all install uninstall prefixcheck originals converted check clean \
+ checkclean distclean update-po $(LANGUAGES)
+
+all: $(MOFILES) $(MOCONVERTED) $(MSGFMT_DESKTOP)
+
+originals: $(MOFILES)
+
+converted: $(MOCONVERTED)
.po.mo:
$(MSGFMTCMD) -o $@ $<
@@ -36,11 +44,9 @@ MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
-c "if error == 0 | q | else | num 2 | cq | endif" $<
touch $@
-all: $(MOFILES) $(MOCONVERTED) $(MSGFMT_DESKTOP)
-
check: $(CHECKFILES)
-# installing for real
+# Installing for real.
install: $(MOFILES) $(MOCONVERTED)
@$(MAKE) prefixcheck
for lang in $(LANGUAGES); do \
@@ -66,7 +72,7 @@ uninstall:
rm -f $(LOCALEDIR)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
done
-# installing for local tryout into ../../runtime/lang
+# Installing for local tryout into ../../runtime/lang.
tryoutinstall: $(MOFILES) $(MOCONVERTED)
@$(MAKE) prefixcheck
for lang in $(LANGUAGES); do \
@@ -84,12 +90,10 @@ tryoutinstall: $(MOFILES) $(MOCONVERTED)
fi; \
done
-converted: $(MOCONVERTED)
-
# nl.po was added later, if it does not exist use a file with just a # in it
# (an empty file doesn't work with old msgfmt).
nl.po:
- @( echo \# > nl.po )
+ @( echo \# >> nl.po )
# Norwegian/Bokmal: "nb" is an alias for "no".
# Copying the file is not efficient, but I don't know of another way to make
@@ -102,78 +106,78 @@ nb.po: no.po
# ja.sjis.po is outdated.
ja.sjis.po: ja.po
@$(MAKE) sjiscorr
- rm -f ja.sjis.po
- iconv -f UTF-8 -t CP932 ja.po | ./sjiscorr > ja.sjis.po
+ rm -f $@
+ iconv -f UTF-8 -t CP932 $< | ./sjiscorr > $@
sjiscorr: sjiscorr.c
$(CC) -o sjiscorr sjiscorr.c
ja.euc-jp.po: ja.po
- iconv -f UTF-8 -t EUC-JP ja.po | \
+ iconv -f UTF-8 -t EUC-JP $< | \
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=EUC-JP/' \
- -e 's/# Original translations/# Generated from ja.po, DO NOT EDIT/' \
- > ja.euc-jp.po
+ -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
+ > $@
# Convert cs.po to create cs.cp1250.po.
cs.cp1250.po: cs.po
- rm -f cs.cp1250.po
- iconv -f ISO-8859-2 -t CP1250 cs.po | \
+ rm -f $@
+ iconv -f ISO-8859-2 -t CP1250 $< | \
$(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=CP1250/' \
- -e 's/# Original translations/# Generated from cs.po, DO NOT EDIT/' \
- > cs.cp1250.po
+ -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
+ > $@
# Convert pl.po to create pl.cp1250.po.
pl.cp1250.po: pl.po
- rm -f pl.cp1250.po
- iconv -f ISO-8859-2 -t CP1250 pl.po | \
+ rm -f $@
+ iconv -f ISO-8859-2 -t CP1250 $< | \
$(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=CP1250/' \
- -e 's/# Original translations/# Generated from pl.po, DO NOT EDIT/' \
- > pl.cp1250.po
+ -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
+ > $@
# Convert pl.po to create pl.UTF-8.po.
pl.UTF-8.po: pl.po
- rm -f pl.UTF-8.po
- iconv -f ISO-8859-2 -t UTF-8 pl.po | \
+ rm -f $@
+ iconv -f ISO-8859-2 -t UTF-8 $< | \
$(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=UTF-8/' \
- -e 's/# Original translations/# Generated from pl.po, DO NOT EDIT/' \
- > pl.UTF-8.po
+ -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
+ > $@
# Convert sk.po to create sk.cp1250.po.
sk.cp1250.po: sk.po
- rm -f sk.cp1250.po
- iconv -f ISO-8859-2 -t CP1250 sk.po | \
+ rm -f $@
+ iconv -f ISO-8859-2 -t CP1250 $< | \
$(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=CP1250/' \
- -e 's/# Original translations/# Generated from sk.po, DO NOT EDIT/' \
- > sk.cp1250.po
+ -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
+ > $@
# Convert zh_CN.UTF-8.po to create zh_CN.po.
zh_CN.po: zh_CN.UTF-8.po
- rm -f zh_CN.po
- iconv -f UTF-8 -t GB2312 zh_CN.UTF-8.po | \
+ rm -f $@
+ iconv -f UTF-8 -t GB2312 $< | \
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=GB2312/' \
- -e 's/# Original translations/# Generated from zh_CN.UTF-8.po, DO NOT EDIT/' \
- > zh_CN.po
+ -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
+ > $@
# Convert zh_CN.UTF-8.po to create zh_CN.cp936.po.
# Set 'charset' to gbk to avoid that msfmt generates a warning.
# This used to convert from zh_CN.po, but that results in a conversion error.
zh_CN.cp936.po: zh_CN.UTF-8.po
- rm -f zh_CN.cp936.po
- iconv -f UTF-8 -t CP936 zh_CN.UTF-8.po | \
+ rm -f $@
+ iconv -f UTF-8 -t CP936 $< | \
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=GBK/' \
- -e 's/# Original translations/# Generated from zh_CN.UTF-8.po, DO NOT EDIT/' \
- > zh_CN.cp936.po
+ -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
+ > $@
-# Convert zh_TW.UTF-8.po to create zh_TW.po
+# Convert zh_TW.UTF-8.po to create zh_TW.po.
zh_TW.po: zh_TW.UTF-8.po
- rm -f zh_TW.po
- iconv -f UTF-8 -t BIG5 zh_TW.UTF-8.po | \
+ rm -f $@
+ iconv -f UTF-8 -t BIG5 $< | \
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=BIG5/' \
- -e 's/# Original translations/# Generated from zh_TW.UTF-8.po, DO NOT EDIT/' \
- > zh_TW.po
+ -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
+ > $@
-# Convert zh_TW.UTF-8.po to create zh_TW.po with backslash characters
+# Convert zh_TW.UTF-8.po to create zh_TW.po with backslash characters.
# Requires doubling backslashes in the second byte. Don't depend on big5corr,
# it should only be compiled when zh_TW.po is outdated.
@@ -192,44 +196,44 @@ zh_TW.po: zh_TW.UTF-8.po
#zh_TW.po: zh_TW.UTF-8.po
# @$(MAKE) big5corr
-# rm -f zh_TW.po
-# iconv -f UTF-8 -t BIG5 zh_TW.UTF-8.po | ./big5corr > zh_TW.po
+# rm -f $@
+# iconv -f UTF-8 -t BIG5 $< | ./big5corr > $@
# 06.11.23, added by Restorer
-# see above in the zh_tw.po conversion section for backslashes.
+# See above in the zh_tw.po conversion section for backslashes.
#big5corr: big5corr.c
# $(CC) -o big5corr big5corr.c
# Convert ko.UTF-8.po to create ko.po.
ko.po: ko.UTF-8.po
- rm -f ko.po
- iconv -f UTF-8 -t EUC-KR ko.UTF-8.po | \
+ rm -f $@
+ iconv -f UTF-8 -t EUC-KR $< | \
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=EUC-KR/' \
- -e 's/# Original translations/# Generated from ko.UTF-8.po, DO NOT EDIT/' \
- > ko.po
+ -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
+ > $@
# Convert ru.po to create ru.cp1251.po.
ru.cp1251.po: ru.po
- rm -f ru.cp1251.po
- iconv -f UTF-8 -t CP1251 ru.po | \
+ rm -f $@
+ iconv -f UTF-8 -t CP1251 $< | \
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=CP1251/' \
- -e 's/# Original translations/# Generated from ru.po, DO NOT EDIT/' \
- > ru.cp1251.po
+ -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
+ > $@
# Convert uk.po to create uk.cp1251.po.
uk.cp1251.po: uk.po
- rm -f uk.cp1251.po
- iconv -f UTF-8 -t CP1251 uk.po | \
+ rm -f $@
+ iconv -f UTF-8 -t CP1251 $< | \
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=CP1251/' \
- -e 's/# Original translations/# Generated from uk.po, DO NOT EDIT/' \
- > uk.cp1251.po
+ -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
+ > $@
prefixcheck:
@if test "x" = "x$(prefix)"; then \
echo "******************************************"; \
- echo " please use make from the src directory "; \
+ echo " Please use make from the src directory "; \
echo "******************************************"; \
exit 1; \
fi
@@ -256,15 +260,15 @@ PO_INPUTLIST = \
vim.desktop.in
$(PACKAGE).pot: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST)
- # Convert the Vim scripts to (what looks like) Javascript
+ # Convert the Vim scripts to (what looks like) Javascript.
$(VIM) -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST)
- # create vim.pot
+ # Create vim.pot.
$(XGETTEXT) --default-domain=$(PACKAGE) --add-comments \
$(XGETTEXT_KEYWORDS) $(PO_INPUTLIST) $(PO_VIM_JSLIST)
mv -f $(PACKAGE).po $(PACKAGE).pot
- # Fix Vim scripts names, so that "gf" works
+ # Fix Vim scripts names, so that "gf" works.
$(VIM) -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST)
- # Delete the temporary files
+ # Delete the temporary files.
rm *.js
vim.desktop: vim.desktop.in $(POFILES)
@@ -283,11 +287,11 @@ gvim.desktop: gvim.desktop.in $(POFILES) vim.desktop
if command -v desktop-file-validate; then desktop-file-validate tmp_gvim.desktop; fi
mv tmp_gvim.desktop gvim.desktop
-# When updating ja.sjis.po there are a bunch of errors and a crash.
+# Only original translations with default encoding should be updated.
# The files that are converted to a different encoding clearly state "DO NOT EDIT".
update-po: $(MOFILES:.mo=)
-# Don't add a dependency here, we only want to update the .po files manually
+# Don't add a dependency here, we only want to update the .po files manually.
$(LANGUAGES):
@$(MAKE) $(PACKAGE).pot
if test ! -f $@.po.orig; then cp $@.po $@.po.orig; fi
diff --git a/src/po/README.txt b/src/po/README.txt
index 5a09d1f..50aff6a 100644
--- a/src/po/README.txt
+++ b/src/po/README.txt
@@ -30,7 +30,7 @@ The distributed files are generated on Unix, but this should also be possible
on MS-Windows. Download the gettext packages, for example from:
http://sourceforge.net/projects/gettext
- or
+or
https://mlocati.github.io/articles/gettext-iconv-windows.html
You might have to do the commands manually. Example:
@@ -53,7 +53,10 @@ CREATING A NEW PO FILE
We will use "xx.po" as an example here, replace "xx" with the name of your
language.
-- Edit Make_all.mak to add xx to LANGUAGES and xx.mo to MOFILES.
+- Edit Make_all.mak to add xx to LANGUAGES and xx.mo to MOFILES, xx.po to
+ POFILES and xx.ck to CHECKFILES.
+- If the encoding of the translation text differs from the default UTF-8, add a
+ corresponding entry in MOCONVERTED, specifying the required encoding.
- If you haven't done so already, run ./configure in the top vim directory
(i.e. go up two directories) and then come back here afterwards.
- Execute these commands:
@@ -147,13 +150,13 @@ convert ja.po to EUC-JP (supposed as your system encoding):
(1) Convert the file encoding:
mv ja.po ja.po.orig
- iconv -f utf-8 -t euc-jp ja.po.orig > ja.po
+ iconv -f UTF-8 -t EUC-JP ja.po.orig > ja.po
(2) Rewrite charset declaration in the file:
Open ja.po find this line:
- "Content-Type: text/plain; charset=utf-8\n"
+ "Content-Type: text/plain; charset=UTF-8\n"
You should change "charset" like this:
- "Content-Type: text/plain; charset=euc-jp\n"
+ "Content-Type: text/plain; charset=EUC-JP\n"
There are examples in the Makefile for the conversions already supported.
diff --git a/src/po/README_mingw.txt b/src/po/README_mingw.txt
index d00ba30..a7e3259 100644
--- a/src/po/README_mingw.txt
+++ b/src/po/README_mingw.txt
@@ -20,8 +20,10 @@ The make utility must be run from the po directory.
First of all you must set the environment variable LANGUAGE to xx, where xx is
the name of your language. You can do it from the command line or adding a
line to your autoexec.bat file: set LANGUAGE=xx. You must also add your
-language to the Make_all.mak file in the lines LANGUAGES, MOFILES, AND
-POFILES.
+language to the Make_all.mak file in the lines LANGUAGES, MOFILES, POFILES,
+and CHECKFILES. If the encoding of the translation text differs from the
+default UTF-8, add a corresponding entry in MOCONVERTED, specifying the
+required encoding.
If you don't have a xx.po file, you must create it with the command:
diff --git a/src/po/README_mvc.txt b/src/po/README_mvc.txt
index 691e6ae..ae9fa2b 100644
--- a/src/po/README_mvc.txt
+++ b/src/po/README_mvc.txt
@@ -2,18 +2,19 @@ TRANSLATING VIM MESSAGES
This file explains how to create and maintain po files using a number of
GnuWin packages. You will need gettext, libiconv and libexpat. As of
-August 2010 the versions known to work are gettext 0.14.4, libiconv 1.9.2-1
-and expat 2.0.1. gettext and libiconv can be found at:
+January 2024 the versions known to work are gettext 0.14.4, libiconv 1.9.2-1
+and expat 2.5.0. Gettext and libiconv can be found at:
http://gnuwin32.sourceforge.net/
expat can be found at:
http://sourceforge.net/projects/expat/
+or
+ https://github.com/libexpat/libexpat
expat will install into its own directory. You should copy libexpat.dll into
the bin directory created from the gettext/libiconv packages.
-
Or Michele Locati kindly provides precompiled binaries gettext 0.21 and
iconv 1.16 for Windows on his site:
@@ -29,11 +30,13 @@ Set the environment variable LANGUAGE to the language code for the language
you are translating Vim messages to. Language codes are typically two
characters and you can find a list of them at:
- http://www.geocities.com/click2speak/languages.html
+ https://www.loc.gov/standards/iso639-2/php/code_list.php
+ https://www.science.co.il/language/Codes.php
+ https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes
-Another possibility is to use the GnuWin32 port of gettext. This is
-recommended especially if you use already gnuwin32 tools to gunzip, bunzip,
-patch etc. these files. You find the GnuWin32 version of gettext here:
+Another possibility is to use the GnuWin32 port of gettext. This is
+recommended especially if you use already GnuWin32 tools to gunzip, bunzip,
+patch etc. these files. You find the GnuWin32 version of gettext here:
http://gnuwin32.sourceforge.net/packages/gettext.htm
@@ -41,13 +44,16 @@ Yet another very strait forward way is to get the sources of gettext from
http://www.gnu.org/software/gettext/gettext.html
-and build your own version of these tools. The documentation states that this
+and build your own version of these tools. The documentation states that this
should be possible with MSVC4.0, MSVC5.0, MSVC6.0 or MSVC7.0, but you can
build it even successfully with MSVC8.0.
The LANGUAGE environment variable can be set from the command line, by adding
a line to your autoexec.bat file, or by defining a user variable from the
-Advanced tab in the System control panel.
+Advanced tab in the System control panel. If the LANGUAGE environment
+variable has not been set in any of the above ways, the value of this variable
+will be set automatically according to the language used in the OS. This
+value will be valid until the "nmake.exe" program terminates.
Next, edit Make_mvc.mak so that GETTEXT_PATH points the binary directory of
the installation.
@@ -56,10 +62,13 @@ the installation.
CREATING A NEW TRANSLATION
When creating a new translation you must add your language code to the
-Make_all.mak file in the lines defining LANGUAGES and MOFILES. To create the
-initial .po file for your language you must use the command:
+Make_all.mak file in the lines defining LANGUAGES and MOFILES, POFILES and
+CHECKFILES. If the encoding of the translation text differs from the default
+UTF-8, add a corresponding entry in MOCONVERTED, specifying the required
+encoding.
+To create the initial .po file for your language you must use the command:
- make -f make_mvc.mak first_time
+ nmake.exe -f Make_mvc.mak first_time
Note: You need to be in the po directory when using this makefile.
@@ -82,7 +91,7 @@ If there are new or changed messages in Vim that need translating, then the
first thing to do is merge them into the existing translations. This is done
with the following command:
- nmake -f Make_mvc.mak xx.po
+ nmake.exe -f Make_mvc.mak xx
where xx is the language code for the language needing translations. The
original .po file is copied to xx.po.orig.
@@ -102,23 +111,30 @@ CHECKING THE TRANSLATION
Check the translation with the following command:
- nmake -f make_mvc.mak xx.mo
+ nmake.exe -f Make_mvc.mak xx.ck
-Correct any syntax errors reported. When there are no more errors, the
-translation is ready to be installed.
+Correct any errors reported. When there are no more errors, the translation
+is ready to be installed.
INSTALLING THE TRANSLATION
Install your translation with the following command:
- nmake -f make_mvc.mak install
+ nmake.exe -f Make_mvc.mak install
This will create the xx\LC_MESSAGES directory in runtime\lang if it does not
already exist.
You can also use the following command to install all languages:
- nmake -f make_mvc.mak install-all
+ nmake.exe -f Make_mvc.mak install-all
+
+
+AFTER ALL OF THESE STEPS
+
+Clean the "po" directory of all temporary and unnecessary files. Execute the
+command:
+ nmake.exe -f Make_mvc.mak clean
vim:tw=78:
diff --git a/src/po/ca.po b/src/po/ca.po
index 44125fb..caf02a9 100644
--- a/src/po/ca.po
+++ b/src/po/ca.po
@@ -256,7 +256,7 @@ msgid "Warning: Using a weak encryption method; see :help 'cm'"
msgstr "Atenció: esteu utilitzant un xifratge poc potent; vegeu :help 'cm'"
msgid "Note: Encryption of swapfile not supported, disabling swap file"
-msgstr "Nota: No es suporta xifratge en el fitxer d'intercanvi, es desabilita"
+msgstr "Nota: No se suporta xifratge en el fitxer d'intercanvi, es deshabilita"
msgid "Enter encryption key: "
msgstr "Introduïu la clau de xifratge: "
@@ -265,7 +265,7 @@ msgid "Enter same key again: "
msgstr "Introduïu la mateixa clau un altre cop: "
msgid "Keys don't match!"
-msgstr "La claus no coincideixen!"
+msgstr "Les claus no coincideixen!"
msgid "[crypted]"
msgstr "[xifrat]"
@@ -499,7 +499,7 @@ msgid ""
"Do you wish to try?"
msgstr ""
"El fitxer \"%s\" és de només lectura.\n"
-"Tot i això pot ser possible escriure-hi.\n"
+"Tot i això és possible escriure-hi.\n"
"Voleu intentar-ho?"
# :browse edit
@@ -1554,7 +1554,7 @@ msgid "-register\t\tRegister this gvim for OLE"
msgstr "-register\t\tRegistra aquest gvim a OLE"
msgid "-unregister\t\tUnregister gvim for OLE"
-msgstr "-unregister\t\tDóna de baixa aquest gvim a OLE"
+msgstr "-unregister\t\tDona de baixa aquest gvim a OLE"
msgid "-g\t\t\tRun using GUI (like \"gvim\")"
msgstr "-g\t\t\tUsa la interfície gràfica (com \"gvim\")"
@@ -2158,7 +2158,7 @@ msgstr ""
" amb precaució.\n"
msgid "(2) An edit session for this file crashed.\n"
-msgstr "(2) El Vim es va estrellar mentre s'editava aquest fitxer.\n"
+msgstr "(2) El Vim va fallar mentre s'editava aquest fitxer.\n"
msgid " If this is the case, use \":recover\" or \"vim -r "
msgstr " En aquest cas, useu \":recover\" o bé \"vim -r "
@@ -3182,7 +3182,7 @@ msgid "No Syntax items defined for this buffer"
msgstr "No s'han definit elements de sintaxi per a aquest buffer"
msgid "'redrawtime' exceeded, syntax highlighting disabled"
-msgstr "s'ha excedit 'redrawtime', es desabilita el ressaltat"
+msgstr "s'ha excedit 'redrawtime', es deshabilita el ressaltat"
# todo: not set
# valor de 'iskeyword' o "not set"
@@ -4442,7 +4442,7 @@ msgstr "E151: Cap coincidència: %s"
#, c-format
msgid "E152: Cannot open %s for writing"
-msgstr "E152: No es obrir %s per a escriptura"
+msgstr "E152: No es pot obrir %s per a escriptura"
#, c-format
msgid "E153: Unable to open %s for reading"
@@ -7199,7 +7199,7 @@ msgid "E966: Invalid line number: %ld"
msgstr "E966: El número de línia no és vàlid: %ld"
msgid "E967: Text property info corrupted"
-msgstr "E967: L'informació de la propietat de text s'ha corromput"
+msgstr "E967: La informació de la propietat de text s'ha corromput"
msgid "E968: Need at least one of 'id' or 'type'"
msgstr "E968: Es requereix 'id' o 'type'"
@@ -7240,7 +7240,7 @@ msgstr "E978: Operació no vàlida per a un Blob"
#, c-format
msgid "E979: Blob index out of range: %ld"
-msgstr "E979: índexació d'un Blob fora d'interval: %ld"
+msgstr "E979: indexació d'un Blob fora d'interval: %ld"
msgid "E980: Lowlevel input not supported"
msgstr "E980: L'entrada de baix nivell no està suportada"
@@ -8800,7 +8800,7 @@ msgstr ""
"\" Cada línia \"set\" mostra el valor actual de l'opció (a l'esquerra)."
msgid "\" Hit <Enter> on a \"set\" line to execute it."
-msgstr "\" Premeu <Entrar> en una lína \"set\" per a executar-la."
+msgstr "\" Premeu <Entrar> en una línia \"set\" per a executar-la."
msgid "\" A boolean option will be toggled."
msgstr "\" Una opció booleana canviarà d'estat."
@@ -9024,7 +9024,7 @@ msgid "characters to use for the status line, folds and filler lines"
msgstr "caràcters per a la línia d'estat, plecs i final del buffer"
msgid "number of lines used for the command-line"
-msgstr "numero de línies de text per a la línia d'ordres"
+msgstr "número de línies de text per a la línia d'ordres"
msgid "width of the display"
msgstr "amplada de la pantalla"
@@ -9623,7 +9623,7 @@ msgstr "funció que es crida per a l'operador \"g@\""
msgid "when inserting a bracket, briefly jump to its match"
msgstr ""
"quan s'insereix un parèntesi, salta momentàniament al\n"
-"parèntesis corresponent"
+"parèntesi corresponent"
msgid "tenth of a second to show a match for 'showmatch'"
msgstr ""
@@ -9656,7 +9656,7 @@ msgid "list of number of spaces a tab counts for"
msgstr "llista de quantitats d'espais que avança una tabulació"
msgid "list of number of spaces a soft tabsstop counts for"
-msgstr "llista de quatitats d'espais que avança una tabulació tabsstop"
+msgstr "llista de qualitats d'espais que avança una tabulació tabsstop"
msgid "a <Tab> in an indent inserts 'shiftwidth' spaces"
msgstr "un <Tab> en una sagnia insereix 'shiftwidth' espais"
@@ -9992,7 +9992,7 @@ msgid "characters to escape when 'shellxquote' is ("
msgstr "caràcters que s'escapen quan 'shellxquote' és ("
msgid "argument for 'shell' to execute a command"
-msgstr "argument per a 'shell' per a excutar una ordre"
+msgstr "argument per a 'shell' per a executar una ordre"
msgid "used to redirect command output to a file"
msgstr "utilitzat per a redirigir la sortida d'una ordre a un fitxer"
@@ -10056,7 +10056,7 @@ msgid "specifies slash/backslash used for completion"
msgstr "especifica el tipus de barra utilitzat en la compleció"
msgid "language specific"
-msgstr "paràmetres específics del llengüatge"
+msgstr "paràmetres específics del llenguatge"
msgid "specifies the characters in a file name"
msgstr "especifica els caràcters en un nom de fitxer"
@@ -10068,7 +10068,7 @@ msgid "specifies the characters in a keyword"
msgstr "especifica els caràcters en una paraula clau"
msgid "specifies printable characters"
-msgstr "especifica el caràcters imprimibles"
+msgstr "especifica els caràcters imprimibles"
msgid "specifies escape characters in a string"
msgstr "especifica els caràcters d'escapada en una cadena"
@@ -10100,7 +10100,7 @@ msgid "prepare for editing Arabic text"
msgstr "efectua les preparacions per a editar textos en àrab"
msgid "perform shaping of Arabic characters"
-msgstr "dóna forma als caràcters àrabs"
+msgstr "dona forma als caràcters àrabs"
msgid "terminal will perform bidi handling"
msgstr "el terminal gestiona el text bi-direccional"
diff --git a/src/po/hu.po b/src/po/hu.po
index e54c62a..0a11847 100644
--- a/src/po/hu.po
+++ b/src/po/hu.po
@@ -16,7 +16,7 @@ msgstr ""
"Language-Team: Hungarian http://polarhome.com/vim/\n"
"Language: hu\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "E82: Cannot allocate any buffer, exiting..."
diff --git a/src/po/it.po b/src/po/it.po
index 42fe7f7..8bdc5e3 100644
--- a/src/po/it.po
+++ b/src/po/it.po
@@ -14,7 +14,8 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2023-12-27 16:38+0100\n"
+"POT-Creation-Date: 2024-03-06 09:13+0100\n"
+"PO-Revision-Date: 2024-03-06 15:00+0100\n"
"Last-Translator: Antonio Colombo <azc100@gmail.com>\n"
"Language-Team: Italian\n"
"Language: it\n"
@@ -163,6 +164,9 @@ msgstr " (file %d di %d)"
msgid " (file (%d) of %d)"
msgstr " (file (%d) di %d)"
+msgid "[Command Line]"
+msgstr "[Riga-di-comando]"
+
msgid "[Prompt]"
msgstr "[Richiesta]"
@@ -647,9 +651,6 @@ msgstr "Errore"
msgid "Interrupt"
msgstr "Interruzione"
-msgid "[Command Line]"
-msgstr "[Riga-di-comando]"
-
msgid "is a directory"
msgstr "è una directory"
@@ -1366,6 +1367,9 @@ msgstr "argomento di mapnew()"
msgid "filter() argument"
msgstr "argomento di filter()"
+msgid "foreach() argument"
+msgstr "argomento di foreach()"
+
msgid "extendnew() argument"
msgstr "argomento di extendnew()"
@@ -2404,6 +2408,12 @@ msgstr "a %s su %s"
msgid "Printing '%s'"
msgstr "Stampato: '%s'"
+#. Default font name for current language on MS-Windows.
+#. If not translated, falls back to "Consolas".
+#. This must be a fixed-pitch font.
+msgid "DefaultFontNameForWindows"
+msgstr "NomeCarattereDefaultPerWindows"
+
msgid "Opening the X display took %ld msec"
msgstr "Attivazione visualizzazione X ha richiesto %ld msec"
@@ -3250,11 +3260,11 @@ msgstr "%s ritorno #%ld"
msgid "%s returning %s"
msgstr "%s ritorno %s"
-msgid "Function %s does not need compiling"
-msgstr "La funzione %s non ha bisogno di compilazione"
+msgid "Function %s%s%s does not need compiling"
+msgstr "La funzione %s%s%s non ha bisogno di compilazione"
msgid "%s (%s, compiled %s)"
-msgstr "%s (%s, compilato %s)"
+msgstr "%s (%s, compilata %s)"
msgid ""
"\n"
@@ -3986,6 +3996,9 @@ msgstr "E104: Escape non consentito nei digrammi"
msgid "E105: Using :loadkeymap not in a sourced file"
msgstr "E105: Uso di :loadkeymap fuori da un file di comandi"
+msgid "E106: Unsupported diff output format: %s"
+msgstr "E106: Formato output di diff non supportato: %s"
+
msgid "E107: Missing parentheses: %s"
msgstr "E107: Mancano parentesi: %s"
@@ -4272,8 +4285,8 @@ msgstr "E196: Digrammi non supportati in questa versione"
msgid "E197: Cannot set language to \"%s\""
msgstr "E197: Non posso impostare lingua a \"%s\""
-msgid "E199: Active window or buffer deleted"
-msgstr "E199: Finestra attiva o buffer cancellato"
+msgid "E199: Active window or buffer changed or deleted"
+msgstr "E199: Finestra attiva o buffer modificato o cancellato"
msgid "E200: *ReadPre autocommands made the file unreadable"
msgstr "E200: Gli autocomandi *ReadPre hanno reso il file illeggibile"
@@ -7769,8 +7782,7 @@ msgstr "E1330: Tipo non valido per variabile Object: %s"
msgid ""
"E1331: Public must be followed by \"var\" or \"static\" or \"final\" or "
"\"const\""
-msgstr "E1331: Public dev'essere seguito da \"var\" o \"static\" o "
-"\"const\""
+msgstr "E1331: Public dev'essere seguito da \"var\" o \"static\" o \"const\""
msgid "E1332: Public variable name cannot start with underscore: %s"
msgstr ""
@@ -7884,9 +7896,7 @@ msgstr ""
msgid ""
"E1368: Static must be followed by \"var\" or \"def\" or \"final\" or "
"\"const\""
-msgstr ""
-"E1368: \"Static\" deve essere seguito da \"var\" o \"def\" o "
-"\"const\""
+msgstr "E1368: \"Static\" deve essere seguito da \"var\" o \"def\" o \"const\""
msgid "E1369: Duplicate variable: %s"
msgstr "E1369: Variabile duplicata: %s"
@@ -8029,8 +8039,8 @@ msgid "E1408: Final variable not supported in an interface"
msgstr "E1408: Variabile Finale non supportata in un'Interfaccia"
msgid "E1409: Cannot change read-only variable \"%s\" in class \"%s\""
-msgstr "E1409: Non posso cambiare variabile in sola-lettura \"%s\" "
-"in Classe \"%s\""
+msgstr ""
+"E1409: Non posso cambiare variabile in sola-lettura \"%s\" in Classe \"%s\""
msgid "E1410: Const variable not supported in an interface"
msgstr "E1410: Variabile di tipo \"Const\" non supportata in un'Interfaccia"
@@ -8038,6 +8048,12 @@ msgstr "E1410: Variabile di tipo \"Const\" non supportata in un'Interfaccia"
msgid "E1411: Missing dot after object \"%s\""
msgstr "E1411: Manca un punto dopo \"Object\" \"%s\""
+msgid "E1412: Builtin object method \"%s\" not supported"
+msgstr "E1412: Metodo Object predefinito \"%s\" non supportato"
+
+msgid "E1413: Builtin class method not supported"
+msgstr "E1413: Metodo Classe predefinito non supportato"
+
msgid "E1500: Cannot mix positional and non-positional arguments: %s"
msgstr ""
"E1500: Non si possono mischiare argomenti posizionali e non posizionali: %s"
@@ -8079,8 +8095,19 @@ msgstr "E1509: Errore in lettura o scrittura degli attributi estesi"
msgid "E1510: Value too large: %s"
msgstr "E1510: Valore troppo grande: %s"
+msgid "E1511: Wrong number of characters for field \"%s\""
+msgstr "E1511: Numero caratteri errato per campo \"%s\""
+
+msgid "E1512: Wrong character width for field \"%s\""
+msgstr "E1512: Larghezza carattere errata per campo \"%s\""
+
+msgid "E1513: Cannot edit buffer. 'winfixbuf' is enabled"
+msgstr "E1513: Non riesco a modificare il buffer. Opzione 'winfixbuf' attiva"
+
#. type of cmdline window or 0
#. result of cmdline window or 0
+#. buffer of cmdline window or NULL
+#. window of cmdline window or NULL
msgid "--No lines in buffer--"
msgstr "--File vuoto--"
@@ -8827,6 +8854,9 @@ msgstr "numero minimo di righe usato per la finestra corrente"
msgid "minimal number of lines used for any window"
msgstr "numero minimo di righe usato per ogni finestra"
+msgid "keep window focused on a single buffer"
+msgstr "mantenere finestra dedicata a un solo buffer"
+
msgid "keep the height of the window"
msgstr "mantenere l'altezza della finestra"
diff --git a/src/po/ru.cp1251.po b/src/po/ru.cp1251.po
index e9d1910..2dd453a 100644
--- a/src/po/ru.cp1251.po
+++ b/src/po/ru.cp1251.po
@@ -21,10 +21,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: RuVim_0.9002185.251223\n"
+"Project-Id-Version: RuVim_0.9010059.260124\n"
"Report-Msgid-Bugs-To: The Vim Project, <vim-dev@vim.org>\n"
-"POT-Creation-Date: 2023-12-25 16:17+0300\n"
-"PO-Revision-Date: 2023-12-25 18:57+0300\n"
+"POT-Creation-Date: 2024-01-26 14:54+0300\n"
+"PO-Revision-Date: 2024-01-26 14:57+0300\n"
"Last-Translator: Restorer, <restorer@mail2k.ru>\n"
"Language-Team: RuVim, https://github.com/RestorerZ/RuVim\n"
"Language: ru_RU\n"
@@ -233,6 +233,7 @@ msgstr "Îêîí÷àíèå"
msgid "Top"
msgstr "Íà÷àëî"
+# #Restorer: ëîêàëèçóåìîå çíà÷åíèå ïðîöåíòà
# :!~ Restorer
#, c-format
msgid "%d%%"
@@ -266,6 +267,10 @@ msgstr " (ôàéë %d èç %d"
msgid " (file (%d) of %d)"
msgstr " (ôàéë (%d) èç %d"
+# :!~ Restorer
+msgid "[Command Line]"
+msgstr "[êîìàíäíàÿ ñòðîêà]"
+
# #Restorer: â ñòðîêå ñîñòîÿíèÿ äëÿ áóôåðà ñ îêíîì çàïðîñà è óâåäîìëåíèÿ
# :!~ Restorer
msgid "[Prompt]"
@@ -701,6 +706,7 @@ msgstr ""
# #Restorer: èñïîëüçóåòñÿ â ôóíêöèè confirm() åñëè íå çàäàíû àðãóìåíò buttons
# #Restorer: èñïîëüçóåòñÿ êàê êíîïêà ïî óìîë÷àíèþ â îêíàõ ñîîáùåíèé ÃÈÏ
# :!~ Restorer
+#.
msgid "&Ok"
msgstr "&OK"
@@ -1078,10 +1084,6 @@ msgstr "Îøèáêà"
msgid "Interrupt"
msgstr "Ïðåðûâàíèå"
-# :!~ Restorer
-msgid "[Command Line]"
-msgstr "[êîìàíäíàÿ ñòðîêà]"
-
# #Restorer: â UNIX-ïîäîáíûõ ñèñòåìàõ
# #Restorer: è åù¸ îøèáêà E502:
# ~!: earlier
@@ -1090,7 +1092,7 @@ msgstr "ÿâëÿåòñÿ êàòàëîãîì"
# :!~ Restorer
msgid "Illegal file name"
-msgstr "Íåäîïóñòèìûå ñèìâîëû èëè ïðåâûøåíà äëèíà íàèìåíîâàíèÿ ôàéëà"
+msgstr "Îáíàðóæåíû íåäîïóñòèìûå ñèìâîëû èëè ïðåâûøåíà äëèíà íàèìåíîâàíèÿ ôàéëà"
# #Restorer: â UNIX-ïîäîáíûõ ñèñòåìàõ
# ~!: earlier
@@ -1373,10 +1375,12 @@ msgstr ""
msgid "OK"
msgstr "OK"
+# #Restorer: íàèìåíîâàíèå êíîïêè â äèàëîãîâîì îêíå
# :!~ Restorer
msgid "Yes"
msgstr "Äà"
+# #Restorer: íàèìåíîâàíèå êíîïêè â äèàëîãîâîì îêíå
# :!~ Restorer
msgid "No"
msgstr "Íåò"
@@ -1574,27 +1578,28 @@ msgstr "Directory\t*.nothing\n"
# :!~ Restorer
#, c-format
msgid "Font0: %s"
-msgstr "íàèìåíîâàíèå øðèôòà font0 %s"
+msgstr "Øðèôò font0 %s"
# :!~ Restorer
#, c-format
msgid "Font%d: %s"
-msgstr "íàèìåíîâàíèå øðèôòà font%d %s"
+msgstr "Øðèôò font%d %s"
# :!~ Restorer
#, c-format
msgid "Font%d width is not twice that of font0"
-msgstr "øèðèíà ñèìâîëîâ font%d äîëæíà áûòü âäâîå áîëüøå øèðèíû ñèìâîëîâ font0"
+msgstr ""
+"øèðèíà ñèìâîëîâ â font%d äîëæíà áûòü âäâîå áîëüøå øèðèíû ñèìâîëîâ â font0"
# :!~ Restorer
#, c-format
msgid "Font0 width: %d"
-msgstr "øèðèíà ñèìâîëîâ font0 %d"
+msgstr "øèðèíà ñèìâîëîâ â font0 %d"
# :!~ Restorer
#, c-format
msgid "Font%d width: %d"
-msgstr "øèðèíà ñèìâîëîâ font%d %d"
+msgstr "øèðèíà ñèìâîëîâ â font%d %d"
# #Restorer: âûâîäèòñÿ â èíôîðìàöèîííîì îêíå
# :!~ Restorer
@@ -1631,17 +1636,17 @@ msgstr "Ïîêàçûâàòü ðàçìåð â ïóíêòàõ"
msgid "Encoding:"
msgstr "Êîäèðîâêà:"
-# #Restorer: íàèìåíîâàíèå ïîëÿ ñî ñïèñêîì øðèôòîâ â îêíå âûáîðà øðèôòà
+# #Restorer: íàèìåíîâàíèå ïîëÿ ñ ïåðå÷íåì øðèôòîâ â îêíå âûáîðà øðèôòà
# ~!: earlier
msgid "Font:"
msgstr "Øðèôò:"
-# #Restorer: íàèìåíîâàíèå ïîëÿ ñî ñïèñêîì íà÷åðòàíèé â îêíå âûáîðà øðèôòà
+# #Restorer: íàèìåíîâàíèå ïîëÿ ñ ïåðå÷íåì íà÷åðòàíèé â îêíå âûáîðà øðèôòà
# :!~ Restorer
msgid "Style:"
msgstr "Íà÷åðòàíèå:"
-# #Restorer: íàèìåíîâàíèå ïîëÿ ñî ñïèñêîì ðàçìåðîâ â îêíå âûáîðà øðèôòà
+# #Restorer: íàèìåíîâàíèå ïîëÿ ñ ïåðå÷íåì ðàçìåðîâ â îêíå âûáîðà øðèôòà
# ~!: earlier
msgid "Size:"
msgstr "Ðàçìåð:"
@@ -1895,6 +1900,7 @@ msgstr "íîìåð ñòðîêè âûõîäèò çà ïðåäåëû çíà÷åíèé äèàïàçîíà"
msgid "not allowed in the Vim sandbox"
msgstr "çàïðåùåíî âûïîëíåíèå â èçîëèðîâàííîé ñðåäå ïðîãðàììû Vim"
+# #Restorer: Check! Is error number duble!
# :!~ Restorer
#, c-format
msgid "E370: Could not load library %s"
@@ -1953,7 +1959,7 @@ msgstr "âûïîëíåíèå ïðåðâàíî ïîëüçîâàòåëåì"
msgid "cannot create buffer/window command: object is being deleted"
msgstr ""
"îáúåêò áóôåðà èëè îêíà â ïðîöåññå óäàëåíèÿ. Íå óäàëîñü ñîçäàòü äëÿ íèõ "
-"êîìàíäû"
+"êîìàíäó"
# :!~ Restorer
msgid ""
@@ -1979,7 +1985,7 @@ msgstr "Íå óäàëîñü çàðåãèñòðèðîâàòü íàèìåíîâàíèå ñåðâåðà êîìàíä"
# :!~ Restorer
#, c-format
msgid "%ld lines to indent... "
-msgstr "Âûïîëíÿåòñÿ èçìåíåíèÿ îòñòóïà â %ld ñòðîêàõ... "
+msgstr "Âûïîëíÿåòñÿ èçìåíåíèå îòñòóïà â %ld ñòðîêàõ... "
# #Restorer: âûâîäèòñÿ ïðè çíà÷åíèè 'report' < %ld
# :!~ Restorer
@@ -2095,7 +2101,7 @@ msgstr "Êîíåö àáçàöà"
# #Restorer: âûâîäèòñÿ ïðè àâòîïîäñòàíîâêå
# :!~ Restorer
msgid "Pattern not found"
-msgstr "Íå íàéäåíû âàðèàíòû äëÿ ïîäñòàíîâêè"
+msgstr "Îòñóòñòâóþò âàðèàíòû äëÿ ïîäñòàíîâêè"
# ~!: earlier
msgid "Back at original"
@@ -2151,6 +2157,11 @@ msgstr "àðãóìåíòà ôóíêöèè filter()"
# #Restorer: äîïèñûâàåòñÿ, íàïðèìåð, ê ñîîáùåíèþ E741 èëè E742
# :!~ Restorer
+msgid "foreach() argument"
+msgstr "àðãóìåíòà ôóíêöèè foreach()"
+
+# #Restorer: äîïèñûâàåòñÿ, íàïðèìåð, ê ñîîáùåíèþ E741 èëè E742
+# :!~ Restorer
msgid "extendnew() argument"
msgstr "àðãóìåíòà ôóíêöèè extendnew()"
@@ -2178,7 +2189,7 @@ msgstr "Íå ðàñïîçíàí àðãóìåíò êîìàíäíîé ñòðîêè"
# :!~ Restorer
msgid "Too many edit arguments"
-msgstr "Ïðåâûøåíî êîëè÷åñòâî ôàéëîâ ïåðåäàâàåìûõ â ïðîãðàììó äëÿ ïðàâêè"
+msgstr "Ïðåâûøåíî êîëè÷åñòâî ôàéëîâ, ïåðåäàâàåìûõ â ïðîãðàììó äëÿ ïðàâêè"
# :!~ Restorer
msgid "Argument missing after"
@@ -2387,7 +2398,7 @@ msgstr "-R\t\t\tÐàáîòà â âàðèàíòå òîëüêî äëÿ ÷òåíèÿ (êàê \"view\")"
# :!~ Restorer
msgid "-Z\t\t\tRestricted mode (like \"rvim\")"
-msgstr "-Z\t\t\tÐàáîòà â âàðèàíòå ñ îãðàíè÷åíèÿìè (êàê \"rvim\")"
+msgstr "-Z\t\t\tÐàáîòà ñ îãðàíè÷åííîé ôóíêöèîíàëüíîñòüþ (êàê \"rvim\")"
# :!~ Restorer
msgid "-m\t\t\tModifications (writing files) not allowed"
@@ -2450,8 +2461,7 @@ msgstr "-f\t\t\tÍå èñïîëüçîâàòü êîìàíäó newcli äëÿ îòêðûòèÿ îêíà"
# #Restorer: óáðàë îäèí \t, ÷òîáû âûãëÿäåëî åäèíîîáðàçíî
# :!~ Restorer
msgid "-dev <device>\t\tUse <device> for I/O"
-msgstr ""
-"-dev <óñòðîéñòâî>\tÈñïîëüçîâàòü äëÿ îïåðàöèé ââîäà-âûâîäà äàííîå <óñòðîéñòâî>"
+msgstr "-dev <óñòðîéñòâî>\tÈñïîëüçîâàòü äëÿ îïåðàöèé ââîäà-âûâîäà <óñòðîéñòâî>"
# :!~ Restorer
msgid "-A\t\t\tStart in Arabic mode"
@@ -2603,7 +2613,6 @@ msgstr ""
msgid "--startuptime <file>\tWrite startup timing messages to <file>"
msgstr "--startuptime <ôàéë>\tÇàïèñàòü õðîíîìåòðàæ çàïóñêà ïðîãðàììû â <ôàéë>"
-# #Restorer: äîáàâèë îäèí \t ÷òîáû âûãëÿäåëî åäèíîîáðàçíî
# :!~ Restorer
msgid "--log <file>\t\tStart logging to <file> early"
msgstr ""
@@ -2614,7 +2623,6 @@ msgid "-i <viminfo>\t\tUse <viminfo> instead of .viminfo"
msgstr "-i <ôàéë>\t\tÈñïîëüçîâàíèå âìåñòî ôàéëà .viminfo óêàçàííîãî <ôàéëà>"
# \n\t\t.. äëÿ óìåùåíèÿ â 80 ñòîëáöîâ (Ñ. Àë¸øèí)
-# #Restorer: óáðàë îäèí \t è äîáàâèë ïðîáåëû, ÷òîáû âûãëÿäåëî åäèíîîáðàçíî
# :!~ Restorer
msgid "--clean\t\t'nocompatible', Vim defaults, no plugins, no viminfo"
msgstr ""
@@ -2640,8 +2648,7 @@ msgstr ""
# :!~ Restorer
msgid "-display <display>\tRun Vim on <display>"
-msgstr ""
-"-display <X-ñåðâåð>\tÇàïóñê ïðîãðàììû ñ ïîäêëþ÷åíèåì ê óêàçàííîìó X-ñåðâåðó"
+msgstr "-display <ñåðâåð>\tÏîäêëþ÷åíèå ïðîãðàììû ê X-ñåðâåðó <ñåðâåð>"
# :!~ Restorer
msgid "-iconic\t\tStart Vim iconified"
@@ -2705,7 +2712,7 @@ msgstr ""
# :!~ Restorer
msgid "-display <display>\tRun Vim on <display> (also: --display)"
msgstr ""
-"-display <display>\tÏîäêëþ÷åíèå ïðîãðàììû ê X-ñåðâåðó <ñåðâåð> (--display)"
+"-display <ñåðâåð>\tÏîäêëþ÷åíèå ïðîãðàììû ê X-ñåðâåðó <ñåðâåð> (--display)"
# :!~ Restorer
msgid "--role <role>\tSet a unique role to identify the main window"
@@ -2767,12 +2774,12 @@ msgstr "Ñîñòîÿíèå ïðîòîêîëà «kitty» îáìåíà äàííûìè ñ êëàâèàòóðîé: %s\n"
# #Restorer: âûâîäèòñÿ, íàïðèìåð, ïî êîìàíäå `:abbreviata`
# :!~ Restorer
msgid "No abbreviation found"
-msgstr "Íå íàéäåíû ñîêðàùåíèÿ"
+msgstr "Îòñóòñòâóþò ñîêðàùåíèÿ"
# #Restorer: âûâîäèòñÿ, íàïðèìåð, ïî êîìàíäå `:map`
# :!~ Restorer
msgid "No mapping found"
-msgstr "Íå íàéäåíû êëàâèàòóðíûå êîìàíäû"
+msgstr "Îòñóòñòâóþò êëàâèàòóðíûå êîìàíäû"
# #Restorer: âûâîäèòñÿ ïî êîìàíäå `:marks`
# :!~ Restorer
@@ -2847,7 +2854,7 @@ msgid ""
",\n"
"or the file has been damaged."
msgstr ""
-", \n"
+",\n"
"ëèáî îí áûë ïîâðåæä¸í"
# ~!: earlier
@@ -2875,7 +2882,7 @@ msgid ""
"If you entered a new crypt key but did not write the text file,"
msgstr ""
"\n"
-"Åñëè ïîñëå èçìåíåíèÿ ïàðîëÿ äëÿ øèôðîâàíèÿ, òåêñòîâûé ôàéë íå ñîõðàíÿëè,"
+"Åñëè ïîñëå èçìåíåíèÿ ïàðîëÿ øèôðîâàíèÿ íå áûëî ñîõðàíåíèå òåêñòîâîãî ôàéëà,"
# :!~ Restorer
msgid ""
@@ -2926,7 +2933,7 @@ msgstr "???ÁËÎÊ ÏÐÎÏÓÙÅÍ"
# :!~ Restorer
msgid "??? from here until ???END lines may be messed up"
msgstr ""
-"Ñòðîêè, êîòîðûå âîçìîæíî èñïîð÷åíû, ïîìåùåíû ìåæäó ìåòêàìè ??? è ???END"
+"Ñòðîêè, êîòîðûå, âîçìîæíî, èñïîð÷åíû, ïîìåùåíû ìåæäó ìåòêàìè ??? è ???END"
# :!~ Restorer
msgid "??? from here until ???END lines may have been inserted/deleted"
@@ -3181,19 +3188,19 @@ msgstr ""
# #Restorer: ñäâèíóò ê ãðàíèöå ýêðàíà
# :!~ Restorer
msgid " If this is the case, use \":recover\" or \"vim -r "
-msgstr " ýòîì ñëó÷àå èñïîëüçóéòå êîìàíäó :recover èëè \"vim -r "
+msgstr " ýòîì ñëó÷àå èñïîëüçóéòå êîìàíäó :recover èëè `vim -r "
# :!~ Restorer
msgid ""
"\"\n"
" to recover the changes (see \":help recovery\").\n"
msgstr ""
-"\",\n"
+"`,\n"
"÷òîáû âûïîëíèòü âîññòàíîâëåíèå äàííûõ (ïîäðîáíåå ñì. `:help recovery`).\n"
# :!~ Restorer
msgid " If you did this already, delete the swap file \""
-msgstr "Åñëè ýòî óæå áûë ñäåëàíî, òî óäàëèòå ôàéë ïîäêà÷êè \""
+msgstr "Åñëè ýòî óæå áûëî ñäåëàíî, òî óäàëèòå ôàéë ïîäêà÷êè \""
# :!~ Restorer
msgid ""
@@ -3234,7 +3241,7 @@ msgid ""
"&Quit\n"
"&Abort"
msgstr ""
-"Òîëüêî ÷òåíèå (&O)\n"
+"Îòêðûòü äëÿ ÷òåíèÿ (&O)\n"
"Ðåäàêòèðîâàòü (&E)\n"
"Âîññòàíîâèòü (&R)\n"
"Âûõîä (&Q)\n"
@@ -3250,7 +3257,7 @@ msgid ""
"&Quit\n"
"&Abort"
msgstr ""
-"Òîëüêî ÷òåíèå (&O)\n"
+"Îòêðûòü äëÿ ÷òåíèÿ (&O)\n"
"Ðåäàêòèðîâàòü (&E)\n"
"Âîññòàíîâèòü (&R)\n"
"Óäàëèòü (&D)\n"
@@ -3398,7 +3405,7 @@ msgstr "Âíèìàíèå! Äëÿ äàííîãî òåðìèíàë íåäîñòóïíà ïîäñâåòêà òåêñòà"
# :!~ Restorer
msgid "Type :qa! and press <Enter> to abandon all changes and exit Vim"
msgstr ""
-"×òîáû çàêðûòü ïðîãðàììó ñ îòìåíîé âñåõ ïðàâîê, íàáåðèòå :qa! è íàæìèòå "
+"×òîáû çàêðûòü ïðîãðàììó ñ îòìåíîé âñåõ ïðàâîê, íàáåðèòå :qa! è íàæìèòå "
"<ENTER>"
# :!~ Restorer
@@ -3621,6 +3628,10 @@ msgid "Printing '%s'"
msgstr "Ïå÷àòü '%s'"
# :!~ Restorer
+msgid "DefaultFontNameForWindows"
+msgstr "Consolas"
+
+# :!~ Restorer
#, c-format
msgid "Opening the X display took %ld msec"
msgstr "Ïîäêëþ÷åíèå ê X-ñåðâåðó çàíÿëî %ld ìñ"
@@ -3851,7 +3862,7 @@ msgstr ""
"â ôóíêöèè setqflist(). Äîëæåí áûòü óêàçàí ëèáî ïåðâûé, ëèáî ïîñëåäíèé "
"àðãóìåíò"
-# #Restorer: âûâîäèòñÿ ïðè 'verbose' > 0
+# #Restorer: âûâîäèòñÿ ïðè 'verbose'>0
# :!~ Restorer
msgid "Switching to backtracking RE engine for pattern: "
msgstr "Ïåðåêëþ÷åíèå íà ìåõàíèçì «ïîèñê ñ âîçâðàòîì» äëÿ ïîèñêîâîãî øàáëîíà: "
@@ -3990,13 +4001,13 @@ msgid "recording"
msgstr "ÇÀÏÈÑÜ Â ÐÅÃÈÑÒÐ"
# #Restorer: ïðè ïîèñêå ôàéëà â çàäàííîì êàòàëîãå, åñëè 'verbose'>10
-# ~!: earlier
+# :!~ Restorer
#, c-format
msgid "Searching for \"%s\" under \"%s\" in \"%s\""
msgstr "Ïîèñê \"%s\" â ïîäêàòàëîãå \"%s\" êàòàëîãîâ èç \"%s\""
# #Restorer: ïðè ïîèñêå ôàéëà â çàäàííîì êàòàëîãå, åñëè 'verbose'>10
-# ~!: earlier
+# :!~ Restorer
#, c-format
msgid "Searching for \"%s\" in \"%s\""
msgstr "Ïîèñê \"%s\" â êàòàëîãàõ èç \"%s\""
@@ -4229,7 +4240,7 @@ msgstr "Â ôàéëå %s íà ñòðîêå %d ïðåâûøåíà äëèíà íàèìåíîâàíèÿ àôôèêñà %s"
# :!~ Restorer
msgid "Compressing word tree..."
-msgstr "Ñæàòèå «äåðåâà» ñëîâ ..."
+msgstr "Ñæàòèå «äåðåâà» ñëîâ..."
# :!~ Restorer
#, c-format
@@ -4245,12 +4256,12 @@ msgstr "Ñ÷èòûâàíèå ôàéëà àôôèêñîâ %s..."
#, c-format
msgid "Conversion failure for word in %s line %d: %s"
msgstr ""
-" ôàéëå %s íà ñòðîêå %d ïðîèçîø¸ë ñáîé ïðè èçìåíåíèè êîäèðîâêè òåêñò %s"
+" ôàéëå %s íà ñòðîêå %d ïðîèçîø¸ë ñáîé ïðè èçìåíåíèè êîäèðîâêè òåêñòà %s"
# :!~ Restorer
#, c-format
msgid "Conversion in %s not supported: from %s to %s"
-msgstr "Äëÿ ôàéëà %s íå ïîääåðæèâàåòñÿ ïåðåêîäèðîâàíèå èç %s â %s"
+msgstr "Äëÿ ôàéëà %s íå ïîääåðæèâàåòñÿ èçìåíåíèå êîäèðîâêè òåêñòà èç %s â %s"
# :!~ Restorer
#, c-format
@@ -4405,7 +4416,7 @@ msgstr "Â ôàéëå %s íà ñòðîêå %d îáíàðóæåí íåäîïóñòèìûé ïðèçíàê %s"
# :!~ Restorer
#, c-format
msgid "%s value differs from what is used in another .aff file"
-msgstr " äðóãîì ôàéëå àôôèêñîâ îáíàðóæåíî îòëè÷àþùååñÿ çíà÷åíèå äëÿ %s"
+msgstr " äðóãîì ôàéëå àôôèêñîâ îáíàðóæåíî íåñîâïàäàþùåå çíà÷åíèå äëÿ %s"
# :!~ Restorer
#, c-format
@@ -4442,29 +4453,29 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "Reading word file %s..."
-msgstr "Ñ÷èòûâàíèå ôàéëà ñî ñïèñêîì ñëîâ %s..."
+msgstr "Ñ÷èòûâàíèå ôàéëà ñ ïåðå÷íåì ñëîâ %s..."
# :!~ Restorer
#, c-format
msgid "Conversion failure for word in %s line %ld: %s"
msgstr ""
-" ôàéëå %s íà ñòðîêå %ld ïðîèçîø¸ë ñáîé ïðè èçìåíåíèè êîäèðîâêè òåêñò %s"
+" ôàéëå %s íà ñòðîêå %ld ïðîèçîø¸ë ñáîé ïðè èçìåíåíèè êîäèðîâêè òåêñòà %s"
# :!~ Restorer
#, c-format
msgid "Duplicate /encoding= line ignored in %s line %ld: %s"
-msgstr "Â ôàéëå %s íà ñòðîêå %ld áûë ïðîèãíîðèðîâàí ïîâòîð /encoding= %s"
+msgstr "Â ôàéëå %s íà ñòðîêå %ld íå îáðàáîòàí ïîâòîð /encoding= %s"
# :!~ Restorer
#, c-format
msgid "/encoding= line after word ignored in %s line %ld: %s"
msgstr ""
-"Â ôàéëå %s íà ñòðîêå %ld ïðîèãíîðèðîâàí óêàçàííûé ïîñëå ñëîâà /encoding= %s"
+"Â ôàéëå %s íà ñòðîêå %ld íå îáðàáîòàí óêàçàííûé ïîñëå ñëîâà /encoding= %s"
# :!~ Restorer
#, c-format
msgid "Duplicate /regions= line ignored in %s line %ld: %s"
-msgstr "Â ôàéëå %s íà ñòðîêå %ld áûë ïðîèãíîðèðîâàí ïîâòîð %s"
+msgstr "Â ôàéëå %s íà ñòðîêå %ld íå îáðàáîòàí ïîâòîð /regions= %s"
# :!~ Restorer
#, c-format
@@ -4475,7 +4486,7 @@ msgstr " ôàéëå %s íà ñòðîêå %ld ïðåâûøåíî êîëè÷åñòâî ðåãèîíîâ %s"
#, c-format
msgid "/ line ignored in %s line %ld: %s"
msgstr ""
-"Â ôàéëå %s íà ñòðîêå %ld íå îáðàáîòàí óêàçàííûé ïîñëå ñèìâîëà / òåêñò %s"
+"Â ôàéëå %s íà ñòðîêå %ld íå îáðàáîòàí òåêñò, óêàçàííûé ïîñëå ñèìâîëà '/' %s"
# :!~ Restorer
#, c-format
@@ -4500,11 +4511,12 @@ msgstr "Ñæàòî óçëîâ %s: %ld èç %ld. Îñòàëîñü %ld (%ld%%)"
# :!~ Restorer
msgid "Reading back spell file..."
-msgstr "Ñ÷èòûâàíèå çàïèñàííîãî ôàéëà ïðàâèë íàïèñàíèÿ ..."
+msgstr "Ñ÷èòûâàíèå çàïèñàííîãî ôàéëà ïðàâèë íàïèñàíèÿ..."
# :!~ Restorer
+#.
msgid "Performing soundfolding..."
-msgstr "Ïîñòðîåíèå ïðåôèêñíîãî «äåðåâà» îìîôîíîâ ..."
+msgstr "Ïîñòðîåíèå ïðåôèêñíîãî «äåðåâà» îìîôîíîâ..."
# :!~ Restorer
#, c-format
@@ -4849,7 +4861,7 @@ msgstr "Íå óäàëîñü çàïèñàòü ôàéë. Ôàéë íå ÿâëÿåòñÿ ôàéëîì èçìåíåíèé %s"
# #Restorer: âûâîäèòñÿ, íàïðèìåð, äëÿ êîìàíä `:wundo` è `:rundo` ïðè 'verbose'>0
# :!~ Restorer
msgid "Skipping undo file write, nothing to undo"
-msgstr "Çàïèñü ôàéëà èçìåíåíèé íå âûïîëíåíà. Èçìåíåíèÿ îòñóòñòâóþò."
+msgstr "Èçìåíåíèÿ îòñóòñòâóþò. Çàïèñü ôàéëà èçìåíåíèé íå âûïîëíåíà"
# #Restorer: âûâîäèòñÿ, íàïðèìåð, äëÿ êîìàíä `:wundo` è `:rundo` ïðè 'verbose'>0
# :!~ Restorer
@@ -4971,7 +4983,7 @@ msgstr ""
# #Restorer: âûâîäèòñÿ ïî êîìàíäå `:command`
# :!~ Restorer
msgid "No user-defined commands found"
-msgstr "Íå íàéäåíû ñîçäàííûå ïîëüçîâàòåëåì êîìàíäû"
+msgstr "Ñîçäàííûå ïîëüçîâàòåëåì êîìàíäû íå íàéäåíû"
# #Restorer: âûâîäèòñÿ ïðè 'verbose'>0
# :!~ Restorer
@@ -5009,15 +5021,14 @@ msgstr "%s âåðíóëà %s"
# :!~ Restorer
#, c-format
-msgid "Function %s does not need compiling"
-msgstr "Íå òðåáóåòñÿ êîìïèëÿöèÿ ôóíêöèè %s"
+msgid "Function %s%s%s does not need compiling"
+msgstr "Íå òðåáóåòñÿ êîìïèëÿöèÿ ôóíêöèè %s%s%s"
# #Restorer: ïåðâûé %s çàìåíÿåòñÿ íà VIM_VERSION_LONG_ONLY (òîëüêî íàèìåíîâàíèå
# #Restorer: ïðîãðàììû), âòîðîé %s - VIM_VERSION_DATE_ONLY (äàòà ïåðâîãî âûïóñêà),
# #Restorer: òðåòèé %s - äàòîé òåêóùåé ñáîðêè
# #Restorer: âûâîäèòñÿ ïî êîìàíäå vim.exe -h èëè `:version`
# :!~ Restorer
-# "%s (%s, ñáîðàíî â %s)"
#, c-format
msgid "%s (%s, compiled %s)"
msgstr "%s (%s, ñáîðêà îò %s)"
@@ -5198,59 +5209,59 @@ msgstr "  ýòîé âåðñèè âêëþ÷åíû (+) è îòêëþ÷åíû (-) ñëåäóþùèå êîìïîíåíòû:\n"
# ~!: earlier
msgid " system vimrc file: \""
-msgstr " îáùåñèñòåìíûé ôàéë vimrc: \""
+msgstr " îáùåñèñòåìíûé ôàéë vimrc: \""
# ~!: earlier
msgid " user vimrc file: \""
-msgstr " ïîëüçîâàòåëüñêèé ôàéë vimrc: \""
+msgstr " ïîëüçîâàòåëüñêèé ôàéë vimrc: \""
# ~!: earlier
msgid " 2nd user vimrc file: \""
-msgstr " âòîðîé ïîëüçîâàòåëüñêèé ôàéë vimrc: \""
+msgstr " âòîðîé ïîëüçîâàòåëüñêèé ôàéë vimrc: \""
# ~!: earlier
msgid " 3rd user vimrc file: \""
-msgstr " òðåòèé ïîëüçîâàòåëüñêèé ôàéë vimrc: \""
+msgstr " òðåòèé ïîëüçîâàòåëüñêèé ôàéë vimrc: \""
# ~!: earlier
msgid " user exrc file: \""
-msgstr " ïîëüçîâàòåëüñêèé ôàéë exrc: \""
+msgstr " ïîëüçîâàòåëüñêèé ôàéë exrc: \""
# ~!: earlier
msgid " 2nd user exrc file: \""
-msgstr " âòîðîé ïîëüçîâàòåëüñêèé ôàéë exrc: \""
+msgstr " âòîðîé ïîëüçîâàòåëüñêèé ôàéë exrc: \""
# ~!: earlier
msgid " system gvimrc file: \""
-msgstr " îáùåñèñòåìíûé ôàéë gvimrc: \""
+msgstr " îáùåñèñòåìíûé ôàéë gvimrc: \""
# ~!: earlier
msgid " user gvimrc file: \""
-msgstr " ïîëüçîâàòåëüñêèé ôàéë gvimrc: \""
+msgstr " ïîëüçîâàòåëüñêèé ôàéë gvimrc: \""
# ~!: earlier
msgid "2nd user gvimrc file: \""
-msgstr " âòîðîé ïîëüçîâàòåëüñêèé ôàéë gvimrc: \""
+msgstr "âòîðîé ïîëüçîâàòåëüñêèé ôàéë gvimrc: \""
# ~!: earlier
msgid "3rd user gvimrc file: \""
-msgstr " òðåòèé ïîëüçîâàòåëüñêèé ôàéë gvimrc: \""
+msgstr "òðåòèé ïîëüçîâàòåëüñêèé ôàéë gvimrc: \""
# :!~ Restorer
msgid " defaults file: \""
-msgstr " ôàéë ïðåäóñòàíîâëåííûõ íàñòðîåê: \""
+msgstr " ôàéë ïðåäóñòàíîâëåííûõ íàñòðîåê: \""
# ~!: earlier
msgid " system menu file: \""
-msgstr " îáùåñèñòåìíûé ôàéë ìåíþ: \""
+msgstr " îáùåñèñòåìíûé ôàéë ìåíþ: \""
# ~!: earlier
msgid " fall-back for $VIM: \""
-msgstr " çíà÷åíèå $VIM ïî óìîë÷àíèþ: \""
+msgstr " çíà÷åíèå $VIM ïî óìîë÷àíèþ: \""
# ~!: earlier
msgid " f-b for $VIMRUNTIME: \""
-msgstr " çíà÷åíèå $VIMRUNTIME ïî óìîë÷àíèþ: \""
+msgstr " çíà÷åíèå $VIMRUNTIME ïî óìîë÷àíèþ: \""
# :!~ Restorer
msgid "Compilation: "
@@ -5424,7 +5435,7 @@ msgstr ""
# #Restorer: E1016: Äëÿ îáëàñòè äåéñòâèÿ «ãëîáàëüíàÿ» íå ìîæåò áûòü îáúÿâëåíà ïåðåìåííàÿ %s
# :!~ Restorer
msgid "global"
-msgstr "«ãëîáàëüíûé»"
+msgstr "«îáùèé»"
# #Restorer: ïîäñòàâëÿåòñÿ â «E1016: Cannot declare a %s variable: %s» êàê
# #Restorer: ïåðâàÿ %s. Ìîæåò ëó÷øå íå ïåðåâîäèòü? Ïîêà ñäåëàë. Âûãëÿäèò òàê:
@@ -5459,7 +5470,7 @@ msgid ""
"# Buffer list:\n"
msgstr ""
"\n"
-"# Ñïèñîê áóôåðîâ:\n"
+"# Ïåðå÷åíü áóôåðîâ:\n"
# #Restorer: çàïèñü â viminfo-ôàéë æóðíàëà (history) êîìàíä, ïîèñêà è ïðî÷.
# :!~ Restorer
@@ -5510,13 +5521,14 @@ msgstr ""
msgid "%sviminfo: %s in line: "
msgstr "%s%s â viminfo-ôàéëå íà ñòðîêå "
-# ~!: earlier
+# #Restorer: â viminfo-ôàéëå
+# :!~ Restorer
msgid ""
"\n"
"# global variables:\n"
msgstr ""
"\n"
-"# Ãëîáàëüíûå ïåðåìåííûå:\n"
+"# Îáùèå ïåðåìåííûå:\n"
# #Restorer: çàïèñü â viminfo-ôàéëå
# :!~ Restorer
@@ -5645,7 +5657,7 @@ msgstr "Îòêðûòü ôàéëû â îòäåëüíûõ âêëàäêà&õ ïðîãðàììû Vim"
# :!~ Restorer
msgid "Edit with single &Vim"
-msgstr "Îòêðûòü âñå ôàéëû â îäíîé ïðîãðàììå &Vim"
+msgstr "Îòêðûòü âñå ôàéëû â &îäíîé ïðîãðàììå Vim"
# :!~ Restorer
msgid "Diff with Vim"
@@ -5653,7 +5665,7 @@ msgstr "Ñðàâíèòü ôàéëû â ïðîãðàììå Vim"
# :!~ Restorer
msgid "Edit with &Vim"
-msgstr "Îòêðûòü â ïðîãðàììå &Vim"
+msgstr "Îòêðûòü â &ïðîãðàììå Vim"
# :!~ Restorer
msgid "Edit with existing Vim"
@@ -5727,7 +5739,7 @@ msgstr "E18: Íåäîïóñòèìûå ñèìâîëû â ïðèñâàèâàåìîì âûðàæåíèè"
# :!~ Restorer
msgid "E19: Mark has invalid line number"
-msgstr "E19: Çàêëàäêà óêàçûâàåò íà íå ñóùåñòâóþùóþ ñòðîêó"
+msgstr "E19: Çàêëàäêà óêàçûâàåò íà íåñóùåñòâóþùóþ ñòðîêó"
# :!~ Restorer
msgid "E20: Mark not set"
@@ -5747,7 +5759,7 @@ msgstr "E23: Îòñóòñòâóþò ñîñåäíèå ôàéëû"
# :!~ Restorer
msgid "E24: No such abbreviation"
-msgstr "E24: Îòñóòñòâóåò óêàçàííîå ñîêðàùåíèå"
+msgstr "E24: Íå ñóùåñòâóåò óêàçàííîãî ñîêðàùåíèÿ"
# :!~ Restorer
msgid "E25: GUI cannot be used: Not enabled at compile time"
@@ -5770,15 +5782,15 @@ msgstr "E28: Íå ñóùåñòâóåò ãðóïïû ïîäñâåòêè ñèíòàêñèñà %s"
# :!~ Restorer
msgid "E29: No inserted text yet"
-msgstr "E29: Ðåãèñòð äëÿ ïîñëåäíåãî âñòàâëåííîãî òåêñòà ïóñò"
+msgstr "E29: Ðåãèñòð ïîñëåäíåãî íàáðàííîãî òåêñòà ïóñò"
# :!~ Restorer
msgid "E30: No previous command line"
-msgstr "E30: Ðåãèñòð äëÿ êîìàíä ðåæèìà êîìàíäíîé ñòðîêè ïóñò"
+msgstr "E30: Ðåãèñòð ïîñëåäíåé êîìàíäû ðåæèìà êîìàíäíîé ñòðîêè ïóñò"
# :!~ Restorer
msgid "E31: No such mapping"
-msgstr "E31: Íå ñóùåñòâóåò êëàâèàòóðíîé êîìàíäû"
+msgstr "E31: Íå ñóùåñòâóåò óêàçàííîé êëàâèàòóðíîé êîìàíäû"
# :!~ Restorer
msgid "E32: No file name"
@@ -5957,7 +5969,7 @@ msgstr "E74: Ïðåâûøåíà äëèíà ðåçóëüòàòà âûïîëíåíèÿ êëàâèàòóðíîé êîìàíäû"
# :!~ Restorer
msgid "E75: Name too long"
-msgstr "E75: Ïðåâûøåíà äëèíà ìàðøðóòà ê ôàéëó"
+msgstr "E75: Ïðåâûøåíà äîïóñòèìàÿ äëèíà ìàðøðóòà ê ôàéëó"
# :!~ Restorer
msgid "E76: Too many ["
@@ -6003,7 +6015,7 @@ msgstr "E85: Óêàçàííûé áóôåð îòñóòñòâóåò â ñïèñêå áóôåðîâ"
# :!~ Restorer
#, c-format
msgid "E86: Buffer %ld does not exist"
-msgstr "E86: Áóôåð ïîä íîìåðîì %ld íå ñóùåñòâóåò"
+msgstr "E86: Íå ñóùåñòâóåò áóôåðà ïîä íîìåðîì %ld"
# :!~ Restorer
msgid "E87: Cannot go beyond last buffer"
@@ -6105,7 +6117,7 @@ msgstr "E108: Íå ñóùåñòâóåò ïåðåìåííîé \"%s\""
# :!~ Restorer
msgid "E109: Missing ':' after '?'"
msgstr ""
-"E109: Îòñóòñòâóåò ñèìâîë äâîåòî÷èÿ ':' â îïåðàòîðå ïðîâåðêè óñëîâèÿ '?'"
+"E109: Îòñóòñòâóåò ñèìâîë äâîåòî÷èÿ ':' â îïåðàòîðå ïðîâåðêè óñëîâèÿ `?`"
# :!~ Restorer
msgid "E110: Missing ')'"
@@ -6285,7 +6297,7 @@ msgstr "E144: Òðåáóåòñÿ óêàçàòü ÷èñëîâîé ïàðàìåòð äëÿ êîìàíäû :z"
msgid "E145: Shell commands and some functionality not allowed in rvim"
msgstr ""
"E145: Êîìàíäû êîìàíäíîé îáîëî÷êè è íåêîòîðàÿ ôóíêöèîíàëüíîñòü îòêëþ÷åíû â "
-"âàðèàíòå ïðîãðàììû rvim"
+"âàðèàíòå ïðîãðàììû rVim"
# :!~ Restorer
msgid "E146: Regular expressions can't be delimited by letters"
@@ -6485,7 +6497,7 @@ msgstr "E185: Íå íàéäåíà öâåòîâàÿ ñõåìà \"%s\""
# :!~ Restorer
msgid "E186: No previous directory"
-msgstr "E186: Ðàíåå èçìåíåíèé êàòàëîãà íå âûïîëíÿëîñü, îñòàëñÿ òåêóùèé êàòàëîã"
+msgstr "E186: Ïåðåõîäû â äðóãîé êàòàëîã ðàíåå íå âûïîëíÿëèñü"
# :!~ Restorer
msgid "E187: Directory unknown"
@@ -6506,7 +6518,7 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "E190: Cannot open \"%s\" for writing"
-msgstr "E190: Íå óäàëîñü îòêðûòü íà çàïèñü ôàéëà \"%s\""
+msgstr "E190: Íå óäàëîñü îòêðûòü íà çàïèñü ôàéë \"%s\""
# :!~ Restorer
msgid "E191: Argument must be a letter or forward/backward quote"
@@ -6543,8 +6555,8 @@ msgid "E197: Cannot set language to \"%s\""
msgstr "E197: Íå óäàëîñü èçìåíèòü ðåãèîíàëüíûå íàñòðîéêè äëÿ \"%s\""
# :!~ Restorer
-msgid "E199: Active window or buffer deleted"
-msgstr "E199: Óäàëåíû àêòèâíîå îêíî èëè áóôåð"
+msgid "E199: Active window or buffer changed or deleted"
+msgstr "E199: Óäàëåíèå èëè èçìåíåíèå òåêóùåãî îêíà èëè áóôåðà"
# :!~ Restorer
msgid "E200: *ReadPre autocommands made the file unreadable"
@@ -6622,12 +6634,12 @@ msgstr "E214: Íó óäàëîñü íàéòè âðåìåííûé ôàéë äëÿ ïðîäîëæåíèÿ îïåðàöèè çàïèñè"
# :!~ Restorer
#, c-format
msgid "E215: Illegal character after *: %s"
-msgstr "E215: Òðåáóåòñÿ ïðîáåëüíûé ñèìâîë ïîñëå ñèìâîëà * â %s"
+msgstr "E215: Òðåáóåòñÿ ïðîáåëüíûé ñèìâîë ïîñëå ñèìâîëà '*' â %s"
# :!~ Restorer
#, c-format
msgid "E216: No such event: %s"
-msgstr "E216: Íå ñóùåñòâóåò ñîáûòèå %s"
+msgstr "E216: Íå ñóùåñòâóåò ñîáûòèÿ %s"
# :!~ Restorer
#, c-format
@@ -6662,12 +6674,12 @@ msgstr "E223: Ïðåâûøåíî êîëè÷åñòâî ïåðåíàçíà÷åíèé êëàâèàòóðíîé êîìàíäû"
# :!~ Restorer
#, c-format
msgid "E224: Global abbreviation already exists for %s"
-msgstr "E224: Îáíàðóæåíî ñóùåñòâóþùåå ãëîáàëüíîå ñîêðàùåíèå %s"
+msgstr "E224: Îáíàðóæåíî ñóùåñòâóþùåå îáùåå ñîêðàùåíèå %s"
# :!~ Restorer
#, c-format
msgid "E225: Global mapping already exists for %s"
-msgstr "E225: Îáíàðóæåíà ñóùåñòâóþùàÿ ãëîáàëüíàÿ êëàâèàòóðíàÿ êîìàíäà %s"
+msgstr "E225: Îáíàðóæåíà ñóùåñòâóþùàÿ îáùàÿ êëàâèàòóðíàÿ êîìàíäà %s"
# :!~ Restorer
#, c-format
@@ -6778,7 +6790,7 @@ msgstr "E249: Äåéñòâèÿ àâòîêîìàíä âûçâàëè èçìåíåíèå ðàñïîëîæåíèÿ îêîí"
# ~!: earlier
#, c-format
msgid "E250: Fonts for the following charsets are missing in fontset %s:"
-msgstr "E250: Â íàáîðå øðèôòîâ %s îòñóòñòâóþò øðèôòû äëÿ êîäèðîâîê:"
+msgstr "E250: Â íàáîðå øðèôòîâ %s îòñóòñòâóþò øðèôòû ñî ñëåäóþùèìè ñèìâîëàìè:"
# #Restorer: îòîáðàæàåòñÿ òîëüêî ïðè ñïåöèôè÷åñêèõ óñëîâèÿõ
# :!~ Restorer
@@ -6819,7 +6831,7 @@ msgstr "E258: Íå óäàëîñü îòïðàâèòü ñîîáùåíèå êëèåíòó"
msgid "E259: No matches found for cscope query %s of %s"
msgstr "E259: Â áàçàõ äàííûõ cscope ïî çàïðîñó %s íå íàéäåí %s"
-# #Restorer: âûâîäèòñÿ ïðè çíà÷åíèè 'verbose' > 0
+# #Restorer: âûâîäèòñÿ ïðè çíà÷åíèè 'verbose'>0
# :!~ Restorer
msgid "E260: Missing name after ->"
msgstr "E260: Íå óêàçàí âûçûâàåìûé ìåòîä â çàïèñè ->"
@@ -6887,7 +6899,7 @@ msgstr "E272: Íåîáðàáîòàííîå èñêëþ÷åíèå"
msgid "E273: Unknown longjmp status %d"
msgstr "E273: Íåîïðåäåë¸ííîå ñîñòîÿíèå %d"
-# #Restorer: âûâîäèòñÿ ïðè 'verbose' > 0
+# #Restorer: âûâîäèòñÿ ïðè 'verbose'>0
# :!~ Restorer
msgid "E274: No white space allowed before parenthesis"
msgstr "E274: Íå äîïóñêàåòñÿ ïðîáåëüíûé ñèìâîë ïåðåä êðóãëûìè ñêîáêàìè"
@@ -6900,7 +6912,7 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "E276: Cannot use function as a method: %s"
-msgstr "E276: Íå äîïóñêàåòñÿ èñïîëüçîâàíèå ôóíêöèè êàê ìåòîä %s"
+msgstr "E276: Äàííàÿ ôóíêöèÿ íå ìîæåò áûòü èñïîëüçîâàíà êàê ìåòîä %s"
# :!~ Restorer
msgid "E277: Unable to read a server reply"
@@ -6908,8 +6920,7 @@ msgstr "E277: Íå óäàëîñü ñ÷èòàòü îòâåò ñåðâåðà"
# :!~ Restorer
msgid "E279: Sorry, ++shell is not supported on this system"
-msgstr ""
-"E279: Àðãóìåíò ++shell íå ïîääåðæèâàåòñÿ äëÿ äàííîé îïåðàöèîííîé ñèñòåìû"
+msgstr "E279: Àðãóìåíò ++shell íå ïîääåðæèâàåòñÿ â äàííîé îïåðàöèîííîé ñèñòåìå"
# :!~ Restorer
#, c-format
@@ -6920,7 +6931,7 @@ msgstr "E282: Íå óäàëîñü ñ÷èòàòü ôàéë \"%s\""
# :!~ Restorer
#, c-format
msgid "E283: No marks matching \"%s\""
-msgstr "E283: Îòñóòñòâóþò çàêëàäêè \"%s\""
+msgstr "E283: Îòñóòñòâóþò çàêëàäêè, ñîâïàäàþùèå ñ \"%s\""
# ~!: earlier
msgid "E284: Cannot set IC values"
@@ -7189,8 +7200,8 @@ msgstr ""
# :!~ Restorer
msgid "E352: Cannot erase folds with current 'foldmethod'"
msgstr ""
-"E352: Íå óäàëîñü îòìåíèòü îòîáðàæåíèå ñòðóêòóðû ïðè òåêóùåì çíà÷åíèè "
-"ïàðàìåòðà 'foldmethod'"
+"E352: Íå óäàëîñü óáðàòü îòîáðàæåíèå ñòðóêòóðû ïðè òåêóùåì çíà÷åíèè ïàðàìåòðà "
+"'foldmethod'"
# :!~ Restorer
#, c-format
@@ -7254,7 +7265,7 @@ msgstr "E366: Çàïðåù¸í ïåðåõîä âî âñïëûâàþùåå îêíî"
# :!~ Restorer
#, c-format
msgid "E367: No such group: \"%s\""
-msgstr "E367: Íå ñóùåñòâóåò ãðóïïà àâòîêîìàíä \"%s\""
+msgstr "E367: Íå ñóùåñòâóåò ãðóïïû àâòîêîìàíä \"%s\""
# :!~ Restorer
#, c-format
@@ -7266,6 +7277,7 @@ msgstr "E368: Ïîëó÷åííûé ÷åðåç ôóíêöèþ libcall() ñèãíàë SIG%s"
msgid "E369: Invalid item in %s%%[]"
msgstr "E369: Íåäîïóñòèìûé ìåòàñèìâîë â êëàññå ôàêóëüòàòèâíûõ ýëåìåíòîâ %s%%[]"
+# #Restorer: Check! Is error number duble!
# :!~ Restorer
#, c-format
msgid "E370: Could not load library %s: %s"
@@ -7278,12 +7290,12 @@ msgstr "E371: Íå íàéäåí ôàéë êîìàíäíîé îáîëî÷êè"
# :!~ Restorer
#, c-format
msgid "E372: Too many %%%c in format string"
-msgstr "E372:  ôîðìàòíîé ñòðîêå ïðåâûøåíî êîëè÷åñòâî %%%c"
+msgstr "E372:  ôîðìàòíîé ñòðîêå ïðåâûøåíî êîëè÷åñòâî ñïåöèôèêàòîðîâ %%%c"
# :!~ Restorer
#, c-format
msgid "E373: Unexpected %%%c in format string"
-msgstr "E373: Â ôîðìàòíîé ñòðîêå íåïðåäâèäåííîå ïîÿâëåíèå %%%c"
+msgstr "E373: Â ôîðìàòíîé ñòðîêå íåïðåäâèäåííîå ïîÿâëåíèå ñïåöèôèêàòîðà %%%c"
# :!~ Restorer
msgid "E374: Missing ] in format string"
@@ -7293,7 +7305,7 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "E375: Unsupported %%%c in format string"
-msgstr "E375: Â ôîðìàòíîé ñòðîêå íå ïîääåðæèâàåòñÿ ýëåìåíò %%%c"
+msgstr "E375: Â ôîðìàòíîé ñòðîêå íå ïîääåðæèâàåòñÿ ñïåöèôèêàòîð %%%c"
# :!~ Restorer
#, c-format
@@ -7303,7 +7315,7 @@ msgstr "E376: Â ôîðìàòíîé ñòðîêå íåäîïóñòèìûé ñïåöèôèêàòîð %%%c"
# :!~ Restorer
#, c-format
msgid "E377: Invalid %%%c in format string"
-msgstr "E377: Â ôîðìàòíîé ñòðîêå íåäîïóñòèìûé ýëåìåíò %%%c"
+msgstr "E377: Â ôîðìàòíîé ñòðîêå íåäîïóñòèìûé ñïåöèôèêàòîð %%%c"
# :!~ Restorer
msgid "E378: 'errorformat' contains no pattern"
@@ -7393,7 +7405,7 @@ msgstr "E397: Òðåáóåòñÿ óêàçàòü íàèìåíîâàíèå ôàéëà"
# :!~ Restorer
#, c-format
msgid "E398: Missing '=': %s"
-msgstr "E398: Íå óêàçàí çíàê ðàâåíñòâà ó ïàðàìåòðîâ êîìàíäû :syntax region %s"
+msgstr "E398: Íå óêàçàí çíàê ðàâåíñòâà â ïàðàìåòðàõ êîìàíäû :syntax region %s"
# :!~ Restorer
#, c-format
@@ -7702,12 +7714,12 @@ msgstr ""
# #Restorer: ïîñëå ñîîáùåíèÿ äîïèñûâàåòñÿ ñèìâîë : è îøèáî÷íàÿ êîìàíäà
# :!~ Restorer
msgid "E464: Ambiguous use of user-defined command"
-msgstr "E464: Íåðàñïîçíàíà ñîçäàííàÿ ïîëüçîâàòåëåì êîìàíäà"
+msgstr "E464: Íå ðàñïîçíàíà ñîçäàííàÿ ïîëüçîâàòåëåì êîìàíäà"
# :!~ Restorer
#, c-format
msgid "E464: Ambiguous use of user-defined command: %s"
-msgstr "E464: Íåðàñïîçíàíà ñîçäàííàÿ ïîëüçîâàòåëåì êîìàíäà %s"
+msgstr "E464: Íå ðàñïîçíàíà ñîçäàííàÿ ïîëüçîâàòåëåì êîìàíäà %s"
# :!~ Restorer
msgid "E465: :winsize requires two number arguments"
@@ -7927,7 +7939,7 @@ msgstr "E503: Êîôå åù¸ íå ãîòîâ"
# :!~ Restorer
msgid "is read-only (cannot override: \"W\" in 'cpoptions')"
msgstr ""
-"ôàéë òîëüêî äëÿ ÷òåíèÿ (÷òîáû çàïèñàòü, óáåðèòå ôëàã \"W\" â 'cpoptions')"
+"ôàéë òîëüêî äëÿ ÷òåíèÿ (÷òîáû çàïèñàòü, óáåðèòå ôëàã 'W' â 'cpoptions')"
# #Restorer: îøèáêà E505:
# :!~ Restorer
@@ -7961,13 +7973,13 @@ msgstr ""
# :!~ Restorer
msgid "E509: Cannot create backup file (add ! to override)"
msgstr ""
-"E509: Íå óäàëîñü ñîçäàòü ðåçåðâíûé ôàéë (÷òîáû èãíîðèðîâàòü, óêàæèòå "
+"E509: Íå óäàëîñü ñîçäàòü ðåçåðâíûé ôàéë (÷òîáû çàïèñàòü, óêàæèòå "
"ìîäèôèêàòîð !)"
# :!~ Restorer
msgid "E510: Can't make backup file (add ! to write anyway)"
msgstr ""
-"E510: Íå óäàëîñü ñîçäàòü ðåçåðâíûé ôàéë (÷òîáû çàïèñàòü, óêàæèòå "
+"E510: Íå óäàëîñü ïîäãîòîâèòü ðåçåðâíûé ôàéë (÷òîáû çàïèñàòü, óêàæèòå "
"ìîäèôèêàòîð !)"
# :!~ Restorer
@@ -7981,8 +7993,8 @@ msgstr "E512: Îøèáêà çàêðûòèÿ ôàéëà ïîñëå îïåðàöèè çàïèñè"
# :!~ Restorer
msgid "E513: Write error, conversion failed (make 'fenc' empty to override)"
msgstr ""
-"E513: Îøèáêà çàïèñè. Ñáîé ïðè èçìåíåíèè êîäèðîâêè òåêñòà (÷òîáû "
-"èãíîðèðîâàòü, ñáðîñüòå ïàðàìåòð 'fenc')"
+"E513: Îøèáêà çàïèñè ïðè èçìåíåíèè êîäèðîâêè òåêñòà (÷òîáû èãíîðèðîâàòü, "
+"ñáðîñüòå ïàðàìåòð 'fenc')"
# :!~ Restorer
#, c-format
@@ -7990,7 +8002,7 @@ msgid ""
"E513: Write error, conversion failed in line %ld (make 'fenc' empty to "
"override)"
msgstr ""
-"E513: Îøèáêà çàïèñè. Ñáîé ïðè èçìåíåíèè êîäèðîâêè òåêñòà â ñòðîêå %ld (÷òîáû "
+"E513: Îøèáêà çàïèñè ïðè èçìåíåíèè êîäèðîâêè òåêñòà â ñòðîêå %ld (÷òîáû "
"èãíîðèðîâàòü, ñáðîñüòå ïàðàìåòð 'fenc')"
# :!~ Restorer
@@ -8281,15 +8293,15 @@ msgstr "E579: Ïðåâûøåíî êîëè÷åñòâî âëîæåíèé áëîêîâ êîìàíä"
# :!~ Restorer
msgid "E580: :endif without :if"
-msgstr "E580: Äëÿ êîìàíäû :endif íåò ñîîòâåòñòâóþùåé êîìàíäû :if"
+msgstr "E580: Äëÿ êîìàíäû :endif îòñóòñòâóåò ïàðíàÿ êîìàíäû :if"
# :!~ Restorer
msgid "E581: :else without :if"
-msgstr "E581: Äëÿ êîìàíäû :else íåò ñîîòâåòñòâóþùåé êîìàíäà :if"
+msgstr "E581: Äëÿ êîìàíäû :else îòñóòñòâóåò ïàðíàÿ êîìàíäà :if"
# :!~ Restorer
msgid "E582: :elseif without :if"
-msgstr "E582: Äëÿ êîìàíäû :elseif íåò ñîîòâåòñòâóþùåé êîìàíäû :if"
+msgstr "E582: Äëÿ êîìàíäû :elseif îòñóòñòâóåò ïàðíàÿ êîìàíäà :if"
# :!~ Restorer
msgid "E583: Multiple :else"
@@ -8313,11 +8325,11 @@ msgstr "E587: Êîìàíäà :break óêàçàíà âíå öèêëà :while èëè :for"
# :!~ Restorer
msgid "E588: :endwhile without :while"
-msgstr "E588: Äëÿ êîìàíäû :endwhile íåò êîìàíäû :while"
+msgstr "E588: Äëÿ êîìàíäû :endwhile îòñóòñòâóåò ïàðíàÿ êîìàíäà :while"
# :!~ Restorer
msgid "E588: :endfor without :for"
-msgstr "E588: Äëÿ êîìàíäû :endfor íåò êîìàíäû :for"
+msgstr "E588: Äëÿ êîìàíäû :endfor îòñóòñòâóåò ïàðíàÿ êîìàíäà :for"
# :!~ Restorer
msgid "E589: 'backupext' and 'patchmode' are equal"
@@ -8342,7 +8354,7 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "E593: Need at least %d lines"
-msgstr "E593: Ìèíèìàëüíîå çíà÷åíèå êîëè÷åñòâà ñòðîê %d"
+msgstr "E593: Ìèíèìàëüíî âîçìîæíîå êîëè÷åñòâî ñòðîê %d"
# :!~ Restorer
#, c-format
@@ -8372,7 +8384,7 @@ msgstr "E599: Íåäîïóñòèìîå çíà÷åíèå ïàðàìåòðà 'imactivatekey'"
# :!~ Restorer
msgid "E600: Missing :endtry"
-msgstr "E600: Äëÿ êîìàíäû :try íå óêàçàíà êîìàíäà :endtry"
+msgstr "E600: Íå óêàçàíà êîìàíäà :endtry"
# :!~ Restorer
msgid "E601: :try nesting too deep"
@@ -8380,11 +8392,11 @@ msgstr "E601: Ïðåâûøåíî êîëè÷åñòâî âëîæåíèé êîìàíä :try"
# :!~ Restorer
msgid "E602: :endtry without :try"
-msgstr "E602: Äëÿ êîìàíäû :endtry íåò ñîîòâåòñòâóþùåé êîìàíäû :try"
+msgstr "E602: Äëÿ êîìàíäû :endtry îòñóòñòâóåò ïàðíàÿ êîìàíäà :try"
# :!~ Restorer
msgid "E603: :catch without :try"
-msgstr "E603: Äëÿ êîìàíäû :catch íå óêàçàíà êîìàíäà :try"
+msgstr "E603: Äëÿ êîìàíäû :catch îòñóòñòâóåò ïàðíàÿ êîìàíäà :try"
# :!~ Restorer
msgid "E604: :catch after :finally"
@@ -8397,7 +8409,7 @@ msgstr "E605: Íå îáðàáîòàííàÿ èñêëþ÷èòåëüíàÿ ñèòóàöèÿ %s"
# :!~ Restorer
msgid "E606: :finally without :try"
-msgstr "E606: Äëÿ êîìàíäû :finally íå óêàçàíà êîìàíäà :try"
+msgstr "E606: Äëÿ êîìàíäû :finally îòñóòñòâóåò ïàðíàÿ êîìàíäà :try"
# :!~ Restorer
msgid "E607: Multiple :finally"
@@ -8459,8 +8471,7 @@ msgstr "E619: Ôàéë íå ÿâëÿåòñÿ äîïóñòèìûì ôàéëîì îïèñàíèé PostScript \"%s\""
# :!~ Restorer
#, c-format
msgid "E620: Unable to convert to print encoding \"%s\""
-msgstr ""
-"E620: Ïðè âûâîäå íà ïå÷àòü íå óäàëîñü âûïîëíèòü èçìåíåíèå êîäèðîâêè íà \"%s\""
+msgstr "E620: Ïðè âûâîäå íà ïå÷àòü íå óäàëîñü ïðåîáðàçîâàòü â êîäèðîâêó \"%s\""
# :!~ Restorer
#, c-format
@@ -8498,7 +8509,7 @@ msgstr "E627: Îòñóòñòâóåò ñèìâîë äâîåòî÷èå â êîìàíäå %s"
#, c-format
msgid "E628: Missing ! or / in: %s"
-msgstr "E628: Îòñóòñòâóåò ñèìâîë ! èëè / â êîìàíäå %s"
+msgstr "E628: Îòñóòñòâóåò ñèìâîë '!' èëè '/' â êîìàíäå %s"
# :!~ Restorer
#, c-format
@@ -8663,7 +8674,7 @@ msgstr ""
# :!~ Restorer
msgid "E669: Unprintable character in group name"
-msgstr "E669: Íå ïå÷àòàåìûé ñèìâîë â íàèìåíîâàíèè ãðóïïû"
+msgstr "E669: Íåïå÷àòàåìûé ñèìâîë â íàèìåíîâàíèè ãðóïïû"
# :!~ Restorer
#, c-format
@@ -8802,7 +8813,7 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "E697: Missing end of List ']': %s"
-msgstr "E697: Íå óêàçàíà çàêðûâàþùàÿ êâàäðàòíàÿ ñêîáêà â äàííûõ òèïà List %s"
+msgstr "E697: Íå óêàçàíà çàêðûâàþùàÿ êâàäðàòíàÿ ñêîáêà â äàííûõ òèï List %s"
# :!~ Restorer
msgid "E698: Variable nested too deep for making a copy"
@@ -8924,7 +8935,7 @@ msgstr ""
#, c-format
msgid "E723: Missing end of Dictionary '}': %s"
msgstr ""
-"E723: Äëÿ òèïà äàííûõ Dictionary íå óêàçàíà çàêðûâàþùàÿ ôèãóðíàÿ ñêîáêà %s"
+"E723: Â òèïå äàííûõ Dictionary íå óêàçàíà çàêðûâàþùàÿ ôèãóðíàÿ ñêîáêà %s"
# :!~ Restorer
msgid "E724: Variable nested too deep for displaying"
@@ -9134,11 +9145,11 @@ msgstr ""
# :!~ Restorer
msgid "E766: Insufficient arguments for printf()"
-msgstr "E766:  ôóíêöèè printf() íåäîñòàòî÷íîå êîëè÷åñòâî àðãóìåíòîâ"
+msgstr "E766: Íåäîñòàòî÷íîå êîëè÷åñòâî àðãóìåíòîâ â ôóíêöèè printf()"
# :!~ Restorer
msgid "E767: Too many arguments for printf()"
-msgstr "E767:  ôóíêöèè printf() ïðåâûøåíî êîëè÷åñòâî àðãóìåíòîâ"
+msgstr "E767: Ïðåâûøåíî êîëè÷åñòâî àðãóìåíòîâ â ôóíêöèè printf()"
# :!~ Restorer
#, c-format
@@ -9324,7 +9335,7 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "E803: ID not found: %d"
-msgstr "E803: Íå íàéäåí èäåíòèôèêàöèîííûé íîìåð %d"
+msgstr "E803: Íå óäàëîñü íàéòè èäåíòèôèêàöèîííûé íîìåð %d"
# :!~ Restorer
#, no-c-format
@@ -9441,8 +9452,7 @@ msgstr "E826: Îøèáêà ïðè ðàñøèôðîâêå ôàéëà èçìåíåíèé %s"
# :!~ Restorer
#, c-format
msgid "E827: Undo file is encrypted: %s"
-msgstr ""
-"E827: Íå ïîääåðæèâàåìûé äàííîé ïðîãðàììîé Vim øèôðîâàííûé ôàéë èçìåíåíèé %s"
+msgstr "E827: Â äàííîé âåðñèè íå ïîääåðæèâàåòñÿ øèôðîâàííûé ôàéë èçìåíåíèé %s"
# :!~ Restorer
#, c-format
@@ -9470,8 +9480,8 @@ msgstr ""
msgid ""
"E833: %s is encrypted and this version of Vim does not support encryption"
msgstr ""
-"E833: Äàííàÿ âåðñèÿ ïðîãðàììû íå ïîääåðæèâàåò øèôðîâàíèå è îáíàðóæåí "
-"øèôðîâàííûé ôàéë %s"
+"E833: Â äàííîé âåðñèè íå ïîääåðæèâàåòñÿ øèôðîâàíèå è îáíàðóæåí øèôðîâàííûé "
+"ôàéë %s"
# :!~ Restorer
msgid "E834: Conflicts with value of 'listchars'"
@@ -9484,14 +9494,12 @@ msgstr "E835: Êîíôëèêò çíà÷åíèé ïàðàìåòðîâ 'ambiwidth' è 'fillchars'"
# :!~ Restorer
msgid "E836: This Vim cannot execute :python after using :py3"
msgstr ""
-"E836:  äàííîé âåðñèè ïðîãðàììû çàïðåù¸í âûçîâ êîìàíäû :python ïîñëå "
-"êîìàíäû :py3"
+"E836:  äàííîé âåðñèè çàïðåù¸í âûçîâ êîìàíäû :python ïîñëå êîìàíäû :py3"
# :!~ Restorer
msgid "E837: This Vim cannot execute :py3 after using :python"
msgstr ""
-"E837:  äàííîé âåðñèè ïðîãðàììû çàïðåù¸í âûçîâ êîìàíäû :py3 ïîñëå êîìàíäû :"
-"python"
+"E837:  äàííîé âåðñèè çàïðåù¸í âûçîâ êîìàíäû :py3 ïîñëå êîìàíäû :python"
# :!~ Restorer
msgid "E838: NetBeans is not supported with this GUI"
@@ -9601,8 +9609,8 @@ msgstr ""
# :!~ Restorer
msgid "E860: Need 'id' and 'type' or 'types' with 'both'"
msgstr ""
-"E860: Åñëè çàäàí êëþ÷ 'both', óêàæèòå çíà÷åíèå êëþ÷åé 'id' è 'type' èëè "
-"'types'"
+"E860: Åñëè çàäàí êëþ÷ \"both\", óêàæèòå çíà÷åíèå êëþ÷åé \"id\" è \"type\" "
+"èëè \"types\""
# :!~ Restorer
msgid "E861: Cannot open a second popup with a terminal"
@@ -9625,8 +9633,8 @@ msgid ""
"E864: \\%#= can only be followed by 0, 1, or 2. The automatic engine will be "
"used"
msgstr ""
-"E864: Äëÿ ìåòàñèìâîëà \\%#= äîïóñòèìû 0, 1 èëè 2. Ìåõàíèçì ïîèñêà "
-"íàçíà÷àåòñÿ àâòîìàòè÷åñêè"
+"E864: Äëÿ ìåòàñèìâîëà \\%#= äîïóñòèìû 0, 1 èëè 2. Ìåõàíèçì ïîèñêà áûë "
+"íàçíà÷åí àâòîìàòè÷åñêè"
# :!~ Restorer
msgid "E865: (NFA) Regexp end encountered prematurely"
@@ -9719,7 +9727,7 @@ msgstr ""
#, c-format
msgid "E884: Function name cannot contain a colon: %s"
msgstr ""
-"E884: Íå äîïóñêàåòñÿ óêàçàíèå ñèìâîë äâîåòî÷èÿ â íàèìåíîâàíèè ôóíêöèè %s"
+"E884: Íå äîïóñêàåòñÿ óêàçàíèå ñèìâîëà äâîåòî÷èå â íàèìåíîâàíèè ôóíêöèè %s"
# :!~ Restorer
#, c-format
@@ -10112,7 +10120,8 @@ msgstr "E966: Íåäîïóñòèìûé íîìåð ñòðîêè %ld"
# :!~ Restorer
msgid "E968: Need at least one of 'id' or 'type'"
-msgstr "E968: Òðåáóåòñÿ óêàçàòü çíà÷åíèå êëþ÷à 'id' èëè çíà÷åíèå êëþ÷à 'type'"
+msgstr ""
+"E968: Òðåáóåòñÿ óêàçàòü çíà÷åíèå êëþ÷à \"id\" èëè çíà÷åíèå êëþ÷à \"type\""
# :!~ Restorer
#, c-format
@@ -10220,7 +10229,7 @@ msgstr "E990: Íå óêàçàí çàâåðøàþùèé ìàðêåð '%s'"
# :!~ Restorer
msgid "E991: Cannot use =<< here"
-msgstr "E991: Îïåðàòîð =<< íå ìîæåò áûòü ïðèìåí¸í"
+msgstr "E991: Îïåðàòîð `=<<` íå ìîæåò áûòü ïðèìåí¸í"
# :!~ Restorer
msgid "E992: Not allowed in a modeline when 'modelineexpr' is off"
@@ -10243,28 +10252,34 @@ msgstr "E995: Íå äîïóñêàåòñÿ èçìåíåíèå çíà÷åíèÿ ñóùåñòâóþùåé ïåðåìåííîé"
# :!~ Restorer
msgid "E996: Cannot lock a range"
-msgstr "E996: Íå äîïóñêàåòñÿ áëîêèðîâêà äëÿ çíà÷åíèé äèàïàçîíà"
+msgstr ""
+"E996: Äëÿ çíà÷åíèé äèàïàçîíà íå ìîæåò áûòü èçìåíåíî ñîñòîÿíèå áëîêèðîâêè"
# :!~ Restorer
msgid "E996: Cannot lock an option"
-msgstr "E996: Íå äîïóñêàåòñÿ áëîêèðîâêà äëÿ çíà÷åíèé ïàðàìåòðîâ"
+msgstr ""
+"E996: Äëÿ çíà÷åíèé ïàðàìåòðîâ íå ìîæåò áûòü èçìåíåíî ñîñòîÿíèå áëîêèðîâêè"
# :!~ Restorer
msgid "E996: Cannot lock a list or dict"
-msgstr "E996: Íå äîïóñêàåòñÿ áëîêèðîâêà äëÿ çíà÷åíèé ñïèñêà èëè ñëîâàðÿ"
+msgstr ""
+"E996: Äëÿ çíà÷åíèé ñïèñêà èëè ñëîâàðÿ íå ìîæåò áûòü èçìåíåíî ñîñòîÿíèå "
+"áëîêèðîâêè"
# :!~ Restorer
msgid "E996: Cannot lock an environment variable"
-msgstr "E996: Íå äîïóñêàåòñÿ áëîêèðîâêà äëÿ çíà÷åíèé ïåðåìåííûõ îêðóæåíèÿ"
+msgstr ""
+"E996: Äëÿ çíà÷åíèé ïåðåìåííûõ îêðóæåíèÿ íå ìîæåò áûòü èçìåíåíî ñîñòîÿíèå "
+"áëîêèðîâêè"
# :!~ Restorer
msgid "E996: Cannot lock a register"
-msgstr "E996: Íå äîïóñêàåòñÿ áëîêèðîâêà äëÿ äàííûõ ðåãèñòðà"
+msgstr "E996: Äëÿ äàííûõ ðåãèñòðà íå ìîæåò áûòü èçìåíåíî ñîñòîÿíèå áëîêèðîâêè"
# :!~ Restorer
#, c-format
msgid "E997: Tabpage not found: %d"
-msgstr "E997: Íå íàéäåíà âêëàäêà ïîä íîìåðîì %d"
+msgstr "E997: Íå óäàëîñü íàéòè âêëàäêó ïîä íîìåðîì %d"
# :!~ Restorer
#, c-format
@@ -10280,7 +10295,7 @@ msgstr "E999:  ïðîãðàììå íå ïîääåðæèâàåòñÿ îáðàáîò÷èê êîìàíä âåðñèè %d"
# :!~ Restorer
#, c-format
msgid "E1001: Variable not found: %s"
-msgstr "E1001: Íå íàéäåíà ïåðåìåííàÿ %s"
+msgstr "E1001: Íå óäàëîñü íàéòè ïåðåìåííóþ %s"
# :!~ Restorer
#, c-format
@@ -10308,7 +10323,8 @@ msgstr "E1006: Ïåðåìåííàÿ %s èñïîëüçóåòñÿ êàê àðãóìåíò ôóíêöèè"
# :!~ Restorer
msgid "E1007: Mandatory argument after optional argument"
msgstr ""
-"E1007: Îáÿçàòåëüíûå àðãóìåíòû óêàçûâàòüñÿ ïåðåä íåîáÿçàòåëüíûì àðãóìåíòîì"
+"E1007: Îáÿçàòåëüíûå àðãóìåíòû äîëæíû óêàçûâàòüñÿ ïåðåä íåîáÿçàòåëüíûì "
+"àðãóìåíòîì"
# :!~ Restorer
#, c-format
@@ -10462,7 +10478,7 @@ msgstr ""
#, c-format
msgid "E1036: %c requires number or float arguments"
msgstr ""
-"E1036: Òðåáóåòñÿ òèï îïåðàíäîâ Number èëè Float äëÿ âûïîëíåíèÿ îïåðàöèè %c"
+"E1036: Òèï îïåðàíäîâ äîëæåí áûòü Number èëè Float äëÿ âûïîëíåíèÿ îïåðàöèè %c"
# :!~ Restorer
#, c-format
@@ -10520,7 +10536,7 @@ msgstr "E1049: Êîìïîíåíò íå ÿâëÿåòñÿ ýêñïîðòèðóåìûì %s"
# :!~ Restorer
#, c-format
msgid "E1050: Colon required before a range: %s"
-msgstr "E1050: Òðåáóåòñÿ ñèìâîë äâîåòî÷èÿ ïåðåä çíà÷åíèåì äèàïàçîíà %s"
+msgstr "E1050: Òðåáóåòñÿ ñèìâîë äâîåòî÷èå ïåðåä çíà÷åíèåì äèàïàçîíà %s"
# :!~ Restorer
msgid "E1051: Wrong argument type for +"
@@ -10553,7 +10569,7 @@ msgstr "E1056: Îæèäàëñÿ òèï äàííûõ %s"
# :!~ Restorer
msgid "E1057: Missing :enddef"
-msgstr "E1057: Íå óêàçàíà êîìàíäà :enddef äëÿ êîìàíäû :def"
+msgstr "E1057: Íå óêàçàíà êîìàíäà :enddef"
# :!~ Restorer
msgid "E1058: Function nesting too deep"
@@ -10562,7 +10578,7 @@ msgstr "E1058: Ïðåâûøåíî êîëè÷åñòâî âëîæåííûõ ôóíêöèé"
# :!~ Restorer
#, c-format
msgid "E1059: No white space allowed before colon: %s"
-msgstr "E1059: Çàïðåù¸í ïðîáåëüíûé ñèìâîë ïåðåä ñèìâîëîì äâîåòî÷èÿ â %s"
+msgstr "E1059: Çàïðåù¸í ïðîáåëüíûé ñèìâîë ïåðåä ñèìâîëîì äâîåòî÷èå â %s"
# :!~ Restorer
#, c-format
@@ -10573,7 +10589,7 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "E1061: Cannot find function %s"
-msgstr "E1061: Íå íàéäåíà ôóíêöèÿ %s"
+msgstr "E1061: Íå óäàëîñü íàéòè ôóíêöèþ %s"
# :!~ Restorer
msgid "E1062: Cannot index a Number"
@@ -10751,7 +10767,7 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "E1102: Lambda function not found: %s"
-msgstr "E1102: Íå íàéäåíà ëÿìáäà-ôóíêöèÿ %s"
+msgstr "E1102: Íå óäàëîñü íàéòè ëÿáäà-ôóíêöèþ %s"
# :!~ Restorer
msgid "E1103: Dictionary not set"
@@ -10770,7 +10786,7 @@ msgstr "E1105: Íå äîïóñêàåòñÿ ïðåîáðàçîâàíèå ê ñòðîêîâîìó òèïó äëÿ %s"
#, c-format
msgid "E1106: One argument too many"
msgid_plural "E1106: %d arguments too many"
-msgstr[0] "E1106: Â ôóíêöèþ ïåðåäàíî íà îäèí àðãóìåíò áîëüøå"
+msgstr[0] "E1106: Â ôóíêöèþ ïåðåäàíî íà %d àðãóìåíò áîëüøå"
msgstr[1] "E1106: Â ôóíêöèþ ïåðåäàíî íà %d àðãóìåíòà áîëüøå"
msgstr[2] "E1106: Â ôóíêöèþ ïåðåäàíî íà %d àðãóìåíòîâ áîëüøå"
@@ -10860,7 +10876,7 @@ msgstr "E1124: Êîìàíäà \"%s\" äîïóñêàåòñÿ òîëüêî â êîìàíäíîì ôàéëå Vim9"
# :!~ Restorer
msgid "E1125: Final requires a value"
-msgstr "E1125: Òðåáóåòñÿ óêàçàòü çíà÷åíèå äëÿ êîìàíäû :final"
+msgstr "E1125: Òðåáóåòñÿ çàäàòü çíà÷åíèå äëÿ ôèíàëèçèðîâàííîé ïåðåìåííîé"
# :!~ Restorer
msgid "E1126: Cannot use :let in Vim9 script"
@@ -10911,7 +10927,7 @@ msgstr "E1135: Îæèäàëîñü ëîãè÷åñêîå çíà÷åíèå, à ïîëó÷åí String \"%s\""
# :!~ Restorer
msgid "E1136: <Cmd> mapping must end with <CR> before second <Cmd>"
msgstr ""
-"E1136: Íàçíà÷àåìàÿ ÷åðåç <Cmd> êîìàíäà íå çàâåðøàåòñÿ <CR> ïåðåä ñëåäóþùåé "
+"E1136: Íàçíà÷àåìàÿ êîìàíäà <Cmd> äîëæíà çàâåðøàåòñÿ <CR> ïåðåä ñëåäóþùåé "
"<Cmd>"
# :!~ Restorer
@@ -10993,8 +11009,7 @@ msgstr "E1154: Îáíàðóæåíà ïîïûòêà äåëåíèÿ íà íîëü"
# :!~ Restorer
msgid "E1155: Cannot define autocommands for ALL events"
-msgstr ""
-"E1155: Íå äîïóñêàåòñÿ îäíîâðåìåííî çàäàâàòü àâòîêîìàíäû äëÿ âñåõ ñîáûòèé"
+msgstr "E1155: Íå äîïóñêàåòñÿ îïðåäåëåíèå àâòîêîìàíä ñðàçó äëÿ âñåõ ñîáûòèé"
# :!~ Restorer
msgid "E1156: Cannot change the argument list recursively"
@@ -11069,7 +11084,7 @@ msgstr "E1168: Ýòîò àðãóìåíò óæå îáúÿâëåí â êîìàíäíîì ôàéëå %s"
# :!~ Restorer
#, c-format
msgid "E1169: Expression too recursive: %s"
-msgstr "E1169: Âûðàæåíèå ñëèøêîì ðåêóðñèâíî %s"
+msgstr "E1169: Áîëüøàÿ ðåêóðñèâíîñòü âûðàæåíèÿ %s"
# :!~ Restorer
msgid "E1170: Cannot use #{ to start a comment"
@@ -11120,8 +11135,8 @@ msgid ""
"E1179: Failed to extract PWD from %s, check your shell's config related to "
"OSC 7"
msgstr ""
-"Íå óäàëîñü èçâëå÷ü çíà÷åíèå òåêóùåãî ðàáî÷åãî êàòàëîãà èç %s. Ïðîâåðüòå "
-"íàñòðîéêè êîìàíäíîé îáîëî÷êè OSC 7"
+"Íå óäàëîñü èçâëå÷ü çíà÷åíèå ðàáî÷åãî êàòàëîãà èç %s. Ïðîâåðüòå íàñòðîéêè "
+"êîìàíäíîé îáîëî÷êè OSC 7"
# :!~ Restorer
#, c-format
@@ -11159,7 +11174,7 @@ msgstr "E1186: Âûðàæåíèå íå âîçâðàùàåò çíà÷åíèå %s"
# :!~ Restorer
msgid "E1187: Failed to source defaults.vim"
-msgstr "E1187: Îøèáêà ïðè îáðàáîòêå ôàéëà defaults.vim"
+msgstr "E1187: Ïðîèçîøëà îøèáêà ïðè îáðàáîòêå ôàéëà defaults.vim"
# :!~ Restorer
msgid "E1188: Cannot open a terminal from the command line window"
@@ -11175,7 +11190,7 @@ msgstr "E1189: Íå äîïóñêàåòñÿ óêàçàíèå ïîñëå êîìàíäû :legacy êîìàíäû %s"
#, c-format
msgid "E1190: One argument too few"
msgid_plural "E1190: %d arguments too few"
-msgstr[0] "E1190: Â ôóíêöèþ ïåðåäàíî íà îäèí àðãóìåíò ìåíüøå"
+msgstr[0] "E1190: Â ôóíêöèþ ïåðåäàíî íà %d àðãóìåíò ìåíüøå"
msgstr[1] "E1190: Â ôóíêöèþ ïåðåäàíî íà %d àðãóìåíòà ìåíüøå"
msgstr[2] "E1190: Â ôóíêöèþ ïåðåäàíî íà %d àðãóìåíòîâ ìåíüøå"
@@ -11238,7 +11253,7 @@ msgstr "E1203: Íå äîïóñêàåòñÿ ñèìâîë òî÷êè äëÿ òèïà äàííûõ %s â %s"
# :!~ Restorer
#, c-format
msgid "E1204: No Number allowed after .: '\\%%%c'"
-msgstr "E1204: Çàïðåùåíî óêàçàíèå ÷èñëà ïîñëå ñèìâîëà òî÷êè â '\\%%%c'"
+msgstr "E1204: Çàïðåùåíî óêàçàíèå ÷èñëà ïîñëå ñèìâîëà òî÷êè â \\%%%c"
# :!~ Restorer
msgid "E1205: No white space allowed between option and"
@@ -11404,7 +11419,7 @@ msgstr "E1236: Íå äîïóñêàåòñÿ îáðàùåíèå ê %s. Ýòî èìïîðòèðîâàííûé êîìïîíåíò"
# :!~ Restorer
#, c-format
msgid "E1237: No such user-defined command in current buffer: %s"
-msgstr "E1237: Äëÿ òåêóùåãî áóôåðà íå îáíàðóæåíà êîìàíäà ïîëüçîâàòåëÿ %s"
+msgstr "E1237: Äëÿ òåêóùåãî áóôåðà íå ñóùåñòâóåò êîìàíäû ïîëüçîâàòåëÿ %s"
# :!~ Restorer
#, c-format
@@ -11428,7 +11443,8 @@ msgstr "E1241: Â êîìàíäå óêàçàí íåäîïóñòèìûé ðàçäåëèòåëü ïàðàìåòðîâ %s"
# :!~ Restorer
#, c-format
msgid "E1242: No white space allowed before separator: %s"
-msgstr "E1242: Çàïðåù¸í ïðîáåë ïåðåä ðàçäåëèòåëåì ïàðàìåòðîâ â êîìàíäå %s"
+msgstr ""
+"E1242: Çàïðåù¸í ïðîáåëüíûé ñèìâîë ïåðåä ðàçäåëèòåëåì ïàðàìåòðîâ â êîìàíäå %s"
# :!~ Restorer
msgid "E1243: ASCII code not in 32-127 range"
@@ -11484,8 +11500,7 @@ msgstr ""
# :!~ Restorer
msgid "E1255: <Cmd> mapping must end with <CR>"
-msgstr ""
-"E1255: Íàçíà÷åííàÿ ÷åðåç <Cmd> êîìàíäà äîëæíà çàâåðøàòüñÿ ñèìâîëàìè <CR>"
+msgstr "E1255: Íàçíà÷åííàÿ êîìàíäà <Cmd> äîëæíà çàâåðøàòüñÿ ñèìâîëàìè <CR>"
# :!~ Restorer
#, c-format
@@ -11512,7 +11527,7 @@ msgstr "E1259: Íå óêàçàíî íàèìåíîâàíèå ïîñëå èìïîðòèðóåìîãî êîìïîíåíòà %s"
# :!~ Restorer
#, c-format
msgid "E1260: Cannot unlet an imported item: %s"
-msgstr "E1260: Íå äîïóñêàåòñÿ óäàëåíèå êîìïîíåíò â èìïîðòèðîâàííûõ äàííûõ %s"
+msgstr "E1260: Íå äîïóñêàåòñÿ óäàëåíèå êîìïîíåíòà â èìïîðòèðîâàííûõ äàííûõ %s"
# :!~ Restorer
msgid "E1261: Cannot import .vim without using \"as\""
@@ -11527,7 +11542,7 @@ msgstr "E1262: Íå äîïóñêàåòñÿ ïîâòîðíîå èìïîðòèðîâàíèå êîìàíäíîãî ôàéëà %s"
# :!~ Restorer
msgid "E1263: Cannot use name with # in Vim9 script, use export instead"
msgstr ""
-"E1263: Íå äîïóñêàþòñÿ íàèìåíîâàíèÿ ñ ñèìâîëîì #. Â êîìàíäíûõ ôàéëàõ Vim9 "
+"E1263: Íå äîïóñêàþòñÿ íàèìåíîâàíèÿ ñ ñèìâîëîì '#'. Â êîìàíäíûõ ôàéëàõ Vim9 "
"èñïîëüçóåòñÿ ýêñïîðò"
# :!~ Restorer
@@ -11754,8 +11769,7 @@ msgstr "E1306: Ïðåâûøåíî êîëè÷åñòâî âëîæåííûõ öèêëîâ"
#, c-format
msgid "E1307: Argument %d: Trying to modify a const %s"
msgstr ""
-"E1307: Îáíàðóæåíà ïîïûòêà èçìåíåíèÿ êîíñòàíòíîãî çíà÷åíèÿ %2$s ó àðãóìåíòà "
-"íîìåð %1$d"
+"E1307: Äëÿ àðãóìåíòà íîìåð %d ïîïûòêà èçìåíåíèÿ êîíñòàíòíîãî çíà÷åíèÿ %s"
# :!~ Restorer
msgid "E1308: Cannot resize a window in another tab page"
@@ -11841,12 +11855,12 @@ msgstr "E1325: Ó êëàññà \"%2$s\" îòñóòñòâóåò ìåòîä \"%1$s\""
# :!~ Restorer
#, c-format
msgid "E1326: Variable \"%s\" not found in object \"%s\""
-msgstr "E1326: Ó îáúåêòà \"%s\" îòñóòñòâóåò ïåðåìåííàÿ \"%s\""
+msgstr "E1326: Ó îáúåêòà \"%2$s\" îòñóòñòâóåò ïåðåìåííàÿ \"%1$s\""
# :!~ Restorer
#, c-format
msgid "E1327: Object required, found %s"
-msgstr "E1327: Îæèäàëñÿ Object, à ïîëó÷åí %s"
+msgstr "E1327: Îæèäàëñÿ òèï äàííûõ Object, à ïîëó÷åí %s"
# :!~ Restorer
#, c-format
@@ -11922,7 +11936,7 @@ msgstr "E1343: Íàèìåíîâàíèå èíòåðôåéñà äîëæíî íà÷èíàòüñÿ ñ ïðîïèñíîé áóêâû %s"
# :!~ Restorer
msgid "E1344: Cannot initialize a variable in an interface"
-msgstr "E1344: Íå äîïóñêàåòñÿ èíèöèàëèçèðîâàòü ïåðåìåííûå â èíòåðôåéñå"
+msgstr "E1344: Íå äîïóñêàåòñÿ èíèöèàëèçàöèÿ ïåðåìåííûõ â èíòåðôåéñå"
# :!~ Restorer
#, c-format
@@ -12100,7 +12114,7 @@ msgstr "E1380: Èíòåðôåéñû íå ïîääåðæèâàþò çàùèù¸ííûå ìåòîäû"
# :!~ Restorer
msgid "E1381: Interface cannot use \"implements\""
-msgstr "E1381: Äëÿ èíòåðôåéñà íåïðèìåíèìî êëþ÷åâîå ñëîâî \"implements\""
+msgstr "E1381: Ê èíòåðôåéñó íåïðèìåíèìî êëþ÷åâîå ñëîâî \"implements\""
# :!~ Restorer
#, c-format
@@ -12181,7 +12195,7 @@ msgstr "E1395: Íå äîïóñêàåòñÿ èçìåíåíèå ïñåâäîíèìà òèïà \"%s\""
# :!~ Restorer
#, c-format
msgid "E1396: Type alias \"%s\" already exists"
-msgstr "E1396: Ïñåâäîíèì òèïà óæå îïðåäåë¸í \"%s\""
+msgstr "E1396: Ïñåâäîíèì òèïà óæå ñóùåñòâóåò \"%s\""
# :!~ Restorer
msgid "E1397: Missing type alias name"
@@ -12246,7 +12260,7 @@ msgstr "E1408: Èíòåðôåéñû íå ïîääåðæèâàþò ôèíàëèçèðîâàííûå ïåðåìåííûå"
msgid "E1409: Cannot change read-only variable \"%s\" in class \"%s\""
msgstr ""
"E1409: Íå äîïóñêàåòñÿ èçìåíåíèå äîñòóïíîé òîëüêî äëÿ ÷òåíèÿ ïåðåìåííîé "
-"\"%s\" â êëàññå \"%s\""
+"\"%s\" êëàññà \"%s\""
# :!~ Restorer
msgid "E1410: Const variable not supported in an interface"
@@ -12316,6 +12330,16 @@ msgstr ""
msgid "E1510: Value too large: %s"
msgstr "E1510: Ïðåâûøåíà äîïóñòèìàÿ âåëè÷èíà â çíà÷åíèè %s"
+# :!~ Restorer
+#, c-format
+msgid "E1511: Wrong number of characters for field \"%s\""
+msgstr "E1511:  äàííîì ïîëå óêàçàíî íåäîïóñòèìîå êîëè÷åñòâî ñèìâîëîâ \"%s\""
+
+# :!~ Restorer
+#, c-format
+msgid "E1512: Wrong character width for field \"%s\""
+msgstr "E1512: Â äàííîì ïîëå íå ïîääåðæèâàþòñÿ ïîëíîøèðèííûå ñèìâîëû \"%s\""
+
# #Restorer: âûâîäèòñÿ, íàïðèìåð, ïî êîìàíäå `CTRL+g`, `g CTRL+g` è ò. ï.
# :!~ Restorer
msgid "--No lines in buffer--"
@@ -12366,6 +12390,7 @@ msgid "float"
msgstr "float"
# :!~ Restorer
+#.
msgid "search hit TOP, continuing at BOTTOM"
msgstr "Ïîèñê áóäåò ïðîäîëæåí îò ÍÈÆÍÅÉ ÃÐÀÍÈÖÛ äîêóìåíòà"
@@ -12405,7 +12430,8 @@ msgstr "íå óäàëîñü âûïîëíèòü äîáàâëåíèå â ñëîâàðü êëþ÷à %s"
#, c-format
msgid "index must be int or slice, not %s"
msgstr ""
-"èíäåêñ óêàçûâàåòñÿ öåëûì ÷èñëîì èëè êàê äèàïàçîí. Íåäîïóñòèìûé èíäåêñ %s"
+"èíäåêñ óêàçûâàåòñÿ êàê öåëîå ÷èñëî èëè êàê äèàïàçîí ÷èñåë. Íåäîïóñòèìûé "
+"èíäåêñ %s"
# :!~ Restorer
#, c-format
@@ -12456,7 +12482,7 @@ msgstr "çàäàíî íåäîïóñòèìîå ñâîéñòâî %s"
# :!~ Restorer
msgid "failed to change directory"
-msgstr "ñáîé ïðè ñìåíå êàòàëîãà"
+msgstr "ïðîèçîø¸ë ñáîé ïðè ñìåíå êàòàëîãà"
# :!~ Restorer
#, c-format
@@ -12514,8 +12540,8 @@ msgstr "èíäåêñ ñïèñêà âûõîäèò çà ãðàíèöû äèàïàçîíà"
#, c-format
msgid "internal error: failed to get Vim list item %d"
msgstr ""
-"âíóòðåííÿÿ îøèáêà. Íå óäàëîñü ïîëó÷èòü ó îáúåêòà Vim.List ýëåìåíò ñ èíäåêñîì "
-"%d"
+"âíóòðåííÿÿ îøèáêà. Íå óäàëîñü ïîëó÷èòü èç îáúåêòà Vim.List ýëåìåíò ñ "
+"èíäåêñîì %d"
# :!~ Restorer
msgid "slice step cannot be zero"
@@ -12593,8 +12619,8 @@ msgstr "íå äîïóñêàåòñÿ ñáðîñ ê íà÷àëüíûì çíà÷åíèÿì ó îáùåãî ïàðàìåòðà %s"
#, c-format
msgid "unable to unset option %s which does not have global value"
msgstr ""
-"íå äîïóñêàåòñÿ ñáðîñ ê íà÷àëüíûì çíà÷åíèÿì, åñëè íå óñòàíîâëåíî ãëîáàëüíîå "
-"çíà÷åíèå ó ïàðàìåòðà %s"
+"íå äîïóñêàåòñÿ ñáðîñ ê íà÷àëüíûì çíà÷åíèÿì, åñëè íå óñòàíîâëåíî çíà÷åíèå ó "
+"îáùåãî ïàðàìåòðà %s"
# :!~ Restorer
msgid "attempt to refer to deleted tab page"
@@ -12765,7 +12791,7 @@ msgstr ""
"Ôàéëû ðåäàêòîðà Vim (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n"
# #Restorer: èñïîëüçóåòñÿ äëÿ ôàéëà desktop
-# ~!: earlier
+# :!~ Restorer
msgid "GVim"
msgstr "gVim"
@@ -12791,15 +12817,15 @@ msgstr "Vim"
# :!~ Restorer
msgid "(local to window)"
-msgstr "(îáëàñòü äåéñòâèÿ: ëîêàëüíî äëÿ îêíà)"
+msgstr "(îáëàñòü äåéñòâèÿ: òîëüêî äëÿ îêíà)"
# :!~ Restorer
msgid "(local to buffer)"
-msgstr "(îáëàñòü äåéñòâèÿ: ëîêàëüíî äëÿ áóôåðà)"
+msgstr "(îáëàñòü äåéñòâèÿ: òîëüêî äëÿ áóôåðà)"
# :!~ Restorer
msgid "(global or local to buffer)"
-msgstr "(îáëàñòü äåéñòâèÿ: ãëîáàëüíàÿ èëè ëîêàëüíî äëÿ áóôåðà)"
+msgstr "(îáëàñòü äåéñòâèÿ: îáùèé èëè òîëüêî äëÿ áóôåðà)"
# :!~ Restorer
msgid ""
@@ -12898,7 +12924,7 @@ msgid ""
"many jump commands move the cursor to the first non-blank\n"
"character of a line"
msgstr ""
-"óñòàíîâêà êàðåòêè íà ïåðâûé íå ïðîáåëüíûé ñèìâîë â ñòðîêå\n"
+"óñòàíîâêà êàðåòêè íà ïåðâûé íåïðîáåëüíûé ñèìâîë â ñòðîêå\n"
"ïîñðåäñòâîì êîìàíä ïåðåìåùåíèÿ"
# :!~ Restorer
@@ -13119,7 +13145,7 @@ msgid ""
"include \"uhex\" to show unprintable characters as a hex number"
msgstr ""
"\"lastline\" — èíäèêàöèÿ, åñëè ñòðîêà ÷àñòè÷íî îòîáðàæåíà â îêíå\n"
-"\"uhex\" — ïîêàç íåïå÷àòàåìûõ ñèìâîëîâ êàê øåñòíàäöàòåðè÷íûå ÷èñëà"
+"\"uhex\" — ïîêàç íåïå÷àòàåìûõ ñèìâîëîâ êàê øåñòíàäöàòåðè÷íîå çíà÷åíèå"
# :!~ Restorer
msgid "characters to use for the status line, folds and filler lines"
@@ -13462,7 +13488,7 @@ msgstr "èñïîëüçóåìûé òåðìèíàëîì ïðîòîêîë îáìåíà äàííûõ ñ êëàâèàòóðîé"
# :!~ Restorer
msgid "recognize keys that start with <Esc> in Insert mode"
-msgstr "ðàñïîçíàâàòü â ðåæèìå âñòàâêè êîäû êëàâèø íà÷èíàþùèåñÿ ñ <ESC>"
+msgstr "ðàñïîçíàâàòü â ðåæèìå âñòàâêè êîäû êëàâèø íà÷èíàþùèåñÿ ñ <Esc>"
# :!~ Restorer
msgid "minimal number of lines to scroll at a time"
@@ -13600,7 +13626,7 @@ msgstr "îáëàñòü ýêðàíà, îñòàþùàÿñÿ íå çàíÿòîé îêíîì ïðîãðàììû (â ïèêñåëÿõ)"
# :!~ Restorer
msgid "list of ASCII characters that can be combined into complex shapes"
-msgstr "ïåðå÷åíü ñèìâîëîâ â êîäèðîâêå ASCII, èñïîëüçóåìûõ â ñîñòàâíûõ ñèìâîëàõ"
+msgstr "ïåðå÷åíü ñèìâîëîâ êîäèðîâêè ASCII, èñïîëüçóåìûõ â ñîñòàâíûõ ñèìâîëàõ"
# :!~ Restorer
msgid "options for text rendering"
@@ -13973,7 +13999,7 @@ msgstr ""
# :!~ Restorer
msgid "a <Tab> in an indent inserts 'shiftwidth' spaces"
msgstr ""
-"ïðè íàæàòèè êëàâèøè <TAB> â íà÷àëå ñòðîêè áóäåò âñòàâêà ïðîáåëîâ\n"
+"ïðè íàæàòèè êëàâèøè <TAB> , â íà÷àëå ñòðîêè áóäåò âñòàâêà ïðîáåëîâ\n"
"êàê çàäàíî â ïàðàìåòðå 'shiftwidth'"
# :!~ Restorer
@@ -14058,11 +14084,11 @@ msgstr "Ñòðóêòóðèðîâàíèå òåêñòà"
# :!~ Restorer
msgid "unset to display all folds open"
-msgstr "åñëè íå óñòàíîâëåíî, òî ðàçâåðíóòü âñå ñâ¸ðíóòûå ñòðîêè"
+msgstr "åñëè íå óñòàíîâëåíî, òî ðàçâåðíóòü âñå ñâ¸ðíóòûå áëîêè"
# :!~ Restorer
msgid "folds with a level higher than this number will be closed"
-msgstr "ñòðîêè ñòðóêòóðû ñ óðîâíåì âûøå óêàçàííîãî áóäóò ñâ¸ðíóòû"
+msgstr "ñòðîêè ñòðóêòóðû, ñ óðîâíåì âûøå óêàçàííîãî, áóäóò ñâ¸ðíóòû"
# :!~ Restorer
msgid "value for 'foldlevel' when starting to edit a file"
@@ -14225,7 +14251,7 @@ msgstr "ôîðìàòû ôàéëà, êîòîðûå ïðîâåðÿþòñÿ ïåðåä íà÷àëîì ðåäàêòèðîâàíèÿ"
# :!~ Restorer
msgid "obsolete, use 'fileformat'"
-msgstr "âûâåäåí èç óïîòðåáëåíèÿ, äåéñòâóåò ïàðàìåòð 'fileformat'"
+msgstr "áîëüøå íå ïðèìåíÿåòñÿ, èñïîëüçîâàòü ïàðàìåòð 'fileformat'"
# :!~ Restorer
msgid "obsolete, use 'fileformats'"
diff --git a/src/po/ru.po b/src/po/ru.po
index 9e2e3d8..d4b7d6b 100644
--- a/src/po/ru.po
+++ b/src/po/ru.po
@@ -21,10 +21,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: RuVim_0.9002185.251223\n"
+"Project-Id-Version: RuVim_0.9010059.260124\n"
"Report-Msgid-Bugs-To: The Vim Project, <vim-dev@vim.org>\n"
-"POT-Creation-Date: 2023-12-25 16:17+0300\n"
-"PO-Revision-Date: 2023-12-25 18:57+0300\n"
+"POT-Creation-Date: 2024-01-26 14:54+0300\n"
+"PO-Revision-Date: 2024-01-26 14:57+0300\n"
"Last-Translator: Restorer, <restorer@mail2k.ru>\n"
"Language-Team: RuVim, https://github.com/RestorerZ/RuVim\n"
"Language: ru_RU\n"
@@ -233,6 +233,7 @@ msgstr "Окончание"
msgid "Top"
msgstr "Ðачало"
+# #Restorer: локализуемое значение процента
# :!~ Restorer
#, c-format
msgid "%d%%"
@@ -266,6 +267,10 @@ msgstr " (файл %d из %d"
msgid " (file (%d) of %d)"
msgstr " (файл (%d) из %d"
+# :!~ Restorer
+msgid "[Command Line]"
+msgstr "[ÐºÐ¾Ð¼Ð°Ð½Ð´Ð½Ð°Ñ Ñтрока]"
+
# #Restorer: в Ñтроке ÑоÑтоÑÐ½Ð¸Ñ Ð´Ð»Ñ Ð±ÑƒÑ„ÐµÑ€Ð° Ñ Ð¾ÐºÐ½Ð¾Ð¼ запроÑа и уведомлениÑ
# :!~ Restorer
msgid "[Prompt]"
@@ -551,7 +556,8 @@ msgstr "аргумента функции extend()"
#, c-format
msgid "Not enough memory to use internal diff for buffer \"%s\""
msgstr ""
-"Ð’Ñтроенному механизму ÑÑ€Ð°Ð²Ð½ÐµÐ½Ð¸Ñ Ð½ÐµÐ´Ð¾Ñтаточно памÑти на Ñчитывание буфера \"%s\""
+"Ð’Ñтроенному механизму ÑÑ€Ð°Ð²Ð½ÐµÐ½Ð¸Ñ Ð½ÐµÐ´Ð¾Ñтаточно памÑти на Ñчитывание буфера "
+"\"%s\""
# #Restorer: выводитÑÑ Ð² заголовке окна выбора файла
# :!~ Restorer
@@ -699,6 +705,7 @@ msgstr ""
# #Restorer: иÑпользуетÑÑ Ð² функции confirm() еÑли не заданы аргумент buttons
# #Restorer: иÑпользуетÑÑ ÐºÐ°Ðº кнопка по умолчанию в окнах Ñообщений ГИП
# :!~ Restorer
+#.
msgid "&Ok"
msgstr "&OK"
@@ -890,7 +897,8 @@ msgstr "Сохранить Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð² \"%s\"?"
# :!~ Restorer
msgid "Warning: Entered other buffer unexpectedly (check autocommands)"
msgstr ""
-"Внимание! Ðепредвиденный переход в другой буфер (проверьте дейÑÑ‚Ð²Ð¸Ñ Ð°Ð²Ñ‚Ð¾ÐºÐ¾Ð¼Ð°Ð½Ð´)"
+"Внимание! Ðепредвиденный переход в другой буфер (проверьте дейÑÑ‚Ð²Ð¸Ñ "
+"автокоманд)"
# :!~ Restorer
#, c-format
@@ -1074,10 +1082,6 @@ msgstr "Ошибка"
msgid "Interrupt"
msgstr "Прерывание"
-# :!~ Restorer
-msgid "[Command Line]"
-msgstr "[ÐºÐ¾Ð¼Ð°Ð½Ð´Ð½Ð°Ñ Ñтрока]"
-
# #Restorer: в UNIX-подобных ÑиÑтемах
# #Restorer: и ещё ошибка E502:
# ~!: earlier
@@ -1086,7 +1090,7 @@ msgstr "ÑвлÑетÑÑ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ð¾Ð¼"
# :!~ Restorer
msgid "Illegal file name"
-msgstr "ÐедопуÑтимые Ñимволы или превышена длина Ð½Ð°Ð¸Ð¼ÐµÐ½Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð°"
+msgstr "Обнаружены недопуÑтимые Ñимволы или превышена длина Ð½Ð°Ð¸Ð¼ÐµÐ½Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð°"
# #Restorer: в UNIX-подобных ÑиÑтемах
# ~!: earlier
@@ -1235,7 +1239,8 @@ msgstr "[нет Ñимвола Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ñтроки]"
# :!~ Restorer
#, c-format
msgid ""
-"W12: Warning: File \"%s\" has changed and the buffer was changed in Vim as well"
+"W12: Warning: File \"%s\" has changed and the buffer was changed in Vim as "
+"well"
msgstr "W12: Внимание! Ðе ÑвÑзанные Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñодержимого буфера и файла \"%s\""
# :!~ Restorer
@@ -1366,10 +1371,12 @@ msgstr ""
msgid "OK"
msgstr "OK"
+# #Restorer: наименование кнопки в диалоговом окне
# :!~ Restorer
msgid "Yes"
msgstr "Да"
+# #Restorer: наименование кнопки в диалоговом окне
# :!~ Restorer
msgid "No"
msgstr "Ðет"
@@ -1567,27 +1574,28 @@ msgstr "Directory\t*.nothing\n"
# :!~ Restorer
#, c-format
msgid "Font0: %s"
-msgstr "наименование шрифта font0 %s"
+msgstr "Шрифт font0 %s"
# :!~ Restorer
#, c-format
msgid "Font%d: %s"
-msgstr "наименование шрифта font%d %s"
+msgstr "Шрифт font%d %s"
# :!~ Restorer
#, c-format
msgid "Font%d width is not twice that of font0"
-msgstr "ширина Ñимволов font%d должна быть вдвое больше ширины Ñимволов font0"
+msgstr ""
+"ширина Ñимволов в font%d должна быть вдвое больше ширины Ñимволов в font0"
# :!~ Restorer
#, c-format
msgid "Font0 width: %d"
-msgstr "ширина Ñимволов font0 %d"
+msgstr "ширина Ñимволов в font0 %d"
# :!~ Restorer
#, c-format
msgid "Font%d width: %d"
-msgstr "ширина Ñимволов font%d %d"
+msgstr "ширина Ñимволов в font%d %d"
# #Restorer: выводитÑÑ Ð² информационном окне
# :!~ Restorer
@@ -1624,17 +1632,17 @@ msgstr "Показывать размер в пунктах"
msgid "Encoding:"
msgstr "Кодировка:"
-# #Restorer: наименование Ð¿Ð¾Ð»Ñ Ñо ÑпиÑком шрифтов в окне выбора шрифта
+# #Restorer: наименование Ð¿Ð¾Ð»Ñ Ñ Ð¿ÐµÑ€ÐµÑ‡Ð½ÐµÐ¼ шрифтов в окне выбора шрифта
# ~!: earlier
msgid "Font:"
msgstr "Шрифт:"
-# #Restorer: наименование Ð¿Ð¾Ð»Ñ Ñо ÑпиÑком начертаний в окне выбора шрифта
+# #Restorer: наименование Ð¿Ð¾Ð»Ñ Ñ Ð¿ÐµÑ€ÐµÑ‡Ð½ÐµÐ¼ начертаний в окне выбора шрифта
# :!~ Restorer
msgid "Style:"
msgstr "Ðачертание:"
-# #Restorer: наименование Ð¿Ð¾Ð»Ñ Ñо ÑпиÑком размеров в окне выбора шрифта
+# #Restorer: наименование Ð¿Ð¾Ð»Ñ Ñ Ð¿ÐµÑ€ÐµÑ‡Ð½ÐµÐ¼ размеров в окне выбора шрифта
# ~!: earlier
msgid "Size:"
msgstr "Размер:"
@@ -1888,6 +1896,7 @@ msgstr "номер Ñтроки выходит за пределы значенÐ
msgid "not allowed in the Vim sandbox"
msgstr "запрещено выполнение в изолированной Ñреде программы Vim"
+# #Restorer: Check! Is error number duble!
# :!~ Restorer
#, c-format
msgid "E370: Could not load library %s"
@@ -1945,16 +1954,18 @@ msgstr "выполнение прервано пользователем"
# :!~ Restorer
msgid "cannot create buffer/window command: object is being deleted"
msgstr ""
-"объект буфера или окна в процеÑÑе удалениÑ. Ðе удалоÑÑŒ Ñоздать Ð´Ð»Ñ Ð½Ð¸Ñ… команды"
+"объект буфера или окна в процеÑÑе удалениÑ. Ðе удалоÑÑŒ Ñоздать Ð´Ð»Ñ Ð½Ð¸Ñ… команду"
# :!~ Restorer
msgid "cannot register callback command: buffer/window is already being deleted"
msgstr ""
-"объект буфера или окна в процеÑÑе удалениÑ. Ðе удалоÑÑŒ зарегиÑтрировать команду"
+"объект буфера или окна в процеÑÑе удалениÑ. Ðе удалоÑÑŒ зарегиÑтрировать "
+"команду"
# :!~ Restorer
msgid "cannot register callback command: buffer/window reference not found"
-msgstr "не найдена ÑÑылка на буфер или окно. Ðе удалоÑÑŒ зарегиÑтрировать команду"
+msgstr ""
+"не найдена ÑÑылка на буфер или окно. Ðе удалоÑÑŒ зарегиÑтрировать команду"
# :!~ Restorer
msgid "cannot get line"
@@ -1968,7 +1979,7 @@ msgstr "Ðе удалоÑÑŒ зарегиÑтрировать наименоваÐ
# :!~ Restorer
#, c-format
msgid "%ld lines to indent... "
-msgstr "ВыполнÑетÑÑ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¾Ñ‚Ñтупа в %ld Ñтроках... "
+msgstr "ВыполнÑетÑÑ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ðµ отÑтупа в %ld Ñтроках... "
# #Restorer: выводитÑÑ Ð¿Ñ€Ð¸ значении 'report' < %ld
# :!~ Restorer
@@ -2084,7 +2095,7 @@ msgstr "Конец абзаца"
# #Restorer: выводитÑÑ Ð¿Ñ€Ð¸ автоподÑтановке
# :!~ Restorer
msgid "Pattern not found"
-msgstr "Ðе найдены варианты Ð´Ð»Ñ Ð¿Ð¾Ð´Ñтановки"
+msgstr "ОтÑутÑтвуют варианты Ð´Ð»Ñ Ð¿Ð¾Ð´Ñтановки"
# ~!: earlier
msgid "Back at original"
@@ -2140,6 +2151,11 @@ msgstr "аргумента функции filter()"
# #Restorer: допиÑываетÑÑ, например, к Ñообщению E741 или E742
# :!~ Restorer
+msgid "foreach() argument"
+msgstr "аргумента функции foreach()"
+
+# #Restorer: допиÑываетÑÑ, например, к Ñообщению E741 или E742
+# :!~ Restorer
msgid "extendnew() argument"
msgstr "аргумента функции extendnew()"
@@ -2167,7 +2183,7 @@ msgstr "Ðе раÑпознан аргумент командной Ñтроки
# :!~ Restorer
msgid "Too many edit arguments"
-msgstr "Превышено количеÑтво файлов передаваемых в программу Ð´Ð»Ñ Ð¿Ñ€Ð°Ð²ÐºÐ¸"
+msgstr "Превышено количеÑтво файлов, передаваемых в программу Ð´Ð»Ñ Ð¿Ñ€Ð°Ð²ÐºÐ¸"
# :!~ Restorer
msgid "Argument missing after"
@@ -2375,7 +2391,7 @@ msgstr "-R\t\t\tРабота в варианте только Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ
# :!~ Restorer
msgid "-Z\t\t\tRestricted mode (like \"rvim\")"
-msgstr "-Z\t\t\tРабота в варианте Ñ Ð¾Ð³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ñми (как \"rvim\")"
+msgstr "-Z\t\t\tРабота Ñ Ð¾Ð³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð½Ð¾Ð¹ функциональноÑтью (как \"rvim\")"
# :!~ Restorer
msgid "-m\t\t\tModifications (writing files) not allowed"
@@ -2438,8 +2454,7 @@ msgstr "-f\t\t\tÐе иÑпользовать команду newcli Ð´Ð»Ñ Ð¾Ñ‚Ð
# #Restorer: убрал один \t, чтобы выглÑдело единообразно
# :!~ Restorer
msgid "-dev <device>\t\tUse <device> for I/O"
-msgstr ""
-"-dev <уÑтройÑтво>\tИÑпользовать Ð´Ð»Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¹ ввода-вывода данное <уÑтройÑтво>"
+msgstr "-dev <уÑтройÑтво>\tИÑпользовать Ð´Ð»Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¹ ввода-вывода <уÑтройÑтво>"
# :!~ Restorer
msgid "-A\t\t\tStart in Arabic mode"
@@ -2550,7 +2565,8 @@ msgstr "--remote-silent <файлы> То же, но не Ñообщать о
# #Restorer: добавил пару пробельных Ñимволов, дабы подравнÑÑ‚ÑŒ Ñообщение
# ~!: earlier
-msgid "--remote-wait <files> As --remote but wait for files to have been edited"
+msgid ""
+"--remote-wait <files> As --remote but wait for files to have been edited"
msgstr ""
"--remote-wait <файлы> То же, что и --remote, но Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸ÐµÐ¼ завершениÑ"
@@ -2579,13 +2595,13 @@ msgstr "--serverlist\t\tВывод доÑтупных Vim-Ñерверов и з
# :!~ Restorer
msgid "--servername <name>\tSend to/become the Vim server <name>"
-msgstr "--servername <назв>\tПодключение при наличии, либо Ñтать Ñервером <назв>"
+msgstr ""
+"--servername <назв>\tПодключение при наличии, либо Ñтать Ñервером <назв>"
# :!~ Restorer
msgid "--startuptime <file>\tWrite startup timing messages to <file>"
msgstr "--startuptime <файл>\tЗапиÑать хронометраж запуÑка программы в <файл>"
-# #Restorer: добавил один \t чтобы выглÑдело единообразно
# :!~ Restorer
msgid "--log <file>\t\tStart logging to <file> early"
msgstr "--log <файл>\t\tЗапиÑÑŒ протокола работы Ñ Ñтапа инициализации программы"
@@ -2595,7 +2611,6 @@ msgid "-i <viminfo>\t\tUse <viminfo> instead of .viminfo"
msgstr "-i <файл>\t\tИÑпользование вмеÑто файла .viminfo указанного <файла>"
# \n\t\t.. Ð´Ð»Ñ ÑƒÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð² 80 Ñтолбцов (С. Ðлёшин)
-# #Restorer: убрал один \t и добавил пробелы, чтобы выглÑдело единообразно
# :!~ Restorer
msgid "--clean\t\t'nocompatible', Vim defaults, no plugins, no viminfo"
msgstr ""
@@ -2621,8 +2636,7 @@ msgstr ""
# :!~ Restorer
msgid "-display <display>\tRun Vim on <display>"
-msgstr ""
-"-display <X-Ñервер>\tЗапуÑк программы Ñ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸ÐµÐ¼ к указанному X-Ñерверу"
+msgstr "-display <Ñервер>\tПодключение программы к X-Ñерверу <Ñервер>"
# :!~ Restorer
msgid "-iconic\t\tStart Vim iconified"
@@ -2639,7 +2653,8 @@ msgstr "-foreground <цвет>\tÐазначить указанный <цвет>
# #Restorer: убрал один \t, чтобы выглÑдело единообразно
# :!~ Restorer
msgid "-font <font>\t\tUse <font> for normal text (also: -fn)"
-msgstr "-font <шрифт>\tÐазначить указанный <шрифт> Ð´Ð»Ñ Ð¾Ð±Ñ‹Ñ‡Ð½Ð¾Ð³Ð¾ текÑта (или -fn)"
+msgstr ""
+"-font <шрифт>\tÐазначить указанный <шрифт> Ð´Ð»Ñ Ð¾Ð±Ñ‹Ñ‡Ð½Ð¾Ð³Ð¾ текÑта (или -fn)"
# :!~ Restorer
msgid "-boldfont <font>\tUse <font> for bold text"
@@ -2685,7 +2700,7 @@ msgstr ""
# :!~ Restorer
msgid "-display <display>\tRun Vim on <display> (also: --display)"
msgstr ""
-"-display <display>\tПодключение программы к X-Ñерверу <Ñервер> (--display)"
+"-display <Ñервер>\tПодключение программы к X-Ñерверу <Ñервер> (--display)"
# :!~ Restorer
msgid "--role <role>\tSet a unique role to identify the main window"
@@ -2746,12 +2761,12 @@ msgstr "СоÑтоÑние протокола «kitty» обмена данныÐ
# #Restorer: выводитÑÑ, например, по команде `:abbreviata`
# :!~ Restorer
msgid "No abbreviation found"
-msgstr "Ðе найдены ÑокращениÑ"
+msgstr "ОтÑутÑтвуют ÑокращениÑ"
# #Restorer: выводитÑÑ, например, по команде `:map`
# :!~ Restorer
msgid "No mapping found"
-msgstr "Ðе найдены клавиатурные команды"
+msgstr "ОтÑутÑтвуют клавиатурные команды"
# #Restorer: выводитÑÑ Ð¿Ð¾ команде `:marks`
# :!~ Restorer
@@ -2801,7 +2816,8 @@ msgid ""
"Maybe no changes were made or Vim did not update the swap file."
msgstr ""
"\n"
-"Возможно, не было изменений или программе Vim не удалоÑÑŒ обновить файл подкачки"
+"Возможно, не было изменений или программе Vim не удалоÑÑŒ обновить файл "
+"подкачки"
# :!~ Restorer
msgid " cannot be used with this version of Vim.\n"
@@ -2824,7 +2840,7 @@ msgid ""
",\n"
"or the file has been damaged."
msgstr ""
-", \n"
+",\n"
"либо он был повреждён"
# ~!: earlier
@@ -2852,7 +2868,7 @@ msgid ""
"If you entered a new crypt key but did not write the text file,"
msgstr ""
"\n"
-"ЕÑли поÑле Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð´Ð»Ñ ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ, текÑтовый файл не ÑохранÑли,"
+"ЕÑли поÑле Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð½Ðµ было Ñохранение текÑтового файла,"
# :!~ Restorer
msgid ""
@@ -2902,12 +2918,14 @@ msgstr "???БЛОК ПРОПУЩЕÐ"
# :!~ Restorer
msgid "??? from here until ???END lines may be messed up"
-msgstr "Строки, которые возможно иÑпорчены, помещены между метками ??? и ???END"
+msgstr ""
+"Строки, которые, возможно, иÑпорчены, помещены между метками ??? и ???END"
# :!~ Restorer
msgid "??? from here until ???END lines may have been inserted/deleted"
msgstr ""
-"Строки, которые были вÑтавлены или удалены, помещены между метками ??? и ???END"
+"Строки, которые были вÑтавлены или удалены, помещены между метками ??? и ???"
+"END"
# :!~ Restorer
msgid "??? lines may be missing"
@@ -3154,19 +3172,19 @@ msgstr ""
# #Restorer: Ñдвинут к границе Ñкрана
# :!~ Restorer
msgid " If this is the case, use \":recover\" or \"vim -r "
-msgstr "Ð’ Ñтом Ñлучае иÑпользуйте команду :recover или \"vim -r "
+msgstr "Ð’ Ñтом Ñлучае иÑпользуйте команду :recover или `vim -r "
# :!~ Restorer
msgid ""
"\"\n"
" to recover the changes (see \":help recovery\").\n"
msgstr ""
-"\",\n"
+"`,\n"
"чтобы выполнить воÑÑтановление данных (подробнее Ñм. `:help recovery`).\n"
# :!~ Restorer
msgid " If you did this already, delete the swap file \""
-msgstr "ЕÑли Ñто уже был Ñделано, то удалите файл подкачки \""
+msgstr "ЕÑли Ñто уже было Ñделано, то удалите файл подкачки \""
# :!~ Restorer
msgid ""
@@ -3207,7 +3225,7 @@ msgid ""
"&Quit\n"
"&Abort"
msgstr ""
-"Только чтение (&O)\n"
+"Открыть Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ (&O)\n"
"Редактировать (&E)\n"
"ВоÑÑтановить (&R)\n"
"Выход (&Q)\n"
@@ -3223,7 +3241,7 @@ msgid ""
"&Quit\n"
"&Abort"
msgstr ""
-"Только чтение (&O)\n"
+"Открыть Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ (&O)\n"
"Редактировать (&E)\n"
"ВоÑÑтановить (&R)\n"
"Удалить (&D)\n"
@@ -3371,7 +3389,7 @@ msgstr "Внимание! Ð”Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ терминал недоÑтуÐ
# :!~ Restorer
msgid "Type :qa! and press <Enter> to abandon all changes and exit Vim"
msgstr ""
-"Чтобы закрыть программу Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ð¾Ð¹ вÑех правок, наберите :qa! и нажмите "
+"Чтобы закрыть программу Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ð¾Ð¹ вÑех правок, наберите :qa! и нажмите "
"<ENTER>"
# :!~ Restorer
@@ -3445,8 +3463,8 @@ msgid ""
"Selected %s%ld of %ld Lines; %lld of %lld Words; %lld of %lld Chars; %lld of "
"%lld Bytes"
msgstr ""
-"Выделено: %sÑтрок %ld из %ld; Ñлов %lld из %lld; литер %lld из %lld; байт %lld "
-"из %lld"
+"Выделено: %sÑтрок %ld из %ld; Ñлов %lld из %lld; литер %lld из %lld; байт "
+"%lld из %lld"
# #Restorer: выводитÑÑ Ð¿Ñ€Ð¸, например, иÑполнении оператора `g CTRL+g`
# :!~ Restorer
@@ -3459,8 +3477,8 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid ""
-"Col %s of %s; Line %ld of %ld; Word %lld of %lld; Char %lld of %lld; Byte %lld "
-"of %lld"
+"Col %s of %s; Line %ld of %ld; Word %lld of %lld; Char %lld of %lld; Byte "
+"%lld of %lld"
msgstr ""
"Колонка %s из %s; Ñтрока %ld из %ld; Ñлово %lld из %lld; литера %lld из %lld; "
"байт %lld из %lld"
@@ -3592,6 +3610,10 @@ msgid "Printing '%s'"
msgstr "Печать '%s'"
# :!~ Restorer
+msgid "DefaultFontNameForWindows"
+msgstr "Consolas"
+
+# :!~ Restorer
#, c-format
msgid "Opening the X display took %ld msec"
msgstr "Подключение к X-Ñерверу занÑло %ld мÑ"
@@ -3721,7 +3743,8 @@ msgstr "Открыто Ñоединение по XSMP"
# :!~ Restorer
msgid "XSMP ICE connection watch failed"
-msgstr "Произошла ошибка при уÑтановке ÑÐ»ÐµÐ¶ÐµÐ½Ð¸Ñ Ð·Ð° подключением по протоколу ICE"
+msgstr ""
+"Произошла ошибка при уÑтановке ÑÐ»ÐµÐ¶ÐµÐ½Ð¸Ñ Ð·Ð° подключением по протоколу ICE"
# #Restorer: выводитÑÑ Ð¿Ñ€Ð¸ 'verbose'>0
# :!~ Restorer
@@ -3820,7 +3843,7 @@ msgid "cannot have both a list and a \"what\" argument"
msgstr ""
"в функции setqflist(). Должен быть указан либо первый, либо поÑледний аргумент"
-# #Restorer: выводитÑÑ Ð¿Ñ€Ð¸ 'verbose' > 0
+# #Restorer: выводитÑÑ Ð¿Ñ€Ð¸ 'verbose'>0
# :!~ Restorer
msgid "Switching to backtracking RE engine for pattern: "
msgstr "Переключение на механизм «поиÑк Ñ Ð²Ð¾Ð·Ð²Ñ€Ð°Ñ‚Ð¾Ð¼Â» Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñкового шаблона: "
@@ -3959,13 +3982,13 @@ msgid "recording"
msgstr "ЗÐПИСЬ Ð’ РЕГИСТР"
# #Restorer: при поиÑке файла в заданном каталоге, еÑли 'verbose'>10
-# ~!: earlier
+# :!~ Restorer
#, c-format
msgid "Searching for \"%s\" under \"%s\" in \"%s\""
msgstr "ПоиÑк \"%s\" в подкаталоге \"%s\" каталогов из \"%s\""
# #Restorer: при поиÑке файла в заданном каталоге, еÑли 'verbose'>10
-# ~!: earlier
+# :!~ Restorer
#, c-format
msgid "Searching for \"%s\" in \"%s\""
msgstr "ПоиÑк \"%s\" в каталогах из \"%s\""
@@ -4198,7 +4221,7 @@ msgstr "Ð’ файле %s на Ñтроке %d превышена длина на
# :!~ Restorer
msgid "Compressing word tree..."
-msgstr "Сжатие «дерева» Ñлов ..."
+msgstr "Сжатие «дерева» Ñлов..."
# :!~ Restorer
#, c-format
@@ -4213,12 +4236,13 @@ msgstr "Считывание файла аффикÑов %s..."
# :!~ Restorer
#, c-format
msgid "Conversion failure for word in %s line %d: %s"
-msgstr "Ð’ файле %s на Ñтроке %d произошёл Ñбой при изменении кодировки текÑÑ‚ %s"
+msgstr ""
+"Ð’ файле %s на Ñтроке %d произошёл Ñбой при изменении кодировки текÑта %s"
# :!~ Restorer
#, c-format
msgid "Conversion in %s not supported: from %s to %s"
-msgstr "Ð”Ð»Ñ Ñ„Ð°Ð¹Ð»Ð° %s не поддерживаетÑÑ Ð¿ÐµÑ€ÐµÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ðµ из %s в %s"
+msgstr "Ð”Ð»Ñ Ñ„Ð°Ð¹Ð»Ð° %s не поддерживаетÑÑ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ðµ кодировки текÑта из %s в %s"
# :!~ Restorer
#, c-format
@@ -4228,19 +4252,22 @@ msgstr "Ð’ файле %s на Ñтроке %d недопуÑтимое значÐ
# :!~ Restorer
#, c-format
msgid "FLAG after using flags in %s line %d: %s"
-msgstr "Ð’ файле %s на Ñтроке %d поÑле значений флагов обнаружено правило FLAG %s"
+msgstr ""
+"Ð’ файле %s на Ñтроке %d поÑле значений флагов обнаружено правило FLAG %s"
# :!~ Restorer
#, c-format
msgid ""
-"Defining COMPOUNDFORBIDFLAG after PFX item may give wrong results in %s line %d"
+"Defining COMPOUNDFORBIDFLAG after PFX item may give wrong results in %s line "
+"%d"
msgstr ""
"Ð’ файле %s на Ñтроке %d указан COMPOUNDFORBIDFLAG поÑле PFX, что нежелательно"
# :!~ Restorer
#, c-format
msgid ""
-"Defining COMPOUNDPERMITFLAG after PFX item may give wrong results in %s line %d"
+"Defining COMPOUNDPERMITFLAG after PFX item may give wrong results in %s line "
+"%d"
msgstr ""
"Ð’ файле %s на Ñтроке %d указан COMPOUNDPERMITFLAG поÑле PFX, что нежелательно"
@@ -4252,7 +4279,8 @@ msgstr "Ð’ файле %s на Ñтроке %d недопуÑтимое значÐ
# :!~ Restorer
#, c-format
msgid "Wrong COMPOUNDWORDMAX value in %s line %d: %s"
-msgstr "Ð’ файле %s на Ñтроке %d недопуÑтимое значение правила COMPOUNDWORDMAX %s"
+msgstr ""
+"Ð’ файле %s на Ñтроке %d недопуÑтимое значение правила COMPOUNDWORDMAX %s"
# :!~ Restorer
#, c-format
@@ -4366,7 +4394,7 @@ msgstr "Ð’ файле %s на Ñтроке %d обнаружен недопуÑÑ
# :!~ Restorer
#, c-format
msgid "%s value differs from what is used in another .aff file"
-msgstr "Ð’ другом файле аффикÑов обнаружено отличающееÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ Ð´Ð»Ñ %s"
+msgstr "Ð’ другом файле аффикÑов обнаружено неÑовпадающее значение Ð´Ð»Ñ %s"
# :!~ Restorer
#, c-format
@@ -4403,28 +4431,29 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "Reading word file %s..."
-msgstr "Считывание файла Ñо ÑпиÑком Ñлов %s..."
+msgstr "Считывание файла Ñ Ð¿ÐµÑ€ÐµÑ‡Ð½ÐµÐ¼ Ñлов %s..."
# :!~ Restorer
#, c-format
msgid "Conversion failure for word in %s line %ld: %s"
-msgstr "Ð’ файле %s на Ñтроке %ld произошёл Ñбой при изменении кодировки текÑÑ‚ %s"
+msgstr ""
+"Ð’ файле %s на Ñтроке %ld произошёл Ñбой при изменении кодировки текÑта %s"
# :!~ Restorer
#, c-format
msgid "Duplicate /encoding= line ignored in %s line %ld: %s"
-msgstr "Ð’ файле %s на Ñтроке %ld был проигнорирован повтор /encoding= %s"
+msgstr "Ð’ файле %s на Ñтроке %ld не обработан повтор /encoding= %s"
# :!~ Restorer
#, c-format
msgid "/encoding= line after word ignored in %s line %ld: %s"
msgstr ""
-"Ð’ файле %s на Ñтроке %ld проигнорирован указанный поÑле Ñлова /encoding= %s"
+"Ð’ файле %s на Ñтроке %ld не обработан указанный поÑле Ñлова /encoding= %s"
# :!~ Restorer
#, c-format
msgid "Duplicate /regions= line ignored in %s line %ld: %s"
-msgstr "Ð’ файле %s на Ñтроке %ld был проигнорирован повтор %s"
+msgstr "Ð’ файле %s на Ñтроке %ld не обработан повтор /regions= %s"
# :!~ Restorer
#, c-format
@@ -4434,7 +4463,8 @@ msgstr "Ð’ файле %s на Ñтроке %ld превышено количеÑ
# :!~ Restorer
#, c-format
msgid "/ line ignored in %s line %ld: %s"
-msgstr "Ð’ файле %s на Ñтроке %ld не обработан указанный поÑле Ñимвола / текÑÑ‚ %s"
+msgstr ""
+"Ð’ файле %s на Ñтроке %ld не обработан текÑÑ‚, указанный поÑле Ñимвола '/' %s"
# :!~ Restorer
#, c-format
@@ -4459,11 +4489,12 @@ msgstr "Сжато узлов %s: %ld из %ld. ОÑталоÑÑŒ %ld (%ld%%)"
# :!~ Restorer
msgid "Reading back spell file..."
-msgstr "Считывание запиÑанного файла правил напиÑÐ°Ð½Ð¸Ñ ..."
+msgstr "Считывание запиÑанного файла правил напиÑаниÑ..."
# :!~ Restorer
+#.
msgid "Performing soundfolding..."
-msgstr "ПоÑтроение префикÑного «дерева» омофонов ..."
+msgstr "ПоÑтроение префикÑного «дерева» омофонов..."
# :!~ Restorer
#, c-format
@@ -4789,7 +4820,8 @@ msgstr "Отмена изменений недоÑтупна. Продолжит
# :!~ Restorer
msgid "Cannot write undo file in any directory in 'undodir'"
msgstr ""
-"Ðе удалоÑÑŒ запиÑать файл изменений ни в один из каталогов из параметра 'udodir'"
+"Ðе удалоÑÑŒ запиÑать файл изменений ни в один из каталогов из параметра "
+"'udodir'"
# #Restorer: выводитÑÑ, например, Ð´Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´ `:wundo` и `:rundo` при 'verbose'>0
# :!~ Restorer
@@ -4806,7 +4838,7 @@ msgstr "Ðе удалоÑÑŒ запиÑать файл. Файл не ÑвлÑеÑ
# #Restorer: выводитÑÑ, например, Ð´Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´ `:wundo` и `:rundo` при 'verbose'>0
# :!~ Restorer
msgid "Skipping undo file write, nothing to undo"
-msgstr "ЗапиÑÑŒ файла изменений не выполнена. Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¾Ñ‚ÑутÑтвуют."
+msgstr "Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¾Ñ‚ÑутÑтвуют. ЗапиÑÑŒ файла изменений не выполнена"
# #Restorer: выводитÑÑ, например, Ð´Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´ `:wundo` и `:rundo` при 'verbose'>0
# :!~ Restorer
@@ -4928,7 +4960,7 @@ msgstr ""
# #Restorer: выводитÑÑ Ð¿Ð¾ команде `:command`
# :!~ Restorer
msgid "No user-defined commands found"
-msgstr "Ðе найдены Ñозданные пользователем команды"
+msgstr "Созданные пользователем команды не найдены"
# #Restorer: выводитÑÑ Ð¿Ñ€Ð¸ 'verbose'>0
# :!~ Restorer
@@ -4966,15 +4998,14 @@ msgstr "%s вернула %s"
# :!~ Restorer
#, c-format
-msgid "Function %s does not need compiling"
-msgstr "Ðе требуетÑÑ ÐºÐ¾Ð¼Ð¿Ð¸Ð»ÑÑ†Ð¸Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¸ %s"
+msgid "Function %s%s%s does not need compiling"
+msgstr "Ðе требуетÑÑ ÐºÐ¾Ð¼Ð¿Ð¸Ð»ÑÑ†Ð¸Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¸ %s%s%s"
# #Restorer: первый %s заменÑетÑÑ Ð½Ð° VIM_VERSION_LONG_ONLY (только наименование
# #Restorer: программы), второй %s - VIM_VERSION_DATE_ONLY (дата первого выпуÑка),
# #Restorer: третий %s - датой текущей Ñборки
# #Restorer: выводитÑÑ Ð¿Ð¾ команде vim.exe -h или `:version`
# :!~ Restorer
-# "%s (%s, Ñборано в %s)"
#, c-format
msgid "%s (%s, compiled %s)"
msgstr "%s (%s, Ñборка от %s)"
@@ -5155,59 +5186,59 @@ msgstr " Ð’ Ñтой верÑии включены (+) и отключены (-)
# ~!: earlier
msgid " system vimrc file: \""
-msgstr " общеÑиÑтемный файл vimrc: \""
+msgstr " общеÑиÑтемный файл vimrc: \""
# ~!: earlier
msgid " user vimrc file: \""
-msgstr " пользовательÑкий файл vimrc: \""
+msgstr " пользовательÑкий файл vimrc: \""
# ~!: earlier
msgid " 2nd user vimrc file: \""
-msgstr " второй пользовательÑкий файл vimrc: \""
+msgstr " второй пользовательÑкий файл vimrc: \""
# ~!: earlier
msgid " 3rd user vimrc file: \""
-msgstr " третий пользовательÑкий файл vimrc: \""
+msgstr " третий пользовательÑкий файл vimrc: \""
# ~!: earlier
msgid " user exrc file: \""
-msgstr " пользовательÑкий файл exrc: \""
+msgstr " пользовательÑкий файл exrc: \""
# ~!: earlier
msgid " 2nd user exrc file: \""
-msgstr " второй пользовательÑкий файл exrc: \""
+msgstr " второй пользовательÑкий файл exrc: \""
# ~!: earlier
msgid " system gvimrc file: \""
-msgstr " общеÑиÑтемный файл gvimrc: \""
+msgstr " общеÑиÑтемный файл gvimrc: \""
# ~!: earlier
msgid " user gvimrc file: \""
-msgstr " пользовательÑкий файл gvimrc: \""
+msgstr " пользовательÑкий файл gvimrc: \""
# ~!: earlier
msgid "2nd user gvimrc file: \""
-msgstr " второй пользовательÑкий файл gvimrc: \""
+msgstr "второй пользовательÑкий файл gvimrc: \""
# ~!: earlier
msgid "3rd user gvimrc file: \""
-msgstr " третий пользовательÑкий файл gvimrc: \""
+msgstr "третий пользовательÑкий файл gvimrc: \""
# :!~ Restorer
msgid " defaults file: \""
-msgstr " файл предуÑтановленных наÑтроек: \""
+msgstr " файл предуÑтановленных наÑтроек: \""
# ~!: earlier
msgid " system menu file: \""
-msgstr " общеÑиÑтемный файл меню: \""
+msgstr " общеÑиÑтемный файл меню: \""
# ~!: earlier
msgid " fall-back for $VIM: \""
-msgstr " значение $VIM по умолчанию: \""
+msgstr " значение $VIM по умолчанию: \""
# ~!: earlier
msgid " f-b for $VIMRUNTIME: \""
-msgstr " значение $VIMRUNTIME по умолчанию: \""
+msgstr " значение $VIMRUNTIME по умолчанию: \""
# :!~ Restorer
msgid "Compilation: "
@@ -5368,7 +5399,7 @@ msgstr ""
# #Restorer: E1016: Ð”Ð»Ñ Ð¾Ð±Ð»Ð°Ñти дейÑÑ‚Ð²Ð¸Ñ Â«Ð³Ð»Ð¾Ð±Ð°Ð»ÑŒÐ½Ð°Ñ» не может быть объÑвлена Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ %s
# :!~ Restorer
msgid "global"
-msgstr "«глобальный»"
+msgstr "«общий»"
# #Restorer: подÑтавлÑетÑÑ Ð² «E1016: Cannot declare a %s variable: %s» как
# #Restorer: Ð¿ÐµÑ€Ð²Ð°Ñ %s. Может лучше не переводить? Пока Ñделал. ВыглÑдит так:
@@ -5403,7 +5434,7 @@ msgid ""
"# Buffer list:\n"
msgstr ""
"\n"
-"# СпиÑок буферов:\n"
+"# Перечень буферов:\n"
# #Restorer: запиÑÑŒ в viminfo-файл журнала (history) команд, поиÑка и проч.
# :!~ Restorer
@@ -5454,13 +5485,14 @@ msgstr ""
msgid "%sviminfo: %s in line: "
msgstr "%s%s в viminfo-файле на Ñтроке "
-# ~!: earlier
+# #Restorer: в viminfo-файле
+# :!~ Restorer
msgid ""
"\n"
"# global variables:\n"
msgstr ""
"\n"
-"# Глобальные переменные:\n"
+"# Общие переменные:\n"
# #Restorer: запиÑÑŒ в viminfo-файле
# :!~ Restorer
@@ -5589,7 +5621,7 @@ msgstr "Открыть файлы в отдельных вкладка&х про
# :!~ Restorer
msgid "Edit with single &Vim"
-msgstr "Открыть вÑе файлы в одной программе &Vim"
+msgstr "Открыть вÑе файлы в &одной программе Vim"
# :!~ Restorer
msgid "Diff with Vim"
@@ -5597,7 +5629,7 @@ msgstr "Сравнить файлы в программе Vim"
# :!~ Restorer
msgid "Edit with &Vim"
-msgstr "Открыть в программе &Vim"
+msgstr "Открыть в &программе Vim"
# :!~ Restorer
msgid "Edit with existing Vim"
@@ -5671,7 +5703,7 @@ msgstr "E18: ÐедопуÑтимые Ñимволы в приÑваиваемо
# :!~ Restorer
msgid "E19: Mark has invalid line number"
-msgstr "E19: Закладка указывает на не ÑущеÑтвующую Ñтроку"
+msgstr "E19: Закладка указывает на неÑущеÑтвующую Ñтроку"
# :!~ Restorer
msgid "E20: Mark not set"
@@ -5691,7 +5723,7 @@ msgstr "E23: ОтÑутÑтвуют ÑоÑедние файлы"
# :!~ Restorer
msgid "E24: No such abbreviation"
-msgstr "E24: ОтÑутÑтвует указанное Ñокращение"
+msgstr "E24: Ðе ÑущеÑтвует указанного ÑокращениÑ"
# :!~ Restorer
msgid "E25: GUI cannot be used: Not enabled at compile time"
@@ -5714,15 +5746,15 @@ msgstr "E28: Ðе ÑущеÑтвует группы подÑветки ÑинтÐ
# :!~ Restorer
msgid "E29: No inserted text yet"
-msgstr "E29: РегиÑÑ‚Ñ€ Ð´Ð»Ñ Ð¿Ð¾Ñледнего вÑтавленного текÑта пуÑÑ‚"
+msgstr "E29: РегиÑÑ‚Ñ€ поÑледнего набранного текÑта пуÑÑ‚"
# :!~ Restorer
msgid "E30: No previous command line"
-msgstr "E30: РегиÑÑ‚Ñ€ Ð´Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´ режима командной Ñтроки пуÑÑ‚"
+msgstr "E30: РегиÑÑ‚Ñ€ поÑледней команды режима командной Ñтроки пуÑÑ‚"
# :!~ Restorer
msgid "E31: No such mapping"
-msgstr "E31: Ðе ÑущеÑтвует клавиатурной команды"
+msgstr "E31: Ðе ÑущеÑтвует указанной клавиатурной команды"
# :!~ Restorer
msgid "E32: No file name"
@@ -5783,7 +5815,8 @@ msgstr "E46: Ðе допуÑкаетÑÑ Ð¿Ñ€Ð¸Ñваивание значени
# :!~ Restorer
#, c-format
msgid "E46: Cannot change read-only variable \"%s\""
-msgstr "E46: Ðе допуÑкаетÑÑ Ð¿Ñ€Ð¸Ñваивание Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð½ÐµÐ¸Ð·Ð¼ÐµÐ½Ñемой переменной \"%s\""
+msgstr ""
+"E46: Ðе допуÑкаетÑÑ Ð¿Ñ€Ð¸Ñваивание Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð½ÐµÐ¸Ð·Ð¼ÐµÐ½Ñемой переменной \"%s\""
# :!~ Restorer
msgid "E47: Error while reading errorfile"
@@ -5900,7 +5933,7 @@ msgstr "E74: Превышена длина результата выполнен
# :!~ Restorer
msgid "E75: Name too long"
-msgstr "E75: Превышена длина маршрута к файлу"
+msgstr "E75: Превышена допуÑÑ‚Ð¸Ð¼Ð°Ñ Ð´Ð»Ð¸Ð½Ð° маршрута к файлу"
# :!~ Restorer
msgid "E76: Too many ["
@@ -5946,7 +5979,7 @@ msgstr "E85: Указанный буфер отÑутÑтвует в ÑпиÑкÐ
# :!~ Restorer
#, c-format
msgid "E86: Buffer %ld does not exist"
-msgstr "E86: Буфер под номером %ld не ÑущеÑтвует"
+msgstr "E86: Ðе ÑущеÑтвует буфера под номером %ld"
# :!~ Restorer
msgid "E87: Cannot go beyond last buffer"
@@ -6047,7 +6080,7 @@ msgstr "E108: Ðе ÑущеÑтвует переменной \"%s\""
# :!~ Restorer
msgid "E109: Missing ':' after '?'"
-msgstr "E109: ОтÑутÑтвует Ñимвол Ð´Ð²Ð¾ÐµÑ‚Ð¾Ñ‡Ð¸Ñ ':' в операторе проверки уÑÐ»Ð¾Ð²Ð¸Ñ '?'"
+msgstr "E109: ОтÑутÑтвует Ñимвол Ð´Ð²Ð¾ÐµÑ‚Ð¾Ñ‡Ð¸Ñ ':' в операторе проверки уÑÐ»Ð¾Ð²Ð¸Ñ `?`"
# :!~ Restorer
msgid "E110: Missing ')'"
@@ -6177,7 +6210,8 @@ msgstr ""
# :!~ Restorer
msgid "E135: *Filter* Autocommands must not change current buffer"
msgstr ""
-"E135: ДейÑÑ‚Ð²Ð¸Ñ Ð°Ð²Ñ‚Ð¾ÐºÐ¾Ð¼Ð°Ð½Ð´ по ÑобытиÑм *Filter* не должны изменÑÑ‚ÑŒ текущий буфер"
+"E135: ДейÑÑ‚Ð²Ð¸Ñ Ð°Ð²Ñ‚Ð¾ÐºÐ¾Ð¼Ð°Ð½Ð´ по ÑобытиÑм *Filter* не должны изменÑÑ‚ÑŒ текущий "
+"буфер"
# :!~ Restorer
msgid "E136: viminfo: Too many errors, skipping rest of file"
@@ -6224,7 +6258,7 @@ msgstr "E144: ТребуетÑÑ ÑƒÐºÐ°Ð·Ð°Ñ‚ÑŒ чиÑловой параметÑ
msgid "E145: Shell commands and some functionality not allowed in rvim"
msgstr ""
"E145: Команды командной оболочки и Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¾Ð½Ð°Ð»ÑŒÐ½Ð¾ÑÑ‚ÑŒ отключены в "
-"варианте программы rvim"
+"варианте программы rVim"
# :!~ Restorer
msgid "E146: Regular expressions can't be delimited by letters"
@@ -6424,7 +6458,7 @@ msgstr "E185: Ðе найдена Ñ†Ð²ÐµÑ‚Ð¾Ð²Ð°Ñ Ñхема \"%s\""
# :!~ Restorer
msgid "E186: No previous directory"
-msgstr "E186: Ранее изменений каталога не выполнÑлоÑÑŒ, оÑталÑÑ Ñ‚ÐµÐºÑƒÑ‰Ð¸Ð¹ каталог"
+msgstr "E186: Переходы в другой каталог ранее не выполнÑлиÑÑŒ"
# :!~ Restorer
msgid "E187: Directory unknown"
@@ -6438,18 +6472,20 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "E189: \"%s\" exists (add ! to override)"
-msgstr "E189: Файл \"%s\" уже ÑущеÑтвует (чтобы заменить, укажите модификатор !)"
+msgstr ""
+"E189: Файл \"%s\" уже ÑущеÑтвует (чтобы заменить, укажите модификатор !)"
# #Restorer: Ñм. E212
# :!~ Restorer
#, c-format
msgid "E190: Cannot open \"%s\" for writing"
-msgstr "E190: Ðе удалоÑÑŒ открыть на запиÑÑŒ файла \"%s\""
+msgstr "E190: Ðе удалоÑÑŒ открыть на запиÑÑŒ файл \"%s\""
# :!~ Restorer
msgid "E191: Argument must be a letter or forward/backward quote"
msgstr ""
-"E191: ТребуетÑÑ ÑƒÐºÐ°Ð·Ð°Ñ‚ÑŒ букву, прÑмую или обратную кавычку как параметр команды"
+"E191: ТребуетÑÑ ÑƒÐºÐ°Ð·Ð°Ñ‚ÑŒ букву, прÑмую или обратную кавычку как параметр "
+"команды"
# :!~ Restorer
msgid "E192: Recursive use of :normal too deep"
@@ -6480,8 +6516,8 @@ msgid "E197: Cannot set language to \"%s\""
msgstr "E197: Ðе удалоÑÑŒ изменить региональные наÑтройки Ð´Ð»Ñ \"%s\""
# :!~ Restorer
-msgid "E199: Active window or buffer deleted"
-msgstr "E199: Удалены активное окно или буфер"
+msgid "E199: Active window or buffer changed or deleted"
+msgstr "E199: Удаление или изменение текущего окна или буфера"
# :!~ Restorer
msgid "E200: *ReadPre autocommands made the file unreadable"
@@ -6491,7 +6527,8 @@ msgstr ""
# :!~ Restorer
msgid "E201: *ReadPre autocommands must not change current buffer"
msgstr ""
-"E201: ДейÑÑ‚Ð²Ð¸Ñ Ð°Ð²Ñ‚Ð¾ÐºÐ¾Ð¼Ð°Ð½Ð´ по ÑобытиÑм *ReadPre не должны изменÑÑ‚ÑŒ текущий буфер"
+"E201: ДейÑÑ‚Ð²Ð¸Ñ Ð°Ð²Ñ‚Ð¾ÐºÐ¾Ð¼Ð°Ð½Ð´ по ÑобытиÑм *ReadPre не должны изменÑÑ‚ÑŒ текущий "
+"буфер"
# :!~ Restorer
msgid "E202: Conversion made file unreadable!"
@@ -6509,7 +6546,8 @@ msgstr "E204: ДейÑÑ‚Ð²Ð¸Ñ Ð°Ð²Ñ‚Ð¾ÐºÐ¾Ð¼Ð°Ð½Ð´ вызвали изменеÐ
# :!~ Restorer
msgid "E205: Patchmode: can't save original file"
msgstr ""
-"E205: Ðе удалоÑÑŒ Ñохранить иÑходный файл Ñ Ñ€Ð°Ñширением из параметра 'patchmode'"
+"E205: Ðе удалоÑÑŒ Ñохранить иÑходный файл Ñ Ñ€Ð°Ñширением из параметра "
+"'patchmode'"
# :!~ Restorer
msgid "E206: Patchmode: can't touch empty original file"
@@ -6556,12 +6594,12 @@ msgstr "E214: Ðу удалоÑÑŒ найти временный файл длÑ
# :!~ Restorer
#, c-format
msgid "E215: Illegal character after *: %s"
-msgstr "E215: ТребуетÑÑ Ð¿Ñ€Ð¾Ð±ÐµÐ»ÑŒÐ½Ñ‹Ð¹ Ñимвол поÑле Ñимвола * в %s"
+msgstr "E215: ТребуетÑÑ Ð¿Ñ€Ð¾Ð±ÐµÐ»ÑŒÐ½Ñ‹Ð¹ Ñимвол поÑле Ñимвола '*' в %s"
# :!~ Restorer
#, c-format
msgid "E216: No such event: %s"
-msgstr "E216: Ðе ÑущеÑтвует Ñобытие %s"
+msgstr "E216: Ðе ÑущеÑтвует ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ñ %s"
# :!~ Restorer
#, c-format
@@ -6596,12 +6634,12 @@ msgstr "E223: Превышено количеÑтво переназначени
# :!~ Restorer
#, c-format
msgid "E224: Global abbreviation already exists for %s"
-msgstr "E224: Обнаружено ÑущеÑтвующее глобальное Ñокращение %s"
+msgstr "E224: Обнаружено ÑущеÑтвующее общее Ñокращение %s"
# :!~ Restorer
#, c-format
msgid "E225: Global mapping already exists for %s"
-msgstr "E225: Обнаружена ÑущеÑÑ‚Ð²ÑƒÑŽÑ‰Ð°Ñ Ð³Ð»Ð¾Ð±Ð°Ð»ÑŒÐ½Ð°Ñ ÐºÐ»Ð°Ð²Ð¸Ð°Ñ‚ÑƒÑ€Ð½Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð° %s"
+msgstr "E225: Обнаружена ÑущеÑÑ‚Ð²ÑƒÑŽÑ‰Ð°Ñ Ð¾Ð±Ñ‰Ð°Ñ ÐºÐ»Ð°Ð²Ð¸Ð°Ñ‚ÑƒÑ€Ð½Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð° %s"
# :!~ Restorer
#, c-format
@@ -6712,7 +6750,7 @@ msgstr "E249: ДейÑÑ‚Ð²Ð¸Ñ Ð°Ð²Ñ‚Ð¾ÐºÐ¾Ð¼Ð°Ð½Ð´ вызвали изменеÐ
# ~!: earlier
#, c-format
msgid "E250: Fonts for the following charsets are missing in fontset %s:"
-msgstr "E250: Ð’ наборе шрифтов %s отÑутÑтвуют шрифты Ð´Ð»Ñ ÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð¾Ðº:"
+msgstr "E250: Ð’ наборе шрифтов %s отÑутÑтвуют шрифты Ñо Ñледующими Ñимволами:"
# #Restorer: отображаетÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ при ÑпецифичеÑких уÑловиÑÑ…
# :!~ Restorer
@@ -6752,7 +6790,7 @@ msgstr "E258: Ðе удалоÑÑŒ отправить Ñообщение клие
msgid "E259: No matches found for cscope query %s of %s"
msgstr "E259: Ð’ базах данных cscope по запроÑу %s не найден %s"
-# #Restorer: выводитÑÑ Ð¿Ñ€Ð¸ значении 'verbose' > 0
+# #Restorer: выводитÑÑ Ð¿Ñ€Ð¸ значении 'verbose'>0
# :!~ Restorer
msgid "E260: Missing name after ->"
msgstr "E260: Ðе указан вызываемый метод в запиÑи ->"
@@ -6818,7 +6856,7 @@ msgstr "E272: Ðеобработанное иÑключение"
msgid "E273: Unknown longjmp status %d"
msgstr "E273: Ðеопределённое ÑоÑтоÑние %d"
-# #Restorer: выводитÑÑ Ð¿Ñ€Ð¸ 'verbose' > 0
+# #Restorer: выводитÑÑ Ð¿Ñ€Ð¸ 'verbose'>0
# :!~ Restorer
msgid "E274: No white space allowed before parenthesis"
msgstr "E274: Ðе допуÑкаетÑÑ Ð¿Ñ€Ð¾Ð±ÐµÐ»ÑŒÐ½Ñ‹Ð¹ Ñимвол перед круглыми Ñкобками"
@@ -6831,7 +6869,7 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "E276: Cannot use function as a method: %s"
-msgstr "E276: Ðе допуÑкаетÑÑ Ð¸Ñпользование функции как метод %s"
+msgstr "E276: Ð”Ð°Ð½Ð½Ð°Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ðµ может быть иÑпользована как метод %s"
# :!~ Restorer
msgid "E277: Unable to read a server reply"
@@ -6839,7 +6877,7 @@ msgstr "E277: Ðе удалоÑÑŒ Ñчитать ответ Ñервера"
# :!~ Restorer
msgid "E279: Sorry, ++shell is not supported on this system"
-msgstr "E279: Ðргумент ++shell не поддерживаетÑÑ Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð¹ операционной ÑиÑтемы"
+msgstr "E279: Ðргумент ++shell не поддерживаетÑÑ Ð² данной операционной ÑиÑтеме"
# :!~ Restorer
#, c-format
@@ -6850,7 +6888,7 @@ msgstr "E282: Ðе удалоÑÑŒ Ñчитать файл \"%s\""
# :!~ Restorer
#, c-format
msgid "E283: No marks matching \"%s\""
-msgstr "E283: ОтÑутÑтвуют закладки \"%s\""
+msgstr "E283: ОтÑутÑтвуют закладки, Ñовпадающие Ñ \"%s\""
# ~!: earlier
msgid "E284: Cannot set IC values"
@@ -7016,7 +7054,8 @@ msgstr "E331: Ðе допуÑкаетÑÑ Ñ€Ð°Ð·Ð¼ÐµÑ‰Ð°Ñ‚ÑŒ иÑполнÑемÑ
# :!~ Restorer
msgid "E332: Separator cannot be part of a menu path"
msgstr ""
-"E332: Ðе допуÑкаетÑÑ ÑƒÐºÐ°Ð·Ñ‹Ð²Ð°Ñ‚ÑŒ разделитель как компонент в цепочке пунктов меню"
+"E332: Ðе допуÑкаетÑÑ ÑƒÐºÐ°Ð·Ñ‹Ð²Ð°Ñ‚ÑŒ разделитель как компонент в цепочке пунктов "
+"меню"
# :!~ Restorer
msgid "E333: Menu path must lead to a menu item"
@@ -7062,8 +7101,8 @@ msgstr "E342: ÐедоÑтаточно памÑти! (выделÑетÑÑ %lu Ð
# :!~ Restorer
#, c-format
msgid ""
-"E343: Invalid path: '**[number]' must be at the end of the path or be followed "
-"by '%s'."
+"E343: Invalid path: '**[number]' must be at the end of the path or be "
+"followed by '%s'."
msgstr ""
"E343: МаÑка вида '**[чиÑло]' указываетÑÑ Ð¿Ð¾Ñледней или поÑле неё должен быть "
"'%s'"
@@ -7112,7 +7151,7 @@ msgstr ""
# :!~ Restorer
msgid "E352: Cannot erase folds with current 'foldmethod'"
msgstr ""
-"E352: Ðе удалоÑÑŒ отменить отображение Ñтруктуры при текущем значении параметра "
+"E352: Ðе удалоÑÑŒ убрать отображение Ñтруктуры при текущем значении параметра "
"'foldmethod'"
# :!~ Restorer
@@ -7148,7 +7187,8 @@ msgstr "E359: УÑтановка режима Ñкрана не поддержи
# :!~ Restorer
msgid "E360: Cannot execute shell with -f option"
msgstr ""
-"E360: Ðе удалоÑÑŒ вызвать командную оболочку. Программа запущена Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð¾Ð¼ -f"
+"E360: Ðе удалоÑÑŒ вызвать командную оболочку. Программа запущена Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð¾Ð¼ -"
+"f"
# :!~ Restorer
msgid "E362: Using a boolean value as a Float"
@@ -7176,7 +7216,7 @@ msgstr "E366: Запрещён переход во вÑплывающее окн
# :!~ Restorer
#, c-format
msgid "E367: No such group: \"%s\""
-msgstr "E367: Ðе ÑущеÑтвует группа автокоманд \"%s\""
+msgstr "E367: Ðе ÑущеÑтвует группы автокоманд \"%s\""
# :!~ Restorer
#, c-format
@@ -7188,6 +7228,7 @@ msgstr "E368: Полученный через функцию libcall() ÑигнÐ
msgid "E369: Invalid item in %s%%[]"
msgstr "E369: ÐедопуÑтимый метаÑимвол в клаÑÑе факультативных Ñлементов %s%%[]"
+# #Restorer: Check! Is error number duble!
# :!~ Restorer
#, c-format
msgid "E370: Could not load library %s: %s"
@@ -7200,12 +7241,12 @@ msgstr "E371: Ðе найден файл командной оболочки"
# :!~ Restorer
#, c-format
msgid "E372: Too many %%%c in format string"
-msgstr "E372: Ð’ форматной Ñтроке превышено количеÑтво %%%c"
+msgstr "E372: Ð’ форматной Ñтроке превышено количеÑтво Ñпецификаторов %%%c"
# :!~ Restorer
#, c-format
msgid "E373: Unexpected %%%c in format string"
-msgstr "E373: Ð’ форматной Ñтроке непредвиденное поÑвление %%%c"
+msgstr "E373: Ð’ форматной Ñтроке непредвиденное поÑвление Ñпецификатора %%%c"
# :!~ Restorer
msgid "E374: Missing ] in format string"
@@ -7214,7 +7255,7 @@ msgstr "E374: Ðе указан Ñимвол закрывающей квадра
# :!~ Restorer
#, c-format
msgid "E375: Unsupported %%%c in format string"
-msgstr "E375: Ð’ форматной Ñтроке не поддерживаетÑÑ Ñлемент %%%c"
+msgstr "E375: Ð’ форматной Ñтроке не поддерживаетÑÑ Ñпецификатор %%%c"
# :!~ Restorer
#, c-format
@@ -7224,7 +7265,7 @@ msgstr "E376: Ð’ форматной Ñтроке недопуÑтимый Ñпе
# :!~ Restorer
#, c-format
msgid "E377: Invalid %%%c in format string"
-msgstr "E377: Ð’ форматной Ñтроке недопуÑтимый Ñлемент %%%c"
+msgstr "E377: Ð’ форматной Ñтроке недопуÑтимый Ñпецификатор %%%c"
# :!~ Restorer
msgid "E378: 'errorformat' contains no pattern"
@@ -7313,7 +7354,7 @@ msgstr "E397: ТребуетÑÑ ÑƒÐºÐ°Ð·Ð°Ñ‚ÑŒ наименование файÐ
# :!~ Restorer
#, c-format
msgid "E398: Missing '=': %s"
-msgstr "E398: Ðе указан знак равенÑтва у параметров команды :syntax region %s"
+msgstr "E398: Ðе указан знак равенÑтва в параметрах команды :syntax region %s"
# :!~ Restorer
#, c-format
@@ -7381,8 +7422,7 @@ msgstr "E411: Ðе найдена группу подÑветки %s"
# :!~ Restorer
#, c-format
msgid "E412: Not enough arguments: \":highlight link %s\""
-msgstr ""
-"E412: Указаны не вÑе требуемые параметры в команде `:highlight link %s`"
+msgstr "E412: Указаны не вÑе требуемые параметры в команде `:highlight link %s`"
# :!~ Restorer
#, c-format
@@ -7595,7 +7635,8 @@ msgstr ""
# :!~ Restorer
msgid "E459: Cannot go back to previous directory"
-msgstr "E459: У программы Vim отÑутÑтвуют права на иÑполнение в текущем каталоге"
+msgstr ""
+"E459: У программы Vim отÑутÑтвуют права на иÑполнение в текущем каталоге"
# :!~ Restorer
msgid "E460: Entries missing in mapset() dict argument"
@@ -7620,12 +7661,12 @@ msgstr ""
# #Restorer: поÑле ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð´Ð¾Ð¿Ð¸ÑываетÑÑ Ñимвол : и Ð¾ÑˆÐ¸Ð±Ð¾Ñ‡Ð½Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð°
# :!~ Restorer
msgid "E464: Ambiguous use of user-defined command"
-msgstr "E464: ÐераÑпознана ÑÐ¾Ð·Ð´Ð°Ð½Ð½Ð°Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÐµÐ¼ команда"
+msgstr "E464: Ðе раÑпознана ÑÐ¾Ð·Ð´Ð°Ð½Ð½Ð°Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÐµÐ¼ команда"
# :!~ Restorer
#, c-format
msgid "E464: Ambiguous use of user-defined command: %s"
-msgstr "E464: ÐераÑпознана ÑÐ¾Ð·Ð´Ð°Ð½Ð½Ð°Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÐµÐ¼ команда %s"
+msgstr "E464: Ðе раÑпознана ÑÐ¾Ð·Ð´Ð°Ð½Ð½Ð°Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÐµÐ¼ команда %s"
# :!~ Restorer
msgid "E465: :winsize requires two number arguments"
@@ -7844,8 +7885,7 @@ msgstr "E503: Кофе ещё не готов"
# #Restorer: ошибка E504:
# :!~ Restorer
msgid "is read-only (cannot override: \"W\" in 'cpoptions')"
-msgstr ""
-"файл только Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ (чтобы запиÑать, уберите флаг \"W\" в 'cpoptions')"
+msgstr "файл только Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ (чтобы запиÑать, уберите флаг 'W' в 'cpoptions')"
# #Restorer: ошибка E505:
# :!~ Restorer
@@ -7867,23 +7907,26 @@ msgstr ""
# :!~ Restorer
msgid "E507: Close error for backup file (add ! to write anyway)"
msgstr ""
-"E507: Ðе удалоÑÑŒ закрыть резервный файл (чтобы запиÑать, укажите модификатор !)"
+"E507: Ðе удалоÑÑŒ закрыть резервный файл (чтобы запиÑать, укажите "
+"модификатор !)"
# :!~ Restorer
msgid "E508: Can't read file for backup (add ! to write anyway)"
msgstr ""
-"E508: Ðе удалоÑÑŒ Ñчитать резервный файл (чтобы запиÑать, укажите модификатор !)"
+"E508: Ðе удалоÑÑŒ Ñчитать резервный файл (чтобы запиÑать, укажите "
+"модификатор !)"
# :!~ Restorer
msgid "E509: Cannot create backup file (add ! to override)"
msgstr ""
-"E509: Ðе удалоÑÑŒ Ñоздать резервный файл (чтобы игнорировать, укажите "
+"E509: Ðе удалоÑÑŒ Ñоздать резервный файл (чтобы запиÑать, укажите "
"модификатор !)"
# :!~ Restorer
msgid "E510: Can't make backup file (add ! to write anyway)"
msgstr ""
-"E510: Ðе удалоÑÑŒ Ñоздать резервный файл (чтобы запиÑать, укажите модификатор !)"
+"E510: Ðе удалоÑÑŒ подготовить резервный файл (чтобы запиÑать, укажите "
+"модификатор !)"
# :!~ Restorer
msgid "E511: NetBeans already connected"
@@ -7896,7 +7939,7 @@ msgstr "E512: Ошибка Ð·Ð°ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð° поÑле операци
# :!~ Restorer
msgid "E513: Write error, conversion failed (make 'fenc' empty to override)"
msgstr ""
-"E513: Ошибка запиÑи. Сбой при изменении кодировки текÑта (чтобы игнорировать, "
+"E513: Ошибка запиÑи при изменении кодировки текÑта (чтобы игнорировать, "
"ÑброÑьте параметр 'fenc')"
# :!~ Restorer
@@ -7905,7 +7948,7 @@ msgid ""
"E513: Write error, conversion failed in line %ld (make 'fenc' empty to "
"override)"
msgstr ""
-"E513: Ошибка запиÑи. Сбой при изменении кодировки текÑта в Ñтроке %ld (чтобы "
+"E513: Ошибка запиÑи при изменении кодировки текÑта в Ñтроке %ld (чтобы "
"игнорировать, ÑброÑьте параметр 'fenc')"
# :!~ Restorer
@@ -8195,15 +8238,15 @@ msgstr "E579: Превышено количеÑтво вложений блокÐ
# :!~ Restorer
msgid "E580: :endif without :if"
-msgstr "E580: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :endif нет ÑоответÑтвующей команды :if"
+msgstr "E580: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :endif отÑутÑтвует Ð¿Ð°Ñ€Ð½Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :if"
# :!~ Restorer
msgid "E581: :else without :if"
-msgstr "E581: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :else нет ÑоответÑтвующей команда :if"
+msgstr "E581: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :else отÑутÑтвует Ð¿Ð°Ñ€Ð½Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð° :if"
# :!~ Restorer
msgid "E582: :elseif without :if"
-msgstr "E582: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :elseif нет ÑоответÑтвующей команды :if"
+msgstr "E582: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :elseif отÑутÑтвует Ð¿Ð°Ñ€Ð½Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð° :if"
# :!~ Restorer
msgid "E583: Multiple :else"
@@ -8227,11 +8270,11 @@ msgstr "E587: Команда :break указана вне цикла :while ил
# :!~ Restorer
msgid "E588: :endwhile without :while"
-msgstr "E588: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :endwhile нет команды :while"
+msgstr "E588: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :endwhile отÑутÑтвует Ð¿Ð°Ñ€Ð½Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð° :while"
# :!~ Restorer
msgid "E588: :endfor without :for"
-msgstr "E588: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :endfor нет команды :for"
+msgstr "E588: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :endfor отÑутÑтвует Ð¿Ð°Ñ€Ð½Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð° :for"
# :!~ Restorer
msgid "E589: 'backupext' and 'patchmode' are equal"
@@ -8256,7 +8299,7 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "E593: Need at least %d lines"
-msgstr "E593: Минимальное значение количеÑтва Ñтрок %d"
+msgstr "E593: Минимально возможное количеÑтво Ñтрок %d"
# :!~ Restorer
#, c-format
@@ -8286,7 +8329,7 @@ msgstr "E599: ÐедопуÑтимое значение параметра 'imac
# :!~ Restorer
msgid "E600: Missing :endtry"
-msgstr "E600: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :try не указана команда :endtry"
+msgstr "E600: Ðе указана команда :endtry"
# :!~ Restorer
msgid "E601: :try nesting too deep"
@@ -8294,11 +8337,11 @@ msgstr "E601: Превышено количеÑтво вложений комаÐ
# :!~ Restorer
msgid "E602: :endtry without :try"
-msgstr "E602: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :endtry нет ÑоответÑтвующей команды :try"
+msgstr "E602: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :endtry отÑутÑтвует Ð¿Ð°Ñ€Ð½Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð° :try"
# :!~ Restorer
msgid "E603: :catch without :try"
-msgstr "E603: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :catch не указана команда :try"
+msgstr "E603: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :catch отÑутÑтвует Ð¿Ð°Ñ€Ð½Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð° :try"
# :!~ Restorer
msgid "E604: :catch after :finally"
@@ -8311,7 +8354,7 @@ msgstr "E605: Ðе Ð¾Ð±Ñ€Ð°Ð±Ð¾Ñ‚Ð°Ð½Ð½Ð°Ñ Ð¸ÑÐºÐ»ÑŽÑ‡Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ ÑитÑ
# :!~ Restorer
msgid "E606: :finally without :try"
-msgstr "E606: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :finally не указана команда :try"
+msgstr "E606: Ð”Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :finally отÑутÑтвует Ð¿Ð°Ñ€Ð½Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð° :try"
# :!~ Restorer
msgid "E607: Multiple :finally"
@@ -8372,8 +8415,7 @@ msgstr "E619: Файл не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым файлом Ð
# :!~ Restorer
#, c-format
msgid "E620: Unable to convert to print encoding \"%s\""
-msgstr ""
-"E620: При выводе на печать не удалоÑÑŒ выполнить изменение кодировки на \"%s\""
+msgstr "E620: При выводе на печать не удалоÑÑŒ преобразовать в кодировку \"%s\""
# :!~ Restorer
#, c-format
@@ -8411,7 +8453,7 @@ msgstr "E627: ОтÑутÑтвует Ñимвол двоеточие в кома
#, c-format
msgid "E628: Missing ! or / in: %s"
-msgstr "E628: ОтÑутÑтвует Ñимвол ! или / в команде %s"
+msgstr "E628: ОтÑутÑтвует Ñимвол '!' или '/' в команде %s"
# :!~ Restorer
#, c-format
@@ -8575,7 +8617,7 @@ msgstr ""
# :!~ Restorer
msgid "E669: Unprintable character in group name"
-msgstr "E669: Ðе печатаемый Ñимвол в наименовании группы"
+msgstr "E669: Ðепечатаемый Ñимвол в наименовании группы"
# :!~ Restorer
#, c-format
@@ -8591,7 +8633,8 @@ msgstr "E671: Ðе найдено окно Ñ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÐ¾Ð¼ \"%s\""
# :!~ Restorer
msgid "E672: Unable to open window inside MDI application"
msgstr ""
-"E672: Ðе удалоÑÑŒ открыть окно редактора Vim в другой многодокументной программе"
+"E672: Ðе удалоÑÑŒ открыть окно редактора Vim в другой многодокументной "
+"программе"
# :!~ Restorer
msgid "E673: Incompatible multi-byte encoding and character set"
@@ -8600,7 +8643,8 @@ msgstr "E673: ÐеÑоответÑтвие между многобайтовой
# :!~ Restorer
msgid "E674: printmbcharset cannot be empty with multi-byte encoding."
msgstr ""
-"E674: Ðе задано значение параметра 'printmbcharset' Ð´Ð»Ñ Ð¼Ð½Ð¾Ð³Ð¾Ð±Ð°Ð¹Ñ‚Ð¾Ð²Ð¾Ð¹ кодировки"
+"E674: Ðе задано значение параметра 'printmbcharset' Ð´Ð»Ñ Ð¼Ð½Ð¾Ð³Ð¾Ð±Ð°Ð¹Ñ‚Ð¾Ð²Ð¾Ð¹ "
+"кодировки"
# :!~ Restorer
msgid "E675: No default font specified for multi-byte printing."
@@ -8709,7 +8753,7 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "E697: Missing end of List ']': %s"
-msgstr "E697: Ðе указана Ð·Ð°ÐºÑ€Ñ‹Ð²Ð°ÑŽÑ‰Ð°Ñ ÐºÐ²Ð°Ð´Ñ€Ð°Ñ‚Ð½Ð°Ñ Ñкобка в данных типа List %s"
+msgstr "E697: Ðе указана Ð·Ð°ÐºÑ€Ñ‹Ð²Ð°ÑŽÑ‰Ð°Ñ ÐºÐ²Ð°Ð´Ñ€Ð°Ñ‚Ð½Ð°Ñ Ñкобка в данных тип List %s"
# :!~ Restorer
msgid "E698: Variable nested too deep for making a copy"
@@ -8750,7 +8794,8 @@ msgstr "E705: ÐÐ°Ð¸Ð¼ÐµÐ½Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð¾Ð¹ и функции Ñ
# :!~ Restorer
#, c-format
msgid "E706: Argument of %s must be a List, String or Dictionary"
-msgstr "E706: В функции %s тип аргумента должен быть List, String или Dictionary"
+msgstr ""
+"E706: В функции %s тип аргумента должен быть List, String или Dictionary"
# :!~ Restorer
#, c-format
@@ -8829,7 +8874,7 @@ msgstr ""
#, c-format
msgid "E723: Missing end of Dictionary '}': %s"
msgstr ""
-"E723: Ð”Ð»Ñ Ñ‚Ð¸Ð¿Ð° данных Dictionary не указана Ð·Ð°ÐºÑ€Ñ‹Ð²Ð°ÑŽÑ‰Ð°Ñ Ñ„Ð¸Ð³ÑƒÑ€Ð½Ð°Ñ Ñкобка %s"
+"E723: Ð’ типе данных Dictionary не указана Ð·Ð°ÐºÑ€Ñ‹Ð²Ð°ÑŽÑ‰Ð°Ñ Ñ„Ð¸Ð³ÑƒÑ€Ð½Ð°Ñ Ñкобка %s"
# :!~ Restorer
msgid "E724: Variable nested too deep for displaying"
@@ -8933,7 +8978,8 @@ msgstr ""
# :!~ Restorer
msgid "E744: NetBeans does not allow changes in read-only files"
msgstr ""
-"E744: Ð’ ИСР NetBeans не допуÑкаетÑÑ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ðµ файлов открытых только Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ"
+"E744: Ð’ ИСР NetBeans не допуÑкаетÑÑ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ðµ файлов открытых только Ð´Ð»Ñ "
+"чтениÑ"
# :!~ Restorer
msgid "E745: Using a List as a Number"
@@ -8972,7 +9018,8 @@ msgstr ""
# :!~ Restorer
msgid "E752: No previous spell replacement"
msgstr ""
-"E752: Ð’ текущем ÑеанÑе работы подобное иÑправление напиÑÐ°Ð½Ð¸Ñ ÐµÑ‰Ñ‘ не выполнÑлаÑÑŒ"
+"E752: Ð’ текущем ÑеанÑе работы подобное иÑправление напиÑÐ°Ð½Ð¸Ñ ÐµÑ‰Ñ‘ не "
+"выполнÑлаÑÑŒ"
# :!~ Restorer
#, c-format
@@ -8999,7 +9046,8 @@ msgstr "E757: Ðекорректный заголовок в данном фай
# :!~ Restorer
msgid "E758: Truncated spell file"
-msgstr "E758: Размер файла не ÑоответÑтвует требуемому. Возможно, файл повреждён"
+msgstr ""
+"E758: Размер файла не ÑоответÑтвует требуемому. Возможно, файл повреждён"
# :!~ Restorer
msgid "E759: Format error in spell file"
@@ -9031,15 +9079,16 @@ msgstr "E764: Ðе задано значение параметра '%s'"
#, c-format
msgid "E765: 'spellfile' does not have %d entries"
msgstr ""
-"E765: Ð’ ÑпиÑке значений параметра 'spellfile' отÑутÑтвует запиÑÑŒ под номером %d"
+"E765: Ð’ ÑпиÑке значений параметра 'spellfile' отÑутÑтвует запиÑÑŒ под номером "
+"%d"
# :!~ Restorer
msgid "E766: Insufficient arguments for printf()"
-msgstr "E766: Ð’ функции printf() недоÑтаточное количеÑтво аргументов"
+msgstr "E766: ÐедоÑтаточное количеÑтво аргументов в функции printf()"
# :!~ Restorer
msgid "E767: Too many arguments for printf()"
-msgstr "E767: Ð’ функции printf() превышено количеÑтво аргументов"
+msgstr "E767: Превышено количеÑтво аргументов в функции printf()"
# :!~ Restorer
#, c-format
@@ -9121,7 +9170,8 @@ msgstr "E783: Обнаружен повтор Ñимвола в правиле M
# :!~ Restorer
msgid "E784: Cannot close last tab page"
msgstr ""
-"E784: Команда не выполнена. Ð”Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ программы требуетÑÑ Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ одна вкладка"
+"E784: Команда не выполнена. Ð”Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ программы требуетÑÑ Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ одна "
+"вкладка"
# :!~ Restorer
msgid "E785: complete() can only be used in Insert mode"
@@ -9153,7 +9203,8 @@ msgstr "E790: Запрещено применение команды :undojoin Ð
# :!~ Restorer
msgid "E791: Empty keymap entry"
msgstr ""
-"E791: Ð’ файле Ñ Ñ€Ð°Ñкладкой клавиатуры отÑутÑтвует запиÑÑŒ Ð¿Ñ€ÐµÐ¾Ð±Ñ€Ð°Ð·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñимвола"
+"E791: Ð’ файле Ñ Ñ€Ð°Ñкладкой клавиатуры отÑутÑтвует запиÑÑŒ Ð¿Ñ€ÐµÐ¾Ð±Ñ€Ð°Ð·Ð¾Ð²Ð°Ð½Ð¸Ñ "
+"Ñимвола"
# :!~ Restorer
msgid "E792: Empty menu name"
@@ -9222,7 +9273,7 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "E803: ID not found: %d"
-msgstr "E803: Ðе найден идентификационный номер %d"
+msgstr "E803: Ðе удалоÑÑŒ найти идентификационный номер %d"
# :!~ Restorer
#, no-c-format
@@ -9261,7 +9312,8 @@ msgstr ""
# :!~ Restorer
msgid "E812: Autocommands changed buffer or buffer name"
msgstr ""
-"E812: ДейÑÑ‚Ð²Ð¸Ñ Ð°Ð²Ñ‚Ð¾ÐºÐ¾Ð¼Ð°Ð½Ð´ вызвали изменение Ñодержимого или Ð½Ð°Ð¸Ð¼ÐµÐ½Ð¾Ð²Ð°Ð½Ð¸Ñ Ð±ÑƒÑ„ÐµÑ€Ð°"
+"E812: ДейÑÑ‚Ð²Ð¸Ñ Ð°Ð²Ñ‚Ð¾ÐºÐ¾Ð¼Ð°Ð½Ð´ вызвали изменение Ñодержимого или Ð½Ð°Ð¸Ð¼ÐµÐ½Ð¾Ð²Ð°Ð½Ð¸Ñ "
+"буфера"
# :!~ Restorer
msgid "E813: Cannot close autocmd or popup window"
@@ -9336,8 +9388,7 @@ msgstr "E826: Ошибка при раÑшифровке файла измене
# :!~ Restorer
#, c-format
msgid "E827: Undo file is encrypted: %s"
-msgstr ""
-"E827: Ðе поддерживаемый данной программой Vim шифрованный файл изменений %s"
+msgstr "E827: Ð’ данной верÑии не поддерживаетÑÑ ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð½Ñ‹Ð¹ файл изменений %s"
# :!~ Restorer
#, c-format
@@ -9361,10 +9412,11 @@ msgstr "E832: Редактируемый файл не шифрован, но ш
# :!~ Restorer
#, c-format
-msgid "E833: %s is encrypted and this version of Vim does not support encryption"
+msgid ""
+"E833: %s is encrypted and this version of Vim does not support encryption"
msgstr ""
-"E833: Ð”Ð°Ð½Ð½Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¼Ñ‹ не поддерживает шифрование и обнаружен "
-"шифрованный файл %s"
+"E833: Ð’ данной верÑии не поддерживаетÑÑ ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¸Ðµ и обнаружен шифрованный "
+"файл %s"
# :!~ Restorer
msgid "E834: Conflicts with value of 'listchars'"
@@ -9376,15 +9428,11 @@ msgstr "E835: Конфликт значений параметров 'ambiwidth'
# :!~ Restorer
msgid "E836: This Vim cannot execute :python after using :py3"
-msgstr ""
-"E836: Ð’ данной верÑии программы запрещён вызов команды :python поÑле команды :"
-"py3"
+msgstr "E836: Ð’ данной верÑии запрещён вызов команды :python поÑле команды :py3"
# :!~ Restorer
msgid "E837: This Vim cannot execute :py3 after using :python"
-msgstr ""
-"E837: Ð’ данной верÑии программы запрещён вызов команды :py3 поÑле команды :"
-"python"
+msgstr "E837: Ð’ данной верÑии запрещён вызов команды :py3 поÑле команды :python"
# :!~ Restorer
msgid "E838: NetBeans is not supported with this GUI"
@@ -9426,7 +9474,8 @@ msgstr "E846: Ðе указан код клавиши Ð´Ð»Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°"
# :!~ Restorer
msgid "E847: Too many syntax includes"
msgstr ""
-"E847: Превышено количеÑтво подключаемых файлов Ñ Ð¿Ñ€Ð°Ð²Ð¸Ð»Ð°Ð¼Ð¸ подÑветки ÑинтакÑиÑа"
+"E847: Превышено количеÑтво подключаемых файлов Ñ Ð¿Ñ€Ð°Ð²Ð¸Ð»Ð°Ð¼Ð¸ подÑветки "
+"ÑинтакÑиÑа"
# :!~ Restorer
msgid "E848: Too many syntax clusters"
@@ -9492,12 +9541,14 @@ msgstr ""
# :!~ Restorer
msgid "E860: Need 'id' and 'type' or 'types' with 'both'"
msgstr ""
-"E860: ЕÑли задан ключ 'both', укажите значение ключей 'id' и 'type' или 'types'"
+"E860: ЕÑли задан ключ \"both\", укажите значение ключей \"id\" и \"type\" или "
+"\"types\""
# :!~ Restorer
msgid "E861: Cannot open a second popup with a terminal"
msgstr ""
-"E861: Ðе допуÑкаетÑÑ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¸Ðµ ещё одного вÑплывающего окна Ñодержащего терминал"
+"E861: Ðе допуÑкаетÑÑ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¸Ðµ ещё одного вÑплывающего окна Ñодержащего "
+"терминал"
# :!~ Restorer
msgid "E862: Cannot use g: here"
@@ -9514,8 +9565,8 @@ msgid ""
"E864: \\%#= can only be followed by 0, 1, or 2. The automatic engine will be "
"used"
msgstr ""
-"E864: Ð”Ð»Ñ Ð¼ÐµÑ‚Ð°Ñимвола \\%#= допуÑтимы 0, 1 или 2. Механизм поиÑка назначаетÑÑ "
-"автоматичеÑки"
+"E864: Ð”Ð»Ñ Ð¼ÐµÑ‚Ð°Ñимвола \\%#= допуÑтимы 0, 1 или 2. Механизм поиÑка был "
+"назначен автоматичеÑки"
# :!~ Restorer
msgid "E865: (NFA) Regexp end encountered prematurely"
@@ -9605,7 +9656,8 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "E884: Function name cannot contain a colon: %s"
-msgstr "E884: Ðе допуÑкаетÑÑ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ðµ Ñимвол Ð´Ð²Ð¾ÐµÑ‚Ð¾Ñ‡Ð¸Ñ Ð² наименовании функции %s"
+msgstr ""
+"E884: Ðе допуÑкаетÑÑ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ðµ Ñимвола двоеточие в наименовании функции %s"
# :!~ Restorer
#, c-format
@@ -9621,7 +9673,8 @@ msgstr "E886: Ðе удалоÑÑŒ переименовать viminfo-файл в
msgid ""
"E887: Sorry, this command is disabled, the Python's site module could not be "
"loaded."
-msgstr "E887: Ðе подключен модуль site.py Ð´Ð»Ñ Ñзыка Python. Команда не выполнена"
+msgstr ""
+"E887: Ðе подключен модуль site.py Ð´Ð»Ñ Ñзыка Python. Команда не выполнена"
# :!~ Restorer
#, c-format
@@ -9655,8 +9708,8 @@ msgstr "E894: ОжидалÑÑ Ñ‚Ð¸Ð¿ данных Float, а получен Dict
# :!~ Restorer
msgid ""
-"E895: Sorry, this command is disabled, the MzScheme's racket/base module could "
-"not be loaded."
+"E895: Sorry, this command is disabled, the MzScheme's racket/base module "
+"could not be loaded."
msgstr ""
"E895: Ðе подключен модуль racket/base Ð´Ð»Ñ Ñзыка MzScheme. Команда не выполнена"
@@ -9749,7 +9802,8 @@ msgstr "E911: ОжидалÑÑ Ñ‚Ð¸Ð¿ данных Float, а получен Job"
# :!~ Restorer
msgid "E912: Cannot use ch_evalexpr()/ch_sendexpr() with a raw or nl channel"
msgstr ""
-"E912: Функции ch_evalexpr() и ch_sendexpr() неприменимы к Ñоединению RAW или NL"
+"E912: Функции ch_evalexpr() и ch_sendexpr() неприменимы к Ñоединению RAW или "
+"NL"
# :!~ Restorer
msgid "E913: Using a Channel as a Number"
@@ -9993,7 +10047,8 @@ msgstr "E966: ÐедопуÑтимый номер Ñтроки %ld"
# :!~ Restorer
msgid "E968: Need at least one of 'id' or 'type'"
-msgstr "E968: ТребуетÑÑ ÑƒÐºÐ°Ð·Ð°Ñ‚ÑŒ значение ключа 'id' или значение ключа 'type'"
+msgstr ""
+"E968: ТребуетÑÑ ÑƒÐºÐ°Ð·Ð°Ñ‚ÑŒ значение ключа \"id\" или значение ключа \"type\""
# :!~ Restorer
#, c-format
@@ -10018,8 +10073,8 @@ msgstr ""
# :!~ Restorer
msgid "E973: Blob literal should have an even number of hex characters"
msgstr ""
-"E973: Данные Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ BLOB должны Ñодержать чётное количеÑтво шеÑтнадцатеричных "
-"цифр"
+"E973: Данные Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ BLOB должны Ñодержать чётное количеÑтво "
+"шеÑтнадцатеричных цифр"
# :!~ Restorer
msgid "E974: Using a Blob as a Number"
@@ -10075,7 +10130,8 @@ msgstr ""
# :!~ Restorer
msgid "E986: Cannot modify the tag stack within tagfunc"
msgstr ""
-"E986: Ðе допуÑкаетÑÑ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ðµ Ñтека индекÑов через функцию параметра 'tagfunc'"
+"E986: Ðе допуÑкаетÑÑ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ðµ Ñтека индекÑов через функцию параметра "
+"'tagfunc'"
# :!~ Restorer
msgid "E987: Invalid return value from tagfunc"
@@ -10090,7 +10146,8 @@ msgstr ""
# :!~ Restorer
msgid "E989: Non-default argument follows default argument"
msgstr ""
-"E989: ОбÑзательные аргументы должны указыватьÑÑ Ð¿ÐµÑ€ÐµÐ´ необÑзательным аргументом"
+"E989: ОбÑзательные аргументы должны указыватьÑÑ Ð¿ÐµÑ€ÐµÐ´ необÑзательным "
+"аргументом"
# :!~ Restorer
#, c-format
@@ -10099,7 +10156,7 @@ msgstr "E990: Ðе указан завершающий маркер '%s'"
# :!~ Restorer
msgid "E991: Cannot use =<< here"
-msgstr "E991: Оператор =<< не может быть применён"
+msgstr "E991: Оператор `=<<` не может быть применён"
# :!~ Restorer
msgid "E992: Not allowed in a modeline when 'modelineexpr' is off"
@@ -10122,28 +10179,34 @@ msgstr "E995: Ðе допуÑкаетÑÑ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ðµ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ñ
# :!~ Restorer
msgid "E996: Cannot lock a range"
-msgstr "E996: Ðе допуÑкаетÑÑ Ð±Ð»Ð¾ÐºÐ¸Ñ€Ð¾Ð²ÐºÐ° Ð´Ð»Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ð¹ диапазона"
+msgstr ""
+"E996: Ð”Ð»Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ð¹ диапазона не может быть изменено ÑоÑтоÑние блокировки"
# :!~ Restorer
msgid "E996: Cannot lock an option"
-msgstr "E996: Ðе допуÑкаетÑÑ Ð±Ð»Ð¾ÐºÐ¸Ñ€Ð¾Ð²ÐºÐ° Ð´Ð»Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ð¹ параметров"
+msgstr ""
+"E996: Ð”Ð»Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ð¹ параметров не может быть изменено ÑоÑтоÑние блокировки"
# :!~ Restorer
msgid "E996: Cannot lock a list or dict"
-msgstr "E996: Ðе допуÑкаетÑÑ Ð±Ð»Ð¾ÐºÐ¸Ñ€Ð¾Ð²ÐºÐ° Ð´Ð»Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ð¹ ÑпиÑка или ÑловарÑ"
+msgstr ""
+"E996: Ð”Ð»Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ð¹ ÑпиÑка или ÑÐ»Ð¾Ð²Ð°Ñ€Ñ Ð½Ðµ может быть изменено ÑоÑтоÑние "
+"блокировки"
# :!~ Restorer
msgid "E996: Cannot lock an environment variable"
-msgstr "E996: Ðе допуÑкаетÑÑ Ð±Ð»Ð¾ÐºÐ¸Ñ€Ð¾Ð²ÐºÐ° Ð´Ð»Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ð¹ переменных окружениÑ"
+msgstr ""
+"E996: Ð”Ð»Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ð¹ переменных Ð¾ÐºÑ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð½Ðµ может быть изменено ÑоÑтоÑние "
+"блокировки"
# :!~ Restorer
msgid "E996: Cannot lock a register"
-msgstr "E996: Ðе допуÑкаетÑÑ Ð±Ð»Ð¾ÐºÐ¸Ñ€Ð¾Ð²ÐºÐ° Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ… региÑтра"
+msgstr "E996: Ð”Ð»Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ… региÑтра не может быть изменено ÑоÑтоÑние блокировки"
# :!~ Restorer
#, c-format
msgid "E997: Tabpage not found: %d"
-msgstr "E997: Ðе найдена вкладка под номером %d"
+msgstr "E997: Ðе удалоÑÑŒ найти вкладку под номером %d"
# :!~ Restorer
#, c-format
@@ -10158,7 +10221,7 @@ msgstr "E999: Ð’ программе не поддерживаетÑÑ Ð¾Ð±Ñ€Ð°Ð±
# :!~ Restorer
#, c-format
msgid "E1001: Variable not found: %s"
-msgstr "E1001: Ðе найдена Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ %s"
+msgstr "E1001: Ðе удалоÑÑŒ найти переменную %s"
# :!~ Restorer
#, c-format
@@ -10186,7 +10249,8 @@ msgstr "E1006: ÐŸÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ %s иÑпользуетÑÑ ÐºÐ°Ðº аргуÐ
# :!~ Restorer
msgid "E1007: Mandatory argument after optional argument"
msgstr ""
-"E1007: ОбÑзательные аргументы указыватьÑÑ Ð¿ÐµÑ€ÐµÐ´ необÑзательным аргументом"
+"E1007: ОбÑзательные аргументы должны указыватьÑÑ Ð¿ÐµÑ€ÐµÐ´ необÑзательным "
+"аргументом"
# :!~ Restorer
#, c-format
@@ -10339,7 +10403,7 @@ msgstr "E1035: Ð”Ð»Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¸ деление Ñ Ð¾Ñтатком тип
#, c-format
msgid "E1036: %c requires number or float arguments"
msgstr ""
-"E1036: ТребуетÑÑ Ñ‚Ð¸Ð¿ операндов Number или Float Ð´Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¸ %c"
+"E1036: Тип операндов должен быть Number или Float Ð´Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¸ %c"
# :!~ Restorer
#, c-format
@@ -10352,12 +10416,14 @@ msgstr "E1038: Команда :vim9script должна указыватьÑÑ Ñ‚
# :!~ Restorer
msgid "E1039: \"vim9script\" must be the first command in a script"
-msgstr "E1039: Команда :vim9script указываетÑÑ Ð¿ÐµÑ€Ð²Ð¾Ð¹ командой в командном файле"
+msgstr ""
+"E1039: Команда :vim9script указываетÑÑ Ð¿ÐµÑ€Ð²Ð¾Ð¹ командой в командном файле"
# :!~ Restorer
msgid "E1040: Cannot use :scriptversion after :vim9script"
msgstr ""
-"E1040: Ðе допуÑкаетÑÑ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ðµ команды :scriptversion поÑле команды :vim9script"
+"E1040: Ðе допуÑкаетÑÑ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ðµ команды :scriptversion поÑле команды :"
+"vim9script"
# :!~ Restorer
#, c-format
@@ -10366,7 +10432,8 @@ msgstr "E1041: Переопределение компонента командÐ
# :!~ Restorer
msgid "E1042: Export can only be used in vim9script"
-msgstr "E1042: Команда :export должна указыватьÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ в командных файлах Vim9"
+msgstr ""
+"E1042: Команда :export должна указыватьÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ в командных файлах Vim9"
# :!~ Restorer
msgid "E1043: Invalid command after :export"
@@ -10394,7 +10461,7 @@ msgstr "E1049: Компонент не ÑвлÑетÑÑ ÑкÑпортируем
# :!~ Restorer
#, c-format
msgid "E1050: Colon required before a range: %s"
-msgstr "E1050: ТребуетÑÑ Ñимвол Ð´Ð²Ð¾ÐµÑ‚Ð¾Ñ‡Ð¸Ñ Ð¿ÐµÑ€ÐµÐ´ значением диапазона %s"
+msgstr "E1050: ТребуетÑÑ Ñимвол двоеточие перед значением диапазона %s"
# :!~ Restorer
msgid "E1051: Wrong argument type for +"
@@ -10427,7 +10494,7 @@ msgstr "E1056: ОжидалÑÑ Ñ‚Ð¸Ð¿ данных %s"
# :!~ Restorer
msgid "E1057: Missing :enddef"
-msgstr "E1057: Ðе указана команда :enddef Ð´Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :def"
+msgstr "E1057: Ðе указана команда :enddef"
# :!~ Restorer
msgid "E1058: Function nesting too deep"
@@ -10436,7 +10503,7 @@ msgstr "E1058: Превышено количеÑтво вложенных фун
# :!~ Restorer
#, c-format
msgid "E1059: No white space allowed before colon: %s"
-msgstr "E1059: Запрещён пробельный Ñимвол перед Ñимволом Ð´Ð²Ð¾ÐµÑ‚Ð¾Ñ‡Ð¸Ñ Ð² %s"
+msgstr "E1059: Запрещён пробельный Ñимвол перед Ñимволом двоеточие в %s"
# :!~ Restorer
#, c-format
@@ -10446,7 +10513,7 @@ msgstr "E1060: Ð’ команде :import отÑутÑтвует Ñимвол Ñ‚Ð
# :!~ Restorer
#, c-format
msgid "E1061: Cannot find function %s"
-msgstr "E1061: Ðе найдена Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ %s"
+msgstr "E1061: Ðе удалоÑÑŒ найти функцию %s"
# :!~ Restorer
msgid "E1062: Cannot index a Number"
@@ -10623,7 +10690,7 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid "E1102: Lambda function not found: %s"
-msgstr "E1102: Ðе найдена лÑмбда-Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ %s"
+msgstr "E1102: Ðе удалоÑÑŒ найти лÑбда-функцию %s"
# :!~ Restorer
msgid "E1103: Dictionary not set"
@@ -10642,7 +10709,7 @@ msgstr "E1105: Ðе допуÑкаетÑÑ Ð¿Ñ€ÐµÐ¾Ð±Ñ€Ð°Ð·Ð¾Ð²Ð°Ð½Ð¸Ðµ к ÑÑ‚Ñ
#, c-format
msgid "E1106: One argument too many"
msgid_plural "E1106: %d arguments too many"
-msgstr[0] "E1106: В функцию передано на один аргумент больше"
+msgstr[0] "E1106: В функцию передано на %d аргумент больше"
msgstr[1] "E1106: В функцию передано на %d аргумента больше"
msgstr[2] "E1106: В функцию передано на %d аргументов больше"
@@ -10729,7 +10796,7 @@ msgstr "E1124: Команда \"%s\" допуÑкаетÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ в ко
# :!~ Restorer
msgid "E1125: Final requires a value"
-msgstr "E1125: ТребуетÑÑ ÑƒÐºÐ°Ð·Ð°Ñ‚ÑŒ значение Ð´Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ :final"
+msgstr "E1125: ТребуетÑÑ Ð·Ð°Ð´Ð°Ñ‚ÑŒ значение Ð´Ð»Ñ Ñ„Ð¸Ð½Ð°Ð»Ð¸Ð·Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð½Ð¾Ð¹ переменной"
# :!~ Restorer
msgid "E1126: Cannot use :let in Vim9 script"
@@ -10780,8 +10847,7 @@ msgstr "E1135: ОжидалоÑÑŒ логичеÑкое значение, а по
# :!~ Restorer
msgid "E1136: <Cmd> mapping must end with <CR> before second <Cmd>"
msgstr ""
-"E1136: ÐÐ°Ð·Ð½Ð°Ñ‡Ð°ÐµÐ¼Ð°Ñ Ñ‡ÐµÑ€ÐµÐ· <Cmd> команда не завершаетÑÑ <CR> перед Ñледующей "
-"<Cmd>"
+"E1136: ÐÐ°Ð·Ð½Ð°Ñ‡Ð°ÐµÐ¼Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð° <Cmd> должна завершаетÑÑ <CR> перед Ñледующей <Cmd>"
# :!~ Restorer
msgid "E1138: Using a Bool as a Number"
@@ -10862,7 +10928,7 @@ msgstr "E1154: Обнаружена попытка Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ð½Ð° ноль"
# :!~ Restorer
msgid "E1155: Cannot define autocommands for ALL events"
-msgstr "E1155: Ðе допуÑкаетÑÑ Ð¾Ð´Ð½Ð¾Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ð¾ задавать автокоманды Ð´Ð»Ñ Ð²Ñех Ñобытий"
+msgstr "E1155: Ðе допуÑкаетÑÑ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ðµ автокоманд Ñразу Ð´Ð»Ñ Ð²Ñех Ñобытий"
# :!~ Restorer
msgid "E1156: Cannot change the argument list recursively"
@@ -10907,8 +10973,8 @@ msgstr ""
#, c-format
msgid "E1163: Variable %d: type mismatch, expected %s but got %s in %s"
msgstr ""
-"E1163: ÐеÑоответÑтвующий тип данных переменной %d. ОжидалÑÑ %s, а получен %s в "
-"%s"
+"E1163: ÐеÑоответÑтвующий тип данных переменной %d. ОжидалÑÑ %s, а получен %s "
+"в %s"
# :!~ Restorer
msgid "E1164: vim9cmd must be followed by a command"
@@ -10936,7 +11002,7 @@ msgstr "E1168: Этот аргумент уже объÑвлен в команд
# :!~ Restorer
#, c-format
msgid "E1169: Expression too recursive: %s"
-msgstr "E1169: Выражение Ñлишком рекурÑивно %s"
+msgstr "E1169: Ð‘Ð¾Ð»ÑŒÑˆÐ°Ñ Ñ€ÐµÐºÑƒÑ€ÑивноÑÑ‚ÑŒ Ð²Ñ‹Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ %s"
# :!~ Restorer
msgid "E1170: Cannot use #{ to start a comment"
@@ -10984,11 +11050,11 @@ msgstr ""
# :!~ Restorer
#, c-format
msgid ""
-"E1179: Failed to extract PWD from %s, check your shell's config related to OSC "
-"7"
+"E1179: Failed to extract PWD from %s, check your shell's config related to "
+"OSC 7"
msgstr ""
-"Ðе удалоÑÑŒ извлечь значение текущего рабочего каталога из %s. Проверьте "
-"наÑтройки командной оболочки OSC 7"
+"Ðе удалоÑÑŒ извлечь значение рабочего каталога из %s. Проверьте наÑтройки "
+"командной оболочки OSC 7"
# :!~ Restorer
#, c-format
@@ -11026,7 +11092,7 @@ msgstr "E1186: Выражение не возвращает значение %s"
# :!~ Restorer
msgid "E1187: Failed to source defaults.vim"
-msgstr "E1187: Ошибка при обработке файла defaults.vim"
+msgstr "E1187: Произошла ошибка при обработке файла defaults.vim"
# :!~ Restorer
msgid "E1188: Cannot open a terminal from the command line window"
@@ -11041,7 +11107,7 @@ msgstr "E1189: Ðе допуÑкаетÑÑ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ðµ поÑле комаÐ
#, c-format
msgid "E1190: One argument too few"
msgid_plural "E1190: %d arguments too few"
-msgstr[0] "E1190: В функцию передано на один аргумент меньше"
+msgstr[0] "E1190: В функцию передано на %d аргумент меньше"
msgstr[1] "E1190: В функцию передано на %d аргумента меньше"
msgstr[2] "E1190: В функцию передано на %d аргументов меньше"
@@ -11104,7 +11170,7 @@ msgstr "E1203: Ðе допуÑкаетÑÑ Ñимвол точки Ð´Ð»Ñ Ñ‚Ð¸Ð¿
# :!~ Restorer
#, c-format
msgid "E1204: No Number allowed after .: '\\%%%c'"
-msgstr "E1204: Запрещено указание чиÑла поÑле Ñимвола точки в '\\%%%c'"
+msgstr "E1204: Запрещено указание чиÑла поÑле Ñимвола точки в \\%%%c"
# :!~ Restorer
msgid "E1205: No white space allowed between option and"
@@ -11203,7 +11269,8 @@ msgstr "E1223: Тип данных аргумента номер %d должен
# :!~ Restorer
#, c-format
msgid "E1224: String, Number or List required for argument %d"
-msgstr "E1224: Тип данных аргумента номер %d должен быть String, Number или List"
+msgstr ""
+"E1224: Тип данных аргумента номер %d должен быть String, Number или List"
# :!~ Restorer
#, c-format
@@ -11266,7 +11333,7 @@ msgstr "E1236: Ðе допуÑкаетÑÑ Ð¾Ð±Ñ€Ð°Ñ‰ÐµÐ½Ð¸Ðµ к %s. Это им
# :!~ Restorer
#, c-format
msgid "E1237: No such user-defined command in current buffer: %s"
-msgstr "E1237: Ð”Ð»Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ³Ð¾ буфера не обнаружена команда Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ %s"
+msgstr "E1237: Ð”Ð»Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ³Ð¾ буфера не ÑущеÑтвует команды Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ %s"
# :!~ Restorer
#, c-format
@@ -11290,7 +11357,8 @@ msgstr "E1241: Ð’ команде указан недопуÑтимый раздÐ
# :!~ Restorer
#, c-format
msgid "E1242: No white space allowed before separator: %s"
-msgstr "E1242: Запрещён пробел перед разделителем параметров в команде %s"
+msgstr ""
+"E1242: Запрещён пробельный Ñимвол перед разделителем параметров в команде %s"
# :!~ Restorer
msgid "E1243: ASCII code not in 32-127 range"
@@ -11341,11 +11409,12 @@ msgstr "E1252: Тип данных аргумента номер %d должен
# :!~ Restorer
msgid "E1254: Cannot use script variable in for loop"
-msgstr "E1254: Ðе допуÑкаетÑÑ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ðµ локальных переменных в команде цикла :for"
+msgstr ""
+"E1254: Ðе допуÑкаетÑÑ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ðµ локальных переменных в команде цикла :for"
# :!~ Restorer
msgid "E1255: <Cmd> mapping must end with <CR>"
-msgstr "E1255: ÐÐ°Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ð°Ñ Ñ‡ÐµÑ€ÐµÐ· <Cmd> команда должна завершатьÑÑ Ñимволами <CR>"
+msgstr "E1255: ÐÐ°Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð° <Cmd> должна завершатьÑÑ Ñимволами <CR>"
# :!~ Restorer
#, c-format
@@ -11355,7 +11424,8 @@ msgstr "E1256: Тип данных аргумента номер %d должен
# :!~ Restorer
#, c-format
msgid "E1257: Imported script must use \"as\" or end in .vim: %s"
-msgstr "E1257: Ðе указано ключевое Ñлово \"as\" или раÑширение файла .vim Ð´Ð»Ñ %s"
+msgstr ""
+"E1257: Ðе указано ключевое Ñлово \"as\" или раÑширение файла .vim Ð´Ð»Ñ %s"
# :!~ Restorer
#, c-format
@@ -11371,7 +11441,7 @@ msgstr "E1259: Ðе указано наименование поÑле импоÑ
# :!~ Restorer
#, c-format
msgid "E1260: Cannot unlet an imported item: %s"
-msgstr "E1260: Ðе допуÑкаетÑÑ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ðµ компонент в импортированных данных %s"
+msgstr "E1260: Ðе допуÑкаетÑÑ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ðµ компонента в импортированных данных %s"
# :!~ Restorer
msgid "E1261: Cannot import .vim without using \"as\""
@@ -11386,7 +11456,7 @@ msgstr "E1262: Ðе допуÑкаетÑÑ Ð¿Ð¾Ð²Ñ‚Ð¾Ñ€Ð½Ð¾Ðµ импортиро
# :!~ Restorer
msgid "E1263: Cannot use name with # in Vim9 script, use export instead"
msgstr ""
-"E1263: Ðе допуÑкаютÑÑ Ð½Ð°Ð¸Ð¼ÐµÐ½Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ Ñимволом #. Ð’ командных файлах Vim9 "
+"E1263: Ðе допуÑкаютÑÑ Ð½Ð°Ð¸Ð¼ÐµÐ½Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ Ñимволом '#'. Ð’ командных файлах Vim9 "
"иÑпользуетÑÑ ÑкÑпорт"
# :!~ Restorer
@@ -11431,7 +11501,8 @@ msgstr "E1270: Ðе допуÑкаетÑÑ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð° вида :s\\/sub/ в
# :!~ Restorer
#, c-format
msgid "E1271: Compiling closure without context: %s"
-msgstr "E1271: КомпилÑÑ†Ð¸Ñ Ð²Ð»Ð¾Ð¶ÐµÐ½Ð½Ð¾Ð¹ функции вне контекÑта вышеÑтоÑщей функции %s"
+msgstr ""
+"E1271: КомпилÑÑ†Ð¸Ñ Ð²Ð»Ð¾Ð¶ÐµÐ½Ð½Ð¾Ð¹ функции вне контекÑта вышеÑтоÑщей функции %s"
# :!~ Restorer
#, c-format
@@ -11492,7 +11563,8 @@ msgstr "E1283: Величина битового Ñдвига должна быÑ
#, c-format
msgid "E1284: Argument 1, list item %d: Dictionary required"
msgstr ""
-"E1284: Тип данных в %d Ñлементе ÑпиÑка аргумента номер 1 должен быть Dictionary"
+"E1284: Тип данных в %d Ñлементе ÑпиÑка аргумента номер 1 должен быть "
+"Dictionary"
# :!~ Restorer
#, c-format
@@ -11535,20 +11607,24 @@ msgstr "E1292: Окно командной Ñтроки уже ÑущеÑтвуÐ
# :!~ Restorer
msgid "E1293: Cannot use a negative id after adding a textprop with text"
msgstr ""
-"E1293: Запрещено отрицательное значение ИД поÑле Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð²Ð¸Ñ€Ñ‚ÑƒÐ°Ð»ÑŒÐ½Ð¾Ð³Ð¾ текÑта"
+"E1293: Запрещено отрицательное значение ИД поÑле Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð²Ð¸Ñ€Ñ‚ÑƒÐ°Ð»ÑŒÐ½Ð¾Ð³Ð¾ "
+"текÑта"
# :!~ Restorer
msgid "E1294: Can only use text_align when column is zero"
-msgstr "E1294: Ключ \"text_align\" допуÑтим при нулевом значении позиции колонки"
+msgstr ""
+"E1294: Ключ \"text_align\" допуÑтим при нулевом значении позиции колонки"
# :!~ Restorer
msgid "E1295: Cannot specify both 'type' and 'types'"
-msgstr "E1295: Ðе допуÑкаетÑÑ Ð¾Ð´Ð½Ð¾Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ð¾Ðµ указание ключей \"type\" и \"types\""
+msgstr ""
+"E1295: Ðе допуÑкаетÑÑ Ð¾Ð´Ð½Ð¾Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ð¾Ðµ указание ключей \"type\" и \"types\""
# :!~ Restorer
msgid "E1296: Can only use left padding when column is zero"
msgstr ""
-"E1296: Ключ \"text_padding_left\" допуÑтим при нулевом значении позиции колонки"
+"E1296: Ключ \"text_padding_left\" допуÑтим при нулевом значении позиции "
+"колонки"
# :!~ Restorer
#, c-format
@@ -11605,8 +11681,7 @@ msgstr "E1306: Превышено количеÑтво вложенных цик
#, c-format
msgid "E1307: Argument %d: Trying to modify a const %s"
msgstr ""
-"E1307: Обнаружена попытка Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ ÐºÐ¾Ð½Ñтантного Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ %2$s у аргумента "
-"номер %1$d"
+"E1307: Ð”Ð»Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð° номер %d попытка Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ ÐºÐ¾Ð½Ñтантного Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ %s"
# :!~ Restorer
msgid "E1308: Cannot resize a window in another tab page"
@@ -11692,12 +11767,12 @@ msgstr "E1325: У клаÑÑа \"%2$s\" отÑутÑтвует метод \"%1$s
# :!~ Restorer
#, c-format
msgid "E1326: Variable \"%s\" not found in object \"%s\""
-msgstr "E1326: У объекта \"%s\" отÑутÑтвует Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ \"%s\""
+msgstr "E1326: У объекта \"%2$s\" отÑутÑтвует Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ \"%1$s\""
# :!~ Restorer
#, c-format
msgid "E1327: Object required, found %s"
-msgstr "E1327: ОжидалÑÑ Object, а получен %s"
+msgstr "E1327: ОжидалÑÑ Ñ‚Ð¸Ð¿ данных Object, а получен %s"
# :!~ Restorer
#, c-format
@@ -11763,7 +11838,8 @@ msgstr "E1341: Обнаружено повторное объÑвление пе
# :!~ Restorer
msgid "E1342: Interface can only be defined in Vim9 script"
-msgstr "E1342: Тип Interface может быть определён только в командных файлах Vim9"
+msgstr ""
+"E1342: Тип Interface может быть определён только в командных файлах Vim9"
# :!~ Restorer
#, c-format
@@ -11772,7 +11848,7 @@ msgstr "E1343: Ðаименование интерфейÑа должно нач
# :!~ Restorer
msgid "E1344: Cannot initialize a variable in an interface"
-msgstr "E1344: Ðе допуÑкаетÑÑ Ð¸Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð¸Ñ€Ð¾Ð²Ð°Ñ‚ÑŒ переменные в интерфейÑе"
+msgstr "E1344: Ðе допуÑкаетÑÑ Ð¸Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ñ… в интерфейÑе"
# :!~ Restorer
#, c-format
@@ -11948,7 +12024,7 @@ msgstr "E1380: ИнтерфейÑÑ‹ не поддерживают защищён
# :!~ Restorer
msgid "E1381: Interface cannot use \"implements\""
-msgstr "E1381: Ð”Ð»Ñ Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñа неприменимо ключевое Ñлово \"implements\""
+msgstr "E1381: К интерфейÑу неприменимо ключевое Ñлово \"implements\""
# :!~ Restorer
#, c-format
@@ -11992,9 +12068,11 @@ msgstr "E1389: Ðе указано наименование поÑле ключÐ
# :!~ Restorer
#, c-format
msgid ""
-"E1390: Cannot use an object variable \"this.%s\" except with the \"new\" method"
+"E1390: Cannot use an object variable \"this.%s\" except with the \"new\" "
+"method"
msgstr ""
-"E1390: ÐŸÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ Ð¾Ð±ÑŠÐµÐºÑ‚Ð° \"this.%s\" может указыватьÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ в методе \"new\""
+"E1390: ÐŸÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ Ð¾Ð±ÑŠÐµÐºÑ‚Ð° \"this.%s\" может указыватьÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ в методе "
+"\"new\""
# :!~ Restorer
#, c-format
@@ -12027,7 +12105,7 @@ msgstr "E1395: Ðе допуÑкаетÑÑ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ðµ пÑевдоним
# :!~ Restorer
#, c-format
msgid "E1396: Type alias \"%s\" already exists"
-msgstr "E1396: ПÑевдоним типа уже определён \"%s\""
+msgstr "E1396: ПÑевдоним типа уже ÑущеÑтвует \"%s\""
# :!~ Restorer
msgid "E1397: Missing type alias name"
@@ -12092,7 +12170,7 @@ msgstr "E1408: ИнтерфейÑÑ‹ не поддерживают финализ
msgid "E1409: Cannot change read-only variable \"%s\" in class \"%s\""
msgstr ""
"E1409: Ðе допуÑкаетÑÑ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ðµ доÑтупной только Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð¾Ð¹ \"%s\" "
-"в клаÑÑе \"%s\""
+"клаÑÑа \"%s\""
# :!~ Restorer
msgid "E1410: Const variable not supported in an interface"
@@ -12116,8 +12194,8 @@ msgstr "E1501: Ðргумент номер %d не указан в позициÐ
# :!~ Restorer
#, c-format
msgid ""
-"E1502: Positional argument %d used as field width reused as different type: %s/"
-"%s"
+"E1502: Positional argument %d used as field width reused as different type: "
+"%s/%s"
msgstr ""
"E1502: Ð”Ð»Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð° номер %d в Ñпецификации позиции указан тип %s, а в "
"Ñпецификации ширины — тип %s"
@@ -12141,7 +12219,8 @@ msgstr "E1505: ÐедопуÑтимые Ñпецификаторы форматÐ
# :!~ Restorer
msgid "E1506: Buffer too small to copy xattr value or key"
-msgstr "E1506: ÐедоÑтаточный размер буфера Ð´Ð»Ñ ÐºÐ¾Ð¿Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ€Ð°Ñширенного атрибута"
+msgstr ""
+"E1506: ÐедоÑтаточный размер буфера Ð´Ð»Ñ ÐºÐ¾Ð¿Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ€Ð°Ñширенного атрибута"
# :!~ Restorer
msgid ""
@@ -12159,6 +12238,16 @@ msgstr "E1509: Произошла ошибка при Ñчитывании илÐ
msgid "E1510: Value too large: %s"
msgstr "E1510: Превышена допуÑÑ‚Ð¸Ð¼Ð°Ñ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° в значении %s"
+# :!~ Restorer
+#, c-format
+msgid "E1511: Wrong number of characters for field \"%s\""
+msgstr "E1511: Ð’ данном поле указано недопуÑтимое количеÑтво Ñимволов \"%s\""
+
+# :!~ Restorer
+#, c-format
+msgid "E1512: Wrong character width for field \"%s\""
+msgstr "E1512: Ð’ данном поле не поддерживаютÑÑ Ð¿Ð¾Ð»Ð½Ð¾ÑˆÐ¸Ñ€Ð¸Ð½Ð½Ñ‹Ðµ Ñимволы \"%s\""
+
# #Restorer: выводитÑÑ, например, по команде `CTRL+g`, `g CTRL+g` и Ñ‚. п.
# :!~ Restorer
msgid "--No lines in buffer--"
@@ -12209,6 +12298,7 @@ msgid "float"
msgstr "float"
# :!~ Restorer
+#.
msgid "search hit TOP, continuing at BOTTOM"
msgstr "ПоиÑк будет продолжен от ÐИЖÐЕЙ ГРÐÐИЦЫ документа"
@@ -12247,7 +12337,9 @@ msgstr "не удалоÑÑŒ выполнить добавление в ÑловÐ
# :!~ Restorer
#, c-format
msgid "index must be int or slice, not %s"
-msgstr "Ð¸Ð½Ð´ÐµÐºÑ ÑƒÐºÐ°Ð·Ñ‹Ð²Ð°ÐµÑ‚ÑÑ Ñ†ÐµÐ»Ñ‹Ð¼ чиÑлом или как диапазон. ÐедопуÑтимый Ð¸Ð½Ð´ÐµÐºÑ %s"
+msgstr ""
+"Ð¸Ð½Ð´ÐµÐºÑ ÑƒÐºÐ°Ð·Ñ‹Ð²Ð°ÐµÑ‚ÑÑ ÐºÐ°Ðº целое чиÑло или как диапазон чиÑел. ÐедопуÑтимый "
+"Ð¸Ð½Ð´ÐµÐºÑ %s"
# :!~ Restorer
#, c-format
@@ -12298,7 +12390,7 @@ msgstr "задано недопуÑтимое ÑвойÑтво %s"
# :!~ Restorer
msgid "failed to change directory"
-msgstr "Ñбой при Ñмене каталога"
+msgstr "произошёл Ñбой при Ñмене каталога"
# :!~ Restorer
#, c-format
@@ -12317,8 +12409,8 @@ msgstr ""
# :!~ Restorer
msgid "internal error: imp.find_module returned tuple with NULL"
msgstr ""
-"внутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°. Результат функции imp.find_module() неизменÑемый ÑпиÑок без "
-"Ñлементов"
+"внутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°. Результат функции imp.find_module() неизменÑемый ÑпиÑок "
+"без Ñлементов"
# :!~ Restorer
msgid "cannot delete vim.Dictionary attributes"
@@ -12345,7 +12437,8 @@ msgstr "ожидалаÑÑŒ поÑледовательноÑÑ‚ÑŒ из двух Ñ
# :!~ Restorer
msgid "list constructor does not accept keyword arguments"
msgstr ""
-"не допуÑкаетÑÑ Ð¸Ñпользовать в конÑтрукторе объекта List зарезервированные Ñлова"
+"не допуÑкаетÑÑ Ð¸Ñпользовать в конÑтрукторе объекта List зарезервированные "
+"Ñлова"
# :!~ Restorer
msgid "list index out of range"
@@ -12355,7 +12448,8 @@ msgstr "Ð¸Ð½Ð´ÐµÐºÑ ÑпиÑка выходит за границы диапаÐ
#, c-format
msgid "internal error: failed to get Vim list item %d"
msgstr ""
-"внутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°. Ðе удалоÑÑŒ получить у объекта Vim.List Ñлемент Ñ Ð¸Ð½Ð´ÐµÐºÑом %d"
+"внутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°. Ðе удалоÑÑŒ получить из объекта Vim.List Ñлемент Ñ Ð¸Ð½Ð´ÐµÐºÑом "
+"%d"
# :!~ Restorer
msgid "slice step cannot be zero"
@@ -12433,8 +12527,8 @@ msgstr "не допуÑкаетÑÑ ÑÐ±Ñ€Ð¾Ñ Ðº начальным значеÐ
#, c-format
msgid "unable to unset option %s which does not have global value"
msgstr ""
-"не допуÑкаетÑÑ ÑÐ±Ñ€Ð¾Ñ Ðº начальным значениÑм, еÑли не уÑтановлено глобальное "
-"значение у параметра %s"
+"не допуÑкаетÑÑ ÑÐ±Ñ€Ð¾Ñ Ðº начальным значениÑм, еÑли не уÑтановлено значение у "
+"общего параметра %s"
# :!~ Restorer
msgid "attempt to refer to deleted tab page"
@@ -12523,7 +12617,8 @@ msgstr "не удалоÑÑŒ преобразовать в тип List прогр
# :!~ Restorer
#, c-format
msgid "unable to convert %s to a Vim structure"
-msgstr "не удалоÑÑŒ преобразовать в тип данных программы Vim переданный объект %s"
+msgstr ""
+"не удалоÑÑŒ преобразовать в тип данных программы Vim переданный объект %s"
# :!~ Restorer
msgid "internal error: NULL reference passed"
@@ -12604,7 +12699,7 @@ msgstr ""
"Файлы редактора Vim (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n"
# #Restorer: иÑпользуетÑÑ Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð° desktop
-# ~!: earlier
+# :!~ Restorer
msgid "GVim"
msgstr "gVim"
@@ -12630,25 +12725,27 @@ msgstr "Vim"
# :!~ Restorer
msgid "(local to window)"
-msgstr "(облаÑÑ‚ÑŒ дейÑтвиÑ: локально Ð´Ð»Ñ Ð¾ÐºÐ½Ð°)"
+msgstr "(облаÑÑ‚ÑŒ дейÑтвиÑ: только Ð´Ð»Ñ Ð¾ÐºÐ½Ð°)"
# :!~ Restorer
msgid "(local to buffer)"
-msgstr "(облаÑÑ‚ÑŒ дейÑтвиÑ: локально Ð´Ð»Ñ Ð±ÑƒÑ„ÐµÑ€Ð°)"
+msgstr "(облаÑÑ‚ÑŒ дейÑтвиÑ: только Ð´Ð»Ñ Ð±ÑƒÑ„ÐµÑ€Ð°)"
# :!~ Restorer
msgid "(global or local to buffer)"
-msgstr "(облаÑÑ‚ÑŒ дейÑтвиÑ: Ð³Ð»Ð¾Ð±Ð°Ð»ÑŒÐ½Ð°Ñ Ð¸Ð»Ð¸ локально Ð´Ð»Ñ Ð±ÑƒÑ„ÐµÑ€Ð°)"
+msgstr "(облаÑÑ‚ÑŒ дейÑтвиÑ: общий или только Ð´Ð»Ñ Ð±ÑƒÑ„ÐµÑ€Ð°)"
# :!~ Restorer
msgid "\" Each \"set\" line shows the current value of an option (on the left)."
msgstr ""
-"\" Ð’ Ñтроках, начинающихÑÑ Ñо Ñлова «set», показано текущее значение параметров"
+"\" Ð’ Ñтроках, начинающихÑÑ Ñо Ñлова «set», показано текущее значение "
+"параметров"
# :!~ Restorer
msgid "\" Hit <Enter> on a \"set\" line to execute it."
msgstr ""
-"\" Чтобы применить параметр, нажмите клавишу <ENTER> на Ñтроке Ñо Ñловом «set»:"
+"\" Чтобы применить параметр, нажмите клавишу <ENTER> на Ñтроке Ñо Ñловом "
+"«set»:"
# :!~ Restorer
msgid "\" A boolean option will be toggled."
@@ -12664,7 +12761,8 @@ msgstr ""
# :!~ Restorer
msgid "\" Hit <Enter> on a help line to open a help window on this option."
msgstr ""
-"\" Чтобы получить Ñправку по параметру, нажмите клавишу <ENTER> на его опиÑании"
+"\" Чтобы получить Ñправку по параметру, нажмите клавишу <ENTER> на его "
+"опиÑании"
# :!~ Restorer
msgid "\" Hit <Enter> on an index line to jump there."
@@ -12674,7 +12772,8 @@ msgstr ""
# :!~ Restorer
msgid "\" Hit <Space> on a \"set\" line to refresh it."
msgstr ""
-"\" Чтобы обновить значение параметра, нажмите клавишу <SPACE> на Ñтроке Ñ Â«set»"
+"\" Чтобы обновить значение параметра, нажмите клавишу <SPACE> на Ñтроке Ñ "
+"«set»"
# :!~ Restorer
msgid "important"
@@ -12729,7 +12828,7 @@ msgid ""
"many jump commands move the cursor to the first non-blank\n"
"character of a line"
msgstr ""
-"уÑтановка каретки на первый не пробельный Ñимвол в Ñтроке\n"
+"уÑтановка каретки на первый непробельный Ñимвол в Ñтроке\n"
"поÑредÑтвом команд перемещениÑ"
# :!~ Restorer
@@ -12950,7 +13049,7 @@ msgid ""
"include \"uhex\" to show unprintable characters as a hex number"
msgstr ""
"\"lastline\" — индикациÑ, еÑли Ñтрока чаÑтично отображена в окне\n"
-"\"uhex\" — показ непечатаемых Ñимволов как шеÑтнадцатеричные чиÑла"
+"\"uhex\" — показ непечатаемых Ñимволов как шеÑтнадцатеричное значение"
# :!~ Restorer
msgid "characters to use for the status line, folds and filler lines"
@@ -13020,7 +13119,8 @@ msgstr "режимы, в которых текÑÑ‚ под кареткой моÐ
# :!~ Restorer
msgid "syntax, highlighting and spelling"
-msgstr "РаÑпознавание ÑинтакÑиÑа файлов, подÑветка текÑта, проверка правопиÑаниÑ"
+msgstr ""
+"РаÑпознавание ÑинтакÑиÑа файлов, подÑветка текÑта, проверка правопиÑаниÑ"
# :!~ Restorer
msgid "\"dark\" or \"light\"; the background color brightness"
@@ -13292,7 +13392,7 @@ msgstr "иÑпользуемый терминалом протокол обмеÐ
# :!~ Restorer
msgid "recognize keys that start with <Esc> in Insert mode"
-msgstr "раÑпознавать в режиме вÑтавки коды клавиш начинающиеÑÑ Ñ <ESC>"
+msgstr "раÑпознавать в режиме вÑтавки коды клавиш начинающиеÑÑ Ñ <Esc>"
# :!~ Restorer
msgid "minimal number of lines to scroll at a time"
@@ -13430,8 +13530,7 @@ msgstr "облаÑÑ‚ÑŒ Ñкрана, оÑтающаÑÑÑ Ð½Ðµ занÑтой о
# :!~ Restorer
msgid "list of ASCII characters that can be combined into complex shapes"
-msgstr ""
-"перечень Ñимволов в кодировке ASCII, иÑпользуемых в ÑоÑтавных Ñимволах"
+msgstr "перечень Ñимволов кодировки ASCII, иÑпользуемых в ÑоÑтавных Ñимволах"
# :!~ Restorer
msgid "options for text rendering"
@@ -13803,7 +13902,7 @@ msgstr ""
# :!~ Restorer
msgid "a <Tab> in an indent inserts 'shiftwidth' spaces"
msgstr ""
-"при нажатии клавиши <TAB> в начале Ñтроки будет вÑтавка пробелов\n"
+"при нажатии клавиши <TAB> , в начале Ñтроки будет вÑтавка пробелов\n"
"как задано в параметре 'shiftwidth'"
# :!~ Restorer
@@ -13888,11 +13987,11 @@ msgstr "Структурирование текÑта"
# :!~ Restorer
msgid "unset to display all folds open"
-msgstr "еÑли не уÑтановлено, то развернуть вÑе Ñвёрнутые Ñтроки"
+msgstr "еÑли не уÑтановлено, то развернуть вÑе Ñвёрнутые блоки"
# :!~ Restorer
msgid "folds with a level higher than this number will be closed"
-msgstr "Ñтроки Ñтруктуры Ñ ÑƒÑ€Ð¾Ð²Ð½ÐµÐ¼ выше указанного будут Ñвёрнуты"
+msgstr "Ñтроки Ñтруктуры, Ñ ÑƒÑ€Ð¾Ð²Ð½ÐµÐ¼ выше указанного, будут Ñвёрнуты"
# :!~ Restorer
msgid "value for 'foldlevel' when starting to edit a file"
@@ -14055,7 +14154,7 @@ msgstr "форматы файла, которые проверÑÑŽÑ‚ÑÑ Ð¿ÐµÑ€Ð
# :!~ Restorer
msgid "obsolete, use 'fileformat'"
-msgstr "выведен из употреблениÑ, дейÑтвует параметр 'fileformat'"
+msgstr "больше не применÑетÑÑ, иÑпользовать параметр 'fileformat'"
# :!~ Restorer
msgid "obsolete, use 'fileformats'"
diff --git a/src/po/sr.po b/src/po/sr.po
index 413a4cc..2f5113c 100644
--- a/src/po/sr.po
+++ b/src/po/sr.po
@@ -2,7 +2,7 @@
#
# Do ":help uganda" in Vim to read copying and usage conditions.
# Do ":help credits" in Vim to see a list of people who contributed.
-# Copyright (C) 2023
+# Copyright (C) 2024
# This file is distributed under the same license as the Vim package.
# FIRST AUTHOR Ivan Pešić <ivan.pesic@gmail.com>, 2017.
#
@@ -10,8 +10,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Vim(Serbian)\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-12-20 12:15+0400\n"
-"PO-Revision-Date: 2023-12-20 12:17+0400\n"
+"POT-Creation-Date: 2024-03-04 14:05+0400\n"
+"PO-Revision-Date: 2024-03-04 14:10+0400\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: Serbian\n"
"Language: sr\n"
@@ -180,6 +180,9 @@ msgstr " (фајл %d од %d)"
msgid " (file (%d) of %d)"
msgstr " (фајл (%d) од %d)"
+msgid "[Command Line]"
+msgstr "[Командна линија]"
+
msgid "[Prompt]"
msgstr "[Одзив]"
@@ -705,9 +708,6 @@ msgstr "Грешка"
msgid "Interrupt"
msgstr "Прекид"
-msgid "[Command Line]"
-msgstr "[Командна линија]"
-
msgid "is a directory"
msgstr "је директоријум"
@@ -1451,6 +1451,9 @@ msgstr "mapnew() аргумент"
msgid "filter() argument"
msgstr "filter() аргумент"
+msgid "foreach() argument"
+msgstr "foreach() аргумент"
+
msgid "extendnew() argument"
msgstr "extendnew() аргумент"
@@ -2508,6 +2511,9 @@ msgstr "у %s на %s"
msgid "Printing '%s'"
msgstr "Штампа Ñе ’%s’"
+msgid "DefaultFontNameForWindows"
+msgstr "Consolas"
+
#, c-format
msgid "Opening the X display took %ld msec"
msgstr "Отварање X приказа је трајало %ld мÑек"
@@ -3456,8 +3462,8 @@ msgid "%s returning %s"
msgstr "%s враћа %s"
#, c-format
-msgid "Function %s does not need compiling"
-msgstr "Ðије потребно да Ñе функција %s компајлира"
+msgid "Function %s%s%s does not need compiling"
+msgstr "Ðије потребно да Ñе функција %s%s%s компајлира"
#, c-format
msgid "%s (%s, compiled %s)"
@@ -4214,6 +4220,10 @@ msgid "E105: Using :loadkeymap not in a sourced file"
msgstr "E105: Коришћење :loadkeymap ван фајла који Ñе учитава као Ñкрипта"
#, c-format
+msgid "E106: Unsupported diff output format: %s"
+msgstr "E106: Ðије подржан diff излазни формат: %s"
+
+#, c-format
msgid "E107: Missing parentheses: %s"
msgstr "E107: ÐедоÑтају заграде: %s"
@@ -4543,8 +4553,8 @@ msgstr "E196: У овој верзији нема диграфа"
msgid "E197: Cannot set language to \"%s\""
msgstr "E197: Језик не може да Ñе поÑтави на „%sâ€"
-msgid "E199: Active window or buffer deleted"
-msgstr "E199: Active window or buffer deleted"
+msgid "E199: Active window or buffer changed or deleted"
+msgstr "E199: Ðктивни прозор или бафер је измењен или обриÑан"
msgid "E200: *ReadPre autocommands made the file unreadable"
msgstr "E200: *ReadPre аутокоманде Ñу учиниле фајл нечитљивим"
@@ -8747,6 +8757,13 @@ msgid "E1411: Missing dot after object \"%s\""
msgstr "E1411: ÐедоÑтаје тачка након објекта „%sâ€"
#, c-format
+msgid "E1412: Builtin object method \"%s\" not supported"
+msgstr "E1412: Ðије подржана уграђена метода објекта „%sâ€"
+
+msgid "E1413: Builtin class method not supported"
+msgstr "E1413: Ðије подржана уграђена метода клаÑе"
+
+#, c-format
msgid "E1500: Cannot mix positional and non-positional arguments: %s"
msgstr "E1500: Ðе могу да Ñе мешају позициони и непозициони аргументи: %s"
@@ -8792,6 +8809,17 @@ msgstr ""
msgid "E1510: Value too large: %s"
msgstr "E1510: ВредноÑÑ‚ је превелика: %s"
+#, c-format
+msgid "E1511: Wrong number of characters for field \"%s\""
+msgstr "E1511: Погрешан број карактера за поље „%sâ€"
+
+#, c-format
+msgid "E1512: Wrong character width for field \"%s\""
+msgstr "E1512: Погрешна ширина карактера за поље „%sâ€"
+
+msgid "E1513: Cannot edit buffer. 'winfixbuf' is enabled"
+msgstr "E1513: Ðе може да Ñе уређује бафер. Укључена је опција 'winfixbuf'"
+
msgid "--No lines in buffer--"
msgstr "--У баферу нема линија--"
@@ -9525,6 +9553,9 @@ msgstr "минимални број линија који Ñе кориÑти з
msgid "minimal number of lines used for any window"
msgstr "минимални број линија који Ñе кориÑти за било који прозор"
+msgid "keep window focused on a single buffer"
+msgstr "одржава Ñ„Ð¾ÐºÑƒÑ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€Ð° на одређени бафер"
+
msgid "keep the height of the window"
msgstr "задржава Ñе виÑина прозора"
diff --git a/src/popupwin.c b/src/popupwin.c
index 64bb0b5..bdf4ac7 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -3899,8 +3899,8 @@ may_update_popup_mask(int type)
// The screen position "line" / "col" needs to be
// redrawn. Figure out what window that is and update
- // w_redraw_top and w_redr_bot. Only needs to be done
- // once for each window line.
+ // w_redraw_top and w_redraw_bot. Only needs to be
+ // done once for each window line.
wp = mouse_find_win(&line_cp, &col_cp, IGNORE_POPUP);
if (wp != NULL)
{
diff --git a/src/profiler.c b/src/profiler.c
index 780b958..504d713 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -287,11 +287,13 @@ profile_equal(proftime_T *tm1, proftime_T *tm2)
profile_cmp(const proftime_T *tm1, const proftime_T *tm2)
{
# ifdef MSWIN
- return (int)(tm2->QuadPart - tm1->QuadPart);
+ return tm2->QuadPart == tm1->QuadPart ? 0 :
+ tm2->QuadPart > tm1->QuadPart ? 1 : -1;
# else
if (tm1->tv_sec == tm2->tv_sec)
- return tm2->tv_fsec - tm1->tv_fsec;
- return tm2->tv_sec - tm1->tv_sec;
+ return tm2->tv_fsec == tm1->tv_fsec ? 0 :
+ tm2->tv_fsec > tm1->tv_fsec ? 1 : -1;
+ return tm2->tv_sec > tm1->tv_sec ? 1 : -1;
# endif
}
diff --git a/src/proto/diff.pro b/src/proto/diff.pro
index d14907e..9c34dcf 100644
--- a/src/proto/diff.pro
+++ b/src/proto/diff.pro
@@ -30,4 +30,5 @@ linenr_T diff_get_corresponding_line(buf_T *buf1, linenr_T lnum1);
linenr_T diff_lnum_win(linenr_T lnum, win_T *wp);
void f_diff_filler(typval_T *argvars, typval_T *rettv);
void f_diff_hlID(typval_T *argvars, typval_T *rettv);
+void f_diff(typval_T *argvars, typval_T *rettv);
/* vim: set ft=c : */
diff --git a/src/proto/evalvars.pro b/src/proto/evalvars.pro
index 9879a40..ea14fe5 100644
--- a/src/proto/evalvars.pro
+++ b/src/proto/evalvars.pro
@@ -77,7 +77,7 @@ void vars_clear_ext(hashtab_T *ht, int free_val);
void delete_var(hashtab_T *ht, hashitem_T *hi);
int before_set_vvar(char_u *varname, dictitem_T *di, typval_T *tv, int copy, int *type_error);
void set_var(char_u *name, typval_T *tv, int copy);
-void set_var_const(char_u *name, scid_T sid, type_T *type_arg, typval_T *tv_arg, int copy, int flags_arg, int var_idx);
+int set_var_const(char_u *name, scid_T sid, type_T *type_arg, typval_T *tv_arg, int copy, int flags_arg, int var_idx);
int var_check_permission(dictitem_T *di, char_u *name);
int var_check_ro(int flags, char_u *name, int use_gettext);
int var_check_lock(int flags, char_u *name, int use_gettext);
diff --git a/src/proto/getchar.pro b/src/proto/getchar.pro
index b122a14..1473879 100644
--- a/src/proto/getchar.pro
+++ b/src/proto/getchar.pro
@@ -30,7 +30,7 @@ int typebuf_changed(int tb_change_cnt);
int typebuf_typed(void);
int typebuf_maplen(void);
void del_typebuf(int len, int offset);
-void gotchars_nop(void);
+void gotchars_ignore(void);
void ungetchars(int len);
int save_typebuf(void);
void save_typeahead(tasave_T *tp);
diff --git a/src/proto/gui_gtk_x11.pro b/src/proto/gui_gtk_x11.pro
index e85cf20..d019cf0 100644
--- a/src/proto/gui_gtk_x11.pro
+++ b/src/proto/gui_gtk_x11.pro
@@ -13,7 +13,7 @@ void gui_mch_show_tabline(int showit);
int gui_mch_showing_tabline(void);
void gui_mch_update_tabline(void);
void gui_mch_set_curtab(int nr);
-void gui_gtk_set_selection_targets(void);
+void gui_gtk_set_selection_targets(GdkAtom);
void gui_gtk_set_dnd_targets(void);
int gui_mch_init(void);
void gui_mch_forked(void);
diff --git a/src/proto/indent.pro b/src/proto/indent.pro
index 5ab338d..bafcefc 100644
--- a/src/proto/indent.pro
+++ b/src/proto/indent.pro
@@ -14,8 +14,8 @@ long get_sts_value(void);
int get_indent(void);
int get_indent_lnum(linenr_T lnum);
int get_indent_buf(buf_T *buf, linenr_T lnum);
-int get_indent_str(char_u *ptr, int ts, int list);
-int get_indent_str_vtab(char_u *ptr, int ts, int *vts, int list);
+int get_indent_str(char_u *ptr, int ts, int no_ts);
+int get_indent_str_vtab(char_u *ptr, int ts, int *vts, int no_ts);
int set_indent(int size, int flags);
int get_number_indent(linenr_T lnum);
int briopt_check(win_T *wp);
diff --git a/src/proto/list.pro b/src/proto/list.pro
index 5abe03c..0b58c69 100644
--- a/src/proto/list.pro
+++ b/src/proto/list.pro
@@ -56,6 +56,7 @@ int filter_map_one(typval_T *tv, typval_T *expr, filtermap_T filtermap, funccall
void f_filter(typval_T *argvars, typval_T *rettv);
void f_map(typval_T *argvars, typval_T *rettv);
void f_mapnew(typval_T *argvars, typval_T *rettv);
+void f_foreach(typval_T *argvars, typval_T *rettv);
void f_add(typval_T *argvars, typval_T *rettv);
void f_count(typval_T *argvars, typval_T *rettv);
void f_extend(typval_T *argvars, typval_T *rettv);
diff --git a/src/proto/memline.pro b/src/proto/memline.pro
index 3fa8707..c5d9b5d 100644
--- a/src/proto/memline.pro
+++ b/src/proto/memline.pro
@@ -19,6 +19,11 @@ char_u *ml_get(linenr_T lnum);
char_u *ml_get_pos(pos_T *pos);
char_u *ml_get_curline(void);
char_u *ml_get_cursor(void);
+colnr_T ml_get_len(linenr_T lnum);
+colnr_T ml_get_pos_len(pos_T *pos);
+colnr_T ml_get_curline_len(void);
+colnr_T ml_get_cursor_len(void);
+colnr_T ml_get_buf_len(buf_T *buf, linenr_T lnum);
char_u *ml_get_buf(buf_T *buf, linenr_T lnum, int will_change);
int ml_line_alloced(void);
int ml_append(linenr_T lnum, char_u *line, colnr_T len, int newfile);
diff --git a/src/proto/move.pro b/src/proto/move.pro
index b96b86d..bc9c025 100644
--- a/src/proto/move.pro
+++ b/src/proto/move.pro
@@ -1,6 +1,5 @@
/* move.c */
int adjust_plines_for_skipcol(win_T *wp);
-void redraw_for_cursorline(win_T *wp);
int sms_marker_overlap(win_T *wp, int extra2);
void update_topline_redraw(void);
void update_topline(void);
diff --git a/src/proto/ops.pro b/src/proto/ops.pro
index 193e894..bebe635 100644
--- a/src/proto/ops.pro
+++ b/src/proto/ops.pro
@@ -14,6 +14,7 @@ void adjust_cursor_eol(void);
char_u *skip_comment(char_u *line, int process, int include_space, int *is_comment);
int do_join(long count, int insert_space, int save_undo, int use_formatoptions, int setmark);
void block_prep(oparg_T *oap, struct block_def *bdp, linenr_T lnum, int is_del);
+void charwise_block_prep(pos_T start, pos_T end, struct block_def *bdp, linenr_T lnum, int inclusive);
void op_addsub(oparg_T *oap, linenr_T Prenum1, int g_cmd);
void clear_oparg(oparg_T *oap);
void cursor_pos_info(dict_T *dict);
diff --git a/src/proto/option.pro b/src/proto/option.pro
index effa813..be7ee95 100644
--- a/src/proto/option.pro
+++ b/src/proto/option.pro
@@ -29,7 +29,6 @@ char *did_set_autochdir(optset_T *args);
char *did_set_ballooneval(optset_T *args);
char *did_set_balloonevalterm(optset_T *args);
char *did_set_binary(optset_T *args);
-char *did_set_breakat(optset_T *args);
char *did_set_buflisted(optset_T *args);
char *did_set_cmdheight(optset_T *args);
char *did_set_compatible(optset_T *args);
diff --git a/src/proto/optionstr.pro b/src/proto/optionstr.pro
index cfd1982..340ffc4 100644
--- a/src/proto/optionstr.pro
+++ b/src/proto/optionstr.pro
@@ -20,6 +20,7 @@ int expand_set_backupcopy(optexpand_T *args, int *numMatches, char_u ***matches)
char *did_set_backupext_or_patchmode(optset_T *args);
char *did_set_belloff(optset_T *args);
int expand_set_belloff(optexpand_T *args, int *numMatches, char_u ***matches);
+char *did_set_breakat(optset_T *args);
char *did_set_breakindentopt(optset_T *args);
int expand_set_breakindentopt(optexpand_T *args, int *numMatches, char_u ***matches);
char *did_set_browsedir(optset_T *args);
diff --git a/src/proto/os_mswin.pro b/src/proto/os_mswin.pro
index 17a9ba2..4731010 100644
--- a/src/proto/os_mswin.pro
+++ b/src/proto/os_mswin.pro
@@ -51,6 +51,7 @@ void serverProcessPendingMessages(void);
char *charset_id2name(int id);
char *quality_id2name(DWORD id);
void gui_mch_expand_font(optexpand_T *args, void *param, int (*add_match)(char_u *val));
+UINT WINAPI vimGetDpiForSystem(void);
int get_logfont(LOGFONTW *lf, char_u *name, HDC printer_dc, int verbose);
void channel_init_winsock(void);
/* vim: set ft=c : */
diff --git a/src/proto/screen.pro b/src/proto/screen.pro
index b4f54a2..cf7cd95 100644
--- a/src/proto/screen.pro
+++ b/src/proto/screen.pro
@@ -7,7 +7,7 @@ int compute_foldcolumn(win_T *wp, int col);
size_t fill_foldcolumn(char_u *p, win_T *wp, int closed, linenr_T lnum);
int screen_get_current_line_off(void);
void reset_screen_attr(void);
-void screen_line(win_T *wp, int row, int coloff, int endcol, int clear_width, int flags);
+void screen_line(win_T *wp, int row, int coloff, int endcol, int clear_width, colnr_T last_vcol, int flags);
void rl_mirror(char_u *str);
void draw_vsep_win(win_T *wp, int row);
int stl_connected(win_T *wp);
@@ -55,8 +55,8 @@ void comp_col(void);
int number_width(win_T *wp);
int screen_screencol(void);
int screen_screenrow(void);
-char *set_fillchars_option(win_T *wp, char_u *val, int apply);
-char *set_listchars_option(win_T *wp, char_u *val, int apply);
+char *set_fillchars_option(win_T *wp, char_u *val, int apply, char *errbuf, size_t errbuflen);
+char *set_listchars_option(win_T *wp, char_u *val, int apply, char *errbuf, size_t errbuflen);
char_u *get_fillchars_name(expand_T *xp, int idx);
char_u *get_listchars_name(expand_T *xp, int idx);
char *check_chars_options(void);
diff --git a/src/proto/search.pro b/src/proto/search.pro
index 99e279d..5b2b889 100644
--- a/src/proto/search.pro
+++ b/src/proto/search.pro
@@ -32,7 +32,7 @@ int check_linecomment(char_u *line);
void showmatch(int c);
int current_search(long count, int forward);
int linewhite(linenr_T lnum);
-void find_pattern_in_path(char_u *ptr, int dir, int len, int whole, int skip_comments, int type, long count, int action, linenr_T start_lnum, linenr_T end_lnum);
+void find_pattern_in_path(char_u *ptr, int dir, int len, int whole, int skip_comments, int type, long count, int action, linenr_T start_lnum, linenr_T end_lnum, int forceit);
spat_T *get_spat(int idx);
int get_spat_last_idx(void);
void f_searchcount(typval_T *argvars, typval_T *rettv);
diff --git a/src/proto/term.pro b/src/proto/term.pro
index b83df86..d82f906 100644
--- a/src/proto/term.pro
+++ b/src/proto/term.pro
@@ -33,6 +33,7 @@ void term_set_winsize(int height, int width);
void term_fg_color(int n);
void term_bg_color(int n);
void term_ul_color(int n);
+void term_font(int n);
char_u *term_bg_default(void);
void term_fg_rgb_color(guicolor_T rgb);
void term_bg_rgb_color(guicolor_T rgb);
diff --git a/src/proto/typval.pro b/src/proto/typval.pro
index c9845e0..b6ea131 100644
--- a/src/proto/typval.pro
+++ b/src/proto/typval.pro
@@ -26,6 +26,7 @@ int check_for_opt_list_arg(typval_T *args, int idx);
int check_for_dict_arg(typval_T *args, int idx);
int check_for_nonnull_dict_arg(typval_T *args, int idx);
int check_for_opt_dict_arg(typval_T *args, int idx);
+int check_for_opt_nonnull_dict_arg(typval_T *args, int idx);
int check_for_chan_or_job_arg(typval_T *args, int idx);
int check_for_opt_chan_or_job_arg(typval_T *args, int idx);
int check_for_job_arg(typval_T *args, int idx);
diff --git a/src/proto/undo.pro b/src/proto/undo.pro
index 851d281..619ad70 100644
--- a/src/proto/undo.pro
+++ b/src/proto/undo.pro
@@ -18,10 +18,9 @@ void ex_undojoin(exarg_T *eap);
void u_unchanged(buf_T *buf);
void u_find_first_changed(void);
void u_update_save_nr(buf_T *buf);
-void u_clearall(buf_T *buf);
void u_clearline(void);
void u_undoline(void);
-void u_blockfree(buf_T *buf);
+void u_clearallandblockfree(buf_T *buf);
int bufIsChanged(buf_T *buf);
int anyBufIsChanged(void);
int bufIsChangedNotTerm(buf_T *buf);
diff --git a/src/proto/userfunc.pro b/src/proto/userfunc.pro
index e393c04..9bb4616 100644
--- a/src/proto/userfunc.pro
+++ b/src/proto/userfunc.pro
@@ -50,6 +50,7 @@ void list_functions(regmatch_T *regmatch);
ufunc_T *define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free, int class_flags, ocmember_T *obj_members, int obj_member_count);
void ex_function(exarg_T *eap);
ufunc_T *find_func_by_name(char_u *name, compiletype_T *compile_type);
+void defcompile_function(ufunc_T *ufunc, class_T *cl);
void ex_defcompile(exarg_T *eap);
int eval_fname_script(char_u *p);
int translated_function_exists(char_u *name, int is_global);
diff --git a/src/proto/vim9class.pro b/src/proto/vim9class.pro
index f1b6360..1ed175e 100644
--- a/src/proto/vim9class.pro
+++ b/src/proto/vim9class.pro
@@ -1,5 +1,7 @@
/* vim9class.c */
int object_index_from_itf_index(class_T *itf, int is_method, int idx, class_T *cl);
+int is_valid_builtin_obj_methodname(char_u *funcname);
+ufunc_T *class_get_builtin_method(class_T *cl, class_builtin_T builtin_method, int *method_idx);
void ex_class(exarg_T *eap);
type_T *oc_member_type(class_T *cl, int is_object, char_u *name, char_u *name_end, int *member_idx);
type_T *oc_member_type_by_idx(class_T *cl, int is_object, int member_idx);
@@ -31,6 +33,13 @@ void object_free_items(int copyID);
void emsg_var_cl_define(char *msg, char_u *name, size_t len, class_T *cl);
void method_not_found_msg(class_T *cl, vartype_T v_type, char_u *name, size_t len);
void member_not_found_msg(class_T *cl, vartype_T v_type, char_u *name, size_t len);
+void defcompile_class(class_T *cl);
+void defcompile_classes_in_script(void);
+int is_class_name(char_u *name, typval_T *rettv);
+void protected_method_access_errmsg(char_u *method_name);
+int object_empty(object_T *obj);
+int object_len(object_T *obj);
+char_u *object_string(object_T *obj, char_u *numbuf, int copyID, int echo_style, int restore_copyID, int composite_val);
int class_instance_of(class_T *cl, class_T *other_cl);
void f_instanceof(typval_T *argvars, typval_T *rettv);
/* vim: set ft=c : */
diff --git a/src/proto/window.pro b/src/proto/window.pro
index cfb771d..9e66db5 100644
--- a/src/proto/window.pro
+++ b/src/proto/window.pro
@@ -1,11 +1,15 @@
/* window.c */
+int check_can_set_curbuf_disabled(void);
+int check_can_set_curbuf_forceit(int forceit);
int window_layout_locked(enum CMD_index cmd);
win_T *prevwin_curwin(void);
win_T *swbuf_goto_win_with_buf(buf_T *buf);
void do_window(int nchar, long Prenum, int xchar);
void get_wincmd_addr_type(char_u *arg, exarg_T *eap);
+int check_split_disallowed(win_T *wp);
int win_split(int size, int flags);
-int win_split_ins(int size, int flags, win_T *new_wp, int dir);
+int win_splitmove(win_T *wp, int size, int flags);
+int win_split_ins(int size, int flags, win_T *new_wp, int dir, frame_T *to_flatten);
int win_valid_popup(win_T *win);
int win_valid(win_T *win);
win_T *win_find_by_id(int id);
@@ -18,6 +22,7 @@ void leaving_window(win_T *win);
void entering_window(win_T *win);
void curwin_init(void);
void close_windows(buf_T *buf, int keep_curwin);
+int last_window(void);
int one_window(void);
int win_close(win_T *win, int free_buf);
void snapshot_windows_scroll_size(void);
@@ -25,7 +30,7 @@ void may_make_initial_scroll_size_snapshot(void);
void may_trigger_win_scrolled_resized(void);
void win_close_othertab(win_T *win, int free_buf, tabpage_T *tp);
void win_free_all(void);
-win_T *winframe_remove(win_T *win, int *dirp, tabpage_T *tp);
+win_T *winframe_remove(win_T *win, int *dirp, tabpage_T *tp, frame_T **unflat_altfr);
void close_others(int message, int forceit);
void unuse_tabpage(tabpage_T *tp);
void use_tabpage(tabpage_T *tp);
@@ -87,10 +92,11 @@ int only_one_window(void);
void check_lnums(int do_curwin);
void check_lnums_nested(int do_curwin);
void reset_lnums(void);
-void make_snapshot(int idx);
+int make_snapshot(int idx);
void restore_snapshot(int idx, int close_curwin);
int win_hasvertsplit(void);
int get_win_number(win_T *wp, win_T *first_win);
int get_tab_number(tabpage_T *tp);
char *check_colorcolumn(win_T *wp);
+int get_last_winid(void);
/* vim: set ft=c : */
diff --git a/src/quickfix.c b/src/quickfix.c
index dd681ca..0bf4cfe 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -780,9 +780,9 @@ qf_get_next_buf_line(qfstate_T *state)
return QF_END_OF_INPUT;
p_buf = ml_get_buf(state->buf, state->buflnum, FALSE);
+ len = ml_get_buf_len(state->buf, state->buflnum);
state->buflnum += 1;
- len = (int)STRLEN(p_buf);
if (len > IOSIZE - 2)
{
state->linebuf = qf_grow_linebuf(state, len);
@@ -3146,7 +3146,8 @@ qf_goto_win_with_qfl_file(int qf_fnum)
// Didn't find it, go to the window before the quickfix
// window, unless 'switchbuf' contains 'uselast': in this case we
// try to jump to the previously used window first.
- if ((swb_flags & SWB_USELAST) && win_valid(prevwin))
+ if ((swb_flags & SWB_USELAST) && win_valid(prevwin) &&
+ !prevwin->w_p_wfb)
win = prevwin;
else if (altwin != NULL)
win = altwin;
@@ -3158,7 +3159,8 @@ qf_goto_win_with_qfl_file(int qf_fnum)
}
// Remember a usable window.
- if (altwin == NULL && !win->w_p_pvw && bt_normal(win->w_buffer))
+ if (altwin == NULL && !win->w_p_pvw && !win->w_p_wfb &&
+ bt_normal(win->w_buffer))
altwin = win;
}
@@ -3261,8 +3263,51 @@ qf_jump_edit_buffer(
prev_winid == curwin->w_id ? curwin : NULL);
}
else
- retval = buflist_getfile(qf_ptr->qf_fnum,
- (linenr_T)1, GETF_SETMARK | GETF_SWITCH, forceit);
+ {
+ int fnum = qf_ptr->qf_fnum;
+
+ if (!forceit && curwin->w_p_wfb && curbuf->b_fnum != fnum)
+ {
+ if (qi->qfl_type == QFLT_LOCATION)
+ {
+ // Location lists cannot split or reassign their window
+ // so 'winfixbuf' windows must fail
+ emsg(_(e_winfixbuf_cannot_go_to_buffer));
+ return FAIL;
+ }
+
+ if (win_valid(prevwin) && !prevwin->w_p_wfb &&
+ !bt_quickfix(prevwin->w_buffer))
+ {
+ // 'winfixbuf' is set; attempt to change to a window without it
+ // that isn't a quickfix/location list window.
+ win_goto(prevwin);
+ }
+ if (curwin->w_p_wfb)
+ {
+ // Split the window, which will be 'nowinfixbuf', and set curwin
+ // to that
+ if (win_split(0, 0) == OK)
+ *opened_window = TRUE;
+
+ if (curwin->w_p_wfb)
+ {
+ // Autocommands set 'winfixbuf' or sent us to another window
+ // with it set, or we failed to split the window. Give up,
+ // but don't return immediately, as they may have messed
+ // with the list.
+ emsg(_(e_winfixbuf_cannot_go_to_buffer));
+ retval = FAIL;
+ }
+ }
+ }
+
+ if (retval == OK)
+ {
+ retval = buflist_getfile(fnum,
+ (linenr_T)1, GETF_SETMARK | GETF_SWITCH, forceit);
+ }
+ }
// If a location list, check whether the associated window is still
// present.
@@ -4829,8 +4874,17 @@ qf_fill_buffer(qf_list_T *qfl, buf_T *buf, qfline_T *old_last, int qf_winid)
}
// delete all existing lines
+ //
+ // Note: we cannot store undo information, because
+ // qf buffer is usually not allowed to be modified.
+ //
+ // So we need to clean up undo information
+ // otherwise autocommands may invalidate the undo stack
while ((curbuf->b_ml.ml_flags & ML_EMPTY) == 0)
(void)ml_delete((linenr_T)1);
+
+ // Remove all undo information
+ u_clearallandblockfree(curbuf);
}
// Check if there is anything to display
@@ -4982,6 +5036,11 @@ qf_jump_first(qf_info_T *qi, int_u save_qfid, int forceit)
if (qf_restore_list(qi, save_qfid) == FAIL)
return;
+
+ if (!check_can_set_curbuf_forceit(forceit))
+ return;
+
+
// Autocommands might have cleared the list, check for that.
if (!qf_list_empty(qf_get_curlist(qi)))
qf_jump(qi, 0, 0, forceit);
@@ -5898,7 +5957,7 @@ ex_cfile(exarg_T *eap)
// This function is used by the :cfile, :cgetfile and :caddfile
// commands.
- // :cfile always creates a new quickfix list and jumps to the
+ // :cfile always creates a new quickfix list and may jump to the
// first error.
// :cgetfile creates a new quickfix list but doesn't jump to the
// first error.
@@ -6137,13 +6196,14 @@ vgr_match_buflines(
break;
col = regmatch->endpos[0].col
+ (col == regmatch->endpos[0].col);
- if (col > (colnr_T)STRLEN(ml_get_buf(buf, lnum, FALSE)))
+ if (col > ml_get_buf_len(buf, lnum))
break;
}
}
else
{
char_u *str = ml_get_buf(buf, lnum, FALSE);
+ colnr_T linelen = ml_get_buf_len(buf, lnum);
int score;
int_u matches[MAX_FUZZY_MATCHES];
int_u sz = ARRAY_LENGTH(matches);
@@ -6182,7 +6242,7 @@ vgr_match_buflines(
if ((flags & VGR_GLOBAL) == 0)
break;
col = matches[pat_len - 1] + col + 1;
- if (col > (colnr_T)STRLEN(str))
+ if (col > linelen)
break;
}
}
@@ -6488,6 +6548,9 @@ ex_vimgrep(exarg_T *eap)
char_u *au_name = NULL;
int status;
+ if (!check_can_set_curbuf_forceit(eap->forceit))
+ return;
+
au_name = vgr_get_auname(eap->cmdidx);
if (au_name != NULL && apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name,
curbuf->b_fname, TRUE, curbuf))
diff --git a/src/regexp.c b/src/regexp.c
index c3bc496..4373ae0 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -1318,6 +1318,9 @@ reg_match_visual(void)
top = curbuf->b_visual.vi_end;
bot = curbuf->b_visual.vi_start;
}
+ // a substitute command may have removed some lines
+ if (bot.lnum > curbuf->b_ml.ml_line_count)
+ bot.lnum = curbuf->b_ml.ml_line_count;
mode = curbuf->b_visual.vi_mode;
curswant = curbuf->b_visual.vi_curswant;
}
diff --git a/src/register.c b/src/register.c
index f381e30..47ed218 100644
--- a/src/register.c
+++ b/src/register.c
@@ -832,8 +832,9 @@ insert_reg(
if ((State & REPLACE_FLAG) != 0)
{
pos_T curpos;
- u_save_cursor();
- del_bytes((long)STRLEN(y_current->y_array[0]), TRUE, FALSE);
+ if (u_save_cursor() == FAIL)
+ return FAIL;
+ del_chars((long)mb_charlen(y_current->y_array[0]), TRUE);
curpos = curwin->w_cursor;
if (oneright() == FAIL)
// hit end of line, need to put forward (after the current position)
@@ -1147,7 +1148,6 @@ op_yank(oparg_T *oap, int deleting, int mess)
int yanktype = oap->motion_type;
long yanklines = oap->line_count;
linenr_T yankendlnum = oap->end.lnum;
- char_u *p;
char_u *pnew;
struct block_def bd;
#if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
@@ -1239,70 +1239,7 @@ op_yank(oparg_T *oap, int deleting, int mess)
case MCHAR:
{
- colnr_T startcol = 0, endcol = MAXCOL;
- int is_oneChar = FALSE;
- colnr_T cs, ce;
-
- p = ml_get(lnum);
- bd.startspaces = 0;
- bd.endspaces = 0;
-
- if (lnum == oap->start.lnum)
- {
- startcol = oap->start.col;
- if (virtual_op)
- {
- getvcol(curwin, &oap->start, &cs, NULL, &ce);
- if (ce != cs && oap->start.coladd > 0)
- {
- // Part of a tab selected -- but don't
- // double-count it.
- bd.startspaces = (ce - cs + 1)
- - oap->start.coladd;
- if (bd.startspaces < 0)
- bd.startspaces = 0;
- startcol++;
- }
- }
- }
-
- if (lnum == oap->end.lnum)
- {
- endcol = oap->end.col;
- if (virtual_op)
- {
- getvcol(curwin, &oap->end, &cs, NULL, &ce);
- if (p[endcol] == NUL || (cs + oap->end.coladd < ce
- // Don't add space for double-wide
- // char; endcol will be on last byte
- // of multi-byte char.
- && (*mb_head_off)(p, p + endcol) == 0))
- {
- if (oap->start.lnum == oap->end.lnum
- && oap->start.col == oap->end.col)
- {
- // Special case: inside a single char
- is_oneChar = TRUE;
- bd.startspaces = oap->end.coladd
- - oap->start.coladd + oap->inclusive;
- endcol = startcol;
- }
- else
- {
- bd.endspaces = oap->end.coladd
- + oap->inclusive;
- endcol -= oap->inclusive;
- }
- }
- }
- }
- if (endcol == MAXCOL)
- endcol = (colnr_T)STRLEN(p);
- if (startcol > endcol || is_oneChar)
- bd.textlen = 0;
- else
- bd.textlen = endcol - startcol + oap->inclusive;
- bd.textstart = p + startcol;
+ charwise_block_prep(oap->start, oap->end, &bd, lnum, oap->inclusive);
if (yank_copy_line(&bd, y_idx, FALSE) == FAIL)
goto fail;
break;
@@ -1856,7 +1793,7 @@ do_put(
}
// get the old line and advance to the position to insert at
oldp = ml_get_curline();
- oldlen = (int)STRLEN(oldp);
+ oldlen = ml_get_curline_len();
init_chartabsize_arg(&cts, curwin, curwin->w_cursor.lnum, 0,
oldp, oldp);
@@ -1902,10 +1839,10 @@ do_put(
spaces = y_width + 1;
init_chartabsize_arg(&cts, curwin, 0, 0,
y_array[i], y_array[i]);
- for (j = 0; j < yanklen; j++)
+
+ while (*cts.cts_ptr != NUL)
{
- spaces -= lbr_chartabsize(&cts);
- ++cts.cts_ptr;
+ spaces -= lbr_chartabsize_adv(&cts);
cts.cts_vcol = 0;
}
clear_chartabsize_arg(&cts);
@@ -1987,7 +1924,7 @@ do_put(
curwin->w_cursor.col++;
// in Insert mode we might be after the NUL, correct for that
- len = (colnr_T)STRLEN(ml_get_curline());
+ len = ml_get_curline_len();
if (curwin->w_cursor.col > len)
curwin->w_cursor.col = len;
}
@@ -2071,7 +2008,7 @@ do_put(
totlen = count * yanklen;
do {
oldp = ml_get(lnum);
- oldlen = (int)STRLEN(oldp);
+ oldlen = ml_get_len(lnum);
if (lnum > start_lnum)
{
pos_T pos;
@@ -2151,7 +2088,7 @@ do_put(
lnum = new_cursor.lnum;
ptr = ml_get(lnum) + col;
totlen = (int)STRLEN(y_array[y_size - 1]);
- newp = alloc(STRLEN(ptr) + totlen + 1);
+ newp = alloc(ml_get_len(lnum) - col + totlen + 1);
if (newp == NULL)
goto error;
STRCPY(newp, y_array[y_size - 1]);
@@ -2192,7 +2129,7 @@ do_put(
curwin->w_cursor.lnum = lnum;
ptr = ml_get(lnum);
if (cnt == count && i == y_size - 1)
- lendiff = (int)STRLEN(ptr);
+ lendiff = ml_get_len(lnum);
if (*ptr == '#' && preprocs_left())
indent = 0; // Leave # lines at start
else
@@ -2210,7 +2147,7 @@ do_put(
curwin->w_cursor = old_pos;
// remember how many chars were removed
if (cnt == count && i == y_size - 1)
- lendiff -= (int)STRLEN(ml_get(lnum));
+ lendiff -= ml_get_len(lnum);
}
}
if (cnt == 1)
@@ -2302,7 +2239,7 @@ error:
curwin->w_set_curswant = TRUE;
// Make sure the cursor is not after the NUL.
- int len = (int)STRLEN(ml_get_curline());
+ int len = ml_get_curline_len();
if (curwin->w_cursor.col > len)
{
if (cur_ve_flags == VE_ALL)
diff --git a/src/screen.c b/src/screen.c
index ac24a16..71ddbca 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -18,8 +18,7 @@
* displayed (excluding text written by external commands).
* ScreenAttrs[off] Contains the associated attributes.
* ScreenCols[off] Contains the virtual columns in the line. -1 means not
- * available or before buffer text, MAXCOL means after the
- * end of the line.
+ * available or before buffer text.
*
* LineOffset[row] Contains the offset into ScreenLines*[], ScreenAttrs[]
* and ScreenCols[] for each line.
@@ -452,6 +451,10 @@ skip_for_popup(int row, int col)
* SLF_RIGHTLEFT rightleft window:
* When TRUE and "clear_width" > 0, clear columns 0 to "endcol"
* When FALSE and "clear_width" > 0, clear columns "endcol" to "clear_width"
+ * SLF_INC_VCOL:
+ * When FALSE, use "last_vcol" for ScreenCols[] of the columns to clear.
+ * When TRUE, use an increasing sequence starting from "last_vcol + 1" for
+ * ScreenCols[] of the columns to clear.
*/
void
screen_line(
@@ -460,6 +463,7 @@ screen_line(
int coloff,
int endcol,
int clear_width,
+ colnr_T last_vcol,
int flags UNUSED)
{
unsigned off_from;
@@ -504,6 +508,8 @@ screen_line(
// Clear rest first, because it's left of the text.
if (clear_width > 0)
{
+ int clear_start = col;
+
while (col <= endcol && ScreenLines[off_to] == ' '
&& ScreenAttrs[off_to] == 0
&& (!enc_utf8 || ScreenLinesUC[off_to] == 0))
@@ -514,6 +520,10 @@ screen_line(
if (col <= endcol)
screen_fill(row, row + 1, col + coloff,
endcol + coloff + 1, ' ', ' ', 0);
+
+ for (int i = endcol; i >= clear_start; i--)
+ ScreenCols[off_to + (i - col)] =
+ (flags & SLF_INC_VCOL) ? ++last_vcol : last_vcol;
}
col = endcol + 1;
off_to = LineOffset[row] + col + coloff;
@@ -775,7 +785,8 @@ screen_line(
&& ScreenAttrs[off_to] == 0
&& (!enc_utf8 || ScreenLinesUC[off_to] == 0))
{
- ScreenCols[off_to] = MAXCOL;
+ ScreenCols[off_to] =
+ (flags & SLF_INC_VCOL) ? ++last_vcol : last_vcol;
++off_to;
++col;
}
@@ -830,7 +841,8 @@ screen_line(
' ', ' ', 0);
while (col < clear_width)
{
- ScreenCols[off_to++] = MAXCOL;
+ ScreenCols[off_to++]
+ = (flags & SLF_INC_VCOL) ? ++last_vcol : last_vcol;
++col;
}
}
@@ -1667,6 +1679,8 @@ screen_start_highlight(int attr)
*/
if (aep != NULL)
{
+ if (aep->ae_u.cterm.font > 0 && aep->ae_u.cterm.font < 12)
+ term_font(aep->ae_u.cterm.font);
#ifdef FEAT_TERMGUICOLORS
// When 'termguicolors' is set but fg or bg is unset,
// fall back to the cterm colors. This helps for SpellBad,
@@ -2567,6 +2581,25 @@ give_up:
new_LineOffset[new_row] = new_row * Columns;
new_LineWraps[new_row] = FALSE;
+ (void)vim_memset(new_ScreenLines + new_row * Columns,
+ ' ', (size_t)Columns * sizeof(schar_T));
+ if (enc_utf8)
+ {
+ (void)vim_memset(new_ScreenLinesUC + new_row * Columns,
+ 0, (size_t)Columns * sizeof(u8char_T));
+ for (int i = 0; i < p_mco; ++i)
+ (void)vim_memset(new_ScreenLinesC[i]
+ + new_row * Columns,
+ 0, (size_t)Columns * sizeof(u8char_T));
+ }
+ if (enc_dbcs == DBCS_JPNU)
+ (void)vim_memset(new_ScreenLines2 + new_row * Columns,
+ 0, (size_t)Columns * sizeof(schar_T));
+ (void)vim_memset(new_ScreenAttrs + new_row * Columns,
+ 0, (size_t)Columns * sizeof(sattr_T));
+ (void)vim_memset(new_ScreenCols + new_row * Columns,
+ 0, (size_t)Columns * sizeof(colnr_T));
+
/*
* If the screen is not going to be cleared, copy as much as
* possible from the old screen to the new one and clear the rest
@@ -2575,24 +2608,6 @@ give_up:
*/
if (!doclear)
{
- (void)vim_memset(new_ScreenLines + new_row * Columns,
- ' ', (size_t)Columns * sizeof(schar_T));
- if (enc_utf8)
- {
- (void)vim_memset(new_ScreenLinesUC + new_row * Columns,
- 0, (size_t)Columns * sizeof(u8char_T));
- for (int i = 0; i < p_mco; ++i)
- (void)vim_memset(new_ScreenLinesC[i]
- + new_row * Columns,
- 0, (size_t)Columns * sizeof(u8char_T));
- }
- if (enc_dbcs == DBCS_JPNU)
- (void)vim_memset(new_ScreenLines2 + new_row * Columns,
- 0, (size_t)Columns * sizeof(schar_T));
- (void)vim_memset(new_ScreenAttrs + new_row * Columns,
- 0, (size_t)Columns * sizeof(sattr_T));
- (void)vim_memset(new_ScreenCols + new_row * Columns,
- 0, (size_t)Columns * sizeof(colnr_T));
old_row = new_row + (screen_Rows - Rows);
if (old_row >= 0 && ScreenLines != NULL)
{
@@ -4533,7 +4548,7 @@ comp_col(void)
if (!last_has_status)
sc_col = ru_col;
}
- if (p_sc)
+ if (p_sc && *p_sloc == 'l')
{
sc_col += SHOWCMD_COLS;
if (!p_ru || last_has_status) // no need for separating space
@@ -4688,6 +4703,15 @@ static struct charstab lcstab[] =
{NULL, "leadmultispace"},
};
+ static char *
+field_value_err(char *errbuf, size_t errbuflen, char *fmt, char *field)
+{
+ if (errbuf == NULL)
+ return "";
+ vim_snprintf(errbuf, errbuflen, _(fmt), field);
+ return errbuf;
+}
+
/*
* Handle setting 'listchars' or 'fillchars'.
* "value" points to either the global or the window-local value.
@@ -4697,7 +4721,8 @@ static struct charstab lcstab[] =
* Returns error message, NULL if it's OK.
*/
static char *
-set_chars_option(win_T *wp, char_u *value, int is_listchars, int apply)
+set_chars_option(win_T *wp, char_u *value, int is_listchars, int apply,
+ char *errbuf, size_t errbuflen)
{
int round, i, len, entries;
char_u *p, *s;
@@ -4777,9 +4802,7 @@ set_chars_option(win_T *wp, char_u *value, int is_listchars, int apply)
for (i = 0; i < entries; ++i)
{
len = (int)STRLEN(tab[i].name);
- if (!(STRNCMP(p, tab[i].name, len) == 0
- && p[len] == ':'
- && p[len + 1] != NUL))
+ if (!(STRNCMP(p, tab[i].name, len) == 0 && p[len] == ':'))
continue;
if (is_listchars && strcmp(tab[i].name, "multispace") == 0)
@@ -4794,12 +4817,16 @@ set_chars_option(win_T *wp, char_u *value, int is_listchars, int apply)
{
c1 = get_encoded_char_adv(&s);
if (char2cells(c1) > 1)
- return e_invalid_argument;
+ return field_value_err(errbuf, errbuflen,
+ e_wrong_character_width_for_field_str,
+ tab[i].name);
++multispace_len;
}
if (multispace_len == 0)
// lcs-multispace cannot be an empty string
- return e_invalid_argument;
+ return field_value_err(errbuf, errbuflen,
+ e_wrong_number_of_characters_for_field_str,
+ tab[i].name);
p = s;
}
else
@@ -4830,12 +4857,16 @@ set_chars_option(win_T *wp, char_u *value, int is_listchars, int apply)
{
c1 = get_encoded_char_adv(&s);
if (char2cells(c1) > 1)
- return e_invalid_argument;
+ return field_value_err(errbuf, errbuflen,
+ e_wrong_character_width_for_field_str,
+ tab[i].name);
++lead_multispace_len;
}
if (lead_multispace_len == 0)
// lcs-leadmultispace cannot be an empty string
- return e_invalid_argument;
+ return field_value_err(errbuf, errbuflen,
+ e_wrong_number_of_characters_for_field_str,
+ tab[i].name);
p = s;
}
else
@@ -4855,21 +4886,33 @@ set_chars_option(win_T *wp, char_u *value, int is_listchars, int apply)
c2 = c3 = 0;
s = p + len + 1;
+ if (*s == NUL)
+ return field_value_err(errbuf, errbuflen,
+ e_wrong_number_of_characters_for_field_str,
+ tab[i].name);
c1 = get_encoded_char_adv(&s);
if (char2cells(c1) > 1)
- return e_invalid_argument;
+ return field_value_err(errbuf, errbuflen,
+ e_wrong_character_width_for_field_str,
+ tab[i].name);
if (tab[i].cp == &lcs_chars.tab2)
{
if (*s == NUL)
- return e_invalid_argument;
+ return field_value_err(errbuf, errbuflen,
+ e_wrong_number_of_characters_for_field_str,
+ tab[i].name);
c2 = get_encoded_char_adv(&s);
if (char2cells(c2) > 1)
- return e_invalid_argument;
+ return field_value_err(errbuf, errbuflen,
+ e_wrong_character_width_for_field_str,
+ tab[i].name);
if (!(*s == ',' || *s == NUL))
{
c3 = get_encoded_char_adv(&s);
if (char2cells(c3) > 1)
- return e_invalid_argument;
+ return field_value_err(errbuf, errbuflen,
+ e_wrong_character_width_for_field_str,
+ tab[i].name);
}
}
@@ -4890,6 +4933,10 @@ set_chars_option(win_T *wp, char_u *value, int is_listchars, int apply)
p = s;
break;
}
+ else
+ return field_value_err(errbuf, errbuflen,
+ e_wrong_number_of_characters_for_field_str,
+ tab[i].name);
}
if (i == entries)
@@ -4921,18 +4968,20 @@ set_chars_option(win_T *wp, char_u *value, int is_listchars, int apply)
* Handle the new value of 'fillchars'.
*/
char *
-set_fillchars_option(win_T *wp, char_u *val, int apply)
+set_fillchars_option(win_T *wp, char_u *val, int apply, char *errbuf,
+ size_t errbuflen)
{
- return set_chars_option(wp, val, FALSE, apply);
+ return set_chars_option(wp, val, FALSE, apply, errbuf, errbuflen);
}
/*
* Handle the new value of 'listchars'.
*/
char *
-set_listchars_option(win_T *wp, char_u *val, int apply)
+set_listchars_option(win_T *wp, char_u *val, int apply, char *errbuf,
+ size_t errbuflen)
{
- return set_chars_option(wp, val, TRUE, apply);
+ return set_chars_option(wp, val, TRUE, apply, errbuf, errbuflen);
}
/*
@@ -4972,15 +5021,15 @@ check_chars_options(void)
tabpage_T *tp;
win_T *wp;
- if (set_listchars_option(curwin, p_lcs, FALSE) != NULL)
+ if (set_listchars_option(curwin, p_lcs, FALSE, NULL, 0) != NULL)
return e_conflicts_with_value_of_listchars;
- if (set_fillchars_option(curwin, p_fcs, FALSE) != NULL)
+ if (set_fillchars_option(curwin, p_fcs, FALSE, NULL, 0) != NULL)
return e_conflicts_with_value_of_fillchars;
FOR_ALL_TAB_WINDOWS(tp, wp)
{
- if (set_listchars_option(wp, wp->w_p_lcs, FALSE) != NULL)
+ if (set_listchars_option(wp, wp->w_p_lcs, FALSE, NULL, 0) != NULL)
return e_conflicts_with_value_of_listchars;
- if (set_fillchars_option(wp, wp->w_p_fcs, FALSE) != NULL)
+ if (set_fillchars_option(wp, wp->w_p_fcs, FALSE, NULL, 0) != NULL)
return e_conflicts_with_value_of_fillchars;
}
return NULL;
diff --git a/src/scriptfile.c b/src/scriptfile.c
index 69016bf..6dc5557 100644
--- a/src/scriptfile.c
+++ b/src/scriptfile.c
@@ -1690,6 +1690,8 @@ do_source_ext(
// reset version, "vim9script" may have been added or removed.
si->sn_version = 1;
}
+ if (ret_sid != NULL)
+ *ret_sid = sid;
}
else
{
diff --git a/src/search.c b/src/search.c
index d4baa91..166ef4a 100644
--- a/src/search.c
+++ b/src/search.c
@@ -660,7 +660,7 @@ searchit(
&& pos->col < MAXCOL - 2)
{
ptr = ml_get_buf(buf, pos->lnum, FALSE);
- if ((int)STRLEN(ptr) <= pos->col)
+ if (ml_get_buf_len(buf, pos->lnum) <= pos->col)
start_char_len = 1;
else
start_char_len = (*mb_ptr2len)(ptr + pos->col);
@@ -966,8 +966,7 @@ searchit(
if (pos->lnum > 1) // just in case
{
--pos->lnum;
- pos->col = (colnr_T)STRLEN(ml_get_buf(buf,
- pos->lnum, FALSE));
+ pos->col = ml_get_buf_len(buf, pos->lnum);
}
}
else
@@ -1102,7 +1101,7 @@ searchit(
if (pos->lnum > buf->b_ml.ml_line_count)
{
pos->lnum = buf->b_ml.ml_line_count;
- pos->col = (int)STRLEN(ml_get_buf(buf, pos->lnum, FALSE));
+ pos->col = ml_get_buf_len(buf, pos->lnum);
if (pos->col > 0)
--pos->col;
}
@@ -1772,7 +1771,7 @@ searchc(cmdarg_T *cap, int t_cmd)
p = ml_get_curline();
col = curwin->w_cursor.col;
- len = (int)STRLEN(p);
+ len = ml_get_curline_len();
while (count--)
{
@@ -2315,7 +2314,7 @@ findmatchlimit(
break;
linep = ml_get(pos.lnum);
- pos.col = (colnr_T)STRLEN(linep); // pos.col on trailing NUL
+ pos.col = ml_get_len(pos.lnum); // pos.col on trailing NUL
do_quotes = -1;
line_breakcheck();
@@ -2492,7 +2491,7 @@ findmatchlimit(
if (pos.lnum > 1)
{
ptr = ml_get(pos.lnum - 1);
- if (*ptr && *(ptr + STRLEN(ptr) - 1) == '\\')
+ if (*ptr && *(ptr + ml_get_len(pos.lnum - 1) - 1) == '\\')
{
do_quotes = 1;
if (start_in_quotes == MAYBE)
@@ -2986,8 +2985,7 @@ current_search(
// try again from end of buffer
// searching backwards, so set pos to last line and col
pos.lnum = curwin->w_buffer->b_ml.ml_line_count;
- pos.col = (colnr_T)STRLEN(
- ml_get(curwin->w_buffer->b_ml.ml_line_count));
+ pos.col = ml_get_len(curwin->w_buffer->b_ml.ml_line_count);
}
}
}
@@ -3292,7 +3290,8 @@ find_pattern_in_path(
long count,
int action, // What to do when we find it
linenr_T start_lnum, // first line to start searching
- linenr_T end_lnum) // last line for searching
+ linenr_T end_lnum, // last line for searching
+ int forceit) // If true, always switch to the found path
{
SearchedFile *files; // Stack of included files
SearchedFile *bigger; // When we need more space
@@ -3829,7 +3828,7 @@ search_line:
break;
if (!GETFILE_SUCCESS(getfile(
curwin_save->w_buffer->b_fnum, NULL,
- NULL, TRUE, lnum, FALSE)))
+ NULL, TRUE, lnum, forceit)))
break; // failed to jump to file
}
else
@@ -3842,7 +3841,7 @@ search_line:
{
if (!GETFILE_SUCCESS(getfile(
0, files[depth].name, NULL, TRUE,
- files[depth].lnum, FALSE)))
+ files[depth].lnum, forceit)))
break; // failed to jump to file
// autocommands may have changed the lnum, we don't
// want that here
@@ -4561,7 +4560,10 @@ fuzzy_match_item_compare(const void *s1, const void *s2)
int idx1 = ((fuzzyItem_T *)s1)->idx;
int idx2 = ((fuzzyItem_T *)s2)->idx;
- return v1 == v2 ? (idx1 - idx2) : v1 > v2 ? -1 : 1;
+ if (v1 == v2)
+ return idx1 == idx2 ? 0 : idx1 > idx2 ? 1 : -1;
+ else
+ return v1 > v2 ? -1 : 1;
}
/*
@@ -4908,7 +4910,10 @@ fuzzy_match_str_compare(const void *s1, const void *s2)
int idx1 = ((fuzmatch_str_T *)s1)->idx;
int idx2 = ((fuzmatch_str_T *)s2)->idx;
- return v1 == v2 ? (idx1 - idx2) : v1 > v2 ? -1 : 1;
+ if (v1 == v2)
+ return idx1 == idx2 ? 0 : idx1 > idx2 ? 1 : -1;
+ else
+ return v1 > v2 ? -1 : 1;
}
/*
@@ -4936,9 +4941,14 @@ fuzzy_match_func_compare(const void *s1, const void *s2)
char_u *str1 = ((fuzmatch_str_T *)s1)->str;
char_u *str2 = ((fuzmatch_str_T *)s2)->str;
- if (*str1 != '<' && *str2 == '<') return -1;
- if (*str1 == '<' && *str2 != '<') return 1;
- return v1 == v2 ? (idx1 - idx2) : v1 > v2 ? -1 : 1;
+ if (*str1 != '<' && *str2 == '<')
+ return -1;
+ if (*str1 == '<' && *str2 != '<')
+ return 1;
+ if (v1 == v2)
+ return idx1 == idx2 ? 0 : idx1 > idx2 ? 1 : -1;
+ else
+ return v1 > v2 ? -1 : 1;
}
/*
diff --git a/src/spell.c b/src/spell.c
index da8ece0..43c521d 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -1384,7 +1384,7 @@ spell_move_to(
line = ml_get_buf(wp->w_buffer, lnum, FALSE);
- len = (int)STRLEN(line);
+ len = ml_get_buf_len(wp->w_buffer, lnum);
if (buflen < len + MAXWLEN + 2)
{
vim_free(buf);
@@ -2988,7 +2988,7 @@ ex_spellrepall(exarg_T *eap UNUSED)
if (addlen <= 0 || STRNCMP(line + curwin->w_cursor.col,
repl_to, repl_to_len) != 0)
{
- p = alloc(STRLEN(line) + addlen + 1);
+ p = alloc(ml_get_curline_len() + addlen + 1);
if (p == NULL)
break;
mch_memmove(p, line, curwin->w_cursor.col);
diff --git a/src/spellfile.c b/src/spellfile.c
index 24df042..51261ab 100644
--- a/src/spellfile.c
+++ b/src/spellfile.c
@@ -5877,7 +5877,7 @@ sug_write(spellinfo_T *spin, char_u *fname)
{
// <sugline>: <sugnr> ... NUL
line = ml_get_buf(spin->si_spellbuf, lnum, FALSE);
- len = (int)STRLEN(line) + 1;
+ len = ml_get_buf_len(spin->si_spellbuf, lnum) + 1;
if (fwrite(line, (size_t)len, (size_t)1, fd) == 0)
{
emsg(_(e_error_while_writing));
diff --git a/src/spellsuggest.c b/src/spellsuggest.c
index ecc0a74..c6e6183 100644
--- a/src/spellsuggest.c
+++ b/src/spellsuggest.c
@@ -508,9 +508,8 @@ spell_suggest(int count)
++badlen;
end_visual_mode();
// make sure we don't include the NUL at the end of the line
- line = ml_get_curline();
- if (badlen > (int)STRLEN(line) - (int)curwin->w_cursor.col)
- badlen = (int)STRLEN(line) - (int)curwin->w_cursor.col;
+ if (badlen > ml_get_curline_len() - (int)curwin->w_cursor.col)
+ badlen = ml_get_curline_len() - (int)curwin->w_cursor.col;
}
// Find the start of the badly spelled word.
else if (spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL) == 0
@@ -543,7 +542,7 @@ spell_suggest(int count)
curwin->w_cursor.col);
// Make a copy of current line since autocommands may free the line.
- line = vim_strsave(ml_get_curline());
+ line = vim_strnsave(ml_get_curline(), ml_get_curline_len());
if (line == NULL)
goto skip;
@@ -3763,11 +3762,16 @@ sug_compare(const void *s1, const void *s2)
{
suggest_T *p1 = (suggest_T *)s1;
suggest_T *p2 = (suggest_T *)s2;
- int n = p1->st_score - p2->st_score;
+ int n;
+
+ n = p1->st_score == p2->st_score ? 0 :
+ p1->st_score > p2->st_score ? 1 : -1;
if (n == 0)
{
- n = p1->st_altscore - p2->st_altscore;
+ n = p1->st_altscore == p2->st_altscore ? 0 :
+ p1->st_altscore > p2->st_altscore ? 1 : -1;
+
if (n == 0)
n = STRICMP(p1->st_word, p2->st_word);
}
diff --git a/src/strings.c b/src/strings.c
index 0aeea4b..33de175 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -942,7 +942,6 @@ string_filter_map(
break;
len = (int)STRLEN(tv.vval.v_string);
- newtv.v_type = VAR_UNKNOWN;
set_vim_var_nr(VV_KEY, idx);
if (filter_map_one(&tv, expr, filtermap, fc, &newtv, &rem) == FAIL
|| did_emsg)
@@ -951,7 +950,7 @@ string_filter_map(
clear_tv(&tv);
break;
}
- else if (filtermap != FILTERMAP_FILTER)
+ if (filtermap == FILTERMAP_MAP || filtermap == FILTERMAP_MAPNEW)
{
if (newtv.v_type != VAR_STRING)
{
@@ -963,7 +962,7 @@ string_filter_map(
else
ga_concat(&ga, newtv.vval.v_string);
}
- else if (!rem)
+ else if (filtermap == FILTERMAP_FOREACH || !rem)
ga_concat(&ga, tv.vval.v_string);
clear_tv(&newtv);
@@ -2469,6 +2468,55 @@ adjust_types(
return OK;
}
+ static void
+format_overflow_error(const char *pstart)
+{
+ size_t arglen = 0;
+ char *argcopy = NULL;
+ const char *p = pstart;
+
+ while (VIM_ISDIGIT((int)(*p)))
+ ++p;
+
+ arglen = p - pstart;
+ argcopy = ALLOC_CLEAR_MULT(char, arglen + 1);
+ if (argcopy != NULL)
+ {
+ strncpy(argcopy, pstart, arglen);
+ semsg(_( e_val_too_large), argcopy);
+ free(argcopy);
+ }
+ else
+ semsg(_(e_out_of_memory_allocating_nr_bytes), arglen);
+}
+
+#define MAX_ALLOWED_STRING_WIDTH 6400
+
+ static int
+get_unsigned_int(
+ const char *pstart,
+ const char **p,
+ unsigned int *uj)
+{
+ *uj = **p - '0';
+ ++*p;
+
+ while (VIM_ISDIGIT((int)(**p)) && *uj < MAX_ALLOWED_STRING_WIDTH)
+ {
+ *uj = 10 * *uj + (unsigned int)(**p - '0');
+ ++*p;
+ }
+
+ if (*uj > MAX_ALLOWED_STRING_WIDTH)
+ {
+ format_overflow_error(pstart);
+ return FAIL;
+ }
+
+ return OK;
+}
+
+
static int
parse_fmt_types(
const char ***ap_types,
@@ -2512,6 +2560,7 @@ parse_fmt_types(
// variable for positional arg
int pos_arg = -1;
const char *ptype = NULL;
+ const char *pstart = p+1;
p++; // skip '%'
@@ -2532,10 +2581,11 @@ parse_fmt_types(
}
// Positional argument
- unsigned int uj = *p++ - '0';
+ unsigned int uj;
+
+ if (get_unsigned_int(pstart, &p, &uj) == FAIL)
+ goto error;
- while (VIM_ISDIGIT((int)(*p)))
- uj = 10 * uj + (unsigned int)(*p++ - '0');
pos_arg = uj;
any_pos = 1;
@@ -2572,10 +2622,10 @@ parse_fmt_types(
if (VIM_ISDIGIT((int)(*p)))
{
// Positional argument field width
- unsigned int uj = *p++ - '0';
+ unsigned int uj;
- while (VIM_ISDIGIT((int)(*p)))
- uj = 10 * uj + (unsigned int)(*p++ - '0');
+ if (get_unsigned_int(arg + 1, &p, &uj) == FAIL)
+ goto error;
if (*p != '$')
{
@@ -2602,10 +2652,11 @@ parse_fmt_types(
{
// size_t could be wider than unsigned int; make sure we treat
// argument like common implementations do
- unsigned int uj = *p++ - '0';
+ const char *digstart = p;
+ unsigned int uj;
- while (VIM_ISDIGIT((int)(*p)))
- uj = 10 * uj + (unsigned int)(*p++ - '0');
+ if (get_unsigned_int(digstart, &p, &uj) == FAIL)
+ goto error;
if (*p == '$')
{
@@ -2626,10 +2677,10 @@ parse_fmt_types(
if (VIM_ISDIGIT((int)(*p)))
{
// Parse precision
- unsigned int uj = *p++ - '0';
+ unsigned int uj;
- while (VIM_ISDIGIT((int)(*p)))
- uj = 10 * uj + (unsigned int)(*p++ - '0');
+ if (get_unsigned_int(arg + 1, &p, &uj) == FAIL)
+ goto error;
if (*p == '$')
{
@@ -2657,10 +2708,11 @@ parse_fmt_types(
{
// size_t could be wider than unsigned int; make sure we
// treat argument like common implementations do
- unsigned int uj = *p++ - '0';
+ const char *digstart = p;
+ unsigned int uj;
- while (VIM_ISDIGIT((int)(*p)))
- uj = 10 * uj + (unsigned int)(*p++ - '0');
+ if (get_unsigned_int(digstart, &p, &uj) == FAIL)
+ goto error;
if (*p == '$')
{
@@ -2969,10 +3021,12 @@ vim_vsnprintf_typval(
if (*ptype == '$')
{
// Positional argument
- unsigned int uj = *p++ - '0';
+ const char *digstart = p;
+ unsigned int uj;
+
+ if (get_unsigned_int(digstart, &p, &uj) == FAIL)
+ goto error;
- while (VIM_ISDIGIT((int)(*p)))
- uj = 10 * uj + (unsigned int)(*p++ - '0');
pos_arg = uj;
++p;
@@ -3003,16 +3057,18 @@ vim_vsnprintf_typval(
if (*p == '*')
{
int j;
+ const char *digstart = p + 1;
p++;
if (VIM_ISDIGIT((int)(*p)))
{
// Positional argument field width
- unsigned int uj = *p++ - '0';
+ unsigned int uj;
+
+ if (get_unsigned_int(digstart, &p, &uj) == FAIL)
+ goto error;
- while (VIM_ISDIGIT((int)(*p)))
- uj = 10 * uj + (unsigned int)(*p++ - '0');
arg_idx = uj;
++p;
@@ -3026,6 +3082,12 @@ vim_vsnprintf_typval(
&arg_cur, fmt),
va_arg(ap, int));
+ if (j > MAX_ALLOWED_STRING_WIDTH)
+ {
+ format_overflow_error(digstart);
+ goto error;
+ }
+
if (j >= 0)
min_field_width = j;
else
@@ -3038,10 +3100,18 @@ vim_vsnprintf_typval(
{
// size_t could be wider than unsigned int; make sure we treat
// argument like common implementations do
- unsigned int uj = *p++ - '0';
+ const char *digstart = p;
+ unsigned int uj;
+
+ if (get_unsigned_int(digstart, &p, &uj) == FAIL)
+ goto error;
+
+ if (uj > MAX_ALLOWED_STRING_WIDTH)
+ {
+ format_overflow_error(digstart);
+ goto error;
+ }
- while (VIM_ISDIGIT((int)(*p)))
- uj = 10 * uj + (unsigned int)(*p++ - '0');
min_field_width = uj;
}
@@ -3055,25 +3125,35 @@ vim_vsnprintf_typval(
{
// size_t could be wider than unsigned int; make sure we
// treat argument like common implementations do
- unsigned int uj = *p++ - '0';
+ const char *digstart = p;
+ unsigned int uj;
+
+ if (get_unsigned_int(digstart, &p, &uj) == FAIL)
+ goto error;
+
+ if (uj > MAX_ALLOWED_STRING_WIDTH)
+ {
+ format_overflow_error(digstart);
+ goto error;
+ }
- while (VIM_ISDIGIT((int)(*p)))
- uj = 10 * uj + (unsigned int)(*p++ - '0');
precision = uj;
}
else if (*p == '*')
{
int j;
+ const char *digstart = p;
p++;
if (VIM_ISDIGIT((int)(*p)))
{
// positional argument
- unsigned int uj = *p++ - '0';
+ unsigned int uj;
+
+ if (get_unsigned_int(digstart, &p, &uj) == FAIL)
+ goto error;
- while (VIM_ISDIGIT((int)(*p)))
- uj = 10 * uj + (unsigned int)(*p++ - '0');
arg_idx = uj;
++p;
@@ -3087,6 +3167,12 @@ vim_vsnprintf_typval(
&arg_cur, fmt),
va_arg(ap, int));
+ if (j > MAX_ALLOWED_STRING_WIDTH)
+ {
+ format_overflow_error(digstart);
+ goto error;
+ }
+
if (j >= 0)
precision = j;
else
@@ -3874,6 +3960,7 @@ vim_vsnprintf_typval(
if (tvs != NULL && tvs[num_posarg != 0 ? num_posarg : arg_idx - 1].v_type != VAR_UNKNOWN)
emsg(_(e_too_many_arguments_to_printf));
+error:
vim_free((char*)ap_types);
va_end(ap);
diff --git a/src/structs.h b/src/structs.h
index 3b51e0c..47a0050 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -246,6 +246,8 @@ typedef struct
long wo_nuw;
# define w_p_nuw w_onebuf_opt.wo_nuw // 'numberwidth'
#endif
+ int wo_wfb;
+#define w_p_wfb w_onebuf_opt.wo_wfb // 'winfixbuf'
int wo_wfh;
# define w_p_wfh w_onebuf_opt.wo_wfh // 'winfixheight'
int wo_wfw;
@@ -800,7 +802,8 @@ typedef struct memline
#define ML_ALLOCATED 0x10 // ml_line_ptr is an allocated copy
int ml_flags;
- colnr_T ml_line_len; // length of the cached line, including NUL
+ colnr_T ml_line_len; // length of the cached line + NUL + text properties
+ colnr_T ml_line_textlen;// length of the cached line + NUL, 0 if not known yet
linenr_T ml_line_lnum; // line number of cached line, 0 if not valid
char_u *ml_line_ptr; // pointer to cached line
@@ -1186,6 +1189,7 @@ typedef struct attr_entry
short_u fg_color; // foreground color number
short_u bg_color; // background color number
short_u ul_color; // underline color number
+ short_u font; // font number
# ifdef FEAT_TERMGUICOLORS
guicolor_T fg_rgb; // foreground color RGB
guicolor_T bg_rgb; // background color RGB
@@ -1528,6 +1532,17 @@ typedef enum {
#define OCMFLAG_CONST 0x04 // "const" object/class member
/*
+ * Object methods called by builtin functions (e.g. string(), empty(), etc.)
+ */
+typedef enum {
+ CLASS_BUILTIN_INVALID,
+ CLASS_BUILTIN_STRING,
+ CLASS_BUILTIN_EMPTY,
+ CLASS_BUILTIN_LEN,
+ CLASS_BUILTIN_MAX
+} class_builtin_T;
+
+/*
* Entry for an object or class member variable.
*/
typedef struct {
@@ -1590,6 +1605,9 @@ struct class_S
int class_obj_method_count_child; // count without "extends"
ufunc_T **class_obj_methods; // allocated
+ // index of builtin methods
+ int class_builtin_methods[CLASS_BUILTIN_MAX];
+
garray_T class_type_list; // used for type pointers
type_T class_type; // type used for the class
type_T class_object_type; // same as class_type but VAR_OBJECT
@@ -4333,7 +4351,7 @@ struct VimMenu
HMENU submenu_id; // If this is submenu, add children here
HWND tearoff_handle; // hWnd of tearoff if created
#endif
-#if FEAT_GUI_HAIKU
+#ifdef FEAT_GUI_HAIKU
BMenuItem *id; // Id of menu item
BMenu *submenu_id; // If this is submenu, add children here
# ifdef FEAT_TOOLBAR
@@ -4357,7 +4375,6 @@ typedef int vimmenu_T;
*/
typedef struct
{
- buf_T *save_curbuf; // saved curbuf
int use_aucmd_win_idx; // index in aucmd_win[] if >= 0
int save_curwin_id; // ID of saved curwin
int new_curwin_id; // ID of new curwin
@@ -4366,6 +4383,9 @@ typedef struct
char_u *globaldir; // saved value of globaldir
int save_VIsual_active; // saved VIsual_active
int save_State; // saved State
+#ifdef FEAT_JOB_CHANNEL
+ int save_prompt_insert; // saved b_prompt_insert
+#endif
} aco_save_T;
/*
@@ -4879,11 +4899,12 @@ typedef struct {
hashtab_T sve_hashtab;
} save_v_event_T;
-// Enum used by filter(), map() and mapnew()
+// Enum used by filter(), map(), mapnew() and foreach()
typedef enum {
FILTERMAP_FILTER,
FILTERMAP_MAP,
- FILTERMAP_MAPNEW
+ FILTERMAP_MAPNEW,
+ FILTERMAP_FOREACH
} filtermap_T;
// Structure used by switch_win() to pass values to restore_win()
@@ -4907,6 +4928,10 @@ typedef struct {
win_T *cts_win;
char_u *cts_line; // start of the line
char_u *cts_ptr; // current position in line
+#ifdef FEAT_LINEBREAK
+ int cts_bri_size; // cached size of 'breakindent', or -1
+ // if not computed yet
+#endif
#ifdef FEAT_PROP_POPUP
int cts_text_prop_count; // number of text props; when zero
// cts_text_props is not used
diff --git a/src/syntax.c b/src/syntax.c
index 4e35956..48e7152 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -593,7 +593,6 @@ syn_sync(
int had_sync_point;
stateitem_T *cur_si;
synpat_T *spp;
- char_u *line;
int found_flags = 0;
int found_match_idx = 0;
linenr_T found_current_lnum = 0;
@@ -651,8 +650,9 @@ syn_sync(
*/
for ( ; start_lnum > 1; --start_lnum)
{
- line = ml_get(start_lnum - 1);
- if (*line == NUL || *(line + STRLEN(line) - 1) != '\\')
+ char_u *l = ml_get(start_lnum - 1);
+
+ if (*l == NUL || *(l + ml_get_len(start_lnum - 1) - 1) != '\\')
break;
}
current_lnum = start_lnum;
@@ -2775,7 +2775,6 @@ find_endpos(
regmmatch_T regmatch;
regmmatch_T best_regmatch; // startpos/endpos of best match
lpos_T pos;
- char_u *line;
int had_match = FALSE;
char_u buf_chartab[32]; // chartab array for syn option iskyeyword
@@ -2899,8 +2898,7 @@ find_endpos(
if (pos.lnum > startpos->lnum)
break;
- line = ml_get_buf(syn_buf, startpos->lnum, FALSE);
- line_len = (int)STRLEN(line);
+ line_len = ml_get_buf_len(syn_buf, startpos->lnum);
// take care of an empty match or negative offset
if (pos.col <= matchcol)
@@ -3101,7 +3099,7 @@ syn_add_start_off(
{
// a "\n" at the end of the pattern may take us below the last line
result->lnum = syn_buf->b_ml.ml_line_count;
- col = (int)STRLEN(ml_get_buf(syn_buf, result->lnum, FALSE));
+ col = ml_get_buf_len(syn_buf, result->lnum);
}
if (off != 0)
{
diff --git a/src/tag.c b/src/tag.c
index 893415f..2ac0da2 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -289,6 +289,9 @@ do_tag(
static char_u **matches = NULL;
static int flags;
+ if (postponed_split == 0 && !check_can_set_curbuf_forceit(forceit))
+ return FALSE;
+
#ifdef FEAT_EVAL
if (tfu_in_use)
{
@@ -395,7 +398,7 @@ do_tag(
tagstack_clear_entry(&tagstack[0]);
for (i = 1; i < tagstacklen; ++i)
tagstack[i - 1] = tagstack[i];
- --tagstackidx;
+ tagstack[--tagstackidx].user_data = NULL;
}
/*
@@ -3705,6 +3708,9 @@ jumpto_tag(
size_t len;
char_u *lbuf;
+ if (postponed_split == 0 && !check_can_set_curbuf_forceit(forceit))
+ return FAIL;
+
// Make a copy of the line, it can become invalid when an autocommand calls
// back here recursively.
len = matching_line_len(lbuf_arg) + 1;
diff --git a/src/term.c b/src/term.c
index dd59fdf..8aa86ce 100644
--- a/src/term.c
+++ b/src/term.c
@@ -625,7 +625,7 @@ static tcap_entry_T builtin_kitty[] = {
#ifdef FEAT_TERMGUICOLORS
/*
- * Additions for using the RGB colors
+ * Additions for using the RGB colors and terminal font
*/
static tcap_entry_T builtin_rgb[] = {
// These are printf strings, not terminal codes.
@@ -637,6 +637,14 @@ static tcap_entry_T builtin_rgb[] = {
};
#endif
+#ifdef HAVE_TGETENT
+static tcap_entry_T special_term[] = {
+ // These are printf strings, not terminal codes.
+ {(int)KS_CF, "\033[%dm"},
+ {(int)KS_NAME, NULL} // end marker
+};
+#endif
+
/*
* iris-ansi for Silicon Graphics machines.
*/
@@ -1235,6 +1243,7 @@ static tcap_entry_T builtin_debug[] = {
{(int)KS_U7, "[U7]"},
{(int)KS_RFG, "[RFG]"},
{(int)KS_RBG, "[RBG]"},
+ {(int)KS_CF, "[CF%d]"},
{K_UP, "[KU]"},
{K_DOWN, "[KD]"},
{K_LEFT, "[KL]"},
@@ -1754,6 +1763,7 @@ get_term_entries(int *height, int *width)
{KS_CBE, "BE"}, {KS_CBD, "BD"},
{KS_CST, "ST"}, {KS_CRT, "RT"},
{KS_SSI, "Si"}, {KS_SRI, "Ri"},
+ {KS_CF, "CF"},
{(enum SpecialKey)0, NULL}
};
int i;
@@ -2113,6 +2123,10 @@ set_termname(char_u *term)
&& term_strings_not_set(KS_8U))
apply_builtin_tcap(term, builtin_rgb, TRUE);
#endif
+#ifdef HAVE_TGETENT
+ if (term_strings_not_set(KS_CF))
+ apply_builtin_tcap(term, special_term, TRUE);
+#endif
}
/*
@@ -3116,6 +3130,17 @@ term_set_winsize(int height, int width)
}
#endif
+ void
+term_font(int n)
+{
+ if (*T_CFO)
+ {
+ char buf[20];
+ sprintf(buf, (char *)T_CFO, 9 + n);
+ OUT_STR(buf);
+ }
+}
+
static void
term_color(char_u *s, int n)
{
@@ -4986,6 +5011,8 @@ handle_u7_response(int *arg, char_u *tp UNUSED, int csi_len UNUSED)
#ifdef FEAT_EVAL
set_vim_var_string(VV_TERMU7RESP, tp, csi_len);
#endif
+ apply_autocmds(EVENT_TERMRESPONSEALL,
+ (char_u *)"ambiguouswidth", NULL, FALSE, curbuf);
}
}
else if (arg[0] == 3)
@@ -5595,6 +5622,8 @@ handle_csi(
#endif
apply_autocmds(EVENT_TERMRESPONSE,
NULL, NULL, FALSE, curbuf);
+ apply_autocmds(EVENT_TERMRESPONSEALL,
+ (char_u *)"version", NULL, FALSE, curbuf);
key_name[0] = (int)KS_EXTRA;
key_name[1] = (int)KE_IGNORE;
}
@@ -5621,6 +5650,8 @@ handle_csi(
# ifdef FEAT_EVAL
set_vim_var_string(VV_TERMBLINKRESP, tp, *slen);
# endif
+ apply_autocmds(EVENT_TERMRESPONSEALL,
+ (char_u *)"cursorblink", NULL, FALSE, curbuf);
}
#endif
@@ -5737,8 +5768,8 @@ handle_osc(char_u *tp, char_u *argp, int len, char_u *key_name, int *slen)
int rval, gval, bval;
rval = hexhex2nr(tp_r);
- gval = hexhex2nr(tp_b);
- bval = hexhex2nr(tp_g);
+ gval = hexhex2nr(tp_g);
+ bval = hexhex2nr(tp_b);
#endif
if (is_bg)
{
@@ -5784,6 +5815,8 @@ handle_osc(char_u *tp, char_u *argp, int len, char_u *key_name, int *slen)
set_vim_var_string(is_bg ? VV_TERMRBGRESP
: VV_TERMRFGRESP, tp, *slen);
#endif
+ apply_autocmds(EVENT_TERMRESPONSEALL,
+ is_bg ? (char_u *)"background" : (char_u *)"foreground", NULL, FALSE, curbuf);
break;
}
if (i == len)
@@ -5882,6 +5915,8 @@ handle_dcs(char_u *tp, char_u *argp, int len, char_u *key_name, int *slen)
#ifdef FEAT_EVAL
set_vim_var_string(VV_TERMSTYLERESP, tp, *slen);
#endif
+ apply_autocmds(EVENT_TERMRESPONSEALL,
+ (char_u *)"cursorshape", NULL, FALSE, curbuf);
break;
}
}
diff --git a/src/termdefs.h b/src/termdefs.h
index 9f72dc1..f28fd19 100644
--- a/src/termdefs.h
+++ b/src/termdefs.h
@@ -114,10 +114,11 @@ enum SpecialKey
KS_SSI, // save icon text
KS_SRI, // restore icon text
KS_FD, // disable focus event tracking
- KS_FE // enable focus event tracking
+ KS_FE, // enable focus event tracking
+ KS_CF // set terminal alternate font
};
-#define KS_LAST KS_FE
+#define KS_LAST KS_CF
/*
* the terminal capabilities are stored in this array
@@ -191,6 +192,7 @@ extern char_u *(term_strings[]); // current terminal strings
#define T_CAF (TERM_STR(KS_CAF)) // set foreground color (ANSI)
#define T_CAB (TERM_STR(KS_CAB)) // set background color (ANSI)
#define T_CAU (TERM_STR(KS_CAU)) // set underline color (ANSI)
+#define T_CFO (TERM_STR(KS_CF)) // set alternate font
#define T_LE (TERM_STR(KS_LE)) // cursor left
#define T_ND (TERM_STR(KS_ND)) // cursor right
#define T_CIS (TERM_STR(KS_CIS)) // set icon text start
diff --git a/src/terminal.c b/src/terminal.c
index a641a85..25a6a5d 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -3965,7 +3965,8 @@ update_system_term(term_T *term)
else
pos.col = 0;
- screen_line(curwin, term->tl_toprow + pos.row, 0, pos.col, Columns, 0);
+ screen_line(curwin, term->tl_toprow + pos.row, 0, pos.col, Columns, -1,
+ 0);
}
term->tl_dirty_row_start = MAX_ROW;
@@ -4088,7 +4089,7 @@ term_update_window(win_T *wp)
#ifdef FEAT_MENU
+ winbar_height(wp)
#endif
- , wp->w_wincol, pos.col, wp->w_width,
+ , wp->w_wincol, pos.col, wp->w_width, -1,
#ifdef FEAT_PROP_POPUP
popup_is_popup(wp) ? SLF_POPUP :
#endif
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index 1614cf0..c4403e6 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -248,6 +248,7 @@ NEW_TESTS = \
test_regexp_utf8 \
test_registers \
test_reltime \
+ test_remote \
test_rename \
test_restricted \
test_retab \
@@ -324,6 +325,7 @@ NEW_TESTS = \
test_window_cmd \
test_window_id \
test_windows_home \
+ test_winfixbuf \
test_wnext \
test_wordcount \
test_writefile \
@@ -492,6 +494,7 @@ NEW_TESTS_RES = \
test_recover.res \
test_regex_char_classes.res \
test_registers.res \
+ test_remote.res \
test_rename.res \
test_restricted.res \
test_retab.res \
@@ -555,6 +558,7 @@ NEW_TESTS_RES = \
test_window_cmd.res \
test_window_id.res \
test_windows_home.res \
+ test_winfixbuf.res \
test_wordcount.res \
test_writefile.res \
test_xxd.res \
diff --git a/src/testdir/check.vim b/src/testdir/check.vim
index 82abb64..e67d39a 100644
--- a/src/testdir/check.vim
+++ b/src/testdir/check.vim
@@ -160,6 +160,14 @@ func CheckEnv(name)
endif
endfunc
+" Command to Check for pure X11 (no Wayland)
+command -nargs=0 CheckX11 call CheckX11()
+func CheckX11()
+ if !empty($WAYLAND_DISPLAY) || empty($DISPLAY)
+ throw 'Skipped: not pure X11 environment'
+ endif
+endfunc
+
" Command to check that we are using the GUI
command CheckGui call CheckGui()
func CheckGui()
diff --git a/src/testdir/dumps/Test_balloon_eval_term_02.dump b/src/testdir/dumps/Test_balloon_eval_term_02.dump
index 51c5e32..f3bd633 100644
--- a/src/testdir/dumps/Test_balloon_eval_term_02.dump
+++ b/src/testdir/dumps/Test_balloon_eval_term_02.dump
@@ -1,6 +1,6 @@
|o+0&#ffffff0|n|e| |o|n|e| |o|n|e| @38
|t|w|o| |t|X|o| |t|w|o| @38
-|t|h|r|e|e+0&#e0e0e08| |t|h>r+0&#ffffff0|e@1| |t|h|r|e@1| @32
+|t|h|r|e|e+0#0000001#a8a8a8255| |t|h>r+0#0000000#ffffff0|e@1| |t|h|r|e@1| @32
|~+0#4040ff13&| @2| +0#0000001#ffd7ff255@17| +0#4040ff13#ffffff0@27
|~| @2| +0#0000001#ffd7ff255|l|i|n|e| |3| |c|o|l|u|m|n| |5|:| | +0#4040ff13#ffffff0@27
|~| @2| +0#0000001#ffd7ff255|e| |t|h|r|<| @10| +0#4040ff13#ffffff0@27
diff --git a/src/testdir/dumps/Test_conceal_cul_wcr_01.dump b/src/testdir/dumps/Test_conceal_cul_wcr_01.dump
new file mode 100644
index 0000000..9cb27c8
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_cul_wcr_01.dump
@@ -0,0 +1,4 @@
+|o+8&#ffffff0|n|e| |o|n|e| |o|n|e| @1|o|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n>e| @7
+@1|o|n|e| |o|n|e| |o|n|e| @27
+|~+0#4040ff13&| @38
+| +0#0000000&@21|1|,|4|0| @9|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_cul_wcr_02.dump b/src/testdir/dumps/Test_conceal_cul_wcr_02.dump
new file mode 100644
index 0000000..668e1af
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_cul_wcr_02.dump
@@ -0,0 +1,4 @@
+|o+8#ffffff16#e000002|n|e| |o|n|e| |o|n|e| @1|o|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n>e| @7
+@1|o|n|e| |o|n|e| |o|n|e| @27
+|~+0#4040ff13&| @38
+|:+0#0000000#ffffff0|s|e|t| |w|i|n|c|o|l|o|r|=|E|r@1|o|r|M|s|g|1|,|4|0| @9|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_cul_wcr_03.dump b/src/testdir/dumps/Test_conceal_cul_wcr_03.dump
new file mode 100644
index 0000000..965e9f5
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_cul_wcr_03.dump
@@ -0,0 +1,4 @@
+|o+0#ffffff16#e000002|n|e| |o|n|e| |o|n|e| @1|o|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n>e| @7
+@1|o|n|e| |o|n|e| |o|n|e| @27
+|~+0#4040ff13&| @38
+|:+0#0000000#ffffff0|s|e|t| |n|o|c|u|r|s|o|r|l|i|n|e| @4|1|,|4|0| @9|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_cul_wcr_rl_01.dump b/src/testdir/dumps/Test_conceal_cul_wcr_rl_01.dump
new file mode 100644
index 0000000..d1a31a6
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_cul_wcr_rl_01.dump
@@ -0,0 +1,4 @@
+| +8&#ffffff0@7>e|n|o| |e|n|o| |e|n|o| |e|n|o| |e|n|o| @1|e|n|o| |e|n|o| |e|n|o
+| @27|e|n|o| |e|n|o| |e|n|o|
+| +0#4040ff13&@38|~
+| +0#0000000&@21|1|,|4|0| @9|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_cul_wcr_rl_02.dump b/src/testdir/dumps/Test_conceal_cul_wcr_rl_02.dump
new file mode 100644
index 0000000..21809e9
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_cul_wcr_rl_02.dump
@@ -0,0 +1,4 @@
+| +8#ffffff16#e000002@7>e|n|o| |e|n|o| |e|n|o| |e|n|o| |e|n|o| @1|e|n|o| |e|n|o| |e|n|o
+| @27|e|n|o| |e|n|o| |e|n|o|
+| +0#4040ff13&@38|~
+|:+0#0000000#ffffff0|s|e|t| |w|i|n|c|o|l|o|r|=|E|r@1|o|r|M|s|g|1|,|4|0| @9|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_cul_wcr_rl_03.dump b/src/testdir/dumps/Test_conceal_cul_wcr_rl_03.dump
new file mode 100644
index 0000000..0eeb739
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_cul_wcr_rl_03.dump
@@ -0,0 +1,4 @@
+| +0#ffffff16#e000002@7>e|n|o| |e|n|o| |e|n|o| |e|n|o| |e|n|o| @1|e|n|o| |e|n|o| |e|n|o
+| @27|e|n|o| |e|n|o| |e|n|o|
+| +0#4040ff13&@38|~
+|:+0#0000000#ffffff0|s|e|t| |n|o|c|u|r|s|o|r|l|i|n|e| @4|1|,|4|0| @9|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_double_width_1.dump b/src/testdir/dumps/Test_conceal_double_width_1.dump
new file mode 100644
index 0000000..57353bb
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_double_width_1.dump
@@ -0,0 +1,4 @@
+|a+0&#ffffff0@4|β+0#e0e0e08#6c6c6c255|b+0#0000000#ffffff0@4|β+0#e0e0e08#6c6c6c255|c+0#0000000#ffffff0@3>c| @11| +0&#ffd7d7255| +0&#ffffff0@44
+|f|o@1|b|a|r| @22| +0&#ffd7d7255| +0&#ffffff0@44
+|~+0#4040ff13&| @73
+| +0#0000000&@56|1|,|2|9|-|2|5| @6|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_double_width_2.dump b/src/testdir/dumps/Test_conceal_double_width_2.dump
new file mode 100644
index 0000000..782db47
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_double_width_2.dump
@@ -0,0 +1,4 @@
+|a+0&#ffffff0@4|β+0#e0e0e08#6c6c6c255|b+0#0000000#ffffff0@1>b@2|β+0#e0e0e08#6c6c6c255|c+0#0000000#ffffff0@4| @11| +0&#ffd7d7255| +0&#ffffff0@44
+|f|o@1|b|a|r| @22| +0&#ffd7d7255| +0&#ffffff0@44
+|~+0#4040ff13&| @73
+| +0#0000000&@56|1|,|1|5|-|1|3| @6|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_double_width_3.dump b/src/testdir/dumps/Test_conceal_double_width_3.dump
new file mode 100644
index 0000000..5102c7b
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_double_width_3.dump
@@ -0,0 +1,4 @@
+|a+0&#ffffff0@4|b@1>b@2|c@4| @13| +0&#ffd7d7255| +0&#ffffff0@44
+|f|o@1|b|a|r| @22| +0&#ffd7d7255| +0&#ffffff0@44
+|~+0#4040ff13&| @73
+|:+0#0000000&|s|e|t| |c|o|n|c|e|a|l@1|e|v|e|l|=|3| @37|1|,|1|5|-|1|3| @6|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_double_width_4.dump b/src/testdir/dumps/Test_conceal_double_width_4.dump
new file mode 100644
index 0000000..8ef8b96
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_double_width_4.dump
@@ -0,0 +1,4 @@
+|a+0&#ffffff0@4|b@4|c@3>c| @13| +0&#ffd7d7255| +0&#ffffff0@44
+|f|o@1|b|a|r| @22| +0&#ffd7d7255| +0&#ffffff0@44
+|~+0#4040ff13&| @73
+|:+0#0000000&|s|e|t| |c|o|n|c|e|a|l@1|e|v|e|l|=|3| @37|1|,|2|9|-|2|5| @6|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_double_width_wrap_1.dump b/src/testdir/dumps/Test_conceal_double_width_wrap_1.dump
new file mode 100644
index 0000000..e794b7c
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_double_width_wrap_1.dump
@@ -0,0 +1,4 @@
+|a+0&#ffffff0@9|β+0#e0e0e08#6c6c6c255|b+0#0000000#ffffff0@4| @3
+|b@4|β+0#e0e0e08#6c6c6c255|c+0#0000000#ffffff0@8>c| @3
+|~+0#4040ff13&| @18
+| +0#0000000&@9|1|,|4@1|-|4|0| @2
diff --git a/src/testdir/dumps/Test_conceal_double_width_wrap_2.dump b/src/testdir/dumps/Test_conceal_double_width_wrap_2.dump
new file mode 100644
index 0000000..36e64fc
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_double_width_wrap_2.dump
@@ -0,0 +1,4 @@
+|a+0&#ffffff0@9|β+0#e0e0e08#6c6c6c255|b+0#0000000#ffffff0@4| @3
+>b@4|β+0#e0e0e08#6c6c6c255|c+0#0000000#ffffff0@9| @3
+|~+0#4040ff13&| @18
+| +0#0000000&@9|1|,|2|3|-|2|1| @2
diff --git a/src/testdir/dumps/Test_conceal_double_width_wrap_3.dump b/src/testdir/dumps/Test_conceal_double_width_wrap_3.dump
new file mode 100644
index 0000000..ba6c835
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_double_width_wrap_3.dump
@@ -0,0 +1,4 @@
+|a+0&#ffffff0@9|b@4| @4
+>b@4|c@9| @4
+|~+0#4040ff13&| @18
+|:+0#0000000&|s|e|t| |c|o|n|c|e|1|,|2|3|-|2|1| @2
diff --git a/src/testdir/dumps/Test_conceal_double_width_wrap_4.dump b/src/testdir/dumps/Test_conceal_double_width_wrap_4.dump
new file mode 100644
index 0000000..8997e98
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_double_width_wrap_4.dump
@@ -0,0 +1,4 @@
+|a+0&#ffffff0@9|b@4| @4
+|b@4|c@8>c| @4
+|~+0#4040ff13&| @18
+|:+0#0000000&| @8|1|,|4@1|-|4|0| @2
diff --git a/src/testdir/dumps/Test_conceal_ve_after_eol_1.dump b/src/testdir/dumps/Test_conceal_ve_after_eol_1.dump
new file mode 100644
index 0000000..635c6db
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_ve_after_eol_1.dump
@@ -0,0 +1,3 @@
+|a+0&#ffffff0|b|c|d|e|f|g|h|i|j|k|l|m|n|p|o>p| @57
+|~+0#4040ff13&| @73
+| +0#0000000&@56|1|,|2|5| @9|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_ve_after_eol_2.dump b/src/testdir/dumps/Test_conceal_ve_after_eol_2.dump
new file mode 100644
index 0000000..ecdc5a3
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_ve_after_eol_2.dump
@@ -0,0 +1,3 @@
+|a+0&#ffffff0|b|c|d|e|f|g|h|i|j|k|l|m|n|p|o|p> @57
+|~+0#4040ff13&| @73
+| +0#0000000&@56|1|,|2|6| @9|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_ve_after_eol_3.dump b/src/testdir/dumps/Test_conceal_ve_after_eol_3.dump
new file mode 100644
index 0000000..5eff9fa
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_ve_after_eol_3.dump
@@ -0,0 +1,3 @@
+|a+0&#ffffff0|b|c|d|e|f|g|h|i|j|k|l|m|n|p|o|p| > @56
+|~+0#4040ff13&| @73
+| +0#0000000&@56|1|,|2|6|-|2|7| @6|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_ve_after_eol_4.dump b/src/testdir/dumps/Test_conceal_ve_after_eol_4.dump
new file mode 100644
index 0000000..0b2120a
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_ve_after_eol_4.dump
@@ -0,0 +1,3 @@
+|a+0&#ffffff0|b|c|d|e|f|g|h|i|j|k|l|m|n|p|o|p| @1> @55
+|~+0#4040ff13&| @73
+| +0#0000000&@56|1|,|2|6|-|2|8| @6|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_ve_after_eol_5.dump b/src/testdir/dumps/Test_conceal_ve_after_eol_5.dump
new file mode 100644
index 0000000..2aa8644
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_ve_after_eol_5.dump
@@ -0,0 +1,3 @@
+|a+0&#ffffff0|b|c|d|e|f|g|h|i|j|k|l|m|n|p|o|p| @1>r| @54
+|~+0#4040ff13&| @73
+| +0#0000000&@56|1|,|2|8| @9|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_ve_after_eol_rl_1.dump b/src/testdir/dumps/Test_conceal_ve_after_eol_rl_1.dump
new file mode 100644
index 0000000..840e19b
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_ve_after_eol_rl_1.dump
@@ -0,0 +1,3 @@
+| +0&#ffffff0@57>p|o|p|n|m|l|k|j|i|h|g|f|e|d|c|b|a
+| +0#4040ff13&@73|~
+| +0#0000000&@56|1|,|2|5| @9|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_ve_after_eol_rl_2.dump b/src/testdir/dumps/Test_conceal_ve_after_eol_rl_2.dump
new file mode 100644
index 0000000..c4b0190
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_ve_after_eol_rl_2.dump
@@ -0,0 +1,3 @@
+| +0&#ffffff0@56> |p|o|p|n|m|l|k|j|i|h|g|f|e|d|c|b|a
+| +0#4040ff13&@73|~
+| +0#0000000&@56|1|,|2|6| @9|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_ve_after_eol_rl_3.dump b/src/testdir/dumps/Test_conceal_ve_after_eol_rl_3.dump
new file mode 100644
index 0000000..e4a05f7
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_ve_after_eol_rl_3.dump
@@ -0,0 +1,3 @@
+| +0&#ffffff0@55> @1|p|o|p|n|m|l|k|j|i|h|g|f|e|d|c|b|a
+| +0#4040ff13&@73|~
+| +0#0000000&@56|1|,|2|6|-|2|7| @6|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_ve_after_eol_rl_4.dump b/src/testdir/dumps/Test_conceal_ve_after_eol_rl_4.dump
new file mode 100644
index 0000000..9f21657
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_ve_after_eol_rl_4.dump
@@ -0,0 +1,3 @@
+| +0&#ffffff0@54> @2|p|o|p|n|m|l|k|j|i|h|g|f|e|d|c|b|a
+| +0#4040ff13&@73|~
+| +0#0000000&@56|1|,|2|6|-|2|8| @6|A|l@1|
diff --git a/src/testdir/dumps/Test_conceal_ve_after_eol_rl_5.dump b/src/testdir/dumps/Test_conceal_ve_after_eol_rl_5.dump
new file mode 100644
index 0000000..7d2dad6
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_ve_after_eol_rl_5.dump
@@ -0,0 +1,3 @@
+| +0&#ffffff0@54>r| @1|p|o|p|n|m|l|k|j|i|h|g|f|e|d|c|b|a
+| +0#4040ff13&@73|~
+| +0#0000000&@56|1|,|2|8| @9|A|l@1|
diff --git a/src/testdir/dumps/Test_cursorline_with_visualmode_01.dump b/src/testdir/dumps/Test_cursorline_with_visualmode_01.dump
index b6e20b7..326abac 100644
--- a/src/testdir/dumps/Test_cursorline_with_visualmode_01.dump
+++ b/src/testdir/dumps/Test_cursorline_with_visualmode_01.dump
@@ -1,9 +1,9 @@
-|a+0&#e0e0e08|b|c| | +0&#ffffff0@70
-|a+0&#e0e0e08|b|c| | +0&#ffffff0@70
-|a+0&#e0e0e08|b|c| | +0&#ffffff0@70
-|a+0&#e0e0e08|b|c| | +0&#ffffff0@70
-|a+0&#e0e0e08|b|c| | +0&#ffffff0@70
->a|b+0&#e0e0e08|c| | +0&#ffffff0@70
+|a+0#0000001#a8a8a8255|b|c| | +0#0000000#ffffff0@70
+|a+0#0000001#a8a8a8255|b|c| | +0#0000000#ffffff0@70
+|a+0#0000001#a8a8a8255|b|c| | +0#0000000#ffffff0@70
+|a+0#0000001#a8a8a8255|b|c| | +0#0000000#ffffff0@70
+|a+0#0000001#a8a8a8255|b|c| | +0#0000000#ffffff0@70
+>a|b+0#0000001#a8a8a8255|c| | +0#0000000#ffffff0@70
|a|b|c| @71
|a|b|c| @71
|a|b|c| @71
diff --git a/src/testdir/dumps/Test_difffunc_diffexpr_1.dump b/src/testdir/dumps/Test_difffunc_diffexpr_1.dump
new file mode 100644
index 0000000..b103cc8
--- /dev/null
+++ b/src/testdir/dumps/Test_difffunc_diffexpr_1.dump
@@ -0,0 +1,12 @@
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|z+0#0000000#5fd7ff255|e|r|o| @30
+| +0#0000e05#a8a8a8255@1>o+0#0000000#ffffff0|n|e| @31||+1&&| +0#0000e05#a8a8a8255@1|o+0#0000000#ffffff0|n|e| @31
+| +0#0000e05#a8a8a8255@1|t+0#0000000#ffd7ff255|w|o|x+2&#ff404010| +0&#ffd7ff255@30||+1&#ffffff0| +0#0000e05#a8a8a8255@1|t+0#0000000#ffd7ff255|w|o| @31
+| +0#0000e05#a8a8a8255@1|t+0#0000000#ffffff0|h|r|e@1| @29||+1&&| +0#0000e05#a8a8a8255@1|t+0#0000000#ffffff0|h|r|e@1| @29
+| +0#0000e05#a8a8a8255@1|f+0#0000000#5fd7ff255|o|u|r| @30||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
+|~+0&#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|X+3#0000000&|d|i|f@2|u|n|c|2|.|t|x|t| @4|1|,|1| @11|A|l@1| |X+1&&|d|i|f@2|u|n|c|1|.|t|x|t| @4|1|,|1| @11|A|l@1
+|"+0&&|X|d|i|f@2|u|n|c|2|.|t|x|t|"| |4|L|,| |2|0|B| @50
diff --git a/src/testdir/dumps/Test_display_scroll_update_visual.dump b/src/testdir/dumps/Test_display_scroll_update_visual.dump
index c174390..4b17a3b 100644
--- a/src/testdir/dumps/Test_display_scroll_update_visual.dump
+++ b/src/testdir/dumps/Test_display_scroll_update_visual.dump
@@ -1,4 +1,4 @@
-| +0#0000e05#a8a8a8255@1>f+0#0000000#ffffff0|o+0&#e0e0e08@1| | +0&#ffffff0@53
+| +0#0000e05#a8a8a8255@1>f+0#0000000#ffffff0|o+0#0000001#a8a8a8255@1| | +0#0000000#ffffff0@53
| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @54
| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @54
| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @54
diff --git a/src/testdir/dumps/Test_drop_modified_1.dump b/src/testdir/dumps/Test_drop_modified_1.dump
new file mode 100644
index 0000000..bbd60c0
--- /dev/null
+++ b/src/testdir/dumps/Test_drop_modified_1.dump
@@ -0,0 +1,10 @@
+>T+0&#ffffff0|h|e| |q|u|i|c|k| |b|r|o|w|n| |f|o|x| |j|u|m|p|e|d| |o|v|e|r| |t|h|e| |l|a|z|y| |d|o|g|s| @29
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|:+0#0000000&|d|r|o|p| |X|d|r|o|p|_|m|o|d|i|f|i|e|d|.|t|x|t| @32|1|,|1| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_echowin_showmode.dump b/src/testdir/dumps/Test_echowin_showmode.dump
index 24eb4d0..9a73bbf 100644
--- a/src/testdir/dumps/Test_echowin_showmode.dump
+++ b/src/testdir/dumps/Test_echowin_showmode.dump
@@ -1,4 +1,4 @@
->o+0&#ffffff0|n+0&#e0e0e08|e| | +0&#ffffff0@70
+>o+0&#ffffff0|n+0#0000001#a8a8a8255|e| | +0#0000000#ffffff0@70
|t|w|o| @71
|~+0#4040ff13&| @73
|~| @73
diff --git a/src/testdir/dumps/Test_hlsearch_visual_1.dump b/src/testdir/dumps/Test_hlsearch_visual_1.dump
index 99150db..e65d567 100644
--- a/src/testdir/dumps/Test_hlsearch_visual_1.dump
+++ b/src/testdir/dumps/Test_hlsearch_visual_1.dump
@@ -1,6 +1,6 @@
-|x+0&#ffffff0@2| |y+2&#ffff4012|y+2&#e0e0e08@1| +0&&|z@2| | +0&#ffffff0@27
-|x+0&#e0e0e08@2| |y+2&&@2| +0&&|z@2| | +0&#ffffff0@27
-|x+0&#e0e0e08@2| |y+2&&>y+2&#ffff4012@1| +0&#ffffff0|z@2| @28
+|x+0&#ffffff0@2| |y+2&#ffff4012|y+2#0000001#a8a8a8255@1| +0&&|z@2| | +0#0000000#ffffff0@27
+|x+0#0000001#a8a8a8255@2| |y+2&&@2| +0&&|z@2| | +0#0000000#ffffff0@27
+|x+0#0000001#a8a8a8255@2| |y+2&&>y+2#0000000#ffff4012@1| +0&#ffffff0|z@2| @28
|~+0#4040ff13&| @38
|~| @38
|-+2#0000000&@1| |V|I|S|U|A|L| |-@1|3+0&&| @8|3|,|6| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_matchparen_win_execute_1.dump b/src/testdir/dumps/Test_matchparen_win_execute_1.dump
new file mode 100644
index 0000000..75ab210
--- /dev/null
+++ b/src/testdir/dumps/Test_matchparen_win_execute_1.dump
@@ -0,0 +1,5 @@
+>{+0&#40ffff15|}| +0&#ffffff0@72
+|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|1| @11|A|l@1
+|{+0&&|}| @72
+|[+1&&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|1| @11|A|l@1
+| +0&&@74
diff --git a/src/testdir/dumps/Test_number_insert_delete_lines_1.dump b/src/testdir/dumps/Test_number_insert_delete_lines_1.dump
new file mode 100644
index 0000000..5aecb46
--- /dev/null
+++ b/src/testdir/dumps/Test_number_insert_delete_lines_1.dump
@@ -0,0 +1,8 @@
+| +0#af5f00255#ffffff0@1|1| |1+0#0000000&| @69
+| +0#af5f00255&@1|2| >2+0#0000000&| @69
+| +0#af5f00255&@1|3| |3+0#0000000&| @69
+| +0#af5f00255&@1|4| |4+0#0000000&| @69
+| +0#af5f00255&@1|5| |5+0#0000000&| @69
+| +0#af5f00255&@1|6| |6+0#0000000&| @69
+| +0#af5f00255&@1|7| |7+0#0000000&| @69
+@57|2|,|1| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_number_insert_delete_lines_2.dump b/src/testdir/dumps/Test_number_insert_delete_lines_2.dump
new file mode 100644
index 0000000..dea68e8
--- /dev/null
+++ b/src/testdir/dumps/Test_number_insert_delete_lines_2.dump
@@ -0,0 +1,8 @@
+| +0#af5f00255#ffffff0@1|1| |1+0#0000000&| @69
+| +0#af5f00255&@1|2| >3+0#0000000&| @69
+| +0#af5f00255&@1|3| |4+0#0000000&| @69
+| +0#af5f00255&@1|4| |5+0#0000000&| @69
+| +0#af5f00255&@1|5| |6+0#0000000&| @69
+| +0#af5f00255&@1|6| |7+0#0000000&| @69
+|~+0#4040ff13&| @73
+| +0#0000000&@56|2|,|1| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_number_insert_delete_lines_3.dump b/src/testdir/dumps/Test_number_insert_delete_lines_3.dump
new file mode 100644
index 0000000..fff3297
--- /dev/null
+++ b/src/testdir/dumps/Test_number_insert_delete_lines_3.dump
@@ -0,0 +1,8 @@
+| +0#af5f00255#ffffff0@1|1| |1+0#0000000&| @69
+| +0#af5f00255&@1|2| >4+0#0000000&| @69
+| +0#af5f00255&@1|3| |5+0#0000000&| @69
+| +0#af5f00255&@1|4| |6+0#0000000&| @69
+| +0#af5f00255&@1|5| |7+0#0000000&| @69
+|~+0#4040ff13&| @73
+|~| @73
+| +0#0000000&@56|2|,|1| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_popup_command_03.dump b/src/testdir/dumps/Test_popup_command_03.dump
index fa2ac70..2a0c5af 100644
--- a/src/testdir/dumps/Test_popup_command_03.dump
+++ b/src/testdir/dumps/Test_popup_command_03.dump
@@ -1,5 +1,5 @@
|o+0&#ffffff0|n|e| |t|w|o| |t|h|r|e@1| |f|o|u|r| |f|i|v|e| @51
-|a|n|d| |o|n|e| |t|w|o| |X+0&#e0e0e08|t|h|r|e@1> +0&#ffffff0|f|o|u|r| |f|i|v|e| @46
+|a|n|d| |o|n|e| |t|w|o| |X+0#0000001#a8a8a8255|t|h|r|e@1> +0#0000000#ffffff0|f|o|u|r| |f|i|v|e| @46
|o|n|e| |m|o|r|e| |t|w|o| |t|h|r|e@1| |f|o|u|r| |f|i|v|e| @46
|~+0#4040ff13&| @73
|~| @73
diff --git a/src/testdir/dumps/Test_prop_above_below_empty_1.dump b/src/testdir/dumps/Test_prop_above_below_empty_1.dump
index f470016..1cc6d01 100644
--- a/src/testdir/dumps/Test_prop_above_below_empty_1.dump
+++ b/src/testdir/dumps/Test_prop_above_below_empty_1.dump
@@ -1,16 +1,16 @@
-| +0#af5f00255#ffffff0@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255#ffffff0@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|1| |1+0#0000000&@7| @47
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|2| | +0#0000000&@55
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|3| |3+0#0000000&@8| @46
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|4| | +0#0000000&@55
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|5| >5+0#0000000&@10| @44
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
@42|5|,|1|-|5|7| @7|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_above_below_empty_2.dump b/src/testdir/dumps/Test_prop_above_below_empty_2.dump
index 3954a4b..db11724 100644
--- a/src/testdir/dumps/Test_prop_above_below_empty_2.dump
+++ b/src/testdir/dumps/Test_prop_above_below_empty_2.dump
@@ -1,16 +1,16 @@
-| +0#af5f00255#ffffff0@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255#ffffff0@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|1| |1+0#0000000&@7|$+0#4040ff13&| +0#0000000&@46
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|2| |$+0#4040ff13&| +0#0000000&@54
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|3| |3+0#0000000&@8|$+0#4040ff13&| +0#0000000&@45
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|4| |$+0#4040ff13&| +0#0000000&@54
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|5| >5+0#0000000&@10|$+0#4040ff13&| +0#0000000&@43
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
|:|s|e|t| |l|i|s|t| @32|5|,|1|-|5|7| @7|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_above_below_empty_3.dump b/src/testdir/dumps/Test_prop_above_below_empty_3.dump
index 27f9eec..78f30b7 100644
--- a/src/testdir/dumps/Test_prop_above_below_empty_3.dump
+++ b/src/testdir/dumps/Test_prop_above_below_empty_3.dump
@@ -1,16 +1,16 @@
-| +0#af5f00255#ffffff0@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255#ffffff0@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|1| |1+0#0000000&@7| | +0&#ffd7d7255| +0&#ffffff0@45
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|2| | +0#0000000&@8| +0&#ffd7d7255| +0&#ffffff0@45
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|3| |3+0#0000000&@8| +0&#ffd7d7255| +0&#ffffff0@45
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|4| | +0#0000000&@8| +0&#ffd7d7255| +0&#ffffff0@45
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|5| >5+0#0000000&@8|5+0&#ffd7d7255|5+0&#ffffff0| @44
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
|:| @40|5|,|1|-|5|7| @7|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_above_below_empty_4.dump b/src/testdir/dumps/Test_prop_above_below_empty_4.dump
index cc3c27d..2c7bf4d 100644
--- a/src/testdir/dumps/Test_prop_above_below_empty_4.dump
+++ b/src/testdir/dumps/Test_prop_above_below_empty_4.dump
@@ -1,16 +1,16 @@
-| +0#af5f00255#ffffff0@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255#ffffff0@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|4| |1+0#0000000&@7| @47
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|3| | +0#0000000&@55
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|2| |3+0#0000000&@8| @46
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|1| | +0#0000000&@55
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
|5+0#af5f00255&| @2>5+0#0000000&@10| @44
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
|:| @40|5|,|1|-|5|7| @7|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_above_below_empty_5.dump b/src/testdir/dumps/Test_prop_above_below_empty_5.dump
index 5ee4d80..1928ea2 100644
--- a/src/testdir/dumps/Test_prop_above_below_empty_5.dump
+++ b/src/testdir/dumps/Test_prop_above_below_empty_5.dump
@@ -1,16 +1,16 @@
-| +0#af5f00255#ffffff0@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255#ffffff0@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|2| |1+0#0000000&@7| @47
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|1| | +0#0000000&@55
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
|3+0#af5f00255&| @2>3+0#0000000&@8| @46
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|1| | +0#0000000&@55
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
-| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#af5f00255&@1|2| |5+0#0000000&@10| @44
-| +0#af5f00255&@3|++0#0000001#ffff4012@2| +0#0000000#ffffff0@52
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
|:| @40|3|,|1|-|5|7| @7|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_above_below_empty_6.dump b/src/testdir/dumps/Test_prop_above_below_empty_6.dump
new file mode 100644
index 0000000..5013643
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_above_below_empty_6.dump
@@ -0,0 +1,16 @@
+| +0#af5f00255#ffffff0@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@1|1| |1+0#0000000&@7| @47
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
+|2+0#af5f00255&| @2> +0#0000000&@55
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@1|1| |3+0#0000000&@8| @46
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@1|2| | +0#0000000&@55
+| +0#af5f00255&@3|++0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|-+0#0000001#ffff4012| +0#0000000#ffffff0@54
+| +0#af5f00255&@3|!+0#0000001#ffff4012| +0#0000000#ffffff0@54
+|@+0#4040ff13&@2| @56
+|:+0#0000000&|c|a|l@1| |A|d@1|M|o|r|e|(|)| @26|2|,|0|-|5|7| @7|T|o|p|
diff --git a/src/testdir/dumps/Test_prop_inserts_text_1.dump b/src/testdir/dumps/Test_prop_inserts_text_1.dump
index 7d1b102..7a51c12 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_1.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_1.dump
@@ -1,6 +1,6 @@
|i+0&#ffffff0|n|s|e|r|t| |s|o|m|e| |t|e|x|t| |S+0#ffffff16#e000002|O|M|E| |h+0#0000000#ffffff0|e|r|e| |a|n|d| |o|t|h|e|r| |t|e|x|t| |O+0&#ffff4012|T|H|E|R| |t+0&#ffffff0|h|e|r|e| |a|n|d| |s|o
|m|e| |m|o|r|e| |t|e|x|t| |a|f|t|e|r| |M+0&#5fd7ff255|O|R|E| |w+0&#ffffff0|r|a|p@1|i|n>g| @27
-|p|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s|t| @40
+|p|r|e|s+0#0000001#a8a8a8255|ö|m|e|和*&|平|t+&|é|x|t|p+0#0000000#ffffff0|o|s|t| @40
|F|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=|1+0#0000000&|,| |.+0#0000e05&|y|=|2+0#0000000&| |}|;| @34
|e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@49
|l|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @42
diff --git a/src/testdir/dumps/Test_prop_inserts_text_2.dump b/src/testdir/dumps/Test_prop_inserts_text_2.dump
index 2a5b2f3..c9c325f 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_2.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_2.dump
@@ -1,6 +1,6 @@
| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|s|e|r|t| |s|o|m|e| |t|e|x|t| |S+0#ffffff16#e000002|O|M|E| |h+0#0000000#ffffff0|e|r|e| |a|n|d| |o|t|h|e|r| |t|e|x|t| |O+0&#ffff4012|T|H|E|R| |t+0&#ffffff0|h|e|r|e| |a|n|d|
| +0#0000e05#a8a8a8255@1|s+0#0000000#ffffff0|o|m|e| |m|o|r|e| |t|e|x|t| |a|f|t|e|r| |M+0&#5fd7ff255|O|R|E| |w+0&#ffffff0|r|a|p@1|i|n>g| @23
-| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s|t| @38
+| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0#0000001#a8a8a8255|ö|m|e|和*&|平|t+&|é|x|t|p+0#0000000#ffffff0|o|s|t| @38
| +0#0000e05#a8a8a8255@1|F+0#0000000#ffffff0|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=|1+0#0000000&|,| |.+0#0000e05&|y|=|2+0#0000000&| |}|;| @32
| +0#0000e05#a8a8a8255@1|e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@47
| +0#0000e05#a8a8a8255@1|l+0#0000000#ffffff0|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @40
diff --git a/src/testdir/dumps/Test_prop_inserts_text_3.dump b/src/testdir/dumps/Test_prop_inserts_text_3.dump
index 36a4b8c..2b93554 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_3.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_3.dump
@@ -1,6 +1,6 @@
| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|s|e|r|t| |s|o|m|e| |t|e|x|t| |S+0#ffffff16#e000002|O|M|E| |h+0#0000000#ffffff0|e|r|e| |a|n|d| |o|t|h|e|r| |t|e|x|t| |O+0&#ffff4012|T|H|E|R| |t+0&#ffffff0|h|e|r|e| |a|n|d|
| +0#0000e05#a8a8a8255@1|s+0#0000000#ffffff0|o|m|e| |m|o|r|e| |t|e|x|t| |a|f|t|e|r| |M+0&#5fd7ff255|O|R|E| |w+0&#ffffff0|r|a|p@1|i|n|g| @23
-| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s>t| @38
+| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0#0000001#a8a8a8255|ö|m|e|和*&|平|t+&|é|x|t|p+0#0000000#ffffff0|o|s>t| @38
| +0#0000e05#a8a8a8255@1|F+0#0000000#ffffff0|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=|1+0#0000000&|,| |.+0#0000e05&|y|=|2+0#0000000&| |}|;| @32
| +0#0000e05#a8a8a8255@1|e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@47
| +0#0000e05#a8a8a8255@1|l+0#0000000#ffffff0|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @40
diff --git a/src/testdir/dumps/Test_prop_inserts_text_4.dump b/src/testdir/dumps/Test_prop_inserts_text_4.dump
index 8bb637a..83e656a 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_4.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_4.dump
@@ -1,6 +1,6 @@
| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|s|e|r|t| |s|o|m|e| |t|e|x|t| |S+0#ffffff16#e000002|O|M|E| |h+0#0000000#ffffff0|e|r|e| |a|n|d| |o|t|h|e|r| |t|e|x|t| |O+0&#ffff4012|T|H|E|R| |t+0&#ffffff0|h|e|r|e| |a|n|d|
| +0#0000e05#a8a8a8255@1|s+0#0000000#ffffff0|o|m|e| |m|o|r|e| |t|e|x|t| |a|f|t|e|r| |M+0&#5fd7ff255|O|R|E| |w+0&#ffffff0|r|a|p@1|i|n|g| @23
-| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s|t| @38
+| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0#0000001#a8a8a8255|ö|m|e|和*&|平|t+&|é|x|t|p+0#0000000#ffffff0|o|s|t| @38
| +0#0000e05#a8a8a8255@1|F+0#0000000#ffffff0|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=>1+0#0000000&|,| |.+0#0000e05&|y|=|2+0#0000000&| |}|;| @32
| +0#0000e05#a8a8a8255@1|e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@47
| +0#0000e05#a8a8a8255@1|l+0#0000000#ffffff0|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @40
diff --git a/src/testdir/dumps/Test_prop_inserts_text_5.dump b/src/testdir/dumps/Test_prop_inserts_text_5.dump
index 75194f6..2885d4d 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_5.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_5.dump
@@ -1,6 +1,6 @@
| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|s|e|r|t| |s|o|m|e| |t|e|x|t| |S+0#ffffff16#e000002|O|M|E| |h+0#0000000#ffffff0|e|r|e| |a|n|d| |o|t|h|e|r| |t|e|x|t| |O+0&#ffff4012|T|H|E|R| |t+0&#ffffff0|h|e|r|e| |a|n|d|
| +0#0000e05#a8a8a8255@1|s+0#0000000#ffffff0|o|m|e| |m|o|r|e| |t|e|x|t| |a|f|t|e|r| |M+0&#5fd7ff255|O|R|E| |w+0&#ffffff0|r|a|p@1|i|n|g| @23
-| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s|t| @38
+| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0#0000001#a8a8a8255|ö|m|e|和*&|平|t+&|é|x|t|p+0#0000000#ffffff0|o|s|t| @38
| +0#0000e05#a8a8a8255@1|F+0#0000000#ffffff0|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=|1+0#0000000&|,| |.+0#0000e05&|y|=>2+0#0000000&| |}|;| @32
| +0#0000e05#a8a8a8255@1|e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@47
| +0#0000e05#a8a8a8255@1|l+0#0000000#ffffff0|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @40
diff --git a/src/testdir/dumps/Test_prop_inserts_text_6.dump b/src/testdir/dumps/Test_prop_inserts_text_6.dump
index fb25ddf..5aeddb4 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_6.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_6.dump
@@ -1,6 +1,6 @@
| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|s|e|r|t| |s|o|m|e| |t|e|x|t| |S+0#ffffff16#e000002|O|M|E| |h+0#0000000#ffffff0|e|r|e| |a|n|d| |o|t|h|e|r| |t|e|x|t| |O+0&#ffff4012|T|H|E|R| |t+0&#ffffff0|h|e|r|e| |a|n|d|
| +0#0000e05#a8a8a8255@1|s+0#0000000#ffffff0|o|m|e| |m|o|r|e| |t|e|x|t| |a|f|t|e|r| |M+0&#5fd7ff255|O|R|E| |w+0&#ffffff0|r|a|p@1|i|n|g| @23
-| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s|t| @38
+| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0#0000001#a8a8a8255|ö|m|e|和*&|平|t+&|é|x|t|p+0#0000000#ffffff0|o|s|t| @38
| +0#0000e05#a8a8a8255@1|F+0#0000000#ffffff0|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=|1+0#0000000&|,| |.+0#0000e05&|y|=|2+0#0000000&| |}|;| @32
| +0#0000e05#a8a8a8255@1>e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@47
| +0#0000e05#a8a8a8255@1|l+0#0000000#ffffff0|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @40
diff --git a/src/testdir/dumps/Test_prop_inserts_text_visual_block_2.dump b/src/testdir/dumps/Test_prop_inserts_text_visual_block_2.dump
index 2383b4a..48d8ebc 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_visual_block_2.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_visual_block_2.dump
@@ -1,6 +1,6 @@
-|1+0&#e0e0e08|2|3+0&#ffffff0|4|5|6|7|8|9| @50
-|1+0&#e0e0e08|-+0#e000e06#ffffff0|å£*&|-+&|2+0#0000000&|3|4|5|6|7|8|9| @46
-|1+0&#e0e0e08|2|å£*0#e000e06#ffffff0|3+0#0000000&|4|5|6|7|8|9| @48
-|1+0&#e0e0e08>2+0&#ffffff0|3|4|5|6|7|8|9| @50
+|1+0#0000001#a8a8a8255|2|3+0#0000000#ffffff0|4|5|6|7|8|9| @50
+|1+0#0000001#a8a8a8255|-+0#e000e06#ffffff0|å£*&|-+&|2+0#0000000&|3|4|5|6|7|8|9| @46
+|1+0#0000001#a8a8a8255|2|å£*0#e000e06#ffffff0|3+0#0000000&|4|5|6|7|8|9| @48
+|1+0#0000001#a8a8a8255>2+0#0000000#ffffff0|3|4|5|6|7|8|9| @50
|~+0#4040ff13&| @58
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@13|4|x|2| @6|4|,|2| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_inserts_text_visual_block_3.dump b/src/testdir/dumps/Test_prop_inserts_text_visual_block_3.dump
index 920cb1d..0234ba4 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_visual_block_3.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_visual_block_3.dump
@@ -1,6 +1,6 @@
-|1+0&#e0e0e08|2|3|4+0&#ffffff0|5|6|7|8|9| @50
-|1+0&#e0e0e08|-+0#e000e06#ffffff0|å£*&|-+&|2+0#0000000&|3|4|5|6|7|8|9| @46
-|1+0&#e0e0e08|2|å£*0#e000e06#ffffff0|3+0#0000000&|4|5|6|7|8|9| @48
-|1+0&#e0e0e08|2>3+0&#ffffff0|4|5|6|7|8|9| @50
+|1+0#0000001#a8a8a8255|2|3|4+0#0000000#ffffff0|5|6|7|8|9| @50
+|1+0#0000001#a8a8a8255|-+0#e000e06#ffffff0|å£*&|-+&|2+0#0000000&|3|4|5|6|7|8|9| @46
+|1+0#0000001#a8a8a8255|2|å£*0#e000e06#ffffff0|3+0#0000000&|4|5|6|7|8|9| @48
+|1+0#0000001#a8a8a8255|2>3+0#0000000#ffffff0|4|5|6|7|8|9| @50
|~+0#4040ff13&| @58
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@13|4|x|3| @6|4|,|3| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_inserts_text_visual_block_4.dump b/src/testdir/dumps/Test_prop_inserts_text_visual_block_4.dump
index 0017f02..ff5af3a 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_visual_block_4.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_visual_block_4.dump
@@ -1,6 +1,6 @@
-|1+0&#e0e0e08|2|3|4|5|6|7|8+0&#ffffff0|9| @50
-|1+0&#e0e0e08|-+0#e000e06#ffffff0|å£*&|-+&|2+0#0000000#e0e0e08|3|4+0&#ffffff0|5|6|7|8|9| @46
-|1+0&#e0e0e08|2|å£*0#e000e06#ffffff0|3+0#0000000#e0e0e08|4|5|6+0&#ffffff0|7|8|9| @48
-|1+0&#e0e0e08|2|3|4|5|6>7+0&#ffffff0|8|9| @50
+|1+0#0000001#a8a8a8255|2|3|4|5|6|7|8+0#0000000#ffffff0|9| @50
+|1+0#0000001#a8a8a8255|-+0#e000e06#ffffff0|å£*&|-+&|2+0#0000001#a8a8a8255|3|4+0#0000000#ffffff0|5|6|7|8|9| @46
+|1+0#0000001#a8a8a8255|2|å£*0#e000e06#ffffff0|3+0#0000001#a8a8a8255|4|5|6+0#0000000#ffffff0|7|8|9| @48
+|1+0#0000001#a8a8a8255|2|3|4|5|6>7+0#0000000#ffffff0|8|9| @50
|~+0#4040ff13&| @58
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@13|4|x|7| @6|4|,|7| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_inserts_text_visual_block_5.dump b/src/testdir/dumps/Test_prop_inserts_text_visual_block_5.dump
index cb7e0c9..496eee9 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_visual_block_5.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_visual_block_5.dump
@@ -1,6 +1,6 @@
-|1+0&#ffffff0|2+0&#e0e0e08|3|4|5|6|7|8+0&#ffffff0|9| @50
-|1|-+0#e000e06&|å£*&|-+&|2+0#0000000#e0e0e08|3|4+0&#ffffff0|5|6|7|8|9| @46
-|1|2+0&#e0e0e08|å£*0#e000e06#ffffff0|3+0#0000000#e0e0e08|4|5|6+0&#ffffff0|7|8|9| @48
-|1>2|3+0&#e0e0e08|4|5|6|7|8+0&#ffffff0|9| @50
+|1+0&#ffffff0|2+0#0000001#a8a8a8255|3|4|5|6|7|8+0#0000000#ffffff0|9| @50
+|1|-+0#e000e06&|å£*&|-+&|2+0#0000001#a8a8a8255|3|4+0#0000000#ffffff0|5|6|7|8|9| @46
+|1|2+0#0000001#a8a8a8255|å£*0#e000e06#ffffff0|3+0#0000001#a8a8a8255|4|5|6+0#0000000#ffffff0|7|8|9| @48
+|1>2|3+0#0000001#a8a8a8255|4|5|6|7|8+0#0000000#ffffff0|9| @50
|~+0#4040ff13&| @58
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@13|4|x|6| @6|4|,|2| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_inserts_text_visual_block_6.dump b/src/testdir/dumps/Test_prop_inserts_text_visual_block_6.dump
index c4be65f..8630777 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_visual_block_6.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_visual_block_6.dump
@@ -1,6 +1,6 @@
-|1+0&#ffffff0|2|3+0&#e0e0e08|4|5|6|7|8+0&#ffffff0|9| @50
-|1|-+0#e000e06&|å£*&|-+&|2+0#0000000#e0e0e08|3|4+0&#ffffff0|5|6|7|8|9| @46
-|1|2|å£*0#e000e06&|3+0#0000000#e0e0e08|4|5|6+0&#ffffff0|7|8|9| @48
-|1|2>3|4+0&#e0e0e08|5|6|7|8+0&#ffffff0|9| @50
+|1+0&#ffffff0|2|3+0#0000001#a8a8a8255|4|5|6|7|8+0#0000000#ffffff0|9| @50
+|1|-+0#e000e06&|å£*&|-+&|2+0#0000001#a8a8a8255|3|4+0#0000000#ffffff0|5|6|7|8|9| @46
+|1|2|å£*0#e000e06&|3+0#0000001#a8a8a8255|4|5|6+0#0000000#ffffff0|7|8|9| @48
+|1|2>3|4+0#0000001#a8a8a8255|5|6|7|8+0#0000000#ffffff0|9| @50
|~+0#4040ff13&| @58
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@13|4|x|5| @6|4|,|3| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_inserts_text_visual_block_7.dump b/src/testdir/dumps/Test_prop_inserts_text_visual_block_7.dump
index 54c7fde..bcc9101 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_visual_block_7.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_visual_block_7.dump
@@ -1,6 +1,6 @@
-|1+0&#ffffff0|2|3|4+0&#e0e0e08|5|6|7|8+0&#ffffff0|9| @50
-|1|-+0#e000e06&|å£*&|-+&|2+0#0000000#e0e0e08|3|4+0&#ffffff0|5|6|7|8|9| @46
-|1|2|å£*0#e000e06&|3+0#0000000#e0e0e08|4|5|6+0&#ffffff0|7|8|9| @48
-|1|2|3>4|5+0&#e0e0e08|6|7|8+0&#ffffff0|9| @50
+|1+0&#ffffff0|2|3|4+0#0000001#a8a8a8255|5|6|7|8+0#0000000#ffffff0|9| @50
+|1|-+0#e000e06&|å£*&|-+&|2+0#0000001#a8a8a8255|3|4+0#0000000#ffffff0|5|6|7|8|9| @46
+|1|2|å£*0#e000e06&|3+0#0000001#a8a8a8255|4|5|6+0#0000000#ffffff0|7|8|9| @48
+|1|2|3>4|5+0#0000001#a8a8a8255|6|7|8+0#0000000#ffffff0|9| @50
|~+0#4040ff13&| @58
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@13|4|x|4| @6|4|,|4| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_wincolor_1.dump b/src/testdir/dumps/Test_prop_wincolor_1.dump
new file mode 100644
index 0000000..d8a6226
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_wincolor_1.dump
@@ -0,0 +1,8 @@
+>s+0&#ffd7ff255|o|m|e| |t|e|x|t| |h|e|r|e| @45
+@3|B+0&#5fd7ff255|E|L|O|W| +0&#ffd7ff255@51
+|s|o|m|e| |m|u|c|h| |l|o|n|g|e|r| |t|e|x|t| |h|e|r|e| @33
+|m|o|r|e| |t|e|x|t| |h|e|r|e| @2|A+0&#ffff4012|F|T|E|R| +0&#ffd7ff255@37
+|~+0#4040ff13&| @58
+|~| @58
+|~| @58
+|:+0#0000000#ffffff0| @40|1|,|1| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_wincolor_2.dump b/src/testdir/dumps/Test_prop_wincolor_2.dump
new file mode 100644
index 0000000..6e5126c
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_wincolor_2.dump
@@ -0,0 +1,8 @@
+>s+8&#ffd7ff255|o|m|e| |t|e|x|t| |h|e|r|e| @45
+@3|B+8&#5fd7ff255|E|L|O|W| +8&#ffd7ff255@51
+|s+0&&|o|m|e| |m|u|c|h| |l|o|n|g|e|r| |t|e|x|t| |h|e|r|e| @33
+|m|o|r|e| |t|e|x|t| |h|e|r|e| @2|A+0&#ffff4012|F|T|E|R| +0&#ffd7ff255@37
+|~+0#4040ff13&| @58
+|~| @58
+|~| @58
+|:+0#0000000#ffffff0| @40|1|,|1| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_wincolor_3.dump b/src/testdir/dumps/Test_prop_wincolor_3.dump
new file mode 100644
index 0000000..f77c274
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_wincolor_3.dump
@@ -0,0 +1,8 @@
+>s+8&#ffd7ff255|o|m|e| |t|e|x|t| |h|e|r|e| @14| +8&#ffd7d7255| +8&#ffd7ff255@29
+@3|B+8&#5fd7ff255|E|L|O|W| +8&#ffd7ff255@51
+|s+0&&|o|m|e| |m|u|c|h| |l|o|n|g|e|r| |t|e|x|t| |h|e|r|e| @2| +0&#ffd7d7255| +0&#ffd7ff255@29
+|m|o|r|e| |t|e|x|t| |h|e|r|e| @2|A+0&#ffff4012|F|T|E|R| +0&#ffd7ff255@6| +0&#ffd7d7255| +0&#ffd7ff255@29
+|~+0#4040ff13&| @58
+|~| @58
+|~| @58
+|:+0#0000000#ffffff0| @40|1|,|1| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_wincolor_4.dump b/src/testdir/dumps/Test_prop_wincolor_4.dump
new file mode 100644
index 0000000..06d6b0f
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_wincolor_4.dump
@@ -0,0 +1,8 @@
+>s+8&#af5f00255|o|m|e| |t|e|x|t| |h|e|r|e| @14| +8&#ffd7d7255| +8&#af5f00255@29
+@3|B+8&#5fd7ff255|E|L|O|W| +8&#af5f00255@51
+|s+0&#ffd7ff255|o|m|e| |m|u|c|h| |l|o|n|g|e|r| |t|e|x|t| |h|e|r|e| @2| +0&#ffd7d7255| +0&#ffd7ff255@29
+|m|o|r|e| |t|e|x|t| |h|e|r|e| @2|A+0&#ffff4012|F|T|E|R| +0&#ffd7ff255@6| +0&#ffd7d7255| +0&#ffd7ff255@29
+|~+0#4040ff13&| @58
+|~| @58
+|~| @58
+|:+0#0000000#ffffff0| @40|1|,|1| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_wincolor_5.dump b/src/testdir/dumps/Test_prop_wincolor_5.dump
new file mode 100644
index 0000000..0c062b4
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_wincolor_5.dump
@@ -0,0 +1,8 @@
+|s+8&#af5f00255|o|m|e| |t|e|x|t| |h|e|r>e| @14| +8&#ffd7d7255| +8&#af5f00255@29
+@3|B+8&#5fd7ff255|E|L|O|W| +8&#af5f00255@51
+|s+0&#ffd7ff255|o|m|e| |m|u|c|h| |l|o|n|g+0&#e0e0e08|e+0&#ffd7ff255|r| |t|e|x|t| |h|e|r|e| @2| +0&#ffd7d7255| +0&#ffd7ff255@29
+|m|o|r|e| |t|e|x|t| |h|e|r|e+0&#e0e0e08| +0&#ffd7ff255@2|A+0&#ffff4012|F|T|E|R| +0&#ffd7ff255@6| +0&#ffd7d7255| +0&#ffd7ff255@29
+|~+0#4040ff13&| @58
+|~| @58
+|~| @58
+|:+0#0000000#ffffff0| @40|1|,|1|4| @9|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_wincolor_6.dump b/src/testdir/dumps/Test_prop_wincolor_6.dump
new file mode 100644
index 0000000..e07b3e6
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_wincolor_6.dump
@@ -0,0 +1,8 @@
+|s+0&#ffd7ff255|o|m|e| |t|e|x|t| |h|e|r|e| @10| +0&#e0e0e08| +0&#ffd7ff255@2| +0&#ffd7d7255| +0&#ffd7ff255@29
+@3|B+0&#5fd7ff255|E|L|O|W| +0&#ffd7ff255@51
+|s+8&#af5f00255|o|m|e| |m|u|c|h| |l|o|n|g|e|r| |t|e|x|t| |h|e|r>e| @2| +8&#ffd7d7255| +8&#af5f00255@29
+|m+0&#ffd7ff255|o|r|e| |t|e|x|t| |h|e|r|e| @2|A+0&#ffff4012|F|T|E|R| +0&#ffd7ff255@2| +0&#e0e0e08| +0&#ffd7ff255@2| +0&#ffd7d7255| +0&#ffd7ff255@29
+|~+0#4040ff13&| @58
+|~| @58
+|~| @58
+|:+0#0000000#ffffff0| @40|2|,|2|6| @9|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_wincolor_7.dump b/src/testdir/dumps/Test_prop_wincolor_7.dump
new file mode 100644
index 0000000..9412811
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_wincolor_7.dump
@@ -0,0 +1,8 @@
+|s+0&#ffd7ff255|o|m|e| |t|e|x|t| |h|e|r|e| @11| +0&#e0e0e08| +0&#ffd7ff255@1| +0&#ffd7d7255| +0&#ffd7ff255@29
+@3|B+0&#5fd7ff255|E|L|O|W| +0&#ffd7ff255@51
+|s+8&#af5f00255|o|m|e| |m|u|c|h| |l|o|n|g|e|r| |t|e|x|t| |h|e|r|e> @2| +8&#ffd7d7255| +8&#af5f00255@29
+|m+0&#ffd7ff255|o|r|e| |t|e|x|t| |h|e|r|e| @2|A+0&#ffff4012|F|T|E|R| +0&#ffd7ff255@3| +0&#e0e0e08| +0&#ffd7ff255@1| +0&#ffd7d7255| +0&#ffd7ff255@29
+|~+0#4040ff13&| @58
+|~| @58
+|~| @58
+|:+0#0000000#ffffff0| @40|2|,|2|7| @9|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_wincolor_8.dump b/src/testdir/dumps/Test_prop_wincolor_8.dump
new file mode 100644
index 0000000..9df69ec
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_wincolor_8.dump
@@ -0,0 +1,8 @@
+|s+8&#af5f00255|o|m|e| |t|e|x|t| |h|e|r|e| @11> @2| +8&#ffd7d7255| +8&#af5f00255@29
+@3|B+8&#5fd7ff255|E|L|O|W| +8&#af5f00255@51
+|s+0&#ffd7ff255|o|m|e| |m|u|c|h| |l|o|n|g|e|r| |t|e|x|t| |h|e|r|e| +0&#e0e0e08| +0&#ffd7ff255@1| +0&#ffd7d7255| +0&#ffd7ff255@29
+|m|o|r|e| |t|e|x|t| |h|e|r|e| @2|A+0&#ffff4012|F|T|E|R| +0&#ffd7ff255@3| +0&#e0e0e08| +0&#ffd7ff255@1| +0&#ffd7d7255| +0&#ffd7ff255@29
+|~+0#4040ff13&| @58
+|~| @58
+|~| @58
+|:+0#0000000#ffffff0| @40|1|,|1|5|-|2|7| @6|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_wincolor_9.dump b/src/testdir/dumps/Test_prop_wincolor_9.dump
new file mode 100644
index 0000000..7b26974
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_wincolor_9.dump
@@ -0,0 +1,8 @@
+| +8&#af5f00255@29| +8&#ffd7d7255| +8&#af5f00255@1> @12|e|r|e|h| |t|x|e|t| |e|m|o|s
+| @51|W+8&#5fd7ff255|O|L|E|B| +8&#af5f00255@2
+| +0&#ffd7ff255@29| +0&#ffd7d7255| +0&#ffd7ff255@1| +0&#e0e0e08|e+0&#ffd7ff255|r|e|h| |t|x|e|t| |r|e|g|n|o|l| |h|c|u|m| |e|m|o|s
+| @29| +0&#ffd7d7255| +0&#ffd7ff255@1| +0&#e0e0e08| +0&#ffd7ff255@3|R+0&#ffff4012|E|T|F|A| +0&#ffd7ff255@2|e|r|e|h| |t|x|e|t| |e|r|o|m
+| +0#4040ff13&@58|~
+| @58|~
+| @58|~
+|:+0#0000000#ffffff0| @40|1|,|1|5|-|2|7| @6|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_with_text_above_6.dump b/src/testdir/dumps/Test_prop_with_text_above_6.dump
index da28228..0aa04b5 100644
--- a/src/testdir/dumps/Test_prop_with_text_above_6.dump
+++ b/src/testdir/dumps/Test_prop_with_text_above_6.dump
@@ -1,6 +1,6 @@
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|f+0#0000000#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@36
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|s+0#0000000#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@35
-| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |i+0#0000000#e0e0e08|n|s|e|r|t|e>d+0&#ffffff0| |o|n|e| |t|w|o| @37
+| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |i+0#0000001#a8a8a8255|n|s|e|r|t|e>d+0#0000000#ffffff0| |o|n|e| |t|w|o| @37
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|b+0#0000000#5fd7ff255|e|l|o|w| +0&#ffffff0@48
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|2| |t+0#0000000&|h|r|e@1| |f|o|u|r| @43
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3| +0#0000000&@2|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| +0&#ffffff0@37
diff --git a/src/testdir/dumps/Test_prop_with_text_above_7.dump b/src/testdir/dumps/Test_prop_with_text_above_7.dump
index c50749b..b675ed9 100644
--- a/src/testdir/dumps/Test_prop_with_text_above_7.dump
+++ b/src/testdir/dumps/Test_prop_with_text_above_7.dump
@@ -1,6 +1,6 @@
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|f+0#0000000#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@36
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|s+0#0000000#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@35
-| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |i+0#0000000#e0e0e08|n|s|e|r|t|e>d+0&#ffffff0| +0&#e0e0e08|o|n|e| |t|w|o| +0&#ffffff0@37
+| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |i+0#0000001#a8a8a8255|n|s|e|r|t|e>d+0#0000000#ffffff0| +0#0000001#a8a8a8255|o|n|e| |t|w|o| +0#0000000#ffffff0@37
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|b+0#0000000#5fd7ff255|e|l|o|w| +0#4040ff13#ffffff0| +0#0000000&@47
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|2| |t+0#0000000&|h|r|e@1| |f|o|u|r| @43
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3| +0#0000000&@2|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| +0&#ffffff0@37
diff --git a/src/testdir/dumps/Test_prop_with_text_empty_line_6.dump b/src/testdir/dumps/Test_prop_with_text_empty_line_6.dump
index 1bc9903..d9a055e 100644
--- a/src/testdir/dumps/Test_prop_with_text_empty_line_6.dump
+++ b/src/testdir/dumps/Test_prop_with_text_empty_line_6.dump
@@ -1,8 +1,8 @@
|X+0&#ffff4012@59
-|a+0&#e0e0e08@1>a+0&#ffffff0| @56
+|a+0#0000001#a8a8a8255@1>a+0#0000000#ffffff0| @56
|X+0&#ffff4012@59
@1| +0&#ffffff0@58
-|b+0&#e0e0e08@2|b+0&#ffffff0@2| @53
+|b+0#0000001#a8a8a8255@2|b+0#0000000#ffffff0@2| @53
|~+0#4040ff13&| @58
|~| @58
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@13|3|x|3| @6|2|,|3| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_with_text_override_2.dump b/src/testdir/dumps/Test_prop_with_text_override_2.dump
index 334929e..5311cd7 100644
--- a/src/testdir/dumps/Test_prop_with_text_override_2.dump
+++ b/src/testdir/dumps/Test_prop_with_text_override_2.dump
@@ -1,4 +1,4 @@
-|s+0&#ffffff0|o|m+0&#e0e0e08|e| | +0#4040ff13#40ffff15|i|n|s|e|r|t|e|d| |t+0#0000000#e0e0e08|e|x|t| |h|e>r+0&#ffffff0|e| @35
+|s+0&#ffffff0|o|m+0#0000001#a8a8a8255|e| | +0#4040ff13#40ffff15|i|n|s|e|r|t|e|d| |t+0#0000001#a8a8a8255|e|x|t| |h|e>r+0#0000000#ffffff0|e| @35
|~+0#4040ff13&| @58
|~| @58
|~| @58
diff --git a/src/testdir/dumps/Test_relnr_colors_wrapped_1.dump b/src/testdir/dumps/Test_relnr_colors_wrapped_1.dump
new file mode 100644
index 0000000..a0a269f
--- /dev/null
+++ b/src/testdir/dumps/Test_relnr_colors_wrapped_1.dump
@@ -0,0 +1,20 @@
+| +0#0000001#4040ff13@1|2| |1+0#0000000#ffffff0|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1
+| +0#0000001#4040ff13@3|0+0#0000000#ffffff0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0
+| +0#0000001#4040ff13@3|8+0#0000000#ffffff0|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8| @17
+| +0#0000001#4040ff13@1|1| |1+0#0000000#ffffff0|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1
+| +0#0000001#4040ff13@3|0+0#0000000#ffffff0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0
+| +0#0000001#4040ff13@3|9+0#0000000#ffffff0|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9| @17
+|1+0#0000001#ff404010@2| >1+0#0000000#ffffff0@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1
+| +0#0000001#ff404010@3|1+0#0000000#ffffff0|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1
+| +0#0000001#ff404010@3|0+0#0000000#ffffff0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0| @17
+| +0#0000001#40ff4011@1|1| |1+0#0000000#ffffff0@45
+| +0#0000001#40ff4011@3|1+0#0000000#ffffff0@45
+| +0#0000001#40ff4011@3|1+0#0000000#ffffff0@27| @17
+| +0#0000001#40ff4011@1|2| |1+0#0000000#ffffff0@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1
+| +0#0000001#40ff4011@3|1+0#0000000#ffffff0|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1
+| +0#0000001#40ff4011@3|2+0#0000000#ffffff0|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2| @17
+| +0#0000001#40ff4011@1|3| |1+0#0000000#ffffff0@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1
+| +0#0000001#40ff4011@3|1+0#0000000#ffffff0|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1
+| +0#0000001#40ff4011@3|3+0#0000000#ffffff0|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3| @17
+| +0#0000001#40ff4011@1|4| |1+0#0000000#ffffff0@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1|@+0#4040ff13&@2
+| +0#0000000&@31|1@2|,|1| @8|5@1|%|
diff --git a/src/testdir/dumps/Test_relnr_colors_wrapped_2.dump b/src/testdir/dumps/Test_relnr_colors_wrapped_2.dump
new file mode 100644
index 0000000..1f2df5e
--- /dev/null
+++ b/src/testdir/dumps/Test_relnr_colors_wrapped_2.dump
@@ -0,0 +1,20 @@
+| +0#0000001#4040ff13@1|1| |1+0#0000000#ffffff0|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1
+| +0#0000001#4040ff13@3|0+0#0000000#ffffff0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0
+| +0#0000001#4040ff13@3|8+0#0000000#ffffff0|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8| @17
+|1+0#0000001#ff404010@1|0| >1+0#0000000#ffffff0|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1
+| +0#0000001#ff404010@3|0+0#0000000#ffffff0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0
+| +0#0000001#ff404010@3|9+0#0000000#ffffff0|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9| @17
+| +0#0000001#40ff4011@1|1| |1+0#0000000#ffffff0@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1
+| +0#0000001#40ff4011@3|1+0#0000000#ffffff0|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1
+| +0#0000001#40ff4011@3|0+0#0000000#ffffff0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0| @17
+| +0#0000001#40ff4011@1|2| |1+0#0000000#ffffff0@45
+| +0#0000001#40ff4011@3|1+0#0000000#ffffff0@45
+| +0#0000001#40ff4011@3|1+0#0000000#ffffff0@27| @17
+| +0#0000001#40ff4011@1|3| |1+0#0000000#ffffff0@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1
+| +0#0000001#40ff4011@3|1+0#0000000#ffffff0|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1
+| +0#0000001#40ff4011@3|2+0#0000000#ffffff0|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2| @17
+| +0#0000001#40ff4011@1|4| |1+0#0000000#ffffff0@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1
+| +0#0000001#40ff4011@3|1+0#0000000#ffffff0|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1
+| +0#0000001#40ff4011@3|3+0#0000000#ffffff0|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3| @17
+| +0#0000001#40ff4011@1|5| |1+0#0000000#ffffff0@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1|@+0#4040ff13&@2
+| +0#0000000&@31|1@1|0|,|1| @8|5@1|%|
diff --git a/src/testdir/dumps/Test_relnr_colors_wrapped_3.dump b/src/testdir/dumps/Test_relnr_colors_wrapped_3.dump
new file mode 100644
index 0000000..b6f6c60
--- /dev/null
+++ b/src/testdir/dumps/Test_relnr_colors_wrapped_3.dump
@@ -0,0 +1,20 @@
+| +0#0000001#4040ff13@1|3| |1+0#0000000#ffffff0|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1
+| +0#0000001#4040ff13@3|0+0#0000000#ffffff0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0
+| +0#0000001#4040ff13@3|8+0#0000000#ffffff0|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8| @17
+| +0#0000001#4040ff13@1|2| |1+0#0000000#ffffff0|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1
+| +0#0000001#4040ff13@3|0+0#0000000#ffffff0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0
+| +0#0000001#4040ff13@3|9+0#0000000#ffffff0|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9| @17
+| +0#0000001#4040ff13@1|1| |1+0#0000000#ffffff0@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1
+| +0#0000001#4040ff13@3|1+0#0000000#ffffff0|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1
+| +0#0000001#4040ff13@3|0+0#0000000#ffffff0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0| @17
+|1+0#0000001#ff404010@1|2| >1+0#0000000#ffffff0@45
+| +0#0000001#ff404010@3|1+0#0000000#ffffff0@45
+| +0#0000001#ff404010@3|1+0#0000000#ffffff0@27| @17
+| +0#0000001#40ff4011@1|1| |1+0#0000000#ffffff0@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1
+| +0#0000001#40ff4011@3|1+0#0000000#ffffff0|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1
+| +0#0000001#40ff4011@3|2+0#0000000#ffffff0|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2| @17
+| +0#0000001#40ff4011@1|2| |1+0#0000000#ffffff0@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1
+| +0#0000001#40ff4011@3|1+0#0000000#ffffff0|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1
+| +0#0000001#40ff4011@3|3+0#0000000#ffffff0|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3| @17
+| +0#0000001#40ff4011@1|3| |1+0#0000000#ffffff0@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1|@+0#4040ff13&@2
+| +0#0000000&@31|1@1|2|,|1| @8|5@1|%|
diff --git a/src/testdir/dumps/Test_relnr_colors_wrapped_4.dump b/src/testdir/dumps/Test_relnr_colors_wrapped_4.dump
new file mode 100644
index 0000000..b838950
--- /dev/null
+++ b/src/testdir/dumps/Test_relnr_colors_wrapped_4.dump
@@ -0,0 +1,20 @@
+| +0#0000001#4040ff13@1|5| |1+0#0000000#ffffff0|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1
+| +0#0000001#4040ff13@3|0+0#0000000#ffffff0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0
+| +0#0000001#4040ff13@3|8+0#0000000#ffffff0|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8| @17
+| +0#0000001#4040ff13@1|4| |1+0#0000000#ffffff0|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1
+| +0#0000001#4040ff13@3|0+0#0000000#ffffff0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0
+| +0#0000001#4040ff13@3|9+0#0000000#ffffff0|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9| @17
+| +0#0000001#4040ff13@1|3| |1+0#0000000#ffffff0@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1
+| +0#0000001#4040ff13@3|1+0#0000000#ffffff0|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1
+| +0#0000001#4040ff13@3|0+0#0000000#ffffff0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0| @17
+| +0#0000001#4040ff13@1|2| |1+0#0000000#ffffff0@45
+| +0#0000001#4040ff13@3|1+0#0000000#ffffff0@45
+| +0#0000001#4040ff13@3|1+0#0000000#ffffff0@27| @17
+| +0#0000001#4040ff13@1|1| |1+0#0000000#ffffff0@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1
+| +0#0000001#4040ff13@3|1+0#0000000#ffffff0|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1
+| +0#0000001#4040ff13@3|2+0#0000000#ffffff0|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2| @17
+|1+0#0000001#ff404010@1|4| >1+0#0000000#ffffff0@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1
+| +0#0000001#ff404010@3|1+0#0000000#ffffff0|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1
+| +0#0000001#ff404010@3|3+0#0000000#ffffff0|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3| @17
+| +0#0000001#40ff4011@1|1| |1+0#0000000#ffffff0@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1|@+0#4040ff13&@2
+| +0#0000000&@31|1@1|4|,|1| @8|5@1|%|
diff --git a/src/testdir/dumps/Test_relnr_colors_wrapped_5.dump b/src/testdir/dumps/Test_relnr_colors_wrapped_5.dump
new file mode 100644
index 0000000..549275a
--- /dev/null
+++ b/src/testdir/dumps/Test_relnr_colors_wrapped_5.dump
@@ -0,0 +1,20 @@
+| +0#0000001#4040ff13@1|4| |1+0#0000000#ffffff0|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1
+| +0#0000001#4040ff13@3|0+0#0000000#ffffff0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0
+| +0#0000001#4040ff13@3|8+0#0000000#ffffff0|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8|1|0|8| @17
+| +0#0000001#4040ff13@1|3| |1+0#0000000#ffffff0|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1
+| +0#0000001#4040ff13@3|0+0#0000000#ffffff0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0
+| +0#0000001#4040ff13@3|9+0#0000000#ffffff0|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9|1|0|9| @17
+| +0#0000001#4040ff13@1|2| |1+0#0000000#ffffff0@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1
+| +0#0000001#4040ff13@3|1+0#0000000#ffffff0|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1
+| +0#0000001#4040ff13@3|0+0#0000000#ffffff0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0|1@1|0| @17
+| +0#0000001#4040ff13@1|1| |1+0#0000000#ffffff0@45
+| +0#0000001#4040ff13@3|1+0#0000000#ffffff0@45
+| +0#0000001#4040ff13@3|1+0#0000000#ffffff0@27| @17
+|1+0#0000001#ff404010@1|3| >1+0#0000000#ffffff0@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1
+| +0#0000001#ff404010@3|1+0#0000000#ffffff0|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1
+| +0#0000001#ff404010@3|2+0#0000000#ffffff0|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2|1@1|2| @17
+| +0#0000001#40ff4011@1|1| |1+0#0000000#ffffff0@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1
+| +0#0000001#40ff4011@3|1+0#0000000#ffffff0|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1
+| +0#0000001#40ff4011@3|3+0#0000000#ffffff0|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3|1@1|3| @17
+| +0#0000001#40ff4011@1|2| |1+0#0000000#ffffff0@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1@1|4|1|@+0#4040ff13&@2
+| +0#0000000&@31|1@1|3|,|1| @8|5@1|%|
diff --git a/src/testdir/dumps/Test_statusline_showcmd_3.dump b/src/testdir/dumps/Test_statusline_showcmd_3.dump
index 049e0f7..d2b2158 100644
--- a/src/testdir/dumps/Test_statusline_showcmd_3.dump
+++ b/src/testdir/dumps/Test_statusline_showcmd_3.dump
@@ -1,6 +1,6 @@
-|a+0&#e0e0e08| +0&#ffffff0@73
-|b+0&#e0e0e08| +0&#ffffff0@73
-|c+0&#e0e0e08> +0&#ffffff0@73
+|a+0#0000001#a8a8a8255| +0#0000000#ffffff0@73
+|b+0#0000001#a8a8a8255| +0#0000000#ffffff0@73
+|c+0#0000001#a8a8a8255> +0#0000000#ffffff0@73
|~+0#4040ff13&| @73
|3+3#0000000&|x|2| @71
|-+2&&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@56
diff --git a/src/testdir/dumps/Test_syntax_c_01.dump b/src/testdir/dumps/Test_syntax_c_01.dump
index 7224216..bd2ec04 100644
--- a/src/testdir/dumps/Test_syntax_c_01.dump
+++ b/src/testdir/dumps/Test_syntax_c_01.dump
@@ -4,8 +4,8 @@
| +0#0000e05&@2|i|n|t| @2|n|o|t|_|u|s|e|d|;| +0#0000000&@56
|#+0#e000e06&|e|l|s|e| +0#0000000&@69
@3|i+0#00e0003&|n|t| +0#0000000&@2|u|s|e|d|;| @60
-|#+0#e000e06&|e+0&#e0e0e08|n|d|i|f| +0#0000000&| +0&#ffffff0@67
-| +0&#e0e0e08@2|p|r|i|n|t|f|(|"+0#e000002&|J|u|s|t| |a|n| |e|x|a|m|p|l|e| |p|i|e|c|e| |o|f| >C+0&#ffffff0| |c|o|d|e|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @27
+|#+0#e000e06&|e+0#0000001#a8a8a8255|n|d|i|f| | +0#0000000#ffffff0@67
+| +0#0000001#a8a8a8255@2|p|r|i|n|t|f|(|"|J|u|s|t| |a|n| |e|x|a|m|p|l|e| |p|i|e|c|e| |o|f| >C+0#e000002#ffffff0| |c|o|d|e|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @27
@3|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|0+0#e000002&|x|0|f@1|;+0#0000000&| @58
|}| @73
| +0#ffffff16#ff404010@16| +0#0000000#ffffff0@57
diff --git a/src/testdir/dumps/Test_tabline_showcmd_3.dump b/src/testdir/dumps/Test_tabline_showcmd_3.dump
index 3e29cda..21a66a3 100644
--- a/src/testdir/dumps/Test_tabline_showcmd_3.dump
+++ b/src/testdir/dumps/Test_tabline_showcmd_3.dump
@@ -1,6 +1,6 @@
|3+1&#ffffff0|x|2| @71
-|a+0&#e0e0e08| +0&#ffffff0@73
-|b+0&#e0e0e08| +0&#ffffff0@73
-|c+0&#e0e0e08> +0&#ffffff0@73
+|a+0#0000001#a8a8a8255| +0#0000000#ffffff0@73
+|b+0#0000001#a8a8a8255| +0#0000000#ffffff0@73
+|c+0#0000001#a8a8a8255> +0#0000000#ffffff0@73
|~+0#4040ff13&| @73
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@38|3|,|2| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_terminal_popup_7.dump b/src/testdir/dumps/Test_terminal_popup_7.dump
index e7e5aae..0b14d27 100644
--- a/src/testdir/dumps/Test_terminal_popup_7.dump
+++ b/src/testdir/dumps/Test_terminal_popup_7.dump
@@ -4,7 +4,7 @@
|3| @12|â•”+0#0000001#ffd7ff255|â•@44|â•—| +0#0000000#ffffff0@13
|4| @12|â•‘+0#0000001#ffd7ff255|s|o|m|e| |t|e|x|t| @35|â•‘| +0#0000000#ffffff0@13
|5| @12|â•‘+0#0000001#ffd7ff255|t|o| |e+0&#ffff4012|d|i|t| +0&#ffd7ff255@37|â•‘| +0#0000000#ffffff0@13
-|6| @12|â•‘+0#0000001#ffd7ff255|i+0&#e0e0e08|n| |a| >p+0&#ffd7ff255|o|p|u|p| |w|i|n|d|o|w| @27|â•‘| +0#0000000#ffffff0@13
+|6| @12|â•‘+0#0000001#ffd7ff255|i+0&#a8a8a8255|n| |a| >p+0&#ffd7ff255|o|p|u|p| |w|i|n|d|o|w| @27|â•‘| +0#0000000#ffffff0@13
|7| @12|â•‘+0#0000001#ffd7ff255|~+0#4040ff13&| @43|â•‘+0#0000001&| +0#0000000#ffffff0@13
|8| @12|â•‘+0#0000001#ffd7ff255|~+0#4040ff13&| @43|â•‘+0#0000001&| +0#0000000#ffffff0@13
|9| @12|â•‘+0#0000001#ffd7ff255|~+0#4040ff13&| @43|â•‘+0#0000001&| +0#0000000#ffffff0@13
diff --git a/src/testdir/dumps/Test_textprop_hl_override_2.dump b/src/testdir/dumps/Test_textprop_hl_override_2.dump
index 187233d..9e677f8 100644
--- a/src/testdir/dumps/Test_textprop_hl_override_2.dump
+++ b/src/testdir/dumps/Test_textprop_hl_override_2.dump
@@ -1,6 +1,6 @@
|O+0&#ffffff0|n|e| |o+0#4040ff13#ffff4012|n|e| |o+0#0000000#ffffff0|n|e| |o+0#4040ff13#ffff4012|n|e| |o+0#0000000#ffffff0|n|e| @55
|T|w|o| |t+0#4040ff13#ffff4012|w|o| |t+0#0000000#ffffff0|w|o| |t+0#4040ff13#ffff4012|w|o| |t+0#0000000#ffffff0|w|o| @55
-|T|h|r+0&#e0e0e08|e|e+0#4040ff13&| |t|h|r+0#0000000&|e@1| |t+0#4040ff13#ffff4012|h|r|e|e+0#0000000#e0e0e08| |t|h|r>e+0&#ffffff0@1| @51
+|T|h|r+0#0000001#a8a8a8255|e@1| |t|h|r|e@1| |t+0#4040ff13#ffff4012|h|r|e|e+0#0000001#a8a8a8255| |t|h|r>e+0#0000000#ffffff0@1| @51
|~+0#4040ff13&| @73
|~| @73
|~| @73
diff --git a/src/testdir/dumps/Test_vim9_no_redraw.dump b/src/testdir/dumps/Test_vim9_no_redraw.dump
index 1d77a08..2f02082 100644
--- a/src/testdir/dumps/Test_vim9_no_redraw.dump
+++ b/src/testdir/dumps/Test_vim9_no_redraw.dump
@@ -1,4 +1,4 @@
-|s+0&#ffffff0|o+0&#e0e0e08|m|e| |t|e|x|t| | +0&#ffffff0@64
+|s+0&#ffffff0|o+0#0000001#a8a8a8255|m|e| |t|e|x|t| | +0#0000000#ffffff0@64
|~+0#4040ff13&| @73
|~| @73
|~| @73
diff --git a/src/testdir/dumps/Test_virtual_text_overlap_with_highlight_1.dump b/src/testdir/dumps/Test_virtual_text_overlap_with_highlight_1.dump
new file mode 100644
index 0000000..d81456f
--- /dev/null
+++ b/src/testdir/dumps/Test_virtual_text_overlap_with_highlight_1.dump
@@ -0,0 +1,8 @@
+| +0#af5f00255#ffffff0@1|1| |o+0#0000000&|n|e| @52
+| +0#af5f00255&@1|2| |t+0#0000000&|w|o| @52
+| +0#af5f00255&@3|s+0#ffffff16#ff404010|y|n|t|a|x| |e|r@1|o|r| +0#0000000#ffffff0@43
+| +0#af5f00255&@1|3| >t+0#0000000&|h|r|e@1| @50
+| +0#af5f00255&@1|4| |f+0#0000000&|o|u|r+0#e000002&| +0#0000000&@40|o+0#ffffff16#ff404010|t|h|e|r| |e|r@1|o|r
+| +0#af5f00255#ffffff0@1|5| |f+0#e000002&|i+0#0000000&|v|e| @51
+|~+0#4040ff13&| @58
+| +0#0000000&@41|3|,|1| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_visual_block_with_virtualedit.dump b/src/testdir/dumps/Test_visual_block_with_virtualedit.dump
index 2991a63..7a24250 100644
--- a/src/testdir/dumps/Test_visual_block_with_virtualedit.dump
+++ b/src/testdir/dumps/Test_visual_block_with_virtualedit.dump
@@ -1,6 +1,6 @@
-|a+0&#e0e0e08@5> +0&#ffffff0@43
-|b+0&#e0e0e08@3| @2| +0&#ffffff0@42
-|c+0&#e0e0e08@1| @4| +0&#ffffff0@42
+|a+0#0000001#a8a8a8255@5> +0#0000000#ffffff0@43
+|b+0#0000001#a8a8a8255@3| @2| +0#0000000#ffffff0@42
+|c+0#0000001#a8a8a8255@1| @4| +0#0000000#ffffff0@42
|~+0#4040ff13&| @48
|~| @48
|~| @48
diff --git a/src/testdir/dumps/Test_visual_block_with_virtualedit2.dump b/src/testdir/dumps/Test_visual_block_with_virtualedit2.dump
index 3c62156..e68df74 100644
--- a/src/testdir/dumps/Test_visual_block_with_virtualedit2.dump
+++ b/src/testdir/dumps/Test_visual_block_with_virtualedit2.dump
@@ -1,6 +1,6 @@
-|a+0&#e0e0e08@5| | +0&#ffffff0@42
-|b+0&#e0e0e08@3| @2| +0&#ffffff0@42
-|c+0&#e0e0e08@1> +0&#ffffff0| +0&#e0e0e08@3| +0&#ffffff0@42
+|a+0#0000001#a8a8a8255@5| | +0#0000000#ffffff0@42
+|b+0#0000001#a8a8a8255@3| @2| +0#0000000#ffffff0@42
+|c+0#0000001#a8a8a8255@1> +0#0000000#ffffff0| +0#0000001#a8a8a8255@3| +0#0000000#ffffff0@42
|~+0#4040ff13&| @48
|~| @48
|~| @48
diff --git a/src/testdir/dumps/Test_visual_ends_before_showbreak.dump b/src/testdir/dumps/Test_visual_ends_before_showbreak.dump
new file mode 100644
index 0000000..ee809ba
--- /dev/null
+++ b/src/testdir/dumps/Test_visual_ends_before_showbreak.dump
@@ -0,0 +1,6 @@
+|x+0&#ffffff0@4| @69
+|↪+0#4040ff13&| |y+0#0000001#a8a8a8255@68> +0#0000000#ffffff0| +0#0000001#a8a8a8255@2
+|↪+0#4040ff13#ffffff0| |z+0#0000000&@3| @68
+|~+0#4040ff13&| @73
+|~| @73
+|-+2#0000000&@1| |V|I|S|U|A|L| |-@1| +0&&@34|7|0| @7|1|,|7|6|-|1|4|7| @5|A|l@1|
diff --git a/src/testdir/dumps/Test_visual_hl_with_showbreak.dump b/src/testdir/dumps/Test_visual_hl_with_showbreak.dump
index fa0b2dc..0bd83b0 100644
--- a/src/testdir/dumps/Test_visual_hl_with_showbreak.dump
+++ b/src/testdir/dumps/Test_visual_hl_with_showbreak.dump
@@ -1,5 +1,5 @@
|a+0&#ffffff0@48>a
-|++0#4040ff13&|a+0#0000000#e0e0e08@3|a+0&#ffffff0@5| @38
+|++0#4040ff13&|a+0#0000001#a8a8a8255@3|a+0#0000000#ffffff0@5| @38
|~+0#4040ff13&| @48
|~| @48
|~| @48
diff --git a/src/testdir/dumps/Test_visual_sbr_1.dump b/src/testdir/dumps/Test_visual_sbr_1.dump
index 0a9511d..3c167ec 100644
--- a/src/testdir/dumps/Test_visual_sbr_1.dump
+++ b/src/testdir/dumps/Test_visual_sbr_1.dump
@@ -1,4 +1,4 @@
-|>+0#4040ff13#ffffff0| +0#0000000#e0e0e08|k|a|s|d| |g|u|b|e|r|g|r|e|n|,| |n|o| |s|e|a| |t|a|k|i|m|a|t|a| |s|a|n|c|t|u|s| |e|s|t| |L|o|r|e|m| |i|p|s|u|m| |d|o|l|o|r| |s|i|t| |a|m|e|t|.> +0&#ffffff0@1
+|>+0#4040ff13#ffffff0| +0#0000001#a8a8a8255|k|a|s|d| |g|u|b|e|r|g|r|e|n|,| |n|o| |s|e|a| |t|a|k|i|m|a|t|a| |s|a|n|c|t|u|s| |e|s|t| |L|o|r|e|m| |i|p|s|u|m| |d|o|l|o|r| |s|i|t| |a|m|e|t|.> +0#0000000#ffffff0@1
@75
@75
@75
diff --git a/src/testdir/dumps/Test_visual_starts_before_skipcol_1.dump b/src/testdir/dumps/Test_visual_starts_before_skipcol_1.dump
index f61440a..4cbf8d0 100644
--- a/src/testdir/dumps/Test_visual_starts_before_skipcol_1.dump
+++ b/src/testdir/dumps/Test_visual_starts_before_skipcol_1.dump
@@ -1,4 +1,4 @@
-|<+0#4040ff13#ffffff0@2| +0#0000000&@4| +0&#e0e0e08|9|3| |9|4| |9|5| |9|6| |9|7| |9|8| |9@1> +0&#ffffff0@45
+|<+0#4040ff13#ffffff0@2| +0#0000000&@4| +0#0000001#a8a8a8255|9|3| |9|4| |9|5| |9|6| |9|7| |9|8| |9@1> +0#0000000#ffffff0@45
|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|2|9|1|-|3@1|0| @5|A|l@1
| +0&&@74
|~+0#4040ff13&| @73
diff --git a/src/testdir/dumps/Test_visual_starts_before_skipcol_2.dump b/src/testdir/dumps/Test_visual_starts_before_skipcol_2.dump
index 1f10940..a6df79e 100644
--- a/src/testdir/dumps/Test_visual_starts_before_skipcol_2.dump
+++ b/src/testdir/dumps/Test_visual_starts_before_skipcol_2.dump
@@ -1,4 +1,4 @@
-| +0&#ffffff0@7|++0#4040ff13&@2| +0#0000000#e0e0e08|9|0| |9|1| |9|2| |9|3| |9|4| |9|5| |9|6| |9|7| |9|8| |9@1> +0&#ffffff0@33
+| +0&#ffffff0@7|++0#4040ff13&@2| +0#0000001#a8a8a8255|9|0| |9|1| |9|2| |9|3| |9|4| |9|5| |9|6| |9|7| |9|8| |9@1> +0#0000000#ffffff0@33
|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|2|9|1|-|3|4|2| @5|A|l@1
| +0&&@74
|~+0#4040ff13&| @73
diff --git a/src/testdir/dumps/Test_visual_starts_before_skipcol_3.dump b/src/testdir/dumps/Test_visual_starts_before_skipcol_3.dump
index d36d675..77ef541 100644
--- a/src/testdir/dumps/Test_visual_starts_before_skipcol_3.dump
+++ b/src/testdir/dumps/Test_visual_starts_before_skipcol_3.dump
@@ -1,4 +1,4 @@
-|++0#4040ff13#ffffff0@2| +0#0000000&@4| +0&#e0e0e08|9|3| |9|4| |9|5| |9|6| |9|7| |9|8| |9@1> +0&#ffffff0@45
+|++0#4040ff13#ffffff0@2| +0#0000000&@4| +0#0000001#a8a8a8255|9|3| |9|4| |9|5| |9|6| |9|7| |9|8| |9@1> +0#0000000#ffffff0@45
|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|2|9|1|-|3@1|0| @5|A|l@1
| +0&&@74
|~+0#4040ff13&| @73
diff --git a/src/testdir/dumps/Test_visual_starts_before_skipcol_4.dump b/src/testdir/dumps/Test_visual_starts_before_skipcol_4.dump
index 101352e..0abcc3c 100644
--- a/src/testdir/dumps/Test_visual_starts_before_skipcol_4.dump
+++ b/src/testdir/dumps/Test_visual_starts_before_skipcol_4.dump
@@ -1,4 +1,4 @@
-|++0#4040ff13#ffffff0@2| +0#0000000#e0e0e08|9|8| |9@1> +0&#ffffff0@65
+|++0#4040ff13#ffffff0@2| +0#0000001#a8a8a8255|9|8| |9@1> +0#0000000#ffffff0@65
|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|2|9|1|-|3|1|0| @5|A|l@1
| +0&&@74
|~+0#4040ff13&| @73
diff --git a/src/testdir/dumps/Test_win_gotoid_2.dump b/src/testdir/dumps/Test_win_gotoid_2.dump
index 7a778f5..8573fbe 100644
--- a/src/testdir/dumps/Test_win_gotoid_2.dump
+++ b/src/testdir/dumps/Test_win_gotoid_2.dump
@@ -6,7 +6,7 @@
|[+1&&|N|o| |N|a|m|e|]| @47|1|,|1| @11|T|o|p
|2+0&&|1| @72
|2@1| @72
-|2+0&#e0e0e08>3+0&#ffffff0| @72
+|2+0#0000001#a8a8a8255>3+0#0000000#ffffff0| @72
|2|4| @72
|2|5| @72
|2|6| @72
diff --git a/src/testdir/dumps/Test_wincolor_01.dump b/src/testdir/dumps/Test_wincolor_01.dump
index 5a5ccf5..c8578b2 100644
--- a/src/testdir/dumps/Test_wincolor_01.dump
+++ b/src/testdir/dumps/Test_wincolor_01.dump
@@ -1,6 +1,6 @@
| +0#af5f00255#ffd7ff255@1|2| | +0#0000001&@4| +0&#e0e0e08| +0&#ffd7ff255@64
-| +0#af5f00255&@1|1| |1+0#0000001&@4|1+0&#e0e0e08@4| | +0&#ffd7ff255@59
-| +8#af5f00255&@1|0| |2+0#0000001#e0e0e08@4>2+0&#ffd7ff255@5| +8&&@59
+| +0#af5f00255&@1|1| |1+0#0000001&@4|1+0&#a8a8a8255@4| | +0&#ffd7ff255@59
+| +8#af5f00255&@1|0| |2+0#0000001#a8a8a8255@4>2+0&#ffd7ff255@5| +8&&@59
| +0#af5f00255&@1|1| |3+0#0000001&| |h|e|r|e+0&#e0e0e08| +0&#ffd7ff255|3| @62
| +0#af5f00255&@1|2| | +0#0000001&@4| +0&#e0e0e08| +0&#ffd7ff255@64
| +0#af5f00255&@1|3| |t+0#40ff4011&|h|e| |c|a+0&#e0e0e08|t+0&#ffd7ff255| |i|s| |o+1&&|u|t| +0&&|o|f| |t|h|e| |b|a|g| +0#0000001&@45
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim
index 4d008a0..dd2f012 100644
--- a/src/testdir/shared.vim
+++ b/src/testdir/shared.vim
@@ -300,7 +300,8 @@ func GetVimCommand(...)
endif
let cmd .= ' --not-a-term'
let cmd .= ' --gui-dialog-file guidialogfile'
- let cmd = substitute(cmd, 'VIMRUNTIME=\S\+', '', '')
+ " remove any environment variables
+ let cmd = substitute(cmd, '[A-Z_]\+=\S\+ *', '', 'g')
" If using valgrind, make sure every run uses a different log file.
if cmd =~ 'valgrind.*--log-file='
@@ -363,7 +364,7 @@ func RunVimPiped(before, after, arguments, pipecmd)
" Optionally run Vim under valgrind
" let cmd = 'valgrind --tool=memcheck --leak-check=yes --num-callers=25 --log-file=valgrind ' . cmd
- exe "silent !" . a:pipecmd . cmd . args . ' ' . a:arguments
+ exe "silent !" .. a:pipecmd .. ' ' .. cmd .. args .. ' ' .. a:arguments
if len(a:before) > 0
call delete('Xbefore.vim')
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim
index cecb55a..564d568 100644
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -270,6 +270,7 @@ func Test_win_tab_autocmd()
let g:record = []
augroup testing
+ au WinNewPre * call add(g:record, 'WinNewPre')
au WinNew * call add(g:record, 'WinNew')
au WinClosed * call add(g:record, 'WinClosed')
au WinEnter * call add(g:record, 'WinEnter')
@@ -286,8 +287,8 @@ func Test_win_tab_autocmd()
close
call assert_equal([
- \ 'WinLeave', 'WinNew', 'WinEnter',
- \ 'WinLeave', 'TabLeave', 'WinNew', 'WinEnter', 'TabNew', 'TabEnter',
+ \ 'WinNewPre', 'WinLeave', 'WinNew', 'WinEnter',
+ \ 'WinLeave', 'TabLeave', 'WinNewPre', 'WinNew', 'WinEnter', 'TabNew', 'TabEnter',
\ 'WinLeave', 'TabLeave', 'WinClosed', 'TabClosed', 'WinEnter', 'TabEnter',
\ 'WinLeave', 'WinClosed', 'WinEnter'
\ ], g:record)
@@ -298,17 +299,96 @@ func Test_win_tab_autocmd()
bwipe somefile
call assert_equal([
- \ 'WinLeave', 'TabLeave', 'WinNew', 'WinEnter', 'TabNew', 'TabEnter',
+ \ 'WinLeave', 'TabLeave', 'WinNewPre', 'WinNew', 'WinEnter', 'TabNew', 'TabEnter',
\ 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter',
\ 'WinClosed', 'TabClosed'
\ ], g:record)
+ let g:record = []
+ copen
+ help
+ tabnext
+ vnew
+
+ call assert_equal([
+ \ 'WinNewPre', 'WinLeave', 'WinNew', 'WinEnter',
+ \ 'WinNewPre', 'WinLeave', 'WinNew', 'WinEnter',
+ \ 'WinNewPre', 'WinLeave', 'WinNew', 'WinEnter'
+ \ ], g:record)
+
augroup testing
au!
augroup END
unlet g:record
endfunc
+func Test_WinNewPre()
+ " Test that the old window layout can be accessed before a new window is created.
+ let g:layouts_pre = []
+ let g:layouts_post = []
+ augroup testing
+ au WinNewPre * call add(g:layouts_pre, winlayout())
+ au WinNew * call add(g:layouts_post, winlayout())
+ augroup END
+ split
+ call assert_notequal(g:layouts_pre[0], g:layouts_post[0])
+ split
+ call assert_equal(g:layouts_pre[1], g:layouts_post[0])
+ call assert_notequal(g:layouts_pre[1], g:layouts_post[1])
+ tabnew
+ call assert_notequal(g:layouts_pre[2], g:layouts_post[1])
+ call assert_notequal(g:layouts_pre[2], g:layouts_post[2])
+ augroup testing
+ au!
+ augroup END
+ unlet g:layouts_pre
+ unlet g:layouts_post
+
+ " Test modifying window layout during WinNewPre throws.
+ let g:caught = 0
+ augroup testing
+ au!
+ au WinNewPre * split
+ augroup END
+ try
+ vnew
+ catch
+ let g:caught += 1
+ endtry
+ augroup testing
+ au!
+ au WinNewPre * tabnew
+ augroup END
+ try
+ vnew
+ catch
+ let g:caught += 1
+ endtry
+ augroup testing
+ au!
+ au WinNewPre * close
+ augroup END
+ try
+ vnew
+ catch
+ let g:caught += 1
+ endtry
+ augroup testing
+ au!
+ au WinNewPre * tabclose
+ augroup END
+ try
+ vnew
+ catch
+ let g:caught += 1
+ endtry
+ call assert_equal(4, g:caught)
+ augroup testing
+ au!
+ augroup END
+ unlet g:caught
+endfunc
+
func Test_WinResized()
CheckRunVimInTerminal
@@ -739,6 +819,27 @@ func Test_WinClosed_switch_tab()
%bwipe!
endfunc
+" This used to trigger WinClosed twice for the same window, and the window's
+" buffer was NULL in the second autocommand.
+func Test_WinClosed_BufUnload_close_other()
+ tabnew
+ let g:tab = tabpagenr()
+ let g:buf = bufnr()
+ new
+ setlocal bufhidden=wipe
+ augroup test-WinClosed
+ autocmd BufUnload * ++once exe g:buf .. 'bwipe!'
+ autocmd WinClosed * call tabpagebuflist(g:tab)
+ augroup END
+ close
+
+ unlet g:tab
+ unlet g:buf
+ autocmd! test-WinClosed
+ augroup! test-WinClosed
+ %bwipe!
+endfunc
+
func s:AddAnAutocmd()
augroup vimBarTest
au BufReadCmd * echo 'hello'
@@ -2626,6 +2727,24 @@ func Test_TextChangedI_with_setline()
bwipe!
endfunc
+func Test_TextChanged_with_norm()
+ " For unknown reason this fails on MS-Windows
+ CheckNotMSWindows
+ CheckFeature terminal
+ let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': 3})
+ call assert_equal('running', term_getstatus(buf))
+ call term_sendkeys(buf, ":let g:a=0\<cr>")
+ call term_wait(buf, 50)
+ call term_sendkeys(buf, ":au! TextChanged * :let g:a+=1\<cr>")
+ call term_wait(buf, 50)
+ call term_sendkeys(buf, ":norm! ia\<cr>")
+ call term_wait(buf, 50)
+ call term_sendkeys(buf, ":echo g:a\<cr>")
+ call term_wait(buf, 50)
+ call WaitForAssert({-> assert_match('^1.*$', term_getline(buf, 3))})
+ bwipe!
+endfunc
+
func Test_Changed_FirstTime()
CheckFeature terminal
CheckNotGui
@@ -4315,4 +4434,44 @@ func Test_autocmd_shortmess()
delfunc SetupVimTest_shm
endfunc
+func Test_autocmd_invalidates_undo_on_textchanged()
+ CheckRunVimInTerminal
+ let script =<< trim END
+ set hidden
+ " create quickfix list (at least 2 lines to move line)
+ vimgrep /u/j %
+
+ " enter quickfix window
+ cwindow
+
+ " set modifiable
+ setlocal modifiable
+
+ " set autocmd to clear quickfix list
+
+ autocmd! TextChanged <buffer> call setqflist([])
+ " move line
+ move+1
+ END
+ call writefile(script, 'XTest_autocmd_invalidates_undo_on_textchanged', 'D')
+ let buf = RunVimInTerminal('XTest_autocmd_invalidates_undo_on_textchanged', {'rows': 20})
+ call term_sendkeys(buf, ":so %\<cr>")
+ call term_sendkeys(buf, "G")
+ call WaitForAssert({-> assert_match('^XTest_autocmd_invalidates_undo_on_textchanged\s*$', term_getline(buf, 20))}, 1000)
+
+ call StopVimInTerminal(buf)
+endfunc
+
+func Test_autocmd_creates_new_buffer_on_bufleave()
+ e a.txt
+ e b.txt
+ setlocal bufhidden=wipe
+ autocmd BufLeave <buffer> diffsplit c.txt
+ bn
+ call assert_equal(1, winnr('$'))
+ call assert_equal('a.txt', bufname('%'))
+ bw a.txt
+ bw c.txt
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_breakindent.vim b/src/testdir/test_breakindent.vim
index ee05548..96d91c9 100644
--- a/src/testdir/test_breakindent.vim
+++ b/src/testdir/test_breakindent.vim
@@ -424,7 +424,7 @@ func Test_breakindent12()
\ "~ ",
\ ]
call s:compare_lines(expect, lines)
- call s:close_windows('set nuw=4 listchars=')
+ call s:close_windows('set nuw=4 listchars&')
endfunc
func Test_breakindent12_vartabs()
@@ -439,7 +439,7 @@ func Test_breakindent12_vartabs()
\ "~ ",
\ ]
call s:compare_lines(expect, lines)
- call s:close_windows('set nuw=4 listchars= vts&')
+ call s:close_windows('set nuw=4 listchars& vts&')
endfunc
func Test_breakindent13()
@@ -733,7 +733,7 @@ func Test_breakindent20_list()
\ "shall make no law ",
\ ]
call s:compare_lines(expect, lines)
- " set minimum indent
+ " set minimum text width
setl briopt=min:5
redraw!
let lines = s:screen_lines2(1, 6, 20)
@@ -1086,5 +1086,83 @@ func Test_linebreak_list()
bwipe!
endfunc
+func Test_breakindent_change_display_uhex()
+ call s:test_windows('setl briopt=min:0 list listchars=eol:$')
+ redraw!
+ let lines = s:screen_lines(line('.'), 20)
+ let expect = [
+ \ "^Iabcdefghijklmnopqr",
+ \ " stuvwxyzABCDEFGHIJ",
+ \ " KLMNOP$ "
+ \ ]
+ call s:compare_lines(expect, lines)
+ set display+=uhex
+ redraw!
+ let lines = s:screen_lines(line('.'), 20)
+ let expect = [
+ \ "<09>abcdefghijklmnop",
+ \ " qrstuvwxyzABCDEF",
+ \ " GHIJKLMNOP$ "
+ \ ]
+ call s:compare_lines(expect, lines)
+ set display&
+
+ call s:close_windows()
+endfunc
+
+func Test_breakindent_list_split()
+ 10new
+ 61vsplit
+ setlocal tabstop=8 breakindent list listchars=tab:<->,eol:$
+ put =s:input
+ 30vsplit
+ setlocal listchars=eol:$
+ let expect = [
+ \ "^IabcdefghijklmnopqrstuvwxyzAB|<------>abcdefghijklmnopqrstuv",
+ \ " CDEFGHIJKLMNOP$ | wxyzABCDEFGHIJKLMNOP$ ",
+ \ "~ |~ "
+ \ ]
+ redraw!
+ let lines = s:screen_lines(line('.'), 61)
+ call s:compare_lines(expect, lines)
+ wincmd p
+ redraw!
+ let lines = s:screen_lines(line('.'), 61)
+ call s:compare_lines(expect, lines)
+
+ bwipe!
+endfunc
+
+func Test_breakindent_min_with_signcol()
+ call s:test_windows('setl briopt=min:15 signcolumn=yes')
+ redraw!
+ let expect = [
+ \ " abcdefghijklmn",
+ \ " opqrstuvwxyzABC",
+ \ " DEFGHIJKLMNOP "
+ \ ]
+ let lines = s:screen_lines(line('.'), 20)
+ call s:compare_lines(expect, lines)
+ setl briopt=min:17
+ redraw!
+ let expect = [
+ \ " abcdefghijklmn",
+ \ " opqrstuvwxyzABCDE",
+ \ " FGHIJKLMNOP "
+ \ ]
+ let lines = s:screen_lines(line('.'), 20)
+ call s:compare_lines(expect, lines)
+ setl briopt=min:19
+ redraw!
+ let expect = [
+ \ " abcdefghijklmn",
+ \ " opqrstuvwxyzABCDEF",
+ \ " GHIJKLMNOP "
+ \ ]
+ let lines = s:screen_lines(line('.'), 20)
+ call s:compare_lines(expect, lines)
+
+ call s:close_windows()
+endfunc
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_clientserver.vim b/src/testdir/test_clientserver.vim
index 53947f4..8be521b 100644
--- a/src/testdir/test_clientserver.vim
+++ b/src/testdir/test_clientserver.vim
@@ -13,7 +13,7 @@ source shared.vim
func Check_X11_Connection()
if has('x11')
- CheckEnv DISPLAY
+ CheckX11
try
call remote_send('xxx', '')
catch
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 4554712..7c86bcd 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -691,7 +691,7 @@ func Test_getcompletion()
bw Xtest\
endif
- call assert_fails("call getcompletion('\\\\@!\\\\@=', 'buffer')", 'E871:')
+ call assert_fails("call getcompletion('\\\\@!\\\\@=', 'buffer')", 'E866:')
call assert_fails('call getcompletion("", "burp")', 'E475:')
call assert_fails('call getcompletion("abc", [])', 'E1174:')
endfunc
@@ -917,6 +917,26 @@ func Test_cmdline_remove_char()
let &encoding = encoding_save
endfunc
+func Test_cmdline_del_utf8()
+ let @s = '⒌'
+ call feedkeys(":\"\<C-R>s,,\<C-B>\<Right>\<Del>\<CR>", 'tx')
+ call assert_equal('",,', @:)
+
+ let @s = 'a̳'
+ call feedkeys(":\"\<C-R>s,,\<C-B>\<Right>\<Del>\<CR>", 'tx')
+ call assert_equal('",,', @:)
+
+ let @s = 'β̳'
+ call feedkeys(":\"\<C-R>s,,\<C-B>\<Right>\<Del>\<CR>", 'tx')
+ call assert_equal('",,', @:)
+
+ if has('arabic')
+ let @s = 'لا'
+ call feedkeys(":\"\<C-R>s,,\<C-B>\<Right>\<Del>\<CR>", 'tx')
+ call assert_equal('",,', @:)
+ endif
+endfunc
+
func Test_cmdline_keymap_ctrl_hat()
CheckFeature keymap
@@ -3742,4 +3762,34 @@ func Test_custom_completion_with_glob()
delfunc TestGlobComplete
endfunc
+func Test_window_size_stays_same_after_changing_cmdheight()
+ set laststatus=2
+ let expected = winheight(0)
+ function! Function_name() abort
+ call feedkeys(":"..repeat('x', &columns), 'x')
+ let &cmdheight=2
+ let &cmdheight=1
+ redraw
+ endfunction
+ call Function_name()
+ call assert_equal(expected, winheight(0))
+endfunc
+
+" verify that buffer-completion finds all buffer names matching a pattern
+func Test_buffer_completion()
+ " should return empty list
+ call assert_equal([], getcompletion('', 'buffer'))
+
+ call mkdir('Xbuf_complete', 'R')
+ e Xbuf_complete/Foobar.c
+ e Xbuf_complete/MyFoobar.c
+ e AFoobar.h
+ let expected = ["Xbuf_complete/Foobar.c", "Xbuf_complete/MyFoobar.c", "AFoobar.h"]
+
+ call assert_equal(3, len(getcompletion('Foo', 'buffer')))
+ call assert_equal(expected, getcompletion('Foo', 'buffer'))
+ call feedkeys(":b Foo\<C-A>\<C-B>\"\<CR>", 'xt')
+ call assert_equal("\"b Xbuf_complete/Foobar.c Xbuf_complete/MyFoobar.c AFoobar.h", @:)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_cmdwin.vim b/src/testdir/test_cmdwin.vim
index 5ba16db..33a2662 100644
--- a/src/testdir/test_cmdwin.vim
+++ b/src/testdir/test_cmdwin.vim
@@ -188,7 +188,7 @@ func Test_cmdwin_tabpage()
tabclose!
endfunc
-func Test_cmdwin_interrupted()
+func Test_cmdwin_interrupted_more_prompt()
CheckScreendump
" aborting the :smile output caused the cmdline window to use the current
@@ -470,4 +470,117 @@ func Test_cmdwin_restore_heights()
set cmdheight& showtabline& laststatus&
endfunc
+func Test_cmdwin_temp_curwin()
+ func CheckWraps(expect_wrap)
+ setlocal textwidth=0 wrapmargin=1
+
+ call deletebufline('', 1, '$')
+ let as = repeat('a', winwidth(0) - 2 - &wrapmargin)
+ call setline(1, as .. ' b')
+ normal! gww
+
+ setlocal textwidth& wrapmargin&
+ call assert_equal(a:expect_wrap ? [as, 'b'] : [as .. ' b'], getline(1, '$'))
+ endfunc
+
+ func CheckCmdWin()
+ call assert_equal('command', win_gettype())
+ " textoff and &wrapmargin formatting considers the cmdwin_type char.
+ call assert_equal(1, getwininfo(win_getid())[0].textoff)
+ call CheckWraps(1)
+ endfunc
+
+ func CheckOtherWin()
+ call assert_equal('', win_gettype())
+ call assert_equal(0, getwininfo(win_getid())[0].textoff)
+ call CheckWraps(0)
+ endfunc
+
+ call feedkeys("q::call CheckCmdWin()\<CR>:call win_execute(win_getid(winnr('#')), 'call CheckOtherWin()')\<CR>:q<CR>", 'ntx')
+
+ %bwipe!
+ delfunc CheckWraps
+ delfunc CheckCmdWin
+ delfunc CheckOtherWin
+endfunc
+
+func Test_cmdwin_interrupted()
+ func CheckInterrupted()
+ call feedkeys("q::call assert_equal('', getcmdwintype())\<CR>:call assert_equal('', getcmdtype())\<CR>:q<CR>", 'ntx')
+ endfunc
+
+ augroup CmdWin
+
+ " While opening the cmdwin's split:
+ " Close the cmdwin's window.
+ au WinEnter * ++once quit
+ call CheckInterrupted()
+
+ " Close the old window.
+ au WinEnter * ++once execute winnr('#') 'quit'
+ call CheckInterrupted()
+
+ " Switch back to the old window.
+ au WinEnter * ++once wincmd p
+ call CheckInterrupted()
+
+ " Change the old window's buffer.
+ au WinEnter * ++once call win_execute(win_getid(winnr('#')), 'enew')
+ call CheckInterrupted()
+
+ " Using BufLeave autocmds as cmdwin restrictions do not apply to them when
+ " fired from opening the cmdwin...
+ " After opening the cmdwin's split, while creating the cmdwin's buffer:
+ " Delete the cmdwin's buffer.
+ au BufLeave * ++once bwipe
+ call CheckInterrupted()
+
+ " Close the cmdwin's window.
+ au BufLeave * ++once quit
+ call CheckInterrupted()
+
+ " Close the old window.
+ au BufLeave * ++once execute winnr('#') 'quit'
+ call CheckInterrupted()
+
+ " Switch to a different window.
+ au BufLeave * ++once split
+ call CheckInterrupted()
+
+ " Change the old window's buffer.
+ au BufLeave * ++once call win_execute(win_getid(winnr('#')), 'enew')
+ call CheckInterrupted()
+
+ " However, changing the current buffer is OK and does not interrupt.
+ au BufLeave * ++once edit other
+ call feedkeys("q::let t=getcmdwintype()\<CR>:let b=bufnr()\<CR>:clo<CR>", 'ntx')
+ call assert_equal(':', t)
+ call assert_equal(1, bufloaded('other'))
+ call assert_notequal(b, bufnr('other'))
+
+ augroup END
+
+ " No autocmds should remain, but clear the augroup to be sure.
+ augroup CmdWin
+ au!
+ augroup END
+
+ %bwipe!
+ delfunc CheckInterrupted
+endfunc
+
+func Test_cmdwin_existing_bufname()
+ func CheckName()
+ call assert_equal(1, getbufinfo('')[0].command)
+ call assert_equal(0, getbufinfo('[Command Line]')[0].command)
+ call assert_match('#a\s*"\[Command Line\]"', execute('ls'))
+ call assert_match('%a\s*"\[Command Line\]"', execute('ls'))
+ endfunc
+
+ file [Command Line]
+ call feedkeys("q::call CheckName()\<CR>:q\<CR>", 'ntx')
+ 0file
+ delfunc CheckName
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_comments.vim b/src/testdir/test_comments.vim
index c34b85c..67454f4 100644
--- a/src/testdir/test_comments.vim
+++ b/src/testdir/test_comments.vim
@@ -237,6 +237,12 @@ func Test_comment_autoformat()
call feedkeys("aone\ntwo\n", 'xt')
call assert_equal(['one', 'two', ''], getline(1, '$'))
+ set backspace=indent,eol,start
+ %d
+ call feedkeys("aone \n\<BS>", 'xt')
+ call assert_equal(['one'], getline(1, '$'))
+ set backspace&
+
close!
endfunc
diff --git a/src/testdir/test_conceal.vim b/src/testdir/test_conceal.vim
index e977921..355817d 100644
--- a/src/testdir/test_conceal.vim
+++ b/src/testdir/test_conceal.vim
@@ -171,6 +171,57 @@ func Test_conceal_with_cursorcolumn()
call StopVimInTerminal(buf)
endfunc
+" Check that 'cursorline' and 'wincolor' apply to the whole line in presence
+" of wrapped lines containing concealed text.
+func Test_conceal_wrapped_cursorline_wincolor()
+ CheckScreendump
+
+ let code =<< trim [CODE]
+ call setline(1, 'one one one |hidden| one one one one one one one one')
+ syntax match test /|hidden|/ conceal
+ set conceallevel=2 concealcursor=n cursorline
+ normal! g$
+ [CODE]
+
+ call writefile(code, 'XTest_conceal_cul_wcr', 'D')
+ let buf = RunVimInTerminal('-S XTest_conceal_cul_wcr', {'rows': 4, 'cols': 40})
+ call VerifyScreenDump(buf, 'Test_conceal_cul_wcr_01', {})
+
+ call term_sendkeys(buf, ":set wincolor=ErrorMsg\n")
+ call VerifyScreenDump(buf, 'Test_conceal_cul_wcr_02', {})
+
+ call term_sendkeys(buf, ":set nocursorline\n")
+ call VerifyScreenDump(buf, 'Test_conceal_cul_wcr_03', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+endfunc
+
+" Same as Test_conceal_wrapped_cursorline_wincolor(), but with 'rightleft'.
+func Test_conceal_wrapped_cursorline_wincolor_rightleft()
+ CheckScreendump
+
+ let code =<< trim [CODE]
+ call setline(1, 'one one one |hidden| one one one one one one one one')
+ syntax match test /|hidden|/ conceal
+ set conceallevel=2 concealcursor=n cursorline rightleft
+ normal! g$
+ [CODE]
+
+ call writefile(code, 'XTest_conceal_cul_wcr_rl', 'D')
+ let buf = RunVimInTerminal('-S XTest_conceal_cul_wcr_rl', {'rows': 4, 'cols': 40})
+ call VerifyScreenDump(buf, 'Test_conceal_cul_wcr_rl_01', {})
+
+ call term_sendkeys(buf, ":set wincolor=ErrorMsg\n")
+ call VerifyScreenDump(buf, 'Test_conceal_cul_wcr_rl_02', {})
+
+ call term_sendkeys(buf, ":set nocursorline\n")
+ call VerifyScreenDump(buf, 'Test_conceal_cul_wcr_rl_03', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+endfunc
+
func Test_conceal_resize_term()
CheckScreendump
@@ -338,77 +389,290 @@ func Test_conceal_eol()
endfunc
func Test_conceal_mouse_click()
- enew!
+ call NewWindow(10, 40)
set mouse=a
setlocal conceallevel=2 concealcursor=nc
syn match Concealed "this" conceal
hi link Concealed Search
- call setline(1, 'conceal this click here')
- redraw
- call assert_equal(['conceal click here '], ScreenLines(1, 20))
-
- " click on the space between "this" and "click" puts cursor there
- call test_setmouse(1, 9)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 13, 0, 13], getcurpos())
- " click on 'h' of "here" puts cursor there
- call test_setmouse(1, 16)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 20, 0, 20], getcurpos())
- " click on 'e' of "here" puts cursor there
- call test_setmouse(1, 19)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 23, 0, 23], getcurpos())
- " click after end of line puts cursor on 'e' without 'virtualedit'
- call test_setmouse(1, 20)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 23, 0, 24], getcurpos())
- call test_setmouse(1, 21)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 23, 0, 25], getcurpos())
- call test_setmouse(1, 22)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 23, 0, 26], getcurpos())
- call test_setmouse(1, 31)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 23, 0, 35], getcurpos())
- call test_setmouse(1, 32)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 23, 0, 36], getcurpos())
-
- set virtualedit=all
- redraw
- " click on the space between "this" and "click" puts cursor there
- call test_setmouse(1, 9)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 13, 0, 13], getcurpos())
- " click on 'h' of "here" puts cursor there
- call test_setmouse(1, 16)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 20, 0, 20], getcurpos())
- " click on 'e' of "here" puts cursor there
- call test_setmouse(1, 19)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 23, 0, 23], getcurpos())
- " click after end of line puts cursor there without 'virtualedit'
- call test_setmouse(1, 20)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 24, 0, 24], getcurpos())
- call test_setmouse(1, 21)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 24, 1, 25], getcurpos())
- call test_setmouse(1, 22)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 24, 2, 26], getcurpos())
- call test_setmouse(1, 31)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 24, 11, 35], getcurpos())
- call test_setmouse(1, 32)
- call feedkeys("\<LeftMouse>", "tx")
- call assert_equal([0, 1, 24, 12, 36], getcurpos())
-
- bwipe!
- set mouse& virtualedit&
+
+ " Test with both 'nocursorline' and 'cursorline', as they use two different
+ " code paths to set virtual columns for the cells to clear.
+ for cul in [v:false, v:true]
+ let &l:cursorline = cul
+
+ call setline(1, 'conceal this click here')
+ call assert_equal([
+ \ 'conceal click here ',
+ \ ], ScreenLines(1, 40))
+
+ " Click on the space between "this" and "click" puts cursor there.
+ call test_setmouse(1, 9)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 13, 0, 13], getcurpos())
+ " Click on 'h' of "here" puts cursor there.
+ call test_setmouse(1, 16)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 20, 0, 20], getcurpos())
+ " Click on 'e' of "here" puts cursor there.
+ call test_setmouse(1, 19)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 23, 0, 23], getcurpos())
+ " Click after end of line puts cursor on 'e' without 'virtualedit'.
+ call test_setmouse(1, 20)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 23, 0, 24], getcurpos())
+ call test_setmouse(1, 21)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 23, 0, 25], getcurpos())
+ call test_setmouse(1, 22)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 23, 0, 26], getcurpos())
+ call test_setmouse(1, 31)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 23, 0, 35], getcurpos())
+ call test_setmouse(1, 32)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 23, 0, 36], getcurpos())
+
+ set virtualedit=all
+ redraw
+ " Click on the space between "this" and "click" puts cursor there.
+ call test_setmouse(1, 9)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 13, 0, 13], getcurpos())
+ " Click on 'h' of "here" puts cursor there.
+ call test_setmouse(1, 16)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 20, 0, 20], getcurpos())
+ " Click on 'e' of "here" puts cursor there.
+ call test_setmouse(1, 19)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 23, 0, 23], getcurpos())
+ " Click after end of line puts cursor there with 'virtualedit'.
+ call test_setmouse(1, 20)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 24, 0, 24], getcurpos())
+ call test_setmouse(1, 21)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 24, 1, 25], getcurpos())
+ call test_setmouse(1, 22)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 24, 2, 26], getcurpos())
+ call test_setmouse(1, 31)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 24, 11, 35], getcurpos())
+ call test_setmouse(1, 32)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 24, 12, 36], getcurpos())
+ " Behavior should also be the same with 'colorcolumn'.
+ setlocal colorcolumn=30
+ redraw
+ call test_setmouse(1, 31)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 24, 11, 35], getcurpos())
+ call test_setmouse(1, 32)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 24, 12, 36], getcurpos())
+ setlocal colorcolumn&
+
+ if has('rightleft')
+ setlocal rightleft
+ call assert_equal([
+ \ ' ereh kcilc laecnoc',
+ \ ], ScreenLines(1, 40))
+ " Click on the space between "this" and "click" puts cursor there.
+ call test_setmouse(1, 41 - 9)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 13, 0, 13], getcurpos())
+ " Click on 'h' of "here" puts cursor there.
+ call test_setmouse(1, 41 - 16)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 20, 0, 20], getcurpos())
+ " Click on 'e' of "here" puts cursor there.
+ call test_setmouse(1, 41 - 19)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 23, 0, 23], getcurpos())
+ " Click after end of line puts cursor there with 'virtualedit'.
+ call test_setmouse(1, 41 - 20)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 24, 0, 24], getcurpos())
+ call test_setmouse(1, 41 - 21)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 24, 1, 25], getcurpos())
+ call test_setmouse(1, 41 - 22)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 24, 2, 26], getcurpos())
+ call test_setmouse(1, 41 - 31)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 24, 11, 35], getcurpos())
+ call test_setmouse(1, 41 - 32)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 24, 12, 36], getcurpos())
+ setlocal rightleft&
+ endif
+
+ set virtualedit&
+
+ " Test with a wrapped line.
+ call setline(1, ['conceal this click here']->repeat(3)->join())
+ call assert_equal([
+ \ 'conceal click here conceal cli ',
+ \ 'ck here conceal click here ',
+ \ ], ScreenLines([1, 2], 40))
+ " Click on boguscols puts cursor on the last char of a screen line.
+ for col in range(33, 40)
+ call test_setmouse(1, col)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 40, 0, 40], getcurpos())
+ endfor
+
+ " Also test with the last char of a screen line concealed.
+ setlocal number signcolumn=yes
+ call assert_equal([
+ \ ' 1 conceal click here conceal ',
+ \ ' click here conceal click h ',
+ \ ' ere ',
+ \ ], ScreenLines([1, 3], 40))
+ call test_setmouse(1, 34)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 32, 0, 32], getcurpos())
+ call test_setmouse(2, 7)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 37, 0, 37], getcurpos())
+ " Click on boguscols puts cursor on the last char of a screen line.
+ for col in range(35, 40)
+ call test_setmouse(1, col)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 34, 0, 34], getcurpos())
+ call test_setmouse(2, col)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 68, 0, 68], getcurpos())
+ endfor
+ setlocal number& signcolumn&
+ endfor
+
+ call CloseWindow()
+ set mouse&
+endfunc
+
+" Test that cursor is drawn at the correct column when it is after end of the
+" line with 'virtualedit' and concealing.
+func Run_test_conceal_virtualedit_after_eol(wrap)
+ let code =<< trim eval [CODE]
+ let &wrap = {a:wrap}
+ call setline(1, 'abcdefgh|hidden|ijklmnpop')
+ syntax match test /|hidden|/ conceal
+ set conceallevel=2 concealcursor=n virtualedit=all
+ normal! $
+ [CODE]
+ call writefile(code, 'XTest_conceal_ve_after_eol', 'D')
+ let buf = RunVimInTerminal('-S XTest_conceal_ve_after_eol', {'rows': 3})
+ call VerifyScreenDump(buf, 'Test_conceal_ve_after_eol_1', {})
+ call term_sendkeys(buf, "l")
+ call VerifyScreenDump(buf, 'Test_conceal_ve_after_eol_2', {})
+ call term_sendkeys(buf, "l")
+ call VerifyScreenDump(buf, 'Test_conceal_ve_after_eol_3', {})
+ call term_sendkeys(buf, "l")
+ call VerifyScreenDump(buf, 'Test_conceal_ve_after_eol_4', {})
+ call term_sendkeys(buf, "rr")
+ call VerifyScreenDump(buf, 'Test_conceal_ve_after_eol_5', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+endfunc
+
+func Test_conceal_virtualedit_after_eol()
+ CheckScreendump
+
+ call Run_test_conceal_virtualedit_after_eol(1)
+ call Run_test_conceal_virtualedit_after_eol(0)
+endfunc
+
+" Same as Run_test_conceal_virtualedit_after_eol(), but with 'rightleft'.
+func Run_test_conceal_virtualedit_after_eol_rightleft(wrap)
+ let code =<< trim eval [CODE]
+ let &wrap = {a:wrap}
+ call setline(1, 'abcdefgh|hidden|ijklmnpop')
+ syntax match test /|hidden|/ conceal
+ set conceallevel=2 concealcursor=n virtualedit=all rightleft
+ normal! $
+ [CODE]
+ call writefile(code, 'XTest_conceal_ve_after_eol_rl', 'D')
+ let buf = RunVimInTerminal('-S XTest_conceal_ve_after_eol_rl', {'rows': 3})
+ call VerifyScreenDump(buf, 'Test_conceal_ve_after_eol_rl_1', {})
+ call term_sendkeys(buf, "h")
+ call VerifyScreenDump(buf, 'Test_conceal_ve_after_eol_rl_2', {})
+ call term_sendkeys(buf, "h")
+ call VerifyScreenDump(buf, 'Test_conceal_ve_after_eol_rl_3', {})
+ call term_sendkeys(buf, "h")
+ call VerifyScreenDump(buf, 'Test_conceal_ve_after_eol_rl_4', {})
+ call term_sendkeys(buf, "rr")
+ call VerifyScreenDump(buf, 'Test_conceal_ve_after_eol_rl_5', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+endfunc
+
+func Test_conceal_virtualedit_after_eol_rightleft()
+ CheckFeature rightleft
+ CheckScreendump
+
+ call Run_test_conceal_virtualedit_after_eol_rightleft(1)
+ call Run_test_conceal_virtualedit_after_eol_rightleft(0)
+endfunc
+
+" Test that cursor position is correct when double-width chars are concealed.
+func Run_test_conceal_double_width(wrap)
+ let code =<< trim eval [CODE]
+ let &wrap = {a:wrap}
+ call setline(1, ['aaaaaå£=å£bbbbbå£=å£ccccc', 'foobar'])
+ syntax match test /å£=å£/ conceal cchar=β
+ set conceallevel=2 concealcursor=n colorcolumn=30
+ normal! $
+ [CODE]
+ call writefile(code, 'XTest_conceal_double_width', 'D')
+ let buf = RunVimInTerminal('-S XTest_conceal_double_width', {'rows': 4})
+ call VerifyScreenDump(buf, 'Test_conceal_double_width_1', {})
+ call term_sendkeys(buf, "gM")
+ call VerifyScreenDump(buf, 'Test_conceal_double_width_2', {})
+ call term_sendkeys(buf, ":set conceallevel=3\<CR>")
+ call VerifyScreenDump(buf, 'Test_conceal_double_width_3', {})
+ call term_sendkeys(buf, "$")
+ call VerifyScreenDump(buf, 'Test_conceal_double_width_4', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+endfunc
+
+func Test_conceal_double_width()
+ CheckScreendump
+
+ call Run_test_conceal_double_width(1)
+ call Run_test_conceal_double_width(0)
+endfunc
+
+" Test that line wrapping is correct when double-width chars are concealed.
+func Test_conceal_double_width_wrap()
+ CheckScreendump
+
+ let code =<< trim [CODE]
+ call setline(1, 'aaaaaaaaaaå£=å£bbbbbbbbbbå£=å£cccccccccc')
+ syntax match test /å£=å£/ conceal cchar=β
+ set conceallevel=2 concealcursor=n
+ normal! $
+ [CODE]
+ call writefile(code, 'XTest_conceal_double_width_wrap', 'D')
+ let buf = RunVimInTerminal('-S XTest_conceal_double_width_wrap', {'rows': 4, 'cols': 20})
+ call VerifyScreenDump(buf, 'Test_conceal_double_width_wrap_1', {})
+ call term_sendkeys(buf, "gM")
+ call VerifyScreenDump(buf, 'Test_conceal_double_width_wrap_2', {})
+ call term_sendkeys(buf, ":set conceallevel=3\<CR>")
+ call VerifyScreenDump(buf, 'Test_conceal_double_width_wrap_3', {})
+ call term_sendkeys(buf, "$")
+ call VerifyScreenDump(buf, 'Test_conceal_double_width_wrap_4', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
endfunc
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim
index 930fd7b..7602bd3 100644
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -3,6 +3,7 @@
source shared.vim
source screendump.vim
source check.vim
+source view_util.vim
func Test_diff_fold_sync()
enew!
@@ -871,6 +872,10 @@ func VerifyInternal(buf, dumpfile, extra)
endfunc
func Test_diff_screen()
+ if has('osxdarwin') && system('diff --version') =~ '^Apple diff'
+ throw 'Skipped: unified diff does not work properly on this macOS version'
+ endif
+
let g:test_is_flaky = 1
CheckScreendump
CheckFeature menu
@@ -1129,7 +1134,7 @@ func Test_diff_breakindent_after_filler()
CheckScreendump
let lines =<< trim END
- set laststatus=0 diffopt+=followwrap breakindent
+ set laststatus=0 diffopt+=followwrap breakindent breakindentopt=min:0
call setline(1, ['a', ' ' .. repeat('c', 50)])
vnew
call setline(1, ['a', 'b', ' ' .. repeat('c', 50)])
@@ -1712,5 +1717,307 @@ func Test_diff_put_and_undo()
set nodiff
endfunc
+" Test for the diff() function
+def Test_diff_func()
+ # string is added/removed/modified at the beginning
+ assert_equal("@@ -0,0 +1 @@\n+abc\n",
+ diff(['def'], ['abc', 'def'], {output: 'unified'}))
+ assert_equal([{from_idx: 0, from_count: 0, to_idx: 0, to_count: 1}],
+ diff(['def'], ['abc', 'def'], {output: 'indices'}))
+ assert_equal("@@ -1 +0,0 @@\n-abc\n",
+ diff(['abc', 'def'], ['def'], {output: 'unified'}))
+ assert_equal([{from_idx: 0, from_count: 1, to_idx: 0, to_count: 0}],
+ diff(['abc', 'def'], ['def'], {output: 'indices'}))
+ assert_equal("@@ -1 +1 @@\n-abc\n+abx\n",
+ diff(['abc', 'def'], ['abx', 'def'], {output: 'unified'}))
+ assert_equal([{from_idx: 0, from_count: 1, to_idx: 0, to_count: 1}],
+ diff(['abc', 'def'], ['abx', 'def'], {output: 'indices'}))
+
+ # string is added/removed/modified at the end
+ assert_equal("@@ -1,0 +2 @@\n+def\n",
+ diff(['abc'], ['abc', 'def'], {output: 'unified'}))
+ assert_equal([{from_idx: 1, from_count: 0, to_idx: 1, to_count: 1}],
+ diff(['abc'], ['abc', 'def'], {output: 'indices'}))
+ assert_equal("@@ -2 +1,0 @@\n-def\n",
+ diff(['abc', 'def'], ['abc'], {output: 'unified'}))
+ assert_equal([{from_idx: 1, from_count: 1, to_idx: 1, to_count: 0}],
+ diff(['abc', 'def'], ['abc'], {output: 'indices'}))
+ assert_equal("@@ -2 +2 @@\n-def\n+xef\n",
+ diff(['abc', 'def'], ['abc', 'xef'], {output: 'unified'}))
+ assert_equal([{from_idx: 1, from_count: 1, to_idx: 1, to_count: 1}],
+ diff(['abc', 'def'], ['abc', 'xef'], {output: 'indices'}))
+
+ # string is added/removed/modified in the middle
+ assert_equal("@@ -2,0 +3 @@\n+xxx\n",
+ diff(['111', '222', '333'], ['111', '222', 'xxx', '333'], {output: 'unified'}))
+ assert_equal([{from_idx: 2, from_count: 0, to_idx: 2, to_count: 1}],
+ diff(['111', '222', '333'], ['111', '222', 'xxx', '333'], {output: 'indices'}))
+ assert_equal("@@ -3 +2,0 @@\n-333\n",
+ diff(['111', '222', '333', '444'], ['111', '222', '444'], {output: 'unified'}))
+ assert_equal([{from_idx: 2, from_count: 1, to_idx: 2, to_count: 0}],
+ diff(['111', '222', '333', '444'], ['111', '222', '444'], {output: 'indices'}))
+ assert_equal("@@ -3 +3 @@\n-333\n+xxx\n",
+ diff(['111', '222', '333', '444'], ['111', '222', 'xxx', '444'], {output: 'unified'}))
+ assert_equal([{from_idx: 2, from_count: 1, to_idx: 2, to_count: 1}],
+ diff(['111', '222', '333', '444'], ['111', '222', 'xxx', '444'], {output: 'indices'}))
+
+ # new strings are added to an empty List
+ assert_equal("@@ -0,0 +1,2 @@\n+abc\n+def\n",
+ diff([], ['abc', 'def'], {output: 'unified'}))
+ assert_equal([{from_idx: 0, from_count: 0, to_idx: 0, to_count: 2}],
+ diff([], ['abc', 'def'], {output: 'indices'}))
+
+ # all the strings are removed from a List
+ assert_equal("@@ -1,2 +0,0 @@\n-abc\n-def\n",
+ diff(['abc', 'def'], [], {output: 'unified'}))
+ assert_equal([{from_idx: 0, from_count: 2, to_idx: 0, to_count: 0}],
+ diff(['abc', 'def'], [], {output: 'indices'}))
+
+ # First character is added/removed/different
+ assert_equal("@@ -1 +1 @@\n-abc\n+bc\n",
+ diff(['abc'], ['bc'], {output: 'unified'}))
+ assert_equal([{from_idx: 0, from_count: 1, to_idx: 0, to_count: 1}],
+ diff(['abc'], ['bc'], {output: 'indices'}))
+ assert_equal("@@ -1 +1 @@\n-bc\n+abc\n",
+ diff(['bc'], ['abc'], {output: 'unified'}))
+ assert_equal([{from_idx: 0, from_count: 1, to_idx: 0, to_count: 1}],
+ diff(['bc'], ['abc'], {output: 'indices'}))
+ assert_equal("@@ -1 +1 @@\n-abc\n+xbc\n",
+ diff(['abc'], ['xbc'], {output: 'unified'}))
+ assert_equal([{from_idx: 0, from_count: 1, to_idx: 0, to_count: 1}],
+ diff(['abc'], ['xbc'], {output: 'indices'}))
+
+ # Last character is added/removed/different
+ assert_equal("@@ -1 +1 @@\n-abc\n+abcd\n",
+ diff(['abc'], ['abcd'], {output: 'unified'}))
+ assert_equal([{from_idx: 0, from_count: 1, to_idx: 0, to_count: 1}],
+ diff(['abc'], ['abcd'], {output: 'indices'}))
+ assert_equal("@@ -1 +1 @@\n-abcd\n+abc\n",
+ diff(['abcd'], ['abc'], {output: 'unified'}))
+ assert_equal([{from_idx: 0, from_count: 1, to_idx: 0, to_count: 1}],
+ diff(['abcd'], ['abc'], {output: 'indices'}))
+ var diff_unified: string = diff(['abc'], ['abx'], {output: 'unified'})
+ assert_equal("@@ -1 +1 @@\n-abc\n+abx\n", diff_unified)
+ var diff_indices: list<dict<number>> =
+ diff(['abc'], ['abx'], {output: 'indices'})
+ assert_equal([{from_idx: 0, from_count: 1, to_idx: 0, to_count: 1}],
+ diff_indices)
+
+ # partial string modification at the start and at the end.
+ var fromlist =<< trim END
+ one two
+ three four
+ five six
+ END
+ var tolist =<< trim END
+ one
+ six
+ END
+ assert_equal("@@ -1,3 +1,2 @@\n-one two\n-three four\n-five six\n+one\n+six\n", diff(fromlist, tolist, {output: 'unified'}))
+ assert_equal([{from_idx: 0, from_count: 3, to_idx: 0, to_count: 2}],
+ diff(fromlist, tolist, {output: 'indices'}))
+
+ # non-contiguous modifications
+ fromlist =<< trim END
+ one two
+ three four
+ five abc six
+ END
+ tolist =<< trim END
+ one abc two
+ three four
+ five six
+ END
+ assert_equal("@@ -1 +1 @@\n-one two\n+one abc two\n@@ -3 +3 @@\n-five abc six\n+five six\n",
+ diff(fromlist, tolist, {output: 'unified'}))
+ assert_equal([{'from_count': 1, 'to_idx': 0, 'to_count': 1, 'from_idx': 0},
+ {'from_count': 1, 'to_idx': 2, 'to_count': 1, 'from_idx': 2}],
+ diff(fromlist, tolist, {output: 'indices'}))
+
+ # add/remove blank lines
+ assert_equal("@@ -2,2 +1,0 @@\n-\n-\n",
+ diff(['one', '', '', 'two'], ['one', 'two'], {output: 'unified'}))
+ assert_equal([{from_idx: 1, from_count: 2, to_idx: 1, to_count: 0}],
+ diff(['one', '', '', 'two'], ['one', 'two'], {output: 'indices'}))
+ assert_equal("@@ -1,0 +2,2 @@\n+\n+\n",
+ diff(['one', 'two'], ['one', '', '', 'two'], {output: 'unified'}))
+ assert_equal([{'from_idx': 1, 'from_count': 0, 'to_idx': 1, 'to_count': 2}],
+ diff(['one', 'two'], ['one', '', '', 'two'], {output: 'indices'}))
+
+ # diff ignoring case
+ assert_equal('', diff(['abc', 'def'], ['ABC', 'DEF'], {icase: true, output: 'unified'}))
+ assert_equal([], diff(['abc', 'def'], ['ABC', 'DEF'], {icase: true, output: 'indices'}))
+
+ # diff ignoring all whitespace changes except leading whitespace changes
+ assert_equal('', diff(['abc def'], ['abc def '], {iwhite: true}))
+ assert_equal("@@ -1 +1 @@\n- abc\n+ xxx\n", diff([' abc'], [' xxx'], {iwhite: v:true}))
+ assert_equal("@@ -1 +1 @@\n- abc\n+ xxx\n", diff([' abc'], [' xxx'], {iwhite: v:false}))
+ assert_equal("@@ -1 +1 @@\n-abc \n+xxx \n", diff(['abc '], ['xxx '], {iwhite: v:true}))
+ assert_equal("@@ -1 +1 @@\n-abc \n+xxx \n", diff(['abc '], ['xxx '], {iwhite: v:false}))
+
+ # diff ignoring all whitespace changes
+ assert_equal('', diff(['abc def'], [' abc def '], {iwhiteall: true}))
+ assert_equal("@@ -1 +1 @@\n- abc \n+ xxx \n", diff([' abc '], [' xxx '], {iwhiteall: v:true}))
+ assert_equal("@@ -1 +1 @@\n- abc \n+ xxx \n", diff([' abc '], [' xxx '], {iwhiteall: v:false}))
+
+ # diff ignoring trailing whitespace changes
+ assert_equal('', diff(['abc'], ['abc '], {iwhiteeol: true}))
+
+ # diff ignoring blank lines
+ assert_equal('', diff(['one', '', '', 'two'], ['one', 'two'], {iblank: true}))
+ assert_equal('', diff(['one', 'two'], ['one', '', '', 'two'], {iblank: true}))
+
+ # same string
+ assert_equal('', diff(['abc', 'def', 'ghi'], ['abc', 'def', 'ghi']))
+ assert_equal('', diff([''], ['']))
+ assert_equal('', diff([], []))
+
+ # different xdiff algorithms
+ for algo in ['myers', 'minimal', 'patience', 'histogram']
+ assert_equal("@@ -1 +1 @@\n- abc \n+ xxx \n",
+ diff([' abc '], [' xxx '], {algorithm: algo, output: 'unified'}))
+ assert_equal([{from_idx: 0, from_count: 1, to_idx: 0, to_count: 1}],
+ diff([' abc '], [' xxx '], {algorithm: algo, output: 'indices'}))
+ endfor
+ assert_equal("@@ -1 +1 @@\n- abc \n+ xxx \n",
+ diff([' abc '], [' xxx '], {indent-heuristic: true, output: 'unified'}))
+ assert_equal([{from_idx: 0, from_count: 1, to_idx: 0, to_count: 1}],
+ diff([' abc '], [' xxx '], {indent-heuristic: true, output: 'indices'}))
+
+ # identical strings
+ assert_equal('', diff(['111', '222'], ['111', '222'], {output: 'unified'}))
+ assert_equal([], diff(['111', '222'], ['111', '222'], {output: 'indices'}))
+ assert_equal('', diff([], [], {output: 'unified'}))
+ assert_equal([], diff([], [], {output: 'indices'}))
+
+ # If 'diffexpr' is set, it should not be used for diff()
+ def MyDiffExpr()
+ enddef
+ var save_diffexpr = &diffexpr
+ :set diffexpr=MyDiffExpr()
+ assert_equal("@@ -1 +1 @@\n-abc\n+\n",
+ diff(['abc'], [''], {output: 'unified'}))
+ assert_equal([{'from_idx': 0, 'from_count': 1, 'to_idx': 0, 'to_count': 1}],
+ diff(['abc'], [''], {output: 'indices'}))
+ assert_equal('MyDiffExpr()', &diffexpr)
+ &diffexpr = save_diffexpr
+
+ # try different values for unified diff 'context'
+ assert_equal("@@ -0,0 +1 @@\n+x\n",
+ diff(['a', 'b', 'c'], ['x', 'a', 'b', 'c']))
+ assert_equal("@@ -0,0 +1 @@\n+x\n",
+ diff(['a', 'b', 'c'], ['x', 'a', 'b', 'c'], {context: 0}))
+ assert_equal("@@ -1 +1,2 @@\n+x\n a\n",
+ diff(['a', 'b', 'c'], ['x', 'a', 'b', 'c'], {context: 1}))
+ assert_equal("@@ -1,2 +1,3 @@\n+x\n a\n b\n",
+ diff(['a', 'b', 'c'], ['x', 'a', 'b', 'c'], {context: 2}))
+ assert_equal("@@ -1,3 +1,4 @@\n+x\n a\n b\n c\n",
+ diff(['a', 'b', 'c'], ['x', 'a', 'b', 'c'], {context: 3}))
+ assert_equal("@@ -1,3 +1,4 @@\n+x\n a\n b\n c\n",
+ diff(['a', 'b', 'c'], ['x', 'a', 'b', 'c'], {context: 4}))
+ assert_equal("@@ -0,0 +1 @@\n+x\n",
+ diff(['a', 'b', 'c'], ['x', 'a', 'b', 'c'], {context: -1}))
+
+ # Error cases
+ assert_fails('call diff({}, ["a"])', 'E1211:')
+ assert_fails('call diff(["a"], {})', 'E1211:')
+ assert_fails('call diff(["a"], ["a"], [])', 'E1206:')
+ assert_fails('call diff(["a"], ["a"], {output: "xyz"})', 'E106: Unsupported diff output format: xyz')
+ assert_fails('call diff(["a"], ["a"], {context: []})', 'E745: Using a List as a Number')
+enddef
+
+" Test for using the diff() function with 'diffexpr'
+func Test_diffexpr_with_diff_func()
+ CheckScreendump
+
+ let lines =<< trim END
+ def DiffFuncExpr()
+ var in: list<string> = readfile(v:fname_in)
+ var new: list<string> = readfile(v:fname_new)
+ var out: string = diff(in, new)
+ writefile(split(out, "\n"), v:fname_out)
+ enddef
+ set diffexpr=DiffFuncExpr()
+
+ edit Xdifffunc1.txt
+ diffthis
+ vert split Xdifffunc2.txt
+ diffthis
+ END
+ call writefile(lines, 'XsetupDiffFunc.vim', 'D')
+
+ call writefile(['zero', 'one', 'two', 'three'], 'Xdifffunc1.txt', 'D')
+ call writefile(['one', 'twox', 'three', 'four'], 'Xdifffunc2.txt', 'D')
+
+ let buf = RunVimInTerminal('-S XsetupDiffFunc.vim', {'rows': 12})
+ call VerifyScreenDump(buf, 'Test_difffunc_diffexpr_1', {})
+ call StopVimInTerminal(buf)
+endfunc
+
+func Test_diff_toggle_wrap_skipcol_leftcol()
+ 61vnew
+ call setline(1, 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.')
+ 30vnew
+ call setline(1, 'ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.')
+ let win1 = win_getid()
+ setlocal smoothscroll
+ exe "normal! $\<C-E>"
+ wincmd l
+ let win2 = win_getid()
+ setlocal smoothscroll
+ exe "normal! $\<C-E>"
+ call assert_equal([
+ \ '<<<sadipscing elitr, sed diam |<<<tetur sadipscing elitr, sed|',
+ \ 'nonumy eirmod tempor invidunt | diam nonumy eirmod tempor inv|',
+ \ 'ut labore et dolore magna aliq|idunt ut labore et dolore magn|',
+ \ 'uyam erat, sed diam voluptua. |a aliquyam erat, sed diam volu|',
+ \ '~ |ptua. |',
+ \ ], ScreenLines([1, 5], 62))
+ call assert_equal({'col': 29, 'row': 4, 'endcol': 29, 'curscol': 29},
+ \ screenpos(win1, line('.', win1), col('.', win1)))
+ call assert_equal({'col': 36, 'row': 5, 'endcol': 36, 'curscol': 36},
+ \ screenpos(win2, line('.', win2), col('.', win2)))
+
+ wincmd h
+ diffthis
+ wincmd l
+ diffthis
+ normal! 0
+ call assert_equal([
+ \ ' ipsum dolor sit amet, conset| Lorem ipsum dolor sit amet, |',
+ \ '~ |~ |',
+ \ ], ScreenLines([1, 2], 62))
+ call assert_equal({'col': 3, 'row': 1, 'endcol': 3, 'curscol': 3},
+ \ screenpos(win1, line('.', win1), col('.', win1)))
+ call assert_equal({'col': 34, 'row': 1, 'endcol': 34, 'curscol': 34},
+ \ screenpos(win2, line('.', win2), col('.', win2)))
+
+ normal! $
+ call assert_equal([
+ \ ' voluptua. | diam voluptua. |',
+ \ '~ |~ |',
+ \ ], ScreenLines([1, 2], 62))
+ call assert_equal({'col': 11, 'row': 1, 'endcol': 11, 'curscol': 11},
+ \ screenpos(win1, line('.', win1), col('.', win1)))
+ call assert_equal({'col': 48, 'row': 1, 'endcol': 48, 'curscol': 48},
+ \ screenpos(win2, line('.', win2), col('.', win2)))
+
+ diffoff!
+ call assert_equal([
+ \ 'ipsum dolor sit amet, consetet|Lorem ipsum dolor sit amet, co|',
+ \ 'ur sadipscing elitr, sed diam |nsetetur sadipscing elitr, sed|',
+ \ 'nonumy eirmod tempor invidunt | diam nonumy eirmod tempor inv|',
+ \ 'ut labore et dolore magna aliq|idunt ut labore et dolore magn|',
+ \ 'uyam erat, sed diam voluptua. |a aliquyam erat, sed diam volu|',
+ \ '~ |ptua. |',
+ \ ], ScreenLines([1, 6], 62))
+ call assert_equal({'col': 29, 'row': 5, 'endcol': 29, 'curscol': 29},
+ \ screenpos(win1, line('.', win1), col('.', win1)))
+ call assert_equal({'col': 36, 'row': 6, 'endcol': 36, 'curscol': 36},
+ \ screenpos(win2, line('.', win2), col('.', win2)))
+
+ bwipe!
+ bwipe!
+endfunc
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_display.vim b/src/testdir/test_display.vim
index 5e0f86a..86e400e 100644
--- a/src/testdir/test_display.vim
+++ b/src/testdir/test_display.vim
@@ -252,12 +252,12 @@ func Test_eob_fillchars()
" default value
call assert_match('eob:\~', &fillchars)
" invalid values
- call assert_fails(':set fillchars=eob:', 'E474:')
- call assert_fails(':set fillchars=eob:xy', 'E474:')
- call assert_fails(':set fillchars=eob:\255', 'E474:')
- call assert_fails(':set fillchars=eob:<ff>', 'E474:')
- call assert_fails(":set fillchars=eob:\x01", 'E474:')
- call assert_fails(':set fillchars=eob:\\x01', 'E474:')
+ call assert_fails(':set fillchars=eob:', 'E1511:')
+ call assert_fails(':set fillchars=eob:xy', 'E1511:')
+ call assert_fails(':set fillchars=eob:\255', 'E1511:')
+ call assert_fails(':set fillchars=eob:<ff>', 'E1511:')
+ call assert_fails(":set fillchars=eob:\x01", 'E1512:')
+ call assert_fails(':set fillchars=eob:\\x01', 'E1512:')
" default is ~
new
redraw
@@ -411,14 +411,16 @@ func Run_Test_display_lastline(euro)
call StopVimInTerminal(buf)
endfunc
-func Test_display_lastline()
+func Test_display_lastline_dump()
CheckScreendump
call Run_Test_display_lastline('')
call Run_Test_display_lastline('euro_')
+endfunc
- call assert_fails(':set fillchars=lastline:', 'E474:')
- call assert_fails(':set fillchars=lastline:〇', 'E474:')
+func Test_display_lastline_fails()
+ call assert_fails(':set fillchars=lastline:', 'E1511:')
+ call assert_fails(':set fillchars=lastline:〇', 'E1512:')
endfunc
func Test_display_long_lastline()
diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim
index d662f4a..36e0525 100644
--- a/src/testdir/test_edit.vim
+++ b/src/testdir/test_edit.vim
@@ -2123,4 +2123,39 @@ func Test_edit_shift_bs()
call StopVimInTerminal(buf)
endfunc
+func Test_edit_Ctrl_RSB()
+ new
+ let g:triggered = []
+ autocmd InsertCharPre <buffer> let g:triggered += [v:char]
+
+ " i_CTRL-] should not trigger InsertCharPre
+ exe "normal! A\<C-]>"
+ call assert_equal([], g:triggered)
+
+ " i_CTRL-] should expand abbreviations but not trigger InsertCharPre
+ inoreabbr <buffer> f foo
+ exe "normal! Af\<C-]>a"
+ call assert_equal(['f', 'f', 'o', 'o', 'a'], g:triggered)
+ call assert_equal('fooa', getline(1))
+
+ " CTRL-] followed by i_CTRL-V should not expand abbreviations
+ " i_CTRL-V doesn't trigger InsertCharPre
+ call setline(1, '')
+ exe "normal! Af\<C-V>\<C-]>"
+ call assert_equal("f\<C-]>", getline(1))
+
+ let g:triggered = []
+ call setline(1, '')
+
+ " Also test assigning to v:char
+ autocmd InsertCharPre <buffer> let v:char = 'f'
+ exe "normal! Ag\<C-]>h"
+ call assert_equal(['g', 'f', 'o', 'o', 'h'], g:triggered)
+ call assert_equal('ffff', getline(1))
+
+ autocmd! InsertCharPre
+ unlet g:triggered
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_excmd.vim b/src/testdir/test_excmd.vim
index 47fc267..221ceb0 100644
--- a/src/testdir/test_excmd.vim
+++ b/src/testdir/test_excmd.vim
@@ -3,6 +3,7 @@
source check.vim
source shared.vim
source term_util.vim
+source screendump.vim
func Test_ex_delete()
new
@@ -84,18 +85,27 @@ endfunc
" Test for the :drop command
func Test_drop_cmd()
call writefile(['L1', 'L2'], 'Xdropfile', 'D')
+ " Test for reusing the current buffer
enew | only
+ let expected_nr = bufnr()
drop Xdropfile
+ call assert_equal(expected_nr, bufnr())
call assert_equal('L2', getline(2))
" Test for switching to an existing window
below new
drop Xdropfile
call assert_equal(1, winnr())
- " Test for splitting the current window
+ " Test for splitting the current window (set nohidden)
enew | only
set modified
drop Xdropfile
call assert_equal(2, winnr('$'))
+ " Not splitting the current window even if modified (set hidden)
+ set hidden
+ enew | only
+ set modified
+ drop Xdropfile
+ call assert_equal(1, winnr('$'))
" Check for setting the argument list
call assert_equal(['Xdropfile'], argv())
enew | only!
@@ -729,4 +739,19 @@ func Test_ex_address_range_overflow()
call assert_fails(':--+foobar', 'E492:')
endfunc
+func Test_drop_modified_file()
+ CheckScreendump
+ let lines =<< trim END
+ call setline(1, 'The quick brown fox jumped over the lazy dogs')
+ END
+ call writefile([''], 'Xdrop_modified.txt', 'D')
+ call writefile(lines, 'Xtest_drop_modified', 'D')
+ let buf = RunVimInTerminal('-S Xtest_drop_modified Xdrop_modified.txt', {'rows': 10,'columns': 40})
+ call term_sendkeys(buf, ":drop Xdrop_modified.txt\<CR>")
+ call VerifyScreenDump(buf, 'Test_drop_modified_1', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_execute_func.vim b/src/testdir/test_execute_func.vim
index 09b976b..faaace0 100644
--- a/src/testdir/test_execute_func.vim
+++ b/src/testdir/test_execute_func.vim
@@ -204,4 +204,28 @@ func Test_execute_func_with_null()
endif
endfunc
+func Test_win_execute_tabpagewinnr()
+ belowright split
+ tab split
+ belowright split
+ call assert_equal(2, tabpagewinnr(1))
+
+ tabprevious
+ wincmd p
+ call assert_equal(1, tabpagenr())
+ call assert_equal(1, tabpagewinnr(1))
+ call assert_equal(2, tabpagewinnr(2))
+
+ call win_execute(win_getid(1, 2),
+ \ 'call assert_equal(2, tabpagenr())'
+ \ .. '| call assert_equal(1, tabpagewinnr(1))'
+ \ .. '| call assert_equal(1, tabpagewinnr(2))')
+
+ call assert_equal(1, tabpagenr())
+ call assert_equal(1, tabpagewinnr(1))
+ call assert_equal(2, tabpagewinnr(2))
+
+ %bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_exists.vim b/src/testdir/test_exists.vim
index a735a7d..9cdb3fb 100644
--- a/src/testdir/test_exists.vim
+++ b/src/testdir/test_exists.vim
@@ -1,5 +1,7 @@
" Tests for the exists() function
+import './vim9.vim' as v9
+
func Test_exists()
augroup myagroup
autocmd! BufEnter *.my echo "myfile edited"
@@ -334,4 +336,51 @@ func Test_exists_funcarg()
call FuncArg_Tests("arg1", "arg2")
endfunc
+" Test for using exists() with class and object variables and methods.
+func Test_exists_class_object()
+ let lines =<< trim END
+ vim9script
+ class A
+ var var1: number = 10
+ static var var2: number = 10
+ static def Foo()
+ enddef
+ def Bar()
+ enddef
+ endclass
+
+ assert_equal(1, exists("A"))
+ var a = A.new()
+ assert_equal(1, exists("a"))
+
+ assert_equal(1, exists("a.var1"))
+ assert_fails('exists("a.var2")', 'E1375: Class variable "var2" accessible only using class "A"')
+ assert_fails('exists("a.var3")', 'E1326: Variable "var3" not found in object "A"')
+ assert_equal(1, exists("A.var2"))
+ assert_fails('exists("A.var1")', 'E1376: Object variable "var1" accessible only using class "A" object')
+ assert_fails('exists("A.var3")', 'E1337: Class variable "var3" not found in class "A"')
+
+ assert_equal(1, exists("a.Bar"))
+ assert_fails('exists("a.Barz")', 'E1326: Variable "Barz" not found in object "A"')
+ assert_fails('exists("a.Foo")', 'E1326: Variable "Foo" not found in object "A"')
+ assert_equal(1, exists("A.Foo"))
+ assert_fails('exists("A.Bar")', 'E1337: Class variable "Bar" not found in class "A"')
+ assert_fails('exists("A.Barz")', 'E1337: Class variable "Barz" not found in class "A"')
+
+ def Baz()
+ assert_equal(1, exists("A"))
+ var aa = A.new()
+ assert_equal(1, exists("A.var2"))
+ assert_fails('exists("A.var1")', 'E1376: Object variable "var1" accessible only using class "A" object')
+ assert_fails('exists("A.var3")', 'E1337: Class variable "var3" not found in class "A"')
+
+ assert_equal(1, exists("A.Foo"))
+ assert_fails('exists("A.Bar")', 'E1337: Class variable "Bar" not found in class "A"')
+ assert_fails('exists("A.Barz")', 'E1337: Class variable "Barz" not found in class "A"')
+ enddef
+ Baz()
+ END
+ call v9.CheckSourceSuccess(lines)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_expand.vim b/src/testdir/test_expand.vim
index d7c393a..bebe138 100644
--- a/src/testdir/test_expand.vim
+++ b/src/testdir/test_expand.vim
@@ -51,6 +51,19 @@ func Test_expand_tilde_filename()
bwipe!
endfunc
+func Test_expand_env_pathsep()
+ let $FOO = './foo'
+ call assert_equal('./foo/bar', expand('$FOO/bar'))
+ let $FOO = './foo/'
+ call assert_equal('./foo/bar', expand('$FOO/bar'))
+ let $FOO = 'C:'
+ call assert_equal('C:/bar', expand('$FOO/bar'))
+ let $FOO = 'C:/'
+ call assert_equal('C:/bar', expand('$FOO/bar'))
+
+ unlet $FOO
+endfunc
+
func Test_expandcmd()
let $FOO = 'Test'
call assert_equal('e x/Test/y', expandcmd('e x/$FOO/y'))
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 6913eec..d77e5e0 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -150,6 +150,7 @@ def s:GetFilenameChecks(): dict<list<string>>
chatito: ['file.chatito'],
chill: ['file..ch'],
chordpro: ['file.chopro', 'file.crd', 'file.cho', 'file.crdpro', 'file.chordpro'],
+ chuck: ['file.ck'],
cl: ['file.eni'],
clean: ['file.dcl', 'file.icl'],
clojure: ['file.clj', 'file.cljs', 'file.cljx', 'file.cljc'],
@@ -188,6 +189,7 @@ def s:GetFilenameChecks(): dict<list<string>>
cynpp: ['file.cyn'],
cypher: ['file.cypher'],
d: ['file.d'],
+ dafny: ['file.dfy'],
dart: ['file.dart', 'file.drt'],
datascript: ['file.ds'],
dcd: ['file.dcd'],
@@ -213,7 +215,7 @@ def s:GetFilenameChecks(): dict<list<string>>
dracula: ['file.drac', 'file.drc', 'filelvs', 'filelpe', 'drac.file', 'lpe', 'lvs', 'some-lpe', 'some-lvs'],
dtd: ['file.dtd'],
dtrace: ['/usr/lib/dtrace/io.d'],
- dts: ['file.dts', 'file.dtsi'],
+ dts: ['file.dts', 'file.dtsi', 'file.dtso', 'file.its'],
dune: ['jbuild', 'dune', 'dune-project', 'dune-workspace'],
dylan: ['file.dylan'],
dylanintr: ['file.intr'],
@@ -281,7 +283,7 @@ def s:GetFilenameChecks(): dict<list<string>>
glsl: ['file.glsl'],
gn: ['file.gn', 'file.gni'],
gnash: ['gnashrc', '.gnashrc', 'gnashpluginrc', '.gnashpluginrc'],
- gnuplot: ['file.gpi', '.gnuplot'],
+ gnuplot: ['file.gpi', '.gnuplot', 'file.gnuplot'],
go: ['file.go'],
gomod: ['go.mod'],
gosum: ['go.sum', 'go.work.sum'],
@@ -350,13 +352,13 @@ def s:GetFilenameChecks(): dict<list<string>>
jproperties: ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'],
json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', '.prettierrc', '.firebaserc', '.stylelintrc', 'file.slnf'],
json5: ['file.json5'],
- jsonc: ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json'],
+ jsonc: ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json', '.luaurc'],
jsonl: ['file.jsonl'],
jsonnet: ['file.jsonnet', 'file.libsonnet'],
jsp: ['file.jsp'],
julia: ['file.jl'],
just: ['justfile', 'Justfile', '.justfile', 'config.just'],
- kconfig: ['Kconfig', 'Kconfig.debug', 'Kconfig.file'],
+ kconfig: ['Kconfig', 'Kconfig.debug', 'Kconfig.file', 'Config.in', 'Config.in.host'],
kdl: ['file.kdl'],
kivy: ['file.kv'],
kix: ['file.kix'],
@@ -620,7 +622,7 @@ def s:GetFilenameChecks(): dict<list<string>>
services: ['/etc/services', 'any/etc/services'],
setserial: ['/etc/serial.conf', 'any/etc/serial.conf'],
sexplib: ['file.sexp'],
- sh: ['.bashrc', '.bash_profile', '.bash-profile', '.bash_logout', '.bash-logout', '.bash_aliases', '.bash-aliases', '/tmp/bash-fc-3Ozjlw', '/tmp/bash-fc.3Ozjlw', 'PKGBUILD', 'APKBUILD', 'file.bash', '/usr/share/doc/bash-completion/filter.sh', '/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf'],
+ sh: ['.bashrc', '.bash_profile', '.bash-profile', '.bash_logout', '.bash-logout', '.bash_aliases', '.bash-aliases', '/tmp/bash-fc-3Ozjlw', '/tmp/bash-fc.3Ozjlw', 'PKGBUILD', 'APKBUILD', 'file.bash', '/usr/share/doc/bash-completion/filter.sh', '/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf', 'file.bats'],
sieve: ['file.siv', 'file.sieve'],
sil: ['file.sil'],
simula: ['file.sim'],
@@ -777,6 +779,7 @@ def s:GetFilenameChecks(): dict<list<string>>
vdmpp: ['file.vpp', 'file.vdmpp'],
vdmrt: ['file.vdmrt'],
vdmsl: ['file.vdm', 'file.vdmsl'],
+ vento: ['file.vto'],
vera: ['file.vr', 'file.vri', 'file.vrh'],
verilogams: ['file.va', 'file.vams'],
vgrindefs: ['vgrindefs'],
@@ -1602,82 +1605,89 @@ func Test_mod_file()
filetype on
" *.mod defaults to Modsim III
- call writefile(['locks like Modsim III'], 'modfile.mod')
- split modfile.mod
+ call writefile(['locks like Modsim III'], 'Xfile.mod', 'D')
+ split Xfile.mod
call assert_equal('modsim3', &filetype)
bwipe!
" Users preference set by g:filetype_mod
let g:filetype_mod = 'lprolog'
- split modfile.mod
+ split Xfile.mod
call assert_equal('lprolog', &filetype)
unlet g:filetype_mod
bwipe!
+ " LambdaProlog module
+ call writefile(['module lpromod.'], 'Xfile.mod')
+ split Xfile.mod
+ call assert_equal('lprolog', &filetype)
+ bwipe!
+
+ " LambdaProlog with comment and empty lines prior module
+ call writefile(['', '% with', '% comment', '', 'module lpromod.'], 'Xfile.mod')
+ split Xfile.mod
+ call assert_equal('lprolog', &filetype)
+ bwipe!
+
" RAPID header start with a line containing only "%%%",
" but is not always present.
- call writefile(['%%%'], 'modfile.mod')
- split modfile.mod
+ call writefile(['%%%'], 'Xfile.mod')
+ split Xfile.mod
call assert_equal('rapid', &filetype)
bwipe!
- call delete('modfile.mod')
" RAPID supports umlauts in module names, leading spaces,
" the .mod extension is not case sensitive.
- call writefile([' module ÃœmlautModule'], 'modfile.Mod')
- split modfile.Mod
+ call writefile([' module ÃœmlautModule'], 'Xfile.Mod', 'D')
+ split Xfile.Mod
call assert_equal('rapid', &filetype)
bwipe!
- call delete('modfile.Mod')
" RAPID is not case sensitive, embedded spaces, sysmodule,
" file starts with empty line(s).
- call writefile(['', 'MODULE rapidmödüle (SYSMODULE,NOSTEPIN)'], 'modfile.MOD')
- split modfile.MOD
+ call writefile(['', 'MODULE rapidmödüle (SYSMODULE,NOSTEPIN)'], 'Xfile.MOD', 'D')
+ split Xfile.MOD
call assert_equal('rapid', &filetype)
bwipe!
" Modula-2 MODULE not start of line
- call writefile(['IMPLEMENTATION MODULE Module2Mod;'], 'modfile.MOD')
- split modfile.MOD
+ call writefile(['IMPLEMENTATION MODULE Module2Mod;'], 'Xfile.mod')
+ split Xfile.mod
call assert_equal('modula2', &filetype)
call assert_equal('pim', b:modula2.dialect)
bwipe!
" Modula-2 with comment and empty lines prior MODULE
- call writefile(['', '(* with', ' comment *)', '', 'MODULE Module2Mod;'], 'modfile.MOD')
- split modfile.MOD
+ call writefile(['', '(* with', ' comment *)', '', 'MODULE Module2Mod;'], 'Xfile.mod')
+ split Xfile.mod
call assert_equal('modula2', &filetype)
call assert_equal('pim', b:modula2.dialect)
bwipe!
- call delete('modfile.MOD')
-
- " LambdaProlog module
- call writefile(['module lpromod.'], 'modfile.mod')
- split modfile.mod
- call assert_equal('lprolog', &filetype)
+ " Modula-2 program MODULE with priorty (and uppercase extension)
+ call writefile(['MODULE Module2Mod [42];'], 'Xfile.MOD')
+ split Xfile.MOD
+ call assert_equal('modula2', &filetype)
+ call assert_equal('pim', b:modula2.dialect)
bwipe!
- " LambdaProlog with comment and empty lines prior module
- call writefile(['', '% with', '% comment', '', 'module lpromod.'], 'modfile.mod')
- split modfile.mod
- call assert_equal('lprolog', &filetype)
+ " Modula-2 implementation MODULE with priorty (and uppercase extension)
+ call writefile(['IMPLEMENTATION MODULE Module2Mod [42];'], 'Xfile.MOD')
+ split Xfile.MOD
+ call assert_equal('modula2', &filetype)
+ call assert_equal('pim', b:modula2.dialect)
bwipe!
- call delete('modfile.mod')
" go.mod
- call writefile(['module example.com/M'], 'go.mod')
+ call writefile(['module example.com/M'], 'go.mod', 'D')
split go.mod
call assert_equal('gomod', &filetype)
bwipe!
- call delete('go.mod')
call writefile(['module M'], 'go.mod')
split go.mod
call assert_equal('gomod', &filetype)
bwipe!
- call delete('go.mod')
filetype off
endfunc
diff --git a/src/testdir/test_filter_map.vim b/src/testdir/test_filter_map.vim
index 6a07bec..37ebe84 100644
--- a/src/testdir/test_filter_map.vim
+++ b/src/testdir/test_filter_map.vim
@@ -14,6 +14,18 @@ func Test_filter_map_list_expr_string()
call assert_equal([0, 2, 4, 6], map([1, 2, 3, 4], 'v:key * 2'))
call assert_equal([9, 9, 9, 9], map([1, 2, 3, 4], 9))
call assert_equal([7, 7, 7], map([1, 2, 3], ' 7 '))
+
+ " foreach()
+ let list01 = [1, 2, 3, 4]
+ let list02 = []
+ call assert_equal([1, 2, 3, 4], foreach(list01, 'call add(list02, v:val * 2)'))
+ call assert_equal([2, 4, 6, 8], list02)
+ let list02 = []
+ call assert_equal([1, 2, 3, 4], foreach(list01, 'call add(list02, v:key * 2)'))
+ call assert_equal([0, 2, 4, 6], list02)
+ let list02 = []
+ call assert_equal([1, 2, 3, 4], foreach(list01, 'call add(list02, 9)'))
+ call assert_equal([9, 9, 9, 9], list02)
endfunc
" dict with expression string
@@ -29,6 +41,14 @@ func Test_filter_map_dict_expr_string()
call assert_equal({"foo": 2, "bar": 4, "baz": 6}, map(copy(dict), 'v:val * 2'))
call assert_equal({"foo": "f", "bar": "b", "baz": "b"}, map(copy(dict), 'v:key[0]'))
call assert_equal({"foo": 9, "bar": 9, "baz": 9}, map(copy(dict), 9))
+
+ " foreach()
+ let dict01 = {}
+ call assert_equal(dict, foreach(copy(dict), 'let dict01[v:key] = v:val * 2'))
+ call assert_equal({"foo": 2, "bar": 4, "baz": 6}, dict01)
+ let dict01 = {}
+ call assert_equal(dict, foreach(copy(dict), 'let dict01[v:key] = v:key[0]'))
+ call assert_equal({"foo": "f", "bar": "b", "baz": "b"}, dict01)
endfunc
" list with funcref
@@ -54,6 +74,16 @@ func Test_filter_map_list_expr_funcref()
return a:index * 2
endfunc
call assert_equal([0, 2, 4, 6], map([1, 2, 3, 4], function('s:filter4')))
+
+ " foreach()
+ func! s:foreach1(index, val) abort
+ call add(g:test_variable, a:val + 1)
+ return [ 11, 12, 13, 14 ]
+ endfunc
+ let g:test_variable = []
+ call assert_equal([0, 1, 2, 3, 4], foreach(range(5), function('s:foreach1')))
+ call assert_equal([1, 2, 3, 4, 5], g:test_variable)
+ call remove(g:, 'test_variable')
endfunc
func Test_filter_map_nested()
@@ -90,11 +120,46 @@ func Test_filter_map_dict_expr_funcref()
return a:key[0]
endfunc
call assert_equal({"foo": "f", "bar": "b", "baz": "b"}, map(copy(dict), function('s:filter4')))
+
+ " foreach()
+ func! s:foreach1(key, val) abort
+ call extend(g:test_variable, {a:key: a:val * 2})
+ return [ 11, 12, 13, 14 ]
+ endfunc
+ let g:test_variable = {}
+ call assert_equal(dict, foreach(copy(dict), function('s:foreach1')))
+ call assert_equal({"foo": 2, "bar": 4, "baz": 6}, g:test_variable)
+ call remove(g:, 'test_variable')
+endfunc
+
+func Test_map_filter_locked()
+ let list01 = [1, 2, 3, 4]
+ lockvar 1 list01
+ call assert_fails('call filter(list01, "v:val > 1")', 'E741:')
+ call assert_equal([2, 4, 6, 8], map(list01, 'v:val * 2'))
+ call assert_equal([1, 2, 3, 4], map(list01, 'v:val / 2'))
+ call assert_equal([2, 4, 6, 8], mapnew(list01, 'v:val * 2'))
+ let g:test_variable = []
+ call assert_equal([1, 2, 3, 4], foreach(list01, 'call add(g:test_variable, v:val * 2)'))
+ call remove(g:, 'test_variable')
+ call assert_fails('call filter(list01, "v:val > 1")', 'E741:')
+ unlockvar 1 list01
+ lockvar! list01
+ call assert_fails('call filter(list01, "v:val > 1")', 'E741:')
+ call assert_fails('call map(list01, "v:val * 2")', 'E741:')
+ call assert_equal([2, 4, 6, 8], mapnew(list01, 'v:val * 2'))
+ let g:test_variable = []
+ call assert_equal([1, 2, 3, 4], foreach(list01, 'call add(g:test_variable, v:val * 2)'))
+ call assert_fails('call foreach(list01, "let list01[0] = -1")', 'E741:')
+ call assert_fails('call filter(list01, "v:val > 1")', 'E741:')
+ call remove(g:, 'test_variable')
+ unlockvar! list01
endfunc
func Test_map_filter_fails()
call assert_fails('call map([1], "42 +")', 'E15:')
call assert_fails('call filter([1], "42 +")', 'E15:')
+ call assert_fails('call foreach([1], "let a = }")', 'E15:')
call assert_fails("let l = filter([1, 2, 3], '{}')", 'E728:')
call assert_fails("let l = filter({'k' : 10}, '{}')", 'E728:')
call assert_fails("let l = filter([1, 2], {})", 'E731:')
@@ -106,6 +171,8 @@ func Test_map_filter_fails()
call assert_fails("let l = filter([1, 2], function('min'))", 'E118:')
call assert_equal([1, 2, 3], filter([1, 2, 3], test_null_partial()))
call assert_fails("let l = filter([1, 2], {a, b, c -> 1})", 'E119:')
+ call assert_fails('call foreach([1], "xyzzy")', 'E492:')
+ call assert_fails('call foreach([1], "let a = foo")', 'E121:')
endfunc
func Test_map_and_modify()
@@ -123,7 +190,7 @@ endfunc
func Test_filter_and_modify()
let l = [0]
- " cannot change the list halfway a map()
+ " cannot change the list halfway thru filter()
call assert_fails('call filter(l, "remove(l, 0)")', 'E741:')
let d = #{a: 0, b: 0, c: 0}
@@ -133,6 +200,18 @@ func Test_filter_and_modify()
call assert_fails('call filter(b, "remove(b, 0)")', 'E741:')
endfunc
+func Test_foreach_and_modify()
+ let l = [0]
+ " cannot change the list halfway thru foreach()
+ call assert_fails('call foreach(l, "let a = remove(l, 0)")', 'E741:')
+
+ let d = #{a: 0, b: 0, c: 0}
+ call assert_fails('call foreach(d, "let a = remove(d, v:key)")', 'E741:')
+
+ let b = 0z1234
+ call assert_fails('call foreach(b, "let a = remove(b, 0)")', 'E741:')
+endfunc
+
func Test_mapnew_dict()
let din = #{one: 1, two: 2}
let dout = mapnew(din, {k, v -> string(v)})
@@ -160,6 +239,36 @@ func Test_mapnew_blob()
call assert_equal(0z129956, bout)
endfunc
+func Test_foreach_blob()
+ let lines =<< trim END
+ LET g:test_variable = []
+ call assert_equal(0z0001020304, foreach(0z0001020304, 'call add(g:test_variable, v:val)'))
+ call assert_equal([0, 1, 2, 3, 4], g:test_variable)
+ END
+ call v9.CheckLegacyAndVim9Success(lines)
+
+ func! s:foreach1(index, val) abort
+ call add(g:test_variable, a:val)
+ return [ 11, 12, 13, 14 ]
+ endfunc
+ let g:test_variable = []
+ call assert_equal(0z0001020304, foreach(0z0001020304, function('s:foreach1')))
+ call assert_equal([0, 1, 2, 3, 4], g:test_variable)
+
+ let lines =<< trim END
+ def Foreach1(_, val: any): list<number>
+ add(g:test_variable, val)
+ return [ 11, 12, 13, 14 ]
+ enddef
+ g:test_variable = []
+ assert_equal(0z0001020304, foreach(0z0001020304, Foreach1))
+ assert_equal([0, 1, 2, 3, 4], g:test_variable)
+ END
+ call v9.CheckDefSuccess(lines)
+
+ call remove(g:, 'test_variable')
+endfunc
+
" Test for using map(), filter() and mapnew() with a string
func Test_filter_map_string()
" filter()
@@ -219,6 +328,37 @@ func Test_filter_map_string()
END
call v9.CheckLegacyAndVim9Success(lines)
+ " foreach()
+ let lines =<< trim END
+ VAR s = "abc"
+ LET g:test_variable = []
+ call assert_equal(s, foreach(s, 'call add(g:test_variable, v:val)'))
+ call assert_equal(['a', 'b', 'c'], g:test_variable)
+ LET g:test_variable = []
+ LET s = 'ã‚iã†ãˆãŠ'
+ call assert_equal(s, foreach(s, 'call add(g:test_variable, v:val)'))
+ call assert_equal(['ã‚', 'i', 'ã†', 'ãˆ', 'ãŠ'], g:test_variable)
+ END
+ call v9.CheckLegacyAndVim9Success(lines)
+ func! s:foreach1(index, val) abort
+ call add(g:test_variable, a:val)
+ return [ 11, 12, 13, 14 ]
+ endfunc
+ let g:test_variable = []
+ call assert_equal('abcd', foreach('abcd', function('s:foreach1')))
+ call assert_equal(['a', 'b', 'c', 'd'], g:test_variable)
+ let lines =<< trim END
+ def Foreach1(_, val: string): list<number>
+ add(g:test_variable, val)
+ return [ 11, 12, 13, 14 ]
+ enddef
+ g:test_variable = []
+ assert_equal('abcd', foreach('abcd', Foreach1))
+ assert_equal(['a', 'b', 'c', 'd'], g:test_variable)
+ END
+ call v9.CheckDefSuccess(lines)
+ call remove(g:, 'test_variable')
+
let lines =<< trim END
#" map() and filter()
call assert_equal('[ã‚][âˆ][a][😊][â‰][💕][💕][b][💕]', map(filter('ã‚xâˆax😊xâ‰ðŸ’•ðŸ’•b💕x', '"x" != v:val'), '"[" .. v:val .. "]"'))
diff --git a/src/testdir/test_format.vim b/src/testdir/test_format.vim
index af364c2..785348b 100644
--- a/src/testdir/test_format.vim
+++ b/src/testdir/test_format.vim
@@ -105,67 +105,6 @@ func Test_printf_pos_misc()
END
call v9.CheckLegacyAndVim9Success(lines)
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$d%2$d', 1, 3, 4)"], "E767:")
-
- call v9.CheckLegacyAndVim9Failure(["call printf('%2$d%d', 1, 3)"], "E1500:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%d%2$d', 1, 3)"], "E1500:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%2$*1$d%d', 1, 3)"], "E1500:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%d%2$*1$d', 1, 3)"], "E1500:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%2$.*1$d%d', 1, 3)"], "E1500:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%d%2$.*1$d', 1, 3)"], "E1500:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$%')"], "E1500:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$')"], "E1500:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$_')"], "E1500:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3$.*d', 3)"], "E1500:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$*.*2$d', 3)"], "E1500:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$*.*d', 3)"], "E1500:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%*.*1$d', 3)"], "E1500:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%*1$.*d', 3)"], "E1500:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%*1$.*1$d', 3)"], "E1500:")
-
- call v9.CheckLegacyAndVim9Failure(["call printf('%2$d', 3, 3)"], "E1501:")
-
- call v9.CheckLegacyAndVim9Failure(["call printf('%2$*1$d %1$ld', 3, 3)"], "E1502:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$*1$d', 3)"], "E1502:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$p %1$*1$d', 3)"], "E1502:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$f %1$*1$d', 3)"], "E1502:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$lud %1$*1$d', 3)"], "E1502:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$llud %1$*1$d', 3)"], "E1502:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$lld %1$*1$d', 3)"], "E1502:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$*1$d', 3)"], "E1502:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$c %1$*1$d', 3)"], "E1502:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %1$*1$d', 3)"], "E1502:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %2$*1$d', 3, 3)"], "E1502:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$ld', 3)"], "E1502:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$.*1$ld', 3)"], "E1502:")
-
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$d%2$d', 3)"], "E1503:")
-
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$d %1$s', 3)"], "E1504:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %1$s', 3)"], "E1504:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$ud %1$d', 3)"], "E1504:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$f', 3.0)"], "E1504:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$d %1$ld', 3)"], "E1504:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$d', 3)"], "E1504:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$p %1$d', 3)"], "E1504:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$f %1$d', 3)"], "E1504:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$lud %1$d', 3)"], "E1504:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$llud %1$d', 3)"], "E1504:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$lld %1$d', 3)"], "E1504:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$d', 3)"], "E1504:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$c %1$d', 3)"], "E1504:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %1$d', 3)"], "E1504:")
-
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$.2$d', 3)"], "E1505:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%01$d', 3)"], "E1505:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%01$0d', 3)"], "E1505:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$*2d', 3)"], "E1505:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3.*2$d', 3)"], "E1505:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3$.2$d', 3)"], "E1505:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3$.*2d', 3)"], "E1505:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$1$.5d', 5)"], "E1505:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$5.1$d', 5)"], "E1505:")
- call v9.CheckLegacyAndVim9Failure(["call printf('%1$1$.1$d', 5)"], "E1505:")
endfunc
func Test_printf_pos_float()
@@ -287,8 +226,6 @@ func Test_printf_pos_float()
call assert_equal('nan', printf('%1$S', -0.0 / 0.0))
END
call v9.CheckLegacyAndVim9Success(lines)
-
- call v9.CheckLegacyAndVim9Failure(['echo printf("%f", "a")'], 'E807:')
endfunc
func Test_printf_pos_errors()
@@ -299,6 +236,111 @@ func Test_printf_pos_errors()
call v9.CheckLegacyAndVim9Failure(['echo printf("%1$s")'], 'E1503:')
call v9.CheckLegacyAndVim9Failure(['echo printf("%1$d", 1.2)'], 'E805:')
call v9.CheckLegacyAndVim9Failure(['echo printf("%1$f")'], 'E1503:')
+
+ call v9.CheckLegacyAndVim9Failure(['echo printf("%f", "a")'], 'E807:')
+
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$d%2$d', 1, 3, 4)"], "E767:")
+
+ call v9.CheckLegacyAndVim9Failure(["call printf('%2$d%d', 1, 3)"], "E1500:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%d%2$d', 1, 3)"], "E1500:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%2$*1$d%d', 1, 3)"], "E1500:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%d%2$*1$d', 1, 3)"], "E1500:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%2$.*1$d%d', 1, 3)"], "E1500:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%d%2$.*1$d', 1, 3)"], "E1500:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$%')"], "E1500:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$')"], "E1500:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$_')"], "E1500:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3$.*d', 3)"], "E1500:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*.*2$d', 3)"], "E1500:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*.*d', 3)"], "E1500:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%*.*1$d', 3)"], "E1500:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%*1$.*d', 3)"], "E1500:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%*1$.*1$d', 3)"], "E1500:")
+
+ call v9.CheckLegacyAndVim9Failure(["call printf('%2$d', 3, 3)"], "E1501:")
+
+ call v9.CheckLegacyAndVim9Failure(["call printf('%2$*1$d %1$ld', 3, 3)"], "E1502:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$*1$d', 3)"], "E1502:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$p %1$*1$d', 3)"], "E1502:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$f %1$*1$d', 3)"], "E1502:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$lud %1$*1$d', 3)"], "E1502:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$llud %1$*1$d', 3)"], "E1502:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$lld %1$*1$d', 3)"], "E1502:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$*1$d', 3)"], "E1502:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$c %1$*1$d', 3)"], "E1502:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %1$*1$d', 3)"], "E1502:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %2$*1$d', 3, 3)"], "E1502:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$ld', 3)"], "E1502:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$.*1$ld', 3)"], "E1502:")
+
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$d%2$d', 3)"], "E1503:")
+
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$d %1$s', 3)"], "E1504:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %1$s', 3)"], "E1504:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$ud %1$d', 3)"], "E1504:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$f', 3.0)"], "E1504:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$d %1$ld', 3)"], "E1504:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$d', 3)"], "E1504:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$p %1$d', 3)"], "E1504:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$f %1$d', 3)"], "E1504:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$lud %1$d', 3)"], "E1504:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$llud %1$d', 3)"], "E1504:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$lld %1$d', 3)"], "E1504:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$d', 3)"], "E1504:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$c %1$d', 3)"], "E1504:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %1$d', 3)"], "E1504:")
+
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$.2$d', 3)"], "E1505:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%01$d', 3)"], "E1505:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%01$0d', 3)"], "E1505:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*2d', 3)"], "E1505:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3.*2$d', 3)"], "E1505:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3$.2$d', 3)"], "E1505:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3$.*2d', 3)"], "E1505:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$1$.5d', 5)"], "E1505:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$5.1$d', 5)"], "E1505:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$1$.1$d', 5)"], "E1505:")
+
+ call v9.CheckLegacyAndVim9Failure(["call printf('%.123456789$d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%.123456789d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%123456789$d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%123456789d', 5)"], "E1510:")
+
+ call v9.CheckLegacyAndVim9Failure(["call printf('%123456789$5.5d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$123456789.5d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$5.123456789d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%123456789$987654321.5d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$123456789.987654321d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%123456789$5.987654321d', 5)"], "E1510:")
+
+ call v9.CheckLegacyAndVim9Failure(["call printf('%123456789$*1$.5d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*123456789$.5d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$.123456789d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%123456789$*987654321$.5d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*123456789$.987654321d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%123456789$*1$.987654321d', 5)"], "E1510:")
+
+ call v9.CheckLegacyAndVim9Failure(["call printf('%123456789$5.*1$d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$123456789.*1$d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$5.*123456789$d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%123456789$987654321.*1$d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$123456789.*987654321$d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%123456789$5.*987654321$d', 5)"], "E1510:")
+
+ call v9.CheckLegacyAndVim9Failure(["call printf('%123456789$*1$.*1$d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*123456789$.*1$d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$.*123456789d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%123456789$*987654321$.*1$d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*123456789$.*987654321$d', 5)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%123456789$*1$.*987654321$d', 5)"], "E1510:")
+
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*2$.*1$d', 5, 9999)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$.*2$d', 5, 9999)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%2$*3$.*1$d', 5, 9123, 9321)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*2$.*3$d', 5, 9123, 9321)"], "E1510:")
+ call v9.CheckLegacyAndVim9Failure(["call printf('%2$*1$.*3$d', 5, 9123, 9312)"], "E1510:")
+
+ call v9.CheckLegacyAndVim9Failure(["call printf('%1$*2$d', 5, 9999)"], "E1510:")
endfunc
func Test_printf_pos_64bit()
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index 85ccc78..fecebc4 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -3953,4 +3953,55 @@ func Test_glob_extended_mswin()
call delete('Xtestglob', 'rf')
endfunc
+" Tests for the slice() function.
+func Test_slice()
+ let lines =<< trim END
+ call assert_equal([1, 2, 3, 4, 5], slice(range(6), 1))
+ call assert_equal([2, 3, 4, 5], slice(range(6), 2))
+ call assert_equal([2, 3], slice(range(6), 2, 4))
+ call assert_equal([0, 1, 2, 3], slice(range(6), 0, 4))
+ call assert_equal([1, 2, 3], slice(range(6), 1, 4))
+ call assert_equal([1, 2, 3, 4], slice(range(6), 1, -1))
+ call assert_equal([1, 2], slice(range(6), 1, -3))
+ call assert_equal([1], slice(range(6), 1, -4))
+ call assert_equal([], slice(range(6), 1, -5))
+ call assert_equal([], slice(range(6), 1, -6))
+
+ call assert_equal(0z1122334455, slice(0z001122334455, 1))
+ call assert_equal(0z22334455, slice(0z001122334455, 2))
+ call assert_equal(0z2233, slice(0z001122334455, 2, 4))
+ call assert_equal(0z00112233, slice(0z001122334455, 0, 4))
+ call assert_equal(0z112233, slice(0z001122334455, 1, 4))
+ call assert_equal(0z11223344, slice(0z001122334455, 1, -1))
+ call assert_equal(0z1122, slice(0z001122334455, 1, -3))
+ call assert_equal(0z11, slice(0z001122334455, 1, -4))
+ call assert_equal(0z, slice(0z001122334455, 1, -5))
+ call assert_equal(0z, slice(0z001122334455, 1, -6))
+
+ call assert_equal('12345', slice('012345', 1))
+ call assert_equal('2345', slice('012345', 2))
+ call assert_equal('23', slice('012345', 2, 4))
+ call assert_equal('0123', slice('012345', 0, 4))
+ call assert_equal('123', slice('012345', 1, 4))
+ call assert_equal('1234', slice('012345', 1, -1))
+ call assert_equal('12', slice('012345', 1, -3))
+ call assert_equal('1', slice('012345', 1, -4))
+ call assert_equal('', slice('012345', 1, -5))
+ call assert_equal('', slice('012345', 1, -6))
+
+ #" Composing chars are treated as a part of the preceding base char.
+ call assert_equal('βÌ̳γ̳̂δ̳̃ε̳̄ζ̳̅', 'ὰ̳βÌ̳γ̳̂δ̳̃ε̳̄ζ̳̅'->slice(1))
+ call assert_equal('γ̳̂δ̳̃ε̳̄ζ̳̅', 'ὰ̳βÌ̳γ̳̂δ̳̃ε̳̄ζ̳̅'->slice(2))
+ call assert_equal('γ̳̂δ̳̃', 'ὰ̳βÌ̳γ̳̂δ̳̃ε̳̄ζ̳̅'->slice(2, 4))
+ call assert_equal('ὰ̳βÌ̳γ̳̂δ̳̃', 'ὰ̳βÌ̳γ̳̂δ̳̃ε̳̄ζ̳̅'->slice(0, 4))
+ call assert_equal('βÌ̳γ̳̂δ̳̃', 'ὰ̳βÌ̳γ̳̂δ̳̃ε̳̄ζ̳̅'->slice(1, 4))
+ call assert_equal('βÌ̳γ̳̂δ̳̃ε̳̄', 'ὰ̳βÌ̳γ̳̂δ̳̃ε̳̄ζ̳̅'->slice(1, -1))
+ call assert_equal('βÌ̳γ̳̂', 'ὰ̳βÌ̳γ̳̂δ̳̃ε̳̄ζ̳̅'->slice(1, -3))
+ call assert_equal('βÌ̳', 'ὰ̳βÌ̳γ̳̂δ̳̃ε̳̄ζ̳̅'->slice(1, -4))
+ call assert_equal('', 'ὰ̳βÌ̳γ̳̂δ̳̃ε̳̄ζ̳̅'->slice(1, -5))
+ call assert_equal('', 'ὰ̳βÌ̳γ̳̂δ̳̃ε̳̄ζ̳̅'->slice(1, -6))
+ END
+ call v9.CheckLegacyAndVim9Success(lines)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_goto.vim b/src/testdir/test_goto.vim
index 85c156a..357a8d2 100644
--- a/src/testdir/test_goto.vim
+++ b/src/testdir/test_goto.vim
@@ -312,18 +312,23 @@ func Test_gd_string_only()
call XTest_goto_decl('gd', lines, 5, 10)
endfunc
-" Check that setting 'cursorline' does not change curswant
-func Test_cursorline_keep_col()
+" Check that setting some options does not change curswant
+func Test_set_options_keep_col()
new
call setline(1, ['long long long line', 'short line'])
normal ggfi
let pos = getcurpos()
normal j
- set cursorline
+ set invhlsearch spell spelllang=en,cjk spelloptions=camel textwidth=80
+ set cursorline cursorcolumn cursorlineopt=line colorcolumn=+1
+ set background=dark
+ set background=light
normal k
call assert_equal(pos, getcurpos())
bwipe!
- set nocursorline
+ set hlsearch& spell& spelllang& spelloptions& textwidth&
+ set cursorline& cursorcolumn& cursorlineopt& colorcolumn&
+ set background&
endfunc
func Test_gd_local_block()
diff --git a/src/testdir/test_gui.vim b/src/testdir/test_gui.vim
index e7f7c6d..2ff8d34 100644
--- a/src/testdir/test_gui.vim
+++ b/src/testdir/test_gui.vim
@@ -111,6 +111,8 @@ func Test_getfontname_without_arg()
endfunc
func Test_getwinpos()
+ CheckX11
+
call assert_match('Window position: X \d\+, Y \d\+', execute('winpos'))
call assert_true(getwinposx() >= 0)
call assert_true(getwinposy() >= 0)
@@ -633,7 +635,7 @@ endfunc
func Test_set_guiligatures()
CheckX11BasedGui
- if has('gui_gtk') || has('gui_gtk2') || has('gui_gnome') || has('gui_gtk3')
+ if has('gui_gtk') || has('gui_gtk2') || has('gui_gnome') || has('gui_gtk3') || has('win32')
" Try correct value
set guiligatures=<>=ab
call assert_equal("<>=ab", &guiligatures)
@@ -897,7 +899,7 @@ func Test_set_term()
endfunc
func Test_windowid_variable()
- if g:x11_based_gui || has('win32')
+ if (g:x11_based_gui && empty($WAYLAND_DISPLAY)) || has('win32')
call assert_true(v:windowid > 0)
else
call assert_equal(0, v:windowid)
@@ -1708,7 +1710,11 @@ func Test_gui_lowlevel_keyevent()
" Test for <Ctrl-A> to <Ctrl-Z> keys
for kc in range(65, 90)
call SendKeys([0x11, kc])
- let ch = getcharstr()
+ try
+ let ch = getcharstr()
+ catch /^Vim:Interrupt$/
+ let ch = "\<c-c>"
+ endtry
call assert_equal(nr2char(kc - 64), ch)
endfor
diff --git a/src/testdir/test_highlight.vim b/src/testdir/test_highlight.vim
index af60503..d6c9f50 100644
--- a/src/testdir/test_highlight.vim
+++ b/src/testdir/test_highlight.vim
@@ -557,22 +557,23 @@ func Test_cursorline_after_yank()
call StopVimInTerminal(buf)
endfunc
-" test for issue #4862
+" Test for issue #4862: pasting above 'cursorline' redraws properly.
func Test_put_before_cursorline()
new
only!
- call setline(1, 'A')
+ call setline(1, ['A', 'B', 'C'])
+ call cursor(2, 1)
redraw
- let std_attr = screenattr(1, 1)
+ let std_attr = screenattr(2, 1)
set cursorline
redraw
- let cul_attr = screenattr(1, 1)
+ let cul_attr = screenattr(2, 1)
normal yyP
redraw
- " Line 1 has cursor so it should be highlighted with CursorLine.
- call assert_equal(cul_attr, screenattr(1, 1))
- " And CursorLine highlighting from the second line should be gone.
- call assert_equal(std_attr, screenattr(2, 1))
+ " Line 2 has cursor so it should be highlighted with CursorLine.
+ call assert_equal(cul_attr, screenattr(2, 1))
+ " And CursorLine highlighting from line 3 should be gone.
+ call assert_equal(std_attr, screenattr(3, 1))
set nocursorline
bwipe!
endfunc
@@ -888,6 +889,16 @@ func Test_highlight_ctermul()
highlight Normal ctermul=NONE
endfunc
+" Test for 'ctermfont' in a highlight group
+func Test_highlight_ctermfont()
+ CheckNotGui
+ call assert_notmatch('ctermfont=', HighlightArgs('Normal'))
+ highlight Normal ctermfont=3
+ call assert_match('ctermfont=3', HighlightArgs('Normal'))
+ call assert_equal('3', synIDattr(synIDtrans(hlID('Normal')), 'font'))
+ highlight Normal ctermfont=NONE
+endfunc
+
" Test for specifying 'start' and 'stop' in a highlight group
func Test_highlight_start_stop()
hi HlGrp1 start=<Esc>[27h;<Esc>[<Space>r;
@@ -1314,6 +1325,7 @@ func Test_hlset()
call hlset([{'name': 'hlg11', 'ctermfg': ''}])
call hlset([{'name': 'hlg11', 'ctermbg': ''}])
call hlset([{'name': 'hlg11', 'ctermul': ''}])
+ call hlset([{'name': 'hlg11', 'ctermfont': ''}])
call hlset([{'name': 'hlg11', 'font': ''}])
call hlset([{'name': 'hlg11', 'gui': {}}])
call hlset([{'name': 'hlg11', 'guifg': ''}])
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim
index 61ddcd3..52306e8 100644
--- a/src/testdir/test_ins_complete.vim
+++ b/src/testdir/test_ins_complete.vim
@@ -412,6 +412,62 @@ func Test_completefunc_info()
set completefunc&
endfunc
+func CompleteInfoUserDefinedFn(findstart, query)
+ " User defined function (i_CTRL-X_CTRL-U)
+ if a:findstart
+ return col('.')
+ endif
+ return [{'word': 'foo'}, {'word': 'bar'}, {'word': 'baz'}, {'word': 'qux'}]
+endfunc
+
+func CompleteInfoTestUserDefinedFn(mvmt, idx, noselect)
+ new
+ if a:noselect
+ set completeopt=menuone,popup,noinsert,noselect
+ else
+ set completeopt=menu,preview
+ endif
+ set completefunc=CompleteInfoUserDefinedFn
+ call feedkeys("i\<C-X>\<C-U>" . a:mvmt . "\<C-R>\<C-R>=string(complete_info())\<CR>\<ESC>", "tx")
+ let completed = a:idx != -1 ? ['foo', 'bar', 'baz', 'qux']->get(a:idx) : ''
+ call assert_equal(completed. "{'pum_visible': 1, 'mode': 'function', 'selected': " . a:idx . ", 'items': [" .
+ \ "{'word': 'foo', 'menu': '', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''}, " .
+ \ "{'word': 'bar', 'menu': '', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''}, " .
+ \ "{'word': 'baz', 'menu': '', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''}, " .
+ \ "{'word': 'qux', 'menu': '', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''}" .
+ \ "]}", getline(1))
+ bwipe!
+ set completeopt&
+ set completefunc&
+endfunc
+
+func Test_complete_info_user_defined_fn()
+ " forward
+ call CompleteInfoTestUserDefinedFn("\<C-N>\<C-N>", 1, v:true)
+ call CompleteInfoTestUserDefinedFn("\<C-N>\<C-N>\<C-N>", 2, v:true)
+ call CompleteInfoTestUserDefinedFn("\<C-N>\<C-N>", 2, v:false)
+ call CompleteInfoTestUserDefinedFn("\<C-N>\<C-N>\<C-N>", 3, v:false)
+ call CompleteInfoTestUserDefinedFn("\<C-N>\<C-N>\<C-N>\<C-N>", -1, v:false)
+ " backward
+ call CompleteInfoTestUserDefinedFn("\<C-P>\<C-P>", 2, v:true)
+ call CompleteInfoTestUserDefinedFn("\<C-P>\<C-P>\<C-P>", 1, v:true)
+ call CompleteInfoTestUserDefinedFn("\<C-P>\<C-P>\<C-P>\<C-P>\<C-P>", -1, v:true)
+ call CompleteInfoTestUserDefinedFn("\<C-P>\<C-P>", 3, v:false)
+ call CompleteInfoTestUserDefinedFn("\<C-P>\<C-P>\<C-P>", 2, v:false)
+ " forward backward
+ call CompleteInfoTestUserDefinedFn("\<C-N>\<C-N>\<C-N>\<C-P>", 1, v:true)
+ call CompleteInfoTestUserDefinedFn("\<C-N>\<C-N>\<C-P>", 0, v:true)
+ call CompleteInfoTestUserDefinedFn("\<C-N>\<C-N>\<C-N>\<C-P>", 2, v:false)
+ call CompleteInfoTestUserDefinedFn("\<C-N>\<C-N>\<C-N>\<C-N>\<C-P>", 3, v:false)
+ call CompleteInfoTestUserDefinedFn("\<C-N>\<C-N>\<C-P>", 1, v:false)
+ " backward forward
+ call CompleteInfoTestUserDefinedFn("\<C-P>\<C-P>\<C-P>\<C-P>\<C-P>\<C-N>", 0, v:true)
+ call CompleteInfoTestUserDefinedFn("\<C-P>\<C-P>\<C-P>\<C-N>", 2, v:true)
+ call CompleteInfoTestUserDefinedFn("\<C-P>\<C-P>\<C-P>\<C-P>\<C-P>\<C-N>", 1, v:false)
+ call CompleteInfoTestUserDefinedFn("\<C-P>\<C-P>\<C-P>\<C-N>", 3, v:false)
+ call CompleteInfoTestUserDefinedFn("\<C-P>\<C-N>\<C-N>", 1, v:false)
+endfunc
+
" Test that mouse scrolling/movement should not interrupt completion.
func Test_mouse_scroll_move_during_completion()
new
@@ -2345,7 +2401,7 @@ func Test_complete_info_index()
call assert_equal(-1, g:compl_info['selected'])
call feedkeys("Go\<C-X>\<C-N>\<C-P>\<F5>\<Esc>_dd", 'tx')
- call assert_equal(0, g:compl_info['selected'])
+ call assert_equal(5, g:compl_info['selected'])
call assert_equal(6 , len(g:compl_info['items']))
call assert_equal("fff", g:compl_info['items'][g:compl_info['selected']]['word'])
call feedkeys("Go\<C-X>\<C-N>\<C-N>\<C-N>\<C-N>\<C-N>\<C-N>\<C-N>\<C-N>\<C-N>\<F5>\<Esc>_dd", 'tx')
@@ -2359,4 +2415,18 @@ func Test_complete_info_index()
bwipe!
endfunc
-" vim: shiftwidth=2 sts=2 expandtab
+func Test_complete_changed_complete_info()
+ CheckRunVimInTerminal
+ " this used to crash vim, see #13929
+ let lines =<< trim END
+ set completeopt=menuone
+ autocmd CompleteChanged * call complete_info(['items'])
+ call feedkeys("iii\<cr>\<c-p>")
+ END
+ call writefile(lines, 'Xsegfault', 'D')
+ let buf = RunVimInTerminal('-S Xsegfault', #{rows: 5})
+ call WaitForAssert({-> assert_match('^ii', term_getline(buf, 1))}, 1000)
+ call StopVimInTerminal(buf)
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab nofoldenable
diff --git a/src/testdir/test_listchars.vim b/src/testdir/test_listchars.vim
index 57ddcda..46e96de 100644
--- a/src/testdir/test_listchars.vim
+++ b/src/testdir/test_listchars.vim
@@ -429,52 +429,52 @@ func Test_listchars_invalid()
call assert_fails('set listchars=leadmultispace', 'E474:')
" Too short
- call assert_fails('set listchars=space:', 'E474:')
- call assert_fails('set listchars=tab:x', 'E474:')
- call assert_fails('set listchars=multispace:', 'E474:')
- call assert_fails('set listchars=leadmultispace:', 'E474:')
+ call assert_fails('set listchars=space:', 'E1511:')
+ call assert_fails('set listchars=tab:x', 'E1511:')
+ call assert_fails('set listchars=multispace:', 'E1511:')
+ call assert_fails('set listchars=leadmultispace:', 'E1511:')
" One occurrence too short
- call assert_fails('set listchars=space:,space:x', 'E474:')
- call assert_fails('set listchars=space:x,space:', 'E474:')
- call assert_fails('set listchars=tab:x,tab:xx', 'E474:')
- call assert_fails('set listchars=tab:xx,tab:x', 'E474:')
- call assert_fails('set listchars=multispace:,multispace:x', 'E474:')
- call assert_fails('set listchars=multispace:x,multispace:', 'E474:')
- call assert_fails('set listchars=leadmultispace:,leadmultispace:x', 'E474:')
- call assert_fails('set listchars=leadmultispace:x,leadmultispace:', 'E474:')
+ call assert_fails('set listchars=space:x,space:', 'E1511:')
+ call assert_fails('set listchars=space:,space:x', 'E1511:')
+ call assert_fails('set listchars=tab:xx,tab:x', 'E1511:')
+ call assert_fails('set listchars=tab:x,tab:xx', 'E1511:')
+ call assert_fails('set listchars=multispace:,multispace:x', 'E1511:')
+ call assert_fails('set listchars=multispace:x,multispace:', 'E1511:')
+ call assert_fails('set listchars=leadmultispace:,leadmultispace:x', 'E1511:')
+ call assert_fails('set listchars=leadmultispace:x,leadmultispace:', 'E1511:')
" Too long
- call assert_fails('set listchars=space:xx', 'E474:')
- call assert_fails('set listchars=tab:xxxx', 'E474:')
+ call assert_fails('set listchars=space:xx', 'E1511:')
+ call assert_fails('set listchars=tab:xxxx', 'E1511:')
" Has double-width character
- call assert_fails('set listchars=space:·', 'E474:')
- call assert_fails('set listchars=tab:·x', 'E474:')
- call assert_fails('set listchars=tab:x·', 'E474:')
- call assert_fails('set listchars=tab:xx·', 'E474:')
- call assert_fails('set listchars=multispace:·', 'E474:')
- call assert_fails('set listchars=multispace:xxx·', 'E474:')
- call assert_fails('set listchars=leadmultispace:·', 'E474:')
- call assert_fails('set listchars=leadmultispace:xxx·', 'E474:')
+ call assert_fails('set listchars=space:·', 'E1512:')
+ call assert_fails('set listchars=tab:·x', 'E1512:')
+ call assert_fails('set listchars=tab:x·', 'E1512:')
+ call assert_fails('set listchars=tab:xx·', 'E1512:')
+ call assert_fails('set listchars=multispace:·', 'E1512:')
+ call assert_fails('set listchars=multispace:xxx·', 'E1512:')
+ call assert_fails('set listchars=leadmultispace:·', 'E1512:')
+ call assert_fails('set listchars=leadmultispace:xxx·', 'E1512:')
" Has control character
- call assert_fails("set listchars=space:\x01", 'E474:')
- call assert_fails("set listchars=tab:\x01x", 'E474:')
- call assert_fails("set listchars=tab:x\x01", 'E474:')
- call assert_fails("set listchars=tab:xx\x01", 'E474:')
- call assert_fails("set listchars=multispace:\x01", 'E474:')
- call assert_fails("set listchars=multispace:xxx\x01", 'E474:')
- call assert_fails('set listchars=space:\\x01', 'E474:')
- call assert_fails('set listchars=tab:\\x01x', 'E474:')
- call assert_fails('set listchars=tab:x\\x01', 'E474:')
- call assert_fails('set listchars=tab:xx\\x01', 'E474:')
- call assert_fails('set listchars=multispace:\\x01', 'E474:')
- call assert_fails('set listchars=multispace:xxx\\x01', 'E474:')
- call assert_fails("set listchars=leadmultispace:\x01", 'E474:')
- call assert_fails('set listchars=leadmultispace:\\x01', 'E474:')
- call assert_fails("set listchars=leadmultispace:xxx\x01", 'E474:')
- call assert_fails('set listchars=leadmultispace:xxx\\x01', 'E474:')
+ call assert_fails("set listchars=space:\x01", 'E1512:')
+ call assert_fails("set listchars=tab:\x01x", 'E1512:')
+ call assert_fails("set listchars=tab:x\x01", 'E1512:')
+ call assert_fails("set listchars=tab:xx\x01", 'E1512:')
+ call assert_fails("set listchars=multispace:\x01", 'E1512:')
+ call assert_fails("set listchars=multispace:xxx\x01", 'E1512:')
+ call assert_fails('set listchars=space:\\x01', 'E1512:')
+ call assert_fails('set listchars=tab:\\x01x', 'E1512:')
+ call assert_fails('set listchars=tab:x\\x01', 'E1512:')
+ call assert_fails('set listchars=tab:xx\\x01', 'E1512:')
+ call assert_fails('set listchars=multispace:\\x01', 'E1512:')
+ call assert_fails('set listchars=multispace:xxx\\x01', 'E1512:')
+ call assert_fails("set listchars=leadmultispace:\x01", 'E1512:')
+ call assert_fails('set listchars=leadmultispace:\\x01', 'E1512:')
+ call assert_fails("set listchars=leadmultispace:xxx\x01", 'E1512:')
+ call assert_fails('set listchars=leadmultispace:xxx\\x01', 'E1512:')
enew!
set ambiwidth& listchars& ff&
diff --git a/src/testdir/test_listlbr.vim b/src/testdir/test_listlbr.vim
index bcbd886..68bf948 100644
--- a/src/testdir/test_listlbr.vim
+++ b/src/testdir/test_listlbr.vim
@@ -374,13 +374,13 @@ endfunc
func Test_linebreak_no_break_after_whitespace_only()
call s:test_windows('setl ts=4 linebreak wrap')
- call setline(1, "\tabcdefghijklmnopqrstuvwxyz" ..
+ call setline(1, "\t abcdefghijklmnopqrstuvwxyz" ..
\ "abcdefghijklmnopqrstuvwxyz")
let lines = s:screen_lines([1, 4], winwidth(0))
let expect = [
-\ " abcdefghijklmnop",
-\ "qrstuvwxyzabcdefghij",
-\ "klmnopqrstuvwxyz ",
+\ " abcdefghijklmn",
+\ "opqrstuvwxyzabcdefgh",
+\ "ijklmnopqrstuvwxyz ",
\ "~ ",
\ ]
call s:compare_lines(expect, lines)
diff --git a/src/testdir/test_listlbr_utf8.vim b/src/testdir/test_listlbr_utf8.vim
index 1bbbd2d..313ff30 100644
--- a/src/testdir/test_listlbr_utf8.vim
+++ b/src/testdir/test_listlbr_utf8.vim
@@ -9,6 +9,7 @@ CheckFeature conceal
CheckFeature signs
source view_util.vim
+source screendump.vim
func s:screen_lines(lnum, width) abort
return ScreenLines(a:lnum, a:width)
@@ -358,4 +359,24 @@ func Test_unprintable_char_on_wrap_column()
call s:close_windows()
endfunc
+" Test that Visual selection is drawn correctly when 'linebreak' is set and
+" selection ends before multibyte 'showbreak'.
+func Test_visual_ends_before_showbreak()
+ CheckScreendump
+
+ let lines =<< trim END
+ vim9script
+ &wrap = true
+ &linebreak = true
+ &showbreak = '↪ '
+ ['xxxxx ' .. 'y'->repeat(&columns - 6) .. ' zzzz']->setline(1)
+ normal! wvel
+ END
+ call writefile(lines, 'XvisualEndsBeforeShowbreak', 'D')
+ let buf = RunVimInTerminal('-S XvisualEndsBeforeShowbreak', #{rows: 6})
+ call VerifyScreenDump(buf, 'Test_visual_ends_before_showbreak', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_lua.vim b/src/testdir/test_lua.vim
index 7e72728..a99affc 100644
--- a/src/testdir/test_lua.vim
+++ b/src/testdir/test_lua.vim
@@ -28,21 +28,37 @@ func TearDown()
endfunc
" Check that switching to another buffer does not trigger ml_get error.
-func Test_lua_command_new_no_ml_get_error()
+func Test_lua_luado_change_buffer()
new
+
let wincount = winnr('$')
call setline(1, ['one', 'two', 'three'])
luado vim.command("new")
call assert_equal(wincount + 1, winnr('$'))
+
%bwipe!
endfunc
-" Test vim.command()
-func Test_lua_command()
+" Check that :luado deleting lines does not trigger ml_get error.
+func Test_lua_luado_delete_lines()
new
+
+ call setline(1, ['one', 'two', 'three'])
+ luado vim.command("%d_")
+ call assert_equal([''], getline(1, '$'))
+
call setline(1, ['one', 'two', 'three'])
luado vim.command("1,2d_")
call assert_equal(['three'], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ luado vim.command("2,3d_"); return "REPLACED"
+ call assert_equal(['REPLACED'], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ 2,3luado vim.command("1,2d_"); return "REPLACED"
+ call assert_equal(['three'], getline(1, '$'))
+
bwipe!
endfunc
diff --git a/src/testdir/test_mapping.vim b/src/testdir/test_mapping.vim
index e81173d..71d9046 100644
--- a/src/testdir/test_mapping.vim
+++ b/src/testdir/test_mapping.vim
@@ -120,7 +120,7 @@ func Test_map_langmap()
unmap x
bwipe!
- " 'langnoremap' follows 'langremap' and vise versa
+ " 'langnoremap' follows 'langremap' and vice versa
set langremap
set langnoremap
call assert_equal(0, &langremap)
@@ -247,6 +247,24 @@ func Test_map_meta_multibyte()
iunmap <M-á>
endfunc
+func Test_map_super_quotes()
+ if has('gui_gtk') || has('gui_gtk3') || has("macos")
+ imap <D-"> foo
+ call feedkeys("Go-\<*D-\">-\<Esc>", "xt")
+ call assert_equal("-foo-", getline('$'))
+ set nomodified
+ iunmap <D-">
+ endif
+endfunc
+
+func Test_map_super_multibyte()
+ if has('gui_gtk') || has('gui_gtk3') || has("macos")
+ imap <D-á> foo
+ call assert_match('i <D-á>\s*foo', execute('imap'))
+ iunmap <D-á>
+ endif
+endfunc
+
func Test_abbr_after_line_join()
new
abbr foo bar
diff --git a/src/testdir/test_matchparen.vim b/src/testdir/test_matchparen.vim
index 6d09b6f..70aa38f 100644
--- a/src/testdir/test_matchparen.vim
+++ b/src/testdir/test_matchparen.vim
@@ -61,6 +61,31 @@ func Test_matchparen_clear_highlight()
call StopVimInTerminal(buf)
endfunc
+" Test for matchparen highlight when switching buffer in win_execute()
+func Test_matchparen_win_execute()
+ CheckScreendump
+
+ let lines =<< trim END
+ source $VIMRUNTIME/plugin/matchparen.vim
+ let s:win = win_getid()
+ call setline(1, '{}')
+ split
+
+ func SwitchBuf()
+ call win_execute(s:win, 'enew | buffer #')
+ endfunc
+ END
+ call writefile(lines, 'XMatchparenWinExecute', 'D')
+ let buf = RunVimInTerminal('-S XMatchparenWinExecute', #{rows: 5})
+ call VerifyScreenDump(buf, 'Test_matchparen_win_execute_1', {})
+
+ " Switching buffer away and back shouldn't change matchparen highlight.
+ call term_sendkeys(buf, ":call SwitchBuf()\<CR>:\<Esc>")
+ call VerifyScreenDump(buf, 'Test_matchparen_win_execute_1', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
" Test for scrolling that modifies buffer during visual block
func Test_matchparen_pum_clear()
CheckScreendump
diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim
index 48f1bab..46f3368 100644
--- a/src/testdir/test_messages.vim
+++ b/src/testdir/test_messages.vim
@@ -162,8 +162,18 @@ func Test_echospace()
call assert_equal(&columns - 12, v:echospace)
set showcmd ruler
call assert_equal(&columns - 29, v:echospace)
+ set showcmdloc=statusline
+ call assert_equal(&columns - 19, v:echospace)
+ set showcmdloc=tabline
+ call assert_equal(&columns - 19, v:echospace)
+ call assert_fails('set showcmdloc=leap', 'E474:')
+ call assert_equal(&columns - 19, v:echospace)
+ set showcmdloc=last
+ call assert_equal(&columns - 29, v:echospace)
+ call assert_fails('set showcmdloc=jump', 'E474:')
+ call assert_equal(&columns - 29, v:echospace)
- set ruler& showcmd&
+ set ruler& showcmd& showcmdloc&
endfunc
func Test_warning_scroll()
diff --git a/src/testdir/test_mswin_event.vim b/src/testdir/test_mswin_event.vim
index 4de0169..3b7b3c7 100644
--- a/src/testdir/test_mswin_event.vim
+++ b/src/testdir/test_mswin_event.vim
@@ -36,6 +36,17 @@ func SendKey(key)
call SendKeyWithModifiers(a:key, 0)
endfunc
+" getcharstr(0) but catch Vim:Interrupt
+func Getcharstr()
+ try
+ let ch = getcharstr(0)
+ catch /^Vim:Interrupt$/
+ let ch = "\<c-c>"
+ endtry
+ return ch
+endfunc
+
+
" Send a string of individual key-press events, without modifiers.
func SendKeyStr(keystring)
for k in a:keystring
@@ -347,7 +358,7 @@ func s:LoopTestKeyArray(arr)
for [kcodes, kstr] in a:arr
" Send as a sequence of key presses.
call SendKeyGroup(kcodes)
- let ch = getcharstr(0)
+ let ch = Getcharstr()
" need to deal a bit differently with the non-printable ascii chars < 0x20
if kstr < 0x20 && index([s:VK.CONTROL, s:VK.LCONTROL, s:VK.RCONTROL], kcodes[0]) >= 0
call assert_equal(nr2char(kstr), $"{ch}")
@@ -374,7 +385,7 @@ func s:LoopTestKeyArray(arr)
endif
endfor
call SendKeyWithModifiers(key, modifiers)
- let ch = getcharstr(0)
+ let ch = Getcharstr()
" need to deal a bit differently with the non-printable ascii chars < 0x20
if kstr < 0x20 && index([s:VK.CONTROL, s:VK.LCONTROL, s:VK.RCONTROL], kcodes[0]) >= 0
call assert_equal(nr2char(kstr), $"{ch}")
@@ -408,10 +419,10 @@ func Test_mswin_event_character_keys()
" (0x30 - 0x39) : VK_0 - VK_9 are the same as ASCII '0' - '9'
for kc in range(48, 57)
call SendKey(kc)
- let ch = getcharstr(0)
+ let ch = Getcharstr()
call assert_equal(nr2char(kc), ch)
call SendKeyWithModifiers(kc, 0)
- let ch = getcharstr(0)
+ let ch = Getcharstr()
call assert_equal(nr2char(kc), ch)
endfor
@@ -437,10 +448,10 @@ func Test_mswin_event_character_keys()
" numbered 32 higher than their uppercase versions.
for kc in range(65, 90)
call SendKey(kc)
- let ch = getcharstr(0)
+ let ch = Getcharstr()
call assert_equal(nr2char(kc + 32), ch)
call SendKeyWithModifiers(kc, 0)
- let ch = getcharstr(0)
+ let ch = Getcharstr()
call assert_equal(nr2char(kc + 32), ch)
endfor
@@ -449,23 +460,28 @@ func Test_mswin_event_character_keys()
for modkey in [s:VK.SHIFT, s:VK.LSHIFT, s:VK.RSHIFT]
for kc in range(65, 90)
call SendKeyGroup([modkey, kc])
- let ch = getcharstr(0)
+ let ch = Getcharstr()
call assert_equal(nr2char(kc), ch)
call SendKeyWithModifiers(kc, s:MOD_MASK_SHIFT)
- let ch = getcharstr(0)
+ let ch = Getcharstr()
call assert_equal(nr2char(kc), ch)
endfor
endfor
- " Test for <Ctrl-A> to <Ctrl-Z> keys
- " Expect the unicode characters 0x01 to 0x1A
+" Test for <Ctrl-A> to <Ctrl-Z> keys
+" Expect the unicode characters 0x01 to 0x1A
+" Note: Skip C because it triggers an Interrupt (CTRL-C)
+" which causes a test failure
for modkey in [s:VK.CONTROL, s:VK.LCONTROL, s:VK.RCONTROL]
for kc in range(65, 90)
+ if kc == 67
+ continue
+ endif
call SendKeyGroup([modkey, kc])
- let ch = getcharstr(0)
+ let ch = Getcharstr()
call assert_equal(nr2char(kc - 64), ch)
call SendKeyWithModifiers(kc, s:MOD_MASK_CTRL)
- let ch = getcharstr(0)
+ let ch = Getcharstr()
call assert_equal(nr2char(kc - 64), ch)
endfor
endfor
@@ -518,7 +534,7 @@ func Test_mswin_event_function_keys()
while getchar(0)
endwhile
call SendKeyWithModifiers(111+n, vim_mod_mask)
- let ch = getcharstr(0)
+ let ch = Getcharstr()
let mod_mask = getcharmod()
call assert_equal(keycode, $"{ch}", $"key = {kstr}")
" workaround for the virtual termcap maps changing the character
@@ -590,21 +606,21 @@ func Test_mswin_event_movement_keys()
while getchar(0)
endwhile
execute 'call feedkeys("\<' .. kstr .. '>")'
- let chstr_fk = getcharstr(0)
+ let chstr_fk = Getcharstr()
call assert_equal(chstr_eval, chstr_fk, $"feedkeys = <{kstr}>")
" flush out the typeahead buffer
while getchar(0)
endwhile
call SendKey(kcode)
- let chstr_alone = getcharstr(0)
+ let chstr_alone = Getcharstr()
let chstr_alone_end = chstr_alone[len(chstr_alone)-2:len(chstr_alone)-1]
" flush out the typeahead buffer
while getchar(0)
endwhile
call SendKeyGroup(mod_keycodes + [kcode])
- let chstr_mswin = getcharstr(0)
+ let chstr_mswin = Getcharstr()
let chstr_mswin_end = chstr_mswin[len(chstr_mswin)-2:len(chstr_mswin)-1]
let mod_mask = getcharmod()
@@ -653,7 +669,7 @@ func Test_QWERTY_Ctrl_minus()
new
call SendKeyGroup([s:VK.CONTROL, s:VK.OEM_MINUS])
- let ch = getcharstr(0)
+ let ch = Getcharstr()
call assert_equal(nr2char(0x1f),ch)
call SendKey(s:VK.KEY_I)
@@ -727,14 +743,14 @@ func Test_mswin_event_mouse()
if has('gui_running')
let args = { }
let args.row = 9
- let args.col = 7
+ let args.col = 5
let args.move = 1
let args.cell = 1
call test_mswin_event("mouse", args)
call feedkeys("\<Esc>", 'Lx!')
let pos = getmousepos()
call assert_equal(9, pos.screenrow)
- call assert_equal(7, pos.screencol)
+ call assert_equal(5, pos.screencol)
let args.cell = 0
call test_mswin_event("mouse", args)
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index 38ad810..b180637 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -2235,7 +2235,7 @@ func Test_normal29_brace()
[DATA]
call assert_equal(expected, getline(1, '$'))
- " Test with { in cpooptions
+ " Test with { in cpoptions
%d
call append(0, text)
set cpo+={
@@ -2347,23 +2347,31 @@ func Test_normal30_changecase()
norm! 1ggVu
call assert_equal('this is a simple test: äüöß', getline('.'))
norm! VU
- call assert_equal('THIS IS A SIMPLE TEST: ÄÜÖSS', getline('.'))
+ call assert_equal('THIS IS A SIMPLE TEST: ÄÜÖẞ', getline('.'))
norm! guu
- call assert_equal('this is a simple test: äüöss', getline('.'))
+ call assert_equal('this is a simple test: äüöß', getline('.'))
norm! gUgU
- call assert_equal('THIS IS A SIMPLE TEST: ÄÜÖSS', getline('.'))
+ call assert_equal('THIS IS A SIMPLE TEST: ÄÜÖẞ', getline('.'))
norm! gugu
- call assert_equal('this is a simple test: äüöss', getline('.'))
+ call assert_equal('this is a simple test: äüöß', getline('.'))
norm! gUU
- call assert_equal('THIS IS A SIMPLE TEST: ÄÜÖSS', getline('.'))
+ call assert_equal('THIS IS A SIMPLE TEST: ÄÜÖẞ', getline('.'))
norm! 010~
- call assert_equal('this is a SIMPLE TEST: ÄÜÖSS', getline('.'))
+ call assert_equal('this is a SIMPLE TEST: ÄÜÖẞ', getline('.'))
norm! V~
- call assert_equal('THIS IS A simple test: äüöss', getline('.'))
+ call assert_equal('THIS IS A simple test: äüöß', getline('.'))
call assert_beeps('norm! c~')
%d
call assert_beeps('norm! ~')
+ " Test with multiple lines
+ call setline(1, ['AA', 'BBBB', 'CCCCCC', 'DDDDDDDD'])
+ norm! ggguG
+ call assert_equal(['aa', 'bbbb', 'cccccc', 'dddddddd'], getline(1, '$'))
+ norm! GgUgg
+ call assert_equal(['AA', 'BBBB', 'CCCCCC', 'DDDDDDDD'], getline(1, '$'))
+ %d
+
" Test for changing case across lines using 'whichwrap'
call setline(1, ['aaaaaa', 'aaaaaa'])
normal! gg10~
@@ -3158,7 +3166,7 @@ func Test_normal50_commandline()
CheckFeature cmdline_hist
func! DoTimerWork(id)
- call assert_equal('[Command Line]', bufname(''))
+ call assert_equal(1, getbufinfo('')[0].command)
" should fail, with E11, but does fail with E23?
"call feedkeys("\<c-^>", 'tm')
diff --git a/src/testdir/test_number.vim b/src/testdir/test_number.vim
index 81f8f73..b57c1ed 100644
--- a/src/testdir/test_number.vim
+++ b/src/testdir/test_number.vim
@@ -146,8 +146,7 @@ func Test_number_with_linewrap1()
call s:close_windows()
endfunc
-" Pending: https://groups.google.com/forum/#!topic/vim_dev/tzNKP7EDWYI
-func XTest_number_with_linewrap2()
+func Test_number_with_linewrap2()
call s:test_windows(3, 20)
normal! 61ia
setl number wrap
@@ -164,8 +163,7 @@ func XTest_number_with_linewrap2()
call s:close_windows()
endfunc
-" Pending: https://groups.google.com/forum/#!topic/vim_dev/tzNKP7EDWYI
-func XTest_number_with_linewrap3()
+func Test_number_with_linewrap3()
call s:test_windows(4, 20)
normal! 81ia
setl number wrap
@@ -174,7 +172,7 @@ func XTest_number_with_linewrap3()
call s:validate_cursor()
let lines = s:screen_lines(1, 4)
let expect = [
-\ "aaaaaaaa",
+\ "<<<aaaaa",
\ "aaaaaaaa",
\ "aaaaaaaa",
\ "a ",
@@ -278,9 +276,7 @@ func Test_relativenumber_colors()
[CODE]
call writefile(lines, 'XTest_relnr', 'D')
- " Check that the balloon shows up after a mouse move
let buf = RunVimInTerminal('-S XTest_relnr', {'rows': 10, 'cols': 50})
- call TermWait(buf, 50)
" Default colors
call VerifyScreenDump(buf, 'Test_relnr_colors_1', {})
@@ -297,6 +293,36 @@ func Test_relativenumber_colors()
call StopVimInTerminal(buf)
endfunc
+func Test_relativenumber_colors_wrapped()
+ CheckScreendump
+
+ let lines =<< trim [CODE]
+ set display=lastline scrolloff=0
+ call setline(1, range(200)->map('v:val->string()->repeat(40)'))
+ 111
+ set number relativenumber
+ hi LineNr ctermbg=red ctermfg=black
+ hi LineNrAbove ctermbg=blue ctermfg=black
+ hi LineNrBelow ctermbg=green ctermfg=black
+ [CODE]
+ call writefile(lines, 'XTest_relnr_wrap', 'D')
+
+ let buf = RunVimInTerminal('-S XTest_relnr_wrap', {'rows': 20, 'cols': 50})
+
+ call VerifyScreenDump(buf, 'Test_relnr_colors_wrapped_1', {})
+ call term_sendkeys(buf, "k")
+ call VerifyScreenDump(buf, 'Test_relnr_colors_wrapped_2', {})
+ call term_sendkeys(buf, "2j")
+ call VerifyScreenDump(buf, 'Test_relnr_colors_wrapped_3', {})
+ call term_sendkeys(buf, "2j")
+ call VerifyScreenDump(buf, 'Test_relnr_colors_wrapped_4', {})
+ call term_sendkeys(buf, "k")
+ call VerifyScreenDump(buf, 'Test_relnr_colors_wrapped_5', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+endfunc
+
func Test_relativenumber_callback()
CheckScreendump
CheckFeature timers
@@ -321,6 +347,31 @@ func Test_relativenumber_callback()
call StopVimInTerminal(buf)
endfunc
+" Test that line numbers below inserted/deleted lines are updated.
+func Test_number_insert_delete_lines()
+ CheckScreendump
+
+ let lines =<< trim END
+ call setline(1, range(1, 7))
+ set number
+ call cursor(2, 1)
+ END
+ call writefile(lines, 'Xnumber_insert_delete_lines', 'D')
+
+ let buf = RunVimInTerminal('-S Xnumber_insert_delete_lines', #{rows: 8})
+ call VerifyScreenDump(buf, 'Test_number_insert_delete_lines_1', {})
+ call term_sendkeys(buf, "dd")
+ call VerifyScreenDump(buf, 'Test_number_insert_delete_lines_2', {})
+ call term_sendkeys(buf, "P")
+ call VerifyScreenDump(buf, 'Test_number_insert_delete_lines_1', {})
+ call term_sendkeys(buf, "2dd")
+ call VerifyScreenDump(buf, 'Test_number_insert_delete_lines_3', {})
+ call term_sendkeys(buf, "P")
+ call VerifyScreenDump(buf, 'Test_number_insert_delete_lines_1', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
" Test for displaying line numbers with 'rightleft'
func Test_number_rightleft()
CheckFeature rightleft
diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim
index 37dc201..fbfbaae 100644
--- a/src/testdir/test_options.vim
+++ b/src/testdir/test_options.vim
@@ -1293,6 +1293,44 @@ func Test_shortmess_F2()
call assert_fails('call test_getvalue("abc")', 'E475:')
endfunc
+func Test_shortmess_F3()
+ call writefile(['foo'], 'X_dummy', 'D')
+
+ set hidden
+ set autoread
+ e X_dummy
+ e Xotherfile
+ call assert_equal(['foo'], getbufline('X_dummy', 1, '$'))
+ set shortmess+=F
+ echo ''
+
+ if has('nanotime')
+ sleep 10m
+ else
+ sleep 2
+ endif
+ call writefile(['bar'], 'X_dummy')
+ bprev
+ call assert_equal('', Screenline(&lines))
+ call assert_equal(['bar'], getbufline('X_dummy', 1, '$'))
+
+ if has('nanotime')
+ sleep 10m
+ else
+ sleep 2
+ endif
+ call writefile(['baz'], 'X_dummy')
+ checktime
+ call assert_equal('', Screenline(&lines))
+ call assert_equal(['baz'], getbufline('X_dummy', 1, '$'))
+
+ set shortmess&
+ set autoread&
+ set hidden&
+ bwipe X_dummy
+ bwipe Xotherfile
+endfunc
+
func Test_local_scrolloff()
set so=5
set siso=7
@@ -2234,4 +2272,34 @@ func Test_set_wrap()
set wrap& smoothscroll& scrolloff&
endfunc
+func Test_delcombine()
+ new
+ set backspace=indent,eol,start
+
+ set delcombine
+ call setline(1, 'β̳̈:β̳̈')
+ normal! 0x
+ call assert_equal('β̈:β̳̈', getline(1))
+ exe "normal! A\<BS>"
+ call assert_equal('β̈:β̈', getline(1))
+ normal! 0x
+ call assert_equal('β:β̈', getline(1))
+ exe "normal! A\<BS>"
+ call assert_equal('β:β', getline(1))
+ normal! 0x
+ call assert_equal(':β', getline(1))
+ exe "normal! A\<BS>"
+ call assert_equal(':', getline(1))
+
+ set nodelcombine
+ call setline(1, 'β̳̈:β̳̈')
+ normal! 0x
+ call assert_equal(':β̳̈', getline(1))
+ exe "normal! A\<BS>"
+ call assert_equal(':', getline(1))
+
+ set backspace& delcombine&
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_perl.vim b/src/testdir/test_perl.vim
index 681aaae..721179c 100644
--- a/src/testdir/test_perl.vim
+++ b/src/testdir/test_perl.vim
@@ -211,10 +211,25 @@ func Test_perldo()
call assert_false(search('\Cperl'))
bw!
- " Check deleting lines does not trigger ml_get error.
new
+
+ " Check deleting lines does not trigger ml_get error.
call setline(1, ['one', 'two', 'three'])
perldo VIM::DoCommand("%d_")
+ call assert_equal([''], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ perldo VIM::DoCommand("1,2d_")
+ call assert_equal(['three'], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ perldo VIM::DoCommand("2,3d_"); $_ = "REPLACED"
+ call assert_equal(['REPLACED'], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ 2,3perldo VIM::DoCommand("1,2d_"); $_ = "REPLACED"
+ call assert_equal(['three'], getline(1, '$'))
+
bwipe!
" Check a Perl expression which gives an error.
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index a0a1f74..f5cb8b2 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -1139,6 +1139,10 @@ func Test_CompleteChanged()
let g:event = copy(v:event)
let g:item = get(v:event, 'completed_item', {})
let g:word = get(g:item, 'word', v:null)
+ let l:line = getline('.')
+ if g:word == v:null && l:line == "bc"
+ let g:word = l:line
+ endif
endfunction
augroup AAAAA_Group
au!
@@ -1158,10 +1162,24 @@ func Test_CompleteChanged()
call assert_equal(v:null, g:word)
call feedkeys("a\<C-N>\<C-N>\<C-N>\<C-N>\<C-P>", 'tx')
call assert_equal('foobar', g:word)
+ call feedkeys("S\<C-N>bc", 'tx')
+ call assert_equal("bc", g:word)
+
+ func Omni_test(findstart, base)
+ if a:findstart
+ return col(".")
+ endif
+ return [#{word: "one"}, #{word: "two"}, #{word: "five"}]
+ endfunc
+ set omnifunc=Omni_test
+ set completeopt=menu,menuone
+ call feedkeys("i\<C-X>\<C-O>\<BS>\<BS>\<BS>f", 'tx')
+ call assert_equal('five', g:word)
autocmd! AAAAA_Group
set complete& completeopt&
delfunc! OnPumChange
+ delfunc! Omni_test
bw!
endfunc
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index c20ff48..a397f70 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -4215,4 +4215,22 @@ func Test_popup_close_callback_recursive()
set maxfuncdepth&
endfunc
+func Test_popupwin_setbufvar_changing_window_view()
+ " Test for Github Issue https://github.com/vim/vim/issues/13863
+ " using setbufvar(buf, '&option') should not scroll
+ " the current window
+ 20new
+ call append(0, range(1, 25))
+ setlocal scrollbind
+ norm! G
+ let topline = winsaveview()['topline']
+ call setbufvar(winbufnr(popup_atcursor(['foobar'], {})), '&syntax', 'python')
+ " close popup
+ call popup_clear()
+ call assert_equal(topline, winsaveview()['topline'])
+
+ " clean up
+ bw!
+endfunc
+
" vim: shiftwidth=2 sts=2
diff --git a/src/testdir/test_prompt_buffer.vim b/src/testdir/test_prompt_buffer.vim
index d173731..c5ef010 100644
--- a/src/testdir/test_prompt_buffer.vim
+++ b/src/testdir/test_prompt_buffer.vim
@@ -297,4 +297,49 @@ func Test_prompt_appending_while_hidden()
call StopVimInTerminal(buf)
endfunc
+" Modifying a hidden buffer while leaving a prompt buffer should not prevent
+" stopping of Insert mode, and returning to the prompt buffer later should
+" restore Insert mode.
+func Test_prompt_leave_modify_hidden()
+ call CanTestPromptBuffer()
+
+ let script =<< trim END
+ file hidden
+ set bufhidden=hide
+ enew
+ new prompt
+ set buftype=prompt
+
+ inoremap <buffer> w <Cmd>wincmd w<CR>
+ inoremap <buffer> q <Cmd>bwipe!<CR>
+ autocmd BufLeave prompt call appendbufline('hidden', '$', 'Leave')
+ autocmd BufEnter prompt call appendbufline('hidden', '$', 'Enter')
+ autocmd BufWinLeave prompt call appendbufline('hidden', '$', 'Close')
+ END
+ call writefile(script, 'XpromptLeaveModifyHidden', 'D')
+
+ let buf = RunVimInTerminal('-S XpromptLeaveModifyHidden', {'rows': 10})
+ call TermWait(buf)
+
+ call term_sendkeys(buf, "a")
+ call WaitForAssert({-> assert_match('-- INSERT --', term_getline(buf, 10))})
+
+ call term_sendkeys(buf, "w")
+ call WaitForAssert({-> assert_notmatch('-- INSERT --', term_getline(buf, 10))})
+
+ call term_sendkeys(buf, "\<C-W>w")
+ call WaitForAssert({-> assert_match('-- INSERT --', term_getline(buf, 10))})
+
+ call term_sendkeys(buf, "q")
+ call WaitForAssert({-> assert_notmatch('-- INSERT --', term_getline(buf, 10))})
+
+ call term_sendkeys(buf, ":bwipe!\<CR>")
+ call WaitForAssert({-> assert_equal('Leave', term_getline(buf, 2))})
+ call WaitForAssert({-> assert_equal('Enter', term_getline(buf, 3))})
+ call WaitForAssert({-> assert_equal('Leave', term_getline(buf, 4))})
+ call WaitForAssert({-> assert_equal('Close', term_getline(buf, 5))})
+
+ call StopVimInTerminal(buf)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_put.vim b/src/testdir/test_put.vim
index 72479ac..5b5c354 100644
--- a/src/testdir/test_put.vim
+++ b/src/testdir/test_put.vim
@@ -12,6 +12,16 @@ func Test_put_block()
bwipe!
endfunc
+func Test_put_block_unicode()
+ new
+ call setreg('a', "À\nÀÀ\naaaaaaaaaaaa", "\<C-V>")
+ call setline(1, [' 1', ' 2', ' 3'])
+ exe "norm! \<C-V>jj\"ap"
+ let expected = ['À 1', 'ÀÀ 2', 'aaaaaaaaaaaa3']
+ call assert_equal(expected, getline(1, 3))
+ bw!
+endfunc
+
func Test_put_char_block()
new
call setline(1, ['Line 1', 'Line 2'])
@@ -280,5 +290,33 @@ func Test_put_in_last_displayed_line()
call StopVimInTerminal(buf)
endfunc
+func Test_put_visual_replace_whole_fold()
+ new
+ let lines = repeat(['{{{1', 'foo', 'bar', ''], 2)
+ call setline(1, lines)
+ setlocal foldmethod=marker
+ call setreg('"', 'baz')
+ call setreg('1', '')
+ normal! Vp
+ call assert_equal("{{{1\nfoo\nbar\n\n", getreg('1'))
+ call assert_equal(['baz', '{{{1', 'foo', 'bar', ''], getline(1, '$'))
+
+ bwipe!
+endfunc
+
+func Test_put_visual_replace_fold_marker()
+ new
+ let lines = repeat(['{{{1', 'foo', 'bar', ''], 4)
+ call setline(1, lines)
+ setlocal foldmethod=marker
+ normal! Gkzo
+ call setreg('"', '{{{1')
+ call setreg('1', '')
+ normal! Vp
+ call assert_equal("{{{1\n", getreg('1'))
+ call assert_equal(lines, getline(1, '$'))
+
+ bwipe!
+endfunc
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_python2.vim b/src/testdir/test_python2.vim
index 066b4bd..ac43e60 100644
--- a/src/testdir/test_python2.vim
+++ b/src/testdir/test_python2.vim
@@ -56,10 +56,25 @@ func Test_AAA_python_setup()
endfunc
func Test_pydo()
- " Check deleting lines does not trigger an ml_get error.
new
+
+ " Check deleting lines does not trigger an ml_get error.
call setline(1, ['one', 'two', 'three'])
pydo vim.command("%d_")
+ call assert_equal([''], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ pydo vim.command("1,2d_")
+ call assert_equal(['three'], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ pydo vim.command("2,3d_"); return "REPLACED"
+ call assert_equal(['REPLACED'], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ 2,3pydo vim.command("1,2d_"); return "REPLACED"
+ call assert_equal(['three'], getline(1, '$'))
+
bwipe!
" Check switching to another buffer does not trigger an ml_get error.
diff --git a/src/testdir/test_python3.vim b/src/testdir/test_python3.vim
index e975cb6..7f04f11 100644
--- a/src/testdir/test_python3.vim
+++ b/src/testdir/test_python3.vim
@@ -88,10 +88,25 @@ func Test_AAA_python3_setup()
endfunc
func Test_py3do()
- " Check deleting lines does not trigger an ml_get error.
new
+
+ " Check deleting lines does not trigger an ml_get error.
call setline(1, ['one', 'two', 'three'])
py3do vim.command("%d_")
+ call assert_equal([''], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ py3do vim.command("1,2d_")
+ call assert_equal(['three'], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ py3do vim.command("2,3d_"); return "REPLACED"
+ call assert_equal(['REPLACED'], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ 2,3py3do vim.command("1,2d_"); return "REPLACED"
+ call assert_equal(['three'], getline(1, '$'))
+
bwipe!
" Check switching to another buffer does not trigger an ml_get error.
diff --git a/src/testdir/test_quotestar.vim b/src/testdir/test_quotestar.vim
index 1d26942..322ce62 100644
--- a/src/testdir/test_quotestar.vim
+++ b/src/testdir/test_quotestar.vim
@@ -139,8 +139,8 @@ func Test_quotestar()
if has('macunix')
let skipped = Do_test_quotestar_for_macunix()
elseif has('x11')
- if empty($DISPLAY)
- let skipped = "Test can only run when $DISPLAY is set."
+ if empty($DISPLAY) || !empty($WAYLAND_DISPLAY)
+ let skipped = "Test can only run when $DISPLAY is set and $WAYLAND_DISPLAY is not set."
else
let skipped = Do_test_quotestar_for_x11()
endif
diff --git a/src/testdir/test_registers.vim b/src/testdir/test_registers.vim
index 50f3910..cb4cee7 100644
--- a/src/testdir/test_registers.vim
+++ b/src/testdir/test_registers.vim
@@ -868,6 +868,8 @@ func Test_replay_charsearch_omap()
call timer_start(10, {-> feedkeys(",bar\<Esc>q", 't')})
call feedkeys('qrct[', 'xt!')
call assert_equal(',bar[blah]', getline(1))
+ call assert_equal("ct[\<Ignore>,bar\<Esc>", @r)
+ call assert_equal('ct[<Ignore>,bar<Esc>', keytrans(@r))
undo
call assert_equal('foo[blah]', getline(1))
call feedkeys('@r', 'xt!')
@@ -949,7 +951,7 @@ endfunc
func Test_insert_small_delete_replace_mode()
new
call setline(1, ['foo', 'bar', 'foobar', 'bar'])
- let @-='foo'
+ let @- = 'foo'
call cursor(2, 1)
exe ":norm! R\<C-R>-\<C-R>-"
call assert_equal('foofoo', getline(2))
@@ -960,9 +962,21 @@ func Test_insert_small_delete_replace_mode()
exe ":norm! R\<C-R>-ZZZZ"
call assert_equal(['foo', 'foofoo', '', 'bfoobarZZZZ'], getline(1, 4))
call cursor(1, 1)
- let @-=''
+ let @- = ''
exe ":norm! R\<C-R>-ZZZ"
call assert_equal(['ZZZ', 'foofoo', '', 'bfoobarZZZZ'], getline(1, 4))
+ let @- = 'βbβ'
+ call cursor(4, 1)
+ exe ":norm! R\<C-R>-"
+ call assert_equal(['ZZZ', 'foofoo', '', 'βbβobarZZZZ'], getline(1, 4))
+ let @- = 'bβb'
+ call cursor(4, 1)
+ exe ":norm! R\<C-R>-"
+ call assert_equal(['ZZZ', 'foofoo', '', 'bβbobarZZZZ'], getline(1, 4))
+ let @- = 'βbβ'
+ call cursor(4, 1)
+ exe ":norm! R\<C-R>-"
+ call assert_equal(['ZZZ', 'foofoo', '', 'βbβobarZZZZ'], getline(1, 4))
bwipe!
endfunc
diff --git a/src/testdir/test_remote.vim b/src/testdir/test_remote.vim
new file mode 100644
index 0000000..ae931fd
--- /dev/null
+++ b/src/testdir/test_remote.vim
@@ -0,0 +1,79 @@
+" Test for the --remote functionality
+
+source check.vim
+CheckFeature clientserver
+CheckFeature terminal
+
+source shared.vim
+source screendump.vim
+source mouse.vim
+source term_util.vim
+
+let s:remote_works = 0
+let s:skip = 'Skipped: --remote feature is not possible'
+
+" nees to be run as first test to verify, that vim --servername works
+func Verify_remote_feature_works()
+ CheckRunVimInTerminal
+ enew
+ let buf = RunVimInTerminal('--servername XVIMTEST', {'rows': 8})
+ call TermWait(buf)
+ let cmd = GetVimCommandCleanTerm() .. '--serverlist'
+ call term_sendkeys(buf, ":r! " .. cmd .. "\<CR>")
+ call TermWait(buf)
+ call term_sendkeys(buf, ":w! XVimRemoteTest.txt\<CR>")
+ call TermWait(buf)
+ call term_sendkeys(buf, ":q\<CR>")
+ call StopVimInTerminal(buf)
+ bw!
+ let result = readfile('XVimRemoteTest.txt')
+ call delete('XVimRemoteTest.txt')
+ if empty(result)
+ throw s:skip
+ endif
+ let s:remote = 1
+endfunc
+
+call Verify_remote_feature_works()
+
+if !s:remote
+ finish
+endif
+
+func Test_remote_servername()
+ CheckRunVimInTerminal
+
+ " That is the file we want the server to open,
+ " despite the wildignore setting
+ call writefile(range(1, 20), 'XTEST.txt', 'D')
+ " just a dummy file, so that the ':wq' further down is successful
+ call writefile(range(1, 20), 'Xdummy.log', 'D')
+
+ " Run Vim in a terminal and open a terminal window to run Vim in.
+ let lines =<< trim END
+ set wildignore=*.txt
+ END
+ call writefile(lines, 'XRemoteEditing.vim', 'D')
+ let buf = RunVimInTerminal('--servername XVIMTEST -S XRemoteEditing.vim Xdummy.log', {'rows': 8})
+ call TermWait(buf)
+ botright new
+ " wildignore setting should be ignored and the XVIMTEST server should now
+ " open XTEST.txt, if wildignore setting is not ignored, the server
+ " will continue with the Xdummy.log file
+ let buf2 = RunVimInTerminal('--servername XVIMTEST --remote-silent XTEST.txt', {'rows': 5, 'wait_for_ruler': 0})
+ " job should be no-longer running, so we can just close it
+ exe buf2 .. 'bw!'
+ call term_sendkeys(buf, ":sil :3,$d\<CR>")
+ call TermWait(buf)
+ call term_sendkeys(buf, ":wq!\<CR>")
+ call TermWait(buf)
+ if term_getstatus(buf) == 'running'
+ call StopVimInTerminal(buf)
+ endif
+ let buf_contents = readfile('XTEST.txt')
+ call assert_equal(2, len(buf_contents))
+ bw!
+ close
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_ruby.vim b/src/testdir/test_ruby.vim
index 2e0835c..f155168 100644
--- a/src/testdir/test_ruby.vim
+++ b/src/testdir/test_ruby.vim
@@ -11,10 +11,25 @@ func Test_ruby_change_buffer()
endfunc
func Test_rubydo()
- " Check deleting lines does not trigger ml_get error.
new
+
+ " Check deleting lines does not trigger ml_get error.
call setline(1, ['one', 'two', 'three'])
rubydo Vim.command("%d_")
+ call assert_equal(['one'], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ rubydo Vim.command("1,2d_")
+ call assert_equal(['one'], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ rubydo Vim.command("2,3d_"); $_ = "REPLACED"
+ call assert_equal(['REPLACED'], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ 2,3rubydo Vim.command("1,2d_"); $_ = "REPLACED"
+ call assert_equal(['three'], getline(1, '$'))
+
bwipe!
" Check switching to another buffer does not trigger ml_get error.
diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim
index f41f0e2..3467760 100644
--- a/src/testdir/test_scroll_opt.vim
+++ b/src/testdir/test_scroll_opt.vim
@@ -960,4 +960,42 @@ func Test_smoothscroll_insert_bottom()
call StopVimInTerminal(buf)
endfunc
+func Test_smoothscroll_in_zero_width_window()
+ set cpo+=n number smoothscroll
+ set winwidth=99999 winminwidth=0
+
+ vsplit
+ call assert_equal(0, winwidth(winnr('#')))
+ call win_execute(win_getid(winnr('#')), "norm! \<C-Y>")
+
+ only!
+ set winwidth& winminwidth&
+ set cpo-=n nonumber nosmoothscroll
+endfunc
+
+func Test_smoothscroll_textoff_small_winwidth()
+ set smoothscroll number
+ call setline(1, 'llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch')
+ vsplit
+
+ let textoff = getwininfo(win_getid())[0].textoff
+ execute 'vertical resize' textoff + 1
+ redraw
+ call assert_equal(0, winsaveview().skipcol)
+ execute "normal! 0\<C-E>"
+ redraw
+ call assert_equal(1, winsaveview().skipcol)
+ execute 'vertical resize' textoff - 1
+ " This caused a signed integer overflow.
+ redraw
+ call assert_equal(1, winsaveview().skipcol)
+ execute 'vertical resize' textoff
+ " This caused an infinite loop.
+ redraw
+ call assert_equal(1, winsaveview().skipcol)
+
+ %bw!
+ set smoothscroll& number&
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index 1a81318..7c70391 100644
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -518,18 +518,24 @@ func Test_geometry()
call writefile([&columns, &lines, getwinposx(), getwinposy(), string(getwinpos())], "Xtest_geometry")
qall
[CODE]
+ " Hide menu because gtk insists to make the window wide enough to show it completely
" Some window managers have a bar at the top that pushes windows down,
" need to use at least 130, let's do 150
- if RunVim([], after, '-f -g -geometry 31x13+41+150')
+ if RunVim(['set guioptions-=m'], after, '-f -g -geometry 31x13+41+150')
let lines = readfile('Xtest_geometry')
" Depending on the GUI library and the windowing system the final size
" might be a bit different, allow for some tolerance. Tuned based on
" actual failures.
call assert_inrange(31, 35, str2nr(lines[0]))
- call assert_equal('13', lines[1])
- call assert_equal('41', lines[2])
- call assert_equal('150', lines[3])
- call assert_equal('[41, 150]', lines[4])
+ " for some reason, the window may contain fewer lines than requested
+ " for GTK, so allow some tolerance
+ call assert_inrange(8, 13, str2nr(lines[1]))
+ " on Wayland there is no way to set or retrieve window positions
+ if empty($WAYLAND_DISPLAY)
+ call assert_equal('41', lines[2])
+ call assert_equal('150', lines[3])
+ call assert_equal('[41, 150]', lines[4])
+ endif
endif
endif
diff --git a/src/testdir/test_tabpage.vim b/src/testdir/test_tabpage.vim
index 906fefc..a531f19 100644
--- a/src/testdir/test_tabpage.vim
+++ b/src/testdir/test_tabpage.vim
@@ -156,14 +156,85 @@ func Test_tabpage_drop()
tab split f3
normal! gt
call assert_equal(1, tabpagenr())
+ tab drop f4
+ call assert_equal(1, tabpagenr('#'))
tab drop f3
- call assert_equal(3, tabpagenr())
- call assert_equal(1, tabpagenr('#'))
+ call assert_equal(4, tabpagenr())
+ call assert_equal(2, tabpagenr('#'))
+ bwipe!
bwipe!
bwipe!
bwipe!
call assert_equal(1, tabpagenr('$'))
+
+ call assert_equal(1, winnr('$'))
+ call assert_equal('', bufname(''))
+ call writefile(['L1', 'L2'], 'Xdropfile', 'D')
+
+ " Test for ':tab drop single-file': reuse current buffer
+ let expected_nr = bufnr()
+ tab drop Xdropfile
+ call assert_equal(1, tabpagenr('$'))
+ call assert_equal(expected_nr, bufnr())
+ call assert_equal('L2', getline(2))
+ bwipe!
+
+ " Test for ':tab drop single-file': not reuse modified buffer
+ set modified
+ let expected_nr = bufnr() + 1
+ tab drop Xdropfile
+ call assert_equal(2, tabpagenr())
+ call assert_equal(2, tabpagenr('$'))
+ call assert_equal(expected_nr, bufnr())
+ call assert_equal('L2', getline(2))
+ bwipe!
+
+ " Test for ':tab drop single-file': multiple tabs already exist
+ tab split f2
+ tab split f3
+ let expected_nr = bufnr() + 1
+ tab drop Xdropfile
+ call assert_equal(4, tabpagenr())
+ call assert_equal(4, tabpagenr('$'))
+ call assert_equal(expected_nr, bufnr())
+ call assert_equal('L2', getline(2))
+ %bwipe!
+
+ " Test for ':tab drop multi-files': reuse current buffer
+ let expected_nr = bufnr()
+ tab drop Xdropfile f1 f2 f3
+ call assert_equal(1, tabpagenr())
+ call assert_equal(4, tabpagenr('$'))
+ call assert_equal(expected_nr, bufnr())
+ call assert_equal('L2', getline(2))
+ %bwipe!
+
+ " Test for ':tab drop multi-files': not reuse modified buffer
+ set modified
+ let expected_nr = bufnr() + 1
+ tab drop Xdropfile f1 f2 f3
+ call assert_equal(2, tabpagenr())
+ call assert_equal(5, tabpagenr('$'))
+ call assert_equal(expected_nr, bufnr())
+ call assert_equal('L2', getline(2))
+ %bwipe!
+
+ " Test for ':tab drop multi-files': multiple tabs already exist
+ tab split f2
+ tab split f3
+ let expected_nr = bufnr() + 1
+ tab drop a b c
+ call assert_equal(4, tabpagenr())
+ call assert_equal(6, tabpagenr('$'))
+ call assert_equal(expected_nr, bufnr())
+ let expected_nr = bufnr() + 3
+ tab drop Xdropfile f1 f2 f3
+ call assert_equal(5, tabpagenr())
+ call assert_equal(8, tabpagenr('$'))
+ call assert_equal(expected_nr, bufnr())
+ call assert_equal('L2', getline(2))
+ %bwipe!
endfunc
" Test autocommands
@@ -260,14 +331,14 @@ function Test_tabpage_with_autocmd_tab_drop()
let s:li = []
tab drop test1
- call assert_equal(['BufLeave', 'BufEnter'], s:li)
+ call assert_equal(['BufEnter'], s:li)
let s:li = []
tab drop test2 test3
call assert_equal([
\ 'TabLeave', 'TabEnter', 'TabLeave', 'TabEnter',
\ 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter',
- \ 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter'], s:li)
+ \ 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter', 'BufEnter'], s:li)
autocmd! TestTabpageGroup
augroup! TestTabpageGroup
@@ -922,4 +993,21 @@ func Test_tabpage_drop_tabmove()
bwipe!
endfunc
+" Test that settabvar() shouldn't change the last accessed tabpage.
+func Test_lastused_tabpage_settabvar()
+ tabonly!
+ tabnew
+ tabnew
+ tabnew
+ call assert_equal(3, tabpagenr('#'))
+
+ call settabvar(2, 'myvar', 'tabval')
+ call assert_equal('tabval', gettabvar(2, 'myvar'))
+ call assert_equal(3, tabpagenr('#'))
+
+ bwipe!
+ bwipe!
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_tagjump.vim b/src/testdir/test_tagjump.vim
index 8b85bd6..2abf1f6 100644
--- a/src/testdir/test_tagjump.vim
+++ b/src/testdir/test_tagjump.vim
@@ -900,18 +900,33 @@ func Test_tag_stack()
endfor
call writefile(l, 'Xfoo', 'D')
- " Jump to a tag when the tag stack is full. Oldest entry should be removed.
enew
+ " Jump to a tag when the tag stack is full. Oldest entry should be removed.
for i in range(10, 30)
exe "tag var" .. i
endfor
- let l = gettagstack()
- call assert_equal(20, l.length)
- call assert_equal('var11', l.items[0].tagname)
+ let t = gettagstack()
+ call assert_equal(20, t.length)
+ call assert_equal('var11', t.items[0].tagname)
+ let full = deepcopy(t.items)
+ tag var31
+ let t = gettagstack()
+ call assert_equal('var12', t.items[0].tagname)
+ call assert_equal('var31', t.items[19].tagname)
+
+ " Jump to a tag when the tag stack is full, but with user data this time.
+ call foreach(full, {i, item -> extend(item, {'user_data': $'udata{i}'})})
+ call settagstack(0, {'items': full})
+ let t = gettagstack()
+ call assert_equal(20, t.length)
+ call assert_equal('var11', t.items[0].tagname)
+ call assert_equal('udata0', t.items[0].user_data)
tag var31
- let l = gettagstack()
- call assert_equal('var12', l.items[0].tagname)
- call assert_equal('var31', l.items[19].tagname)
+ let t = gettagstack()
+ call assert_equal('var12', t.items[0].tagname)
+ call assert_equal('udata1', t.items[0].user_data)
+ call assert_equal('var31', t.items[19].tagname)
+ call assert_false(has_key(t.items[19], 'user_data'))
" Use tnext with a single match
call assert_fails('tnext', 'E427:')
diff --git a/src/testdir/test_tcl.vim b/src/testdir/test_tcl.vim
index 4c6537f..68a6d63 100644
--- a/src/testdir/test_tcl.vim
+++ b/src/testdir/test_tcl.vim
@@ -11,10 +11,25 @@ func TclEval(tcl_expr)
endfunc
func Test_tcldo()
- " Check deleting lines does not trigger ml_get error.
new
+
+ " Check deleting lines does not trigger ml_get error.
call setline(1, ['one', 'two', 'three'])
tcldo ::vim::command %d_
+ call assert_equal(['one'], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ tcldo ::vim::command 1,2d_
+ call assert_equal(['one'], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ tcldo ::vim::command 2,3d_ ; set line REPLACED
+ call assert_equal(['REPLACED'], getline(1, '$'))
+
+ call setline(1, ['one', 'two', 'three'])
+ 2,3tcldo ::vim::command 1,2d_ ; set line REPLACED
+ call assert_equal(['three'], getline(1, '$'))
+
bwipe!
" Check that switching to another buffer does not trigger ml_get error.
diff --git a/src/testdir/test_terminal2.vim b/src/testdir/test_terminal2.vim
index 9798c51..05b228e 100644
--- a/src/testdir/test_terminal2.vim
+++ b/src/testdir/test_terminal2.vim
@@ -535,6 +535,7 @@ func Test_term_getcursor()
endfunc
" Test for term_gettitle()
+" Known to be flaky on Mac-OS X and the GH runners
func Test_term_gettitle()
" term_gettitle() returns an empty string for a non-terminal buffer
" and for a non-existing buffer.
@@ -544,6 +545,13 @@ func Test_term_gettitle()
if !has('title') || empty(&t_ts)
throw "Skipped: can't get/set title"
endif
+ if has('osx') && !empty($CI) && system('uname -m') =~# 'arm64'
+ " This test often fails with the following error message on Github runners
+ " MacOS-14
+ " '^\\[No Name\\] - VIM\\d*$' does not match 'e] - VIM'
+ " Why? Is the terminal that runs Vim too small?
+ throw 'Skipped: FIXME: Running this test on M1 Mac fails on GitHub Actions'
+ endif
let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', '-c', 'set title'])
call TermWait(term)
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 97fea60..a06f733 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -3075,10 +3075,17 @@ func Test_prop_with_text_above_below_empty()
let vt = 'test'
call prop_type_add(vt, {'highlight': 'ToDo'})
for ln in range(1, line('$'))
- call prop_add(ln, 0, {'type': vt, 'text': '---', 'text_align': 'above'})
- call prop_add(ln, 0, {'type': vt, 'text': '+++', 'text_align': 'below'})
+ " use 1 character text to test for off-by-one regressions
+ call prop_add(ln, 0, {'type': vt, 'text': '-', 'text_align': 'above'})
+ call prop_add(ln, 0, {'type': vt, 'text': '+', 'text_align': 'below'})
endfor
normal G
+
+ func AddMore()
+ call prop_add(5, 0, {'type': g:vt, 'text': '!', 'text_align': 'above'})
+ call prop_add(5, 0, {'type': g:vt, 'text': '!', 'text_align': 'above'})
+ call prop_add(5, 0, {'type': g:vt, 'text': '!', 'text_align': 'above'})
+ endfunc
END
call writefile(lines, 'XscriptPropAboveBelowEmpty', 'D')
let buf = RunVimInTerminal('-S XscriptPropAboveBelowEmpty', #{rows: 16, cols: 60})
@@ -3100,6 +3107,12 @@ func Test_prop_with_text_above_below_empty()
call term_sendkeys(buf, "kk")
call VerifyScreenDump(buf, 'Test_prop_above_below_empty_5', {})
+ " This was drawing line number over cmdline and leaking memory.
+ call term_sendkeys(buf, ":call AddMore()\<CR>")
+ call term_sendkeys(buf, "gg")
+ call term_sendkeys(buf, "j")
+ call VerifyScreenDump(buf, 'Test_prop_above_below_empty_6', {})
+
call StopVimInTerminal(buf)
endfunc
@@ -4090,6 +4103,46 @@ func Test_text_below_nowrap()
call StopVimInTerminal(buf)
endfunc
+func Test_virtual_text_overlap_with_highlight()
+ CheckRunVimInTerminal
+
+ let lines =<< trim END
+ vim9script
+ setline(1, ['one', 'two', 'three', 'four', 'five'])
+ set number
+
+ prop_type_add('demo_highlight_warning', {highlight: 'WarningMsg'})
+ prop_type_add('demo_virtual_text_error', {highlight: 'Error'})
+
+ prop_add(2, 4, {
+ type: 'demo_highlight_warning',
+ end_col: 4,
+ })
+ prop_add(2, 0, {
+ type: 'demo_virtual_text_error',
+ text: 'syntax error',
+ text_align: 'below',
+ })
+ normal 2j
+
+ prop_add(4, 4, {
+ type: 'demo_highlight_warning',
+ end_lnum: 5,
+ end_col: 1,
+ })
+ prop_add(4, 0, {
+ type: 'demo_virtual_text_error',
+ text: 'other error',
+ text_align: 'right',
+ })
+ END
+ call writefile(lines, 'XVirtualTextOverlapWithHighlight', 'D')
+ let buf = RunVimInTerminal('-S XVirtualTextOverlapWithHighlight', #{rows: 8, cols: 60})
+ call VerifyScreenDump(buf, 'Test_virtual_text_overlap_with_highlight_1', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
func Test_virtual_text_in_popup_highlight()
CheckRunVimInTerminal
@@ -4425,4 +4478,81 @@ func Test_textprop_notype_join()
bwipe!
endfunc
+" This was causing text property corruption.
+func Test_textprop_backspace_fo_aw()
+ new
+ call setline(1, 'foobar')
+ call prop_type_add('test', {'highlight': 'ErrorMsg'})
+ call prop_add(1, 1, {'type': 'test', 'length': 3})
+ set backspace=indent,eol,start
+ setlocal formatoptions+=aw
+ call feedkeys("A \<CR>\<BS>\<Esc>", 'tx')
+ call assert_equal('foobar', getline(1))
+ call assert_equal([
+ \ #{id: 0, col: 1, start: 1, end: 1, type_bufnr: 0,
+ \ type: 'test', length: 3}], prop_list(1))
+
+ bwipe!
+ set backspace&
+ call prop_type_delete('test')
+endfunc
+
+func Test_textprop_with_wincolor()
+ CheckRunVimInTerminal
+
+ let lines =<< trim END
+ call setline(1, 'some text here')
+ call setline(2, 'some much longer text here')
+ call setline(3, 'more text here')
+ call prop_type_add('afterprop', #{highlight: 'Search'})
+ call prop_type_add('belowprop', #{highlight: 'DiffAdd'})
+ call prop_add(3, 0, #{type: 'afterprop', text: 'AFTER',
+ \ text_align: 'after', text_padding_left: 3})
+ call prop_add(1, 0, #{type: 'belowprop', text: 'BELOW',
+ \ text_align: 'below', text_padding_left: 3})
+ set wincolor=DiffChange wrap
+ END
+ call writefile(lines, 'XtextPropWincolor', 'D')
+ let buf = RunVimInTerminal('-S XtextPropWincolor', #{rows: 8, cols: 60})
+
+ call term_sendkeys(buf, ":\<CR>")
+ call VerifyScreenDump(buf, 'Test_prop_wincolor_1', {})
+
+ call term_sendkeys(buf, ":set cursorline\<CR>:\<CR>")
+ call VerifyScreenDump(buf, 'Test_prop_wincolor_2', {})
+
+ call term_sendkeys(buf, ":set nowrap\<CR>:\<CR>")
+ call VerifyScreenDump(buf, 'Test_prop_wincolor_2', {})
+
+ call term_sendkeys(buf, ":set nocursorline\<CR>:\<CR>")
+ call VerifyScreenDump(buf, 'Test_prop_wincolor_1', {})
+
+ call term_sendkeys(buf, ":set cursorline colorcolumn=30\<CR>:\<CR>")
+ call VerifyScreenDump(buf, 'Test_prop_wincolor_3', {})
+
+ call term_sendkeys(buf, ":hi CursorLine ctermbg=Brown\<CR>:\<CR>")
+ call VerifyScreenDump(buf, 'Test_prop_wincolor_4', {})
+
+ call term_sendkeys(buf, ":set cursorcolumn\<CR>:\<CR>")
+ call term_sendkeys(buf, '$')
+ call VerifyScreenDump(buf, 'Test_prop_wincolor_5', {})
+
+ call term_sendkeys(buf, 'j')
+ call VerifyScreenDump(buf, 'Test_prop_wincolor_6', {})
+
+ call term_sendkeys(buf, ":set virtualedit=all\<CR>:\<CR>")
+ call term_sendkeys(buf, 'l')
+ call VerifyScreenDump(buf, 'Test_prop_wincolor_7', {})
+
+ call term_sendkeys(buf, 'k')
+ call VerifyScreenDump(buf, 'Test_prop_wincolor_8', {})
+
+ if has('rightleft')
+ call term_sendkeys(buf, ":set rightleft\<CR>:\<CR>")
+ call VerifyScreenDump(buf, 'Test_prop_wincolor_9', {})
+ endif
+
+ call StopVimInTerminal(buf)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_undo.vim b/src/testdir/test_undo.vim
index 13c4990..eec0e0b 100644
--- a/src/testdir/test_undo.vim
+++ b/src/testdir/test_undo.vim
@@ -583,7 +583,7 @@ funct Test_undofile()
endif
call assert_equal('', undofile(''))
- " Test undofile() with 'undodir' set to to an existing directory.
+ " Test undofile() with 'undodir' set to an existing directory.
call mkdir('Xundodir')
set undodir=Xundodir
let cwd = getcwd()
diff --git a/src/testdir/test_user_func.vim b/src/testdir/test_user_func.vim
index 57a093c..992329b 100644
--- a/src/testdir/test_user_func.vim
+++ b/src/testdir/test_user_func.vim
@@ -968,4 +968,23 @@ func Test_multidefer_with_exception()
delfunc Foo
endfunc
+func Test_func_curly_brace_invalid_name()
+ func Fail()
+ func Foo{'()'}bar()
+ endfunc
+ endfunc
+
+ call assert_fails('call Fail()', 'E475: Invalid argument: Foo()bar')
+
+ silent! call Fail()
+ call assert_equal([], getcompletion('Foo', 'function'))
+
+ set formatexpr=Fail()
+ normal! gqq
+ call assert_equal([], getcompletion('Foo', 'function'))
+
+ set formatexpr&
+ delfunc Fail
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_utf8_comparisons.vim b/src/testdir/test_utf8_comparisons.vim
index 3431226..2c1972b 100644
--- a/src/testdir/test_utf8_comparisons.vim
+++ b/src/testdir/test_utf8_comparisons.vim
@@ -93,4 +93,39 @@ func Test_gap()
call assert_equal(["ABCD", "", "defg"], getline(1,3))
endfunc
+" test that g~, ~ and gU correctly upper-cases ß
+func Test_uppercase_sharp_ss()
+ new
+ call setline(1, repeat(['ß'], 4))
+
+ call cursor(1, 1)
+ norm! ~
+ call assert_equal('ẞ', getline(line('.')))
+ norm! ~
+ call assert_equal('ß', getline(line('.')))
+
+ call cursor(2, 1)
+ norm! g~l
+ call assert_equal('ẞ', getline(line('.')))
+ norm! g~l
+ call assert_equal('ß', getline(line('.')))
+
+ call cursor(3, 1)
+ norm! gUl
+ call assert_equal('ẞ', getline(line('.')))
+ norm! vgU
+ call assert_equal('ẞ', getline(line('.')))
+ norm! vgu
+ call assert_equal('ß', getline(line('.')))
+ norm! gul
+ call assert_equal('ß', getline(line('.')))
+
+ call cursor(4, 1)
+ norm! vgU
+ call assert_equal('ẞ', getline(line('.')))
+ norm! vgu
+ call assert_equal('ß', getline(line('.')))
+ bw!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_vim9_assign.vim b/src/testdir/test_vim9_assign.vim
index aef09c5..4414f55 100644
--- a/src/testdir/test_vim9_assign.vim
+++ b/src/testdir/test_vim9_assign.vim
@@ -3484,4 +3484,101 @@ def Test_assign_type_to_list_dict()
v9.CheckScriptFailure(lines, 'E1407: Cannot use a Typealias as a variable or value')
enddef
+" Test for modifying a final variable using a compound operator
+def Test_final_var_modification_with_compound_op()
+ var lines =<< trim END
+ vim9script
+
+ final i: number = 1000
+ assert_fails('i += 2', 'E46: Cannot change read-only variable "i"')
+ assert_fails('i -= 2', 'E46: Cannot change read-only variable "i"')
+ assert_fails('i *= 2', 'E46: Cannot change read-only variable "i"')
+ assert_fails('i /= 2', 'E46: Cannot change read-only variable "i"')
+ assert_fails('i %= 2', 'E46: Cannot change read-only variable "i"')
+ assert_equal(1000, i)
+
+ final f: float = 1000.0
+ assert_fails('f += 2', 'E46: Cannot change read-only variable "f"')
+ assert_fails('f -= 2', 'E46: Cannot change read-only variable "f"')
+ assert_fails('f *= 2', 'E46: Cannot change read-only variable "f"')
+ assert_fails('f /= 2', 'E46: Cannot change read-only variable "f"')
+ assert_equal(1000.0, f)
+
+ final s: string = 'abc'
+ assert_fails('s ..= "y"', 'E46: Cannot change read-only variable "s"')
+ assert_equal('abc', s)
+ END
+ v9.CheckScriptSuccess(lines)
+enddef
+
+" Test for modifying a final variable with a List value
+def Test_final_var_with_list_value()
+ var lines =<< trim END
+ vim9script
+
+ final listA: list<string> = []
+ var listB = listA
+
+ listB->add('a')
+ assert_true(listA is listB)
+ assert_equal(['a'], listA)
+ assert_equal(['a'], listB)
+
+ listB += ['b']
+ assert_true(listA is listB)
+ assert_equal(['a', 'b'], listA)
+ assert_equal(['a', 'b'], listB)
+
+ listA->add('c')
+ assert_true(listA is listB)
+ assert_equal(['a', 'b', 'c'], listA)
+ assert_equal(['a', 'b', 'c'], listB)
+
+ listA += ['d']
+ assert_true(listA is listB)
+ assert_equal(['a', 'b', 'c', 'd'], listA)
+ assert_equal(['a', 'b', 'c', 'd'], listB)
+ END
+ v9.CheckScriptSuccess(lines)
+enddef
+
+" Test for modifying a final variable with a List value using "+=" from a legacy
+" function.
+func Test_final_var_with_list_value_legacy()
+ vim9cmd final g:TestVar = ['a']
+ vim9cmd g:TestVar += ['b']
+ call assert_equal(['a', 'b'], g:TestVar)
+endfunc
+
+" Test for modifying a final variable with a Blob value
+def Test_final_var_with_blob_value()
+ var lines =<< trim END
+ vim9script
+
+ final blobA: blob = 0z10
+ var blobB = blobA
+
+ blobB->add(32)
+ assert_true(blobA is blobB)
+ assert_equal(0z1020, blobA)
+ assert_equal(0z1020, blobB)
+
+ blobB += 0z30
+ assert_true(blobA is blobB)
+ assert_equal(0z102030, blobA)
+ assert_equal(0z102030, blobB)
+
+ blobA->add(64)
+ assert_true(blobA is blobB)
+ assert_equal(0z10203040, blobA)
+ assert_equal(0z10203040, blobB)
+
+ blobA += 0z50
+ assert_true(blobA is blobB)
+ assert_equal(0z1020304050, blobA)
+ assert_equal(0z1020304050, blobB)
+ END
+ v9.CheckScriptSuccess(lines)
+enddef
+
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim
index 9af0d07..442d375 100644
--- a/src/testdir/test_vim9_builtin.vim
+++ b/src/testdir/test_vim9_builtin.vim
@@ -3409,7 +3409,7 @@ def Test_remote_foreground()
CheckFeature clientserver
# remote_foreground() doesn't fail on MS-Windows
CheckNotMSWindows
- CheckEnv DISPLAY
+ CheckX11
v9.CheckDefAndScriptFailure(['remote_foreground(10)'], ['E1013: Argument 1: type mismatch, expected string but got number', 'E1174: String required for argument 1'])
assert_fails('remote_foreground("NonExistingServer")', 'E241:')
@@ -4101,30 +4101,10 @@ def Test_simplify()
enddef
def Test_slice()
- assert_equal('12345', slice('012345', 1))
- assert_equal('123', slice('012345', 1, 4))
- assert_equal('1234', slice('012345', 1, -1))
- assert_equal('1', slice('012345', 1, -4))
- assert_equal('', slice('012345', 1, -5))
- assert_equal('', slice('012345', 1, -6))
-
- assert_equal([1, 2, 3, 4, 5], slice(range(6), 1))
- assert_equal([1, 2, 3], slice(range(6), 1, 4))
- assert_equal([1, 2, 3, 4], slice(range(6), 1, -1))
- assert_equal([1], slice(range(6), 1, -4))
- assert_equal([], slice(range(6), 1, -5))
- assert_equal([], slice(range(6), 1, -6))
-
var lds: list<dict<string>> = [{key: 'value'}]
assert_equal(['val'], lds->slice(0, 1)->map((_, v) => 'val'))
assert_equal(['val'], lds[ : ]->map((_, v) => 'val'))
- assert_equal(0z1122334455, slice(0z001122334455, 1))
- assert_equal(0z112233, slice(0z001122334455, 1, 4))
- assert_equal(0z11223344, slice(0z001122334455, 1, -1))
- assert_equal(0z11, slice(0z001122334455, 1, -4))
- assert_equal(0z, slice(0z001122334455, 1, -5))
- assert_equal(0z, slice(0z001122334455, 1, -6))
v9.CheckDefAndScriptFailure(['slice({"a": 10}, 1)'], ['E1013: Argument 1: type mismatch, expected list<any> but got dict<number>', 'E1211: List required for argument 1'])
v9.CheckDefAndScriptFailure(['slice([1, 2, 3], "b")'], ['E1013: Argument 2: type mismatch, expected number but got string', 'E1210: Number required for argument 2'])
v9.CheckDefAndScriptFailure(['slice("abc", 1, "c")'], ['E1013: Argument 3: type mismatch, expected number but got string', 'E1210: Number required for argument 3'])
@@ -5197,4 +5177,12 @@ def Test_passing_type_to_builtin()
v9.CheckScriptFailure(lines, 'E1405: Class "C" cannot be used as a value')
enddef
+def Test_getregion()
+ assert_equal(['x'], getregion(getpos('.'), getpos('.'))->map((_, _) => 'x'))
+
+ v9.CheckDefAndScriptFailure(['getregion(10, getpos("."))'], ['E1013: Argument 1: type mismatch, expected list<any> but got number', 'E1211: List required for argument 1'])
+ assert_equal([''], getregion(getpos('.'), getpos('.')))
+ v9.CheckDefExecFailure(['getregion(getpos("a"), getpos("."))'], 'E1209:')
+enddef
+
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
diff --git a/src/testdir/test_vim9_class.vim b/src/testdir/test_vim9_class.vim
index b34d2ad..d6c55bf 100644
--- a/src/testdir/test_vim9_class.vim
+++ b/src/testdir/test_vim9_class.vim
@@ -67,7 +67,23 @@ def Test_class_basic()
END
v9.CheckSourceFailure(lines, "E488: Trailing characters: | echo 'done'", 3)
- # Use old "this." prefixed member variable declaration syntax (without intialization)
+ # Try to define a class with the same name as an existing variable
+ lines =<< trim END
+ vim9script
+ var Something: list<number> = [1]
+ class Thing
+ endclass
+ interface Api
+ endinterface
+ class Something extends Thing implements Api
+ var v1: string = ''
+ def Foo()
+ enddef
+ endclass
+ END
+ v9.CheckSourceFailure(lines, 'E1041: Redefining script item: "Something"', 7)
+
+ # Use old "this." prefixed member variable declaration syntax (without initialization)
lines =<< trim END
vim9script
class Something
@@ -76,7 +92,7 @@ def Test_class_basic()
END
v9.CheckSourceFailure(lines, 'E1318: Not a valid command in a class: this.count: number', 3)
- # Use old "this." prefixed member variable declaration syntax (with intialization)
+ # Use old "this." prefixed member variable declaration syntax (with initialization)
lines =<< trim END
vim9script
class Something
@@ -9659,31 +9675,749 @@ def Test_const_class_object_variable()
v9.CheckSourceFailure(lines, 'E1022: Type or initialization required', 3)
enddef
-" Test for using double underscore prefix in a class/object method name.
-def Test_method_double_underscore_prefix()
- # class method
+" Test for compiling class/object methods using :defcompile
+def Test_defcompile_class()
+ # defcompile all the classes in the current script
var lines =<< trim END
vim9script
class A
- static def __foo()
- echo "foo"
+ def Foo()
+ var i = 10
+ enddef
+ endclass
+ class B
+ def Bar()
+ var i = 20
+ xxx
enddef
endclass
defcompile
END
- v9.CheckSourceFailure(lines, 'E1034: Cannot use reserved name __foo()', 3)
+ v9.CheckSourceFailure(lines, 'E476: Invalid command: xxx', 2)
- # object method
+ # defcompile a specific class
lines =<< trim END
vim9script
class A
- def __foo()
- echo "foo"
+ def Foo()
+ xxx
+ enddef
+ endclass
+ class B
+ def Bar()
+ yyy
+ enddef
+ endclass
+ defcompile B
+ END
+ v9.CheckSourceFailure(lines, 'E476: Invalid command: yyy', 1)
+
+ # defcompile a non-class
+ lines =<< trim END
+ vim9script
+ class A
+ def Foo()
+ enddef
+ endclass
+ var X: list<number> = []
+ defcompile X
+ END
+ v9.CheckSourceFailure(lines, 'E1061: Cannot find function X', 7)
+
+ # defcompile a class twice
+ lines =<< trim END
+ vim9script
+ class A
+ def new()
+ enddef
+ endclass
+ defcompile A
+ defcompile A
+ assert_equal('Function A.new does not need compiling', v:statusmsg)
+ END
+ v9.CheckSourceSuccess(lines)
+
+ # defcompile should not compile an imported class
+ lines =<< trim END
+ vim9script
+ export class A
+ def Foo()
+ xxx
enddef
endclass
+ END
+ writefile(lines, 'Xdefcompileimport.vim', 'D')
+ lines =<< trim END
+ vim9script
+
+ import './Xdefcompileimport.vim'
+ class B
+ endclass
defcompile
END
- v9.CheckSourceFailure(lines, 'E1034: Cannot use reserved name __foo()', 3)
+ v9.CheckScriptSuccess(lines)
+enddef
+
+" Test for cases common to all the object builtin methods
+def Test_object_builtin_method()
+ var lines =<< trim END
+ vim9script
+ class A
+ def abc()
+ enddef
+ endclass
+ END
+ v9.CheckSourceFailure(lines, 'E1267: Function name must start with a capital: abc()', 3)
+
+ for funcname in ["len", "string", "empty"]
+ lines =<< trim eval END
+ vim9script
+ class A
+ static def {funcname}(): number
+ enddef
+ endclass
+ END
+ v9.CheckSourceFailure(lines, 'E1413: Builtin class method not supported', 3)
+ endfor
+enddef
+
+" Test for using the empty() builtin method with an object
+" This is a legacy function to use the test_garbagecollect_now() function.
+func Test_object_empty()
+ let lines =<< trim END
+ vim9script
+ class A
+ def empty(): bool
+ return true
+ enddef
+ endclass
+
+ def Foo()
+ var afoo = A.new()
+ assert_equal(true, empty(afoo))
+ assert_equal(true, afoo->empty())
+ enddef
+
+ var a = A.new()
+ assert_equal(1, empty(a))
+ assert_equal(1, a->empty())
+ test_garbagecollect_now()
+ assert_equal(1, empty(a))
+ Foo()
+ test_garbagecollect_now()
+ Foo()
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " empty() should return 1 without a builtin method
+ let lines =<< trim END
+ vim9script
+ class A
+ endclass
+
+ def Foo()
+ var afoo = A.new()
+ assert_equal(1, empty(afoo))
+ enddef
+
+ var a = A.new()
+ assert_equal(1, empty(a))
+ Foo()
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " Unsupported signature for the empty() method
+ let lines =<< trim END
+ vim9script
+ class A
+ def empty()
+ enddef
+ endclass
+ END
+ call v9.CheckSourceFailure(lines, 'E1383: Method "empty": type mismatch, expected func(): bool but got func()', 4)
+
+ " Error when calling the empty() method
+ let lines =<< trim END
+ vim9script
+ class A
+ def empty(): bool
+ throw "Failed to check emptiness"
+ enddef
+ endclass
+
+ def Foo()
+ var afoo = A.new()
+ var i = empty(afoo)
+ enddef
+
+ var a = A.new()
+ assert_fails('empty(a)', 'Failed to check emptiness')
+ assert_fails('Foo()', 'Failed to check emptiness')
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " call empty() using an object from a script
+ let lines =<< trim END
+ vim9script
+ class A
+ def empty(): bool
+ return true
+ enddef
+ endclass
+ var afoo = A.new()
+ assert_equal(true, afoo.empty())
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " call empty() using an object from a method
+ let lines =<< trim END
+ vim9script
+ class A
+ def empty(): bool
+ return true
+ enddef
+ endclass
+ def Foo()
+ var afoo = A.new()
+ assert_equal(true, afoo.empty())
+ enddef
+ Foo()
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " call empty() using "this" from an object method
+ let lines =<< trim END
+ vim9script
+ class A
+ def empty(): bool
+ return true
+ enddef
+ def Foo(): bool
+ return this.empty()
+ enddef
+ endclass
+ def Bar()
+ var abar = A.new()
+ assert_equal(true, abar.Foo())
+ enddef
+ Bar()
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " Call empty() from a derived object
+ let lines =<< trim END
+ vim9script
+ class A
+ def empty(): bool
+ return false
+ enddef
+ endclass
+ class B extends A
+ def empty(): bool
+ return true
+ enddef
+ endclass
+ def Foo(afoo: A)
+ assert_equal(true, empty(afoo))
+ var bfoo = B.new()
+ assert_equal(true, empty(bfoo))
+ enddef
+ var b = B.new()
+ assert_equal(1, empty(b))
+ Foo(b)
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " Invoking empty method using an interface
+ let lines =<< trim END
+ vim9script
+ interface A
+ def empty(): bool
+ endinterface
+ class B implements A
+ def empty(): bool
+ return false
+ enddef
+ endclass
+ def Foo(a: A)
+ assert_equal(false, empty(a))
+ enddef
+ var b = B.new()
+ Foo(b)
+ END
+ call v9.CheckSourceSuccess(lines)
+endfunc
+
+" Test for using the len() builtin method with an object
+" This is a legacy function to use the test_garbagecollect_now() function.
+func Test_object_length()
+ let lines =<< trim END
+ vim9script
+ class A
+ var mylen: number = 0
+ def new(n: number)
+ this.mylen = n
+ enddef
+ def len(): number
+ return this.mylen
+ enddef
+ endclass
+
+ def Foo()
+ var afoo = A.new(12)
+ assert_equal(12, len(afoo))
+ assert_equal(12, afoo->len())
+ enddef
+
+ var a = A.new(22)
+ assert_equal(22, len(a))
+ assert_equal(22, a->len())
+ test_garbagecollect_now()
+ assert_equal(22, len(a))
+ Foo()
+ test_garbagecollect_now()
+ Foo()
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " len() should return 0 without a builtin method
+ let lines =<< trim END
+ vim9script
+ class A
+ endclass
+
+ def Foo()
+ var afoo = A.new()
+ assert_equal(0, len(afoo))
+ enddef
+
+ var a = A.new()
+ assert_equal(0, len(a))
+ Foo()
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " Unsupported signature for the len() method
+ let lines =<< trim END
+ vim9script
+ class A
+ def len()
+ enddef
+ endclass
+ END
+ call v9.CheckSourceFailure(lines, 'E1383: Method "len": type mismatch, expected func(): number but got func()', 4)
+
+ " Error when calling the len() method
+ let lines =<< trim END
+ vim9script
+ class A
+ def len(): number
+ throw "Failed to compute length"
+ enddef
+ endclass
+
+ def Foo()
+ var afoo = A.new()
+ var i = len(afoo)
+ enddef
+
+ var a = A.new()
+ assert_fails('len(a)', 'Failed to compute length')
+ assert_fails('Foo()', 'Failed to compute length')
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " call len() using an object from a script
+ let lines =<< trim END
+ vim9script
+ class A
+ def len(): number
+ return 5
+ enddef
+ endclass
+ var afoo = A.new()
+ assert_equal(5, afoo.len())
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " call len() using an object from a method
+ let lines =<< trim END
+ vim9script
+ class A
+ def len(): number
+ return 5
+ enddef
+ endclass
+ def Foo()
+ var afoo = A.new()
+ assert_equal(5, afoo.len())
+ enddef
+ Foo()
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " call len() using "this" from an object method
+ let lines =<< trim END
+ vim9script
+ class A
+ def len(): number
+ return 8
+ enddef
+ def Foo(): number
+ return this.len()
+ enddef
+ endclass
+ def Bar()
+ var abar = A.new()
+ assert_equal(8, abar.Foo())
+ enddef
+ Bar()
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " Call len() from a derived object
+ let lines =<< trim END
+ vim9script
+ class A
+ def len(): number
+ return 10
+ enddef
+ endclass
+ class B extends A
+ def len(): number
+ return 20
+ enddef
+ endclass
+ def Foo(afoo: A)
+ assert_equal(20, len(afoo))
+ var bfoo = B.new()
+ assert_equal(20, len(bfoo))
+ enddef
+ var b = B.new()
+ assert_equal(20, len(b))
+ Foo(b)
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " Invoking len method using an interface
+ let lines =<< trim END
+ vim9script
+ interface A
+ def len(): number
+ endinterface
+ class B implements A
+ def len(): number
+ return 123
+ enddef
+ endclass
+ def Foo(a: A)
+ assert_equal(123, len(a))
+ enddef
+ var b = B.new()
+ Foo(b)
+ END
+ call v9.CheckSourceSuccess(lines)
+endfunc
+
+" Test for using the string() builtin method with an object
+" This is a legacy function to use the test_garbagecollect_now() function.
+func Test_object_string()
+ let lines =<< trim END
+ vim9script
+ class A
+ var name: string
+ def string(): string
+ return this.name
+ enddef
+ endclass
+
+ def Foo()
+ var afoo = A.new("foo-A")
+ assert_equal('foo-A', string(afoo))
+ assert_equal('foo-A', afoo->string())
+ enddef
+
+ var a = A.new("script-A")
+ assert_equal('script-A', string(a))
+ assert_equal('script-A', a->string())
+ assert_equal(['script-A'], execute('echo a')->split("\n"))
+ test_garbagecollect_now()
+ assert_equal('script-A', string(a))
+ Foo()
+ test_garbagecollect_now()
+ Foo()
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " string() should return "object of A {}" without a builtin method
+ let lines =<< trim END
+ vim9script
+ class A
+ endclass
+
+ def Foo()
+ var afoo = A.new()
+ assert_equal('object of A {}', string(afoo))
+ enddef
+
+ var a = A.new()
+ assert_equal('object of A {}', string(a))
+ Foo()
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " Unsupported signature for the string() method
+ let lines =<< trim END
+ vim9script
+ class A
+ def string()
+ enddef
+ endclass
+ END
+ call v9.CheckSourceFailure(lines, 'E1383: Method "string": type mismatch, expected func(): string but got func()', 4)
+
+ " Error when calling the string() method
+ let lines =<< trim END
+ vim9script
+ class A
+ def string(): string
+ throw "Failed to get text"
+ enddef
+ endclass
+
+ def Foo()
+ var afoo = A.new()
+ var i = string(afoo)
+ enddef
+
+ var a = A.new()
+ assert_fails('string(a)', 'Failed to get text')
+ assert_fails('Foo()', 'Failed to get text')
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " call string() using an object from a script
+ let lines =<< trim END
+ vim9script
+ class A
+ def string(): string
+ return 'A'
+ enddef
+ endclass
+ var afoo = A.new()
+ assert_equal('A', afoo.string())
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " call string() using an object from a method
+ let lines =<< trim END
+ vim9script
+ class A
+ def string(): string
+ return 'A'
+ enddef
+ endclass
+ def Foo()
+ var afoo = A.new()
+ assert_equal('A', afoo.string())
+ enddef
+ Foo()
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " call string() using "this" from an object method
+ let lines =<< trim END
+ vim9script
+ class A
+ def string(): string
+ return 'A'
+ enddef
+ def Foo(): string
+ return this.string()
+ enddef
+ endclass
+ def Bar()
+ var abar = A.new()
+ assert_equal('A', abar.string())
+ enddef
+ Bar()
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " Call string() from a derived object
+ let lines =<< trim END
+ vim9script
+ class A
+ def string(): string
+ return 'A'
+ enddef
+ endclass
+ class B extends A
+ def string(): string
+ return 'B'
+ enddef
+ endclass
+ def Foo(afoo: A)
+ assert_equal('B', string(afoo))
+ var bfoo = B.new()
+ assert_equal('B', string(bfoo))
+ enddef
+ var b = B.new()
+ assert_equal('B', string(b))
+ Foo(b)
+ END
+ call v9.CheckSourceSuccess(lines)
+
+ " Invoking string method using an interface
+ let lines =<< trim END
+ vim9script
+ interface A
+ def string(): string
+ endinterface
+ class B implements A
+ def string(): string
+ return 'B'
+ enddef
+ endclass
+ def Foo(a: A)
+ assert_equal('B', string(a))
+ enddef
+ var b = B.new()
+ Foo(b)
+ END
+ call v9.CheckSourceSuccess(lines)
+endfunc
+
+" Test for using a class in the class definition
+def Test_Ref_Class_Within_Same_Class()
+ var lines =<< trim END
+ vim9script
+ class A
+ var n: number = 0
+ def Equals(other: A): bool
+ return this.n == other.n
+ enddef
+ endclass
+
+ var a1 = A.new(10)
+ var a2 = A.new(10)
+ var a3 = A.new(20)
+ assert_equal(true, a1.Equals(a2))
+ assert_equal(false, a2.Equals(a3))
+ END
+ v9.CheckScriptSuccess(lines)
+
+ lines =<< trim END
+ vim9script
+
+ class Foo
+ var num: number
+ def Clone(): Foo
+ return Foo.new(this.num)
+ enddef
+ endclass
+
+ var f1 = Foo.new(1)
+
+ def F()
+ var f2: Foo = f1.Clone()
+ assert_equal(false, f2 is f1)
+ assert_equal(true, f2.num == f1.num)
+ enddef
+ F()
+
+ var f3: Foo = f1.Clone()
+ assert_equal(false, f3 is f1)
+ assert_equal(true, f3.num == f1.num)
+ END
+ v9.CheckScriptSuccess(lines)
+
+ # Test for trying to use a class to extend when defining the same class
+ lines =<< trim END
+ vim9script
+ class A extends A
+ endclass
+ END
+ v9.CheckScriptFailure(lines, 'E1354: Cannot extend A', 3)
+
+ # Test for trying to use a class to implement when defining the same class
+ lines =<< trim END
+ vim9script
+ class A implements A
+ endclass
+ END
+ v9.CheckScriptFailure(lines, 'E1347: Not a valid interface: A', 3)
+enddef
+
+" Test for using a compound operator from a lambda function in an object method
+def Test_compound_op_in_objmethod_lambda()
+ # Test using the "+=" operator
+ var lines =<< trim END
+ vim9script
+ class A
+ var n: number = 10
+ def Foo()
+ var Fn = () => {
+ this.n += 1
+ }
+ Fn()
+ enddef
+ endclass
+
+ var a = A.new()
+ a.Foo()
+ assert_equal(11, a.n)
+ END
+ v9.CheckScriptSuccess(lines)
+
+ # Test using the "..=" operator
+ lines =<< trim END
+ vim9script
+ class A
+ var s: string = "a"
+ def Foo()
+ var Fn = () => {
+ this.s ..= "a"
+ }
+ Fn()
+ enddef
+ endclass
+
+ var a = A.new()
+ a.Foo()
+ a.Foo()
+ assert_equal("aaa", a.s)
+ END
+ v9.CheckScriptSuccess(lines)
+enddef
+
+" call a lambda function in one object from another object
+def Test_lambda_invocation_across_classes()
+ var lines =<< trim END
+ vim9script
+ class A
+ var s: string = "foo"
+ def GetFn(): func
+ var Fn = (): string => {
+ return this.s
+ }
+ return Fn
+ enddef
+ endclass
+
+ class B
+ var s: string = "bar"
+ def GetFn(): func
+ var a = A.new()
+ return a.GetFn()
+ enddef
+ endclass
+
+ var b = B.new()
+ var Fn = b.GetFn()
+ assert_equal("foo", Fn())
+ END
+ v9.CheckScriptSuccess(lines)
enddef
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim
index 1a192cc..1daef22 100644
--- a/src/testdir/test_vim9_disassemble.vim
+++ b/src/testdir/test_vim9_disassemble.vim
@@ -3273,4 +3273,199 @@ def Test_funcref_with_class()
unlet g:instr
enddef
+" Disassemble instructions for calls to a string() function in an object
+def Test_disassemble_object_string()
+ var lines =<< trim END
+ vim9script
+ class A
+ def string(): string
+ return 'A'
+ enddef
+ endclass
+ def Bar()
+ var a = A.new()
+ var s = string(a)
+ s = string(A)
+ enddef
+ g:instr = execute('disassemble Bar')
+ END
+ v9.CheckScriptSuccess(lines)
+ assert_match('<SNR>\d*_Bar\_s*' ..
+ 'var a = A.new()\_s*' ..
+ '0 DCALL new(argc 0)\_s*' ..
+ '1 STORE $0\_s*' ..
+ 'var s = string(a)\_s*' ..
+ '2 LOAD $0\_s*' ..
+ '3 METHODCALL A.string(argc 0)\_s*' ..
+ '4 STORE $1\_s*' ..
+ 's = string(A)\_s*' ..
+ '5 LOADSCRIPT A-0 from .*\_s*' ..
+ '6 BCALL string(argc 1)\_s*' ..
+ '7 STORE $1\_s*' ..
+ '8 RETURN void', g:instr)
+ unlet g:instr
+
+ # Use the default string() function for a class
+ lines =<< trim END
+ vim9script
+ class A
+ endclass
+ def Bar()
+ var a = A.new()
+ var s = string(a)
+ s = string(A)
+ enddef
+ g:instr = execute('disassemble Bar')
+ END
+ v9.CheckScriptSuccess(lines)
+ assert_match('<SNR>\d*_Bar\_s*' ..
+ 'var a = A.new()\_s*' ..
+ '0 DCALL new(argc 0)\_s*' ..
+ '1 STORE $0\_s*' ..
+ 'var s = string(a)\_s*' ..
+ '2 LOAD $0\_s*' ..
+ '3 BCALL string(argc 1)\_s*' ..
+ '4 STORE $1\_s*' ..
+ 's = string(A)\_s*' ..
+ '5 LOADSCRIPT A-0 from .*\_s*' ..
+ '6 BCALL string(argc 1)\_s*' ..
+ '7 STORE $1\_s*' ..
+ '8 RETURN void', g:instr)
+ unlet g:instr
+enddef
+
+" Disassemble instructions for calls to a empty() function in an object
+def Test_disassemble_object_empty()
+ var lines =<< trim END
+ vim9script
+ class A
+ def empty(): bool
+ return true
+ enddef
+ endclass
+ def Bar()
+ var a = A.new()
+ var s = empty(a)
+ enddef
+ g:instr = execute('disassemble Bar')
+ END
+ v9.CheckScriptSuccess(lines)
+ assert_match('<SNR>\d*_Bar\_s*' ..
+ 'var a = A.new()\_s*' ..
+ '0 DCALL new(argc 0)\_s*' ..
+ '1 STORE $0\_s*' ..
+ 'var s = empty(a)\_s*' ..
+ '2 LOAD $0\_s*' ..
+ '3 METHODCALL A.empty(argc 0)\_s*' ..
+ '4 STORE $1\_s*' ..
+ '5 RETURN void', g:instr)
+ unlet g:instr
+
+ # Use the default empty() function for a class
+ lines =<< trim END
+ vim9script
+ class A
+ endclass
+ def Bar()
+ var a = A.new()
+ var s = empty(a)
+ enddef
+ g:instr = execute('disassemble Bar')
+ END
+ v9.CheckScriptSuccess(lines)
+ assert_match('<SNR>\d*_Bar\_s*' ..
+ 'var a = A.new()\_s*' ..
+ '0 DCALL new(argc 0)\_s*' ..
+ '1 STORE $0\_s*' ..
+ 'var s = empty(a)\_s*' ..
+ '2 LOAD $0\_s*' ..
+ '3 BCALL empty(argc 1)\_s*' ..
+ '4 STORE $1\_s*' ..
+ '5 RETURN void', g:instr)
+ unlet g:instr
+enddef
+
+" Disassemble instructions for calls to a len() function in an object
+def Test_disassemble_object_len()
+ var lines =<< trim END
+ vim9script
+ class A
+ def len(): number
+ return 10
+ enddef
+ endclass
+ def Bar()
+ var a = A.new()
+ var s = len(a)
+ enddef
+ g:instr = execute('disassemble Bar')
+ END
+ v9.CheckScriptSuccess(lines)
+ assert_match('<SNR>\d*_Bar\_s*' ..
+ 'var a = A.new()\_s*' ..
+ '0 DCALL new(argc 0)\_s*' ..
+ '1 STORE $0\_s*' ..
+ 'var s = len(a)\_s*' ..
+ '2 LOAD $0\_s*' ..
+ '3 METHODCALL A.len(argc 0)\_s*' ..
+ '4 STORE $1\_s*' ..
+ '5 RETURN void', g:instr)
+ unlet g:instr
+
+ # Use the default len() function for a class
+ lines =<< trim END
+ vim9script
+ class A
+ endclass
+ def Bar()
+ var a = A.new()
+ var s = len(a)
+ enddef
+ g:instr = execute('disassemble Bar')
+ END
+ v9.CheckScriptSuccess(lines)
+ assert_match('<SNR>\d*_Bar\_s*' ..
+ 'var a = A.new()\_s*' ..
+ '0 DCALL new(argc 0)\_s*' ..
+ '1 STORE $0\_s*' ..
+ 'var s = len(a)\_s*' ..
+ '2 LOAD $0\_s*' ..
+ '3 BCALL len(argc 1)\_s*' ..
+ '4 STORE $1\_s*' ..
+ '5 RETURN void', g:instr)
+ unlet g:instr
+enddef
+
+" Disassemble instructions for using a compound operator in a closure
+def Test_disassemble_compound_op_in_closure()
+ var lines =<< trim END
+ vim9script
+ class A
+ var foo: number = 1
+ def Foo(): func
+ var Fn = () => {
+ this.foo += 1
+ }
+ return Fn
+ enddef
+ endclass
+ var a = A.new()
+ var Lambda = a.Foo()
+ var num = matchstr(string(Lambda), '\d\+')
+ g:instr = execute($'disassemble <lambda>{num}')
+ END
+ v9.CheckScriptSuccess(lines)
+ assert_match('<lambda>\d\+\_s*' ..
+ 'this.foo += 1\_s*' ..
+ '0 LOADOUTER level 0 $0\_s*' ..
+ '1 OBJ_MEMBER 0\_s*' ..
+ '2 PUSHNR 1\_s*' ..
+ '3 OPNR +\_s*' ..
+ '4 PUSHNR 0\_s*' ..
+ '5 LOADOUTER level 0 $0\_s*' ..
+ '6 STOREINDEX object\_s*' ..
+ '7 RETURN void', g:instr)
+ unlet g:instr
+enddef
+
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index 6285ba1..7764b37 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -311,6 +311,33 @@ def Test_expr2()
assert_equal([1], g:vals)
END
v9.CheckDefAndScriptSuccess(lines)
+
+ # test the short-circuit operation
+ lines =<< trim END
+ assert_equal(true, true && true)
+ assert_equal(false, true && !true)
+ assert_equal(false, !true && true)
+ assert_equal(false, !true && !true)
+
+ assert_equal(true, true || true)
+ assert_equal(true, true || !true)
+ assert_equal(true, !true || true)
+ assert_equal(false, !true || !true)
+
+ assert_equal(false, false && false)
+ assert_equal(false, false && !false)
+ assert_equal(false, !false && false)
+ assert_equal(true, !false && !false)
+
+ assert_equal(false, false || false)
+ assert_equal(true, false || !false)
+ assert_equal(true, !false || false)
+ assert_equal(true, !false || !false)
+
+ assert_equal(false, !true && !true && !true)
+ assert_equal(true, !false || !false || !false)
+ END
+ v9.CheckDefAndScriptSuccess(lines)
enddef
def Test_expr2_vimscript()
diff --git a/src/testdir/test_vim9_import.vim b/src/testdir/test_vim9_import.vim
index d470a34..fa1aeb1 100644
--- a/src/testdir/test_vim9_import.vim
+++ b/src/testdir/test_vim9_import.vim
@@ -2929,5 +2929,54 @@ def Test_export_in_conditional_block()
v9.CheckScriptSuccess(lines)
enddef
+" Import fails when an autoloaded script is imported again.
+" Github issue #14171
+def Test_import_autloaded_script()
+ mkdir('Ximporttwice', 'pR')
+ mkdir('Ximporttwice/plugin')
+ mkdir('Ximporttwice/autoload')
+ var save_rtp = &rtp
+ exe 'set rtp^=' .. getcwd() .. '/Ximporttwice'
+
+ var lines =<< trim END
+ vim9script
+
+ export def H(): number
+ return 10
+ enddef
+ END
+ writefile(lines, 'Ximporttwice/autoload/hello.vim')
+
+ lines =<< trim END
+ vim9script
+
+ import "./hello.vim"
+ export def W(): number
+ return 20
+ enddef
+ END
+ writefile(lines, 'Ximporttwice/autoload/world.vim')
+
+ lines =<< trim END
+ vim9script
+
+ import autoload '../autoload/hello.vim'
+ import autoload '../autoload/world.vim'
+
+ command Hello echo hello.H()
+ command World echo world.W()
+ END
+ writefile(lines, 'Ximporttwice/plugin/main.vim')
+
+ lines =<< trim END
+ vim9script
+
+ source ./Ximporttwice/plugin/main.vim
+ assert_equal(['20'], execute('World')->split("\n"))
+ END
+ v9.CheckScriptSuccess(lines)
+
+ &rtp = save_rtp
+enddef
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim
index 7ae4d55..77b8831 100644
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -4906,6 +4906,31 @@ def Test_for_stmt_space_before_type()
v9.CheckSourceFailure(lines, 'E1059: No white space allowed before colon: :number in range(10)', 2)
enddef
+" This test used to cause an use-after-free memory access
+def Test_for_empty_line_after_lambda()
+ var lines =<< trim END
+ vim9script
+ echomsg range(0, 2)->map((_, v) => {
+ return 1
+ })
+
+ assert_equal('[1, 1, 1]', v:statusmsg)
+ END
+ v9.CheckSourceSuccess(lines)
+
+ lines =<< trim END
+ vim9script
+ echomsg range(0, 1)->map((_, v) => {
+ return 1
+ }) range(0, 1)->map((_, v) => {
+ return 2
+ }) # comment
+
+ assert_equal('[1, 1] [2, 2]', v:statusmsg)
+ END
+ v9.CheckSourceSuccess(lines)
+enddef
+
" Keep this last, it messes up highlighting.
def Test_substitute_cmd()
new
diff --git a/src/testdir/test_vim9_typealias.vim b/src/testdir/test_vim9_typealias.vim
index 4155744..998079c 100644
--- a/src/testdir/test_vim9_typealias.vim
+++ b/src/testdir/test_vim9_typealias.vim
@@ -641,7 +641,7 @@ def Test_type_as_func_argument_or_return_value()
END
v9.CheckScriptFailure(lines, 'E1407: Cannot use a Typealias as a variable or value', 1)
- # check defered function using typealias as arg
+ # check deferred function using typealias as arg
lines =<< trim END
vim9script
type A = number
@@ -764,7 +764,7 @@ def Test_class_as_func_argument_or_return_value()
END
v9.CheckScriptFailure(lines, 'E1405: Class "C" cannot be used as a value', 1)
- # check defered function using class typealias as arg
+ # check deferred function using class typealias as arg
lines =<< trim END
vim9script
class C
diff --git a/src/testdir/test_virtualedit.vim b/src/testdir/test_virtualedit.vim
index ec2b276..48d4aa0 100644
--- a/src/testdir/test_virtualedit.vim
+++ b/src/testdir/test_virtualedit.vim
@@ -77,13 +77,30 @@ endfunc
func Test_edit_change()
new
set virtualedit=all
+
call setline(1, "\t⒌")
normal Cx
call assert_equal('x', getline(1))
+
+ call setline(1, "\ta̳")
+ normal Cx
+ call assert_equal('x', getline(1))
+
+ call setline(1, "\tβ̳")
+ normal Cx
+ call assert_equal('x', getline(1))
+
+ if has('arabic')
+ call setline(1, "\tلا")
+ normal Cx
+ call assert_equal('x', getline(1))
+ endif
+
" Do a visual block change
call setline(1, ['a', 'b', 'c'])
exe "normal gg3l\<C-V>2jcx"
call assert_equal(['a x', 'b x', 'c x'], getline(1, '$'))
+
bwipe!
set virtualedit=
endfunc
diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim
index 401a350..fd174a9 100644
--- a/src/testdir/test_visual.vim
+++ b/src/testdir/test_visual.vim
@@ -3,6 +3,7 @@
source shared.vim
source check.vim
source screendump.vim
+import './vim9.vim' as v9
func Test_block_shift_multibyte()
" Uses double-wide character.
@@ -1008,7 +1009,7 @@ endfunc
" Test for changing case
func Test_visual_change_case()
new
- " gUe must uppercase a whole word, also when ß changes to SS
+ " gUe must uppercase a whole word, also when ß changes to ẞ
exe "normal Gothe youtußeuu end\<Esc>Ypk0wgUe\r"
" gUfx must uppercase until x, inclusive.
exe "normal O- youßtußexu -\<Esc>0fogUfx\r"
@@ -1020,9 +1021,9 @@ func Test_visual_change_case()
exe "normal Oblah di\rdoh dut\<Esc>VkUj\r"
" Uppercase part of two lines
exe "normal ddppi333\<Esc>k0i222\<Esc>fyllvjfuUk"
- call assert_equal(['the YOUTUSSEUU end', '- yOUSSTUSSEXu -',
- \ 'THE YOUTUSSEUU END', '111THE YOUTUSSEUU END', 'BLAH DI', 'DOH DUT',
- \ '222the yoUTUSSEUU END', '333THE YOUTUßeuu end'], getline(2, '$'))
+ call assert_equal(['the YOUTUẞEUU end', '- yOUẞTUẞEXu -',
+ \ 'THE YOUTUẞEUU END', '111THE YOUTUẞEUU END', 'BLAH DI', 'DOH DUT',
+ \ '222the yoUTUẞEUU END', '333THE YOUTUßeuu end'], getline(2, '$'))
bwipe!
endfunc
@@ -1622,4 +1623,336 @@ func Test_visual_drag_out_of_window()
bwipe!
endfunc
+func Test_visual_substitute_visual()
+ new
+ call setline(1, ['one', 'two', 'three'])
+ call feedkeys("Gk\<C-V>j$:s/\\%V\\_.*\\%V/foobar\<CR>", 'tx')
+ call assert_equal(['one', 'foobar'], getline(1, '$'))
+ bwipe!
+endfunc
+
+func Test_visual_getregion()
+ let lines =<< trim END
+ new
+
+ call setline(1, ['one', 'two', 'three'])
+
+ #" Visual mode
+ call cursor(1, 1)
+ call feedkeys("\<ESC>vjl", 'tx')
+ call assert_equal(['one', 'tw'],
+ \ 'v'->getpos()->getregion(getpos('.')))
+ call assert_equal(['one', 'tw'],
+ \ '.'->getpos()->getregion(getpos('v')))
+ call assert_equal(['o'],
+ \ 'v'->getpos()->getregion(getpos('v')))
+ call assert_equal(['w'],
+ \ '.'->getpos()->getregion(getpos('.'), {'type': 'v' }))
+ call assert_equal(['one', 'two'],
+ \ getpos('.')->getregion(getpos('v'), {'type': 'V' }))
+ call assert_equal(['on', 'tw'],
+ \ getpos('.')->getregion(getpos('v'), {'type': "\<C-v>" }))
+
+ #" Line visual mode
+ call cursor(1, 1)
+ call feedkeys("\<ESC>Vl", 'tx')
+ call assert_equal(['one'],
+ \ getregion(getpos('v'), getpos('.'), {'type': 'V' }))
+ call assert_equal(['one'],
+ \ getregion(getpos('.'), getpos('v'), {'type': 'V' }))
+ call assert_equal(['one'],
+ \ getregion(getpos('v'), getpos('v'), {'type': 'V' }))
+ call assert_equal(['one'],
+ \ getregion(getpos('.'), getpos('.'), {'type': 'V' }))
+ call assert_equal(['on'],
+ \ getpos('.')->getregion(getpos('v'), {'type': 'v' }))
+ call assert_equal(['on'],
+ \ getpos('.')->getregion(getpos('v'), {'type': "\<C-v>" }))
+
+ #" Block visual mode
+ call cursor(1, 1)
+ call feedkeys("\<ESC>\<C-v>ll", 'tx')
+ call assert_equal(['one'],
+ \ getregion(getpos('v'), getpos('.'), {'type': "\<C-v>" }))
+ call assert_equal(['one'],
+ \ getregion(getpos('.'), getpos('v'), {'type': "\<C-v>" }))
+ call assert_equal(['o'],
+ \ getregion(getpos('v'), getpos('v'), {'type': "\<C-v>" }))
+ call assert_equal(['e'],
+ \ getregion(getpos('.'), getpos('.'), {'type': "\<C-v>" }))
+ call assert_equal(['one'],
+ \ '.'->getpos()->getregion(getpos('v'), {'type': 'V' }))
+ call assert_equal(['one'],
+ \ '.'->getpos()->getregion(getpos('v'), {'type': 'v' }))
+
+ #" Using Marks
+ call setpos("'a", [0, 2, 3, 0])
+ call cursor(1, 1)
+ call assert_equal(['one', 'two'],
+ \ "'a"->getpos()->getregion(getpos('.'), {'type': 'v' }))
+ call assert_equal(['one', 'two'],
+ \ "."->getpos()->getregion(getpos("'a"), {'type': 'v' }))
+ call assert_equal(['one', 'two'],
+ \ "."->getpos()->getregion(getpos("'a"), {'type': 'V' }))
+ call assert_equal(['two'],
+ \ "'a"->getpos()->getregion(getpos("'a"), {'type': 'V' }))
+ call assert_equal(['one', 'two'],
+ \ "."->getpos()->getregion(getpos("'a"), {'type': "\<c-v>" }))
+
+ #" Using List
+ call cursor(1, 1)
+ call assert_equal(['one', 'two'],
+ \ [0, 2, 3, 0]->getregion(getpos('.'), {'type': 'v' }))
+ call assert_equal(['one', 'two'],
+ \ '.'->getpos()->getregion([0, 2, 3, 0], {'type': 'v' }))
+ call assert_equal(['one', 'two'],
+ \ '.'->getpos()->getregion([0, 2, 3, 0], {'type': 'V' }))
+ call assert_equal(['two'],
+ \ [0, 2, 3, 0]->getregion([0, 2, 3, 0], {'type': 'V' }))
+ call assert_equal(['one', 'two'],
+ \ '.'->getpos()->getregion([0, 2, 3, 0], {'type': "\<c-v>" }))
+
+ #" Multiline with line visual mode
+ call cursor(1, 1)
+ call feedkeys("\<ESC>Vjj", 'tx')
+ call assert_equal(['one', 'two', 'three'],
+ \ getregion(getpos('v'), getpos('.'), {'type': 'V' }))
+
+ #" Multiline with block visual mode
+ call cursor(1, 1)
+ call feedkeys("\<ESC>\<C-v>jj", 'tx')
+ call assert_equal(['o', 't', 't'],
+ \ getregion(getpos('v'), getpos('.'), {'type': "\<C-v>" }))
+
+ call cursor(1, 1)
+ call feedkeys("\<ESC>\<C-v>jj$", 'tx')
+ call assert_equal(['one', 'two', 'three'],
+ \ getregion(getpos('v'), getpos('.'), {'type': "\<C-v>" }))
+
+ #" 'virtualedit'
+ set virtualedit=all
+ call cursor(1, 1)
+ call feedkeys("\<ESC>\<C-v>10ljj$", 'tx')
+ call assert_equal(['one ', 'two ', 'three '],
+ \ getregion(getpos('v'), getpos('.'), {'type': "\<C-v>" }))
+ set virtualedit&
+
+ #" using wrong types for positions
+ call cursor(1, 1)
+ call feedkeys("\<ESC>vjj$", 'tx')
+ call assert_fails("call getregion(1, 2)", 'E1211:')
+ call assert_fails("call getregion(getpos('.'), {})", 'E1211:')
+ call assert_fails(':echo "."->getpos()->getregion("$", [])', 'E1211:')
+
+ #" using invalid value for "type"
+ call assert_fails("call getregion(getpos('.'), getpos('.'), {'type': '' })", 'E475:')
+
+ #" using a mark from another buffer to current buffer
+ new
+ LET g:buf = bufnr()
+ call setline(1, range(10))
+ normal! GmA
+ wincmd p
+ call assert_equal([g:buf, 10, 1, 0], getpos("'A"))
+ call assert_equal([], getregion(getpos('.'), getpos("'A"), {'type': 'v' }))
+ call assert_equal([], getregion(getpos("'A"), getpos('.'), {'type': 'v' }))
+
+ #" using two marks from another buffer
+ wincmd p
+ normal! GmB
+ wincmd p
+ call assert_equal([g:buf, 10, 1, 0], getpos("'B"))
+ call assert_equal(['9'], getregion(getpos("'B"), getpos("'A"), {'type': 'v' }))
+
+ #" using two positions from another buffer
+ for type in ['v', 'V', "\<C-V>"]
+ for exclusive in [v:false, v:true]
+ call assert_equal(range(10)->mapnew('string(v:val)'),
+ \ getregion([g:buf, 1, 1, 0], [g:buf, 10, 2, 0],
+ \ {'type': type, 'exclusive': exclusive }))
+ call assert_equal(range(10)->mapnew('string(v:val)'),
+ \ getregion([g:buf, 10, 2, 0], [g:buf, 1, 1, 0],
+ \ {'type': type, 'exclusive': exclusive }))
+ endfor
+ endfor
+
+ #" using invalid positions in buffer
+ call assert_fails('call getregion([g:buf, 0, 1, 0], [g:buf, 10, 2, 0])', 'E966:')
+ call assert_fails('call getregion([g:buf, 10, 2, 0], [g:buf, 0, 1, 0])', 'E966:')
+ call assert_fails('call getregion([g:buf, 1, 1, 0], [g:buf, 11, 2, 0])', 'E966:')
+ call assert_fails('call getregion([g:buf, 11, 2, 0], [g:buf, 1, 1, 0])', 'E966:')
+ call assert_fails('call getregion([g:buf, 1, 1, 0], [g:buf, 10, 0, 0])', 'E964:')
+ call assert_fails('call getregion([g:buf, 10, 0, 0], [g:buf, 1, 1, 0])', 'E964:')
+ call assert_fails('call getregion([g:buf, 1, 1, 0], [g:buf, 10, 3, 0])', 'E964:')
+ call assert_fails('call getregion([g:buf, 10, 3, 0], [g:buf, 1, 1, 0])', 'E964:')
+
+ #" using invalid buffer
+ call assert_fails('call getregion([10000, 10, 1, 0], [10000, 10, 1, 0])', 'E681:')
+
+ exe $':{g:buf}bwipe!'
+ unlet g:buf
+ END
+ call v9.CheckLegacyAndVim9Success(lines)
+
+ bwipe!
+
+ let lines =<< trim END
+ #" Selection in starts or ends in the middle of a multibyte character
+ new
+ call setline(1, [
+ \ "abcdefghijk\u00ab",
+ \ "\U0001f1e6\u00ab\U0001f1e7\u00ab\U0001f1e8\u00ab\U0001f1e9",
+ \ "1234567890"
+ \ ])
+ call cursor(1, 3)
+ call feedkeys("\<Esc>\<C-v>ljj", 'xt')
+ call assert_equal(['cd', "\u00ab ", '34'],
+ \ getregion(getpos('v'), getpos('.'), {'type': "\<C-v>" }))
+ call cursor(1, 4)
+ call feedkeys("\<Esc>\<C-v>ljj", 'xt')
+ call assert_equal(['de', "\U0001f1e7", '45'],
+ \ getregion(getpos('v'), getpos('.'), {'type': "\<C-v>" }))
+ call cursor(1, 5)
+ call feedkeys("\<Esc>\<C-v>jj", 'xt')
+ call assert_equal(['e', ' ', '5'],
+ \ getregion(getpos('v'), getpos('.'), {'type': "\<C-v>" }))
+ call cursor(1, 1)
+ call feedkeys("\<Esc>vj", 'xt')
+ call assert_equal(['abcdefghijk«', "\U0001f1e6"],
+ \ getregion(getpos('v'), getpos('.'), {'type': 'v' }))
+
+ #" marks on multibyte chars
+ :set selection=exclusive
+ call setpos("'a", [0, 1, 11, 0])
+ call setpos("'b", [0, 2, 16, 0])
+ call setpos("'c", [0, 2, 0, 0])
+ call cursor(1, 1)
+ call assert_equal(['ghijk', '🇨«🇩'],
+ \ getregion(getpos("'a"), getpos("'b"), {'type': "\<c-v>" }))
+ call assert_equal(['k«', '🇦«🇧«🇨'],
+ \ getregion(getpos("'a"), getpos("'b"), {'type': 'v' }))
+ call assert_equal(['k«'],
+ \ getregion(getpos("'a"), getpos("'c"), {'type': 'v' }))
+
+ #" use inclusive selection, although 'selection' is exclusive
+ call setpos("'a", [0, 1, 11, 0])
+ call setpos("'b", [0, 1, 1, 0])
+ call assert_equal(['abcdefghijk'],
+ \ getregion(getpos("'a"), getpos("'b"),
+ \ {'type': "\<c-v>", 'exclusive': v:false }))
+ call assert_equal(['abcdefghij'],
+ \ getregion(getpos("'a"), getpos("'b"),
+ \ {'type': "\<c-v>", 'exclusive': v:true }))
+ call assert_equal(['abcdefghijk'],
+ \ getregion(getpos("'a"), getpos("'b"),
+ \ {'type': 'v', 'exclusive': 0 }))
+ call assert_equal(['abcdefghij'],
+ \ getregion(getpos("'a"), getpos("'b"),
+ \ {'type': 'v', 'exclusive': 1 }))
+ call assert_equal(['abcdefghijk«'],
+ \ getregion(getpos("'a"), getpos("'b"),
+ \ {'type': 'V', 'exclusive': 0 }))
+ call assert_equal(['abcdefghijk«'],
+ \ getregion(getpos("'a"), getpos("'b"),
+ \ {'type': 'V', 'exclusive': 1 }))
+ :set selection&
+ END
+ call v9.CheckLegacyAndVim9Success(lines)
+
+ bwipe!
+
+ let lines =<< trim END
+ #" Exclusive selection
+ new
+ set selection=exclusive
+ call setline(1, ["a\tc", "x\tz", '', ''])
+ call cursor(1, 1)
+ call feedkeys("\<Esc>v2l", 'xt')
+ call assert_equal(["a\t"],
+ \ getregion(getpos('v'), getpos('.'), {'type': 'v' }))
+ call cursor(1, 1)
+ call feedkeys("\<Esc>v$G", 'xt')
+ call assert_equal(["a\tc", "x\tz", ''],
+ \ getregion(getpos('v'), getpos('.'), {'type': 'v' }))
+ call cursor(1, 1)
+ call feedkeys("\<Esc>v$j", 'xt')
+ call assert_equal(["a\tc", "x\tz"],
+ \ getregion(getpos('v'), getpos('.'), {'type': 'v' }))
+ call cursor(1, 1)
+ call feedkeys("\<Esc>\<C-v>$j", 'xt')
+ call assert_equal(["a\tc", "x\tz"],
+ \ getregion(getpos('v'), getpos('.'), {'type': "\<C-v>" }))
+ call cursor(1, 1)
+ call feedkeys("\<Esc>\<C-v>$G", 'xt')
+ call assert_equal(["a", "x", '', ''],
+ \ getregion(getpos('v'), getpos('.'), {'type': "\<C-v>" }))
+ call cursor(1, 1)
+ call feedkeys("\<Esc>wv2j", 'xt')
+ call assert_equal(["c", "x\tz"],
+ \ getregion(getpos('v'), getpos('.'), {'type': 'v' }))
+ set selection&
+
+ #" Exclusive selection 2
+ new
+ call setline(1, ["a\tc", "x\tz", '', ''])
+ call cursor(1, 1)
+ call feedkeys("\<Esc>v2l", 'xt')
+ call assert_equal(["a\t"],
+ \ getregion(getpos('v'), getpos('.'), {'exclusive': v:true }))
+ call cursor(1, 1)
+ call feedkeys("\<Esc>v$G", 'xt')
+ call assert_equal(["a\tc", "x\tz", ''],
+ \ getregion(getpos('v'), getpos('.'), {'exclusive': v:true }))
+ call cursor(1, 1)
+ call feedkeys("\<Esc>v$j", 'xt')
+ call assert_equal(["a\tc", "x\tz"],
+ \ getregion(getpos('v'), getpos('.'), {'exclusive': v:true }))
+ call cursor(1, 1)
+ call feedkeys("\<Esc>\<C-v>$j", 'xt')
+ call assert_equal(["a\tc", "x\tz"],
+ \ getregion(getpos('v'), getpos('.'),
+ \ {'exclusive': v:true, 'type': "\<C-v>" }))
+ call cursor(1, 1)
+ call feedkeys("\<Esc>\<C-v>$G", 'xt')
+ call assert_equal(["a", "x", '', ''],
+ \ getregion(getpos('v'), getpos('.'),
+ \ {'exclusive': v:true, 'type': "\<C-v>" }))
+ call cursor(1, 1)
+ call feedkeys("\<Esc>wv2j", 'xt')
+ call assert_equal(["c", "x\tz"],
+ \ getregion(getpos('v'), getpos('.'), {'exclusive': v:true }))
+
+ #" virtualedit
+ set selection=exclusive
+ set virtualedit=all
+ call cursor(1, 1)
+ call feedkeys("\<Esc>2lv2lj", 'xt')
+ call assert_equal([' c', 'x '],
+ \ getregion(getpos('v'), getpos('.'), {'type': 'v' }))
+ call cursor(1, 1)
+ call feedkeys("\<Esc>2l\<C-v>2l2j", 'xt')
+ call assert_equal([' ', ' ', ' '],
+ \ getregion(getpos('v'), getpos('.'), {'type': "\<C-v>" }))
+ set virtualedit&
+ set selection&
+
+ bwipe!
+ END
+ call v9.CheckLegacyAndVim9Success(lines)
+endfunc
+
+func Test_getregion_invalid_buf()
+ new
+ help
+ call cursor(5, 7)
+ norm! mA
+ call cursor(5, 18)
+ norm! mB
+ call assert_equal(['Move around:'], getregion(getpos("'A"), getpos("'B")))
+ " close the help window
+ q
+ call assert_fails("call getregion(getpos(\"'A\"), getpos(\"'B\"))", 'E681:')
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_window_cmd.vim b/src/testdir/test_window_cmd.vim
index 6b7dccb..91adb9b 100644
--- a/src/testdir/test_window_cmd.vim
+++ b/src/testdir/test_window_cmd.vim
@@ -131,64 +131,6 @@ func Test_window_quit()
bw Xa Xb
endfunc
-func Test_window_curwin_not_prevwin()
- botright split
- call assert_equal(2, winnr())
- call assert_equal(1, winnr('#'))
- quit
- call assert_equal(1, winnr())
- call assert_equal(0, winnr('#'))
-
- botright split
- botright split
- call assert_equal(3, winnr())
- call assert_equal(2, winnr('#'))
- 1quit
- call assert_equal(2, winnr())
- call assert_equal(1, winnr('#'))
-
- botright split
- call assert_equal(1, tabpagenr())
- call assert_equal(3, winnr())
- call assert_equal(2, winnr('#'))
- wincmd T
- call assert_equal(2, tabpagenr())
- call assert_equal(1, winnr())
- call assert_equal(0, winnr('#'))
- tabfirst
- call assert_equal(1, tabpagenr())
- call assert_equal(2, winnr())
- call assert_equal(0, winnr('#'))
-
- tabonly
- botright split
- wincmd t
- wincmd p
- call assert_equal(3, winnr())
- call assert_equal(1, winnr('#'))
- quit
- call assert_equal(2, winnr())
- call assert_equal(1, winnr('#'))
-
- botright split
- wincmd t
- wincmd p
- call assert_equal(1, tabpagenr())
- call assert_equal(3, winnr())
- call assert_equal(1, winnr('#'))
- wincmd T
- call assert_equal(2, tabpagenr())
- call assert_equal(1, winnr())
- call assert_equal(0, winnr('#'))
- tabfirst
- call assert_equal(1, tabpagenr())
- call assert_equal(2, winnr())
- call assert_equal(1, winnr('#'))
-
- tabonly
- only
-endfunc
-
func Test_window_horizontal_split()
call assert_equal(1, winnr('$'))
3wincmd s
@@ -276,6 +218,20 @@ func Test_window_split_edit_bufnr()
%bw!
endfunc
+func s:win_layout_info(tp = tabpagenr()) abort
+ return #{
+ \ layout: winlayout(a:tp),
+ \ pos_sizes: range(1, tabpagewinnr(a:tp, '$'))
+ \ ->map({_, nr -> win_getid(nr, a:tp)->getwininfo()[0]})
+ \ ->map({_, wininfo -> #{id: wininfo.winid,
+ \ row: wininfo.winrow,
+ \ col: wininfo.wincol,
+ \ width: wininfo.width,
+ \ height: wininfo.height}})
+ \ ->sort({a, b -> a.id - b.id})
+ \ }
+endfunc
+
func Test_window_split_no_room()
" N horizontal windows need >= 2*N + 1 lines:
" - 1 line + 1 status line in each window
@@ -290,6 +246,14 @@ func Test_window_split_no_room()
for s in range(1, hor_split_count) | split | endfor
call assert_fails('split', 'E36:')
+ botright vsplit
+ wincmd |
+ let info = s:win_layout_info()
+ call assert_fails('wincmd J', 'E36:')
+ call assert_fails('wincmd K', 'E36:')
+ call assert_equal(info, s:win_layout_info())
+ only
+
" N vertical windows need >= 2*(N - 1) + 1 columns:
" - 1 column + 1 separator for each window (except last window)
" - 1 column for the last window which does not have separator
@@ -302,7 +266,37 @@ func Test_window_split_no_room()
for s in range(1, ver_split_count) | vsplit | endfor
call assert_fails('vsplit', 'E36:')
+ split
+ wincmd |
+ let info = s:win_layout_info()
+ call assert_fails('wincmd H', 'E36:')
+ call assert_fails('wincmd L', 'E36:')
+ call assert_equal(info, s:win_layout_info())
+
+ " Check that the last statusline isn't lost.
+ " Set its window's width to 2 for the test.
+ wincmd j
+ set laststatus=0 winminwidth=0
+ vertical resize 2
+ " Update expected positions/sizes after the resize. Layout is unchanged.
+ let info.pos_sizes = s:win_layout_info().pos_sizes
+ set winminwidth&
+ call setwinvar(winnr('k'), '&statusline', '@#')
+ let last_stl_row = win_screenpos(0)[0] - 1
+ redraw
+ call assert_equal('@#|', GetScreenStr(last_stl_row))
+ call assert_equal('~ |', GetScreenStr(&lines - &cmdheight))
+
+ call assert_fails('wincmd H', 'E36:')
+ call assert_fails('wincmd L', 'E36:')
+ call assert_equal(info, s:win_layout_info())
+ call setwinvar(winnr('k'), '&statusline', '=-')
+ redraw
+ call assert_equal('=-|', GetScreenStr(last_stl_row))
+ call assert_equal('~ |', GetScreenStr(&lines - &cmdheight))
+
%bw!
+ set laststatus&
endfunc
func Test_window_exchange()
@@ -1066,6 +1060,18 @@ func Test_win_splitmove()
leftabove split b
leftabove vsplit c
leftabove split d
+
+ " win_splitmove doesn't actually create or close any windows, so expect an
+ " unchanged winid and no WinNew/WinClosed events, like :wincmd H/J/K/L.
+ let s:triggered = []
+ augroup WinSplitMove
+ au!
+ au WinNewPre * let s:triggered += ['WinNewPre']
+ au WinNew * let s:triggered += ['WinNew', win_getid()]
+ au WinClosed * let s:triggered += ['WinClosed', str2nr(expand('<afile>'))]
+ augroup END
+ let winid = win_getid()
+
call assert_equal(0, win_splitmove(winnr(), winnr('l')))
call assert_equal(bufname(winbufnr(1)), 'c')
call assert_equal(bufname(winbufnr(2)), 'd')
@@ -1088,6 +1094,11 @@ func Test_win_splitmove()
call assert_equal(bufname(winbufnr(3)), 'a')
call assert_equal(bufname(winbufnr(4)), 'd')
call assert_fails('call win_splitmove(winnr(), winnr("k"), test_null_dict())', 'E1297:')
+ call assert_equal([], s:triggered)
+ call assert_equal(winid, win_getid())
+
+ unlet! s:triggered
+ au! WinSplitMove
only | bd
call assert_fails('call win_splitmove(winnr(), 123)', 'E957:')
@@ -1097,6 +1108,54 @@ func Test_win_splitmove()
tabnew
call assert_fails('call win_splitmove(1, win_getid(1, 1))', 'E957:')
tabclose
+
+ split
+ augroup WinSplitMove
+ au!
+ au WinEnter * ++once call win_gotoid(win_getid(winnr('#')))
+ augroup END
+ call assert_fails('call win_splitmove(winnr(), winnr("#"))', 'E855:')
+
+ augroup WinSplitMove
+ au!
+ au WinLeave * ++once quit
+ augroup END
+ call assert_fails('call win_splitmove(winnr(), winnr("#"))', 'E855:')
+
+ split
+ split
+ augroup WinSplitMove
+ au!
+ au WinEnter * ++once let s:triggered = v:true
+ \| call assert_fails('call win_splitmove(winnr(), winnr("$"))', 'E242:')
+ \| call assert_fails('call win_splitmove(winnr("$"), winnr())', 'E242:')
+ augroup END
+ quit
+ call assert_equal(v:true, s:triggered)
+ unlet! s:triggered
+
+ new
+ augroup WinSplitMove
+ au!
+ au BufHidden * ++once let s:triggered = v:true
+ \| call assert_fails('call win_splitmove(winnr(), winnr("#"))', 'E1159:')
+ augroup END
+ hide
+ call assert_equal(v:true, s:triggered)
+ unlet! s:triggered
+
+ split
+ let close_win = winnr('#')
+ augroup WinSplitMove
+ au!
+ au WinEnter * ++once quit!
+ augroup END
+ call win_splitmove(close_win, winnr())
+ call assert_equal(0, win_id2win(close_win))
+
+ au! WinSplitMove
+ augroup! WinSplitMove
+ %bw!
endfunc
" Test for the :only command
@@ -2060,24 +2119,160 @@ func Test_new_help_window_on_error()
call assert_equal(expand("<cword>"), "'mod'")
endfunc
-func Test_smoothscroll_in_zero_width_window()
- let save_lines = &lines
- let save_columns = &columns
+func Test_splitmove_flatten_frame()
+ split
+ vsplit
- winsize 0 24
- set cpo+=n
- exe "noremap 0 \<C-W>n\<C-W>L"
- norm 000000
- set number smoothscroll
- exe "norm \<C-Y>"
+ wincmd L
+ let layout = winlayout()
+ wincmd K
+ wincmd L
+ call assert_equal(winlayout(), layout)
only!
- let &lines = save_lines
- let &columns = save_columns
- set cpo-=n
- unmap 0
- set nonumber nosmoothscroll
endfunc
+func Test_autocmd_window_force_room()
+ " Open as many windows as possible
+ while v:true
+ try
+ split
+ catch /E36:/
+ break
+ endtry
+ endwhile
+ while v:true
+ try
+ vsplit
+ catch /E36:/
+ break
+ endtry
+ endwhile
+
+ wincmd j
+ vsplit
+ call assert_fails('wincmd H', 'E36:')
+ call assert_fails('wincmd J', 'E36:')
+ call assert_fails('wincmd K', 'E36:')
+ call assert_fails('wincmd L', 'E36:')
+
+ edit unload me
+ enew
+ bunload! unload\ me
+ augroup AucmdWinForceRoom
+ au!
+ au BufEnter * ++once let s:triggered = v:true
+ \| call assert_equal('autocmd', win_gettype())
+ augroup END
+ let info = s:win_layout_info()
+ " bufload opening the autocommand window shouldn't give E36.
+ call bufload('unload me')
+ call assert_equal(v:true, s:triggered)
+ call assert_equal(info, s:win_layout_info())
+
+ unlet! s:triggered
+ au! AucmdWinForceRoom
+ augroup! AucmdWinForceRoom
+ %bw!
+endfunc
+
+func Test_win_gotoid_splitmove_textlock_cmdwin()
+ call setline(1, 'foo')
+ new
+ let curwin = win_getid()
+ call setline(1, 'bar')
+
+ set debug+=throw indentexpr=win_gotoid(win_getid(winnr('#')))
+ call assert_fails('normal! ==', 'E565:')
+ call assert_equal(curwin, win_getid())
+ " No error if attempting to switch to curwin; nothing happens.
+ set indentexpr=assert_equal(1,win_gotoid(win_getid()))
+ normal! ==
+ call assert_equal(curwin, win_getid())
+
+ set indentexpr=win_splitmove(winnr('#'),winnr())
+ call assert_fails('normal! ==', 'E565:')
+ call assert_equal(curwin, win_getid())
+
+ %bw!
+ set debug-=throw indentexpr&
+
+ call feedkeys('q:'
+ \ .. ":call assert_fails('call win_splitmove(winnr(''#''), winnr())', 'E11:')\<CR>"
+ \ .. ":call assert_equal('command', win_gettype())\<CR>"
+ \ .. ":call assert_equal('', win_gettype(winnr('#')))\<CR>", 'ntx')
+
+ call feedkeys('q:'
+ \ .. ":call assert_fails('call win_gotoid(win_getid(winnr(''#'')))', 'E11:')\<CR>"
+ "\ No error if attempting to switch to curwin; nothing happens.
+ \ .. ":call assert_equal(1, win_gotoid(win_getid()))\<CR>"
+ \ .. ":call assert_equal('command', win_gettype())\<CR>"
+ \ .. ":call assert_equal('', win_gettype(winnr('#')))\<CR>", 'ntx')
+endfunc
+
+func Test_winfixsize_positions()
+ " Check positions are correct when closing a window in a non-current tabpage
+ " causes non-adjacent window to fill the space due to 'winfix{width,height}'.
+ tabnew
+ vsplit
+ wincmd |
+ split
+ set winfixheight
+ split foo
+ tabfirst
+
+ bwipe! foo
+ " Save actual values before entering the tabpage.
+ let info = s:win_layout_info(2)
+ tabnext
+ " Compare it with the expected value (after win_comp_pos) from entering.
+ call assert_equal(s:win_layout_info(), info)
+
+ $tabnew
+ split
+ split
+ wincmd k
+ belowright vsplit
+ set winfixwidth
+ belowright vsplit foo
+ tabprevious
+
+ bwipe! foo
+ " Save actual values before entering the tabpage.
+ let info = s:win_layout_info(3)
+ tabnext
+ " Compare it with the expected value (after win_comp_pos) from entering.
+ call assert_equal(s:win_layout_info(), info)
+
+ " Check positions unchanged when failing to move a window, if 'winfix{width,
+ " height}' would otherwise cause a non-adjacent window to fill the space.
+ %bwipe
+ call assert_fails('execute "split|"->repeat(&lines)', 'E36:')
+ wincmd p
+ vsplit
+ set winfixwidth
+ vsplit
+ set winfixwidth
+ vsplit
+ vsplit
+ set winfixwidth
+ wincmd p
+
+ let info = s:win_layout_info()
+ call assert_fails('wincmd J', 'E36:')
+ call assert_equal(info, s:win_layout_info())
+
+ only
+ call assert_fails('execute "vsplit|"->repeat(&columns)', 'E36:')
+ belowright split
+ set winfixheight
+ belowright split
+
+ let info = s:win_layout_info()
+ call assert_fails('wincmd H', 'E36:')
+ call assert_equal(info, s:win_layout_info())
+
+ %bwipe
+endfunc
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_winfixbuf.vim b/src/testdir/test_winfixbuf.vim
new file mode 100644
index 0000000..04043f8
--- /dev/null
+++ b/src/testdir/test_winfixbuf.vim
@@ -0,0 +1,3286 @@
+" Test 'winfixbuf'
+
+source check.vim
+
+" Find the number of open windows in the current tab
+func s:get_windows_count()
+ return tabpagewinnr(tabpagenr(), '$')
+endfunc
+
+" Create some unnamed buffers.
+func s:make_buffers_list()
+ enew
+ file first
+ let l:first = bufnr()
+
+ enew
+ file middle
+ let l:middle = bufnr()
+
+ enew
+ file last
+ let l:last = bufnr()
+
+ set winfixbuf
+
+ return [l:first, l:last]
+endfunc
+
+" Create some unnamed buffers and add them to an args list
+func s:make_args_list()
+ let [l:first, l:last] = s:make_buffers_list()
+
+ args! first middle last
+
+ return [l:first, l:last]
+endfunc
+
+" Create two buffers and then set the window to 'winfixbuf'
+func s:make_buffer_pairs(...)
+ let l:reversed = get(a:, 1, 0)
+
+ if l:reversed == 1
+ enew
+ file original
+
+ set winfixbuf
+
+ enew!
+ file other
+ let l:other = bufnr()
+
+ return l:other
+ endif
+
+ enew
+ file other
+ let l:other = bufnr()
+
+ enew
+ file current
+
+ set winfixbuf
+
+ return l:other
+endfunc
+
+" Create 3 quick buffers and set the window to 'winfixbuf'
+func s:make_buffer_trio()
+ edit first
+ let l:first = bufnr()
+ edit second
+ let l:second = bufnr()
+
+ set winfixbuf
+
+ edit! third
+ let l:third = bufnr()
+
+ execute ":buffer! " . l:second
+
+ return [l:first, l:second, l:third]
+endfunc
+
+" Create a location list with at least 2 entries + a 'winfixbuf' window.
+func s:make_simple_location_list()
+ enew
+ file middle
+ let l:middle = bufnr()
+ call append(0, ["winfix search-term", "another line"])
+
+ enew!
+ file first
+ let l:first = bufnr()
+ call append(0, "first search-term")
+
+ enew!
+ file last
+ let l:last = bufnr()
+ call append(0, "last search-term")
+
+ call setloclist(
+ \ 0,
+ \ [
+ \ {
+ \ "filename": "first",
+ \ "bufnr": l:first,
+ \ "lnum": 1,
+ \ },
+ \ {
+ \ "filename": "middle",
+ \ "bufnr": l:middle,
+ \ "lnum": 1,
+ \ },
+ \ {
+ \ "filename": "middle",
+ \ "bufnr": l:middle,
+ \ "lnum": 2,
+ \ },
+ \ {
+ \ "filename": "last",
+ \ "bufnr": l:last,
+ \ "lnum": 1,
+ \ },
+ \ ]
+ \)
+
+ set winfixbuf
+
+ return [l:first, l:middle, l:last]
+endfunc
+
+" Create a quickfix with at least 2 entries that are in the current 'winfixbuf' window.
+func s:make_simple_quickfix()
+ enew
+ file current
+ let l:current = bufnr()
+ call append(0, ["winfix search-term", "another line"])
+
+ enew!
+ file first
+ let l:first = bufnr()
+ call append(0, "first search-term")
+
+ enew!
+ file last
+ let l:last = bufnr()
+ call append(0, "last search-term")
+
+ call setqflist(
+ \ [
+ \ {
+ \ "filename": "first",
+ \ "bufnr": l:first,
+ \ "lnum": 1,
+ \ },
+ \ {
+ \ "filename": "current",
+ \ "bufnr": l:current,
+ \ "lnum": 1,
+ \ },
+ \ {
+ \ "filename": "current",
+ \ "bufnr": l:current,
+ \ "lnum": 2,
+ \ },
+ \ {
+ \ "filename": "last",
+ \ "bufnr": l:last,
+ \ "lnum": 1,
+ \ },
+ \ ]
+ \)
+
+ set winfixbuf
+
+ return [l:current, l:last]
+endfunc
+
+" Create a quickfix with at least 2 entries that are in the current 'winfixbuf' window.
+func s:make_quickfix_windows()
+ let [l:current, _] = s:make_simple_quickfix()
+ execute "buffer! " . l:current
+
+ split
+ let l:first_window = win_getid()
+ execute "normal \<C-w>j"
+ let l:winfix_window = win_getid()
+
+ " Open the quickfix in a separate split and go to it
+ copen
+ let l:quickfix_window = win_getid()
+
+ return [l:first_window, l:winfix_window, l:quickfix_window]
+endfunc
+
+" Revert all changes that occurred in any past test
+func s:reset_all_buffers()
+ %bwipeout!
+ set nowinfixbuf
+
+ call setqflist([])
+
+ for l:window_info in getwininfo()
+ call setloclist(l:window_info["winid"], [])
+ endfor
+
+ delmarks A-Z0-9
+endfunc
+
+" Find and set the first quickfix entry that points to `buffer`
+func s:set_quickfix_by_buffer(buffer)
+ let l:index = 1 " quickfix indices start at 1
+ for l:entry in getqflist()
+ if l:entry["bufnr"] == a:buffer
+ execute l:index . "cc"
+
+ return
+ endif
+
+ let l:index += 1
+ endfor
+
+ echoerr 'No quickfix entry matching "' . a:buffer . '" could be found.'
+endfunc
+
+" Fail to call :Next on a 'winfixbuf' window unless :Next! is used.
+func Test_Next()
+ call s:reset_all_buffers()
+
+ let [l:first, _] = s:make_args_list()
+ next!
+
+ call assert_fails("Next", "E1513:")
+ call assert_notequal(l:first, bufnr())
+
+ Next!
+ call assert_equal(l:first, bufnr())
+endfunc
+
+" Call :argdo and choose the next available 'nowinfixbuf' window.
+func Test_argdo_choose_available_window()
+ call s:reset_all_buffers()
+
+ let [_, l:last] = s:make_args_list()
+
+ " Make a split window that is 'nowinfixbuf' but make it the second-to-last
+ " window so that :argdo will first try the 'winfixbuf' window, pass over it,
+ " and prefer the other 'nowinfixbuf' window, instead.
+ "
+ " +-------------------+
+ " | 'nowinfixbuf' |
+ " +-------------------+
+ " | 'winfixbuf' | <-- Cursor is here
+ " +-------------------+
+ split
+ let l:nowinfixbuf_window = win_getid()
+ " Move to the 'winfixbuf' window now
+ execute "normal \<C-w>j"
+ let l:winfixbuf_window = win_getid()
+ let l:expected_windows = s:get_windows_count()
+
+ argdo echo ''
+ call assert_equal(l:nowinfixbuf_window, win_getid())
+ call assert_equal(l:last, bufnr())
+ call assert_equal(l:expected_windows, s:get_windows_count())
+endfunc
+
+" Call :argdo and create a new split window if all available windows are 'winfixbuf'.
+func Test_argdo_make_new_window()
+ call s:reset_all_buffers()
+
+ let [l:first, l:last] = s:make_args_list()
+ let l:current = win_getid()
+ let l:current_windows = s:get_windows_count()
+
+ argdo echo ''
+ call assert_notequal(l:current, win_getid())
+ call assert_equal(l:last, bufnr())
+ execute "normal \<C-w>j"
+ call assert_equal(l:first, bufnr())
+ call assert_equal(l:current_windows + 1, s:get_windows_count())
+endfunc
+
+" Fail :argedit but :argedit! is allowed
+func Test_argedit()
+ call s:reset_all_buffers()
+
+ args! first middle last
+ enew
+ file first
+ let l:first = bufnr()
+
+ enew
+ file middle
+ let l:middle = bufnr()
+
+ enew
+ file last
+ let l:last = bufnr()
+
+ set winfixbuf
+
+ let l:current = bufnr()
+ call assert_fails("argedit first middle last", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ argedit! first middle last
+ call assert_equal(l:first, bufnr())
+endfunc
+
+" Fail :arglocal but :arglocal! is allowed
+func Test_arglocal()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+ argglobal! other
+ execute "buffer! " . l:current
+
+ call assert_fails("arglocal other", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ arglocal! other
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Fail :argglobal but :argglobal! is allowed
+func Test_argglobal()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ call assert_fails("argglobal other", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ argglobal! other
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Fail :args but :args! is allowed
+func Test_args()
+ call s:reset_all_buffers()
+
+ let [l:first, _] = s:make_buffers_list()
+ let l:current = bufnr()
+
+ call assert_fails("args first middle last", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ args! first middle last
+ call assert_equal(l:first, bufnr())
+endfunc
+
+" Fail :bNext but :bNext! is allowed
+func Test_bNext()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ call assert_fails("bNext", "E1513:")
+ let l:current = bufnr()
+
+ call assert_equal(l:current, bufnr())
+
+ bNext!
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Allow :badd because it doesn't actually change the current window's buffer
+func Test_badd()
+ call s:reset_all_buffers()
+
+ call s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ badd other
+ call assert_equal(l:current, bufnr())
+endfunc
+
+" Allow :balt because it doesn't actually change the current window's buffer
+func Test_balt()
+ call s:reset_all_buffers()
+
+ call s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ balt other
+ call assert_equal(l:current, bufnr())
+endfunc
+
+" Fail :bfirst but :bfirst! is allowed
+func Test_bfirst()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ call assert_fails("bfirst", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ bfirst!
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Fail :blast but :blast! is allowed
+func Test_blast()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs(1)
+ bfirst!
+ let l:current = bufnr()
+
+ call assert_fails("blast", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ blast!
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Fail :bmodified but :bmodified! is allowed
+func Test_bmodified()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ execute "buffer! " . l:other
+ set modified
+ execute "buffer! " . l:current
+
+ call assert_fails("bmodified", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ bmodified!
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Fail :bnext but :bnext! is allowed
+func Test_bnext()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ call assert_fails("bnext", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ bnext!
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Fail :bprevious but :bprevious! is allowed
+func Test_bprevious()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ call assert_fails("bprevious", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ bprevious!
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Fail :brewind but :brewind! is allowed
+func Test_brewind()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ call assert_fails("brewind", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ brewind!
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Fail :browse edit but :browse edit! is allowed
+func Test_browse_edit_fail()
+ " A GUI dialog may stall the test.
+ CheckNotGui
+
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ call assert_fails("browse edit other", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ try
+ browse edit! other
+ call assert_equal(l:other, bufnr())
+ catch /^Vim\%((\a\+)\)\=:E338:/
+ " Ignore E338, which occurs if console Vim is built with +browse.
+ " Console Vim without +browse will treat this as a regular :edit.
+ endtry
+endfunc
+
+" Allow :browse w because it doesn't change the buffer in the current file
+func Test_browse_edit_pass()
+ " A GUI dialog may stall the test.
+ CheckNotGui
+
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ try
+ browse write other
+ catch /^Vim\%((\a\+)\)\=:E338:/
+ " Ignore E338, which occurs if console Vim is built with +browse.
+ " Console Vim without +browse will treat this as a regular :write.
+ endtry
+
+ call delete("other")
+endfunc
+
+" Call :bufdo and choose the next available 'nowinfixbuf' window.
+func Test_bufdo_choose_available_window()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+
+ " Make a split window that is 'nowinfixbuf' but make it the second-to-last
+ " window so that :bufdo will first try the 'winfixbuf' window, pass over it,
+ " and prefer the other 'nowinfixbuf' window, instead.
+ "
+ " +-------------------+
+ " | 'nowinfixbuf' |
+ " +-------------------+
+ " | 'winfixbuf' | <-- Cursor is here
+ " +-------------------+
+ split
+ let l:nowinfixbuf_window = win_getid()
+ " Move to the 'winfixbuf' window now
+ execute "normal \<C-w>j"
+ let l:winfixbuf_window = win_getid()
+
+ let l:current = bufnr()
+ let l:expected_windows = s:get_windows_count()
+
+ call assert_notequal(l:current, l:other)
+
+ bufdo echo ''
+ call assert_equal(l:nowinfixbuf_window, win_getid())
+ call assert_notequal(l:other, bufnr())
+ call assert_equal(l:expected_windows, s:get_windows_count())
+endfunc
+
+" Call :bufdo and create a new split window if all available windows are 'winfixbuf'.
+func Test_bufdo_make_new_window()
+ call s:reset_all_buffers()
+
+ let [l:first, l:last] = s:make_buffers_list()
+ execute "buffer! " . l:first
+ let l:current = win_getid()
+ let l:current_windows = s:get_windows_count()
+
+ bufdo echo ''
+ call assert_notequal(l:current, win_getid())
+ call assert_equal(l:last, bufnr())
+ execute "normal \<C-w>j"
+ call assert_equal(l:first, bufnr())
+ call assert_equal(l:current_windows + 1, s:get_windows_count())
+endfunc
+
+" Fail :buffer but :buffer! is allowed
+func Test_buffer()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ call assert_fails("buffer " . l:other, "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ execute "buffer! " . l:other
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Allow :buffer on a 'winfixbuf' window if there is no change in buffer
+func Test_buffer_same_buffer()
+ call s:reset_all_buffers()
+
+ call s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ execute "buffer " . l:current
+ call assert_equal(l:current, bufnr())
+
+ execute "buffer! " . l:current
+ call assert_equal(l:current, bufnr())
+endfunc
+
+" Allow :cNext but the 'nowinfixbuf' window is selected, instead
+func Test_cNext()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first_window, l:winfix_window, l:quickfix_window] = s:make_quickfix_windows()
+
+ " The call to `:cNext` succeeds but it selects the window with 'nowinfixbuf' instead
+ call s:set_quickfix_by_buffer(winbufnr(l:winfix_window))
+
+ " Make sure the previous window has 'winfixbuf' so we can test that our
+ " "skip 'winfixbuf' window" logic works.
+ call win_gotoid(l:winfix_window)
+ call win_gotoid(l:quickfix_window)
+
+ cNext
+ call assert_equal(l:first_window, win_getid())
+endfunc
+
+" Allow :cNfile but the 'nowinfixbuf' window is selected, instead
+func Test_cNfile()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first_window, l:winfix_window, l:quickfix_window] = s:make_quickfix_windows()
+
+ " The call to `:cNfile` succeeds but it selects the window with 'nowinfixbuf' instead
+ call s:set_quickfix_by_buffer(winbufnr(l:winfix_window))
+ cnext!
+
+ " Make sure the previous window has 'winfixbuf' so we can test that our
+ " "skip 'winfixbuf' window" logic works.
+ call win_gotoid(l:winfix_window)
+ call win_gotoid(l:quickfix_window)
+
+ cNfile
+ call assert_equal(l:first_window, win_getid())
+endfunc
+
+" Allow :caddexpr because it doesn't change the current buffer
+func Test_caddexpr()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let l:file_path = tempname()
+ call writefile(["Error - bad-thing-found"], l:file_path)
+ execute "edit " . l:file_path
+ let l:file_buffer = bufnr()
+ let l:current = bufnr()
+
+ edit first.unittest
+ call append(0, ["some-search-term bad-thing-found"])
+
+ edit! other.unittest
+
+ set winfixbuf
+
+ execute "buffer! " . l:file_buffer
+
+ execute 'caddexpr expand("%") .. ":" .. line(".") .. ":" .. getline(".")'
+ call assert_equal(l:current, bufnr())
+
+ call delete(l:file_path)
+endfunc
+
+" Fail :cbuffer but :cbuffer! is allowed
+func Test_cbuffer()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let l:file_path = tempname()
+ call writefile(["first.unittest:1:Error - bad-thing-found"], l:file_path)
+ execute "edit " . l:file_path
+ let l:file_buffer = bufnr()
+ let l:current = bufnr()
+
+ edit first.unittest
+ call append(0, ["some-search-term bad-thing-found"])
+
+ edit! other.unittest
+
+ set winfixbuf
+
+ execute "buffer! " . l:file_buffer
+
+ call assert_fails("cbuffer " . l:file_buffer)
+ call assert_equal(l:current, bufnr())
+
+ execute "cbuffer! " . l:file_buffer
+ call assert_equal("first.unittest", expand("%:t"))
+
+ call delete(l:file_path)
+endfunc
+
+" Allow :cc but the 'nowinfixbuf' window is selected, instead
+func Test_cc()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first_window, l:winfix_window, l:quickfix_window] = s:make_quickfix_windows()
+
+ " The call to `:cnext` succeeds but it selects the window with 'nowinfixbuf' instead
+ call s:set_quickfix_by_buffer(winbufnr(l:winfix_window))
+
+ " Make sure the previous window has 'winfixbuf' so we can test that our
+ " "skip 'winfixbuf' window" logic works.
+ call win_gotoid(l:winfix_window)
+ call win_gotoid(l:quickfix_window)
+ " Go up one line in the quickfix window to an quickfix entry that doesn't
+ " point to a winfixbuf buffer
+ normal k
+ " Attempt to make the previous window, winfixbuf buffer, to go to the
+ " non-winfixbuf quickfix entry
+ .cc
+
+ " Confirm that :.cc did not change the winfixbuf-enabled window
+ call assert_equal(l:first_window, win_getid())
+endfunc
+
+" Call :cdo and choose the next available 'nowinfixbuf' window.
+func Test_cdo_choose_available_window()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:current, l:last] = s:make_simple_quickfix()
+ execute "buffer! " . l:current
+
+ " Make a split window that is 'nowinfixbuf' but make it the second-to-last
+ " window so that :cdo will first try the 'winfixbuf' window, pass over it,
+ " and prefer the other 'nowinfixbuf' window, instead.
+ "
+ " +-------------------+
+ " | 'nowinfixbuf' |
+ " +-------------------+
+ " | 'winfixbuf' | <-- Cursor is here
+ " +-------------------+
+ split
+ let l:nowinfixbuf_window = win_getid()
+ " Move to the 'winfixbuf' window now
+ execute "normal \<C-w>j"
+ let l:winfixbuf_window = win_getid()
+ let l:expected_windows = s:get_windows_count()
+
+ cdo echo ''
+
+ call assert_equal(l:nowinfixbuf_window, win_getid())
+ call assert_equal(l:last, bufnr())
+ execute "normal \<C-w>j"
+ call assert_equal(l:current, bufnr())
+ call assert_equal(l:expected_windows, s:get_windows_count())
+endfunc
+
+" Call :cdo and create a new split window if all available windows are 'winfixbuf'.
+func Test_cdo_make_new_window()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:current_buffer, l:last] = s:make_simple_quickfix()
+ execute "buffer! " . l:current_buffer
+
+ let l:current_window = win_getid()
+ let l:current_windows = s:get_windows_count()
+
+ cdo echo ''
+ call assert_notequal(l:current_window, win_getid())
+ call assert_equal(l:last, bufnr())
+ execute "normal \<C-w>j"
+ call assert_equal(l:current_buffer, bufnr())
+ call assert_equal(l:current_windows + 1, s:get_windows_count())
+endfunc
+
+" Fail :cexpr but :cexpr! is allowed
+func Test_cexpr()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let l:file = tempname()
+ let l:entry = '["' . l:file . ':1:bar"]'
+ let l:current = bufnr()
+
+ set winfixbuf
+
+ call assert_fails("cexpr " . l:entry)
+ call assert_equal(l:current, bufnr())
+
+ execute "cexpr! " . l:entry
+ call assert_equal(fnamemodify(l:file, ":t"), expand("%:t"))
+endfunc
+
+" Call :cfdo and choose the next available 'nowinfixbuf' window.
+func Test_cfdo_choose_available_window()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:current, l:last] = s:make_simple_quickfix()
+ execute "buffer! " . l:current
+
+ " Make a split window that is 'nowinfixbuf' but make it the second-to-last
+ " window so that :cfdo will first try the 'winfixbuf' window, pass over it,
+ " and prefer the other 'nowinfixbuf' window, instead.
+ "
+ " +-------------------+
+ " | 'nowinfixbuf' |
+ " +-------------------+
+ " | 'winfixbuf' | <-- Cursor is here
+ " +-------------------+
+ split
+ let l:nowinfixbuf_window = win_getid()
+ " Move to the 'winfixbuf' window now
+ execute "normal \<C-w>j"
+ let l:winfixbuf_window = win_getid()
+ let l:expected_windows = s:get_windows_count()
+
+ cfdo echo ''
+
+ call assert_equal(l:nowinfixbuf_window, win_getid())
+ call assert_equal(l:last, bufnr())
+ execute "normal \<C-w>j"
+ call assert_equal(l:current, bufnr())
+ call assert_equal(l:expected_windows, s:get_windows_count())
+endfunc
+
+" Call :cfdo and create a new split window if all available windows are 'winfixbuf'.
+func Test_cfdo_make_new_window()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:current_buffer, l:last] = s:make_simple_quickfix()
+ execute "buffer! " . l:current_buffer
+
+ let l:current_window = win_getid()
+ let l:current_windows = s:get_windows_count()
+
+ cfdo echo ''
+ call assert_notequal(l:current_window, win_getid())
+ call assert_equal(l:last, bufnr())
+ execute "normal \<C-w>j"
+ call assert_equal(l:current_buffer, bufnr())
+ call assert_equal(l:current_windows + 1, s:get_windows_count())
+endfunc
+
+" Fail :cfile but :cfile! is allowed
+func Test_cfile()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ edit first.unittest
+ call append(0, ["some-search-term bad-thing-found"])
+ write
+ let l:first = bufnr()
+
+ edit! second.unittest
+ call append(0, ["some-search-term"])
+ write
+
+ let l:file = tempname()
+ call writefile(["first.unittest:1:Error - bad-thing-found was detected"], l:file)
+
+ let l:current = bufnr()
+
+ set winfixbuf
+
+ call assert_fails(":cfile " . l:file)
+ call assert_equal(l:current, bufnr())
+
+ execute ":cfile! " . l:file
+ call assert_equal(l:first, bufnr())
+
+ call delete(l:file)
+ call delete("first.unittest")
+ call delete("second.unittest")
+endfunc
+
+" Allow :cfirst but the 'nowinfixbuf' window is selected, instead
+func Test_cfirst()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first_window, l:winfix_window, l:quickfix_window] = s:make_quickfix_windows()
+
+ " The call to `:cfirst` succeeds but it selects the window with 'nowinfixbuf' instead
+ call s:set_quickfix_by_buffer(winbufnr(l:winfix_window))
+
+ " Make sure the previous window has 'winfixbuf' so we can test that our
+ " "skip 'winfixbuf' window" logic works.
+ call win_gotoid(l:winfix_window)
+ call win_gotoid(l:quickfix_window)
+
+ cfirst
+ call assert_equal(l:first_window, win_getid())
+endfunc
+
+" Allow :clast but the 'nowinfixbuf' window is selected, instead
+func Test_clast()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first_window, l:winfix_window, l:quickfix_window] = s:make_quickfix_windows()
+
+ " The call to `:clast` succeeds but it selects the window with 'nowinfixbuf' instead
+ call s:set_quickfix_by_buffer(winbufnr(l:winfix_window))
+
+ " Make sure the previous window has 'winfixbuf' so we can test that our
+ " "skip 'winfixbuf' window" logic works.
+ call win_gotoid(l:winfix_window)
+ call win_gotoid(l:quickfix_window)
+
+ clast
+ call assert_equal(l:first_window, win_getid())
+endfunc
+
+" Allow :cnext but the 'nowinfixbuf' window is selected, instead
+" Make sure no new windows are created and previous windows are reused
+func Test_cnext()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first_window, l:winfix_window, l:quickfix_window] = s:make_quickfix_windows()
+ let l:expected = s:get_windows_count()
+
+ " The call to `:cnext` succeeds but it selects the window with 'nowinfixbuf' instead
+ call s:set_quickfix_by_buffer(winbufnr(l:winfix_window))
+
+ cnext!
+ call assert_equal(l:expected, s:get_windows_count())
+
+ " Make sure the previous window has 'winfixbuf' so we can test that our
+ " "skip 'winfixbuf' window" logic works.
+ call win_gotoid(l:winfix_window)
+ call win_gotoid(l:quickfix_window)
+
+ cnext
+ call assert_equal(l:first_window, win_getid())
+ call assert_equal(l:expected, s:get_windows_count())
+endfunc
+
+" Make sure :cnext creates a split window if no previous window exists
+func Test_cnext_no_previous_window()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:current, _] = s:make_simple_quickfix()
+ execute "buffer! " . l:current
+
+ let l:expected = s:get_windows_count()
+
+ " Open the quickfix in a separate split and go to it
+ copen
+
+ call assert_equal(l:expected + 1, s:get_windows_count())
+endfunc
+
+" Allow :cnext and create a 'nowinfixbuf' window if none exists
+func Test_cnext_make_new_window()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:current, _] = s:make_simple_quickfix()
+ let l:current = win_getid()
+
+ cfirst!
+
+ let l:windows = s:get_windows_count()
+ let l:expected = l:windows + 1 " We're about to create a new split window
+
+ cnext
+ call assert_equal(l:expected, s:get_windows_count())
+
+ cnext!
+ call assert_equal(l:expected, s:get_windows_count())
+endfunc
+
+" Allow :cprevious but the 'nowinfixbuf' window is selected, instead
+func Test_cprevious()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first_window, l:winfix_window, l:quickfix_window] = s:make_quickfix_windows()
+
+ " The call to `:cprevious` succeeds but it selects the window with 'nowinfixbuf' instead
+ call s:set_quickfix_by_buffer(winbufnr(l:winfix_window))
+
+ " Make sure the previous window has 'winfixbuf' so we can test that our
+ " "skip 'winfixbuf' window" logic works.
+ call win_gotoid(l:winfix_window)
+ call win_gotoid(l:quickfix_window)
+
+ cprevious
+ call assert_equal(l:first_window, win_getid())
+endfunc
+
+" Allow :cnfile but the 'nowinfixbuf' window is selected, instead
+func Test_cnfile()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first_window, l:winfix_window, l:quickfix_window] = s:make_quickfix_windows()
+
+ " The call to `:cnfile` succeeds but it selects the window with 'nowinfixbuf' instead
+ call s:set_quickfix_by_buffer(winbufnr(l:winfix_window))
+ cnext!
+
+ " Make sure the previous window has 'winfixbuf' so we can test that our
+ " "skip 'winfixbuf' window" logic works.
+ call win_gotoid(l:winfix_window)
+ call win_gotoid(l:quickfix_window)
+
+ cnfile
+ call assert_equal(l:first_window, win_getid())
+endfunc
+
+" Allow :cpfile but the 'nowinfixbuf' window is selected, instead
+func Test_cpfile()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first_window, l:winfix_window, l:quickfix_window] = s:make_quickfix_windows()
+
+ " The call to `:cpfile` succeeds but it selects the window with 'nowinfixbuf' instead
+ call s:set_quickfix_by_buffer(winbufnr(l:winfix_window))
+ cnext!
+
+ " Make sure the previous window has 'winfixbuf' so we can test that our
+ " "skip 'winfixbuf' window" logic works.
+ call win_gotoid(l:winfix_window)
+ call win_gotoid(l:quickfix_window)
+
+ cpfile
+ call assert_equal(l:first_window, win_getid())
+endfunc
+
+" Allow :crewind but the 'nowinfixbuf' window is selected, instead
+func Test_crewind()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first_window, l:winfix_window, l:quickfix_window] = s:make_quickfix_windows()
+
+ " The call to `:crewind` succeeds but it selects the window with 'nowinfixbuf' instead
+ call s:set_quickfix_by_buffer(winbufnr(l:winfix_window))
+ cnext!
+
+ " Make sure the previous window has 'winfixbuf' so we can test that our
+ " "skip 'winfixbuf' window" logic works.
+ call win_gotoid(l:winfix_window)
+ call win_gotoid(l:quickfix_window)
+
+ crewind
+ call assert_equal(l:first_window, win_getid())
+endfunc
+
+" Allow <C-w>f because it opens in a new split
+func Test_ctrl_w_f()
+ call s:reset_all_buffers()
+
+ enew
+ let l:file_name = tempname()
+ call writefile([], l:file_name)
+ let l:file_buffer = bufnr()
+
+ enew
+ file other
+ let l:other_buffer = bufnr()
+
+ set winfixbuf
+
+ call setline(1, l:file_name)
+ let l:current_windows = s:get_windows_count()
+ execute "normal \<C-w>f"
+
+ call assert_equal(l:current_windows + 1, s:get_windows_count())
+
+ call delete(l:file_name)
+endfunc
+
+" Fail :djump but :djump! is allowed
+func Test_djump()
+ call s:reset_all_buffers()
+
+ let l:include_file = tempname() . ".h"
+ call writefile(["min(1, 12);",
+ \ '#include "' . l:include_file . '"'
+ \ ],
+ \ "main.c")
+ call writefile(["#define min(X, Y) ((X) < (Y) ? (X) : (Y))"], l:include_file)
+ edit main.c
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("djump 1 /min/", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ djump! 1 /min/
+ call assert_notequal(l:current, bufnr())
+
+ call delete("main.c")
+ call delete(l:include_file)
+endfunc
+
+" Fail :drop but :drop! is allowed
+func Test_drop()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ call assert_fails("drop other", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ drop! other
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Fail :edit but :edit! is allowed
+func Test_edit()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ call assert_fails("edit other", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ edit! other
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Fail :enew but :enew! is allowed
+func Test_enew()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ call assert_fails("enew", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ enew!
+ call assert_notequal(l:other, bufnr())
+ call assert_notequal(3, bufnr())
+endfunc
+
+" Fail :ex but :ex! is allowed
+func Test_ex()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ call assert_fails("ex other", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ ex! other
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Fail :find but :find! is allowed
+func Test_find()
+ call s:reset_all_buffers()
+
+ let l:current = bufnr()
+ let l:file = tempname()
+ call writefile([], l:file)
+ let l:file = fnamemodify(l:file, ':p') " In case it's Windows 8.3-style.
+ let l:directory = fnamemodify(l:file, ":p:h")
+ let l:name = fnamemodify(l:file, ":p:t")
+
+ let l:original_path = &path
+ execute "set path=" . l:directory
+
+ set winfixbuf
+
+ call assert_fails("execute 'find " . l:name . "'", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ execute "find! " . l:name
+ call assert_equal(l:file, expand("%:p"))
+
+ execute "set path=" . l:original_path
+ call delete(l:file)
+endfunc
+
+" Fail :first but :first! is allowed
+func Test_first()
+ call s:reset_all_buffers()
+
+ let [l:first, _] = s:make_args_list()
+ next!
+
+ call assert_fails("first", "E1513:")
+ call assert_notequal(l:first, bufnr())
+
+ first!
+ call assert_equal(l:first, bufnr())
+endfunc
+
+" Fail :grep but :grep! is allowed
+func Test_grep()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ edit first.unittest
+ call append(0, ["some-search-term"])
+ write
+ let l:first = bufnr()
+
+ edit current.unittest
+ call append(0, ["some-search-term"])
+ write
+ let l:current = bufnr()
+
+ edit! last.unittest
+ call append(0, ["some-search-term"])
+ write
+ let l:last = bufnr()
+
+ set winfixbuf
+
+ buffer! current.unittest
+
+ call assert_fails("silent! grep some-search-term *.unittest", "E1513:")
+ call assert_equal(l:current, bufnr())
+ execute "edit! " . l:first
+
+ silent! grep! some-search-term *.unittest
+ call assert_notequal(l:first, bufnr())
+
+ call delete("first.unittest")
+ call delete("current.unittest")
+ call delete("last.unittest")
+endfunc
+
+" Fail :ijump but :ijump! is allowed
+func Test_ijump()
+ call s:reset_all_buffers()
+
+ let l:include_file = tempname() . ".h"
+ call writefile([
+ \ '#include "' . l:include_file . '"'
+ \ ],
+ \ "main.c")
+ call writefile(["#define min(X, Y) ((X) < (Y) ? (X) : (Y))"], l:include_file)
+ edit main.c
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ set define=^\\s*#\\s*define
+ set include=^\\s*#\\s*include
+ set path=.,/usr/include,,
+
+ call assert_fails("ijump /min/", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ set nowinfixbuf
+
+ ijump! /min/
+ call assert_notequal(l:current, bufnr())
+
+ set define&
+ set include&
+ set path&
+ call delete("main.c")
+ call delete(l:include_file)
+endfunc
+
+" Fail :lNext but :lNext! is allowed
+func Test_lNext()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first, l:middle, _] = s:make_simple_location_list()
+ call assert_equal(1, getloclist(0, #{idx: 0}).idx)
+
+ lnext!
+ call assert_equal(2, getloclist(0, #{idx: 0}).idx)
+ call assert_equal(l:middle, bufnr())
+
+ call assert_fails("lNext", "E1513:")
+ " Ensure the entry didn't change.
+ call assert_equal(2, getloclist(0, #{idx: 0}).idx)
+ call assert_equal(l:middle, bufnr())
+
+ lnext!
+ call assert_equal(3, getloclist(0, #{idx: 0}).idx)
+ call assert_equal(l:middle, bufnr())
+
+ lNext!
+ call assert_equal(2, getloclist(0, #{idx: 0}).idx)
+ call assert_equal(l:middle, bufnr())
+
+ lNext!
+ call assert_equal(1, getloclist(0, #{idx: 0}).idx)
+ call assert_equal(l:first, bufnr())
+endfunc
+
+" Fail :lNfile but :lNfile! is allowed
+func Test_lNfile()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first, l:current, _] = s:make_simple_location_list()
+ call assert_equal(1, getloclist(0, #{idx: 0}).idx)
+
+ lnext!
+ call assert_equal(2, getloclist(0, #{idx: 0}).idx)
+ call assert_equal(l:current, bufnr())
+
+ call assert_fails("lNfile", "E1513:")
+ " Ensure the entry didn't change.
+ call assert_equal(2, getloclist(0, #{idx: 0}).idx)
+ call assert_equal(l:current, bufnr())
+
+ lnext!
+ call assert_equal(3, getloclist(0, #{idx: 0}).idx)
+ call assert_equal(l:current, bufnr())
+
+ lNfile!
+ call assert_equal(1, getloclist(0, #{idx: 0}).idx)
+ call assert_equal(l:first, bufnr())
+endfunc
+
+" Allow :laddexpr because it doesn't change the current buffer
+func Test_laddexpr()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let l:file_path = tempname()
+ call writefile(["Error - bad-thing-found"], l:file_path)
+ execute "edit " . l:file_path
+ let l:file_buffer = bufnr()
+ let l:current = bufnr()
+
+ edit first.unittest
+ call append(0, ["some-search-term bad-thing-found"])
+
+ edit! other.unittest
+
+ set winfixbuf
+
+ execute "buffer! " . l:file_buffer
+
+ execute 'laddexpr expand("%") .. ":" .. line(".") .. ":" .. getline(".")'
+ call assert_equal(l:current, bufnr())
+
+ call delete(l:file_path)
+endfunc
+
+" Fail :last but :last! is allowed
+func Test_last()
+ call s:reset_all_buffers()
+
+ let [_, l:last] = s:make_args_list()
+ next!
+
+ call assert_fails("last", "E1513:")
+ call assert_notequal(l:last, bufnr())
+
+ last!
+ call assert_equal(l:last, bufnr())
+endfunc
+
+" Fail :lbuffer but :lbuffer! is allowed
+func Test_lbuffer()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let l:file_path = tempname()
+ call writefile(["first.unittest:1:Error - bad-thing-found"], l:file_path)
+ execute "edit " . l:file_path
+ let l:file_buffer = bufnr()
+ let l:current = bufnr()
+
+ edit first.unittest
+ call append(0, ["some-search-term bad-thing-found"])
+
+ edit! other.unittest
+
+ set winfixbuf
+
+ execute "buffer! " . l:file_buffer
+
+ call assert_fails("lbuffer " . l:file_buffer)
+ call assert_equal(l:current, bufnr())
+
+ execute "lbuffer! " . l:file_buffer
+ call assert_equal("first.unittest", expand("%:t"))
+
+ call delete(l:file_path)
+endfunc
+
+" Fail :ldo but :ldo! is allowed
+func Test_ldo()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first, l:middle, l:last] = s:make_simple_location_list()
+ lnext!
+
+ call assert_fails('execute "ldo buffer ' . l:first . '"', "E1513:")
+ call assert_equal(l:middle, bufnr())
+ execute "ldo! buffer " . l:first
+ call assert_notequal(l:last, bufnr())
+endfunc
+
+" Fail :lfdo but :lfdo! is allowed
+func Test_lexpr()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let l:file = tempname()
+ let l:entry = '["' . l:file . ':1:bar"]'
+ let l:current = bufnr()
+
+ set winfixbuf
+
+ call assert_fails("lexpr " . l:entry)
+ call assert_equal(l:current, bufnr())
+
+ execute "lexpr! " . l:entry
+ call assert_equal(fnamemodify(l:file, ":t"), expand("%:t"))
+endfunc
+
+" Fail :lfdo but :lfdo! is allowed
+func Test_lfdo()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first, l:middle, l:last] = s:make_simple_location_list()
+ lnext!
+
+ call assert_fails('execute "lfdo buffer ' . l:first . '"', "E1513:")
+ call assert_equal(l:middle, bufnr())
+ execute "lfdo! buffer " . l:first
+ call assert_notequal(l:last, bufnr())
+endfunc
+
+" Fail :lfile but :lfile! is allowed
+func Test_lfile()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ edit first.unittest
+ call append(0, ["some-search-term bad-thing-found"])
+ write
+ let l:first = bufnr()
+
+ edit! second.unittest
+ call append(0, ["some-search-term"])
+ write
+
+ let l:file = tempname()
+ call writefile(["first.unittest:1:Error - bad-thing-found was detected"], l:file)
+
+ let l:current = bufnr()
+
+ set winfixbuf
+
+ call assert_fails(":lfile " . l:file)
+ call assert_equal(l:current, bufnr())
+
+ execute ":lfile! " . l:file
+ call assert_equal(l:first, bufnr())
+
+ call delete(l:file)
+ call delete("first.unittest")
+ call delete("second.unittest")
+endfunc
+
+" Fail :ll but :ll! is allowed
+func Test_ll()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first, l:middle, l:last] = s:make_simple_location_list()
+ lopen
+ lfirst!
+ execute "normal \<C-w>j"
+ normal j
+
+ call assert_fails(".ll", "E1513:")
+ execute "normal \<C-w>k"
+ call assert_equal(l:first, bufnr())
+ execute "normal \<C-w>j"
+ .ll!
+ execute "normal \<C-w>k"
+ call assert_equal(l:middle, bufnr())
+endfunc
+
+" Fail :llast but :llast! is allowed
+func Test_llast()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first, _, l:last] = s:make_simple_location_list()
+ lfirst!
+
+ call assert_fails("llast", "E1513:")
+ call assert_equal(l:first, bufnr())
+
+ llast!
+ call assert_equal(l:last, bufnr())
+endfunc
+
+" Fail :lnext but :lnext! is allowed
+func Test_lnext()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first, l:middle, l:last] = s:make_simple_location_list()
+ ll!
+
+ call assert_fails("lnext", "E1513:")
+ call assert_equal(l:first, bufnr())
+
+ lnext!
+ call assert_equal(l:middle, bufnr())
+endfunc
+
+" Fail :lnfile but :lnfile! is allowed
+func Test_lnfile()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [_, l:current, l:last] = s:make_simple_location_list()
+ call assert_equal(1, getloclist(0, #{idx: 0}).idx)
+
+ lnext!
+ call assert_equal(2, getloclist(0, #{idx: 0}).idx)
+ call assert_equal(l:current, bufnr())
+
+ call assert_fails("lnfile", "E1513:")
+ " Ensure the entry didn't change.
+ call assert_equal(2, getloclist(0, #{idx: 0}).idx)
+ call assert_equal(l:current, bufnr())
+
+ lnfile!
+ call assert_equal(4, getloclist(0, #{idx: 0}).idx)
+ call assert_equal(l:last, bufnr())
+endfunc
+
+" Fail :lpfile but :lpfile! is allowed
+func Test_lpfile()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first, l:current, _] = s:make_simple_location_list()
+ lnext!
+
+ call assert_fails("lpfile", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ lnext! " Reset for the next test call
+
+ lpfile!
+ call assert_equal(l:first, bufnr())
+endfunc
+
+" Fail :lprevious but :lprevious! is allowed
+func Test_lprevious()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first, l:middle, _] = s:make_simple_location_list()
+ call assert_equal(1, getloclist(0, #{idx: 0}).idx)
+
+ lnext!
+ call assert_equal(2, getloclist(0, #{idx: 0}).idx)
+ call assert_equal(l:middle, bufnr())
+
+ call assert_fails("lprevious", "E1513:")
+ " Ensure the entry didn't change.
+ call assert_equal(2, getloclist(0, #{idx: 0}).idx)
+ call assert_equal(l:middle, bufnr())
+
+ lprevious!
+ call assert_equal(1, getloclist(0, #{idx: 0}).idx)
+ call assert_equal(l:first, bufnr())
+endfunc
+
+" Fail :lrewind but :lrewind! is allowed
+func Test_lrewind()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ let [l:first, l:middle, _] = s:make_simple_location_list()
+ lnext!
+
+ call assert_fails("lrewind", "E1513:")
+ call assert_equal(l:middle, bufnr())
+
+ lrewind!
+ call assert_equal(l:first, bufnr())
+endfunc
+
+" Fail :ltag but :ltag! is allowed
+func Test_ltag()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ call writefile(["one"], "Xother")
+ edit Xother
+ execute "normal \<C-]>"
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("ltag one", "E1513:")
+
+ ltag! one
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Fail vim.command if we try to change buffers while 'winfixbuf' is set
+func Test_lua_command()
+ CheckFeature lua
+ call s:reset_all_buffers()
+
+ enew
+ file first
+ let l:previous = bufnr()
+
+ enew
+ file second
+ let l:current = bufnr()
+
+ set winfixbuf
+
+ call assert_fails('lua vim.command("buffer " .. ' . l:previous . ')')
+ call assert_equal(l:current, bufnr())
+
+ execute 'lua vim.command("buffer! " .. ' . l:previous . ')'
+ call assert_equal(l:previous, bufnr())
+endfunc
+
+" Fail :lvimgrep but :lvimgrep! is allowed
+func Test_lvimgrep()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ edit first.unittest
+ call append(0, ["some-search-term"])
+ write
+
+ edit winfix.unittest
+ call append(0, ["some-search-term"])
+ write
+ let l:current = bufnr()
+
+ set winfixbuf
+
+ edit! last.unittest
+ call append(0, ["some-search-term"])
+ write
+ let l:last = bufnr()
+
+ buffer! winfix.unittest
+
+ call assert_fails("lvimgrep /some-search-term/ *.unittest", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ lvimgrep! /some-search-term/ *.unittest
+ call assert_notequal(l:current, bufnr())
+
+ call delete("first.unittest")
+ call delete("winfix.unittest")
+ call delete("last.unittest")
+endfunc
+
+" Fail :lvimgrepadd but :lvimgrepadd! is allowed
+func Test_lvimgrepadd()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ edit first.unittest
+ call append(0, ["some-search-term"])
+ write
+
+ edit winfix.unittest
+ call append(0, ["some-search-term"])
+ write
+ let l:current = bufnr()
+
+ set winfixbuf
+
+ edit! last.unittest
+ call append(0, ["some-search-term"])
+ write
+ let l:last = bufnr()
+
+ buffer! winfix.unittest
+
+ call assert_fails("lvimgrepadd /some-search-term/ *.unittest")
+ call assert_equal(l:current, bufnr())
+
+ lvimgrepadd! /some-search-term/ *.unittest
+ call assert_notequal(l:current, bufnr())
+
+ call delete("first.unittest")
+ call delete("winfix.unittest")
+ call delete("last.unittest")
+endfunc
+
+" Don't allow global marks to change the current 'winfixbuf' window
+func Test_marks_mappings_fail()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+ execute "buffer! " . l:other
+ normal mA
+ execute "buffer! " . l:current
+ normal mB
+
+ call assert_fails("normal `A", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ call assert_fails("normal 'A", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ set nowinfixbuf
+
+ normal `A
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Allow global marks in a 'winfixbuf' window if the jump is the same buffer
+func Test_marks_mappings_pass_intra_move()
+ call s:reset_all_buffers()
+
+ let l:current = bufnr()
+ call append(0, ["some line", "another line"])
+ normal mA
+ normal j
+ normal mB
+
+ set winfixbuf
+
+ normal `A
+ call assert_equal(l:current, bufnr())
+endfunc
+
+" Fail :next but :next! is allowed
+func Test_next()
+ call s:reset_all_buffers()
+
+ let [l:first, _] = s:make_args_list()
+ first!
+
+ call assert_fails("next", "E1513:")
+ call assert_equal(l:first, bufnr())
+
+ next!
+ call assert_notequal(l:first, bufnr())
+endfunc
+
+" Ensure :mksession saves 'winfixbuf' details
+func Test_mksession()
+ CheckFeature mksession
+ call s:reset_all_buffers()
+
+ set sessionoptions+=options
+ set winfixbuf
+
+ mksession test_winfixbuf_Test_mksession.vim
+
+ call s:reset_all_buffers()
+ let l:winfixbuf = &winfixbuf
+ call assert_equal(0, l:winfixbuf)
+
+ source test_winfixbuf_Test_mksession.vim
+
+ let l:winfixbuf = &winfixbuf
+ call assert_equal(1, l:winfixbuf)
+
+ set sessionoptions&
+ call delete("test_winfixbuf_Test_mksession.vim")
+endfunc
+
+" Allow :next if the next index is the same as the current buffer
+func Test_next_same_buffer()
+ call s:reset_all_buffers()
+
+ enew
+ file foo
+ enew
+ file bar
+ enew
+ file fizz
+ enew
+ file buzz
+ args foo foo bar fizz buzz
+
+ edit foo
+ set winfixbuf
+ let l:current = bufnr()
+
+ " Allow :next because the args list is `[foo] foo bar fizz buzz
+ next
+ call assert_equal(l:current, bufnr())
+
+ " Fail :next because the args list is `foo [foo] bar fizz buzz
+ " and the next buffer would be bar, which is a different buffer
+ call assert_fails("next", "E1513:")
+ call assert_equal(l:current, bufnr())
+endfunc
+
+" Fail to jump to a tag with g<C-]> if 'winfixbuf' is enabled
+func Test_normal_g_ctrl_square_bracket_right()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ call writefile(["one"], "Xother")
+ edit Xother
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("normal g\<C-]>", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Fail to jump to a tag with g<RightMouse> if 'winfixbuf' is enabled
+func Test_normal_g_rightmouse()
+ call s:reset_all_buffers()
+ set mouse=n
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ call writefile(["one"], "Xother")
+ edit Xother
+ execute "normal \<C-]>"
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("normal g\<RightMouse>", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ set tags&
+ set mouse&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Fail to jump to a tag with g] if 'winfixbuf' is enabled
+func Test_normal_g_square_bracket_right()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ call writefile(["one"], "Xother")
+ edit Xother
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("normal g]", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Fail to jump to a tag with <C-RightMouse> if 'winfixbuf' is enabled
+func Test_normal_ctrl_rightmouse()
+ call s:reset_all_buffers()
+ set mouse=n
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ call writefile(["one"], "Xother")
+ edit Xother
+ execute "normal \<C-]>"
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("normal \<C-RightMouse>", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ set tags&
+ set mouse&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Fail to jump to a tag with <C-t> if 'winfixbuf' is enabled
+func Test_normal_ctrl_t()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ call writefile(["one"], "Xother")
+ edit Xother
+ execute "normal \<C-]>"
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("normal \<C-t>", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Disallow <C-^> in 'winfixbuf' windows
+func Test_normal_ctrl_hat()
+ call s:reset_all_buffers()
+ clearjumps
+
+ enew
+ file first
+ let l:first = bufnr()
+
+ enew
+ file current
+ let l:current = bufnr()
+
+ set winfixbuf
+
+ call assert_fails("normal \<C-^>", "E1513:")
+ call assert_equal(l:current, bufnr())
+endfunc
+
+" Allow <C-i> in 'winfixbuf' windows if the movement stays within the buffer
+func Test_normal_ctrl_i_pass()
+ call s:reset_all_buffers()
+ clearjumps
+
+ enew
+ file first
+ let l:first = bufnr()
+
+ enew!
+ file current
+ let l:current = bufnr()
+ " Add some lines so we can populate a jumplist"
+ call append(0, ["some line", "another line"])
+ " Add an entry to the jump list
+ " Go up another line
+ normal m`
+ normal k
+ execute "normal \<C-o>"
+
+ set winfixbuf
+
+ let l:line = getcurpos()[1]
+ execute "normal 1\<C-i>"
+ call assert_notequal(l:line, getcurpos()[1])
+endfunc
+
+" Disallow <C-o> in 'winfixbuf' windows if it would cause the buffer to switch
+func Test_normal_ctrl_o_fail()
+ call s:reset_all_buffers()
+ clearjumps
+
+ enew
+ file first
+ let l:first = bufnr()
+
+ enew
+ file current
+ let l:current = bufnr()
+
+ set winfixbuf
+
+ call assert_fails("normal \<C-o>", "E1513:")
+ call assert_equal(l:current, bufnr())
+endfunc
+
+" Allow <C-o> in 'winfixbuf' windows if the movement stays within the buffer
+func Test_normal_ctrl_o_pass()
+ call s:reset_all_buffers()
+ clearjumps
+
+ enew
+ file first
+ let l:first = bufnr()
+
+ enew!
+ file current
+ let l:current = bufnr()
+ " Add some lines so we can populate a jumplist
+ call append(0, ["some line", "another line"])
+ " Add an entry to the jump list
+ " Go up another line
+ normal m`
+ normal k
+
+ set winfixbuf
+
+ execute "normal \<C-o>"
+ call assert_equal(l:current, bufnr())
+endfunc
+
+" Fail to jump to a tag with <C-]> if 'winfixbuf' is enabled
+func Test_normal_ctrl_square_bracket_right()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ call writefile(["one"], "Xother")
+ edit Xother
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("normal \<C-]>", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Allow <C-w><C-]> with 'winfixbuf' enabled because it runs in a new, split window
+func Test_normal_ctrl_w_ctrl_square_bracket_right()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ call writefile(["one"], "Xother")
+ edit Xother
+
+ set winfixbuf
+
+ let l:current_windows = s:get_windows_count()
+ execute "normal \<C-w>\<C-]>"
+ call assert_equal(l:current_windows + 1, s:get_windows_count())
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Allow <C-w>g<C-]> with 'winfixbuf' enabled because it runs in a new, split window
+func Test_normal_ctrl_w_g_ctrl_square_bracket_right()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ call writefile(["one"], "Xother")
+ edit Xother
+
+ set winfixbuf
+
+ let l:current_windows = s:get_windows_count()
+ execute "normal \<C-w>g\<C-]>"
+ call assert_equal(l:current_windows + 1, s:get_windows_count())
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Fail to jump to a tag with <C-]> if 'winfixbuf' is enabled
+func Test_normal_gt()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ call writefile(["one", "two", "three"], "Xother")
+ edit Xother
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("normal \<C-]>", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Prevent gF from switching a 'winfixbuf' window's buffer
+func Test_normal_gF()
+ call s:reset_all_buffers()
+
+ let l:file = tempname()
+ call append(0, [l:file])
+ call writefile([], l:file)
+ " Place the cursor onto the line that has `l:file`
+ normal gg
+ " Prevent Vim from erroring with "No write since last change @ command
+ " line" when we try to call gF, later.
+ set hidden
+
+ set winfixbuf
+
+ let l:buffer = bufnr()
+
+ call assert_fails("normal gF", "E1513:")
+ call assert_equal(l:buffer, bufnr())
+
+ set nowinfixbuf
+
+ normal gF
+ call assert_notequal(l:buffer, bufnr())
+
+ call delete(l:file)
+endfunc
+
+" Prevent gf from switching a 'winfixbuf' window's buffer
+func Test_normal_gf()
+ call s:reset_all_buffers()
+
+ let l:file = tempname()
+ call append(0, [l:file])
+ call writefile([], l:file)
+ " Place the cursor onto the line that has `l:file`
+ normal gg
+ " Prevent Vim from erroring with "No write since last change @ command
+ " line" when we try to call gf, later.
+ set hidden
+
+ set winfixbuf
+
+ let l:buffer = bufnr()
+
+ call assert_fails("normal gf", "E1513:")
+ call assert_equal(l:buffer, bufnr())
+
+ set nowinfixbuf
+
+ normal gf
+ call assert_notequal(l:buffer, bufnr())
+
+ call delete(l:file)
+endfunc
+
+" Fail "goto file under the cursor" (using [f, which is the same as `:normal gf`)
+func Test_normal_square_bracket_left_f()
+ call s:reset_all_buffers()
+
+ let l:file = tempname()
+ call append(0, [l:file])
+ call writefile([], l:file)
+ " Place the cursor onto the line that has `l:file`
+ normal gg
+ " Prevent Vim from erroring with "No write since last change @ command
+ " line" when we try to call gf, later.
+ set hidden
+
+ set winfixbuf
+
+ let l:buffer = bufnr()
+
+ call assert_fails("normal [f", "E1513:")
+ call assert_equal(l:buffer, bufnr())
+
+ set nowinfixbuf
+
+ normal [f
+ call assert_notequal(l:buffer, bufnr())
+
+ call delete(l:file)
+endfunc
+
+" Fail to go to a C macro with [<C-d> if 'winfixbuf' is enabled
+func Test_normal_square_bracket_left_ctrl_d()
+ call s:reset_all_buffers()
+
+ let l:include_file = tempname() . ".h"
+ call writefile(["min(1, 12);",
+ \ '#include "' . l:include_file . '"'
+ \ ],
+ \ "main.c")
+ call writefile(["#define min(X, Y) ((X) < (Y) ? (X) : (Y))"], l:include_file)
+ edit main.c
+ normal ]\<C-d>
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("normal [\<C-d>", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ set nowinfixbuf
+
+ execute "normal [\<C-d>"
+ call assert_notequal(l:current, bufnr())
+
+ call delete("main.c")
+ call delete(l:include_file)
+endfunc
+
+" Fail to go to a C macro with ]<C-d> if 'winfixbuf' is enabled
+func Test_normal_square_bracket_right_ctrl_d()
+ call s:reset_all_buffers()
+
+ let l:include_file = tempname() . ".h"
+ call writefile(["min(1, 12);",
+ \ '#include "' . l:include_file . '"'
+ \ ],
+ \ "main.c")
+ call writefile(["#define min(X, Y) ((X) < (Y) ? (X) : (Y))"], l:include_file)
+ edit main.c
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("normal ]\<C-d>", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ set nowinfixbuf
+
+ execute "normal ]\<C-d>"
+ call assert_notequal(l:current, bufnr())
+
+ call delete("main.c")
+ call delete(l:include_file)
+endfunc
+
+" Fail to go to a C macro with [<C-i> if 'winfixbuf' is enabled
+func Test_normal_square_bracket_left_ctrl_i()
+ call s:reset_all_buffers()
+
+ let l:include_file = tempname() . ".h"
+ call writefile(['#include "' . l:include_file . '"',
+ \ "min(1, 12);",
+ \ ],
+ \ "main.c")
+ call writefile(["#define min(X, Y) ((X) < (Y) ? (X) : (Y))"], l:include_file)
+ edit main.c
+ " Move to the line with `min(1, 12);` on it"
+ normal j
+
+ set define=^\\s*#\\s*define
+ set include=^\\s*#\\s*include
+ set path=.,/usr/include,,
+
+ let l:current = bufnr()
+
+ set winfixbuf
+
+ call assert_fails("normal [\<C-i>", "E1513:")
+
+ set nowinfixbuf
+
+ execute "normal [\<C-i>"
+ call assert_notequal(l:current, bufnr())
+
+ set define&
+ set include&
+ set path&
+ call delete("main.c")
+ call delete(l:include_file)
+endfunc
+
+" Fail to go to a C macro with ]<C-i> if 'winfixbuf' is enabled
+func Test_normal_square_bracket_right_ctrl_i()
+ call s:reset_all_buffers()
+
+ let l:include_file = tempname() . ".h"
+ call writefile(["min(1, 12);",
+ \ '#include "' . l:include_file . '"'
+ \ ],
+ \ "main.c")
+ call writefile(["#define min(X, Y) ((X) < (Y) ? (X) : (Y))"], l:include_file)
+ edit main.c
+
+ set winfixbuf
+
+ set define=^\\s*#\\s*define
+ set include=^\\s*#\\s*include
+ set path=.,/usr/include,,
+
+ let l:current = bufnr()
+
+ call assert_fails("normal ]\<C-i>", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ set nowinfixbuf
+
+ execute "normal ]\<C-i>"
+ call assert_notequal(l:current, bufnr())
+
+ set define&
+ set include&
+ set path&
+ call delete("main.c")
+ call delete(l:include_file)
+endfunc
+
+" Fail "goto file under the cursor" (using ]f, which is the same as `:normal gf`)
+func Test_normal_square_bracket_right_f()
+ call s:reset_all_buffers()
+
+ let l:file = tempname()
+ call append(0, [l:file])
+ call writefile([], l:file)
+ " Place the cursor onto the line that has `l:file`
+ normal gg
+ " Prevent Vim from erroring with "No write since last change @ command
+ " line" when we try to call gf, later.
+ set hidden
+
+ set winfixbuf
+
+ let l:buffer = bufnr()
+
+ call assert_fails("normal ]f", "E1513:")
+ call assert_equal(l:buffer, bufnr())
+
+ set nowinfixbuf
+
+ normal ]f
+ call assert_notequal(l:buffer, bufnr())
+
+ call delete(l:file)
+endfunc
+
+" Fail to jump to a tag with v<C-]> if 'winfixbuf' is enabled
+func Test_normal_v_ctrl_square_bracket_right()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ call writefile(["one"], "Xother")
+ edit Xother
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("normal v\<C-]>", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Fail to jump to a tag with vg<C-]> if 'winfixbuf' is enabled
+func Test_normal_v_g_ctrl_square_bracket_right()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ call writefile(["one"], "Xother")
+ edit Xother
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("normal vg\<C-]>", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Allow :pedit because, unlike :edit, it uses a separate window
+func Test_pedit()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+
+ pedit other
+
+ execute "normal \<C-w>w"
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Fail :pop but :pop! is allowed
+func Test_pop()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "thesame\tXfile\t1;\"\td\tfile:",
+ \ "thesame\tXfile\t2;\"\td\tfile:",
+ \ "thesame\tXfile\t3;\"\td\tfile:",
+ \ ],
+ \ "Xtags")
+ call writefile(["thesame one", "thesame two", "thesame three"], "Xfile")
+ call writefile(["thesame one"], "Xother")
+ edit Xother
+
+ tag thesame
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("pop", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ pop!
+ call assert_notequal(l:current, bufnr())
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Fail :previous but :previous! is allowed
+func Test_previous()
+ call s:reset_all_buffers()
+
+ let [l:first, _] = s:make_args_list()
+ next!
+
+ call assert_fails("previous", "E1513:")
+ call assert_notequal(l:first, bufnr())
+
+ previous!
+ call assert_equal(l:first, bufnr())
+endfunc
+
+" Fail pyxdo if it changes a window with 'winfixbuf' is set
+func Test_pythonx_pyxdo()
+ CheckFeature pythonx
+ call s:reset_all_buffers()
+
+ enew
+ file first
+ let g:_previous_buffer = bufnr()
+
+ enew
+ file second
+
+ set winfixbuf
+
+ pythonx << EOF
+import vim
+
+def test_winfixbuf_Test_pythonx_pyxdo_set_buffer():
+ buffer = vim.vars['_previous_buffer']
+ vim.current.buffer = vim.buffers[buffer]
+EOF
+
+ try
+ pyxdo test_winfixbuf_Test_pythonx_pyxdo_set_buffer()
+ catch /Vim\%((\a\+)\)\=:E1513:/
+ let l:caught = 1
+ endtry
+
+ call assert_equal(1, l:caught)
+
+ unlet g:_previous_buffer
+endfunc
+
+" Fail pyxfile if it changes a window with 'winfixbuf' is set
+func Test_pythonx_pyxfile()
+ CheckFeature pythonx
+ call s:reset_all_buffers()
+
+ enew
+ file first
+ let g:_previous_buffer = bufnr()
+
+ enew
+ file second
+
+ set winfixbuf
+
+ call writefile(["import vim",
+ \ "buffer = vim.vars['_previous_buffer']",
+ \ "vim.current.buffer = vim.buffers[buffer]",
+ \ ],
+ \ "file.py")
+
+ try
+ pyxfile file.py
+ catch /Vim\%((\a\+)\)\=:E1513:/
+ let l:caught = 1
+ endtry
+
+ call assert_equal(1, l:caught)
+
+ call delete("file.py")
+ unlet g:_previous_buffer
+endfunc
+
+" Fail vim.current.buffer if 'winfixbuf' is set
+func Test_pythonx_vim_current_buffer()
+ CheckFeature pythonx
+ call s:reset_all_buffers()
+
+ enew
+ file first
+ let g:_previous_buffer = bufnr()
+
+ enew
+ file second
+
+ let l:caught = 0
+
+ set winfixbuf
+
+ try
+ pythonx << EOF
+import vim
+
+buffer = vim.vars["_previous_buffer"]
+vim.current.buffer = vim.buffers[buffer]
+EOF
+ catch /Vim\%((\a\+)\)\=:E1513:/
+ let l:caught = 1
+ endtry
+
+ call assert_equal(1, l:caught)
+ unlet g:_previous_buffer
+endfunc
+
+" Ensure remapping to a disabled action still triggers failures
+func Test_remap_key_fail()
+ call s:reset_all_buffers()
+
+ enew
+ file first
+ let l:first = bufnr()
+
+ enew
+ file current
+ let l:current = bufnr()
+
+ set winfixbuf
+
+ nnoremap g <C-^>
+
+ call assert_fails("normal g", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ nunmap g
+endfunc
+
+" Ensure remapping a disabled key to something valid does trigger any failures
+func Test_remap_key_pass()
+ call s:reset_all_buffers()
+
+ enew
+ file first
+ let l:first = bufnr()
+
+ enew
+ file current
+ let l:current = bufnr()
+
+ set winfixbuf
+
+ call assert_fails("normal \<C-^>", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ " Disallow <C-^> by default but allow it if the command does something else
+ nnoremap <C-^> :echo "hello!"
+
+ execute "normal \<C-^>"
+ call assert_equal(l:current, bufnr())
+
+ nunmap <C-^>
+endfunc
+
+" Fail :rewind but :rewind! is allowed
+func Test_rewind()
+ call s:reset_all_buffers()
+
+ let [l:first, _] = s:make_args_list()
+ next!
+
+ call assert_fails("rewind", "E1513:")
+ call assert_notequal(l:first, bufnr())
+
+ rewind!
+ call assert_equal(l:first, bufnr())
+endfunc
+
+" Allow :sblast because it opens the buffer in a new, split window
+func Test_sblast()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs(1)
+ bfirst!
+ let l:current = bufnr()
+
+ sblast
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Fail :sbprevious but :sbprevious! is allowed
+func Test_sbprevious()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ sbprevious
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Make sure 'winfixbuf' can be set using 'winfixbuf' or 'wfb'
+func Test_short_option()
+ call s:reset_all_buffers()
+
+ call s:make_buffer_pairs()
+
+ set winfixbuf
+ call assert_fails("edit something_else", "E1513")
+
+ set nowinfixbuf
+ set wfb
+ call assert_fails("edit another_place", "E1513")
+
+ set nowfb
+ edit last_place
+endfunc
+
+" Allow :snext because it makes a new window
+func Test_snext()
+ call s:reset_all_buffers()
+
+ let [l:first, _] = s:make_args_list()
+ first!
+
+ let l:current_window = win_getid()
+
+ snext
+ call assert_notequal(l:current_window, win_getid())
+ call assert_notequal(l:first, bufnr())
+endfunc
+
+" Ensure the first has 'winfixbuf' and a new split window is 'nowinfixbuf'
+func Test_split_window()
+ call s:reset_all_buffers()
+
+ split
+ execute "normal \<C-w>j"
+
+ set winfixbuf
+
+ let l:winfix_window_1 = win_getid()
+ vsplit
+ let l:winfix_window_2 = win_getid()
+
+ call assert_equal(1, getwinvar(l:winfix_window_1, "&winfixbuf"))
+ call assert_equal(0, getwinvar(l:winfix_window_2, "&winfixbuf"))
+endfunc
+
+" Fail :tNext but :tNext! is allowed
+func Test_tNext()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "thesame\tXfile\t1;\"\td\tfile:",
+ \ "thesame\tXfile\t2;\"\td\tfile:",
+ \ "thesame\tXfile\t3;\"\td\tfile:",
+ \ ],
+ \ "Xtags")
+ call writefile(["thesame one", "thesame two", "thesame three"], "Xfile")
+ call writefile(["thesame one"], "Xother")
+ edit Xother
+
+ tag thesame
+ execute "normal \<C-^>"
+ tnext!
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("tNext", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ tNext!
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Call :tabdo and choose the next available 'nowinfixbuf' window.
+func Test_tabdo_choose_available_window()
+ call s:reset_all_buffers()
+
+ let [l:first, _] = s:make_args_list()
+
+ " Make a split window that is 'nowinfixbuf' but make it the second-to-last
+ " window so that :tabdo will first try the 'winfixbuf' window, pass over it,
+ " and prefer the other 'nowinfixbuf' window, instead.
+ "
+ " +-------------------+
+ " | 'nowinfixbuf' |
+ " +-------------------+
+ " | 'winfixbuf' | <-- Cursor is here
+ " +-------------------+
+ split
+ let l:nowinfixbuf_window = win_getid()
+ " Move to the 'winfixbuf' window now
+ execute "normal \<C-w>j"
+ let l:winfixbuf_window = win_getid()
+
+ let l:expected_windows = s:get_windows_count()
+ tabdo echo ''
+ call assert_equal(l:nowinfixbuf_window, win_getid())
+ call assert_equal(l:first, bufnr())
+ call assert_equal(l:expected_windows, s:get_windows_count())
+endfunc
+
+" Call :tabdo and create a new split window if all available windows are 'winfixbuf'.
+func Test_tabdo_make_new_window()
+ call s:reset_all_buffers()
+
+ let [l:first, _] = s:make_buffers_list()
+ execute "buffer! " . l:first
+
+ let l:current = win_getid()
+ let l:current_windows = s:get_windows_count()
+
+ tabdo echo ''
+ call assert_notequal(l:current, win_getid())
+ call assert_equal(l:first, bufnr())
+ execute "normal \<C-w>j"
+ call assert_equal(l:first, bufnr())
+ call assert_equal(l:current_windows + 1, s:get_windows_count())
+endfunc
+
+" Fail :tag but :tag! is allowed
+func Test_tag()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ call writefile(["one"], "Xother")
+ edit Xother
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("tag one", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ tag! one
+ call assert_notequal(l:current, bufnr())
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+
+" Fail :tfirst but :tfirst! is allowed
+func Test_tfirst()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ call writefile(["one"], "Xother")
+ edit Xother
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("tfirst", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ tfirst!
+ call assert_notequal(l:current, bufnr())
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Fail :tjump but :tjump! is allowed
+func Test_tjump()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ call writefile(["one"], "Xother")
+ edit Xother
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("tjump one", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ tjump! one
+ call assert_notequal(l:current, bufnr())
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Fail :tlast but :tlast! is allowed
+func Test_tlast()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "one\tXfile\t1",
+ \ "three\tXfile\t3",
+ \ "two\tXfile\t2"],
+ \ "Xtags")
+ call writefile(["one", "two", "three"], "Xfile")
+ edit Xfile
+ tjump one
+ edit Xfile
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("tlast", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ tlast!
+ call assert_equal(l:current, bufnr())
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+endfunc
+
+" Fail :tnext but :tnext! is allowed
+func Test_tnext()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "thesame\tXfile\t1;\"\td\tfile:",
+ \ "thesame\tXfile\t2;\"\td\tfile:",
+ \ "thesame\tXfile\t3;\"\td\tfile:",
+ \ ],
+ \ "Xtags")
+ call writefile(["thesame one", "thesame two", "thesame three"], "Xfile")
+ call writefile(["thesame one"], "Xother")
+ edit Xother
+
+ tag thesame
+ execute "normal \<C-^>"
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("tnext", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ tnext!
+ call assert_notequal(l:current, bufnr())
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Fail :tprevious but :tprevious! is allowed
+func Test_tprevious()
+ call s:reset_all_buffers()
+
+ set tags=Xtags
+ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "thesame\tXfile\t1;\"\td\tfile:",
+ \ "thesame\tXfile\t2;\"\td\tfile:",
+ \ "thesame\tXfile\t3;\"\td\tfile:",
+ \ ],
+ \ "Xtags")
+ call writefile(["thesame one", "thesame two", "thesame three"], "Xfile")
+ call writefile(["thesame one"], "Xother")
+ edit Xother
+
+ tag thesame
+ execute "normal \<C-^>"
+ tnext!
+
+ set winfixbuf
+
+ let l:current = bufnr()
+
+ call assert_fails("tprevious", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ tprevious!
+
+ set tags&
+ call delete("Xtags")
+ call delete("Xfile")
+ call delete("Xother")
+endfunc
+
+" Fail :view but :view! is allowed
+func Test_view()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ call assert_fails("view other", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ view! other
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Fail :visual but :visual! is allowed
+func Test_visual()
+ call s:reset_all_buffers()
+
+ let l:other = s:make_buffer_pairs()
+ let l:current = bufnr()
+
+ call assert_fails("visual other", "E1513:")
+ call assert_equal(l:current, bufnr())
+
+ visual! other
+ call assert_equal(l:other, bufnr())
+endfunc
+
+" Fail :vimgrep but :vimgrep! is allowed
+func Test_vimgrep()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ edit first.unittest
+ call append(0, ["some-search-term"])
+ write
+
+ edit winfix.unittest
+ call append(0, ["some-search-term"])
+ write
+ let l:current = bufnr()
+
+ set winfixbuf
+
+ edit! last.unittest
+ call append(0, ["some-search-term"])
+ write
+ let l:last = bufnr()
+
+ buffer! winfix.unittest
+
+ call assert_fails("vimgrep /some-search-term/ *.unittest")
+ call assert_equal(l:current, bufnr())
+
+ " Don't error and also do swap to the first match because ! was included
+ vimgrep! /some-search-term/ *.unittest
+ call assert_notequal(l:current, bufnr())
+
+ call delete("first.unittest")
+ call delete("winfix.unittest")
+ call delete("last.unittest")
+endfunc
+
+" Fail :vimgrepadd but ::vimgrepadd! is allowed
+func Test_vimgrepadd()
+ CheckFeature quickfix
+ call s:reset_all_buffers()
+
+ edit first.unittest
+ call append(0, ["some-search-term"])
+ write
+
+ edit winfix.unittest
+ call append(0, ["some-search-term"])
+ write
+ let l:current = bufnr()
+
+ set winfixbuf
+
+ edit! last.unittest
+ call append(0, ["some-search-term"])
+ write
+ let l:last = bufnr()
+
+ buffer! winfix.unittest
+
+ call assert_fails("vimgrepadd /some-search-term/ *.unittest")
+ call assert_equal(l:current, bufnr())
+
+ vimgrepadd! /some-search-term/ *.unittest
+ call assert_notequal(l:current, bufnr())
+ call delete("first.unittest")
+ call delete("winfix.unittest")
+ call delete("last.unittest")
+endfunc
+
+" Fail :wNext but :wNext! is allowed
+func Test_wNext()
+ call s:reset_all_buffers()
+
+ let [l:first, _] = s:make_args_list()
+ next!
+
+ call assert_fails("wNext", "E1513:")
+ call assert_notequal(l:first, bufnr())
+
+ wNext!
+ call assert_equal(l:first, bufnr())
+
+ call delete("first")
+ call delete("middle")
+ call delete("last")
+endfunc
+
+" Allow :windo unless `:windo foo` would change a 'winfixbuf' window's buffer
+func Test_windo()
+ call s:reset_all_buffers()
+
+ let l:current_window = win_getid()
+ let l:current_buffer = bufnr()
+ split
+ enew
+ file some_other_buffer
+
+ set winfixbuf
+
+ let l:current = win_getid()
+
+ windo echo ''
+ call assert_equal(l:current_window, win_getid())
+
+ call assert_fails('execute "windo buffer ' . l:current_buffer . '"', "E1513:")
+ call assert_equal(l:current_window, win_getid())
+
+ execute "windo buffer! " . l:current_buffer
+ call assert_equal(l:current_window, win_getid())
+endfunc
+
+" Fail :wnext but :wnext! is allowed
+func Test_wnext()
+ call s:reset_all_buffers()
+
+ let [_, l:last] = s:make_args_list()
+ next!
+
+ call assert_fails("wnext", "E1513:")
+ call assert_notequal(l:last, bufnr())
+
+ wnext!
+ call assert_equal(l:last, bufnr())
+
+ call delete("first")
+ call delete("middle")
+ call delete("last")
+endfunc
+
+" Fail :wprevious but :wprevious! is allowed
+func Test_wprevious()
+ call s:reset_all_buffers()
+
+ let [l:first, _] = s:make_args_list()
+ next!
+
+ call assert_fails("wprevious", "E1513:")
+ call assert_notequal(l:first, bufnr())
+
+ wprevious!
+ call assert_equal(l:first, bufnr())
+
+ call delete("first")
+ call delete("middle")
+ call delete("last")
+endfunc
+
+func Test_quickfix_switchbuf_invalid_prevwin()
+ call s:reset_all_buffers()
+
+ call s:make_simple_quickfix()
+ call assert_equal(1, getqflist(#{idx: 0}).idx)
+
+ set switchbuf=uselast
+ split
+ copen
+ execute winnr('#') 'quit'
+ call assert_equal(2, winnr('$'))
+
+ cnext " Would've triggered a null pointer member access
+ call assert_equal(2, getqflist(#{idx: 0}).idx)
+
+ set switchbuf&
+endfunc
+
+func Test_listdo_goto_prevwin()
+ call s:reset_all_buffers()
+ call s:make_buffers_list()
+
+ new
+ call assert_equal(0, &winfixbuf)
+ wincmd p
+ call assert_equal(1, &winfixbuf)
+ call assert_notequal(bufnr(), bufnr('#'))
+
+ augroup ListDoGotoPrevwin
+ au!
+ au BufLeave * let s:triggered = 1
+ \| call assert_equal(bufnr(), winbufnr(winnr()))
+ augroup END
+ " Should correctly switch to the window without 'winfixbuf', and curbuf should
+ " be consistent with curwin->w_buffer for autocommands.
+ bufdo "
+ call assert_equal(0, &winfixbuf)
+ call assert_equal(1, s:triggered)
+ unlet! s:triggered
+ au! ListDoGotoPrevwin
+
+ set winfixbuf
+ wincmd p
+ call assert_equal(2, winnr('$'))
+ " Both curwin and prevwin have 'winfixbuf' set, so should split a new window
+ " without it set.
+ bufdo "
+ call assert_equal(0, &winfixbuf)
+ call assert_equal(3, winnr('$'))
+
+ quit
+ call assert_equal(2, winnr('$'))
+ call assert_equal(1, &winfixbuf)
+ augroup ListDoGotoPrevwin
+ au!
+ au WinEnter * ++once set winfixbuf
+ augroup END
+ " Same as before, but naughty autocommands set 'winfixbuf' for the new window.
+ " :bufdo should give up in this case.
+ call assert_fails('bufdo "', 'E1513:')
+
+ au! ListDoGotoPrevwin
+ augroup! ListDoGotoPrevwin
+endfunc
+
+func Test_quickfix_changed_split_failed()
+ call s:reset_all_buffers()
+
+ call s:make_simple_quickfix()
+ call assert_equal(1, winnr('$'))
+
+ " Quickfix code will open a split in an attempt to get a 'nowinfixbuf' window
+ " to switch buffers in. Interfere with things by setting 'winfixbuf' in it.
+ augroup QfChanged
+ au!
+ au WinEnter * ++once call assert_equal(2, winnr('$'))
+ \| set winfixbuf | call setqflist([], 'f')
+ augroup END
+ call assert_fails('cnext', ['E1513:', 'E925:'])
+ " Check that the split was automatically closed.
+ call assert_equal(1, winnr('$'))
+
+ au! QfChanged
+ augroup! QfChanged
+endfunc
+
+func Test_bufdo_cnext_splitwin_fails()
+ call s:reset_all_buffers()
+ call s:make_simple_quickfix()
+ call assert_equal(1, getqflist(#{idx: 0}).idx)
+ " Make sure there is not enough room to
+ " split the winfixedbuf window
+ let &winheight=&lines
+ let &winminheight=&lines-2
+ " Still want E1513, or it may not be clear why a split was attempted and why
+ " it failing caused the commands to abort.
+ call assert_fails(':bufdo echo 1', ['E36:', 'E1513:'])
+ call assert_fails(':cnext', ['E36:', 'E1513:'])
+ " Ensure the entry didn't change.
+ call assert_equal(1, getqflist(#{idx: 0}).idx)
+ set winminheight&vim winheight&vim
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testing.c b/src/testing.c
index 1835643..0d731da 100644
--- a/src/testing.c
+++ b/src/testing.c
@@ -1539,7 +1539,7 @@ f_test_gui_event(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
rettv->vval.v_number = test_gui_find_repl(argvars[1].vval.v_dict);
# endif
# ifdef MSWIN
- else if (STRCMP(event, "key") == 0 || STRCMP(event, "mouse") == 0)
+ else if (STRCMP(event, "key") == 0 || STRCMP(event, "mouse") == 0 || STRCMP(event, "set_keycode_trans_strategy") == 0)
rettv->vval.v_number = test_mswin_event(event, argvars[1].vval.v_dict);
# endif
else if (STRCMP(event, "mouse") == 0)
diff --git a/src/textformat.c b/src/textformat.c
index a1a3e16..14acc53 100644
--- a/src/textformat.c
+++ b/src/textformat.c
@@ -90,11 +90,18 @@ internal_format(
colnr_T end_col;
int wcc; // counter for whitespace chars
int did_do_comment = FALSE;
+ int first_pass;
- virtcol = get_nolist_virtcol()
- + char2cells(c != NUL ? c : gchar_cursor());
- if (virtcol <= (colnr_T)textwidth)
- break;
+ // Cursor is currently at the end of line. No need to format
+ // if line length is less than textwidth (8 * textwidth for
+ // utf safety)
+ if (curwin->w_cursor.col < 8 * textwidth)
+ {
+ virtcol = get_nolist_virtcol()
+ + char2cells(c != NUL ? c : gchar_cursor());
+ if (virtcol <= (colnr_T)textwidth)
+ break;
+ }
if (no_leader)
do_comments = FALSE;
@@ -144,9 +151,17 @@ internal_format(
coladvance((colnr_T)textwidth);
wantcol = curwin->w_cursor.col;
- curwin->w_cursor.col = startcol;
+ // If startcol is large (a long line), formatting takes too much
+ // time. The algorithm is O(n^2), it walks from the end of the
+ // line to textwidth border every time for each line break.
+ //
+ // Ceil to 8 * textwidth to optimize.
+ curwin->w_cursor.col = startcol < 8 * textwidth ? startcol :
+ 8 * textwidth;
+
foundcol = 0;
skip_pos = 0;
+ first_pass = TRUE;
// Find position to break at.
// Stop at first entered white when 'formatoptions' has 'v'
@@ -155,8 +170,11 @@ internal_format(
|| curwin->w_cursor.lnum != Insstart.lnum
|| curwin->w_cursor.col >= Insstart.col)
{
- if (curwin->w_cursor.col == startcol && c != NUL)
+ if (first_pass && c != NUL)
+ {
cc = c;
+ first_pass = FALSE;
+ }
else
cc = gchar_cursor();
if (WHITECHAR(cc))
@@ -437,7 +455,7 @@ internal_format(
// Check if cursor is not past the NUL off the line, cindent
// may have added or removed indent.
curwin->w_cursor.col += startcol;
- len = (colnr_T)STRLEN(ml_get_curline());
+ len = ml_get_curline_len();
if (curwin->w_cursor.col > len)
curwin->w_cursor.col = len;
}
@@ -513,9 +531,7 @@ ends_in_white(linenr_T lnum)
if (*s == NUL)
return FALSE;
- // Don't use STRLEN() inside VIM_ISWHITE(), SAS/C complains: "macro
- // invocation may call function multiple times".
- l = STRLEN(s) - 1;
+ l = ml_get_len(lnum) - 1;
return VIM_ISWHITE(s[l]);
}
@@ -555,7 +571,7 @@ same_leader(
return FALSE;
if (*p == COM_START)
{
- int line_len = (int)STRLEN(ml_get(lnum));
+ int line_len = ml_get_len(lnum);
if (line_len <= leader1_len)
return FALSE;
if (leader2_flags == NULL || leader2_len == 0)
@@ -666,7 +682,7 @@ auto_format(
// in 'formatoptions' and there is a single character before the cursor.
// Otherwise the line would be broken and when typing another non-white
// next they are not joined back together.
- wasatend = (pos.col == (colnr_T)STRLEN(old));
+ wasatend = (pos.col == ml_get_curline_len());
if (*old != NUL && !trailblank && wasatend)
{
dec_cursor();
@@ -722,7 +738,7 @@ auto_format(
if (!wasatend && has_format_option(FO_WHITE_PAR))
{
new = ml_get_curline();
- len = (colnr_T)STRLEN(new);
+ len = ml_get_curline_len();
if (curwin->w_cursor.col == len)
{
pnew = vim_strnsave(new, len + 2);
@@ -795,7 +811,7 @@ comp_textwidth(
// The width is the window width minus 'wrapmargin' minus all the
// things that add to the margin.
textwidth = curwin->w_width - curbuf->b_p_wm;
- if (cmdwin_type != 0)
+ if (curbuf == cmdwin_buf)
textwidth -= 1;
#ifdef FEAT_FOLDING
textwidth -= curwin->w_p_fdc;
@@ -1199,7 +1215,7 @@ format_lines(
}
first_par_line = FALSE;
// If the line is getting long, format it next time
- if (STRLEN(ml_get_curline()) > (size_t)max_len)
+ if (ml_get_curline_len() > max_len)
force_format = TRUE;
else
force_format = FALSE;
diff --git a/src/textobject.c b/src/textobject.c
index 015b33b..1890d7c 100644
--- a/src/textobject.c
+++ b/src/textobject.c
@@ -232,7 +232,7 @@ findpar(
// Put the cursor on the last character in the last line and make the
// motion inclusive.
- if ((curwin->w_cursor.col = (colnr_T)STRLEN(line)) != 0)
+ if ((curwin->w_cursor.col = ml_get_len(curr)) != 0)
{
--curwin->w_cursor.col;
curwin->w_cursor.col -=
diff --git a/src/textprop.c b/src/textprop.c
index 168b180..a976570 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -637,7 +637,7 @@ get_text_props(buf_T *buf, linenr_T lnum, char_u **props, int will_change)
// Fetch the line to get the ml_line_len field updated.
text = ml_get_buf(buf, lnum, will_change);
- textlen = STRLEN(text) + 1;
+ textlen = ml_get_buf_len(buf, lnum) + 1;
proplen = buf->b_ml.ml_line_len - textlen;
if (proplen == 0)
return 0;
@@ -758,6 +758,11 @@ text_prop_compare(const void *s1, const void *s2)
tp2 = &text_prop_compare_props[idx2];
col1 = tp1->tp_col;
col2 = tp2->tp_col;
+
+ // property that inserts text has priority over one that doesn't
+ if ((tp1->tp_id < 0) != (tp2->tp_id < 0))
+ return tp1->tp_id < 0 ? 1 : -1;
+
if (col1 == MAXCOL || col2 == MAXCOL)
{
int order1 = text_prop_order(tp1->tp_flags);
@@ -768,10 +773,6 @@ text_prop_compare(const void *s1, const void *s2)
return order1 < order2 ? 1 : -1;
}
- // property that inserts text has priority over one that doesn't
- if ((tp1->tp_id < 0) != (tp2->tp_id < 0))
- return tp1->tp_id < 0 ? 1 : -1;
-
// check highest priority, defined by the type
pt1 = text_prop_type_by_id(text_prop_compare_buf, tp1->tp_type);
pt2 = text_prop_type_by_id(text_prop_compare_buf, tp2->tp_type);
@@ -863,7 +864,7 @@ set_text_props(linenr_T lnum, char_u *props, int len)
int textlen;
text = ml_get(lnum);
- textlen = (int)STRLEN(text) + 1;
+ textlen = ml_get_len(lnum) + 1;
newtext = alloc(textlen + len);
if (newtext == NULL)
return;
@@ -1090,7 +1091,7 @@ f_prop_clear(typval_T *argvars, typval_T *rettv UNUSED)
if (lnum > buf->b_ml.ml_line_count)
break;
text = ml_get_buf(buf, lnum, FALSE);
- len = STRLEN(text) + 1;
+ len = ml_get_buf_len(buf, lnum) + 1;
if ((size_t)buf->b_ml.ml_line_len > len)
{
did_clear = TRUE;
@@ -1220,7 +1221,7 @@ f_prop_find(typval_T *argvars, typval_T *rettv)
while (1)
{
char_u *text = ml_get_buf(buf, lnum, FALSE);
- size_t textlen = STRLEN(text) + 1;
+ size_t textlen = ml_get_buf_len(buf, lnum) + 1;
int count = (int)((buf->b_ml.ml_line_len - textlen)
/ sizeof(textprop_T));
int i;
@@ -1341,7 +1342,7 @@ get_props_in_line(
int add_lnum)
{
char_u *text = ml_get_buf(buf, lnum, FALSE);
- size_t textlen = STRLEN(text) + 1;
+ size_t textlen = ml_get_buf_len(buf, lnum) + 1;
int count;
int i;
textprop_T prop;
@@ -1674,13 +1675,11 @@ f_prop_remove(typval_T *argvars, typval_T *rettv)
end = buf->b_ml.ml_line_count;
for (lnum = start; lnum <= end; ++lnum)
{
- char_u *text;
size_t len;
if (lnum > buf->b_ml.ml_line_count)
break;
- text = ml_get_buf(buf, lnum, FALSE);
- len = STRLEN(text) + 1;
+ len = ml_get_buf_len(buf, lnum) + 1;
if ((size_t)buf->b_ml.ml_line_len > len)
{
static textprop_T textprop; // static because of alignment
diff --git a/src/typval.c b/src/typval.c
index af96b31..62958f6 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -623,6 +623,16 @@ check_for_opt_dict_arg(typval_T *args, int idx)
|| check_for_dict_arg(args, idx) != FAIL) ? OK : FAIL;
}
+/*
+ * Check for an optional non-NULL dict argument at 'idx'
+ */
+ int
+check_for_opt_nonnull_dict_arg(typval_T *args, int idx)
+{
+ return (args[idx].v_type == VAR_UNKNOWN
+ || check_for_nonnull_dict_arg(args, idx) != FAIL) ? OK : FAIL;
+}
+
#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
/*
* Give an error and return FAIL unless "args[idx]" is a channel or a job.
diff --git a/src/undo.c b/src/undo.c
index b2c4e9a..1cd8912 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -123,6 +123,7 @@ static void serialize_visualinfo(bufinfo_T *bi, visualinfo_T *info);
static void unserialize_visualinfo(bufinfo_T *bi, visualinfo_T *info);
#endif
static void u_saveline(linenr_T lnum);
+static void u_blockfree(buf_T *buf);
#define U_ALLOC_LINE(size) lalloc(size, FALSE)
@@ -3472,7 +3473,7 @@ u_freeentry(u_entry_T *uep, long n)
/*
* invalidate the undo buffer; called when storage has already been released
*/
- void
+ static void
u_clearall(buf_T *buf)
{
buf->b_u_newhead = buf->b_u_oldhead = buf->b_u_curhead = NULL;
@@ -3484,6 +3485,30 @@ u_clearall(buf_T *buf)
}
/*
+ * Free all allocated memory blocks for the buffer 'buf'.
+ */
+ static void
+u_blockfree(buf_T *buf)
+{
+ while (buf->b_u_oldhead != NULL)
+ u_freeheader(buf, buf->b_u_oldhead, NULL);
+ vim_free(buf->b_u_line_ptr.ul_line);
+}
+
+/*
+ * Free all allocated memory blocks for the buffer 'buf'.
+ * and invalidate the undo buffer
+ */
+ void
+u_clearallandblockfree(buf_T *buf)
+{
+ u_blockfree(buf);
+ u_clearall(buf);
+}
+
+
+
+/*
* Save the line "lnum" for the "U" command.
*/
static void
@@ -3563,17 +3588,6 @@ u_undoline(void)
}
/*
- * Free all allocated memory blocks for the buffer 'buf'.
- */
- void
-u_blockfree(buf_T *buf)
-{
- while (buf->b_u_oldhead != NULL)
- u_freeheader(buf, buf->b_u_oldhead, NULL);
- vim_free(buf->b_u_line_ptr.ul_line);
-}
-
-/*
* Check if the 'modified' flag is set, or 'ff' has changed (only need to
* check the first character, because it can only be "dos", "unix" or "mac").
* "nofile" and "scratch" type buffers are considered to always be unchanged.
diff --git a/src/userfunc.c b/src/userfunc.c
index 64761ec..ce144a3 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -4459,12 +4459,13 @@ trans_function_name_ext(
}
}
// The function name must start with an upper case letter (unless it is a
- // Vim9 class new() function or a Vim9 class private method)
+ // Vim9 class new() function or a Vim9 class private method or one of the
+ // supported Vim9 object builtin functions)
else if (!(flags & TFN_INT)
&& (builtin_function(lv.ll_name, len)
|| (vim9script && *lv.ll_name == '_'))
&& !((flags & TFN_IN_CLASS)
- && (STRNCMP(lv.ll_name, "new", 3) == 0
+ && (is_valid_builtin_obj_methodname(lv.ll_name)
|| (*lv.ll_name == '_'))))
{
semsg(_(vim9script ? e_function_name_must_start_with_capital_str
@@ -4976,7 +4977,10 @@ define_function(
: eval_isnamec(name_base[i])); ++i)
;
if (name_base[i] != NUL)
+ {
emsg_funcname(e_invalid_argument_str, arg);
+ goto ret_free;
+ }
// In Vim9 script a function cannot have the same name as a
// variable.
@@ -5546,6 +5550,60 @@ find_func_by_name(char_u *name, compiletype_T *compile_type)
}
/*
+ * Compile the :def function "ufunc". If "cl" is not NULL, then compile the
+ * class or object method "ufunc" in "cl".
+ */
+ void
+defcompile_function(ufunc_T *ufunc, class_T *cl)
+{
+ compiletype_T compile_type = CT_NONE;
+
+ if (func_needs_compiling(ufunc, compile_type))
+ (void)compile_def_function(ufunc, FALSE, compile_type, NULL);
+ else
+ smsg(_("Function %s%s%s does not need compiling"),
+ cl != NULL ? cl->class_name : (char_u *)"",
+ cl != NULL ? (char_u *)"." : (char_u *)"",
+ ufunc->uf_name);
+}
+
+/*
+ * Compile all the :def functions defined in the current script
+ */
+ static void
+defcompile_funcs_in_script(void)
+{
+ long todo = (long)func_hashtab.ht_used;
+ int changed = func_hashtab.ht_changed;
+ hashitem_T *hi;
+
+ for (hi = func_hashtab.ht_array; todo > 0 && !got_int; ++hi)
+ {
+ if (!HASHITEM_EMPTY(hi))
+ {
+ --todo;
+ ufunc_T *ufunc = HI2UF(hi);
+ if (ufunc->uf_script_ctx.sc_sid == current_sctx.sc_sid
+ && ufunc->uf_def_status == UF_TO_BE_COMPILED
+ && (ufunc->uf_flags & FC_DEAD) == 0)
+ {
+ (void)compile_def_function(ufunc, FALSE, CT_NONE, NULL);
+
+ if (func_hashtab.ht_changed != changed)
+ {
+ // a function has been added or removed, need to start
+ // over
+ todo = (long)func_hashtab.ht_used;
+ changed = func_hashtab.ht_changed;
+ hi = func_hashtab.ht_array;
+ --hi;
+ }
+ }
+ }
+ }
+}
+
+/*
* :defcompile - compile all :def functions in the current script that need to
* be compiled or the one specified by the argument.
* Skips dead functions. Doesn't do profiling.
@@ -5555,46 +5613,29 @@ ex_defcompile(exarg_T *eap)
{
if (*eap->arg != NUL)
{
- compiletype_T compile_type = CT_NONE;
- ufunc_T *ufunc = find_func_by_name(eap->arg, &compile_type);
- if (ufunc != NULL)
+ typval_T tv;
+
+ if (is_class_name(eap->arg, &tv))
{
- if (func_needs_compiling(ufunc, compile_type))
- (void)compile_def_function(ufunc, FALSE, compile_type, NULL);
- else
- smsg(_("Function %s does not need compiling"), eap->arg);
+ class_T *cl = tv.vval.v_class;
+
+ if (cl != NULL)
+ defcompile_class(cl);
+ }
+ else
+ {
+ compiletype_T compile_type = CT_NONE;
+ ufunc_T *ufunc = find_func_by_name(eap->arg, &compile_type);
+ if (ufunc != NULL)
+ defcompile_function(ufunc, NULL);
}
}
else
{
- long todo = (long)func_hashtab.ht_used;
- int changed = func_hashtab.ht_changed;
- hashitem_T *hi;
-
- for (hi = func_hashtab.ht_array; todo > 0 && !got_int; ++hi)
- {
- if (!HASHITEM_EMPTY(hi))
- {
- --todo;
- ufunc_T *ufunc = HI2UF(hi);
- if (ufunc->uf_script_ctx.sc_sid == current_sctx.sc_sid
- && ufunc->uf_def_status == UF_TO_BE_COMPILED
- && (ufunc->uf_flags & FC_DEAD) == 0)
- {
- (void)compile_def_function(ufunc, FALSE, CT_NONE, NULL);
+ defcompile_funcs_in_script();
- if (func_hashtab.ht_changed != changed)
- {
- // a function has been added or removed, need to start
- // over
- todo = (long)func_hashtab.ht_used;
- changed = func_hashtab.ht_changed;
- hi = func_hashtab.ht_array;
- --hi;
- }
- }
- }
- }
+ // compile all the class defined in the current script
+ defcompile_classes_in_script();
}
}
diff --git a/src/version.c b/src/version.c
index 2e178f3..32037e3 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,372 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 199,
+/**/
+ 198,
+/**/
+ 197,
+/**/
+ 196,
+/**/
+ 195,
+/**/
+ 194,
+/**/
+ 193,
+/**/
+ 192,
+/**/
+ 191,
+/**/
+ 190,
+/**/
+ 189,
+/**/
+ 188,
+/**/
+ 187,
+/**/
+ 186,
+/**/
+ 185,
+/**/
+ 184,
+/**/
+ 183,
+/**/
+ 182,
+/**/
+ 181,
+/**/
+ 180,
+/**/
+ 179,
+/**/
+ 178,
+/**/
+ 177,
+/**/
+ 176,
+/**/
+ 175,
+/**/
+ 174,
+/**/
+ 173,
+/**/
+ 172,
+/**/
+ 171,
+/**/
+ 170,
+/**/
+ 169,
+/**/
+ 168,
+/**/
+ 167,
+/**/
+ 166,
+/**/
+ 165,
+/**/
+ 164,
+/**/
+ 163,
+/**/
+ 162,
+/**/
+ 161,
+/**/
+ 160,
+/**/
+ 159,
+/**/
+ 158,
+/**/
+ 157,
+/**/
+ 156,
+/**/
+ 155,
+/**/
+ 154,
+/**/
+ 153,
+/**/
+ 152,
+/**/
+ 151,
+/**/
+ 150,
+/**/
+ 149,
+/**/
+ 148,
+/**/
+ 147,
+/**/
+ 146,
+/**/
+ 145,
+/**/
+ 144,
+/**/
+ 143,
+/**/
+ 142,
+/**/
+ 141,
+/**/
+ 140,
+/**/
+ 139,
+/**/
+ 138,
+/**/
+ 137,
+/**/
+ 136,
+/**/
+ 135,
+/**/
+ 134,
+/**/
+ 133,
+/**/
+ 132,
+/**/
+ 131,
+/**/
+ 130,
+/**/
+ 129,
+/**/
+ 128,
+/**/
+ 127,
+/**/
+ 126,
+/**/
+ 125,
+/**/
+ 124,
+/**/
+ 123,
+/**/
+ 122,
+/**/
+ 121,
+/**/
+ 120,
+/**/
+ 119,
+/**/
+ 118,
+/**/
+ 117,
+/**/
+ 116,
+/**/
+ 115,
+/**/
+ 114,
+/**/
+ 113,
+/**/
+ 112,
+/**/
+ 111,
+/**/
+ 110,
+/**/
+ 109,
+/**/
+ 108,
+/**/
+ 107,
+/**/
+ 106,
+/**/
+ 105,
+/**/
+ 104,
+/**/
+ 103,
+/**/
+ 102,
+/**/
+ 101,
+/**/
+ 100,
+/**/
+ 99,
+/**/
+ 98,
+/**/
+ 97,
+/**/
+ 96,
+/**/
+ 95,
+/**/
+ 94,
+/**/
+ 93,
+/**/
+ 92,
+/**/
+ 91,
+/**/
+ 90,
+/**/
+ 89,
+/**/
+ 88,
+/**/
+ 87,
+/**/
+ 86,
+/**/
+ 85,
+/**/
+ 84,
+/**/
+ 83,
+/**/
+ 82,
+/**/
+ 81,
+/**/
+ 80,
+/**/
+ 79,
+/**/
+ 78,
+/**/
+ 77,
+/**/
+ 76,
+/**/
+ 75,
+/**/
+ 74,
+/**/
+ 73,
+/**/
+ 72,
+/**/
+ 71,
+/**/
+ 70,
+/**/
+ 69,
+/**/
+ 68,
+/**/
+ 67,
+/**/
+ 66,
+/**/
+ 65,
+/**/
+ 64,
+/**/
+ 63,
+/**/
+ 62,
+/**/
+ 61,
+/**/
+ 60,
+/**/
+ 59,
+/**/
+ 58,
+/**/
+ 57,
+/**/
+ 56,
+/**/
+ 55,
+/**/
+ 54,
+/**/
+ 53,
+/**/
+ 52,
+/**/
+ 51,
+/**/
+ 50,
+/**/
+ 49,
+/**/
+ 48,
+/**/
+ 47,
+/**/
+ 46,
+/**/
+ 45,
+/**/
+ 44,
+/**/
+ 43,
+/**/
+ 42,
+/**/
+ 41,
+/**/
+ 40,
+/**/
+ 39,
+/**/
+ 38,
+/**/
+ 37,
+/**/
+ 36,
+/**/
+ 35,
+/**/
+ 34,
+/**/
+ 33,
+/**/
+ 32,
+/**/
+ 31,
+/**/
+ 30,
+/**/
+ 29,
+/**/
+ 28,
+/**/
+ 27,
+/**/
+ 26,
+/**/
+ 25,
+/**/
+ 24,
+/**/
+ 23,
+/**/
+ 22,
+/**/
+ 21,
+/**/
+ 20,
+/**/
+ 19,
+/**/
+ 18,
+/**/
+ 17,
+/**/
16,
/**/
15,
diff --git a/src/vim.h b/src/vim.h
index e41dfef..85d92d5 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -627,6 +627,7 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring);
// flags for screen_line()
#define SLF_RIGHTLEFT 1
#define SLF_POPUP 2
+#define SLF_INC_VCOL 4
#define MB_FILLER_CHAR '<' // character used when a double-width character
// doesn't fit.
@@ -1255,6 +1256,7 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring);
#define WSP_BELOW 0x40 // put new window below/right
#define WSP_ABOVE 0x80 // put new window above/left
#define WSP_NEWLOC 0x100 // don't copy location list
+#define WSP_FORCE_ROOM 0x200 // ignore "not enough room" errors
/*
* arguments for gui_set_shellsize()
@@ -1422,6 +1424,7 @@ enum auto_event
EVENT_TERMINALWINOPEN, // after a terminal buffer was created and
// entering its window
EVENT_TERMRESPONSE, // after setting "v:termresponse"
+ EVENT_TERMRESPONSEALL, // after setting terminal response vars
EVENT_TEXTCHANGED, // text was modified not in Insert mode
EVENT_TEXTCHANGEDI, // text was modified in Insert mode
EVENT_TEXTCHANGEDP, // TextChangedI with popup menu visible
@@ -1434,7 +1437,8 @@ enum auto_event
EVENT_VIMRESIZED, // after Vim window was resized
EVENT_WINENTER, // after entering a window
EVENT_WINLEAVE, // before leaving a window
- EVENT_WINNEW, // when entering a new window
+ EVENT_WINNEWPRE, // before creating a new window
+ EVENT_WINNEW, // after creating a new window
EVENT_WINCLOSED, // after closing a window
EVENT_VIMSUSPEND, // before Vim is suspended
EVENT_VIMRESUME, // after Vim is resumed
@@ -2377,6 +2381,7 @@ typedef int (*opt_expand_cb_T)(optexpand_T *args, int *numMatches, char_u ***mat
#define ASSIGN_FOR_LOOP 0x40 // assigning to loop variable
#define ASSIGN_INIT 0x80 // not assigning a value, just a declaration
#define ASSIGN_UPDATE_BLOCK_ID 0x100 // update sav_block_id
+#define ASSIGN_COMPOUND_OP 0x200 // compound operator e.g. "+="
#include "ex_cmds.h" // Ex command defines
#include "spell.h" // spell checking stuff
diff --git a/src/vim9class.c b/src/vim9class.c
index e5d9aeb..7227c3d 100644
--- a/src/vim9class.c
+++ b/src/vim9class.c
@@ -208,7 +208,7 @@ add_member(
* "parent_count" is the number of members in the parent class
* "members" will be set to the newly allocated array of members and
* "member_count" set to the number of members.
- * Returns OK or FAIL.
+ * Returns OK on success and FAIL on memory allocation failure.
*/
static int
add_members_to_class(
@@ -301,6 +301,7 @@ object_index_from_itf_index(class_T *itf, int is_method, int idx, class_T *cl)
*/
static int
validate_extends_class(
+ class_T *cl,
char_u *extends_name,
class_T **extends_clp,
int is_class)
@@ -308,6 +309,12 @@ validate_extends_class(
typval_T tv;
int success = FALSE;
+ if (STRCMP(cl->class_name, extends_name) == 0)
+ {
+ semsg(_(e_cannot_extend_str), extends_name);
+ return success;
+ }
+
tv.v_type = VAR_UNKNOWN;
if (eval_variable_import(extends_name, &tv) == FAIL)
{
@@ -974,6 +981,100 @@ is_valid_constructor(ufunc_T *uf, int is_abstract, int has_static)
}
/*
+ * Returns TRUE if 'uf' is a supported builtin method and has the correct
+ * method signature.
+ */
+ static int
+object_check_builtin_method_sig(ufunc_T *uf)
+{
+ char_u *name = uf->uf_name;
+ int valid = FALSE;
+ type_T method_sig;
+ type_T method_rt;
+ where_T where = WHERE_INIT;
+
+ // validate the method signature
+ CLEAR_FIELD(method_sig);
+ CLEAR_FIELD(method_rt);
+ method_sig.tt_type = VAR_FUNC;
+
+ if (STRCMP(name, "len") == 0)
+ {
+ // def __len(): number
+ method_rt.tt_type = VAR_NUMBER;
+ method_sig.tt_member = &method_rt;
+ valid = TRUE;
+ }
+ else if (STRCMP(name, "empty") == 0)
+ {
+ // def __empty(): bool
+ method_rt.tt_type = VAR_BOOL;
+ method_sig.tt_member = &method_rt;
+ valid = TRUE;
+ }
+ else if (STRCMP(name, "string") == 0)
+ {
+ // def __string(): string
+ method_rt.tt_type = VAR_STRING;
+ method_sig.tt_member = &method_rt;
+ valid = TRUE;
+ }
+ else
+ semsg(_(e_builtin_object_method_str_not_supported), uf->uf_name);
+
+ where.wt_func_name = (char *)uf->uf_name;
+ where.wt_kind = WT_METHOD;
+ if (valid && !check_type(&method_sig, uf->uf_func_type, TRUE, where))
+ valid = FALSE;
+
+ return valid;
+}
+
+/*
+ * Returns TRUE if "funcname" is a supported builtin object method name
+ */
+ int
+is_valid_builtin_obj_methodname(char_u *funcname)
+{
+ switch (funcname[0])
+ {
+ case 'e':
+ return STRNCMP(funcname, "empty", 5) == 0;
+
+ case 'l':
+ return STRNCMP(funcname, "len", 3) == 0;
+
+ case 'n':
+ return STRNCMP(funcname, "new", 3) == 0;
+
+ case 's':
+ return STRNCMP(funcname, "string", 6) == 0;
+ }
+
+ return FALSE;
+}
+
+
+/*
+ * Returns the builtin method "name" in object "obj". Returns NULL if the
+ * method is not found.
+ */
+ ufunc_T *
+class_get_builtin_method(
+ class_T *cl,
+ class_builtin_T builtin_method,
+ int *method_idx)
+{
+ *method_idx = -1;
+
+ if (cl == NULL)
+ return NULL;
+
+ *method_idx = cl->class_builtin_methods[builtin_method];
+ return *method_idx != -1 ? cl->class_obj_methods[*method_idx] : NULL;
+}
+
+/*
* Update the interface class lookup table for the member index on the
* interface to the member index in the class implementing the interface.
* And a lookup table for the object method index on the interface
@@ -1327,6 +1428,33 @@ add_classfuncs_objmethods(
}
/*
+ * Update the index of object methods called by builtin functions.
+ */
+ static void
+update_builtin_method_index(class_T *cl)
+{
+ int i;
+
+ for (i = 0; i < CLASS_BUILTIN_MAX; i++)
+ cl->class_builtin_methods[i] = -1;
+
+ for (i = 0; i < cl->class_obj_method_count; i++)
+ {
+ ufunc_T *uf = cl->class_obj_methods[i];
+
+ if (cl->class_builtin_methods[CLASS_BUILTIN_STRING] == -1
+ && STRCMP(uf->uf_name, "string") == 0)
+ cl->class_builtin_methods[CLASS_BUILTIN_STRING] = i;
+ else if (cl->class_builtin_methods[CLASS_BUILTIN_EMPTY] == -1 &&
+ STRCMP(uf->uf_name, "empty") == 0)
+ cl->class_builtin_methods[CLASS_BUILTIN_EMPTY] = i;
+ else if (cl->class_builtin_methods[CLASS_BUILTIN_LEN] == -1 &&
+ STRCMP(uf->uf_name, "len") == 0)
+ cl->class_builtin_methods[CLASS_BUILTIN_LEN] = i;
+ }
+}
+
+/*
* Return the end of the class name starting at "arg". Valid characters in a
* class name are alphanumeric characters and "_". Also handles imported class
* names.
@@ -1521,6 +1649,36 @@ early_ret:
garray_T objmethods;
ga_init2(&objmethods, sizeof(ufunc_T *), 10);
+ class_T *cl = NULL;
+ class_T *extends_cl = NULL; // class from "extends" argument
+ class_T **intf_classes = NULL;
+
+ cl = ALLOC_CLEAR_ONE(class_T);
+ if (cl == NULL)
+ goto cleanup;
+ if (!is_class)
+ cl->class_flags = CLASS_INTERFACE;
+ else if (is_abstract)
+ cl->class_flags = CLASS_ABSTRACT;
+
+ cl->class_refcount = 1;
+ cl->class_name = vim_strnsave(name_start, name_end - name_start);
+ if (cl->class_name == NULL)
+ goto cleanup;
+
+ // Add the class to the script-local variables.
+ // TODO: handle other context, e.g. in a function
+ // TODO: does uf_hash need to be cleared?
+ typval_T tv;
+ tv.v_type = VAR_CLASS;
+ tv.vval.v_class = cl;
+ is_export = class_export;
+ SOURCING_LNUM = start_lnum;
+ int rc = set_var_const(cl->class_name, current_sctx.sc_sid,
+ NULL, &tv, FALSE, 0, 0);
+ if (rc == FAIL)
+ goto cleanup;
+
/*
* Go over the body of the class/interface until "endclass" or
* "endinterface" is found.
@@ -1721,13 +1879,10 @@ early_ret:
&varname_end, &has_type, &type_list, &type,
is_class ? &init_expr: NULL) == FAIL)
break;
- if (is_reserved_varname(varname, varname_end))
- {
- vim_free(init_expr);
- break;
- }
- if (is_duplicate_variable(&classmembers, &objmembers, varname,
- varname_end))
+
+ if (is_reserved_varname(varname, varname_end)
+ || is_duplicate_variable(&classmembers, &objmembers,
+ varname, varname_end))
{
vim_free(init_expr);
break;
@@ -1758,6 +1913,7 @@ early_ret:
{
exarg_T ea;
garray_T lines_to_free;
+ int is_new = STRNCMP(p, "new", 3) == 0;
if (has_public)
{
@@ -1774,12 +1930,17 @@ early_ret:
break;
}
- if (*p == '_' && *(p + 1) == '_')
+ if (!is_class && *p == '_')
{
- // double underscore prefix for a method name is currently
- // reserved. This could be used in the future to support
- // object methods called by Vim builtin functions.
- semsg(_(e_cannot_use_reserved_name_str), p);
+ // private methods are not supported in an interface
+ semsg(_(e_protected_method_not_supported_in_interface), p);
+ break;
+ }
+
+ if (has_static && !is_new && SAFE_islower(*p) &&
+ is_valid_builtin_obj_methodname(p))
+ {
+ semsg(_(e_builtin_class_method_not_supported), p);
break;
}
@@ -1803,9 +1964,9 @@ early_ret:
if (uf != NULL)
{
char_u *name = uf->uf_name;
- int is_new = STRNCMP(name, "new", 3) == 0;
- if (!is_class && *name == '_')
+ if (is_new && !is_valid_constructor(uf, is_abstract,
+ has_static))
{
// private variables are not supported in an interface
semsg(_(e_protected_method_not_supported_in_interface),
@@ -1813,8 +1974,10 @@ early_ret:
func_clear_free(uf, FALSE);
break;
}
- if (is_new && !is_valid_constructor(uf, is_abstract,
- has_static))
+
+ // check for builtin method
+ if (!is_new && SAFE_islower(*name) &&
+ !object_check_builtin_method_sig(uf))
{
func_clear_free(uf, FALSE);
break;
@@ -1855,15 +2018,13 @@ early_ret:
}
vim_free(theline);
- class_T *extends_cl = NULL; // class from "extends" argument
-
/*
* Check a few things before defining the class.
*/
// Check the "extends" class is valid.
if (success && extends != NULL)
- success = validate_extends_class(extends, &extends_cl, is_class);
+ success = validate_extends_class(cl, extends, &extends_cl, is_class);
VIM_CLEAR(extends);
// Check the new object methods to make sure their access (public or
@@ -1890,8 +2051,6 @@ early_ret:
success = validate_abstract_class_methods(&classfunctions,
&objmethods, extends_cl);
- class_T **intf_classes = NULL;
-
// Check all "implements" entries are valid.
if (success && ga_impl.ga_len > 0)
{
@@ -1906,24 +2065,10 @@ early_ret:
success = check_func_arg_names(&classfunctions, &objmethods,
&classmembers);
- class_T *cl = NULL;
if (success)
{
// "endclass" encountered without failures: Create the class.
- cl = ALLOC_CLEAR_ONE(class_T);
- if (cl == NULL)
- goto cleanup;
- if (!is_class)
- cl->class_flags = CLASS_INTERFACE;
- else if (is_abstract)
- cl->class_flags = CLASS_ABSTRACT;
-
- cl->class_refcount = 1;
- cl->class_name = vim_strnsave(name_start, name_end - name_start);
- if (cl->class_name == NULL)
- goto cleanup;
-
if (extends_cl != NULL)
{
cl->class_extends = extends_cl;
@@ -1997,6 +2142,8 @@ early_ret:
&objmethods) == FAIL)
goto cleanup;
+ update_builtin_method_index(cl);
+
cl->class_type.tt_type = VAR_CLASS;
cl->class_type.tt_class = cl;
cl->class_object_type.tt_type = VAR_OBJECT;
@@ -2008,41 +2155,10 @@ early_ret:
// TODO:
// - Fill hashtab with object members and methods ?
- // Add the class to the script-local variables.
- // TODO: handle other context, e.g. in a function
- // TODO: does uf_hash need to be cleared?
- typval_T tv;
- tv.v_type = VAR_CLASS;
- tv.vval.v_class = cl;
- is_export = class_export;
- SOURCING_LNUM = start_lnum;
- set_var_const(cl->class_name, current_sctx.sc_sid,
- NULL, &tv, FALSE, 0, 0);
return;
}
cleanup:
- if (cl != NULL)
- {
- vim_free(cl->class_name);
- vim_free(cl->class_class_functions);
- if (cl->class_interfaces != NULL)
- {
- for (int i = 0; i < cl->class_interface_count; ++i)
- vim_free(cl->class_interfaces[i]);
- vim_free(cl->class_interfaces);
- }
- if (cl->class_interfaces_cl != NULL)
- {
- for (int i = 0; i < cl->class_interface_count; ++i)
- class_unref(cl->class_interfaces_cl[i]);
- vim_free(cl->class_interfaces_cl);
- }
- vim_free(cl->class_obj_members);
- vim_free(cl->class_obj_methods);
- vim_free(cl);
- }
-
vim_free(extends);
class_unref(extends_cl);
@@ -3225,6 +3341,173 @@ member_not_found_msg(class_T *cl, vartype_T v_type, char_u *name, size_t len)
}
/*
+ * Compile all the class and object methods in "cl".
+ */
+ void
+defcompile_class(class_T *cl)
+{
+ for (int loop = 1; loop <= 2; ++loop)
+ {
+ int func_count = loop == 1 ? cl->class_class_function_count
+ : cl->class_obj_method_count;
+ for (int i = 0; i < func_count; i++)
+ {
+ ufunc_T *ufunc = loop == 1 ? cl->class_class_functions[i]
+ : cl->class_obj_methods[i];
+ defcompile_function(ufunc, cl);
+ }
+ }
+}
+
+/*
+ * Compile all the classes defined in the current script
+ */
+ void
+defcompile_classes_in_script(void)
+{
+ for (class_T *cl = first_class; cl != NULL; cl = cl->class_next_used)
+ {
+ if (eval_variable(cl->class_name, 0, 0, NULL, NULL,
+ EVAL_VAR_NOAUTOLOAD | EVAL_VAR_NO_FUNC) != FAIL)
+ defcompile_class(cl);
+ }
+}
+
+/*
+ * Returns TRUE if "name" is the name of a class. The typval for the class is
+ * returned in "rettv".
+ */
+ int
+is_class_name(char_u *name, typval_T *rettv)
+{
+ rettv->v_type = VAR_UNKNOWN;
+
+ if (eval_variable(name, 0, 0, rettv, NULL, EVAL_VAR_NOAUTOLOAD |
+ EVAL_VAR_NO_FUNC) != FAIL)
+ return rettv->v_type == VAR_CLASS;
+ return FALSE;
+}
+
+/*
+ * Calls the object builtin method "name" with arguments "argv". The value
+ * returned by the builtin method is in "rettv". Returns OK or FAIL.
+ */
+ static int
+object_call_builtin_method(
+ object_T *obj,
+ class_builtin_T builtin_method,
+ int argc,
+ typval_T *argv,
+ typval_T *rettv)
+{
+ ufunc_T *uf;
+ int midx;
+
+ if (obj == NULL)
+ return FAIL;
+
+ uf = class_get_builtin_method(obj->obj_class, builtin_method, &midx);
+ if (uf == NULL)
+ return FAIL;
+
+ funccall_T *fc = create_funccal(uf, rettv);
+ int r;
+
+ if (fc == NULL)
+ return FAIL;
+
+ ++obj->obj_refcount;
+
+ r = call_def_function(uf, argc, argv, 0, NULL, obj, fc, rettv);
+
+ remove_funccal();
+
+ return r;
+}
+
+/*
+ * Calls the object "empty()" method and returns the method retun value. In
+ * case of an error, returns TRUE.
+ */
+ int
+object_empty(object_T *obj)
+{
+ typval_T rettv;
+
+ if (object_call_builtin_method(obj, CLASS_BUILTIN_EMPTY, 0, NULL, &rettv)
+ == FAIL)
+ return TRUE;
+
+ return tv_get_bool(&rettv);
+}
+
+/*
+ * Use the object "len()" method to get an object length. Returns 0 if the
+ * method is not found or there is an error.
+ */
+ int
+object_len(object_T *obj)
+{
+ typval_T rettv;
+
+ if (object_call_builtin_method(obj, CLASS_BUILTIN_LEN, 0, NULL, &rettv)
+ == FAIL)
+ return 0;
+
+ return tv_to_number(&rettv);
+}
+
+/*
+ * Return a textual representation of object "obj"
+ */
+ char_u *
+object_string(
+ object_T *obj,
+ char_u *numbuf,
+ int copyID,
+ int echo_style,
+ int restore_copyID,
+ int composite_val)
+{
+ typval_T rettv;
+
+ if (object_call_builtin_method(obj, CLASS_BUILTIN_STRING, 0, NULL, &rettv)
+ == OK
+ && rettv.vval.v_string != NULL)
+ return rettv.vval.v_string;
+ else
+ {
+ garray_T ga;
+ ga_init2(&ga, 1, 50);
+
+ ga_concat(&ga, (char_u *)"object of ");
+ class_T *cl = obj == NULL ? NULL : obj->obj_class;
+ ga_concat(&ga, cl == NULL ? (char_u *)"[unknown]"
+ : cl->class_name);
+ if (cl != NULL)
+ {
+ ga_concat(&ga, (char_u *)" {");
+ for (int i = 0; i < cl->class_obj_member_count; ++i)
+ {
+ if (i > 0)
+ ga_concat(&ga, (char_u *)", ");
+ ocmember_T *m = &cl->class_obj_members[i];
+ ga_concat(&ga, m->ocm_name);
+ ga_concat(&ga, (char_u *)": ");
+ char_u *tf = NULL;
+ ga_concat(&ga, echo_string_core(
+ (typval_T *)(obj + 1) + i,
+ &tf, numbuf, copyID, echo_style,
+ restore_copyID, composite_val));
+ vim_free(tf);
+ }
+ ga_concat(&ga, (char_u *)"}");
+ }
+ return ga.ga_data;
+ }
+}
+
+/*
* Return TRUE when the class "cl", its base class or one of the implemented
* interfaces matches the class "other_cl".
*/
diff --git a/src/vim9compile.c b/src/vim9compile.c
index d6faa7b..8f67d8a 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -2285,7 +2285,17 @@ compile_load_lhs_with_index(lhs_T *lhs, char_u *var_start, cctx_T *cctx)
if (dot - var_start == 4 && STRNCMP(var_start, "this", 4) == 0)
{
// load "this"
- if (generate_LOAD(cctx, ISN_LOAD, 0, NULL, lhs->lhs_type) == FAIL)
+ lvar_T *lvar = lhs->lhs_lvar;
+ int rc;
+
+ if (lvar->lv_from_outer > 0)
+ rc = generate_LOADOUTER(cctx, lvar->lv_idx,
+ lvar->lv_from_outer, lvar->lv_loop_depth,
+ lvar->lv_loop_idx, type);
+ else
+ rc = generate_LOAD(cctx, ISN_LOAD, lvar->lv_idx, NULL, type);
+
+ if (rc == FAIL)
return FAIL;
}
else
diff --git a/src/vim9expr.c b/src/vim9expr.c
index 38a65d4..9d67aea 100644
--- a/src/vim9expr.c
+++ b/src/vim9expr.c
@@ -1014,6 +1014,32 @@ failret:
}
/*
+ * Compile a builtin method call of an object (e.g. string(), len(), empty(),
+ * etc.) if the class implements it.
+ */
+ static int
+compile_builtin_method_call(cctx_T *cctx, class_builtin_T builtin_method)
+{
+ type_T *type = get_decl_type_on_stack(cctx, 0);
+ int res = FAIL;
+
+ // If the built in function is invoked on an object and the class
+ // implements the corresponding built in method, then invoke the object
+ // method.
+ if (type->tt_type == VAR_OBJECT)
+ {
+ int method_idx;
+ ufunc_T *uf = class_get_builtin_method(type->tt_class, builtin_method,
+ &method_idx);
+ if (uf != NULL)
+ res = generate_CALL(cctx, uf, type->tt_class, method_idx, 0);
+ }
+
+ return res;
+}
+
+
+/*
* Compile a function call: name(arg1, arg2)
* "arg" points to "name", "arg + varlen" to the "(".
* "argcount_init" is 1 for "value->method()"
@@ -1170,6 +1196,20 @@ compile_call(
idx = -1;
}
+ class_builtin_T builtin_method = CLASS_BUILTIN_INVALID;
+ if (STRCMP(name, "string") == 0)
+ builtin_method = CLASS_BUILTIN_STRING;
+ else if (STRCMP(name, "empty") == 0)
+ builtin_method = CLASS_BUILTIN_EMPTY;
+ else if (STRCMP(name, "len") == 0)
+ builtin_method = CLASS_BUILTIN_LEN;
+ if (builtin_method != CLASS_BUILTIN_INVALID)
+ {
+ res = compile_builtin_method_call(cctx, builtin_method);
+ if (res == OK)
+ idx = -1;
+ }
+
if (idx >= 0)
res = generate_BCALL(cctx, idx, argcount, argcount_init == 1);
}
@@ -2739,7 +2779,7 @@ compile_expr9(
if (compile_subscript(arg, cctx, start_leader, &end_leader,
ppconst) == FAIL)
return FAIL;
- if (ppconst->pp_used > 0)
+ if ((ppconst->pp_used > 0) && (cctx->ctx_skip != SKIP_YES))
{
// apply the '!', '-' and '+' before the constant
rettv = &ppconst->pp_tv[ppconst->pp_used - 1];
diff --git a/src/window.c b/src/window.c
index 54e17be..9ffca77 100644
--- a/src/window.c
+++ b/src/window.c
@@ -17,8 +17,8 @@ static void frame_setheight(frame_T *curfrp, int height);
static void frame_setwidth(frame_T *curfrp, int width);
static void win_exchange(long);
static void win_rotate(int, int);
-static void win_totop(int size, int flags);
static void win_equal_rec(win_T *next_curwin, int current, frame_T *topfr, int dir, int col, int row, int width, int height);
+static void trigger_winnewpre(void);
static void trigger_winclosed(win_T *win);
static win_T *win_free_mem(win_T *win, int *dirp, tabpage_T *tp);
static frame_T *win_altframe(win_T *win, tabpage_T *tp);
@@ -53,8 +53,10 @@ static void win_goto_ver(int up, long count);
static void win_goto_hor(int left, long count);
static void frame_add_height(frame_T *frp, int n);
static void last_status_rec(frame_T *fr, int statusline);
+static void frame_flatten(frame_T *frp);
+static void winframe_restore(win_T *wp, int dir, frame_T *unflat_altfr);
-static void make_snapshot_rec(frame_T *fr, frame_T **frp);
+static int make_snapshot_rec(frame_T *fr, frame_T **frp);
static void clear_snapshot(tabpage_T *tp, int idx);
static void clear_snapshot_rec(frame_T *fr);
static int check_snapshot_rec(frame_T *sn, frame_T *fr);
@@ -157,6 +159,37 @@ log_frame_layout(frame_T *frame)
#endif
/*
+ * Check if the current window is allowed to move to a different buffer.
+ * If the window has 'winfixbuf', this function will return FALSE.
+ */
+ int
+check_can_set_curbuf_disabled(void)
+{
+ if (curwin->w_p_wfb)
+ {
+ emsg(_(e_winfixbuf_cannot_go_to_buffer));
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/*
+ * Check if the current window is allowed to move to a different buffer.
+ * If the window has 'winfixbuf', then forceit must be TRUE or this function
+ * will return FALSE.
+ */
+ int
+check_can_set_curbuf_forceit(int forceit)
+{
+ if (!forceit && curwin->w_p_wfb)
+ {
+ emsg(_(e_winfixbuf_cannot_go_to_buffer));
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/*
* Return the current window, unless in the cmdline window and "prevwin" is
* set, then return "prevwin".
*/
@@ -493,9 +526,15 @@ newwindow:
case 'H':
case 'L':
CHECK_CMDWIN;
- win_totop((int)Prenum,
- ((nchar == 'H' || nchar == 'L') ? WSP_VERT : 0)
- | ((nchar == 'H' || nchar == 'K') ? WSP_TOP : WSP_BOT));
+ if (ONE_WINDOW)
+ beep_flush();
+ else
+ {
+ int dir = ((nchar == 'H' || nchar == 'L') ? WSP_VERT : 0)
+ | ((nchar == 'H' || nchar == 'K') ? WSP_TOP : WSP_BOT);
+
+ (void)win_splitmove(curwin, (int)Prenum, dir);
+ }
break;
// make all windows the same width and/or height
@@ -659,7 +698,7 @@ wingotofile:
find_pattern_in_path(ptr, 0, len, TRUE,
Prenum == 0 ? TRUE : FALSE, type,
- Prenum1, ACTION_SPLIT, (linenr_T)1, (linenr_T)MAXLNUM);
+ Prenum1, ACTION_SPLIT, (linenr_T)1, (linenr_T)MAXLNUM, FALSE);
vim_free(ptr);
curwin->w_set_curswant = TRUE;
break;
@@ -857,18 +896,18 @@ cmd_with_count(
}
/*
- * If "split_disallowed" is set give an error and return FAIL.
- * Otherwise return OK.
+ * If "split_disallowed" is set, or "wp"'s buffer is closing, give an error and
+ * return FAIL. Otherwise return OK.
*/
- static int
-check_split_disallowed(void)
+ int
+check_split_disallowed(win_T *wp)
{
if (split_disallowed > 0)
{
emsg(_(e_cant_split_window_while_closing_another));
return FAIL;
}
- if (curwin->w_buffer->b_locked_split)
+ if (wp->w_buffer->b_locked_split)
{
emsg(_(e_cannot_split_window_when_closing_buffer));
return FAIL;
@@ -897,7 +936,7 @@ win_split(int size, int flags)
if (ERROR_IF_ANY_POPUP_WINDOW)
return FAIL;
- if (check_split_disallowed() == FAIL)
+ if (check_split_disallowed(curwin) == FAIL)
return FAIL;
// When the ":tab" modifier was used open a new tab page instead.
@@ -919,13 +958,18 @@ win_split(int size, int flags)
else
clear_snapshot(curtab, SNAP_HELP_IDX);
- return win_split_ins(size, flags, NULL, 0);
+ return win_split_ins(size, flags, NULL, 0, NULL);
}
/*
* When "new_wp" is NULL: split the current window in two.
* When "new_wp" is not NULL: insert this window at the far
* top/left/right/bottom.
+ * When "to_flatten" is not NULL: flatten this frame before reorganising frames;
+ * remains unflattened on failure.
+ *
+ * On failure, if "new_wp" was not NULL, no changes will have been made to the
+ * window layout or sizes.
* Return FAIL for failure, OK otherwise.
*/
int
@@ -933,7 +977,8 @@ win_split_ins(
int size,
int flags,
win_T *new_wp,
- int dir)
+ int dir,
+ frame_T *to_flatten)
{
win_T *wp = new_wp;
win_T *oldwin;
@@ -955,6 +1000,9 @@ win_split_ins(
// Do not redraw here, curwin->w_buffer may be invalid.
++RedrawingDisabled;
+ if (new_wp == NULL)
+ trigger_winnewpre();
+
if (flags & WSP_TOP)
oldwin = firstwin;
else if (flags & WSP_BOT)
@@ -965,7 +1013,7 @@ win_split_ins(
// add a status line when p_ls == 1 and splitting the first window
if (ONE_WINDOW && p_ls == 1 && oldwin->w_status_height == 0)
{
- if (VISIBLE_HEIGHT(oldwin) <= p_wmh && new_wp == NULL)
+ if (!(flags & WSP_FORCE_ROOM) && VISIBLE_HEIGHT(oldwin) <= p_wmh)
{
emsg(_(e_not_enough_room));
goto theend;
@@ -1023,7 +1071,7 @@ win_split_ins(
available = oldwin->w_frame->fr_width;
needed += minwidth;
}
- if (available < needed && new_wp == NULL)
+ if (!(flags & WSP_FORCE_ROOM) && available < needed)
{
emsg(_(e_not_enough_room));
goto theend;
@@ -1106,7 +1154,7 @@ win_split_ins(
available = oldwin->w_frame->fr_height;
needed += minheight;
}
- if (available < needed && new_wp == NULL)
+ if (!(flags & WSP_FORCE_ROOM) && available < needed)
{
emsg(_(e_not_enough_room));
goto theend;
@@ -1205,6 +1253,10 @@ win_split_ins(
win_init(wp, curwin, flags);
}
+ // Going to reorganize frames now, make sure they're flat.
+ if (to_flatten != NULL)
+ frame_flatten(to_flatten);
+
/*
* Reorganise the tree of frames to insert the new window.
*/
@@ -1433,7 +1485,7 @@ win_split_ins(
/*
* make the new window the current window
*/
- (void)win_enter_ext(wp, WEE_TRIGGER_NEW_AUTOCMDS
+ (void)win_enter_ext(wp, (new_wp == NULL ? WEE_TRIGGER_NEW_AUTOCMDS : 0)
| WEE_TRIGGER_ENTER_AUTOCMDS | WEE_TRIGGER_LEAVE_AUTOCMDS);
if (flags & WSP_VERT)
p_wiw = i;
@@ -1897,35 +1949,51 @@ win_rotate(int upwards, int count)
}
/*
- * Move the current window to the very top/bottom/left/right of the screen.
+ * Move "wp" into a new split in a given direction, possibly relative to the
+ * current window.
+ * "wp" must be valid in the current tabpage.
+ * Returns FAIL for failure, OK otherwise.
*/
- static void
-win_totop(int size, int flags)
+ int
+win_splitmove(win_T *wp, int size, int flags)
{
int dir;
- int height = curwin->w_height;
+ int height = wp->w_height;
+ frame_T *unflat_altfr;
if (ONE_WINDOW)
- {
- beep_flush();
- return;
- }
- if (check_split_disallowed() == FAIL)
- return;
+ return OK; // nothing to do
+ if (check_split_disallowed(wp) == FAIL)
+ return FAIL;
- // Remove the window and frame from the tree of frames.
- (void)winframe_remove(curwin, &dir, NULL);
- win_remove(curwin, NULL);
+ // Remove the window and frame from the tree of frames. Don't flatten any
+ // frames yet so we can restore things if win_split_ins fails.
+ winframe_remove(wp, &dir, NULL, &unflat_altfr);
+ win_remove(wp, NULL);
last_status(FALSE); // may need to remove last status line
(void)win_comp_pos(); // recompute window positions
- // Split a window on the desired side and put the window there.
- (void)win_split_ins(size, flags, curwin, dir);
- if (!(flags & WSP_VERT))
+ // Split a window on the desired side and put "wp" there.
+ if (win_split_ins(size, flags, wp, dir, unflat_altfr) == FAIL)
+ {
+ // win_split_ins doesn't change sizes or layout if it fails to insert an
+ // existing window, so just undo winframe_remove.
+ winframe_restore(wp, dir, unflat_altfr);
+ win_append(wp->w_prev, wp);
+ return FAIL;
+ }
+
+ // If splitting horizontally, try to preserve height.
+ // Note that win_split_ins autocommands may have immediately closed "wp"!
+ if (size == 0 && !(flags & WSP_VERT) && win_valid(wp))
{
- win_setheight(height);
+ win_setheight_win(height, wp);
if (p_ea)
- win_equal(curwin, TRUE, 'v');
+ {
+ // Equalize windows. Note that win_split_ins autocommands may have
+ // made a window other than "wp" current.
+ win_equal(curwin, curwin == wp, 'v');
+ }
}
#if defined(FEAT_GUI)
@@ -1933,6 +2001,7 @@ win_totop(int size, int flags)
// scrollbars. Have to update them anyway.
gui_may_update_scrollbars();
#endif
+ return OK;
}
/*
@@ -2362,7 +2431,7 @@ leaving_window(win_T *win)
// When leaving the window (or closing the window) was done from a
// callback we need to break out of the Insert mode loop and restart Insert
// mode when entering the window again.
- if (State & MODE_INSERT)
+ if ((State & MODE_INSERT) && !stop_insert_mode)
{
stop_insert_mode = TRUE;
if (win->w_buffer->b_prompt_insert == NUL)
@@ -2485,7 +2554,7 @@ close_windows(
* "aucmd_win[]").
* Returns FALSE if there is a window, possibly in another tab page.
*/
- static int
+ int
last_window(void)
{
return (one_window() && first_tabpage->tp_next == NULL);
@@ -2515,7 +2584,7 @@ one_window(void)
/*
* Close the possibly last window in a tab page.
- * Returns TRUE when the window was closed already.
+ * Return FALSE if there are other windows and nothing is done, TRUE otherwise.
*/
static int
close_last_window_tabpage(
@@ -2653,7 +2722,7 @@ win_close(win_T *win, int free_buf)
// and then close the window and the tab page to avoid that curwin and
// curtab are invalid while we are freeing memory.
if (close_last_window_tabpage(win, free_buf, prev_curtab))
- return FAIL;
+ return FAIL;
// When closing the help window, try restoring a snapshot after closing
// the window. Otherwise clear the snapshot, it's now invalid.
@@ -2726,9 +2795,11 @@ win_close(win_T *win, int free_buf)
win_close_buffer(win, free_buf ? DOBUF_UNLOAD : 0, TRUE);
- if (only_one_window() && win_valid(win) && win->w_buffer == NULL
- && (last_window() || curtab != prev_curtab
- || close_last_window_tabpage(win, free_buf, prev_curtab)))
+ if (win_valid(win) && win->w_buffer == NULL
+#if defined(FEAT_PROP_POPUP)
+ && !popup_is_popup(win)
+#endif
+ && last_window())
{
// Autocommands have closed all windows, quit now. Restore
// curwin->w_buffer, otherwise writing viminfo may fail.
@@ -2742,10 +2813,7 @@ win_close(win_T *win, int free_buf)
&& win->w_buffer == NULL)
{
// Need to close the window anyway, since the buffer is NULL.
- // Don't trigger autocmds with a NULL buffer.
- block_autocmds();
win_close_othertab(win, FALSE, prev_curtab);
- unblock_autocmds();
return FAIL;
}
@@ -2887,6 +2955,14 @@ win_close(win_T *win, int free_buf)
}
static void
+trigger_winnewpre(void)
+{
+ window_layout_lock();
+ apply_autocmds(EVENT_WINNEWPRE, NULL, NULL, FALSE, NULL);
+ window_layout_unlock();
+}
+
+ static void
trigger_winclosed(win_T *win)
{
static int recursive = FALSE;
@@ -3274,10 +3350,15 @@ win_close_othertab(win_T *win, int free_buf, tabpage_T *tp)
return; // window is already being closed
// Trigger WinClosed just before starting to free window-related resources.
- trigger_winclosed(win);
- // autocmd may have freed the window already.
- if (!win_valid_any_tab(win))
- return;
+ // If the buffer is NULL, it isn't safe to trigger autocommands,
+ // and win_close() should have already triggered WinClosed.
+ if (win->w_buffer != NULL)
+ {
+ trigger_winclosed(win);
+ // autocmd may have freed the window already.
+ if (!win_valid_any_tab(win))
+ return;
+ }
if (win->w_buffer != NULL)
// Close the link to the buffer.
@@ -3355,7 +3436,7 @@ win_free_mem(
// Remove the window and its frame from the tree of frames.
frp = win->w_frame;
- wp = winframe_remove(win, dirp, tp);
+ wp = winframe_remove(win, dirp, tp, NULL);
vim_free(frp);
win_free(win, tp);
@@ -3375,6 +3456,8 @@ win_free_all(void)
// avoid an error for switching tabpage with the cmdline window open
cmdwin_type = 0;
+ cmdwin_buf = NULL;
+ cmdwin_win = NULL;
while (first_tabpage->tp_next != NULL)
tabpage_close(TRUE);
@@ -3403,11 +3486,14 @@ win_free_all(void)
winframe_remove(
win_T *win,
int *dirp UNUSED, // set to 'v' or 'h' for direction if 'ea'
- tabpage_T *tp) // tab page "win" is in, NULL for current
+ tabpage_T *tp, // tab page "win" is in, NULL for current
+ frame_T **unflat_altfr) // if not NULL, set to pointer of frame that got
+ // the space, and it is not flattened
{
frame_T *frp, *frp2, *frp3;
frame_T *frp_close = win->w_frame;
win_T *wp;
+ int row, col;
/*
* If there is only one window there is nothing to remove.
@@ -3415,6 +3501,12 @@ winframe_remove(
if (tp == NULL ? ONE_WINDOW : tp->tp_firstwin == tp->tp_lastwin)
return NULL;
+ // Save the position of the containing frame (which will also contain the
+ // altframe) before we remove anything, to recompute window positions later.
+ wp = frame2win(frp_close->fr_parent);
+ row = wp->w_winrow;
+ col = wp->w_wincol;
+
/*
* Remove the window from its frame.
*/
@@ -3458,7 +3550,7 @@ winframe_remove(
}
}
frame_new_height(frp2, frp2->fr_height + frp_close->fr_height,
- frp2 == frp_close->fr_next ? TRUE : FALSE, FALSE);
+ frp2 == frp_close->fr_next, FALSE);
*dirp = 'v';
}
else
@@ -3495,64 +3587,127 @@ winframe_remove(
}
}
frame_new_width(frp2, frp2->fr_width + frp_close->fr_width,
- frp2 == frp_close->fr_next ? TRUE : FALSE, FALSE);
+ frp2 == frp_close->fr_next, FALSE);
*dirp = 'h';
}
- // If rows/columns go to a window below/right its positions need to be
- // updated. Can only be done after the sizes have been updated.
- if (frp2 == frp_close->fr_next)
- {
- int row = win->w_winrow;
- int col = win->w_wincol;
+ // If the altframe wasn't adjacent and left/above, resizing it will have
+ // changed window positions within the parent frame. Recompute them.
+ if (frp2 != frp_close->fr_prev)
+ frame_comp_pos(frp_close->fr_parent, &row, &col);
- frame_comp_pos(frp2, &row, &col);
- }
+ if (unflat_altfr == NULL)
+ frame_flatten(frp2);
+ else
+ *unflat_altfr = frp2;
- if (frp2->fr_next == NULL && frp2->fr_prev == NULL)
- {
- // There is no other frame in this list, move its info to the parent
- // and remove it.
- frp2->fr_parent->fr_layout = frp2->fr_layout;
- frp2->fr_parent->fr_child = frp2->fr_child;
- FOR_ALL_FRAMES(frp, frp2->fr_child)
- frp->fr_parent = frp2->fr_parent;
- frp2->fr_parent->fr_win = frp2->fr_win;
- if (frp2->fr_win != NULL)
- frp2->fr_win->w_frame = frp2->fr_parent;
- frp = frp2->fr_parent;
- if (topframe->fr_child == frp2)
- topframe->fr_child = frp;
- vim_free(frp2);
+ return wp;
+}
+
+/*
+ * Flatten "frp" into its parent frame if it's the only child, also merging its
+ * list with the grandparent if they share the same layout.
+ * Frees "frp" if flattened; also "frp->fr_parent" if it has the same layout.
+ */
+ static void
+frame_flatten(frame_T *frp)
+{
+ frame_T *frp2, *frp3;
+
+ if (frp->fr_next != NULL || frp->fr_prev != NULL)
+ return;
- frp2 = frp->fr_parent;
- if (frp2 != NULL && frp2->fr_layout == frp->fr_layout)
+ // There is no other frame in this list, move its info to the parent
+ // and remove it.
+ frp->fr_parent->fr_layout = frp->fr_layout;
+ frp->fr_parent->fr_child = frp->fr_child;
+ FOR_ALL_FRAMES(frp2, frp->fr_child)
+ frp2->fr_parent = frp->fr_parent;
+ frp->fr_parent->fr_win = frp->fr_win;
+ if (frp->fr_win != NULL)
+ frp->fr_win->w_frame = frp->fr_parent;
+ frp2 = frp->fr_parent;
+ if (topframe->fr_child == frp)
+ topframe->fr_child = frp2;
+ vim_free(frp);
+
+ frp = frp2->fr_parent;
+ if (frp != NULL && frp->fr_layout == frp2->fr_layout)
+ {
+ // The frame above the parent has the same layout, have to merge
+ // the frames into this list.
+ if (frp->fr_child == frp2)
+ frp->fr_child = frp2->fr_child;
+ frp2->fr_child->fr_prev = frp2->fr_prev;
+ if (frp2->fr_prev != NULL)
+ frp2->fr_prev->fr_next = frp2->fr_child;
+ for (frp3 = frp2->fr_child; ; frp3 = frp3->fr_next)
{
- // The frame above the parent has the same layout, have to merge
- // the frames into this list.
- if (frp2->fr_child == frp)
- frp2->fr_child = frp->fr_child;
- frp->fr_child->fr_prev = frp->fr_prev;
- if (frp->fr_prev != NULL)
- frp->fr_prev->fr_next = frp->fr_child;
- for (frp3 = frp->fr_child; ; frp3 = frp3->fr_next)
+ frp3->fr_parent = frp;
+ if (frp3->fr_next == NULL)
{
- frp3->fr_parent = frp2;
- if (frp3->fr_next == NULL)
- {
- frp3->fr_next = frp->fr_next;
- if (frp->fr_next != NULL)
- frp->fr_next->fr_prev = frp3;
- break;
- }
+ frp3->fr_next = frp2->fr_next;
+ if (frp2->fr_next != NULL)
+ frp2->fr_next->fr_prev = frp3;
+ break;
}
- if (topframe->fr_child == frp)
- topframe->fr_child = frp2;
- vim_free(frp);
}
+ if (topframe->fr_child == frp2)
+ topframe->fr_child = frp;
+ vim_free(frp2);
}
+}
- return wp;
+/*
+ * Undo changes from a prior call to winframe_remove, also restoring lost
+ * vertical separators and statuslines, and changed window positions for
+ * windows within "unflat_altfr".
+ * Caller must ensure no other changes were made to the layout or window sizes!
+ */
+ static void
+winframe_restore(win_T *wp, int dir, frame_T *unflat_altfr)
+{
+ frame_T *frp = wp->w_frame;
+
+ // Put "wp"'s frame back where it was.
+ if (frp->fr_prev != NULL)
+ frame_append(frp->fr_prev, frp);
+ else
+ frame_insert(frp->fr_next, frp);
+
+ // Vertical separators to the left may have been lost. Restore them.
+ if (wp->w_vsep_width == 0
+ && frp->fr_parent->fr_layout == FR_ROW && frp->fr_prev != NULL)
+ frame_add_vsep(frp->fr_prev);
+
+ // Statuslines above may have been lost. Restore them.
+ if (wp->w_status_height == 0
+ && frp->fr_parent->fr_layout == FR_COL && frp->fr_prev != NULL)
+ frame_add_statusline(frp->fr_prev);
+
+ // Restore the lost room that was redistributed to the altframe. Also
+ // adjusts window sizes to fit restored statuslines/separators, if needed.
+ if (dir == 'v')
+ {
+ frame_new_height(unflat_altfr, unflat_altfr->fr_height - frp->fr_height,
+ unflat_altfr == frp->fr_next, FALSE);
+ }
+ else if (dir == 'h')
+ {
+ frame_new_width(unflat_altfr, unflat_altfr->fr_width - frp->fr_width,
+ unflat_altfr == frp->fr_next, FALSE);
+ }
+
+ // Recompute window positions within the parent frame to restore them.
+ // Positions were unchanged if the altframe was adjacent and left/above.
+ if (unflat_altfr != frp->fr_prev)
+ {
+ win_T *topleft = frame2win(frp->fr_parent);
+ int row = topleft->w_winrow;
+ int col = topleft->w_wincol;
+
+ frame_comp_pos(frp->fr_parent, &row, &col);
+ }
}
/*
@@ -4475,6 +4630,9 @@ win_new_tabpage(int after)
newtp->tp_localdir = (tp->tp_localdir == NULL)
? NULL : vim_strsave(tp->tp_localdir);
+
+ trigger_winnewpre();
+
// Create a new empty window.
if (win_alloc_firstwin(tp->tp_curwin) == OK)
{
@@ -5381,15 +5539,11 @@ win_enter_ext(win_T *wp, int flags)
// may have to copy the buffer options when 'cpo' contains 'S'
if (wp->w_buffer != curbuf)
buf_copy_options(wp->w_buffer, BCO_ENTER | BCO_NOHELP);
-
if (curwin_invalid == 0)
{
prevwin = curwin; // remember for CTRL-W p
curwin->w_redr_status = TRUE;
}
- else if (wp == prevwin)
- prevwin = NULL; // don't want it to be the new curwin
-
curwin = wp;
curbuf = wp->w_buffer;
check_cursor();
@@ -7131,17 +7285,17 @@ command_height(void)
// If the space for the command line is already more than 'cmdheight' there
// is nothing to do (window size must have decreased).
+ // Note: this makes curtab->tp_ch_used unreliable
if (p_ch > old_p_ch && cmdline_row <= Rows - p_ch)
return;
// Update cmdline_row to what it should be: just below the last window.
cmdline_row = topframe->fr_height + tabline_height();
- // If cmdline_row is smaller than what it is supposed to be for 'cmdheight'
- // then set old_p_ch to what it would be, so that the windows get resized
+ // old_p_ch may be unreliable, because of the early return above, so
+ // set old_p_ch to what it would be, so that the windows get resized
// properly for the new value.
- if (cmdline_row < Rows - p_ch)
- old_p_ch = Rows - cmdline_row;
+ old_p_ch = Rows - cmdline_row;
// Find bottom frame with width of screen.
frp = lastwin->w_frame;
@@ -7482,29 +7636,42 @@ reset_lnums(void)
/*
* Create a snapshot of the current frame sizes.
* "idx" is SNAP_HELP_IDX or SNAP_AUCMD_IDX.
+ * Return FAIL if out of memory, OK otherwise.
*/
- void
+ int
make_snapshot(int idx)
{
clear_snapshot(curtab, idx);
- make_snapshot_rec(topframe, &curtab->tp_snapshot[idx]);
+ if (make_snapshot_rec(topframe, &curtab->tp_snapshot[idx]) == FAIL)
+ {
+ clear_snapshot(curtab, idx);
+ return FAIL;
+ }
+ return OK;
}
- static void
+ static int
make_snapshot_rec(frame_T *fr, frame_T **frp)
{
*frp = ALLOC_CLEAR_ONE(frame_T);
if (*frp == NULL)
- return;
+ return FAIL;
(*frp)->fr_layout = fr->fr_layout;
(*frp)->fr_width = fr->fr_width;
(*frp)->fr_height = fr->fr_height;
if (fr->fr_next != NULL)
- make_snapshot_rec(fr->fr_next, &((*frp)->fr_next));
+ {
+ if (make_snapshot_rec(fr->fr_next, &((*frp)->fr_next)) == FAIL)
+ return FAIL;
+ }
if (fr->fr_child != NULL)
- make_snapshot_rec(fr->fr_child, &((*frp)->fr_child));
+ {
+ if (make_snapshot_rec(fr->fr_child, &((*frp)->fr_child)) == FAIL)
+ return FAIL;
+ }
if (fr->fr_layout == FR_LEAF && fr->fr_win == curwin)
(*frp)->fr_win = curwin;
+ return OK;
}
/*
@@ -7737,9 +7904,15 @@ frame_check_width(frame_T *topfrp, int width)
* Simple int comparison function for use with qsort()
*/
static int
-int_cmp(const void *a, const void *b)
+int_cmp(const void *pa, const void *pb)
{
- return *(const int *)a - *(const int *)b;
+ const int a = *(const int *)pa;
+ const int b = *(const int *)pb;
+ if (a > b)
+ return 1;
+ if (a < b)
+ return -1;
+ return 0;
}
/*
@@ -7812,3 +7985,9 @@ skip:
return NULL; // no error
}
#endif
+
+ int
+get_last_winid(void)
+{
+ return last_win_id;
+}
diff --git a/src/xxd/Makefile b/src/xxd/Makefile
index 97bbcc7..d08af7a 100644
--- a/src/xxd/Makefile
+++ b/src/xxd/Makefile
@@ -1,7 +1,7 @@
# The most simplistic Makefile
xxd: xxd.c
- $(CC) $(CFLAGS) $(LDFLAGS) -DUNIX -o xxd xxd.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DUNIX -o xxd xxd.c $(LIBS)
clean:
rm -f xxd xxd.o
diff --git a/src/xxd/xxd.c b/src/xxd/xxd.c
index 26f8d83..cf8b4ea 100644
--- a/src/xxd/xxd.c
+++ b/src/xxd/xxd.c
@@ -58,6 +58,10 @@
* 20.06.2022 Permit setting the variable names used by -i by David Gow
* 31.08.2023 -R never/auto/always prints colored output
* 06.10.2023 enable -r -b to reverse bit dumps
+ * 12.01.2024 disable auto-conversion for z/OS (MVS)
+ * 17.01.2024 use size_t instead of usigned int for code-generation (-i), #13876
+ * 25.01.2024 revert the previous patch (size_t instead of unsigned int)
+ * 10.02.2024 fix buffer-overflow when writing color output to buffer, #14003
*
* (c) 1990-1998 by Juergen Weigert (jnweiger@gmail.com)
*
@@ -138,7 +142,7 @@ extern void perror __P((char *));
# endif
#endif
-char version[] = "xxd 2023-10-25 by Juergen Weigert et al.";
+char version[] = "xxd 2024-02-10 by Juergen Weigert et al.";
#ifdef WIN32
char osver[] = " (Win32)";
#else
@@ -197,7 +201,33 @@ char osver[] = "";
#define TRY_SEEK /* attempt to use lseek, or skip forward by reading */
#define COLS 256 /* change here, if you ever need more columns */
-#define LLEN ((2*(int)sizeof(unsigned long)) + 4 + (9*COLS-1) + COLS + 2)
+
+/*
+ * LLEN is the maximum length of a line; other than the visible characters
+ * we need to consider also the escape color sequence prologue/epilogue ,
+ * (11 bytes for each character). The most larger format is the default one:
+ * addr + 1 word for each col/2 + 1 char for each col
+ *
+ * addr 1st group 2nd group
+ * +-------+ +-----------------+ +------+
+ * 01234567: 1234 5678 9abc def0 12345678
+ *
+ * - addr: typically 012345678: -> from 10 up to 18 bytes (including trailing
+ * space)
+ * - 1st group: 1234 5678 9abc ... -> each byte may be colored, so add 11
+ * for each byte
+ * - space -> 1 byte
+ * - 2nd group: 12345678 -> each char may be colore so add 11
+ * for each byte
+ * - new line -> 1 byte
+ * - zero (end line) -> 1 byte
+ */
+#define LLEN (2*(int)sizeof(unsigned long) + 2 + /* addr + ": " */ \
+ (11 * 2 + 4 + 1) * (COLS / 2) + /* 1st group */ \
+ 1 + /* space */ \
+ (1 + 11) * COLS + /* 2nd group */ \
+ 1 + /* new line */ \
+ 1) /* zero */
char hexxa[] = "0123456789abcdef0123456789ABCDEF", *hexx = hexxa;
@@ -587,7 +617,7 @@ begin_coloring_char (char *l, int *c, int e, int ebcdic)
}
else /* ASCII */
{
- #ifdef __MVS__
+ #if defined(__MVS__) && __CHARSET_LIB == 0
if (e >= 64)
l[(*c)++] = COLOR_GREEN;
#else
@@ -905,6 +935,10 @@ main(int argc, char *argv[])
}
rewind(fpo);
}
+#ifdef __MVS__
+ // Disable auto-conversion on input file descriptors
+ __disableautocvt(fileno(fp));
+#endif
if (revert)
switch (hextype)
@@ -1066,7 +1100,7 @@ main(int argc, char *argv[])
COLOR_PROLOGUE
begin_coloring_char(l,&c,e,ebcdic);
-#ifdef __MVS__
+#if defined(__MVS__) && __CHARSET_LIB == 0
if (e >= 64)
l[c++] = e;
else
@@ -1094,7 +1128,7 @@ main(int argc, char *argv[])
c += addrlen + 3 + p;
l[c++] =
-#ifdef __MVS__
+#if defined(__MVS__) && __CHARSET_LIB == 0
(e >= 64)
#else
(e > 31 && e < 127)
diff --git a/tools/rename.bat b/tools/rename.bat
index 50b3f7b..3df6352 100644
--- a/tools/rename.bat
+++ b/tools/rename.bat
@@ -1,6 +1,38 @@
-mv vim.exe vimw32.exe
-mv tee/tee.exe teew32.exe
-mv xxd/xxd.exe xxdw32.exe
-mv vim.pdb vimw32.pdb
-mv install.exe installw32.exe
-mv uninstall.exe uninstallw32.exe
+@ 2>/dev/null # 2>nul & goto:win32
+#!/bin/sh
+if test -e ../src/vim.exe ; then mv ../src/vim.exe ../src/vimw32.exe ; fi
+if test -e ../src/vim.pdb ; then mv ../src/vim.pdb ../src/vimw32.pdb ; fi
+if test -e ../src/gvim.exe ; then mv ../src/gvim.exe ../src/gvim_ole.exe ; fi
+if test -e ../src/gvim.pdb ; then mv ../src/gvim.pdb ../src/gvim_ole.pdb ; fi
+if test -e ../src/install.exe ;
+ then
+ mv ../src/install.exe ../src/installw32.exe ;
+fi
+if test -e ../src/uninstall.exe ;
+ then
+ mv ../src/uninstall.exe ../src/uninstallw32.exe ;
+fi
+if test -e ../src/tee/tee.exe ;
+ then
+ mv ../src/tee/tee.exe ../src/teew32.exe ;
+fi
+if test -e ../src/xxd/xxd.exe ;
+ then
+ mv ../src/xxd/xxd.exe ../src/xxdw32.exe ;
+fi
+# Uncomment return if the file is run through the command "source"
+#return
+exit
+
+:win32
+if exist mv.exe (set "mv=mv.exe -f") else (set "mv=move /y")
+if exist ..\src\vim.exe %mv% ..\src\vim.exe ..\src\vimw32.exe
+if exist ..\src\vim.pdb %mv% ..\src\vim.pdb ..\src\vimw32.pdb
+if exist ..\src\gvim.exe %mv% ..\src\gvim.exe ..\src\gvim_ole.exe
+if exist ..\src\gvim.pdb %mv% ..\src\gvim.pdb ..\src\gvim_ole.pdb
+if exist ..\src\install.exe %mv% ..\src\install.exe ..\src\installw32.exe
+if exist ..\src\uninstall.exe %mv% ..\src\uninstall.exe ..\src\uninstallw32.exe
+if exist ..\src\tee\tee.exe %mv% ..\src\tee\tee.exe ..\src\teew32.exe
+if exist ..\src\xxd\xxd.exe %mv% ..\src\xxd\xxd.exe ..\src\xxdw32.exe
+set "mv="
+goto:EOF