From cccb21df3b4c6fe0aaa99743c418aa973aeebad0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 04:10:59 +0200 Subject: Merging upstream version 2:9.1.0374. Signed-off-by: Daniel Baumann --- .github/CODEOWNERS | 7 +- .github/workflows/ci.yml | 13 +- .gitignore | 1 + .hgignore | 1 + Filelist | 3 + Makefile | 22 +- README.md | 12 +- README.rux.txt | 161 ++ README.txt | 40 +- nsis/README.txt | 71 +- nsis/gvim.nsi | 221 +- nsis/lang/README.txt | 34 + nsis/lang/danish.nsi | 15 + nsis/lang/dutch.nsi | 14 + nsis/lang/english.nsi | 13 + nsis/lang/german.nsi | 15 + nsis/lang/greek.nsi | 15 + nsis/lang/italian.nsi | 15 + nsis/lang/japanese.nsi | 15 + nsis/lang/russian.nsi | 14 +- nsis/lang/serbian.nsi | 15 + nsis/lang/simpchinese.nsi | 16 + nsis/lang/tradchinese.nsi | 16 + nsis/lang/turkish.nsi | 21 + runtime/autoload/dist/ft.vim | 24 +- runtime/autoload/netrw.vim | 7 +- runtime/compiler/ant.vim | 5 +- runtime/compiler/bcc.vim | 5 +- runtime/compiler/bdf.vim | 9 +- runtime/compiler/cargo.vim | 5 +- runtime/compiler/checkstyle.vim | 6 +- runtime/compiler/cm3.vim | 6 +- runtime/compiler/context.vim | 11 +- runtime/compiler/cs.vim | 5 +- runtime/compiler/csslint.vim | 9 +- runtime/compiler/cucumber.vim | 5 +- runtime/compiler/dart.vim | 6 +- runtime/compiler/dart2js.vim | 6 +- runtime/compiler/dart2native.vim | 6 +- runtime/compiler/dartanalyser.vim | 6 +- runtime/compiler/dartdevc.vim | 6 +- runtime/compiler/dartdoc.vim | 6 +- runtime/compiler/dartfmt.vim | 6 +- runtime/compiler/decada.vim | 8 +- runtime/compiler/dot.vim | 10 +- runtime/compiler/dotnet.vim | 5 +- runtime/compiler/erlang.vim | 1 + runtime/compiler/eruby.vim | 6 +- runtime/compiler/eslint.vim | 5 +- runtime/compiler/fbc.vim | 6 +- runtime/compiler/fortran_F.vim | 7 +- runtime/compiler/fortran_cv.vim | 5 +- runtime/compiler/fortran_elf90.vim | 7 +- runtime/compiler/fortran_g77.vim | 5 +- runtime/compiler/fortran_lf95.vim | 7 +- runtime/compiler/fpc.vim | 5 +- runtime/compiler/g95.vim | 5 +- runtime/compiler/gawk.vim | 6 +- runtime/compiler/gcc.vim | 13 +- runtime/compiler/gfortran.vim | 5 +- runtime/compiler/gjs.vim | 6 +- runtime/compiler/gm2.vim | 6 +- runtime/compiler/gnat.vim | 7 - runtime/compiler/go.vim | 5 +- runtime/compiler/haml.vim | 5 +- runtime/compiler/hare.vim | 5 +- runtime/compiler/hp_acc.vim | 5 +- runtime/compiler/icc.vim | 5 +- runtime/compiler/icon.vim | 6 +- runtime/compiler/ifort.vim | 5 +- runtime/compiler/intel.vim | 5 +- runtime/compiler/irix5_c.vim | 5 +- runtime/compiler/irix5_cpp.vim | 5 +- runtime/compiler/javac.vim | 6 +- runtime/compiler/jest.vim | 6 +- runtime/compiler/jikes.vim | 5 +- runtime/compiler/jjs.vim | 6 +- runtime/compiler/jshint.vim | 6 +- runtime/compiler/jsonlint.vim | 6 +- runtime/compiler/mcs.vim | 12 +- runtime/compiler/mips_c.vim | 5 +- runtime/compiler/mipspro_c89.vim | 5 +- runtime/compiler/mipspro_cpp.vim | 5 +- runtime/compiler/modelsim_vcom.vim | 9 +- runtime/compiler/msbuild.vim | 5 +- runtime/compiler/msvc.vim | 1 + runtime/compiler/neato.vim | 10 +- runtime/compiler/ocaml.vim | 1 + runtime/compiler/onsgmls.vim | 5 +- runtime/compiler/pandoc.vim | 55 + runtime/compiler/pbx.vim | 5 +- runtime/compiler/perl.vim | 5 +- runtime/compiler/perlcritic.vim | 5 +- runtime/compiler/php.vim | 6 +- runtime/compiler/pip_compile.vim | 43 + runtime/compiler/podchecker.vim | 5 +- runtime/compiler/powershell.vim | 13 +- runtime/compiler/pylint.vim | 5 +- runtime/compiler/pyunit.vim | 5 +- runtime/compiler/raco.vim | 5 +- runtime/compiler/racomake.vim | 5 +- runtime/compiler/racosetup.vim | 5 +- runtime/compiler/racotest.vim | 5 +- runtime/compiler/rake.vim | 5 +- runtime/compiler/rhino.vim | 6 +- runtime/compiler/rime_deployer.vim | 30 + runtime/compiler/rspec.vim | 5 +- runtime/compiler/rst.vim | 7 +- runtime/compiler/rubocop.vim | 6 +- runtime/compiler/ruby.vim | 5 +- runtime/compiler/rubyunit.vim | 5 +- runtime/compiler/rustc.vim | 4 - runtime/compiler/sass.vim | 5 +- runtime/compiler/scdoc.vim | 5 +- runtime/compiler/se.vim | 6 +- runtime/compiler/shellcheck.vim | 6 +- runtime/compiler/sml.vim | 6 +- runtime/compiler/spectral.vim | 5 +- runtime/compiler/splint.vim | 5 +- runtime/compiler/standard.vim | 5 +- runtime/compiler/stylelint.vim | 6 +- runtime/compiler/tcl.vim | 6 +- runtime/compiler/tex.vim | 12 +- runtime/compiler/tidy.vim | 6 +- runtime/compiler/ts-node.vim | 6 +- runtime/compiler/tsc.vim | 6 +- runtime/compiler/typedoc.vim | 6 +- runtime/compiler/vimdoc.vim | 20 + runtime/compiler/xbuild.vim | 5 +- runtime/compiler/xmllint.vim | 6 +- runtime/compiler/xmlwf.vim | 5 +- runtime/compiler/xo.vim | 6 +- runtime/compiler/yamllint.vim | 5 +- runtime/compiler/zig.vim | 4 - runtime/compiler/zig_build.vim | 6 +- runtime/compiler/zig_build_exe.vim | 6 +- runtime/compiler/zig_test.vim | 6 +- runtime/compiler/zsh.vim | 6 +- runtime/doc/Make_mvc.mak | 23 +- runtime/doc/Makefile | 12 +- runtime/doc/autocmd.txt | 8 +- runtime/doc/builtin.txt | 66 +- runtime/doc/change.txt | 6 +- runtime/doc/editing.txt | 21 +- runtime/doc/eval.txt | 6 +- runtime/doc/filetype.txt | 60 +- runtime/doc/gui.txt | 4 +- runtime/doc/gui_x11.txt | 6 +- runtime/doc/helphelp.txt | 4 +- runtime/doc/intro.txt | 10 +- runtime/doc/options.txt | 11 +- runtime/doc/os_dos.txt | 7 +- runtime/doc/pattern.txt | 15 +- runtime/doc/quickfix.txt | 11 +- runtime/doc/sponsor.txt | 84 +- runtime/doc/starting.txt | 90 +- runtime/doc/syntax.txt | 124 +- runtime/doc/tabpage.txt | 9 +- runtime/doc/tags | 40 +- runtime/doc/term.txt | 9 +- runtime/doc/testing.txt | 6 +- runtime/doc/todo.txt | 3 +- runtime/doc/uganda.rux | 340 +++ runtime/doc/uganda.txt | 9 +- runtime/doc/usr_41.txt | 4 +- runtime/doc/usr_51.txt | 10 +- runtime/doc/version9.txt | 15 +- runtime/doc/vim9.txt | 11 +- runtime/doc/vim9class.txt | 153 +- runtime/filetype.vim | 243 ++- runtime/ftplugin/asm.vim | 14 +- runtime/ftplugin/astro.vim | 186 ++ runtime/ftplugin/bp.vim | 14 + runtime/ftplugin/cgdbrc.vim | 21 + runtime/ftplugin/cmake.vim | 5 +- runtime/ftplugin/dts.vim | 16 + runtime/ftplugin/gdb.vim | 12 +- runtime/ftplugin/java.vim | 60 +- runtime/ftplugin/kconfig.vim | 17 +- runtime/ftplugin/ondir.vim | 18 + runtime/ftplugin/requirements.vim | 43 + runtime/ftplugin/roc.vim | 14 + runtime/ftplugin/uci.vim | 21 + runtime/ftplugin/vim.vim | 8 +- runtime/ftplugin/yaml.vim | 7 + runtime/ftplugin/zathurarc.vim | 22 + runtime/indent/asm.vim | 29 + runtime/indent/astro.vim | 88 + runtime/indent/json5.vim | 11 + .../pack/dist/opt/termdebug/plugin/termdebug.vim | 2 +- runtime/syntax/astro.vim | 190 ++ runtime/syntax/cgdbrc.vim | 16 + runtime/syntax/cmakecache.vim | 60 + runtime/syntax/cuda.vim | 42 +- runtime/syntax/debcontrol.vim | 4 +- runtime/syntax/generator/gen_syntax_vim.vim | 17 +- runtime/syntax/generator/vim.vim.base | 177 +- runtime/syntax/go.vim | 4 +- runtime/syntax/haskell.vim | 7 +- runtime/syntax/i3config.vim | 281 +-- runtime/syntax/java.vim | 162 +- runtime/syntax/ondir.vim | 35 + runtime/syntax/pamconf.vim | 13 +- runtime/syntax/pandoc.vim | 709 +++++++ runtime/syntax/requirements.vim | 67 + runtime/syntax/sshconfig.vim | 62 +- runtime/syntax/sshdconfig.vim | 55 +- runtime/syntax/swayconfig.vim | 158 +- runtime/syntax/testdir/dumps/java_comments_00.dump | 34 +- runtime/syntax/testdir/dumps/java_comments_01.dump | 40 +- runtime/syntax/testdir/dumps/java_comments_02.dump | 20 + runtime/syntax/testdir/dumps/java_comments_03.dump | 20 + runtime/syntax/testdir/dumps/java_comments_04.dump | 20 + runtime/syntax/testdir/dumps/java_comments_99.dump | 32 +- .../testdir/dumps/java_contextual_keywords_00.dump | 20 + .../testdir/dumps/java_contextual_keywords_01.dump | 20 + .../testdir/dumps/java_contextual_keywords_02.dump | 20 + .../testdir/dumps/java_contextual_keywords_99.dump | 20 + .../testdir/dumps/java_methods_indent_00.dump | 20 + .../testdir/dumps/java_methods_indent_01.dump | 20 + .../testdir/dumps/java_methods_indent_02.dump | 20 + .../testdir/dumps/java_methods_indent_03.dump | 20 + .../testdir/dumps/java_methods_indent_99.dump | 20 + .../testdir/dumps/java_methods_style_00.dump | 20 + .../testdir/dumps/java_methods_style_01.dump | 20 + .../testdir/dumps/java_methods_style_02.dump | 20 + .../testdir/dumps/java_methods_style_03.dump | 20 + .../testdir/dumps/java_methods_style_99.dump | 20 + runtime/syntax/testdir/dumps/vim9_keymap_00.dump | 20 + runtime/syntax/testdir/dumps/vim9_keymap_01.dump | 20 + runtime/syntax/testdir/dumps/vim9_keymap_99.dump | 20 + .../testdir/dumps/vim9_legacy_header_00.dump | 20 + .../testdir/dumps/vim9_legacy_header_99.dump | 20 + .../testdir/dumps/vim9_legacy_header_fold_00.dump | 20 + .../testdir/dumps/vim9_legacy_header_fold_99.dump | 20 + runtime/syntax/testdir/dumps/vim_00.dump | 20 + runtime/syntax/testdir/dumps/vim_99.dump | 20 + .../syntax/testdir/dumps/vim_ex_abbreviate_01.dump | 6 +- .../syntax/testdir/dumps/vim_ex_abbreviate_99.dump | 6 +- .../syntax/testdir/dumps/vim_ex_commands_31.dump | 2 +- .../syntax/testdir/dumps/vim_ex_commands_64.dump | 2 +- .../testdir/dumps/vim_ex_comment-vim9_00.dump | 20 + .../testdir/dumps/vim_ex_comment-vim9_01.dump | 20 + .../testdir/dumps/vim_ex_comment-vim9_02.dump | 20 + .../testdir/dumps/vim_ex_comment-vim9_99.dump | 20 + .../syntax/testdir/dumps/vim_ex_comment_00.dump | 20 + .../syntax/testdir/dumps/vim_ex_comment_01.dump | 20 + .../syntax/testdir/dumps/vim_ex_comment_02.dump | 20 + .../syntax/testdir/dumps/vim_ex_comment_99.dump | 20 + runtime/syntax/testdir/dumps/vim_ex_def_01.dump | 14 +- runtime/syntax/testdir/dumps/vim_ex_def_02.dump | 18 +- runtime/syntax/testdir/dumps/vim_ex_def_03.dump | 20 +- runtime/syntax/testdir/dumps/vim_ex_def_04.dump | 22 +- runtime/syntax/testdir/dumps/vim_ex_def_05.dump | 26 +- runtime/syntax/testdir/dumps/vim_ex_def_99.dump | 2 +- .../syntax/testdir/dumps/vim_ex_def_fold_01.dump | 12 +- .../syntax/testdir/dumps/vim_ex_def_fold_02.dump | 24 +- .../syntax/testdir/dumps/vim_ex_def_fold_03.dump | 20 +- .../syntax/testdir/dumps/vim_ex_def_fold_04.dump | 18 +- .../syntax/testdir/dumps/vim_ex_def_fold_05.dump | 24 +- .../syntax/testdir/dumps/vim_ex_def_fold_06.dump | 26 +- .../syntax/testdir/dumps/vim_ex_def_fold_07.dump | 20 + .../syntax/testdir/dumps/vim_ex_def_fold_99.dump | 24 +- .../syntax/testdir/dumps/vim_ex_def_nested_00.dump | 20 + .../syntax/testdir/dumps/vim_ex_def_nested_99.dump | 20 + .../testdir/dumps/vim_ex_def_nested_fold_00.dump | 20 + .../testdir/dumps/vim_ex_def_nested_fold_01.dump | 20 + .../testdir/dumps/vim_ex_def_nested_fold_99.dump | 20 + .../testdir/dumps/vim_ex_function_fold_01.dump | 2 +- .../testdir/dumps/vim_ex_function_fold_02.dump | 2 +- .../testdir/dumps/vim_ex_function_fold_03.dump | 2 +- .../testdir/dumps/vim_ex_function_fold_04.dump | 2 +- .../testdir/dumps/vim_ex_function_fold_05.dump | 2 +- .../testdir/dumps/vim_ex_function_fold_06.dump | 2 +- .../testdir/dumps/vim_ex_function_fold_07.dump | 2 +- .../testdir/dumps/vim_ex_function_fold_08.dump | 2 +- .../testdir/dumps/vim_ex_function_fold_09.dump | 2 +- .../testdir/dumps/vim_ex_function_fold_10.dump | 20 + .../testdir/dumps/vim_ex_function_fold_11.dump | 20 + .../testdir/dumps/vim_ex_function_fold_12.dump | 20 + .../testdir/dumps/vim_ex_function_fold_99.dump | 30 +- .../testdir/dumps/vim_ex_function_nested_00.dump | 20 + .../testdir/dumps/vim_ex_function_nested_01.dump | 20 + .../testdir/dumps/vim_ex_function_nested_99.dump | 20 + .../dumps/vim_ex_function_nested_fold_00.dump | 20 + .../dumps/vim_ex_function_nested_fold_01.dump | 20 + .../dumps/vim_ex_function_nested_fold_02.dump | 20 + .../dumps/vim_ex_function_nested_fold_99.dump | 20 + runtime/syntax/testdir/dumps/vim_expr_02.dump | 2 +- runtime/syntax/testdir/dumps/vim_expr_03.dump | 16 +- runtime/syntax/testdir/dumps/vim_expr_99.dump | 20 +- runtime/syntax/testdir/dumps/vim_keymap_01.dump | 2 +- runtime/syntax/testdir/dumps/vim_keymap_99.dump | 12 +- .../testdir/dumps/vim_object_methods_00.dump | 20 + .../testdir/dumps/vim_object_methods_01.dump | 20 + .../testdir/dumps/vim_object_methods_02.dump | 20 + .../testdir/dumps/vim_object_methods_99.dump | 20 + runtime/syntax/testdir/dumps/yaml.yaml_00.dump | 20 + runtime/syntax/testdir/dumps/yaml.yaml_01.dump | 20 + runtime/syntax/testdir/dumps/yaml.yaml_02.dump | 20 + runtime/syntax/testdir/dumps/yaml.yaml_03.dump | 20 + runtime/syntax/testdir/dumps/yaml.yaml_04.dump | 20 + runtime/syntax/testdir/dumps/yaml.yaml_05.dump | 20 + runtime/syntax/testdir/dumps/yaml.yaml_06.dump | 20 + runtime/syntax/testdir/dumps/yaml.yaml_07.dump | 20 + runtime/syntax/testdir/dumps/yaml.yaml_08.dump | 20 + runtime/syntax/testdir/dumps/yaml.yaml_99.dump | 20 + runtime/syntax/testdir/dumps/yaml_00.dump | 20 + runtime/syntax/testdir/dumps/yaml_01.dump | 20 + runtime/syntax/testdir/dumps/yaml_02.dump | 20 + runtime/syntax/testdir/dumps/yaml_03.dump | 20 + runtime/syntax/testdir/dumps/yaml_04.dump | 20 + runtime/syntax/testdir/dumps/yaml_05.dump | 20 + runtime/syntax/testdir/dumps/yaml_06.dump | 20 + runtime/syntax/testdir/dumps/yaml_07.dump | 20 + runtime/syntax/testdir/dumps/yaml_99.dump | 20 + runtime/syntax/testdir/input/java_comments.java | 85 +- .../testdir/input/java_contextual_keywords.java | 48 + .../syntax/testdir/input/java_methods_indent.java | 70 + .../syntax/testdir/input/java_methods_style.java | 66 + runtime/syntax/testdir/input/vim9_keymap.vim | 26 + .../syntax/testdir/input/vim9_legacy_header.vim | 16 + .../testdir/input/vim9_legacy_header_fold.vim | 17 + runtime/syntax/testdir/input/vim_ex_commands.vim | 4 +- .../syntax/testdir/input/vim_ex_comment-vim9.vim | 41 + runtime/syntax/testdir/input/vim_ex_comment.vim | 45 + runtime/syntax/testdir/input/vim_ex_def.vim | 18 +- runtime/syntax/testdir/input/vim_ex_def_fold.vim | 38 +- runtime/syntax/testdir/input/vim_ex_def_nested.vim | 20 + .../testdir/input/vim_ex_def_nested_fold.vim | 22 + .../syntax/testdir/input/vim_ex_function_fold.vim | 40 + .../testdir/input/vim_ex_function_nested.vim | 38 + .../testdir/input/vim_ex_function_nested_fold.vim | 40 + runtime/syntax/testdir/input/vim_expr.vim | 15 +- runtime/syntax/testdir/input/vim_keymap.vim | 3 +- .../syntax/testdir/input/vim_object_methods.vim | 56 + runtime/syntax/testdir/input/yaml.yaml | 127 ++ runtime/syntax/uci.vim | 33 + runtime/syntax/vim.vim | 194 +- runtime/syntax/yaml.vim | 146 +- runtime/syntax/zathurarc.vim | 37 + src/Make_mvc.mak | 55 +- src/Makefile | 10 +- src/auto/configure | 8 +- src/autocmd.c | 422 ++-- src/buffer.c | 6 +- src/change.c | 3 +- src/charset.c | 41 +- src/clientserver.c | 8 +- src/configure.ac | 6 +- src/dict.c | 6 + src/dosinst.c | 2 +- src/drawline.c | 74 +- src/edit.c | 95 +- src/errors.h | 46 +- src/eval.c | 164 +- src/evalfunc.c | 35 +- src/evalvars.c | 141 +- src/ex_cmds.c | 2 +- src/ex_cmds.h | 5 +- src/ex_cmds2.c | 25 +- src/ex_docmd.c | 339 ++- src/fileio.c | 8 +- src/filepath.c | 1 + src/getchar.c | 175 +- src/globals.h | 23 +- src/gui_gtk_x11.c | 3 + src/gui_motif.c | 3 + src/highlight.c | 295 ++- src/indent.c | 4 +- src/insexpand.c | 2 + src/main.c | 6 +- src/map.c | 3 + src/match.c | 4 +- src/mbyte.c | 15 + src/memline.c | 3 + src/message.c | 43 +- src/misc1.c | 17 +- src/misc2.c | 42 + src/mouse.c | 2 +- src/move.c | 900 +++----- src/normal.c | 110 +- src/ops.c | 113 +- src/option.c | 68 +- src/optiondefs.h | 3 +- src/optionstr.c | 2 +- src/os_unix.c | 15 +- src/os_unix.h | 18 + src/po/Make_mvc.mak | 2 + src/po/check.vim | 9 + src/po/ru.cp1251.po | 127 +- src/po/ru.po | 127 +- src/po/sr.po | 88 +- src/popupwin.c | 2 +- src/proto/charset.pro | 1 + src/proto/eval.pro | 6 +- src/proto/evalvars.pro | 1 + src/proto/mbyte.pro | 1 + src/proto/misc2.pro | 4 + src/proto/move.pro | 5 +- src/proto/normal.pro | 3 +- src/proto/scriptfile.pro | 1 + src/proto/vim9class.pro | 1 + src/proto/vim9instr.pro | 2 +- src/proto/window.pro | 1 + src/quickfix.c | 4 +- src/regexp_bt.c | 2 +- src/regexp_nfa.c | 4 +- src/screen.c | 16 +- src/scriptfile.c | 62 +- src/session.c | 2 + src/structs.h | 40 +- src/tag.c | 22 +- src/term.c | 2 + src/termdefs.h | 6 +- src/testdir/Make_all.mak | 5 + src/testdir/Makefile | 2 +- src/testdir/dumps/Test_ambiwidth_hl_dump_1.dump | 6 + src/testdir/dumps/Test_ambiwidth_hl_dump_2.dump | 6 + .../dumps/Test_display_visual_block_scroll.dump | 10 +- ..._normal_gj_gk_gM_with_outer_virtual_text_1.dump | 16 + ..._normal_gj_gk_gM_with_outer_virtual_text_2.dump | 16 + ..._normal_gj_gk_gM_with_outer_virtual_text_3.dump | 16 + ..._normal_gj_gk_gM_with_outer_virtual_text_4.dump | 16 + ...ps_with_text_truncated_just_before_after_1.dump | 8 + ...ps_with_text_truncated_just_before_after_2.dump | 8 + ...widths_with_non_ambiwidth_character_dump_1.dump | 6 + ...widths_with_non_ambiwidth_character_dump_2.dump | 6 + src/testdir/dumps/Test_smooth_long_6.dump | 2 +- src/testdir/dumps/Test_smooth_long_7.dump | 2 +- src/testdir/test_autocmd.vim | 351 ++- src/testdir/test_buffer.vim | 23 +- src/testdir/test_cmdline.vim | 23 +- src/testdir/test_cmdmods.vim | 6 +- src/testdir/test_codestyle.vim | 8 +- src/testdir/test_compiler.vim | 4 +- src/testdir/test_conceal.vim | 1 + src/testdir/test_diffmode.vim | 62 +- src/testdir/test_digraph.vim | 4 +- src/testdir/test_edit.vim | 156 +- src/testdir/test_expr.vim | 16 + src/testdir/test_filechanged.vim | 34 +- src/testdir/test_filetype.vim | 106 +- src/testdir/test_functions.vim | 37 + src/testdir/test_highlight.vim | 9 + src/testdir/test_history.vim | 2 +- src/testdir/test_ins_complete.vim | 24 +- src/testdir/test_let.vim | 132 ++ src/testdir/test_listdict.vim | 6 + src/testdir/test_mapping.vim | 67 +- src/testdir/test_match.vim | 2 +- src/testdir/test_mksession.vim | 4 +- src/testdir/test_normal.vim | 93 +- src/testdir/test_put.vim | 17 + src/testdir/test_recover.vim | 2 +- src/testdir/test_regexp_latin.vim | 14 + src/testdir/test_regexp_utf8.vim | 2 +- src/testdir/test_registers.vim | 69 +- src/testdir/test_remote.vim | 45 + src/testdir/test_scroll_opt.vim | 116 +- src/testdir/test_sound.vim | 2 + src/testdir/test_tabpage.vim | 8 +- src/testdir/test_taglist.vim | 5 +- src/testdir/test_terminal3.vim | 20 + src/testdir/test_textformat.vim | 9 + src/testdir/test_textprop.vim | 79 + src/testdir/test_utf8.vim | 121 +- src/testdir/test_vim9_assign.vim | 106 + src/testdir/test_vim9_builtin.vim | 2232 ++++++++++---------- src/testdir/test_vim9_class.vim | 236 ++- src/testdir/test_vim9_disassemble.vim | 30 +- src/testdir/test_vim9_enum.vim | 1537 ++++++++++++++ src/testdir/test_vim9_func.vim | 31 + src/testdir/test_vim9_import.vim | 243 +++ src/testdir/test_vim9_script.vim | 130 +- src/testdir/test_visual.vim | 2 +- src/testdir/test_winfixbuf.vim | 415 ++-- src/testdir/test_xdg.vim | 295 +++ src/testdir/vim9.vim | 208 +- src/testing.c | 11 +- src/textformat.c | 6 +- src/textprop.c | 8 +- src/typval.c | 16 +- src/userfunc.c | 53 +- src/version.c | 363 +++- src/version.h | 17 +- src/vim.h | 17 +- src/vim9.h | 10 +- src/vim9class.c | 550 ++++- src/vim9cmds.c | 4 +- src/vim9compile.c | 758 ++++--- src/vim9execute.c | 33 +- src/vim9expr.c | 21 +- src/vim9instr.c | 23 +- src/vim9script.c | 25 +- src/vim9type.c | 1332 +++++++----- src/window.c | 10 +- tools/rename.bat | 0 498 files changed, 17498 insertions(+), 5788 deletions(-) create mode 100644 README.rux.txt create mode 100644 nsis/lang/README.txt create mode 100644 runtime/compiler/pandoc.vim create mode 100644 runtime/compiler/pip_compile.vim create mode 100644 runtime/compiler/rime_deployer.vim create mode 100644 runtime/compiler/vimdoc.vim create mode 100644 runtime/doc/uganda.rux create mode 100644 runtime/ftplugin/astro.vim create mode 100644 runtime/ftplugin/bp.vim create mode 100644 runtime/ftplugin/cgdbrc.vim create mode 100644 runtime/ftplugin/dts.vim create mode 100644 runtime/ftplugin/ondir.vim create mode 100644 runtime/ftplugin/requirements.vim create mode 100644 runtime/ftplugin/roc.vim create mode 100644 runtime/ftplugin/uci.vim create mode 100644 runtime/ftplugin/zathurarc.vim create mode 100644 runtime/indent/asm.vim create mode 100644 runtime/indent/astro.vim create mode 100644 runtime/indent/json5.vim create mode 100644 runtime/syntax/astro.vim create mode 100644 runtime/syntax/cgdbrc.vim create mode 100644 runtime/syntax/cmakecache.vim create mode 100644 runtime/syntax/ondir.vim create mode 100644 runtime/syntax/pandoc.vim create mode 100644 runtime/syntax/requirements.vim create mode 100644 runtime/syntax/testdir/dumps/java_comments_02.dump create mode 100644 runtime/syntax/testdir/dumps/java_comments_03.dump create mode 100644 runtime/syntax/testdir/dumps/java_comments_04.dump create mode 100644 runtime/syntax/testdir/dumps/java_contextual_keywords_00.dump create mode 100644 runtime/syntax/testdir/dumps/java_contextual_keywords_01.dump create mode 100644 runtime/syntax/testdir/dumps/java_contextual_keywords_02.dump create mode 100644 runtime/syntax/testdir/dumps/java_contextual_keywords_99.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent_00.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent_01.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent_02.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent_03.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent_99.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_style_00.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_style_01.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_style_02.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_style_03.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_style_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_keymap_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_keymap_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_keymap_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_legacy_header_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_legacy_header_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_legacy_header_fold_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_legacy_header_fold_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment-vim9_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment-vim9_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment-vim9_02.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment-vim9_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment_02.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_def_fold_07.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_def_nested_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_def_nested_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_def_nested_fold_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_def_nested_fold_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_def_nested_fold_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_function_fold_10.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_function_fold_11.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_function_fold_12.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_function_nested_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_function_nested_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_function_nested_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_function_nested_fold_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_function_nested_fold_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_function_nested_fold_02.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_function_nested_fold_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_object_methods_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_object_methods_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim_object_methods_02.dump create mode 100644 runtime/syntax/testdir/dumps/vim_object_methods_99.dump create mode 100644 runtime/syntax/testdir/dumps/yaml.yaml_00.dump create mode 100644 runtime/syntax/testdir/dumps/yaml.yaml_01.dump create mode 100644 runtime/syntax/testdir/dumps/yaml.yaml_02.dump create mode 100644 runtime/syntax/testdir/dumps/yaml.yaml_03.dump create mode 100644 runtime/syntax/testdir/dumps/yaml.yaml_04.dump create mode 100644 runtime/syntax/testdir/dumps/yaml.yaml_05.dump create mode 100644 runtime/syntax/testdir/dumps/yaml.yaml_06.dump create mode 100644 runtime/syntax/testdir/dumps/yaml.yaml_07.dump create mode 100644 runtime/syntax/testdir/dumps/yaml.yaml_08.dump create mode 100644 runtime/syntax/testdir/dumps/yaml.yaml_99.dump create mode 100644 runtime/syntax/testdir/dumps/yaml_00.dump create mode 100644 runtime/syntax/testdir/dumps/yaml_01.dump create mode 100644 runtime/syntax/testdir/dumps/yaml_02.dump create mode 100644 runtime/syntax/testdir/dumps/yaml_03.dump create mode 100644 runtime/syntax/testdir/dumps/yaml_04.dump create mode 100644 runtime/syntax/testdir/dumps/yaml_05.dump create mode 100644 runtime/syntax/testdir/dumps/yaml_06.dump create mode 100644 runtime/syntax/testdir/dumps/yaml_07.dump create mode 100644 runtime/syntax/testdir/dumps/yaml_99.dump create mode 100644 runtime/syntax/testdir/input/java_contextual_keywords.java create mode 100644 runtime/syntax/testdir/input/java_methods_indent.java create mode 100644 runtime/syntax/testdir/input/java_methods_style.java create mode 100644 runtime/syntax/testdir/input/vim9_keymap.vim create mode 100644 runtime/syntax/testdir/input/vim9_legacy_header.vim create mode 100644 runtime/syntax/testdir/input/vim9_legacy_header_fold.vim create mode 100644 runtime/syntax/testdir/input/vim_ex_comment-vim9.vim create mode 100644 runtime/syntax/testdir/input/vim_ex_comment.vim create mode 100644 runtime/syntax/testdir/input/vim_ex_def_nested.vim create mode 100644 runtime/syntax/testdir/input/vim_ex_def_nested_fold.vim create mode 100644 runtime/syntax/testdir/input/vim_ex_function_nested.vim create mode 100644 runtime/syntax/testdir/input/vim_ex_function_nested_fold.vim create mode 100644 runtime/syntax/testdir/input/vim_object_methods.vim create mode 100644 runtime/syntax/testdir/input/yaml.yaml create mode 100644 runtime/syntax/uci.vim create mode 100644 runtime/syntax/zathurarc.vim create mode 100644 src/testdir/dumps/Test_ambiwidth_hl_dump_1.dump create mode 100644 src/testdir/dumps/Test_ambiwidth_hl_dump_2.dump create mode 100644 src/testdir/dumps/Test_prop_normal_gj_gk_gM_with_outer_virtual_text_1.dump create mode 100644 src/testdir/dumps/Test_prop_normal_gj_gk_gM_with_outer_virtual_text_2.dump create mode 100644 src/testdir/dumps/Test_prop_normal_gj_gk_gM_with_outer_virtual_text_3.dump create mode 100644 src/testdir/dumps/Test_prop_normal_gj_gk_gM_with_outer_virtual_text_4.dump create mode 100644 src/testdir/dumps/Test_props_with_text_truncated_just_before_after_1.dump create mode 100644 src/testdir/dumps/Test_props_with_text_truncated_just_before_after_2.dump create mode 100644 src/testdir/dumps/Test_setcellwidths_with_non_ambiwidth_character_dump_1.dump create mode 100644 src/testdir/dumps/Test_setcellwidths_with_non_ambiwidth_character_dump_2.dump create mode 100644 src/testdir/test_vim9_enum.vim create mode 100644 src/testdir/test_xdg.vim mode change 100644 => 100755 tools/rename.bat diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f8ea87e..63d6735 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -105,6 +105,7 @@ runtime/compiler/zsh.vim @dkearns runtime/doc/ps1.txt @heaths runtime/ftplugin/abaqus.vim @costerwi runtime/ftplugin/apache.vim @dubgeiser +runtime/ftplugin/astro.vim @romainl runtime/ftplugin/awk.vim @dkearns runtime/ftplugin/basic.vim @dkearns runtime/ftplugin/bst.vim @tpope @@ -156,6 +157,7 @@ runtime/ftplugin/icon.vim @dkearns runtime/ftplugin/indent.vim @dkearns runtime/ftplugin/ishd.vim @dkearns runtime/ftplugin/j.vim @glts +runtime/ftplugin/java.vim @zzzyxwvut runtime/ftplugin/javascript.vim @dkearns runtime/ftplugin/javascriptreact.vim @dkearns runtime/ftplugin/json.vim @dbarnett @@ -222,6 +224,7 @@ runtime/ftplugin/typescript.vim @dkearns runtime/ftplugin/typescriptreact.vim @dkearns runtime/ftplugin/unison.vim @chuwy runtime/ftplugin/vdf.vim @ObserverOfTime +runtime/ftplugin/vim.vim @dkearns runtime/ftplugin/wast.vim @rhysd runtime/ftplugin/wget.vim @dkearns runtime/ftplugin/wget2.vim @dkearns @@ -230,6 +233,7 @@ runtime/ftplugin/xml.vim @chrisbra runtime/ftplugin/xs.vim @petdance runtime/ftplugin/zsh.vim @chrisbra runtime/import/dist/vimhighlight.vim @lacygoill +runtime/indent/astro.vim @wuelnerdotexe runtime/indent/basic.vim @dkearns runtime/indent/bst.vim @tpope runtime/indent/cdl.vim @dkearns @@ -323,6 +327,7 @@ runtime/syntax/asciidoc.vim @aerostitch runtime/syntax/asm.vim @dkearns runtime/syntax/asmh8300.vim @dkearns runtime/syntax/asterisk.vim @jaunis +runtime/syntax/astro.vim @wuelnerdotexe runtime/syntax/autohotkey.vim @mmikeww runtime/syntax/awk.vim @dkearns runtime/syntax/basic.vim @dkearns @@ -396,7 +401,7 @@ runtime/syntax/icon.vim @dkearns runtime/syntax/indent.vim @dkearns runtime/syntax/j.vim @glts runtime/syntax/jargon.vim @h3xx -runtime/syntax/java.vim @fleiner +runtime/syntax/java.vim @zzzyxwvut runtime/syntax/javascript.vim @fleiner runtime/syntax/jsonc.vim @izhakjakov runtime/syntax/julia.vim @carlobaldassi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0120c8f..0307b45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,6 +96,8 @@ jobs: - name: Install packages run: | + # This is added by default, and it is often broken, but we don't need anything from it + sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list PKGS=( \ gettext \ libgtk2.0-dev:${{ matrix.architecture }} \ @@ -129,6 +131,9 @@ jobs: - name: Install gcc-${{ env.GCC_VER }} if: matrix.compiler == 'gcc' run: | + # ubuntu-toolchain-r/test PPA for gcc-13 compiler + sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + sudo apt-get update -y sudo apt-get install -y gcc-${{ env.GCC_VER }}:${{ matrix.architecture }} sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_VER }} 100 sudo update-alternatives --set gcc /usr/bin/gcc-${{ env.GCC_VER }} @@ -313,7 +318,7 @@ jobs: fail-fast: false matrix: features: [tiny, normal, huge] - runner: [macos-latest, macos-14] + runner: [macos-12, macos-14] steps: - name: Checkout repository from github @@ -409,9 +414,11 @@ jobs: WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip # libsodium SODIUM_VER: '1.0.19' - SODIUM_MSVC_URL: https://download.libsodium.org/libsodium/releases/libsodium-%SODIUM_VER%-stable-msvc.zip + # SODIUM_MSVC_URL: https://download.libsodium.org/libsodium/releases/libsodium-%SODIUM_VER%-stable-msvc.zip + SODIUM_MSVC_URL: https://github.com/jedisct1/libsodium/releases/download/%SODIUM_VER%-RELEASE/libsodium-%SODIUM_VER%-msvc.zip SODIUM_MSVC_VER: v143 - SODIUM_MINGW_URL: https://download.libsodium.org/libsodium/releases/libsodium-%SODIUM_VER%-stable-mingw.tar.gz + # SODIUM_MINGW_URL: https://download.libsodium.org/libsodium/releases/libsodium-%SODIUM_VER%-stable-mingw.tar.gz + SODIUM_MINGW_URL: https://github.com/jedisct1/libsodium/releases/download/%SODIUM_VER%-RELEASE/libsodium-%SODIUM_VER%-mingw.tar.gz SODIUM_MINGW_VER: 26 # Escape sequences COL_RED: "\x1b[31m" diff --git a/.gitignore b/.gitignore index 5244447..241e96e 100644 --- a/.gitignore +++ b/.gitignore @@ -96,6 +96,7 @@ src/kword_test # Generated by "make install" runtime/doc/doctags +runtime/doc/tags-* # Temporarily generated by "runtime/syntax/generator/make" runtime/syntax/generator/generator.err diff --git a/.hgignore b/.hgignore index 14fc3ec..8b73f1b 100644 --- a/.hgignore +++ b/.hgignore @@ -98,6 +98,7 @@ src/kword_test # Generated by "make install" runtime/doc/doctags +runtime/doc/tags-* # Generated by "make shadow". The directory names could be anything but we # restrict them to shadow (the default) or shadow-* diff --git a/Filelist b/Filelist index b7b3907..57eb8dd 100644 --- a/Filelist +++ b/Filelist @@ -596,6 +596,7 @@ SRC_DOS = \ nsis/gvim_version.nsh \ nsis/README.txt \ nsis/lang/*.nsi \ + nsis/lang/README.txt \ uninstall.txt \ # Source files for MS Windows without CR/LF translation (also in the extra archive). @@ -1001,6 +1002,7 @@ IN_README_DIR = \ # Generic language files. LANG_GEN = \ + README.??x.txt \ runtime/doc/*-da.1 \ runtime/doc/*-da.UTF-8.1 \ runtime/doc/*-de.1 \ @@ -1016,6 +1018,7 @@ LANG_GEN = \ runtime/doc/*-ru.UTF-8.1 \ runtime/doc/*-tr.1 \ runtime/doc/*-tr.UTF-8.1 \ + runtime/doc/uganda.??x \ runtime/lang/README.txt \ runtime/lang/Makefile \ runtime/lang/Make_all.mak \ diff --git a/Makefile b/Makefile index 0d352eb..f4db80f 100644 --- a/Makefile +++ b/Makefile @@ -267,7 +267,7 @@ dist: # Copy README files to the top directory. prepare: if test -f runtime/doc/uganda.nsis.txt; then \ - rm runtime/doc/uganda.nsis.txt; fi + rm runtime/doc/uganda.nsis.???; fi for name in $(IN_README_DIR); do \ cp READMEdir/"$$name" .; \ done @@ -407,12 +407,8 @@ amisrc: dist prepare gzip -9 dist/vim$(VERSION)src.tar mv dist/vim$(VERSION)src.tar.gz dist/vim$(VERSION)src.tgz -no_title.vim: Makefile - echo "set notitle noicon nocp nomodeline viminfo=" >no_title.vim - # MS-DOS sources -dossrc: dist no_title.vim dist/$(COMMENT_SRC) \ - runtime/doc/uganda.nsis.txt \ +dossrc: dist dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt \ nsis/gvim_version.nsh -rm -rf dist/vim$(VERSION)src.zip -rm -rf dist/vim @@ -424,16 +420,14 @@ dossrc: dist no_title.vim dist/$(COMMENT_SRC) \ $(SRC_DOS_BIN) \ $(SRC_AMI_DOS) \ $(SRC_DOS_UNIX) \ - runtime/doc/uganda.nsis.txt \ + runtime/doc/uganda.nsis.??? \ nsis/gvim_version.nsh \ | (cd dist/vim/$(VIMRTDIR); tar xf -) mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR) rmdir dist/vim/$(VIMRTDIR)/runtime - # This file needs to be in dos fileformat for NSIS. - $(VIM) -e -X -u no_title.vim -c ":set tx|wq" dist/vim/$(VIMRTDIR)/doc/uganda.nsis.txt cd dist && zip -9 -rD -z vim$(VERSION)src.zip vim <$(COMMENT_SRC) -runtime/doc/uganda.nsis.txt: runtime/doc/uganda.txt +runtime/doc/uganda.nsis.txt: runtime/doc/uganda.??? cd runtime/doc && $(MAKE) uganda.nsis.txt nsis/gvim_version.nsh: Makefile @@ -450,7 +444,7 @@ dosrt: dist dist/$(COMMENT_RT) dosrt_files # Split in two parts to avoid an "argument list too long" error. # We no longer convert the files from unix to dos fileformat. -dosrt_files: dist prepare no_title.vim +dosrt_files: dist prepare -rm -rf dist/vim mkdir dist/vim mkdir dist/vim/$(VIMRTDIR) @@ -506,7 +500,7 @@ dosbin: prepare dosbin_gvim dosbin_w32 dosbin_ole $(DOSBIN_S) -rm $(IN_README_DIR) # make Win32 gvim -dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM) +dosbin_gvim: dist dist/$(COMMENT_GVIM) -rm -rf dist/gvim$(VERSION).zip -rm -rf dist/vim mkdir dist/vim @@ -528,7 +522,7 @@ dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM) cp gvim.pdb dist/gvim$(VERSION).pdb # make Win32 console -dosbin_w32: dist no_title.vim dist/$(COMMENT_W32) +dosbin_w32: dist dist/$(COMMENT_W32) -rm -rf dist/vim$(VERSION)w32.zip -rm -rf dist/vim mkdir dist/vim @@ -545,7 +539,7 @@ dosbin_w32: dist no_title.vim dist/$(COMMENT_W32) cp vimw32.pdb dist/vim$(VERSION)w32.pdb # make Win32 gvim with OLE -dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE) +dosbin_ole: dist dist/$(COMMENT_OLE) -rm -rf dist/gvim$(VERSION)ole.zip -rm -rf dist/vim mkdir dist/vim diff --git a/README.md b/README.md index 0f7f5da..6e6cf11 100644 --- a/README.md +++ b/README.md @@ -109,12 +109,12 @@ distribute it. ## Sponsoring Fixing bugs and adding new features takes a lot of time and effort. To show -your appreciation for the work and motivate Bram and others to continue -working on Vim please send a donation. +your appreciation for the work and motivate developers to continue working on +Vim please send a donation. -Since Bram is back to a paid job the money will now be used to help children -in Uganda. See [`runtime/doc/uganda.txt`](./runtime/doc/uganda.txt). But -at the same time donations increase Bram's motivation to keep working on Vim! +The money you donated will be mainly used to help children in Uganda. See +[`runtime/doc/uganda.txt`](./runtime/doc/uganda.txt). But at the same time +donations increase the development team motivation to keep working on Vim! For the most recent information about sponsoring look on the Vim web site: https://www.vim.org/sponsor/ @@ -126,7 +126,7 @@ If you would like to help make Vim better, see the ## Information -If you are on macOS, you can use [Macvim](https://macvim-dev.github.io/macvim/). +If you are on macOS, you can use [MacVim](https://macvim.org). The latest news about Vim can be found on the Vim home page: https://www.vim.org/ diff --git a/README.rux.txt b/README.rux.txt new file mode 100644 index 0000000..5c92b85 --- /dev/null +++ b/README.rux.txt @@ -0,0 +1,161 @@ +README.rux.txt для версии 9.1 программы Vim — Vi IMproved. + + +ЧТО ТАКОЕ РЕДАКТОР VIM? + +Программа Vim — это значительно улучшенная версия старого доброго редактора Vi +из системы UNIX. При разработке этого редактора было добавлено множество новых +возможностей: многоуровневая отмена изменений, подсветка синтаксиса, журнал +командной строки, интерактивная справка, проверка орфографии, подстановка +наименований файлов и команд, операции с произвольными блоками текста, +встроенный язык программирования и т. д. Также доступен графический интерфейс +пользователя (GUI). И при этом сохраняется совместимость с редактором Vi, +и те, у кого Vi «в крови», будут чувствовать себя как дома. Подробности о +различиях с редактором Vi см. в файле "runtime/doc/vi_diff.txt". + +Этот редактор очень удобен для работы с исходным кодом программ, а также +разного рода других текстовых файлов. Все команды вводятся набором обычных +символов клавиатуры, поэтому те, кто освоил десятипальцевый метод печати, могут +работать очень быстро. Кроме того, пользователи могут назначить на +функциональные клавиши клавиатуры необходимые команды, и использовать +манипулятор «мышь». + +Редактор Vim работает в ОС MS Windows (7, 8, 10, 11), macOS, Haiku, VMS и +практически во всех UNIX-подобных системах. А перенос на другие платформы не +должен представлять особой сложности. +Предыдущие версии редактора Vim работают в операционных системах OS/2, MS-DOS, +MS Windows 95/98/Me/NT/2000/XP/Vista, AmigaDOS, Atari MiNT, BeOS и RISC OS. +Но поддержка этих версий больше не осуществляется. + + +ПРЕДОСТАВЛЕНИЕ РЕДАКТОРА Vim + +Для установки редактора Vim можно воспользоваться привычным диспетчером пакетов. +В системах Mac и Linux уже предустановленна начальная версия программы Vim, +но вам все равно нужно установить редактор Vim, если вы хотите получить больше +возможностей. + +Существуют отдельные версии для Unix, PC, Amiga и некоторых других систем. +Данный файл README.rux.txt поставляется вместе с архивом рабочих файлов +программы. Этот архив включает в себя документацию, файлы подсветки синтаксиса +и другие файлы, которые используются редактором во время работы. Чтобы +запустить программу Vim, вы должны получить либо архив с исполняемыми файлами, +либо архив с исходным кодом. Какой из них вам нужен, зависит от того, на какой +системе вы хотите запустить редактор Vim, и есть ли для этой системы +исполняемые файлы или вы должны компилировать программу самостоятельно. +Чтобы узнать о доступных в настоящее время пакетах программы, посмотрите на +веб‐странице https://www.vim.org/download.php. + +Несколько полезных мест, где можно получить последнюю версию редактора Vim: +* Посмотрите в git-хранилище на GitHub: https://github.com/vim/vim. +* Получить исходный код в виде архива: https://github.com/vim/vim/releases. +* Получить исполняемый файл для ОС Windows из хранилища vim-win32-installer: +https://github.com/vim/vim-win32-installer/releases. + + +КОМПИЛЯЦИЯ РЕДАКТОРА Vim + +Если для вашей системы уже есть готовые исполняемые файлы, вам не нужно самому +компилировать редактор Vim. Если вы скачали архив с исходным кодом, то всё +необходимое для компиляции программы Vim находится в каталоге "src". +Инструкции смотрите в файле src/INSTALL. + + +УСТАНОВКА ПРОГРАММЫ Vim + +Инструкции для конкретной системы смотрите в одном из нижеуказанных файлов. +Или в каталоге READMEdir (на https://github.com/vim/vim), или в основном +каталоге (если вы распаковываете архив): + +README_ami.txt Amiga +README_unix.txt Unix +README_dos.txt MS-DOS и MS Windows +README_mac.txt Macintosh +README_haiku.txt Haiku +README_vms.txt VMS + +Существует ещё несколько файлов README_*.txt, в зависимости от предоставляемого +пакета. + + +ДОКУМЕНТАЦИЯ ПО РЕДАКТОРУ Vim + +Учебник Vim — это часовой практический курс для начинающих. Как правило, для +работы с ним нужно набрать команду "vimtutor". Чтобы получить дополнительную +информацию, смотрите раздел документации ":help tutor". + +Лучше всего воспользоваться командой ":help" в редакторе Vim. Если у вас ещё +нет исполняемого файла программы, прочитайте файл "runtime/doc/help.txt". +В нём содержатся отсылки на другие полезные файлы документации. Руководство +пользователя можно читать как книгу, и оно рекомендуется для обучения работе +с редактором Vim. Смотрите ":help user-manual". + + +ЛИЦЕНЗИОННЫЕ ПРАВА + +Редактор Vim является благотворительным программным обеспечением. +Использование и копирование программы Vim не ограничено, однако рекомендуется +сделать добровольное пожертвование для нуждающихся детей в Уганде. Чтобы узнать +подробности, прочитайте, пожалуйста, файл "runtime/doc/uganda.rux" (введите +команду ":help uganda" в редакторе Vim). + +Краткое описание лицензии. +Нет никаких ограничений на использование или распространение немодифицированной +копии программы Vim. Части программы Vim также могут предоставляться отдельно, +но текст лицензии Vim всегда должен быть включён в поставку. +Для модифицированных версий программы действует несколько ограничений. +Лицензия Vim совместима с лицензией GNU GPL, вы можете компилировать +и распространять программу Vim с библиотеками, лицензированными под GNU GPL. + + +ФИНАНСОВАЯ ПОДДЕРЖКА ДЛЯ РАЗРАБОТКИ РЕДАКТОРА Vim + +Устранение ошибок и добавление новых функциональных возможностей требует +вложения немалого количества времени и сил. Выразить признательность за труд +и подкрепить заинтересованность разработчиков программы в дальнейшей работе +над редактором Vim можно с помощью оказания финансовой поддержки. + +Пожертвованные вами деньги будут в основном направлены на оказание помощи детям +Уганды, см. "runtime/doc/uganda.rux". Однако в любом случае финансирование +будет способствовать повышению заинтересованности команды разработчиков +в продолжении работы над редактором Vim! + +Самая свежая информация об оказании финансовой поддержки публикуется на +веб-сайте программы Vim: + https://www.vim.org/sponsor/ + + +ПОМОЩЬ В РАЗРАБОТКЕ РЕДАКТОРА Vim + +Если вы хотите помочь сделать редактор Vim лучше, смотрите файл CONTRIBUTING.md. + + +ДОПОЛНИТЕЛЬНАЯ ИНФОРМАЦИЯ + +Для системе macOS вы може использовать MacVim: https://macvim.org + +Последние новости о редакторе Vim можно найти на его домашней странице: + https://www.vim.org/ + +Если у вас возникли вопросы, посмотрите полезные советы или документацию по +редактору Vim: + https://www.vim.org/docs.php + https://vim.fandom.com/wiki/Vim_Tips_Wiki + +Если у вас все ещё остались вопросы или есть сложности, воспользуйтесь одним +из списков рассылки, чтобы обсудить их с пользователями и разработчиками: + https://www.vim.org/maillist.php + +Если ничего не помогает, сообщайте об ошибках непосредственно в список рассылки +vim-dev: + + + +ОСНОВНОЙ АВТОР ПРОГРАММЫ + +Большая часть редактора Vim была создана Брамом Моленаром , +см. ":help Bram-Moolenaar" + +Присылайте все прочие комментарии, исправления, цветы и предложения в список +рассылки vim-dev: + diff --git a/README.txt b/README.txt index 5128afd..bdfefaf 100644 --- a/README.txt +++ b/README.txt @@ -6,10 +6,9 @@ WHAT IS VIM? Vim is a greatly improved version of the good old UNIX editor Vi. Many new features have been added: multi-level undo, syntax highlighting, command line history, on-line help, spell checking, filename completion, block operations, -script language, etc. There is also a Graphical User Interface (GUI) -available. Still, Vi compatibility is maintained, those who have Vi "in the -fingers" will feel at home. See "runtime/doc/vi_diff.txt" for differences with -Vi. +script language, etc. There is also a Graphical User Interface (GUI) available. +Still, Vi compatibility is maintained, those who have Vi "in the fingers" will +feel at home. See "runtime/doc/vi_diff.txt" for differences with Vi. This editor is very useful for editing programs and other plain text files. All commands are given with normal keyboard characters, so those who can type @@ -60,9 +59,10 @@ README_ami.txt Amiga README_unix.txt Unix README_dos.txt MS-DOS and MS-Windows README_mac.txt Macintosh +README_haiku.txt Haiku README_vms.txt VMS -There are more README_*.txt files, depending on the distribution you used. +There are other README_*.txt files, depending on the distribution you used. DOCUMENTATION @@ -71,9 +71,9 @@ The Vim tutor is a one hour training course for beginners. Often it can be started as "vimtutor". See ":help tutor" for more information. The best is to use ":help" in Vim. If you don't have an executable yet, read -"runtime/doc/help.txt". It contains pointers to the other documentation -files. The User Manual reads like a book and is recommended to learn to use -Vim. See ":help user-manual". +"runtime/doc/help.txt". It contains pointers to the other documentation files. +The User Manual reads like a book and is recommended to learn to use Vim. See +":help user-manual". COPYING @@ -92,15 +92,14 @@ distribute it. SPONSORING Fixing bugs and adding new features takes a lot of time and effort. To show -your appreciation for the work and motivate Bram and others to continue -working on Vim please send a donation. +your appreciation for the work and motivate developers to continue working on +Vim please send a donation. -Since Bram is back to a paid job the money will now be used to help children -in Uganda. See runtime/doc/uganda.txt. But at the same time donations -increase Bram's motivation to keep working on Vim! +The money you donated will be mainly used to help children in Uganda. See +"runtime/doc/uganda.txt". But at the same time donations increase the +development team motivation to keep working on Vim! For the most recent information about sponsoring look on the Vim web site: - https://www.vim.org/sponsor/ @@ -111,6 +110,8 @@ If you would like to help make Vim better, see the CONTRIBUTING.md file. INFORMATION +If you are on macOS, you can use MacVim: https://macvim.org + The latest news about Vim can be found on the Vim home page: https://www.vim.org/ @@ -118,8 +119,8 @@ If you have problems, have a look at the Vim documentation or tips: https://www.vim.org/docs.php https://vim.fandom.com/wiki/Vim_Tips_Wiki -If you still have problems or any other questions, use one of the mailing -lists to discuss them with Vim users and developers: +If you still have problems or any other questions, use one of the mailing lists +to discuss them with Vim users and developers: https://www.vim.org/maillist.php If nothing else works, report bugs directly to the vim-dev mailing list: @@ -128,8 +129,7 @@ If nothing else works, report bugs directly to the vim-dev mailing list: MAIN AUTHOR -Most of Vim was created by Bram Moolenaar |Bram-Moolenaar| +Most of Vim was created by Bram Moolenaar , ":help Bram-Moolenaar" -Send any other comments, patches, flowers and suggestions to the vim-dev mailing list: - - +Send any other comments, patches, flowers and suggestions to the vim-dev +mailing list: diff --git a/nsis/README.txt b/nsis/README.txt index a47201c..79c1952 100644 --- a/nsis/README.txt +++ b/nsis/README.txt @@ -1,7 +1,7 @@ -This builds a one-click install for Vim for Win32 using the Nullsoft +This builds a one-click install for Vim for MS Windows using the Nullsoft Installation System (NSIS), available at http://nsis.sourceforge.net/ -To build the installable .exe: +To build the installable .exe file: 1. Unpack three archives: PC sources @@ -16,10 +16,9 @@ To build the installable .exe: install.exe, uninstall.exe, tee/tee.exe, - xxd/xxd.exe, + xxd/xxd.exe - Then execute tools/rename.bat to rename the executables. (mv command is - required.) + Then execute tools/rename.bat to rename the executables. 3. Go to the GvimExt directory and build gvimext.dll (or get it from a binary archive). Both 64- and 32-bit versions are needed and should be placed @@ -28,14 +27,22 @@ To build the installable .exe: 32-bit: src/GvimExt/gvimext.dll 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 "vim91" directory, - it's the same for all Vim versions). + be used (which is fine for most users). You can find one in previous Vim versions or in this archive: - http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz - -5. Also put "winpty32.dll" and "winpty-agent.exe" in "../.." (above the "vim91" - directory). This is required for the terminal window. + https://www.mediafire.com/file/9edk4g3xvfgzby0/diff4Vim.zip/file + When will you have "diff.exe" put it in the "../.." directory (above the + "vim91" directory, it's the same for all Vim versions). However, you can + specify another directory by passing /DVIMTOOLS= option to the + "makensis.exe" program via the command line. + +5. For the terminal window to work in Vim, the library winpty is required. + You can get it at the following url: + https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip + For the 32-bit version, rename "winpty.dll" from ia32/bin to "winpty32.dll", + and for the 64-bit version — "winpty.dll" from x64/bin to "winpty64.dll". + Put the renamed file and "winpty-agent.exe" in "../.." (above the "vim91" + directory). However, you can specify another directory by passing + /DVIMTOOLS= option to the "makensis.exe" program via the command line. 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 @@ -43,10 +50,12 @@ To build the installable .exe: 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"). + "winpty{32|64}.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. On MS Windows do "nmake.exe -f Make_mvc.mak uganda.nsis.txt" in runtime/doc. + On Unix-like system do "make runtime/doc/uganda.nsis.txt" in top directory + or "make uganda.nsis.txt" in runtime/doc. The created files + "uganda.nsis.???" will be automatically converted to DOS file format. 8. Get gettext and iconv DLLs from the following site: https://github.com/mlocati/gettext-iconv-windows/releases @@ -61,25 +70,39 @@ To build the installable .exe: | libiconv-2.dll | libgcc_s_sjlj-1.dll | - ` gettext64/ + + gettext64/ libintl-8.dll libiconv-2.dll - The default is "..", however, you can change it by - passing /DGETTEXT=... option to the makensis command. + The default is "..", however, you can specify another + directory by passing /DGETTEXT= option to "makensis.exe" program via + the command line. Install NSIS if you didn't do that already. -Also install UPX, if you want a compressed file. -Download and include the ShellExecAsUser.dll Unicode version which can be -sourced from: https://nsis.sourceforge.io/ShellExecAsUser_plug-in +Download Unicode version the ShellExecAsUser plug-in for NSIS from: + https://nsis.sourceforge.io/ShellExecAsUser_plug-in +and put ShellExecAsUser.dll to path\to\NSIS\Plugins\x86-unicode Unpack the images: cd nsis - unzip icons.zip + unzip icons.zip or 7z x icons.zip (on Unix-like or MS Windows) + WinRar.exe x icons.zip (on MS Windows) Then build gvim.exe: - cd nsis - makensis gvim.nsi + makensis.exe [options] gvim.nsi + +Options (not mandatory): + /DVIMSRC= — directory where location of gvim_ole.exe, vimw32.exe, + GvimExt/*, etc. + /DVIMRT= — directory where location of runtime files + /DVIMTOOLS= — directory where location of extra tools: diff.exe, + winpty{32|64}.dll, winpty-agent.exe, libsodium.dll + /DGETTEXT= — directory where location of gettext libraries + /DHAVE_UPX=1 — additional compression of the installer. UPX program + must be installed. + /DHAVE_NLS=0 — do not add native language support + /DHAVE_MULTI_LANG=0 — to create an English-only the installer + /DWIN64=1 — to create a 64-bit the installer diff --git a/nsis/gvim.nsi b/nsis/gvim.nsi index ec65361..31f6260 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: 2024 Mar 17 +# Last Change: 2024 Mar 20 Unicode true @@ -17,7 +17,7 @@ Unicode true !define VIMRT ".." !endif -# Location of extra tools: diff.exe +# Location of extra tools: diff.exe, winpty{32|64}.dll, winpty-agent.exe, etc. !ifndef VIMTOOLS !define VIMTOOLS ..\.. !endif @@ -29,29 +29,40 @@ Unicode true !define GETTEXT ${VIMRT} !endif -# Comment the next line if you don't have UPX. -# Get it at https://upx.github.io/ -!define HAVE_UPX +# If you have UPX, use the switch /DHAVE_UPX=1 on the command line makensis.exe. +# This property will be set to 1. Get it at https://upx.github.io/ +!ifndef HAVE_UPX + !define HAVE_UPX 0 +!endif -# Comment the next line if you do not want to add Native Language Support -!define HAVE_NLS +# If you do not want to add Native Language Support, use the switch /DHAVE_NLS=0 +# in the command line makensis.exe. This property will be set to 0. +!ifndef HAVE_NLS + !define HAVE_NLS 1 +!endif -# Comment the following line to create an English-only installer: -!define HAVE_MULTI_LANG +# To create an English-only the installer, use the switch /DHAVE_MULTI_LANG=0 on +# the command line makensis.exe. This property will be set to 0. +!ifndef HAVE_MULTI_LANG + !define HAVE_MULTI_LANG 1 +!endif -# Uncomment the next line if you want to create a 64-bit installer. -#!define WIN64 +# if you want to create a 64-bit the installer, use the switch /DWIN64=1 on +# the command line makensis.exe. This property will be set to 1. +!ifndef WIN64 + !define WIN64 0 +!endif !include gvim_version.nsh # for version number -# Definition of Patch for Vim +# Definition of Patch for Vim. !ifndef PATCHLEVEL !define PATCHLEVEL 0 !endif # ----------- No configurable settings below this line ----------- -!include "Library.nsh" # For DLL install +!include "Library.nsh" # for DLL install !include "LogicLib.nsh" !include "MUI2.nsh" !include "nsDialogs.nsh" @@ -93,7 +104,7 @@ Unicode true !define UNINST_REG_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall" !define UNINST_REG_KEY_VIM "${UNINST_REG_KEY}\${PRODUCT}" -!ifdef WIN64 +!if ${WIN64} Name "${PRODUCT} (x64)" !else Name "${PRODUCT}" @@ -106,11 +117,11 @@ ManifestDPIAware true SetDatablockOptimize on RequestExecutionLevel highest -!ifdef HAVE_UPX +!if ${HAVE_UPX} !packhdr temp.dat "upx --best --compress-icons=1 temp.dat" !endif -!ifdef WIN64 +!if ${WIN64} !define BIT 64 !else !define BIT 32 @@ -127,6 +138,8 @@ RequestExecutionLevel highest # Show all languages, despite user's codepage: !define MUI_LANGDLL_ALLLANGUAGES +# Always show dialog choice language +#!define MUI_LANGDLL_ALWAYSSHOW !define MUI_LANGDLL_REGISTRY_ROOT "HKCU" !define MUI_LANGDLL_REGISTRY_KEY "Software\Vim" !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language" @@ -144,13 +157,13 @@ RequestExecutionLevel highest !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_LICENSEPAGE_CHECKBOX -!define MUI_FINISHPAGE_RUN -!define MUI_FINISHPAGE_RUN_FUNCTION LaunchApplication -!define MUI_FINISHPAGE_RUN_TEXT $(str_show_readme) +!define MUI_FINISHPAGE_SHOWREADME +!define MUI_FINISHPAGE_SHOWREADME_TEXT $(str_show_readme) +!define MUI_FINISHPAGE_SHOWREADME_FUNCTION LaunchApplication # This adds '\Vim' to the user choice automagically. The actual value is # obtained below with CheckOldVim. -!ifdef WIN64 +!if ${WIN64} !define DEFAULT_INSTDIR "$PROGRAMFILES64\Vim" !else !define DEFAULT_INSTDIR "$PROGRAMFILES\Vim" @@ -170,7 +183,7 @@ SilentInstall normal # Installer pages !insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_LICENSE "${VIMRT}\doc\uganda.nsis.txt" +!insertmacro MUI_PAGE_LICENSE $(page_lic_file) !insertmacro MUI_PAGE_COMPONENTS Page custom SetCustom ValidateCustom #!define MUI_PAGE_CUSTOMFUNCTION_LEAVE VimFinalCheck @@ -194,7 +207,7 @@ Page custom SetCustom ValidateCustom !include "lang\english.nsi" # Include support for other languages: -!ifdef HAVE_MULTI_LANG +!if ${HAVE_MULTI_LANG} !include "lang\danish.nsi" !include "lang\dutch.nsi" !include "lang\german.nsi" @@ -212,7 +225,7 @@ Page custom SetCustom ValidateCustom # Version resources VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Vim" -VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Vim Developers" +VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The Vim Project" VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Vim" VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright (C) 1996" VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Vi Improved - A Text Editor" @@ -352,7 +365,7 @@ FunctionEnd Function LaunchApplication SetOutPath $0 - ShellExecAsUser::ShellExecAsUser "" "$0\gvim.exe" '-R "$0\README.txt"' + ShellExecAsUser::ShellExecAsUser "" "$0\gvim.exe" '-R "$0\$(vim_readme_file)"' FunctionEnd ########################################################## @@ -598,10 +611,114 @@ SectionGroup $(str_group_plugin) id_group_plugin SectionGroupEnd ########################################################## -!ifdef HAVE_NLS +!if ${HAVE_NLS} Section "$(str_section_nls)" id_section_nls SectionIn 1 3 +#; FIXME: When adding new translations, do not forget to make changes here. + SetOutPath $0 +!if /FileExists ..\README.dax.txt + ${If} $Language = ${LANG_DANISH} + File ..\README.dax.txt + ${EndIf} +!endif +!if /FileExists ..\README.nlx.txt + ${If} $Language = ${LANG_DUTCH} + File ..\README.nlx.txt + ${EndIf} +!endif +!if /FileExists ..\README.dex.txt + ${If} $Language = ${LANG_GERMAN} + File ..\README.dex.txt + ${EndIf} +!endif +!if /FileExists ..\README.itx.txt + ${If} $Language = ${LANG_ITALIAN} + File ..\README.itx.txt + ${EndIf} +!endif +!if /FileExists ..\README.jax.txt + ${If} $Language = ${LANG_JAPANESE} + File ..\README.jax.txt + ${EndIf} +!endif +!if /FileExists ..\README.rux.txt + ${If} $Language = ${LANG_RUSSIAN} + File ..\README.rux.txt + ${EndIf} +!endif +!if /FileExists ..\README.srx.txt + ${If} $Language = ${LANG_SERBIAN} + File ..\README.srx.txt + ${EndIf} +!endif +!if /FileExists ..\README.cnx.txt + ${If} $Language = ${LANG_SIMPCHINESE} + File ..\README.cnx.txt + ${EndIf} +!endif +!if /FileExists ..\README.twx.txt + ${If} $Language = ${LANG_TRADCHINESE} + File ..\README.twx.txt + ${EndIf} +!endif +!if /FileExists ..\README.trx.txt + ${OrIf} $Language = ${LANG_TURKISH} + File ..\README.trx.txt + ${EndIf} +!endif +#; FIXME: When adding new translations, do not forget to make changes here. + SetOutPath $0\doc +!if /FileExists "${VIMRT}\doc\uganda.dax" + ${If} $Language = ${LANG_DANISH} + File ${VIMRT}\doc\uganda.dax + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.nlx" + ${If} $Language = ${LANG_DUTCH} + File ${VIMRT}\doc\uganda.nlx + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.dex" + ${If} $Language = ${LANG_GERMAN} + File ${VIMRT}\doc\uganda.dex + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.itx" + ${If} $Language = ${LANG_ITALIAN} + File ${VIMRT}\doc\uganda.itx + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.jax" + ${If} $Language = ${LANG_JAPANESE} + File ${VIMRT}\doc\uganda.jax + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.rux" + ${If} $Language = ${LANG_RUSSIAN} + File ${VIMRT}\doc\uganda.rux + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.srx" + ${If} $Language = ${LANG_SERBIAN} + File ${VIMRT}\doc\uganda.srx + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.cnx" + ${If} $Language = ${LANG_SIMPCHINESE} + File ${VIMRT}\doc\uganda.cnx + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.twx" + ${If} $Language = ${LANG_TRADCHINESE} + File ${VIMRT}\doc\uganda.twx + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.trx" + ${If} $Language = ${LANG_TURKISH} + File ${VIMRT}\doc\uganda.trx + ${EndIf} +!endif SetOutPath $0\lang File /r /x Makefile ${VIMRT}\lang\*.* SetOutPath $0 @@ -611,12 +728,12 @@ Section "$(str_section_nls)" id_section_nls !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ "${GETTEXT}\gettext${BIT}\libiconv-2.dll" \ "$0\libiconv-2.dll" "$0" - !if /FileExists "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" - # Install libgcc_s_sjlj-1.dll only if it is needed. - !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ - "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" \ - "$0\libgcc_s_sjlj-1.dll" "$0" - !endif +# Install libgcc_s_sjlj-1.dll only if it is needed. +# !if /FileExists "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" +# !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ +# "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" \ +# "$0\libgcc_s_sjlj-1.dll" "$0" +# !endif ${If} ${SectionIsSelected} ${id_section_editwith} ${If} ${RunningX64} @@ -642,12 +759,12 @@ Section "$(str_section_nls)" id_section_nls !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ "${GETTEXT}\gettext32\libiconv-2.dll" \ "$0\GvimExt32\libiconv-2.dll" "$0\GvimExt32" - !if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" - # Install libgcc_s_sjlj-1.dll only if it is needed. - !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ - "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" \ - "$0\GvimExt32\libgcc_s_sjlj-1.dll" "$0\GvimExt32" - !endif +# Install libgcc_s_sjlj-1.dll only if it is needed. +# !if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" +# !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ +# "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" \ +# "$0\GvimExt32\libgcc_s_sjlj-1.dll" "$0\GvimExt32" +# !endif ${EndIf} SectionEnd !endif @@ -688,7 +805,7 @@ Section -post SectionGetSize ${id_section_editwith} $4 IntOp $3 $3 + $4 ${EndIf} -!ifdef HAVE_NLS +!if ${HAVE_NLS} ${If} ${SectionIsSelected} ${id_section_nls} SectionGetSize ${id_section_nls} $4 IntOp $3 $3 + $4 @@ -718,7 +835,7 @@ Section -post !insertmacro SaveSectionSelection ${id_section_vimrc} "select_vimrc" !insertmacro SaveSectionSelection ${id_section_pluginhome} "select_pluginhome" !insertmacro SaveSectionSelection ${id_section_pluginvim} "select_pluginvim" -!ifdef HAVE_NLS +!if ${HAVE_NLS} !insertmacro SaveSectionSelection ${id_section_nls} "select_nls" !endif ${If} ${RunningX64} @@ -751,7 +868,7 @@ SectionEnd !macroend Function .onInit -!ifdef HAVE_MULTI_LANG +!if ${HAVE_MULTI_LANG} # Select a language (or read from the registry). !insertmacro MUI_LANGDLL_DISPLAY !endif @@ -789,7 +906,7 @@ Function .onInit !insertmacro LoadSectionSelection ${id_section_vimrc} "select_vimrc" !insertmacro LoadSectionSelection ${id_section_pluginhome} "select_pluginhome" !insertmacro LoadSectionSelection ${id_section_pluginvim} "select_pluginvim" -!ifdef HAVE_NLS +!if ${HAVE_NLS} !insertmacro LoadSectionSelection ${id_section_nls} "select_nls" !endif # Load the default _vimrc settings from the registry (if any). @@ -847,12 +964,12 @@ Function SetCustom # 1st group - Compatibility - ${NSD_CreateGroupBox} 0 0 100% 32% $(str_msg_compat_title) + ${NSD_CreateGroupBox} 0u 0u 296u 44u $(str_msg_compat_title) Pop $3 - ${NSD_CreateLabel} 5% 10% 35% 8% $(str_msg_compat_desc) + ${NSD_CreateLabel} 16u 14u 269u 10u $(str_msg_compat_desc) Pop $3 - ${NSD_CreateDropList} 18% 19% 75% 8% "" + ${NSD_CreateDropList} 42u 26u 237u 13u "" Pop $vim_nsd_compat ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_vi) ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_vim) @@ -872,12 +989,12 @@ Function SetCustom # 2nd group - Key remapping - ${NSD_CreateGroupBox} 0 35% 100% 31% $(str_msg_keymap_title) + ${NSD_CreateGroupBox} 0u 48u 296u 44u $(str_msg_keymap_title) Pop $3 - ${NSD_CreateLabel} 5% 45% 90% 8% $(str_msg_keymap_desc) + ${NSD_CreateLabel} 16u 62u 269u 10u $(str_msg_keymap_desc) Pop $3 - ${NSD_CreateDropList} 38% 54% 55% 8% "" + ${NSD_CreateDropList} 42u 74u 236u 13u "" Pop $vim_nsd_keymap ${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_default) ${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_windows) @@ -891,12 +1008,12 @@ Function SetCustom # 3rd group - Mouse behavior - ${NSD_CreateGroupBox} 0 69% 100% 31% $(str_msg_mouse_title) + ${NSD_CreateGroupBox} 0u 95u 296u 44u $(str_msg_mouse_title) Pop $3 - ${NSD_CreateLabel} 5% 79% 90% 8% $(str_msg_mouse_desc) + ${NSD_CreateLabel} 16u 108u 269u 10u $(str_msg_mouse_desc) Pop $3 - ${NSD_CreateDropList} 23% 87% 70% 8% "" + ${NSD_CreateDropList} 42u 121u 237u 13u "" Pop $vim_nsd_mouse ${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_default) ${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_windows) @@ -963,7 +1080,7 @@ FunctionEnd !insertmacro MUI_DESCRIPTION_TEXT ${id_group_plugin} $(str_desc_plugin) !insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginhome} $(str_desc_plugin_home) !insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginvim} $(str_desc_plugin_vim) -!ifdef HAVE_NLS +!if ${HAVE_NLS} !insertmacro MUI_DESCRIPTION_TEXT ${id_section_nls} $(str_desc_nls) !endif !insertmacro MUI_FUNCTION_DESCRIPTION_END @@ -973,7 +1090,7 @@ FunctionEnd # Uninstaller Functions and Sections Function un.onInit -!ifdef HAVE_MULTI_LANG +!if ${HAVE_MULTI_LANG} # Get the language from the registry. !insertmacro MUI_UNGETLANGUAGE !endif diff --git a/nsis/lang/README.txt b/nsis/lang/README.txt new file mode 100644 index 0000000..68ff112 --- /dev/null +++ b/nsis/lang/README.txt @@ -0,0 +1,34 @@ +This directory contains a file with text strings for gVim installer. +It also contains files with translations of the text strings for gVim installer +into different languages. + +For translators. + +If you want to prepare a translation for the gVim installer, use the file +"english.nsi" as a master file. See the other translation files in this +directory. +Note that in the definition of the MUI_LANGUAGE macro, the name of the language +to be translated must be the English name of the language. +The name of the file with the translation must match the name of the target +language. +Also, when translating strings, pay attention to some restrictions on the +allowable length of strings. For example: + component description field - 117 characters; + description above the drop-down lists on the .vimrc page - 53 characters; + drop-down lists on the .vimrc page - 55 characters. +Characters in this case mean characters of the English alphabet. + +If you do not yet have a translated "uganda.txt" file and a main "README.txt" +file, set the following values: + +for the license file +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" + +for the readme.txt file +LangString vim_readme_file 0 "README.txt" + +Once you have the translations of these files, then set the values for these +variables similarly to what is done in the other translation files. +Also add the appropriate entries to the "gvim.nsi" file as done for other +languages. + diff --git a/nsis/lang/danish.nsi b/nsis/lang/danish.nsi index b365413..ceb18be 100644 --- a/nsis/lang/danish.nsi +++ b/nsis/lang/danish.nsi @@ -3,6 +3,7 @@ # danish.nsi: Danish language strings for gvim NSIS installer. # # Locale ID : 1030 +# Locale Name : da # fileencoding : UTF-8 # Author : scootergrisen @@ -14,6 +15,20 @@ LangString ^SetupCaption ${LANG_DANISH} "$(^Name) Setup" LangString ^UninstallCaption ${LANG_DANISH} "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_DANISH} "${VIMRT}\doc\uganda.nsis.dax" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_DANISH} "README.dax.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/dutch.nsi b/nsis/lang/dutch.nsi index 1d13224..49b1ed0 100644 --- a/nsis/lang/dutch.nsi +++ b/nsis/lang/dutch.nsi @@ -17,6 +17,20 @@ LangString ^SetupCaption ${LANG_DUTCH} \ LangString ^UninstallCaption ${LANG_DUTCH} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_DUTCH} "${VIMRT}\doc\uganda.nsis.nlx" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_DUTCH} "README.nlx.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/english.nsi b/nsis/lang/english.nsi index e1be985..6f69f58 100644 --- a/nsis/lang/english.nsi +++ b/nsis/lang/english.nsi @@ -3,6 +3,7 @@ # english.nsi: English language strings for gvim NSIS installer. # # Locale ID : 1033 +# Locale Name : en # fileencoding : UTF-8 # Author : Guopeng Wen, Ken Takata @@ -16,6 +17,18 @@ LangString ^SetupCaption ${LANG_ENGLISH} \ LangString ^UninstallCaption ${LANG_ENGLISH} \ "$(^Name) Uninstall" +############################################################################## +# License file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file ${LANG_ENGLISH} "${VIMRT}\doc\uganda.nsis.txt" + +############################################################################## +# README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file ${LANG_ENGLISH} "README.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/german.nsi b/nsis/lang/german.nsi index b976ef4..21cf80e 100644 --- a/nsis/lang/german.nsi +++ b/nsis/lang/german.nsi @@ -3,6 +3,7 @@ # german.nsi : German language strings for gvim NSIS installer. # # Locale ID : 1031 +# Locale Name : de # fileencoding : UTF-8 # Author : Christian Brabandt, tux @@ -16,6 +17,20 @@ LangString ^SetupCaption ${LANG_GERMAN} \ LangString ^UninstallCaption ${LANG_GERMAN} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_GERMAN} "${VIMRT}\doc\uganda.nsis.dex" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_GERMAN} "README.dex.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/greek.nsi b/nsis/lang/greek.nsi index 5175dd5..b92d3f3 100644 --- a/nsis/lang/greek.nsi +++ b/nsis/lang/greek.nsi @@ -3,6 +3,7 @@ # greek.nsi: Greek language strings for gvim NSIS installer. # # Locale ID : 1032 +# Locale Name : el # fileencoding : UTF-8 # Author : Christos Longros @@ -16,6 +17,20 @@ LangString ^SetupCaption ${LANG_GREEK} \ LangString ^UninstallCaption ${LANG_GREEK} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_GREEK} "${VIMRT}\doc\uganda.nsis.elx" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_GREEK} "README.elx.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/italian.nsi b/nsis/lang/italian.nsi index 029737f..5f32680 100644 --- a/nsis/lang/italian.nsi +++ b/nsis/lang/italian.nsi @@ -3,6 +3,7 @@ # italian.nsi : Italian language strings for gvim NSIS installer. # # Locale ID : 1040 +# Locale Name : it # fileencoding : UTF-8 # Author : Antonio Colombo, bovirus - revision: 12.05.2023 @@ -16,6 +17,20 @@ LangString ^SetupCaption ${LANG_ITALIAN} \ LangString ^UninstallCaption ${LANG_ITALIAN} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_ITALIAN} "${VIMRT}\doc\uganda.nsis.itx" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_ITALIAN} "README.itx.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/japanese.nsi b/nsis/lang/japanese.nsi index 58f4dcc..d290355 100644 --- a/nsis/lang/japanese.nsi +++ b/nsis/lang/japanese.nsi @@ -3,6 +3,7 @@ # japanese.nsi: Japanese language strings for gvim NSIS installer. # # Locale ID : 1041 +# Locale Name : ja # fileencoding : UTF-8 # Author : Ken Takata @@ -26,6 +27,20 @@ LangString ^SpaceRequired ${LANG_JAPANESE} \ LangString ^InstallBtn ${LANG_JAPANESE} \ "インストール(&I)" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_JAPANESE} "${VIMRT}\doc\uganda.nsis.jax" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_JAPANESE} "README.jax.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/russian.nsi b/nsis/lang/russian.nsi index e4b01e3..876bef2 100644 --- a/nsis/lang/russian.nsi +++ b/nsis/lang/russian.nsi @@ -3,7 +3,7 @@ # russian.nsi: Russian language strings for gvim NSIS installer. # # Locale ID : 1049 -# Locale name : ru-RU +# Locale name : ru # fileencoding : UTF-8 # Author : Restorer @@ -17,6 +17,18 @@ LangString ^SetupCaption ${LANG_RUSSIAN} \ LangString ^UninstallCaption ${LANG_RUSSIAN} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file ${LANG_RUSSIAN} "${VIMRT}\doc\uganda.nsis.rux" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file ${LANG_RUSSIAN} "README.rux.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/serbian.nsi b/nsis/lang/serbian.nsi index 11d889a..122727d 100644 --- a/nsis/lang/serbian.nsi +++ b/nsis/lang/serbian.nsi @@ -3,6 +3,7 @@ # serbian.nsi: Serbian language strings for gvim NSIS installer. # # Locale ID : 3098 +# Locale Name : sr # fileencoding : UTF-8 # Author : Ivan Pešić @@ -16,6 +17,20 @@ LangString ^SetupCaption ${LANG_SERBIAN} \ LangString ^UninstallCaption ${LANG_SERBIAN} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_SERBIAN} "${VIMRT}\doc\uganda.nsis.srx" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_SERBIAN} "README.srx.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/simpchinese.nsi b/nsis/lang/simpchinese.nsi index 2c80054..8d2d073 100644 --- a/nsis/lang/simpchinese.nsi +++ b/nsis/lang/simpchinese.nsi @@ -4,6 +4,7 @@ # installer. # # Locale ID : 2052 +# Locale Name : cn # fileencoding : UTF-8 # Author : Guopeng Wen, David Liu @@ -17,6 +18,21 @@ LangString ^SetupCaption ${LANG_SIMPCHINESE} \ LangString ^UninstallCaption ${LANG_SIMPCHINESE} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_SIMPCHINESE} \ +# "${VIMRT}\doc\uganda.nsis.cnx" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_SIMPCHINESE} "README.cnx.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/tradchinese.nsi b/nsis/lang/tradchinese.nsi index 16b6747..66bb1b8 100644 --- a/nsis/lang/tradchinese.nsi +++ b/nsis/lang/tradchinese.nsi @@ -4,6 +4,7 @@ # installer. # # Locale ID : 1028 +# Locale Name : tw # fileencoding : UTF-8 # Author : Guopeng Wen @@ -17,6 +18,21 @@ LangString ^SetupCaption ${LANG_TRADCHINESE} \ LangString ^UninstallCaption ${LANG_TRADCHINESE} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_TRADCHINESE} \ +# "${VIMRT}\doc\uganda.nsis.twx" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_TRADCHINESE} "README.twx.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/turkish.nsi b/nsis/lang/turkish.nsi index 1046b81..429cbb3 100644 --- a/nsis/lang/turkish.nsi +++ b/nsis/lang/turkish.nsi @@ -1,4 +1,9 @@ +# vi:set ts=8 sts=4 sw=4 et fdm=marker: +# # turkish.nsi: Turkish language strings for gvim NSIS installer. +# +# Locale ID : 1055 +# Locale Name : tr # fileencoding : UTF-8 # Author : Emir SARI @@ -11,6 +16,22 @@ LangString ^SetupCaption ${LANG_TURKISH} \ LangString ^UninstallCaption ${LANG_TURKISH} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_TURKISH} "${VIMRT}\doc\uganda.nsis.trx" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_TURKISH} "README.trx.txt" + +############################################################################## + LangString str_show_readme ${LANG_TURKISH} \ "Kurulum bittikten sonra README dosyasını aç" diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 1462830..4e7d517 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -10,7 +10,9 @@ vim9script # faster. export def Check_inp() - if getline(1) =~ '^\*' + if getline(1) =~ '%%' + setf tex + elseif getline(1) =~ '^\*' setf abaqus else var n = 1 @@ -280,6 +282,10 @@ export def DtraceCheck() enddef export def FTdef() + # LaTeX def files are usually generated by docstrip, which will output '%%' in first line + if getline(1) =~ '%%' + setf tex + endif if get(g:, "filetype_def", "") == "modula2" || IsModula2() SetFiletypeModula2() return @@ -1292,5 +1298,21 @@ export def FTvba() endif enddef +export def Detect_UCI_statements(): bool + # Match a config or package statement at the start of the line. + const config_or_package_statement = '^\s*\(\(c\|config\)\|\(p\|package\)\)\s\+\S' + # Match a line that is either all blank or blank followed by a comment + const comment_or_blank = '^\s*\(#.*\)\?$' + + # Return true iff the file has a config or package statement near the + # top of the file and all preceding lines were comments or blank. + return getline(1) =~# config_or_package_statement + \ || getline(1) =~# comment_or_blank + \ && ( getline(2) =~# config_or_package_statement + \ || getline(2) =~# comment_or_blank + \ && getline(3) =~# config_or_package_statement + \ ) +enddef + # Uncomment this line to check for compilation errors early # defcompile diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 2206c21..e2152b0 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -8,6 +8,7 @@ " 2023 Nov 22 by Vim Project: fix handling of very long filename on longlist style (v173a) " 2024 Feb 19 by Vim Project: (announce adoption) " 2024 Feb 29 by Vim Project: handle symlinks in tree mode correctly +" 2024 Apr 03 by Vim Project: detect filetypes for remote edited files " Former Maintainer: Charles E Campbell " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 2016 Charles E. Campbell {{{1 @@ -1803,7 +1804,9 @@ fun! s:NetrwOptionsRestore(vt) " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("")) if !exists("{a:vt}netrw_optionsave") " call Decho("case ".a:vt."netrw_optionsave : doesn't exist",'~'.expand("")) - if filereadable(expand("%")) + + " filereadable() returns zero for remote files (e.g. scp://localhost//etc/fstab) + if filereadable(expand("%")) || expand("%") =~# '^\w\+://\f\+/' " call Decho("..doing filetype detect anyway") filetype detect " call Decho("..settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("")) @@ -2727,7 +2730,7 @@ fun! netrw#NetWrite(...) range let url= g:netrw_choice call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_http_put_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(url,1) ) elseif !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"can't write to http using <".g:netrw_http_put_cmd.">".",16) + call netrw#ErrorMsg(s:ERROR,"can't write to http using <".g:netrw_http_put_cmd.">",16) endif "......................................... diff --git a/runtime/compiler/ant.vim b/runtime/compiler/ant.vim index 0605c69..6219b01 100644 --- a/runtime/compiler/ant.vim +++ b/runtime/compiler/ant.vim @@ -2,16 +2,13 @@ " Compiler: ant " Maintainer: Johannes Zellner " Last Change: Mi, 13 Apr 2005 22:50:07 CEST +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "ant" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/bcc.vim b/runtime/compiler/bcc.vim index 5bd284a..2d9d4fb 100644 --- a/runtime/compiler/bcc.vim +++ b/runtime/compiler/bcc.vim @@ -2,16 +2,13 @@ " Compiler: bcc - Borland C " Maintainer: Emile van Raaij (eraaij@xs4all.nl) " Last Change: 2004 Mar 27 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "bcc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - " A workable errorformat for Borland C CompilerSet errorformat=%*[^0-9]%n\ %f\ %l:\ %m diff --git a/runtime/compiler/bdf.vim b/runtime/compiler/bdf.vim index b062e84..2aaa93b 100644 --- a/runtime/compiler/bdf.vim +++ b/runtime/compiler/bdf.vim @@ -1,7 +1,9 @@ " Vim compiler file " Compiler: BDF to PCF Conversion " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Contributors: Enno Nagel +" Last Change: 2024 Mar 29 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -11,9 +13,8 @@ let current_compiler = "bdf" let s:cpo_save = &cpo set cpo-=C -setlocal makeprg=bdftopcf\ $* - -setlocal errorformat=%ABDF\ %trror\ on\ line\ %l:\ %m, +CompilerSet makeprg=bdftopcf\ $* +CompilerSet errorformat=%ABDF\ %trror\ on\ line\ %l:\ %m, \%-Z%p^, \%Cbdftopcf:\ bdf\ input\\,\ %f\\,\ corrupt, \%-G%.%# diff --git a/runtime/compiler/cargo.vim b/runtime/compiler/cargo.vim index aa9b01e..bbea45d 100644 --- a/runtime/compiler/cargo.vim +++ b/runtime/compiler/cargo.vim @@ -2,6 +2,7 @@ " Compiler: Cargo Compiler " Maintainer: Damien Radtke " Latest Revision: 2023-09-11 +" 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) " For bugs, patches and license go to https://github.com/rust-lang/rust.vim if exists('current_compiler') @@ -15,10 +16,6 @@ let s:save_cpo = &cpo set cpo&vim " vint: +ProhibitAbbreviationOption -if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal -endif - if exists('g:cargo_makeprg_params') execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*' else diff --git a/runtime/compiler/checkstyle.vim b/runtime/compiler/checkstyle.vim index 4ebd9e1..3c17ee4 100644 --- a/runtime/compiler/checkstyle.vim +++ b/runtime/compiler/checkstyle.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Checkstyle " Maintainer: Doug Kearns -" Last Change: 2020 Aug 2 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "checkstyle" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/cm3.vim b/runtime/compiler/cm3.vim index 3de5128..0ec3608 100644 --- a/runtime/compiler/cm3.vim +++ b/runtime/compiler/cm3.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Critical Mass Modula-3 Compiler " Maintainer: Doug Kearns -" Last Change: 2021 Apr 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "cm3" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/context.vim b/runtime/compiler/context.vim index f600936..093943e 100644 --- a/runtime/compiler/context.vim +++ b/runtime/compiler/context.vim @@ -3,7 +3,9 @@ vim9script # Language: ConTeXt typesetting engine # Maintainer: Nicola Vitacolonna # Former Maintainers: Nikolai Weibull -# Latest Revision: 2023 Dec 26 +# Contributors: Enno Nagel +# Last Change: 2024 Mar 29 +# 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("g:current_compiler") finish @@ -11,15 +13,12 @@ endif import autoload '../autoload/context.vim' -if exists(":CompilerSet") != 2 # Older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - g:current_compiler = 'context' if get(b:, 'context_ignore_makefile', get(g:, 'context_ignore_makefile', 0)) || (!filereadable('Makefile') && !filereadable('makefile')) - &l:makeprg = join(context.ConTeXtCmd(shellescape(expand('%:p:t'))), ' ') + var makeprg = join(context.ConTeXtCmd(shellescape(expand('%:p:t'))), ' ') + execute 'CompilerSet makeprg=' .. escape(makeprg, ' ') else g:current_compiler = 'make' endif diff --git a/runtime/compiler/cs.vim b/runtime/compiler/cs.vim index 4f6dd3c..123dff8 100644 --- a/runtime/compiler/cs.vim +++ b/runtime/compiler/cs.vim @@ -3,6 +3,7 @@ " Maintainer: Yichao Zhou (broken.zhou@gmail.com) " Previous Maintainer: Joseph H. Yao (hyao@sina.com) " Last Change: Jul 22, 2019 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -11,10 +12,6 @@ let current_compiler = "cs" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat& CompilerSet errorformat+=%f(%l\\,%v):\ %t%*[^:]:\ %m, \%trror%*[^:]:\ %m, diff --git a/runtime/compiler/csslint.vim b/runtime/compiler/csslint.vim index 14c4289..608cc74 100644 --- a/runtime/compiler/csslint.vim +++ b/runtime/compiler/csslint.vim @@ -1,16 +1,13 @@ " Vim compiler file " Compiler: csslint for CSS -" Maintainer: Daniel Moch -" Last Change: 2016 May 21 +" Maintainer: Daniel Moch +" Last Change: 2016 May 21 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "csslint" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=csslint\ --format=compact CompilerSet errorformat=%-G,%-G%f:\ lint\ free!,%f:\ line\ %l\\,\ col\ %c\\,\ %trror\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %tarning\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %m diff --git a/runtime/compiler/cucumber.vim b/runtime/compiler/cucumber.vim index 17ce362..8089a5e 100644 --- a/runtime/compiler/cucumber.vim +++ b/runtime/compiler/cucumber.vim @@ -2,16 +2,13 @@ " Compiler: Cucumber " Maintainer: Tim Pope " Last Change: 2016 Aug 29 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "cucumber" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/dart.vim b/runtime/compiler/dart.vim index f9ebfe1..9577236 100644 --- a/runtime/compiler/dart.vim +++ b/runtime/compiler/dart.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Dart VM " Maintainer: Doug Kearns -" Last Change: 2019 May 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "dart" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/dart2js.vim b/runtime/compiler/dart2js.vim index b6a4e4d..a05dead 100644 --- a/runtime/compiler/dart2js.vim +++ b/runtime/compiler/dart2js.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Dart to JavaScript Compiler " Maintainer: Doug Kearns -" Last Change: 2019 May 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "dart2js" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/dart2native.vim b/runtime/compiler/dart2native.vim index 51bdab0..6604fc4 100644 --- a/runtime/compiler/dart2native.vim +++ b/runtime/compiler/dart2native.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Dart to Native Compiler " Maintainer: Doug Kearns -" Last Change: 2019 May 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "dart2native" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/dartanalyser.vim b/runtime/compiler/dartanalyser.vim index e691d80..48a976a 100644 --- a/runtime/compiler/dartanalyser.vim +++ b/runtime/compiler/dartanalyser.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Dart Analyzer " Maintainer: Doug Kearns -" Last Change: 2019 May 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "dartanalyzer" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/dartdevc.vim b/runtime/compiler/dartdevc.vim index e8d1988..16e4ed7 100644 --- a/runtime/compiler/dartdevc.vim +++ b/runtime/compiler/dartdevc.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Dart Development Compiler " Maintainer: Doug Kearns -" Last Change: 2019 May 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "dartdevc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/dartdoc.vim b/runtime/compiler/dartdoc.vim index 26b38d8..78f0d24 100644 --- a/runtime/compiler/dartdoc.vim +++ b/runtime/compiler/dartdoc.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Dart Documentation Generator " Maintainer: Doug Kearns -" Last Change: 2019 May 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "dartdoc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/dartfmt.vim b/runtime/compiler/dartfmt.vim index 2e4ab02..d204df8 100644 --- a/runtime/compiler/dartfmt.vim +++ b/runtime/compiler/dartfmt.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Dart Formatter " Maintainer: Doug Kearns -" Last Change: 2019 May 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "dartfmt" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/decada.vim b/runtime/compiler/decada.vim index 0bf5487..11b0cb4 100644 --- a/runtime/compiler/decada.vim +++ b/runtime/compiler/decada.vim @@ -14,6 +14,7 @@ " 08.09.2006 MK Correct double load protection. " Help Page: compiler-decada "------------------------------------------------------------------------------ +" Last Change: 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if (exists("current_compiler") && current_compiler == "decada") || version < 700 finish @@ -34,13 +35,6 @@ if !exists("g:decada") call g:decada.Set_Session () endif -if exists(":CompilerSet") != 2 - " - " plugin loaded by other means then the "compiler" command - " - command -nargs=* CompilerSet setlocal -endif - execute "CompilerSet makeprg=" . escape (g:decada.Make_Command, ' ') execute "CompilerSet errorformat=" . escape (g:decada.Error_Format, ' ') diff --git a/runtime/compiler/dot.vim b/runtime/compiler/dot.vim index 0327739..145411e 100644 --- a/runtime/compiler/dot.vim +++ b/runtime/compiler/dot.vim @@ -1,15 +1,15 @@ " Vim compiler file " Compiler: ATT dot " Maintainer: Marcos Macedo -" Last Change: 2004 May 16 +" Last Change: 2024 March 21 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "dot" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=dot\ -T$*\ \"%:p\"\ -o\ \"%:p:r.$*\" +" matches error messages as below skipping final part after line number +" Error: ./file.dot: syntax error in line 1 near 'rankdir' +CompilerSet errorformat=%trror:\ %f:\ %m\ in\ line\ %l%.%# diff --git a/runtime/compiler/dotnet.vim b/runtime/compiler/dotnet.vim index ac64084..1290357 100644 --- a/runtime/compiler/dotnet.vim +++ b/runtime/compiler/dotnet.vim @@ -2,6 +2,7 @@ " Compiler: dotnet build (.NET CLI) " Maintainer: Nick Jensen " Last Change: 2022-12-06 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " License: Vim (see :h license) " Repository: https://github.com/nickspoons/vim-cs @@ -10,10 +11,6 @@ if exists("current_compiler") endif let current_compiler = "dotnet" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/erlang.vim b/runtime/compiler/erlang.vim index e22887e..b30b5c1 100644 --- a/runtime/compiler/erlang.vim +++ b/runtime/compiler/erlang.vim @@ -2,6 +2,7 @@ " Compiler: Erlang " Maintainer: Dmitry Vasiliev " Last Change: 2019 Jul 23 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish diff --git a/runtime/compiler/eruby.vim b/runtime/compiler/eruby.vim index a81a3f3..815d082 100644 --- a/runtime/compiler/eruby.vim +++ b/runtime/compiler/eruby.vim @@ -3,17 +3,13 @@ " Maintainer: Doug Kearns " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns -" Last Change: 2018 Jan 25 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "eruby" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/eslint.vim b/runtime/compiler/eslint.vim index 7d57acb..db7a665 100644 --- a/runtime/compiler/eslint.vim +++ b/runtime/compiler/eslint.vim @@ -2,15 +2,12 @@ " Compiler: ESLint for JavaScript " Maintainer: Romain Lafourcade " Last Change: 2020 August 20 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "eslint" -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=npx\ eslint\ --format\ compact CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m,%-G%.%# diff --git a/runtime/compiler/fbc.vim b/runtime/compiler/fbc.vim index 1c29392..afedc32 100644 --- a/runtime/compiler/fbc.vim +++ b/runtime/compiler/fbc.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: FreeBASIC Compiler " Maintainer: Doug Kearns -" Last Change: 2015 Jan 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "fbc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/fortran_F.vim b/runtime/compiler/fortran_F.vim index d9cb47c..7f6ec81 100644 --- a/runtime/compiler/fortran_F.vim +++ b/runtime/compiler/fortran_F.vim @@ -3,17 +3,14 @@ " URL: http://www.unb.ca/chem/ajit/compiler/fortran_F.vim " Maintainer: Ajit J. Thakkar (ajit AT unb.ca); " Version: 0.2 -" Last Change: 2004 Mar 27 +" Last Change: 2004 Mar 27 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "fortran_F" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cposet=&cpoptions set cpoptions-=C diff --git a/runtime/compiler/fortran_cv.vim b/runtime/compiler/fortran_cv.vim index bc217bd..ea46d99 100644 --- a/runtime/compiler/fortran_cv.vim +++ b/runtime/compiler/fortran_cv.vim @@ -2,16 +2,13 @@ " Compiler: Compaq Visual Fortran " Maintainer: Joh.-G. Simon (johann-guenter.simon@linde-le.com) " Last Change: 11/05/2002 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "fortran_cv" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cposet = &cpoptions set cpoptions-=C diff --git a/runtime/compiler/fortran_elf90.vim b/runtime/compiler/fortran_elf90.vim index 34c33cf..903701e 100644 --- a/runtime/compiler/fortran_elf90.vim +++ b/runtime/compiler/fortran_elf90.vim @@ -4,17 +4,14 @@ " URL: http://www.unb.ca/chem/ajit/compiler/fortran_elf90.vim " Maintainer: Ajit J. Thakkar (ajit AT unb.ca); " Version: 0.2 -" Last Change: 2004 Mar 27 +" Last Change: 2004 Mar 27 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "fortran_elf90" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cposet=&cpoptions set cpoptions-=C diff --git a/runtime/compiler/fortran_g77.vim b/runtime/compiler/fortran_g77.vim index 744ce6a..dcac2a7 100644 --- a/runtime/compiler/fortran_g77.vim +++ b/runtime/compiler/fortran_g77.vim @@ -2,6 +2,7 @@ " Compiler: g77 (GNU Fortran) " Maintainer: Ralf Wildenhues " Last Change: $Date: 2004/06/13 18:17:36 $ +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " $Revision: 1.1 $ if exists("current_compiler") @@ -9,10 +10,6 @@ if exists("current_compiler") endif let current_compiler = "fortran_g77" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/fortran_lf95.vim b/runtime/compiler/fortran_lf95.vim index 685fee7..2cb7158 100644 --- a/runtime/compiler/fortran_lf95.vim +++ b/runtime/compiler/fortran_lf95.vim @@ -3,17 +3,14 @@ " URL: http://www.unb.ca/chem/ajit/compiler/fortran_lf95.vim " Maintainer: Ajit J. Thakkar (ajit AT unb.ca); " Version: 0.2 -" Last Change: 2004 Mar 27 +" Last Change: 2004 Mar 27 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "fortran_lf95" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cposet=&cpoptions set cpoptions-=C diff --git a/runtime/compiler/fpc.vim b/runtime/compiler/fpc.vim index de8e2fe..0d321ab 100644 --- a/runtime/compiler/fpc.vim +++ b/runtime/compiler/fpc.vim @@ -2,16 +2,13 @@ " Compiler: FPC 2.1 " Maintainer: Jaroslaw Blasiok " Last Change: 2005 October 07 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "fpc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - " NOTE: compiler must be run with -vb to write whole source path, not only file " name. CompilerSet errorformat=%f(%l\\,%c)\ %m diff --git a/runtime/compiler/g95.vim b/runtime/compiler/g95.vim index ecb3212..e0b3a68 100644 --- a/runtime/compiler/g95.vim +++ b/runtime/compiler/g95.vim @@ -2,6 +2,7 @@ " Maintainer: H Xu " Version: 0.1.3 " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " Homepage: http://www.vim.org/scripts/script.php?script_id=3492 " https://bitbucket.org/xuhdev/compiler-g95.vim " License: Same as Vim @@ -13,10 +14,6 @@ let current_compiler = 'g95' let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat= \%AIn\ file\ %f:%l, \%-C%p1, diff --git a/runtime/compiler/gawk.vim b/runtime/compiler/gawk.vim index a109eb8..f2a360d 100644 --- a/runtime/compiler/gawk.vim +++ b/runtime/compiler/gawk.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: GNU Awk " Maintainer: Doug Kearns -" Last Change: 2020 Feb 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "gawk" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/gcc.vim b/runtime/compiler/gcc.vim index 30e5149..7b6ebb9 100644 --- a/runtime/compiler/gcc.vim +++ b/runtime/compiler/gcc.vim @@ -1,10 +1,11 @@ " Vim compiler file -" Compiler: GNU C Compiler -" Previous Maintainer: Nikolai Weibull -" Latest Revision: 2010-10-14 -" changed pattern for entering/leaving directories -" by Daniel Hahler, 2019 Jul 12 -" added line suggested by Anton Lindqvist 2016 Mar 31 +" Compiler: GNU C Compiler +" Previous Maintainer: Nikolai Weibull +" Last Change: 2010 Oct 14 +" changed pattern for entering/leaving directories +" by Daniel Hahler, 2019 Jul 12 +" added line suggested by Anton Lindqvist 2016 Mar 31 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish diff --git a/runtime/compiler/gfortran.vim b/runtime/compiler/gfortran.vim index 1e4e5cf..1fea3bc 100644 --- a/runtime/compiler/gfortran.vim +++ b/runtime/compiler/gfortran.vim @@ -2,6 +2,7 @@ " Maintainer: H Xu " Version: 0.1.3 " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " Homepage: http://www.vim.org/scripts/script.php?script_id=3496 " https://bitbucket.org/xuhdev/compiler-gfortran.vim " License: Same as Vim @@ -13,10 +14,6 @@ let current_compiler = 'gfortran' let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat= \%A%f:%l.%c:, \%-Z%trror:\ %m, diff --git a/runtime/compiler/gjs.vim b/runtime/compiler/gjs.vim index e033764..b1be8cf 100644 --- a/runtime/compiler/gjs.vim +++ b/runtime/compiler/gjs.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: GJS (Gnome JavaScript Bindings) " Maintainer: Doug Kearns -" Last Change: 2019 Jul 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "gjs" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/gm2.vim b/runtime/compiler/gm2.vim index 5053912..954da9d 100644 --- a/runtime/compiler/gm2.vim +++ b/runtime/compiler/gm2.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: GNU Modula-2 Compiler " Maintainer: Doug Kearns -" Last Change: 2024 Jan 04 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "gm2" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/gnat.vim b/runtime/compiler/gnat.vim index 3ad1eb4..086edbe 100644 --- a/runtime/compiler/gnat.vim +++ b/runtime/compiler/gnat.vim @@ -52,13 +52,6 @@ if !exists("g:gnat") call g:gnat.Set_Session () endif -if exists(":CompilerSet") != 2 - " - " plugin loaded by other means then the "compiler" command - " - command -nargs=* CompilerSet setlocal -endif - execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ') execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ') diff --git a/runtime/compiler/go.vim b/runtime/compiler/go.vim index cf638f2..9c1a6f3 100644 --- a/runtime/compiler/go.vim +++ b/runtime/compiler/go.vim @@ -2,16 +2,13 @@ " Compiler: Go " Maintainer: David Barnett (https://github.com/google/vim-ft-go) " Last Change: 2014 Aug 16 +" 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) if exists('current_compiler') finish endif let current_compiler = 'go' -if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal -endif - let s:save_cpo = &cpo set cpo-=C diff --git a/runtime/compiler/haml.vim b/runtime/compiler/haml.vim index 9464c3d..99c171d 100644 --- a/runtime/compiler/haml.vim +++ b/runtime/compiler/haml.vim @@ -2,16 +2,13 @@ " Compiler: Haml " Maintainer: Tim Pope " Last Change: 2016 Aug 29 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "haml" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/hare.vim b/runtime/compiler/hare.vim index c0fa68c..c98bbb9 100644 --- a/runtime/compiler/hare.vim +++ b/runtime/compiler/hare.vim @@ -2,6 +2,7 @@ " Compiler: Hare Compiler " Maintainer: Amelia Clarke " Last Change: 2022-09-21 +" 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) if exists("g:current_compiler") finish @@ -11,10 +12,6 @@ let g:current_compiler = "hare" let s:cpo_save = &cpo set cpo&vim -if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal -endif - if filereadable("Makefile") || filereadable("makefile") CompilerSet makeprg=make else diff --git a/runtime/compiler/hp_acc.vim b/runtime/compiler/hp_acc.vim index 15d5ce5..f6ccc57 100644 --- a/runtime/compiler/hp_acc.vim +++ b/runtime/compiler/hp_acc.vim @@ -3,6 +3,7 @@ " Maintainer: Matthias Ulrich " URL: http://www.subhome.de/vim/hp_acc.vim " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " " aCC --version says: "HP ANSI C++ B3910B A.03.13" " This compiler has been tested on: @@ -22,10 +23,6 @@ let current_compiler = "hp_acc" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=%A%trror\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m, \%A%tarning\ (suggestion)\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m\ %#, \%A%tarning\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m\ %#, diff --git a/runtime/compiler/icc.vim b/runtime/compiler/icc.vim index 751fba6..37958f1 100644 --- a/runtime/compiler/icc.vim +++ b/runtime/compiler/icc.vim @@ -2,16 +2,13 @@ " Compiler: icc - Intel C++ " Maintainer: Peter Puck " Last Change: 2004 Mar 27 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "icc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - " I think that Intel is calling the compiler icl under Windows CompilerSet errorformat=%-Z%p^,%f(%l):\ remark\ #%n:%m,%f(%l)\ :\ (col.\ %c)\ remark:\ %m,%E%f(%l):\ error:\ %m,%E%f(%l):\ error:\ #%n:\ %m,%W%f(%l):\ warning\ #%n:\ %m,%W%f(%l):\ warning:\ %m,%-C%.%# diff --git a/runtime/compiler/icon.vim b/runtime/compiler/icon.vim index 40f6793..8b46af2 100644 --- a/runtime/compiler/icon.vim +++ b/runtime/compiler/icon.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Icon Compiler " Maintainer: Doug Kearns -" Last Change: 2022 Jun 16 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "icont" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/ifort.vim b/runtime/compiler/ifort.vim index 3a60d0c..8c58ba6 100644 --- a/runtime/compiler/ifort.vim +++ b/runtime/compiler/ifort.vim @@ -2,6 +2,7 @@ " Maintainer: H Xu " Version: 0.1.1 " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " Homepage: http://www.vim.org/scripts/script.php?script_id=3497 " https://bitbucket.org/xuhdev/compiler-ifort.vim " License: Same as Vim @@ -13,10 +14,6 @@ let current_compiler = 'ifort' let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat= \%A%f(%l):\ %trror\ \#%n:\ %m, \%A%f(%l):\ %tarning\ \#%n:\ %m, diff --git a/runtime/compiler/intel.vim b/runtime/compiler/intel.vim index 254d13b..cde62b1 100644 --- a/runtime/compiler/intel.vim +++ b/runtime/compiler/intel.vim @@ -2,6 +2,7 @@ " Compiler: Intel C++ 7.1 " Maintainer: David Harrison " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -10,10 +11,6 @@ let current_compiler = "intel" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=%E%f(%l):\ error:\ %m, \%W%f(%l):\ warning:\ %m, \%I%f(%l):\ remark\ #%n:\ %m, diff --git a/runtime/compiler/irix5_c.vim b/runtime/compiler/irix5_c.vim index f440e74..f70bfb1 100644 --- a/runtime/compiler/irix5_c.vim +++ b/runtime/compiler/irix5_c.vim @@ -2,6 +2,7 @@ " Compiler: SGI IRIX 5.3 cc " Maintainer: David Harrison " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -10,10 +11,6 @@ let current_compiler = "irix5_c" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=\%Ecfe:\ Error:\ %f\\,\ line\ %l:\ %m, \%Wcfe:\ Warning:\ %n:\ %f\\,\ line\ %l:\ %m, \%Wcfe:\ Warning\ %n:\ %f\\,\ line\ %l:\ %m, diff --git a/runtime/compiler/irix5_cpp.vim b/runtime/compiler/irix5_cpp.vim index 0112dc1..85ab8c6 100644 --- a/runtime/compiler/irix5_cpp.vim +++ b/runtime/compiler/irix5_cpp.vim @@ -2,6 +2,7 @@ " Compiler: SGI IRIX 5.3 CC or NCC " Maintainer: David Harrison " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -10,10 +11,6 @@ let current_compiler = "irix5_cpp" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=%E\"%f\"\\,\ line\ %l:\ error(%n):\ , \%E\"%f\"\\,\ line\ %l:\ error(%n):\ %m, \%W\"%f\"\\,\ line\ %l:\ warning(%n):\ %m, diff --git a/runtime/compiler/javac.vim b/runtime/compiler/javac.vim index 8507efd..f5fe841 100644 --- a/runtime/compiler/javac.vim +++ b/runtime/compiler/javac.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Java Development Kit Compiler " Maintainer: Doug Kearns -" Last Change: 2019 Oct 21 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "javac" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/jest.vim b/runtime/compiler/jest.vim index a4bb549..663123c 100644 --- a/runtime/compiler/jest.vim +++ b/runtime/compiler/jest.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Jest " Maintainer: Doug Kearns -" Last Change: 2021 Nov 20 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "jest" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/jikes.vim b/runtime/compiler/jikes.vim index 2d4500e..f12c2cf 100644 --- a/runtime/compiler/jikes.vim +++ b/runtime/compiler/jikes.vim @@ -2,6 +2,7 @@ " Compiler: Jikes " Maintainer: Dan Sharp " Last Change: 2019 Jul 23 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " URL: http://dwsharp.users.sourceforge.net/vim/compiler if exists("current_compiler") @@ -9,10 +10,6 @@ if exists("current_compiler") endif let current_compiler = "jikes" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - " Jikes defaults to printing output on stderr CompilerSet makeprg=jikes\ -Xstdout\ +E\ \"%:S\" CompilerSet errorformat=%f:%l:%v:%*\\d:%*\\d:%*\\s%m diff --git a/runtime/compiler/jjs.vim b/runtime/compiler/jjs.vim index 09a9736..543d9ca 100644 --- a/runtime/compiler/jjs.vim +++ b/runtime/compiler/jjs.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Nashorn Shell " Maintainer: Doug Kearns -" Last Change: 2018 Jan 9 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "jjs" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/jshint.vim b/runtime/compiler/jshint.vim index 865591c..9879ef4 100644 --- a/runtime/compiler/jshint.vim +++ b/runtime/compiler/jshint.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: JSHint " Maintainer: Doug Kearns -" Last Change: 2019 Jul 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "jshint" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/jsonlint.vim b/runtime/compiler/jsonlint.vim index 5466dcc..6283b1b 100644 --- a/runtime/compiler/jsonlint.vim +++ b/runtime/compiler/jsonlint.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: JSON Lint " Maintainer: Doug Kearns -" Last Change: 2019 Jul 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "jsonlint" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/mcs.vim b/runtime/compiler/mcs.vim index c606586..0c265b3 100644 --- a/runtime/compiler/mcs.vim +++ b/runtime/compiler/mcs.vim @@ -1,8 +1,9 @@ " Vim compiler file -" Compiler: Mono C# Compiler -" Maintainer: Jarek Sobiecki -" Last Updated By: Peter Collingbourne -" Latest Revision: 2012 Jul 19 +" Compiler: Mono C# Compiler +" Maintainer: Jarek Sobiecki +" Contributors: Peter Collingbourne and Enno Nagel +" Last Change: 2024 Mar 29 +" 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -12,7 +13,8 @@ let current_compiler = "mcs" let s:cpo_save = &cpo set cpo-=C -setlocal errorformat= +CompilerSet makeprg=mcs +CompilerSet errorformat= \%D%.%#Project\ \"%f/%[%^/\"]%#\"%.%#, \%X%.%#Done\ building\ project\ \"%f/%[%^/\"]%#\"%.%#, \%-G%\\s%.%#, diff --git a/runtime/compiler/mips_c.vim b/runtime/compiler/mips_c.vim index a0ebfe7..544f314 100644 --- a/runtime/compiler/mips_c.vim +++ b/runtime/compiler/mips_c.vim @@ -2,6 +2,7 @@ " Compiler: SGI IRIX 6.5 MIPS C (cc) " Maintainer: David Harrison " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -10,10 +11,6 @@ let current_compiler = "mips_c" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=%Ecc\-%n\ %.%#:\ ERROR\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Wcc\-%n\ %.%#:\ WARNING\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Icc\-%n\ %.%#:\ REMARK\ File\ =\ %f\%\\,\ Line\ =\ %l, diff --git a/runtime/compiler/mipspro_c89.vim b/runtime/compiler/mipspro_c89.vim index 20eb70d..4d6bdab 100644 --- a/runtime/compiler/mipspro_c89.vim +++ b/runtime/compiler/mipspro_c89.vim @@ -2,6 +2,7 @@ " Compiler: SGI IRIX 6.5 MIPSPro C (c89) " Maintainer: David Harrison " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -10,10 +11,6 @@ let current_compiler = "mipspro_c89" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=%Ecc\-%n\ %.%#:\ ERROR\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Wcc\-%n\ %.%#:\ WARNING\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Icc\-%n\ %.%#:\ REMARK\ File\ =\ %f\%\\,\ Line\ =\ %l, diff --git a/runtime/compiler/mipspro_cpp.vim b/runtime/compiler/mipspro_cpp.vim index 2f43af8..9aac2a6 100644 --- a/runtime/compiler/mipspro_cpp.vim +++ b/runtime/compiler/mipspro_cpp.vim @@ -2,6 +2,7 @@ " Compiler: SGI IRIX 6.5 MIPSPro C++ (CC) " Maintainer: David Harrison " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -10,10 +11,6 @@ let current_compiler = "mipspro_cpp" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=%Ecc\-%n\ %.%#:\ ERROR\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Wcc\-%n\ %.%#:\ WARNING\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Icc\-%n\ %.%#:\ REMARK\ File\ =\ %f\%\\,\ Line\ =\ %l, diff --git a/runtime/compiler/modelsim_vcom.vim b/runtime/compiler/modelsim_vcom.vim index 6aa1bde..8c6b806 100644 --- a/runtime/compiler/modelsim_vcom.vim +++ b/runtime/compiler/modelsim_vcom.vim @@ -1,7 +1,9 @@ " Vim Compiler File " Compiler: Modelsim Vcom " Maintainer: Paul Baleme -" Last Change: September 8, 2003 +" Contributors: Enno Nagel +" Last Change: 2024 Mar 29 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " Thanks to: allanherriman@hotmail.com if exists("current_compiler") @@ -9,12 +11,9 @@ if exists("current_compiler") endif let current_compiler = "modelsim_vcom" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif +CompilerSet makeprg=vcom "setlocal errorformat=\*\*\ %tRROR:\ %f(%l):\ %m,%tRROR:\ %f(%l):\ %m,%tARNING\[%*[0-9]\]:\ %f(%l):\ %m,\*\*\ %tRROR:\ %m,%tRROR:\ %m,%tARNING\[%*[0-9]\]:\ %m - "setlocal errorformat=%tRROR:\ %f(%l):\ %m,%tARNING\[%*[0-9]\]:\ %m CompilerSet errorformat=\*\*\ %tRROR:\ %f(%l):\ %m,\*\*\ %tRROR:\ %m,\*\*\ %tARNING:\ %m,\*\*\ %tOTE:\ %m,%tRROR:\ %f(%l):\ %m,%tARNING\[%*[0-9]\]:\ %f(%l):\ %m,%tRROR:\ %m,%tARNING\[%*[0-9]\]:\ %m diff --git a/runtime/compiler/msbuild.vim b/runtime/compiler/msbuild.vim index 3652ca0..c871efa 100644 --- a/runtime/compiler/msbuild.vim +++ b/runtime/compiler/msbuild.vim @@ -2,6 +2,7 @@ " Compiler: Microsoft Visual Studio C# " Maintainer: Chiel ten Brinke (ctje92@gmail.com) " Last Change: 2013 May 13 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -10,10 +11,6 @@ let current_compiler = "msbuild" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=\ %#%f(%l\\\,%c):\ %m CompilerSet makeprg=msbuild\ /nologo\ /v:q\ /property:GenerateFullPaths=true diff --git a/runtime/compiler/msvc.vim b/runtime/compiler/msvc.vim index 0d5660c..3d40de5 100644 --- a/runtime/compiler/msvc.vim +++ b/runtime/compiler/msvc.vim @@ -2,6 +2,7 @@ " Compiler: Microsoft Visual C " Maintainer: The Vim Project " Last Change: 2023 Aug 10 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " Former Maintainer: Bram Moolenaar if exists("current_compiler") diff --git a/runtime/compiler/neato.vim b/runtime/compiler/neato.vim index bd184b7..0f36734 100644 --- a/runtime/compiler/neato.vim +++ b/runtime/compiler/neato.vim @@ -1,15 +1,15 @@ " Vim compiler file " Compiler: ATT neato " Maintainer: Marcos Macedo -" Last Change: 2004 May 16 +" Last Change: 2024 March 21 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "neato" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=neato\ -T$*\ \"%:p\"\ -o\ \"%:p:r.$*\" +" matches error messages as below skipping final part after line number +" Error: ./file.dot: syntax error in line 1 near 'rankdir' +CompilerSet errorformat=%trror:\ %f:\ %m\ in\ line\ %l%.%# diff --git a/runtime/compiler/ocaml.vim b/runtime/compiler/ocaml.vim index faa8af1..754289f 100644 --- a/runtime/compiler/ocaml.vim +++ b/runtime/compiler/ocaml.vim @@ -3,6 +3,7 @@ " Maintainer: Markus Mottl " URL: https://github.com/ocaml/vim-ocaml " Last Change: +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " 2020 Mar 28 - Improved error format (Thomas Leonard) " 2017 Nov 26 - Improved error format (Markus Mottl) " 2013 Aug 27 - Added a new OCaml error format (Markus Mottl) diff --git a/runtime/compiler/onsgmls.vim b/runtime/compiler/onsgmls.vim index 68925ef..4306f99 100644 --- a/runtime/compiler/onsgmls.vim +++ b/runtime/compiler/onsgmls.vim @@ -2,16 +2,13 @@ " Compiler: onsgmls " Maintainer: Robert Rowsome " Last Change: 2019 Jul 23 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "onsgmls" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/pandoc.vim b/runtime/compiler/pandoc.vim new file mode 100644 index 0000000..6c15193 --- /dev/null +++ b/runtime/compiler/pandoc.vim @@ -0,0 +1,55 @@ +" Vim compiler file +" Compiler: Pandoc +" Maintainer: Konfekt +" +" Expects output file extension, say `:make html` or `:make pdf`. +" Passes additional arguments to pandoc, say `:make html --self-contained`. + +if exists("current_compiler") + finish +endif + +let s:keepcpo = &cpo +set cpo&vim + +let current_compiler = 'pandoc' + +" As of 2024-04-08 pandoc supports the following text input formats with +" an ftplugin on Github: +let s:supported_filetypes = + \ [ 'bibtex', 'markdown', 'creole', 'json', 'csv', 'tsv', 'docbook', + \ 'xml', 'fb2', 'html', 'jira', 'tex', 'mediawiki', 'nroff', 'org', + \ 'rtf', 'rst', 't2t', 'textile', 'twiki', 'typst', 'vimwiki' ] +" .. and out of those the following are included in Vim's runtime: +" 'xml', 'tex', 'html', 'rst', 'json', 'nroff', 'markdown' + +silent! function s:PandocFiletype(filetype) abort + let ft = a:filetype + if ft ==# 'pandoc' + return 'markdown' + elseif ft ==# 'tex' + return 'latex' + elseif ft ==# 'xml' + " Pandoc does not support XML as a generic input format, but it does support + " EndNote XML and Jats XML out of which the latter seems more universal. + return 'jats' + elseif ft ==# 'text' || empty(ft) + return 'markdown' + elseif index(s:supported_filetypes, &ft) >= 0 + return ft + else + echomsg 'Unsupported filetype: ' . ft . ', falling back to Markdown as input format!' + return 'markdown' + endif +endfunction +execute 'CompilerSet makeprg=pandoc\ --standalone' . + \ '\ --metadata\ title=%:t:r:S' . + \ '\ --metadata\ lang=' . matchstr(&spelllang, '^\a\a') . + \ '\ --from=' . s:PandocFiletype(&filetype) . + \ '\ ' . escape(get(b:, 'pandoc_compiler_args', get(g:, 'pandoc_compiler_args', '')), ' ') . + \ '\ --output\ %:r:S.$*\ %:S' + +CompilerSet errorformat="%f",\ line\ %l:\ %m + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/pbx.vim b/runtime/compiler/pbx.vim index 9e81ea7..5a45f7f 100644 --- a/runtime/compiler/pbx.vim +++ b/runtime/compiler/pbx.vim @@ -2,16 +2,13 @@ " Compiler: Apple Project Builder " Maintainer: Alexander von Below (public@vonBelow.Com) " Last Change: 2004 Mar 27 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "pbx" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - " The compiler actually is gcc, so the errorformat is unchanged CompilerSet errorformat& diff --git a/runtime/compiler/perl.vim b/runtime/compiler/perl.vim index 21e384f..6aeaac3 100644 --- a/runtime/compiler/perl.vim +++ b/runtime/compiler/perl.vim @@ -6,16 +6,13 @@ " Bugs/requests: https://github.com/vim-perl/vim-perl/issues " License: Vim License (see :help license) " Last Change: 2021 Nov 2 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "perl" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:savecpo = &cpo set cpo&vim diff --git a/runtime/compiler/perlcritic.vim b/runtime/compiler/perlcritic.vim index cf0678e..4b5f34d 100644 --- a/runtime/compiler/perlcritic.vim +++ b/runtime/compiler/perlcritic.vim @@ -6,16 +6,13 @@ " Bugs/requests: https://github.com/vim-perl/vim-perl/issues " License: Vim License (see :help license) " Last Change: 2021 Oct 20 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "perlcritic" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/php.vim b/runtime/compiler/php.vim index 92f93b8..f5d5210 100644 --- a/runtime/compiler/php.vim +++ b/runtime/compiler/php.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: PHP CLI " Maintainer: Doug Kearns -" Last Change: 2013 Jun 25 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "php" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/pip_compile.vim b/runtime/compiler/pip_compile.vim new file mode 100644 index 0000000..ca4d509 --- /dev/null +++ b/runtime/compiler/pip_compile.vim @@ -0,0 +1,43 @@ +" the Requirements File Format syntax support for Vim +" Version: 1.8.0 +" Author: raimon +" Upstream: https://github.com/raimon49/requirements.txt.vim +" License: MIT LICENSE +" The MIT License (MIT) +" +" Copyright (c) 2015 raimon +" +" Permission is hereby granted, free of charge, to any person obtaining a copy +" of this software and associated documentation files (the "Software"), to deal +" in the Software without restriction, including without limitation the rights +" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +" copies of the Software, and to permit persons to whom the Software is +" furnished to do so, subject to the following conditions: +" +" The above copyright notice and this permission notice shall be included in all +" copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +" SOFTWARE. + +if exists('b:current_compiler') + finish +endif +let b:current_compiler = 'pip_compile' + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +CompilerSet makeprg=pip-compile\ %:S +CompilerSet errorformat=%ECould\ not\ find\ a\ version\ that\ matches\ %o\ (from\ -r\ %f\ (line\ %l)), + \%C%m, + \%Z, + \%-G%.%# +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions +" vim: et sw=4 ts=4 sts=4: diff --git a/runtime/compiler/podchecker.vim b/runtime/compiler/podchecker.vim index 2cd4e13..20faaa4 100644 --- a/runtime/compiler/podchecker.vim +++ b/runtime/compiler/podchecker.vim @@ -6,16 +6,13 @@ " Bugs/requests: https://github.com/vim-perl/vim-perl/issues " License: Vim License (see :help license) " Last Change: 2021 Oct 20 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "podchecker" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/powershell.vim b/runtime/compiler/powershell.vim index 45d5ec2..821fea4 100644 --- a/runtime/compiler/powershell.vim +++ b/runtime/compiler/powershell.vim @@ -1,17 +1,16 @@ " Vim compiler file " Compiler: powershell " URL: https://github.com/PProvost/vim-ps1 -" Last Change: 2020 Mar 30 +" Contributors: Enno Nagel +" Last Change: 2024 Mar 29 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) +" 2024 Apr 05 by The Vim Project (avoid leaving behind g:makeprg) if exists("current_compiler") finish endif let current_compiler = "powershell" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C @@ -37,7 +36,7 @@ let g:ps1_efm_show_error_categories = get(g:, 'ps1_efm_show_error_categories', 0 " Use absolute path because powershell requires explicit relative paths " (./file.ps1 is okay, but # expands to file.ps1) -let &l:makeprg = g:ps1_makeprg_cmd .' %:p:S' +let s:makeprg = g:ps1_makeprg_cmd .. ' %:p:S' " Parse file, line, char from callstacks: " Write-Ouput : The term 'Write-Ouput' is not recognized as the name of a @@ -50,6 +49,8 @@ let &l:makeprg = g:ps1_makeprg_cmd .' %:p:S' " + CategoryInfo : ObjectNotFound: (Write-Ouput:String) [], CommandNotFoundException " + FullyQualifiedErrorId : CommandNotFoundException +execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' ') + " Showing error in context with underlining. CompilerSet errorformat=%+G+%m " Error summary. diff --git a/runtime/compiler/pylint.vim b/runtime/compiler/pylint.vim index 93079ce..14e9696 100644 --- a/runtime/compiler/pylint.vim +++ b/runtime/compiler/pylint.vim @@ -2,15 +2,12 @@ " Compiler: Pylint for Python " Maintainer: Daniel Moch " Last Change: 2016 May 20 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "pylint" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=pylint\ --output-format=text\ --msg-template=\"{path}:{line}:{column}:{C}:\ [{symbol}]\ {msg}\"\ --reports=no CompilerSet errorformat=%A%f:%l:%c:%t:\ %m,%A%f:%l:\ %m,%A%f:(%l):\ %m,%-Z%p^%.%#,%-G%.%# diff --git a/runtime/compiler/pyunit.vim b/runtime/compiler/pyunit.vim index 2a4ea92..2368346 100644 --- a/runtime/compiler/pyunit.vim +++ b/runtime/compiler/pyunit.vim @@ -2,15 +2,12 @@ " Compiler: Unit testing tool for Python " Maintainer: Max Ischenko " Last Change: 2004 Mar 27 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "pyunit" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m diff --git a/runtime/compiler/raco.vim b/runtime/compiler/raco.vim index bd10859..d35d86b 100644 --- a/runtime/compiler/raco.vim +++ b/runtime/compiler/raco.vim @@ -3,12 +3,9 @@ " Maintainer: D. Ben Knoble " URL: https://github.com/benknoble/vim-racket " Last Change: 2022 Aug 12 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) let current_compiler = 'raco' -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=raco CompilerSet errorformat=%f:%l:%c:%m diff --git a/runtime/compiler/racomake.vim b/runtime/compiler/racomake.vim index dae95fe..bd2c327 100644 --- a/runtime/compiler/racomake.vim +++ b/runtime/compiler/racomake.vim @@ -3,12 +3,9 @@ " Maintainer: D. Ben Knoble " URL: https://github.com/benknoble/vim-racket " Last Change: 2022 Aug 12 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) let current_compiler = 'racomake' -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=raco\ make\ --\ % CompilerSet errorformat=%f:%l:%c:%m diff --git a/runtime/compiler/racosetup.vim b/runtime/compiler/racosetup.vim index 1efe8a1..e16faf0 100644 --- a/runtime/compiler/racosetup.vim +++ b/runtime/compiler/racosetup.vim @@ -3,12 +3,9 @@ " Maintainer: D. Ben Knoble " URL: https://github.com/benknoble/vim-racket " Last Change: 2022 Aug 12 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) let current_compiler = 'racosetup' -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=raco\ setup CompilerSet errorformat=%f:%l:%c:%m diff --git a/runtime/compiler/racotest.vim b/runtime/compiler/racotest.vim index d2a1a3c..3ac1173 100644 --- a/runtime/compiler/racotest.vim +++ b/runtime/compiler/racotest.vim @@ -3,12 +3,9 @@ " Maintainer: D. Ben Knoble " URL: https://github.com/benknoble/vim-racket " Last Change: 2022 Aug 12 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) let current_compiler = 'racotest' -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=raco\ test\ % CompilerSet errorformat=location:%f:%l:%c diff --git a/runtime/compiler/rake.vim b/runtime/compiler/rake.vim index 3d11a31..5b3c7f4 100644 --- a/runtime/compiler/rake.vim +++ b/runtime/compiler/rake.vim @@ -4,16 +4,13 @@ " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns " Last Change: 2018 Mar 02 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "rake" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/rhino.vim b/runtime/compiler/rhino.vim index 30f3dd3..b6fc9c8 100644 --- a/runtime/compiler/rhino.vim +++ b/runtime/compiler/rhino.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Rhino Shell (JavaScript in Java) " Maintainer: Doug Kearns -" Last Change: 2019 Jul 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "rhino" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/rime_deployer.vim b/runtime/compiler/rime_deployer.vim new file mode 100644 index 0000000..e0c8dae --- /dev/null +++ b/runtime/compiler/rime_deployer.vim @@ -0,0 +1,30 @@ +" Vim Compiler File +" Language: rime_deployer +" Maintainer: Wu, Zhenyu +" URL: https://rime.im +" Latest Revision: 2024-04-09 + +if exists('b:current_compiler') + finish +endif +let b:current_compiler = 'rime_deployer' + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +" Android Termux +let s:prefix = getenv('PREFIX') +if s:prefix == v:null + let s:prefix = '/usr' +endif +" Android, NixOS, GNU/Linux, BSD +for s:shared_data_dir in ['/sdcard/rime-data', '/run/current-system/sw/share/rime-data', '/usr/local/share/rime-data', s:prefix . '/share/rime-data'] + if isdirectory(s:shared_data_dir) + break + endif +endfor +execute 'CompilerSet makeprg=rime_deployer\ --build\ %:p:h:S\' s:shared_data_dir +unlet s:prefix s:shared_data_dir + +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions diff --git a/runtime/compiler/rspec.vim b/runtime/compiler/rspec.vim index 0cfce04..ee848f7 100644 --- a/runtime/compiler/rspec.vim +++ b/runtime/compiler/rspec.vim @@ -4,16 +4,13 @@ " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns " Last Change: 2018 Aug 07 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "rspec" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/rst.vim b/runtime/compiler/rst.vim index 392bea6..72b6a58 100644 --- a/runtime/compiler/rst.vim +++ b/runtime/compiler/rst.vim @@ -2,7 +2,8 @@ " Compiler: sphinx >= 1.0.8, http://www.sphinx-doc.org " Description: reStructuredText Documentation Format " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2017-03-31 +" Last Change: 2017 Mar 31 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -12,10 +13,6 @@ let current_compiler = "rst" let s:cpo_save = &cpo set cpo&vim -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat= \%f\\:%l:\ %tEBUG:\ %m, \%f\\:%l:\ %tNFO:\ %m, diff --git a/runtime/compiler/rubocop.vim b/runtime/compiler/rubocop.vim index 7764b4a..9d2f014 100644 --- a/runtime/compiler/rubocop.vim +++ b/runtime/compiler/rubocop.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: RuboCop " Maintainer: Doug Kearns -" Last Change: 2019 Jul 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "rubocop" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/ruby.vim b/runtime/compiler/ruby.vim index 82d4d1c..70dff5b 100644 --- a/runtime/compiler/ruby.vim +++ b/runtime/compiler/ruby.vim @@ -5,16 +5,13 @@ " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns " Last Change: 2019 Jan 06 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "ruby" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/rubyunit.vim b/runtime/compiler/rubyunit.vim index 48e8fa4..e59873f 100644 --- a/runtime/compiler/rubyunit.vim +++ b/runtime/compiler/rubyunit.vim @@ -4,16 +4,13 @@ " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns " Last Change: 2014 Mar 23 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "rubyunit" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/rustc.vim b/runtime/compiler/rustc.vim index efcf24e..b3c8091 100644 --- a/runtime/compiler/rustc.vim +++ b/runtime/compiler/rustc.vim @@ -14,10 +14,6 @@ let s:save_cpo = &cpo set cpo&vim " vint: +ProhibitAbbreviationOption -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - if get(g:, 'rustc_makeprg_no_percent', 0) CompilerSet makeprg=rustc else diff --git a/runtime/compiler/sass.vim b/runtime/compiler/sass.vim index 9c540ac..d0ed65c 100644 --- a/runtime/compiler/sass.vim +++ b/runtime/compiler/sass.vim @@ -2,16 +2,13 @@ " Compiler: Sass " Maintainer: Tim Pope " Last Change: 2016 Aug 29 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "sass" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/scdoc.vim b/runtime/compiler/scdoc.vim index c37969f..364ddc1 100644 --- a/runtime/compiler/scdoc.vim +++ b/runtime/compiler/scdoc.vim @@ -2,6 +2,7 @@ " Compiler: scdoc " Maintainer: Gregory Anders " Last Updated: 2019-10-24 +" 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) " Upstream: https://github.com/gpanders/vim-scdoc if exists('current_compiler') @@ -9,9 +10,5 @@ if exists('current_compiler') endif let current_compiler = 'scdoc' -if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=scdoc\ <\ %\ 2>&1 CompilerSet errorformat=Error\ at\ %l:%c:\ %m,%-G%.%# diff --git a/runtime/compiler/se.vim b/runtime/compiler/se.vim index 38fd10c..c933227 100644 --- a/runtime/compiler/se.vim +++ b/runtime/compiler/se.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: se (Liberty Eiffel Compiler) " Maintainer: Doug Kearns -" Last Change: 2013 Jun 29 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "se" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/shellcheck.vim b/runtime/compiler/shellcheck.vim index 7550439..5eeddc6 100644 --- a/runtime/compiler/shellcheck.vim +++ b/runtime/compiler/shellcheck.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: ShellCheck " Maintainer: Doug Kearns -" Last Change: 2020 Sep 4 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "shellcheck" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/sml.vim b/runtime/compiler/sml.vim index a0b13b6..e829e20 100644 --- a/runtime/compiler/sml.vim +++ b/runtime/compiler/sml.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: SML/NJ Compiler " Maintainer: Doug Kearns -" Last Change: 2022 Feb 09 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "sml" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/spectral.vim b/runtime/compiler/spectral.vim index bd13c51..f1ea865 100644 --- a/runtime/compiler/spectral.vim +++ b/runtime/compiler/spectral.vim @@ -2,16 +2,13 @@ " Compiler: Spectral for YAML " Maintainer: Romain Lafourcade " Last Change: 2021 July 21 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "spectral" -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=spectral\ lint\ %\ -f\ text CompilerSet errorformat=%f:%l:%c\ %t%.%\\{-}\ %m diff --git a/runtime/compiler/splint.vim b/runtime/compiler/splint.vim index 3d7ada6..e004601 100644 --- a/runtime/compiler/splint.vim +++ b/runtime/compiler/splint.vim @@ -3,6 +3,7 @@ " Maintainer: Ralf Wildenhues " Splint Home: http://www.splint.org/ " Last Change: 2019 Jul 23 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " $Revision: 1.3 $ if exists("current_compiler") @@ -10,10 +11,6 @@ if exists("current_compiler") endif let current_compiler = "splint" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/standard.vim b/runtime/compiler/standard.vim index 50b7c97..fdc79ae 100644 --- a/runtime/compiler/standard.vim +++ b/runtime/compiler/standard.vim @@ -2,15 +2,12 @@ " Compiler: Standard for JavaScript " Maintainer: Romain Lafourcade " Last Change: 2020 August 20 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "standard" -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=npx\ standard CompilerSet errorformat=%f:%l:%c:\ %m,%-G%.%# diff --git a/runtime/compiler/stylelint.vim b/runtime/compiler/stylelint.vim index 784a61d..22acea9 100644 --- a/runtime/compiler/stylelint.vim +++ b/runtime/compiler/stylelint.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Stylelint " Maintainer: Doug Kearns -" Last Change: 2020 Jun 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "stylelint" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/tcl.vim b/runtime/compiler/tcl.vim index 81af185..1e6d1f3 100644 --- a/runtime/compiler/tcl.vim +++ b/runtime/compiler/tcl.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: tcl " Maintainer: Doug Kearns -" Last Change: 2004 Nov 27 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "tcl" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=tcl CompilerSet errorformat=%EError:\ %m,%+Z\ %\\{4}(file\ \"%f\"\ line\ %l),%-G%.%# diff --git a/runtime/compiler/tex.vim b/runtime/compiler/tex.vim index 65e15cf..282b3a0 100644 --- a/runtime/compiler/tex.vim +++ b/runtime/compiler/tex.vim @@ -1,7 +1,10 @@ " Vim compiler file " Compiler: TeX " Maintainer: Artem Chuprina -" Last Change: 2012 Apr 30 +" Contributors: Enno Nagel +" Last Change: 2024 Mar 29 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) +" 2024 Apr 05 by The Vim Project (avoid leaving behind g:makeprg) if exists("current_compiler") finish @@ -9,10 +12,6 @@ endif let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - " If makefile exists and we are not asked to ignore it, we use standard make " (do not redefine makeprg) if exists('b:tex_ignore_makefile') || exists('g:tex_ignore_makefile') || @@ -27,7 +26,8 @@ if exists('b:tex_ignore_makefile') || exists('g:tex_ignore_makefile') || else let current_compiler = "latex" endif - let &l:makeprg=current_compiler.' -interaction=nonstopmode' + let s:makeprg=current_compiler .. ' -interaction=nonstopmode' + execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' ') else let current_compiler = 'make' endif diff --git a/runtime/compiler/tidy.vim b/runtime/compiler/tidy.vim index 3f8e68e..9e72207 100644 --- a/runtime/compiler/tidy.vim +++ b/runtime/compiler/tidy.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: HTML Tidy " Maintainer: Doug Kearns -" Last Change: 2020 Sep 4 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "tidy" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/ts-node.vim b/runtime/compiler/ts-node.vim index 14f0ea7..1b46d3b 100644 --- a/runtime/compiler/ts-node.vim +++ b/runtime/compiler/ts-node.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: TypeScript Runner " Maintainer: Doug Kearns -" Last Change: 2020 Feb 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "node" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/tsc.vim b/runtime/compiler/tsc.vim index a246fc7..76f525b 100644 --- a/runtime/compiler/tsc.vim +++ b/runtime/compiler/tsc.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: TypeScript Compiler " Maintainer: Doug Kearns -" Last Change: 2020 Feb 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "tsc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/typedoc.vim b/runtime/compiler/typedoc.vim index 3be06f3..7a152e8 100644 --- a/runtime/compiler/typedoc.vim +++ b/runtime/compiler/typedoc.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: TypeDoc " Maintainer: Doug Kearns -" Last Change: 2020 Feb 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "typedoc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/vimdoc.vim b/runtime/compiler/vimdoc.vim new file mode 100644 index 0000000..a30355f --- /dev/null +++ b/runtime/compiler/vimdoc.vim @@ -0,0 +1,20 @@ +" Vim Compiler File +" Language: vimdoc +" Maintainer: Wu, Zhenyu +" Latest Revision: 2024-04-13 +" +" If you can not find 'vimdoc' in the package manager of your distribution e.g +" 'pip', then you may need to build it from its source. + +if exists('b:current_compiler') + finish +endif +let b:current_compiler = 'vimdoc' + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +CompilerSet makeprg=vimdoc + +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions diff --git a/runtime/compiler/xbuild.vim b/runtime/compiler/xbuild.vim index b508a46..42c7c65 100644 --- a/runtime/compiler/xbuild.vim +++ b/runtime/compiler/xbuild.vim @@ -2,6 +2,7 @@ " Compiler: Mono C# " Maintainer: Chiel ten Brinke (ctje92@gmail.com) " Last Change: 2013 May 13 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -11,10 +12,6 @@ let current_compiler = "xbuild" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=\ %#%f(%l\\\,%c):\ %m CompilerSet makeprg=xbuild\ /nologo\ /v:q\ /property:GenerateFullPaths=true diff --git a/runtime/compiler/xmllint.vim b/runtime/compiler/xmllint.vim index 79d38b4..16eebb4 100644 --- a/runtime/compiler/xmllint.vim +++ b/runtime/compiler/xmllint.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Libxml2 Command-Line Tool " Maintainer: Doug Kearns -" Last Change: 2020 Jul 30 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "xmllint" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/xmlwf.vim b/runtime/compiler/xmlwf.vim index 3de9d08..2e38ca4 100644 --- a/runtime/compiler/xmlwf.vim +++ b/runtime/compiler/xmlwf.vim @@ -2,6 +2,7 @@ " Compiler: xmlwf " Maintainer: Robert Rowsome " Last Change: 2019 Jul 23 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -11,10 +12,6 @@ let current_compiler = "xmlwf" let s:cpo_save = &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=xmlwf\ %:S CompilerSet errorformat=%f:%l%c:%m diff --git a/runtime/compiler/xo.vim b/runtime/compiler/xo.vim index 525657d..74804ca 100644 --- a/runtime/compiler/xo.vim +++ b/runtime/compiler/xo.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: XO " Maintainer: Doug Kearns -" Last Change: 2019 Jul 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "xo" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/yamllint.vim b/runtime/compiler/yamllint.vim index 889b04b..88e2efb 100644 --- a/runtime/compiler/yamllint.vim +++ b/runtime/compiler/yamllint.vim @@ -2,15 +2,12 @@ " Compiler: Yamllint for YAML " Maintainer: Romain Lafourcade " Last Change: 2021 July 21 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "yamllint" -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=yamllint\ -f\ parsable diff --git a/runtime/compiler/zig.vim b/runtime/compiler/zig.vim index 2cc6831..44014a3 100644 --- a/runtime/compiler/zig.vim +++ b/runtime/compiler/zig.vim @@ -10,10 +10,6 @@ let current_compiler = "zig" let s:save_cpo = &cpo set cpo&vim -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - " a subcommand must be provided for the this compiler (test, build-exe, etc) if has('patch-7.4.191') CompilerSet makeprg=zig\ \$*\ \%:S diff --git a/runtime/compiler/zig_build.vim b/runtime/compiler/zig_build.vim index 0441267..5a61c9f 100644 --- a/runtime/compiler/zig_build.vim +++ b/runtime/compiler/zig_build.vim @@ -1,6 +1,7 @@ " Vim compiler file " Compiler: Zig Compiler (zig build) " Upstream: https://github.com/ziglang/zig.vim +" Last Change: 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) if exists('current_compiler') finish @@ -11,11 +12,6 @@ let current_compiler = 'zig_build' let s:save_cpo = &cpo set cpo&vim - -if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal -endif - if exists('g:zig_build_makeprg_params') execute 'CompilerSet makeprg=zig\ build\ '.escape(g:zig_build_makeprg_params, ' \|"').'\ $*' else diff --git a/runtime/compiler/zig_build_exe.vim b/runtime/compiler/zig_build_exe.vim index 20f0bb3..259d0e2 100644 --- a/runtime/compiler/zig_build_exe.vim +++ b/runtime/compiler/zig_build_exe.vim @@ -1,6 +1,7 @@ " Vim compiler file " Compiler: Zig Compiler (zig build-exe) " Upstream: https://github.com/ziglang/zig.vim +" Last Change: 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) if exists('current_compiler') finish @@ -11,11 +12,6 @@ let current_compiler = 'zig_build_exe' let s:save_cpo = &cpo set cpo&vim - -if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal -endif - if has('patch-7.4.191') CompilerSet makeprg=zig\ build-exe\ \%:S\ \$* else diff --git a/runtime/compiler/zig_test.vim b/runtime/compiler/zig_test.vim index a82d2a6..dafeb6f 100644 --- a/runtime/compiler/zig_test.vim +++ b/runtime/compiler/zig_test.vim @@ -1,6 +1,7 @@ " Vim compiler file " Compiler: Zig Compiler (zig test) " Upstream: https://github.com/ziglang/zig.vim +" Last Change: 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) if exists('current_compiler') finish @@ -11,11 +12,6 @@ let current_compiler = 'zig_test' let s:save_cpo = &cpo set cpo&vim - -if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal -endif - if has('patch-7.4.191') CompilerSet makeprg=zig\ test\ \%:S\ \$* else diff --git a/runtime/compiler/zsh.vim b/runtime/compiler/zsh.vim index 5703c1f..bd19558 100644 --- a/runtime/compiler/zsh.vim +++ b/runtime/compiler/zsh.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Zsh " Maintainer: Doug Kearns -" Last Change: 2020 Sep 6 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "zsh" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/doc/Make_mvc.mak b/runtime/doc/Make_mvc.mak index 850d86b..f2fbc52 100644 --- a/runtime/doc/Make_mvc.mak +++ b/runtime/doc/Make_mvc.mak @@ -1,7 +1,7 @@ # # Makefile for the Vim documentation on Windows # -# 17.11.23, Restorer, +# 20.03.24, Restorer, # Common components !INCLUDE Make_all.mak @@ -23,7 +23,7 @@ ICONV_PATH = D:\Programs\GetText\bin # If the "touch" 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 ("touch.exe") -TOUCH = "touch.exe" %1 +TOUCH = touch.exe %1 !ELSE TOUCH = if exist %1 ( copy /b %1+,, ) else ( type nul >%1 ) !ENDIF @@ -33,7 +33,7 @@ TOUCH = if exist %1 ( copy /b %1+,, ) else ( type nul >%1 ) # 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 ("$(ICONV_PATH)\iconv.exe") ICONV = "$(ICONV_PATH)\iconv.exe" !ENDIF @@ -53,8 +53,8 @@ all : tags perlhtml $(CONVERTED) tags : doctags $(DOCS) doctags.exe $(DOCS) | sort /L C /O tags $(PS) $(PSFLAGS) \ - (Get-Content -Raw tags ^| Get-Unique ^| %%{$$_ -replace \"`r\", \"\"})\ - ^| New-Item -Force -Path . -ItemType file -Name tags + (Get-Content -Raw tags ^| Get-Unique ^| %%{$$_ -replace \"`r\", \"\"}) \ + ^| New-Item -Path . -Force -ItemType file -Name tags doctags : doctags.c $(CC) doctags.c @@ -67,13 +67,12 @@ vimtags : $(DOCS) uganda.nsis.txt : uganda.??? - !@$(PS) $(PSFLAGS) $$ext=(Get-Item $?).Extension; (Get-Content $? ^| \ - %%{$$_ -replace '\s*\*[-a-zA-Z0-9.]*\*', '' -replace 'vim:tw=78:.*', ''})\ - ^| Set-Content $*$$ext - !@$(PS) $(PSFLAGS) $$ext=(Get-Item $?).Extension; \ - (Get-Content -Raw $(@B)$$ext).Trim() -replace '(\r\n){3,}', '$$1$$1' \ - ^| Set-Content $(@B)$$ext - + ! $(PS) $(PSFLAGS) (Get-Content $? -Encoding UTF8 \ + ^| %%{$$_ -replace '[\t\s]*\*.*\*', '' -replace 'vim:tw=\d\d:.*', ''}) \ + ^| Set-Content \"$(@B)$$((Get-Item $?).Extension)\" -Encoding Unicode + ! $(PS) $(PSFLAGS)\ + (Get-Content $(@B)$$((Get-Item $?).Extension) -Raw).Trim() -replace '(\r\n){3,}', '$$1$$1' \ + ^| Set-Content \"$(@B)$$((Get-Item $?).Extension)\" -Encoding Unicode # TODO: #html: noerrors tags $(HTMLS) diff --git a/runtime/doc/Makefile b/runtime/doc/Makefile index eecce55..30a4f08 100644 --- a/runtime/doc/Makefile +++ b/runtime/doc/Makefile @@ -50,9 +50,15 @@ vimtutor.man: vimtutor.1 xxd.man: xxd.1 nroff -man $< | sed -e s/.//g > $@ -uganda.nsis.txt: uganda.txt - sed -e 's/[ ]*\*[-a-zA-Z0-9.]*\*//g' -e 's/vim:tw=78:.*//' \ - uganda.txt | uniq >uganda.nsis.txt +uganda.nsis.txt : uganda.??? + for dpn in $?; do \ + trg=$@; \ + sed -e 's/[ ]*\*.*\*//g' -e 's/vim:tw=[[:digit:]][[:digit:]]:.*//' \ + $${dpn} | uniq > $${trg%txt}$${dpn##*.}; \ + done +# This files needs to be in dos fileformat for NSIS. + $(VIMEXE) -e -X -u NONE --cmd "set notitle noicon nocp noml viminfo=" \ + -c "argdo write ++ff=dos" -c "qa" uganda.nsis.??? # Awk version of .txt to .html conversion. html: noerrors tags $(HTMLS) diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 5f9f51e..32094b3 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 9.1. Last change: 2024 Jan 25 +*autocmd.txt* For Vim version 9.1. Last change: 2024 Mar 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -428,6 +428,9 @@ Name triggered by ~ |SessionLoadPost| after loading a session file +|SessionWritePost| After writing the session file using + the |:mksession| command. + |MenuPopup| just before showing the popup menu |CompleteChanged| after Insert mode completion menu changed |CompleteDonePre| after Insert mode completion is done, before clearing @@ -1114,6 +1117,9 @@ SafeStateAgain Like SafeState but after processing any *SessionLoadPost* SessionLoadPost After loading the session file created using + the |:mksession| command. + *SessionWritePost* +SessionWritePost After writing a session file by calling the |:mksession| command. *ShellCmdPost* ShellCmdPost After executing a shell command with |:!cmd|, diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index ec70220..79f3cd7 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 Mar 23 +*builtin.txt* For Vim version 9.1. Last change: 2024 Apr 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -220,12 +220,12 @@ getbufvar({buf}, {varname} [, {def}]) any variable {varname} in buffer {buf} getcellwidths() List get character cell width overrides getchangelist([{buf}]) List list of change list items -getchar([expr]) Number or String +getchar([{expr}]) Number or String get one character from the user getcharmod() Number modifiers for the last typed character getcharpos({expr}) List position of cursor, mark, etc. getcharsearch() Dict last character search -getcharstr([expr]) String get one character from the user +getcharstr([{expr}]) String get one character from the user getcmdcompltype() String return the type of the current command-line completion getcmdline() String return the current command-line @@ -398,7 +398,7 @@ menu_info({name} [, {mode}]) Dict get menu item information min({expr}) Number minimum value of items in {expr} mkdir({name} [, {flags} [, {prot}]]) Number create directory {name} -mode([expr]) String current editing mode +mode([{expr}]) String current editing mode mzeval({expr}) any evaluate |MzScheme| expression nextnonblank({lnum}) Number line nr of non-blank line >= {lnum} nr2char({expr} [, {utf8}]) String single char with ASCII/UTF-8 value {expr} @@ -699,7 +699,7 @@ test_override({expr}, {val}) none test with Vim internal overrides test_refcount({expr}) Number get the reference count of {expr} test_setmouse({row}, {col}) none set the mouse position for testing test_settime({expr}) none set current time for testing -test_srand_seed([seed]) none set seed for testing srand() +test_srand_seed([{seed}]) none set seed for testing srand() test_unknown() any unknown value for testing test_void() any void value for testing timer_info([{id}]) List information about timers @@ -729,7 +729,7 @@ virtcol({expr} [, {list} [, {winid}]) screen column of cursor or mark virtcol2col({winid}, {lnum}, {col}) Number byte index of a character on screen -visualmode([expr]) String last visual mode used +visualmode([{expr}]) String last visual mode used wildmenumode() Number whether 'wildmenu' mode is active win_execute({id}, {command} [, {silent}]) String execute {command} in window {id} @@ -1771,7 +1771,7 @@ confirm({msg} [, {choices} [, {default} [, {type}]]]) made. It returns the number of the choice. For the first choice this is 1. Note: confirm() is only supported when compiled with dialog - support, see |+dialog_con| and |+dialog_gui|. + support, see |+dialog_con| |+dialog_con_gui| and |+dialog_gui|. {msg} is displayed in a |dialog| with {choices} as the alternatives. When {choices} is missing or empty, "&OK" is @@ -2265,8 +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. + - An |Object| is empty, when the empty() method in the object + (if present) returns true. |object-empty()| For a long |List| this is much faster than comparing the length with zero. @@ -2307,7 +2307,8 @@ eval({string}) Evaluate {string} and return the result. Especially useful to turn the result of |string()| back into the original value. This works for Numbers, Floats, Strings, Blobs and composites of them. Also works for |Funcref|s that refer to existing - functions. + functions. In |Vim9| script, it can be used to obtain |enum| + values from their fully qualified names. Can also be used as a |method|: > argv->join()->eval() @@ -3454,16 +3455,16 @@ getchangelist([{buf}]) *getchangelist()* Can also be used as a |method|: > GetBufnr()->getchangelist() -getchar([expr]) *getchar()* +getchar([{expr}]) *getchar()* Get a single character from the user or input stream. - If [expr] is omitted, wait until a character is available. - If [expr] is 0, only get a character when one is available. + If {expr} is omitted, wait until a character is available. + If {expr} is 0, only get a character when one is available. Return zero otherwise. - If [expr] is 1, only check if a character is available, it is + If {expr} is 1, only check if a character is available, it is not consumed. Return zero if no character available. If you prefer always getting a string use |getcharstr()|. - Without [expr] and when [expr] is 0 a whole character or + Without {expr} and when {expr} is 0 a whole character or special key is returned. If it is a single character, the result is a Number. Use |nr2char()| to convert it to a String. Otherwise a String is returned with the encoded character. @@ -3473,11 +3474,11 @@ getchar([expr]) *getchar()* also a String when a modifier (shift, control, alt) was used that is not included in the character. - When [expr] is 0 and Esc is typed, there will be a short delay + When {expr} is 0 and Esc is typed, there will be a short delay while Vim waits to see if this is the start of an escape sequence. - When [expr] is 1 only the first byte is returned. For a + When {expr} is 1 only the first byte is returned. For a one-byte character it is the character itself as a number. Use nr2char() to convert it to a String. @@ -3588,13 +3589,13 @@ getcharsearch() *getcharsearch()* < Also see |setcharsearch()|. -getcharstr([expr]) *getcharstr()* +getcharstr([{expr}]) *getcharstr()* Get a single character from the user or input stream as a string. - If [expr] is omitted, wait until a character is available. - If [expr] is 0 or false, only get a character when one is + If {expr} is omitted, wait until a character is available. + If {expr} is 0 or false, only get a character when one is available. Return an empty string otherwise. - If [expr] is 1 or true, only check if a character is + If {expr} is 1 or true, only check if a character is available, it is not consumed. Return an empty string if no character is available. Otherwise this works like |getchar()|, except that a number @@ -5485,9 +5486,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. - When {expr} is an |Object|, invokes the |len()| method in the - object (if present) to get the length. Otherwise returns - zero. + When {expr} is an |Object|, invokes the len() method in the + object (if present) to get the length (|object-len()|). + Otherwise returns zero. Can also be used as a |method|: > mylist->len() @@ -6647,8 +6648,8 @@ mkdir({name} [, {flags} [, {prot}]]) GetName()->mkdir() < *mode()* -mode([expr]) Return a string that indicates the current mode. - If [expr] is supplied and it evaluates to a non-zero Number or +mode([{expr}]) Return a string that indicates the current mode. + If {expr} is supplied and it evaluates to a non-zero Number or a non-empty String (|non-zero-arg|), then the full mode is returned, otherwise only the first letter is returned. Also see |state()|. @@ -9598,14 +9599,16 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number, Dictionary {key: value, key: value} Class class SomeName Object object of SomeName {lnum: 1, col: 3} + Enum enum EnumName + EnumValue enum name.value {name: str, ordinal: nr} When a |List| or |Dictionary| has a recursive reference it is replaced by "[...]" or "{...}". Using eval() on the result will then fail. - For an object, invokes the |string()| method to get a textual + 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. + then the default representation is used. |object-string()| Can also be used as a |method|: > mylist->string() @@ -9977,6 +9980,10 @@ synconcealed({lnum}, {col}) *synconcealed()* synconcealed(lnum, 5) [1, 'X', 2] synconcealed(lnum, 6) [0, '', 0] + Note: Doesn't consider |matchadd()| highlighting items, + since syntax and matching highlighting are two different + mechanisms |syntax-vs-match|. + synstack({lnum}, {col}) *synstack()* Return a |List|, which is the stack of syntax items at the @@ -10461,6 +10468,8 @@ type({expr}) The result is a Number representing the type of {expr}. Class: 12 |v:t_class| Object: 13 |v:t_object| Typealias: 14 |v:t_typealias| + Enum: 15 |v:t_enum| + EnumValue: 16 |v:t_enumvalue| For backward compatibility, this method can be used: > :if type(myvar) == type(0) :if type(myvar) == type("") @@ -11195,6 +11204,7 @@ cscope Compiled with |cscope| support. cursorbind Compiled with |'cursorbind'| (always true) debug Compiled with "DEBUG" defined. dialog_con Compiled with console dialog support. +dialog_con_gui Compiled with console and GUI dialog support. dialog_gui Compiled with GUI dialog support. diff Compiled with |vimdiff| and 'diff' support. digraphs Compiled with support for digraphs. diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 7063cad..cd3d6ad 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 9.1. Last change: 2023 Dec 19 +*change.txt* For Vim version 9.1. Last change: 2024 Apr 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1345,8 +1345,8 @@ expression (like with the "/" command). The expression must evaluate to a String. A Number is always automatically converted to a String. For the "p" and ":put" command, if the result is a Float it's converted into a String. If the result is a List each element is -turned into a String and used as a line. A Dictionary or FuncRef results in -an error message (use string() to convert). +turned into a String and used as a line. A Dictionary is converted into a +String. A FuncRef results in an error message (use string() to convert). If the "= register is used for the "p" command, the String is split up at characters. If the String ends in a , it is regarded as a linewise diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index d0f8938..ca8f0ae 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1,4 +1,4 @@ -*editing.txt* For Vim version 9.1. Last change: 2024 Jan 14 +*editing.txt* For Vim version 9.1. Last change: 2024 Apr 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -658,9 +658,12 @@ list of the current window. :[count]arge[dit][!] [++opt] [+cmd] {name} .. *:arge* *:argedit* Add {name}s to the argument list and edit it. - When {name} already exists in the argument list, this - entry is edited. - This is like using |:argadd| and then |:edit|. + There is no check for duplicates, it is possible to + add a file to the argument list twice |:argded|. + This is like using |:argadd| and then |:edit| (with + the small exception that |:edit| does not change the + argument list, so the argument list pointer isn't + changed). Spaces in filenames have to be escaped with "\". [count] is used like with |:argadd|. If the current file cannot be |abandon|ed {name}s will @@ -679,12 +682,12 @@ list of the current window. If the argument list is "a b c", and "b" is the current argument, then these commands result in: command new argument list ~ - :argadd x a b x c - :0argadd x x a b c - :1argadd x a x b c - :$argadd x a b c x + :argadd x a [b] x c + :0argadd x x a [b] c + :1argadd x a x [b] c + :$argadd x a [b] c x And after the last one: - :+2argadd y a b c x y + :+2argadd y a [b] c x y There is no check for duplicates, it is possible to add a file to the argument list twice. You can use |:argdedupe| to fix it afterwards: > diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index f2ff3a8..fd37d97 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 9.1. Last change: 2024 Mar 20 +*eval.txt* For Vim version 9.1. Last change: 2024 Mar 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2601,6 +2601,10 @@ v:t_class Value of |class| type. Read-only. See: |type()| v:t_object Value of |object| type. Read-only. See: |type()| *v:t_typealias* *t_typealias-variable* v:t_typealias Value of |typealias| type. Read-only. See: |type()| + *v:t_enum* *t_enum-variable* +v:t_enum Value of |enum| type. Read-only. See: |type()| + *v:t_enumvalue* *t_enumvalue-variable* +v:t_enumvalue Value of |enumvalue| type. Read-only. See: |type()| *v:termresponse* *termresponse-variable* v:termresponse The escape sequence returned by the terminal for the |t_RV| diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 41b27cc..f8a8ebe 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 Feb 14 +*filetype.txt* For Vim version 9.1. Last change: 2024 Apr 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -157,6 +157,8 @@ variables can be used to overrule the filetype used for certain extensions: *.inc g:filetype_inc *.lsl g:filetype_lsl *.m g:filetype_m |ft-mathematica-syntax| + *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md + g:filetype_md |ft-pandoc-syntax| *.mod g:filetype_mod *.p g:filetype_p |ft-pascal-syntax| *.pl g:filetype_pl @@ -437,6 +439,19 @@ So to enable this only for ruby, set the following variable: > If both, the global `plugin_exec` and the `_exec` specific variable are set, the filetype specific variable should have precedent. + +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 + + AWK *ft-awk-plugin* Support for features specific to GNU Awk, like @include, can be enabled by @@ -564,18 +579,6 @@ 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: @@ -624,6 +627,37 @@ The mapping can be disabled with: > let g:no_gprof_maps = 1 +JAVA *ft-java-plugin* + +Whenever the variable "g:ftplugin_java_source_path" is defined and its value +is a filename whose extension is either ".jar" or ".zip", e.g.: > + let g:ftplugin_java_source_path = '/path/to/src.jar' + let g:ftplugin_java_source_path = '/path/to/src.zip' +< +and the |zip| plugin has already been sourced, the |gf| command can be used to +open the archive and the |n| command can be used to look for the selected type +and the key can be used to load a listed file. + +Note that the effect of using the "gf" command WITHIN a buffer loaded with the +Zip plugin depends on the version of the Zip plugin. For the Zip plugin +versions that do not support Jar type archives, consider creating symbolic +links with the ".zip" extension for each Jar archive of interest and assigning +any such file to the variable from now on. + +Otherwise, for the defined variable "g:ftplugin_java_source_path", the local +value of the 'path' option will be further modified by prefixing the value of +the variable, e.g.: > + let g:ftplugin_java_source_path = $JDK_SRC_PATH + let &l:path = g:ftplugin_java_source_path . ',' . &l:path +< +and the "gf" command can be used on a fully-qualified type to look for a file +in the "path" and to try to load it. + +Remember to manually trigger the |FileType| event from a buffer with a Java +file loaded in it each time after assigning a new value to the variable: > + doautocmd FileType +< + JSON-FORMAT *ft-json-plugin* JSON filetype can be extended to use 'formatexpr' and "json.FormatExpr()" diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index 6e08752..3fda6e1 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -1,4 +1,4 @@ -*gui.txt* For Vim version 9.1. Last change: 2023 Apr 29 +*gui.txt* For Vim version 9.1. Last change: 2024 Apr 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -70,6 +70,8 @@ When the GUI starts up initializations are carried out, in this order: - For Win32, $HOME is set by Vim if needed, see |$HOME-windows|. - When a "_gvimrc" file is not found, ".gvimrc" is tried too. And vice versa. + - On Unix, if "~/.config/vim/gvimrc" or "$XDG_CONFIG_HOME/vim/gvimrc" + exists, it is sourced. You can check this with ":version". The name of the first file found is stored in $MYGVIMRC, unless it was already set. - If the 'exrc' option is set (which is NOT the default) the file ./.gvimrc diff --git a/runtime/doc/gui_x11.txt b/runtime/doc/gui_x11.txt index bc2ba54..dbd4b10 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: 2024 Jan 30 +*gui_x11.txt* For Vim version 9.1. Last change: 2024 Apr 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -636,8 +636,8 @@ that version. For Motif, you need at least Motif version 1.2 and/or X11R5. Motif 2.0 and X11R6 are OK. Motif 1.1 and X11R4 might work, no guarantee (there may be a few problems, but you might make it compile and run with a bit of work, please -send me the patches if you do). The newest releases of LessTif have been -reported to work fine too. +send patches if you do). The newest releases of LessTif have been reported to +work fine too. *gui-x11-athena* *gui-x11-neXtaw* Support for the Athena GUI and neXtaw was removed in patch 8.2.4677. diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt index 07a4c96..40039e3 100644 --- a/runtime/doc/helphelp.txt +++ b/runtime/doc/helphelp.txt @@ -1,4 +1,4 @@ -*helphelp.txt* For Vim version 9.1. Last change: 2022 Jan 08 +*helphelp.txt* For Vim version 9.1. Last change: 2024 Apr 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -315,7 +315,7 @@ Hints for translators: using the "tag@en" notation. - Make a package with all the files and the tags file available for download. Users can drop it in one of the "doc" directories and start use it. - Report this to Bram, so that he can add a link on www.vim.org. + Report to the development team, so they can add a link on www.vim.org. - Use the |:helptags| command to generate the tags files. It will find all languages in the specified directory. diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 120d65d..12808a5 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -1,4 +1,4 @@ -*intro.txt* For Vim version 9.1. Last change: 2024 Jan 25 +*intro.txt* For Vim version 9.1. Last change: 2024 Apr 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -132,9 +132,9 @@ There are three ways to report bugs: 3. Send bug reports to: Vim Developers This is a maillist, you need to become a member first and many people will see the message. If you don't want that, e.g. because it is a security - issue, please contact any of the current Vim maintainers - https://github.com/orgs/vim/people (but not Bram or the vim-dev ML). - In the future, a proper process for handling security issues will be setup. + issue, please contact the current Vim maintainers at the e-mail address + or create a security advisory at Github: + https://github.com/vim/vim/security/advisories Please be brief; all the time that is spent on answering mail is subtracted from the time that is spent on improving Vim! Always give a reproducible @@ -145,7 +145,7 @@ Preferably start Vim with: > Where reproduce.vim is a script that reproduces the problem. Try different machines, if relevant (is this an MS-Windows specific bug perhaps?). -Send me patches if you can! If you create a pull request on +Send patches if you can! If you create a pull request on https://github.com/vim/vim then the automated checks will run and report any obvious problems. But you can also send the patch by email (use an attachment to avoid white space changes). diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index a79e0b2..806f5f0 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 Mar 11 +*options.txt* For Vim version 9.1. Last change: 2024 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -7502,8 +7502,7 @@ A jump table for the options with a short description can be found at |Q_op|. highlighted with |hl-NonText|. You may also want to add "lastline" to the 'display' option to show as much of the last line as possible. - NOTE: only partly implemented, currently works with CTRL-E, CTRL-Y - and scrolling with the mouse. + NOTE: partly implemented, doesn't work yet for |gj| and |gk|. *'softtabstop'* *'sts'* 'softtabstop' 'sts' number (default 0) @@ -8106,7 +8105,7 @@ A jump table for the options with a short description can be found at |Q_op|. appear wrong in many places, e.g., when printing it. The value must be more than 0 and less than 10000. - There are four main ways to use tabs in Vim: + There are five main ways to use tabs in Vim: 1. Always keep 'tabstop' at 8, set 'softtabstop' and 'shiftwidth' to 4 (or 3 or whatever you prefer) and use 'noexpandtab'. Then Vim will use a mix of tabs and spaces, but typing and will @@ -9469,8 +9468,8 @@ A jump table for the options with a short description can be found at |Q_op|. will scroll 'window' minus two lines, with a minimum of one. When 'window' is equal to 'lines' minus one CTRL-F and CTRL-B scroll in a much smarter way, taking care of wrapping lines. - When resizing the Vim window, the value is smaller than 1 or more than - or equal to 'lines' it will be set to 'lines' minus 1. + When resizing the Vim window, and the value is smaller than 1 or more + than or equal to 'lines' it will be set to 'lines' minus 1. Note: Do not confuse this with the height of the Vim window, use 'lines' for that. diff --git a/runtime/doc/os_dos.txt b/runtime/doc/os_dos.txt index e81ba9a..1b738f4 100644 --- a/runtime/doc/os_dos.txt +++ b/runtime/doc/os_dos.txt @@ -1,4 +1,4 @@ -*os_dos.txt* For Vim version 9.1. Last change: 2006 Mar 30 +*os_dos.txt* For Vim version 9.1. Last change: 2024 Apr 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -330,6 +330,11 @@ following values: 'shellpipe' >%s 2>&1 'shellredir' >%s 2>&1 +Note: those options are only set after reading the |.vimrc| file, in +particular setting the 'shell' option via |-c| is too late to take effect for +the other shell related settings. Consider using |--cmd| to override this +option via the command line. + If you find that PowerShell commands are taking a long time to run then try with "-NoProfile" at the beginning of the 'shellcmdflag'. Note this will prevent any PowerShell environment setup by the profile from taking place. diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 2d1898d..c23462c 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 9.1. Last change: 2023 Oct 23 +*pattern.txt* For Vim version 9.1. Last change: 2024 Apr 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1394,6 +1394,19 @@ Finally, these constructs are unique to Perl: ============================================================================== 10. Highlighting matches *match-highlight* + *syntax-vs-match* + Note that the match highlight mechanism is independent + of |syntax-highlighting|, which is (usually) a buffer-local + highlighting, while matching is window-local, both methods + can be freely mixed. Match highlighting functions give you + a bit more flexibility in when and how to apply, but are + typically only used for temporary highlighting, without strict + rules. Both methods can be used to conceal text. + + Thus the matching functions like |matchadd()| won't consider + syntax rules and functions like |synconcealend()| and the + other way around. + *:mat* *:match* :mat[ch] {group} /{pattern}/ Define a pattern to highlight in the current window. It will diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index ae3bfb5..e659d39 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 9.1. Last change: 2023 Jan 18 +*quickfix.txt* For Vim version 9.1. Last change: 2023 Apr 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1321,6 +1321,15 @@ If Vim was started from the compiler, the :sh and some :! commands will not work, because Vim is then running in the same process as the compiler and stdin (standard input) will not be interactive. +PANDOC *quickfix-pandoc* *compiler-pandoc* + +The Pandoc compiler plugin expects that an output file type extension is +passed to make, say :make html or :make pdf. + +Additional arguments can be passed to pandoc: + +- either by appending them to make, say `:make html --self-contained` . +- or setting them in `b:pandoc_compiler_args` or `g:pandoc_compiler_args` PERL *quickfix-perl* *compiler-perl* diff --git a/runtime/doc/sponsor.txt b/runtime/doc/sponsor.txt index 86da892..1698168 100644 --- a/runtime/doc/sponsor.txt +++ b/runtime/doc/sponsor.txt @@ -1,4 +1,4 @@ -*sponsor.txt* For Vim version 9.1. Last change: 2023 Mar 24 +*sponsor.txt* For Vim version 9.1. Last change: 2024 Apr 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -8,11 +8,12 @@ SPONSOR VIM DEVELOPMENT *sponsor* Fixing bugs and adding new features takes a lot of time and effort. To show -your appreciation for the work and motivate Bram and others to continue -working on Vim please send a donation. +your appreciation for the work and motivate developers to continue working on +Vim please send a donation. -Since Bram does not need the money it will be used to help children in Uganda, -see |uganda|. Donations increase Bram's motivation to keep working on Vim! +The money you donated will be mainly used to help children in Uganda. See +|uganda|. But at the same time donations increase the development team +motivation to keep working on Vim! For the most recent information about sponsoring look on the Vim web site: @@ -33,22 +34,12 @@ More explanations can be found in the |register-faq|. VOTE FOR FEATURES *vote-for-features* -To give registered Vim users and sponsors an advantage over lurkers they can -vote for the items Bram should work on. How does this voting work? +Note: Voting for features has been discontinued since the passing of |Bram| in +2023. The following two links still work, but they are no longer updated. So +they now only provide a historic view as of summer 2023. -1. You send at least 10 euro. See below for ways to transfer money - |send-money|. - -2. You will be e-mailed a registration key. Enter this key on your account - page on the Vim website. You can easily create an account if you don't - have one yet. - -3. You can enter your votes on the voting page. There is a link to that page - on your account page after entering a registration key. Your votes will - be counted for two years. - -4. The voting results appear on the results page, which is visible for - everybody: http://www.vim.org/sponsor/vote_results.php +The voting results appear on the results page, which is visible for everybody: +http://www.vim.org/sponsor/vote_results.php Additionally, once you have sent 100 euro or more in total, your name appears in the "Vim hall of honour": http://www.vim.org/sponsor/hall_of_honour.php @@ -69,17 +60,16 @@ Credit card Through PayPal, see the PayPal site for information: Other methods See |iccf-donations|. Include "Vim sponsor" or "Vim registration" in the comment of - your money transfer. Send me an e-mail that mentions the - amount you transferred if you want to vote for features and - show others you are a registered Vim user or sponsor. + your money transfer. QUESTIONS AND ANSWERS *sponsor-faq* *register-faq* Why should I give money? -If you do not show your appreciation for Vim then Bram will be less motivated -to fix bugs and add new features. He will do something else instead. +If you do not show your appreciation for Vim, the development team will be +less motivated to fix bugs and add new features. They will do something else +instead. How much money should I send? @@ -90,18 +80,6 @@ professional use: 30 Euro per year per person. Send at least 10 euro to be able to vote for features. -What do I get in return? - -Each registered Vim user and sponsor who donates at least 10 euro will be able -to vote for new features. These votes will give priority to the work on Vim. -The votes are valid for two years. The more money you send the more your -votes count |votes-counted|. - -If you send 100 Euro or more in total you will be mentioned on the "Vim hall -of honour" page on the Vim web site. But only if you enable this on your -account page. You can also select whether the amount will be visible. - - How do I become a Vim sponsor or registered Vim user? Send money, as explained above |send-money| and include your e-mail address. @@ -146,29 +124,6 @@ No, suggestions for improving Vim can always be given. For improvements use the developer |maillist|, for reporting bugs see |bugs|. -How are my votes counted? *votes-counted* - -You may vote when you send 10 euro or more. You can enter up to ten votes. -You can select the same item several times to give it more points. You can -also enter three counter votes, these count as negative points. - -When you send 30 euro or more the points are doubled. Above 100 euro they -count four times, above 300 euro they count six times, above 1000 euro ten -times. - - -Can I change my votes? - -You can change your votes any time you like, up to two years after you -sent money. The points will be counted right away. - - -Can I add an item to vote on? - -Not directly. You can suggest items to vote on to Bram. He will consider -fitting your item into the list. - - How about Charityware? Currently the Vim donations go to |uganda| anyway. Thus it doesn't matter if @@ -178,18 +133,17 @@ for features. I donated $$$, now please add feature XYZ! -There is no direct relation between your donation and the work Bram does. +There is no direct relation between your donation and the work developers do. Otherwise you would be paying for work and we would have to pay tax over the -donation. If you want to hire Bram for specific work, contact him directly, -don't use the donation system. +donation. If you want to hire one of the developers for specific work, +contact them directly, don't use the donation system. Are the donations tax deductible? That depends on your country. The donations to help the children in |Uganda| are tax deductible in Holland, Germany, Canada and in the USA. See the ICCF -website http://iccf-holland.org/donate.html. You must send an e-mail to Bram -to let him know that the donation is done because of the use of Vim. +website http://iccf-holland.org/donate.html. Can you send me a bill? diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index a757445..b83a61e 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1,4 +1,4 @@ -*starting.txt* For Vim version 9.1. Last change: 2024 Mar 13 +*starting.txt* For Vim version 9.1. Last change: 2024 Apr 21 VIM REFERENCE MANUAL by Bram Moolenaar @@ -93,20 +93,20 @@ filename One or more file names. The first one will be the current The startup mode can be changed by using another name instead of "vim", which is equal to giving options: -ex vim -e Start in Ex mode (see |Ex-mode|). *ex* -exim vim -E Start in improved Ex mode (see |Ex-mode|). *exim* - (normally not installed) -view vim -R Start in read-only mode (see |-R|). *view* -gvim vim -g Start the GUI (see |gui|). *gvim* -gex vim -eg Start the GUI in Ex mode. *gex* -gview vim -Rg Start the GUI in read-only mode. *gview* -rvim vim -Z Like "vim", but in restricted mode (see |-Z|) *rvim* -rview vim -RZ Like "view", but in restricted mode. *rview* -rgvim vim -gZ Like "gvim", but in restricted mode. *rgvim* -rgview vim -RgZ Like "gview", but in restricted mode. *rgview* -evim vim -y Easy Vim: set 'insertmode' (see |-y|) *evim* -eview vim -yR Like "evim" in read-only mode *eview* -vimdiff vim -d Start in diff mode |diff-mode| +ex vim -e Start in Ex mode (see |Ex-mode|). *ex* +exim vim -E Start in improved Ex mode (see |Ex-mode|). *exim* + (normally not installed) +view vim -R Start in read-only mode (see |-R|). *view* +gvim vim -g Start the GUI (see |gui|). *gvim* +gex vim -eg Start the GUI in Ex mode. *gex* +gview vim -Rg Start the GUI in read-only mode. *gview* +rvim vim -Z Like "vim", but in restricted mode (see |-Z|) *rvim* +rview vim -RZ Like "view", but in restricted mode. *rview* +rgvim vim -gZ Like "gvim", but in restricted mode. *rgvim* +rgview vim -RgZ Like "gview", but in restricted mode. *rgview* +evim vim -y Easy Vim: set 'insertmode' (see |-y|) *evim* +eview vim -yR Like "evim" in read-only mode *eview* +vimdiff vim -d Start in diff mode |diff-mode| gvimdiff vim -gd Start in diff mode |diff-mode| Additional characters may follow, they are ignored. For example, you can have @@ -811,7 +811,8 @@ accordingly. Vim proceeds in this order: name. Also see |vimrc-intro|. Places for your personal initializations: - Unix $HOME/.vimrc or $HOME/.vim/vimrc + Unix $HOME/.vimrc, $HOME/.vim/vimrc + or $XDG_CONFIG_HOME/vim/vimrc MS-Windows $HOME/_vimrc, $HOME/vimfiles/vimrc or $VIM/_vimrc Amiga s:.vimrc, home:.vimrc, home:vimfiles:vimrc @@ -853,15 +854,16 @@ accordingly. Vim proceeds in this order: I The environment variable VIMINIT (see also |compatible-default|) (*) The value of $VIMINIT is used as an Ex command line. II The user vimrc file(s): - "$HOME/.vimrc" (for Unix) (*) - "$HOME/.vim/vimrc" (for Unix) (*) - "s:.vimrc" (for Amiga) (*) - "home:.vimrc" (for Amiga) (*) - "home:vimfiles:vimrc" (for Amiga) (*) - "$VIM/.vimrc" (for Amiga) (*) - "$HOME/_vimrc" (for Win32) (*) - "$HOME/vimfiles/vimrc" (for Win32) (*) - "$VIM/_vimrc" (for Win32) (*) + "$HOME/.vimrc" (for Unix) (*) + "$HOME/.vim/vimrc" (for Unix) (*) + "$HOME/.config/vim/vimrc" (for Unix) (*) + "s:.vimrc" (for Amiga) (*) + "home:.vimrc" (for Amiga) (*) + "home:vimfiles:vimrc" (for Amiga) (*) + "$VIM/.vimrc" (for Amiga) (*) + "$HOME/_vimrc" (for Win32) (*) + "$HOME/vimfiles/vimrc" (for Win32) (*) + "$VIM/_vimrc" (for Win32) (*) "$HOME/config/settings/vim/vimrc" (for Haiku) (*) Note: For Unix and Amiga, when ".vimrc" does not exist, @@ -1085,6 +1087,44 @@ defaults.vim from your .vimrc, first unlet skip_defaults_vim, as in the example above. + *xdg-base-dir* *$XDG_CONFIG_HOME* +XDG Base Directory Specification ~ + +The XDG Base Directory Specification aims to define a standard location for +configuration files used by applications. This is mainly done to prevent +the legacy behavior of dumping everything into the user's home directory. +The specification can be found online at +https://specifications.freedesktop.org/basedir-spec/latest/ + +The location of this standard configuration directory is configurable by the +user, using an environment variable but should also give fallback in case those +variables weren't set. + +This is not an exhaustive list of those directories: + Environment var Default location Description ~ + `$XDG_CACHE_HOME` $HOME/.cache Ephemeral data files + `$XDG_CONFIG_HOME` $HOME/.config Configuration files + `$XDG_DATA_HOME` $HOME/.local/share Persistent data files + `$XDG_STATE_HOME` $HOME/.local/state State data files + +Vim will only use the `$XDG_CONFIG_HOME` directory, the others are not +(yet) used for its various configuration and state files. + + *xdg-vimrc* +Vim, on Unix systems, will look at `$XDG_CONFIG_HOME/vim/vimrc` for its +configuration (see |vimrc|) but it will source it only if no other +initialization file is found in `$HOME` or `$HOME/.vim` (thus making this +feature backward compatible). However, if you want to migrate to use +`$XDG_CONFIG_HOME/vim/` directory, you will have to move away your `~/.vimrc` +and `~/.vim/vimrc` file. + + *xdg-runtime* +When the |xdg-vimrc| is used the |'runtimepath'| will be modified accordingly +to respect the |xdg-base-dir|: > + + "$XDG_CONFIG_HOME/vim,$VIMRUNTIME,/after,$XDG_CONFIG_HOME/vim/after" +< + Avoiding trojan horses ~ *trojan-horse* While reading the "vimrc" or the "exrc" file in the current directory, some diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index de8a665..873315c 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 Mar 10 +*syntax.txt* For Vim version 9.1. Last change: 2024 Apr 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -930,6 +930,21 @@ nasm_loose_syntax unofficial parser allowed syntax not as Error nasm_ctx_outside_macro contexts outside macro not as Error nasm_no_warn potentially risky syntax not as ToDo +ASTRO *astro.vim* *ft-astro-syntax* + +Configuration + +The following variables control certain syntax highlighting features. +You can add them to your .vimrc: > + let g:astro_typescript = "enable" +< +Enables TypeScript and TSX for ".astro" files. Default Value: "disable" > + let g:astro_stylus = "enable" +< +Enables Stylus for ".astro" files. Default Value: "disable" + +NOTE: You need to install an external plugin to support stylus in astro files. + ASPPERL and ASPVBS *ft-aspperl-syntax* *ft-aspvbs-syntax* @@ -2467,6 +2482,95 @@ by the camlp4 preprocessor. Setting the variable > prevents highlighting of "end" as error, which is useful when sources contain very long structures that Vim does not synchronize anymore. +PANDOC *ft-pandoc-syntax* + +By default, markdown files will be detected as filetype "markdown". +Alternatively, you may want them to be detected as filetype "pandoc" instead. +To do so, set the following: > + + :let g:markdown_md = 'pandoc' + +The pandoc syntax plugin uses |conceal| for pretty highlighting. Default is 1 > + + :let g:pandoc#syntax#conceal#use = 1 + +To specify elements that should not be concealed, set the following variable: > + + :let g:pandoc#syntax#conceal#blacklist = [] + +This is a list of the rules wich can be used here: + + - titleblock + - image + - block + - subscript + - superscript + - strikeout + - atx + - codeblock_start + - codeblock_delim + - footnote + - definition + - list + - newline + - dashes + - ellipses + - quotes + - inlinecode + - inlinemath + +You can customize the way concealing works. For example, if you prefer to mark +footnotes with the `*` symbol: > + + :let g:pandoc#syntax#conceal#cchar_overrides = {"footnote" : "*"} + +To conceal the urls in links, use: > + + :let g:pandoc#syntax#conceal#urls = 1 + +Prevent highlighting specific codeblock types so that they remain Normal. +Codeblock types include "definition" for codeblocks inside definition blocks +and "delimited" for delimited codeblocks. Default = [] > + + :let g:pandoc#syntax#codeblocks#ignore = ['definition'] + +Use embedded highlighting for delimited codeblocks where a language is +specified. Default = 1 > + + :let g:pandoc#syntax#codeblocks#embeds#use = 1 + +For specify what languages and using what syntax files to highlight embeds. This is a +list of language names. When the language pandoc and vim use don't match, you +can use the "PANDOC=VIM" syntax. For example: > + + :let g:pandoc#syntax#codeblocks#embeds#langs = ["ruby", "bash=sh"] + +To use italics and strong in emphases. Default = 1 > + + :let g:pandoc#syntax#style#emphases = 1 + +"0" will add "block" to g:pandoc#syntax#conceal#blacklist, because otherwise +you couldn't tell where the styles are applied. + +To add underline subscript, superscript and strikeout text styles. Default = 1 > + + :let g:pandoc#syntax#style#underline_special = 1 + +Detect and highlight definition lists. Disabling this can improve performance. +Default = 1 (i.e., enabled by default) > + + :let g:pandoc#syntax#style#use_definition_lists = 1 + +The pandoc syntax script also comes with the following commands: > + + :PandocHighlight LANG + +Enables embedded highlighting for language LANG in codeblocks. Uses the +syntax for items in g:pandoc#syntax#codeblocks#embeds#langs. > + + :PandocUnhighlight LANG + +Disables embedded highlighting for language LANG in codeblocks. PAPP *papp.vim* *ft-papp-syntax* @@ -2581,8 +2685,8 @@ perl_string_as_statement, it will be highlighted as in the second line. The syncing has 3 options. The first two switch off some triggering of synchronization and should only be needed in case it fails to work properly. If while scrolling all of a sudden the whole screen changes color completely -then you should try and switch off one of those. Let me know if you can -figure out the line that causes the mistake. +then you should try and switch off one of those. Let the developer know if +you can figure out the line that causes the mistake. One triggers on "^\s*sub\s*" and the other on "^[$@%]" more or less. > @@ -3675,12 +3779,15 @@ Some folding is now supported with syntax/vim.vim: > g:vimsyn_folding == 0 or doesn't exist: no syntax-based folding g:vimsyn_folding =~ 'a' : augroups g:vimsyn_folding =~ 'f' : fold functions + g:vimsyn_folding =~ 'h' : fold heredocs + g:vimsyn_folding =~ 'H' : fold Vim9-script legacy headers g:vimsyn_folding =~ 'l' : fold lua script g:vimsyn_folding =~ 'm' : fold mzscheme script g:vimsyn_folding =~ 'p' : fold perl script g:vimsyn_folding =~ 'P' : fold python script g:vimsyn_folding =~ 'r' : fold ruby script g:vimsyn_folding =~ 't' : fold tcl script +let g:vimsyn_folding = 'acfhlmpPrt' < *g:vimsyn_noerror* Not all error highlighting that syntax/vim.vim does may be correct; Vim script @@ -4207,7 +4314,9 @@ Whether or not it is actually concealed depends on the value of the 'conceallevel' option. The 'concealcursor' option is used to decide whether concealable items in the current line are displayed unconcealed to be able to edit the line. -Another way to conceal text is with |matchadd()|. + +Another way to conceal text is with |matchadd()|, but internally this works a +bit differently |syntax-vs-match|. concealends *:syn-concealends* @@ -4215,7 +4324,9 @@ When the "concealends" argument is given, the start and end matches of the region, but not the contents of the region, are marked as concealable. Whether or not they are actually concealed depends on the setting on the 'conceallevel' option. The ends of a region can only be concealed separately -in this way when they have their own highlighting via "matchgroup" +in this way when they have their own highlighting via "matchgroup". The +|synconcealed()| function can be used to retrieve information about conealed +items. cchar *:syn-cchar* *E844* @@ -5496,6 +5607,9 @@ MessageWindow Messages popup window used by `:echowindow`. If not defined |hl-WarningMsg| is used. *hl-ModeMsg* ModeMsg 'showmode' message (e.g., "-- INSERT --"). + *hl-MsgArea* +MsgArea Command-line area, also used for outputting messages, see also + 'cmdheight' *hl-MoreMsg* MoreMsg |more-prompt| *hl-NonText* diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index a98fe95..a922604 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -1,4 +1,4 @@ -*tabpage.txt* For Vim version 9.1. Last change: 2022 Feb 02 +*tabpage.txt* For Vim version 9.1. Last change: 2024 Mar 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -196,7 +196,7 @@ gt *i_CTRL-* *i_* :1tabnext " go to the first tab page :$tabnext " go to the last tab page :tabnext $ " as above - :tabnext # " go to the last accessed tab page + :tabnext # " go to the last accessed tab page :tabnext - " go to the previous tab page :tabnext -1 " as above :tabnext + " go to the next tab page @@ -248,13 +248,12 @@ REORDERING TAB PAGES: Move the current tab page to after tab page N. Use zero to make the current tab page the first one. N is counted before the move, thus if the second tab is the current one, - `:tabmove 1` and `:tabmove 2` have no effect. + `:tabmove 1` and `:tabmove 2` have no effect. Without N the tab page is made the last one. > :.tabmove " do nothing :-tabmove " move the tab page to the left :+tabmove " move the tab page to the right - :0tabmove " move the tab page to the beginning of the tab - " list + :0tabmove " move the tab page to the first :tabmove 0 " as above :tabmove " move the tab page to the last :$tabmove " as above diff --git a/runtime/doc/tags b/runtime/doc/tags index 8dd4db2..dcd8db7 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -12,6 +12,7 @@ $VIM starting.txt /*$VIM* $VIM-use version5.txt /*$VIM-use* $VIMRUNTIME starting.txt /*$VIMRUNTIME* $VIM_POSIX vi_diff.txt /*$VIM_POSIX* +$XDG_CONFIG_HOME starting.txt /*$XDG_CONFIG_HOME* $quote eval.txt /*$quote* % motion.txt /*%* %:. cmdline.txt /*%:.* @@ -1157,6 +1158,7 @@ $quote eval.txt /*$quote* 't_vi' term.txt /*'t_vi'* 't_vs' term.txt /*'t_vs'* 't_xn' term.txt /*'t_xn'* +'t_xo' term.txt /*'t_xo'* 't_xs' term.txt /*'t_xs'* 'ta' options.txt /*'ta'* 'tabline' options.txt /*'tabline'* @@ -4520,7 +4522,21 @@ E1410 vim9class.txt /*E1410* E1411 vim9class.txt /*E1411* E1412 vim9class.txt /*E1412* E1413 vim9class.txt /*E1413* +E1414 vim9class.txt /*E1414* +E1415 vim9class.txt /*E1415* +E1416 vim9class.txt /*E1416* +E1417 vim9class.txt /*E1417* +E1418 vim9class.txt /*E1418* +E1419 vim9class.txt /*E1419* E142 message.txt /*E142* +E1420 vim9class.txt /*E1420* +E1421 vim9class.txt /*E1421* +E1422 vim9class.txt /*E1422* +E1423 vim9class.txt /*E1423* +E1424 vim9class.txt /*E1424* +E1425 vim9class.txt /*E1425* +E1426 vim9class.txt /*E1426* +E1429 vim9class.txt /*E1429* E143 autocmd.txt /*E143* E144 various.txt /*E144* E145 starting.txt /*E145* @@ -5682,6 +5698,7 @@ Select-mode-mapping visual.txt /*Select-mode-mapping* Session starting.txt /*Session* SessionLoad-variable starting.txt /*SessionLoad-variable* SessionLoadPost autocmd.txt /*SessionLoadPost* +SessionWritePost autocmd.txt /*SessionWritePost* ShellCmdPost autocmd.txt /*ShellCmdPost* ShellFilterPost autocmd.txt /*ShellFilterPost* SigUSR1 autocmd.txt /*SigUSR1* @@ -6034,6 +6051,7 @@ assert_notequal() testing.txt /*assert_notequal()* assert_notmatch() testing.txt /*assert_notmatch()* assert_report() testing.txt /*assert_report()* assert_true() testing.txt /*assert_true()* +astro.vim syntax.txt /*astro.vim* at motion.txt /*at* atan() builtin.txt /*atan()* atan2() builtin.txt /*atan2()* @@ -6511,6 +6529,7 @@ compiler-gcc quickfix.txt /*compiler-gcc* compiler-gnat ft_ada.txt /*compiler-gnat* compiler-hpada ft_ada.txt /*compiler-hpada* compiler-manx quickfix.txt /*compiler-manx* +compiler-pandoc quickfix.txt /*compiler-pandoc* compiler-perl quickfix.txt /*compiler-perl* compiler-pyunit quickfix.txt /*compiler-pyunit* compiler-select quickfix.txt /*compiler-select* @@ -6873,6 +6892,12 @@ encryption editing.txt /*encryption* end intro.txt /*end* end-of-file pattern.txt /*end-of-file* enlightened-terminal syntax.txt /*enlightened-terminal* +enum vim9class.txt /*enum* +enum-constructor vim9class.txt /*enum-constructor* +enum-name vim9class.txt /*enum-name* +enum-ordinal vim9class.txt /*enum-ordinal* +enum-values vim9class.txt /*enum-values* +enumvalue vim9class.txt /*enumvalue* environ() builtin.txt /*environ()* eol-and-eof editing.txt /*eol-and-eof* erlang.vim syntax.txt /*erlang.vim* @@ -7206,6 +7231,7 @@ ft-asm68k-syntax syntax.txt /*ft-asm68k-syntax* ft-asmh8300-syntax syntax.txt /*ft-asmh8300-syntax* ft-aspperl-syntax syntax.txt /*ft-aspperl-syntax* ft-aspvbs-syntax syntax.txt /*ft-aspvbs-syntax* +ft-astro-syntax syntax.txt /*ft-astro-syntax* ft-awk-plugin filetype.txt /*ft-awk-plugin* ft-bash-syntax syntax.txt /*ft-bash-syntax* ft-basic-syntax syntax.txt /*ft-basic-syntax* @@ -7262,6 +7288,7 @@ ft-html-syntax syntax.txt /*ft-html-syntax* ft-htmlos-syntax syntax.txt /*ft-htmlos-syntax* ft-ia64-syntax syntax.txt /*ft-ia64-syntax* ft-inform-syntax syntax.txt /*ft-inform-syntax* +ft-java-plugin filetype.txt /*ft-java-plugin* ft-java-syntax syntax.txt /*ft-java-syntax* ft-javascript-omni insert.txt /*ft-javascript-omni* ft-json-plugin filetype.txt /*ft-json-plugin* @@ -7302,6 +7329,7 @@ ft-nasm-syntax syntax.txt /*ft-nasm-syntax* ft-ncf-syntax syntax.txt /*ft-ncf-syntax* ft-nroff-syntax syntax.txt /*ft-nroff-syntax* ft-ocaml-syntax syntax.txt /*ft-ocaml-syntax* +ft-pandoc-syntax syntax.txt /*ft-pandoc-syntax* ft-papp-syntax syntax.txt /*ft-papp-syntax* ft-pascal-syntax syntax.txt /*ft-pascal-syntax* ft-pdf-plugin filetype.txt /*ft-pdf-plugin* @@ -8029,6 +8057,7 @@ hl-Menu syntax.txt /*hl-Menu* hl-MessageWindow syntax.txt /*hl-MessageWindow* hl-ModeMsg syntax.txt /*hl-ModeMsg* hl-MoreMsg syntax.txt /*hl-MoreMsg* +hl-MsgArea syntax.txt /*hl-MsgArea* hl-NonText syntax.txt /*hl-NonText* hl-Normal syntax.txt /*hl-Normal* hl-Pmenu syntax.txt /*hl-Pmenu* @@ -9536,6 +9565,7 @@ quickfix-functions usr_41.txt /*quickfix-functions* quickfix-gcc quickfix.txt /*quickfix-gcc* quickfix-index quickfix.txt /*quickfix-index* quickfix-manx quickfix.txt /*quickfix-manx* +quickfix-pandoc quickfix.txt /*quickfix-pandoc* quickfix-parse quickfix.txt /*quickfix-parse* quickfix-perl quickfix.txt /*quickfix-perl* quickfix-size quickfix.txt /*quickfix-size* @@ -10156,6 +10186,7 @@ syntax-latex syntax.txt /*syntax-latex* syntax-loading syntax.txt /*syntax-loading* syntax-printing usr_06.txt /*syntax-printing* syntax-tex syntax.txt /*syntax-tex* +syntax-vs-match pattern.txt /*syntax-vs-match* syntax.txt syntax.txt /*syntax.txt* syntax_cmd syntax.txt /*syntax_cmd* sys-file-list help.txt /*sys-file-list* @@ -10289,6 +10320,8 @@ t_dl term.txt /*t_dl* t_ds term.txt /*t_ds* t_ed version4.txt /*t_ed* t_el version4.txt /*t_el* +t_enum-variable eval.txt /*t_enum-variable* +t_enumvalue-variable eval.txt /*t_enumvalue-variable* t_f1 version4.txt /*t_f1* t_f10 version4.txt /*t_f10* t_f2 version4.txt /*t_f2* @@ -10378,6 +10411,7 @@ t_ve term.txt /*t_ve* t_vi term.txt /*t_vi* t_vs term.txt /*t_vs* t_xn term.txt /*t_xn* +t_xo term.txt /*t_xo* t_xs term.txt /*t_xs* tab intro.txt /*tab* tab-page tabpage.txt /*tab-page* @@ -10862,6 +10896,8 @@ v:t_bool eval.txt /*v:t_bool* v:t_channel eval.txt /*v:t_channel* v:t_class eval.txt /*v:t_class* v:t_dict eval.txt /*v:t_dict* +v:t_enum eval.txt /*v:t_enum* +v:t_enumvalue eval.txt /*v:t_enumvalue* v:t_float eval.txt /*v:t_float* v:t_func eval.txt /*v:t_func* v:t_job eval.txt /*v:t_job* @@ -11216,7 +11252,6 @@ vms-problems os_vms.txt /*vms-problems* vms-started os_vms.txt /*vms-started* vms-usage os_vms.txt /*vms-usage* vote-for-features sponsor.txt /*vote-for-features* -votes-counted sponsor.txt /*votes-counted* votes-for-changes todo.txt /*votes-for-changes* vreplace-mode insert.txt /*vreplace-mode* vt100-cursor-keys term.txt /*vt100-cursor-keys* @@ -11343,6 +11378,9 @@ x11-clientserver remote.txt /*x11-clientserver* x11-cut-buffer gui_x11.txt /*x11-cut-buffer* x11-selection gui_x11.txt /*x11-selection* xattr editing.txt /*xattr* +xdg-base-dir starting.txt /*xdg-base-dir* +xdg-runtime starting.txt /*xdg-runtime* +xdg-vimrc starting.txt /*xdg-vimrc* xf86conf.vim syntax.txt /*xf86conf.vim* xfontset mbyte.txt /*xfontset* xfree-xterm syntax.txt /*xfree-xterm* diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index d958229..1256d75 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -1,4 +1,4 @@ -*term.txt* For Vim version 9.1. Last change: 2024 Feb 28 +*term.txt* For Vim version 9.1. Last change: 2024 Apr 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -382,7 +382,7 @@ The options are listed below. The associated termcap code is always equal to the last two characters of the option name. Only one termcap code is required: Cursor motion, 't_cm'. -The options 't_da', 't_db', 't_ms', 't_xs', 't_xn' represent flags in the +The options 't_da', 't_db', 't_ms', 't_xs', 't_xn', 't_xo' represent flags in the termcap. When the termcap flag is present, the option will be set to "y". But any non-empty string means that the flag is set. An empty string means that the flag is not set. 't_CS' works like this too, but it isn't a termcap @@ -441,6 +441,11 @@ OUTPUT CODES *terminal-output-codes* *t_xn* *'t_xn'* t_xn if non-empty, writing a character at the last screen cell does not cause scrolling + *t_xo* *'t_xo'* + t_xo if non-empty, terminal uses xon/xoff handshaking, mapping + CTRL-S will not be possible then, since it is used for flow + control (used by vt420 terminal). Setting this flag has only + an effect when starting Vim. t_ZH italics mode *t_ZH* *'t_ZH'* t_ZR italics end *t_ZR* *'t_ZR'* diff --git a/runtime/doc/testing.txt b/runtime/doc/testing.txt index 356d74e..9b9f60b 100644 --- a/runtime/doc/testing.txt +++ b/runtime/doc/testing.txt @@ -1,4 +1,4 @@ -*testing.txt* For Vim version 9.1. Last change: 2024 Feb 18 +*testing.txt* For Vim version 9.1. Last change: 2024 Apr 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -438,8 +438,8 @@ test_settime({expr}) *test_settime()* GetTime()->test_settime() -test_srand_seed([seed]) *test_srand_seed()* - When [seed] is given this sets the seed value used by +test_srand_seed([{seed}]) *test_srand_seed()* + When {seed} is given this sets the seed value used by `srand()`. When omitted the test seed is removed. diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 2b4a70a..8712008 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 9.1. Last change: 2024 Mar 03 +*todo.txt* For Vim version 9.1. Last change: 2024 Mar 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -144,7 +144,6 @@ Further Vim9 improvements: - More efficient way for interface member index than iterating over list? - a variant of type() that returns a different type for each class? list and list should also differ. -- implement :enum - Promise class, could be used to wait on a popup close callback? - class local to a function - Use Vim9 for more runtime files. diff --git a/runtime/doc/uganda.rux b/runtime/doc/uganda.rux new file mode 100644 index 0000000..783c6d5 --- /dev/null +++ b/runtime/doc/uganda.rux @@ -0,0 +1,340 @@ +*uganda.txt* для Vim version 9.1 редакция от 02 марта 2022 г. + + + СПРАВОЧНИК ПО РЕДАКТОРУ VIM + автор Брам Моленар + + + *uganda* *Uganda* *copying* *copyright* *license* +КРАТКОЕ ОПИСАНИЕ + *iccf* *ICCF* +Редактор Vim является благотворительным программным обеспечением. +Использование и копирование программы Vim не ограничено, однако +рекомендуется сделать добровольное пожертвование для нуждающихся детей в +Уганде. Ознакомьтесь с разделом |kcc| далее в этом документе или посетите +веб-сайт организации ICCF, доступный по указанным ниже адресам: + + https://iccf-holland.org/ + https://www.vim.org/iccf/ + https://www.iccf.nl/ + +Также возможно оказание финансовой помощи для разработки программы Vim. +Люди, пожертвовавшие на развитие программы, получают право голосовать за +внедрение в редактор функциональных возможностей. См. раздел |sponsor|. +В любом случае деньги направляются в Уганду. + +Документация, поставляемая в составе программы Vim, распространяется на +условиях лицензии на Открытые публикации, см. раздел |manual-copyright|. + +=== начало лицензии === + +ЛИЦЕНЗИЯ VIM + +I) Неизменённые копии программы Vim могут распространяться без ограничения + при условии включения данного текста лицензии. Распространение + неизменённых копий отдельных частей программы Vim также возможно при + соблюдении условия о включении данного текста лицензии. Подобным образом + разрешается добавлять исполняемые файлы, скомпилированные из + неизменённого исходного кода программы Vim, а также собственные примеры + использования и командные файлы редактора Vim. + +II) Изменённую (или дополненную) версию программы Vim, включающую + исполняемые файлы и/или исходный код, допускается распространять при + соблюдении следующих четырёх условий: + 1) Текст настоящей лицензии должен включаться в состав распространяемой + версии программы Vim без изменений. + 2) Изменённая версия программы Vim должна распространяться одним из + следующих пяти способов: + a) При внесении изменений в программу Vim, в дистрибутиве должны + быть явно указаны контактные данные лица, внёсшего эти изменения. + Ответственному разработчику по его запросу (в любой форме) должна + быть безвозмездно предоставлена копия распространяемой изменённой + версии программы Vim, включая её исходный код. Ответственный + разработчик оставляет за собой право включать сделанные изменения + в официальную версию программы Vim. Конкретные действия + ответственного разработчика, относительно переданных изменений, а + также лицензионные условия, на основании которых будет + осуществляться их распространение, могут быть дополнительно + согласованы. Если согласование не проводилось, сделанные изменения + будут распространяться на условиях настоящей лицензии или более + поздней её версии. Лица, в данное время являющиеся ответственными + за рабзработку, указаны в перечне по следующему адресу: + https://github.com/orgs/vim/people. В случае изменения этой + информации, актуальные данные будут опубликованы на + соответствующих ресурсах (вероятнее всего по интернет‐адресам + vim.sf.net, www.vim.org и/или comp.editors). В случае полной + невозможности установить контакт с ответственным разработчиком, + обязательства по отправке изменений утрачивают силу. После + передачи подтверждения о получении изменений от ответственного + разработчика, необходимость в повторной отправке копии изменённой + программы Vim неприменима. + b) Если лицом получена изменённая версия программа Vim, + распространяющаяся на условиях, указанных в ч. II) п. 2) пп. а) + допускается дальнейшее её распространение этим лицом без внесения + изменений и согласно ч. I) настоящей лицензии. В случае внесения + дополнительных изменений, на эти изменения будут распространяться + условия, указанные в ч. II) п. 2) пп. a). + c) Каждая копия распространяемой изменённой версии программы Vim + должна включать информацию обо всех произведённых изменениях, + включая исходный код. Эта информация может быть представлена в + виде построчного сравнения файлов. Выбор лицензии, по условиям + которой будет распространяться добавленный код, остаётся за + автором этих изменений. Изменения и лицензия на эти изменения не + должны запрещать другим лицам внесение своих собственных + изменений в официальную версию программы Vim. + d) Изменённая версия программы Vim, содержащая изменения в + соответствии с ч. II) п. 2 пп. c), может распространяться без + исходного кода для этих изменений, при соблюдении следующих трёх + условий: + - Лицензия, применяемая к внесённым изменениям, предоставляет + ответственному разработчику программы Vim возможность + безвозмездного и неограниченного распространения этих изменений, + а также право на безвозмездное и неограниченное включение этих + изменений в официальную версию программы Vim. + - Изменения должны сохраняться не менее трёх лет со времени + распространения соответствующей изменённой версии программы Vim. + В течение этого периода по запросу ответственного разработчика + или другого пользователя изменённой версии программы Vim + (в любой форме) необходимо предоставить исходный код данных + изменений. + - В дистрибутиве изменённой версии программы Vim должны быть явно + указаны контактные данные лица, внёсшего эти изменения. + Контактные данные должны сохранять актуальность в течение + не менее трёх лет со времени последнего распространения + соответствующей изменённой версии программы Vim или как можно + дольше. + e) Если к изменениям, внесённым в программу Vim, применимы условия + лицензии GNU General Public License (GNU GPL), допускается + распространение изменённой версия программы Vim на условиях + лицензии GNU GPL версии 2 или любой более поздней версии этой + лицензии. + 3) Необходимо добавить соответствующую информацию, которая должна быть + выведена в результате выполнения команды ":version" в программе Vim, + а также на экране приветствия программы Vim, чтобы пользователь + изменённой версии программы Vim имел возможность определить, что он + пользуется изменённой версией. При распространении на условиях, + указанных в ч. II) п. 2) пп. e) такую информацию требуется добавлять + только в том случае, когда она не противоречит лицензии, + распространяющейся на эти изменения. + 4) Контактная информация, которая указывается по требованию ч. II) п. 2) + пп. a) и ч. II) п. 2) пп. d) не должна удаляться или изменяться никем + другим, кроме лица, указавшего данную контактную информацию. + +III) При распространении изменённой версии программы Vim рекомендуется + пользоваться лицензией Vim для произведённых изменений и обеспечить + доступ к этим изменениям ответственного разработчика, включая исходный + код изменений. Предпочтительным способом предоставления доступа к + произведённым изменениям является отправка этих изменений по + электронной почте или загрузка файлов на сервер с отправкой URL-адреса + по электронной почте. Если количество изменений незначительно + (например, изменения в файле Makefile) достаточно будет отправить по + электронной почте файл построчного сравнения. Изменения или URL-адреса + должны быть отправлены на адрес электронной почты maintainer@vim.org + +IV) Не допускается удаление настоящей лицензия из дистрибутива исходного + кода программы Vim, его отдельных частей или изменённой версии. + Допускается использование настоящей лицензию для предыдущих изменённых + выпусков программы Vim, взамен тех лицензий, с которыми они + распространялись. + +=== конец лицензии === + +Примечание. + +- Если вам нравится программа Vim, дочитайте до конца и подумайте над + оказанием помощи нуждающимся детям в Уганде. + +- При наличии желания поддержать дальнейшую разработку программы Vim, + рассмотрите возможность оказания финансовой поддержки (см. раздел + |sponsor|). В любом случае деньги отправляются в Уганду. + +- Ричард Столлман (Richard Stallman) подтвердил, что лицензия Vim совместима + с лицензией GNU GPL. С момента его последней проверки были внесены + незначительные изменения, но они не должны оказать на это никакого влияния. + +- Если сборка программы Vim осуществляется с использованием библиотеки, на + которую распространяется лицензия GNU GPL, дальнейшее распространение + программы может осуществляться только на условиях лицензии GNU GPL. Даже + если в саму программу Vim не было внесено никаких изменений. + +- Если были внесены изменения, на которые распространяется лицензия GNU GPL, + все дальнейшие изменения также должны добавляться на условиях лицензии + GNU GPL или другой совместимой лицензии. + +- При распространении изменённой версии программы Vim, своё имя и контактную + информацию можно добавлять с помощью аргумента конфигурации + "--with-modified-by" или директивы define MODIFIED_BY. + +============================================================================== +Детский центр в Кибаале *kcc* *Kibaale* *charity* + +Детский центр в Кибаале (Kibaale Children's Centre, KCC) находится в гор. +Кибаал. Это небольшой городок в восточной Африке на юге Уганды недалеко от +Танзании на территории округа Ракаи. Большая часть населения занимается +земледелием. Несмотря на бедность жителей, здесь обычно бывает достаточно +пищи. Однако по числу заболевших СПИД этот округ превосходит любую другую +точку планеты. Существует мнение, что именно отсюда началось распространение +этой смертельной болезни. По некоторым оценкам в прошлом от 10 до 30 +процентов жителей Уганды были заражены ВИЧ. Высокая смертность родителей +стала причиной появления большого количества сирот. При населении округа +в 350 000 человек, 60 000 детей потеряло одного или обоих родителей. Однако +даже несомненные успехи в уменьшении масштабов распространения СПИД +не могут привести к полному исчезновению проблем. + +Дети очень нуждаются в помощи. Организация KCC прилагает все усилия для +предоставления нуждающимся пищи, медицинской помощи и образования. Пища и +медицинская помощь предоставляются для поддержания здоровья, а образование +даёт возможность позаботиться о себе в будущем. Организация KCC работает на +базе христианской миссии, но помощь оказывается всем детям независимо от их +приверженности к какой-либо религии. + +В данном случае ключом к решению проблем является возможность получения +образования. В последнее время при правлении президента Иди Амина (Idi Amin +Dada Oumee), а также в ходе последовавших гражданских войн, этой проблеме не +уделялось достаточно внимания. Однако сейчас после стабилизации деятельности +правительства детям и их родителям нужно учиться жить и заботиться самим о +себе, избегая при этом риска заражения инфекционными заболеваниями. Поэтому +наряду с оказанием помощи больным и голодающим, основной целью миссии +является предупреждение заболеваемости и прививание навыков по употреблению +здоровой пищи. + +Большинство сирот проживают у близких родственников, воспитываются дядями +или старшими сёстрами. Вследствие больших размеров семей и низких доходов +(если таковые имеются), большим везением для ребёнка будет обеспечение +здоровым питанием. Про одежду, медицинскую помощь и школьное обучение +говорить уже не приходится. Для оказания помощи таким нуждающимся детям была +организована программа оказания финансовой помощи. Она позволяет взять +ребёнка на финансовое обеспечение. За несколько долларов в месяц организация +KCC обеспечит его необходимыми предметами обихода, будет следить за его +здоровьем, организует школьное обучение, а также сделает всё необходимое для +ребёнка и семьи, которая поддерживает его развитие. + +Помимо непосредственного оказания помощи ребёнку, необходимо также проводить +комплексное развитие среды, в которой живут дети. С этой целью организация +KCC предоставляет школам помощь по улучшению методов обучения. На базе +центра имеется показательная школа, в которой организуется обучение для +учителей. Также проводится обучение медицинских работников, прививаются +санитарно-гигиенические нормы, пропагандируется постройка туалетов +надлежащей конструкции в местах проживания. Также лично мною была оказана +помощь в постройке производственного объекта по созданию железобетонных плит, +которые применяются при постройке туалетов и продаются по сниженным ценам. + +На балансе проекта содержится клиника, в которой предоставляется медицинская +помощь детям и их семьям. В 2020 году было открыто родильное отделение и +пункт круглосуточного оказания медицинской помощи. При необходимости +осуществляется доставка в больницу. Проводятся программы иммунизации +населения, и предоставляется помощь при вспышках эпидемии (случаются вспышки +кори и холеры). + *donate* +С лета 1994 года до лета 1995 года мне целый год довелось провести в центре, +работая там в качестве волонтёра. Я помогал в расширении центра и трудился в +сфере водоснабжения и санитарно-гигиенического контроля. Там я убедился в +эффективности той помощи, которую оказывает организация KCC. По возвращении +в Нидерланды утвердилось желание продолжить поддержку организации KCC. +С этой целью я провожу сбор средств и организую программу оказания +финансовой помощи. Поэтому предлагаю вам рассмотреть одну из следующих +возможностей: + +1. Предоставить финансовую помощь ребёнку в начальной школе — 17 евро в + месяц (или больше). +2. Предоставить финансовую помощь ребёнку в средней школе — 25 евро в месяц + (или больше). +3. Предоставить финансовую помощь клинике — любая сумма раз в месяц или + в квартал. +4. Единовременное пожертвование. + +По сравнению с другими программами оказания финансовой поддержки детям, +указанные выше суммы выглядят весьма скромно. Причина столь небольшого +размера пожертвований заключается в том, что деньги направляются +непосредственно в центр. На администрацию тратиться менее 5 %, что стало +возможным благодаря малым размерам организации и привлечению волонтёров. +Если вы предполагаете взять на финансовое обеспечение ребёнка, то важно +понимать, что регулярное оказание помощи должно осуществляться на протяжении +не менее одного года. + +Я понимаю, что вам нужны гарантии поступления средств по адресу. Прежде +всего, я готов предоставить свои личные гарантии, как автор программы Vim. +Я доверяю людям, работающим в этом центре, и знаю их лично. Кроме того, +финансирование и инспектирование центра осуществлялось совместно с такими +общеизвестными благотворительными организациями, как «World Vision», +«Save the Children», а теперь центр находится на попечении организации +«Pacific Academy Outreach Society». Посещение центра осуществляется (за свой +собственный счёт) примерно раз в год для проверки хода выполнения текущих +задач. Я сам неоднократно посещал этот центр, начиная с 1993 года. Отчёты о +посещениях размещаются на веб-сайте организации ICCF. + +Если у вас остались вопросы, можете задать их по электронной почте +. + +Адрес центра: + Kibaale Children's Centre + p.o. box 1658 + Masaka, Uganda, East Africa + +Перечисление средств *iccf-donations* + +Самая свежая информация доступна на веб-сайте организации ICCF! +См. раздел |iccf|. + + + США + Можно использовать методы, перечисленные ниже. Если + требуется отправить чек, то отправьте его нашему партнёру в + Канаде, адрес: https://www.kuwasha.net/ + + Канада + Свяжитесь с командой Kuwasha в гор. Сарри, Канада. Они + могут оказать содействие благотворителям из Канады для + помощи детям в гор. Кибаале. Команда Kuwasha переводит 100% + средств, поступивших в пользу проекта в Уганде. + Единовременное пожертвование может быть отправлено им + напрямую. При этом прошу отправлять мне сообщение, для учёта + информации о количестве средств, пожертвованных благодаря + программе Vim. + На их веб-сайте также можно ознакомиться с информацией по + оказанию финансовой поддержки https://www.kuwasha.net/ + При отправке пожертвований через Kuwasha вы получите + налоговое уведомление, которое можно будет подать вместе с + налоговой декларацией. + + Нидерланды + Перевод на счёт «Stichting ICCF Holland», Amersfoort. Можно + будет получить налоговый вычет, если вы проживаете в + Нидерландах. Банк ING, IBAN: NL95 INGB 0004 5487 74 + + Германия + Можно сделать пожертвование, дающее право на налоговый + вычет. Ознакомьтесь с последней информацией на веб-сайте + организации ICCF + https://iccf-holland.org/germany.html + + Европа + Банковский перевод. См. далее рубрику «Другие варианты», + где указан код Swift и номер IBAN. + Любые другие платёжные методы также должны работать. + Проконсультируйтесь по вопросу отправки средств на + благотворительные цели. + + Банковская карта + Можно воспользоваться платёжной системой PayPal для + отправки денег с банковской карты. Это наиболее + распространённая и чрезвычайно простая в использовании + платёжная система на основе сети Интернет. Больше информации + можно найти по адресу + https://www.paypal.com/en_US/mrb/pal=XAC62PML3GF8Q + Адрес электронной почты для обсуждения вопросов по + отправке средств + Bram@iccf-holland.org + + Другие варианты + Средства можно отправить на указанный ниже счёт. + Банк ING. IBAN: NL95 INGB 0004 5487 74 + Код SWIFT: INGBNL2A + на имя «stichting ICCF Holland», Amersfoort + Чеки не принимаются. + +============================================================================= +© Казорин Сергей, перевод на русский язык, 2022, +© Restorer, редакторская правка, 2022, + + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/uganda.txt b/runtime/doc/uganda.txt index 6b77050..513759f 100644 --- a/runtime/doc/uganda.txt +++ b/runtime/doc/uganda.txt @@ -1,4 +1,4 @@ -*uganda.txt* For Vim version 9.1. Last change: 2022 Mar 02 +*uganda.txt* For Vim version 9.1. Last change: 2024 Apr 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -203,7 +203,7 @@ visited about once a year to check the progress (at our own cost). I have visited the centre myself many times, starting in 1993. The visit reports are on the ICCF web site. -If you have any further questions, send me e-mail: . +If you have any further questions, send e-mail: . The address of the centre is: Kibaale Children's Centre @@ -223,9 +223,8 @@ Canada: Contact Kuwasha in Surrey, Canada. They take care of the Canadian sponsors for the children in Kibaale. Kuwasha forwards 100% of the money to the project in Uganda. You can send them a one time donation directly. - Please send me a note so that I know what has been donated - because of Vim. Look on their site for information about - sponsorship: https://www.kuwasha.net/ + Look on their site for information about sponsorship: + https://www.kuwasha.net/ If you make a donation to Kuwasha you will receive a tax receipt which can be submitted with your tax return. diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 04a9afb..8e71948 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: 2024 Feb 25 +*usr_41.txt* For Vim version 9.1. Last change: 2024 Apr 26 VIM USER MANUAL - by Bram Moolenaar @@ -1096,7 +1096,7 @@ Syntax and highlighting: *syntax-functions* *highlighting-functions* synIDattr() get a specific attribute of a syntax ID synIDtrans() get translated syntax ID synstack() get list of syntax IDs at a specific position - synconcealed() get info about concealing + synconcealed() get info about (synax) concealing diff_hlID() get highlight ID for diff mode at a position matchadd() define a pattern to highlight (a "match") matchaddpos() define a list of positions to highlight diff --git a/runtime/doc/usr_51.txt b/runtime/doc/usr_51.txt index f2b5e13..b0bf792 100644 --- a/runtime/doc/usr_51.txt +++ b/runtime/doc/usr_51.txt @@ -1,4 +1,4 @@ -*usr_51.txt* For Vim version 9.1. Last change: 2022 Jun 03 +*usr_51.txt* For Vim version 9.1. Last change: 2024 Apr 04 VIM USER MANUAL - by Bram Moolenaar @@ -649,13 +649,9 @@ When you write a compiler file and put it in your personal runtime directory make the default file skip the settings. *:CompilerSet* The second mechanism is to use ":set" for ":compiler!" and ":setlocal" for -":compiler". Vim defines the ":CompilerSet" user command for this. However, -older Vim versions don't, thus your plugin should define it then. This is an -example: > +":compiler". Vim defines the ":CompilerSet" user command for this. This is +an example: > - if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal - endif CompilerSet errorformat& " use the default 'errorformat' CompilerSet makeprg=nmake diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt index bf16d49..c277923 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 Mar 03 +*version9.txt* For Vim version 9.1. Last change: 2024 Apr 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -41543,17 +41543,24 @@ and is a work in progress. Support for Wayland UI. +Support for the XDG Desktop Specification |xdg-base-dir| + Vim9 script ----------- Add support for internal builtin functions with vim9 objects, see |builtin-object-methods| +Enum support for Vim9 script |:enum| + Other improvements *new-other-9.2* ------------------ Changed *changed-9.2* ------- +- use 'smoothscroll' logic for CTRL-F and CTRL-B for pagewise scrolling +- use 'smoothscroll' logic for CTRL-D and CTRL-U for half-pagewise scrolling + Added *added-9.2* ----- @@ -41570,17 +41577,23 @@ Functions: ~ Autocommands: ~ +|SessionWritePost| after writing the session file |:mksession| |TermResponseAll| after the terminal response to |t_RV| and others is received |WinNewPre| before creating a new window +Highlighting: ~ + +|hl-MsgArea| highlighting of the Command-line and messages area. + Commands: ~ Options: ~ 'winfixbuf' Keep buffer focused in a window +'t_xo' Terminal uses XON/XOFF handshaking (e.g. vt420). ============================================================================== INCOMPATIBLE CHANGES *incompatible-9.2* diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt index 7dd2ab0..7a49aa0 100644 --- a/runtime/doc/vim9.txt +++ b/runtime/doc/vim9.txt @@ -1,4 +1,4 @@ -*vim9.txt* For Vim version 9.1. Last change: 2024 Jan 12 +*vim9.txt* For Vim version 9.1. Last change: 2024 Apr 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -641,6 +641,14 @@ No command can follow the "{", only a comment can be used there. The block can also be used for defining a user command. Inside the block Vim9 syntax will be used. +This is an example of using here-docs: > + com SomeCommand { + g:someVar =<< trim eval END + ccc + ddd + END + } + If the statements include a dictionary, its closing bracket must not be written at the start of a line. Otherwise, it would be parsed as the end of the block. This does not work: > @@ -1513,7 +1521,6 @@ Custom types can be defined with `:type`: > :type MyList list Custom types must start with a capital letter, to avoid name clashes with builtin types added later, similarly to user functions. -{not implemented yet} And classes and interfaces can be used as types: > :class MyClass diff --git a/runtime/doc/vim9class.txt b/runtime/doc/vim9class.txt index a00a5b7..ef96aa9 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 Mar 03 +*vim9class.txt* For Vim version 9.1. Last change: 2024 Apr 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -328,10 +328,27 @@ variables but they have no access to the object variables, they cannot use the enddef endclass -Inside the class the class method can be called by name directly, outside the -class the class name must be prefixed: `OtherThing.ClearTotalSize()`. To use -a class method from a parent class in a child class, the class name must be -prefixed. +Inside the class, the class method can be called by name directly, outside the +class, the class name must be prefixed: `OtherThing.ClearTotalSize()`. Also, +the name prefix must be used for public class methods in the special contexts +of class variable initializers and of lambda expressions and nested functions: +> + class OtherThing + static var name: string = OtherThing.GiveName() + + static def GiveName(): string + def DoGiveName(): string + return OtherThing.NameAny() + enddef + + return DoGiveName() + enddef + + static def NameAny(): string + return "any" + enddef + endclass +< Just like object methods the access can be made protected by using an underscore as the first character in the method name: > @@ -576,7 +593,7 @@ A class is defined between `:class` and `:endclass`. The whole class is defined in one script file. It is not possible to add to a class later. A class can only be defined in a |Vim9| script file. *E1316* -A class cannot be defined inside a function. +A class cannot be defined inside a function. *E1429* It is possible to define more than one class in a script file. Although it usually is better to export only one main class. It can be useful to define @@ -904,19 +921,125 @@ aliased: > 8. Enum *Vim9-enum* *:enum* *:endenum* -{not implemented yet} - + *enum* *E1418* *E1419* *E1420* An enum is a type that can have one of a list of values. Example: > - :enum Color - White - Red - Green - Blue - Black - :endenum + :enum Color + White, + Red, + Green, Blue, Black + :endenum +< + *enumvalue* *E1422* +The enum values are separated by commas. More than one enum value can be +listed in a single line. The final enum value should not be followed by a +comma. + +An enum value is accessed using the enum name followed by the value name: > + + var a: Color = Color.Blue +< +Enums are treated as classes, where each enum value is essentially an instance +of that class. Unlike typical object instantiation with the |new()| method, +enum instances cannot be created this way. + +An enum can only be defined in a |Vim9| script file. *E1414* +An enum cannot be defined inside a function. + + *E1415* +An enum name must start with an uppercase letter. The name of an enum value +in an enum can start with an upper or lowercase letter. + + *E1416* +An enum can implement an interface but cannot extend a class: > + enum MyEnum implements MyIntf + Value1, + Value2 + def SomeMethod() + enddef + endenum +< + *enum-constructor* +The enum value objects in an enum are constructed like any other objects using +the |new()| method. Arguments can be passed to the enum constructor by +specifying them after the enum value name, just like calling a function. The +default constructor doesn't have any arguments. + + *E1417* +An enum can contain class variables, class methods, object variables and +object methods. The methods in an enum cannot be |:abstract| methods. + +The following example shows an enum with object variables and methods: > + + vim9script + enum Planet + Earth(1, false), + Jupiter(95, true), + Saturn(146, true) + + var moons: number + var has_rings: bool + def GetMoons(): number + return this.moons + enddef + endenum + echo Planet.Jupiter.GetMoons() + echo Planet.Earth.has_rings +< + *E1421* *E1423* *E1424* *E1425* +Enums and their values are immutable. They cannot be utilized as numerical or +string types. Enum values can declare mutable instance variables. + + *enum-name* +Each enum value object has a "name" instance variable which contains the name +of the enum value. This is a readonly variable. + + *enum-ordinal* *E1426* +Each enum value has an associated ordinal number starting with 0. The ordinal +number of an enum value can be accessed using the "ordinal" instance variable. +This is a readonly variable. Note that if the ordering of the enum values in +an enum is changed, then their ordinal values will also change. + + *enum-values* +All the values in an enum can be accessed using the "values" class variable +which is a List of the enum objects. This is a readonly variable. + +Example: > + enum Planet + Mercury, + Venus, + Earth + endenum + + echo Planet.Mercury + echo Planet.Venus.name + echo Planet.Venus.ordinal + for p in Planet.values + # ... + endfor +< +An enum is a class with class variables for the enum value objects and object +variables for the enum value name and the enum value ordinal: > + + enum Planet + Mercury, + Venus + endenum +< +The above enum definition is equivalent to the following class definition: > + + class Planet + public static final Mercury: Planet = Planet.new('Mercury', 0) + public static final Venus: Planet = Planet.new('Venus', 1) + + public static const values: list = [Planet.Mercury, Planet.Venus] + + public const name: string + public const ordinal: number + endclass +< ============================================================================== 9. Rationale diff --git a/runtime/filetype.vim b/runtime/filetype.vim index d53671a..9d6b4bd 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -101,6 +101,9 @@ au BufNewFile,BufRead build.xml setf ant " Arduino au BufNewFile,BufRead *.ino,*.pde setf arduino +" Ash of busybox +au BufNewFile,BufRead .ash_history setf sh + " Apache config file au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf setf apache au BufNewFile,BufRead */etc/apache2/sites-*/*.com setf apache @@ -280,6 +283,9 @@ endif " Busted (Lua unit testing framework - configuration files) au BufNewFile,BufRead .busted setf lua +" Bundle config +au BufNewFile,BufRead */.bundle/config setf yaml + " C or lpc au BufNewFile,BufRead *.c call dist#ft#FTlpc() au BufNewFile,BufRead *.lpc,*.ulpc setf lpc @@ -293,17 +299,24 @@ au BufNewFile,BufRead calendar setf calendar " Cap'n Proto au BufNewFile,BufRead *.capnp setf capnp +" Cgdb config file +au BufNewFile,BufRead cgdbrc setf cgdbrc + " C# au BufNewFile,BufRead *.cs,*.csx setf cs " CSDL au BufNewFile,BufRead *.csdl setf csdl +" Ctags +au BufNewFile,BufRead *.ctags setf conf + " Cabal au BufNewFile,BufRead *.cabal setf cabal -" Cdrdao TOC -au BufNewFile,BufRead *.toc setf cdrtoc +" Cdrdao TOC or LaTeX \tableofcontents files +au BufNewFile,BufRead *.toc + \ if getline(1) =~# '\\contentsline' |setf tex|else|setf cdrtoc|endif " Cdrdao config au BufNewFile,BufRead */etc/cdrdao.conf,*/etc/defaults/cdrdao,*/etc/default/cdrdao,.cdrdao setf cdrdaoconf @@ -317,6 +330,9 @@ au BufRead,BufNewFile *.chai setf chaiscript " Chatito au BufNewFile,BufRead *.chatito setf chatito +" Chktex +au BufRead,BufNewFile .chktexrc setf conf + " Chuck au BufNewFile,BufRead *.ck setf chuck @@ -409,6 +425,9 @@ au BufNewFile,BufRead .clang-format setf yaml " Clang-tidy au BufNewFile,BufRead .clang-tidy setf yaml +" Matplotlib +au BufNewFile,BufRead *.mplstyle,matplotlibrc setf yaml + " Clean au BufNewFile,BufRead *.dcl,*.icl setf clean @@ -418,6 +437,9 @@ au BufNewFile,BufRead *.eni setf cl " Clever or dtd au BufNewFile,BufRead *.ent call dist#ft#FTent() +" Cling +au BufNewFile,BufRead .cling_history setf cpp + " Clipper, FoxPro, ABB RAPID or eviews au BufNewFile,BufRead *.prg\c call dist#ft#FTprg() @@ -427,6 +449,9 @@ au BufNewFile,BufRead *.clj,*.cljs,*.cljx,*.cljc setf clojure " Cmake au BufNewFile,BufRead CMakeLists.txt,*.cmake,*.cmake.in setf cmake +" CmakeCache +autocmd BufRead,BufNewFile CMakeCache.txt setf cmakecache + " Cmusrc au BufNewFile,BufRead */.cmus/{autosave,rc,command-history,*.theme} setf cmusrc au BufNewFile,BufRead */cmus/{rc,*.theme} setf cmusrc @@ -504,6 +529,13 @@ endif au BufNewFile,BufRead *s6*/\(up\|down\|run\|finish\) setf execline au BufNewFile,BufRead s6-* setf execline +" Fontconfig config files +au BufNewFile,BufRead fonts.conf setf xml + +" Libreoffice config files +au BufNewFile,BufRead *.xcu,*.xlb,*.xlc,*.xba setf xml +au BufNewFile,BufRead psprint.conf,sofficerc setf dosini + " Lynx config files au BufNewFile,BufRead lynx.cfg setf lynx @@ -514,6 +546,25 @@ au BufNewFile,BufRead *.lrc setf lyrics au BufNewFile,BufRead *.quake,cm3.cfg setf m3quake au BufNewFile,BufRead m3makefile,m3overrides setf m3build +" XDG mimeapps.list +au BufNewFile,BufRead mimeapps.list setf dosini + +" Many tools written in Python use dosini as their config +" like setuptools, pudb, coverage, pypi, gitlint, oelint-adv, pylint, bpython, mypy +" (must be before *.cfg) +au BufNewFile,BufRead pip.conf,setup.cfg,pudb.cfg,.coveragerc,.pypirc,.gitlint,.oelint.cfg setf dosini +au BufNewFile,BufRead {.,}pylintrc,*/bpython/config,*/mypy/config setf dosini + +" Many tools written in Python use toml as their config, like black +au BufNewFile,BufRead .black setf toml +au BufNewFile,BufRead black + \ if getline(1) =~ 'tool.back' + \| setf toml + \| endif + +" LXQt's programs use dosini as their config +au BufNewFile,BufRead */{lxqt,screengrab}/*.conf setf dosini + " Quake au BufNewFile,BufRead *baseq[2-3]/*.cfg,*id1/*.cfg setf quake au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake @@ -521,6 +572,14 @@ au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake " Quake C au BufNewFile,BufRead *.qc setf c +" LaTeX packages use LaTeX as their configuration, such as: +" ~/.texlive/texmf-config/tex/latex/hyperref/hyperref.cfg +" ~/.texlive/texmf-config/tex/latex/docstrip/docstrip.cfg +au BufNewFile,BufRead */tex/latex/**.cfg setf tex + +" Wakatime config +au BufNewFile,BufRead .wakatime.cfg setf dosini + " Configure files au BufNewFile,BufRead *.cfg\c call dist#ft#FTcfg() @@ -650,7 +709,10 @@ au BufNewFile,BufRead *.dsl au BufNewFile,BufRead *.dtd setf dtd " DTS/DSTI/DTSO (device tree files) -au BufNewFile,BufRead *.dts,*.dtsi,*.dtso,*.its setf dts +au BufNewFile,BufRead *.dts,*.dtsi,*.dtso,*.its,*.keymap setf dts + +" Earthfile +au BufNewFile,BufRead Earthfile setf earthfile " EDIF (*.edf,*.edif,*.edn,*.edo) or edn au BufNewFile,BufRead *.ed\(f\|if\|o\) setf edif @@ -730,6 +792,9 @@ au BufNewFile,BufRead *.fir setf firrtl " Fish shell au BufNewFile,BufRead *.fish setf fish +" Flatpak config +au BufNewFile,BufRead */flatpak/repo/config setf dosini + " FlexWiki - disabled, because it has side effects when a .wiki file " is not actually FlexWiki "au BufNewFile,BufRead *.wiki setf flexwiki @@ -862,7 +927,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,.gnuplot_history setf gnuplot " Go (Google) au BufNewFile,BufRead *.go setf go @@ -913,11 +978,7 @@ au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot,*.hsig setf haskell au BufNewFile,BufRead *.lhs setf lhaskell au BufNewFile,BufRead *.chs setf chaskell au BufNewFile,BufRead cabal.project setf cabalproject -au BufNewFile,BufRead $HOME/.cabal/config setf cabalconfig -if exists('$XDG_CONFIG_HOME') - au BufNewFile,BufRead $XDG_CONFIG_HOME/cabal/config setf cabalconfig -endif -au BufNewFile,BufRead $HOME/.config/cabal/config setf cabalconfig +au BufNewFile,BufRead */{.,}cabal/config setf cabalconfig au BufNewFile,BufRead cabal.config setf cabalconfig au BufNewFile,BufRead *.persistentmodels setf haskellpersistent @@ -938,7 +999,7 @@ au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum setf hercules au BufRead,BufNewFile *.heex setf heex " HEX (Intel) -au BufNewFile,BufRead *.hex,*.h32 setf hex +au BufNewFile,BufRead *.hex,*.ihex,*.int,*.ihe,*.ihx,*.mcs,*.h32,*.h80,*.h86,*.a43,*.a90 setf hex " Hjson au BufNewFile,BufRead *.hjson setf hjson @@ -955,6 +1016,9 @@ au BufRead,BufNewFile *.hoon setf hoon " Tilde (must be before HTML) au BufNewFile,BufRead *.t.html setf tilde +" Translate shell +au BufNewFile,BufRead init.trans,*/etc/translate-shell,.trans setf clojure + " HTML (.shtml and .stm for server side) au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml() au BufNewFile,BufRead *.cshtml setf html @@ -1062,6 +1126,7 @@ au BufNewFile,BufRead *.jj,*.jjt setf javacc " JavaScript, ECMAScript, ES module script, CommonJS script au BufNewFile,BufRead *.js,*.jsm,*.javascript,*.es,*.mjs,*.cjs setf javascript +au BufNewFile,BufRead .node_repl_history setf javascript " JavaScript with React au BufNewFile,BufRead *.jsx setf javascriptreact @@ -1095,15 +1160,18 @@ au BufNewFile,BufRead *.json-patch setf json " Geojson is also json au BufNewFile,BufRead *.geojson setf json -" Jupyter Notebook is also json -au BufNewFile,BufRead *.ipynb setf json +" Jupyter Notebook and jupyterlab config is also json +au BufNewFile,BufRead *.ipynb,*.jupyterlab-settings setf json + +" Sublime config +au BufNewFile,BufRead *.sublime-project,*.sublime-settings,*.sublime-workspace setf json " Other files that look like json -au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc setf json +au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,flake.lock setf json " JSONC (JSON with comments) au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc setf jsonc -au BufNewFile,BufRead .jshintrc,.hintrc,.swrc,[jt]sconfig*.json setf jsonc +au BufNewFile,BufRead .jshintrc,.jscsrc,.vsconfig,.hintrc,.swrc,[jt]sconfig*.json setf jsonc " JSON au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json @@ -1167,8 +1235,11 @@ au BufNewFile,BufRead *.sig call dist#ft#FTsig() " LDAP LDIF au BufNewFile,BufRead *.ldif setf ldif +" Luadoc, Ldoc (must be before *.ld) +au BufNewFile,BufRead config.ld setf lua + " Ld loader -au BufNewFile,BufRead *.ld setf ld +au BufNewFile,BufRead *.ld,*/ldscripts/* setf ld " Lean au BufNewFile,BufRead *.lean setf lean @@ -1203,9 +1274,9 @@ au BufNewFile,BufRead *.ly,*.ily setf lilypond " Lisp (*.el = ELisp, *.cl = Common Lisp) " *.jl was removed, it's also used for Julia, better skip than guess wrong. if has("fname_case") - au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,*.L,.emacs,.sawfishrc setf lisp + au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,*.L,.emacs,.sawfishrc,*.stsg,*/supertux2/config setf lisp else - au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,.emacs,.sawfishrc setf lisp + au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,.emacs,.sawfishrc,*.stsg,*/supertux2/config setf lisp endif " SBCL implementation of Common Lisp @@ -1236,13 +1307,17 @@ au BufNewFile,BufRead */etc/login.defs setf logindefs au BufNewFile,BufRead *.lgt setf logtalk " LOTOS -au BufNewFile,BufRead *.lot,*.lotos setf lotos +au BufNewFile,BufRead *.lotos setf lotos + +" LOTOS or LaTeX \listoftables files +au BufNewFile,BufRead *.lot + \ if getline(1) =~# '\\contentsline' |setf tex|else|setf lotos|endif " Lout (also: *.lt) au BufNewFile,BufRead *.lou,*.lout setf lout -" Lua -au BufNewFile,BufRead *.lua setf lua +" Lua, Texlua +au BufNewFile,BufRead *.lua,*.tlu,.lua_history setf lua " Luau au BufNewFile,BufRead *.luau setf luau @@ -1254,7 +1329,7 @@ au BufNewFile,BufRead .luaurc setf jsonc au BufNewFile,BufRead .luacheckrc setf lua " Luarocks -au BufNewFile,BufRead *.rockspec setf lua +au BufNewFile,BufRead *.rockspec,rock_manifest setf lua " Linden Scripting Language (Second Life) au BufNewFile,BufRead *.lsl call dist#ft#FTlsl() @@ -1265,6 +1340,7 @@ au BufNewFile,BufRead *.lss setf lss " M4 au BufNewFile,BufRead *.m4 \ if expand("") !~? 'html.m4$\|fvwm2rc' | setf m4 | endif +au BufNewFile,BufRead .m4_history setf m4 " MaGic Point au BufNewFile,BufRead *.mgp setf mgp @@ -1300,7 +1376,12 @@ au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple au BufNewFile,BufRead *.map setf map " Markdown -au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md setf markdown +au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md + \ if exists("g:filetype_md") | + \ exe "setf " . g:filetype_md | + \ else | + \ setf markdown | + \ endif " Mason au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason @@ -1314,6 +1395,9 @@ au BufNewFile,BufRead *.nb setf mma " Maya Extension Language au BufNewFile,BufRead *.mel setf mel +" mbsync +au BufNewFile,BufRead .mbsyncrc setf conf + " Mercurial (hg) commit file au BufNewFile,BufRead hg-editor-*.txt setf hgcommit @@ -1346,6 +1430,9 @@ au BufNewFile,BufRead *.mix,*.mixal setf mix " MMIX or VMS makefile au BufNewFile,BufRead *.mms call dist#ft#FTmms() +" msmtp +au BufNewFile,BufRead .msmtprc setf msmtp + " Symbian meta-makefile definition (MMP) au BufNewFile,BufRead *.mmp setf mmp @@ -1389,7 +1476,7 @@ au BufNewFile,BufRead mrxvtrc,.mrxvtrc setf mrxvtrc au BufNewFile,BufRead *.msql setf msql " Mysql -au BufNewFile,BufRead *.mysql setf mysql +au BufNewFile,BufRead *.mysql,.mysql_history setf mysql " Tcl Shell RC file au BufNewFile,BufRead tclsh.rc setf tcl @@ -1435,6 +1522,9 @@ au BufNewFile,BufRead Neomuttrc setf neomuttrc " Netrc au BufNewFile,BufRead .netrc setf netrc +" Neofetch +au BufNewFile,BufRead */neofetch/config.conf setf sh + " Nginx au BufNewFile,BufRead *.nginx,nginx*.conf,*nginx.conf,*/etc/nginx/*,*/usr/local/nginx/conf/*,*/nginx/*.conf setf nginx @@ -1470,6 +1560,9 @@ au BufNewFile,BufRead *.mm call dist#ft#FTmm() " Not Quite C au BufNewFile,BufRead *.nqc setf nqc +" notmuch +au BufNewFile,BufRead .notmuch-config setf dosini + " NSE - Nmap Script Engine - uses Lua syntax au BufNewFile,BufRead *.nse setf lua @@ -1492,7 +1585,7 @@ au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit,*.mlt,*.mlp,*.mlip,*.mli au BufNewFile,BufRead *.occ setf occam " Octave -au BufNewFile,BufRead octave.conf,.octaverc,octaverc setf octave +au BufNewFile,BufRead octave.conf,.octaverc,octaverc,*/octave/history setf octave " Odin au BufNewFile,BufRead *.odin setf odin @@ -1500,6 +1593,9 @@ au BufNewFile,BufRead *.odin setf odin " Omnimark au BufNewFile,BufRead *.xom,*.xin setf omnimark +" ondir +au BufNewFile,BufRead .ondirrc setf ondir + " OPAM au BufNewFile,BufRead opam,*.opam,*.opam.template setf opam @@ -1525,9 +1621,10 @@ au BufNewFile,BufRead *.org,*.org_archive setf org au BufNewFile,BufRead pf.conf setf pf " ini style config files, using # comments -au BufNewFile,BufRead */etc/pacman.conf,mpv.conf setf confini +au BufNewFile,BufRead pacman.conf,mpv.conf setf confini au BufNewFile,BufRead */.aws/config,*/.aws/credentials setf confini au BufNewFile,BufRead *.nmconnection setf confini +au BufNewFile,BufRead paru.conf setf confini " Pacman hooks au BufNewFile,BufRead *.hook @@ -1535,6 +1632,9 @@ au BufNewFile,BufRead *.hook \ setf confini | \ endif +" Pacman makepkg +au BufNewFile,BufRead {.,}makepkg.conf setf sh + " Pacman log au BufNewFile,BufRead pacman.log setf pacmanlog @@ -1556,8 +1656,16 @@ au BufNewFile,BufRead *.pas setf pascal " Pascal or Puppet manifest au BufNewFile,BufRead *.pp call dist#ft#FTpp() -" Delphi or Lazarus program file -au BufNewFile,BufRead *.dpr,*.lpr setf pascal +" Delphi +au BufNewFile,BufRead *.dpr setf pascal + +" Xilinx labtools project file or Lazarus program file +au BufNewFile,BufRead *.lpr + \ if getline(1) =~# " -" Last Change: 23 May 2020 +" Last Change: 2020 May 23 " 2023 Aug 28 by Vim Project (undo_ftplugin) +" 2024 Apr 09 by Vim Project (add Matchit support) if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 +setl include=^\\s*%\\s*include setl comments=:;,s1:/*,mb:*,ex:*/,:// setl commentstring=;%s -let b:undo_ftplugin = "setl commentstring< comments<" +let b:undo_ftplugin = "setl commentstring< comments< include<" + +" Matchit support +if !exists('b:match_words') + let b:match_skip = 's:comment\|string\|character\|special' + let b:match_words = '^\s*%\s*if\%(\|num\|idn\|nidn\)\>:^\s*%\s*elif\>:^\s*%\s*else\>:^\s*%\s*endif\>,^\s*%\s*macro\>:^\s*%\s*endmacro\>,^\s*%\s*rep\>:^\s*%\s*endrep\>' + let b:match_ignorecase = 1 + let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words b:match_skip" +endif diff --git a/runtime/ftplugin/astro.vim b/runtime/ftplugin/astro.vim new file mode 100644 index 0000000..0b0e034 --- /dev/null +++ b/runtime/ftplugin/astro.vim @@ -0,0 +1,186 @@ +" Vim filetype plugin file +" Language: Astro +" Maintainer: Romain Lafourcade +" Last Change: 2024 Apr 21 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo-=C + +function! s:IdentifyScope(start, end) abort + let pos_start = searchpairpos(a:start, '', a:end, 'bnW') + let pos_end = searchpairpos(a:start, '', a:end, 'nW') + + return pos_start != [0, 0] + \ && pos_end != [0, 0] + \ && pos_start[0] != getpos('.')[1] +endfunction + +function! s:AstroComments() abort + if s:IdentifyScope('^---\n\s*\S', '^---\n\n') + \ || s:IdentifyScope('^\s*') + " ECMAScript comments + setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// + setlocal commentstring=//%s + + elseif s:IdentifyScope('^\s*') + " CSS comments + setlocal comments=s1:/*,mb:*,ex:*/ + setlocal commentstring=/*%s*/ + + else + " HTML comments + setlocal comments=s: + setlocal commentstring= + endif +endfunction + +" https://code.visualstudio.com/docs/languages/jsconfig +function! s:CollectPathsFromConfig() abort + let config_json = findfile('tsconfig.json', '.;') + + if empty(config_json) + let config_json = findfile('jsconfig.json', '.;') + + if empty(config_json) + return + endif + endif + + let paths_from_config = config_json + \ ->readfile() + \ ->filter({ _, val -> val =~ '^\s*[\[\]{}"0-9]' }) + \ ->join() + \ ->json_decode() + \ ->get('compilerOptions', {}) + \ ->get('paths', {}) + + if !empty(paths_from_config) + let b:astro_paths = paths_from_config + \ ->map({key, val -> [ + \ key->glob2regpat(), + \ val[0]->substitute('\/\*$', '', '') + \ ]}) + \ ->values() + endif + + let b:undo_ftplugin ..= " | unlet! b:astro_paths" +endfunction + +function! s:AstroInclude(filename) abort + let decorated_filename = a:filename + \ ->substitute("^", "@", "") + + let found_path = b: + \ ->get("astro_paths", []) + \ ->indexof({ key, val -> decorated_filename =~ val[0]}) + + if found_path != -1 + let alias = b:astro_paths[found_path][0] + let path = b:astro_paths[found_path][1] + \ ->substitute('\(\/\)*$', '/', '') + + return decorated_filename + \ ->substitute(alias, path, '') + endif + + return a:filename +endfunction + +let b:undo_ftplugin = "setlocal" + \ .. " formatoptions<" + \ .. " path<" + \ .. " suffixesadd<" + \ .. " matchpairs<" + \ .. " comments<" + \ .. " commentstring<" + \ .. " iskeyword<" + \ .. " define<" + \ .. " include<" + \ .. " includeexpr<" + +" Create self-resetting autocommand group +augroup Astro + autocmd! * +augroup END + +" Set 'formatoptions' to break comment lines but not other lines, +" and insert the comment leader when hitting or using "o". +setlocal formatoptions-=t +setlocal formatoptions+=croql + +" Remove irrelevant part of 'path'. +setlocal path-=/usr/include + +" Seed 'path' with default directories for :find, gf, etc. +setlocal path+=src/** +setlocal path+=public/** + +" Help Vim find extension-less filenames +let &l:suffixesadd = + \ ".astro" + \ .. ",.js,.jsx,.es,.es6,.cjs,.mjs,.jsm" + \ .. ",.json" + \ .. ",.scss,.sass,.css" + \ .. ",.svelte" + \ .. ",.ts,.tsx,.d.ts" + \ .. ",.vue" + +" From $VIMRUNTIME/ftplugin/html.vim +setlocal matchpairs+=<:> + +" Matchit configuration +if exists("loaded_matchit") + let b:match_ignorecase = 0 + + " From $VIMRUNTIME/ftplugin/javascript.vim + let b:match_words = + \ '\:\,' + \ .. '<\@<=\([^ \t>/]\+\)\%(\s\+[^>]*\%([^/]>\|$\)\|>\|$\):<\@<=/\1>,' + \ .. '<\@<=\%([^ \t>/]\+\)\%(\s\+[^/>]*\|$\):/>' + + " From $VIMRUNTIME/ftplugin/html.vim + let b:match_words ..= + \ ',' + \ .. '<:>,' + \ .. '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' + \ .. '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' + \ .. '<\@<=\([^/!][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' + + let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words" +endif + +" Change what constitutes a word, mainly useful for CSS/SASS +setlocal iskeyword+=- +setlocal iskeyword+=$ +setlocal iskeyword+=% + +" Define paths/aliases for module resolution +call s:CollectPathsFromConfig() + +" Find ESM imports +setlocal include=^\\s*\\(import\\\|import\\s\\+[^\/]\\+from\\)\\s\\+['\"] + +" Process aliases if file can't be found +setlocal includeexpr=s:AstroInclude(v:fname) + +" Set 'define' to a comprehensive value +" From $VIMRUNTIME/ftplugin/javascript.vim and +" $VIMRUNTIME/ftplugin/sass.vim +let &l:define = + \ '\(^\s*(*async\s\+function\|(*function\)' + \ .. '\|^\s*\(\*\|static\|async\|get\|set\|\i\+\.\)' + \ .. '\|^\s*\(\ze\i\+\)\(([^)]*).*{$\|\s*[:=,]\)' + + +" Set &comments and &commentstring according to current scope +autocmd Astro CursorMoved call s:AstroComments() + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: textwidth=78 tabstop=8 shiftwidth=4 softtabstop=4 expandtab diff --git a/runtime/ftplugin/bp.vim b/runtime/ftplugin/bp.vim new file mode 100644 index 0000000..5ddebe5 --- /dev/null +++ b/runtime/ftplugin/bp.vim @@ -0,0 +1,14 @@ +" Blueprint build system filetype plugin file +" Language: Blueprint +" Maintainer: Bruno BELANYI +" Latest Revision: 2024-04-19 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal comments=b://,s1:/*,mb:*,ex:*/ +setlocal commentstring=//\ %s + +let b:undo_ftplugin = "setlocal comments< commentstring<" diff --git a/runtime/ftplugin/cgdbrc.vim b/runtime/ftplugin/cgdbrc.vim new file mode 100644 index 0000000..46cf135 --- /dev/null +++ b/runtime/ftplugin/cgdbrc.vim @@ -0,0 +1,21 @@ +" Vim filetype plugin file +" Language: cgdbrc +" Maintainer: Wu, Zhenyu +" Documentation: https://cgdb.github.io/docs/Configuring-CGDB.html +" Latest Revision: 2024-04-09 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +let b:undo_ftplugin = 'setl com< cms<' + +setlocal commentstring=#%s +setlocal comments=:# + +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions diff --git a/runtime/ftplugin/cmake.vim b/runtime/ftplugin/cmake.vim index 94c0076..9fcf87a 100644 --- a/runtime/ftplugin/cmake.vim +++ b/runtime/ftplugin/cmake.vim @@ -2,6 +2,7 @@ " Language: CMake " Maintainer: Keith Smiley " Last Change: 2018 Aug 30 +" 2024 Apr 20 - add include and suffixadd (Vim Project) " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -15,7 +16,7 @@ set cpo&vim " Don't load another plugin for this buffer let b:did_ftplugin = 1 -let b:undo_ftplugin = "setl commentstring<" +let b:undo_ftplugin = "setl inc< sua< commentstring<" if exists('loaded_matchit') let b:match_words = '\:\\|\:\' @@ -27,6 +28,8 @@ if exists('loaded_matchit') let b:undo_ftplugin .= "| unlet b:match_words" endif +setlocal include=\s*include +setlocal suffixesadd=.cmake,-config.cmake setlocal commentstring=#\ %s " restore 'cpo' and clean up buffer variable diff --git a/runtime/ftplugin/dts.vim b/runtime/ftplugin/dts.vim new file mode 100644 index 0000000..42e3833 --- /dev/null +++ b/runtime/ftplugin/dts.vim @@ -0,0 +1,16 @@ +" Vim filetype plugin file +" Language: dts/dtsi (device tree files) +" Maintainer: Wu, Zhenyu +" Latest Revision: 2024 Apr 12 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let b:undo_ftplugin = 'setl inc< cms< com<' + +setlocal include=^\\%(#include\\\|/include/\\) +" same as C +setlocal commentstring& +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// diff --git a/runtime/ftplugin/gdb.vim b/runtime/ftplugin/gdb.vim index 2473b13..7c10633 100644 --- a/runtime/ftplugin/gdb.vim +++ b/runtime/ftplugin/gdb.vim @@ -1,12 +1,20 @@ " Vim filetype plugin file " Language: gdb " Maintainer: Michaël Peeters -" Last Changed: 26 Oct 2017 +" Last Changed: 2017-10-26 +" 2024-04-10: - add Matchit support (by Vim Project) if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 setlocal commentstring=#%s +setlocal include=^\\s*source " Undo the stuff we changed. -let b:undo_ftplugin = "setlocal cms<" +let b:undo_ftplugin = "setlocal cms< include<" + +" Matchit support +if !exists('b:match_words') + let b:match_words = '\<\%(if\|while\|define\|document\)\>:\:\' + let b:undo_ftplugin ..= " | unlet! b:match_words" +endif diff --git a/runtime/ftplugin/java.vim b/runtime/ftplugin/java.vim index bb7e7cd..fa2b610 100644 --- a/runtime/ftplugin/java.vim +++ b/runtime/ftplugin/java.vim @@ -1,10 +1,9 @@ " Vim filetype plugin file " Language: Java -" -" This runtime file is looking for a new maintainer. -" -" Former maintainer: Dan Sharp -" Last Change: 2012 Mar 11 +" Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com> +" Former Maintainer: Dan Sharp +" Repository: https://github.com/zzzyxwvut/java-vim.git +" Last Change: 2024 Apr 18 " 2024 Jan 14 by Vim Project (browsefilter) if exists("b:did_ftplugin") | finish | endif @@ -23,8 +22,36 @@ set suffixes+=.class " name to / and append .java to the name, then search the path. setlocal includeexpr=substitute(v:fname,'\\.','/','g') setlocal suffixesadd=.java -if exists("g:ftplugin_java_source_path") - let &l:path=g:ftplugin_java_source_path . ',' . &l:path + +" Clean up in case this file is sourced again. +unlet! s:zip_func_upgradable + +" Documented in ":help ft-java-plugin". +if exists("g:ftplugin_java_source_path") && + \ type(g:ftplugin_java_source_path) == type("") + if filereadable(g:ftplugin_java_source_path) + if exists("#zip") && + \ g:ftplugin_java_source_path =~# '.\.\%(jar\|zip\)$' + if !exists("s:zip_files") + let s:zip_files = {} + endif + + let s:zip_files[bufnr('%')] = g:ftplugin_java_source_path + let s:zip_files[0] = g:ftplugin_java_source_path + let s:zip_func_upgradable = 1 + + function! JavaFileTypeZipFile() abort + let @/ = substitute(v:fname, '\.', '\\/', 'g') . '.java' + return get(s:zip_files, bufnr('%'), s:zip_files[0]) + endfunction + + " E120 for "inex=s:JavaFileTypeZipFile()" before v8.2.3900. + setlocal includeexpr=JavaFileTypeZipFile() + setlocal suffixesadd< + endif + else + let &l:path = g:ftplugin_java_source_path . ',' . &l:path + endif endif " Set 'formatoptions' to break comment lines but not other lines, @@ -53,6 +80,25 @@ let b:undo_ftplugin = "setlocal suffixes< suffixesadd<" . \ " formatoptions< comments< commentstring< path< includeexpr<" . \ " | unlet! b:browsefilter" +" See ":help vim9-mix". +if !has("vim9script") + let &cpo = s:save_cpo + unlet s:save_cpo + finish +endif + +if exists("s:zip_func_upgradable") + delfunction! JavaFileTypeZipFile + + def! s:JavaFileTypeZipFile(): string + @/ = substitute(v:fname, '\.', '\\/', 'g') .. '.java' + return get(zip_files, bufnr('%'), zip_files[0]) + enddef + + setlocal includeexpr=s:JavaFileTypeZipFile() + setlocal suffixesadd< +endif + " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo diff --git a/runtime/ftplugin/kconfig.vim b/runtime/ftplugin/kconfig.vim index 940ba74..7674907 100644 --- a/runtime/ftplugin/kconfig.vim +++ b/runtime/ftplugin/kconfig.vim @@ -1,9 +1,9 @@ " Vim filetype plugin file " Vim syntax file -" Maintainer: Christian Brabandt -" Previous Maintainer: Nikolai Weibull -" Latest Revision: 2015-05-29 -" License: Vim (see :h license) +" Maintainer: Christian Brabandt +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2024-04-12 +" License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-kconfig if exists("b:did_ftplugin") @@ -11,17 +11,12 @@ if exists("b:did_ftplugin") endif let b:did_ftplugin = 1 -let s:cpo_save = &cpo -set cpo&vim - -let b:undo_ftplugin = "setl com< cms< fo<" +let b:undo_ftplugin = "setl inc< com< cms< fo<" +setlocal include=source\\s\\+ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql " For matchit.vim if exists("loaded_matchit") let b:match_words = '^\:\,^\:\,^\:\' endif - -let &cpo = s:cpo_save -unlet s:cpo_save diff --git a/runtime/ftplugin/ondir.vim b/runtime/ftplugin/ondir.vim new file mode 100644 index 0000000..0854578 --- /dev/null +++ b/runtime/ftplugin/ondir.vim @@ -0,0 +1,18 @@ +" Vim filetype plugin file +" Language: ondir +" Maintainer: Jon Parise + +if exists('b:did_ftplugin') + finish +endif + +let s:cpo_save = &cpoptions + +setlocal comments=:# commentstring=#\ %s + +let b:undo_ftplugin = 'setl comments< commentstring<' + +let &cpoptions = s:cpo_save +unlet s:cpo_save + +" vim: et ts=4 sw=2 sts=2: diff --git a/runtime/ftplugin/requirements.vim b/runtime/ftplugin/requirements.vim new file mode 100644 index 0000000..fcfc1ac --- /dev/null +++ b/runtime/ftplugin/requirements.vim @@ -0,0 +1,43 @@ +" the Requirements File Format syntax support for Vim +" Version: 1.8.0 +" Author: raimon +" Upstream: https://github.com/raimon49/requirements.txt.vim +" License: MIT LICENSE +" The MIT License (MIT) +" +" Copyright (c) 2015 raimon +" +" Permission is hereby granted, free of charge, to any person obtaining a copy +" of this software and associated documentation files (the "Software"), to deal +" in the Software without restriction, including without limitation the rights +" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +" copies of the Software, and to permit persons to whom the Software is +" furnished to do so, subject to the following conditions: +" +" The above copyright notice and this permission notice shall be included in all +" copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +" SOFTWARE. +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +let b:undo_ftplugin = "setl iskeyword< commentstring<" +" pip options contain "-" +setlocal iskeyword+=- +setlocal commentstring=#\ %s +compiler pip_compile + +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions +" vim: et sw=4 ts=4 sts=4: diff --git a/runtime/ftplugin/roc.vim b/runtime/ftplugin/roc.vim new file mode 100644 index 0000000..c665108 --- /dev/null +++ b/runtime/ftplugin/roc.vim @@ -0,0 +1,14 @@ +" Roc filetype plugin file +" Language: Roc +" Maintainer: nat-418 <93013864+nat-418@users.noreply.github.com> +" Latest Revision: 2024-04-5 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal comments=:##,:# +setlocal commentstring=#\ %s + +let b:undo_ftplugin = "setl com< cms<" diff --git a/runtime/ftplugin/uci.vim b/runtime/ftplugin/uci.vim new file mode 100644 index 0000000..984dab6 --- /dev/null +++ b/runtime/ftplugin/uci.vim @@ -0,0 +1,21 @@ +" Vim ftplugin file +" Language: OpenWrt Unified Configuration Interface +" Maintainer: Colin Caine +" Upstream: https://github.com/cmcaine/vim-uci +" Last Change: 2024 Apr 17 +" +" For more information on uci, see https://openwrt.org/docs/guide-user/base-system/uci + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +" UCI files are indented with tabs. +setl noexpandtab +setl shiftwidth=0 +setl softtabstop=0 + +setl commentstring=#\ %s + +let b:undo_ftplugin = "setlocal et< cms< sts< sw<" diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index 575af74..67f360b 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -1,7 +1,7 @@ " Vim filetype plugin -" Language: Vim -" Maintainer: The Vim Project -" Last Change: 2023 Aug 10 +" Language: Vim +" Maintainer: Doug Kearns +" Last Change: 2024 Apr 13 " Former Maintainer: Bram Moolenaar " Only do this when not done yet for this buffer @@ -50,7 +50,7 @@ setlocal isk+=# setlocal keywordprg=:help " Comments starts with # in Vim9 script. We have to guess which one to use. -if "\n" .. getline(1, 10)->join("\n") =~# '\n\s*vim9\%[script]\>' +if "\n" .. getline(1, 32)->join("\n") =~# '\n\s*vim9\%[script]\>' setlocal commentstring=#%s else setlocal commentstring=\"%s diff --git a/runtime/ftplugin/yaml.vim b/runtime/ftplugin/yaml.vim index db7cbd7..8bfc45e 100644 --- a/runtime/ftplugin/yaml.vim +++ b/runtime/ftplugin/yaml.vim @@ -16,6 +16,13 @@ let b:undo_ftplugin = "setl com< cms< et< fo<" setlocal comments=:# commentstring=#\ %s expandtab setlocal formatoptions-=t formatoptions+=croql +" rime input method engine uses `*.custom.yaml` as its config files +if expand('%:r:e') ==# 'custom' + compiler rime_deployer + setlocal include=__include:\\s* + let b:undo_ftplugin ..= " inc<" +endif + if !exists("g:yaml_recommended_style") || g:yaml_recommended_style != 0 let b:undo_ftplugin ..= " sw< sts<" setlocal shiftwidth=2 softtabstop=2 diff --git a/runtime/ftplugin/zathurarc.vim b/runtime/ftplugin/zathurarc.vim new file mode 100644 index 0000000..259fb13 --- /dev/null +++ b/runtime/ftplugin/zathurarc.vim @@ -0,0 +1,22 @@ +" Vim filetype plugin file +" Language: Zathurarc +" Maintainer: Wu, Zhenyu +" Documentation: https://pwmt.org/projects/zathura/documentation/ +" Upstream: https://github.com/Freed-Wu/zathurarc.vim +" Latest Revision: 2024-04-02 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +let b:undo_ftplugin = 'setlocal comments< commentstring< include<' +setlocal comments=:# +setlocal commentstring=#\ %s +setlocal include=^\sinclude + +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions diff --git a/runtime/indent/asm.vim b/runtime/indent/asm.vim new file mode 100644 index 0000000..4efa766 --- /dev/null +++ b/runtime/indent/asm.vim @@ -0,0 +1,29 @@ +" Vim indent file +" Language: asm +" Maintainer: Philip Jones +" Upstream: https://github.com/philj56/vim-asm-indent +" Last Change: 2017-Jul-01 +" 2024 Apr 25 by Vim Project (undo_indent) + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=s:getAsmIndent() +setlocal indentkeys=<:>,!^F,o,O + +let b:undo_indent = "indentexpr< indentkeys<" + +function! s:getAsmIndent() + let line = getline(v:lnum) + let ind = shiftwidth() + + " If the line is a label (starts with ':' terminated keyword), + " then don't indent + if line =~ '^\s*\k\+:' + let ind = 0 + endif + + return ind +endfunction diff --git a/runtime/indent/astro.vim b/runtime/indent/astro.vim new file mode 100644 index 0000000..25a2aa0 --- /dev/null +++ b/runtime/indent/astro.vim @@ -0,0 +1,88 @@ +" Vim indent file (experimental). +" Language: Astro +" Author: Wuelner Martínez +" Maintainer: Wuelner Martínez +" URL: https://github.com/wuelnerdotexe/vim-astro +" Last Change: 2022 Aug 07 +" Based On: Evan Lecklider's vim-svelte +" Changes: See https://github.com/evanleck/vim-svelte +" Credits: See vim-svelte on github + +" Only load this indent file when no other was loaded yet. +if exists('b:did_indent') + finish +endif + +let b:html_indent_script1 = 'inc' +let b:html_indent_style1 = 'inc' + +" Embedded HTML indent. +runtime! indent/html.vim +let s:html_indent = &l:indentexpr +unlet b:did_indent + +let b:did_indent = 1 + +setlocal indentexpr=GetAstroIndent() +setlocal indentkeys=<>>,/,0{,{,},0},0),0],0\,<<>,,!^F,*,o,O,e,; + +let b:undo_indent = 'setl inde< indk<' + +" Only define the function once. +if exists('*GetAstroIndent') + finish +endif + +let s:cpoptions_save = &cpoptions +setlocal cpoptions&vim + +function! GetAstroIndent() + let l:current_line_number = v:lnum + + if l:current_line_number == 0 + return 0 + endif + + let l:current_line = getline(l:current_line_number) + + if l:current_line =~ '^\s*', '', '', 'bW') && + \ l:previous_line =~ ';$' && l:current_line !~ '}' + return l:previous_line_indent + endif + + if synID(l:previous_line_number, match( + \ l:previous_line, '\S' + \ ) + 1, 0) == hlID('htmlTag') && synID(l:current_line_number, match( + \ l:current_line, '\S' + \ ) + 1, 0) != hlID('htmlEndTag') + let l:indents_match = l:indent == l:previous_line_indent + let l:previous_closes = l:previous_line =~ '/>$' + + if l:indents_match && + \ !l:previous_closes && l:previous_line =~ '<\(\u\|\l\+:\l\+\)' + return l:previous_line_indent + shiftwidth() + elseif !l:indents_match && l:previous_closes + return l:previous_line_indent + endif + endif + + return l:indent +endfunction + +let &cpoptions = s:cpoptions_save +unlet s:cpoptions_save +" vim: ts=8 diff --git a/runtime/indent/json5.vim b/runtime/indent/json5.vim new file mode 100644 index 0000000..5977a4b --- /dev/null +++ b/runtime/indent/json5.vim @@ -0,0 +1,11 @@ +" Vim indent file +" Language: JSON5 +" Maintainer: The Vim Project +" Last Change: 2024-03-26 + +if exists("b:did_indent") + finish +endif + +" Same as jsonc indenting for now +runtime! indent/jsonc.vim diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 1dce91b..50833f0 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -1661,7 +1661,7 @@ func s:CreateBreakpoint(id, subid, enabled) endif endif call sign_define('debugBreakpoint' .. nr, - \ #{text: strpart(label, 0, 2), + \ #{text: slice(label, 0, 2), \ texthl: hiName}) endif endfunc diff --git a/runtime/syntax/astro.vim b/runtime/syntax/astro.vim new file mode 100644 index 0000000..0816051 --- /dev/null +++ b/runtime/syntax/astro.vim @@ -0,0 +1,190 @@ +" Vim syntax file. +" Language: Astro +" Author: Wuelner Martínez +" Maintainer: Wuelner Martínez +" URL: https://github.com/wuelnerdotexe/vim-astro +" Last Change: 2022 Aug 22 +" Based On: Evan Lecklider's vim-svelte +" Changes: See https://github.com/evanleck/vim-svelte +" Credits: See vim-svelte on github + +" Quit when a (custom) syntax file was already loaded. +if !exists('main_syntax') + if exists('b:current_syntax') + finish + endif + let main_syntax = 'astro' +elseif exists('b:current_syntax') && b:current_syntax == 'astro' + finish +endif + +" Astro syntax variables are initialized. +let g:astro_typescript = get(g:, 'astro_typescript', 'disable') +let g:astro_stylus = get(g:, 'astro_stylus', 'disable') + +let s:cpoptions_save = &cpoptions +set cpoptions&vim + +" Embedded HTML syntax. +runtime! syntax/html.vim + +" htmlTagName: expand HTML tag names to include mixed case and periods. +syntax match htmlTagName contained "\<[a-zA-Z\.]*\>" + +" astroDirectives: add Astro Directives to HTML arguments. +syntax match astroDirectives contained '\<[a-z]\+:[a-z|]*\>' containedin=htmlTag + +unlet b:current_syntax + +if g:astro_typescript == 'enable' + " Embedded TypeScript syntax. + syntax include @astroJavaScript syntax/typescript.vim + + " javaScriptExpression: a javascript expression is used as an arg value. + syntax clear javaScriptExpression + syntax region javaScriptExpression + \ contained start=+&{+ + \ keepend end=+};+ + \ contains=@astroJavaScript,@htmlPreproc + + " javaScript: add TypeScript support to HTML script tag. + syntax clear javaScript + syntax region javaScript + \ start=+]*>+ + \ keepend + \ end=+]*>+me=s-1 + \ contains=htmlScriptTag,@astroJavaScript,@htmlPreproc,htmlCssStyleComment +else + " Embedded JavaScript syntax. + syntax include @astroJavaScript syntax/javascript.vim +endif + +" astroFence: detect the Astro fence. +syntax match astroFence contained +^---$+ + +" astrojavaScript: add TypeScript support to Astro code fence. +syntax region astroJavaScript + \ start=+^---$+ + \ keepend + \ end=+^---$+ + \ contains=htmlTag,@astroJavaScript,@htmlPreproc,htmlCssStyleComment,htmlEndTag,astroFence + \ fold + +unlet b:current_syntax + +if g:astro_typescript == 'enable' + " Embedded TypeScript React (TSX) syntax. + syntax include @astroJavaScriptReact syntax/typescriptreact.vim +else + " Embedded JavaScript React (JSX) syntax. + syntax include @astroJavaScriptReact syntax/javascriptreact.vim +endif + +" astroJavaScriptExpression: add {JSX or TSX} support to Astro expresions. +execute 'syntax region astroJavaScriptExpression start=+{+ keepend end=+}+ ' . + \ 'contains=@astroJavaScriptReact, @htmlPreproc containedin=' . join([ + \ 'htmlArg', 'htmlBold', 'htmlBoldItalic', 'htmlBoldItalicUnderline', + \ 'htmlBoldUnderline', 'htmlBoldUnderlineItalic', 'htmlH1', 'htmlH2', + \ 'htmlH3', 'htmlH4', 'htmlH5', 'htmlH6', 'htmlHead', 'htmlItalic', + \ 'htmlItalicBold', 'htmlItalicBoldUnderline', 'htmlItalicUnderline', + \ 'htmlItalicUnderlineBold', 'htmlLeadingSpace', 'htmlLink', + \ 'htmlStrike', 'htmlString', 'htmlTag', 'htmlTitle', 'htmlUnderline', + \ 'htmlUnderlineBold', 'htmlUnderlineBoldItalic', + \ 'htmlUnderlineItalic', 'htmlUnderlineItalicBold', 'htmlValue' + \ ], ',') + +" cssStyle: add CSS style tags support in TypeScript React. +syntax region cssStyle + \ start=+]*>+ + \ keepend + \ end=+]*>+me=s-1 + \ contains=htmlTag,@htmlCss,htmlCssStyleComment,@htmlPreproc,htmlEndTag + \ containedin=@astroJavaScriptReact + +unlet b:current_syntax + +" Embedded SCSS syntax. +syntax include @astroScss syntax/scss.vim + +" cssStyle: add SCSS style tags support in Astro. +syntax region scssStyle + \ start=/\_[^>]*\(lang\)=\("\|''\)[^\2]*scss[^\2]*\2\_[^>]*>/ + \ keepend + \ end=++me=s-1 + \ contains=@astroScss,astroSurroundingTag + \ fold + +unlet b:current_syntax + +" Embedded SASS syntax. +syntax include @astroSass syntax/sass.vim + +" cssStyle: add SASS style tags support in Astro. +syntax region sassStyle + \ start=/\_[^>]*\(lang\)=\("\|''\)[^\2]*sass[^\2]*\2\_[^>]*>/ + \ keepend + \ end=++me=s-1 + \ contains=@astroSass,astroSurroundingTag + \ fold + +unlet b:current_syntax + +" Embedded LESS syntax. +syntax include @astroLess syntax/less.vim + +" cssStyle: add LESS style tags support in Astro. +syntax region lessStyle + \ start=/\_[^>]*\(lang\)=\("\|''\)[^\2]*less[^\2]*\2\_[^>]*>/ + \ keepend + \ end=++me=s-1 + \ contains=@astroLess,astroSurroundingTag + \ fold + +unlet b:current_syntax + +" Embedded Stylus syntax. +" NOTE: Vim does not provide stylus support by default, but you can install +" this plugin to support it: https://github.com/wavded/vim-stylus +if g:astro_stylus == 'enable' + try + " Embedded Stylus syntax. + syntax include @astroStylus syntax/stylus.vim + + " stylusStyle: add Stylus style tags support in Astro. + syntax region stylusStyle + \ start=/\_[^>]*\(lang\)=\("\|''\)[^\2]*stylus[^\2]*\2\_[^>]*>/ + \ keepend + \ end=++me=s-1 + \ contains=@astroStylus,astroSurroundingTag + \ fold + + unlet b:current_syntax + catch + echomsg "you need install a external plugin for support stylus in .astro files" + endtry +endif + +" astroSurroundingTag: add surround HTML tag to script and style. +syntax region astroSurroundingTag + \ start=+<\(script\|style\)+ + \ end=+>+ + \ contains=htmlTagError,htmlTagN,htmlArg,htmlValue,htmlEvent,htmlString + \ contained + \ fold + +" Define the default highlighting. +" Only used when an item doesn't have highlighting yet. +highlight default link astroDirectives Special +highlight default link astroFence Comment + +let b:current_syntax = 'astro' +if main_syntax == 'astro' + unlet main_syntax +endif + +" Sync from start because of the wacky nesting. +syntax sync fromstart + +let &cpoptions = s:cpoptions_save +unlet s:cpoptions_save +" vim: ts=8 diff --git a/runtime/syntax/cgdbrc.vim b/runtime/syntax/cgdbrc.vim new file mode 100644 index 0000000..1ace370 --- /dev/null +++ b/runtime/syntax/cgdbrc.vim @@ -0,0 +1,16 @@ +" Vim syntax file +" Language: cgdbrc +" Maintainer: Wu, Zhenyu +" Documentation: https://cgdb.github.io/docs/Configuring-CGDB.html +" Latest Revision: 2024-04-09 + +if exists('b:current_syntax') + finish +endif +let b:current_syntax = 'cgdbrc' + +runtime! syntax/vim.vim + +syn region cgdbComment start="^\s*\#" skip="\\$" end="$" contains=@Spell + +highlight default link cgdbComment Comment diff --git a/runtime/syntax/cmakecache.vim b/runtime/syntax/cmakecache.vim new file mode 100644 index 0000000..f07c719 --- /dev/null +++ b/runtime/syntax/cmakecache.vim @@ -0,0 +1,60 @@ +" Vim syntax file +" Language: cmakecache - CMakeCache.txt files generated by CMake +" Author: bfrg +" Upstream: https://github.com/bfrg/vim-cmakecache-syntax +" Last Change: Nov 28, 2019 +" License: Same as Vim itself (see :h license) + +if exists('b:current_syntax') + finish +endif + +let s:cpo_save = &cpoptions +set cpoptions&vim + +" Comments start with # or // +syntax region CMakeCacheComment start="#\|//" end="$" + +" Match 'key' in key:type=value +syntax match CMakeCacheKey "^\s*\w\+\(-ADVANCED\)\=:"me=e-1 + +" Highlight 'str' in key:STRING=str (many thanks to Nickspoons in #vim!) +syntax region CMakeCacheStringVar matchgroup=CMakeCacheType start=":STRING="ms=s+1,rs=e-1 end="$" contains=CMakeCacheString keepend +syntax region CMakeCacheString start="="ms=s+1 end="$" contained + +" Highlight boolean 'value' in key:BOOL=value +syntax region CMakeCacheBoolVar matchgroup=CMakeCacheType start=":BOOL="ms=s+1,rs=e-1 end="$" contains=CMakeCacheBool keepend +syntax region CMakeCacheBool start="="ms=s+1 end="$" contained + +" Highlight 'path' in key:PATH=path +syntax region CMakeCachePathVar matchgroup=CMakeCacheType start=":PATH="ms=s+1,rs=e-1 end="$" contains=CMakeCachePath keepend +syntax region CMakeCachePath start="="ms=s+1 end="$" contained + +" Highlight 'file' in key:FILEPATH=file +syntax region CMakeCacheFilePathVar matchgroup=CMakeCacheType start=":FILEPATH="ms=s+1,rs=e-1 end="$" contains=CMakeCacheFilePath keepend +syntax region CMakeCacheFilePath start="="ms=s+1 end="$" contained + +" Highlight 'value' in key:STATIC=value +syntax region CMakeCacheStaticVar matchgroup=CMakeCacheType start=":STATIC="ms=s+1,rs=e-1 end="$" contains=CMakeCacheStatic keepend +syntax region CMakeCacheStatic start="="ms=s+1 end="$" contained + +" Highlight 'value' in key:Internal=value +syntax region CMakeCacheInternalVar matchgroup=CMakeCacheType start=":INTERNAL="ms=s+1,rs=e-1 end="$" contains=CMakeCacheInternal keepend +syntax region CMakeCacheInternal start="="ms=s+1 end="$" contained + +hi def link CMakeCacheComment Comment +hi def link CMakeCacheKey Identifier +hi def link CMakeCacheString String +hi def link CMakeCacheBool Constant +hi def link CMakeCachePath Directory +hi def link CMakeCacheFilePath Normal +hi def link CMakeCacheStatic Normal +hi def link CMakeCacheInternal Normal + +" Highlight 'type' in key:type=value +hi def link CMakeCacheType Type + +let b:current_syntax = 'cmakecache' + +let &cpoptions = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/cuda.vim b/runtime/syntax/cuda.vim index 13d70e3..8306d09 100644 --- a/runtime/syntax/cuda.vim +++ b/runtime/syntax/cuda.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: CUDA (NVIDIA Compute Unified Device Architecture) " Maintainer: Timothy B. Terriberry -" Last Change: 2018 Feb 06 +" Last Change: 2024 Apr 04 +" Contributor: jiangyinzuo " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -11,12 +12,13 @@ endif " Read the C++ syntax to start with runtime! syntax/cpp.vim -" CUDA extentions -syn keyword cudaStorageClass __device__ __global__ __host__ -syn keyword cudaStorageClass __constant__ __shared__ -syn keyword cudaStorageClass __inline__ __align__ __thread__ +" CUDA extentions. +" Reference: https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#c-language-extensions +syn keyword cudaStorageClass __device__ __global__ __host__ __managed__ +syn keyword cudaStorageClass __constant__ __grid_constant__ __shared__ +syn keyword cudaStorageClass __inline__ __noinline__ __forceinline__ __inline_hint__ +syn keyword cudaStorageClass __align__ __thread__ __restrict__ "syn keyword cudaStorageClass __import__ __export__ __location__ -syn keyword cudaStructure template syn keyword cudaType char1 char2 char3 char4 syn keyword cudaType uchar1 uchar2 uchar3 uchar4 syn keyword cudaType short1 short2 short3 short4 @@ -25,37 +27,23 @@ syn keyword cudaType int1 int2 int3 int4 syn keyword cudaType uint1 uint2 uint3 uint4 syn keyword cudaType long1 long2 long3 long4 syn keyword cudaType ulong1 ulong2 ulong3 ulong4 +syn keyword cudaType longlong1 longlong2 longlong3 longlong4 +syn keyword cudaType ulonglong1 ulonglong2 ulonglong3 ulonglong4 syn keyword cudaType float1 float2 float3 float4 -syn keyword cudaType ufloat1 ufloat2 ufloat3 ufloat4 +syn keyword cudaType double1 double2 double3 double4 syn keyword cudaType dim3 texture textureReference syn keyword cudaType cudaError_t cudaDeviceProp cudaMemcpyKind syn keyword cudaType cudaArray cudaChannelFormatKind syn keyword cudaType cudaChannelFormatDesc cudaTextureAddressMode syn keyword cudaType cudaTextureFilterMode cudaTextureReadMode -syn keyword cudaVariable gridDim blockIdx blockDim threadIdx +syn keyword cudaVariable gridDim blockIdx blockDim threadIdx warpSize +syn keyword cudaConstant __CUDA_ARCH__ syn keyword cudaConstant __DEVICE_EMULATION__ +" There are too many CUDA enumeration constants. We only define a subset of commonly used constants. +" Reference: https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html syn keyword cudaConstant cudaSuccess -" Many more errors are defined, but only these are listed in the maunal -syn keyword cudaConstant cudaErrorMemoryAllocation -syn keyword cudaConstant cudaErrorInvalidDevicePointer -syn keyword cudaConstant cudaErrorInvalidSymbol -syn keyword cudaConstant cudaErrorMixedDeviceExecution -syn keyword cudaConstant cudaMemcpyHostToHost -syn keyword cudaConstant cudaMemcpyHostToDevice -syn keyword cudaConstant cudaMemcpyDeviceToHost -syn keyword cudaConstant cudaMemcpyDeviceToDevice -syn keyword cudaConstant cudaReadModeElementType -syn keyword cudaConstant cudaReadModeNormalizedFloat -syn keyword cudaConstant cudaFilterModePoint -syn keyword cudaConstant cudaFilterModeLinear -syn keyword cudaConstant cudaAddressModeClamp -syn keyword cudaConstant cudaAddressModeWrap -syn keyword cudaConstant cudaChannelFormatKindSigned -syn keyword cudaConstant cudaChannelFormatKindUnsigned -syn keyword cudaConstant cudaChannelFormatKindFloat hi def link cudaStorageClass StorageClass -hi def link cudaStructure Structure hi def link cudaType Type hi def link cudaVariable Identifier hi def link cudaConstant Constant diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim index b173a7b..ea82d85 100644 --- a/runtime/syntax/debcontrol.vim +++ b/runtime/syntax/debcontrol.vim @@ -3,7 +3,7 @@ " Maintainer: Debian Vim Maintainers " Former Maintainers: Gerfried Fuchs " Wichert Akkerman -" Last Change: 2023 Dec 22 +" Last Change: 2024 Mar 26 " URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debcontrol.vim " Standard syntax initialization @@ -93,7 +93,7 @@ syn case ignore " Catch-all for the legal fields syn region debcontrolField matchgroup=debcontrolKey start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\|\%(XS-\)\=Testsuite\%(-Triggers\)\=\|Build-Profiles\|Tag\|Subarchitecture\|Kernel-Version\|Installer-Menu-Item\): " end="$" contains=debcontrolVariable,debcontrolEmail oneline -syn region debcontrolMultiField matchgroup=debcontrolKey start="^\%(Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\|Uploaders\|X[SBC]\{0,3\}\%(Private-\)\=-[-a-zA-Z0-9]\+\): *" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolEmail,debcontrolVariable,debcontrolComment +syn region debcontrolMultiField matchgroup=debcontrolKey start="^\%(Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\|Static-Built-Using\|Uploaders\|X[SBC]\{0,3\}\%(Private-\)\=-[-a-zA-Z0-9]\+\): *" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolEmail,debcontrolVariable,debcontrolComment syn region debcontrolMultiFieldSpell matchgroup=debcontrolKey start="^Description: *" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell " Fields for which we do strict syntax checking diff --git a/runtime/syntax/generator/gen_syntax_vim.vim b/runtime/syntax/generator/gen_syntax_vim.vim index b4feeed..d320bdb 100644 --- a/runtime/syntax/generator/gen_syntax_vim.vim +++ b/runtime/syntax/generator/gen_syntax_vim.vim @@ -2,8 +2,8 @@ " 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 +" Last Change: 2024 Apr 07 +" Version: 2.1.1 let s:keepcpo= &cpo set cpo&vim @@ -269,7 +269,9 @@ function! s:get_vim_command_type(cmd_name) " 4: map " 5: mapclear " 6: unmap + " 7: abclear " 99: (Exclude registration of "syn keyword") + let ab_prefix = '^[ci]\?' let menu_prefix = '^\%([acinostvx]\?\|tl\)' let map_prefix = '^[acilnostvx]\?' let exclude_list = [ @@ -284,6 +286,7 @@ function! s:get_vim_command_type(cmd_name) \ 'append', 'insert', \ 'Next', 'Print', 'X', \ 'new', 'popup', + \ 'vim9script', \ ] " Required for original behavior " \ 'global', 'vglobal' @@ -292,6 +295,8 @@ function! s:get_vim_command_type(cmd_name) let ret = 99 elseif a:cmd_name =~# '^\%(\%(un\)\?abbreviate\|noreabbrev\|\l\%(nore\|un\)\?abbrev\)$' let ret = 2 + elseif a:cmd_name =~# ab_prefix . 'abclear$' + let ret = 7 elseif a:cmd_name =~# menu_prefix . '\%(nore\|un\)\?menu$' let ret = 3 elseif a:cmd_name =~# map_prefix . '\%(nore\)\?map$' @@ -342,14 +347,14 @@ function! s:parse_vim_event(li) new exec 'read ' . file_name norm! gg - exec '/^}\s*event_names\[\]\s*=\s*$/+1;/^};/-1yank' + exec '/^static keyvalue_T event_tab\[] = {$/+1;/^};$/-1yank' %delete _ put - g!/^\s*{\s*"\w\+"\s*,.*$/d + g!/^\s*KEYVALUE_ENTRY(/d for line in getline(1, line('$')) - let list = matchlist(line, '^\s*{\s*"\(\w\+\)"\s*,') + let list = matchlist(line, '^\s*KEYVALUE_ENTRY(EVENT_\w\+,\s*"\(\w\+\)"') let item.name = list[1] call add(a:li, copy(item)) endfor @@ -618,6 +623,8 @@ function! s:update_syntax_vim_file(vim_info) 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) + let lnum = s:search_and_check(kword . ' abclear', base_fname, str_info) + let lnum = s:append_syn_vimcmd(lnum, str_info, li, 7) " 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) diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index 8f0f05e..90e1ee5 100644 --- a/runtime/syntax/generator/vim.vim.base +++ b/runtime/syntax/generator/vim.vim.base @@ -1,12 +1,10 @@ " Vim syntax file -" Language: Vim script -" Maintainer: Hirohito Higashi -" Doug Kearns -" URL: https://github.com/vim-jp/syntax-vim-ex -" Last Change: 2024 Mar 22 +" Language: Vim script +" Maintainer: Hirohito Higashi +" Doug Kearns +" URL: https://github.com/vim-jp/syntax-vim-ex +" Last Change: 2024 Apr 13 " 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. @@ -21,6 +19,8 @@ endif let s:keepcpo= &cpo set cpo&vim +let s:vim9script = "\n" .. getline(1, 32)->join("\n") =~# '\n\s*vim9\%[script]\>' + " vimTodo: contains common special-notices for comments {{{2 " Use the vimCommentGroup cluster to add your own. syn keyword vimTodo contained COMBAK FIXME TODO XXX @@ -79,7 +79,7 @@ syn case match " 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 exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[afhHlmpPrt]' if g:vimsyn_folding =~# 'a' com! -nargs=* VimFolda fold else @@ -95,6 +95,11 @@ if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[afhlmpPrt]' else com! -nargs=* VimFoldh endif + if g:vimsyn_folding =~# 'H' + com! -nargs=* VimFoldH fold + else + com! -nargs=* VimFoldH + endif if g:vimsyn_folding =~# 'l' com! -nargs=* VimFoldl fold else @@ -129,6 +134,7 @@ else com! -nargs=* VimFolda com! -nargs=* VimFoldf com! -nargs=* VimFoldh + com! -nargs=* VimFoldH com! -nargs=* VimFoldl com! -nargs=* VimFoldm com! -nargs=* VimFoldp @@ -158,12 +164,13 @@ 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 match vimNumber '\<\d\+\%(\.\d\+\%(e[+-]\=\d\+\)\=\)\=' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment +syn match vimNumber '\<0b[01]\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment +syn match vimNumber '\<0o\=\o\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment +syn match vimNumber '\<0x\x\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment +syn match vimNumber '\<0z\>' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment +syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment +syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment syn case match " All vimCommands are contained by vimIsCommand. {{{2 @@ -184,9 +191,9 @@ syn cluster vimExprList contains=vimEnvvar,vimFunc,vimFuncVar,vimNumber,vimOper, " (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="^\.$"" + syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$" extend + syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$" extend + syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$" extend endif " Behave! {{{2 @@ -209,7 +216,7 @@ 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 cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,@vimComment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimNotation,vimCtrlChar,vimFuncVar,vimContinue syn match vimAugroup "\" contains=vimAugroupKey,vimAugroupBang skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a' syn region vimAugroup fold start="\\ze\s\+\%([eE][nN][dD]\)\@!\S\+" matchgroup=vimAugroupKey end="\\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList,vimAugroupkey skipwhite nextgroup=vimAugroupEnd @@ -237,12 +244,14 @@ 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 +" 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 cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst,vimFuncFold +syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimFuncVar,vimInsert +syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment syn region vimFuncPattern contained matchgroup=vimOper start="/" end="$" contains=@vimSubstList syn match vimFunction "\" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimFuncKey @@ -250,7 +259,7 @@ syn match vimDef "\" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPatt syn match vimFunction "\!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimFuncList skipwhite nextgroup=vimFuncParams syn match vimDef "\!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimDefList nextgroup=vimDefParams +syn match vimDef "\!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimDefList,vimMethodName nextgroup=vimDefParams syn match vimFuncComment contained +".*+ skipwhite skipnl nextgroup=vimFuncBody,vimEndfunction syn match vimDefComment contained "#.*" skipwhite skipnl nextgroup=vimDefBody,vimEnddef @@ -260,6 +269,7 @@ syn match vimFuncSID contained "\c" syn match vimFuncSID contained "\<[sg]:" syn keyword vimFuncKey contained fu[nction] syn keyword vimDefKey contained def +syn keyword vimMethodName contained empty len string 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 @@ -276,9 +286,9 @@ syn match vimEndfunction "\" syn match vimEnddef "\" if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' - syn region vimFuncFold start="\!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+\s*(" end="\" contains=vimFunction fold keepend transparent - syn region vimFuncFold start="\!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+(" end="\" contains=vimDef fold keepend transparent - syn region vimFuncFold start="\" @@ -299,15 +309,21 @@ syn match vimUserType contained "\<\u\w*\>" syn cluster vimType contains=vimType,vimCompoundType,vimUserType -" Keymaps: (Vim Project Addition) {{{2 +" Keymaps: {{{2 " ======= -" TODO: handle Vim9 script comments when something like #13104 is merged -syn match vimKeymapStart "^" contained skipwhite nextgroup=vimKeymapLhs,vimKeymapLineComment +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 + +" TODO: remove when :" comment is matched in parts as "ex-colon comment" --djk +if s:vim9script + syn match vim9KeymapLineComment "#.*" contained contains=@vimCommentGroup,vimCommentString,vim9CommentTitle +else + syn match vimKeymapLineComment +".*+ contained contains=@vimCommentGroup,vimCommentString,vimCommentTitle +endif +syn cluster vimKeymapLineComment contains=vim9\=KeymapLineComment syn region vimKeymap matchgroup=vimCommand start="\" end="\%$" contains=vimKeymapStart @@ -323,9 +339,10 @@ 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 cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,@vimComment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange syn keyword vimUserCommand contained com[mand] -syn match vimUserCmd "\.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter +syn match vimUserCmdName contained "\<\u\w*\>" nextgroup=vimUserCmdBlock skipwhite +syn match vimUserCmd "\.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter,vimCmdBlock,vimUserCmdName 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 @@ -347,20 +364,41 @@ syn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w* syn case match syn match vimUserAttrbCmplt contained "custom,\u\w*" +syn region vimUserCmdBlock contained matchgroup=vimSep start="{" end="}" contains=@vimDefBodyList + " Lower Priority Comments: after some vim commands... {{{2 " ======================= -syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString -syn match vimComment +\'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 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,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 "[,:]" @@ -466,7 +504,7 @@ 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*$' +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*$' extend syn keyword vimLet var skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc " For: {{{2 @@ -476,14 +514,16 @@ 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' +" GEN_SYN_VIM: vimCommand abclear, START_STR='syn keyword vimAbb', END_STR='skipwhite nextgroup=vimMapMod' " 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 match vimAutoCmdSfxList contained "\S*" skipwhite nextgroup=vimAutoCmdMod,vimAutoCmdBlock syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList -syn match vimAutoCmdMod "\(++\)\=\(once\|nested\)" +syn match vimAutoCmdMod "\(++\)\=\(once\|nested\)" skipwhite nextgroup=vimAutoCmdBlock +syn region vimAutoCmdBlock contained matchgroup=vimSep start="{" end="}" contains=@vimDefBodyList " Echo And Execute: -- prefer strings! {{{2 " ================ @@ -579,7 +619,7 @@ syn case match " (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.]*\>\|\" contains=vimNotation +syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\" contains=vimNotation,vimMethodName syn keyword vimFuncEcho contained ec ech echo " User Command Highlighting: {{{2 @@ -589,7 +629,9 @@ syn match vimUsrCmd '^\s*\zs\u\%(\w*\)\@>\%([(#[]\|\s\+\%([-+*/%]\=\|\.\.\)=\)\@ " ==================== 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 + " TODO: The |builtin-object-methods| exception should only apply to method + " definitions. + syn match vimFunctionError "\s\zs\%(empty\|len\|new\|string\)\@![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 "\" syn match vimBufnrWarn /\" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment,vim9Comment +syn match vimSyntax "\" contains=vimCommand skipwhite nextgroup=vimSynType,@vimComment syn cluster vimFuncBodyList add=vimSyntax " Syntax: case {{{2 @@ -710,7 +752,7 @@ syn match vimIsCommand "\s*\a\+" transparent contains=vimCommand,vimNotatio " Highlighting: {{{2 " ============ -syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment,vim9Comment +syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,@vimComment if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror") syn match vimHiCtermError contained "\D\i*" endif @@ -766,16 +808,21 @@ 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 +if s:vim9script + syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle contained + syn match vim9LineComment +^[ \t:]*#.*$+ contains=@vimCommentGroup,vimCommentString,vim9CommentTitle +else + syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle + syn match vim9LineComment +^[ \t:]*#.*$+ contains=@vimCommentGroup,vimCommentString,vim9CommentTitle contained +endif 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 vim9CommentTitle '#\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vim9CommentTitleLeader,vimTodo,@vimCommentGroup 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 +syn match vim9CommentTitleLeader '#\s\+'ms=s+1 contained " Searches And Globals: {{{2 " ==================== @@ -784,6 +831,17 @@ syn match vimSearchDelim '^\s*\zs[/?]\|[/?]$' contained syn region vimGlobal matchgroup=Statement start='\ -" Latest Revision: 2024-03-17 +" Latest Revision: 2024-04-13 " 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 @@ -191,7 +191,7 @@ else syn region goRawString start=+`+ end=+`+ endif -syn match goImportString /^\%(\s\+\|import \)\(\h\w* \)\?\zs"[^"]\+"$/ contained containedin=goImport +syn match goImportString /^\%(\s\+\|import \)\(\h\w* \)\?\zs"[^"]\+"/ contained containedin=goImport if s:HighlightFormatStrings() " [n] notation is valid for specifying explicit argument indexes diff --git a/runtime/syntax/haskell.vim b/runtime/syntax/haskell.vim index b48b278..509aa25 100644 --- a/runtime/syntax/haskell.vim +++ b/runtime/syntax/haskell.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Haskell " Maintainer: Haskell Cafe mailinglist -" Last Change: 2020 Oct 4 by Marcin Szamotulski +" Last Change: 2024 Mar 28 by Enrico Maria De Angelis " Original Author: John Williams " " Thanks to Ryan Crumley for suggestions and John Meacham for @@ -104,8 +104,8 @@ endif " Comments -syn match hsLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" contains=@Spell -syn region hsBlockComment start="{-" end="-}" contains=hsBlockComment,@Spell +syn match hsLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" contains=hsTodo,@Spell +syn region hsBlockComment start="{-" end="-}" contains=hsBlockComment,hsTodo,@Spell syn region hsPragma start="{-#" end="#-}" syn keyword hsTodo contained FIXME TODO XXX NOTE @@ -164,6 +164,7 @@ hi def link hsLiterateComment hsComment hi def link hsBlockComment hsComment hi def link hsLineComment hsComment hi def link hsComment Comment +hi def link hsTodo Todo hi def link hsPragma SpecialComment hi def link hsBoolean Boolean hi def link hsType Type diff --git a/runtime/syntax/i3config.vim b/runtime/syntax/i3config.vim index 8131639..7441f90 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.2 -" Last Change: 2023-12-28 +" Version: 1.2.1 +" Last Change: 2024-04-14 " References: " http://i3wm.org/docs/userguide.html#configuring @@ -27,225 +27,246 @@ syn keyword i3ConfigTodo TODO FIXME XXX contained syn match i3ConfigSeparator /[,;\\]/ contained syn match i3ConfigParen /[{}]/ contained syn keyword i3ConfigBoolean yes no enabled disabled on off true false contained -syn region i3ConfigString start=/\W\@<="/ skip=/\\\("\|$\)/ end=/"\|$/ contained contains=i3ConfigShCommand,i3ConfigShDelim,i3ConfigShOper,i3ConfigShParam,i3ConfigNumber,i3ConfigVariable,i3ConfigExecAction keepend extend -syn region i3ConfigString start=/\W\@<='/ skip=/\\$/ end=/'\|$/ contained contains=i3ConfigShCommand,i3ConfigShDelim,i3ConfigShOper,i3ConfigShParam,i3ConfigNumber,i3ConfigVariable,i3ConfigExecAction keepend extend +" String in simpler (matchable end) and more robust (includes `extend` keyword) forms +syn cluster i3ConfigStrIn contains=i3ConfigShCommand,i3ConfigShDelim,i3ConfigShOper,i3ConfigShParam,@i3ConfigNumVar,i3ConfigExecAction +syn match i3ConfigString /\(["']\)[^\\"')\]}]*\1/ contained contains=@i3ConfigStrIn +syn region i3ConfigString start=/"[^\\"')\]}]*[\\')\]}]/ skip=/\\\@<=\("\|$\)/ end=/"\|$/ contained contains=@i3ConfigStrIn keepend extend +syn region i3ConfigString start=/'[^\\"')\]}]*[\\")\]}]/ skip=/\\\@<=$/ end=/'\|$/ contained contains=@i3ConfigStrIn keepend extend syn match i3ConfigColor /#[0-9A-Fa-f]\{3,8}/ contained syn match i3ConfigNumber /[0-9A-Za-z_$-]\@&|+=~^*!.?]\+/ contained -syn match i3ConfigShParam /\<-[0-9A-Za-z_-]\+\>/ contained containedin=i3ConfigVar -syn region i3ConfigExec start=/^\s*exec\(_always\)\?\( --no-startup-id\)\? [^{]/ skip=/\\$/ end=/$/ contains=i3ConfigExecKeyword,i3ConfigExecAlwaysKeyword,i3ConfigShCommand,i3ConfigShDelim,i3ConfigShOper,i3ConfigShParam,i3ConfigNumber,i3ConfigString,i3ConfigVariable,i3ConfigExecAction keepend +syn match i3ConfigShParam /\<-[A-Za-z-][0-9A-Za-z_-]*\>/ contained +syn cluster i3ConfigSh contains=@i3ConfigIdent,i3ConfigShOper,i3ConfigShDelim,i3ConfigShParam,i3ConfigShCommand +syn region i3ConfigExec start=/ [^{]/ skip=/\\$/ end=/$/ contained contains=i3ConfigExecAction,@i3ConfigSh keepend +syn match i3ConfigKeyword /^\(exec_always\|exec\)/ contained nextgroup=i3ConfigExec " 4.21 Workspaces per output -syn keyword i3ConfigWorkspaceKeyword workspace contained -syn keyword i3ConfigWorkspaceOutput output contained -syn keyword i3ConfigWorkspaceDir prev next back_and_forth number contained -syn region i3ConfigWorkspaceLine start=/^workspace / skip=/\\$/ end=/$/ contains=i3ConfigWorkspaceKeyword,i3ConfigNumber,i3ConfigString,i3ConfigGaps,i3ConfigWorkspaceOutput,i3ConfigVariable,i3ConfigBoolean,i3ConfigSeparator keepend +syn match i3ConfigOutputIdent /[^'",; ]\+/ contained contains=@i3ConfigIdent,i3ConfigColonOperator skipwhite nextgroup=i3ConfigOutputIdent +syn region i3ConfigOutputIdent start=/['"]/ end=/\ze/ contained contains=@i3ConfigIdent skipwhite nextgroup=i3ConfigOutputIdent +syn keyword i3ConfigOutput output contained skipwhite nextgroup=i3ConfigOutputIdent +syn match i3ConfigWorkspaceIdent /[^'",; ]\+/ contained contains=@i3ConfigIdent skipwhite nextgroup=i3ConfigGaps,i3ConfigOutput +syn region i3ConfigWorkspaceIdent start=/['"]/ end=/\ze/ contained contains=@i3ConfigIdent skipwhite nextgroup=i3ConfigGaps,i3ConfigOutput +syn keyword i3ConfigKeyword workspace contained skipwhite nextgroup=i3ConfigWorkspaceIdent " 4.22 Changing colors -syn match i3ConfigDotOperator /\./ contained -syn keyword i3ConfigClientOpts focused focused_inactive unfocused urgent placeholder background contained -syn match i3ConfigKeyword /^client\..*$/ contains=i3ConfigDotOperator,i3ConfigClientOpts,i3ConfigColor,i3ConfigVariable +syn keyword i3ConfigClientOpts focused focused_inactive focused_tab_title unfocused urgent placeholder background contained skipwhite nextgroup=i3ConfigColorSeq +syn match i3ConfigDotOperator /\./ contained nextgroup=i3ConfigClientOpts +syn keyword i3ConfigKeyword client contained nextgroup=i3ConfigDotOperator " 4.23 Interprocess communication -syn match i3ConfigIpcKeyword /ipc-socket/ contained -syn match i3ConfigParamLine /^ipc-socket .*$/ contains=i3ConfigIpcKeyword +syn region i3ConfigParamLine matchgroup=i3ConfigKeyword start=/ipc-socket / end=/$/ contained contains=i3ConfigNumber,i3ConfigShOper " 4.24 Focus follows mouse -syn match i3ConfigKeyword /^focus_follows_mouse \(yes\|no\)$/ contains=i3ConfigBoolean +syn keyword i3ConfigFocusFollowsMouseOpts always contained +syn keyword i3ConfigKeyword focus_follows_mouse contained skipwhite nextgroup=i3ConfigBoolean,i3ConfigFocusFollowsMouseOpts " 4.25 Mouse warping syn keyword i3ConfigMouseWarpingOpts output container none contained -syn match i3ConfigKeyword /^mouse_warping \w*$/ contains=i3ConfigMouseWarpingOpts +syn keyword i3ConfigKeyword mouse_warping contained skipwhite nextgroup=i3ConfigMouseWarpingOpts " 4.26 Popups while fullscreen syn keyword i3ConfigPopupFullscreenOpts smart ignore leave_fullscreen contained -syn match i3ConfigKeyword /^popup_during_fullscreen \w*$/ contains=i3ConfigPopupFullscreenOpts +syn keyword i3ConfigKeyword popup_during_fullscreen contained skipwhite nextgroup=i3ConfigPopupFullscreenOpts " 4.27 Focus wrapping syn keyword i3ConfigFocusWrappingOpts force workspace contained -syn match i3ConfigKeyword /^focus_wrapping \(yes\|no\|force\|workspace\)$/ contains=i3ConfigBoolean,i3ConfigFocusWrappingOpts +syn keyword i3ConfigKeyword focus_wrapping contained skipwhite nextgroup=i3ConfigBoolean,i3ConfigFocusWrappingOpts " 4.28 Forcing Xinerama -syn match i3ConfigKeyword /^force_xinerama \(yes\|no\)$/ contains=i3ConfigBoolean - " 4.29 Automatic workspace back-and-forth -syn match i3ConfigKeyword /^workspace_auto_back_and_forth \(yes\|no\)$/ contains=i3ConfigBoolean +" 4.32 Show marks in title +syn keyword i3ConfigKeyword force_xinerama workspace_auto_back_and_forth show_marks contained skipwhite nextgroup=i3ConfigBoolean " 4.30 Delay urgency hint -syn keyword i3ConfigTimeUnit ms contained -syn match i3ConfigKeyword /^force_display_urgency_hint \d\+\( ms\)\?$/ contains=i3ConfigNumber,i3ConfigTimeUnit +syn match i3ConfigTimeUnit / \d\+\( ms\)\?$/ contained contains=i3ConfigNumber +syn keyword i3ConfigKeyword force_display_urgency_hint contained nextgroup=i3ConfigTimeUnit " 4.31 Focus on window activation syn keyword i3ConfigFocusOnActivationOpts smart urgent focus none contained -syn match i3ConfigKeyword /^focus_on_window_activation \w*$/ contains=i3ConfigFocusOnActivationOpts - -" 4.32 Show marks in title -syn match i3ConfigShowMarks /^show_marks \(yes\|no\)$/ contains=i3ConfigBoolean +syn keyword i3ConfigKeyword focus_on_window_activation contained skipwhite nextgroup=i3ConfigFocusOnActivationOpts " 4.34 Tiling drag -syn keyword i3ConfigTilingDragOpts modifier titlebar contained -syn match i3ConfigKeyword /^tiling_drag\( off\|\( modifier\| titlebar\)\{1,2\}\)$/ contains=i3ConfigTilingDragOpts,i3ConfigBoolean +syn keyword i3ConfigTilingDragOpts modifier titlebar contained skipwhite nextgroup=i3ConfigTilingDragOpts +syn keyword i3ConfigKeyword tiling_drag contained skipwhite nextgroup=i3ConfigTilingDragOpts,i3ConfigBoolean + +" 4.35 Gaps (+6.24) +syn keyword i3ConfigGapsWhich inner outer horizontal vertical left right top bottom contained skipwhite nextgroup=i3ConfigGapsWhere,@i3ConfigNumVar +syn keyword i3ConfigGapsWhere current all contained skipwhite nextgroup=i3ConfigGapsOper +syn keyword i3ConfigGapsOper set plus minus toggle contained skipwhite nextgroup=@i3ConfigNumVar +syn match i3ConfigGaps /gaps/ contained contains=i3ConfigCommand skipwhite nextgroup=i3ConfigGapsWhich +syn keyword i3ConfigCommand gaps contained skipwhite nextgroup=i3ConfigGapsWhich -" 4.35 Gaps -syn keyword i3ConfigGapsOpts inner outer horizontal vertical left right top bottom current all set plus minus toggle contained -syn region i3ConfigGaps start=/gaps/ skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigGapsOpts,i3ConfigNumber,i3ConfigVariable,i3ConfigSeparator keepend -syn match i3ConfigGapsLine /^gaps .*$/ contains=i3ConfigGaps -syn keyword i3ConfigSmartGapOpts inverse_outer contained -syn match i3ConfigKeyword /^smart_gaps \(on\|off\|inverse_outer\)$/ contains=i3ConfigSmartGapOpts,i3ConfigBoolean +syn keyword i3ConfigSmartGapOpts inverse_outer toggle contained +syn keyword i3ConfigKeyword smart_gaps contained skipwhite nextgroup=i3ConfigSmartGapOpts,i3ConfigBoolean " 5 Configuring bar -syn match i3ConfigBarModifier /^\s\+modifier \S\+$/ contained contains=i3ConfigBindModifier,i3ConfigVariable,i3ConfigBindModkey,i3ConfigBarOptVals -syn keyword i3ConfigBarOpts bar i3bar_command status_command workspace_command mode hidden_state id position output tray_output tray_padding separator_symbol workspace_buttons workspace_min_width strip_workspace_numbers strip_workspace_name binding_mode_indicator padding contained +syn keyword i3ConfigBarOpts modifier contained skipwhite nextgroup=i3ConfigBindCombo,i3ConfigBarOptVals +syn keyword i3ConfigBarOpts i3bar_command status_command workspace_command contained skipwhite nextgroup=@i3ConfigSh +syn keyword i3ConfigBarOpts mode hidden_state id position output tray_output tray_padding separator_symbol workspace_buttons workspace_min_width strip_workspace_numbers strip_workspace_name binding_mode_indicator padding contained skipwhite nextgroup=i3ConfigBarOptVals,@i3ConfigValue,i3ConfigShOper syn keyword i3ConfigBarOptVals dock hide invisible show none top bottom primary nonprimary contained -syn region i3ConfigBarBlock start=/^bar {$/ end=/^}$/ contains=i3ConfigBarOpts,i3ConfigBarOptVals,i3ConfigBarModifier,i3ConfigBind,i3ConfigString,i3ConfigComment,i3ConfigFont,i3ConfigBoolean,i3ConfigNumber,i3ConfigParen,i3ConfigColor,i3ConfigVariable,i3ConfigColorsBlock,i3ConfigShOper,i3ConfigShCommand fold keepend extend +syn region i3ConfigBarBlock matchgroup=i3ConfigKeyword start=/^bar\ze {$/ end=/^}\zs$/ contained contains=i3ConfigBarOpts,i3ConfigComment,i3ConfigParen,i3ConfigBindKeyword,i3ConfigColorsBlock fold keepend extend " 5.16 Color block -syn keyword i3ConfigColorsKeyword colors contained -syn match i3ConfigColorsOpts /\(focused_\)\?\(background\|statusline\|separator\)\|\(focused\|active\|inactive\|urgent\)_workspace\|binding_mode/ contained -syn region i3ConfigColorsBlock start=/^\s\+colors {$/ end=/^\s\+}$/ contained contains=i3ConfigColorsKeyword,i3ConfigColorsOpts,i3ConfigColor,i3ConfigVariable,i3ConfigComment,i3ConfigParen fold keepend extend +syn match i3ConfigColorSeq /#[0-9A-Fa-f]\{3,8}\|\$[0-9A-Za-z_:|[\]-]\+/ contained contains=@i3ConfigColVar skipwhite nextgroup=i3ConfigColorSeq +syn keyword i3ConfigColorsOpts background statusline separator contained skipwhite nextgroup=@i3ConfigColVar +syn match i3ConfigColorsOpts /focused_\(background\|statusline\|separator\)\|\(focused\|active\|inactive\|urgent\)_workspace\|binding_mode/ contained skipwhite nextgroup=i3ConfigColorSeq +syn region i3ConfigColorsBlock matchgroup=i3ConfigKeyword start=/^\s\+colors \ze{$/ end=/^\s\+}\zs$/ contained contains=i3ConfigColorsOpts,i3ConfigComment,i3ConfigParen fold keepend extend " 6.0 Command criteria syn keyword i3ConfigConditionProp class instance window_role window_type machine id title urgent workspace con_mark con_id floating_from tiling_from contained syn keyword i3ConfigConditionSpecial __focused__ all floating tiling contained -syn region i3ConfigCondition start=/\[/ end=/\]/ contained contains=i3ConfigShDelim,i3ConfigConditionProp,i3ConfigShOper,i3ConfigConditionSpecial,i3ConfigNumber,i3ConfigString keepend extend -syn region i3ConfigCriteria start=/\[/ skip=/\\$/ end=/\(;\|$\)/ contained contains=i3ConfigCondition,i3ConfigAction,i3ConfigActionKeyword,i3ConfigOption,i3ConfigBoolean,i3ConfigNumber,i3ConfigVariable,i3ConfigSeparator keepend transparent +syn region i3ConfigCondition matchgroup=i3ConfigShDelim start=/\[/ end=/\]/ contained contains=i3ConfigConditionProp,i3ConfigShOper,i3ConfigConditionSpecial,@i3ConfigIdent keepend extend +syn region i3ConfigCriteria start=/\[/ skip=/\\$/ end=/\(;\|$\)/ contained contains=i3ConfigCondition,@i3ConfigCommand,i3ConfigSeparator keepend transparent " 6.1 Actions through shell syn match i3ConfigExecActionKeyword /i3-msg/ contained -syn region i3ConfigExecAction start=/[a-z3-]\+msg "/ skip=/ "\|\\$/ end=/"\|$/ contained contains=i3ConfigExecActionKeyword,i3ConfigShCommand,i3ConfigNumber,i3ConfigShOper,i3ConfigCriteria,i3ConfigAction,i3ConfigActionKeyword,i3ConfigOption,i3ConfigVariable keepend extend -syn region i3ConfigExecAction start=/[a-z3-]\+msg '/ skip=/ '\|\\$/ end=/'\|$/ contained contains=i3ConfigExecActionKeyword,i3ConfigShCommand,i3ConfigNumber,i3ConfigShOper,i3ConfigCriteria,i3ConfigAction,i3ConfigActionKeyword,i3ConfigOption,i3ConfigVariable keepend extend -syn region i3ConfigExecAction start=/[a-z3-]\+msg ['"-]\@!/ skip=/\\$/ end=/[&|;})'"]\@=\|$/ contained contains=i3ConfigExecActionKeyword,i3ConfigShCommand,i3ConfigNumber,i3ConfigShOper,i3ConfigCriteria,i3ConfigAction,i3ConfigActionKeyword,i3ConfigOption,i3ConfigVariable keepend extend +syn cluster i3ConfigExecActionVal contains=i3ConfigExecActionKeyword,i3ConfigCriteria,i3ConfigAction,i3ConfigActionKeyword,i3ConfigOption,@i3ConfigNumVar +syn region i3ConfigExecAction start=/[a-z3-]\+msg "/ skip=/ "\|\\$/ end=/"\|$/ contained contains=i3ConfigExecActionKeyword,@i3ConfigExecActionVal keepend extend +syn region i3ConfigExecAction start=/[a-z3-]\+msg '/ skip=/ '\|\\$/ end=/'\|$/ contained contains=i3ConfigExecActionKeyword,@i3ConfigExecActionVal keepend extend +syn region i3ConfigExecAction start=/[a-z3-]\+msg ['"-]\@!/ skip=/\\$/ end=/[&|;})'"]\@=\|$/ contained contains=i3ConfigExecActionKeyword,@i3ConfigExecActionVal keepend extend " 6.1 Executing applications (4.20) -syn region i3ConfigAction start=/exec/ skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigExecKeyword,i3ConfigExecAction,i3ConfigShCommand,i3ConfigShDelim,i3ConfigShOper,i3ConfigShParam,i3ConfigNumber,i3ConfigString,i3ConfigVariable,i3ConfigSeparator keepend +syn region i3ConfigAction matchgroup=i3ConfigCommand start=/exec / skip=/\\$/ end=/\ze[,;]\|$/ contained contains=i3ConfigExecAction,@i3ConfigSh keepend " 6.3 Manipulating layout -syn keyword i3ConfigLayoutKeyword layout contained syn keyword i3ConfigLayoutOpts default tabbed stacking splitv splith toggle split all contained -syn region i3ConfigAction start=/layout/ skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigLayoutKeyword,i3ConfigLayoutOpts,i3ConfigSeparator keepend transparent +syn region i3ConfigAction matchgroup=i3ConfigCommand start=/layout / skip=/\\$/ end=/\ze[,;]\|$/ contained contains=i3ConfigLayoutOpts keepend transparent " 6.4 Focusing containers -syn keyword i3ConfigFocusKeyword focus contained -syn keyword i3ConfigFocusOpts left right up down workspace parent child next prev sibling floating tiling mode_toggle contained -syn keyword i3ConfigFocusOutputOpts left right down up current primary nonprimary next prev contained -syn region i3ConfigFocusOutput start=/ output / skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigWorkspaceOutput,i3ConfigFocusOutputOpts,i3ConfigString,i3ConfigNumber,i3ConfigSeparator keepend -syn match i3ConfigFocusOutputLine /^focus output .*$/ contains=i3ConfigFocusKeyword,i3ConfigFocusOutput -syn region i3ConfigAction start=/focus/ skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigFocusKeyword,i3ConfigFocusOpts,i3ConfigFocusOutput,i3ConfigString,i3ConfigSeparator keepend transparent +syn keyword i3ConfigFocusOpts left right up down parent child next prev sibling floating tiling mode_toggle contained +syn keyword i3ConfigOutputDir left right down up current primary nonprimary next prev contained skipwhite +syn keyword i3ConfigFocusOutput output contained skipwhite nextgroup=i3ConfigOutputIdent,i3ConfigOutputDir +syn keyword i3ConfigActionKeyword focus contained skipwhite nextgroup=i3ConfigFocusOpts,i3ConfigFocusOutput +syn match i3ConfigKeyword /^focus / contained nextgroup=i3ConfigFocusOutput " 6.8 Focusing workspaces (4.21) -syn region i3ConfigAction start=/workspace / skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigWorkspaceKeyword,i3ConfigWorkspaceDir,i3ConfigNumber,i3ConfigString,i3ConfigGaps,i3ConfigWorkspaceOutput,i3ConfigVariable,i3ConfigBoolean,i3ConfigSeparator keepend transparent +syn keyword i3ConfigWorkspaceDir prev next back_and_forth contained +syn keyword i3ConfigWorkspaceDir number contained skipwhite nextgroup=i3ConfigWorkspaceIdent +syn keyword i3ConfigActionKeyword workspace contained skipwhite nextgroup=i3ConfigWorkspaceDir,i3ConfigWorkspaceIdent " 6.8.2 Renaming workspaces -syn keyword i3ConfigRenameKeyword rename contained -syn region i3ConfigAction start=/rename workspace/ end=/[,;]\|$/ contained contains=i3ConfigRenameKeyword,i3ConfigMoveDir,i3ConfigMoveType,i3ConfigNumber,i3ConfigVariable,i3ConfigString keepend transparent +syn region i3ConfigWorkspaceFromTo start=/workspace\( .*\)\? to/ end=/\ze[,;]\|$/ contained contains=i3ConfigMoveType,@i3ConfigWorkspaceIdent keepend transparent +syn keyword i3ConfigActionKeyword rename contained skipwhite nextgroup=i3ConfigWorkspaceFromTo " 6.5,6.9-6.11 Moving containers -syn keyword i3ConfigMoveKeyword move contained -syn keyword i3ConfigMoveDir left right down up position absolute center to current contained -syn keyword i3ConfigMoveType window container workspace output mark mouse scratchpad contained -syn match i3ConfigUnit / px\| ppt/ contained -syn region i3ConfigAction start=/move/ skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigMoveKeyword,i3ConfigMoveDir,i3ConfigMoveType,i3ConfigWorkspaceDir,i3ConfigUnit,i3ConfigNumber,i3ConfigVariable,i3ConfigString,i3ConfigSeparator,i3ConfigShParam keepend transparent +syn match i3ConfigUnit /-\?\d\+\( px\| ppt\)\?/ contained contains=i3ConfigNumber skipwhite nextgroup=i3ConfigUnit,i3ConfigResizeExtra +syn keyword i3ConfigMoveDir left right down up position contained skipwhite nextgroup=i3ConfigUnit +syn match i3ConfigMoveDir /position \(mouse\|center\)/ contained +syn keyword i3ConfigMoveDir absolute contained skipwhite nextgroup=i3ConfigMoveDir +syn keyword i3ConfigMoveDir absolute contained + +syn keyword i3ConfigMoveType mark contained skipwhite nextgroup=i3ConfigOutputIdent +syn keyword i3ConfigMoveType scratchpad contained +syn keyword i3ConfigMoveType output contained skipwhite nextgroup=i3ConfigOutputIdent,i3ConfigOutputDir +syn keyword i3ConfigMoveType workspace contained skipwhite nextgroup=i3ConfigMoveType,i3ConfigWorkspaceIdent,i3ConfigWorkspaceDir +syn keyword i3ConfigMoveType window container contained skipwhite nextgroup=i3ConfigMoveType +syn keyword i3ConfigMoveTo to contained +syn match i3ConfigMoveType /to/ contained contains=i3ConfigMoveTo skipwhite nextgroup=i3ConfigMoveType +syn match i3ConfigActionKeyword /move\( --no-auto-back-and-forth\)\?/ contained contains=i3ConfigShParam skipwhite nextgroup=i3ConfigMoveType,i3ConfigMoveDir " 6.12 Resizing containers/windows -syn keyword i3ConfigResizeKeyword resize contained -syn keyword i3ConfigResizeOpts grow shrink up down left right set width height or contained -syn region i3ConfigAction start=/resize/ skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigResizeKeyword,i3ConfigResizeOpts,i3ConfigNumber,i3ConfigUnit,i3ConfigSeparator keepend transparent +syn keyword i3ConfigResizeExtra or height contained skipwhite nextgroup=i3ConfigUnit +syn keyword i3ConfigResizeDir up down left right width height contained skipwhite nextgroup=i3ConfigUnit +syn keyword i3ConfigResizeType grow shrink contained skipwhite nextgroup=i3ConfigResizeDir +syn keyword i3ConfigResizeType set contained skipwhite nextgroup=i3ConfigResizeDir,i3ConfigUnit +syn keyword i3ConfigActionKeyword resize contained skipwhite nextgroup=i3ConfigResizeType " 6.14 VIM-like marks -syn match i3ConfigMark /mark\( --\(add\|replace\)\( --toggle\)\?\)\?/ contained contains=i3ConfigShParam -syn region i3ConfigAction start=/\ -" URL: https://github.com/fleiner/vim/blob/master/runtime/syntax/java.vim -" Last Change: 2024 Mar 22 +" Language: Java +" Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com> +" Former Maintainer: Claudio Fleiner +" Repository: https://github.com/zzzyxwvut/java-vim.git +" Last Change: 2024 Apr 22 " Please check :help java.vim for comments on some of the options available. @@ -19,6 +20,9 @@ endif let s:cpo_save = &cpo set cpo&vim +" Admit the ASCII dollar sign to keyword characters (JLS-17, §3.8): +execute printf('syntax iskeyword %s,$', &l:iskeyword) + " some characters that cannot be in a java program (outside a string) syn match javaError "[\\@`]" syn match javaError "<<<\|\.\.\|=>\|||=\|&&=\|\*\/" @@ -27,16 +31,17 @@ syn match javaError "<<<\|\.\.\|=>\|||=\|&&=\|\*\/" syn match javaError2 "#\|=<" hi def link javaError2 javaError -" keyword definitions +" Keywords (JLS-17, §3.9): syn keyword javaExternal native package -syn match javaExternal "\\(\s\+static\>\)\?" +syn match javaExternal "\\%(\s\+static\>\)\=" syn keyword javaError goto const syn keyword javaConditional if else switch syn keyword javaRepeat while for do syn keyword javaBoolean true false syn keyword javaConstant null syn keyword javaTypedef this super -syn keyword javaOperator var new instanceof +syn keyword javaOperator new instanceof +syn match javaOperator "\\%(\s*(\)\@!" " 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 @@ -48,34 +53,44 @@ syn match javaOperator "\%(\%(::\|\.\)[[:space:]\n]*\)\@80" syn keyword javaType boolean char byte short int long float double syn keyword javaType void syn keyword javaStatement return -syn keyword javaStorageClass static synchronized transient volatile final strictfp serializable +syn keyword javaStorageClass static synchronized transient volatile strictfp serializable syn keyword javaExceptions throw try catch finally syn keyword javaAssert assert -syn keyword javaMethodDecl synchronized throws -syn keyword javaClassDecl extends implements interface -" to differentiate the keyword class from MyClass.class we use a match here +syn keyword javaMethodDecl throws +" Differentiate a "MyClass.class" literal from the keyword "class". syn match javaTypedef "\.\s*\"ms=s+1 -syn keyword javaClassDecl enum +syn keyword javaClassDecl enum extends implements interface +syn match javaClassDecl "\\%(\s*(\)\@!" +syn match javaClassDecl "\\%(\s*(\)\@!" syn match javaClassDecl "^class\>" syn match javaClassDecl "[^.]\s*\"ms=s+1 -syn match javaAnnotation "@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>" contains=javaString +syn match javaAnnotation "@\%(\K\k*\.\)*\K\k*\>" syn match javaClassDecl "@interface\>" syn keyword javaBranch break continue nextgroup=javaUserLabelRef skipwhite syn match javaUserLabelRef "\k\+" contained syn match javaVarArg "\.\.\." -syn keyword javaScopeDecl public protected private abstract +syn keyword javaScopeDecl public protected private +syn keyword javaConceptKind abstract final +syn match javaConceptKind "\" +syn match javaConceptKind "\\%(\s*(\)\@!" syn match javaConceptKind "\\%(\s*\%(:\|->\)\)\@!" -function s:isModuleInfoDeclarationCurrentBuffer() abort - return fnamemodify(bufname("%"), ":t") =~ '^module-info\%(\.class\>\)\@!' -endfunction - -" Java Modules(Since Java 9, for "module-info.java" file) -if s:isModuleInfoDeclarationCurrentBuffer() - syn keyword javaModuleStorageClass module transitive - syn keyword javaModuleStmt open requires exports opens uses provides - syn keyword javaModuleExternal to with - syn cluster javaTop add=javaModuleStorageClass,javaModuleStmt,javaModuleExternal +" Note that a "module-info" file will be recognised with an arbitrary +" file extension (or no extension at all) so that more than one such +" declaration for the same Java module can be maintained for modular +" testing in a project without attendant confusion for IDEs, with the +" ".java\=" extension used for a production version and an arbitrary +" extension used for a testing version. +let s:module_info_cur_buf = fnamemodify(bufname("%"), ":t") =~ '^module-info\%(\.class\>\)\@!' +let s:selectable_regexp_engine = !(v:version < 704) +lockvar s:selectable_regexp_engine s:module_info_cur_buf + +" Java modules (since Java 9, for "module-info.java" file). +if s:module_info_cur_buf + syn keyword javaModuleStorageClass module transitive + syn keyword javaModuleStmt open requires exports opens uses provides + syn keyword javaModuleExternal to with + syn cluster javaTop add=javaModuleStorageClass,javaModuleStmt,javaModuleExternal endif if exists("java_highlight_java_lang_ids") @@ -91,7 +106,7 @@ if exists("java_highlight_all") || exists("java_highlight_java") || exists("ja " keywords can be pre-sorted and appended without disturbing " the current keyword placement. The below _match_es follow suit. - syn keyword javaR_JavaLang ArithmeticException ArrayIndexOutOfBoundsException ArrayStoreException ClassCastException IllegalArgumentException IllegalMonitorStateException IllegalThreadStateException IndexOutOfBoundsException NegativeArraySizeException NullPointerException NumberFormatException RuntimeException SecurityException StringIndexOutOfBoundsException IllegalStateException UnsupportedOperationException EnumConstantNotPresentException TypeNotPresentException IllegalCallerException LayerInstantiationException + syn keyword javaR_JavaLang ArithmeticException ArrayIndexOutOfBoundsException ArrayStoreException ClassCastException IllegalArgumentException IllegalMonitorStateException IllegalThreadStateException IndexOutOfBoundsException NegativeArraySizeException NullPointerException NumberFormatException RuntimeException SecurityException StringIndexOutOfBoundsException IllegalStateException UnsupportedOperationException EnumConstantNotPresentException TypeNotPresentException IllegalCallerException LayerInstantiationException WrongThreadException MatchException syn cluster javaTop add=javaR_JavaLang syn cluster javaClasses add=javaR_JavaLang hi def link javaR_JavaLang javaR_Java @@ -111,6 +126,8 @@ if exists("java_highlight_all") || exists("java_highlight_java") || exists("ja syn match javaC_JavaLang "\%(\" syn keyword javaC_JavaLang Boolean Character Class ClassLoader Compiler Double Float Integer Long Math Number Object Process Runtime SecurityManager String StringBuffer Thread ThreadGroup Byte Short Void InheritableThreadLocal Package RuntimePermission ThreadLocal StrictMath StackTraceElement Enum ProcessBuilder StringBuilder ClassValue Module ModuleLayer StackWalker Record syn match javaC_JavaLang "\" " See javaDebug. + " As of JDK 21, java.lang.Compiler is no more (deprecated in JDK 9). + syn keyword javaLangDeprecated Compiler syn cluster javaTop add=javaC_JavaLang syn cluster javaClasses add=javaC_JavaLang hi def link javaC_JavaLang javaC_Java @@ -191,17 +208,20 @@ if exists("java_comment_strings") syn cluster javaCommentSpecial2 add=javaComment2String,javaCommentCharacter,javaNumber,javaStrTempl endif -syn region javaComment start="/\*" end="\*/" contains=@javaCommentSpecial,javaTodo,javaSpaceError,@Spell +syn region javaComment matchgroup=javaCommentStart start="/\*" end="\*/" contains=@javaCommentSpecial,javaTodo,javaCommentError,javaSpaceError,@Spell syn match javaCommentStar contained "^\s*\*[^/]"me=e-1 syn match javaCommentStar contained "^\s*\*$" 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 "\" 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 +syn match javaCommentMarkupTag contained "@\%(end\|highlight\|link\|replace\|start\)\>" nextgroup=javaCommentMarkupTagAttr,javaSpaceError skipwhite +syn match javaCommentMarkupTagAttr contained "\" nextgroup=javaCommentMarkupTagAttr,javaSpaceError 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,javaSpaceError skipwhite oneline hi def link javaCommentMarkupTagAttr htmlArg hi def link javaCommentString javaString hi def link javaComment2String javaString hi def link javaCommentCharacter javaCharacter +syn match javaCommentError contained "/\*"me=e-1 display +hi def link javaCommentError javaError +hi def link javaCommentStart javaComment syn cluster javaTop add=javaComment,javaLineComment @@ -215,17 +235,18 @@ if !exists("java_ignore_javadoc") && main_syntax != 'jsp' " here. syntax spell default - 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 javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaDocSeeTag,javaDocCodeTag,javaDocSnippetTag,javaTodo,javaCommentError,javaSpaceError,@Spell + syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*" matchgroup=javaCommentTitle end="\.$" end="\.[ \t\r]\@=" end="\%(^\s*\**\s*\)\@<=@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,javaCommentError,javaSpaceError,@Spell,javaDocTags,javaDocSeeTag,javaDocCodeTag,javaDocSnippetTag + syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*\s*\r\=\n\=\s*\**\s*\%({@return\>\)\@=" matchgroup=javaCommentTitle end="}\%(\s*\.*\)*" contains=@javaHtml,javaCommentStar,javaTodo,javaCommentError,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 @"\_[^"]\+"\|\|\(\k\|\.\)*\(#\k\+\((\_[^)]\+)\)\=\)\=@ extend + 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\%(Field\|Data\)\=\)\>" + syn region javaDocSeeTag contained matchgroup=javaDocTags start="@see\s\+" matchgroup=NONE end="\_."re=e-1 contains=javaDocSeeTagParam + syn match javaDocSeeTagParam contained @"\_[^"]\+"\|\|\%(\k\|\.\)*\%(#\k\+\%((\_[^)]*)\)\=\)\=@ contains=@javaHtml 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 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 @@ -267,20 +288,31 @@ syn match javaSpecial "\\u\x\x\x\x" syn cluster javaTop add=javaString,javaStrTempl,javaCharacter,javaNumber,javaSpecial,javaStringError,javaTextBlockError +" Method declarations (JLS-17, §8.4.3, §8.4.4, §9.4). if exists("java_highlight_functions") + syn cluster javaFuncParams contains=javaAnnotation,@javaClasses,javaType,javaVarArg,javaComment,javaLineComment + if java_highlight_functions == "indent" - syn match javaFuncDef "^\(\t\| \{8\}\)[_$a-zA-Z][_$a-zA-Z0-9_. \[\]<>]*([^-+*/]*)" contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses,javaAnnotation - syn region javaFuncDef start=+^\(\t\| \{8\}\)[$_a-zA-Z][$_a-zA-Z0-9_. \[\]<>]*([^-+*/]*,\s*+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses,javaAnnotation - syn match javaFuncDef "^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]<>]*([^-+*/]*)" contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses,javaAnnotation - syn region javaFuncDef start=+^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]<>]*([^-+*/]*,\s*+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses,javaAnnotation + syn cluster javaFuncParams add=javaScopeDecl,javaConceptKind,javaStorageClass,javaExternal + syn match javaFuncDef "^\%(\t\| \%( \{6\}\)\=\)\K\%(\k\|[ .,<>\[\]]\)*([^-+*/]*)" contains=@javaFuncParams + syn region javaFuncDef start=+^\%(\t\| \%( \{6\}\)\=\)\K\%(\k\|[ .,<>\[\]]\)*([^-+*/]*,\s*+ end=+)+ contains=@javaFuncParams else - " This line catches method declarations at any indentation>0, but it assumes - " two things: - " 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\|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 + " This is the "style" variant (:help ft-java-syntax). + syn cluster javaFuncParams add=javaScopeDecl,javaConceptKind,javaStorageClass,javaExternal + + " Match arbitrarily indented camelCasedName method declarations. + " Match: [@ɐ] [abstract] [<α, β>] Τʬ[<γ>][[][]] μʭʭ(/* ... */); + + if s:selectable_regexp_engine + " Request the new regexp engine for [:upper:] and [:lower:]. + syn region javaFuncDef start=/\%#=2^\s\+\%(\%(@\%(\K\k*\.\)*\K\k*\>\)\s\+\)*\%(p\%(ublic\|rotected\|rivate\)\s\+\)\=\%(\%(abstract\|default\)\s\+\|\%(\%(final\|\%(native\|strictfp\)\|s\%(tatic\|ynchronized\)\)\s\+\)*\)\=\%(<.*[[:space:]-]\@1\s\+\)\=\%(void\|\%(b\%(oolean\|yte\)\|char\|short\|int\|long\|float\|double\|\%(\<\K\k*\>\.\)*\<[$_[:upper:]]\k*\>\%(<[^(){}]*[[:space:]-]\@1\)\=\)\%(\[\]\)*\)\s\+\<[$_[:lower:]]\k*\>\s*(/ end=/)/ skip=/\/\*.\{-}\*\/\|\/\/.*$/ contains=@javaFuncParams + else + " XXX: \C\<[^a-z0-9]\k*\> rejects "type", but matches "τύπος". + " XXX: \C\<[^A-Z0-9]\k*\> rejects "Method", but matches "Μέθοδος". + syn region javaFuncDef start=/^\s\+\%(\%(@\%(\K\k*\.\)*\K\k*\>\)\s\+\)*\%(p\%(ublic\|rotected\|rivate\)\s\+\)\=\%(\%(abstract\|default\)\s\+\|\%(\%(final\|\%(native\|strictfp\)\|s\%(tatic\|ynchronized\)\)\s\+\)*\)\=\%(<.*[[:space:]-]\@1\s\+\)\=\%(void\|\%(b\%(oolean\|yte\)\|char\|short\|int\|long\|float\|double\|\%(\<\K\k*\>\.\)*\<[^a-z0-9]\k*\>\%(<[^(){}]*[[:space:]-]\@1\)\=\)\%(\[\]\)*\)\s\+\<[^A-Z0-9]\k*\>\s*(/ end=/)/ skip=/\/\*.\{-}\*\/\|\/\/.*$/ contains=@javaFuncParams + endif endif + syn match javaLambdaDef "\<\K\k*\>\%(\\)\@" syn match javaBraces "[{}]" syn cluster javaTop add=javaFuncDef,javaBraces,javaLambdaDef @@ -313,11 +345,13 @@ if exists("java_highlight_debug") syn keyword javaDebugType contained null this super syn region javaDebugParen start=+(+ end=+)+ contained contains=javaDebug.*,javaDebugParen - " to make this work you must define the highlighting for these groups - syn match javaDebug "\\[\], \t]*)\s*->" - " needs to be defined after the parenthesis error catcher to work + " Make ()-matching definitions after the parenthesis error catcher. + syn match javaLambdaDef "\k\@4?\[\]@,.]\)*)\s*->" endif if !exists("java_minlines") let java_minlines = 10 endif + +" Note that variations of a /*/ balanced comment, e.g., /*/*/, /*//*/, +" /* /*/, /* /*/, etc., may have their rightmost /*/ part accepted +" as a comment start by ':syntax sync ccomment'; consider alternatives +" to make synchronisation start further towards file's beginning by +" bumping up g:java_minlines or issuing ':syntax sync fromstart' or +" preferring &foldmethod set to 'syntax'. exec "syn sync ccomment javaComment minlines=" . java_minlines " The default highlighting. @@ -427,10 +468,10 @@ hi def link htmlArg Type hi def link htmlString String hi def link javaSpaceError Error -if s:isModuleInfoDeclarationCurrentBuffer() - hi def link javaModuleStorageClass StorageClass - hi def link javaModuleStmt Statement - hi def link javaModuleExternal Include +if s:module_info_cur_buf + hi def link javaModuleStorageClass StorageClass + hi def link javaModuleStmt Statement + hi def link javaModuleExternal Include endif let b:current_syntax = "java" @@ -439,9 +480,8 @@ if main_syntax == 'java' unlet main_syntax endif -delfunction! s:isModuleInfoDeclarationCurrentBuffer -let b:spell_options="contained" +let b:spell_options = "contained" let &cpo = s:cpo_save -unlet s:cpo_save +unlet s:selectable_regexp_engine s:module_info_cur_buf s:cpo_save " vim: ts=8 diff --git a/runtime/syntax/ondir.vim b/runtime/syntax/ondir.vim new file mode 100644 index 0000000..4aeb014 --- /dev/null +++ b/runtime/syntax/ondir.vim @@ -0,0 +1,35 @@ +" Vim syntax file +" Language: ondir +" Maintainer: Jon Parise + +if exists('b:current_syntax') + finish +endif + +let s:cpo_save = &cpoptions +set cpoptions&vim + +syn case match + +syn match ondirComment "#.*" contains=@Spell +syn keyword ondirKeyword final contained skipwhite nextgroup=ondirKeyword +syn keyword ondirKeyword enter leave contained skipwhite nextgroup=ondirPath +syn match ondirPath "[^:]\+" contained display +syn match ondirColon ":" contained display + +syn include @ondirShell syntax/sh.vim +syn region ondirContent start="^\s\+" end="^\ze\S.*$" keepend contained contains=@ondirShell + +syn region ondirSection start="^\(final\|enter\|leave\)" end="^\ze\S.*$" fold contains=ondirKeyword,ondirPath,ondirColon,ondirContent + +hi def link ondirComment Comment +hi def link ondirKeyword Keyword +hi def link ondirPath Special +hi def link ondirColon Operator + +let b:current_syntax = 'ondir' + +let &cpoptions = s:cpo_save +unlet s:cpo_save + +" vim: et ts=4 sw=2 sts=2: diff --git a/runtime/syntax/pamconf.vim b/runtime/syntax/pamconf.vim index 2913284..1b5f901 100644 --- a/runtime/syntax/pamconf.vim +++ b/runtime/syntax/pamconf.vim @@ -1,9 +1,9 @@ " Vim syntax file " Language: pam(8) configuration file " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2020/08/04 +" Latest Change: 2024/03/31 " Changes By: Haochen Tong - +" Vim Project for the @include syntax if exists("b:current_syntax") finish @@ -23,6 +23,13 @@ syn match pamconfType '-\?[[:alpha:]]\+' syn keyword pamconfTypeKeyword contained account auth password session +" The @include syntax is Debian specific +syn match pamconfInclude '^@include' + \ nextgroup=pamconfIncludeFile + \ skipwhite + +syn match pamconfIncludeFile '\f\+$' + if s:has_service_field syn match pamconfService '^[[:graph:]]\+' \ nextgroup=pamconfType, @@ -124,6 +131,8 @@ hi def link pamconfMPath String hi def link pamconfMPathLineCont pamconfServiceLineCont hi def link pamconfArgs Normal hi def link pamconfArgsLineCont pamconfServiceLineCont +hi def link pamconfInclude Include +hi def link pamconfIncludeFile Include let b:current_syntax = "pamconf" diff --git a/runtime/syntax/pandoc.vim b/runtime/syntax/pandoc.vim new file mode 100644 index 0000000..7928cc6 --- /dev/null +++ b/runtime/syntax/pandoc.vim @@ -0,0 +1,709 @@ +scriptencoding utf-8 +" +" Language: Pandoc (superset of Markdown) +" Maintainer: Felipe Morales +" Maintainer: Caleb Maclennan +" Upstream: https://github.com/vim-pandoc/vim-pandoc-syntax +" +" Contributor: David Sanson +" Jorge Israel Peña +" Original Author: Jeremy Schultz +" Version: 5.0 +" Last Change: 2024 Apr 08 + +let s:cpo_save = &cpo +set cpo&vim + +" Configuration: {{{1 +" +" use conceal? {{{2 +if !exists('g:pandoc#syntax#conceal#use') + let g:pandoc#syntax#conceal#use = 1 +endif +"}}}2 + +" what groups not to use conceal in. works as a blacklist {{{2 +if !exists('g:pandoc#syntax#conceal#blacklist') + let g:pandoc#syntax#conceal#blacklist = [] +endif +" }}}2 + +" cchars used in conceal rules {{{2 +" utf-8 defaults (preferred) +if &encoding ==# 'utf-8' + let s:cchars = { + \'newline': '↵', + \'image': '▨', + \'super': 'ⁿ', + \'sub': 'ₙ', + \'strike': 'x̶', + \'atx': '§', + \'codelang': 'λ', + \'codeend': '—', + \'abbrev': '→', + \'footnote': '†', + \'definition': ' ', + \'li': '•', + \'html_c_s': '‹', + \'html_c_e': '›', + \'quote_s': '“', + \'quote_e': '”'} +else + " ascii defaults + let s:cchars = { + \'newline': ' ', + \'image': 'i', + \'super': '^', + \'sub': '_', + \'strike': '~', + \'atx': '#', + \'codelang': 'l', + \'codeend': '-', + \'abbrev': 'a', + \'footnote': 'f', + \'definition': ' ', + \'li': '*', + \'html_c_s': '+', + \'html_c_e': '+'} +endif +" }}}2 + +" if the user has a dictionary with replacements for the default cchars, use those {{{2 +if exists('g:pandoc#syntax#conceal#cchar_overrides') + let s:cchars = extend(s:cchars, g:pandoc#syntax#conceal#cchar_overrides) +endif +" }}}2 + +"should the urls in links be concealed? {{{2 +if !exists('g:pandoc#syntax#conceal#urls') + let g:pandoc#syntax#conceal#urls = 0 +endif +" should backslashes in escapes be concealed? {{{2 +if !exists('g:pandoc#syntax#conceal#backslash') + let g:pandoc#syntax#conceal#backslash = 0 +endif +" }}}2 + +" leave specified codeblocks as Normal (i.e. 'unhighlighted') {{{2 +if !exists('g:pandoc#syntax#codeblocks#ignore') + let g:pandoc#syntax#codeblocks#ignore = [] +endif +" }}}2 + +" use embedded highlighting for delimited codeblocks where a language is specifed. {{{2 +if !exists('g:pandoc#syntax#codeblocks#embeds#use') + let g:pandoc#syntax#codeblocks#embeds#use = 1 +endif +" }}}2 + +" for what languages and using what vim syntax files highlight those embeds. {{{2 +" defaults to None. +if !exists('g:pandoc#syntax#codeblocks#embeds#langs') + let g:pandoc#syntax#codeblocks#embeds#langs = [] +endif +" }}}2 + +" use italics ? {{{2 +if !exists('g:pandoc#syntax#style#emphases') + let g:pandoc#syntax#style#emphases = 1 +endif +" if 0, we don't conceal the emphasis marks, otherwise there wouldn't be a way +" to tell where the styles apply. +if g:pandoc#syntax#style#emphases == 0 + call add(g:pandoc#syntax#conceal#blacklist, 'block') +endif +" }}}2 + +" underline subscript, superscript and strikeout? {{{2 +if !exists('g:pandoc#syntax#style#underline_special') + let g:pandoc#syntax#style#underline_special = 1 +endif +" }}}2 + +" protect code blocks? {{{2 +if !exists('g:pandoc#syntax#protect#codeblocks') + let g:pandoc#syntax#protect#codeblocks = 1 +endif +" }}}2 + +" use color column? {{{2 +if !exists('g:pandoc#syntax#colorcolumn') + let g:pandoc#syntax#colorcolumn = 0 +endif +" }}}2 + +" highlight new lines? {{{2 +if !exists('g:pandoc#syntax#newlines') + let g:pandoc#syntax#newlines = 1 +endif +" }}} + +" detect roman-numeral list items? {{{2 +if !exists('g:pandoc#syntax#roman_lists') + let g:pandoc#syntax#roman_lists = 0 +endif +" }}}2 + +" disable syntax highlighting for definition lists? (better performances) {{{2 +if !exists('g:pandoc#syntax#use_definition_lists') + let g:pandoc#syntax#use_definition_lists = 1 +endif +" }}}2 + +" }}}1 + +" Functions: {{{1 +" EnableEmbedsforCodeblocksWithLang {{{2 +function! EnableEmbedsforCodeblocksWithLang(entry) + " prevent embedded language syntaxes from changing 'foldmethod' + if has('folding') + let s:foldmethod = &l:foldmethod + let s:foldtext = &l:foldtext + endif + + try + let s:langname = matchstr(a:entry, '^[^=]*') + let s:langsyntaxfile = matchstr(a:entry, '[^=]*$') + unlet! b:current_syntax + exe 'syn include @'.toupper(s:langname).' syntax/'.s:langsyntaxfile.'.vim' + " We might have just turned off spellchecking by including the file, + " so we turn it back on here. + exe 'syntax spell toplevel' + exe 'syn region pandocDelimitedCodeBlock_' . s:langname . ' start=/\(\_^\( \+\|\t\)\=\(`\{3,}`*\|\~\{3,}\~*\)\s*\%({[^.]*\.\)\=' . s:langname . '\>.*\n\)\@<=\_^/' . + \' end=/\_$\n\(\( \+\|\t\)\=\(`\{3,}`*\|\~\{3,}\~*\)\_$\n\_$\)\@=/ contained containedin=pandocDelimitedCodeBlock' . + \' contains=@' . toupper(s:langname) + exe 'syn region pandocDelimitedCodeBlockinBlockQuote_' . s:langname . ' start=/>\s\(`\{3,}`*\|\~\{3,}\~*\)\s*\%({[^.]*\.\)\=' . s:langname . '\>/' . + \ ' end=/\(`\{3,}`*\|\~\{3,}\~*\)/ contained containedin=pandocDelimitedCodeBlock' . + \' contains=@' . toupper(s:langname) . + \',pandocDelimitedCodeBlockStart,pandocDelimitedCodeBlockEnd,pandodDelimitedCodeblockLang,pandocBlockQuoteinDelimitedCodeBlock' + catch /E484/ + echo "No syntax file found for '" . s:langsyntaxfile . "'" + endtry + + if exists('s:foldmethod') && s:foldmethod !=# &l:foldmethod + let &l:foldmethod = s:foldmethod + endif + if exists('s:foldtext') && s:foldtext !=# &l:foldtext + let &l:foldtext = s:foldtext + endif +endfunction +" }}}2 + +" DisableEmbedsforCodeblocksWithLang {{{2 +function! DisableEmbedsforCodeblocksWithLang(langname) + try + exe 'syn clear pandocDelimitedCodeBlock_'.a:langname + exe 'syn clear pandocDelimitedCodeBlockinBlockQuote_'.a:langname + catch /E28/ + echo "No existing highlight definitions found for '" . a:langname . "'" + endtry +endfunction +" }}}2 + +" WithConceal {{{2 +function! s:WithConceal(rule_group, rule, conceal_rule) + let l:rule_tail = '' + if g:pandoc#syntax#conceal#use != 0 + if index(g:pandoc#syntax#conceal#blacklist, a:rule_group) == -1 + let l:rule_tail = ' ' . a:conceal_rule + endif + endif + execute a:rule . l:rule_tail +endfunction +" }}}2 + +" }}}1 + +" Commands: {{{1 +command! -buffer -nargs=1 -complete=syntax PandocHighlight call EnableEmbedsforCodeblocksWithLang() +command! -buffer -nargs=1 -complete=syntax PandocUnhighlight call DisableEmbedsforCodeblocksWithLang() +" }}}1 + +" BASE: +syntax clear +syntax spell toplevel +" }}}1 + +" Syntax Rules: {{{1 + +" Embeds: {{{2 + +" prevent embedded language syntaxes from changing 'foldmethod' +if has('folding') + let s:foldmethod = &l:foldmethod +endif + +" HTML: {{{3 +" Set embedded HTML highlighting +syn include @HTML syntax/html.vim +syn match pandocHTML /<\/\?\a\_.\{-}>/ contains=@HTML +" Support HTML multi line comments +syn region pandocHTMLComment start=// keepend contains=pandocHTMLCommentStart,pandocHTMLCommentEnd +call s:WithConceal('html_c_s', 'syn match pandocHTMLCommentStart // contained', 'conceal cchar='.s:cchars['html_c_e']) +" }}}3 + +" LaTeX: {{{3 +" Set embedded LaTex (pandoc extension) highlighting +" Unset current_syntax so the 2nd include will work +unlet b:current_syntax +syn include @LATEX syntax/tex.vim +if index(g:pandoc#syntax#conceal#blacklist, 'inlinemath') == -1 + " Can't use WithConceal here because it will mess up all other conceals + " when dollar signs are used normally. It must be skipped entirely if + " inlinemath is blacklisted + syn region pandocLaTeXInlineMath start=/\v\\@.*\n\(.*\n\@1/ contained containedin=pandocEmphasis,pandocStrong,pandocPCite,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocUListItem,pandocNoFormatted +" }}}2 + +" Code Blocks: {{{2 +if g:pandoc#syntax#protect#codeblocks == 1 + syn match pandocCodeblock /\([ ]\{4}\|\t\).*$/ +endif +syn region pandocCodeBlockInsideIndent start=/\(\(\d\|\a\|*\).*\n\)\@/ contains=NONE +" }}}3 + +" }}}2 + +" Citations: {{{2 +" parenthetical citations +syn match pandocPCite "\^\@~/]*.\{-}\]" contains=pandocEmphasis,pandocStrong,pandocLatex,pandocCiteKey,@Spell,pandocAmpersandEscape display +" in-text citations with location +syn match pandocICite "@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\-+?<>~/]*\s\[.\{-1,}\]" contains=pandocCiteKey,@Spell display +" cite keys +syn match pandocCiteKey /\(-\=@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\-+?<>~/]*\)/ containedin=pandocPCite,pandocICite contains=@NoSpell display +syn match pandocCiteAnchor /[-@]/ contained containedin=pandocCiteKey display +syn match pandocCiteLocator /[\[\]]/ contained containedin=pandocPCite,pandocICite +" }}}2 + +" Text Styles: {{{2 + +" Emphasis: {{{3 +call s:WithConceal('block', 'syn region pandocEmphasis matchgroup=pandocOperator start=/\\\@1.*\n\|^\s*\n\)\@<=#\{1,6}.*\n/ contains=pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,@Spell,pandocAmpersandEscape,pandocReferenceLabel,pandocReferenceURL display +syn match pandocAtxHeaderMark /\(^#\{1,6}\|\\\@/ contained containedin=pandocGridTableHeader,pandocPipeTableHeader contains=@Spell +" }}}2 + +" Delimited Code Blocks: {{{2 +" this is here because we can override strikeouts and subscripts +syn region pandocDelimitedCodeBlock start=/^\(>\s\)\?\z(\([ ]\+\|\t\)\=\~\{3,}\~*\)/ end=/^\z1\~*/ skipnl contains=pandocDelimitedCodeBlockStart,pandocDelimitedCodeBlockEnd keepend +syn region pandocDelimitedCodeBlock start=/^\(>\s\)\?\z(\([ ]\+\|\t\)\=`\{3,}`*\)/ end=/^\z1`*/ skipnl contains=pandocDelimitedCodeBlockStart,pandocDelimitedCodeBlockEnd keepend +call s:WithConceal('codeblock_start', 'syn match pandocDelimitedCodeBlockStart /\(\(\_^\n\_^\|\%^\)\(>\s\)\?\( \+\|\t\)\=\)\@<=\(\~\{3,}\~*\|`\{3,}`*\)/ contained containedin=pandocDelimitedCodeBlock nextgroup=pandocDelimitedCodeBlockLanguage', 'conceal cchar='.s:cchars['codelang']) +syn match pandocDelimitedCodeBlockLanguage /\(\s\?\)\@<=.\+\(\_$\)\@=/ contained +call s:WithConceal('codeblock_delim', 'syn match pandocDelimitedCodeBlockEnd /\(`\{3,}`*\|\~\{3,}\~*\)\(\_$\n\(>\s\)\?\_$\)\@=/ contained containedin=pandocDelimitedCodeBlock', 'conceal cchar='.s:cchars['codeend']) +syn match pandocBlockQuoteinDelimitedCodeBlock '^>' contained containedin=pandocDelimitedCodeBlock +syn match pandocCodePre /
.\{-}<\/pre>/ skipnl
+syn match pandocCodePre /.\{-}<\/code>/ skipnl
+
+" enable highlighting for embedded region in codeblocks if there exists a
+" g:pandoc#syntax#codeblocks#embeds#langs *list*.
+"
+" entries in this list are the language code interpreted by pandoc,
+" if this differs from the name of the vim syntax file, append =vimname
+" e.g. let g:pandoc#syntax#codeblocks#embeds#langs = ["haskell", "literatehaskell=lhaskell"]
+"
+if g:pandoc#syntax#codeblocks#embeds#use != 0
+    for l in g:pandoc#syntax#codeblocks#embeds#langs
+      call EnableEmbedsforCodeblocksWithLang(l)
+    endfor
+endif
+" }}}2
+
+" Abbreviations: {{{2
+syn region pandocAbbreviationDefinition start=/^\*\[.\{-}\]:\s*/ end='$' contains=pandocNoFormatted,@Spell,pandocAmpersandEscape
+call s:WithConceal('abbrev', 'syn match pandocAbbreviationSeparator /:/ contained containedin=pandocAbbreviationDefinition', 'conceal cchar='.s:cchars['abbrev'])
+syn match pandocAbbreviation /\*\[.\{-}\]/ contained containedin=pandocAbbreviationDefinition
+call s:WithConceal('abbrev', 'syn match pandocAbbreviationHead /\*\[/ contained containedin=pandocAbbreviation', 'conceal')
+call s:WithConceal('abbrev', 'syn match pandocAbbreviationTail /\]/ contained containedin=pandocAbbreviation', 'conceal')
+" }}}2
+
+" Footnotes: {{{2
+" we put these here not to interfere with superscripts.
+syn match pandocFootnoteID /\[\^[^\]]\+\]/ nextgroup=pandocFootnoteDef
+
+"   Inline footnotes
+syn region pandocFootnoteDef start=/\^\[/ skip=/\[.\{-}]/ end=/\]/ contains=pandocReferenceLabel,pandocReferenceURL,pandocLatex,pandocPCite,pandocCiteKey,pandocStrong,pandocEmphasis,pandocStrongEmphasis,pandocNoFormatted,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocEnDash,pandocEmDash,pandocEllipses,pandocBeginQuote,pandocEndQuote,@Spell,pandocAmpersandEscape skipnl keepend
+call s:WithConceal('footnote', 'syn match pandocFootnoteDefHead /\^\[/ contained containedin=pandocFootnoteDef', 'conceal cchar='.s:cchars['footnote'])
+call s:WithConceal('footnote', 'syn match pandocFootnoteDefTail /\]/ contained containedin=pandocFootnoteDef', 'conceal')
+
+" regular footnotes
+syn region pandocFootnoteBlock start=/\[\^.\{-}\]:\s*\n*/ end=/^\n^\s\@!/ contains=pandocReferenceLabel,pandocReferenceURL,pandocLatex,pandocPCite,pandocCiteKey,pandocStrong,pandocEmphasis,pandocNoFormatted,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocEnDash,pandocEmDash,pandocNewLine,pandocStrongEmphasis,pandocEllipses,pandocBeginQuote,pandocEndQuote,pandocLaTeXInlineMath,pandocEscapedDollar,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXRegion,pandocAmpersandEscape,@Spell skipnl
+syn match pandocFootnoteBlockSeparator /:/ contained containedin=pandocFootnoteBlock
+syn match pandocFootnoteID /\[\^.\{-}\]/ contained containedin=pandocFootnoteBlock
+call s:WithConceal('footnote', 'syn match pandocFootnoteIDHead /\[\^/ contained containedin=pandocFootnoteID', 'conceal cchar='.s:cchars['footnote'])
+call s:WithConceal('footnote', 'syn match pandocFootnoteIDTail /\]/ contained containedin=pandocFootnoteID', 'conceal')
+" }}}2
+
+" List Items: {{{2
+" Unordered lists
+syn match pandocUListItem /^>\=\s*[*+-]\s\+-\@!.*$/ nextgroup=pandocUListItem,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocDelimitedCodeBlock,pandocListItemContinuation contains=@Spell,pandocEmphasis,pandocStrong,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocStrongEmphasis,pandocStrongEmphasis,pandocPCite,pandocICite,pandocCiteKey,pandocReferenceLabel,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocReferenceURL,pandocAutomaticLink,pandocFootnoteDef,pandocFootnoteBlock,pandocFootnoteID,pandocAmpersandEscape skipempty display
+call s:WithConceal('list', 'syn match pandocUListItemBullet /^>\=\s*\zs[*+-]/ contained containedin=pandocUListItem', 'conceal cchar='.s:cchars['li'])
+
+" Ordered lists
+syn match pandocListItem /^\s*(\?\(\d\+\|\l\|\#\|@\)[.)].*$/ nextgroup=pandocListItem,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocDelimitedCodeBlock,pandocListItemContinuation contains=@Spell,pandocEmphasis,pandocStrong,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocStrongEmphasis,pandocStrongEmphasis,pandocPCite,pandocICite,pandocCiteKey,pandocReferenceLabel,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocAutomaticLink,pandocFootnoteDef,pandocFootnoteBlock,pandocFootnoteID,pandocAmpersandEscape skipempty display
+
+" support for roman numerals up to 'c'
+if g:pandoc#syntax#roman_lists != 0
+    syn match pandocListItem /^\s*(\?x\=l\=\(i\{,3}[vx]\=\)\{,3}c\{,3}[.)].*$/ nextgroup=pandocListItem,pandocMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocDelimitedCodeBlock,pandocListItemContinuation,pandocAutomaticLink skipempty display
+endif
+syn match pandocListItemBullet /^(\?.\{-}[.)]/ contained containedin=pandocListItem
+syn match pandocListItemBulletId /\(\d\+\|\l\|\#\|@.\{-}\|x\=l\=\(i\{,3}[vx]\=\)\{,3}c\{,3}\)/ contained containedin=pandocListItemBullet
+
+syn match pandocListItemContinuation /^\s\+\([-+*]\s\+\|(\?.\+[).]\)\@[[:punct:]]*\)\@<="[[:blank:][:punct:]\n]\@=/  containedin=pandocEmphasis,pandocStrong,pandocUListItem,pandocListItem,pandocListItemContinuation display', 'conceal cchar='.s:cchars['quote_e'])
+endif
+" }}}3
+
+" Hrule: {{{3
+syn match pandocHRule /^\s*\([*\-_]\)\s*\%(\1\s*\)\{2,}$/ display
+" }}}3
+
+" Backslashes: {{{3
+if g:pandoc#syntax#conceal#backslash == 1
+    syn match pandocBackslash /\v\\@
+" Upstream: https://github.com/raimon49/requirements.txt.vim
+" License: MIT LICENSE
+" The MIT License (MIT)
+"
+" Copyright (c) 2015 raimon
+"
+" Permission is hereby granted, free of charge, to any person obtaining a copy
+" of this software and associated documentation files (the "Software"), to deal
+" in the Software without restriction, including without limitation the rights
+" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+" copies of the Software, and to permit persons to whom the Software is
+" furnished to do so, subject to the following conditions:
+"
+" The above copyright notice and this permission notice shall be included in all
+" copies or substantial portions of the Software.
+"
+" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+" SOFTWARE.
+
+if exists("b:current_syntax") && b:current_syntax == "requirements"
+    finish
+endif
+
+syn case match
+
+" https://pip.pypa.io/en/stable/reference/requirements-file-format/
+" https://pip.pypa.io/en/stable/reference/inspect-report/#example
+syn keyword requirementsKeyword implementation_name implementation_version os_name platform_machine platform_release platform_system platform_version python_full_version platform_python_implementation python_version sys_platform contained
+syn region requirementsSubst matchgroup=requirementsSubstDelim start="\V${" end="\V}"
+syn region requirementsString matchgroup=requirementsStringDelim start=`'` skip=`\\'` end=`'`
+syn region requirementsString matchgroup=requirementsStringDelim start=`"` skip=`\\"` end=`"`
+syn match requirementsVersion "\v\d+[a-zA-Z0-9\.\-\*]*"
+syn region requirementsComment start="[ \t]*#" end="$"
+syn match requirementsCommandOption "\v^\[?--?[a-zA-Z\-]*\]?"
+syn match requirementsVersionSpecifiers "\v(\=\=\=?|\<\=?|\>\=?|\~\=|\!\=)"
+syn match requirementsPackageName "\v^([a-zA-Z0-9][a-zA-Z0-9\-_\.]*[a-zA-Z0-9])"
+syn match requirementsExtras "\v\[\S+\]"
+syn match requirementsVersionControls "\v(git\+?|hg\+|svn\+|bzr\+).*://.\S+"
+syn match requirementsURLs "\v(\@\s)?(https?|ftp|gopher)://?[^\s/$.?#].\S*"
+syn match requirementsEnvironmentMarkers "\v;\s[^#]+" contains=requirementsKeyword,requirementsVersionSpecifiers,requirementsString
+
+hi def link requirementsKeyword Keyword
+hi def link requirementsSubstDelim Delimiter
+hi def link requirementsSubst PreProc
+hi def link requirementsStringDelim Delimiter
+hi def link requirementsString String
+hi def link requirementsVersion Number
+hi def link requirementsComment Comment
+hi def link requirementsCommandOption Special
+hi def link requirementsVersionSpecifiers Boolean
+hi def link requirementsPackageName Identifier
+hi def link requirementsExtras Type
+hi def link requirementsVersionControls Underlined
+hi def link requirementsURLs Underlined
+hi def link requirementsEnvironmentMarkers Macro
+
+let b:current_syntax = "requirements"
+
+" vim: et sw=4 ts=4 sts=4:
diff --git a/runtime/syntax/sshconfig.vim b/runtime/syntax/sshconfig.vim
index 750289d..99e10fd 100644
--- a/runtime/syntax/sshconfig.vim
+++ b/runtime/syntax/sshconfig.vim
@@ -63,8 +63,7 @@ syn keyword sshconfigMAC hmac-sha2-256
 syn keyword sshconfigMAC hmac-sha2-512
 syn keyword sshconfigMAC hmac-md5
 syn keyword sshconfigMAC hmac-md5-96
-syn keyword sshconfigMAC hmac-ripemd160
-syn match   sshconfigMAC "\"
+syn match   sshconfigMAC "\"
 syn match   sshconfigMAC "\"
 syn match   sshconfigMAC "\"
 syn match   sshconfigMAC "\"
@@ -107,33 +106,35 @@ syn keyword sshconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1
 syn keyword sshconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7
 syn keyword sshconfigAddressFamily  inet inet6
 
-syn match   sshconfigIPQoS	"af1[123]"
-syn match   sshconfigIPQoS	"af2[123]"
-syn match   sshconfigIPQoS	"af3[123]"
-syn match   sshconfigIPQoS	"af4[123]"
-syn match   sshconfigIPQoS	"cs[0-7]"
-syn keyword sshconfigIPQoS	ef lowdelay throughput reliability
+syn match   sshconfigIPQoS	"\"
+syn match   sshconfigIPQoS	"\"
+syn keyword sshconfigIPQoS	ef le lowdelay throughput reliability
 syn keyword sshconfigKbdInteractive bsdauth pam skey
 
 syn keyword sshconfigKexAlgo diffie-hellman-group1-sha1
 syn keyword sshconfigKexAlgo diffie-hellman-group14-sha1
 syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha1
 syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha256
+syn keyword sshconfigKexAlgo diffie-hellman-group16-sha512
+syn keyword sshconfigKexAlgo diffie-hellman-group18-sha512
+syn keyword sshconfigKexAlgo diffie-hellman-group14-sha256
 syn keyword sshconfigKexAlgo ecdh-sha2-nistp256
 syn keyword sshconfigKexAlgo ecdh-sha2-nistp384
 syn keyword sshconfigKexAlgo ecdh-sha2-nistp521
-syn match sshconfigKexAlgo "\"
+syn match sshconfigKexAlgo "\"
+syn match sshconfigKexAlgo "\"
 
 syn keyword sshconfigTunnel	point-to-point ethernet
 
-syn match sshconfigVar "%[rhplLdun]\>"
+syn match sshconfigVar "%[CdfHhIijKkLlnprTtu]\>"
+syn match sshconfigVar "%%"
 syn match sshconfigSpecial "[*?]"
-syn match sshconfigNumber "\d\+"
+syn match sshconfigNumber "\<\d\+\>"
 syn match sshconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>"
 syn match sshconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>"
 syn match sshconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}[:/]\d\+\>"
-syn match sshconfigHostPort "\(Host \)\@<=.\+"
-syn match sshconfigHostPort "\(HostName \)\@<=.\+"
+syn match sshconfigHostPort "\<\c\(Host \+\)\@<=.\+"
+syn match sshconfigHostPort "\<\c\(Hostname \+\)\@<=.\+"
 
 " case off
 syn case ignore
@@ -142,10 +143,10 @@ syn case ignore
 " Keywords
 syn keyword sshconfigHostSect Host
 
-syn keyword sshconfigMatch canonical final exec host originalhost user localuser all
+syn keyword sshconfigMatch canonical final exec localnetwork host originalhost tagged user localuser all
 
-syn keyword sshconfigKeyword AddressFamily
 syn keyword sshconfigKeyword AddKeysToAgent
+syn keyword sshconfigKeyword AddressFamily
 syn keyword sshconfigKeyword BatchMode
 syn keyword sshconfigKeyword BindAddress
 syn keyword sshconfigKeyword BindInterface
@@ -157,16 +158,18 @@ syn keyword sshconfigKeyword CanonicalizePermittedCNAMEs
 syn keyword sshconfigKeyword CASignatureAlgorithms
 syn keyword sshconfigKeyword CertificateFile
 syn keyword sshconfigKeyword ChallengeResponseAuthentication
+syn keyword sshconfigKeyword ChannelTimeout
 syn keyword sshconfigKeyword CheckHostIP
 syn keyword sshconfigKeyword Ciphers
 syn keyword sshconfigKeyword ClearAllForwardings
 syn keyword sshconfigKeyword Compression
-syn keyword sshconfigKeyword ConnectTimeout
 syn keyword sshconfigKeyword ConnectionAttempts
+syn keyword sshconfigKeyword ConnectTimeout
 syn keyword sshconfigKeyword ControlMaster
 syn keyword sshconfigKeyword ControlPath
 syn keyword sshconfigKeyword ControlPersist
 syn keyword sshconfigKeyword DynamicForward
+syn keyword sshconfigKeyword EnableEscapeCommandline
 syn keyword sshconfigKeyword EnableSSHKeysign
 syn keyword sshconfigKeyword EscapeChar
 syn keyword sshconfigKeyword ExitOnForwardFailure
@@ -176,18 +179,17 @@ syn keyword sshconfigKeyword ForwardAgent
 syn keyword sshconfigKeyword ForwardX11
 syn keyword sshconfigKeyword ForwardX11Timeout
 syn keyword sshconfigKeyword ForwardX11Trusted
-syn keyword sshconfigKeyword GSSAPIAuthentication
-syn keyword sshconfigKeyword GSSAPIDelegateCredentials
 syn keyword sshconfigKeyword GatewayPorts
 syn keyword sshconfigKeyword GlobalKnownHostsFile
+syn keyword sshconfigKeyword GSSAPIAuthentication
+syn keyword sshconfigKeyword GSSAPIDelegateCredentials
 syn keyword sshconfigKeyword HashKnownHosts
-syn keyword sshconfigKeyword HostKeyAlgorithms
-syn keyword sshconfigKeyword HostKeyAlias
-syn keyword sshconfigKeyword HostName
-syn keyword sshconfigKeyword HostbasedAuthentication
 syn keyword sshconfigKeyword HostbasedAcceptedAlgorithms
+syn keyword sshconfigKeyword HostbasedAuthentication
 syn keyword sshconfigKeyword HostbasedKeyTypes
-syn keyword sshconfigKeyword IPQoS
+syn keyword sshconfigKeyword HostKeyAlgorithms
+syn keyword sshconfigKeyword HostKeyAlias
+syn keyword sshconfigKeyword Hostname
 syn keyword sshconfigKeyword IdentitiesOnly
 syn keyword sshconfigKeyword IdentityAgent
 syn keyword sshconfigKeyword IdentityFile
@@ -206,15 +208,16 @@ syn keyword sshconfigKeyword MACs
 syn keyword sshconfigKeyword Match
 syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost
 syn keyword sshconfigKeyword NumberOfPasswordPrompts
-syn keyword sshconfigKeyword PKCS11Provider
+syn keyword sshconfigKeyword ObscureKeystrokeTiming
 syn keyword sshconfigKeyword PasswordAuthentication
 syn keyword sshconfigKeyword PermitLocalCommand
 syn keyword sshconfigKeyword PermitRemoteOpen
+syn keyword sshconfigKeyword PKCS11Provider
 syn keyword sshconfigKeyword Port
 syn keyword sshconfigKeyword PreferredAuthentications
 syn keyword sshconfigKeyword ProxyCommand
 syn keyword sshconfigKeyword ProxyJump
-syn keyword sshconfigKeyword ProxyUseFDPass
+syn keyword sshconfigKeyword ProxyUseFdpass
 syn keyword sshconfigKeyword PubkeyAcceptedAlgorithms
 syn keyword sshconfigKeyword PubkeyAcceptedKeyTypes
 syn keyword sshconfigKeyword PubkeyAuthentication
@@ -229,18 +232,19 @@ syn keyword sshconfigKeyword SendEnv
 syn keyword sshconfigKeyword ServerAliveCountMax
 syn keyword sshconfigKeyword ServerAliveInterval
 syn keyword sshconfigKeyword SessionType
-syn keyword sshconfigKeyword SmartcardDevice
 syn keyword sshconfigKeyword SetEnv
+syn keyword sshconfigKeyword SmartcardDevice
 syn keyword sshconfigKeyword StdinNull
 syn keyword sshconfigKeyword StreamLocalBindMask
 syn keyword sshconfigKeyword StreamLocalBindUnlink
 syn keyword sshconfigKeyword StrictHostKeyChecking
 syn keyword sshconfigKeyword SyslogFacility
+syn keyword sshconfigKeyword Tag
 syn keyword sshconfigKeyword TCPKeepAlive
 syn keyword sshconfigKeyword Tunnel
 syn keyword sshconfigKeyword TunnelDevice
-syn keyword sshconfigKeyword UseBlacklistedKeys
 syn keyword sshconfigKeyword UpdateHostKeys
+syn keyword sshconfigKeyword UseBlacklistedKeys
 syn keyword sshconfigKeyword User
 syn keyword sshconfigKeyword UserKnownHostsFile
 syn keyword sshconfigKeyword VerifyHostKeyDNS
@@ -268,9 +272,9 @@ syn keyword sshconfigDeprecated UsePrivilegedPort
 hi def link sshconfigComment        Comment
 hi def link sshconfigTodo           Todo
 hi def link sshconfigHostPort       sshconfigConstant
-hi def link sshconfigNumber         sshconfigConstant
+hi def link sshconfigNumber         Number
 hi def link sshconfigConstant       Constant
-hi def link sshconfigYesNo          sshconfigEnum
+hi def link sshconfigYesNo          Boolean
 hi def link sshconfigCipher         sshconfigDeprecated
 hi def link sshconfigCiphers        sshconfigEnum
 hi def link sshconfigMAC            sshconfigEnum
diff --git a/runtime/syntax/sshdconfig.vim b/runtime/syntax/sshdconfig.vim
index c0d9c3f..8b539d9 100644
--- a/runtime/syntax/sshdconfig.vim
+++ b/runtime/syntax/sshdconfig.vim
@@ -64,8 +64,7 @@ syn keyword sshdconfigMAC hmac-sha2-256
 syn keyword sshdconfigMAC hmac-sha2-512
 syn keyword sshdconfigMAC hmac-md5
 syn keyword sshdconfigMAC hmac-md5-96
-syn keyword sshdconfigMAC hmac-ripemd160
-syn match   sshdconfigMAC "\"
+syn match   sshdconfigMAC "\"
 syn match   sshdconfigMAC "\"
 syn match   sshdconfigMAC "\"
 syn match   sshdconfigMAC "\"
@@ -108,12 +107,9 @@ syn keyword sshdconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7
 
 syn keyword sshdconfigCompression    delayed
 
-syn match   sshdconfigIPQoS	"af1[123]"
-syn match   sshdconfigIPQoS	"af2[123]"
-syn match   sshdconfigIPQoS	"af3[123]"
-syn match   sshdconfigIPQoS	"af4[123]"
-syn match   sshdconfigIPQoS	"cs[0-7]"
-syn keyword sshdconfigIPQoS	ef lowdelay throughput reliability
+syn match   sshdconfigIPQoS	"\"
+syn match   sshdconfigIPQoS	"\"
+syn keyword sshdconfigIPQoS	ef le lowdelay throughput reliability
 
 syn keyword sshdconfigKexAlgo diffie-hellman-group1-sha1
 syn keyword sshdconfigKexAlgo diffie-hellman-group14-sha1
@@ -125,20 +121,20 @@ syn keyword sshdconfigKexAlgo diffie-hellman-group-exchange-sha256
 syn keyword sshdconfigKexAlgo ecdh-sha2-nistp256
 syn keyword sshdconfigKexAlgo ecdh-sha2-nistp384
 syn keyword sshdconfigKexAlgo ecdh-sha2-nistp521
-syn keyword sshdconfigKexAlgo curve25519-sha256
-syn match sshdconfigKexAlgo "\"
+syn match sshdconfigKexAlgo "\"
 syn match sshdconfigKexAlgo "\"
+syn match sshdconfigKexAlgo "\"
 
 syn keyword sshdconfigTunnel	point-to-point ethernet
 
 syn keyword sshdconfigSubsystem internal-sftp
 
-syn match sshdconfigVar	    "%[hu]\>"
+syn match sshdconfigVar	    "%[CDFfhiKksTtUu]\>"
 syn match sshdconfigVar	    "%%"
 
 syn match sshdconfigSpecial "[*?]"
 
-syn match sshdconfigNumber "\d\+"
+syn match sshdconfigNumber "\<\d\+\>"
 syn match sshdconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>"
 syn match sshdconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>"
 " FIXME: this matches quite a few things which are NOT valid IPv6 addresses
@@ -162,15 +158,16 @@ syn keyword sshdconfigKeyword AllowStreamLocalForwarding
 syn keyword sshdconfigKeyword AllowTcpForwarding
 syn keyword sshdconfigKeyword AllowUsers
 syn keyword sshdconfigKeyword AuthenticationMethods
-syn keyword sshdconfigKeyword AuthorizedKeysFile
 syn keyword sshdconfigKeyword AuthorizedKeysCommand
 syn keyword sshdconfigKeyword AuthorizedKeysCommandUser
+syn keyword sshdconfigKeyword AuthorizedKeysFile
 syn keyword sshdconfigKeyword AuthorizedPrincipalsCommand
 syn keyword sshdconfigKeyword AuthorizedPrincipalsCommandUser
 syn keyword sshdconfigKeyword AuthorizedPrincipalsFile
 syn keyword sshdconfigKeyword Banner
 syn keyword sshdconfigKeyword CASignatureAlgorithms
 syn keyword sshdconfigKeyword ChallengeResponseAuthentication
+syn keyword sshdconfigKeyword ChannelTimeout
 syn keyword sshdconfigKeyword ChrootDirectory
 syn keyword sshdconfigKeyword Ciphers
 syn keyword sshdconfigKeyword ClientAliveCountMax
@@ -187,22 +184,22 @@ syn keyword sshdconfigKeyword GatewayPorts
 syn keyword sshdconfigKeyword GSSAPIAuthentication
 syn keyword sshdconfigKeyword GSSAPICleanupCredentials
 syn keyword sshdconfigKeyword GSSAPIEnablek5users
-syn keyword sshdconfigKeyword GSSAPIKeyExchange
 syn keyword sshdconfigKeyword GSSAPIKexAlgorithms
+syn keyword sshdconfigKeyword GSSAPIKeyExchange
 syn keyword sshdconfigKeyword GSSAPIStoreCredentialsOnRekey
 syn keyword sshdconfigKeyword GSSAPIStrictAcceptorCheck
-syn keyword sshdconfigKeyword HostCertificate
-syn keyword sshdconfigKeyword HostKey
-syn keyword sshdconfigKeyword HostKeyAgent
-syn keyword sshdconfigKeyword HostKeyAlgorithms
 syn keyword sshdconfigKeyword HostbasedAcceptedAlgorithms
 syn keyword sshdconfigKeyword HostbasedAcceptedKeyTypes
 syn keyword sshdconfigKeyword HostbasedAuthentication
 syn keyword sshdconfigKeyword HostbasedUsesNameFromPacketOnly
-syn keyword sshdconfigKeyword IPQoS
+syn keyword sshdconfigKeyword HostCertificate
+syn keyword sshdconfigKeyword HostKey
+syn keyword sshdconfigKeyword HostKeyAgent
+syn keyword sshdconfigKeyword HostKeyAlgorithms
 syn keyword sshdconfigKeyword IgnoreRhosts
 syn keyword sshdconfigKeyword IgnoreUserKnownHosts
 syn keyword sshdconfigKeyword Include
+syn keyword sshdconfigKeyword IPQoS
 syn keyword sshdconfigKeyword KbdInteractiveAuthentication
 syn keyword sshdconfigKeyword KerberosAuthentication
 syn keyword sshdconfigKeyword KerberosGetAFSToken
@@ -213,9 +210,9 @@ syn keyword sshdconfigKeyword KerberosUseKuserok
 syn keyword sshdconfigKeyword KexAlgorithms
 syn keyword sshdconfigKeyword KeyRegenerationInterval
 syn keyword sshdconfigKeyword ListenAddress
+syn keyword sshdconfigKeyword LoginGraceTime
 syn keyword sshdconfigKeyword LogLevel
 syn keyword sshdconfigKeyword LogVerbose
-syn keyword sshdconfigKeyword LoginGraceTime
 syn keyword sshdconfigKeyword MACs
 syn keyword sshdconfigKeyword Match
 syn keyword sshdconfigKeyword MaxAuthTries
@@ -223,8 +220,6 @@ syn keyword sshdconfigKeyword MaxSessions
 syn keyword sshdconfigKeyword MaxStartups
 syn keyword sshdconfigKeyword ModuliFile
 syn keyword sshdconfigKeyword PasswordAuthentication
-syn keyword sshdconfigKeyword PerSourceMaxStartups
-syn keyword sshdconfigKeyword PerSourceNetBlockSize
 syn keyword sshdconfigKeyword PermitBlacklistedKeys
 syn keyword sshdconfigKeyword PermitEmptyPasswords
 syn keyword sshdconfigKeyword PermitListen
@@ -234,6 +229,8 @@ syn keyword sshdconfigKeyword PermitTTY
 syn keyword sshdconfigKeyword PermitTunnel
 syn keyword sshdconfigKeyword PermitUserEnvironment
 syn keyword sshdconfigKeyword PermitUserRC
+syn keyword sshdconfigKeyword PerSourceMaxStartups
+syn keyword sshdconfigKeyword PerSourceNetBlockSize
 syn keyword sshdconfigKeyword PidFile
 syn keyword sshdconfigKeyword Port
 syn keyword sshdconfigKeyword PrintLastLog
@@ -243,23 +240,24 @@ syn keyword sshdconfigKeyword PubkeyAcceptedAlgorithms
 syn keyword sshdconfigKeyword PubkeyAcceptedKeyTypes
 syn keyword sshdconfigKeyword PubkeyAuthentication
 syn keyword sshdconfigKeyword PubkeyAuthOptions
-syn keyword sshdconfigKeyword RSAAuthentication
+syn keyword sshdconfigKeyword RDomain
 syn keyword sshdconfigKeyword RekeyLimit
 syn keyword sshdconfigKeyword RequiredRSASize
 syn keyword sshdconfigKeyword RevokedKeys
-syn keyword sshdconfigKeyword RDomain
 syn keyword sshdconfigKeyword RhostsRSAAuthentication
+syn keyword sshdconfigKeyword RSAAuthentication
 syn keyword sshdconfigKeyword SecurityKeyProvider
 syn keyword sshdconfigKeyword ServerKeyBits
 syn keyword sshdconfigKeyword SetEnv
 syn keyword sshdconfigKeyword ShowPatchLevel
-syn keyword sshdconfigKeyword StrictModes
 syn keyword sshdconfigKeyword StreamLocalBindMask
 syn keyword sshdconfigKeyword StreamLocalBindUnlink
+syn keyword sshdconfigKeyword StrictModes
 syn keyword sshdconfigKeyword Subsystem
 syn keyword sshdconfigKeyword SyslogFacility
 syn keyword sshdconfigKeyword TCPKeepAlive
 syn keyword sshdconfigKeyword TrustedUserCAKeys
+syn keyword sshdconfigKeyword UnusedConnectionTimeout
 syn keyword sshdconfigKeyword UseBlacklist
 syn keyword sshdconfigKeyword UseBlocklist
 syn keyword sshdconfigKeyword UseDNS
@@ -278,14 +276,13 @@ syn keyword sshdconfigKeyword XAuthLocation
 hi def link sshdconfigComment              Comment
 hi def link sshdconfigTodo                 Todo
 hi def link sshdconfigHostPort             sshdconfigConstant
-hi def link sshdconfigTime                 sshdconfigConstant
-hi def link sshdconfigNumber               sshdconfigConstant
+hi def link sshdconfigTime                 Number
+hi def link sshdconfigNumber               Number
 hi def link sshdconfigConstant             Constant
-hi def link sshdconfigYesNo                sshdconfigEnum
+hi def link sshdconfigYesNo                Boolean
 hi def link sshdconfigAddressFamily        sshdconfigEnum
 hi def link sshdconfigPrivilegeSeparation  sshdconfigEnum
 hi def link sshdconfigTcpForwarding        sshdconfigEnum
-hi def link sshdconfigRootLogin            sshdconfigEnum
 hi def link sshdconfigCiphers              sshdconfigEnum
 hi def link sshdconfigMAC                  sshdconfigEnum
 hi def link sshdconfigHostKeyAlgo          sshdconfigEnum
diff --git a/runtime/syntax/swayconfig.vim b/runtime/syntax/swayconfig.vim
index 69fe26d..55c5279 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 
-" Version: 1.0.2
-" Last Change: 2023-12-28
+" Version: 1.2.1
+" Last Change: 2024-04-14
 
 " References:
 " http://i3wm.org/docs/userguide.html#configuring
@@ -18,40 +18,33 @@ endif
 
 runtime! syntax/i3config.vim
 
-" i3 extensions
-syn keyword i3ConfigActionKeyword opacity urgent shortcuts_inhibitor splitv splith splitt contained
-syn keyword i3ConfigOption set plus minus allow deny csd v h t contained
+" Sway extensions to i3
+syn cluster i3ConfigCommand contains=i3ConfigCommand,i3ConfigAction,i3ConfigActionKeyword,@i3ConfigValue,i3ConfigColor,i3ConfigKeyword
+syn keyword i3ConfigActionKeyword opacity urgent shortcuts_inhibitor splitv splith splitt contained contained skipwhite nextgroup=i3ConfigOption
+syn keyword i3ConfigOption set plus minus allow deny csd v h t contained contained skipwhite nextgroup=i3ConfigOption,@i3ConfigValue
 
 syn keyword i3ConfigConditionProp app_id pid shell contained
 
 syn keyword i3ConfigWorkspaceDir prev_on_output next_on_output contained
 
-syn keyword swayConfigBindKeyword bindswitch bindgesture contained
-syn match i3ConfigBindArgument /--\(locked\|to-code\|no-repeat\|input-device=[:0-9a-zA-Z_/-]\+\|no-warn\)/ contained
-syn region i3ConfigBind start=/^\s*bind\(switch\|gesture\) / skip=/\\$/ end=/$/ contains=swayConfigBindKeyword,swayConfigBindswitch,swayConfigBindswitchArgument,swayConfigBindgesture,swayConfigBindgestureArgument,i3ConfigCriteria,i3ConfigAction,i3ConfigSeparator,i3ConfigActionKeyword,i3ConfigOption,i3ConfigString,i3ConfigNumber,i3ConfigVariable,i3ConfigBoolean keepend
+syn match i3ConfigBindArgument /--\(locked\|to-code\|no-repeat\|input-device=[^ '"]*\|no-warn\) / contained contains=i3ConfigShOper,@i3ConfigStrVar nextgroup=i3ConfigBindArgument,i3ConfigBindCombo
+syn region i3ConfigBindArgument start=/--input-device=['"]/ end=/\s/ contained contains=@i3ConfigIdent,i3ConfigShOper,i3ConfigString nextgroup=i3ConfigBindArgument,i3ConfigBindCombo
 
-syn match swayConfigBindBlockHeader /^\s*bind\(sym\|code\) .*{$/ contained contains=i3ConfigBindKeyword,i3ConfigBindArgument,i3ConfigParen
-syn match swayConfigBindBlockCombo /^\s\+\(--[a-z-]\+ \)*[$a-zA-Z0-9_+]\+ [a-z[]\@=/ contained contains=i3ConfigBindArgument,i3ConfigBindCombo
-syn region i3ConfigBind start=/^\s*bind\(sym\|code\) .*{$/ end=/^\s*}$/ contains=swayConfigBindBlockHeader,swayConfigBindBlockCombo,i3ConfigCriteria,i3ConfigAction,i3ConfigSeparator,i3ConfigActionKeyword,i3ConfigOption,i3ConfigString,i3ConfigNumber,i3ConfigVariable,i3ConfigBoolean,i3ConfigComment,i3ConfigParen fold keepend extend
-" fix for extra long bindsym blocks that would be parsed incorrectly when scrolling up
-syn region i3ConfigBlockOrphan start=/^\s\+\S/ skip=/^\s\|^$/ end=/^}\?/ contains=swayConfigBindBlockCombo,i3ConfigCriteria,i3ConfigAction,i3ConfigSeparator,i3ConfigActionKeyword,i3ConfigOption,i3ConfigString,i3ConfigNumber,i3ConfigVariable,i3ConfigBoolean,i3ConfigComment,i3ConfigParen keepend extend
+syn region i3ConfigBindCombo matchgroup=i3ConfigParen start=/{$/ end=/^\s*}$/ contained contains=i3ConfigBindArgument,i3ConfigBindCombo,i3ConfigComment fold keepend extend
+" hack for blocks with start outside parsing range
+syn region swayConfigBlockOrphan start=/^\s\+\(--[a-z-]\+ \)*[$a-zA-Z0-9_+]\+ [a-z[]/ skip=/\\$\|$\n^\s*}$/ end=/$/ contains=i3ConfigBindArgument,i3ConfigBindCombo,i3ConfigParen keepend extend
 
-syn keyword i3ConfigClientOpts focused_tab_title contained
-
-syn region swayConfigExecBlock start=/exec\(_always\)\? {/ end=/^}$/ contains=i3ConfigExecKeyword,i3ConfigExecAlwaysKeyword,i3ConfigShCommand,i3ConfigShDelim,i3ConfigShOper,i3ConfigShParam,i3ConfigNumber,i3ConfigString,i3ConfigVariable,i3ConfigComment fold keepend extend
+syn region i3ConfigExec start=/ {$/ end=/^}$/ contained contains=i3ConfigExecAction,@i3ConfigSh,i3ConfigComment fold keepend extend
 
 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 swayConfigI3Param /--i3/ contains=i3ConfigShParam skipwhite nextgroup=i3ConfigEdgeOpts
+syn keyword i3ConfigKeyword hide_edge_borders contained skipwhite nextgroup=swayConfigI3Param,i3ConfigEdgeOpts
 
-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
+syn keyword i3ConfigBarOpts swaybar_command contained skipwhite nextgroup=@i3ConfigSh
+syn region i3ConfigBarOpts matchgroup=i3ConfigBarOpts start=/gaps/ end=/$/ contained contains=@i3ConfigNumVar
+syn keyword i3ConfigBarOpts height pango_markup status_edge_padding status_padding wrap_scroll tray_bindcode tray_bindsym icon_theme contained skipwhite nextgroup=i3ConfigBarOptVals,@i3ConfigValue,i3ConfigShOper
 syn keyword i3ConfigBarOptVals overlay contained
 
 syn keyword i3ConfigExecActionKeyword swaymsg contained
@@ -59,77 +52,88 @@ syn keyword i3ConfigExecActionKeyword swaymsg contained
 " Sway-only options
 " Xwayland
 syn keyword swayConfigXOpt enable disable force contained
-syn match i3ConfigKeyword /^xwayland \w*$/ contains=swayConfigXOpt
+syn keyword i3ConfigKeyword xwayland contained skipwhite nextgroup=swayConfigXOpt
 
 " Inhibit idle
-syn keyword swayConfigInhibitKeyword inhibit_idle contained
 syn keyword swayConfigInhibitOpts focus fullscreen open none visible contained
-syn match i3ConfigAction /inhibit_idle \w*/ contained contains=swayConfigInhibitKeyword,swayConfigInhibitOpts
+syn keyword i3ConfigActionKeyword inhibit_idle contained skipwhite nextgroup=swayConfigInhibitOpts
 
 " Bindswitch
-syn match swayConfigBindswitchArgument /--\(locked\|no-warn\|reload\)/ contained
-syn keyword swayConfigBindswitchType lid tablet contained
+syn match swayConfigBindswitchArgument /--\(locked\|no-warn\|reload\) / contained nextgroup=swayConfigBindswitchArgument,swayConfigBindswitchType
+syn keyword swayConfigBindswitchType lid tablet contained nextgroup=swayConfigBindswitchCombo
 syn keyword swayConfigBindswitchState toggle contained
-syn match swayConfigBindswitch /\(lid\|tablet\):\(on\|off\|toggle\) / contained contains=swayConfigBindswitchType,i3ConfigColonOperator,swayConfigBindswitchState,i3ConfigBoolean
-syn region i3ConfigBind start=/^\s*bindswitch\s\+.*{$/ end=/^\s*}$/ contains=swayConfigBindKeyword,swayConfigBindswitch,swayConfigBindswitchArgument,i3ConfigNumber,i3ConfigVariable,i3ConfigAction,i3ConfigActionKeyword,i3ConfigOption,i3ConfigSeparator,i3ConfigString,i3ConfigCriteria,swayConfigOutputCommand,i3ConfigBoolean,i3ConfigComment,i3ConfigParen fold keepend extend
+syn match swayConfigBindswitchCombo /:\(on\|off\|toggle\) / contained contains=i3ConfigColonOperator,swayConfigBindswitchState,i3ConfigBoolean nextgroup=i3ConfigBind
+syn region swayConfigBindswitchType matchgroup=i3ConfigParen start=/{$/ end=/^\s*}$/ contained contains=swayConfigBindswitchArgument,swayConfigBindswitchType,i3ConfigComment fold keepend extend
+syn keyword i3ConfigBindKeyword bindswitch contained skipwhite nextgroup=swayConfigBindswitchArgument,swayConfigBindswitchType
+" hack for blocks with start outside parsing range
+syn region swayConfigBlockOrphan start=/^\s\+\(lid\|tablet\):/ skip=/\\$\|$\n^\s*}$/ end=/$/ contains=swayConfigBindswitchArgument,swayConfigBindswitchType,i3ConfigParen keepend extend
 
 " Bindgesture
-syn match swayConfigBindgestureArgument /--\(exact\|input-device=[:0-9a-zA-Z_/-]\+\|no-warn\)/ contained
+syn match swayConfigBindgestureArgument /--\(exact\|input-device=[:0-9a-zA-Z_/-]\+\|no-warn\) / contained nextgroup=swayConfigBindgestureArgument,swayConfigBindgestureCombo
 syn keyword swayConfigBindgestureType hold swipe pinch contained
 syn keyword swayConfigBindgestureDir up down left right inward outward clockwise counterclockwise contained
-syn match swayConfigBindgesture /\(hold\(:[1-5]\)\?\|swipe\(:[3-5]\)\?\(:up\|:down\|:left\|:right\)\?\|pinch\(:[2-5]\)\?:\(+\?\(inward\|outward\|clockwise\|counterclockwise\|up\|down\|left\|right\)\)\+\) / contained contains=i3ConfigNumber,swayConfigBindgestureType,i3ConfigColonOperator,swayConfigBindgestureDir,i3ConfigBindModifier
-syn region i3ConfigBind start=/^\s*bindgesture\s\+.*{$/ end=/^\s*}$/ contains=swayConfigBindKeyword,swayConfigBindgesture,swayConfigBindgestureArgument,i3ConfigCriteria,i3ConfigAction,i3ConfigSeparator,i3ConfigActionKeyword,i3ConfigOption,i3ConfigString,i3ConfigNumber,i3ConfigVariable,i3ConfigBoolean,i3ConfigParen fold keepend extend
+syn match swayConfigBindgestureCombo /\(hold\(:[1-5]\)\?\|swipe\(:[3-5]\)\?\(:up\|:down\|:left\|:right\)\?\|pinch\(:[2-5]\)\?:\(+\?\(inward\|outward\|clockwise\|counterclockwise\|up\|down\|left\|right\)\)\+\) / contained contains=i3ConfigNumber,swayConfigBindgestureType,i3ConfigColonOperator,swayConfigBindgestureDir,i3ConfigBindModifier nextgroup=swayConfigBindgestureCombo,i3ConfigBind
+syn region swayConfigBindgestureCombo matchgroup=i3ConfigParen start=/{$/ end=/^\s*}$/ contained contains=swayConfigBindgestureArgument,swayConfigBindgestureCombo,i3ConfigComment fold keepend extend
+syn keyword i3ConfigBindKeyword bindgesture contained skipwhite nextgroup=swayConfigBindgestureArgument,swayConfigBindgestureCombo
+" hack for blocks with start outside parsing range
+syn region swayConfigBlockOrphan start=/^\s\+\(--[a-z-]\+ \)*\(hold\|swipe\|pinch\):/ skip=/\\$\|$\n^\s*}$/ end=/$/ contains=swayConfigBindgestureArgument,swayConfigBindgestureCombo,i3ConfigParen keepend extend
 
 " Tiling drag threshold
-syn match i3ConfigKeyword /^tiling_drag_threshold \d\+$/ contains=i3ConfigNumber
-
 " Titlebar commands
-syn match i3ConfigKeyword /^titlebar_border_thickness \(\d\+\|\$\S\+\)$/ contains=i3ConfigNumber,i3ConfigVariable
-syn match i3ConfigKeyword /^titlebar_padding \(\d\+\|\$\S\+\)\( \d\+\)\?$/ contains=i3ConfigNumber,i3ConfigVariable
+syn keyword i3ConfigKeyword tiling_drag_threshold titlebar_border_thickness contained skipwhite nextgroup=@i3ConfigNumVar
+syn match i3ConfigKeyword /^titlebar_padding \(\d\+\|\$\S\+\)\( \d\+\)\?$/ contains=@i3ConfigNumVar
 
-syn match swayConfigDeviceOps /[*,:;]/ contained
+syn match swayConfigDeviceOper /[*:;!]/ contained
 
 " Input devices
-syn keyword swayConfigInputKeyword input contained
-syn keyword swayConfigInputType touchpad pointer keyboard touch tablet_tool tablet_pad switch contained
-syn match swayConfigInputTypePair /\/ contained contains=i3ConfigColonOperator,swayConfigInputType
-syn region swayConfigInputStart start=/^input / end=/\s/ contained contains=swayConfigInputKeyword,swayConfigInputTypePair,i3ConfigString keepend extend
-syn keyword swayConfigInputOpts xkb_layout xkb_variant xkb_rules xkb_switch_layout xkb_numlock xkb_file xkb_capslock xkb_model repeat_delay repeat_rate map_to_output map_to_region map_from_region tool_mode accel_profile dwt dwtp drag_lock drag click_method middle_emulation tap events calibration_matrix natural_scroll left_handed pointer_accel scroll_button scroll_factor scroll_method tap_button_map contained
-syn keyword swayConfigInputOptVals absolute relative adaptive flat none button_areas clickfinger toggle two_finger edge on_button_down lrm lmr next prev pen eraser brush pencil airbrush disabled_on_external_mouse disable contained
-syn match swayConfigXkbOptsPairVal /:[0-9a-z_-]\+/ contained contains=i3ConfigColonOperator
-syn match swayConfigXkbOptsPair /[a-z]\+:[0-9a-z_-]\+/ contained contains=swayConfigXkbOptsPairVal
-syn match swayConfigInputXkbOpts /xkb_options \([a-z]\+:[0-9a-z_-]\+,\?\)\+/ contained contains=swayConfigXkbOptsPair,swayConfigDeviceOps
-syn region i3ConfigAction start=/input/ skip=/\\$/ end=/\([,;]\|$\)/ contained contains=swayConfigInputStart,swayConfigInputXkbOpts,swayConfigInputOpts,swayConfigInputOptVals,i3ConfigVariable,i3ConfigNumber,i3ConfigBoolean,swayConfigDeviceOps keepend transparent
-syn region i3ConfigInput start=/^input/ skip=/\\$/ end=/$/ contains=swayConfigInputStart,swayConfigInputXkbOpts,swayConfigInputOpts,swayConfigInputOptVals,i3ConfigVariable,i3ConfigNumber,i3ConfigBoolean,swayConfigDeviceOps keepend
-syn region i3ConfigInput start=/^input .* {/ end=/}$/ contains=swayConfigInputStart,swayConfigInputXkbOpts,swayConfigInputOpts,swayConfigInputOptVals,i3ConfigVariable,i3ConfigNumber,i3ConfigBoolean,swayConfigDeviceOps,i3ConfigParen keepend extend
+syn keyword swayConfigInputOpts xkb_variant xkb_rules xkb_switch_layout xkb_numlock xkb_file xkb_capslock xkb_model repeat_delay repeat_rate map_to_output map_to_region map_from_region tool_mode accel_profile dwt dwtp drag_lock drag click_method middle_emulation tap events calibration_matrix natural_scroll left_handed pointer_accel scroll_button scroll_factor scroll_method tap_button_map contained skipwhite nextgroup=swayConfigInputOptVals,@i3ConfigValue
+syn keyword swayConfigInputOptVals absolute relative adaptive flat none button_areas clickfinger toggle two_finger edge on_button_down lrm lmr next prev pen eraser brush pencil airbrush disabled_on_external_mouse disable enable contained skipwhite nextgroup=swayConfigInputOpts,@i3ConfigValue,swayConfigDeviceOper
+syn match swayConfigDeviceOper /,/ contained nextgroup=swayConfigXkbOptsPair,swayConfigXkbLayout
+syn match swayConfigXkbLayout /[a-z]\+/ contained nextgroup=swayConfigDeviceOper
+syn keyword swayConfigInputOpts xkb_layout contained skipwhite nextgroup=swayConfigXkbLayout
+syn match swayConfigXkbOptsPairVal /[0-9a-z_-]\+/ contained contains=i3ConfigNumber skipwhite nextgroup=swayConfigDeviceOper,swayConfigInputOpts
+syn match swayConfigXkbOptsPair /[a-z]\+:/ contained contains=i3ConfigColonOperator nextgroup=swayConfigXkbOptsPairVal
+syn keyword swayConfigInputOpts xkb_options contained skipwhite nextgroup=swayConfigXkbOptsPair
+
+syn region swayConfigInput start=/\s/ skip=/\\$/ end=/\ze[,;]\|$/ contained contains=swayConfigInputOpts,@i3ConfigValue keepend
+syn region swayConfigInput matchgroup=i3ConfigParen start=/ {$/ end=/^}$/ contained contains=swayConfigInputOpts,@i3ConfigValue,i3ConfigComment keepend extend
+syn keyword swayConfigInputType touchpad pointer keyboard touch tablet_tool tablet_pad switch contained nextgroup=swayConfigInput
+syn match swayConfigInputIdent /type:!\?/ contained contains=swayConfigDeviceOper nextgroup=swayConfigInputType
+syn match swayConfigInputIdent /[^t '"]\S*/ contained contains=i3ConfigOutputIdent nextgroup=swayConfigInput
+syn region swayConfigInputIdent start=/['"]/ end=/\ze/ contained contains=i3ConfigOutputIdent nextgroup=swayConfigInput
+syn keyword i3ConfigKeyword input contained skipwhite nextgroup=swayConfigInputIdent
 
 " Seat
-syn keyword swayConfigSeatKeyword seat contained
-syn keyword swayConfigSeatOpts attach cursor fallback hide_cursor idle_inhibit idle_wake keyboard_grouping shortcuts_inhibitor pointer_constraint xcursor_theme contained
-syn match swayConfigSeatOptVals /when-typing/ contained
-syn keyword swayConfigSeatOptVals move set press release none smart activate deactivate toggle escape enable disable contained
-syn region i3ConfigAction start=/seat/ skip=/\\$/ end=/\([,;]\|$\)/ contained contains=swayConfigSeatKeyword,i3ConfigString,i3ConfigNumber,i3ConfigBoolean,swayConfigSeatOptVals,swayConfigSeatOpts,swayConfigDeviceOps,swayConfigInputType keepend transparent
-syn region swayConfigSeat start=/seat/ skip=/\\$/ end=/$/ contains=swayConfigSeatKeyword,i3ConfigString,i3ConfigNumber,i3ConfigBoolean,swayConfigSeatOptVals,swayConfigSeatOpts,swayConfigDeviceOps,swayConfigInputType keepend
-syn region swayConfigSeat start=/seat .* {$/ end=/}$/ contains=swayConfigSeatKeyword,i3ConfigString,i3ConfigNumber,i3ConfigBoolean,swayConfigSeatOptVals,swayConfigSeatOpts,swayConfigDeviceOps,i3ConfigParen,swayConfigInputType keepend extend
+syn keyword swayConfigSeatOpts cursor fallback hide_cursor keyboard_grouping shortcuts_inhibitor pointer_constraint xcursor_theme contained skipwhite nextgroup=swayConfigSeatOptVals,@i3ConfigValue
+syn match swayConfigInputTypeSeq / \w\+/ contained contains=swayConfigInputType nextgroup=swayConfigInputTypeSeq,swayConfigSeatOpts
+syn keyword swayConfigSeatOpts idle_inhibit idle_wake contained nextgroup=swayConfigInputTypeSeq
+syn keyword swayConfigSeatOpts attach contained skipwhite nextgroup=swayConfigSeatIdent
+syn match swayConfigSeatOptVals /when-typing/ contained skipwhite nextgroup=swayConfigSeatOptVals
+syn keyword swayConfigSeatOptVals move set press release none smart activate deactivate toggle escape enable disable contained skipwhite nextgroup=swayConfigSeatOpts
+syn region swayConfigSeat start=/\s/ skip=/\\$/ end=/\ze[,;]\|$/ contained contains=swayConfigSeatOpts,@i3ConfigValue keepend
+syn region swayConfigSeat matchgroup=i3ConfigParen start=/ {$/ end=/^}$/ contained contains=swayConfigSeatOpts,@i3ConfigValue,i3ConfigComment keepend extend
+syn match swayConfigSeatIdent /[^ ]\+/ contained contains=i3ConfigOutputIdent skipwhite nextgroup=swayConfigSeat
+syn keyword i3ConfigKeyword seat contained skipwhite nextgroup=swayConfigSeatIdent
 
 " Output monitors
-syn keyword swayConfigOutputKeyword output contained
-syn keyword swayConfigOutputOpts mode resolution res modeline position pos scale scale_filter subpixel background bg transform disable enable power dpms max_render_time adaptive_sync render_bit_depth contained
-syn keyword swayConfigOutputOptVals linear nearest smart rgb bgr vrgb vbgr none normal flipped fill stretch fit center tile solid_color clockwise anticlockwise toggle contained
-syn match swayConfigOutputOptVals /--custom\|flipped-\(90\|180\|270\)/ contained
-syn match swayConfigOutputFPS /@[0-9.]\+Hz/ contained
-syn match swayConfigOutputMode / [0-9]\+x[0-9]\+\(@[0-9.]\+Hz\)\?/ contained contains=swayConfigOutputFPS
-syn region i3ConfigAction start=/output/ skip=/\\$/ end=/\([,;]\|$\)/ contained contains=swayConfigOutputKeyword,swayConfigOutputMode,swayConfigOutputOpts,swayConfigOutputOptVals,i3ConfigVariable,i3ConfigNumber,i3ConfigString,i3ConfigColor,i3ConfigBoolean,swayConfigDeviceOps keepend transparent
-syn region swayConfigOutput start=/^output/ skip=/\\$/ end=/$/  contains=swayConfigOutputKeyword,swayConfigOutputMode,swayConfigOutputOpts,swayConfigOutputOptVals,i3ConfigVariable,i3ConfigNumber,i3ConfigString,i3ConfigColor,i3ConfigBoolean,swayConfigDeviceOps keepend
-syn region swayConfigOutput start=/^output .* {$/ end=/}$/  contains=swayConfigOutputKeyword,swayConfigOutputMode,swayConfigOutputOpts,swayConfigOutputOptVals,i3ConfigVariable,i3ConfigNumber,i3ConfigString,i3ConfigColor,i3ConfigBoolean,swayConfigDeviceOps,i3ConfigParen keepend extend
+syn keyword swayConfigOutputOpts mode resolution res modeline position pos scale scale_filter subpixel transform disable enable power dpms max_render_time adaptive_sync render_bit_depth contained skipwhite nextgroup=swayConfigOutputOptVals,@i3ConfigValue,swayConfigOutputMode
+syn keyword swayConfigOutputOptVals linear nearest smart rgb bgr vrgb vbgr none clockwise anticlockwise toggle contained skipwhite nextgroup=swayConfigOutputOptVals,@i3ConfigValue
+syn keyword swayConfigOutputBgVals solid_color fill stretch fit center tile contained skipwhite nextgroup=@i3ConfigColVar
+syn match swayConfigOutputBg /[#$]\S\+ solid_color/ contained contains=@i3ConfigColVar,swayConfigOutputBgVals
+syn match swayConfigOutputBg /[^b# '"]\S*/ contained contains=i3ConfigShOper skipwhite nextgroup=swayConfigOutputBgVals
+syn region swayConfigOutputBg start=/['"]/ end=/\ze/ contained contains=@i3ConfigIdent skipwhite nextgroup=swayConfigOutputBgVals
+syn keyword swayConfigOutputOpts bg background contained skipwhite nextgroup=swayConfigOutputBg
+syn match swayConfigOutputFPS /@[0-9.]\+Hz/ contained skipwhite nextgroup=swayConfigOutputOpts
+syn match swayConfigOutputMode /\(--custom \)\?[0-9]\+x[0-9]\+/ contained contains=i3ConfigShParam skipwhite nextgroup=swayConfigOutputFPS,swayConfigOutputOpts
+syn match swayConfigOutputOptVals /\(flipped-\)\?\(90\|180\|270\)\|flipped\|normal/ contained contains=i3ConfigNumber skipwhite nextgroup=swayConfigOutputOptsVals
+syn region swayConfigOutput start=/\s/ skip=/\\$/ end=/\ze[,;]\|$/ contained contains=swayConfigOutputOpts,@i3ConfigValue keepend
+syn region swayConfigOutput matchgroup=i3ConfigParen start=/ {$/ end=/^}$/ contained contains=swayConfigOutputOpts,@i3ConfigValue,i3ConfigComment keepend extend
+syn match swayConfigOutputIdent /[^ ]\+/ contained contains=i3ConfigOutputIdent skipwhite nextgroup=swayConfigOutput
+syn keyword i3ConfigKeyword output contained skipwhite nextgroup=swayConfigOutputIdent
 
 " 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
 hi def link swayConfigInhibitOpts            i3ConfigOption
 hi def link swayConfigBindswitchArgument     i3ConfigBindArgument
 hi def link swayConfigBindswitchType         i3ConfigMoveType
@@ -137,20 +141,18 @@ hi def link swayConfigBindswitchState        i3ConfigMoveDir
 hi def link swayConfigBindgestureArgument    i3ConfigBindArgument
 hi def link swayConfigBindgestureType        i3ConfigMoveType
 hi def link swayConfigBindgestureDir         i3ConfigMoveDir
-hi def link swayConfigDeviceOps              i3ConfigOperator
-hi def link swayConfigInputKeyword           i3ConfigCommand
+hi def link swayConfigDeviceOper             i3ConfigOperator
 hi def link swayConfigInputType              i3ConfigMoveType
-hi def link swayConfigInputTypePair          i3ConfigMoveDir
+hi def link swayConfigInputIdent             i3ConfigMoveDir
 hi def link swayConfigInputOptVals           i3ConfigShParam
 hi def link swayConfigInputOpts              i3ConfigOption
-hi def link swayConfigXkbOptsPairVal         i3ConfigString
+hi def link swayConfigXkbOptsPairVal         i3ConfigParamLine
 hi def link swayConfigXkbOptsPair            i3ConfigShParam
-hi def link swayConfigInputXkbOpts           i3ConfigOption
-hi def link swayConfigSeatKeyword            i3ConfigCommand
+hi def link swayConfigXkbLayout              i3ConfigParamLine
 hi def link swayConfigSeatOptVals            swayConfigInputOptVals
 hi def link swayConfigSeatOpts               swayConfigInputOpts
-hi def link swayConfigOutputKeyword          i3ConfigCommand
 hi def link swayConfigOutputOptVals          swayConfigInputOptVals
+hi def link swayConfigOutputBgVals           swayConfigInputOptVals
 hi def link swayConfigOutputOpts             swayConfigInputOpts
 hi def link swayConfigOutputFPS              Constant
 hi def link swayConfigOutputMode             i3ConfigNumber
diff --git a/runtime/syntax/testdir/dumps/java_comments_00.dump b/runtime/syntax/testdir/dumps/java_comments_00.dump
index bc1f359..a629664 100644
--- a/runtime/syntax/testdir/dumps/java_comments_00.dump
+++ b/runtime/syntax/testdir/dumps/java_comments_00.dump
@@ -1,20 +1,20 @@
->/+0#0000e05#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |u|n|l|e|t|!| |g+0fd7ff255|:+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+0fd7ff255|:+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#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |u|n|l|e|t|!| |g+0fd7ff255|:+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#0000000&
+|/+0#0000e05&@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |u|n|l|e|t|!| |g+0fd7ff255|:+0&#ffffff0|j|a|v|a|_|n|o|_|t|a|b|_|s|p|a|c|e|_|e|r@1|o|r| +0#0000000&@24
 |/+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
+|/+0#0000e05&@1| |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| ||| |h|i|g|h|l|i|g|h|t| |l|i|n|k| |j+0&#ffd7d7255|a|v|a|C|o|m@1|e|n|t|S|t|a|r|t| +0&#ffffff0|T+0&#ffd7d7255|o|d|o| +0#0000000#ffffff0@3
+@75
+@75
+@75
+@75
+|/+0#0000e05&|*@1|/| +0#0000000&|/+0#0000001#ffff4012|*|/+0#0000e05#ffffff0| |*+0#0000001#ffff4012|/| +0#0000000#ffffff0|/+0#0000001#ffff4012|*| +0#0000e05#ffffff0|/+0#ffffff16#ff404010|*+0#0000001#ffff4012|/| +0#0000000#ffffff0|/+0#0000001#ffff4012|*|/+0#ffffff16#ff404010|*+0#0000001#ffff4012|/| +0#0000000#ffffff0|/+0#0000001#ffff4012|*|/+0#0000e05#ffffff0|/+0#ffffff16#ff404010|*+0#0000001#ffff4012|/| +0#0000000#ffffff0|/+0#0000e05&|*@1| +0#e000e06&|C|o|m@1|e|n|t| |t|e|s|t|s|.| +0#0000000&@24
+| +0#0000e05&|*| |<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|T+0#0000e05&|h|e|r|e| |i|s| |n|o| |e|n|t|r|y| |p|o|i|n|t| |m|e|t|h|o|d| |{+0#e000e06&|@|c|o|d|e| |m|a|i|n|}|:+0#0000e05&| +0#0000000&@24
+| +0#0000e05&|*| |{+0#e000e06&|@|s|n|i|p@1|e|t| |f+0#00e0003&|i|l|e| +0#e000e06&|=| |S+0#e000002&|n|i|p@1|e|t|s|.|j|a|v|a| +0#e000e06&|r+0#00e0003&|e|g|i|o|n| +0#e000e06&|=| |m+0#e000002&|a|i|n| +0#e000e06&|i+0#00e0003&|d| +0#e000e06&|=| |_+0#e000002&|0|1|}+0#e000e06&| +0#0000000&@17
+| +0#0000e05&|*| |<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|T+0#0000e05&|h|e|r|e| |i|s| |n|o| |t|e|x|t|u|a|l| |r|e|p|r|e|s|e|n|t|a|t|i|o|n|:| +0#0000000&@33
+| +0#0000e05&|*| |{+0#e000e06&|@|s|n|i|p@1|e|t| |c+0#00e0003&|l|a|s@1| +0#e000e06&|=| |S+0#e000002&|n|i|p@1|e|t|s| +0#e000e06&|r+0#00e0003&|e|g|i|o|n| +0#e000e06&|=| |t+0#e000002&|o|S|t|r|i|n|g| +0#e000e06&|i+0#00e0003&|d| +0#e000e06&|=| |_+0#e000002&|0|2|}+0#e000e06&| +0#0000e05&|*|/| +0#0000000&@14
 |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
+|{| @73
+@4|/+0#0000e05&|*@1| +0#e000e06&|N|o|-|o|p|,| |i|.| +0#0000e05&|e+0fd7ff255|.+0&#ffffff0| |n+0fd7ff255|o| +0&#ffffff0|o|p|e|r|a|t|i|o|n|.| +0#0000000&@40
+| +0#0000e05&@3|*| |(|{+0#e000e06&|@|l|i|t|e|r|a|l|@|l|i|t|e|r|a|l|}| +0#0000e05&|m|a|y| |b|e| |u|s|e|d| |w|i|t|h| |{+0#e000e06&|@|c|o|d|e| |.|}| +0#0000e05&|f|o|r| |c|o|n|t|r|a|c|t|i|o|n|.|)| +0#0000000&@4
+| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45
+@4|V|o|i|d| |n|o|O|p|1|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41
 @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
index 9f92f83..77d7c4a 100644
--- a/runtime/syntax/testdir/dumps/java_comments_01.dump
+++ b/runtime/syntax/testdir/dumps/java_comments_01.dump
@@ -1,20 +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| 
+|c+0#00e0003#ffffff0|l|a|s@1| +0#0000000&|C|o|m@1|e|n|t|s|T|e|s|t|s| @55
+|{| @73
+@4|/+0#0000e05&|*@1| +0#e000e06&|N|o|-|o|p|,| |i|.| +0#0000e05&|e+0fd7ff255|.+0&#ffffff0| |n+0fd7ff255|o| +0&#ffffff0|o|p|e|r|a|t|i|o|n|.| +0#0000000&@40
+| +0#0000e05&@3|*| |(|{+0#e000e06&|@|l|i|t|e|r|a|l|@|l|i|t|e|r|a|l|}| +0#0000e05&|m|a|y| |b|e| |u|s|e|d| |w|i|t|h| |{+0#e000e06&|@|c|o|d|e| |.|}| +0#0000e05&|f|o|r| |c|o|n|t|r|a|c|t|i|o|n|.|)| +0#0000000&@4
+| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45
+@4>V|o|i|d| |n|o|O|p|1|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41
+@75
+@4|/+0#0000e05&|*@1| +0#e000e06&|N|o|-|o|p|,| |i|.|e|.| +0#0000e05&|n|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@41
+| +0#0000e05&@3|*| |(|{+0#e000e06&|@|l|i|t|e|r|a|l|<|!|-@1| |-@1|>|}| +0#0000e05&|m|a|y| |b|e| |u|s|e|d| |a|f|t|e|r| |{+0#e000e06&|@|c|o|d|e| |.|}| +0#0000e05&|f|o|r| |c|o|n|t|r|a|c|t|i|o|n|.|)| +0#0000000&@3
+| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45
+@4|V|o|i|d| |n|o|O|p|2|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41
+@75
+@4|/+0#0000e05&|*@1| +0#e000e06&|N|o|-|o|p|,| |i|.|e|\|u+0&#ffd7d7255|0@1|2|e| +0&#ffffff0|n|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@36
+| +0#0000e05&@3|*| |(|{+0#e000e06&|@|l|i|t|e|r|a|l|\|u|0@1|5|c|u|0@1|2|e|}| +0#0000e05&|i|s| |p|r|o|c|e|s@1|e|d| |e|a|r|l|y|,| |u|s|e| |a|l|t|e|r|n|a|t|i|v|e|s|.|)| +0#0000000&@7
+| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45
+@4|V|o|i|d| |n|o|O|p|3|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41
+@75
+@4|/+0#0000e05&|*@1| +0#e000e06&|N|o|-|o|p|,| |i|.|e|{|@|l|i|t|e|r|a|l| |.|}| |n|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@30
+| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45
+@57|1|9|,|2|-|5| @7|1|8|%| 
diff --git a/runtime/syntax/testdir/dumps/java_comments_02.dump b/runtime/syntax/testdir/dumps/java_comments_02.dump
new file mode 100644
index 0000000..008a3e0
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_comments_02.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#ffffff0@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45
+@4|V|o|i|d| |n|o|O|p|4|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41
+@75
+@4|/+0#0000e05&|*@1| +0#e000e06&|N|o|-|o|p|,| |i|.|e|.|<+0#0000e05&|!|-@1| |-@1|>| +0#e000e06&|n|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@33
+| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45
+@4>V|o|i|d| |n|o|O|p|5|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41
+@75
+@4|/+0#0000e05&|*@1| +0#e000e06&|N|o|-|o|p|,| |i|.|e|.|&|n|b|s|p|;|n|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@36
+| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|{+0#e000e06&|@|c|o|d|e| |n|u|l@1|}| +0#0000e05&|*|/| +0#0000000&@45
+@4|V|o|i|d| |n|o|O|p|6|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41
+@75
+@4|/+0#0000e05&|*@1| |{+0#e000e06&|@|r|e|t|u|r|n| |{|@|c|o|d|e| |n|u|l@1|}|,| |w|i|t|h| |n|o|-|o|p|,| |i|.|e|.| |n|o| |o|p|e|r|a|t|i|o|n|}| |*+0#0000e05&|/| +0#0000000&@10
+@4|V|o|i|d| |n|o|O|p|7|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41
+@75
+@4|/+0#0000e05&|*@1| |{+0#e000e06&|@|r|e|t|u|r|n| |{|@|c|o|d|e| |n|u|l@1|}|,| |w|i|t|h| |n|o|-|o|p|,| |i|.|e|.| |n|o| |o|p|e|r|a|t|i|o|n|}|.@1| |*+0#0000e05&|/| +0#0000000&@8
+@4|V|o|i|d| |n|o|O|p|8|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41
+@75
+@4|/+0#0000e05&|*@1| |{+0#e000e06&|@|r|e|t|u|r|n| |{|@|c|o|d|e| |n|u|l@1|}|,| |w|i|t|h| |n|o|-|o|p|,| |i|.|e|.| |n|o| |o|p|e|r|a|t|i|o|n|}| |.| |.| |*+0#0000e05&|/| +0#0000000&@6
+@4|V|o|i|d| |n|o|O|p|9|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41
+@57|3|7|,|2|-|5| @7|4|3|%| 
diff --git a/runtime/syntax/testdir/dumps/java_comments_03.dump b/runtime/syntax/testdir/dumps/java_comments_03.dump
new file mode 100644
index 0000000..f3f8d56
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_comments_03.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@3|V|o|i|d| |n|o|O|p|9|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}| @41
+@75
+@4|/+0#0000e05&|*@1| +0#e000e06&|R|e|t|u|r|n|s| |a|n| |e|m|p|t|y| |s|t|r|i|n|g| |f|o|r| |a|n| |@|O|v|e|r@1|i|d|e| |a|n@1|o|t|a|t|e|d| |m|e|t|h|o|d| +0#0000000&@9
+| +0#0000e05&@3|*| +0#e000e06&|(|s|e@1| |C|h|a|p|t|e|r| |9|.|6|.|4|.|4| |{|@|l|i|t|e|r|a|l| |@|O|v|e|r@1|i|d|e|}| |i|n| |a| |J|a|v|a| |L|a|n|g|u|a|g|e| +0#0000000&@8
+| +0#0000e05&@3|*| +0#e000e06&|S|p|e|c|i|f|i|c|a|t|i|o|n|)| |o|v|e|r@1|i|d@1|e|n| |f|r|o|m| |<+0#00e0e07&|c+0#af5f00255&|o|d|e|>+0#00e0e07&|j+0#e000e06&|a|v|a|.|l+0&#ffd7d7255|a|n|g|.+0&#ffffff0|O|b|j|e|c|t|<+0#00e0e07&|/|c+0#af5f00255&|o|d|e|>+0#00e0e07&| +0#0000000&@8
+| +0#0000e05&@3>*| +0#0000000&@69
+| +0#0000e05&@3|*| |@+0#e000e06&|r|e|t|u|r|n| +0#0000e05&|a|n| |e|m|p|t|y| |s|t|r|i|n|g| |*|/@2| |N|o| |p|e|r|i|o|d| |f|o|r| |t|h|e| |a|b|o|v|e| |s|u|m@1|a|r|y|!| +0#0000000&@7
+@4|@+0#e000e06&|O|v|e|r@1|i|d|e| +0#0000000&|p+0#00e0003&|u|b|l|i|c| +0#0000000&|S|t|r|i|n|g| |t|o|S|t|r|i|n|g|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&@1|;+0#0000000&| |}| @21
+|}| @73
+@75
+|/+0#0000e05&@1| |j+0&#ffd7d7255|a|v|a|d|o|c| +0&#ffffff0|-@1|s|n|i|p@1|e|t|-|p|a|t|h| |.| |-@1|s|o|u|r|c|e|-|p|a|t|h| |.| |-|d| |/|t+0&#ffd7d7255|m|p|/+0&#ffffff0|d|o|c|/| |-|p|a|c|k|a|g|e| |\| +0#0000000&@7
+|/+0#0000e05&@1| +0#ffffff16#ff404010| +0#0000e05#ffffff0|-|t|a|g| |'|j+0&#ffd7d7255|l|s|:+0&#ffffff0|a|:|S|e@1| |J|a|v|a| |L|a|n|g|u|a|g|e| |S|p|e|c|i|f|i|c|a|t|i|o|n|:|'| |S|n|i|p@1|e|t|s|.|j|a|v|a| +0#0000000&@11
+|/+0#0000e05&|*@1| +0#e000e06&|S|n|i|p@1|e|t|s| |f|o|r| |c|o|m@1|e|n|t| |t|e|s|t|s|.| +0#0000e05&|*|/| +0#0000000&@40
+|c+0#00e0003&|l|a|s@1| +0#0000000&|S|n|i|p@1|e|t|s| @60
+|{| @2|/+0#0000001#ffff4012|*| +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#0000001#ffff4012|/| +0#0000000#ffffff0@14
+@4|/+0#0000e05&|*@1| +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&@3
+| +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
+@57|5@1|,|2|-|5| @7|6|9|%| 
diff --git a/runtime/syntax/testdir/dumps/java_comments_04.dump b/runtime/syntax/testdir/dumps/java_comments_04.dump
new file mode 100644
index 0000000..01703a8
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_comments_04.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#ffffff0@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#0000e05&|*|/| +0#0000000&@28
+@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#ffffff16#ff404010@4| +0#0000000#ffffff0@42
+@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| +0#ffffff16#ff404010| +0#0000000#ffffff0@62
+@75
+@4|/+0#0000e05&|*@1| |{+0#e000e06&|@|r|e|t|u|r|n| |a|n| |e|m|p|t|y| |s|t|r|i|n|g|}| +0#ffffff16#ff404010@2| +0#0000000#ffffff0@38
+| +0#0000e05&@4|*| +0#e000e06&|@|s|e@1| |<+0#00e0e07&|a+0#af5f00255&| +0#00e0e07&|h+0#00e0003&|r|e|f|=+0#00e0e07&|"+0#e000002&|h|t@1|p|s|:|/@1|d|o|c|s|.|o|r|a|c|l|e|.|c|o|m|/|j|a|v|a|s|e|/|s|p|e|c|s|/|j|l|s|/|s|e|2|1|/|h|t|m|l|/|j|l|s
+|-|3|.|h|t|m|l|#|j|l|s|-|3|.|1|0|.|5|"|>+0#00e0e07&|3+8#e000e06&|.|1|0|.|5| |S|t|r|i|n|g| |L|i|t|e|r|a|l|s|<+0#00e0e07&|/|a+0#af5f00255&|>+0#00e0e07&| +0#0000000&@28
+| +0#0000e05&@4|*| +0#e000e06&|@|s|e@1| |O+0#00e0e07&|b|j|e|c|t|#|t|o|S|t|r|i|n|g|(|)| +0#0000000&|*+0#e000e06&|/| +0#0000000&@42
+@4|/+0#0000e05&@1| |@+0#0000000&|s|t|a|r|t| +0#0000e05&|r+0#00e0003&|e|g|i|o|n| +0#0000e05&|=| |t+0#e000002&|o|S|t|r|i|n|g| +0#ffffff16#ff404010| +0#0000000#ffffff0@42
+@57|7|3|,|3|-|6| @7|9|3|%| 
diff --git a/runtime/syntax/testdir/dumps/java_comments_99.dump b/runtime/syntax/testdir/dumps/java_comments_99.dump
index 024dc48..1efc20e 100644
--- a/runtime/syntax/testdir/dumps/java_comments_99.dump
+++ b/runtime/syntax/testdir/dumps/java_comments_99.dump
@@ -1,20 +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#ffffff0@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
+| +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#0000e05&|*|/| +0#0000000&@28
+@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#ffffff16#ff404010@4| +0#0000000#ffffff0@42
 @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
+@4|/+0#0000e05&@1| |@+0#0000000&|e|n|d| +0#ffffff16#ff404010| +0#0000000#ffffff0@62
+@75
+@4|/+0#0000e05&|*@1| |{+0#e000e06&|@|r|e|t|u|r|n| |a|n| |e|m|p|t|y| |s|t|r|i|n|g|}| +0#ffffff16#ff404010@2| +0#0000000#ffffff0@38
+| +0#0000e05&@4|*| +0#e000e06&|@|s|e@1| |<+0#00e0e07&|a+0#af5f00255&| +0#00e0e07&|h+0#00e0003&|r|e|f|=+0#00e0e07&|"+0#e000002&|h|t@1|p|s|:|/@1|d|o|c|s|.|o|r|a|c|l|e|.|c|o|m|/|j|a|v|a|s|e|/|s|p|e|c|s|/|j|l|s|/|s|e|2|1|/|h|t|m|l|/|j|l|s
+|-|3|.|h|t|m|l|#|j|l|s|-|3|.|1|0|.|5|"|>+0#00e0e07&|3+8#e000e06&|.|1|0|.|5| |S|t|r|i|n|g| |L|i|t|e|r|a|l|s|<+0#00e0e07&|/|a+0#af5f00255&|>+0#00e0e07&| +0#0000000&@28
+| +0#0000e05&@4|*| +0#e000e06&|@|s|e@1| |O+0#00e0e07&|b|j|e|c|t|#|t|o|S|t|r|i|n|g|(|)| +0#0000000&|*+0#e000e06&|/| +0#0000000&@42
+@4|/+0#0000e05&@1| |@+0#0000000&|s|t|a|r|t| +0#0000e05&|r+0#00e0003&|e|g|i|o|n| +0#0000e05&|=| |t+0#e000002&|o|S|t|r|i|n|g| +0#ffffff16#ff404010| +0#0000000#ffffff0@42
+@4|/+0#0000e05&@1| |@+0#0000000&|r|e|p|l|a|c|e| +0#0000e05&|s+0#00e0003&|u|b|s|t|r|i|n|g| +0#0000e05&|=| |'+0#e000002&|"@1|'| +0#0000e05&|r+0#00e0003&|e|p|l|a|c|e|m|e|n|t| +0#0000e05&|=| |"+0#e000002&|\|u|0@1|2@1|\|u|0@1|2@1|"| +0#0000000&@13
+@4|/+0#0000e05&@1| |@+0#0000000&|l|i|n|k| +0#0000e05&|r+0#00e0003&|e|g|e|x| +0#0000e05&|=| |'+0#e000002&|\|b|S|t|r|i|n|g|'| +0#0000e05&|t+0#00e0003&|a|r|g|e|t| +0#0000e05&|=| |j+0#e000002&|a|v|a|.|l|a|n|g|.|S|t|r|i|n|g| +0#0000e05&|t+0#00e0003&|y|p|e| +0#0000e05&|=| |l+0#e000002&|i|n|k|p|l|a|i|n| +0#0000e05&
+|:| +0#0000000&@73
+@4|@+0#e000e06&|O|v|e|r@1|i|d|e| +0#0000000&|p+0#00e0003&|u|b|l|i|c| +0#0000000&|S|t|r|i|n|g| |t|o|S|t|r|i|n|g|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&@1|;+0#0000000&| |}| @21
+@4|/+0#0000e05&@1| |@+0#0000000&|e|n|d| +0#ffffff16#ff404010| +0#0000000#ffffff0@62
 >}| @73
-@57|2|5|,|1| @9|B|o|t| 
+@57|9|0|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/java_contextual_keywords_00.dump b/runtime/syntax/testdir/dumps/java_contextual_keywords_00.dump
new file mode 100644
index 0000000..fdd8173
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_contextual_keywords_00.dump
@@ -0,0 +1,20 @@
+>c+0#00e0003#ffffff0|l|a|s@1| +0#0000000&|C|o|n|t|e|x|t|u|a|l|K|e|y|w|o|r|d|s|T|e|s|t|s| @6|/+0#0000e05&@1| |S|e@1| |J|L|S|,| |§|3|.|9| |K|e|y|w|o|r|d|s|.| +0#0000000&@12
+|{| @73
+@4|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|C|o|n|t|e|x|t|u|a|l|K|e|y|w|o|r|d|s|T|e|s|t|s|(|)| |{| |t+0#af5f00255&|h|r|o|w| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&|E|r@1|o|r|(|)|;| |}| @14
+@75
+@4|/+0#0000e05&@1| |M|o|d|u|l|e|D|e|c|l|a|r|a|t|i|o|n|:| |m|o|d|u|l|e| |o|p|e|n|.| +0#0000000&@36
+@4|v+0#00e0003&|o|i|d| +0#0000000&|m|o|d|u|l|e|(|)| @2|{| |O|b|j|e|c|t| |m|o|d|u|l|e| |=| |n+0#e000002&|u|l@1|;+0#0000000&| @4|w|h|e|n|(|)|;| |}| @17
+@4|v+0#00e0003&|o|i|d| +0#0000000&|o|p|e|n|(|)| |{| |O|b|j|e|c|t| |o|p|e|n| |=| |n+0#e000002&|u|l@1|;+0#0000000&| @6|m|o|d|u|l|e|(|)|;| |}| @19
+@4|/+0#0000e05&@1| |M|o|d|u|l|e|D|i|r|e|c|t|i|v|e|:| |e|x|p|o|r|t|s| |o|p|e|n|s| |p|r|o|v|i|d|e|s| |r|e|q|u|i|r|e|s| |t|o| |u|s|e|s| |w|i|t|h|.| +0#0000000&@5
+@4|v+0#00e0003&|o|i|d| +0#0000000&|e|x|p|o|r|t|s|(|)| @1|{| |O|b|j|e|c|t| |e|x|p|o|r|t|s| |=| |n+0#e000002&|u|l@1|;+0#0000000&| @3|o|p|e|n|(|)|;| |}| @17
+@4|v+0#00e0003&|o|i|d| +0#0000000&|o|p|e|n|s|(|)| @3|{| |O|b|j|e|c|t| |o|p|e|n|s| |=| |n+0#e000002&|u|l@1|;+0#0000000&| @5|e|x|p|o|r|t|s|(|)|;| |}| @14
+@4|v+0#00e0003&|o|i|d| +0#0000000&|p|r|o|v|i|d|e|s|(|)| |{| |O|b|j|e|c|t| |p|r|o|v|i|d|e|s| |=| |n+0#e000002&|u|l@1|;+0#0000000&| @2|o|p|e|n|s|(|)|;| |}| @16
+@4|v+0#00e0003&|o|i|d| +0#0000000&|r|e|q|u|i|r|e|s|(|)| |{| |O|b|j|e|c|t| |r|e|q|u|i|r|e|s| |=| |n+0#e000002&|u|l@1|;+0#0000000&| @2|p|r|o|v|i|d|e|s|(|)|;| |}| @13
+@4|v+0#00e0003&|o|i|d| +0#0000000&|t|o|(|)| @2|{| |O|b|j|e|c|t| |t|o| |=| |n+0#e000002&|u|l@1|;+0#0000000&| @4|r|e|q|u|i|r|e|s|(|)|;| |}| @21
+@4|v+0#00e0003&|o|i|d| +0#0000000&|u|s|e|s|(|)| |{| |O|b|j|e|c|t| |u|s|e|s| |=| |n+0#e000002&|u|l@1|;+0#0000000&| @6|t|o|(|)|;| |}| @23
+@4|v+0#00e0003&|o|i|d| +0#0000000&|w|i|t|h|(|)| |{| |O|b|j|e|c|t| |w|i|t|h| |=| |n+0#e000002&|u|l@1|;+0#0000000&| @6|u|s|e|s|(|)|;| |}| @21
+@4|/+0#0000e05&@1| |R|e|q|u|i|r|e|s|M|o|d|i|f|i|e|r|:| |t|r|a|n|s|i|t|i|v|e|.| +0#0000000&@38
+@4|v+0#00e0003&|o|i|d| +0#0000000&|t|r|a|n|s|i|t|i|v|e|(|)| |{| |O|b|j|e|c|t| |t|r|a|n|s|i|t|i|v|e| |=| |n+0#e000002&|u|l@1|;+0#0000000&| @2|w|i|t|h|(|)|;| |}| @13
+@4|/+0#0000e05&@1| |L|o|c|a|l|V|a|r|i|a|b|l|e|T|y|p|e| ||| |L|a|m|b|d|a|P|a|r|a|m|e|t|e|r|T|y|p|e|:| |v|a|r|.| +0#0000000&@22
+@4|v+0#00e0003&|o|i|d| +0#0000000&|v|a|r|(|)| @1|{| |v+0#af5f00255&|a|r| +0#0000000&|v+0#af5f00255&|a|r| +0#0000000&|=| |n+0#af5f00255&|e|w| +0#0000000&|O|b|j|e|c|t|(|)|;| @2|t|r|a|n|s|i|t|i|v|e|(|)|;| |}| @15
+@57|1|,|1| @10|T|o|p| 
diff --git a/runtime/syntax/testdir/dumps/java_contextual_keywords_01.dump b/runtime/syntax/testdir/dumps/java_contextual_keywords_01.dump
new file mode 100644
index 0000000..5350984
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_contextual_keywords_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|u|s|e|s|(|)| |{| |O|b|j|e|c|t| |u|s|e|s| |=| |n+0#e000002&|u|l@1|;+0#0000000&| @6|t|o|(|)|;| |}| @23
+@4|v+0#00e0003&|o|i|d| +0#0000000&|w|i|t|h|(|)| |{| |O|b|j|e|c|t| |w|i|t|h| |=| |n+0#e000002&|u|l@1|;+0#0000000&| @6|u|s|e|s|(|)|;| |}| @21
+@4|/+0#0000e05&@1| |R|e|q|u|i|r|e|s|M|o|d|i|f|i|e|r|:| |t|r|a|n|s|i|t|i|v|e|.| +0#0000000&@38
+@4|v+0#00e0003&|o|i|d| +0#0000000&|t|r|a|n|s|i|t|i|v|e|(|)| |{| |O|b|j|e|c|t| |t|r|a|n|s|i|t|i|v|e| |=| |n+0#e000002&|u|l@1|;+0#0000000&| @2|w|i|t|h|(|)|;| |}| @13
+@4|/+0#0000e05&@1| |L|o|c|a|l|V|a|r|i|a|b|l|e|T|y|p|e| ||| |L|a|m|b|d|a|P|a|r|a|m|e|t|e|r|T|y|p|e|:| |v|a|r|.| +0#0000000&@22
+@4>v+0#00e0003&|o|i|d| +0#0000000&|v|a|r|(|)| @1|{| |v+0#af5f00255&|a|r| +0#0000000&|v+0#af5f00255&|a|r| +0#0000000&|=| |n+0#af5f00255&|e|w| +0#0000000&|O|b|j|e|c|t|(|)|;| @2|t|r|a|n|s|i|t|i|v|e|(|)|;| |}| @15
+@4|/+0#0000e05&@1| |Y|i|e|l|d|S|t|a|t|e|m|e|n|t|:| |y|i|e|l|d| |(|s|e@1| |j|a|v|a|_|s|w|i|t|c|h|.|j|a|v|a|)|.| +0#0000000&@22
+@4|v+0#00e0003&|o|i|d| +0#0000000&|y+0#af5f00255&|i|e|l|d|(+0#0000000&|)| @3|{| |O|b|j|e|c|t| |y+0#af5f00255&|i|e|l|d| +0#0000000&|=| |n+0#e000002&|u|l@1|;+0#0000000&| @5|v|a|r|(|)|;| |}| @18
+@4|/+0#0000e05&@1| |R|e|c|o|r|d|D|e|c|l|a|r|a|t|i|o|n|:| |r|e|c|o|r|d|.| +0#0000000&@41
+@4|v+0#00e0003&|o|i|d| +0#0000000&|r|e|c|o|r|d|(|)| @2|{| |O|b|j|e|c|t| |r+0#00e0003&|e|c|o|r|d| +0#0000000&|=| |n+0#e000002&|u|l@1|;+0#0000000&| @4|t+0#00e0003&|h|i|s|.+0#0000000&|y|i|e|l|d|(|)|;| |}| @11
+@4|/+0#0000e05&@1| |N|o|r|m|a|l|{|C|l|a|s@1|,|I|n|t|e|r|f|a|c|e|}|D|e|c|l|a|r|a|t|i|o|n|:| |n|o|n|-|s|e|a|l|e|d| |p|e|r|m|i|t|s| |s|e|a|l|e|d|.| +0#0000000&@5
+@4|v+0#00e0003&|o|i|d| +0#0000000&|p|e|r|m|i|t|s|(|)| @1|{| |O|b|j|e|c|t| |p+0#00e0003&|e|r|m|i|t|s| +0#0000000&|=| |n+0#e000002&|u|l@1|;+0#0000000&| @3|r|e|c|o|r|d|(|)|;| |}| @15
+@4|v+0#00e0003&|o|i|d| +0#0000000&|s|e|a|l|e|d|(|)| @2|{| |O|b|j|e|c|t| |s+0#4040ff13&|e|a|l|e|d| +0#0000000&|=| |n+0#e000002&|u|l@1|;+0#0000000&| @4|p|e|r|m|i|t|s|(|)|;| |}| @14
+@4|/+0#0000e05&@1| |G|u|a|r|d|:| |w|h|e|n| |(|s|e@1| |j|a|v|a|_|s|w|i|t|c|h|.|j|a|v|a|)|.| +0#0000000&@32
+@4|v+0#00e0003&|o|i|d| +0#0000000&|w|h|e|n|(|)| |{| |O|b|j|e|c|t| |w|h|e|n| |=| |n+0#e000002&|u|l@1|;+0#0000000&| @6|s|e|a|l|e|d|(|)|;| |}| @19
+@75
+@4|s+0#4040ff13&|e|a|l|e|d| +0#0000000&|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I|1| |p+0#00e0003&|e|r|m|i|t|s| +0#0000000&|C|1|,| |I|3| |{| |}| @32
+@4|s+0#4040ff13&|e|a|l|e|d| +0#0000000&|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I|2| |p+0#00e0003&|e|r|m|i|t|s| +0#0000000&|C|1|,| |I|3| |{| |}| @32
+@4|n+0#4040ff13&|o|n|-|s|e|a|l|e|d| +0#0000000&|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I|3| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|I|1|,| |I|2| |{| |}| @28
+@57|1|9|,|2|-|5| @7|4@1|%| 
diff --git a/runtime/syntax/testdir/dumps/java_contextual_keywords_02.dump b/runtime/syntax/testdir/dumps/java_contextual_keywords_02.dump
new file mode 100644
index 0000000..1e0c363
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_contextual_keywords_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@3|n+0#4040ff13&|o|n|-|s|e|a|l|e|d| +0#0000000&|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I|3| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|I|1|,| |I|2| |{| |}| @28
+@4|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I|4| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|I|3| |{| |}| @43
+@75
+@4|a+0#4040ff13&|b|s|t|r|a|c|t| +0#0000000&|s+0#4040ff13&|e|a|l|e|d| +0#0000000&|c+0#00e0003&|l|a|s@1| +0#0000000&|C|1| |i+0#00e0003&|m|p|l|e|m|e|n|t|s| +0#0000000&|I|1|,| |I|2| |p+0#00e0003&|e|r|m|i|t|s| +0#0000000&|C|2|,| |C|3| |{| |}| @9
+@4|a+0#4040ff13&|b|s|t|r|a|c|t| +0#0000000&|n+0#4040ff13&|o|n|-|s|e|a|l|e|d| +0#0000000&|c+0#00e0003&|l|a|s@1| +0#0000000&|C|2| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|C|1| |{| |}| @27
+@4>f+0#4040ff13&|i|n|a|l| +0#0000000&|c+0#00e0003&|l|a|s@1| +0#0000000&|C|3| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|C|1| |i+0#00e0003&|m|p|l|e|m|e|n|t|s| +0#0000000&|I|3| |{| |}| @27
+@4|c+0#00e0003&|l|a|s@1| +0#0000000&|C|4| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|C|2| |{| |}| @47
+@75
+@4|r+0#00e0003&|e|c|o|r|d| +0#0000000&|R|(|)| |i+0#00e0003&|m|p|l|e|m|e|n|t|s| +0#0000000&|I|3| |{| |}| @42
+@4|e+0#00e0003&|n|u|m| +0#0000000&|E| |i+0#00e0003&|m|p|l|e|m|e|n|t|s| +0#0000000&|I|3| |{| |I|N|S|T|A|N|C|E| |}| @37
+@75
+@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|<|T|>| |I|<|T|>| |i|1|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|(|v+0#af5f00255&|a|r| +0#0000000&|v+0#af5f00255&|a|r|)+0#0000000&| |-|>| |v+0#af5f00255&|a|r|;+0#0000000&| |}| @21
+@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|<|T|>| |I|<|T|>| |i|2|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|(|T| |v+0#af5f00255&|a|r|)+0#0000000&| |-|>| |v+0#af5f00255&|a|r|;+0#0000000&| |}| @23
+@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|<|T|>| |I|<|T|>| |i|3|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|(|v+0#af5f00255&|a|r|)+0#0000000&| |-|>| |v+0#af5f00255&|a|r|;+0#0000000&| |}| @25
+@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|<|T|>| |I|<|T|>| |i|4|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|v+0#af5f00255&|a|r| +0#0000000&|-|>| |v+0#af5f00255&|a|r|;+0#0000000&| |}| @27
+@4|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I|<|T|>| |{| |T| |i|(|T| |i|)|;| |d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|I|<|T|>| |s|e|l|f|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|t+0#00e0003&|h|i|s|;+0#0000000&| |}| |}| @5
+|}| @73
+|~+0#4040ff13&| @73
+|~| @73
+| +0#0000000&@56|3|7|,|2|-|5| @7|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/java_contextual_keywords_99.dump b/runtime/syntax/testdir/dumps/java_contextual_keywords_99.dump
new file mode 100644
index 0000000..b429c81
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_contextual_keywords_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@3|s+0#4040ff13&|e|a|l|e|d| +0#0000000&|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I|1| |p+0#00e0003&|e|r|m|i|t|s| +0#0000000&|C|1|,| |I|3| |{| |}| @32
+@4|s+0#4040ff13&|e|a|l|e|d| +0#0000000&|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I|2| |p+0#00e0003&|e|r|m|i|t|s| +0#0000000&|C|1|,| |I|3| |{| |}| @32
+@4|n+0#4040ff13&|o|n|-|s|e|a|l|e|d| +0#0000000&|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I|3| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|I|1|,| |I|2| |{| |}| @28
+@4|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I|4| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|I|3| |{| |}| @43
+@75
+@4|a+0#4040ff13&|b|s|t|r|a|c|t| +0#0000000&|s+0#4040ff13&|e|a|l|e|d| +0#0000000&|c+0#00e0003&|l|a|s@1| +0#0000000&|C|1| |i+0#00e0003&|m|p|l|e|m|e|n|t|s| +0#0000000&|I|1|,| |I|2| |p+0#00e0003&|e|r|m|i|t|s| +0#0000000&|C|2|,| |C|3| |{| |}| @9
+@4|a+0#4040ff13&|b|s|t|r|a|c|t| +0#0000000&|n+0#4040ff13&|o|n|-|s|e|a|l|e|d| +0#0000000&|c+0#00e0003&|l|a|s@1| +0#0000000&|C|2| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|C|1| |{| |}| @27
+@4|f+0#4040ff13&|i|n|a|l| +0#0000000&|c+0#00e0003&|l|a|s@1| +0#0000000&|C|3| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|C|1| |i+0#00e0003&|m|p|l|e|m|e|n|t|s| +0#0000000&|I|3| |{| |}| @27
+@4|c+0#00e0003&|l|a|s@1| +0#0000000&|C|4| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|C|2| |{| |}| @47
+@75
+@4|r+0#00e0003&|e|c|o|r|d| +0#0000000&|R|(|)| |i+0#00e0003&|m|p|l|e|m|e|n|t|s| +0#0000000&|I|3| |{| |}| @42
+@4|e+0#00e0003&|n|u|m| +0#0000000&|E| |i+0#00e0003&|m|p|l|e|m|e|n|t|s| +0#0000000&|I|3| |{| |I|N|S|T|A|N|C|E| |}| @37
+@75
+@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|<|T|>| |I|<|T|>| |i|1|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|(|v+0#af5f00255&|a|r| +0#0000000&|v+0#af5f00255&|a|r|)+0#0000000&| |-|>| |v+0#af5f00255&|a|r|;+0#0000000&| |}| @21
+@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|<|T|>| |I|<|T|>| |i|2|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|(|T| |v+0#af5f00255&|a|r|)+0#0000000&| |-|>| |v+0#af5f00255&|a|r|;+0#0000000&| |}| @23
+@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|<|T|>| |I|<|T|>| |i|3|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|(|v+0#af5f00255&|a|r|)+0#0000000&| |-|>| |v+0#af5f00255&|a|r|;+0#0000000&| |}| @25
+@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|<|T|>| |I|<|T|>| |i|4|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|v+0#af5f00255&|a|r| +0#0000000&|-|>| |v+0#af5f00255&|a|r|;+0#0000000&| |}| @27
+@4|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I|<|T|>| |{| |T| |i|(|T| |i|)|;| |d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|I|<|T|>| |s|e|l|f|(|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|t+0#00e0003&|h|i|s|;+0#0000000&| |}| |}| @5
+>}| @73
+@57|4|8|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/java_methods_indent_00.dump b/runtime/syntax/testdir/dumps/java_methods_indent_00.dump
new file mode 100644
index 0000000..8f90e91
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_methods_indent_00.dump
@@ -0,0 +1,20 @@
+>/+0#0000e05#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|j|a|v|a|_|h|i|g|h|l|i|g|h|t|_|f|u|n|c|t|i|o|n|s| |=| |'|i|n|d|e|n|t|'| +0#0000000&@15
+@75
+@75
+|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|T|a|r|g|e|t|;| @39
+@75
+|a+0#4040ff13&|b|s|t|r|a|c|t| +0#0000000&|c+0#00e0003&|l|a|s@1| +0#0000000&|I|n|d|e|n|t|M|e|t|h|o|d|s|T|e|s|t|s| @41
+|{+0#00e0e07&| +0#0000000&|/+0#0000e05&@1| |D|O| |N|O|T| |r|e|t|a|b|!| |T|H|I|S| |F|I|L|E|;| |R|E|M|E|M|B|E|R| |A|B|O|U|T| |t|e|s|t|d|i|r|/|f|t|p|l|u|g|i|n|.| +0#0000000&@12
+| +0#00e0e07&@1|p+0#00e0003&|r|o|t|e|c|t|e|d| +0#00e0e07&|I|n|d|e|n|t|M|e|t|h|o|d|s|T|e|s|t|s|(|)| +0#0000000&|{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@38
+@75
+| +0#00e0e07&@1|r|e|c|o|r|d| |Τ|ʬ|<|α|>|(|α| |a|)| +0#0000000&|{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@51
+@75
+@2|e+0#00e0003&|n|u|m| +0#0000000&|𝓔| @66
+@2|{+0#00e0e07&| +0#0000000&@71
+| +0#00e0e07&@7|A|(|"|𝕬|"|)|,| |B|(|"|𝕭|"|)|,| |C|(|"|𝕮|"|)|,| |D|(|"|𝕯|"|)|,| +0#0000000&@35
+| +0#00e0e07&@7|E|(|"|𝕰|"|)|,+0#0000000&| |F|(|"+0#e000002&|𝕱|"|)+0#0000000&|,| |G|(|"+0#e000002&|𝕲|"|)+0#0000000&|,| |H|(|"+0#e000002&|𝕳|"|)+0#0000000&|;| @35
+@8|f+0#4040ff13&|i|n|a|l| +0#0000000&|S|t|r|i|n|g| |𝐬|;| @51
+@8|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|𝓔|(|S|t|r|i|n|g| |𝐬|)| |{+0#00e0e07&| +0#0000000&|t+0#00e0003&|h|i|s|.+0#0000000&|𝐬| |=| |𝐬|;| |}+0#00e0e07&| +0#0000000&@31
+@2|}+0#00e0e07&| +0#0000000&@71
+@75
+@57|1|,|1| @10|T|o|p| 
diff --git a/runtime/syntax/testdir/dumps/java_methods_indent_01.dump b/runtime/syntax/testdir/dumps/java_methods_indent_01.dump
new file mode 100644
index 0000000..44066c3
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_methods_indent_01.dump
@@ -0,0 +1,20 @@
+| +0#00e0e07#ffffff0@7|A|(|"|𝕬|"|)|,| |B|(|"|𝕭|"|)|,| |C|(|"|𝕮|"|)|,| |D|(|"|𝕯|"|)|,| +0#0000000&@35
+| +0#00e0e07&@7|E|(|"|𝕰|"|)|,+0#0000000&| |F|(|"+0#e000002&|𝕱|"|)+0#0000000&|,| |G|(|"+0#e000002&|𝕲|"|)+0#0000000&|,| |H|(|"+0#e000002&|𝕳|"|)+0#0000000&|;| @35
+@8|f+0#4040ff13&|i|n|a|l| +0#0000000&|S|t|r|i|n|g| |𝐬|;| @51
+@8|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|𝓔|(|S|t|r|i|n|g| |𝐬|)| |{+0#00e0e07&| +0#0000000&|t+0#00e0003&|h|i|s|.+0#0000000&|𝐬| |=| |𝐬|;| |}+0#00e0e07&| +0#0000000&@31
+@2|}+0#00e0e07&| +0#0000000&@71
+> @74
+@2|@+0#e000e06&|T|a|r|g|e|t|(+0#0000000&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|E|l|e|m|e|n|t|T|y|p|e|.|M|E|T|H|O|D|)| @24
+@2|@+0#e000e06&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|R|e|p|e|a|t|a|b|l|e|(+0#0000000&|T|ɐ|g@1|a|b|l|ɘ|s|.|c+0#00e0003&|l|a|s@1|)+0#0000000&| @23
+@2|@+0#00e0003&|i|n|t|e|r|f|a|c|e| +0#0000000&|T|ɐ|g@1|a|b|l|ɘ| @53
+@2|{+0#00e0e07&| +0#0000000&@71
+| +0#00e0e07&@7|S|t|r|i|n|g|[|]| |v|a|l|u|e|(|)| +0#0000000&|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|"+0#e000002&@1|;+0#0000000&| @38
+@2|}+0#00e0e07&| +0#0000000&@71
+@75
+@2|@+0#e000e06&|T|a|r|g|e|t|(+0#0000000&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|E|l|e|m|e|n|t|T|y|p|e|.|M|E|T|H|O|D|)| @24
+@2|@+0#00e0003&|i|n|t|e|r|f|a|c|e| +0#0000000&|T|ɐ|g@1|a|b|l|ɘ|s| @52
+@2|{+0#00e0e07&| +0#0000000&@71
+| +0#00e0e07&@7|T|ɐ|g@1|a|b|l|ɘ|[|]| |v|a|l|u|e|(|)|;+0#0000000&| @47
+@2|}+0#00e0e07&| +0#0000000&@71
+@75
+@57|1|9|,|0|-|1| @7|2|5|%| 
diff --git a/runtime/syntax/testdir/dumps/java_methods_indent_02.dump b/runtime/syntax/testdir/dumps/java_methods_indent_02.dump
new file mode 100644
index 0000000..2ab6583
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_methods_indent_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+@2|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|S|t|y|l|a|b|l|e|<|Α|>| @51
+@2|{+0#00e0e07&| +0#0000000&@71
+| +0#00e0e07&@7|d+0#4040ff13&|e|f|a|u|l|t| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|0|_|(|)| +0#0000000&|{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@39
+| +0#00e0e07&@7|d+0#4040ff13&|e|f|a|u|l|t| +0#00e0e07&|Α| |μ|ʭ@1|$|0|_|(|)| +0#0000000&|{+0#00e0e07&| +0#0000000&|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@31
+@2>}+0#00e0e07&| +0#0000000&@71
+@75
+@2|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#0000000&|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#0000000&@53
+| +0#00e0e07&@1|a+0#4040ff13&|b|s|t|r|a|c|t| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|0|_|(|)|;+0#0000000&| @47
+@75
+@2|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#0000000&|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#0000000&@53
+| +0#00e0e07&@1|a+0#4040ff13&|b|s|t|r|a|c|t| +0#00e0e07&|<|α|,| |β|>| |Τ|ʬ|<|α|>| |μ|ʭ@1|$|0|_|(|β| |𝛽|)|;+0#0000000&| @38
+@75
+@2|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#0000000&@63
+| +0#00e0e07&@1|p+0#00e0003&|r|i|v|a|t|e| +0#00e0e07&|n+0#e000e06&|a|t|i|v|e| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|1|_|(|)|;+0#0000000&| @41
+@75
+@2|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#0000000&@63
+@2|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|n+0#e000e06&|a|t|i|v|e| +0#0000000&|<|α|,| |β|>| |Τ|ʬ|<|α|>|[|]| |μ|ʭ@1|$|1|_|(| @35
+@24|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|>| |ƒ|)|;| @7
+@57|3|7|,|3| @9|6|0|%| 
diff --git a/runtime/syntax/testdir/dumps/java_methods_indent_03.dump b/runtime/syntax/testdir/dumps/java_methods_indent_03.dump
new file mode 100644
index 0000000..2ce2bba
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_methods_indent_03.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@23|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|>| |ƒ|)|;| @7
+@75
+| +0#00e0e07&@1|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|n+0#e000e06&|a|t|i|v|e| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|9|8|_|(|)|;+0#0000000&| @22
+@2|s+0#00e0003&|t|a|t|i|c| +0#0000000&|f+0#4040ff13&|i|n|a|l| +0#0000000&|n+0#e000e06&|a|t|i|v|e| +0#0000000&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#0000000&|<|α|,| |β|>| |Τ|ʬ|<|α|>|[|]|[|]| |μ|ʭ@1|$|9|8|_|(| @14
+@24|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|[|]|>| |ƒ|)|;| @5
+> @74
+@2|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|s|t|r|i|c|t|f|p|"|)+0#0000000&| @43
+| +0#00e0e07&@1|p+0#00e0003&|r|o|t|e|c|t|e|d| +0#00e0e07&|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|s+0#00e0003&|t|r|i|c|t|f|p| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|9@1|_|(|)| +0#0000000&@11
+@2|{+0#00e0e07&| +0#0000000&|a|s|c|i@1|$|9|8|_|(|)|;| |}+0#00e0e07&| +0#0000000&@56
+@75
+@2|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|s|t|r|i|c|t|f|p|"|)+0#0000000&| @43
+@2|p+0#00e0003&|r|o|t|e|c|t|e|d| +0#0000000&|s+0#00e0003&|t|a|t|i|c| +0#0000000&|f+0#4040ff13&|i|n|a|l| +0#0000000&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#0000000&|s+0#00e0003&|t|r|i|c|t|f|p| +0#0000000&|<|α|,| |β|>| |Τ|ʬ|<|α|>|[|]| |μ|ʭ@1|$|9@1|_|(| @4
+@24|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|[|]|>| |ƒ|)| @6
+@2|{+0#00e0e07&| +0#0000000&@71
+@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&@64
+| +0#00e0e07&@7|I|n|d|e|n|t|M|e|t|h|o|d|s|T|e|s|t|s|.|<|α|,| |β|>|μ|ʭ@1|$|9|8|_|(|ƒ|)|[+0#0000000&|0+0#e000002&|]+0#0000000&|;| @27
+@2|}+0#00e0e07&| +0#0000000&@71
+@75
+@2|@+0#e000e06&|O|v|e|r@1|i|d|e| +0#0000000&|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|c|a|s|t|"|)+0#0000000&| @37
+@57|5@1|,|0|-|1| @7|9|6|%| 
diff --git a/runtime/syntax/testdir/dumps/java_methods_indent_99.dump b/runtime/syntax/testdir/dumps/java_methods_indent_99.dump
new file mode 100644
index 0000000..36ee838
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_methods_indent_99.dump
@@ -0,0 +1,20 @@
+| +0#00e0e07#ffffff0@1|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|n+0#e000e06&|a|t|i|v|e| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|9|8|_|(|)|;+0#0000000&| @22
+@2|s+0#00e0003&|t|a|t|i|c| +0#0000000&|f+0#4040ff13&|i|n|a|l| +0#0000000&|n+0#e000e06&|a|t|i|v|e| +0#0000000&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#0000000&|<|α|,| |β|>| |Τ|ʬ|<|α|>|[|]|[|]| |μ|ʭ@1|$|9|8|_|(| @14
+@24|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|[|]|>| |ƒ|)|;| @5
+@75
+@2|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|s|t|r|i|c|t|f|p|"|)+0#0000000&| @43
+| +0#00e0e07&@1|p+0#00e0003&|r|o|t|e|c|t|e|d| +0#00e0e07&|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|s+0#00e0003&|t|r|i|c|t|f|p| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|9@1|_|(|)| +0#0000000&@11
+@2|{+0#00e0e07&| +0#0000000&|a|s|c|i@1|$|9|8|_|(|)|;| |}+0#00e0e07&| +0#0000000&@56
+@75
+@2|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|s|t|r|i|c|t|f|p|"|)+0#0000000&| @43
+@2|p+0#00e0003&|r|o|t|e|c|t|e|d| +0#0000000&|s+0#00e0003&|t|a|t|i|c| +0#0000000&|f+0#4040ff13&|i|n|a|l| +0#0000000&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#0000000&|s+0#00e0003&|t|r|i|c|t|f|p| +0#0000000&|<|α|,| |β|>| |Τ|ʬ|<|α|>|[|]| |μ|ʭ@1|$|9@1|_|(| @4
+@24|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|[|]|>| |ƒ|)| @6
+@2|{+0#00e0e07&| +0#0000000&@71
+@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&@64
+| +0#00e0e07&@7|I|n|d|e|n|t|M|e|t|h|o|d|s|T|e|s|t|s|.|<|α|,| |β|>|μ|ʭ@1|$|9|8|_|(|ƒ|)|[+0#0000000&|0+0#e000002&|]+0#0000000&|;| @27
+@2|}+0#00e0e07&| +0#0000000&@71
+@75
+@2|@+0#e000e06&|O|v|e|r@1|i|d|e| +0#0000000&|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|c|a|s|t|"|)+0#0000000&| @37
+| +0#00e0e07&@1|p+0#00e0003&|u|b|l|i|c| +0#00e0e07&|S|t|r|i|n|g| |t|o|S|t|r|i|n|g|(|)| |{| |r|e|t|u|r|n| |(|S|t|r|i|n|g|)| +0#0000000&|"+0#e000002&|I|n|d|e|n|t|M|e|t|h|o|d|s|T|e|s|t|s|"|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@6
+>}+0#00e0e07&| +0#0000000&@73
+@57|7|0|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/java_methods_style_00.dump b/runtime/syntax/testdir/dumps/java_methods_style_00.dump
new file mode 100644
index 0000000..01d483c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_methods_style_00.dump
@@ -0,0 +1,20 @@
+>/+0#0000e05#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|j|a|v|a|_|h|i|g|h|l|i|g|h|t|_|f|u|n|c|t|i|o|n|s| |=| |'|s|t|y|l|e|'| +0#0000000&@16
+@75
+@75
+|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|T|a|r|g|e|t|;| @39
+@75
+|a+0#4040ff13&|b|s|t|r|a|c|t| +0#0000000&|c+0#00e0003&|l|a|s@1| +0#0000000&|S|t|y|l|e|M|e|t|h|o|d|s|T|e|s|t|s| @42
+|{+0#00e0e07&| +0#0000000&@73
+@4|p+0#00e0003&|r|o|t|e|c|t|e|d| +0#0000000&|S|t|y|l|e|M|e|t|h|o|d|s|T|e|s|t|s|(|)| |{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@37
+@75
+@4|r+0#00e0003&|e|c|o|r|d| +0#0000000&|Τ|ʬ|<|α|>|(|α| |a|)| |{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@49
+@75
+@4|e+0#00e0003&|n|u|m| +0#0000000&|𝓔| @64
+@4|{+0#00e0e07&| +0#0000000&@69
+@8|A|(|"+0#e000002&|𝕬|"|)+0#0000000&|,| |B|(|"+0#e000002&|𝕭|"|)+0#0000000&|,| |C|(|"+0#e000002&|𝕮|"|)+0#0000000&|,| |D|(|"+0#e000002&|𝕯|"|)+0#0000000&|,| @35
+@8|E|(|"+0#e000002&|𝕰|"|)+0#0000000&|,| |F|(|"+0#e000002&|𝕱|"|)+0#0000000&|,| |G|(|"+0#e000002&|𝕲|"|)+0#0000000&|,| |H|(|"+0#e000002&|𝕳|"|)+0#0000000&|;| @35
+@8|f+0#4040ff13&|i|n|a|l| +0#0000000&|S|t|r|i|n|g| |𝐬|;| @51
+@8|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|𝓔|(|S|t|r|i|n|g| |𝐬|)| |{+0#00e0e07&| +0#0000000&|t+0#00e0003&|h|i|s|.+0#0000000&|𝐬| |=| |𝐬|;| |}+0#00e0e07&| +0#0000000&@31
+@4|}+0#00e0e07&| +0#0000000&@69
+@75
+@57|1|,|1| @10|T|o|p| 
diff --git a/runtime/syntax/testdir/dumps/java_methods_style_01.dump b/runtime/syntax/testdir/dumps/java_methods_style_01.dump
new file mode 100644
index 0000000..c944208
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_methods_style_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|A|(|"+0#e000002&|𝕬|"|)+0#0000000&|,| |B|(|"+0#e000002&|𝕭|"|)+0#0000000&|,| |C|(|"+0#e000002&|𝕮|"|)+0#0000000&|,| |D|(|"+0#e000002&|𝕯|"|)+0#0000000&|,| @35
+@8|E|(|"+0#e000002&|𝕰|"|)+0#0000000&|,| |F|(|"+0#e000002&|𝕱|"|)+0#0000000&|,| |G|(|"+0#e000002&|𝕲|"|)+0#0000000&|,| |H|(|"+0#e000002&|𝕳|"|)+0#0000000&|;| @35
+@8|f+0#4040ff13&|i|n|a|l| +0#0000000&|S|t|r|i|n|g| |𝐬|;| @51
+@8|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|𝓔|(|S|t|r|i|n|g| |𝐬|)| |{+0#00e0e07&| +0#0000000&|t+0#00e0003&|h|i|s|.+0#0000000&|𝐬| |=| |𝐬|;| |}+0#00e0e07&| +0#0000000&@31
+@4|}+0#00e0e07&| +0#0000000&@69
+> @74
+@4|@+0#e000e06&|T|a|r|g|e|t|(+0#0000000&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|E|l|e|m|e|n|t|T|y|p|e|.|M|E|T|H|O|D|)| @22
+@4|@+0#e000e06&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|R|e|p|e|a|t|a|b|l|e|(+0#0000000&|T|ɐ|g@1|a|b|l|ɘ|s|.|c+0#00e0003&|l|a|s@1|)+0#0000000&| @21
+@4|@+0#00e0003&|i|n|t|e|r|f|a|c|e| +0#0000000&|T|ɐ|g@1|a|b|l|ɘ| @51
+@4|{+0#00e0e07&| +0#0000000&@69
+| +0#00e0e07&@7|S|t|r|i|n|g|[|]| |v|a|l|u|e|(|)| +0#0000000&|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|"+0#e000002&@1|;+0#0000000&| @38
+@4|}+0#00e0e07&| +0#0000000&@69
+@75
+@4|@+0#e000e06&|T|a|r|g|e|t|(+0#0000000&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|E|l|e|m|e|n|t|T|y|p|e|.|M|E|T|H|O|D|)| @22
+@4|@+0#00e0003&|i|n|t|e|r|f|a|c|e| +0#0000000&|T|ɐ|g@1|a|b|l|ɘ|s| @50
+@4|{+0#00e0e07&| +0#0000000&@69
+| +0#00e0e07&@7|T|ɐ|g@1|a|b|l|ɘ|[|]| |v|a|l|u|e|(|)|;+0#0000000&| @47
+@4|}+0#00e0e07&| +0#0000000&@69
+@75
+@57|1|9|,|0|-|1| @7|2|7|%| 
diff --git a/runtime/syntax/testdir/dumps/java_methods_style_02.dump b/runtime/syntax/testdir/dumps/java_methods_style_02.dump
new file mode 100644
index 0000000..bbdc9bb
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_methods_style_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+@4|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|S|t|y|l|a|b|l|e|<|Α|>| @49
+@4|{+0#00e0e07&| +0#0000000&@69
+| +0#00e0e07&@7|d+0#4040ff13&|e|f|a|u|l|t| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|0|_|(|)| +0#0000000&|{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@39
+| +0#00e0e07&@7|d+0#4040ff13&|e|f|a|u|l|t| +0#00e0e07&|Α| |μ|ʭ@1|$|0|_|(|)| +0#0000000&|{+0#00e0e07&| +0#0000000&|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@31
+@4>}+0#00e0e07&| +0#0000000&@69
+@75
+| +0#00e0e07&@3|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#00e0e07&|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#00e0e07&|a+0#4040ff13&|b|s|t|r|a|c|t| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|0|_|(|/+0#0000e05&@15| +0#0000000&@11
+| +0#00e0e07&@31|)|;+0#0000000&| @40
+| +0#00e0e07&@3|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#00e0e07&|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#00e0e07&|a+0#4040ff13&|b|s|t|r|a|c|t| +0#00e0e07&|<|α|,| |β|>| |Τ|ʬ|<|α|>| |μ|ʭ@1|$|0|_|(| +0#0000000&@21
+| +0#00e0e07&@11|/+0#0000e05&|*| |T+0#0000001#ffff4012|O|D|O|:+0#0000e05#ffffff0| |@|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(|"|b|e|s|p|o|k|e|"|)|*|/| +0#00e0e07&|β| |𝛽|)|;+0#0000000&| @17
+@75
+| +0#00e0e07&@3|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#00e0e07&|p+0#00e0003&|r|i|v|a|t|e| +0#00e0e07&|n+0#e000e06&|a|t|i|v|e| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|1|_|(|/+0#0000e05&|*|/@10|/+0#ffffff16#ff404010|*+0#0000e05#ffffff0|/|)+0#00e0e07&|;+0#0000000&| @13
+| +0#00e0e07&@3|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#00e0e07&|p+0#00e0003&|r|i|v|a|t|e| +0#00e0e07&|n+0#e000e06&|a|t|i|v|e| +0#00e0e07&|<|α|,| |β|>| |Τ|ʬ|<|α|>|[|]| |μ|ʭ@1|$|1|_|(| +0#0000000&@23
+| +0#00e0e07&@11|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|>| |ƒ|)|;+0#0000000&| @19
+@75
+| +0#00e0e07&@3|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|n+0#e000e06&|a|t|i|v|e| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|9|8|_|(|)|;+0#0000000&| @20
+| +0#00e0e07&@3|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|n+0#e000e06&|a|t|i|v|e| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|<|α|,| |β|>| |Τ|ʬ|<|α|>|[|]|[|]| |μ|ʭ@1|$|9|8|_|(| +0#0000000&@12
+| +0#00e0e07&@11|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|[|]|>| |ƒ|)|;+0#0000000&| @17
+@57|3|7|,|2|-|5| @7|6|5|%| 
diff --git a/runtime/syntax/testdir/dumps/java_methods_style_03.dump b/runtime/syntax/testdir/dumps/java_methods_style_03.dump
new file mode 100644
index 0000000..e8ce44b
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_methods_style_03.dump
@@ -0,0 +1,20 @@
+| +0#00e0e07#ffffff0@11|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|[|]|>| |ƒ|)|;+0#0000000&| @17
+@75
+@4|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|s|t|r|i|c|t|f|p|"|)+0#0000000&| @41
+| +0#00e0e07&@3|p+0#00e0003&|r|o|t|e|c|t|e|d| +0#00e0e07&|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|s+0#00e0003&|t|r|i|c|t|f|p| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|9@1|_|(|)| +0#0000000&@9
+@4|{+0#00e0e07&| +0#0000000&|a|s|c|i@1|$|9|8|_|(|)|;| |}+0#00e0e07&| +0#0000000&@54
+> @74
+@4|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|s|t|r|i|c|t|f|p|"|)+0#0000000&| @41
+| +0#00e0e07&@3|p+0#00e0003&|r|o|t|e|c|t|e|d| +0#00e0e07&|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|s+0#00e0003&|t|r|i|c|t|f|p| +0#00e0e07&|<|α|,| |β|>| |Τ|ʬ|<|α|>|[|]| |μ|ʭ@1|$|9@1|_|(| +0#0000000&@2
+| +0#00e0e07&@11|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|[|]|>| |ƒ|)| +0#0000000&@18
+@4|{+0#00e0e07&| +0#0000000&@69
+@8|r+0#af5f00255&|e|t|u|r|n| +0#0000000&@60
+@4|S|t|y|l|e|M|e|t|h|o|d|s|T|e|s|t|s|.|<|α|,| |β|>|μ|ʭ@1|$|9|8|_|(|ƒ|)|[|0+0#e000002&|]+0#0000000&|;| @32
+@4|}+0#00e0e07&| +0#0000000&@69
+@75
+@4|@+0#e000e06&|O|v|e|r@1|i|d|e| +0#0000000&|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|c|a|s|t|"|)+0#0000000&| @35
+| +0#00e0e07&@3|p+0#00e0003&|u|b|l|i|c| +0#00e0e07&|S|t|r|i|n|g| |t|o|S|t|r|i|n|g|(|)| +0#0000000&|{+0#00e0e07&| +0#0000000&|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|(|S|t|r|i|n|g|)| |"+0#e000002&|S|t|y|l|e|M|e|t|h|o|d|s|T|e|s|t|s|"|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@5
+|}+0#00e0e07&| +0#0000000&@73
+|~+0#4040ff13&| @73
+|~| @73
+| +0#0000000&@56|5@1|,|0|-|1| @7|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/java_methods_style_99.dump b/runtime/syntax/testdir/dumps/java_methods_style_99.dump
new file mode 100644
index 0000000..a2e3228
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/java_methods_style_99.dump
@@ -0,0 +1,20 @@
+| +0#00e0e07#ffffff0@3|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|n+0#e000e06&|a|t|i|v|e| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|9|8|_|(|)|;+0#0000000&| @20
+| +0#00e0e07&@3|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|n+0#e000e06&|a|t|i|v|e| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|<|α|,| |β|>| |Τ|ʬ|<|α|>|[|]|[|]| |μ|ʭ@1|$|9|8|_|(| +0#0000000&@12
+| +0#00e0e07&@11|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|[|]|>| |ƒ|)|;+0#0000000&| @17
+@75
+@4|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|s|t|r|i|c|t|f|p|"|)+0#0000000&| @41
+| +0#00e0e07&@3|p+0#00e0003&|r|o|t|e|c|t|e|d| +0#00e0e07&|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|s+0#00e0003&|t|r|i|c|t|f|p| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|9@1|_|(|)| +0#0000000&@9
+@4|{+0#00e0e07&| +0#0000000&|a|s|c|i@1|$|9|8|_|(|)|;| |}+0#00e0e07&| +0#0000000&@54
+@75
+@4|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|s|t|r|i|c|t|f|p|"|)+0#0000000&| @41
+| +0#00e0e07&@3|p+0#00e0003&|r|o|t|e|c|t|e|d| +0#00e0e07&|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|s+0#00e0003&|t|r|i|c|t|f|p| +0#00e0e07&|<|α|,| |β|>| |Τ|ʬ|<|α|>|[|]| |μ|ʭ@1|$|9@1|_|(| +0#0000000&@2
+| +0#00e0e07&@11|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|[|]|>| |ƒ|)| +0#0000000&@18
+@4|{+0#00e0e07&| +0#0000000&@69
+@8|r+0#af5f00255&|e|t|u|r|n| +0#0000000&@60
+@4|S|t|y|l|e|M|e|t|h|o|d|s|T|e|s|t|s|.|<|α|,| |β|>|μ|ʭ@1|$|9|8|_|(|ƒ|)|[|0+0#e000002&|]+0#0000000&|;| @32
+@4|}+0#00e0e07&| +0#0000000&@69
+@75
+@4|@+0#e000e06&|O|v|e|r@1|i|d|e| +0#0000000&|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|c|a|s|t|"|)+0#0000000&| @35
+| +0#00e0e07&@3|p+0#00e0003&|u|b|l|i|c| +0#00e0e07&|S|t|r|i|n|g| |t|o|S|t|r|i|n|g|(|)| +0#0000000&|{+0#00e0e07&| +0#0000000&|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|(|S|t|r|i|n|g|)| |"+0#e000002&|S|t|y|l|e|M|e|t|h|o|d|s|T|e|s|t|s|"|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@5
+>}+0#00e0e07&| +0#0000000&@73
+@57|6@1|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim9_keymap_00.dump b/runtime/syntax/testdir/dumps/vim9_keymap_00.dump
new file mode 100644
index 0000000..d1bc96c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim9_keymap_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| |K|e|y|m|a|p| |f|i|l|e| |f|o|r| |s|y|n|t|a|x| |t|e|s|t|i|n|g| +0#0000000&@38
+@75
+|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
+|l+0#af5f00255&|e|t| +0#0000000&|b+0#00e0e07&|:|k|e|y|m|a|p|_|n|a|m|e| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|s|y|n|t|a|x|-|t|e|s|t|"| +0#0000000&@41
+@75
+|l+0#af5f00255&|o|a|d|k|e|y|m|a|p| +0#0000000&@64
+@75
+|#+0#0000e05&| |L|i|n|e| |c|o|m@1|e|n|t| +0#0000000&@60
+@75
+@2|#+0#0000e05&| |A|n|o|t|h|e|r| |l|i|n|e| |c|o|m@1|e|n|t| +0#0000000&@50
+@75
+|a| |A| @3|B+0#0000e05&|a|s|i|c| |m|a|p@1|i|n|g| +0#0000000&@54
+|'|a| |á| @2|M+0#0000e05&|o|r|e| |t|h|a|n| |o|n|e| |c|h|a|r| |i|n| |f|i|r|s|t| |c|o|l|u|m|n| +0#0000000&@33
+@75
+|#+0#0000e05&| |S|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| +0#0000000&@56
+|<+0#e000e06&|c|h|a|r|-|6|2|>| +0#0000000&@5|B| @14|S+0#0000e05&|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| |a|l@1|o|w|e|d| |i|n| |L|H|S| |-| |d|e|c|i|m|a|l| +0#0000000&@2
+@57|1|,|1| @10|T|o|p| 
diff --git a/runtime/syntax/testdir/dumps/vim9_keymap_01.dump b/runtime/syntax/testdir/dumps/vim9_keymap_01.dump
new file mode 100644
index 0000000..1d0823f
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim9_keymap_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|a| |A| @3|B+0#0000e05&|a|s|i|c| |m|a|p@1|i|n|g| +0#0000000&@54
+|'|a| |á| @2|M+0#0000e05&|o|r|e| |t|h|a|n| |o|n|e| |c|h|a|r| |i|n| |f|i|r|s|t| |c|o|l|u|m|n| +0#0000000&@33
+@75
+|#+0#0000e05&| |S|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| +0#0000000&@56
+><+0#e000e06&|c|h|a|r|-|6|2|>| +0#0000000&@5|B| @14|S+0#0000e05&|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| |a|l@1|o|w|e|d| |i|n| |L|H|S| |-| |d|e|c|i|m|a|l| +0#0000000&@2
+|c| @13|<+0#e000e06&|c|h|a|r|-|0|1|0|3|>| +0#0000000&@4|S+0#0000e05&|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| |a|l@1|o|w|e|d| |i|n| |R|H|S| |-| |o|c|t|a|l| +0#0000000&@4
+|<+0#e000e06&|c|h|a|r|-|0|x|0@1|6|4|>| +0#0000000&@1|<+0#e000e06&|c|h|a|r|-|0|x|0@1|4@1|>| +0#0000000&@2|S+0#0000e05&|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| |a|l@1|o|w|e|d| |i|n| |L|H|S| |a|n|d| |R|H|S| |-| |h|e
+|x|a|d|e|c|i|m|a|l| +0#0000000&@65
+@75
+|#+0#0000e05&| |V|i|m|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| |c|h|a|r|a|c|t|e|r|s| +0#0000000&@43
+|\|#| |<+0#e000e06&|c|h|a|r|-|0|x|0@1|a|3|>| +0#0000000&@14|L+0#0000e05&|i|n|e| |s|h|o|u|l|d| |n|o|t| |m|a|t|c|h| |a|s| |a| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e
+|n|t| +0#0000000&@72
+|"| |“| @27|L+0#0000e05&|i|n|e| |s|h|o|u|l|d| |n|o|t| |m|a|t|c|h| |a|s| |a| |l|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m
+@1|e|n|t| +0#0000000&@70
+|:| |#| @27|L+0#0000e05&|i|n|e| |s|h|o|u|l|d| |n|o|t| |m|a|t|c|h| |a|s| |a| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e
+|n|t| +0#0000000&@72
+|~+0#4040ff13&| @73
+|~| @73
+| +0#0000000&@56|1|9|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim9_keymap_99.dump b/runtime/syntax/testdir/dumps/vim9_keymap_99.dump
new file mode 100644
index 0000000..8afcbba
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim9_keymap_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+@2|#+0#0000e05&| |A|n|o|t|h|e|r| |l|i|n|e| |c|o|m@1|e|n|t| +0#0000000&@50
+@75
+|a| |A| @3|B+0#0000e05&|a|s|i|c| |m|a|p@1|i|n|g| +0#0000000&@54
+|'|a| |á| @2|M+0#0000e05&|o|r|e| |t|h|a|n| |o|n|e| |c|h|a|r| |i|n| |f|i|r|s|t| |c|o|l|u|m|n| +0#0000000&@33
+@75
+|#+0#0000e05&| |S|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| +0#0000000&@56
+|<+0#e000e06&|c|h|a|r|-|6|2|>| +0#0000000&@5|B| @14|S+0#0000e05&|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| |a|l@1|o|w|e|d| |i|n| |L|H|S| |-| |d|e|c|i|m|a|l| +0#0000000&@2
+|c| @13|<+0#e000e06&|c|h|a|r|-|0|1|0|3|>| +0#0000000&@4|S+0#0000e05&|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| |a|l@1|o|w|e|d| |i|n| |R|H|S| |-| |o|c|t|a|l| +0#0000000&@4
+|<+0#e000e06&|c|h|a|r|-|0|x|0@1|6|4|>| +0#0000000&@1|<+0#e000e06&|c|h|a|r|-|0|x|0@1|4@1|>| +0#0000000&@2|S+0#0000e05&|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| |a|l@1|o|w|e|d| |i|n| |L|H|S| |a|n|d| |R|H|S| |-| |h|e
+|x|a|d|e|c|i|m|a|l| +0#0000000&@65
+@75
+|#+0#0000e05&| |V|i|m|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| |c|h|a|r|a|c|t|e|r|s| +0#0000000&@43
+|\|#| |<+0#e000e06&|c|h|a|r|-|0|x|0@1|a|3|>| +0#0000000&@14|L+0#0000e05&|i|n|e| |s|h|o|u|l|d| |n|o|t| |m|a|t|c|h| |a|s| |a| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e
+|n|t| +0#0000000&@72
+|"| |“| @27|L+0#0000e05&|i|n|e| |s|h|o|u|l|d| |n|o|t| |m|a|t|c|h| |a|s| |a| |l|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m
+@1|e|n|t| +0#0000000&@70
+>:| |#| @27|L+0#0000e05&|i|n|e| |s|h|o|u|l|d| |n|o|t| |m|a|t|c|h| |a|s| |a| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e
+|n|t| +0#0000000&@72
+@57|2|6|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim9_legacy_header_00.dump b/runtime/syntax/testdir/dumps/vim9_legacy_header_00.dump
new file mode 100644
index 0000000..2f682d9
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim9_legacy_header_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |c|o|m@1|e|n|t| +0#0000000&@65
+@75
+|i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|h+0#00e0e07&|a|s|(+0#e000e06&|'+0#e000002&|v|i|m|9|s|c|r|i|p|t|'|)+0#e000e06&| +0#0000000&@53
+@2|#| |4+0#e000002&|2| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@58
+@2|s+0#af5f00255&|o|u|r|c|e| +0#0000000&|f|o@1|.+0#af5f00255&|v|i|m| +0#0000000&@58
+@2|f+0#af5f00255&|i|n|i|s|h| +0#0000000&@66
+|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+@75
+|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
+@75
+|v+0#af5f00255&|i|m|9|s|c|r|i|p|t| +0#0000000&|n+0#e000e06&|o|c|l|e|a|r| +0#0000000&@56
+@75
+|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
+@75
+| +0#0000e05&|#| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
+@1|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&@57
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|,|1| @10|A|l@1| 
diff --git a/runtime/syntax/testdir/dumps/vim9_legacy_header_99.dump b/runtime/syntax/testdir/dumps/vim9_legacy_header_99.dump
new file mode 100644
index 0000000..d400e31
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim9_legacy_header_99.dump
@@ -0,0 +1,20 @@
+|"+0#0000e05#ffffff0| |c|o|m@1|e|n|t| +0#0000000&@65
+@75
+|i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|h+0#00e0e07&|a|s|(+0#e000e06&|'+0#e000002&|v|i|m|9|s|c|r|i|p|t|'|)+0#e000e06&| +0#0000000&@53
+@2|#| |4+0#e000002&|2| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@58
+@2|s+0#af5f00255&|o|u|r|c|e| +0#0000000&|f|o@1|.+0#af5f00255&|v|i|m| +0#0000000&@58
+@2|f+0#af5f00255&|i|n|i|s|h| +0#0000000&@66
+|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+@75
+|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
+@75
+|v+0#af5f00255&|i|m|9|s|c|r|i|p|t| +0#0000000&|n+0#e000e06&|o|c|l|e|a|r| +0#0000000&@56
+@75
+|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
+@75
+| +0#0000e05&|#| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
+@1>"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&@57
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|6|,|2| @9|A|l@1| 
diff --git a/runtime/syntax/testdir/dumps/vim9_legacy_header_fold_00.dump b/runtime/syntax/testdir/dumps/vim9_legacy_header_fold_00.dump
new file mode 100644
index 0000000..b324c46
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim9_legacy_header_fold_00.dump
@@ -0,0 +1,20 @@
+>++0#0000e05#a8a8a8255|-@1| |1@1| |l|i|n|e|s|:| |"| |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| |=| |"|H|"| ||| |s|e|t| |f|d|m|=|s|y|n|t|a|x|-
+|v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&|n+0#e000e06&|o|c|l|e|a|r| +0#0000000&@56
+@75
+|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
+@75
+| +0#0000e05&|#| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
+@1|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&@57
+|~+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/vim9_legacy_header_fold_99.dump b/runtime/syntax/testdir/dumps/vim9_legacy_header_fold_99.dump
new file mode 100644
index 0000000..b3fa847
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim9_legacy_header_fold_99.dump
@@ -0,0 +1,20 @@
+|++0#0000e05#a8a8a8255|-@1| |1@1| |l|i|n|e|s|:| |"| |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| |=| |"|H|"| ||| |s|e|t| |f|d|m|=|s|y|n|t|a|x|-
+|v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&|n+0#e000e06&|o|c|l|e|a|r| +0#0000000&@56
+@75
+|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
+@75
+| +0#0000e05&|#| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
+@1>"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&@57
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|7|,|2| @9|A|l@1| 
diff --git a/runtime/syntax/testdir/dumps/vim_00.dump b/runtime/syntax/testdir/dumps/vim_00.dump
new file mode 100644
index 0000000..852148f
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59
+@75
+|i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&| +0#0000000&@51
+@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#0000000&|n|o|f|i|l|e| ||+0#af5f00255&| +0#0000000&|r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e|d|i|t| +0#0000000&|#| ||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@1
+| +0#e000e06&@17|\| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33
+|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+@75
+@75
+|"+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1@1|3|0|7| |a|n|d| |#|1@1|5|6|0| +0#0000000&@48
+@75
+|"+0#0000e05&| |T|h|i|s| |i|s| |w|h|a|t| |w|e| |c|a|l@1| |"| |b|l|a|h| +0#0000000&@45
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|"+0#0000000&|i|n|p|u|t|/|v|i|m|.|v|i|m|"| |1@1|L|,| |2|0|9|B| @31|1|,|1| @10|A|l@1| 
diff --git a/runtime/syntax/testdir/dumps/vim_99.dump b/runtime/syntax/testdir/dumps/vim_99.dump
new file mode 100644
index 0000000..8e9320c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_99.dump
@@ -0,0 +1,20 @@
+|"+0#0000e05#ffffff0| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59
+@75
+|i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&| +0#0000000&@51
+@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#0000000&|n|o|f|i|l|e| ||+0#af5f00255&| +0#0000000&|r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e|d|i|t| +0#0000000&|#| ||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@1
+| +0#e000e06&@17|\| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33
+|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+@75
+@75
+|"+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1@1|3|0|7| |a|n|d| |#|1@1|5|6|0| +0#0000000&@48
+@75
+>"+0#0000e05&| |T|h|i|s| |i|s| |w|h|a|t| |w|e| |c|a|l@1| |"| |b|l|a|h| +0#0000000&@45
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|"+0#0000000&|i|n|p|u|t|/|v|i|m|.|v|i|m|"| |1@1|L|,| |2|0|9|B| @31|1@1|,|1| @9|A|l@1| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_abbreviate_01.dump b/runtime/syntax/testdir/dumps/vim_ex_abbreviate_01.dump
index c5cc26f..10de160 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_abbreviate_01.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_abbreviate_01.dump
@@ -7,9 +7,9 @@
 |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
+|a+0#af5f00255&|b|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@58
+|c+0#af5f00255&|a|b|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@57
+|i+0#af5f00255&|a|b|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@57
 |~+0#4040ff13&| @73
 |~| @73
 |~| @73
diff --git a/runtime/syntax/testdir/dumps/vim_ex_abbreviate_99.dump b/runtime/syntax/testdir/dumps/vim_ex_abbreviate_99.dump
index 5cec5ee..7622ebf 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_abbreviate_99.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_abbreviate_99.dump
@@ -14,7 +14,7 @@
 |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
+|a+0#af5f00255&|b|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@58
+|c+0#af5f00255&|a|b|c|l|e|a|r| +0#0000000&|<+0#e000e06&|b|u|f@1|e|r|>| +0#0000000&@57
+>i+0#af5f00255&|a|b|c|l|e|a|r| +0#0000000&|<+0#e000e06&|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_commands_31.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_31.dump
index 07075f7..3711988 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_31.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_31.dump
@@ -5,7 +5,7 @@
 |:|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&|i|m|9|c|m|d| +0#0000000&@66
-|:|v+0#af5f00255&|i|m|9|s|c|r|i|p|t| +0#0000000&@63
+|"+0#0000e05&| |:|v|i|m|9|s|c|r|i|p|t| +0#0000000&@61
 |:|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
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_64.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_64.dump
index 5561d99..bf3df8d 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_64.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_64.dump
@@ -5,7 +5,7 @@
 |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
+|"+0#0000e05&| |c|a|l@1| |F|o@1|(|)| ||| |v|i|m|9|s|c|r|i|p|t| +0#0000000&@49
 |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|s|u|a|l| +0#0000000&@55
diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_00.dump b/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_00.dump
new file mode 100644
index 0000000..57b0216
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_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| |c|o|m@1|e|n|t|s| +0#0000000&@60
+@75
+|#+0#0000e05&| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@53
+@75
+| +0#0000e05&|#| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
+@1|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&@57
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@59
+| +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
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|d+0#af5f00255&|e|f|!| +0#0000000&|B|a|r|(+0#e000e06&|)| +0#0000000&@64
+| +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&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+@57|1|,|1| @10|T|o|p| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_01.dump b/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_01.dump
new file mode 100644
index 0000000..1b0d7c9
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|d+0#af5f00255&|e|f|!| +0#0000000&|B|a|r|(+0#e000e06&|)| +0#0000000&@64
+| +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&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+> @74
+|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|-+0#af5f00255&|c+0#e000e06&|o|u|n|t| +0#0000000&|F|o@1|C|o|m@1|a|n|d| |{+0#e000e06&| +0#0000000&@47
+| +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&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
+|}+0#e000e06&| +0#0000000&@73
+@75
+|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&|B+0#00e0003&|u|f|N|e|w|F|i|l|e| +0#0000000&|*| |{+0#e000e06&| +0#0000000&@52
+| +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&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
+|}+0#e000e06&| +0#0000000&@73
+@75
+@75
+|#+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59
+@75
+@57|1|9|,|0|-|1| @7|5|9|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_02.dump b/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_02.dump
new file mode 100644
index 0000000..7de6ffb
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&| +0#0000000&@51
+@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#0000000&|n|o|f|i|l|e| ||+0#af5f00255&| +0#0000000&|r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e|d|i|t| +0#0000000&|%+0#af5f00255&@1| +0#0000000&||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&
+@18|\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33
+|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+> @74
+@75
+|#+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1@1|3|0|7| |a|n|d| |#|1@1|5|6|0| +0#0000000&@48
+@75
+|#+0#0000e05&| |T|h|i|s| |i|s| |w|h|a|t| |w|e| |c|a|l@1| |"| |b|l|a|h| +0#0000000&@45
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|3|7|,|0|-|1| @7|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_99.dump b/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_99.dump
new file mode 100644
index 0000000..f8759da
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_comment-vim9_99.dump
@@ -0,0 +1,20 @@
+|}+0#e000e06#ffffff0| +0#0000000&@73
+@75
+|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&|B+0#00e0003&|u|f|N|e|w|F|i|l|e| +0#0000000&|*| |{+0#e000e06&| +0#0000000&@52
+| +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&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
+|}+0#e000e06&| +0#0000000&@73
+@75
+@75
+|#+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59
+@75
+|i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&| +0#0000000&@51
+@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#0000000&|n|o|f|i|l|e| ||+0#af5f00255&| +0#0000000&|r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e|d|i|t| +0#0000000&|%+0#af5f00255&@1| +0#0000000&||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&
+@18|\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33
+|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+@75
+@75
+|#+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1@1|3|0|7| |a|n|d| |#|1@1|5|6|0| +0#0000000&@48
+@75
+>#+0#0000e05&| |T|h|i|s| |i|s| |w|h|a|t| |w|e| |c|a|l@1| |"| |b|l|a|h| +0#0000000&@45
+@57|4|1|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment_00.dump b/runtime/syntax/testdir/dumps/vim_ex_comment_00.dump
new file mode 100644
index 0000000..a1c1880
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_comment_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |c|o|m@1|e|n|t|s| +0#0000000&@60
+@75
+|"+0#0000e05&| |L|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
+@75
+|#| |4+0#e000002&|2| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@60
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@59
+| +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
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|d+0#af5f00255&|e|f|!| +0#0000000&|B|a|r|(+0#e000e06&|)| +0#0000000&@64
+| +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&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|-+0#af5f00255&|n+0#e000e06&|a|r|g|s|=+0#af5f00255&|1+0#00e0003&| +0#0000000&|F|o@1|C|o|m@1|a|n|d| |{+0#e000e06&| +0#0000000&@45
+| +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&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
+@57|1|,|1| @10|T|o|p| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment_01.dump b/runtime/syntax/testdir/dumps/vim_ex_comment_01.dump
new file mode 100644
index 0000000..513f64c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_comment_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@1|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|-+0#af5f00255&|n+0#e000e06&|a|r|g|s|=+0#af5f00255&|1+0#00e0003&| +0#0000000&|F|o@1|C|o|m@1|a|n|d| |{+0#e000e06&| +0#0000000&@45
+| +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&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
+|}+0#e000e06&| +0#0000000&@73
+@75
+|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&|B+0#00e0003&|u|f|N|e|w|F|i|l|e| +0#0000000&|*| |{+0#e000e06&| +0#0000000&@52
+| +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&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
+|}+0#e000e06&| +0#0000000&@73
+@75
+@75
+|"+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59
+@75
+|i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&| +0#0000000&@51
+@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#0000000&|n|o|f|i|l|e| ||+0#af5f00255&| +0#0000000&|r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e|d|i|t| +0#0000000&|#| ||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@1
+@18|\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33
+@57|1|9|,|3| @9|5|0|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment_02.dump b/runtime/syntax/testdir/dumps/vim_ex_comment_02.dump
new file mode 100644
index 0000000..e2b6092
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_comment_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@17|\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33
+|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+@75
+@75
+|"+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1@1|3|0|7| |a|n|d| |#|1@1|5|6|0| +0#0000000&@48
+> @74
+|"+0#0000e05&| |T|h|i|s| |i|s| |w|h|a|t| |w|e| |c|a|l@1| |"| |b|l|a|h| +0#0000000&@45
+@75
+@75
+|"+0#0000e05&| |I|s@1|u|e| |#| |#|9|5|8|7| +0#0000000&@59
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|C|o|m@1|e|n|t|T|i|t|l|e|(+0#e000e06&|)| +0#0000000&@56
+| +0#0000e05&@1|#| +0#0000000&|T+0#e000e06&|i|t|l|e|:| +0#0000e05&|.@2| +0#0000000&@60
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|3|7|,|0|-|1| @7|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_comment_99.dump b/runtime/syntax/testdir/dumps/vim_ex_comment_99.dump
new file mode 100644
index 0000000..e9bcabe
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_comment_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|"+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59
+@75
+|i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&| +0#0000000&@51
+@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#0000000&|n|o|f|i|l|e| ||+0#af5f00255&| +0#0000000&|r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e|d|i|t| +0#0000000&|#| ||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@1
+@18|\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33
+|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+@75
+@75
+|"+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1@1|3|0|7| |a|n|d| |#|1@1|5|6|0| +0#0000000&@48
+@75
+|"+0#0000e05&| |T|h|i|s| |i|s| |w|h|a|t| |w|e| |c|a|l@1| |"| |b|l|a|h| +0#0000000&@45
+@75
+@75
+|"+0#0000e05&| |I|s@1|u|e| |#| |#|9|5|8|7| +0#0000000&@59
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|C|o|m@1|e|n|t|T|i|t|l|e|(+0#e000e06&|)| +0#0000000&@56
+| +0#0000e05&@1|#| +0#0000000&|T+0#e000e06&|i|t|l|e|:| +0#0000e05&|.@2| +0#0000000&@60
+>e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@57|4|5|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_01.dump b/runtime/syntax/testdir/dumps/vim_ex_def_01.dump
index c7b49de..2aebd40 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_def_01.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_01.dump
@@ -6,15 +6,15 @@
 >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
+|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|"|}|o|(+0#e000e06&|)| +0#0000000&@61
+|"+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|{|"|o|"|}|(+0#e000e06&|)| +0#0000000&@61
+|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|{|"|o|"|}|(+0#e000e06&|)| +0#0000000&@57
-@57|1|9|,|1| @9|1|2|%| 
+@57|1|9|,|1| @9|1|4|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_02.dump b/runtime/syntax/testdir/dumps/vim_ex_def_02.dump
index 7ebe3c6..ebfa3e1 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_def_02.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_02.dump
@@ -1,20 +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
+|e+0#af5f00255#ffffff0|n|d@1|e|f| +0#0000000&@68
 @75
-|d+0#af5f00255&|e|f| +0#0000000&|{|"|F|"|}|{|"|o|"|}|{|"|o|"|}|(+0#e000e06&|)| +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&|#+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
 > @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
+|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
-|#+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
+|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&|F|o@1|(+0#e000e06&|)| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@55
+|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&|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|%| 
+|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
+@57|3|7|,|0|-|1| @7|3|4|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_03.dump b/runtime/syntax/testdir/dumps/vim_ex_def_03.dump
index 50fed41..6046e65 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_def_03.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_03.dump
@@ -1,20 +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
+|d+0#af5f00255#ffffff0|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
 @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
+|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
 @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
+|"+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
-|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
+|"+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
-@57|5@1|,|3| @9|4|6|%| 
+@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
+@57|5@1|,|3| @9|5|4|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_04.dump b/runtime/syntax/testdir/dumps/vim_ex_def_04.dump
index 64141b7..7394771 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_def_04.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_04.dump
@@ -1,20 +1,20 @@
-|e+0#af5f00255#ffffff0|n|d@1|e|f| +0#0000000&@68
+|d+0#af5f00255#ffffff0|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
-|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
+|d+0#af5f00255&|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
 > @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
+|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&| |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
+|"+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&| |v+0#00e0003&|o|i|d| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@49
+|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
-@57|7|3|,|0|-|1| @7|6|3|%| 
+|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
+@57|7|3|,|0|-|1| @7|7|3|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_05.dump b/runtime/syntax/testdir/dumps/vim_ex_def_05.dump
index 9fc0cfa..2db207b 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_def_05.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_05.dump
@@ -1,20 +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
+| +0&#ffffff0@74
+|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
 @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
+>"+0#0000e05&| |p|a|r|a|m|e|t|e|r|s| +0#0000000&@62
 @75
-|"+0#0000e05&| |:|e|n|d@1|e|f| |t|r|a|i|l|i|n|g| +0#0000000&@56
+|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&@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
+|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
-|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|%| 
+|"+0#0000e05&| |c|o|m@1|e|n|t|s| +0#0000000&@64
+@75
+@57|9|1|,|1| @9|9|4|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_99.dump b/runtime/syntax/testdir/dumps/vim_ex_def_99.dump
index 2eca72a..9b4249f 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_def_99.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_99.dump
@@ -17,4 +17,4 @@
 @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| 
+@57|1|0|9|,|0|-|1| @6|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_01.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_01.dump
index d1803d5..fa5ed9f 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_def_fold_01.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_01.dump
@@ -6,15 +6,15 @@
 >"+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#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#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|{|"|o|"|}|o|(|)|-@47
+|"+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|{|"|o|"|}|(|)|-@47
+|++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|2| |l|i|n|e|s|:| |d|e|f| |{|"|F|"|}|o|{|"|o|"|}|(|)|-@43
+|++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|2| |l|i|n|e|s|:| |d|e|f| |{|"|F|"|}|{|"|o|"|}|{|"|o|"|}|(|)|-@39
+|++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
 @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
index d9668cd..2cfdcd4 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_def_fold_02.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_02.dump
@@ -1,20 +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#ffffff0| |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#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|%| 
+| +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@56|3|7|,|1| @9|2|7|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_03.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_03.dump
index d20fb79..6673415 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_def_fold_03.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_03.dump
@@ -1,20 +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#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|%| 
+|"+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|5@1|,|1| @9|4@1|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_04.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_04.dump
index bc95a8b..d2f047b 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_def_fold_04.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_04.dump
@@ -1,20 +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#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|3| |l|i|n|e|s|:| |d|e|f| |<|S|I|D|>|F|o@1|(|)|:| |n|u|m|b|e|r|-@38
+|++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|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#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&| |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#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&| |r|e|t|u|r|n| |t|y|p|e|s| +0#0000000&@60
+|"+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|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |v|o|i|d|-@45
+|++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|(|)|:| |v|o|i|d| |#| |c|o|m@1|e|n|t|-@35
+|++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|(|)|:| |l|i|s|t|<|d|i|c|t|<|n|u|m|b|e|r|>@1|-@31
+|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
 | +0#0000000#ffffff0@74
+@75
 @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
index cc31e3d..e2decdb 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_def_fold_05.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_05.dump
@@ -1,20 +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#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|(|)|:| |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#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
 | +0#0000000#ffffff0@74
+> @74
+|"+0#0000e05&| |p|a|r|a|m|e|t|e|r|s| +0#0000000&@62
 @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#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|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#0000e05#a8a8a8255|-@1| @1|5| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|-@52
 | +0#0000000#ffffff0@74
 @75
-|"+0#0000e05&| |p|a|r|a|m|e|t|e|r|s| +0#0000000&@62
+|"+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
 @75
-@57|9|1|,|1| @9|8|3|%| 
+|"+0#0000e05&| |f|o|l|d|-|r|e|g|i|o|n| |e|n|d|i|n|g| +0#0000000&@54
+@57|9|1|,|0|-|1| @7|8|2|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_06.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_06.dump
index c93c671..2997eb8 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_def_fold_06.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_06.dump
@@ -1,20 +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#0000e05#a8a8a8255|-@1| @1|4| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
+| +0#0000000#ffffff0@74
+@75
+|"+0#0000e05&| |f|o|l|d|-|r|e|g|i|o|n| |e|n|d|i|n|g| +0#0000000&@54
+@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|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|5| |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|(|)|-@50
 | +0#0000000#ffffff0@74
 |~+0#4040ff13&| @73
-|~| @73
-|~| @73
-|~| @73
-| +0#0000000&@56|1|0|9|,|0|-|1| @6|B|o|t| 
+| +0#0000000&@56|1|0|9|,|1| @8|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_07.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_07.dump
new file mode 100644
index 0000000..b11b61e
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_07.dump
@@ -0,0 +1,20 @@
+|++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|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|5| |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|(|)|-@50
+| +0#0000000#ffffff0@74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|2|7|,|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
index 0b4fce2..3020a24 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_def_fold_99.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_99.dump
@@ -1,20 +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
+@75
+|"+0#0000e05&| |f|o|l|d|-|r|e|g|i|o|n| |e|n|d|i|n|g| +0#0000000&@54
+@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|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51
+| +0#0000000#ffffff0@74
+|++0#0000e05#a8a8a8255|-@1| @1|5| |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|(|)|-@50
 > +0#0000000#ffffff0@74
-@57|1|2|6|,|0|-|1| @6|B|o|t| 
+@57|1|3|0|,|0|-|1| @6|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_nested_00.dump b/runtime/syntax/testdir/dumps/vim_ex_def_nested_00.dump
new file mode 100644
index 0000000..9f6d437
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_nested_00.dump
@@ -0,0 +1,20 @@
+>v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&@64
+|#+0#0000e05&| |V|i|m|9| |:|d|e|f| |c|o|m@1|a|n|d| |(|n|e|s|t|e|d|)| +0#0000000&@46
+@75
+|c+0#af5f00255&|l|a|s@1| +0#0000000&|T|e|s|t| @64
+@4|c+0#af5f00255&|o|n|s|t| +0#0000000&|n+0#00e0e07&|a|m|e|:+0#0000000&| |s|t|r|i|n|g| @52
+@75
+@4|d+0#af5f00255&|e|f| +0#0000000&|n|e|w|(+0#e000e06&|)| +0#0000000&@61
+@8|d+0#af5f00255&|e|f| +0#0000000&|N|a|m|e|(+0#e000e06&|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@48
+@12|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|G|i|v|e|N|a|m|e|(+0#e000e06&|)| +0#0000000&@43
+@16|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&|a|n|y|"| +0#0000000&@46
+@12|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@51
+@75
+@12|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|G|i|v|e|N|a|m|e|(+0#e000e06&|)| +0#0000000&@45
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+@75
+@8|t+0#af5f00255&|h|i|s|.|n+0#0000000&|a|m|e| |=+0#af5f00255&| +0#0000000&|N|a|m|e|(+0#e000e06&|)| +0#0000000&@48
+@4|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@64
+|e+0#af5f00255&|n|d|c|l|a|s@1| +0#0000000&@66
+@75
+@57|1|,|1| @10|T|o|p| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_nested_99.dump b/runtime/syntax/testdir/dumps/vim_ex_def_nested_99.dump
new file mode 100644
index 0000000..15c078a
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_nested_99.dump
@@ -0,0 +1,20 @@
+|#+0#0000e05#ffffff0| |V|i|m|9| |:|d|e|f| |c|o|m@1|a|n|d| |(|n|e|s|t|e|d|)| +0#0000000&@46
+@75
+|c+0#af5f00255&|l|a|s@1| +0#0000000&|T|e|s|t| @64
+@4|c+0#af5f00255&|o|n|s|t| +0#0000000&|n+0#00e0e07&|a|m|e|:+0#0000000&| |s|t|r|i|n|g| @52
+@75
+@4|d+0#af5f00255&|e|f| +0#0000000&|n|e|w|(+0#e000e06&|)| +0#0000000&@61
+@8|d+0#af5f00255&|e|f| +0#0000000&|N|a|m|e|(+0#e000e06&|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@48
+@12|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|G|i|v|e|N|a|m|e|(+0#e000e06&|)| +0#0000000&@43
+@16|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&|a|n|y|"| +0#0000000&@46
+@12|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@51
+@75
+@12|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|G|i|v|e|N|a|m|e|(+0#e000e06&|)| +0#0000000&@45
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+@75
+@8|t+0#af5f00255&|h|i|s|.|n+0#0000000&|a|m|e| |=+0#af5f00255&| +0#0000000&|N|a|m|e|(+0#e000e06&|)| +0#0000000&@48
+@4|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@64
+|e+0#af5f00255&|n|d|c|l|a|s@1| +0#0000000&@66
+@75
+>e+0#af5f00255&|c|h|o| +0#0000000&|T|e|s|t|.|n|e|w|(+0#e000e06&|)| +0#0000000&@59
+@57|2|0|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_nested_fold_00.dump b/runtime/syntax/testdir/dumps/vim_ex_def_nested_fold_00.dump
new file mode 100644
index 0000000..3bcaccc
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_nested_fold_00.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1>v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&@62
+| +0#0000e05#a8a8a8255@1|#+0&#ffffff0| |V|i|m|9| |:|d|e|f| |c|o|m@1|a|n|d| |(|n|e|s|t|e|d|)| +0#0000000&@44
+| +0#0000e05#a8a8a8255@1|#+0&#ffffff0| |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| |=| |'|f|'| +0#0000000&@29
+| +0#0000e05#a8a8a8255@1|#+0&#ffffff0| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |s|e|t|l| |f|d|c|=|2| |f|d|m|=|s|y|n|t|a|x| +0#0000000&@34
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+| +0#0000e05#a8a8a8255@1|c+0#af5f00255#ffffff0|l|a|s@1| +0#0000000&|T|e|s|t| @62
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|c+0#af5f00255&|o|n|s|t| +0#0000000&|n+0#00e0e07&|a|m|e|:+0#0000000&| |s|t|r|i|n|g| @50
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| |+|-@1| |1@1| |l|i|n|e|s|:| |d|e|f| |n|e|w|(|)|-@49
+| @1|e+0#af5f00255#ffffff0|n|d|c|l|a|s@1| +0#0000000&@64
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|T|e|s|t|.|n|e|w|(+0#e000e06&|)| +0#0000000&@57
+|~+0#4040ff13&| @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_def_nested_fold_01.dump b/runtime/syntax/testdir/dumps/vim_ex_def_nested_fold_01.dump
new file mode 100644
index 0000000..c1f9fa8
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_nested_fold_01.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|#+0&#ffffff0| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |s|e|t|l| |f|d|c|=|2| |f|d|m|=|s|y|n|t|a|x| +0#0000000&@34
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+| +0#0000e05#a8a8a8255@1|c+0#af5f00255#ffffff0|l|a|s@1| +0#0000000&|T|e|s|t| @62
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|c+0#af5f00255&|o|n|s|t| +0#0000000&|n+0#00e0e07&|a|m|e|:+0#0000000&| |s|t|r|i|n|g| @50
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| >+|-@1| |1@1| |l|i|n|e|s|:| |d|e|f| |n|e|w|(|)|-@49
+| @1|e+0#af5f00255#ffffff0|n|d|c|l|a|s@1| +0#0000000&@64
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|T|e|s|t|.|n|e|w|(+0#e000e06&|)| +0#0000000&@57
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|9|,|5|-|1| @7|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_nested_fold_99.dump b/runtime/syntax/testdir/dumps/vim_ex_def_nested_fold_99.dump
new file mode 100644
index 0000000..84a08f8
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_def_nested_fold_99.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&@62
+| +0#0000e05#a8a8a8255@1|#+0&#ffffff0| |V|i|m|9| |:|d|e|f| |c|o|m@1|a|n|d| |(|n|e|s|t|e|d|)| +0#0000000&@44
+| +0#0000e05#a8a8a8255@1|#+0&#ffffff0| |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| |=| |'|f|'| +0#0000000&@29
+| +0#0000e05#a8a8a8255@1|#+0&#ffffff0| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |s|e|t|l| |f|d|c|=|2| |f|d|m|=|s|y|n|t|a|x| +0#0000000&@34
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+| +0#0000e05#a8a8a8255@1|c+0#af5f00255#ffffff0|l|a|s@1| +0#0000000&|T|e|s|t| @62
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|c+0#af5f00255&|o|n|s|t| +0#0000000&|n+0#00e0e07&|a|m|e|:+0#0000000&| |s|t|r|i|n|g| @50
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| |+|-@1| |1@1| |l|i|n|e|s|:| |d|e|f| |n|e|w|(|)|-@49
+| @1|e+0#af5f00255#ffffff0|n|d|c|l|a|s@1| +0#0000000&@64
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+| +0#0000e05#a8a8a8255@1>e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|T|e|s|t|.|n|e|w|(+0#e000e06&|)| +0#0000000&@57
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|2@1|,|1| @9|A|l@1| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_01.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_01.dump
index 461531d..9034e28 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_function_fold_01.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_01.dump
@@ -17,4 +17,4 @@
 | +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|%| 
+@57|1|9|,|1| @10|6|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_02.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_02.dump
index 3a64c7f..17e220f 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_function_fold_02.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_02.dump
@@ -17,4 +17,4 @@
 |++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|%| 
+| +0#0000000#ffffff0@56|3|7|,|1| @9|1|4|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_03.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_03.dump
index 3f26306..b229e6c 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_function_fold_03.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_03.dump
@@ -17,4 +17,4 @@
 | +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|%| 
+@57|5@1|,|0|-|1| @7|2@1|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_04.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_04.dump
index 52423a2..d9aa1c9 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_function_fold_04.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_04.dump
@@ -17,4 +17,4 @@
 |++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|%| 
+| +0#0000000#ffffff0@56|7|3|,|1| @9|3|2|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_05.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_05.dump
index d2acafc..989c504 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_function_fold_05.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_05.dump
@@ -17,4 +17,4 @@
 | +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|%| 
+@57|9|1|,|1| @9|4|2|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_06.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_06.dump
index 354af8e..f6619c2 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_function_fold_06.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_06.dump
@@ -17,4 +17,4 @@
 |++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|%| 
+| +0#0000000#ffffff0@56|1|0|9|,|1| @8|5|2|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_07.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_07.dump
index fc403c5..8e84214 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_function_fold_07.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_07.dump
@@ -17,4 +17,4 @@
 | +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|%| 
+@57|1|2|7|,|0|-|1| @6|6|3|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_08.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_08.dump
index 4d519d0..fb482ff 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_function_fold_08.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_08.dump
@@ -17,4 +17,4 @@
 |++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|%| 
+@57|1|4|5|,|3|-|1| @6|7|4|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_09.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_09.dump
index 8ecc529..4b6a2d2 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_function_fold_09.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_09.dump
@@ -17,4 +17,4 @@
 |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|%| 
+@57|1|6|3|,|7|-|1| @6|7|8|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_10.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_10.dump
new file mode 100644
index 0000000..2e986c4
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_10.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|"+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
+@75
+@75
+|"+0#0000e05&| |f|o|l|d|-|r|e|g|i|o|n| |e|n|d|i|n|g| +0#0000000&@54
+@75
+|++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
+|++0#0000e05#a8a8a8255|-@1| @1|6| |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|5| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)|-@46
+| +0#0000000#ffffff0@74
+@57|1|8|1|,|1| @8|9|1|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_11.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_11.dump
new file mode 100644
index 0000000..174e250
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_11.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|(|)|-@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|6| |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|5| |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|6| |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|5| |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|2| |l|i|n|e|s|:| |:|f|u|n|c|t|i|o|n| |F|o@1|(|)|-@45
+| +0#0000000#ffffff0@74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|9@1|,|0|-|1| @6|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_12.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_12.dump
new file mode 100644
index 0000000..d68f8a1
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_12.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|++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
+|++0#0000e05#a8a8a8255|-@1| @1|6| |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|5| |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|2| |l|i|n|e|s|:| |:|f|u|n|c|t|i|o|n| |F|o@1|(|)|-@45
+| +0#0000000#ffffff0@74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|2|1|7|,|5|-|1| @6|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_fold_99.dump b/runtime/syntax/testdir/dumps/vim_ex_function_fold_99.dump
index b6770ef..04aa4ba 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_function_fold_99.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_fold_99.dump
@@ -1,20 +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
+|d+0#af5f00255#ffffff0|e|l|f|u|n|c|t|i|o|n| +0#0000000&|f|o@1|.+0#af5f00255&|b+0#0000000&|a|r| @55
+@75
+@75
+|"+0#0000e05&| |f|o|l|d|-|r|e|g|i|o|n| |e|n|d|i|n|g| +0#0000000&@54
+@75
+|++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|(|x|,| |y| |=| |4|2|,| |z| |=| |"|z|e|d|"|)|-@26
+|++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|6| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|-@47
+|++0#0000e05#a8a8a8255|-@1| @1|6| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|o@1|(|)|-@46
 | +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| 
+|++0#0000e05#a8a8a8255|-@1| @1|6| |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|5| |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|2| |l|i|n|e|s|:| |:|f|u|n|c|t|i|o|n| |F|o@1|(|)|-@45
+> +0#0000000#ffffff0@74
+@57|2@1|3|,|0|-|1| @6|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_nested_00.dump b/runtime/syntax/testdir/dumps/vim_ex_function_nested_00.dump
new file mode 100644
index 0000000..6f0ca86
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_nested_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|d|e|f| |a|n|d| |:|f|u|n|c|t|i|o|n| |c|o|m@1|a|n|d|s| |(|n|e|s|t|e|d|)| +0#0000000&@32
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|u|n|A|(+0#e000e06&|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@56
+@4|d+0#af5f00255&|e|f| +0#0000000&|D|o|F|u|n|A|(+0#e000e06&|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@50
+@8|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&|.|"| +0#0000000&@56
+@4|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@64
+@75
+@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|D|o|F|u|n|A|(+0#e000e06&|)| +0#0000000&@55
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|u|n|B|(+0#e000e06&|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@56
+@4|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|D|o|F|u|n|B|(+0#e000e06&|)| +0#0000000&@53
+@8|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&|.@1|"| +0#0000000&@55
+@4|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@59
+@75
+@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|D|o|F|u|n|B|(+0#e000e06&|)| +0#0000000&@55
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|u|n|C|(+0#e000e06&|)| +0#0000000&@59
+@57|1|,|1| @10|T|o|p| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_nested_01.dump b/runtime/syntax/testdir/dumps/vim_ex_function_nested_01.dump
new file mode 100644
index 0000000..640bdf5
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_nested_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@3|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@59
+@75
+@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|D|o|F|u|n|B|(+0#e000e06&|)| +0#0000000&@55
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+>f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|u|n|C|(+0#e000e06&|)| +0#0000000&@59
+@4|d+0#af5f00255&|e|f| +0#0000000&|D|o|F|u|n|C|(+0#e000e06&|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@50
+@8|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@54
+@4|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@64
+@75
+@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|D|o|F|u|n|C|(+0#e000e06&|)| +0#0000000&@55
+|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|u|n|D|(+0#e000e06&|)| +0#0000000&@59
+@4|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|D|o|F|u|n|D|(+0#e000e06&|)| +0#0000000&@53
+@8|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&|.@3|"| +0#0000000&@53
+@4|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@59
+@75
+@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|D|o|F|u|n|D|(+0#e000e06&|)| +0#0000000&@55
+@57|1|9|,|1| @9|6|8|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_nested_99.dump b/runtime/syntax/testdir/dumps/vim_ex_function_nested_99.dump
new file mode 100644
index 0000000..6ef83ef
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_nested_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@3|d+0#af5f00255&|e|f| +0#0000000&|D|o|F|u|n|C|(+0#e000e06&|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@50
+@8|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@54
+@4|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@64
+@75
+@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|D|o|F|u|n|C|(+0#e000e06&|)| +0#0000000&@55
+|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|u|n|D|(+0#e000e06&|)| +0#0000000&@59
+@4|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|D|o|F|u|n|D|(+0#e000e06&|)| +0#0000000&@53
+@8|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&|.@3|"| +0#0000000&@53
+@4|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@59
+@75
+@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|D|o|F|u|n|D|(+0#e000e06&|)| +0#0000000&@55
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|F|u|n|A|(+0#e000e06&|)| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&|F|u|n|B|(+0#e000e06&|)| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&|F|u|n|C|(+0#e000e06&|)| +0#0000000&@63
+>e+0#af5f00255&|c|h|o| +0#0000000&|F|u|n|D|(+0#e000e06&|)| +0#0000000&@63
+@57|3|8|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_nested_fold_00.dump b/runtime/syntax/testdir/dumps/vim_ex_function_nested_fold_00.dump
new file mode 100644
index 0000000..7d658b7
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_nested_fold_00.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1>"+0&#ffffff0| |V|i|m| |:|d|e|f| |a|n|d| |:|f|u|n|c|t|i|o|n| |c|o|m@1|a|n|d|s| |(|n|e|s|t|e|d|)| +0#0000000&@30
+| +0#0000e05#a8a8a8255@1|"+0&#ffffff0| |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| |=| |'|f|'| +0#0000000&@29
+| +0#0000e05#a8a8a8255@1|"+0&#ffffff0| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |s|e|t|l| |f|d|c|=|2| |f|d|m|=|s|y|n|t|a|x| +0#0000000&@34
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| |+|-@1| @1|7| |l|i|n|e|s|:| |d|e|f| |F|u|n|A|(|)|:| |s|t|r|i|n|g|-@40
+| @1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| |+|-@1| @1|7| |l|i|n|e|s|:| |d|e|f| |F|u|n|B|(|)|:| |s|t|r|i|n|g|-@40
+| @1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| |+|-@1| @1|7| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|u|n|C|(|)|-@43
+| @1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| |+|-@1| @1|7| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|u|n|D|(|)|-@43
+| @1| +0#0000000#ffffff0@72
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|A|(+0#e000e06&|)| +0#0000000&@61
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|B|(+0#e000e06&|)| +0#0000000&@61
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|C|(+0#e000e06&|)| +0#0000000&@61
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|D|(+0#e000e06&|)| +0#0000000&@61
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|,|1| @10|A|l@1| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_nested_fold_01.dump b/runtime/syntax/testdir/dumps/vim_ex_function_nested_fold_01.dump
new file mode 100644
index 0000000..96c1d34
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_nested_fold_01.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|"+0&#ffffff0| |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| |=| |'|f|'| +0#0000000&@29
+| +0#0000e05#a8a8a8255@1|"+0&#ffffff0| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |s|e|t|l| |f|d|c|=|2| |f|d|m|=|s|y|n|t|a|x| +0#0000000&@34
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| |+|-@1| @1|7| |l|i|n|e|s|:| |d|e|f| |F|u|n|A|(|)|:| |s|t|r|i|n|g|-@40
+| @1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| >+|-@1| @1|7| |l|i|n|e|s|:| |d|e|f| |F|u|n|B|(|)|:| |s|t|r|i|n|g|-@40
+| @1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| |+|-@1| @1|7| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|u|n|C|(|)|-@43
+| @1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| |+|-@1| @1|7| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|u|n|D|(|)|-@43
+| @1| +0#0000000#ffffff0@72
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|A|(+0#e000e06&|)| +0#0000000&@61
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|B|(+0#e000e06&|)| +0#0000000&@61
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|C|(+0#e000e06&|)| +0#0000000&@61
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|D|(+0#e000e06&|)| +0#0000000&@61
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|9|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_function_nested_fold_02.dump b/runtime/syntax/testdir/dumps/vim_ex_function_nested_fold_02.dump
new file mode 100644
index 0000000..977aaa8
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_nested_fold_02.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| |+|-@1| @1|7| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|u|n|C|(|)|-@43
+| @1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| |+|-@1| @1|7| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|u|n|D|(|)|-@43
+| @1| +0#0000000#ffffff0@72
+| +0#0000e05#a8a8a8255@1>e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|A|(+0#e000e06&|)| +0#0000000&@61
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|B|(+0#e000e06&|)| +0#0000000&@61
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|C|(+0#e000e06&|)| +0#0000000&@61
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|D|(+0#e000e06&|)| +0#0000000&@61
+|~+0#4040ff13&| @73
+|~| @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_function_nested_fold_99.dump b/runtime/syntax/testdir/dumps/vim_ex_function_nested_fold_99.dump
new file mode 100644
index 0000000..ad1fc05
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_function_nested_fold_99.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|"+0&#ffffff0| |V|i|m| |:|d|e|f| |a|n|d| |:|f|u|n|c|t|i|o|n| |c|o|m@1|a|n|d|s| |(|n|e|s|t|e|d|)| +0#0000000&@30
+| +0#0000e05#a8a8a8255@1|"+0&#ffffff0| |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| |=| |'|f|'| +0#0000000&@29
+| +0#0000e05#a8a8a8255@1|"+0&#ffffff0| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |s|e|t|l| |f|d|c|=|2| |f|d|m|=|s|y|n|t|a|x| +0#0000000&@34
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| |+|-@1| @1|7| |l|i|n|e|s|:| |d|e|f| |F|u|n|A|(|)|:| |s|t|r|i|n|g|-@40
+| @1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| |+|-@1| @1|7| |l|i|n|e|s|:| |d|e|f| |F|u|n|B|(|)|:| |s|t|r|i|n|g|-@40
+| @1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| |+|-@1| @1|7| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|u|n|C|(|)|-@43
+| @1| +0#0000000#ffffff0@72
+|++0#0000e05#a8a8a8255| |+|-@1| @1|7| |l|i|n|e|s|:| |f|u|n|c|t|i|o|n| |F|u|n|D|(|)|-@43
+| @1| +0#0000000#ffffff0@72
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|A|(+0#e000e06&|)| +0#0000000&@61
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|B|(+0#e000e06&|)| +0#0000000&@61
+| +0#0000e05#a8a8a8255@1|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|C|(+0#e000e06&|)| +0#0000000&@61
+| +0#0000e05#a8a8a8255@1>e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|F|u|n|D|(+0#e000e06&|)| +0#0000000&@61
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|4|0|,|1| @9|A|l@1| 
diff --git a/runtime/syntax/testdir/dumps/vim_expr_02.dump b/runtime/syntax/testdir/dumps/vim_expr_02.dump
index 3bfab4c..97a621d 100644
--- a/runtime/syntax/testdir/dumps/vim_expr_02.dump
+++ b/runtime/syntax/testdir/dumps/vim_expr_02.dump
@@ -17,4 +17,4 @@
 |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|%| 
+@57|3|7|,|1| @9|5|8|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_expr_03.dump b/runtime/syntax/testdir/dumps/vim_expr_03.dump
index 2322e7d..41f062f 100644
--- a/runtime/syntax/testdir/dumps/vim_expr_03.dump
+++ b/runtime/syntax/testdir/dumps/vim_expr_03.dump
@@ -8,13 +8,13 @@
 |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
+|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&|2|3|.|4|5|6| +0#0000000&@62
+|e+0#af5f00255&|c|h|o| +0#0000000&|++0#af5f00255&|0+0#e000002&|.|0@2|1| +0#0000000&@62
+|e+0#af5f00255&|c|h|o| +0#0000000&|5+0#e000002&@1|.|0| +0#0000000&@65
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|.|1|2|3| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&|.|2|3|4|e|0|3| +0#0000000&@61
+|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&|.|0|E|-|6| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|3+0#e000002&|.|1|4|1|6|e|+|8@1| +0#0000000&@58
 @75
 |"+0#0000e05&| |B|l|o|b| +0#0000000&@68
-@57|5@1|,|1| @9|9|4|%| 
+@57|5@1|,|1| @9|9|2|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_expr_99.dump b/runtime/syntax/testdir/dumps/vim_expr_99.dump
index b8394fb..e9ba266 100644
--- a/runtime/syntax/testdir/dumps/vim_expr_99.dump
+++ b/runtime/syntax/testdir/dumps/vim_expr_99.dump
@@ -1,20 +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#ffffff0|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
+|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&|2|3|.|4|5|6| +0#0000000&@62
+|e+0#af5f00255&|c|h|o| +0#0000000&|++0#af5f00255&|0+0#e000002&|.|0@2|1| +0#0000000&@62
+|e+0#af5f00255&|c|h|o| +0#0000000&|5+0#e000002&@1|.|0| +0#0000000&@65
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|.|1|2|3| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&|.|2|3|4|e|0|3| +0#0000000&@61
+|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&|.|0|E|-|6| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|3+0#e000002&|.|1|4|1|6|e|+|8@1| +0#0000000&@58
 @75
 |"+0#0000e05&| |B|l|o|b| +0#0000000&@68
+|e+0#af5f00255&|c|h|o| +0#0000000&|0+0#e000002&|z| +0#0000000&@67
 |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| 
+@57|7|2|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_keymap_01.dump b/runtime/syntax/testdir/dumps/vim_keymap_01.dump
index 9a7a833..a07bfc4 100644
--- a/runtime/syntax/testdir/dumps/vim_keymap_01.dump
+++ b/runtime/syntax/testdir/dumps/vim_keymap_01.dump
@@ -17,4 +17,4 @@
 |"+0#0000e05&| |V|i|m|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| |c|h|a|r|a|c|t|e|r|s| @30| +0#0000000&@12
 |#| |<+0#e000e06&|c|h|a|r|-|0|x|0@1|a|3|>| +0#0000000&@15|L+0#0000e05&|i|n|e| |s|h|o|u|l|d| |n|o|t| |m|a|t|c|h| |a|s| |a| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e
 |n|t| +0#0000000&@72
-@57|1|9|,|1| @9|9|3|%| 
+@57|1|9|,|1| @9|8|7|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_keymap_99.dump b/runtime/syntax/testdir/dumps/vim_keymap_99.dump
index ad6b5a5..1b27d57 100644
--- a/runtime/syntax/testdir/dumps/vim_keymap_99.dump
+++ b/runtime/syntax/testdir/dumps/vim_keymap_99.dump
@@ -1,6 +1,4 @@
-|a+0&#ffffff0| |A| @3|B+0#0000e05&|a|s|i|c| |m|a|p@1|i|n|g| @38| +0#0000000&@15
-|'|a| |á| @2|M+0#0000e05&|o|r|e| |t|h|a|n| |o|n|e| |c|h|a|r| |i|n| |f|i|r|s|t| |c|o|l|u|m|n| @10| +0#0000000&@22
-@75
+| +0&#ffffff0@74
 |"+0#0000e05&| |S|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| @56
 @60| +0#0000000&@14
 |<+0#e000e06&|c|h|a|r|-|6|2|>| +0#0000000&@5|B| @14|S+0#0000e05&|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| |a|l@1|o|w|e|d| |i|n| |L|H|S| |-| |d|e|c|i|m|a|l| @2
@@ -15,6 +13,8 @@
 |"+0#0000e05&| |V|i|m|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| |c|h|a|r|a|c|t|e|r|s| @30| +0#0000000&@12
 |#| |<+0#e000e06&|c|h|a|r|-|0|x|0@1|a|3|>| +0#0000000&@15|L+0#0000e05&|i|n|e| |s|h|o|u|l|d| |n|o|t| |m|a|t|c|h| |a|s| |a| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e
 |n|t| +0#0000000&@72
->\|"| |“| @18|L+0#0000e05&|i|n|e| |s|h|o|u|l|d| |n|o|t| |m|a|t|c|h| |a|s| |a| |l|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| | +0#0000000&@2
-|~+0#4040ff13&| @73
-| +0#0000000&@56|2|6|,|1| @9|B|o|t| 
+|\|"| |“| @26|L+0#0000e05&|i|n|e| |s|h|o|u|l|d| |n|o|t| |m|a|t|c|h| |a|s| |a| |l|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m
+@1|e|n|t| | +0#0000000&@69
+>:| |"| @27|L+0#0000e05&|i|n|e| |s|h|o|u|l|d| |n|o|t| |m|a|t|c|h| |a|s| |a| |l|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m
+@1|e|n|t| +0#0000000&@70
+@57|2|7|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/vim_object_methods_00.dump b/runtime/syntax/testdir/dumps/vim_object_methods_00.dump
new file mode 100644
index 0000000..8089fc1
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_object_methods_00.dump
@@ -0,0 +1,20 @@
+>v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&@64
+|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|M|e|t|h|o|d|N|a|m|e| |T|o|d|o| +0#0000000&@31
+@75
+@75
+|#+0#0000e05&| |V|i|m| |||b|u|i|l|t|i|n|-|o|b|j|e|c|t|-|m|e|t|h|o|d|s||| |a|n|d| |n|a|m|e|s|a|k|e| |b|u|i|l|t|i|n| |f|u|n|c|t|i|o|n|s|.| +0#0000000&@12
+|c+0#af5f00255&|l|a|s@1| +0#0000000&|P|a|i|r|C|l|a|s@1|T|e|s|t| @55
+@8|p+0#af5f00255&|u|b|l|i|c| +0#0000000&|c+0#af5f00255&|o|n|s|t| +0#0000000&|a+0#00e0e07&|:+0#0000000&| |a|n|y| @47
+@8|p+0#af5f00255&|u|b|l|i|c| +0#0000000&|c+0#af5f00255&|o|n|s|t| +0#0000000&|b+0#00e0e07&|:+0#0000000&| |a|n|y| @47
+@75
+@8|d+0#af5f00255&|e|f| +0#0000000&|n|e|w|(+0#e000e06&|a+0#00e0e07&|:+0#0000000&| |a+0#00e0003&|n|y|,+0#0000000&| |b+0#00e0e07&|:+0#0000000&| |a+0#00e0003&|n|y|)+0#e000e06&| +0#0000000&@43
+@16|t+0#af5f00255&|h|i|s|.|a| +0#0000000&|=+0#af5f00255&| +0#0000000&|a+0#af5f00255&| +0#0000000&@48
+@16|t+0#af5f00255&|h|i|s|.|b| +0#0000000&|=+0#af5f00255&| +0#0000000&|b+0#af5f00255&| +0#0000000&@48
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+@75
+@8|d+0#af5f00255&|e|f| +0#0000000&|e+0#0000001#ffff4012|m|p|t|y|(+0#e000e06#ffffff0|)|:+0#0000000&| |b+0#00e0003&|o@1|l| +0#0000000&@49
+@16|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|f+0#00e0e07&|a|l|s|e| +0#0000000&@46
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+@8|d+0#af5f00255&|e|f| +0#0000000&|l+0#0000001#ffff4012|e|n|(+0#e000e06#ffffff0|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@49
+@16|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|2+0#e000002&| +0#0000000&@50
+@57|1|,|1| @10|T|o|p| 
diff --git a/runtime/syntax/testdir/dumps/vim_object_methods_01.dump b/runtime/syntax/testdir/dumps/vim_object_methods_01.dump
new file mode 100644
index 0000000..05bb98f
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_object_methods_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+@8|d+0#af5f00255&|e|f| +0#0000000&|e+0#0000001#ffff4012|m|p|t|y|(+0#e000e06#ffffff0|)|:+0#0000000&| |b+0#00e0003&|o@1|l| +0#0000000&@49
+@16|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|f+0#00e0e07&|a|l|s|e| +0#0000000&@46
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+@8|d+0#af5f00255&|e|f| +0#0000000&|l+0#0000001#ffff4012|e|n|(+0#e000e06#ffffff0|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@49
+@16>r+0#af5f00255&|e|t|u|r|n| +0#0000000&|2+0#e000002&| +0#0000000&@50
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+@8|d+0#af5f00255&|e|f| +0#0000000&|s+0#0000001#ffff4012|t|r|i|n|g|(+0#e000e06#ffffff0|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@46
+@16|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|p+0#00e0e07&|r|i|n|t|f|(+0#e000e06&|'+0#e000002&|(|%|s|,| |%|s|)|'|,+0#0000000&| |t+0#00e0e07&|h|i|s|.+0#af5f00255&|a+0#00e0e07&|,+0#0000000&| |t+0#00e0e07&|h|i|s|.+0#af5f00255&|b+0#00e0e07&|)+0#e000e06&| +0#0000000&@17
+@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
+|e+0#af5f00255&|n|u|m| +0#0000000&|M|a|r|k|e|r|E|n|u|m|T|e|s|t| @55
+@8|I|N|S|T|A|N|C|E| @58
+@75
+@8|d+0#af5f00255&|e|f| +0#0000000&|N|o|O|p|(+0#e000e06&|)| +0#0000000&@56
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+@75
+@8|d+0#af5f00255&|e|f| +0#0000000&|e+0#0000001#ffff4012|m|p|t|y|(+0#e000e06#ffffff0|)|:+0#0000000&| |b+0#00e0003&|o@1|l| +0#0000000&@49
+@57|1|9|,|3|-|1|7| @6|3|5|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_object_methods_02.dump b/runtime/syntax/testdir/dumps/vim_object_methods_02.dump
new file mode 100644
index 0000000..7fd4942
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_object_methods_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|d+0#af5f00255&|e|f| +0#0000000&|e+0#0000001#ffff4012|m|p|t|y|(+0#e000e06#ffffff0|)|:+0#0000000&| |b+0#00e0003&|o@1|l| +0#0000000&@49
+@16|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|t+0#00e0e07&|r|u|e| +0#0000000&@47
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+@8|d+0#af5f00255&|e|f| +0#0000000&|l+0#0000001#ffff4012|e|n|(+0#e000e06#ffffff0|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@49
+@16|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|0+0#e000002&| +0#0000000&@50
+@8>e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+@8|d+0#af5f00255&|e|f| +0#0000000&|s+0#0000001#ffff4012|t|r|i|n|g|(+0#e000e06#ffffff0|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@46
+@16|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|t+0#00e0e07&|h|i|s|.+0#af5f00255&|n+0#0000000&|a|m|e| @42
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+|e+0#af5f00255&|n|d|e|n|u|m| +0#0000000&@67
+@75
+|c+0#af5f00255&|o|n|s|t| +0#0000000&|b+0#00e0e07&|1|:+0#0000000&| |b|o@1|l| |=+0#af5f00255&| +0#0000000&|e+0#00e0e07&|m|p|t|y|(+0#e000e06&|M+0#00e0e07&|a|r|k|e|r|E|n|u|m|T|e|s|t|.+0#af5f00255&|I+0#00e0e07&|N|S|T|A|N|C|E|)+0#e000e06&| +0#0000000&@27
+|c+0#af5f00255&|o|n|s|t| +0#0000000&|n+0#00e0e07&|1|:+0#0000000&| |n+0#af5f00255&|u|m|b|e|r| +0#0000000&|=+0#af5f00255&| +0#0000000&|l+0#00e0e07&|e|n|(+0#e000e06&|M+0#00e0e07&|a|r|k|e|r|E|n|u|m|T|e|s|t|.+0#af5f00255&|I+0#00e0e07&|N|S|T|A|N|C|E|)+0#e000e06&| +0#0000000&@27
+|c+0#af5f00255&|o|n|s|t| +0#0000000&|s+0#00e0e07&|1|:+0#0000000&| |s|t|r|i|n|g| |=+0#af5f00255&| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|M+0#00e0e07&|a|r|k|e|r|E|n|u|m|T|e|s|t|.+0#af5f00255&|I+0#00e0e07&|N|S|T|A|N|C|E|)+0#e000e06&| +0#0000000&@24
+|e+0#af5f00255&|c|h|o| +0#0000000&|b+0#00e0e07&|1| +0#0000000&|&+0#af5f00255&@1| +0#0000000&|M|a|r|k|e|r|E|n|u|m|T|e|s|t|.|I|N|S|T|A|N|C|E|.|e+0#0000001#ffff4012|m|p|t|y|(+0#e000e06#ffffff0|)| +0#0000000&@32
+|e+0#af5f00255&|c|h|o| +0#0000000&|n+0#00e0e07&|1| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|0+0#e000002&| +0#0000000&|&+0#af5f00255&@1| +0#0000000&|M|a|r|k|e|r|E|n|u|m|T|e|s|t|.|I|N|S|T|A|N|C|E|.|l+0#0000001#ffff4012|e|n|(+0#e000e06#ffffff0|)| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|0+0#e000002&| +0#0000000&@24
+|e+0#af5f00255&|c|h|o| +0#0000000&|s+0#00e0e07&|1| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|'+0#e000002&|I|N|S|T|A|N|C|E|'| +0#0000000&|&+0#af5f00255&@1| +0#0000000&|M|a|r|k|e|r|E|n|u|m|T|e|s|t|.|I|N|S|T|A|N|C|E|.|s+0#0000001#ffff4012|t|r|i|n|g|(+0#e000e06#ffffff0|)| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|'+0#e000002&|I|N|S|T|A|N|C|E|'| +0#0000000&@3
+@75
+|c+0#af5f00255&|o|n|s|t| +0#0000000&|p+0#00e0e07&|a|i|r|:+0#0000000&| |P|a|i|r|C|l|a|s@1|T|e|s|t| |=+0#af5f00255&| +0#0000000&|P|a|i|r|C|l|a|s@1|T|e|s|t|.|n|e|w|(+0#e000e06&|0+0#e000002&|,+0#0000000&| |1+0#e000002&|)+0#e000e06&| +0#0000000&@23
+@57|3|7|,|2|-|9| @7|8|3|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_object_methods_99.dump b/runtime/syntax/testdir/dumps/vim_object_methods_99.dump
new file mode 100644
index 0000000..b69bf91
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_object_methods_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@7|d+0#af5f00255&|e|f| +0#0000000&|s+0#0000001#ffff4012|t|r|i|n|g|(+0#e000e06#ffffff0|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@46
+@16|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|t+0#00e0e07&|h|i|s|.+0#af5f00255&|n+0#0000000&|a|m|e| @42
+@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
+|e+0#af5f00255&|n|d|e|n|u|m| +0#0000000&@67
+@75
+|c+0#af5f00255&|o|n|s|t| +0#0000000&|b+0#00e0e07&|1|:+0#0000000&| |b|o@1|l| |=+0#af5f00255&| +0#0000000&|e+0#00e0e07&|m|p|t|y|(+0#e000e06&|M+0#00e0e07&|a|r|k|e|r|E|n|u|m|T|e|s|t|.+0#af5f00255&|I+0#00e0e07&|N|S|T|A|N|C|E|)+0#e000e06&| +0#0000000&@27
+|c+0#af5f00255&|o|n|s|t| +0#0000000&|n+0#00e0e07&|1|:+0#0000000&| |n+0#af5f00255&|u|m|b|e|r| +0#0000000&|=+0#af5f00255&| +0#0000000&|l+0#00e0e07&|e|n|(+0#e000e06&|M+0#00e0e07&|a|r|k|e|r|E|n|u|m|T|e|s|t|.+0#af5f00255&|I+0#00e0e07&|N|S|T|A|N|C|E|)+0#e000e06&| +0#0000000&@27
+|c+0#af5f00255&|o|n|s|t| +0#0000000&|s+0#00e0e07&|1|:+0#0000000&| |s|t|r|i|n|g| |=+0#af5f00255&| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|M+0#00e0e07&|a|r|k|e|r|E|n|u|m|T|e|s|t|.+0#af5f00255&|I+0#00e0e07&|N|S|T|A|N|C|E|)+0#e000e06&| +0#0000000&@24
+|e+0#af5f00255&|c|h|o| +0#0000000&|b+0#00e0e07&|1| +0#0000000&|&+0#af5f00255&@1| +0#0000000&|M|a|r|k|e|r|E|n|u|m|T|e|s|t|.|I|N|S|T|A|N|C|E|.|e+0#0000001#ffff4012|m|p|t|y|(+0#e000e06#ffffff0|)| +0#0000000&@32
+|e+0#af5f00255&|c|h|o| +0#0000000&|n+0#00e0e07&|1| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|0+0#e000002&| +0#0000000&|&+0#af5f00255&@1| +0#0000000&|M|a|r|k|e|r|E|n|u|m|T|e|s|t|.|I|N|S|T|A|N|C|E|.|l+0#0000001#ffff4012|e|n|(+0#e000e06#ffffff0|)| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|0+0#e000002&| +0#0000000&@24
+|e+0#af5f00255&|c|h|o| +0#0000000&|s+0#00e0e07&|1| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|'+0#e000002&|I|N|S|T|A|N|C|E|'| +0#0000000&|&+0#af5f00255&@1| +0#0000000&|M|a|r|k|e|r|E|n|u|m|T|e|s|t|.|I|N|S|T|A|N|C|E|.|s+0#0000001#ffff4012|t|r|i|n|g|(+0#e000e06#ffffff0|)| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|'+0#e000002&|I|N|S|T|A|N|C|E|'| +0#0000000&@3
+@75
+|c+0#af5f00255&|o|n|s|t| +0#0000000&|p+0#00e0e07&|a|i|r|:+0#0000000&| |P|a|i|r|C|l|a|s@1|T|e|s|t| |=+0#af5f00255&| +0#0000000&|P|a|i|r|C|l|a|s@1|T|e|s|t|.|n|e|w|(+0#e000e06&|0+0#e000002&|,+0#0000000&| |1+0#e000002&|)+0#e000e06&| +0#0000000&@23
+|c+0#af5f00255&|o|n|s|t| +0#0000000&|b+0#00e0e07&|2|:+0#0000000&| |b|o@1|l| |=+0#af5f00255&| +0#0000000&|!+0#af5f00255&|p+0#0000000&|a|i|r|.|e+0#0000001#ffff4012|m|p|t|y|(+0#e000e06#ffffff0|)| +0#0000000&@44
+|c+0#af5f00255&|o|n|s|t| +0#0000000&|n+0#00e0e07&|2|:+0#0000000&| |n+0#af5f00255&|u|m|b|e|r| +0#0000000&|=+0#af5f00255&| +0#0000000&|p|a|i|r|.|l+0#0000001#ffff4012|e|n|(+0#e000e06#ffffff0|)| +0#0000000&@45
+|c+0#af5f00255&|o|n|s|t| +0#0000000&|s+0#00e0e07&|2|:+0#0000000&| |s|t|r|i|n|g| |=+0#af5f00255&| +0#0000000&|p|a|i|r|.|s+0#0000001#ffff4012|t|r|i|n|g|(+0#e000e06#ffffff0|)| +0#0000000&@42
+|e+0#af5f00255&|c|h|o| +0#0000000&|b+0#00e0e07&|2| +0#0000000&|&+0#af5f00255&@1| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|m|p|t|y|(+0#e000e06&|p+0#00e0e07&|a|i|r|)+0#e000e06&| +0#0000000&@51
+|e+0#af5f00255&|c|h|o| +0#0000000&|n+0#00e0e07&|2| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|2+0#e000002&| +0#0000000&|&+0#af5f00255&@1| +0#0000000&|l+0#00e0e07&|e|n|(+0#e000e06&|p+0#00e0e07&|a|i|r|)+0#e000e06&| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|2+0#e000002&| +0#0000000&@44
+>e+0#af5f00255&|c|h|o| +0#0000000&|s+0#00e0e07&|2| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|'+0#e000002&|(|0|,| |1|)|'| +0#0000000&|&+0#af5f00255&@1| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|p+0#00e0e07&|a|i|r|)+0#e000e06&| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|'+0#e000002&|(|0|,| |1|)|'| +0#0000000&@27
+@57|5|6|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/yaml.yaml_00.dump b/runtime/syntax/testdir/dumps/yaml.yaml_00.dump
new file mode 100644
index 0000000..3b8fd81
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml.yaml_00.dump
@@ -0,0 +1,20 @@
+><+0#0000e05#ffffff0|!|D|O|C|T|Y|P|E| |h|t|m|l|>| +0#0000000&@59
+|<+0#00e0e07&|h+0#af5f00255&|t|m|l|>+0#00e0e07&| +0#0000000&@68
+|<+0#00e0e07&|h+0#af5f00255&|e|a|d|>+0#00e0e07&| +0#0000000&@68
+|<+0#00e0e07&|m+0#af5f00255&|e|t|a| +0#00e0e07&|c+0#00e0003&|h|a|r|s|e|t|=+0#00e0e07&|"+0#e000002&|U|T|F|-|8|"|>+0#00e0e07&| +0#0000000&@52
+|<+0#00e0e07&|t+0#af5f00255&|i|t|l|e|>+0#00e0e07&|~+0#e000e06&|/|D|r|o|p|b|o|x|/|c|p@1|/|v|i|m|/|r|u|n|t|i|m|e|/|s|y|n|t|a|x|/|t|e|s|t|d|i|r|/|i|n|p|u|t|/|y|a|m|l|.|y|a|m|l|.|h|t|m|l|<+0#00e0e07&|/|t+0#af5f00255&|i|t|l|e
+|>+0#00e0e07&| +0#0000000&@73
+|<+0#00e0e07&|m+0#af5f00255&|e|t|a| +0#00e0e07&|n+0#00e0003&|a|m|e|=+0#00e0e07&|"+0#e000002&|G|e|n|e|r|a|t|o|r|"| +0#00e0e07&|c+0#00e0003&|o|n|t|e|n|t|=+0#00e0e07&|"+0#e000002&|V|i|m|/|9|.|1|"|>+0#00e0e07&| +0#0000000&@33
+|<+0#00e0e07&|m+0#af5f00255&|e|t|a| +0#00e0e07&|n+0#00e0003&|a|m|e|=+0#00e0e07&|"+0#e000002&|p|l|u|g|i|n|-|v|e|r|s|i|o|n|"| +0#00e0e07&|c+0#00e0003&|o|n|t|e|n|t|=+0#00e0e07&|"+0#e000002&|v|i|m|9|.|0|_|v|2|"|>+0#00e0e07&| +0#0000000&@26
+|<+0#00e0e07&|m+0#af5f00255&|e|t|a| +0#00e0e07&|n+0#00e0003&|a|m|e|=+0#00e0e07&|"+0#e000002&|s|y|n|t|a|x|"| +0#00e0e07&|c+0#00e0003&|o|n|t|e|n|t|=+0#00e0e07&|"+0#e000002&|y|a|m|l|"|>+0#00e0e07&| +0#0000000&@39
+|<+0#00e0e07&|m+0#af5f00255&|e|t|a| +0#00e0e07&|n+0#00e0003&|a|m|e|=+0#00e0e07&|"+0#e000002&|s|e|t@1|i|n|g|s|"| +0#00e0e07&|c+0#00e0003&|o|n|t|e|n|t|=+0#00e0e07&|"+0#e000002&|u|s|e|_|c|s@1|,|n|o|_|f|o|l|d|c|o|l|u|m|n|,|e|x|p|a|n|d|_|t|a|b|s|,|p|r|e|_|w|r|a|p|,|p
+|r|e|v|e|n|t|_|c|o|p|y|=|,|u|s|e|_|i|n|p|u|t|_|f|o|r|_|p|c|=|n|o|n|e|"|>+0#00e0e07&| +0#0000000&@38
+|<+0#00e0e07&|m+0#af5f00255&|e|t|a| +0#00e0e07&|n+0#00e0003&|a|m|e|=+0#00e0e07&|"+0#e000002&|c|o|l|o|r|s|c|h|e|m|e|"| +0#00e0e07&|c+0#00e0003&|o|n|t|e|n|t|=+0#00e0e07&|"+0#e000002&|l|a|n|d|s|c|a|p|e|"|>+0#00e0e07&| +0#0000000&@29
+|<+0#00e0e07&|s+0#af5f00255&|t|y|l|e|>+0#00e0e07&| +0#0000000&@67
+|<+0#0000e05&|!|-@1| +0#0000000&@70
+|p+0#af5f00255&|r|e| +0#0000000&|{+0#00e0e07&| +0#0000000&|w+0#00e0003&|h|i|t|e|-|s|p|a|c|e|:+0#0000000&| |p+0#e000002&|r|e|-|w|r|a|p|;+0#0000000&| |f+0#00e0003&|o|n|t|-|f|a|m|i|l|y|:+0#0000000&| |m+0#e000002&|o|n|o|s|p|a|c|e|;+0#0000000&| |c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|f@5|;+0#0000000&| |b+0#00e0003&|a|c|k|g|r
+|o|u|n|d|-|c|o|l|o|r|:+0#0000000&| |#+0#e000002&|0@5|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@52
+|b+0#af5f00255&|o|d|y| +0#0000000&|{+0#00e0e07&| +0#0000000&|f+0#00e0003&|o|n|t|-|f|a|m|i|l|y|:+0#0000000&| |m+0#e000002&|o|n|o|s|p|a|c|e|;+0#0000000&| |c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|f@5|;+0#0000000&| |b+0#00e0003&|a|c|k|g|r|o|u|n|d|-|c|o|l|o|r|:+0#0000000&| |#+0#e000002&|0@5|;+0#0000000&| |}+0#00e0e07&
+|*+0#af5f00255&| +0#0000000&|{+0#00e0e07&| +0#0000000&|f+0#00e0003&|o|n|t|-|s|i|z|e|:+0#0000000&| |1+0#e000002&|e|m|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@53
+|.+0#00e0e07&|I|d|e|n|t|i|f|i|e|r| +0#0000000&|{+0#00e0e07&| +0#0000000&|c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|8|7|d|7|f@1|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@43
+@57|1|,|1| @10|T|o|p| 
diff --git a/runtime/syntax/testdir/dumps/yaml.yaml_01.dump b/runtime/syntax/testdir/dumps/yaml.yaml_01.dump
new file mode 100644
index 0000000..027a3c3
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml.yaml_01.dump
@@ -0,0 +1,20 @@
+|b+0#af5f00255#ffffff0|o|d|y| +0#0000000&|{+0#00e0e07&| +0#0000000&|f+0#00e0003&|o|n|t|-|f|a|m|i|l|y|:+0#0000000&| |m+0#e000002&|o|n|o|s|p|a|c|e|;+0#0000000&| |c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|f@5|;+0#0000000&| |b+0#00e0003&|a|c|k|g|r|o|u|n|d|-|c|o|l|o|r|:+0#0000000&| |#+0#e000002&|0@5|;+0#0000000&| |}+0#00e0e07&
+|*+0#af5f00255&| +0#0000000&|{+0#00e0e07&| +0#0000000&|f+0#00e0003&|o|n|t|-|s|i|z|e|:+0#0000000&| |1+0#e000002&|e|m|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@53
+|.+0#00e0e07&|I|d|e|n|t|i|f|i|e|r| +0#0000000&|{+0#00e0e07&| +0#0000000&|c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|8|7|d|7|f@1|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@43
+|.+0#00e0e07&|S|t|a|t|e|m|e|n|t| +0#0000000&|{+0#00e0e07&| +0#0000000&|c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|5|f|d|7|0@1|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@44
+|.+0#00e0e07&|P|r|e|P|r|o|c| +0#0000000&|{+0#00e0e07&| +0#0000000&|c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|0@1|a|f@2|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@46
+>.+0#00e0e07&|T|y|p|e| +0#0000000&|{+0#00e0e07&| +0#0000000&|c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|f@1|5|f@2|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@49
+|.+0#00e0e07&|S|p|e|c|i|a|l|C|h|a|r| +0#0000000&|{+0#00e0e07&| +0#0000000&|c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|f@1|8|7|0@1|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@42
+|.+0#00e0e07&|C|o|m@1|e|n|t| +0#0000000&|{+0#00e0e07&| +0#0000000&|c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|7|6|7|6|7|6|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@46
+|.+0#00e0e07&|S|t|r|i|n|g| +0#0000000&|{+0#00e0e07&| +0#0000000&|c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|f@1|a|f|5|f|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@47
+|.+0#00e0e07&|N|u|m|b|e|r| +0#0000000&|{+0#00e0e07&| +0#0000000&|c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|5|f|d|7|f@1|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@47
+|.+0#00e0e07&|F|l|o|a|t| +0#0000000&|{+0#00e0e07&| +0#0000000&|c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|5|f@2|a|f|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@48
+|.+0#00e0e07&|C|o|n|s|t|a|n|t| +0#0000000&|{+0#00e0e07&| +0#0000000&|c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|8|7|a|f@2|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@45
+|.+0#00e0e07&|S|p|e|c|i|a|l| +0#0000000&|{+0#00e0e07&| +0#0000000&|c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|d|7|a|f|0@1|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@46
+|-+0#0000e05&@1|>| +0#0000000&@71
+|<+0#00e0e07&|/|s+0#af5f00255&|t|y|l|e|>+0#00e0e07&| +0#0000000&@66
+|<+0#00e0e07&|/|h+0#af5f00255&|e|a|d|>+0#00e0e07&| +0#0000000&@67
+|<+0#00e0e07&|b+0#af5f00255&|o|d|y|>+0#00e0e07&| +0#0000000&@68
+|<+0#00e0e07&|p+0#af5f00255&|r|e| +0#00e0e07&|i+0#00e0003&|d|=+0#00e0e07&|'+0#e000002&|v|i|m|C|o|d|e|E|l|e|m|e|n|t|'|>+0#00e0e07&| +0#0000000&@49
+|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|%+0#0000000&|Y|A|M|L|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|N|u|m|b|e|r|"|>+0#00e0e07&|1+0#0000000&|.|2|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@6
+@57|1|9|,|1| @10|9|%| 
diff --git a/runtime/syntax/testdir/dumps/yaml.yaml_02.dump b/runtime/syntax/testdir/dumps/yaml.yaml_02.dump
new file mode 100644
index 0000000..b0037c8
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml.yaml_02.dump
@@ -0,0 +1,20 @@
+|<+0#00e0e07#ffffff0|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|%+0#0000000&|T|A|G|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|r|i|n|g|"|>+0#00e0e07&|!+0#0000000&@1|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@4|<+0#00e0e07&|s+0#af5f00255&|p|a
+|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|r|i|n|g|"|>+0#00e0e07&|t+0#0000000&|a|g|:|y|a|m|l|.|o|r|g|,|2|0@1|2|:|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |s|e|c|o|n|d|a|r
+|y| |t|a|g| |h|a|n|d|l|e|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@55
+|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|%+0#0000000&|T|A|G|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|r|i|n|g|"|>+0#00e0e07&|!+0#0000000&|y|a|m|l|!|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a
+|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|r|i|n|g|"|>+0#00e0e07&|t+0#0000000&|a|g|:|y|a|m|l|.|o|r|g|,|2|0@1|2|:|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |n|a|m|e|d| |t|a
+|g| |h|a|n|d|l|e|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@59
+|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|P|r|e|P|r|o|c|"|>+0#00e0e07&|-+0#0000000&@2|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@42
+><+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|-+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|T|y|p|e|"|>+0#00e0e07&|!+0#0000000&|s|t|r|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1
+|=+0#00e0e07&|"+0#e000002&|N|u|m|b|e|r|"|>+0#00e0e07&|0+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@4|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |p|r|i|m|a|r|y| |t|a|g| |h|a|n|d|l|e|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@1
+|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|-+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|T|y|p|e|"|>+0#00e0e07&|!+0#0000000&@1|s|t|r|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s
+@1|=+0#00e0e07&|"+0#e000002&|N|u|m|b|e|r|"|>+0#00e0e07&|0+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@3|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |s|e|c|o|n|d|a|r|y| |t|a|g| |h|a|n|d|l|e|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&
+|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|-+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|T|y|p|e|"|>+0#00e0e07&|!+0#0000000&|y|a|m|l|!|s|t|r|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&
+|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|N|u|m|b|e|r|"|>+0#00e0e07&|0+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |n|a|m|e|d| |t|a|g| |h|a|n|d|l|e|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@3
+|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|P|r|e|P|r|o|c|"|>+0#00e0e07&|-+0#0000000&@2|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@42
+@75
+|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|o@1|l|e|a|n|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n
+| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|[+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|n|s|t|a|n|t|"|>+0#00e0e07&|f+0#0000000&|a|l|s|e|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|,+0#0000000&| |<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&
+|C|o|n|s|t|a|n|t|"|>+0#00e0e07&|t+0#0000000&|r|u|e|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|,+0#0000000&| |<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|n|s|t|a|n|t|"|>+0#00e0e07&|F+0#0000000&|A|L|S|E|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|,+0#0000000&| |<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o
+|@+0#4040ff13&@2| @71
+| +0#0000000&@56|3|7|,|1| @9|2|1|%| 
diff --git a/runtime/syntax/testdir/dumps/yaml.yaml_03.dump b/runtime/syntax/testdir/dumps/yaml.yaml_03.dump
new file mode 100644
index 0000000..d16656d
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml.yaml_03.dump
@@ -0,0 +1,20 @@
+|<+0#00e0e07#ffffff0|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|i+0#0000000&|n|f|i|n|i|t|y|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a
+|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|[+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|F|l|o|a|t|"|>+0#00e0e07&|.+0#0000000&|i|n|f|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|,+0#0000000&| |<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|F|l|o
+|a|t|"|>+0#00e0e07&|-+0#0000000&|.|I|n|f|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|,+0#0000000&| |<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|F|l|o|a|t|"|>+0#00e0e07&|++0#0000000&|.|I|N|F|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|]+0#0000000&|<+0#00e0e07&|/
+|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@69
+|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|n+0#0000000&|o|t| |a| |n|u|m|b|e|r|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&
+|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|[+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|F|l|o|a|t|"|>+0#00e0e07&|.+0#0000000&|n|a|n|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|,+0#0000000&| |<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&
+|"+0#e000002&|F|l|o|a|t|"|>+0#00e0e07&|.+0#0000000&|N|a|N|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|,+0#0000000&| |<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|F|l|o|a|t|"|>+0#00e0e07&|.+0#0000000&|N|A|N|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|]+0#0000000&
+|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@67
+> @74
+|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|p+0#0000000&|l|a|i|n| |s|t|r|i|n|g|s|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&
+| +0#0000000&@1|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|-+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|a| |b| |c| @34
+@2|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|-+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|a| |*| |b| |&+0#e000e06&|a|m|p|;| +0#0000000&|c| |@| |d|#| |e| |:| |f|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m
+@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |c|o|m@1|e|n|t|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@51
+@2|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|-+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|{@1| |f|(|'| |'|)| |}@1|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#|8|2|3|4
+|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@67
+|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|d+0#0000000&|o|u|b|l|e| |q|u|o|t|e|d| |s|t|r|i|n|g|s|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&
+|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@66
+@2|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|-+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|r|i|n|g|"|>+0#00e0e07&|&+0#e000e06&|q|u|o|t|;|&|q|u|o|t|;|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&
+|@+0#4040ff13&@2| @71
+| +0#0000000&@56|5@1|,|0|-|1| @7|3@1|%| 
diff --git a/runtime/syntax/testdir/dumps/yaml.yaml_04.dump b/runtime/syntax/testdir/dumps/yaml.yaml_04.dump
new file mode 100644
index 0000000..6a3aecf
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml.yaml_04.dump
@@ -0,0 +1,20 @@
+|<+0#00e0e07#ffffff0|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|l|o|c|k| |f|o|l|d|e|d| |s|t|r|i|n|g|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&
+|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|&+0#e000e06&|g|t|;|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@34
+@2|f|o@1| @69
+@2|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|a|r|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&
+|l|a|s@1|=+0#00e0e07&|"+0#e000002&|N|u|m|b|e|r|"|>+0#00e0e07&|1+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@52
+@75
+@4><+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|a|z|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n
+| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|n|s|t|a|n|t|"|>+0#00e0e07&|n+0#0000000&|u|l@1|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@45
+@75
+@2|&+0#e000e06&|q|u|o|t|;|q+0#0000000&|u|x|&+0#e000e06&|q|u|o|t|;| +0#0000000&@57
+|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|l|o|c|k| |l|i|t|e|r|a|l| |s|t|r|i|n|g|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&
+|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&||+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@36
+@2|f|o@1| @69
+@2|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|a|r|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&
+|l|a|s@1|=+0#00e0e07&|"+0#e000002&|N|u|m|b|e|r|"|>+0#00e0e07&|1+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@52
+@75
+@4|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|a|z|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n
+| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|n|s|t|a|n|t|"|>+0#00e0e07&|n+0#0000000&|u|l@1|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@45
+@75
+@57|7|3|,|5| @9|4|5|%| 
diff --git a/runtime/syntax/testdir/dumps/yaml.yaml_05.dump b/runtime/syntax/testdir/dumps/yaml.yaml_05.dump
new file mode 100644
index 0000000..c94413e
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml.yaml_05.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@1|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|-+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|l|o|c|k| |l|i|t|e|r|a|l| |s
+|t|r|i|n|g|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&||+0#0000000&|+|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<
+|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |c|o|m@1|e|n|t|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@36
+@6|f|o@1| @65
+@6|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|a|r|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p
+|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|N|u|m|b|e|r|"|>+0#00e0e07&|1+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@48
+@2><+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|-+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&||+0#0000000&|-|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a
+|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#|1@1|5|1|7|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@47
+@6|f|o@1| |&+0#e000e06&|q|u|o|t|;|\+0#0000000&|&+0#e000e06&|q|u|o|t|;| +0#0000000&@51
+@6|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|a|r|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p
+|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|N|u|m|b|e|r|"|>+0#00e0e07&|1+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@48
+|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|l|o|c|k| |i|n|d|e|n|t|a|t|i|o|n| |i|n|d|i|c|a|t|o|r|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e
+|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@60
+@2|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|-+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|l|o|c|k| |f|o|l|d|e|d| |s|t
+|r|i|n|g|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|&+0#e000e06&|g|t|;|1+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n
+|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |c|o|m@1|e|n|t|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@34
+@5|f|o@1| @66
+@5|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|a|r|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a
+|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|N|u|m|b|e|r|"|>+0#00e0e07&|1+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@49
+@57|9|1|,|3| @9|5|7|%| 
diff --git a/runtime/syntax/testdir/dumps/yaml.yaml_06.dump b/runtime/syntax/testdir/dumps/yaml.yaml_06.dump
new file mode 100644
index 0000000..dcd2e6a
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml.yaml_06.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@1|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|e+0#0000000&|m|p|t|y| |m|a|p@1|i|n|g|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a
+|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|{+0#0000000&|}|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@40
+@2|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|f+0#0000000&|l|o|w| |s|e|q|u|e|n|c|e|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a
+|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|[+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|f+0#0000000&|o@1|,| |b|a|r|,| |b|a|z|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|]+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n
+|>+0#00e0e07&| +0#0000000&@73
+@2><+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|f+0#0000000&|l|o|w| |m|a|p@1|i|n|g|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n
+|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|{+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|f+0#0000000&|o@1|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l
+|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|b|a|r|,| |<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|a|z|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&
+|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|q|u|x|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|}+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@22
+@2|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|f+0#0000000&|l|o|w| |s|t|r|i|n|g|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&
+| +0#0000000&@3|f|o@1| @67
+@4|b|a|r| @67
+@4|b|a|z| @67
+@2|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|r|i|n|g|"|>+0#00e0e07&|&+0#e000e06&|q|u|o|t|;|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|r|i|n|g|"|>+0#00e0e07&|d+0#0000000&|o|u|b|l|e| |q|u|o|t|e|d| |<+0#00e0e07&|/|s+0#af5f00255&|p
+|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|C|h|a|r|"|>+0#00e0e07&|\+0#0000000&|&+0#e000e06&|q|u|o|t|;|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|r|i|n|g|"|>+0#00e0e07&| +0#0000000&|s|t|r|i|n|g|<+0#00e0e07&|/|s+0#af5f00255&|p
+|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|r|i|n|g|"|>+0#00e0e07&|&+0#e000e06&|q|u|o|t|;|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&
+|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|r|i|n|g|"|>+0#00e0e07&|&+0#e000e06&|q|u|o|t|;|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@47
+@4|f|o@1| @67
+@4|b|a|r| @67
+@57|1|0|9|,|3| @8|6|9|%| 
diff --git a/runtime/syntax/testdir/dumps/yaml.yaml_07.dump b/runtime/syntax/testdir/dumps/yaml.yaml_07.dump
new file mode 100644
index 0000000..6ba7ff1
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml.yaml_07.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@1|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|f+0#0000000&|l|o|w| |c|o|l@1|e|c|t|i|o|n|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&
+|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|[+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|f+0#0000000&|o@1|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |c|o|m@1|e|n|t|<+0#00e0e07&|/|s+0#af5f00255&|p|a
+|n|>+0#00e0e07&| +0#0000000&@72
+@4|,| |<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|{+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|a|r|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a
+|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|[+0#0000000&|{|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1
+|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |c|o|m@1|e|n|t|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@52
+@6><+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|a|z|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p
+|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|r|i|n|g|"|>+0#00e0e07&|'+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@48
+@8|q|u|x|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |n|o|t| |c|o|m@1|e|n|t|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@20
+@6|'|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |c|o|m@1|e|n|t|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@28
+@4|}|]|}|]| @66
+@75
+|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|e+0#0000000&|x|p|l|i|c|i|t| |m|a|p@1|i|n|g|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p
+|a|n|>+0#00e0e07&| +0#0000000&@71
+@2|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|?+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|f|o@1|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |c|o|m@1|e|n|t|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&
+| +0#0000000&@1|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|b|a|r|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |c|o|m@1|e|n|t|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&
+| +0#0000000&@1|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|?+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|-+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|f|o@1| @5
+@4|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|-+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|b|a|r| @34
+@2|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|-+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|b|a|z| @5
+@57|1|2|7|,|7| @8|8|3|%| 
diff --git a/runtime/syntax/testdir/dumps/yaml.yaml_08.dump b/runtime/syntax/testdir/dumps/yaml.yaml_08.dump
new file mode 100644
index 0000000..e2d7018
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml.yaml_08.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@3|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|o|n|e| @36
+@4|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|?+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|N|u|m|b|e|r|"|>+0#00e0e07&|2+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@10
+@4|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|-+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&
+|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|?+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|N|u|m|b|e|r|"|>+0#00e0e07&|3+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@21
+@8|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|t|h|r|e@1| @30
+@6><+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|t|a|t|e|m|e|n|t|"|>+0#00e0e07&|-+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|{+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&
+|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|?+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|4+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i
+|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|f|o|u|r|,| |<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|?+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&
+|5+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|f|i|v|e|,| |<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|?+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&
+|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |c|o|m@1|e|n|t|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@35
+@8|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|6+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a
+|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|C|o|m@1|e|n|t|"|>+0#00e0e07&| +0#0000000&|#| |c|o|m@1|e|n|t|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@39
+@8|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|{+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|7+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a
+|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|s+0#0000000&|e|v|e|n|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|}+0#0000000&@1|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@12
+@75
+|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|m+0#0000000&|a|p@1|i|n|g| |m|e|r|g|e|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&
+| +0#0000000&@1|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|f+0#0000000&|o@1|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&
+|l|a|s@1|=+0#00e0e07&|"+0#e000002&|T|y|p|e|"|>+0#00e0e07&|&+0#e000e06&|a|m|p|;|f+0#0000000&|o@1|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@47
+@4|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|a|r|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|b|a|z| @1
+@57|1|4|5|,|7| @8|9|2|%| 
diff --git a/runtime/syntax/testdir/dumps/yaml.yaml_99.dump b/runtime/syntax/testdir/dumps/yaml.yaml_99.dump
new file mode 100644
index 0000000..7467b76
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml.yaml_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@3|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|a|z|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n
+| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|T|y|p|e|"|>+0#00e0e07&|&+0#e000e06&|a|m|p|;|b+0#0000000&|a|r|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@45
+@6|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|f+0#0000000&|o@1|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p
+|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|[+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|T|y|p|e|"|>+0#00e0e07&|*+0#0000000&|f|o@1|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i
+|a|l|"|>+0#00e0e07&|]+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@62
+@4|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|q+0#0000000&|u|x|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@5
+@6|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|&+0#e000e06&|l|t|;|&|l|t|;|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&
+|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|[+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|T|y|p|e|"|>+0#00e0e07&|*+0#0000000&|f|o@1|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|,+0#0000000&| |<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|T
+|y|p|e|"|>+0#00e0e07&|*+0#0000000&|b|a|r|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|]+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@28
+@2|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|b+0#0000000&|a|z|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&
+|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|{+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|&+0#e000e06&|l|t|;|&|l|t|;|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p
+|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|T|y|p|e|"|>+0#00e0e07&|*+0#0000000&|f|o@1|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|,+0#0000000&| |<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|I|d|e|n|t|i|f|i|e|r|"|>+0#00e0e07&|q+0#0000000&|u
+|x|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|[+0#0000000&|{|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n
+| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|&+0#e000e06&|l|t|;|&|l|t|;|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|:+0#0000000&|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1
+|=+0#00e0e07&|"+0#e000002&|T|y|p|e|"|>+0#00e0e07&|*+0#0000000&|f|o@1|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&|<|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|S|p|e|c|i|a|l|"|>+0#00e0e07&|}+0#0000000&|]|}|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@23
+|<+0#00e0e07&|/|p+0#af5f00255&|r|e|>+0#00e0e07&| +0#0000000&@68
+|<+0#00e0e07&|/|b+0#af5f00255&|o|d|y|>+0#00e0e07&| +0#0000000&@67
+|<+0#00e0e07&|/|h+0#af5f00255&|t|m|l|>+0#00e0e07&| +0#0000000&@67
+><+0#0000e05&|!|-@1| |v|i|m|:| |s|e|t| |f|o|l|d|m|e|t|h|o|d|=|m|a|n|u|a|l| |:| |-@1|>| +0#0000000&@37
+@57|1|6|2|,|1| @8|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/yaml_00.dump b/runtime/syntax/testdir/dumps/yaml_00.dump
new file mode 100644
index 0000000..bd1ad2c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml_00.dump
@@ -0,0 +1,20 @@
+>%+0#af5f00255#ffffff0|Y|A|M|L| +0#0000000&|1+0#e000002&|.|2| +0#0000000&@65
+|%+0#af5f00255&|T|A|G| +0#0000000&|!+0#e000002&| +0#0000000&@5|t+0#e000002&|a|g|:|y|a|m|l|.|o|r|g|,|2|0@1|2|:| +0#0000e05&|#| |p|r|i|m|a|r|y| |t|a|g| |h|a|n|d|l|e| +0#0000000&@23
+|%+0#af5f00255&|T|A|G| +0#0000000&|!+0#e000002&@1| +0#0000000&@4|t+0#e000002&|a|g|:|y|a|m|l|.|o|r|g|,|2|0@1|2|:| +0#0000e05&|#| |s|e|c|o|n|d|a|r|y| |t|a|g| |h|a|n|d|l|e| +0#0000000&@21
+|%+0#af5f00255&|T|A|G| +0#0000000&|!+0#e000002&|y|a|m|l|!| +0#0000000&|t+0#e000002&|a|g|:|y|a|m|l|.|o|r|g|,|2|0@1|2|:| +0#0000e05&|#| |n|a|m|e|d| |t|a|g| |h|a|n|d|l|e| +0#0000000&@25
+|-+0#e000e06&@2| +0#0000000&@71
+|-+0#af5f00255&| +0#0000000&|!+0#00e0003&|s|t|r| +0#0000000&|0+0#e000002&| +0#0000000&@4| +0#0000e05&|#| |p|r|i|m|a|r|y| |t|a|g| |h|a|n|d|l|e| +0#0000000&@40
+|-+0#af5f00255&| +0#0000000&|!+0#00e0003&@1|s|t|r| +0#0000000&|0+0#e000002&| +0#0000000&@3| +0#0000e05&|#| |s|e|c|o|n|d|a|r|y| |t|a|g| |h|a|n|d|l|e| +0#0000000&@38
+|-+0#af5f00255&| +0#0000000&|!+0#00e0003&|y|a|m|l|!|s|t|r| +0#0000000&|0+0#e000002&| +0#0000e05&|#| |n|a|m|e|d| |t|a|g| |h|a|n|d|l|e| +0#0000000&@42
+|-+0#e000e06&@2| +0#0000000&@71
+@75
+|b+0#00e0e07&|o@1|l|e|a|n|:+0#e000e06&| +0#0000000&|[+0#e000e06&|f+0#e000002&|a|l|s|e|,+0#0000000&| |t+0#e000002&|r|u|e|,+0#0000000&| |F+0#e000002&|A|L|S|E|,+0#0000000&| |T+0#e000002&|R|U|E|,+0#0000000&| |F+0#e000002&|a|l|s|e|,+0#0000000&| |T+0#e000002&|r|u|e|]+0#e000e06&| +0#0000000&@26
+|n+0#e000002&|u|l@1|:+0#e000e06&| +0#0000000&|[+0#e000e06&|n+0#e000002&|u|l@1|,+0#0000000&| |~+0#e000002&|,+0#0000000&|]+0#e000e06&| +0#0000000&@58
+|i+0#00e0e07&|n|t|e|g|e|r|:+0#e000e06&| +0#0000000&|[+0#e000e06&|1+0#e000002&|2|3|4|5|,+0#0000000&| |-+0#e000002&|1|2|_|3|4|5|,+0#0000000&| |++0#e000002&|1|2|_|3|4|5|]+0#e000e06&| +0#0000000&@40
+|f+0#00e0e07&|l|o|a|t|:+0#e000e06&| +0#0000000&|[+0#e000e06&| +0#0000000&@66
+@2|1+0#e000002&|2|3|4|5|.|1|5|,+0#0000000&| |-+0#e000002&|1|2|_|3|4|5|.|1|5|,+0#0000000&| |++0#e000002&|1|2|_|3|4|5|.|1|5|,+0#0000000&| |1+0#e000002&|.|2|3|0|1|5|e|+|3|,+0#0000000&| @27
+@2|-+0#e000002&|1|2|_|3|4|5|.|1|5|e|+|1|0|,+0#0000000&| |++0#e000002&|1|2|_|3|4|5|.|1|5|e|-|1|0|,+0#0000000&| |1+0#e000002&|.|2|3|4|_|5|1|5|e|-|1|0| +0#0000000&@27
+|]+0#e000e06&| +0#0000000&@73
+|b+0#00e0e07&|i|n|a|r|y|:+0#e000e06&| +0#0000000&|[+0#e000e06&|0+0#e000002&|b|1|0|1|0|1|0|,+0#0000000&| |-+0#e000002&|0|b|1|0|1|0|_|1|0|1|0|,+0#0000000&| |++0#e000002&|0|b|1|0|1|0|_|1|0|1|0|]+0#e000e06&| +0#0000000&@28
+|o+0#00e0e07&|c|t|a|l|:+0#e000e06&| +0#0000000&|[+0#e000e06&|0+0#e000002&|7@2|,+0#0000000&| |0+0#e000002&|o|7@2|,+0#0000000&| |++0#e000002&|0|7@2|,+0#0000000&| |-+0#e000002&|0|o|7@2|]+0#e000e06&| +0#0000000&@39
+@57|1|,|1| @10|T|o|p| 
diff --git a/runtime/syntax/testdir/dumps/yaml_01.dump b/runtime/syntax/testdir/dumps/yaml_01.dump
new file mode 100644
index 0000000..ae84e98
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml_01.dump
@@ -0,0 +1,20 @@
+|f+0#00e0e07#ffffff0|l|o|a|t|:+0#e000e06&| +0#0000000&|[+0#e000e06&| +0#0000000&@66
+@2|1+0#e000002&|2|3|4|5|.|1|5|,+0#0000000&| |-+0#e000002&|1|2|_|3|4|5|.|1|5|,+0#0000000&| |++0#e000002&|1|2|_|3|4|5|.|1|5|,+0#0000000&| |1+0#e000002&|.|2|3|0|1|5|e|+|3|,+0#0000000&| @27
+@2|-+0#e000002&|1|2|_|3|4|5|.|1|5|e|+|1|0|,+0#0000000&| |++0#e000002&|1|2|_|3|4|5|.|1|5|e|-|1|0|,+0#0000000&| |1+0#e000002&|.|2|3|4|_|5|1|5|e|-|1|0| +0#0000000&@27
+|]+0#e000e06&| +0#0000000&@73
+|b+0#00e0e07&|i|n|a|r|y|:+0#e000e06&| +0#0000000&|[+0#e000e06&|0+0#e000002&|b|1|0|1|0|1|0|,+0#0000000&| |-+0#e000002&|0|b|1|0|1|0|_|1|0|1|0|,+0#0000000&| |++0#e000002&|0|b|1|0|1|0|_|1|0|1|0|]+0#e000e06&| +0#0000000&@28
+>o+0#00e0e07&|c|t|a|l|:+0#e000e06&| +0#0000000&|[+0#e000e06&|0+0#e000002&|7@2|,+0#0000000&| |0+0#e000002&|o|7@2|,+0#0000000&| |++0#e000002&|0|7@2|,+0#0000000&| |-+0#e000002&|0|o|7@2|]+0#e000e06&| +0#0000000&@39
+|h+0#00e0e07&|e|x|a|d|e|c|i|m|a|l|:+0#e000e06&| +0#0000000&|[+0#e000e06&|0+0#e000002&|x|F|E|F@1|_|0@3|,+0#0000000&| |-+0#e000002&|0|x|a|b|c|d|_|e|f|0@1|,+0#0000000&| |++0#e000002&|0|x|1|2|3|4|_|5|6|7|8|]+0#e000e06&| +0#0000000&@20
+|s+0#00e0e07&|e|x|a|g|e|s|i|m|a|l|:+0#e000e06&| +0#0000000&|[+0#e000e06&|1+0#e000002&|0|:|2|0|:|3|0|,+0#0000000&| |-+0#e000002&|1|9|:|2|9|:|3|9|,+0#0000000&| |++0#e000002&|1|9|:|2|9|:|3|9|]+0#e000e06&| +0#0000000&@29
+|i+0#00e0e07&|n|f|i|n|i|t|y|:+0#e000e06&| +0#0000000&|[+0#e000e06&|.+0#e000002&|i|n|f|,+0#0000000&| |-+0#e000002&|.|I|n|f|,+0#0000000&| |++0#e000002&|.|I|N|F|]+0#e000e06&| +0#0000000&@44
+|n+0#00e0e07&|o|t| |a| |n|u|m|b|e|r|:+0#e000e06&| +0#0000000&|[+0#e000e06&|.+0#e000002&|n|a|n|,+0#0000000&| |.+0#e000002&|N|a|N|,+0#0000000&| |.+0#e000002&|N|A|N|]+0#e000e06&| +0#0000000&@42
+@75
+|p+0#00e0e07&|l|a|i|n| |s|t|r|i|n|g|s|:+0#e000e06&| +0#0000000&@60
+@2|-+0#af5f00255&| +0#0000000&|a| |b| |c| @65
+@2|-+0#af5f00255&| +0#0000000&|a| |*| |b| |&| |c| |@| |d|#| |e| |:| |f| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@40
+@2|-+0#af5f00255&| +0#0000000&|{@1| |f|(|'| |'|)| |}@1| +0#0000e05&|#|8|2|3|4| +0#0000000&@52
+|d+0#00e0e07&|o|u|b|l|e| |q|u|o|t|e|d| |s|t|r|i|n|g|s|:+0#e000e06&| +0#0000000&@52
+@2|-+0#af5f00255&| +0#0000000&|"+0#e000002&@1| +0#0000000&@68
+@2|-+0#af5f00255&| +0#0000000&|"+0#e000002&|a| |b| |c|"|:+0#e000e06&| +0#0000000&|"+0#e000002&|d| |e| |f|"| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@44
+@2|-+0#af5f00255&| +0#0000000&|"+0#e000002&|\+0#e000e06&@2|"|\|a|\|b|\|f|\|n|\|r|\|t|\|v|\|0|\|_|\| |\|N|\|L|\|P|\|x|4|1|\|u|0@1|4|1|\|U|0@5|4|1|"+0#e000002&| +0#0000000&@18
+@57|1|9|,|1| @9|1|2|%| 
diff --git a/runtime/syntax/testdir/dumps/yaml_02.dump b/runtime/syntax/testdir/dumps/yaml_02.dump
new file mode 100644
index 0000000..a0eb035
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@1|-+0#af5f00255&| +0#0000000&|"+0#e000002&|\+0#e000e06&@2|"|\|a|\|b|\|f|\|n|\|r|\|t|\|v|\|0|\|_|\| |\|N|\|L|\|P|\|x|4|1|\|u|0@1|4|1|\|U|0@5|4|1|"+0#e000002&| +0#0000000&@18
+|s+0#00e0e07&|i|n|g|l|e| |q|u|o|t|e|d| |s|t|r|i|n|g|s|:+0#e000e06&| +0#0000000&@52
+@2|-+0#af5f00255&| +0#0000000&|'+0#e000002&@1| +0#0000000&@68
+@2|-+0#af5f00255&| +0#0000000&|'+0#e000002&|a| |b| |c|'|:+0#e000e06&| +0#0000000&|'+0#e000002&|d| |e| |f|'| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@44
+@2|-+0#af5f00255&| +0#0000000&|'+0#e000002&|a|'+0#e000e06&@1|b+0#e000002&|'+0#e000e06&@1|c+0#e000002&|'| +0#0000000&@61
+> @74
+|b+0#00e0e07&|l|o|c|k| |f|o|l|d|e|d| |s|t|r|i|n|g|:+0#e000e06&| +0#0000000&|>+0#e000e06&| +0#0000000&@52
+@2|f|o@1| @69
+@2|b|a|r|:| |1| @66
+@75
+@4|b|a|z|:| |n|u|l@1| @61
+@75
+@2|"|q|u|x|"| @67
+|b+0#00e0e07&|l|o|c|k| |l|i|t|e|r|a|l| |s|t|r|i|n|g|:+0#e000e06&| +0#0000000&||+0#e000e06&| +0#0000000&@51
+@2|f|o@1| @69
+@2|b|a|r|:| |1| @66
+@75
+@4|b|a|z|:| |n|u|l@1| @61
+@75
+@57|3|7|,|0|-|1| @7|2|8|%| 
diff --git a/runtime/syntax/testdir/dumps/yaml_03.dump b/runtime/syntax/testdir/dumps/yaml_03.dump
new file mode 100644
index 0000000..4d1466e
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml_03.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+@2|'|q|u|x|'| @67
+@75
+|c+0#00e0e07&|h|o|m|p|i|n|g| |s|t|r|i|n|g|s|:+0#e000e06&| +0#0000000&@57
+@2|-+0#af5f00255&| +0#0000000&|b+0#00e0e07&|l|o|c|k| |f|o|l|d|e|d| |s|t|r|i|n|g|:+0#e000e06&| +0#0000000&|>+0#e000e06&|-| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@37
+@6>f|o@1| @65
+@6|b|a|r|:| |1| @62
+@2|-+0#af5f00255&| +0#0000000&|b+0#00e0e07&|l|o|c|k| |l|i|t|e|r|a|l| |s|t|r|i|n|g|:+0#e000e06&| +0#0000000&||+0#e000e06&|+| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@36
+@6|f|o@1| @65
+@6|b|a|r|:| |1| @62
+@2|-+0#af5f00255&| +0#0000000&||+0#e000e06&|-| +0#0000e05&|#|1@1|5|1|7| +0#0000000&@61
+@6|f|o@1| |"|\|"| @61
+@6|b|a|r|:| |1| @62
+|b+0#00e0e07&|l|o|c|k| |i|n|d|e|n|t|a|t|i|o|n| |i|n|d|i|c|a|t|o|r|:+0#e000e06&| +0#0000000&@46
+@2|-+0#af5f00255&| +0#0000000&|b+0#00e0e07&|l|o|c|k| |f|o|l|d|e|d| |s|t|r|i|n|g|:+0#e000e06&| +0#0000000&|>+0#e000e06&|1| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@37
+@5|f|o@1| @66
+@5|b|a|r|:| |1| @63
+@2|-+0#af5f00255&| +0#0000000&|b+0#00e0e07&|l|o|c|k| |l|i|t|e|r|a|l| |s|t|r|i|n|g|:+0#e000e06&| +0#0000000&||+0#e000e06&|1|-| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@35
+@5|f|o@1| @66
+@57|5@1|,|7| @9|4|5|%| 
diff --git a/runtime/syntax/testdir/dumps/yaml_04.dump b/runtime/syntax/testdir/dumps/yaml_04.dump
new file mode 100644
index 0000000..2503470
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml_04.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@4|f|o@1| @66
+@5|b|a|r|:| |1| @63
+@2|-+0#af5f00255&| +0#0000000&||+0#e000e06&|-|1| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@57
+@5|f|o@1| @66
+@5|b|a|r|:| |1| @63
+> @74
+|f+0#00e0e07&|l|o|w| |c|o|l@1|e|c|t|i|o|n|:+0#e000e06&| +0#0000000&@58
+@2|e+0#00e0e07&|m|p|t|y| |s|e|q|u|e|n|c|e|:+0#e000e06&| +0#0000000&|[+0#e000e06&|]| +0#0000000&@54
+@2|e+0#00e0e07&|m|p|t|y| |m|a|p@1|i|n|g|:+0#e000e06&| +0#0000000&|{+0#e000e06&|}| +0#0000000&@55
+@2|f+0#00e0e07&|l|o|w| |s|e|q|u|e|n|c|e|:+0#e000e06&| +0#0000000&|[+0#e000e06&|f+0#0000000&|o@1|,| |b|a|r|,| |b|a|z|]+0#e000e06&| +0#0000000&@42
+@2|f+0#00e0e07&|l|o|w| |m|a|p@1|i|n|g|:+0#e000e06&| +0#0000000&|{+0#e000e06&|f+0#00e0e07&|o@1|:+0#e000e06&| +0#0000000&|b|a|r|,| |b+0#00e0e07&|a|z|:+0#e000e06&| +0#0000000&|q|u|x|}+0#e000e06&| +0#0000000&@38
+@2|f+0#00e0e07&|l|o|w| |s|t|r|i|n|g|:+0#e000e06&| +0#0000000&@60
+@4|f|o@1| @67
+@4|b|a|r| @67
+@4|b|a|z| @67
+@2|"+0#e000002&|d|o|u|b|l|e| |q|u|o|t|e|d| |\+0#e000e06&|"| +0#e000002&|s|t|r|i|n|g|"|:+0#e000e06&| +0#0000000&|"+0#e000002&| +0#0000000&@44
+| +0#e000002&@3|f|o@1| +0#0000000&@67
+| +0#e000002&@3|b|a|r| +0#0000000&@67
+| +0#e000002&@3|b|a|z|"| +0#0000000&@66
+@57|7|3|,|0|-|1| @7|6|2|%| 
diff --git a/runtime/syntax/testdir/dumps/yaml_05.dump b/runtime/syntax/testdir/dumps/yaml_05.dump
new file mode 100644
index 0000000..d64c48b
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml_05.dump
@@ -0,0 +1,20 @@
+| +0#e000002#ffffff0@3|b|a|z|"| +0#0000000&@66
+@2|'+0#e000002&|s|i|n|g|l|e| |q|u|o|t|e|d| |'+0#e000e06&@1| +0#e000002&|s|t|r|i|n|g|'|:+0#e000e06&| +0#0000000&|'+0#e000002&| +0#0000000&@44
+| +0#e000002&@3|f|o@1| +0#0000000&@67
+| +0#e000002&@3|b|a|r| +0#0000000&@67
+| +0#e000002&@3|b|a|z|'| +0#0000000&@66
+@2>i+0#00e0e07&|n|s|i|d|e| |b|l|o|c|k| |m|a|p@1|i|n|g|:+0#e000e06&| +0#0000000&@51
+@4|f+0#00e0e07&|o@1|:+0#e000e06&| +0#0000000&|{+0#e000e06&|b+0#00e0e07&|a|r|:+0#e000e06&| +0#0000000&|b|a|z|}+0#e000e06&| +0#0000000&@55
+@4|b+0#00e0e07&|a|r|:+0#e000e06&| +0#0000000&|[+0#e000e06&|"+0#e000002&|f|o@1|"|:+0#e000e06&| +0#0000000&|{+0#e000e06&|b+0#00e0e07&|a|z|:+0#e000e06&| +0#0000000&|q|u|x|}+0#e000e06&|]| +0#0000000&@46
+@2|f+0#00e0e07&|l|o|w| |c|o|l@1|e|c|t|i|o|n|:+0#e000e06&| +0#0000000&|[+0#e000e06&|f+0#0000000&|o@1| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@41
+@4|,| |{+0#e000e06&|b+0#00e0e07&|a|r|:+0#e000e06&| +0#0000000&|[+0#e000e06&|{| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@50
+@6|b+0#00e0e07&|a|z|:+0#e000e06&| +0#0000000&|'+0#e000002&| +0#0000000&@62
+| +0#e000002&@7|q|u|x| |#| |n|o|t| |c|o|m@1|e|n|t| +0#0000000&@49
+| +0#e000002&@5|'| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@57
+@4|}+0#e000e06&|]|}|]| +0#0000000&@66
+@75
+|e+0#00e0e07&|x|p|l|i|c|i|t| |m|a|p@1|i|n|g|:+0#e000e06&| +0#0000000&@57
+@2|?+0#e000e06&| +0#0000000&|f|o@1| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@57
+@2|:+0#e000e06&| +0#0000000&|b|a|r| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@57
+@2|?+0#e000e06&| +0#0000000&|-+0#af5f00255&| +0#0000000&|f|o@1| @65
+@57|9|1|,|3| @9|7|8|%| 
diff --git a/runtime/syntax/testdir/dumps/yaml_06.dump b/runtime/syntax/testdir/dumps/yaml_06.dump
new file mode 100644
index 0000000..f6c83c2
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml_06.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@1|?+0#e000e06&| +0#0000000&|-+0#af5f00255&| +0#0000000&|f|o@1| @65
+@4|-+0#af5f00255&| +0#0000000&|b|a|r| @65
+@2|:+0#e000e06&| +0#0000000&|-+0#af5f00255&| +0#0000000&|b|a|z| @65
+@4|-+0#af5f00255&| +0#0000000&|q|u|x| @65
+@2|?+0#e000e06&| +0#0000000&|[+0#e000e06&|1+0#e000002&|,+0#0000000&| |2+0#e000002&|,+0#0000000&| |3+0#e000002&|]+0#e000e06&| +0#0000000&@61
+@2>:+0#e000e06&| +0#0000000&|?+0#e000e06&| +0#0000000&|1+0#e000002&| +0#0000000&@67
+@4|:+0#e000e06&| +0#0000000&|o|n|e| @65
+@4|?+0#e000e06&| +0#0000000&|2+0#e000002&| +0#0000000&@67
+@4|:+0#e000e06&| +0#0000000&|-+0#af5f00255&| +0#0000000&|?+0#e000e06&| +0#0000000&|3+0#e000002&| +0#0000000&@63
+@8|:+0#e000e06&| +0#0000000&|t|h|r|e@1| @59
+@6|-+0#af5f00255&| +0#0000000&|{+0#e000e06&|?|4+0#00e0e07&|:+0#e000e06&| +0#0000000&|f|o|u|r|,| |?+0#e000e06&| +0#0000000&|5+0#00e0e07&|:+0#e000e06&| +0#0000000&|f|i|v|e|,| |?+0#e000e06&| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@33
+@8|6+0#00e0e07&|:+0#e000e06&| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@54
+@8|{+0#e000e06&|7+0#00e0e07&|:+0#e000e06&|s+0#0000000&|e|v|e|n|}+0#e000e06&@1| +0#0000000&@56
+@75
+|m+0#00e0e07&|a|p@1|i|n|g| |m|e|r|g|e|:+0#e000e06&| +0#0000000&@60
+@2|f+0#00e0e07&|o@1|:+0#e000e06&| +0#0000000&|&+0#00e0003&|f|o@1| +0#0000000&@63
+@4|b+0#00e0e07&|a|r|:+0#e000e06&| +0#0000000&|b|a|z| @62
+@2|b+0#00e0e07&|a|r|:+0#e000e06&| +0#0000000&@68
+@4|<+0#e000e06&@1|:| +0#0000000&|*+0#00e0003&|f|o@1| +0#0000000&@62
+@57|1|0|9|,|3| @8|9|5|%| 
diff --git a/runtime/syntax/testdir/dumps/yaml_07.dump b/runtime/syntax/testdir/dumps/yaml_07.dump
new file mode 100644
index 0000000..a21684f
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml_07.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|m+0#00e0e07&|a|p@1|i|n|g| |m|e|r|g|e|:+0#e000e06&| +0#0000000&@60
+@2|f+0#00e0e07&|o@1|:+0#e000e06&| +0#0000000&|&+0#00e0003&|f|o@1| +0#0000000&@63
+@4|b+0#00e0e07&|a|r|:+0#e000e06&| +0#0000000&|b|a|z| @62
+@2|b+0#00e0e07&|a|r|:+0#e000e06&| +0#0000000&@68
+@4><+0#e000e06&@1|:| +0#0000000&|*+0#00e0003&|f|o@1| +0#0000000&@62
+@4|b+0#00e0e07&|a|z|:+0#e000e06&| +0#0000000&|&+0#00e0003&|b|a|r| +0#0000000&@61
+@6|f+0#00e0e07&|o@1|:+0#e000e06&| +0#0000000&|[+0#e000e06&|*+0#00e0003&|f|o@1|]+0#e000e06&| +0#0000000&@57
+@4|q+0#00e0e07&|u|x|:+0#e000e06&| +0#0000000&@66
+@6|<+0#e000e06&@1|:| +0#0000000&|[+0#e000e06&|*+0#00e0003&|f|o@1|,+0#0000000&| |*+0#00e0003&|b|a|r|]+0#e000e06&| +0#0000000&@52
+@2|b+0#00e0e07&|a|z|:+0#e000e06&| +0#0000000&|{+0#e000e06&|<@1|:| +0#0000000&|*+0#00e0003&|f|o@1|,+0#0000000&| |q+0#00e0e07&|u|x|:+0#e000e06&| +0#0000000&|[+0#e000e06&|{|<@1| +0#0000000&|:+0#e000e06&| +0#0000000&|*+0#00e0003&|f|o@1|}+0#e000e06&|]|}| +0#0000000&@37
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|2|7|,|5| @8|B|o|t| 
diff --git a/runtime/syntax/testdir/dumps/yaml_99.dump b/runtime/syntax/testdir/dumps/yaml_99.dump
new file mode 100644
index 0000000..e81b373
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/yaml_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@1|:+0#e000e06&| +0#0000000&|?+0#e000e06&| +0#0000000&|1+0#e000002&| +0#0000000&@67
+@4|:+0#e000e06&| +0#0000000&|o|n|e| @65
+@4|?+0#e000e06&| +0#0000000&|2+0#e000002&| +0#0000000&@67
+@4|:+0#e000e06&| +0#0000000&|-+0#af5f00255&| +0#0000000&|?+0#e000e06&| +0#0000000&|3+0#e000002&| +0#0000000&@63
+@8|:+0#e000e06&| +0#0000000&|t|h|r|e@1| @59
+@6|-+0#af5f00255&| +0#0000000&|{+0#e000e06&|?|4+0#00e0e07&|:+0#e000e06&| +0#0000000&|f|o|u|r|,| |?+0#e000e06&| +0#0000000&|5+0#00e0e07&|:+0#e000e06&| +0#0000000&|f|i|v|e|,| |?+0#e000e06&| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@33
+@8|6+0#00e0e07&|:+0#e000e06&| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@54
+@8|{+0#e000e06&|7+0#00e0e07&|:+0#e000e06&|s+0#0000000&|e|v|e|n|}+0#e000e06&@1| +0#0000000&@56
+@75
+|m+0#00e0e07&|a|p@1|i|n|g| |m|e|r|g|e|:+0#e000e06&| +0#0000000&@60
+@2|f+0#00e0e07&|o@1|:+0#e000e06&| +0#0000000&|&+0#00e0003&|f|o@1| +0#0000000&@63
+@4|b+0#00e0e07&|a|r|:+0#e000e06&| +0#0000000&|b|a|z| @62
+@2|b+0#00e0e07&|a|r|:+0#e000e06&| +0#0000000&@68
+@4|<+0#e000e06&@1|:| +0#0000000&|*+0#00e0003&|f|o@1| +0#0000000&@62
+@4|b+0#00e0e07&|a|z|:+0#e000e06&| +0#0000000&|&+0#00e0003&|b|a|r| +0#0000000&@61
+@6|f+0#00e0e07&|o@1|:+0#e000e06&| +0#0000000&|[+0#e000e06&|*+0#00e0003&|f|o@1|]+0#e000e06&| +0#0000000&@57
+@4|q+0#00e0e07&|u|x|:+0#e000e06&| +0#0000000&@66
+@6|<+0#e000e06&@1|:| +0#0000000&|[+0#e000e06&|*+0#00e0003&|f|o@1|,+0#0000000&| |*+0#00e0003&|b|a|r|]+0#e000e06&| +0#0000000&@52
+@2>b+0#00e0e07&|a|z|:+0#e000e06&| +0#0000000&|{+0#e000e06&|<@1|:| +0#0000000&|*+0#00e0003&|f|o@1|,+0#0000000&| |q+0#00e0e07&|u|x|:+0#e000e06&| +0#0000000&|[+0#e000e06&|{|<@1| +0#0000000&|:+0#e000e06&| +0#0000000&|*+0#00e0003&|f|o@1|}+0#e000e06&|]|}| +0#0000000&@37
+@57|1|2|7|,|3| @8|B|o|t| 
diff --git a/runtime/syntax/testdir/input/java_comments.java b/runtime/syntax/testdir/input/java_comments.java
index be347d7..3c1a8a2 100644
--- a/runtime/syntax/testdir/input/java_comments.java
+++ b/runtime/syntax/testdir/input/java_comments.java
@@ -1,11 +1,68 @@
-// 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 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
+// VIM_TEST_SETUP setlocal spell | highlight link javaCommentStart Todo
+
+
+
+
+/**/ /*/ */ /* /*/ /*/*/ /*//*/ /** Comment tests.
+ * 

There is no entry point method {@code main}: + * {@snippet file = Snippets.java region = main id = _01} + *

There is no textual representation: + * {@snippet class = Snippets region = toString id = _02} */ class CommentsTests -{ /* TRAILING BLANKS AND MESSPILLINGS ARE SIGNIFICANT! */ - /** - * The method {@code main} must be declared {@code public}, {@code +{ + /** No-op, i. e. no operation. + * ({@literal@literal} may be used with {@code .} for contraction.) + * @return {@code null} */ + Void noOp1() { return null; } + + /** No-op, i.e. no operation. + * ({@literal} may be used after {@code .} for contraction.) + * @return {@code null} */ + Void noOp2() { return null; } + + /** No-op, i.e\u002e no operation. + * ({@literal\u005cu002e} is processed early, use alternatives.) + * @return {@code null} */ + Void noOp3() { return null; } + + /** No-op, i.e{@literal .} no operation. + * @return {@code null} */ + Void noOp4() { return null; } + + /** No-op, i.e. no operation. + * @return {@code null} */ + Void noOp5() { return null; } + + /** No-op, i.e. no operation. + * @return {@code null} */ + Void noOp6() { return null; } + + /** {@return {@code null}, with no-op, i.e. no operation} */ + Void noOp7() { return null; } + + /** {@return {@code null}, with no-op, i.e. no operation}.. */ + Void noOp8() { return null; } + + /** {@return {@code null}, with no-op, i.e. no operation} . . */ + Void noOp9() { return null; } + + /** Returns an empty string for an @Override annotated method + * (see Chapter 9.6.4.4 {@literal @Override} in a Java Language + * Specification) overridden from java.lang.Object + * + * @return an empty string */// No period for the above summary! + @Override public String toString() { return ""; } +} + +// javadoc --snippet-path . --source-path . -d /tmp/doc/ -package \ +// -tag 'jls:a:See Java Language Specification:' Snippets.java +/** Snippets for comment tests. */ +class Snippets +{ /* 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: @@ -16,10 +73,18 @@ class CommentsTests *{@code public static void main(String... args) { }}

* * @param args optional commande-line arguments - * @jls 12.1.4 Invoke {@code Test.main} - */ - // @start region = main + * @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 + // @end + + /** {@return an empty string} + * @see 3.10.5 String Literals + * @see Object#toString() */ + // @start region = toString + // @replace substring = '""' replacement = "\u0022\u0022" + // @link regex = '\bString' target = java.lang.String type = linkplain : + @Override public String toString() { return ""; } + // @end } diff --git a/runtime/syntax/testdir/input/java_contextual_keywords.java b/runtime/syntax/testdir/input/java_contextual_keywords.java new file mode 100644 index 0000000..0940379 --- /dev/null +++ b/runtime/syntax/testdir/input/java_contextual_keywords.java @@ -0,0 +1,48 @@ +class ContextualKeywordsTests // See JLS, §3.9 Keywords. +{ + private ContextualKeywordsTests() { throw new Error(); } + + // ModuleDeclaration: module open. + void module() { Object module = null; when(); } + void open() { Object open = null; module(); } + // ModuleDirective: exports opens provides requires to uses with. + void exports() { Object exports = null; open(); } + void opens() { Object opens = null; exports(); } + void provides() { Object provides = null; opens(); } + void requires() { Object requires = null; provides(); } + void to() { Object to = null; requires(); } + void uses() { Object uses = null; to(); } + void with() { Object with = null; uses(); } + // RequiresModifier: transitive. + void transitive() { Object transitive = null; with(); } + // LocalVariableType | LambdaParameterType: var. + void var() { var var = new Object(); transitive(); } + // YieldStatement: yield (see java_switch.java). + void yield() { Object yield = null; var(); } + // RecordDeclaration: record. + void record() { Object record = null; this.yield(); } + // Normal{Class,Interface}Declaration: non-sealed permits sealed. + void permits() { Object permits = null; record(); } + void sealed() { Object sealed = null; permits(); } + // Guard: when (see java_switch.java). + void when() { Object when = null; sealed(); } + + sealed interface I1 permits C1, I3 { } + sealed interface I2 permits C1, I3 { } + non-sealed interface I3 extends I1, I2 { } + interface I4 extends I3 { } + + abstract sealed class C1 implements I1, I2 permits C2, C3 { } + abstract non-sealed class C2 extends C1 { } + final class C3 extends C1 implements I3 { } + class C4 extends C2 { } + + record R() implements I3 { } + enum E implements I3 { INSTANCE } + + static I i1() { return (var var) -> var; } + static I i2() { return (T var) -> var; } + static I i3() { return (var) -> var; } + static I i4() { return var -> var; } + interface I { T i(T i); default I self() { return this; } } +} diff --git a/runtime/syntax/testdir/input/java_methods_indent.java b/runtime/syntax/testdir/input/java_methods_indent.java new file mode 100644 index 0000000..627eb8b --- /dev/null +++ b/runtime/syntax/testdir/input/java_methods_indent.java @@ -0,0 +1,70 @@ +// VIM_TEST_SETUP let g:java_highlight_functions = 'indent' + + +import java.lang.annotation.Target; + +abstract class IndentMethodsTests +{ // DO NOT retab! THIS FILE; REMEMBER ABOUT testdir/ftplugin. + protected IndentMethodsTests() { } + + record Τʬ<α>(α a) { } + + enum 𝓔 + { + A("𝕬"), B("𝕭"), C("𝕮"), D("𝕯"), + E("𝕰"), F("𝕱"), G("𝕲"), H("𝕳"); + final String 𝐬; + private 𝓔(String 𝐬) { this.𝐬 = 𝐬; } + } + + @Target(java.lang.annotation.ElementType.METHOD) + @java.lang.annotation.Repeatable(Tɐggablɘs.class) + @interface Tɐggablɘ + { + String[] value() default ""; + } + + @Target(java.lang.annotation.ElementType.METHOD) + @interface Tɐggablɘs + { + Tɐggablɘ[] value(); + } + + interface Stylable<Α> + { + default void ascii$0_() { } + default Α μʭʭ$0_() { return null; } + } + + @Tɐggablɘ @Tɐggablɘ + abstract void ascii$0_(); + + @Tɐggablɘ @Tɐggablɘ + abstract <α, β> Τʬ<α> μʭʭ$0_(β 𝛽); + + @Tɐggablɘ + private native void ascii$1_(); + + @Tɐggablɘ + private native <α, β> Τʬ<α>[] μʭʭ$1_( + java.util.function.Function<β, Τʬ<α>[]> ƒ); + + static final native synchronized void ascii$98_(); + static final native synchronized <α, β> Τʬ<α>[][] μʭʭ$98_( + java.util.function.Function<β, Τʬ<α>[][]> ƒ); + + @SuppressWarnings("strictfp") + protected static final synchronized strictfp void ascii$99_() + { ascii$98_(); } + + @SuppressWarnings("strictfp") + protected static final synchronized strictfp <α, β> Τʬ<α>[] μʭʭ$99_( + java.util.function.Function<β, Τʬ<α>[][]> ƒ) + { + return + IndentMethodsTests.<α, β>μʭʭ$98_(ƒ)[0]; + } + + @Override @SuppressWarnings("cast") + public String toString() { return (String) "IndentMethodsTests"; } +} diff --git a/runtime/syntax/testdir/input/java_methods_style.java b/runtime/syntax/testdir/input/java_methods_style.java new file mode 100644 index 0000000..b3e36fb --- /dev/null +++ b/runtime/syntax/testdir/input/java_methods_style.java @@ -0,0 +1,66 @@ +// VIM_TEST_SETUP let g:java_highlight_functions = 'style' + + +import java.lang.annotation.Target; + +abstract class StyleMethodsTests +{ + protected StyleMethodsTests() { } + + record Τʬ<α>(α a) { } + + enum 𝓔 + { + A("𝕬"), B("𝕭"), C("𝕮"), D("𝕯"), + E("𝕰"), F("𝕱"), G("𝕲"), H("𝕳"); + final String 𝐬; + private 𝓔(String 𝐬) { this.𝐬 = 𝐬; } + } + + @Target(java.lang.annotation.ElementType.METHOD) + @java.lang.annotation.Repeatable(Tɐggablɘs.class) + @interface Tɐggablɘ + { + String[] value() default ""; + } + + @Target(java.lang.annotation.ElementType.METHOD) + @interface Tɐggablɘs + { + Tɐggablɘ[] value(); + } + + interface Stylable<Α> + { + default void ascii$0_() { } + default Α μʭʭ$0_() { return null; } + } + + @Tɐggablɘ @Tɐggablɘ abstract void ascii$0_(//////////////// + ); + @Tɐggablɘ @Tɐggablɘ abstract <α, β> Τʬ<α> μʭʭ$0_( + /* TODO: @SuppressWarnings("bespoke")*/ β 𝛽); + + @Tɐggablɘ private native void ascii$1_(/*////////////*/); + @Tɐggablɘ private native <α, β> Τʬ<α>[] μʭʭ$1_( + java.util.function.Function<β, Τʬ<α>[]> ƒ); + + static final native synchronized void ascii$98_(); + static final native synchronized <α, β> Τʬ<α>[][] μʭʭ$98_( + java.util.function.Function<β, Τʬ<α>[][]> ƒ); + + @SuppressWarnings("strictfp") + protected static final synchronized strictfp void ascii$99_() + { ascii$98_(); } + + @SuppressWarnings("strictfp") + protected static final synchronized strictfp <α, β> Τʬ<α>[] μʭʭ$99_( + java.util.function.Function<β, Τʬ<α>[][]> ƒ) + { + return + StyleMethodsTests.<α, β>μʭʭ$98_(ƒ)[0]; + } + + @Override @SuppressWarnings("cast") + public String toString() { return (String) "StyleMethodsTests"; } +} diff --git a/runtime/syntax/testdir/input/vim9_keymap.vim b/runtime/syntax/testdir/input/vim9_keymap.vim new file mode 100644 index 0000000..a69b723 --- /dev/null +++ b/runtime/syntax/testdir/input/vim9_keymap.vim @@ -0,0 +1,26 @@ +vim9script + +# Vim Keymap file for syntax testing + +scriptencoding utf-8 + +let b:keymap_name = "syntax-test" + +loadkeymap + +# Line comment + + # Another line comment + +a A Basic mapping +'a á More than one char in first column + +# Special notation + B Special notation allowed in LHS - decimal +c Special notation allowed in RHS - octal + Special notation allowed in LHS and RHS - hexadecimal + +# Vim-script comment characters +\# Line should not match as a Vim9-script comment +" “ Line should not match as a legacy-script comment +: # Line should not match as a Vim9-script comment diff --git a/runtime/syntax/testdir/input/vim9_legacy_header.vim b/runtime/syntax/testdir/input/vim9_legacy_header.vim new file mode 100644 index 0000000..66aeb39 --- /dev/null +++ b/runtime/syntax/testdir/input/vim9_legacy_header.vim @@ -0,0 +1,16 @@ +" comment + +if !has('vim9script') + # 42 " comment + source foo.vim + finish +endif + +" comment + +vim9script noclear + +# comment + + # string only recognised with leading char + "useless string" diff --git a/runtime/syntax/testdir/input/vim9_legacy_header_fold.vim b/runtime/syntax/testdir/input/vim9_legacy_header_fold.vim new file mode 100644 index 0000000..6e0e71e --- /dev/null +++ b/runtime/syntax/testdir/input/vim9_legacy_header_fold.vim @@ -0,0 +1,17 @@ +" VIM_TEST_SETUP let g:vimsyn_folding = "H" | set fdm=syntax +" comment + +if !has('vim9script') + # 42 " comment + source foo.vim + finish +endif + +" comment + +vim9script noclear + +# comment + + # string only recognised with leading char + "useless string" diff --git a/runtime/syntax/testdir/input/vim_ex_commands.vim b/runtime/syntax/testdir/input/vim_ex_commands.vim index 571fd7b..aaa351b 100644 --- a/runtime/syntax/testdir/input/vim_ex_commands.vim +++ b/runtime/syntax/testdir/input/vim_ex_commands.vim @@ -558,7 +558,7 @@ :verbose :vertical :vim9cmd -:vim9script +" :vim9script :vimgrep :vimgrepadd :visual @@ -1152,7 +1152,7 @@ call Foo() | version call Foo() | verbose call Foo() | vertical call Foo() | vim9cmd -call Foo() | vim9script +" call Foo() | vim9script call Foo() | vimgrep call Foo() | vimgrepadd call Foo() | visual diff --git a/runtime/syntax/testdir/input/vim_ex_comment-vim9.vim b/runtime/syntax/testdir/input/vim_ex_comment-vim9.vim new file mode 100644 index 0000000..786d11b --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_comment-vim9.vim @@ -0,0 +1,41 @@ +vim9script + +# Vim comments + +# Vim9-script comment + + # string only recognised with leading char + "useless string" + +function! Foo() + " Legacy-script comment + # 42 " comment +endfunction + +def! Bar() + # Vim9-script comment + "useless string" # comment +enddef + +command -count FooCommand { + # Vim9-script comment + "useless string" # comment +} + +autocmd BufNewFile * { + # Vim9-script comment + "useless string" # comment +} + + +# Issue: #13047 + +if !exists(":DiffOrig") + command DiffOrig vert new | set bt=nofile | r ++edit %% | 0d_ | diffthis + \ | wincmd p | diffthis +endif + + +# Issue: #11307 and #11560 + +# This is what we call " blah diff --git a/runtime/syntax/testdir/input/vim_ex_comment.vim b/runtime/syntax/testdir/input/vim_ex_comment.vim new file mode 100644 index 0000000..54e514e --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_comment.vim @@ -0,0 +1,45 @@ +" Vim comments + +" Legacy-script comment + +# 42 " comment + +function! Foo() + " Legacy-script comment + # 42 " comment +endfunction + +def! Bar() + # Vim9-script comment + "useless string" # comment +enddef + +command -nargs=1 FooCommand { + # Vim9-script comment + "useless string" # comment +} + +autocmd BufNewFile * { + # Vim9-script comment + "useless string" # comment +} + + +" Issue: #13047 + +if !exists(":DiffOrig") + command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis + \ | wincmd p | diffthis +endif + + +" Issue: #11307 and #11560 + +" This is what we call " blah + + +" Issue # #9587 + +def CommentTitle() + # Title: ... +enddef diff --git a/runtime/syntax/testdir/input/vim_ex_def.vim b/runtime/syntax/testdir/input/vim_ex_def.vim index dd4ecd1..2685ba5 100644 --- a/runtime/syntax/testdir/input/vim_ex_def.vim +++ b/runtime/syntax/testdir/input/vim_ex_def.vim @@ -19,27 +19,11 @@ def Foo " comment 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 +" trailing whitespace def Foo(): number return 42 enddef diff --git a/runtime/syntax/testdir/input/vim_ex_def_fold.vim b/runtime/syntax/testdir/input/vim_ex_def_fold.vim index 7ab3e3f..3326075 100644 --- a/runtime/syntax/testdir/input/vim_ex_def_fold.vim +++ b/runtime/syntax/testdir/input/vim_ex_def_fold.vim @@ -20,27 +20,11 @@ def Foo " comment 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 +" trailing whitespace def Foo(): number return 42 enddef @@ -124,3 +108,23 @@ def Foo() "useless string" enddef + +" fold-region ending + +def Foo() + # enddef +enddef + +def Foo() + echo "enddef" +enddef + +def Foo() + let x =<< END + endfunction + END +enddef + +:def Foo() +:enddef + diff --git a/runtime/syntax/testdir/input/vim_ex_def_nested.vim b/runtime/syntax/testdir/input/vim_ex_def_nested.vim new file mode 100644 index 0000000..008c415 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_def_nested.vim @@ -0,0 +1,20 @@ +vim9script +# Vim9 :def command (nested) + +class Test + const name: string + + def new() + def Name(): string + function GiveName() + return "any" + endfunction + + return GiveName() + enddef + + this.name = Name() + enddef +endclass + +echo Test.new() diff --git a/runtime/syntax/testdir/input/vim_ex_def_nested_fold.vim b/runtime/syntax/testdir/input/vim_ex_def_nested_fold.vim new file mode 100644 index 0000000..601f553 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_def_nested_fold.vim @@ -0,0 +1,22 @@ +vim9script +# Vim9 :def command (nested) +# VIM_TEST_SETUP let g:vimsyn_folding = 'f' +# VIM_TEST_SETUP setl fdc=2 fdm=syntax + +class Test + const name: string + + def new() + def Name(): string + function GiveName() + return "any" + endfunction + + return GiveName() + enddef + + this.name = Name() + enddef +endclass + +echo Test.new() diff --git a/runtime/syntax/testdir/input/vim_ex_function_fold.vim b/runtime/syntax/testdir/input/vim_ex_function_fold.vim index f9d9bee..dd260ca 100644 --- a/runtime/syntax/testdir/input/vim_ex_function_fold.vim +++ b/runtime/syntax/testdir/input/vim_ex_function_fold.vim @@ -181,3 +181,43 @@ delfunction foo.bar delfunction! Foo delfunction foo.bar + +" fold-region ending + +function Foo() + " endfunction +endfunction + +function Foo() + echo "endfunction" +endfunction + +function Foo() + let x =<< END + endfunction + END + +endfunction + +function Foo() + append + endfunction +. +endfunction + +function Foo() + change + endfunction +. + +endfunction + +function Foo() + insert + endfunction +. +endfunction + +:function Foo() +:endfunction + diff --git a/runtime/syntax/testdir/input/vim_ex_function_nested.vim b/runtime/syntax/testdir/input/vim_ex_function_nested.vim new file mode 100644 index 0000000..749b572 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_function_nested.vim @@ -0,0 +1,38 @@ +" Vim :def and :function commands (nested) + +def FunA(): string + def DoFunA(): string + return "." + enddef + + return DoFunA() +enddef + +def FunB(): string + function DoFunB() + return ".." + endfunction + + return DoFunB() +enddef + +function FunC() + def DoFunC(): string + return "..." + enddef + + return DoFunC() +endfunction + +function FunD() + function DoFunD() + return "...." + endfunction + + return DoFunD() +endfunction + +echo FunA() +echo FunB() +echo FunC() +echo FunD() diff --git a/runtime/syntax/testdir/input/vim_ex_function_nested_fold.vim b/runtime/syntax/testdir/input/vim_ex_function_nested_fold.vim new file mode 100644 index 0000000..d966ef3 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_function_nested_fold.vim @@ -0,0 +1,40 @@ +" Vim :def and :function commands (nested) +" VIM_TEST_SETUP let g:vimsyn_folding = 'f' +" VIM_TEST_SETUP setl fdc=2 fdm=syntax + +def FunA(): string + def DoFunA(): string + return "." + enddef + + return DoFunA() +enddef + +def FunB(): string + function DoFunB() + return ".." + endfunction + + return DoFunB() +enddef + +function FunC() + def DoFunC(): string + return "..." + enddef + + return DoFunC() +endfunction + +function FunD() + function DoFunD() + return "...." + endfunction + + return DoFunD() +endfunction + +echo FunA() +echo FunB() +echo FunC() +echo FunD() diff --git a/runtime/syntax/testdir/input/vim_expr.vim b/runtime/syntax/testdir/input/vim_expr.vim index cf5838c..610c2be 100644 --- a/runtime/syntax/testdir/input/vim_expr.vim +++ b/runtime/syntax/testdir/input/vim_expr.vim @@ -57,15 +57,16 @@ echo -0b11111111 echo -0B11111111 " Float -123.456 -+0.0001 -55.0 --0.123 -1.234e03 -1.0E-6 --3.1416e+88 +echo 123.456 +echo +0.0001 +echo 55.0 +echo -0.123 +echo 1.234e03 +echo 1.0E-6 +echo -3.1416e+88 " Blob +echo 0z echo 0zFF00ED015DAF echo 0zFF00.ED01.5DAF echo 0zFF.00.ED.01.5D.AF diff --git a/runtime/syntax/testdir/input/vim_keymap.vim b/runtime/syntax/testdir/input/vim_keymap.vim index 983c822..424d437 100644 --- a/runtime/syntax/testdir/input/vim_keymap.vim +++ b/runtime/syntax/testdir/input/vim_keymap.vim @@ -23,4 +23,5 @@ c Special notation allowed in RHS - octal " Vim-script comment characters # Line should not match as a Vim9-script comment -\" “ Line should not match as a legacy-script comment +\" “ Line should not match as a legacy-script comment +: " Line should not match as a legacy-script comment diff --git a/runtime/syntax/testdir/input/vim_object_methods.vim b/runtime/syntax/testdir/input/vim_object_methods.vim new file mode 100644 index 0000000..d22c7f2 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_object_methods.vim @@ -0,0 +1,56 @@ +vim9script +# VIM_TEST_SETUP hi link vimMethodName Todo + + +# Vim |builtin-object-methods| and namesake builtin functions. +class PairClassTest + public const a: any + public const b: any + + def new(a: any, b: any) + this.a = a + this.b = b + enddef + + def empty(): bool + return false + enddef + def len(): number + return 2 + enddef + def string(): string + return printf('(%s, %s)', this.a, this.b) + enddef +endclass + +enum MarkerEnumTest + INSTANCE + + def NoOp() + enddef + + def empty(): bool + return true + enddef + def len(): number + return 0 + enddef + def string(): string + return this.name + enddef +endenum + +const b1: bool = empty(MarkerEnumTest.INSTANCE) +const n1: number = len(MarkerEnumTest.INSTANCE) +const s1: string = string(MarkerEnumTest.INSTANCE) +echo b1 && MarkerEnumTest.INSTANCE.empty() +echo n1 == 0 && MarkerEnumTest.INSTANCE.len() == 0 +echo s1 == 'INSTANCE' && MarkerEnumTest.INSTANCE.string() == 'INSTANCE' + +const pair: PairClassTest = PairClassTest.new(0, 1) +const b2: bool = !pair.empty() +const n2: number = pair.len() +const s2: string = pair.string() +echo b2 && !empty(pair) +echo n2 == 2 && len(pair) == 2 +echo s2 == '(0, 1)' && string(pair) == '(0, 1)' diff --git a/runtime/syntax/testdir/input/yaml.yaml b/runtime/syntax/testdir/input/yaml.yaml new file mode 100644 index 0000000..d87aca2 --- /dev/null +++ b/runtime/syntax/testdir/input/yaml.yaml @@ -0,0 +1,127 @@ +%YAML 1.2 +%TAG ! tag:yaml.org,2002: # primary tag handle +%TAG !! tag:yaml.org,2002: # secondary tag handle +%TAG !yaml! tag:yaml.org,2002: # named tag handle +--- +- !str 0 # primary tag handle +- !!str 0 # secondary tag handle +- !yaml!str 0 # named tag handle +--- + +boolean: [false, true, FALSE, TRUE, False, True] +null: [null, ~,] +integer: [12345, -12_345, +12_345] +float: [ + 12345.15, -12_345.15, +12_345.15, 1.23015e+3, + -12_345.15e+10, +12_345.15e-10, 1.234_515e-10 +] +binary: [0b101010, -0b1010_1010, +0b1010_1010] +octal: [0777, 0o777, +0777, -0o777] +hexadecimal: [0xFEFF_0000, -0xabcd_ef00, +0x1234_5678] +sexagesimal: [10:20:30, -19:29:39, +19:29:39] +infinity: [.inf, -.Inf, +.INF] +not a number: [.nan, .NaN, .NAN] + +plain strings: + - a b c + - a * b & c @ d# e : f # comment + - {{ f(' ') }} #8234 +double quoted strings: + - "" + - "a b c": "d e f" # comment + - "\\\"\a\b\f\n\r\t\v\0\_\ \N\L\P\x41\u0041\U00000041" +single quoted strings: + - '' + - 'a b c': 'd e f' # comment + - 'a''b''c' + +block folded string: > + foo + bar: 1 + + baz: null + + "qux" +block literal string: | + foo + bar: 1 + + baz: null + + 'qux' + +chomping strings: + - block folded string: >- # comment + foo + bar: 1 + - block literal string: |+ # comment + foo + bar: 1 + - |- #11517 + foo "\" + bar: 1 +block indentation indicator: + - block folded string: >1 # comment + foo + bar: 1 + - block literal string: |1- # comment + foo + bar: 1 + - |-1 # comment + foo + bar: 1 + +flow collection: + empty sequence: [] + empty mapping: {} + flow sequence: [foo, bar, baz] + flow mapping: {foo: bar, baz: qux} + flow string: + foo + bar + baz + "double quoted \" string": " + foo + bar + baz" + 'single quoted '' string': ' + foo + bar + baz' + inside block mapping: + foo: {bar: baz} + bar: ["foo": {baz: qux}] + flow collection: [foo # comment + , {bar: [{ # comment + baz: ' + qux # not comment + ' # comment + }]}] + +explicit mapping: + ? foo # comment + : bar # comment + ? - foo + - bar + : - baz + - qux + ? [1, 2, 3] + : ? 1 + : one + ? 2 + : - ? 3 + : three + - {?4: four, ? 5: five, ? # comment + 6: # comment + {7:seven}} + +mapping merge: + foo: &foo + bar: baz + bar: + <<: *foo + baz: &bar + foo: [*foo] + qux: + <<: [*foo, *bar] + baz: {<<: *foo, qux: [{<< : *foo}]} diff --git a/runtime/syntax/uci.vim b/runtime/syntax/uci.vim new file mode 100644 index 0000000..fdf5bfd --- /dev/null +++ b/runtime/syntax/uci.vim @@ -0,0 +1,33 @@ +" Vim syntax file +" Language: OpenWrt Unified Configuration Interface +" Maintainer: Colin Caine +" Upstream: https://github.com/cmcaine/vim-uci +" Last Change: 2021 Sep 19 +" +" For more information on uci, see https://openwrt.org/docs/guide-user/base-system/uci + +if exists("b:current_syntax") + finish +endif + +" Fancy zero-width non-capturing look-behind to see what the last word was. +" Would be really nice if there was some less obscure or more efficient way to +" do this. +syntax match uciOptionName '\%(\%(option\|list\)\s\+\)\@<=\S*' +syntax match uciConfigName '\%(\%(package\|config\)\s\+\)\@<=\S*' +syntax keyword uciConfigDec package config nextgroup=uciConfigName skipwhite +syntax keyword uciOptionType option list nextgroup=uciOptionName skipwhite + +" Standard matches. +syntax match uciComment "#.*$" +syntax region uciString start=+"+ end=+"+ skip=+\\"+ +syntax region uciString start=+'+ end=+'+ skip=+\\'+ + +highlight default link uciConfigName Identifier +highlight default link uciOptionName Constant +highlight default link uciConfigDec Statement +highlight default link uciOptionType Type +highlight default link uciComment Comment +highlight default link uciString Normal + +let b:current_syntax = "uci" diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index b12b5c6..02d6dde 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -1,12 +1,10 @@ " Vim syntax file -" Language: Vim script -" Maintainer: Hirohito Higashi -" Doug Kearns -" URL: https://github.com/vim-jp/syntax-vim-ex -" Last Change: 2024 Mar 22 +" Language: Vim script +" Maintainer: Hirohito Higashi +" Doug Kearns +" URL: https://github.com/vim-jp/syntax-vim-ex +" Last Change: 2024 Apr 13 " 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. @@ -21,6 +19,8 @@ endif let s:keepcpo= &cpo set cpo&vim +let s:vim9script = "\n" .. getline(1, 32)->join("\n") =~# '\n\s*vim9\%[script]\>' + " vimTodo: contains common special-notices for comments {{{2 " Use the vimCommentGroup cluster to add your own. syn keyword vimTodo contained COMBAK FIXME TODO XXX @@ -28,12 +28,12 @@ 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 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 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] 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] com[mand] comc[lear] +syn keyword vimCommand contained 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] helpc[lose] helpf[ind] +syn keyword vimCommand contained helpg[rep] helpt[ags] ha[rdcopy] hi[ghlight] hid[e] his[tory] ho[rizontal] 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] lv[imgrep] lvimgrepa[dd] lw[indow] +syn keyword vimCommand contained 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] reg[isters] res[ize] +syn keyword vimCommand contained 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] tabd[o] tabe[dit] +syn keyword vimCommand contained 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] 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] @@ -90,8 +90,8 @@ syn keyword vimErrSetting contained invakm invaltkeymap invanti invantialias inv " AutoCmd Events {{{2 syn case ignore " 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 +syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre CmdlineChanged CmdlineEnter CmdlineLeave CmdUndefined CmdwinEnter CmdwinLeave ColorScheme ColorSchemePre CompleteChanged CompleteDone CompleteDonePre CursorHold CursorHoldI CursorMoved CursorMovedI DiffUpdated DirChanged DirChangedPre EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre +syn keyword vimAutoEvent contained FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave InsertLeavePre MenuPopup ModeChanged OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost SessionWritePost ShellCmdPost ShellFilterPost SigUSR1 SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TermResponseAll TextChanged TextChangedI TextChangedP TextChangedT TextYankPost User VimEnter VimLeave VimLeavePre VimResized VimResume VimSuspend WinClosed WinEnter WinLeave WinNew WinNewPre WinResized WinScrolled " 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 @@ -116,7 +116,7 @@ syn keyword vimFuncName contained test_mswin_event test_null_blob test_null_chan " 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 exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[afhHlmpPrt]' if g:vimsyn_folding =~# 'a' com! -nargs=* VimFolda fold else @@ -132,6 +132,11 @@ if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[afhlmpPrt]' else com! -nargs=* VimFoldh endif + if g:vimsyn_folding =~# 'H' + com! -nargs=* VimFoldH fold + else + com! -nargs=* VimFoldH + endif if g:vimsyn_folding =~# 'l' com! -nargs=* VimFoldl fold else @@ -166,6 +171,7 @@ else com! -nargs=* VimFolda com! -nargs=* VimFoldf com! -nargs=* VimFoldh + com! -nargs=* VimFoldH com! -nargs=* VimFoldl com! -nargs=* VimFoldm com! -nargs=* VimFoldp @@ -195,12 +201,13 @@ 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 match vimNumber '\<\d\+\%(\.\d\+\%(e[+-]\=\d\+\)\=\)\=' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment +syn match vimNumber '\<0b[01]\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment +syn match vimNumber '\<0o\=\o\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment +syn match vimNumber '\<0x\x\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment +syn match vimNumber '\<0z\>' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment +syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment +syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment syn case match " All vimCommands are contained by vimIsCommand. {{{2 @@ -221,9 +228,9 @@ syn cluster vimExprList contains=vimEnvvar,vimFunc,vimFuncVar,vimNumber,vimOper, " (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="^\.$"" + syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$" extend + syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$" extend + syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$" extend endif " Behave! {{{2 @@ -246,7 +253,7 @@ 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 cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,@vimComment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimNotation,vimCtrlChar,vimFuncVar,vimContinue syn match vimAugroup "\" contains=vimAugroupKey,vimAugroupBang skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a' syn region vimAugroup fold start="\\ze\s\+\%([eE][nN][dD]\)\@!\S\+" matchgroup=vimAugroupKey end="\\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList,vimAugroupkey skipwhite nextgroup=vimAugroupEnd @@ -274,12 +281,14 @@ 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 +" 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 cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst,vimFuncFold +syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimFuncVar,vimInsert +syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment syn region vimFuncPattern contained matchgroup=vimOper start="/" end="$" contains=@vimSubstList syn match vimFunction "\" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimFuncKey @@ -287,7 +296,7 @@ syn match vimDef "\" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPatt syn match vimFunction "\!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimFuncList skipwhite nextgroup=vimFuncParams syn match vimDef "\!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimDefList nextgroup=vimDefParams +syn match vimDef "\!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimDefList,vimMethodName nextgroup=vimDefParams syn match vimFuncComment contained +".*+ skipwhite skipnl nextgroup=vimFuncBody,vimEndfunction syn match vimDefComment contained "#.*" skipwhite skipnl nextgroup=vimDefBody,vimEnddef @@ -297,6 +306,7 @@ syn match vimFuncSID contained "\c" syn match vimFuncSID contained "\<[sg]:" syn keyword vimFuncKey contained fu[nction] syn keyword vimDefKey contained def +syn keyword vimMethodName contained empty len string 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 @@ -313,9 +323,9 @@ syn match vimEndfunction "\" syn match vimEnddef "\" if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' - syn region vimFuncFold start="\!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+\s*(" end="\" contains=vimFunction fold keepend transparent - syn region vimFuncFold start="\!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+(" end="\" contains=vimDef fold keepend transparent - syn region vimFuncFold start="\" @@ -336,15 +346,21 @@ syn match vimUserType contained "\<\u\w*\>" syn cluster vimType contains=vimType,vimCompoundType,vimUserType -" Keymaps: (Vim Project Addition) {{{2 +" Keymaps: {{{2 " ======= -" TODO: handle Vim9 script comments when something like #13104 is merged -syn match vimKeymapStart "^" contained skipwhite nextgroup=vimKeymapLhs,vimKeymapLineComment +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 + +" TODO: remove when :" comment is matched in parts as "ex-colon comment" --djk +if s:vim9script + syn match vim9KeymapLineComment "#.*" contained contains=@vimCommentGroup,vimCommentString,vim9CommentTitle +else + syn match vimKeymapLineComment +".*+ contained contains=@vimCommentGroup,vimCommentString,vimCommentTitle +endif +syn cluster vimKeymapLineComment contains=vim9\=KeymapLineComment syn region vimKeymap matchgroup=vimCommand start="\" end="\%$" contains=vimKeymapStart @@ -360,9 +376,10 @@ 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 cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,@vimComment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange syn keyword vimUserCommand contained com[mand] -syn match vimUserCmd "\.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter +syn match vimUserCmdName contained "\<\u\w*\>" nextgroup=vimUserCmdBlock skipwhite +syn match vimUserCmd "\.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter,vimCmdBlock,vimUserCmdName 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 @@ -385,20 +402,41 @@ syn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w* syn case match syn match vimUserAttrbCmplt contained "custom,\u\w*" +syn region vimUserCmdBlock contained matchgroup=vimSep start="{" end="}" contains=@vimDefBodyList + " Lower Priority Comments: after some vim commands... {{{2 " ======================= -syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString -syn match vimComment +\'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 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,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 "[,:]" @@ -504,7 +542,7 @@ 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*$' +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*$' extend syn keyword vimLet var skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc " For: {{{2 @@ -515,14 +553,17 @@ syn keyword vimFor for skipwhite nextgroup=vimVar,vimVarList " ============= " 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 +" GEN_SYN_VIM: vimCommand abclear, START_STR='syn keyword vimAbb', END_STR='skipwhite nextgroup=vimMapMod' +syn keyword vimAbb abc[lear] cabc[lear] iabc[lear] skipwhite nextgroup=vimMapMod " 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 match vimAutoCmdSfxList contained "\S*" skipwhite nextgroup=vimAutoCmdMod,vimAutoCmdBlock syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList -syn match vimAutoCmdMod "\(++\)\=\(once\|nested\)" +syn match vimAutoCmdMod "\(++\)\=\(once\|nested\)" skipwhite nextgroup=vimAutoCmdBlock +syn region vimAutoCmdBlock contained matchgroup=vimSep start="{" end="}" contains=@vimDefBodyList " Echo And Execute: -- prefer strings! {{{2 " ================ @@ -622,7 +663,7 @@ syn case match " (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.]*\>\|\" contains=vimNotation +syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\" contains=vimNotation,vimMethodName syn keyword vimFuncEcho contained ec ech echo " User Command Highlighting: {{{2 @@ -632,7 +673,9 @@ syn match vimUsrCmd '^\s*\zs\u\%(\w*\)\@>\%([(#[]\|\s\+\%([-+*/%]\=\|\.\.\)=\)\@ " ==================== 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 + " TODO: The |builtin-object-methods| exception should only apply to method + " definitions. + syn match vimFunctionError "\s\zs\%(empty\|len\|new\|string\)\@![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 "\" syn match vimBufnrWarn /\" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment,vim9Comment +syn match vimSyntax "\" contains=vimCommand skipwhite nextgroup=vimSynType,@vimComment syn cluster vimFuncBodyList add=vimSyntax " Syntax: case {{{2 @@ -753,7 +796,7 @@ syn match vimIsCommand "\s*\a\+" transparent contains=vimCommand,vimNotatio " Highlighting: {{{2 " ============ -syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment,vim9Comment +syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,@vimComment if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror") syn match vimHiCtermError contained "\D\i*" endif @@ -809,16 +852,21 @@ 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 +if s:vim9script + syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle contained + syn match vim9LineComment +^[ \t:]*#.*$+ contains=@vimCommentGroup,vimCommentString,vim9CommentTitle +else + syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle + syn match vim9LineComment +^[ \t:]*#.*$+ contains=@vimCommentGroup,vimCommentString,vim9CommentTitle contained +endif 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 vim9CommentTitle '#\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vim9CommentTitleLeader,vimTodo,@vimCommentGroup 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 +syn match vim9CommentTitleLeader '#\s\+'ms=s+1 contained " Searches And Globals: {{{2 " ==================== @@ -827,6 +875,17 @@ syn match vimSearchDelim '^\s*\zs[/?]\|[/?]$' contained syn region vimGlobal matchgroup=Statement start='\ " First author: Nikolai Weibull -" Latest Revision: 2015-03-28 -" removed duplicate yamlKeyValueDelimiter (pull #4799) +" Latest Revision: 2024-04-01 if exists('b:current_syntax') finish @@ -15,21 +14,21 @@ set cpo&vim " Choose the schema to use " TODO: Validate schema if !exists('b:yaml_schema') - if exists('g:yaml_schema') - let b:yaml_schema = g:yaml_schema - else - let b:yaml_schema = 'core' - endif + if exists('g:yaml_schema') + let b:yaml_schema = g:yaml_schema + else + let b:yaml_schema = 'core' + endif endif let s:ns_char = '\%([\n\r\uFEFF \t]\@!\p\)' let s:ns_word_char = '[[:alnum:]_\-]' let s:ns_uri_char = '\%(%\x\x\|'.s:ns_word_char.'\|[#/;?:@&=+$,.!~*''()[\]]\)' let s:ns_tag_char = '\%(%\x\x\|'.s:ns_word_char.'\|[#/;?:@&=+$.~*''()]\)' -let s:c_ns_anchor_char = '\%([\n\r\uFEFF \t,[\]{}]\@!\p\)' let s:c_indicator = '[\-?:,[\]{}#&*!|>''"%@`]' let s:c_flow_indicator = '[,[\]{}]' +let s:ns_anchor_char = substitute(s:ns_char, '\v\C[\zs', '\=s:c_flow_indicator[1:-2]', '') let s:ns_char_without_c_indicator = substitute(s:ns_char, '\v\C[\zs', '\=s:c_indicator[1:-2]', '') let s:_collection = '[^\@!\(\%(\\\.\|\[^\\\]]\)\+\)]' @@ -38,8 +37,8 @@ function s:SimplifyToAssumeAllPrintable(p) return substitute(a:p, '\V\C\\%('.s:_collection.'\\@!\\p\\)', '[^\1]', '') endfunction let s:ns_char = s:SimplifyToAssumeAllPrintable(s:ns_char) +let s:ns_anchor_char = s:SimplifyToAssumeAllPrintable(s:ns_anchor_char) let s:ns_char_without_c_indicator = s:SimplifyToAssumeAllPrintable(s:ns_char_without_c_indicator) -let s:c_ns_anchor_char = s:SimplifyToAssumeAllPrintable(s:c_ns_anchor_char) function s:SimplifyAdjacentCollections(p) return substitute(a:p, '\V\C'.s:_collection.'\\|'.s:_collection, '[\1\2]', 'g') @@ -60,9 +59,10 @@ let s:c_ns_tag_property = s:c_verbatim_tag. \ '\|'.s:c_ns_shorthand_tag. \ '\|'.s:c_non_specific_tag -let s:c_ns_anchor_name = s:c_ns_anchor_char.'\+' +let s:c_ns_anchor_name = s:ns_anchor_char.'\+' let s:c_ns_anchor_property = '&'.s:c_ns_anchor_name let s:c_ns_alias_node = '\*'.s:c_ns_anchor_name +let s:c_ns_properties = '\%(\%('.s:c_ns_tag_property.'\|'.s:c_ns_anchor_property.'\)\s\+\)\+' let s:ns_directive_name = s:ns_char.'\+' @@ -100,57 +100,71 @@ execute 'syn region yamlDirective oneline start='.string('^\ze%'.s:ns_directive_ \ 'yamlReservedDirective '. \ 'keepend' -syn match yamlTAGDirective '%TAG\s\+' contained nextgroup=yamlTagHandle -execute 'syn match yamlTagHandle contained nextgroup=yamlTagPrefix '.string(s:c_tag_handle.'\s\+') -execute 'syn match yamlTagPrefix contained nextgroup=yamlComment ' . string(s:ns_tag_prefix) +syn match yamlTAGDirective /%TAG\ze\s/ contained nextgroup=yamlTagHandle skipwhite +execute 'syn match yamlTagHandle' string(s:c_tag_handle) 'contained nextgroup=yamlTagPrefix skipwhite' +execute 'syn match yamlTagPrefix' string(s:ns_tag_prefix) 'contained nextgroup=yamlComment skipwhite' -syn match yamlYAMLDirective '%YAML\s\+' contained nextgroup=yamlYAMLVersion -syn match yamlYAMLVersion '\d\+\.\d\+' contained nextgroup=yamlComment +syn match yamlYAMLDirective /%YAML\ze\s/ contained nextgroup=yamlYAMLVersion skipwhite +syn match yamlYAMLVersion /\d\+\.\d\+/ contained nextgroup=yamlComment skipwhite execute 'syn match yamlReservedDirective contained nextgroup=yamlComment '. \string('%\%(\%(TAG\|YAML\)\s\)\@!'.s:ns_directive_name) syn region yamlFlowString matchgroup=yamlFlowStringDelimiter start='"' skip='\\"' end='"' - \ contains=yamlEscape - \ nextgroup=yamlKeyValueDelimiter + \ contains=yamlEscape contained nextgroup=yamlFlowMappingDelimiter,yamlComment skipwhite syn region yamlFlowString matchgroup=yamlFlowStringDelimiter start="'" skip="''" end="'" - \ contains=yamlSingleEscape - \ nextgroup=yamlKeyValueDelimiter + \ contains=yamlSingleEscape contained nextgroup=yamlFlowMappingDelimiter,yamlComment skipwhite syn match yamlEscape contained '\\\%([\\"abefnrtv\^0_ NLP\n]\|x\x\x\|u\x\{4}\|U\x\{8}\)' syn match yamlSingleEscape contained "''" -syn match yamlBlockScalarHeader contained '\s\+\zs[|>]\%([+-]\=[1-9]\|[1-9]\=[+-]\)\=' - syn cluster yamlConstant contains=yamlBool,yamlNull -syn cluster yamlFlow contains=yamlFlowString,yamlFlowMapping,yamlFlowCollection -syn cluster yamlFlow add=yamlFlowMappingKey,yamlFlowMappingMerge -syn cluster yamlFlow add=@yamlConstant,yamlPlainScalar,yamlFloat -syn cluster yamlFlow add=yamlTimestamp,yamlInteger,yamlMappingKeyStart -syn cluster yamlFlow add=yamlComment -syn region yamlFlowMapping matchgroup=yamlFlowIndicator start='{' end='}' contains=@yamlFlow -syn region yamlFlowCollection matchgroup=yamlFlowIndicator start='\[' end='\]' contains=@yamlFlow +syn cluster yamlFlowNode contains=yamlFlowString,yamlFlowMapping,yamlFlowCollection +syn cluster yamlFlowNode add=yamlFlowMappingKey,yamlFlowMappingKeyStart,yamlFlowMappingMerge +syn cluster yamlFlowNode add=@yamlConstant,yamlPlainScalar,yamlFloat,yamlComment +syn cluster yamlFlowNode add=yamlTimestamp,yamlInteger,yamlAlias,yamlFlowNodeProperties +syn region yamlFlowMapping matchgroup=yamlFlowIndicator start='{\@]\%([1-9][+-]\|[+-]\?[1-9]\?\)\%(\s\+#.*\)\?$' contained + \ contains=yamlComment nextgroup=yamlBlockString skipnl +syn region yamlBlockString start=/^\z(\s\+\)/ skip=/^$/ end=/^\%(\z1\)\@!/ contained + +syn cluster yamlBlockNode contains=@yamlFlowNode,yamlBlockMappingKey,yamlBlockMappingKeyString, + \yamlBlockMappingMerge,yamlBlockMappingKeyStart,yamlBlockCollectionItemStart, + \yamlBlockNodeProperties,yamlBlockScalarHeader syn cluster yamlScalarWithSpecials contains=yamlPlainScalar,yamlBlockMappingKey,yamlFlowMappingKey @@ -164,8 +178,8 @@ elseif b:yaml_schema is# 'core' syn keyword yamlNull null Null NULL contained containedin=@yamlScalarWithSpecials syn keyword yamlBool true True TRUE false False FALSE contained containedin=@yamlScalarWithSpecials exe 'syn match yamlNull /'.s:_bounder.'\@1 +" Documentation: https://pwmt.org/projects/zathura/documentation/ +" Upstream: https://github.com/Freed-Wu/zathurarc.vim +" Latest Revision: 2024-04-02 + +if exists('b:current_syntax') + finish +endif +let b:current_syntax = 'zathurarc' + +syntax case match +syntax iskeyword @,48-57,_,192-255,- + +syntax region zathurarcComment start="\%([ \t]*\&\([^\\]\zs\|^\)\)#" end="$" +syntax match zathurarcBracket /[<>]/ contained +syntax match zathurarcNotation `<[A-Z][a-z0-9]\+>` contains=zathurarcBracket +syntax match zathurarcNumber `\<[0-9.]\>` +syntax region zathurarcString start=`"` skip=`\\"` end=`"` +syntax region zathurarcString start=`'` skip=`\\'` end=`'` +syntax keyword zathurarcMode normal fullscreen presentation index +syntax keyword zathurarcBoolean true false +syntax keyword zathurarcCommand include map set unmap +syntax keyword zathurarcOption abort-clear-search adjust-open advance-pages-per-row completion-bg completion-fg completion-group-bg completion-group-fg completion-highlight-bg completion-highlight-fg continuous-hist-save database dbus-raise-window dbus-service default-bg default-fg exec-command filemonitor first-page-column font guioptions highlight-active-color highlight-color highlight-fg highlight-transparency incremental-search index-active-bg index-active-fg index-bg index-fg inputbar-bg inputbar-fg link-hadjust link-zoom n-completion-items notification-bg notification-error-bg notification-error-fg notification-fg notification-warning-bg notification-warning-fg page-cache-size page-padding page-right-to-left page-thumbnail-size pages-per-row recolor recolor-darkcolor recolor-keephue recolor-lightcolor recolor-reverse-video render-loading render-loading-bg render-loading-fg sandbox scroll-full-overlap scroll-hstep scroll-page-aware scroll-step scroll-wrap search-hadjust selection-clipboard selection-notification show-directories show-hidden show-recent statusbar-basename statusbar-bg statusbar-fg statusbar-h-padding statusbar-home-tilde statusbar-page-percent statusbar-v-padding synctex synctex-editor-command vertical-center window-height window-icon window-icon-document window-title-basename window-title-home-tilde window-title-page window-width zoom-center zoom-max zoom-min zoom-step + +highlight default link zathurarcComment Comment +highlight default link zathurarcNumber Number +highlight default link zathurarcMode Macro +highlight default link zathurarcString String +highlight default link zathurarcBoolean Boolean +" same as vim +highlight default link zathurarcBracket Delimiter +highlight default link zathurarcNotation Special +highlight default link zathurarcCommand Statement +highlight default link zathurarcOption PreProc +" ex: nowrap diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index 4db2298..4d03a72 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -157,10 +157,55 @@ # you can set DEFINES on the command line, e.g., # nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS" +RM= del /f /q +PS= powershell.exe + +PSFLAGS= -NoLogo -NoProfile -Command + +!IF ![$(PS) $(PSFLAGS) try{Out-File -FilePath '.\major.tmp' -InputObject \ + \"MAJOR=$$(((Select-String -Pattern 'VIM_VERSION_MAJOR\s+\d{1,2}' \ + -Path '.\version.h').Line[-2..-1^]-join '').Trim())\"} \ + catch{exit 1}] +! INCLUDE .\major.tmp +! IF [$(RM) .\major.tmp] +! ENDIF +!ELSE +# Change this value for the new version +MAJOR= 9 +!ENDIF + +!IF ![$(PS) $(PSFLAGS) try{Out-File -FilePath '.\minor.tmp' -InputObject \ + \"MINOR=$$(((Select-String -Pattern 'VIM_VERSION_MINOR\s+\d{1,2}' \ + -Path '.\version.h').Line[-2..-1^]-join '').Trim())\"} \ + catch{exit 1}] +! INCLUDE .\minor.tmp +! IF [$(RM) .\minor.tmp] +! ENDIF +!ELSE +# Change this value for the new version +MINOR= 1 +!ENDIF + +!IF ![$(PS) $(PSFLAGS) try{Out-File -FilePath '.\patchlvl.tmp' -InputObject \ + \"PATCHLEVEL=$$([decimal^]((Get-Content -Path '.\version.c' \ + -TotalCount ((Select-String -Pattern 'static int included_patches' \ + -Path '.\version.c').LineNumber+3))[-1^]).Trim().TrimEnd(','))\"} \ + catch{exit 1}] +! INCLUDE .\patchlvl.tmp +! IF [$(RM) .\patchlvl.tmp] +! ENDIF +!ENDIF + + # Build on Windows NT/XP TARGETOS = WINNT +!IFDEF PATCHLEVEL +RCFLAGS= -DVIM_VERSION_PATCHLEVEL=$(PATCHLEVEL) +!ENDIF + + !if "$(VIMDLL)" == "yes" GUI = yes !endif @@ -591,7 +636,7 @@ OPTFLAG = $(OPTFLAG) /GL ! endif CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG) -RCFLAGS = -DNDEBUG +RCFLAGS = $(RCFLAGS) -DNDEBUG ! ifdef USE_MSVCRT CFLAGS = $(CFLAGS) /MD LIBC = msvcrt.lib @@ -607,7 +652,7 @@ VIM = vimd DEBUGINFO = /ZI ! endif CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od -RCFLAGS = -D_DEBUG -DDEBUG +RCFLAGS = $(RCFLAGS) -D_DEBUG -DDEBUG # The /fixed:no is needed for Quantify. LIBC = /fixed:no ! ifdef USE_MSVCRT @@ -621,7 +666,7 @@ LIBC = $(LIBC) libcmtd.lib !endif # DEBUG # Visual Studio 2005 has 'deprecated' many of the standard CRT functions -CFLAGS_DEPR = /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE +CFLAGS_DEPR = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE CFLAGS = $(CFLAGS) $(CFLAGS_DEPR) !include Make_all.mak @@ -1276,6 +1321,10 @@ $(OUTDIR): CFLAGS_INST = /nologo /O2 -DNDEBUG -DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) $(CFLAGS_DEPR) +!IFDEF PATCHLEVEL +CFLAGS_INST= $(CFLAGS_INST) -DVIM_VERSION_PATCHLEVEL=$(PATCHLEVEL) +!ENDIF + install.exe: dosinst.c dosinst.h version.h $(CC) $(CFLAGS_INST) dosinst.c kernel32.lib shell32.lib \ user32.lib ole32.lib advapi32.lib uuid.lib \ diff --git a/src/Makefile b/src/Makefile index 33903d3..29f63dc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2341,6 +2341,7 @@ installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(VIMTARGET) $(DEST_RT) \ $(DEST_SYN) $(DEST_SYN)/modula2 $(DEST_SYN)/modula2/opt $(DEST_SYN)/shared \ $(DEST_IND) $(DEST_FTP) \ $(DEST_AUTO) $(DEST_AUTO)/dist $(DEST_AUTO)/xml $(DEST_AUTO)/zig \ + $(DEST_AUTO)/rust $(DEST_AUTO)/cargo \ $(DEST_IMPORT) $(DEST_IMPORT)/dist \ $(DEST_PLUG) $(DEST_TUTOR) $(DEST_SPELL) $(DEST_COMP) -$(SHELL) ./installman.sh install $(DEST_MAN) "" $(INSTALLMANARGS) @@ -2428,6 +2429,10 @@ installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(VIMTARGET) $(DEST_RT) \ cd $(DEST_AUTO)/xml; chmod $(HELPMOD) *.vim cd $(AUTOSOURCE)/zig; $(INSTALL_DATA) *.vim $(DEST_AUTO)/zig cd $(DEST_AUTO)/zig; chmod $(HELPMOD) *.vim + cd $(AUTOSOURCE)/cargo; $(INSTALL_DATA) *.vim $(DEST_AUTO)/cargo + cd $(DEST_AUTO)/cargo; chmod $(HELPMOD) *.vim + cd $(AUTOSOURCE)/rust; $(INSTALL_DATA) *.vim $(DEST_AUTO)/rust + cd $(DEST_AUTO)/rust; chmod $(HELPMOD) *.vim # install the standard import files cd $(IMPORTSOURCE)/dist; $(INSTALL_DATA) *.vim $(DEST_IMPORT)/dist cd $(DEST_IMPORT)/dist; chmod $(HELPMOD) *.vim @@ -2669,6 +2674,7 @@ $(DESTDIR)$(exec_prefix) $(DEST_BIN) \ $(DEST_LANG) $(DEST_KMAP) $(DEST_COMP) $(DEST_MACRO) \ $(DEST_PACK) $(DEST_TOOLS) $(DEST_TUTOR) $(DEST_SPELL) \ $(DEST_AUTO) $(DEST_AUTO)/dist $(DEST_AUTO)/xml $(DEST_AUTO)/zig \ + $(DEST_AUTO)/cargo $(DEST_AUTO)/rust \ $(DEST_IMPORT) $(DEST_IMPORT)/dist $(DEST_PLUG): $(MKDIR_P) $@ -chmod $(DIRMOD) $@ @@ -2859,10 +2865,10 @@ uninstall_runtime: -rmdir $(DEST_SYN) $(DEST_IND) -rm -rf $(DEST_FTP)/*.vim $(DEST_FTP)/README.txt $(DEST_FTP)/logtalk.dict -rm -f $(DEST_AUTO)/*.vim $(DEST_AUTO)/README.txt - -rm -f $(DEST_AUTO)/dist/*.vim $(DEST_AUTO)/xml/*.vim $(DEST_AUTO)/zig/*.vim + -rm -f $(DEST_AUTO)/dist/*.vim $(DEST_AUTO)/xml/*.vim $(DEST_AUTO)/zig/*.vim $(DEST_AUTO)/cargo/*.vim $(DEST_AUTO)/rust/*.vim -rm -f $(DEST_IMPORT)/dist/*.vim -rm -f $(DEST_PLUG)/*.vim $(DEST_PLUG)/README.txt - -rmdir $(DEST_FTP) $(DEST_AUTO)/dist $(DEST_AUTO)/xml $(DEST_AUTO)/zig $(DEST_AUTO) + -rmdir $(DEST_FTP) $(DEST_AUTO)/dist $(DEST_AUTO)/xml $(DEST_AUTO)/zig $(DEST_AUTO)/cargo $(DEST_AUTO)/rust $(DEST_AUTO) -rmdir $(DEST_IMPORT)/dist $(DEST_IMPORT) -rmdir $(DEST_PLUG) $(DEST_RT) # This will fail when other Vim versions are installed, no worries. diff --git a/src/auto/configure b/src/auto/configure index 9712104..0e0cf8e 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -15965,16 +15965,16 @@ 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; } + { 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" + 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" + MSGFMTCMD="OLD_PO_FILE_INPUT=yes $MSGFMT -v" fi fi diff --git a/src/autocmd.c b/src/autocmd.c index 8e43b34..bce57cb 100644 --- a/src/autocmd.c +++ b/src/autocmd.c @@ -74,152 +74,166 @@ typedef struct AutoPat char last; // last pattern for apply_autocmds() } AutoPat; -static struct event_name -{ - char *name; // event name - event_T event; // event number -} event_names[] = -{ - {"BufAdd", EVENT_BUFADD}, - {"BufCreate", EVENT_BUFADD}, - {"BufDelete", EVENT_BUFDELETE}, - {"BufEnter", EVENT_BUFENTER}, - {"BufFilePost", EVENT_BUFFILEPOST}, - {"BufFilePre", EVENT_BUFFILEPRE}, - {"BufHidden", EVENT_BUFHIDDEN}, - {"BufLeave", EVENT_BUFLEAVE}, - {"BufNew", EVENT_BUFNEW}, - {"BufNewFile", EVENT_BUFNEWFILE}, - {"BufRead", EVENT_BUFREADPOST}, - {"BufReadCmd", EVENT_BUFREADCMD}, - {"BufReadPost", EVENT_BUFREADPOST}, - {"BufReadPre", EVENT_BUFREADPRE}, - {"BufUnload", EVENT_BUFUNLOAD}, - {"BufWinEnter", EVENT_BUFWINENTER}, - {"BufWinLeave", EVENT_BUFWINLEAVE}, - {"BufWipeout", EVENT_BUFWIPEOUT}, - {"BufWrite", EVENT_BUFWRITEPRE}, - {"BufWritePost", EVENT_BUFWRITEPOST}, - {"BufWritePre", EVENT_BUFWRITEPRE}, - {"BufWriteCmd", EVENT_BUFWRITECMD}, - {"CmdlineChanged", EVENT_CMDLINECHANGED}, - {"CmdlineEnter", EVENT_CMDLINEENTER}, - {"CmdlineLeave", EVENT_CMDLINELEAVE}, - {"CmdwinEnter", EVENT_CMDWINENTER}, - {"CmdwinLeave", EVENT_CMDWINLEAVE}, - {"CmdUndefined", EVENT_CMDUNDEFINED}, - {"ColorScheme", EVENT_COLORSCHEME}, - {"ColorSchemePre", EVENT_COLORSCHEMEPRE}, - {"CompleteChanged", EVENT_COMPLETECHANGED}, - {"CompleteDone", EVENT_COMPLETEDONE}, - {"CompleteDonePre", EVENT_COMPLETEDONEPRE}, - {"CursorHold", EVENT_CURSORHOLD}, - {"CursorHoldI", EVENT_CURSORHOLDI}, - {"CursorMoved", EVENT_CURSORMOVED}, - {"CursorMovedI", EVENT_CURSORMOVEDI}, - {"DiffUpdated", EVENT_DIFFUPDATED}, - {"DirChanged", EVENT_DIRCHANGED}, - {"DirChangedPre", EVENT_DIRCHANGEDPRE}, - {"EncodingChanged", EVENT_ENCODINGCHANGED}, - {"ExitPre", EVENT_EXITPRE}, - {"FileEncoding", EVENT_ENCODINGCHANGED}, - {"FileAppendPost", EVENT_FILEAPPENDPOST}, - {"FileAppendPre", EVENT_FILEAPPENDPRE}, - {"FileAppendCmd", EVENT_FILEAPPENDCMD}, - {"FileChangedShell",EVENT_FILECHANGEDSHELL}, - {"FileChangedShellPost",EVENT_FILECHANGEDSHELLPOST}, - {"FileChangedRO", EVENT_FILECHANGEDRO}, - {"FileReadPost", EVENT_FILEREADPOST}, - {"FileReadPre", EVENT_FILEREADPRE}, - {"FileReadCmd", EVENT_FILEREADCMD}, - {"FileType", EVENT_FILETYPE}, - {"FileWritePost", EVENT_FILEWRITEPOST}, - {"FileWritePre", EVENT_FILEWRITEPRE}, - {"FileWriteCmd", EVENT_FILEWRITECMD}, - {"FilterReadPost", EVENT_FILTERREADPOST}, - {"FilterReadPre", EVENT_FILTERREADPRE}, - {"FilterWritePost", EVENT_FILTERWRITEPOST}, - {"FilterWritePre", EVENT_FILTERWRITEPRE}, - {"FocusGained", EVENT_FOCUSGAINED}, - {"FocusLost", EVENT_FOCUSLOST}, - {"FuncUndefined", EVENT_FUNCUNDEFINED}, - {"GUIEnter", EVENT_GUIENTER}, - {"GUIFailed", EVENT_GUIFAILED}, - {"InsertChange", EVENT_INSERTCHANGE}, - {"InsertEnter", EVENT_INSERTENTER}, - {"InsertLeave", EVENT_INSERTLEAVE}, - {"InsertLeavePre", EVENT_INSERTLEAVEPRE}, - {"InsertCharPre", EVENT_INSERTCHARPRE}, - {"MenuPopup", EVENT_MENUPOPUP}, - {"ModeChanged", EVENT_MODECHANGED}, - {"OptionSet", EVENT_OPTIONSET}, - {"QuickFixCmdPost", EVENT_QUICKFIXCMDPOST}, - {"QuickFixCmdPre", EVENT_QUICKFIXCMDPRE}, - {"QuitPre", EVENT_QUITPRE}, - {"RemoteReply", EVENT_REMOTEREPLY}, - {"SafeState", EVENT_SAFESTATE}, - {"SafeStateAgain", EVENT_SAFESTATEAGAIN}, - {"SessionLoadPost", EVENT_SESSIONLOADPOST}, - {"ShellCmdPost", EVENT_SHELLCMDPOST}, - {"ShellFilterPost", EVENT_SHELLFILTERPOST}, - {"SigUSR1", EVENT_SIGUSR1}, - {"SourceCmd", EVENT_SOURCECMD}, - {"SourcePre", EVENT_SOURCEPRE}, - {"SourcePost", EVENT_SOURCEPOST}, - {"SpellFileMissing",EVENT_SPELLFILEMISSING}, - {"StdinReadPost", EVENT_STDINREADPOST}, - {"StdinReadPre", EVENT_STDINREADPRE}, - {"SwapExists", EVENT_SWAPEXISTS}, - {"Syntax", EVENT_SYNTAX}, - {"TabNew", EVENT_TABNEW}, - {"TabClosed", EVENT_TABCLOSED}, - {"TabEnter", EVENT_TABENTER}, - {"TabLeave", EVENT_TABLEAVE}, - {"TermChanged", EVENT_TERMCHANGED}, - {"TerminalOpen", EVENT_TERMINALOPEN}, - {"TerminalWinOpen", EVENT_TERMINALWINOPEN}, - {"TermResponse", EVENT_TERMRESPONSE}, - {"TermResponseAll", EVENT_TERMRESPONSEALL}, - {"TextChanged", EVENT_TEXTCHANGED}, - {"TextChangedI", EVENT_TEXTCHANGEDI}, - {"TextChangedP", EVENT_TEXTCHANGEDP}, - {"TextChangedT", EVENT_TEXTCHANGEDT}, - {"User", EVENT_USER}, - {"VimEnter", EVENT_VIMENTER}, - {"VimLeave", EVENT_VIMLEAVE}, - {"VimLeavePre", EVENT_VIMLEAVEPRE}, - {"WinNewPre", EVENT_WINNEWPRE}, - {"WinNew", EVENT_WINNEW}, - {"WinClosed", EVENT_WINCLOSED}, - {"WinEnter", EVENT_WINENTER}, - {"WinLeave", EVENT_WINLEAVE}, - {"WinResized", EVENT_WINRESIZED}, - {"WinScrolled", EVENT_WINSCROLLED}, - {"VimResized", EVENT_VIMRESIZED}, - {"TextYankPost", EVENT_TEXTYANKPOST}, - {"VimSuspend", EVENT_VIMSUSPEND}, - {"VimResume", EVENT_VIMRESUME}, - {NULL, (event_T)0} +// +// special cases: +// BufNewFile and BufRead are searched for ALOT (especially at startup) +// so we pre-determine their index into the event_tab[] table for fast access. +// Keep these values in sync with event_tab[]! +#define BUFNEWFILE_INDEX 9 +#define BUFREAD_INDEX 10 + +// must be sorted by the 'value' field because it is used by bsearch()! +static keyvalue_T event_tab[] = { + KEYVALUE_ENTRY(EVENT_BUFADD, "BufAdd"), + KEYVALUE_ENTRY(EVENT_BUFADD, "BufCreate"), + KEYVALUE_ENTRY(EVENT_BUFDELETE, "BufDelete"), + KEYVALUE_ENTRY(EVENT_BUFENTER, "BufEnter"), + KEYVALUE_ENTRY(EVENT_BUFFILEPOST, "BufFilePost"), + KEYVALUE_ENTRY(EVENT_BUFFILEPRE, "BufFilePre"), + KEYVALUE_ENTRY(EVENT_BUFHIDDEN, "BufHidden"), + KEYVALUE_ENTRY(EVENT_BUFLEAVE, "BufLeave"), + KEYVALUE_ENTRY(EVENT_BUFNEW, "BufNew"), + KEYVALUE_ENTRY(EVENT_BUFNEWFILE, "BufNewFile"), // BUFNEWFILE_INDEX + KEYVALUE_ENTRY(EVENT_BUFREADPOST, "BufRead"), // BUFREAD_INDEX + KEYVALUE_ENTRY(EVENT_BUFREADCMD, "BufReadCmd"), + KEYVALUE_ENTRY(EVENT_BUFREADPOST, "BufReadPost"), + KEYVALUE_ENTRY(EVENT_BUFREADPRE, "BufReadPre"), + KEYVALUE_ENTRY(EVENT_BUFUNLOAD, "BufUnload"), + KEYVALUE_ENTRY(EVENT_BUFWINENTER, "BufWinEnter"), + KEYVALUE_ENTRY(EVENT_BUFWINLEAVE, "BufWinLeave"), + KEYVALUE_ENTRY(EVENT_BUFWIPEOUT, "BufWipeout"), + KEYVALUE_ENTRY(EVENT_BUFWRITEPRE, "BufWrite"), + KEYVALUE_ENTRY(EVENT_BUFWRITECMD, "BufWriteCmd"), + KEYVALUE_ENTRY(EVENT_BUFWRITEPOST, "BufWritePost"), + KEYVALUE_ENTRY(EVENT_BUFWRITEPRE, "BufWritePre"), + KEYVALUE_ENTRY(EVENT_CMDLINECHANGED, "CmdlineChanged"), + KEYVALUE_ENTRY(EVENT_CMDLINEENTER, "CmdlineEnter"), + KEYVALUE_ENTRY(EVENT_CMDLINELEAVE, "CmdlineLeave"), + KEYVALUE_ENTRY(EVENT_CMDUNDEFINED, "CmdUndefined"), + KEYVALUE_ENTRY(EVENT_CMDWINENTER, "CmdwinEnter"), + KEYVALUE_ENTRY(EVENT_CMDWINLEAVE, "CmdwinLeave"), + KEYVALUE_ENTRY(EVENT_COLORSCHEME, "ColorScheme"), + KEYVALUE_ENTRY(EVENT_COLORSCHEMEPRE, "ColorSchemePre"), + KEYVALUE_ENTRY(EVENT_COMPLETECHANGED, "CompleteChanged"), + KEYVALUE_ENTRY(EVENT_COMPLETEDONE, "CompleteDone"), + KEYVALUE_ENTRY(EVENT_COMPLETEDONEPRE, "CompleteDonePre"), + KEYVALUE_ENTRY(EVENT_CURSORHOLD, "CursorHold"), + KEYVALUE_ENTRY(EVENT_CURSORHOLDI, "CursorHoldI"), + KEYVALUE_ENTRY(EVENT_CURSORMOVED, "CursorMoved"), + KEYVALUE_ENTRY(EVENT_CURSORMOVEDI, "CursorMovedI"), + KEYVALUE_ENTRY(EVENT_DIFFUPDATED, "DiffUpdated"), + KEYVALUE_ENTRY(EVENT_DIRCHANGED, "DirChanged"), + KEYVALUE_ENTRY(EVENT_DIRCHANGEDPRE, "DirChangedPre"), + KEYVALUE_ENTRY(EVENT_ENCODINGCHANGED, "EncodingChanged"), + KEYVALUE_ENTRY(EVENT_EXITPRE, "ExitPre"), + KEYVALUE_ENTRY(EVENT_FILEAPPENDCMD, "FileAppendCmd"), + KEYVALUE_ENTRY(EVENT_FILEAPPENDPOST, "FileAppendPost"), + KEYVALUE_ENTRY(EVENT_FILEAPPENDPRE, "FileAppendPre"), + KEYVALUE_ENTRY(EVENT_FILECHANGEDRO, "FileChangedRO"), + KEYVALUE_ENTRY(EVENT_FILECHANGEDSHELL, "FileChangedShell"), + KEYVALUE_ENTRY(EVENT_FILECHANGEDSHELLPOST, "FileChangedShellPost"), + KEYVALUE_ENTRY(EVENT_ENCODINGCHANGED, "FileEncoding"), + KEYVALUE_ENTRY(EVENT_FILEREADCMD, "FileReadCmd"), + KEYVALUE_ENTRY(EVENT_FILEREADPOST, "FileReadPost"), + KEYVALUE_ENTRY(EVENT_FILEREADPRE, "FileReadPre"), + KEYVALUE_ENTRY(EVENT_FILETYPE, "FileType"), + KEYVALUE_ENTRY(EVENT_FILEWRITECMD, "FileWriteCmd"), + KEYVALUE_ENTRY(EVENT_FILEWRITEPOST, "FileWritePost"), + KEYVALUE_ENTRY(EVENT_FILEWRITEPRE, "FileWritePre"), + KEYVALUE_ENTRY(EVENT_FILTERREADPOST, "FilterReadPost"), + KEYVALUE_ENTRY(EVENT_FILTERREADPRE, "FilterReadPre"), + KEYVALUE_ENTRY(EVENT_FILTERWRITEPOST, "FilterWritePost"), + KEYVALUE_ENTRY(EVENT_FILTERWRITEPRE, "FilterWritePre"), + KEYVALUE_ENTRY(EVENT_FOCUSGAINED, "FocusGained"), + KEYVALUE_ENTRY(EVENT_FOCUSLOST, "FocusLost"), + KEYVALUE_ENTRY(EVENT_FUNCUNDEFINED, "FuncUndefined"), + KEYVALUE_ENTRY(EVENT_GUIENTER, "GUIEnter"), + KEYVALUE_ENTRY(EVENT_GUIFAILED, "GUIFailed"), + KEYVALUE_ENTRY(EVENT_INSERTCHANGE, "InsertChange"), + KEYVALUE_ENTRY(EVENT_INSERTCHARPRE, "InsertCharPre"), + KEYVALUE_ENTRY(EVENT_INSERTENTER, "InsertEnter"), + KEYVALUE_ENTRY(EVENT_INSERTLEAVE, "InsertLeave"), + KEYVALUE_ENTRY(EVENT_INSERTLEAVEPRE, "InsertLeavePre"), + KEYVALUE_ENTRY(EVENT_MENUPOPUP, "MenuPopup"), + KEYVALUE_ENTRY(EVENT_MODECHANGED, "ModeChanged"), + KEYVALUE_ENTRY(EVENT_OPTIONSET, "OptionSet"), + KEYVALUE_ENTRY(EVENT_QUICKFIXCMDPOST, "QuickFixCmdPost"), + KEYVALUE_ENTRY(EVENT_QUICKFIXCMDPRE, "QuickFixCmdPre"), + KEYVALUE_ENTRY(EVENT_QUITPRE, "QuitPre"), + KEYVALUE_ENTRY(EVENT_REMOTEREPLY, "RemoteReply"), + KEYVALUE_ENTRY(EVENT_SAFESTATE, "SafeState"), + KEYVALUE_ENTRY(EVENT_SAFESTATEAGAIN, "SafeStateAgain"), + KEYVALUE_ENTRY(EVENT_SESSIONLOADPOST, "SessionLoadPost"), + KEYVALUE_ENTRY(EVENT_SESSIONWRITEPOST, "SessionWritePost"), + KEYVALUE_ENTRY(EVENT_SHELLCMDPOST, "ShellCmdPost"), + KEYVALUE_ENTRY(EVENT_SHELLFILTERPOST, "ShellFilterPost"), + KEYVALUE_ENTRY(EVENT_SIGUSR1, "SigUSR1"), + KEYVALUE_ENTRY(EVENT_SOURCECMD, "SourceCmd"), + KEYVALUE_ENTRY(EVENT_SOURCEPOST, "SourcePost"), + KEYVALUE_ENTRY(EVENT_SOURCEPRE, "SourcePre"), + KEYVALUE_ENTRY(EVENT_SPELLFILEMISSING, "SpellFileMissing"), + KEYVALUE_ENTRY(EVENT_STDINREADPOST, "StdinReadPost"), + KEYVALUE_ENTRY(EVENT_STDINREADPRE, "StdinReadPre"), + KEYVALUE_ENTRY(EVENT_SWAPEXISTS, "SwapExists"), + KEYVALUE_ENTRY(EVENT_SYNTAX, "Syntax"), + KEYVALUE_ENTRY(EVENT_TABCLOSED, "TabClosed"), + KEYVALUE_ENTRY(EVENT_TABENTER, "TabEnter"), + KEYVALUE_ENTRY(EVENT_TABLEAVE, "TabLeave"), + KEYVALUE_ENTRY(EVENT_TABNEW, "TabNew"), + KEYVALUE_ENTRY(EVENT_TERMCHANGED, "TermChanged"), + KEYVALUE_ENTRY(EVENT_TERMINALOPEN, "TerminalOpen"), + KEYVALUE_ENTRY(EVENT_TERMINALWINOPEN, "TerminalWinOpen"), + KEYVALUE_ENTRY(EVENT_TERMRESPONSE, "TermResponse"), + KEYVALUE_ENTRY(EVENT_TERMRESPONSEALL, "TermResponseAll"), + KEYVALUE_ENTRY(EVENT_TEXTCHANGED, "TextChanged"), + KEYVALUE_ENTRY(EVENT_TEXTCHANGEDI, "TextChangedI"), + KEYVALUE_ENTRY(EVENT_TEXTCHANGEDP, "TextChangedP"), + KEYVALUE_ENTRY(EVENT_TEXTCHANGEDT, "TextChangedT"), + KEYVALUE_ENTRY(EVENT_TEXTYANKPOST, "TextYankPost"), + KEYVALUE_ENTRY(EVENT_USER, "User"), + KEYVALUE_ENTRY(EVENT_VIMENTER, "VimEnter"), + KEYVALUE_ENTRY(EVENT_VIMLEAVE, "VimLeave"), + KEYVALUE_ENTRY(EVENT_VIMLEAVEPRE, "VimLeavePre"), + KEYVALUE_ENTRY(EVENT_VIMRESIZED, "VimResized"), + KEYVALUE_ENTRY(EVENT_VIMRESUME, "VimResume"), + KEYVALUE_ENTRY(EVENT_VIMSUSPEND, "VimSuspend"), + KEYVALUE_ENTRY(EVENT_WINCLOSED, "WinClosed"), + KEYVALUE_ENTRY(EVENT_WINENTER, "WinEnter"), + KEYVALUE_ENTRY(EVENT_WINLEAVE, "WinLeave"), + KEYVALUE_ENTRY(EVENT_WINNEW, "WinNew"), + KEYVALUE_ENTRY(EVENT_WINNEWPRE, "WinNewPre"), + KEYVALUE_ENTRY(EVENT_WINRESIZED, "WinResized"), + KEYVALUE_ENTRY(EVENT_WINSCROLLED, "WinScrolled") }; -static AutoPat *first_autopat[NUM_EVENTS] = -{ +static AutoPat *first_autopat[NUM_EVENTS] = { + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL }; -static AutoPat *last_autopat[NUM_EVENTS] = -{ +static AutoPat *last_autopat[NUM_EVENTS] = { + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL }; #define AUGROUP_DEFAULT (-1) // default autocmd group @@ -265,6 +279,7 @@ static int current_augroup = AUGROUP_DEFAULT; static int au_need_clean = FALSE; // need to delete marked patterns +static event_T event_name2nr(char_u *start, char_u **end); static char_u *event_nr2name(event_T event); static int au_get_grouparg(char_u **argp); static int do_autocmd_event(event_T event, char_u *pat, int once, int nested, char_u *cmd, int forceit, int group, int flags); @@ -680,24 +695,35 @@ is_aucmd_win(win_T *win) event_name2nr(char_u *start, char_u **end) { char_u *p; - int i; - int len; + keyvalue_T target; + keyvalue_T *entry; + static keyvalue_T *bufnewfile = &event_tab[BUFNEWFILE_INDEX]; + static keyvalue_T *bufread = &event_tab[BUFREAD_INDEX]; // the event name ends with end of line, '|', a blank or a comma for (p = start; *p && !VIM_ISWHITE(*p) && *p != ',' && *p != '|'; ++p) ; - for (i = 0; event_names[i].name != NULL; ++i) - { - len = (int)STRLEN(event_names[i].name); - if (len == p - start && STRNICMP(event_names[i].name, start, len) == 0) - break; - } + + target.key = 0; + target.value = (char *)start; + target.length = (size_t)(p - start); + + // special cases: + // BufNewFile and BufRead are searched for ALOT (especially at startup) + // so we check for them first. + if (cmp_keyvalue_value_ni(&target, bufnewfile) == 0) + entry = bufnewfile; + else + if (cmp_keyvalue_value_ni(&target, bufread) == 0) + entry = bufread; + else + entry = (keyvalue_T *)bsearch(&target, &event_tab, ARRAY_LENGTH(event_tab), sizeof(event_tab[0]), cmp_keyvalue_value_ni); + if (*p == ',') ++p; *end = p; - if (event_names[i].name == NULL) - return NUM_EVENTS; - return event_names[i].event; + + return (entry == NULL) ? NUM_EVENTS : (event_T)entry->key; } /* @@ -707,11 +733,52 @@ event_name2nr(char_u *start, char_u **end) event_nr2name(event_T event) { int i; +#define CACHE_SIZE 12 + static int cache_tab[CACHE_SIZE]; + static int cache_last_index = -1; + + if (cache_last_index < 0) + { + for (i = 0; i < (int)ARRAY_LENGTH(cache_tab); ++i) + cache_tab[i] = -1; + cache_last_index = ARRAY_LENGTH(cache_tab) - 1; + } - for (i = 0; event_names[i].name != NULL; ++i) - if (event_names[i].event == event) - return (char_u *)event_names[i].name; - return (char_u *)"Unknown"; + // first look in the cache + // the cache is circular. to search it we start at the most recent entry + // and go backwards wrapping around when we get to index 0. + for (i = cache_last_index; cache_tab[i] >= 0; ) + { + if ((event_T)event_tab[cache_tab[i]].key == event) + return (char_u *)event_tab[cache_tab[i]].value; + + if (i == 0) + i = ARRAY_LENGTH(cache_tab) - 1; + else + --i; + + // are we back at the start? + if (i == cache_last_index) + break; + } + + // look in the event table itself + for (i = 0; i < (int)ARRAY_LENGTH(event_tab); ++i) + { + if ((event_T)event_tab[i].key == event) + { + // store the found entry in the next position in the cache, + // wrapping around when we get to the maximum index. + if (cache_last_index == ARRAY_LENGTH(cache_tab) - 1) + cache_last_index = 0; + else + ++cache_last_index; + cache_tab[cache_last_index] = i; + break; + } + } + + return (i == (int)ARRAY_LENGTH(event_tab)) ? (char_u *)"Unknown" : (char_u *)event_tab[i].value; } /* @@ -805,12 +872,14 @@ au_event_disable(char *what) { char_u *new_ei; char_u *save_ei; + size_t p_ei_len; - save_ei = vim_strsave(p_ei); + p_ei_len = STRLEN(p_ei); + save_ei = vim_strnsave(p_ei, p_ei_len); if (save_ei == NULL) return NULL; - new_ei = vim_strnsave(p_ei, STRLEN(p_ei) + STRLEN(what)); + new_ei = vim_strnsave(p_ei, p_ei_len + STRLEN(what)); if (new_ei == NULL) { vim_free(save_ei); @@ -1591,6 +1660,11 @@ aucmd_prepbuf( win_init_popup_win(auc_win, buf); + // Make sure tp_localdir and globaldir are NULL to avoid a + // chdir() in win_enter_ext(). + // win_init_popup_win() has already set w_localdir to NULL. + aco->tp_localdir = curtab->tp_localdir; + curtab->tp_localdir = NULL; aco->globaldir = globaldir; globaldir = NULL; @@ -1704,6 +1778,12 @@ win_found: vars_clear(&awp->w_vars->dv_hashtab); // free all w: variables hash_init(&awp->w_vars->dv_hashtab); // re-use the hashtab #endif + // If :lcd has been used in the autocommand window, correct current + // directory before restoring tp_localdir and globaldir. + if (awp->w_localdir != NULL) + win_fix_current_dir(); + vim_free(curtab->tp_localdir); + curtab->tp_localdir = aco->tp_localdir; vim_free(globaldir); globaldir = aco->globaldir; @@ -2257,7 +2337,7 @@ apply_autocmds_group( saveRedobuff(&save_redo); did_save_redobuff = TRUE; } - did_filetype = keep_filetype; + curbuf->b_did_filetype = curbuf->b_keep_filetype; } /* @@ -2269,7 +2349,7 @@ apply_autocmds_group( // Remember that FileType was triggered. Used for did_filetype(). if (event == EVENT_FILETYPE) - did_filetype = TRUE; + curbuf->b_did_filetype = TRUE; tail = gettail(fname); @@ -2378,7 +2458,7 @@ apply_autocmds_group( restore_search_patterns(); if (did_save_redobuff) restoreRedobuff(&save_redo); - did_filetype = FALSE; + curbuf->b_did_filetype = FALSE; while (au_pending_free_buf != NULL) { buf_T *b = au_pending_free_buf->b_next; @@ -2420,7 +2500,7 @@ BYPASS_AU: aubuflocal_remove(buf); if (retval == OK && event == EVENT_FILETYPE) - au_did_filetype = TRUE; + curbuf->b_au_did_filetype = TRUE; return retval; } @@ -2773,6 +2853,8 @@ set_context_in_autocmd( char_u * get_event_name(expand_T *xp UNUSED, int idx) { + int i; + if (idx < augroups.ga_len) // First list group names, if wanted { if (!include_groups || AUGROUP_NAME(idx) == NULL @@ -2780,7 +2862,12 @@ get_event_name(expand_T *xp UNUSED, int idx) return (char_u *)""; // skip deleted entries return AUGROUP_NAME(idx); // return a name } - return (char_u *)event_names[idx - augroups.ga_len].name; + + i = idx - augroups.ga_len; + if (i < 0 || i >= (int)ARRAY_LENGTH(event_tab)) + return NULL; + + return (char_u *)event_tab[i].value; } /* @@ -2790,7 +2877,10 @@ get_event_name(expand_T *xp UNUSED, int idx) char_u * get_event_name_no_group(expand_T *xp UNUSED, int idx) { - return (char_u *)event_names[idx].name; + if (idx < 0 || idx >= (int)ARRAY_LENGTH(event_tab)) + return NULL; + + return (char_u *)event_tab[idx].value; } @@ -3250,8 +3340,6 @@ f_autocmd_get(typval_T *argvars, typval_T *rettv) // return only the autocmds for the specified event if (dict_has_key(argvars[0].vval.v_dict, "event")) { - int i; - name = dict_get_string(argvars[0].vval.v_dict, "event", TRUE); if (name == NULL) return; @@ -3260,16 +3348,20 @@ f_autocmd_get(typval_T *argvars, typval_T *rettv) event_arg = NUM_EVENTS; else { - for (i = 0; event_names[i].name != NULL; i++) - if (STRICMP(event_names[i].name, name) == 0) - break; - if (event_names[i].name == NULL) + keyvalue_T target; + keyvalue_T *entry; + + target.key = 0; + target.value = (char *)name; + target.length = (int)STRLEN(target.value); + entry = (keyvalue_T *)bsearch(&target, &event_tab, ARRAY_LENGTH(event_tab), sizeof(event_tab[0]), cmp_keyvalue_value_ni); + if (entry == NULL) { semsg(_(e_no_such_event_str), name); vim_free(name); return; } - event_arg = event_names[i].event; + event_arg = (event_T)entry->key; } vim_free(name); } @@ -3314,7 +3406,10 @@ f_autocmd_get(typval_T *argvars, typval_T *rettv) event_dict = dict_alloc(); if (event_dict == NULL || list_append_dict(event_list, event_dict) == FAIL) + { + vim_free(pat); return; + } if (dict_add_string(event_dict, "event", event_name) == FAIL || dict_add_string(event_dict, "group", @@ -3329,7 +3424,10 @@ f_autocmd_get(typval_T *argvars, typval_T *rettv) || dict_add_bool(event_dict, "once", ac->once) == FAIL || dict_add_bool(event_dict, "nested", ac->nested) == FAIL) + { + vim_free(pat); return; + } } } } diff --git a/src/buffer.c b/src/buffer.c index 243593a..58e9718 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -225,7 +225,7 @@ open_buffer( // The autocommands in readfile() may change the buffer, but only AFTER // reading the file. set_bufref(&old_curbuf, curbuf); - modified_was_set = FALSE; + curbuf->b_modified_was_set = FALSE; // mark cursor position as being invalid curwin->w_valid = 0; @@ -322,7 +322,7 @@ open_buffer( // the changed flag. Unless in readonly mode: "ls | gview -". // When interrupted and 'cpoptions' contains 'i' set changed flag. if ((got_int && vim_strchr(p_cpo, CPO_INTMOD) != NULL) - || modified_was_set // ":set modified" used in autocmd + || curbuf->b_modified_was_set // autocmd did ":set modified" #ifdef FEAT_EVAL || (aborting() && vim_strchr(p_cpo, CPO_INTMOD) != NULL) #endif @@ -1944,7 +1944,7 @@ enter_buffer(buf_T *buf) // ":ball" used in an autocommand. If there already is a filetype we // might prefer to keep it. if (*curbuf->b_p_ft == NUL) - did_filetype = FALSE; + curbuf->b_did_filetype = FALSE; open_buffer(FALSE, NULL, 0); } diff --git a/src/change.c b/src/change.c index daf4fae..dacc06f 100644 --- a/src/change.c +++ b/src/change.c @@ -574,8 +574,7 @@ changed_common( && wp->w_topline < lnume && win_linetabsize(wp, wp->w_topline, ml_get(wp->w_topline), (colnr_T)MAXCOL) - <= wp->w_skipcol + sms_marker_overlap(wp, - win_col_off(wp) - win_col_off2(wp))))) + <= wp->w_skipcol + sms_marker_overlap(wp, -1)))) wp->w_skipcol = 0; // Check if a change in the buffer has invalidated the cached diff --git a/src/charset.c b/src/charset.c index 5ae90da..470698f 100644 --- a/src/charset.c +++ b/src/charset.c @@ -798,6 +798,45 @@ linetabsize(win_T *wp, linenr_T lnum) ml_get_buf(wp->w_buffer, lnum, FALSE), (colnr_T)MAXCOL); } +/* + * Like linetabsize(), but excludes 'above'/'after'/'right'/'below' aligned + * virtual text, while keeping inline virtual text. + */ + int +linetabsize_no_outer(win_T *wp, linenr_T lnum) +{ +#ifndef FEAT_PROP_POPUP + return linetabsize(wp, lnum); +#else + chartabsize_T cts; + char_u *line = ml_get_buf(wp->w_buffer, lnum, FALSE); + + init_chartabsize_arg(&cts, wp, lnum, 0, line, line); + + if (cts.cts_text_prop_count) + { + int write_idx = 0; + for (int read_idx = 0; read_idx < cts.cts_text_prop_count; read_idx++) + { + textprop_T *tp = &cts.cts_text_props[read_idx]; + if (tp->tp_col != MAXCOL) + { + if (read_idx != write_idx) + cts.cts_text_props[write_idx] = *tp; + write_idx++; + } + } + cts.cts_text_prop_count = write_idx; + if (cts.cts_text_prop_count == 0) + VIM_CLEAR(cts.cts_text_props); + } + + win_linetabsize_cts(&cts, (colnr_T)MAXCOL); + clear_chartabsize_arg(&cts); + return (int)cts.cts_vcol; +#endif +} + void win_linetabsize_cts(chartabsize_T *cts, colnr_T len) { @@ -1318,7 +1357,7 @@ win_lbr_chartabsize( cts->cts_bri_size = get_breakindent_win(wp, line); head_mid += cts->cts_bri_size; } - if (head_mid > 0 && wcol + size > wp->w_width) + if (head_mid > 0) { // Calculate effective window width. int prev_rem = wp->w_width - wcol; diff --git a/src/clientserver.c b/src/clientserver.c index 340add3..b19cd44 100644 --- a/src/clientserver.c +++ b/src/clientserver.c @@ -608,7 +608,7 @@ build_drop_cmd( // Call inputsave() so that a prompt for an encryption key works. ga_concat(&ga, (char_u *) - ":if exists('*inputsave')|call inputsave()|endif|"); + ":if exists('*inputsave')|call inputsave()|endif|"); if (tabs) ga_concat(&ga, (char_u *)"tab "); ga_concat(&ga, (char_u *)"drop"); @@ -652,7 +652,13 @@ build_drop_cmd( // endif // endif ga_concat(&ga, (char_u *)":if !exists('+acd')||!&acd|if haslocaldir()|"); +#ifdef MSWIN + // in case :set shellslash is set, need to normalize the directory separators + // '/' is not valid in a filename so replacing '/' by '\\' should be safe + ga_concat(&ga, (char_u *)"cd -|lcd -|elseif getcwd()->tr('/','\\') ==# '"); +#else ga_concat(&ga, (char_u *)"cd -|lcd -|elseif getcwd() ==# '"); +#endif ga_concat(&ga, cdp); ga_concat(&ga, (char_u *)"'|cd -|endif|endif"); vim_free(cdp); diff --git a/src/configure.ac b/src/configure.ac index 6311269..f6e54b3 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -4523,13 +4523,13 @@ if test "$enable_nls" = "yes"; then AC_MSG_RESULT([no]) fi AC_SUBST(MSGFMT_DESKTOP) - AC_MSG_CHECKING([if msgfmt supports --no-convert]) + 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" + MSGFMTCMD="OLD_PO_FILE_INPUT=yes $MSGFMT --no-convert -v" else AC_MSG_RESULT([no]) - MSGFMTCMD="OLD_PO_FILE_INPUT=yes msgfmt -v" + MSGFMTCMD="OLD_PO_FILE_INPUT=yes $MSGFMT -v" fi AC_SUBST(MSGFMTCMD) fi diff --git a/src/dict.c b/src/dict.c index 508d00c..c78995d 100644 --- a/src/dict.c +++ b/src/dict.c @@ -1300,12 +1300,18 @@ dict_extend_func( action = tv_get_string_chk(&argvars[2]); if (action == NULL) + { + if (is_new) + dict_unref(d1); return; + } for (i = 0; i < 3; ++i) if (STRCMP(action, av[i]) == 0) break; if (i == 3) { + if (is_new) + dict_unref(d1); semsg(_(e_invalid_argument_str), action); return; } diff --git a/src/dosinst.c b/src/dosinst.c index 35625a7..116cc8f 100644 --- a/src/dosinst.c +++ b/src/dosinst.c @@ -1663,7 +1663,7 @@ install_registry(void) uninstall_string, icon_string, version_string, - "Bram Moolenaar et al."); + "The Vim Project"); if (ERROR_SUCCESS != lRet) return FAIL; diff --git a/src/drawline.c b/src/drawline.c index a8de449..81577be 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -2072,26 +2072,34 @@ win_line( // not on the next char yet, don't start another prop --bcol; # endif - int display_text_first = FALSE; - // Add any text property that starts in this column. - // With 'nowrap' and not in the first screen line only "below" - // text prop can show. - while (text_prop_next < text_prop_count - && (text_props[text_prop_next].tp_col == MAXCOL - ? ((*ptr == NUL - && (wp->w_p_wrap - || wlv.row == startrow - || (text_props[text_prop_next].tp_flags - & TP_FLAG_ALIGN_BELOW))) - || (bcol == 0 - && (text_props[text_prop_next].tp_flags - & TP_FLAG_ALIGN_ABOVE))) - : bcol >= text_props[text_prop_next].tp_col - 1)) + while (text_prop_next < text_prop_count) { - if (text_props[text_prop_next].tp_col == MAXCOL - || bcol <= text_props[text_prop_next].tp_col - 1 - + text_props[text_prop_next].tp_len) + int active; + textprop_T *tp = &text_props[text_prop_next]; + if (tp->tp_col == MAXCOL) + { + if (bcol == 0 && (tp->tp_flags & TP_FLAG_ALIGN_ABOVE)) + active = TRUE; + else if (*ptr != NUL) + break; + else + { + // With 'nowrap' and not in the first screen line only "below" + // text prop can show. + active = wp->w_p_wrap + || wlv.row == startrow + || (tp->tp_flags & TP_FLAG_ALIGN_BELOW); + } + } + else + { + if (bcol < tp->tp_col - 1) + break; + active = bcol <= tp->tp_col - 1 + tp->tp_len; + } + + if (active) text_prop_idxs[text_props_active++] = text_prop_next; ++text_prop_next; } @@ -2109,8 +2117,7 @@ win_line( text_prop_id = 0; reset_extra_attr = FALSE; } - if (text_props_active > 0 && wlv.n_extra == 0 - && !display_text_first) + if (text_props_active > 0 && wlv.n_extra == 0) { int used_tpi = -1; int used_attr = 0; @@ -2157,8 +2164,6 @@ win_line( // skip this prop, first display the '$' after // the line or display an empty line text_prop_follows = TRUE; - if (used_tpi < 0) - display_text_first = TRUE; continue; } @@ -2172,7 +2177,6 @@ win_line( text_prop_flags = pt->pt_flags; text_prop_id = tp->tp_id; used_tpi = tpi; - display_text_first = FALSE; } } if (text_prop_id < 0 && used_tpi >= 0 @@ -2327,17 +2331,29 @@ win_line( } } else if (text_prop_next < text_prop_count - && text_props[text_prop_next].tp_col == MAXCOL && ((*ptr != NUL && ptr[mb_ptr2len(ptr)] == NUL) - || (!wp->w_p_wrap - && wlv.col == wp->w_width - 1 - && (text_props[text_prop_next].tp_flags - & TP_FLAG_ALIGN_BELOW)))) + || (!wp->w_p_wrap && wlv.col == wp->w_width - 1))) + { // When at last-but-one character and a text property // follows after it, we may need to flush the line after // displaying that character. // Or when not wrapping and at the rightmost column. - text_prop_follows = TRUE; + + int only_below_follows = !wp->w_p_wrap && wlv.col == wp->w_width - 1; + // TODO: Store "after"/"right"/"below" text properties in order + // in the buffer so only `text_props[text_prop_count - 1]` + // needs to be checked for following "below" virtual text + for (int i = text_prop_next; i < text_prop_count; ++i) + { + if (text_props[i].tp_col == MAXCOL + && (!only_below_follows + || (text_props[i].tp_flags & TP_FLAG_ALIGN_BELOW))) + { + text_prop_follows = TRUE; + break; + } + } + } } if (wlv.start_extra_for_textprop) diff --git a/src/edit.c b/src/edit.c index 69ec255..075b39b 100644 --- a/src/edit.c +++ b/src/edit.c @@ -845,9 +845,10 @@ doESCkey: did_cursorhold = FALSE; // ins_redraw() triggers TextChangedI only when no characters - // are in the typeahead buffer, so only reset curbuf->b_last_changedtick + // are in the typeahead buffer, so reset curbuf->b_last_changedtick only // if the TextChangedI was not blocked by char_avail() (e.g. using :norm!) - if (!char_avail()) + // and the TextChangedI autocommand has been triggered. + if (!char_avail() && curbuf->b_last_changedtick_i == CHANGEDTICK(curbuf)) curbuf->b_last_changedtick = CHANGEDTICK(curbuf); return (c == Ctrl_O); } @@ -3958,10 +3959,9 @@ ins_del(void) * Delete one character for ins_bs(). */ static void -ins_bs_one(colnr_T *vcolp) +ins_bs_one(void) { dec_cursor(); - getvcol(curwin, &curwin->w_cursor, vcolp, NULL, NULL); if (State & REPLACE_FLAG) { // Don't delete characters before the insert point when in @@ -4211,44 +4211,69 @@ ins_bs( && (!*inserted_space_p || arrow_used)))))) { - int ts; - colnr_T vcol; + colnr_T vcol = 0; colnr_T want_vcol; - colnr_T start_vcol; + char_u *line; + char_u *ptr; + char_u *cursor_ptr; + char_u *space_ptr; + colnr_T space_vcol = 0; + int prev_space = FALSE; + colnr_T want_col; *inserted_space_p = FALSE; - // Compute the virtual column where we want to be. Since - // 'showbreak' may get in the way, need to get the last column of - // the previous character. - getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); - start_vcol = vcol; - dec_cursor(); - getvcol(curwin, &curwin->w_cursor, NULL, NULL, &want_vcol); - inc_cursor(); -#ifdef FEAT_VARTABS - if (p_sta && in_indent) + + space_ptr = ptr = line = ml_get_curline(); + cursor_ptr = line + curwin->w_cursor.col; + + // Compute virtual column of cursor position, and find the last + // whitespace before cursor that is preceded by non-whitespace. + // Use chartabsize() so that virtual text and wrapping are ignored. + while (ptr < cursor_ptr) { - ts = (int)get_sw_value(curbuf); - want_vcol = (want_vcol / ts) * ts; + int cur_space = VIM_ISWHITE(*ptr); + + if (!prev_space && cur_space) + { + space_ptr = ptr; + space_vcol = vcol; + } + vcol += chartabsize(ptr, vcol); + MB_PTR_ADV(ptr); + prev_space = cur_space; } + + // Compute the virtual column where we want to be. + want_vcol = vcol > 0 ? vcol - 1 : 0; + if (p_sta && in_indent) + want_vcol -= want_vcol % (int)get_sw_value(curbuf); else +#ifdef FEAT_VARTABS want_vcol = tabstop_start(want_vcol, get_sts_value(), curbuf->b_p_vsts_array); #else - if (p_sta && in_indent) - ts = (int)get_sw_value(curbuf); - else - ts = (int)get_sts_value(); - want_vcol = (want_vcol / ts) * ts; + want_vcol -= want_vcol % (int)get_sts_value(); #endif - // delete characters until we are at or before want_vcol - while (vcol > want_vcol && curwin->w_cursor.col > 0 - && (cc = *(ml_get_cursor() - 1), VIM_ISWHITE(cc))) - ins_bs_one(&vcol); + // Find the position to stop backspacing. + // Use chartabsize() so that virtual text and wrapping are ignored. + while (TRUE) + { + int size = chartabsize(space_ptr, space_vcol); - // insert extra spaces until we are at want_vcol - while (vcol < want_vcol) + if (space_vcol + size > want_vcol) + break; + space_vcol += size; + MB_PTR_ADV(space_ptr); + } + want_col = space_ptr - line; + + // Delete characters until we are at or before want_col. + while (curwin->w_cursor.col > want_col) + ins_bs_one(); + + // Insert extra spaces until we are at want_vcol. + for (; space_vcol < want_vcol; space_vcol++) { // Remember the first char we inserted if (curwin->w_cursor.lnum == Insstart_orig.lnum @@ -4263,13 +4288,7 @@ ins_bs( if ((State & REPLACE_FLAG)) replace_push(NUL); } - getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); } - - // If we are now back where we started delete one character. Can - // happen when using 'sts' and 'linebreak'. - if (vcol >= start_vcol) - ins_bs_one(&vcol); } /* @@ -4783,7 +4802,7 @@ ins_pageup(void) } tpos = curwin->w_cursor; - if (onepage(BACKWARD, 1L) == OK) + if (pagescroll(BACKWARD, 1L, FALSE) == OK) { start_arrow(&tpos); can_cindent = TRUE; @@ -4840,7 +4859,7 @@ ins_pagedown(void) } tpos = curwin->w_cursor; - if (onepage(FORWARD, 1L) == OK) + if (pagescroll(FORWARD, 1L, FALSE) == OK) { start_arrow(&tpos); can_cindent = TRUE; diff --git a/src/errors.h b/src/errors.h index 5dccc63..4387a29 100644 --- a/src/errors.h +++ b/src/errors.h @@ -2268,7 +2268,7 @@ EXTERN char e_nfa_regexp_while_converting_from_postfix_to_nfa_too_many_stats_lef EXTERN char e_nfa_regexp_not_enough_space_to_store_whole_nfa[] INIT(= N_("E876: (NFA regexp) Not enough space to store the whole NFA")); EXTERN char e_nfa_regexp_invalid_character_class_nr[] - INIT(= "E877: (NFA regexp) Invalid character class: %d"); + INIT(= N_("E877: (NFA regexp) Invalid character class: %d")); EXTERN char e_nfa_regexp_could_not_allocate_memory_for_branch_traversal[] INIT(= N_("E878: (NFA regexp) Could not allocate memory for branch traversal!")); #ifdef FEAT_SYN_HL @@ -3412,9 +3412,9 @@ EXTERN char e_invalid_class_variable_declaration_str[] EXTERN char e_invalid_type_for_object_variable_str[] INIT(= N_("E1330: Invalid type for object variable: %s")); EXTERN char e_public_must_be_followed_by_var_static_final_or_const[] - INIT(= N_("E1331: Public must be followed by \"var\" or \"static\" or \"final\" or \"const\"")); + INIT(= N_("E1331: public must be followed by \"var\" or \"static\" or \"final\" or \"const\"")); EXTERN char e_public_variable_name_cannot_start_with_underscore_str[] - INIT(= N_("E1332: Public variable name cannot start with underscore: %s")); + INIT(= N_("E1332: public variable name cannot start with underscore: %s")); EXTERN char e_cannot_access_protected_variable_str[] INIT(= N_("E1333: Cannot access protected variable \"%s\" in class \"%s\"")); // E1334 unused @@ -3532,9 +3532,9 @@ EXTERN char e_class_method_str_accessible_only_using_class_str[] EXTERN char e_object_method_str_accessible_only_using_object_str[] INIT(= N_("E1386: Object method \"%s\" accessible only using class \"%s\" object")); EXTERN char e_public_variable_not_supported_in_interface[] - INIT(= N_("E1387: Public variable not supported in an interface")); + INIT(= N_("E1387: public variable not supported in an interface")); EXTERN char e_public_keyword_not_supported_for_method[] - INIT(= N_("E1388: Public keyword not supported for a method")); + INIT(= N_("E1388: public keyword not supported for a method")); EXTERN char e_missing_name_after_implements[] INIT(= N_("E1389: Missing name after implements")); EXTERN char e_cannot_use_an_object_variable_except_with_the_new_method_str[] @@ -3585,8 +3585,40 @@ 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 -// E1415 - E1499 unused (reserved for Vim9 class support) +EXTERN char e_enum_can_only_be_defined_in_vim9_script[] + INIT(= N_("E1414: Enum can only be defined in Vim9 script")); +EXTERN char e_enum_name_must_start_with_uppercase_letter_str[] + INIT(= N_("E1415: Enum name must start with an uppercase letter: %s")); +EXTERN char e_enum_cannot_extend_class[] + INIT(= N_("E1416: Enum cannot extend a class or enum")); +EXTERN char e_abstract_cannot_be_used_in_enum[] + INIT(= N_("E1417: Abstract cannot be used in an Enum")); +EXTERN char e_invalid_enum_value_declaration_str[] + INIT(= N_("E1418: Invalid enum value declaration: %s")); +EXTERN char e_not_valid_command_in_enum_str[] + INIT(= N_("E1419: Not a valid command in an Enum: %s")); +EXTERN char e_missing_endenum[] + INIT(= N_("E1420: Missing :endenum")); +EXTERN char e_using_enum_as_value_str[] + INIT(= N_("E1421: Enum \"%s\" cannot be used as a value")); +EXTERN char e_enum_value_str_not_found_in_enum_str[] + INIT(= N_("E1422: Enum value \"%s\" not found in enum \"%s\"")); +EXTERN char e_enumvalue_str_cannot_be_modified[] + INIT(= N_("E1423: Enum value \"%s.%s\" cannot be modified")); +EXTERN char e_using_enum_str_as_number[] + INIT(= N_("E1424: Using an Enum \"%s\" as a Number")); +EXTERN char e_using_enum_str_as_string[] + INIT(= N_("E1425: Using an Enum \"%s\" as a String")); +EXTERN char e_enum_str_ordinal_cannot_be_modified[] + INIT(= N_("E1426: Enum \"%s\" ordinal value cannot be modified")); +EXTERN char e_enum_str_name_cannot_be_modified[] + INIT(= N_("E1427: Enum \"%s\" name cannot be modified")); +EXTERN char e_duplicate_enum_str[] + INIT(= N_("E1428: Duplicate enum value: %s")); +EXTERN char e_class_can_only_be_used_in_script[] + INIT(= N_("E1429: Class can only be used in a script")); +#endif +// E1429 - 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[] diff --git a/src/eval.c b/src/eval.c index 69b8374..51ee604 100644 --- a/src/eval.c +++ b/src/eval.c @@ -549,6 +549,7 @@ skip_expr_concatenate( ((char_u **)gap->ga_data)[gap->ga_len - 1]; ((char_u **)gap->ga_data)[gap->ga_len - 1] = NULL; ga_clear_strings(gap); + ga_clear(freegap); } else { @@ -574,16 +575,16 @@ skip_expr_concatenate( /* * Convert "tv" to a string. - * When "convert" is TRUE convert a List into a sequence of lines. + * When "join_list" is TRUE convert a List into a sequence of lines. * Returns an allocated string (NULL when out of memory). */ char_u * -typval2string(typval_T *tv, int convert) +typval2string(typval_T *tv, int join_list) { garray_T ga; char_u *retval; - if (convert && tv->v_type == VAR_LIST) + if (join_list && tv->v_type == VAR_LIST) { ga_init2(&ga, sizeof(char), 80); if (tv->vval.v_list != NULL) @@ -595,6 +596,16 @@ typval2string(typval_T *tv, int convert) ga_append(&ga, NUL); retval = (char_u *)ga.ga_data; } + else if (tv->v_type == VAR_LIST || tv->v_type == VAR_DICT) + { + char_u *tofree; + char_u numbuf[NUMBUFLEN]; + + retval = tv2string(tv, &tofree, numbuf, 0); + // Make a copy if we have a value but it's not in allocated memory. + if (retval != NULL && tofree == NULL) + retval = vim_strsave(retval); + } else retval = vim_strsave(tv_get_string(tv)); return retval; @@ -603,13 +614,13 @@ typval2string(typval_T *tv, int convert) /* * Top level evaluation function, returning a string. Does not handle line * breaks. - * When "convert" is TRUE convert a List into a sequence of lines. + * When "join_list" is TRUE convert a List into a sequence of lines. * Return pointer to allocated memory, or NULL for failure. */ char_u * eval_to_string_eap( char_u *arg, - int convert, + int join_list, exarg_T *eap, int use_simple_function) { @@ -627,7 +638,7 @@ eval_to_string_eap( retval = NULL; else { - retval = typval2string(&tv, convert); + retval = typval2string(&tv, join_list); clear_tv(&tv); } clear_evalarg(&evalarg, NULL); @@ -638,10 +649,10 @@ eval_to_string_eap( char_u * eval_to_string( char_u *arg, - int convert, + int join_list, int use_simple_function) { - return eval_to_string_eap(arg, convert, NULL, use_simple_function); + return eval_to_string_eap(arg, join_list, NULL, use_simple_function); } /* @@ -1119,7 +1130,18 @@ get_lval_check_access( if (*p == '[' || *p == '.') break; if ((flags & GLV_READ_ONLY) == 0) - msg = e_variable_is_not_writable_str; + { + if (IS_ENUM(cl)) + { + if (om->ocm_type->tt_type == VAR_OBJECT) + semsg(_(e_enumvalue_str_cannot_be_modified), + cl->class_name, om->ocm_name); + else + msg = e_variable_is_not_writable_str; + } + else + msg = e_variable_is_not_writable_str; + } break; case VIM_ACCESS_ALL: break; @@ -1134,6 +1156,91 @@ get_lval_check_access( return OK; } +/* + * Get lval information for a variable imported from script "imp_sid". On + * success, updates "lp" with the variable name, type, script ID and typval. + * The variable name starts at or after "p". + * If "rettv" is not NULL it points to the value to be assigned. This used to + * match the rhs and lhs types. + * Returns a pointer to the character after the variable name if the imported + * variable is valid and writable. + * Returns NULL if the variable is not exported or typval is not found or the + * rhs type doesn't match the lhs type or the variable is not writable. + */ + static char_u * +get_lval_imported( + lval_T *lp, + typval_T *rettv, + scid_T imp_sid, + char_u *p, + dictitem_T **dip, + int fne_flags, + int vim9script) +{ + ufunc_T *ufunc; + type_T *type = NULL; + int cc; + int rc = FAIL; + + p = skipwhite(p); + + import_check_sourced_sid(&imp_sid); + lp->ll_sid = imp_sid; + lp->ll_name = p; + p = find_name_end(lp->ll_name, NULL, NULL, fne_flags); + lp->ll_name_end = p; + + // check the item is exported + cc = *p; + *p = NUL; + if (find_exported(imp_sid, lp->ll_name, &ufunc, &type, NULL, NULL, + TRUE) == -1) + goto failed; + + if (vim9script && type != NULL) + { + where_T where = WHERE_INIT; + + // In a vim9 script, do type check and make sure the variable is + // writable. + if (check_typval_type(type, rettv, where) == FAIL) + goto failed; + } + + // Get the typval for the exported item + hashtab_T *ht = &SCRIPT_VARS(imp_sid); + if (ht == NULL) + goto failed; + + dictitem_T *di = find_var_in_ht(ht, 0, lp->ll_name, TRUE); + if (di == NULL) + // script is autoloaded. So variable will be found later + goto success; + + *dip = di; + + // Check whether the variable is writable. + svar_T *sv = find_typval_in_script(&di->di_tv, imp_sid, FALSE); + if (sv != NULL && sv->sv_const != 0) + { + semsg(_(e_cannot_change_readonly_variable_str), lp->ll_name); + goto failed; + } + + // check whether variable is locked + if (value_check_lock(di->di_tv.v_lock, lp->ll_name, FALSE)) + goto failed; + + lp->ll_tv = &di->di_tv; + +success: + rc = OK; + +failed: + *p = cc; + return rc == OK ? p : NULL; +} + /* * Get an lval: variable, Dict item or List item that can be assigned a value * to: "name", "na{me}", "name[expr]", "name[expr:expr]", "name[expr][expr]", @@ -1166,7 +1273,7 @@ get_lval( char_u *p; char_u *expr_start, *expr_end; int cc; - dictitem_T *v; + dictitem_T *v = NULL; typval_T var1; typval_T var2; int empty1 = FALSE; @@ -1300,28 +1407,13 @@ get_lval( if (*p == '.') { imported_T *import = find_imported(lp->ll_name, p - lp->ll_name, TRUE); - if (import != NULL) { - ufunc_T *ufunc; - type_T *type; - - import_check_sourced_sid(&import->imp_sid); - lp->ll_sid = import->imp_sid; - lp->ll_name = skipwhite(p + 1); - p = find_name_end(lp->ll_name, NULL, NULL, fne_flags); - lp->ll_name_end = p; - - // check the item is exported - cc = *p; - *p = NUL; - if (find_exported(import->imp_sid, lp->ll_name, &ufunc, &type, - NULL, NULL, TRUE) == -1) - { - *p = cc; + p++; // skip '.' + p = get_lval_imported(lp, rettv, import->imp_sid, p, &v, + fne_flags, vim9script); + if (p == NULL) return NULL; - } - *p = cc; } } @@ -1341,7 +1433,7 @@ get_lval( lp->ll_tv = lval_root->lr_tv; v = NULL; } - else + else if (lp->ll_tv == NULL) { cc = *p; *p = NUL; @@ -6310,9 +6402,15 @@ echo_string_core( case VAR_CLASS: { class_T *cl = tv->vval.v_class; - size_t len = 6 + (cl == NULL ? 9 : STRLEN(cl->class_name)) + 1; + char *s = "class"; + if (IS_INTERFACE(cl)) + s = "interface"; + else if (IS_ENUM(cl)) + s = "enum"; + size_t len = STRLEN(s) + 1 + + (cl == NULL ? 9 : STRLEN(cl->class_name)) + 1; r = *tofree = alloc(len); - vim_snprintf((char *)r, len, "class %s", + vim_snprintf((char *)r, len, "%s %s", s, cl == NULL ? "[unknown]" : (char *)cl->class_name); } break; @@ -6806,7 +6904,7 @@ find_name_end( int br_nest = 0; char_u *p; int len; - int allow_curly = (flags & FNE_ALLOW_CURLY) || !in_vim9script(); + int allow_curly = !in_vim9script(); if (expr_start != NULL) { diff --git a/src/evalfunc.c b/src/evalfunc.c index 14650ca..2064982 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -3920,7 +3920,7 @@ f_deepcopy(typval_T *argvars, typval_T *rettv) static void f_did_filetype(typval_T *argvars UNUSED, typval_T *rettv UNUSED) { - rettv->vval.v_number = did_filetype; + rettv->vval.v_number = curbuf->b_did_filetype; } /* @@ -6127,6 +6127,13 @@ f_has(typval_T *argvars, typval_T *rettv) 1 #else 0 +#endif + }, + {"dialog_con_gui", +#if defined(FEAT_CON_DIALOG) && defined(FEAT_GUI_DIALOG) + 1 +#else + 0 #endif }, {"dialog_gui", @@ -11486,15 +11493,31 @@ f_type(typval_T *argvars, typval_T *rettv) case VAR_CHANNEL: n = VAR_TYPE_CHANNEL; break; case VAR_BLOB: n = VAR_TYPE_BLOB; break; case VAR_INSTR: n = VAR_TYPE_INSTR; break; - case VAR_CLASS: n = VAR_TYPE_CLASS; break; - case VAR_OBJECT: n = VAR_TYPE_OBJECT; break; case VAR_TYPEALIAS: n = VAR_TYPE_TYPEALIAS; break; + case VAR_CLASS: + { + class_T *cl = argvars[0].vval.v_class; + if (IS_ENUM(cl)) + n = VAR_TYPE_ENUM; + else + n = VAR_TYPE_CLASS; + break; + } + case VAR_OBJECT: + { + class_T *cl = argvars[0].vval.v_object->obj_class; + if (IS_ENUM(cl)) + n = VAR_TYPE_ENUMVALUE; + else + n = VAR_TYPE_OBJECT; + break; + } case VAR_UNKNOWN: case VAR_ANY: case VAR_VOID: - internal_error_no_abort("f_type(UNKNOWN)"); - n = -1; - break; + internal_error_no_abort("f_type(UNKNOWN)"); + n = -1; + break; } rettv->vval.v_number = n; } diff --git a/src/evalvars.c b/src/evalvars.c index de9d5b2..6facbeb 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -159,6 +159,8 @@ static struct vimvar {VV_NAME("maxcol", VAR_NUMBER), NULL, VV_RO}, {VV_NAME("python3_version", VAR_NUMBER), NULL, VV_RO}, {VV_NAME("t_typealias", VAR_NUMBER), NULL, VV_RO}, + {VV_NAME("t_enum", VAR_NUMBER), NULL, VV_RO}, + {VV_NAME("t_enumvalue", VAR_NUMBER), NULL, VV_RO}, }; // shorthand @@ -262,6 +264,8 @@ evalvars_init(void) set_vim_var_nr(VV_TYPE_CLASS, VAR_TYPE_CLASS); set_vim_var_nr(VV_TYPE_OBJECT, VAR_TYPE_OBJECT); set_vim_var_nr(VV_TYPE_TYPEALIAS, VAR_TYPE_TYPEALIAS); + set_vim_var_nr(VV_TYPE_ENUM, VAR_TYPE_ENUM); + set_vim_var_nr(VV_TYPE_ENUMVALUE, VAR_TYPE_ENUMVALUE); set_vim_var_nr(VV_ECHOSPACE, sc_col - 1); @@ -658,7 +662,7 @@ eval_one_expr_in_str(char_u *p, garray_T *gap, int evaluate) if (evaluate) { *block_end = NUL; - expr_val = eval_to_string(block_start, TRUE, FALSE); + expr_val = eval_to_string(block_start, FALSE, FALSE); *block_end = '}'; if (expr_val == NULL) return NULL; @@ -775,8 +779,17 @@ heredoc_get(exarg_T *eap, char_u *cmd, int script_get, int vim9compile) int eval_failed = FALSE; cctx_T *cctx = vim9compile ? eap->cookie : NULL; int count = 0; + int heredoc_in_string = FALSE; + char_u *line_arg = NULL; + char_u *nl_ptr = vim_strchr(cmd, '\n'); - if (eap->ea_getline == NULL) + if (nl_ptr != NULL) + { + heredoc_in_string = TRUE; + line_arg = nl_ptr + 1; + *nl_ptr = NUL; + } + else if (eap->ea_getline == NULL) { emsg(_(e_cannot_use_heredoc_here)); return NULL; @@ -855,12 +868,38 @@ heredoc_get(exarg_T *eap, char_u *cmd, int script_get, int vim9compile) int mi = 0; int ti = 0; - vim_free(theline); - theline = eap->ea_getline(NUL, eap->cookie, 0, FALSE); - if (theline == NULL) + if (heredoc_in_string) { - semsg(_(e_missing_end_marker_str), marker); - break; + char_u *next_line; + + // heredoc in a string separated by newlines. Get the next line + // from the string. + + if (*line_arg == NUL) + { + semsg(_(e_missing_end_marker_str), marker); + break; + } + + theline = line_arg; + next_line = vim_strchr(theline, '\n'); + if (next_line == NULL) + line_arg += STRLEN(line_arg); + else + { + *next_line = NUL; + line_arg = next_line + 1; + } + } + else + { + vim_free(theline); + theline = eap->ea_getline(NUL, eap->cookie, 0, FALSE); + if (theline == NULL) + { + semsg(_(e_missing_end_marker_str), marker); + break; + } } // with "trim": skip the indent matching the :let line to find the @@ -907,6 +946,8 @@ heredoc_get(exarg_T *eap, char_u *cmd, int script_get, int vim9compile) } else { + int free_str = FALSE; + if (evalstr && !eap->skip) { str = eval_all_expr_in_str(str); @@ -916,15 +957,20 @@ heredoc_get(exarg_T *eap, char_u *cmd, int script_get, int vim9compile) eval_failed = TRUE; continue; } - vim_free(theline); - theline = str; + free_str = TRUE; } if (list_append_string(l, str, -1) == FAIL) break; + if (free_str) + vim_free(str); } } - vim_free(theline); + if (heredoc_in_string) + // Next command follows the heredoc in the string. + eap->nextcmd = line_arg; + else + vim_free(theline); vim_free(text_indent); if (vim9compile && cctx->ctx_skip != SKIP_YES && !eval_failed) @@ -3294,12 +3340,31 @@ find_var(char_u *name, hashtab_T **htp, int no_autoload) } } + // and finally try + return find_var_autoload_prefix(name, 0, htp, NULL); +} + +/* + * Find variable "name" with sn_autoload_prefix. + * Return a pointer to it if found, NULL if not found. + * When "sid" > 0, use it otherwise use "current_sctx.sc_sid". + * When "htp" is not NULL set "htp" to the hashtab_T used. + * When "namep" is not NULL set "namep" to the generated name, and + * then the caller gets ownership and is responsible for freeing the name. + */ + dictitem_T * +find_var_autoload_prefix(char_u *name, int sid, hashtab_T **htp, + char_u **namep) +{ + hashtab_T *ht; + dictitem_T *ret = NULL; // When using "vim9script autoload" script-local items are prefixed but can // be used with s:name. - if (SCRIPT_ID_VALID(current_sctx.sc_sid) + int check_sid = sid > 0 ? sid : current_sctx.sc_sid; + if (SCRIPT_ID_VALID(check_sid) && (in_vim9script() || (name[0] == 's' && name[1] == ':'))) { - scriptitem_T *si = SCRIPT_ITEM(current_sctx.sc_sid); + scriptitem_T *si = SCRIPT_ITEM(check_sid); if (si->sn_autoload_prefix != NULL) { @@ -3309,20 +3374,26 @@ find_var(char_u *name, hashtab_T **htp, int no_autoload) if (auto_name != NULL) { + int free_auto_name = TRUE; ht = &globvarht; ret = find_var_in_ht(ht, 'g', auto_name, TRUE); - vim_free(auto_name); if (ret != NULL) { if (htp != NULL) *htp = ht; - return ret; + if (namep != NULL) + { + free_auto_name = FALSE; + *namep = auto_name; + } } + if (free_auto_name) + vim_free(auto_name); } } } - return NULL; + return ret; } /* @@ -3462,7 +3533,11 @@ lookup_scriptitem( hi = hash_find(ht, p); res = HASHITEM_EMPTY(hi) ? FAIL : OK; - // if not script-local, then perhaps imported + // if not script-local, then perhaps autoload-exported + if (res == FAIL && find_var_autoload_prefix(p, 0, NULL, NULL) != NULL) + res = OK; + + // if not script-local or autoload, then perhaps imported if (res == FAIL && find_imported(p, 0, FALSE) != NULL) res = OK; if (p != buffer) @@ -3858,23 +3933,40 @@ set_var_const( if (sid != 0) { + varname = NULL; if (SCRIPT_ID_VALID(sid)) - ht = &SCRIPT_VARS(sid); - varname = name; + { + char_u *auto_name = NULL; + if (find_var_autoload_prefix(name, sid, &ht, &auto_name) != NULL) + { + var_in_autoload = TRUE; + varname = auto_name; + name_tofree = varname; + } + else + ht = &SCRIPT_VARS(sid); + } + if (varname == NULL) + varname = name; } else { - scriptitem_T *si; + scriptitem_T *si; + char_u *auto_name = NULL; - if (in_vim9script() && is_export - && SCRIPT_ID_VALID(current_sctx.sc_sid) - && (si = SCRIPT_ITEM(current_sctx.sc_sid)) - ->sn_autoload_prefix != NULL) + if (in_vim9script() + && SCRIPT_ID_VALID(current_sctx.sc_sid) + && (si = SCRIPT_ITEM(current_sctx.sc_sid)) + ->sn_autoload_prefix != NULL + && (is_export + || find_var_autoload_prefix(name, 0, NULL, &auto_name) + != NULL)) { // In a vim9 autoload script an exported variable is put in the // global namespace with the autoload prefix. var_in_autoload = TRUE; - varname = concat_str(si->sn_autoload_prefix, name); + varname = auto_name != NULL ? auto_name + : concat_str(si->sn_autoload_prefix, name); if (varname == NULL) goto failed; name_tofree = varname; @@ -4143,6 +4235,7 @@ failed: * - Whether the variable is read-only * - Whether the variable value is locked * - Whether the variable is locked + * NOTE: "name" is only used for error messages. */ int var_check_permission(dictitem_T *di, char_u *name) diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 864f89d..2a5d842 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -2961,7 +2961,7 @@ do_ecmd( // Since we are starting to edit a file, consider the filetype to be // unset. Helps for when an autocommand changes files and expects syntax // highlighting to work in the other file. - did_filetype = FALSE; + curbuf->b_did_filetype = FALSE; /* * other_file oldbuf diff --git a/src/ex_cmds.h b/src/ex_cmds.h index bd26e81..70e5770 100644 --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -99,13 +99,14 @@ typedef struct exarg exarg_T; */ #ifdef DO_DECLARE_EXCMD # define EXCMD(a, b, c, d, e) \ - {(char_u *)b, c, (long_u)(d), e} + {(char_u *)b, STRLEN_LITERAL(b), c, (long_u)(d), e} typedef void (*ex_func_T) (exarg_T *eap); static struct cmdname { char_u *cmd_name; // name of the command + size_t cmd_namelen; // length of the command name ex_func_T cmd_func; // function for this command long_u cmd_argt; // flags declared above cmd_addr_T cmd_addr_type; // flag for address type @@ -595,7 +596,7 @@ EXCMD(CMD_endwhile, "endwhile", ex_endwhile, EXCMD(CMD_enew, "enew", ex_edit, EX_BANG|EX_TRLBAR, ADDR_NONE), -EXCMD(CMD_enum, "enum", ex_enum, +EXCMD(CMD_enum, "enum", ex_class, EX_EXTRA|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK|EX_EXPORT, ADDR_NONE), EXCMD(CMD_eval, "eval", ex_eval, diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 4a6f519..ce30b8d 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -163,7 +163,7 @@ dialog_changed( char_u buff[DIALOG_MSG_SIZE]; int ret; buf_T *buf2; - exarg_T ea; + exarg_T ea; dialog_msg(buff, _("Save changes to \"%s\"?"), buf->b_fname); if (checkall) @@ -177,14 +177,31 @@ dialog_changed( if (ret == VIM_YES) { + int empty_bufname; + #ifdef FEAT_BROWSE // May get file name, when there is none browse_save_fname(buf); #endif - if (buf->b_fname != NULL && check_overwrite(&ea, buf, - buf->b_fname, buf->b_ffname, FALSE) == OK) + empty_bufname = buf->b_fname == NULL ? TRUE : FALSE; + if (empty_bufname) + buf_set_name(buf->b_fnum, (char_u *)"Untitled"); + + if (check_overwrite(&ea, buf, buf->b_fname, buf->b_ffname, FALSE) == OK) + { // didn't hit Cancel - (void)buf_write_all(buf, FALSE); + if (buf_write_all(buf, FALSE) == OK) + return; + } + + // restore to empty when write failed + if (empty_bufname) + { + VIM_CLEAR(buf->b_fname); + VIM_CLEAR(buf->b_ffname); + VIM_CLEAR(buf->b_sfname); + unchanged(buf, TRUE, FALSE); + } } else if (ret == VIM_NO) { diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 19b1d85..a588f26 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -19,6 +19,10 @@ static int ex_pressedreturn = FALSE; # define ex_hardcopy ex_ni #endif +#if defined(FEAT_EVAL) || defined(PROTO) +static int cmp_cmdmod_info(const void *a, const void *b); +#endif + #ifdef FEAT_EVAL static char_u *do_one_cmd(char_u **, int, cstack_T *, char_u *(*fgetline)(int, void *, int, getline_opt_T), void *cookie); #else @@ -82,7 +86,7 @@ static void correct_range(exarg_T *eap); #ifdef FEAT_QUICKFIX static char_u *replace_makeprg(exarg_T *eap, char_u *p, char_u **cmdlinep); #endif -static char_u *repl_cmdline(exarg_T *eap, char_u *src, int srclen, char_u *repl, char_u **cmdlinep); +static char_u *repl_cmdline(exarg_T *eap, char_u *src, size_t srclen, char_u *repl, char_u **cmdlinep); static void ex_highlight(exarg_T *eap); static void ex_colorscheme(exarg_T *eap); static void ex_cquit(exarg_T *eap); @@ -460,6 +464,40 @@ restore_dbg_stuff(struct dbg_stuff *dsp) } #endif +/* + * Check if ffname differs from fnum. + * fnum is a buffer number. 0 == current buffer, 1-or-more must be a valid buffer ID. + * ffname is a full path to where a buffer lives on-disk or would live on-disk. + * + */ + static int +is_other_file(int fnum, char_u *ffname) +{ + if (fnum != 0) + { + if (fnum == curbuf->b_fnum) + return FALSE; + + return TRUE; + } + + if (ffname == NULL) + return TRUE; + + if (*ffname == NUL) + return FALSE; + + // TODO: Need a reliable way to know whether a buffer is meant to live on-disk + // !curbuf->b_dev_valid is not always available (example: missing on Windows) + if (curbuf->b_sfname != NULL + && *curbuf->b_sfname != NUL) + // This occurs with unsaved buffers. In which case `ffname` + // actually corresponds to curbuf->b_sfname + return fnamecmp(ffname, curbuf->b_sfname) != 0; + + return otherfile(ffname); +} + /* * do_exmode(): Repeatedly get commands for the "Ex" mode, until the ":vi" * command is given. @@ -2911,7 +2949,7 @@ parse_command_modifiers( switch (*p) { - // When adding an entry, also modify cmdmods[]. + // When adding an entry, also modify cmdmod_info_tab[]. case 'a': if (!checkforcmd_noparen(&eap->cmd, "aboveleft", 3)) break; cmod->cmod_split |= WSP_ABOVE; @@ -3921,7 +3959,7 @@ find_ex_command( if (eap->cmdidx == CMD_mode || eap->cmdidx == CMD_Print) eap->cmdidx = CMD_SIZE; else if ((cmdnames[eap->cmdidx].cmd_argt & EX_WHOLE) - && len < (int)STRLEN(cmdnames[eap->cmdidx].cmd_name)) + && len < (int)cmdnames[eap->cmdidx].cmd_namelen) { semsg(_(e_command_cannot_be_shortened_str), eap->cmd); eap->cmdidx = CMD_SIZE; @@ -3970,12 +4008,14 @@ find_ex_command( } #if defined(FEAT_EVAL) || defined(PROTO) -static struct cmdmod +typedef struct { char *name; int minlen; int has_count; // :123verbose :3tab -} cmdmods[] = { +} cmdmod_info_T; + +static cmdmod_info_T cmdmod_info_tab[] = { {"aboveleft", 3, FALSE}, {"belowright", 3, FALSE}, {"botright", 2, FALSE}, @@ -4001,8 +4041,18 @@ static struct cmdmod {"unsilent", 3, FALSE}, {"verbose", 4, TRUE}, {"vertical", 4, FALSE}, - {"vim9cmd", 4, FALSE}, -}; + {"vim9cmd", 4, FALSE} +}; // cmdmod_info_tab + +// compare two cmdmod_info_T structs by case sensitive name with length + static int +cmp_cmdmod_info(const void *a, const void *b) +{ + cmdmod_info_T *cm1 = (cmdmod_info_T *)a; + cmdmod_info_T *cm2 = (cmdmod_info_T *)b; + + return STRNCMP(cm1->name, cm2->name, cm2->minlen); +} /* * Return length of a command modifier (including optional count). @@ -4011,20 +4061,36 @@ static struct cmdmod int modifier_len(char_u *cmd) { - int i, j; char_u *p = cmd; + cmdmod_info_T target; + cmdmod_info_T *entry; if (VIM_ISDIGIT(*cmd)) p = skipwhite(skipdigits(cmd + 1)); - for (i = 0; i < (int)ARRAY_LENGTH(cmdmods); ++i) + + // only lowercase characters can match + if (!ASCII_ISLOWER(*p)) + return 0; + + target.name = (char *)p; + target.minlen = 0; // not used, see cmp_cmdmod_info() + target.has_count = FALSE; + + entry = (cmdmod_info_T *)bsearch(&target, &cmdmod_info_tab, ARRAY_LENGTH(cmdmod_info_tab), sizeof(cmdmod_info_tab[0]), cmp_cmdmod_info); + if (entry != NULL) { - for (j = 0; p[j] != NUL; ++j) - if (p[j] != cmdmods[i].name[j]) + int i; + + for (i = entry->minlen; p[i] != NUL; ++i) + { + if (p[i] != entry->name[i]) break; - if (!ASCII_ISALPHA(p[j]) && j >= cmdmods[i].minlen - && (p == cmd || cmdmods[i].has_count)) - return j + (int)(p - cmd); + } + + if (!ASCII_ISALPHA(p[i]) && i >= entry->minlen && (p == cmd || entry->has_count)) + return i + (int)(p - cmd); } + return 0; } @@ -4038,18 +4104,33 @@ cmd_exists(char_u *name) { exarg_T ea; int full = FALSE; - int i; - int j; char_u *p; - // Check command modifiers. - for (i = 0; i < (int)ARRAY_LENGTH(cmdmods); ++i) + // only lowercase characters can match + if (ASCII_ISLOWER(*name)) { - for (j = 0; name[j] != NUL; ++j) - if (name[j] != cmdmods[i].name[j]) - break; - if (name[j] == NUL && j >= cmdmods[i].minlen) - return (cmdmods[i].name[j] == NUL ? 2 : 1); + cmdmod_info_T target; + cmdmod_info_T *entry; + + target.name = (char *)name; + target.minlen = 0; // not used, see cmp_cmdmod_info() + target.has_count = FALSE; + + // Check command modifiers. + entry = (cmdmod_info_T *)bsearch(&target, &cmdmod_info_tab, ARRAY_LENGTH(cmdmod_info_tab), sizeof(cmdmod_info_tab[0]), cmp_cmdmod_info); + if (entry != NULL) + { + int i; + + for (i = entry->minlen; name[i] != NUL; ++i) + { + if (name[i] != entry->name[i]) + break; + } + + if (name[i] == NUL && i >= entry->minlen) + return (entry->name[i] == NUL ? 2 : 1); + } } // Check built-in commands and user defined commands. @@ -4963,12 +5044,14 @@ replace_makeprg(exarg_T *eap, char_u *p, char_u **cmdlinep) } else { - new_cmdline = alloc(STRLEN(program) + STRLEN(p) + 2); + size_t program_len = STRLEN(program); + + new_cmdline = alloc(program_len + STRLEN(p) + 2); if (new_cmdline == NULL) return NULL; // out of memory STRCPY(new_cmdline, program); - STRCAT(new_cmdline, " "); - STRCAT(new_cmdline, p); + STRCPY(new_cmdline + program_len, " "); + STRCPY(new_cmdline + program_len + 1, p); } msg_make(p); @@ -5118,7 +5201,7 @@ expand_filename( } } - p = repl_cmdline(eap, p, srclen, repl, cmdlinep); + p = repl_cmdline(eap, p, (size_t)srclen, repl, cmdlinep); vim_free(repl); if (p == NULL) return FAIL; @@ -5189,7 +5272,7 @@ expand_filename( } if (p != NULL) { - (void)repl_cmdline(eap, eap->arg, (int)STRLEN(eap->arg), + (void)repl_cmdline(eap, eap->arg, STRLEN(eap->arg), p, cmdlinep); if (n == 2) // p came from ExpandOne() vim_free(p); @@ -5212,23 +5295,26 @@ expand_filename( repl_cmdline( exarg_T *eap, char_u *src, - int srclen, + size_t srclen, char_u *repl, char_u **cmdlinep) { - int len; - int i; + size_t repllen; + size_t taillen; + size_t i; char_u *new_cmdline; + size_t new_cmdlinelen; /* * The new command line is build in new_cmdline[]. * First allocate it. * Careful: a "+cmd" argument may have been NUL terminated. */ - len = (int)STRLEN(repl); - i = (int)(src - *cmdlinep) + (int)STRLEN(src + srclen) + len + 3; + repllen = STRLEN(repl); + taillen = STRLEN(src + srclen); + i = (src - *cmdlinep) + repllen + taillen + 3; if (eap->nextcmd != NULL) - i += (int)STRLEN(eap->nextcmd);// add space for next command + i += STRLEN(eap->nextcmd); // add space for next command if ((new_cmdline = alloc(i)) == NULL) return NULL; // out of memory! @@ -5238,19 +5324,19 @@ repl_cmdline( * Copy what came after the expanded part. * Copy the next commands, if there are any. */ - i = (int)(src - *cmdlinep); // length of part before match - mch_memmove(new_cmdline, *cmdlinep, (size_t)i); + new_cmdlinelen = src - *cmdlinep; // length of part before replacement + mch_memmove(new_cmdline, *cmdlinep, new_cmdlinelen); - mch_memmove(new_cmdline + i, repl, (size_t)len); - i += len; // remember the end of the string - STRCPY(new_cmdline + i, src + srclen); - src = new_cmdline + i; // remember where to continue + mch_memmove(new_cmdline + new_cmdlinelen, repl, repllen); + new_cmdlinelen += repllen; // remember the end of the string + STRCPY(new_cmdline + new_cmdlinelen, src + srclen); + src = new_cmdline + new_cmdlinelen; // remember where to continue if (eap->nextcmd != NULL) // append next command { - i = (int)STRLEN(new_cmdline) + 1; - STRCPY(new_cmdline + i, eap->nextcmd); - eap->nextcmd = new_cmdline + i; + new_cmdlinelen += taillen + 1; + STRCPY(new_cmdline + new_cmdlinelen, eap->nextcmd); + eap->nextcmd = new_cmdline + new_cmdlinelen; } eap->cmd = new_cmdline + (eap->cmd - *cmdlinep); eap->arg = new_cmdline + (eap->arg - *cmdlinep); @@ -5421,9 +5507,10 @@ get_bad_name(expand_T *xp UNUSED, int idx) "drop", }; - if (idx < (int)ARRAY_LENGTH(p_bad_values)) - return (char_u*)p_bad_values[idx]; - return NULL; + if (idx < 0 || idx >= (int)ARRAY_LENGTH(p_bad_values)) + return NULL; + + return (char_u*)p_bad_values[idx]; } /* @@ -5537,9 +5624,10 @@ get_argopt_name(expand_T *xp UNUSED, int idx) "edit", }; - if (idx < (int)ARRAY_LENGTH(p_opt_values)) - return (char_u*)p_opt_values[idx]; - return NULL; + if (idx < 0 || idx >= (int)ARRAY_LENGTH(p_opt_values)) + return NULL; + + return (char_u*)p_opt_values[idx]; } /* @@ -6317,11 +6405,19 @@ get_tabpage_arg(exarg_T *eap) else { tab_number = eap->line2; - if (!unaccept_arg0 && *skipwhite(*eap->cmdlinep) == '-') + if (!unaccept_arg0) { - --tab_number; - if (tab_number < unaccept_arg0) - eap->errmsg = _(e_invalid_range); + char_u *cmdp = eap->cmd; + + while (--cmdp > *eap->cmdlinep + && (VIM_ISWHITE(*cmdp) || VIM_ISDIGIT(*cmdp))) + ; + if (*cmdp == '-') + { + --tab_number; + if (tab_number < unaccept_arg0) + eap->errmsg = _(e_invalid_range); + } } } } @@ -7248,12 +7344,15 @@ ex_open(exarg_T *eap) static void ex_edit(exarg_T *eap) { + char_u *ffname = eap->cmdidx == CMD_enew ? NULL : eap->arg; + // 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)) + && (is_other_file(0, ffname) && !check_can_set_curbuf_forceit(eap->forceit)) + ) return; do_exedit(eap, NULL); @@ -9237,6 +9336,27 @@ ex_tag_cmd(exarg_T *eap, char_u *name) eap->forceit, TRUE); } +enum { + SPEC_PERC = 0, + SPEC_HASH, + SPEC_CWORD, // cursor word + SPEC_CCWORD, // cursor WORD + SPEC_CEXPR, // expr under cursor + SPEC_CFILE, // cursor path name + SPEC_SFILE, // ":so" file name + SPEC_SLNUM, // ":so" file line number + SPEC_STACK, // call stack + SPEC_SCRIPT, // script file name + SPEC_AFILE, // autocommand file name + SPEC_ABUF, // autocommand buffer number + SPEC_AMATCH, // autocommand match name + SPEC_SFLNUM, // script file line number + SPEC_SID // script ID: 123_ +#ifdef FEAT_CLIENTSERVER + , SPEC_CLIENT +#endif +}; + /* * Check "str" for starting with a special cmdline variable. * If found return one of the SPEC_ values and set "*usedlen" to the length of @@ -9245,54 +9365,54 @@ ex_tag_cmd(exarg_T *eap, char_u *name) int find_cmdline_var(char_u *src, int *usedlen) { - int len; - int i; - static char *(spec_str[]) = { - "%", -#define SPEC_PERC 0 - "#", -#define SPEC_HASH (SPEC_PERC + 1) - "", // cursor word -#define SPEC_CWORD (SPEC_HASH + 1) - "", // cursor WORD -#define SPEC_CCWORD (SPEC_CWORD + 1) - "", // expr under cursor -#define SPEC_CEXPR (SPEC_CCWORD + 1) - "", // cursor path name -#define SPEC_CFILE (SPEC_CEXPR + 1) - "", // ":so" file name -#define SPEC_SFILE (SPEC_CFILE + 1) - "", // ":so" file line number -#define SPEC_SLNUM (SPEC_SFILE + 1) - "", // call stack -#define SPEC_STACK (SPEC_SLNUM + 1) - "