From 2eae5db069dc171f74cd863487655f6a88e5384d Mon Sep 17 00:00:00 2001 From: Mehmet Samet Duman Date: Fri, 3 Apr 2026 22:21:25 +0300 Subject: NOISSUE rebrand vim to MNV's not Vim Signed-off-by: Mehmet Samet Duman --- uvim/runtime/syntax/testdir/input/c.c | 26 +- uvim/runtime/syntax/testdir/input/codeowners.txt | 2 +- uvim/runtime/syntax/testdir/input/cpp_noreturn.cpp | 2 +- uvim/runtime/syntax/testdir/input/csh.csh | 2 +- .../testdir/input/gdb_multiline_commands.gdb | 2 +- uvim/runtime/syntax/testdir/input/help.txt | 32 +- .../syntax/testdir/input/help_ex_version.txt | 20 +- uvim/runtime/syntax/testdir/input/html.html | 2 +- .../syntax/testdir/input/html_fold_expr.html | 2 +- .../syntax/testdir/input/html_fold_syntax.html | 4 +- .../syntax/testdir/input/java_annotations.java | 2 +- .../testdir/input/java_annotations_signature.java | 4 +- .../syntax/testdir/input/java_comments_html.java | 18 +- .../testdir/input/java_comments_markdown.java | 30 +- .../testdir/input/java_contextual_keywords.java | 2 +- .../syntax/testdir/input/java_enfoldment.java | 14 +- .../syntax/testdir/input/java_generics.java | 12 +- .../testdir/input/java_generics_signature.java | 16 +- .../testdir/input/java_lambda_expressions.java | 2 +- .../input/java_lambda_expressions_signature.java | 4 +- .../testdir/input/java_method_references.java | 4 +- .../input/java_method_references_signature.java | 6 +- .../syntax/testdir/input/java_methods_indent2.java | 6 +- .../input/java_methods_indent2_signature.java | 6 +- .../syntax/testdir/input/java_methods_indent4.java | 6 +- .../input/java_methods_indent4_signature.java | 6 +- .../syntax/testdir/input/java_methods_indent8.java | 6 +- .../input/java_methods_indent8_signature.java | 6 +- .../syntax/testdir/input/java_methods_style.java | 6 +- .../input/java_methods_style_signature.java | 6 +- .../syntax/testdir/input/java_previews_430.java | 2 +- .../syntax/testdir/input/java_previews_455.java | 2 +- .../syntax/testdir/input/java_unfoldment.java | 14 +- uvim/runtime/syntax/testdir/input/mnv9_blocks.mnv | 49 + .../testdir/input/mnv9_builtin_object_methods.mnv | 114 ++ .../testdir/input/mnv9_builtin_object_methods2.mnv | 58 + .../syntax/testdir/input/mnv9_comment_strings.mnv | 27 + .../runtime/syntax/testdir/input/mnv9_comments.mnv | 99 ++ .../syntax/testdir/input/mnv9_constructors.mnv | 18 + .../syntax/testdir/input/mnv9_def_variables.mnv | 226 ++++ .../syntax/testdir/input/mnv9_ex_class_fold.mnv | 71 ++ .../syntax/testdir/input/mnv9_ex_commands.mnv | 1211 ++++++++++++++++++++ uvim/runtime/syntax/testdir/input/mnv9_ex_echo.mnv | 36 + uvim/runtime/syntax/testdir/input/mnv9_ex_enum.mnv | 111 ++ .../runtime/syntax/testdir/input/mnv9_ex_enum2.mnv | 31 + .../syntax/testdir/input/mnv9_ex_enum_fold.mnv | 50 + uvim/runtime/syntax/testdir/input/mnv9_ex_for.mnv | 88 ++ .../mnv9_ex_function_def_tail_comment_errors.mnv | 45 + .../input/mnv9_ex_function_def_tail_comments.mnv | 45 + .../syntax/testdir/input/mnv9_ex_import.mnv | 120 ++ .../testdir/input/mnv9_ex_interface_fold.mnv | 38 + .../syntax/testdir/input/mnv9_ex_let_heredoc.mnv | 299 +++++ .../syntax/testdir/input/mnv9_ex_loadkeymap.mnv | 28 + uvim/runtime/syntax/testdir/input/mnv9_ex_type.mnv | 12 + .../syntax/testdir/input/mnv9_expressions.mnv | 215 ++++ .../syntax/testdir/input/mnv9_function_calls.mnv | 317 +++++ .../input/mnv9_generic_function_example_enum.mnv | 36 + .../input/mnv9_generic_function_example_list.mnv | 215 ++++ .../input/mnv9_generic_function_example_set.mnv | 177 +++ .../testdir/input/mnv9_generic_functions.mnv | 97 ++ uvim/runtime/syntax/testdir/input/mnv9_lambdas.mnv | 161 +++ .../syntax/testdir/input/mnv9_legacy_header.mnv | 20 + .../testdir/input/mnv9_legacy_header_fold.mnv | 22 + .../testdir/input/mnv9_no_comment_strings.mnv | 27 + uvim/runtime/syntax/testdir/input/mnv9_shebang.mnv | 8 + .../testdir/input/mnv9_super_this_keywords.mnv | 87 ++ .../testdir/input/mnv9_super_this_keywords2.mnv | 63 + .../testdir/input/mnv9_super_this_keywords3.mnv | 27 + uvim/runtime/syntax/testdir/input/mnv9_tuples.mnv | 25 + uvim/runtime/syntax/testdir/input/mnv9_types.mnv | 17 + .../testdir/input/mnv9_types_example_object.mnv | 29 + .../syntax/testdir/input/mnv9_types_object.mnv | 27 + .../syntax/testdir/input/mnv9_variables.mnv | 269 +++++ .../syntax/testdir/input/mnv_comment_strings.mnv | 22 + uvim/runtime/syntax/testdir/input/mnv_comments.mnv | 83 ++ .../syntax/testdir/input/mnv_ex_abbreviate.mnv | 54 + uvim/runtime/syntax/testdir/input/mnv_ex_at.mnv | 66 ++ .../syntax/testdir/input/mnv_ex_augroup.mnv | 71 ++ .../syntax/testdir/input/mnv_ex_autocmd.mnv | 257 +++++ .../runtime/syntax/testdir/input/mnv_ex_behave.mnv | 9 + .../testdir/input/mnv_ex_breakpoint_commands.mnv | 95 ++ uvim/runtime/syntax/testdir/input/mnv_ex_call.mnv | 52 + uvim/runtime/syntax/testdir/input/mnv_ex_catch.mnv | 19 + uvim/runtime/syntax/testdir/input/mnv_ex_cd.mnv | 110 ++ .../syntax/testdir/input/mnv_ex_command.mnv | 196 ++++ .../testdir/input/mnv_ex_command_modifiers.mnv | 135 +++ .../syntax/testdir/input/mnv_ex_commands.mnv | 1210 +++++++++++++++++++ uvim/runtime/syntax/testdir/input/mnv_ex_debug.mnv | 13 + .../syntax/testdir/input/mnv_ex_debuggreedy.mnv | 34 + uvim/runtime/syntax/testdir/input/mnv_ex_def.mnv | 126 ++ .../syntax/testdir/input/mnv_ex_def_fold.mnv | 185 +++ .../syntax/testdir/input/mnv_ex_def_nested.mnv | 23 + .../testdir/input/mnv_ex_def_nested_fold.mnv | 25 + .../testdir/input/mnv_ex_def_return_type.mnv | 60 + uvim/runtime/syntax/testdir/input/mnv_ex_defer.mnv | 17 + .../syntax/testdir/input/mnv_ex_delfunction.mnv | 34 + .../syntax/testdir/input/mnv_ex_do_commands.mnv | 58 + uvim/runtime/syntax/testdir/input/mnv_ex_echo.mnv | 58 + uvim/runtime/syntax/testdir/input/mnv_ex_eval.mnv | 20 + .../syntax/testdir/input/mnv_ex_execute.mnv | 64 ++ .../syntax/testdir/input/mnv_ex_filetype.mnv | 30 + .../runtime/syntax/testdir/input/mnv_ex_filter.mnv | 16 + uvim/runtime/syntax/testdir/input/mnv_ex_for.mnv | 60 + .../syntax/testdir/input/mnv_ex_function.mnv | 266 +++++ .../mnv_ex_function_def_tail_comment_errors.mnv | 45 + .../input/mnv_ex_function_def_tail_comments.mnv | 45 + .../syntax/testdir/input/mnv_ex_function_fold.mnv | 349 ++++++ .../testdir/input/mnv_ex_function_nested.mnv | 40 + .../testdir/input/mnv_ex_function_nested_fold.mnv | 42 + uvim/runtime/syntax/testdir/input/mnv_ex_grep.mnv | 47 + uvim/runtime/syntax/testdir/input/mnv_ex_help.mnv | Bin 0 -> 986 bytes .../syntax/testdir/input/mnv_ex_helpgrep.mnv | 18 + .../syntax/testdir/input/mnv_ex_highlight.mnv | 108 ++ .../syntax/testdir/input/mnv_ex_history.mnv | 89 ++ .../runtime/syntax/testdir/input/mnv_ex_import.mnv | 119 ++ .../syntax/testdir/input/mnv_ex_language.mnv | 172 +++ .../syntax/testdir/input/mnv_ex_let_heredoc.mnv | 250 ++++ .../syntax/testdir/input/mnv_ex_loadkeymap.mnv | 27 + .../testdir/input/mnv_ex_loadkeymap_after_bar.mnv | 11 + .../input/mnv_ex_loadkeymap_after_colon.mnv | 11 + uvim/runtime/syntax/testdir/input/mnv_ex_lua.mnv | 157 +++ uvim/runtime/syntax/testdir/input/mnv_ex_make.mnv | 38 + uvim/runtime/syntax/testdir/input/mnv_ex_map.mnv | 124 ++ uvim/runtime/syntax/testdir/input/mnv_ex_mark.mnv | 215 ++++ uvim/runtime/syntax/testdir/input/mnv_ex_match.mnv | 64 ++ uvim/runtime/syntax/testdir/input/mnv_ex_menu.mnv | 88 ++ .../syntax/testdir/input/mnv_ex_menutranslate.mnv | 52 + .../syntax/testdir/input/mnv_ex_mnvgrep.mnv | 69 ++ .../syntax/testdir/input/mnv_ex_mzscheme.mnv | 157 +++ .../runtime/syntax/testdir/input/mnv_ex_normal.mnv | 30 + uvim/runtime/syntax/testdir/input/mnv_ex_perl.mnv | 157 +++ .../syntax/testdir/input/mnv_ex_profile.mnv | 48 + .../testdir/input/mnv_ex_prompt_commands.mnv | 46 + .../runtime/syntax/testdir/input/mnv_ex_python.mnv | 159 +++ uvim/runtime/syntax/testdir/input/mnv_ex_range.mnv | 90 ++ uvim/runtime/syntax/testdir/input/mnv_ex_redir.mnv | 71 ++ uvim/runtime/syntax/testdir/input/mnv_ex_ruby.mnv | 157 +++ uvim/runtime/syntax/testdir/input/mnv_ex_set.mnv | 131 +++ .../syntax/testdir/input/mnv_ex_set_backslash.mnv | 79 ++ uvim/runtime/syntax/testdir/input/mnv_ex_sleep.mnv | 13 + uvim/runtime/syntax/testdir/input/mnv_ex_sort.mnv | 64 ++ .../syntax/testdir/input/mnv_ex_substitute.mnv | 208 ++++ .../runtime/syntax/testdir/input/mnv_ex_syntax.mnv | 377 ++++++ .../syntax/testdir/input/mnv_ex_syntime.mnv | 38 + uvim/runtime/syntax/testdir/input/mnv_ex_tcl.mnv | 157 +++ .../syntax/testdir/input/mnv_ex_terminal.mnv | 69 ++ uvim/runtime/syntax/testdir/input/mnv_ex_throw.mnv | 7 + uvim/runtime/syntax/testdir/input/mnv_ex_uniq.mnv | 31 + .../runtime/syntax/testdir/input/mnv_ex_wincmd.mnv | 67 ++ .../syntax/testdir/input/mnv_expressions.mnv | 426 +++++++ .../syntax/testdir/input/mnv_function_calls.mnv | 277 +++++ .../testdir/input/mnv_function_variables.mnv | 414 +++++++ .../syntax/testdir/input/mnv_key_notation.mnv | 166 +++ uvim/runtime/syntax/testdir/input/mnv_lambdas.mnv | 135 +++ .../syntax/testdir/input/mnv_line_continuation.mnv | 51 + uvim/runtime/syntax/testdir/input/mnv_new.mnv | 21 + .../syntax/testdir/input/mnv_nmnv_features.mnv | 229 ++++ .../testdir/input/mnv_no_comment_strings.mnv | 22 + .../testdir/input/mnv_predefined_user_commands.mnv | 21 + uvim/runtime/syntax/testdir/input/mnv_shebang.mnv | 5 + .../runtime/syntax/testdir/input/mnv_variables.mnv | 411 +++++++ uvim/runtime/syntax/testdir/input/modula2_iso.def | 6 +- uvim/runtime/syntax/testdir/input/modula2_pim.def | 6 +- uvim/runtime/syntax/testdir/input/modula2_r10.def | 6 +- .../syntax/testdir/input/progress_comments.p | 2 +- .../syntax/testdir/input/python2_strings.py | 2 +- .../input/python_constants_builtin_default.py | 4 +- .../input/python_constants_builtin_highlight.py | 4 +- .../input/python_constants_keyword_default.py | 4 +- .../input/python_constants_keyword_highlight.py | 4 +- .../syntax/testdir/input/selftestdir/README.txt | 2 +- uvim/runtime/syntax/testdir/input/setup/help.mnv | 1 + uvim/runtime/syntax/testdir/input/setup/help.vim | 1 - .../syntax/testdir/input/setup/help_ex_version.mnv | 1 + .../syntax/testdir/input/setup/help_ex_version.vim | 1 - .../syntax/testdir/input/setup/html_fold_expr.mnv | 2 + .../syntax/testdir/input/setup/html_fold_expr.vim | 2 - .../testdir/input/setup/java_module_info.mnv | 30 + .../testdir/input/setup/java_module_info.vim | 30 - .../testdir/input/setup/markdown_circularity.mnv | 4 + .../testdir/input/setup/markdown_circularity.vim | 4 - .../testdir/input/setup/markdown_conceal.mnv | 8 + .../testdir/input/setup/markdown_conceal.vim | 8 - .../syntax/testdir/input/setup/mnv9_blocks.mnv | 1 + .../input/setup/mnv9_builtin_object_methods2.mnv | 1 + .../syntax/testdir/input/setup/mnv9_comments.mnv | 1 + .../testdir/input/setup/mnv9_def_variables.mnv | 1 + .../testdir/input/setup/mnv9_ex_class_fold.mnv | 1 + .../testdir/input/setup/mnv9_ex_commands.mnv | 1 + .../syntax/testdir/input/setup/mnv9_ex_enum.mnv | 1 + .../syntax/testdir/input/setup/mnv9_ex_enum2.mnv | 1 + .../syntax/testdir/input/setup/mnv9_ex_for.mnv | 1 + .../mnv9_ex_function_def_tail_comment_errors.mnv | 2 + .../setup/mnv9_ex_function_def_tail_comments.mnv | 2 + .../syntax/testdir/input/setup/mnv9_ex_import.mnv | 1 + .../testdir/input/setup/mnv9_ex_interface_fold.mnv | 1 + .../testdir/input/setup/mnv9_ex_let_heredoc.mnv | 2 + .../testdir/input/setup/mnv9_ex_loadkeymap.mnv | 1 + .../testdir/input/setup/mnv9_expressions.mnv | 1 + .../syntax/testdir/input/setup/mnv9_lambdas.mnv | 1 + .../testdir/input/setup/mnv9_legacy_header.mnv | 1 + .../input/setup/mnv9_super_this_keywords.mnv | 1 + .../input/setup/mnv9_super_this_keywords2.mnv | 1 + .../input/setup/mnv9_super_this_keywords3.mnv | 1 + .../syntax/testdir/input/setup/mnv9_variables.mnv | 1 + .../syntax/testdir/input/setup/mnv_comments.mnv | 1 + .../syntax/testdir/input/setup/mnv_ex_call.mnv | 1 + .../syntax/testdir/input/setup/mnv_ex_command.mnv | 1 + .../syntax/testdir/input/setup/mnv_ex_commands.mnv | 1 + .../syntax/testdir/input/setup/mnv_ex_def.mnv | 2 + .../syntax/testdir/input/setup/mnv_ex_def_fold.mnv | 2 + .../testdir/input/setup/mnv_ex_def_nested.mnv | 1 + .../testdir/input/setup/mnv_ex_def_nested_fold.mnv | 1 + .../syntax/testdir/input/setup/mnv_ex_echo.mnv | 1 + .../syntax/testdir/input/setup/mnv_ex_execute.mnv | 1 + .../syntax/testdir/input/setup/mnv_ex_for.mnv | 1 + .../syntax/testdir/input/setup/mnv_ex_function.mnv | 2 + .../mnv_ex_function_def_tail_comment_errors.mnv | 2 + .../setup/mnv_ex_function_def_tail_comments.mnv | 2 + .../testdir/input/setup/mnv_ex_function_fold.mnv | 2 + .../syntax/testdir/input/setup/mnv_ex_import.mnv | 1 + .../testdir/input/setup/mnv_ex_let_heredoc.mnv | 1 + .../testdir/input/setup/mnv_ex_loadkeymap.mnv | 1 + .../input/setup/mnv_ex_loadkeymap_after_bar.mnv | 1 + .../input/setup/mnv_ex_loadkeymap_after_colon.mnv | 1 + .../syntax/testdir/input/setup/mnv_ex_map.mnv | 1 + .../syntax/testdir/input/setup/mnv_ex_match.mnv | 1 + .../syntax/testdir/input/setup/mnv_ex_menu.mnv | 1 + .../syntax/testdir/input/setup/mnv_ex_redir.mnv | 2 + .../testdir/input/setup/mnv_ex_substitute.mnv | 1 + .../syntax/testdir/input/setup/mnv_ex_syntax.mnv | 2 + .../syntax/testdir/input/setup/mnv_expressions.mnv | 1 + .../testdir/input/setup/mnv_function_variables.mnv | 1 + .../syntax/testdir/input/setup/mnv_lambdas.mnv | 1 + .../testdir/input/setup/mnv_line_continuation.mnv | 1 + .../syntax/testdir/input/setup/mnv_variables.mnv | 1 + .../syntax/testdir/input/setup/vim9_blocks.vim | 1 - .../input/setup/vim9_builtin_object_methods2.vim | 1 - .../syntax/testdir/input/setup/vim9_comments.vim | 1 - .../testdir/input/setup/vim9_def_variables.vim | 1 - .../testdir/input/setup/vim9_ex_class_fold.vim | 1 - .../testdir/input/setup/vim9_ex_commands.vim | 1 - .../syntax/testdir/input/setup/vim9_ex_enum.vim | 1 - .../syntax/testdir/input/setup/vim9_ex_enum2.vim | 1 - .../syntax/testdir/input/setup/vim9_ex_for.vim | 1 - .../vim9_ex_function_def_tail_comment_errors.vim | 2 - .../setup/vim9_ex_function_def_tail_comments.vim | 2 - .../syntax/testdir/input/setup/vim9_ex_import.vim | 1 - .../testdir/input/setup/vim9_ex_interface_fold.vim | 1 - .../testdir/input/setup/vim9_ex_let_heredoc.vim | 2 - .../testdir/input/setup/vim9_ex_loadkeymap.vim | 1 - .../testdir/input/setup/vim9_expressions.vim | 1 - .../syntax/testdir/input/setup/vim9_lambdas.vim | 1 - .../testdir/input/setup/vim9_legacy_header.vim | 1 - .../input/setup/vim9_super_this_keywords.vim | 1 - .../input/setup/vim9_super_this_keywords2.vim | 1 - .../input/setup/vim9_super_this_keywords3.vim | 1 - .../syntax/testdir/input/setup/vim9_variables.vim | 1 - .../syntax/testdir/input/setup/vim_comments.vim | 1 - .../syntax/testdir/input/setup/vim_ex_call.vim | 1 - .../syntax/testdir/input/setup/vim_ex_command.vim | 1 - .../syntax/testdir/input/setup/vim_ex_commands.vim | 1 - .../syntax/testdir/input/setup/vim_ex_def.vim | 2 - .../syntax/testdir/input/setup/vim_ex_def_fold.vim | 2 - .../testdir/input/setup/vim_ex_def_nested.vim | 1 - .../testdir/input/setup/vim_ex_def_nested_fold.vim | 1 - .../syntax/testdir/input/setup/vim_ex_echo.vim | 1 - .../syntax/testdir/input/setup/vim_ex_execute.vim | 1 - .../syntax/testdir/input/setup/vim_ex_for.vim | 1 - .../syntax/testdir/input/setup/vim_ex_function.vim | 2 - .../vim_ex_function_def_tail_comment_errors.vim | 2 - .../setup/vim_ex_function_def_tail_comments.vim | 2 - .../testdir/input/setup/vim_ex_function_fold.vim | 2 - .../syntax/testdir/input/setup/vim_ex_import.vim | 1 - .../testdir/input/setup/vim_ex_let_heredoc.vim | 1 - .../testdir/input/setup/vim_ex_loadkeymap.vim | 1 - .../input/setup/vim_ex_loadkeymap_after_bar.vim | 1 - .../input/setup/vim_ex_loadkeymap_after_colon.vim | 1 - .../syntax/testdir/input/setup/vim_ex_map.vim | 1 - .../syntax/testdir/input/setup/vim_ex_match.vim | 1 - .../syntax/testdir/input/setup/vim_ex_menu.vim | 1 - .../syntax/testdir/input/setup/vim_ex_redir.vim | 2 - .../testdir/input/setup/vim_ex_substitute.vim | 1 - .../syntax/testdir/input/setup/vim_ex_syntax.vim | 2 - .../syntax/testdir/input/setup/vim_expressions.vim | 1 - .../testdir/input/setup/vim_function_variables.vim | 1 - .../syntax/testdir/input/setup/vim_lambdas.vim | 1 - .../testdir/input/setup/vim_line_continuation.vim | 1 - .../syntax/testdir/input/setup/vim_variables.vim | 1 - uvim/runtime/syntax/testdir/input/sh_09.sh | 2 +- uvim/runtime/syntax/testdir/input/sh_12.sh | 8 +- uvim/runtime/syntax/testdir/input/sh_13.sh | 2 +- .../syntax/testdir/input/sh_functions_bash.sh | 4 +- .../syntax/testdir/input/sh_functions_dash.sh | 4 +- .../syntax/testdir/input/sh_functions_ksh2020.sh | 4 +- .../syntax/testdir/input/sh_functions_ksh88.sh | 4 +- .../syntax/testdir/input/sh_functions_mksh.sh | 4 +- uvim/runtime/syntax/testdir/input/skhdrc.skhdrc | 2 +- .../syntax/testdir/input/sudoers_Defaults.sudoers | 6 +- uvim/runtime/syntax/testdir/input/tcsh.tcsh | 2 +- uvim/runtime/syntax/testdir/input/vim9_blocks.vim | 49 - .../testdir/input/vim9_builtin_object_methods.vim | 114 -- .../testdir/input/vim9_builtin_object_methods2.vim | 58 - .../syntax/testdir/input/vim9_comment_strings.vim | 27 - .../runtime/syntax/testdir/input/vim9_comments.vim | 99 -- .../syntax/testdir/input/vim9_constructors.vim | 18 - .../syntax/testdir/input/vim9_def_variables.vim | 226 ---- .../syntax/testdir/input/vim9_ex_class_fold.vim | 71 -- .../syntax/testdir/input/vim9_ex_commands.vim | 1211 -------------------- uvim/runtime/syntax/testdir/input/vim9_ex_echo.vim | 36 - uvim/runtime/syntax/testdir/input/vim9_ex_enum.vim | 111 -- .../runtime/syntax/testdir/input/vim9_ex_enum2.vim | 31 - .../syntax/testdir/input/vim9_ex_enum_fold.vim | 50 - uvim/runtime/syntax/testdir/input/vim9_ex_for.vim | 88 -- .../vim9_ex_function_def_tail_comment_errors.vim | 45 - .../input/vim9_ex_function_def_tail_comments.vim | 45 - .../syntax/testdir/input/vim9_ex_import.vim | 120 -- .../testdir/input/vim9_ex_interface_fold.vim | 38 - .../syntax/testdir/input/vim9_ex_let_heredoc.vim | 299 ----- .../syntax/testdir/input/vim9_ex_loadkeymap.vim | 28 - uvim/runtime/syntax/testdir/input/vim9_ex_type.vim | 12 - .../syntax/testdir/input/vim9_expressions.vim | 215 ---- .../syntax/testdir/input/vim9_function_calls.vim | 317 ----- .../input/vim9_generic_function_example_enum.vim | 36 - .../input/vim9_generic_function_example_list.vim | 215 ---- .../input/vim9_generic_function_example_set.vim | 177 --- .../testdir/input/vim9_generic_functions.vim | 97 -- uvim/runtime/syntax/testdir/input/vim9_lambdas.vim | 161 --- .../syntax/testdir/input/vim9_legacy_header.vim | 20 - .../testdir/input/vim9_legacy_header_fold.vim | 22 - .../testdir/input/vim9_no_comment_strings.vim | 27 - uvim/runtime/syntax/testdir/input/vim9_shebang.vim | 8 - .../testdir/input/vim9_super_this_keywords.vim | 87 -- .../testdir/input/vim9_super_this_keywords2.vim | 63 - .../testdir/input/vim9_super_this_keywords3.vim | 27 - uvim/runtime/syntax/testdir/input/vim9_tuples.vim | 25 - uvim/runtime/syntax/testdir/input/vim9_types.vim | 17 - .../testdir/input/vim9_types_example_object.vim | 29 - .../syntax/testdir/input/vim9_types_object.vim | 27 - .../syntax/testdir/input/vim9_variables.vim | 269 ----- .../syntax/testdir/input/vim_comment_strings.vim | 22 - uvim/runtime/syntax/testdir/input/vim_comments.vim | 83 -- .../syntax/testdir/input/vim_ex_abbreviate.vim | 54 - uvim/runtime/syntax/testdir/input/vim_ex_at.vim | 66 -- .../syntax/testdir/input/vim_ex_augroup.vim | 71 -- .../syntax/testdir/input/vim_ex_autocmd.vim | 257 ----- .../runtime/syntax/testdir/input/vim_ex_behave.vim | 9 - .../testdir/input/vim_ex_breakpoint_commands.vim | 95 -- uvim/runtime/syntax/testdir/input/vim_ex_call.vim | 52 - uvim/runtime/syntax/testdir/input/vim_ex_catch.vim | 19 - uvim/runtime/syntax/testdir/input/vim_ex_cd.vim | 110 -- .../syntax/testdir/input/vim_ex_command.vim | 196 ---- .../testdir/input/vim_ex_command_modifiers.vim | 135 --- .../syntax/testdir/input/vim_ex_commands.vim | 1210 ------------------- uvim/runtime/syntax/testdir/input/vim_ex_debug.vim | 13 - .../syntax/testdir/input/vim_ex_debuggreedy.vim | 34 - uvim/runtime/syntax/testdir/input/vim_ex_def.vim | 126 -- .../syntax/testdir/input/vim_ex_def_fold.vim | 185 --- .../syntax/testdir/input/vim_ex_def_nested.vim | 23 - .../testdir/input/vim_ex_def_nested_fold.vim | 25 - .../testdir/input/vim_ex_def_return_type.vim | 60 - uvim/runtime/syntax/testdir/input/vim_ex_defer.vim | 17 - .../syntax/testdir/input/vim_ex_delfunction.vim | 34 - .../syntax/testdir/input/vim_ex_do_commands.vim | 58 - uvim/runtime/syntax/testdir/input/vim_ex_echo.vim | 58 - uvim/runtime/syntax/testdir/input/vim_ex_eval.vim | 20 - .../syntax/testdir/input/vim_ex_execute.vim | 64 -- .../syntax/testdir/input/vim_ex_filetype.vim | 30 - .../runtime/syntax/testdir/input/vim_ex_filter.vim | 16 - uvim/runtime/syntax/testdir/input/vim_ex_for.vim | 60 - .../syntax/testdir/input/vim_ex_function.vim | 266 ----- .../vim_ex_function_def_tail_comment_errors.vim | 45 - .../input/vim_ex_function_def_tail_comments.vim | 45 - .../syntax/testdir/input/vim_ex_function_fold.vim | 349 ------ .../testdir/input/vim_ex_function_nested.vim | 40 - .../testdir/input/vim_ex_function_nested_fold.vim | 42 - uvim/runtime/syntax/testdir/input/vim_ex_grep.vim | 47 - uvim/runtime/syntax/testdir/input/vim_ex_help.vim | Bin 986 -> 0 bytes .../syntax/testdir/input/vim_ex_helpgrep.vim | 18 - .../syntax/testdir/input/vim_ex_highlight.vim | 108 -- .../syntax/testdir/input/vim_ex_history.vim | 89 -- .../runtime/syntax/testdir/input/vim_ex_import.vim | 119 -- .../syntax/testdir/input/vim_ex_language.vim | 172 --- .../syntax/testdir/input/vim_ex_let_heredoc.vim | 250 ---- .../syntax/testdir/input/vim_ex_loadkeymap.vim | 27 - .../testdir/input/vim_ex_loadkeymap_after_bar.vim | 11 - .../input/vim_ex_loadkeymap_after_colon.vim | 11 - uvim/runtime/syntax/testdir/input/vim_ex_lua.vim | 157 --- uvim/runtime/syntax/testdir/input/vim_ex_make.vim | 38 - uvim/runtime/syntax/testdir/input/vim_ex_map.vim | 124 -- uvim/runtime/syntax/testdir/input/vim_ex_mark.vim | 215 ---- uvim/runtime/syntax/testdir/input/vim_ex_match.vim | 64 -- uvim/runtime/syntax/testdir/input/vim_ex_menu.vim | 88 -- .../syntax/testdir/input/vim_ex_menutranslate.vim | 52 - .../syntax/testdir/input/vim_ex_mzscheme.vim | 157 --- .../runtime/syntax/testdir/input/vim_ex_normal.vim | 30 - uvim/runtime/syntax/testdir/input/vim_ex_perl.vim | 157 --- .../syntax/testdir/input/vim_ex_profile.vim | 48 - .../testdir/input/vim_ex_prompt_commands.vim | 46 - .../runtime/syntax/testdir/input/vim_ex_python.vim | 159 --- uvim/runtime/syntax/testdir/input/vim_ex_range.vim | 90 -- uvim/runtime/syntax/testdir/input/vim_ex_redir.vim | 71 -- uvim/runtime/syntax/testdir/input/vim_ex_ruby.vim | 157 --- uvim/runtime/syntax/testdir/input/vim_ex_set.vim | 131 --- .../syntax/testdir/input/vim_ex_set_backslash.vim | 79 -- uvim/runtime/syntax/testdir/input/vim_ex_sleep.vim | 13 - uvim/runtime/syntax/testdir/input/vim_ex_sort.vim | 64 -- .../syntax/testdir/input/vim_ex_substitute.vim | 208 ---- .../runtime/syntax/testdir/input/vim_ex_syntax.vim | 377 ------ .../syntax/testdir/input/vim_ex_syntime.vim | 38 - uvim/runtime/syntax/testdir/input/vim_ex_tcl.vim | 157 --- .../syntax/testdir/input/vim_ex_terminal.vim | 69 -- uvim/runtime/syntax/testdir/input/vim_ex_throw.vim | 7 - uvim/runtime/syntax/testdir/input/vim_ex_uniq.vim | 31 - .../syntax/testdir/input/vim_ex_vimgrep.vim | 69 -- .../runtime/syntax/testdir/input/vim_ex_wincmd.vim | 67 -- .../syntax/testdir/input/vim_expressions.vim | 426 ------- .../syntax/testdir/input/vim_function_calls.vim | 277 ----- .../testdir/input/vim_function_variables.vim | 414 ------- .../syntax/testdir/input/vim_key_notation.vim | 166 --- uvim/runtime/syntax/testdir/input/vim_lambdas.vim | 135 --- .../syntax/testdir/input/vim_line_continuation.vim | 51 - uvim/runtime/syntax/testdir/input/vim_new.vim | 21 - .../testdir/input/vim_no_comment_strings.vim | 22 - .../syntax/testdir/input/vim_nvim_features.vim | 229 ---- .../testdir/input/vim_predefined_user_commands.vim | 21 - uvim/runtime/syntax/testdir/input/vim_shebang.vim | 5 - .../runtime/syntax/testdir/input/vim_variables.vim | 411 ------- 428 files changed, 14885 insertions(+), 14885 deletions(-) create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_blocks.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_builtin_object_methods.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_builtin_object_methods2.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_comment_strings.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_comments.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_constructors.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_def_variables.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_ex_class_fold.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_ex_commands.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_ex_echo.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_ex_enum.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_ex_enum2.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_ex_enum_fold.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_ex_for.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_ex_function_def_tail_comment_errors.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_ex_function_def_tail_comments.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_ex_import.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_ex_interface_fold.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_ex_let_heredoc.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_ex_loadkeymap.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_ex_type.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_expressions.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_function_calls.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_generic_function_example_enum.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_generic_function_example_list.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_generic_function_example_set.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_generic_functions.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_lambdas.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_legacy_header.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_legacy_header_fold.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_no_comment_strings.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_shebang.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_super_this_keywords.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_super_this_keywords2.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_super_this_keywords3.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_tuples.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_types.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_types_example_object.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_types_object.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv9_variables.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_comment_strings.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_comments.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_abbreviate.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_at.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_augroup.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_autocmd.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_behave.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_breakpoint_commands.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_call.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_catch.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_cd.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_command.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_command_modifiers.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_commands.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_debug.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_debuggreedy.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_def.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_def_fold.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_def_nested.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_def_nested_fold.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_def_return_type.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_defer.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_delfunction.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_do_commands.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_echo.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_eval.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_execute.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_filetype.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_filter.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_for.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_function.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_function_def_tail_comment_errors.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_function_def_tail_comments.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_function_fold.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_function_nested.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_function_nested_fold.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_grep.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_help.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_helpgrep.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_highlight.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_history.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_import.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_language.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_let_heredoc.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_loadkeymap.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_loadkeymap_after_bar.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_loadkeymap_after_colon.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_lua.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_make.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_map.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_mark.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_match.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_menu.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_menutranslate.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_mnvgrep.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_mzscheme.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_normal.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_perl.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_profile.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_prompt_commands.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_python.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_range.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_redir.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_ruby.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_set.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_set_backslash.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_sleep.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_sort.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_substitute.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_syntax.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_syntime.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_tcl.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_terminal.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_throw.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_uniq.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_ex_wincmd.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_expressions.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_function_calls.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_function_variables.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_key_notation.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_lambdas.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_line_continuation.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_new.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_nmnv_features.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_no_comment_strings.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_predefined_user_commands.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_shebang.mnv create mode 100644 uvim/runtime/syntax/testdir/input/mnv_variables.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/help.mnv delete mode 100644 uvim/runtime/syntax/testdir/input/setup/help.vim create mode 100644 uvim/runtime/syntax/testdir/input/setup/help_ex_version.mnv delete mode 100644 uvim/runtime/syntax/testdir/input/setup/help_ex_version.vim create mode 100644 uvim/runtime/syntax/testdir/input/setup/html_fold_expr.mnv delete mode 100644 uvim/runtime/syntax/testdir/input/setup/html_fold_expr.vim create mode 100644 uvim/runtime/syntax/testdir/input/setup/java_module_info.mnv delete mode 100644 uvim/runtime/syntax/testdir/input/setup/java_module_info.vim create mode 100644 uvim/runtime/syntax/testdir/input/setup/markdown_circularity.mnv delete mode 100644 uvim/runtime/syntax/testdir/input/setup/markdown_circularity.vim create mode 100644 uvim/runtime/syntax/testdir/input/setup/markdown_conceal.mnv delete mode 100644 uvim/runtime/syntax/testdir/input/setup/markdown_conceal.vim create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_blocks.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_builtin_object_methods2.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_comments.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_def_variables.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_ex_class_fold.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_ex_commands.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_ex_enum.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_ex_enum2.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_ex_for.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_ex_function_def_tail_comment_errors.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_ex_function_def_tail_comments.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_ex_import.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_ex_interface_fold.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_ex_let_heredoc.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_ex_loadkeymap.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_expressions.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_lambdas.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_legacy_header.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_super_this_keywords.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_super_this_keywords2.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_super_this_keywords3.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv9_variables.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_comments.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_call.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_command.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_commands.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_def.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_def_fold.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_def_nested.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_def_nested_fold.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_echo.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_execute.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_for.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_function.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_function_def_tail_comment_errors.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_function_def_tail_comments.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_function_fold.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_import.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_let_heredoc.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_loadkeymap.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_loadkeymap_after_bar.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_loadkeymap_after_colon.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_map.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_match.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_menu.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_redir.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_substitute.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_ex_syntax.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_expressions.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_function_variables.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_lambdas.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_line_continuation.mnv create mode 100644 uvim/runtime/syntax/testdir/input/setup/mnv_variables.mnv delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_blocks.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_builtin_object_methods2.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_comments.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_def_variables.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_ex_class_fold.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_ex_commands.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_ex_enum.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_ex_enum2.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_ex_for.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_ex_function_def_tail_comment_errors.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_ex_function_def_tail_comments.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_ex_import.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_ex_interface_fold.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_ex_let_heredoc.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_ex_loadkeymap.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_expressions.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_lambdas.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_legacy_header.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_super_this_keywords.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_super_this_keywords2.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_super_this_keywords3.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim9_variables.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_comments.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_call.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_command.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_commands.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_def.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_def_fold.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_def_nested.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_def_nested_fold.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_echo.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_execute.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_for.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_function.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_function_def_tail_comment_errors.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_function_def_tail_comments.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_function_fold.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_import.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_let_heredoc.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_loadkeymap.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_loadkeymap_after_bar.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_loadkeymap_after_colon.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_map.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_match.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_menu.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_redir.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_substitute.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_ex_syntax.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_expressions.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_function_variables.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_lambdas.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_line_continuation.vim delete mode 100644 uvim/runtime/syntax/testdir/input/setup/vim_variables.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_blocks.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_builtin_object_methods.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_builtin_object_methods2.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_comment_strings.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_comments.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_constructors.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_def_variables.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_ex_class_fold.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_ex_commands.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_ex_echo.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_ex_enum.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_ex_enum2.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_ex_enum_fold.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_ex_for.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_ex_function_def_tail_comment_errors.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_ex_function_def_tail_comments.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_ex_import.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_ex_interface_fold.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_ex_let_heredoc.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_ex_loadkeymap.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_ex_type.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_expressions.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_function_calls.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_generic_function_example_enum.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_generic_function_example_list.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_generic_function_example_set.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_generic_functions.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_lambdas.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_legacy_header.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_legacy_header_fold.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_no_comment_strings.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_shebang.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_super_this_keywords.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_super_this_keywords2.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_super_this_keywords3.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_tuples.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_types.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_types_example_object.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_types_object.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim9_variables.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_comment_strings.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_comments.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_abbreviate.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_at.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_augroup.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_autocmd.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_behave.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_breakpoint_commands.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_call.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_catch.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_cd.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_command.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_command_modifiers.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_commands.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_debug.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_debuggreedy.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_def.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_def_fold.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_def_nested.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_def_nested_fold.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_def_return_type.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_defer.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_delfunction.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_do_commands.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_echo.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_eval.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_execute.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_filetype.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_filter.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_for.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_function.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_function_def_tail_comment_errors.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_function_def_tail_comments.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_function_fold.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_function_nested.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_function_nested_fold.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_grep.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_help.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_helpgrep.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_highlight.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_history.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_import.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_language.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_let_heredoc.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_loadkeymap.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_loadkeymap_after_bar.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_loadkeymap_after_colon.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_lua.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_make.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_map.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_mark.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_match.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_menu.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_menutranslate.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_mzscheme.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_normal.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_perl.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_profile.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_prompt_commands.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_python.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_range.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_redir.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_ruby.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_set.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_set_backslash.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_sleep.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_sort.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_substitute.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_syntax.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_syntime.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_tcl.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_terminal.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_throw.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_uniq.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_vimgrep.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_ex_wincmd.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_expressions.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_function_calls.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_function_variables.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_key_notation.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_lambdas.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_line_continuation.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_new.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_no_comment_strings.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_nvim_features.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_predefined_user_commands.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_shebang.vim delete mode 100644 uvim/runtime/syntax/testdir/input/vim_variables.vim (limited to 'uvim/runtime/syntax/testdir/input') diff --git a/uvim/runtime/syntax/testdir/input/c.c b/uvim/runtime/syntax/testdir/input/c.c index 595721b0a5..52336cd034 100644 --- a/uvim/runtime/syntax/testdir/input/c.c +++ b/uvim/runtime/syntax/testdir/input/c.c @@ -1,15 +1,15 @@ /* vi:set ts=8 sts=4 sw=4 noet: - * VIM_TEST_SETUP let g:c_comment_strings = 1 + * MNV_TEST_SETUP let g:c_comment_strings = 1 * - * VIM - Vi IMproved by Bram Moolenaar + * MNV - MNV is not Vim by Bram Moolenaar * - * Do ":help uganda" in Vim to read copying and usage conditions. - * Do ":help credits" in Vim to see a list of people who contributed. - * See README.txt for an overview of the Vim source code. + * Do ":help uganda" in MNV to read copying and usage conditions. + * Do ":help credits" in MNV to see a list of people who contributed. + * See README.txt for an overview of the MNV source code. */ #define EXTERN -#include "vim.h" +#include "mnv.h" #ifdef __CYGWIN__ # include @@ -18,7 +18,7 @@ # include #endif -#if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL)) +#if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(MNVDLL)) # include "iscygpty.h" #endif @@ -29,12 +29,12 @@ #define EDIT_TAG 3 // tag name argument given, use tagname #define EDIT_QF 4 // start in quickfix mode -#if (defined(UNIX) || defined(VMS)) && !defined(NO_VIM_MAIN) +#if (defined(UNIX) || defined(VMS)) && !defined(NO_MNV_MAIN) static int file_owned(char *fname); #endif static void mainerr(int, char_u *); static void early_arg_scan(mparm_T *parmp); -#ifndef NO_VIM_MAIN +#ifndef NO_MNV_MAIN static void usage(void); static void parse_command_name(mparm_T *parmp); static void command_line_scan(mparm_T *parmp); @@ -81,18 +81,18 @@ static mparm_T params; static void *s_vbuf = NULL; // buffer for setvbuf() #endif -#ifndef NO_VIM_MAIN // skip this for unittests +#ifndef NO_MNV_MAIN // skip this for unittests static char_u *start_dir = NULL; // current working dir on startup static int has_dash_c_arg = FALSE; -# ifdef VIMDLL +# ifdef MNVDLL __declspec(dllexport) # endif int # ifdef MSWIN -VimMain +MNVMain # else main # endif @@ -118,6 +118,6 @@ main */ return mzscheme_main(); #else - return vim_main2(); + return mnv_main2(); #endif } diff --git a/uvim/runtime/syntax/testdir/input/codeowners.txt b/uvim/runtime/syntax/testdir/input/codeowners.txt index e72a77035f..c2fb96cb2d 100644 --- a/uvim/runtime/syntax/testdir/input/codeowners.txt +++ b/uvim/runtime/syntax/testdir/input/codeowners.txt @@ -9,4 +9,4 @@ docs/* docs@example.com @other **/logs @octocat -# vim: set ft=codeowners: +# mnv: set ft=codeowners: diff --git a/uvim/runtime/syntax/testdir/input/cpp_noreturn.cpp b/uvim/runtime/syntax/testdir/input/cpp_noreturn.cpp index 9c50dea2ec..b4457e055e 100644 --- a/uvim/runtime/syntax/testdir/input/cpp_noreturn.cpp +++ b/uvim/runtime/syntax/testdir/input/cpp_noreturn.cpp @@ -1,6 +1,6 @@ // C++ attributes - noreturn (since C++11) -// Source: https://en.cppreference.com/w/c/language/noreturn.html [modified by Vim Project] +// Source: https://en.cppreference.com/w/c/language/noreturn.html [modified by MNV Project] #include #include diff --git a/uvim/runtime/syntax/testdir/input/csh.csh b/uvim/runtime/syntax/testdir/input/csh.csh index 332b626e52..1dfc1fd296 100644 --- a/uvim/runtime/syntax/testdir/input/csh.csh +++ b/uvim/runtime/syntax/testdir/input/csh.csh @@ -1,4 +1,4 @@ -# https://github.com/vim/vim/pull/19172#issuecomment-3751574224 +# https://github.com/Project-Tick/Project-Tick/pull/19172#issuecomment-3751574224 set script_dir="" #comment set script_dir="" diff --git a/uvim/runtime/syntax/testdir/input/gdb_multiline_commands.gdb b/uvim/runtime/syntax/testdir/input/gdb_multiline_commands.gdb index 747d5d4c44..6738921d9a 100644 --- a/uvim/runtime/syntax/testdir/input/gdb_multiline_commands.gdb +++ b/uvim/runtime/syntax/testdir/input/gdb_multiline_commands.gdb @@ -1,5 +1,5 @@ # GDB multiline commands -# VIM_TEST_SETUP setl fdc=2 fdl=999 fdm=syntax +# MNV_TEST_SETUP setl fdc=2 fdl=999 fdm=syntax define hello echo Hello, world!\n diff --git a/uvim/runtime/syntax/testdir/input/help.txt b/uvim/runtime/syntax/testdir/input/help.txt index 2338bbcc94..d7eb03271f 100644 --- a/uvim/runtime/syntax/testdir/input/help.txt +++ b/uvim/runtime/syntax/testdir/input/help.txt @@ -1,21 +1,21 @@ - VIM REFERENCE MANUAL by Bram Moolenaar + MNV REFERENCE MANUAL by Bram Moolenaar and Somebody Else and Another Person - VIM USER MANUAL by Bram Moolenaar + MNV USER MANUAL by Bram Moolenaar and Somebody Else and Another Person -VIM HELP FILE FORMAT +MNV HELP FILE FORMAT -Issue #17721 (Strange >vim highlighting in help documentation?)~ +Issue #17721 (Strange >mnv highlighting in help documentation?)~ - *restore-cursor* *last-position-jump* >vim + *restore-cursor* *last-position-jump* >mnv augroup RestoreCursor autocmd! autocmd BufReadPost * @@ -37,25 +37,25 @@ recommended style (https://ziglang.org/documentation/master/): > NOTE, WARNING and DEPRECATED~ -When you 'send a file to Vim', Vim changes to that file's directory. Note, +When you 'send a file to MNV', MNV changes to that file's directory. Note, however, that any long directory names will appear in their short (MS-DOS) form on some Windows versions. This is a limitation of the Windows "Send To" mechanism. EXAMPLE LANGUAGES~ - *vim9-mix* -There is one way to use both legacy and Vim9 syntax in one script file: >vim9 + *mnv9-mix* +There is one way to use both legacy and MNV9 syntax in one script file: >mnv9 - " legacy Vim script comments may go here - if !has('vim9script') - " legacy Vim script commands go here + " legacy MNV script comments may go here + if !has('mnv9script') + " legacy MNV script commands go here finish endif - vim9script - # Vim9 script commands go here + mnv9script + # MNV9 script commands go here -This allows for writing a script that takes advantage of the Vim9 script -syntax if possible, but will also work on a Vim version without it. +This allows for writing a script that takes advantage of the MNV9 script +syntax if possible, but will also work on a MNV version without it. - vim:tw=78:ts=8:noet:ft=help:norl: + mnv:tw=78:ts=8:noet:ft=help:norl: diff --git a/uvim/runtime/syntax/testdir/input/help_ex_version.txt b/uvim/runtime/syntax/testdir/input/help_ex_version.txt index 0333abfde0..474e1800f8 100644 --- a/uvim/runtime/syntax/testdir/input/help_ex_version.txt +++ b/uvim/runtime/syntax/testdir/input/help_ex_version.txt @@ -6,10 +6,10 @@ date is mentioned. Otherwise a fixed release-date is shown. The following lines contain information about which - features were enabled when Vim was compiled. When + features were enabled when MNV was compiled. When there is a preceding '+', the feature is included, when there is a '-' it is excluded. To change this, - you have to edit feature.h and recompile Vim. + you have to edit feature.h and recompile MNV. To check for this in an expression, see |has()|. Here is an overview of the features. The first column shows the smallest version in which @@ -21,7 +21,7 @@ - never, feature was removed (none) system dependent Thus if a feature is marked with "N", it is included - in the normal and huge versions of Vim. + in the normal and huge versions of MNV. *+feature-list* *+acl* |ACL| support included @@ -69,13 +69,13 @@ m *+debug* Compiled for debugging. N *+dialog_gui* Support for |:confirm| with GUI dialog. N *+dialog_con* Support for |:confirm| with console dialog. N *+dialog_con_gui* Support for |:confirm| with GUI and console dialog. -N *+diff* |vimdiff| and 'diff' +N *+diff* |mnvdiff| and 'diff' N *+digraphs* |digraphs| *E196* *+directx* Win32 GUI only: DirectX and 'renderoptions' *+dnd* Support for DnD into the "~ register |quote_~|. H *+emacs_tags* |emacs-tags| files N *+eval* expression evaluation |eval.txt| -T *+ex_extra* always on now, used to be for Vim's extra Ex commands +T *+ex_extra* always on now, used to be for MNV's extra Ex commands N *+extra_search* 'hlsearch' and 'incsearch' options. - *+farsi* Removed: |farsi| language T *+file_in_path* |gf|, |CTRL-W_f| and || Always enabled since @@ -105,7 +105,7 @@ H *+langmap* 'langmap' N *+libcall* |libcall()| N *+linebreak* 'linebreak', 'breakat' and 'showbreak' T *+lispindent* 'lisp' -T *+listcmds* Vim commands for the list of buffers |buffer-hidden| +T *+listcmds* MNV commands for the list of buffers |buffer-hidden| and argument list |:argdelete| T *+localmap* Support for mappings local to a buffer |:map-local| m *+lua* |Lua| interface @@ -194,8 +194,8 @@ T *+user_commands* User-defined commands. |user-commands| H *+vartabs* Variable-width tab stops. 'vartabstop' T *+vertsplit* Vertically split windows |:vsplit|; Always enabled since 8.0.1118. -T *+vim9script* |Vim9| script -N *+viminfo* 'viminfo' +T *+mnv9script* |MNV9| script +N *+mnvinfo* 'mnvinfo' T *+virtualedit* 'virtualedit' Always enabled since 8.1.826. T *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200. T *+visualextra* extra Visual mode commands |blockwise-operators| @@ -227,7 +227,7 @@ N *+X11* Unix only: can restore window title |X11| be dynamically loaded. :ve[rsion] {nr} Is now ignored. This was previously used to check the - version number of a .vimrc file. It was removed, + version number of a .mnvrc file. It was removed, because you can now use the ":if" command for version-dependent behavior. @@ -235,4 +235,4 @@ N *+X11* Unix only: can restore window title |X11| :redi[r][!] > {file} Redirect messages to file {file}. The messages which - vim:tw=78:ts=8:noet:ft=help:norl: + mnv:tw=78:ts=8:noet:ft=help:norl: diff --git a/uvim/runtime/syntax/testdir/input/html.html b/uvim/runtime/syntax/testdir/input/html.html index a4d0eb5d8f..4a9b7a471d 100644 --- a/uvim/runtime/syntax/testdir/input/html.html +++ b/uvim/runtime/syntax/testdir/input/html.html @@ -2,7 +2,7 @@ HTML Syntax Test File Maintainer: Doug Kearns Last Change: 2024 Jun 13 - VIM_TEST_SETUP let g:html_no_rendering = 1 + MNV_TEST_SETUP let g:html_no_rendering = 1 TODO: Investigate macOS test failures when comparing italicized text with, for example, and elements. FreeBSD fails with an empty diff --git a/uvim/runtime/syntax/testdir/input/html_fold_expr.html b/uvim/runtime/syntax/testdir/input/html_fold_expr.html index f85e7fa003..81be6463a7 100644 --- a/uvim/runtime/syntax/testdir/input/html_fold_expr.html +++ b/uvim/runtime/syntax/testdir/input/html_fold_expr.html @@ -1,6 +1,6 @@ diff --git a/uvim/runtime/syntax/testdir/input/java_annotations.java b/uvim/runtime/syntax/testdir/input/java_annotations.java index c5871c3c8d..969f3b3be5 100644 --- a/uvim/runtime/syntax/testdir/input/java_annotations.java +++ b/uvim/runtime/syntax/testdir/input/java_annotations.java @@ -1,4 +1,4 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'style' +// MNV_TEST_SETUP let g:java_highlight_functions = 'style' import java.lang.annotation.ElementType; diff --git a/uvim/runtime/syntax/testdir/input/java_annotations_signature.java b/uvim/runtime/syntax/testdir/input/java_annotations_signature.java index 8236218550..c85732a704 100644 --- a/uvim/runtime/syntax/testdir/input/java_annotations_signature.java +++ b/uvim/runtime/syntax/testdir/input/java_annotations_signature.java @@ -1,5 +1,5 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'style' -// VIM_TEST_SETUP let g:java_highlight_signature = 1 +// MNV_TEST_SETUP let g:java_highlight_functions = 'style' +// MNV_TEST_SETUP let g:java_highlight_signature = 1 import java.lang.annotation.ElementType; import java.lang.annotation.Target; diff --git a/uvim/runtime/syntax/testdir/input/java_comments_html.java b/uvim/runtime/syntax/testdir/input/java_comments_html.java index 74e0e1515f..6951344443 100644 --- a/uvim/runtime/syntax/testdir/input/java_comments_html.java +++ b/uvim/runtime/syntax/testdir/input/java_comments_html.java @@ -1,16 +1,16 @@ -// VIM_TEST_SETUP unlet! g:java_no_tab_space_error g:java_ignore_javadoc -// VIM_TEST_SETUP unlet! g:java_no_trail_space_error -// VIM_TEST_SETUP unlet! g:java_consent_to_html_syntax_folding -// VIM_TEST_SETUP let[g:java_space_errors,g:java_comment_strings]=[1,1] -// VIM_TEST_SETUP let[g:java_ignore_markdown,g:html_syntax_folding]=[1,1] -// VIM_TEST_SETUP let g:markdown_fenced_languages = ["java"] +// MNV_TEST_SETUP unlet! g:java_no_tab_space_error g:java_ignore_javadoc +// MNV_TEST_SETUP unlet! g:java_no_trail_space_error +// MNV_TEST_SETUP unlet! g:java_consent_to_html_syntax_folding +// MNV_TEST_SETUP let[g:java_space_errors,g:java_comment_strings]=[1,1] +// MNV_TEST_SETUP let[g:java_ignore_markdown,g:html_syntax_folding]=[1,1] +// MNV_TEST_SETUP let g:markdown_fenced_languages = ["java"] -// VIM_TEST_SETUP setlocal spell fdc=2 fdl=64 fdm=syntax fen -// VIM_TEST_SETUP highlight link javaCommentStart Todo -// VIM_TEST_SETUP highlight link javaCommentTitle Underlined +// MNV_TEST_SETUP setlocal spell fdc=2 fdl=64 fdm=syntax fen +// MNV_TEST_SETUP highlight link javaCommentStart Todo +// MNV_TEST_SETUP highlight link javaCommentTitle Underlined diff --git a/uvim/runtime/syntax/testdir/input/java_comments_markdown.java b/uvim/runtime/syntax/testdir/input/java_comments_markdown.java index c6be7312b0..1e4d56e529 100644 --- a/uvim/runtime/syntax/testdir/input/java_comments_markdown.java +++ b/uvim/runtime/syntax/testdir/input/java_comments_markdown.java @@ -1,18 +1,18 @@ -// VIM_TEST_SETUP unlet! g:java_no_tab_space_error g:java_ignore_javadoc -// VIM_TEST_SETUP unlet! g:java_no_trail_space_error -// VIM_TEST_SETUP let[g:java_space_errors,g:java_comment_strings]=[1,1] -// VIM_TEST_SETUP let[g:java_ignore_html,g:markdown_syntax_conceal]=[1,1] -// VIM_TEST_SETUP let g:html_syntax_folding = 1 -// VIM_TEST_SETUP let g:java_consent_to_html_syntax_folding = 1 -// VIM_TEST_SETUP let g:markdown_fenced_languages = ["java"] - - -// VIM_TEST_SETUP defer execute('match Visual /\%>21l\s\+$/') -// VIM_TEST_SETUP setl spell fdc=2 fdl=64 fdm=syntax fen cole=3 cocu=n -// VIM_TEST_SETUP highlight link javaCommentStart Todo -// VIM_TEST_SETUP highlight link javaMarkdownCommentTitle Underlined -// VIM_TEST_SETUP highlight link markdownH2 NonText -// VIM_TEST_SETUP highlight link markdownHeadingRule NonText +// MNV_TEST_SETUP unlet! g:java_no_tab_space_error g:java_ignore_javadoc +// MNV_TEST_SETUP unlet! g:java_no_trail_space_error +// MNV_TEST_SETUP let[g:java_space_errors,g:java_comment_strings]=[1,1] +// MNV_TEST_SETUP let[g:java_ignore_html,g:markdown_syntax_conceal]=[1,1] +// MNV_TEST_SETUP let g:html_syntax_folding = 1 +// MNV_TEST_SETUP let g:java_consent_to_html_syntax_folding = 1 +// MNV_TEST_SETUP let g:markdown_fenced_languages = ["java"] + + +// MNV_TEST_SETUP defer execute('match Visual /\%>21l\s\+$/') +// MNV_TEST_SETUP setl spell fdc=2 fdl=64 fdm=syntax fen cole=3 cocu=n +// MNV_TEST_SETUP highlight link javaCommentStart Todo +// MNV_TEST_SETUP highlight link javaMarkdownCommentTitle Underlined +// MNV_TEST_SETUP highlight link markdownH2 NonText +// MNV_TEST_SETUP highlight link markdownHeadingRule NonText diff --git a/uvim/runtime/syntax/testdir/input/java_contextual_keywords.java b/uvim/runtime/syntax/testdir/input/java_contextual_keywords.java index c38854d31f..af1377cf2f 100644 --- a/uvim/runtime/syntax/testdir/input/java_contextual_keywords.java +++ b/uvim/runtime/syntax/testdir/input/java_contextual_keywords.java @@ -1,4 +1,4 @@ -// VIM_TEST_SETUP highlight link javaConceptKind NonText +// MNV_TEST_SETUP highlight link javaConceptKind NonText diff --git a/uvim/runtime/syntax/testdir/input/java_enfoldment.java b/uvim/runtime/syntax/testdir/input/java_enfoldment.java index ecf763905f..3afeaaec69 100644 --- a/uvim/runtime/syntax/testdir/input/java_enfoldment.java +++ b/uvim/runtime/syntax/testdir/input/java_enfoldment.java @@ -1,15 +1,15 @@ -// VIM_TEST_SETUP setlocal fen fdc=2 fdl=8 fdm=syntax -// VIM_TEST_SETUP let g:java_foldtext_show_first_or_second_line = 1 -// VIM_TEST_SETUP let g:java_highlight_java_lang = 1 -// VIM_TEST_SETUP let g:java_ignore_folding = "x" -// VIM_TEST_SETUP let g:java_lookbehind_byte_counts = {'javaBlock': -1} +// MNV_TEST_SETUP setlocal fen fdc=2 fdl=8 fdm=syntax +// MNV_TEST_SETUP let g:java_foldtext_show_first_or_second_line = 1 +// MNV_TEST_SETUP let g:java_highlight_java_lang = 1 +// MNV_TEST_SETUP let g:java_ignore_folding = "x" +// MNV_TEST_SETUP let g:java_lookbehind_byte_counts = {'javaBlock': -1} -// VIM_TEST_SETUP highlight link javaBlockOtherStart Structure -// VIM_TEST_SETUP highlight link javaBlockStart Todo +// MNV_TEST_SETUP highlight link javaBlockOtherStart Structure +// MNV_TEST_SETUP highlight link javaBlockStart Todo diff --git a/uvim/runtime/syntax/testdir/input/java_generics.java b/uvim/runtime/syntax/testdir/input/java_generics.java index 35f978e0ae..4dc760c6ec 100644 --- a/uvim/runtime/syntax/testdir/input/java_generics.java +++ b/uvim/runtime/syntax/testdir/input/java_generics.java @@ -1,11 +1,11 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'style' -// VIM_TEST_SETUP let g:java_highlight_generics = 1 -// VIM_TEST_SETUP let g:java_highlight_java_lang = 1 +// MNV_TEST_SETUP let g:java_highlight_functions = 'style' +// MNV_TEST_SETUP let g:java_highlight_generics = 1 +// MNV_TEST_SETUP let g:java_highlight_java_lang = 1 -// VIM_TEST_SETUP hi link javaGenericsC1 Todo -// VIM_TEST_SETUP hi link javaGenericsC2 Error -// VIM_TEST_SETUP hi link javaWildcardBound Error +// MNV_TEST_SETUP hi link javaGenericsC1 Todo +// MNV_TEST_SETUP hi link javaGenericsC2 Error +// MNV_TEST_SETUP hi link javaWildcardBound Error import java.math.BigInteger; diff --git a/uvim/runtime/syntax/testdir/input/java_generics_signature.java b/uvim/runtime/syntax/testdir/input/java_generics_signature.java index 37617143a4..9c0d4d5ac6 100644 --- a/uvim/runtime/syntax/testdir/input/java_generics_signature.java +++ b/uvim/runtime/syntax/testdir/input/java_generics_signature.java @@ -1,11 +1,11 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'style' -// VIM_TEST_SETUP let g:java_highlight_signature = 1 -// VIM_TEST_SETUP let g:java_highlight_generics = 1 -// VIM_TEST_SETUP let g:java_highlight_java_lang = 1 - -// VIM_TEST_SETUP hi link javaGenericsC1 Todo -// VIM_TEST_SETUP hi link javaGenericsC2 Error -// VIM_TEST_SETUP hi link javaWildcardBound Error +// MNV_TEST_SETUP let g:java_highlight_functions = 'style' +// MNV_TEST_SETUP let g:java_highlight_signature = 1 +// MNV_TEST_SETUP let g:java_highlight_generics = 1 +// MNV_TEST_SETUP let g:java_highlight_java_lang = 1 + +// MNV_TEST_SETUP hi link javaGenericsC1 Todo +// MNV_TEST_SETUP hi link javaGenericsC2 Error +// MNV_TEST_SETUP hi link javaWildcardBound Error import java.math.BigInteger; diff --git a/uvim/runtime/syntax/testdir/input/java_lambda_expressions.java b/uvim/runtime/syntax/testdir/input/java_lambda_expressions.java index 95531f918f..31974a9a0e 100644 --- a/uvim/runtime/syntax/testdir/input/java_lambda_expressions.java +++ b/uvim/runtime/syntax/testdir/input/java_lambda_expressions.java @@ -1,4 +1,4 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'style' +// MNV_TEST_SETUP let g:java_highlight_functions = 'style' import java.lang.annotation.ElementType; diff --git a/uvim/runtime/syntax/testdir/input/java_lambda_expressions_signature.java b/uvim/runtime/syntax/testdir/input/java_lambda_expressions_signature.java index 0d89e9c8e9..f15c379f17 100644 --- a/uvim/runtime/syntax/testdir/input/java_lambda_expressions_signature.java +++ b/uvim/runtime/syntax/testdir/input/java_lambda_expressions_signature.java @@ -1,5 +1,5 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'style' -// VIM_TEST_SETUP let g:java_highlight_signature = 1 +// MNV_TEST_SETUP let g:java_highlight_functions = 'style' +// MNV_TEST_SETUP let g:java_highlight_signature = 1 import java.lang.annotation.ElementType; import java.util.function.BinaryOperator; diff --git a/uvim/runtime/syntax/testdir/input/java_method_references.java b/uvim/runtime/syntax/testdir/input/java_method_references.java index 640ab1edb0..7942308148 100644 --- a/uvim/runtime/syntax/testdir/input/java_method_references.java +++ b/uvim/runtime/syntax/testdir/input/java_method_references.java @@ -1,5 +1,5 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'style' -// VIM_TEST_SETUP let g:java_highlight_generics = 1 +// MNV_TEST_SETUP let g:java_highlight_functions = 'style' +// MNV_TEST_SETUP let g:java_highlight_generics = 1 import java.lang.invoke.MethodHandle; diff --git a/uvim/runtime/syntax/testdir/input/java_method_references_signature.java b/uvim/runtime/syntax/testdir/input/java_method_references_signature.java index 61e4c0da3a..8abfa1af8e 100644 --- a/uvim/runtime/syntax/testdir/input/java_method_references_signature.java +++ b/uvim/runtime/syntax/testdir/input/java_method_references_signature.java @@ -1,6 +1,6 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'style' -// VIM_TEST_SETUP let g:java_highlight_signature = 1 -// VIM_TEST_SETUP let g:java_highlight_generics = 1 +// MNV_TEST_SETUP let g:java_highlight_functions = 'style' +// MNV_TEST_SETUP let g:java_highlight_signature = 1 +// MNV_TEST_SETUP let g:java_highlight_generics = 1 import java.lang.invoke.MethodHandle; import java.util.function.BiPredicate; diff --git a/uvim/runtime/syntax/testdir/input/java_methods_indent2.java b/uvim/runtime/syntax/testdir/input/java_methods_indent2.java index 507bc7333c..ed904eaccb 100644 --- a/uvim/runtime/syntax/testdir/input/java_methods_indent2.java +++ b/uvim/runtime/syntax/testdir/input/java_methods_indent2.java @@ -1,6 +1,6 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'indent2' -// VIM_TEST_SETUP let g:java_highlight_generics = 1 -// VIM_TEST_SETUP set encoding=utf-8 termencoding=utf-8 +// MNV_TEST_SETUP let g:java_highlight_functions = 'indent2' +// MNV_TEST_SETUP let g:java_highlight_generics = 1 +// MNV_TEST_SETUP set encoding=utf-8 termencoding=utf-8 import java.lang.annotation.ElementType; import java.lang.annotation.Target; diff --git a/uvim/runtime/syntax/testdir/input/java_methods_indent2_signature.java b/uvim/runtime/syntax/testdir/input/java_methods_indent2_signature.java index 2fdc5c294c..1594f4f46a 100644 --- a/uvim/runtime/syntax/testdir/input/java_methods_indent2_signature.java +++ b/uvim/runtime/syntax/testdir/input/java_methods_indent2_signature.java @@ -1,6 +1,6 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'indent2' -// VIM_TEST_SETUP let g:java_highlight_signature = 1 -// VIM_TEST_SETUP set encoding=utf-8 termencoding=utf-8 +// MNV_TEST_SETUP let g:java_highlight_functions = 'indent2' +// MNV_TEST_SETUP let g:java_highlight_signature = 1 +// MNV_TEST_SETUP set encoding=utf-8 termencoding=utf-8 import java.lang.annotation.ElementType; import java.lang.annotation.Target; diff --git a/uvim/runtime/syntax/testdir/input/java_methods_indent4.java b/uvim/runtime/syntax/testdir/input/java_methods_indent4.java index 48f13f8f58..96ed361c11 100644 --- a/uvim/runtime/syntax/testdir/input/java_methods_indent4.java +++ b/uvim/runtime/syntax/testdir/input/java_methods_indent4.java @@ -1,6 +1,6 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'indent4' -// VIM_TEST_SETUP let g:java_highlight_generics = 1 -// VIM_TEST_SETUP set encoding=utf-8 termencoding=utf-8 +// MNV_TEST_SETUP let g:java_highlight_functions = 'indent4' +// MNV_TEST_SETUP let g:java_highlight_generics = 1 +// MNV_TEST_SETUP set encoding=utf-8 termencoding=utf-8 import java.lang.annotation.ElementType; import java.lang.annotation.Target; diff --git a/uvim/runtime/syntax/testdir/input/java_methods_indent4_signature.java b/uvim/runtime/syntax/testdir/input/java_methods_indent4_signature.java index ee101d2a37..6da95e30df 100644 --- a/uvim/runtime/syntax/testdir/input/java_methods_indent4_signature.java +++ b/uvim/runtime/syntax/testdir/input/java_methods_indent4_signature.java @@ -1,6 +1,6 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'indent4' -// VIM_TEST_SETUP let g:java_highlight_signature = 1 -// VIM_TEST_SETUP set encoding=utf-8 termencoding=utf-8 +// MNV_TEST_SETUP let g:java_highlight_functions = 'indent4' +// MNV_TEST_SETUP let g:java_highlight_signature = 1 +// MNV_TEST_SETUP set encoding=utf-8 termencoding=utf-8 import java.lang.annotation.ElementType; import java.lang.annotation.Target; diff --git a/uvim/runtime/syntax/testdir/input/java_methods_indent8.java b/uvim/runtime/syntax/testdir/input/java_methods_indent8.java index 0c672a8948..ed41f39f44 100644 --- a/uvim/runtime/syntax/testdir/input/java_methods_indent8.java +++ b/uvim/runtime/syntax/testdir/input/java_methods_indent8.java @@ -1,6 +1,6 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'indent8' -// VIM_TEST_SETUP let g:java_highlight_generics = 1 -// VIM_TEST_SETUP set encoding=utf-8 termencoding=utf-8 +// MNV_TEST_SETUP let g:java_highlight_functions = 'indent8' +// MNV_TEST_SETUP let g:java_highlight_generics = 1 +// MNV_TEST_SETUP set encoding=utf-8 termencoding=utf-8 import java.lang.annotation.ElementType; import java.lang.annotation.Target; diff --git a/uvim/runtime/syntax/testdir/input/java_methods_indent8_signature.java b/uvim/runtime/syntax/testdir/input/java_methods_indent8_signature.java index 57c02a42cf..f2f7de17a0 100644 --- a/uvim/runtime/syntax/testdir/input/java_methods_indent8_signature.java +++ b/uvim/runtime/syntax/testdir/input/java_methods_indent8_signature.java @@ -1,6 +1,6 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'indent8' -// VIM_TEST_SETUP let g:java_highlight_signature = 1 -// VIM_TEST_SETUP set encoding=utf-8 termencoding=utf-8 +// MNV_TEST_SETUP let g:java_highlight_functions = 'indent8' +// MNV_TEST_SETUP let g:java_highlight_signature = 1 +// MNV_TEST_SETUP set encoding=utf-8 termencoding=utf-8 import java.lang.annotation.ElementType; import java.lang.annotation.Target; diff --git a/uvim/runtime/syntax/testdir/input/java_methods_style.java b/uvim/runtime/syntax/testdir/input/java_methods_style.java index 50bfa96ba5..e927b817c7 100644 --- a/uvim/runtime/syntax/testdir/input/java_methods_style.java +++ b/uvim/runtime/syntax/testdir/input/java_methods_style.java @@ -1,6 +1,6 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'style' -// VIM_TEST_SETUP let g:java_highlight_generics = 1 -// VIM_TEST_SETUP set encoding=utf-8 termencoding=utf-8 +// MNV_TEST_SETUP let g:java_highlight_functions = 'style' +// MNV_TEST_SETUP let g:java_highlight_generics = 1 +// MNV_TEST_SETUP set encoding=utf-8 termencoding=utf-8 import java.lang.annotation.ElementType; import java.lang.annotation.Target; diff --git a/uvim/runtime/syntax/testdir/input/java_methods_style_signature.java b/uvim/runtime/syntax/testdir/input/java_methods_style_signature.java index a0a3d18bef..f713ebeae6 100644 --- a/uvim/runtime/syntax/testdir/input/java_methods_style_signature.java +++ b/uvim/runtime/syntax/testdir/input/java_methods_style_signature.java @@ -1,6 +1,6 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'style' -// VIM_TEST_SETUP let g:java_highlight_signature = 1 -// VIM_TEST_SETUP set encoding=utf-8 termencoding=utf-8 +// MNV_TEST_SETUP let g:java_highlight_functions = 'style' +// MNV_TEST_SETUP let g:java_highlight_signature = 1 +// MNV_TEST_SETUP set encoding=utf-8 termencoding=utf-8 import java.lang.annotation.ElementType; import java.lang.annotation.Target; diff --git a/uvim/runtime/syntax/testdir/input/java_previews_430.java b/uvim/runtime/syntax/testdir/input/java_previews_430.java index 15d8ba2cea..34f0078ff5 100644 --- a/uvim/runtime/syntax/testdir/input/java_previews_430.java +++ b/uvim/runtime/syntax/testdir/input/java_previews_430.java @@ -1,4 +1,4 @@ -// VIM_TEST_SETUP let g:java_syntax_previews = [430] +// MNV_TEST_SETUP let g:java_syntax_previews = [430] diff --git a/uvim/runtime/syntax/testdir/input/java_previews_455.java b/uvim/runtime/syntax/testdir/input/java_previews_455.java index 69f3798430..ebd9ba0829 100644 --- a/uvim/runtime/syntax/testdir/input/java_previews_455.java +++ b/uvim/runtime/syntax/testdir/input/java_previews_455.java @@ -1,4 +1,4 @@ -// VIM_TEST_SETUP let g:java_syntax_previews = [455, 488, 507, 530] +// MNV_TEST_SETUP let g:java_syntax_previews = [455, 488, 507, 530] diff --git a/uvim/runtime/syntax/testdir/input/java_unfoldment.java b/uvim/runtime/syntax/testdir/input/java_unfoldment.java index fb3a96f8e0..ca8760245a 100644 --- a/uvim/runtime/syntax/testdir/input/java_unfoldment.java +++ b/uvim/runtime/syntax/testdir/input/java_unfoldment.java @@ -1,15 +1,15 @@ -// VIM_TEST_SETUP setlocal fen fdc=2 fdl=8 fdm=syntax -// VIM_TEST_SETUP let g:java_highlight_java_lang = 1 -// VIM_TEST_SETUP let g:java_ignore_folding = "bcdi" -// VIM_TEST_SETUP let g:java_lookbehind_byte_counts = {'javaBlock': -1} -// VIM_TEST_SETUP let g:java_mark_braces_in_parens_as_errors = 1 +// MNV_TEST_SETUP setlocal fen fdc=2 fdl=8 fdm=syntax +// MNV_TEST_SETUP let g:java_highlight_java_lang = 1 +// MNV_TEST_SETUP let g:java_ignore_folding = "bcdi" +// MNV_TEST_SETUP let g:java_lookbehind_byte_counts = {'javaBlock': -1} +// MNV_TEST_SETUP let g:java_mark_braces_in_parens_as_errors = 1 -// VIM_TEST_SETUP highlight link javaBlockOtherStart Structure -// VIM_TEST_SETUP highlight link javaBlockStart Todo +// MNV_TEST_SETUP highlight link javaBlockOtherStart Structure +// MNV_TEST_SETUP highlight link javaBlockStart Todo diff --git a/uvim/runtime/syntax/testdir/input/mnv9_blocks.mnv b/uvim/runtime/syntax/testdir/input/mnv9_blocks.mnv new file mode 100644 index 0000000000..26bbbb388c --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_blocks.mnv @@ -0,0 +1,49 @@ +mnv9script +# MNV9 blocks +# MNV_TESTSETUP set list listchars=trail:- + + +{ + var foo = 42 +} + + +{ + { + { + { + var foo = 42 + } + var foo = 42 + } + var foo = 42 + } + var foo = 42 +} + + +def Foo() + { + var foo = 42 + echo foo + } +enddef + + +# start/end patterns + +{ + var foo = 42 +} + +{ # comment + var foo = 42 +} # comment + +echo "Foo" | { | echo "Bar" + var foo = 42 +} | echo "Baz" + +# dictionary +{}->items() + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_builtin_object_methods.mnv b/uvim/runtime/syntax/testdir/input/mnv9_builtin_object_methods.mnv new file mode 100644 index 0000000000..b05b36ea88 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_builtin_object_methods.mnv @@ -0,0 +1,114 @@ +mnv9script +# MNV9 special methods - new*(), empty(), len(), string() + + +def new() +enddef + +def newOther() +enddef + +def newyetanother() +enddef + +def empty(): bool + return true +enddef + +def len(): number + return 0 +enddef + +def string(): string + return "" +enddef + +class A + def new() + def newNested() + enddef + def empty(): bool + return true + enddef + def len(): number + return 0 + enddef + def string(): string + return "" + enddef + enddef + + def newOther() + def newNested() + enddef + def empty(): bool + return true + enddef + def len(): number + return 0 + enddef + def string(): string + return "" + enddef + enddef + + def newyetanother() + def newNested() + enddef + def empty(): bool + return true + enddef + def len(): number + return 0 + enddef + def string(): string + return "" + enddef + enddef + + def empty(): bool + def newNested() + enddef + def empty(): bool + return true + enddef + def len(): number + return 0 + enddef + def string(): string + return "" + enddef + return true + enddef + + def len(): number + def newNested() + enddef + def empty(): bool + return true + enddef + def len(): number + return 0 + enddef + def string(): string + return "" + enddef + return 0 + enddef + + def string(): string + def newNested() + enddef + def empty(): bool + return true + enddef + def len(): number + return 0 + enddef + def string(): string + return "" + enddef + return "" + enddef +endclass + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_builtin_object_methods2.mnv b/uvim/runtime/syntax/testdir/input/mnv9_builtin_object_methods2.mnv new file mode 100644 index 0000000000..8bfbdccc38 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_builtin_object_methods2.mnv @@ -0,0 +1,58 @@ +mnv9script +# MNV |builtin-object-methods| and namesake builtin functions +# MNV_TEST_SETUP hi link mnv9MethodName Special +# MNV_TEST_SETUP hi link mnv9This Todo + + +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/uvim/runtime/syntax/testdir/input/mnv9_comment_strings.mnv b/uvim/runtime/syntax/testdir/input/mnv9_comment_strings.mnv new file mode 100644 index 0000000000..adfae6493e --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_comment_strings.mnv @@ -0,0 +1,27 @@ +mnv9script +# MNV9 comment strings +# MNV_TEST_SETUP let g:mnvsyn_comment_strings = v:true + + +# pre "string" post + +function Foo() + " pre "string" post +endfunction + +def Bar() + # pre "string" post +enddef + +command Foo { + # pre "string" post +} + +autocmd BufNewFile * { + # pre "string" post +} + +{ + # pre "string" post +} + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_comments.mnv b/uvim/runtime/syntax/testdir/input/mnv9_comments.mnv new file mode 100644 index 0000000000..0aafc3114a --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_comments.mnv @@ -0,0 +1,99 @@ +mnv9script +# MNV9 comments + + +# MNV9-script comment + + # string only recognised with leading char + "useless string" + +function! Foo() + " Legacy-script comment + # 42 " comment +endfunction + +def! Bar() + # MNV9-script comment + "useless string" # comment +enddef + +command -count FooCommand { + # MNV9-script comment + "useless string" # comment +} + +autocmd BufNewFile * { + # MNV9-script comment + "useless string" # comment +} + + +# Multiline comments + +# comment + \ continuing comment + \ continuing comment + +var foo = 42 # commment + \ continuing comment + \ continuing comment + +# :Foo + \ arg1 + #\ comment + \ arg2 + +echo "TOP" + + +# Line-continuation comments + +:Foo + #\ line continuation comment + \ arg1 + #\ line continuation comment + \ arg2 + + +# Expression comments + +var foo = { # comment + # comment + bar: 42, # comment + # comment + # comment + baz: 42 # comment + # comment +} # 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 + + +# PR: #14975 +# https://github.com/Project-Tick/Project-Tick/pull/14975#issuecomment-2832643115 + +var d = { + a: 0, +# a ' quote {{{ +#}}} +b: 0, +} + + +# PR: #19390 +# https://github.com/Project-Tick/Project-Tick/pull/19390#issue-3933755846 + +# E1234: should not have mnv9CommentTitle on 'E1234:' +# ERR34: should have mnv9CommentTitle on 'ERR34:' + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_constructors.mnv b/uvim/runtime/syntax/testdir/input/mnv9_constructors.mnv new file mode 100644 index 0000000000..ca424a53c4 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_constructors.mnv @@ -0,0 +1,18 @@ +mnv9script +# MNV9 constructors + + +class A + static var _instance: A + var str: string + def _new(str: string) + this.str = str + enddef + static def GetInstance(str: string): A + if _instance == null + _instance = A._new(str) + endif + return _instance + enddef +endclass + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_def_variables.mnv b/uvim/runtime/syntax/testdir/input/mnv9_def_variables.mnv new file mode 100644 index 0000000000..4c0d8aae78 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_def_variables.mnv @@ -0,0 +1,226 @@ +mnv9script +# MNV9 function variables + + +def Foo() + + # Declarations + + var foo = expr + + b:foo = expr + g:foo = expr + t:foo = expr + w:foo = expr + + v:true = expr + + $FOO = expr + + var [foo, bar] = expr + var [foo, + \ bar] = expr + var [$foo, $bar] = expr + var [$foo, + \ $bar] = expr + + var [foo, bar; baz] = expr + var [foo, + \ bar; + \ baz] = expr + var [$foo, $bar; $baz] = expr + var [$foo, + \ $bar; + \ $baz] = expr + + var foo =<< END +... +END + var foo =<< trim END + ... + END + var foo =<< eval END +... +END + var foo =<< trim eval END + ... + END + var foo =<< eval trim END + ... + END + + # Assignments + + foo = expr + + foo[0] = expr + + foo[1:2] = expr + foo[:2] = expr + foo[1:] = expr + foo[:] = expr + + foo["key"] = expr + foo['key'] = expr + + foo += expr + foo -= expr + foo *= expr + foo /= expr + foo %= expr + foo ..= expr + + b:foo = expr + g:foo = expr + t:foo = expr + w:foo = expr + + b:foo += expr + g:foo += expr + t:foo += expr + w:foo += expr + + b:foo -= expr + g:foo -= expr + t:foo -= expr + w:foo -= expr + + b:foo *= expr + g:foo *= expr + t:foo *= expr + w:foo *= expr + + b:foo /= expr + g:foo /= expr + t:foo /= expr + w:foo /= expr + + b:foo %= expr + g:foo %= expr + t:foo %= expr + w:foo %= expr + + b:foo ..= expr + g:foo ..= expr + t:foo ..= expr + w:foo ..= expr + + $FOO = expr + $FOO ..= expr + + @f = expr + @f ..= expr + + &ari = expr + + &t_k1 = "\[234;" + + &ari ..= expr + + &ari += expr + &ari -= expr + + &l:aleph = expr + + &l:aleph ..= expr + &l:aleph += expr + &l:aleph -= expr + + &g:aleph = expr + + &g:aleph ..= expr + &g:aleph += expr + &g:aleph -= expr + + [foo, bar] = expr + [foo, + \ bar] = expr + [v:true, v:false] = expr + [v:true, + \ v:false] = expr + [&ari, &bkc] = expr + [&ari, + \ &bkc] = expr + [$foo, $bar] = expr + [$foo, + \ $bar] = expr + [@a, @b] = expr + [@a, + \ @a] = expr + + [foo, bar] ..= expr + [foo, bar] += expr + [foo, bar] -= expr + [foo, bar] *= expr + [foo, bar] /= expr + [foo, bar] %= expr + + [foo, bar; baz] = expr + [foo, + \ bar; + \ baz] = expr + [v:true, v:false; v:none] = expr + [v:true, + \ v:false; + \ v:none] = expr + [$foo, $bar; $baz] = expr + [$foo, + \ $bar; + \ $baz] = expr + [&ari, &bkc; &cmp] = expr + [&ari, + \ &bkc; + \ &cmp] = expr + [@a, @b; @c] = expr + [@a, + \ @b; + \ @c] = expr + + foo =<< END +... +END + foo =<< trim END + ... + END + foo =<< eval END +... +END + foo =<< trim eval END + ... + END + foo =<< eval trim END + ... + END + + # :for + + for foo in expr + endfor + + for [foo, bar] in expr + endfor + +# Scope dictionaries + +echo get(b:, 'foo', 42) +echo get(w:, 'foo', 42) +echo get(t:, 'foo', 42) +echo get(g:, 'foo', 42) +echo get(v:, 'foo', 42) + +for k in keys(b:) | echo b:[k] | endfor +for k in keys(w:) | echo w:[k] | endfor +for k in keys(t:) | echo t:[k] | endfor +for k in keys(g:) | echo g:[k] | endfor +for k in keys(v:) | echo v:[k] | endfor + +# Neomnv-specific variables (not highlighted by default) + +echo v:lua v:msgpack_types v:relnum v:stderr v:termrequest v:virtnum + +echo &channel &inccommand &mousescroll &pumblend &redrawdebug &scrollback +echo &shada &shadafile &statuscolumn &termpastefilter &termsync &winbar +echo &winblend + +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_ex_class_fold.mnv b/uvim/runtime/syntax/testdir/input/mnv9_ex_class_fold.mnv new file mode 100644 index 0000000000..35f953011e --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_ex_class_fold.mnv @@ -0,0 +1,71 @@ +mnv9script +# MNV9 :class command +# MNV_TEST_SETUP let g:mnvsyn_folding = 'cfi' +# MNV_TEST_SETUP setl fdc=2 fdl=99 fdm=syntax + + +interface Interface1 +endinterface +interface Interface2 +endinterface + +class Class1 +endclass + +export class Class2 +endclass + +abstract class Class3 +endclass + +export abstract class Class4 +endclass + +class Class5 extends Class1 +endclass + +export class Class6 extends Class1 +endclass + +class Class7 implements Interface1, Interface2 +endclass + +export class Class8 implements Interface1, Interface2 +endclass + +class Class9 + def new() + enddef + def Method1(): void + def Nested1(): void + def Nested2(): void + enddef + enddef + enddef + def _Method2(): void + enddef + static def Method3(): void + enddef +endclass + +abstract class Class10 + abstract def Method1(): void + abstract def string(): string +endclass + + +# Issue: #14393 + +interface Testable + def SetUp() + def TearDown() +endinterface + +abstract class TestTemplate implements Testable + var failed: number + var passed: number + + abstract def SetUp() + abstract def TearDown() +endclass + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_ex_commands.mnv b/uvim/runtime/syntax/testdir/input/mnv9_ex_commands.mnv new file mode 100644 index 0000000000..f484b2b254 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_ex_commands.mnv @@ -0,0 +1,1211 @@ +mnv9script +# MNV9 Ex commands + + +# START NOT MATCHED +:Next +:X +# END NOT MATCHED + +:help + :help +: help + : help # FIXME + +:@ + +:abbreviate +:abclear +:aboveleft +:abstract +:all +:amenu +:anoremenu +:argadd +:argdedupe +:argdelete +:argdo +:argedit +:argglobal +:arglocal +:args +:argument +:ascii +:augroup Foo +:augroup END +:aunmenu +:autocmd +:badd +:ball +:balt +:bdelete +:behave mswin +:behave xterm +:belowright +:bfirst +:blast +:bmodified +:bnext +:bNext +:botright +:bprevious +:break +:breakadd +:breakdel +:breaklist +:brewind +:browse +:bufdo +:buffer +:buffers +:bunload +:bwipeout +:cabbrev +:cabclear +:cabove +:caddbuffer +:caddexpr +:caddfile +:cafter +:call +:catch +:cbefore +:cbelow +:cbottom +:cbuffer +:cc +:cclose +:cd +:cdo +:center +:cexpr +:cfdo +:cfile +:cfirst +:cgetbuffer +:cgetexpr +:cgetfile +:changes +:chdir +:checkpath +:checktime +:chistory +:class +:clast +:clearjumps +:clist +:close +:cmap +:cmapclear +:cmenu +:cnewer +:cnext +:cNext +:cnfile +:cNfile +:cnoreabbrev +:cnoremap +:cnoremenu +:colder +:colorscheme +:comclear +:command +:compiler +:confirm +:const +:continue +:copen +:copy +:cpfile +:cprevious +:cquit +:crewind +:cscope +:cstag +:cunabbrev +:cunmap +:cunmenu +:cwindow +:debug +:debuggreedy +:def +:defcompile +:defcompile +:defer +:delcommand +:delete +:delfunction +:delmarks +:diffget +:diffoff +:diffpatch +:diffput +:diffsplit +:diffthis +:diffupdate +:digraphs +:disassemble +:disassemble +:display +:djump +:dl +:dlist +:doautoall +:doautocmd +:dp +:drop +:dsearch +:dsplit +:earlier +:echo +:echoconsole +:echoerr +:echohl +:echomsg +:echon +:echowindow +:edit +:else +:elseif +:emenu +:endclass +:enddef +:endenum +:endfor +:endfunction +:endif +:endinterface +:endtry +:endwhile +:enew +:enum +:eval +:ex +:execute +:exit +:export +:export +:exusage +:file +:files +:filetype +:filter +:final +:finally +:find +:finish +:first +:fixdel +:fold +:foldclose +:folddoclosed +:folddoopen +:foldopen +:for foo in bar | endfor +:function +:global/.../ +:goto +:grep +:grepadd +:gui +:gmnv +:hardcopy +:help +:helpclose +:helpfind +:helpgrep +:helptags +:hide +:highlight +:history +:horizontal +:iabbrev +:iabclear +:if +:ijump +:ilist +:imap +:imapclear +:imenu +:import +:inoreabbrev +:inoremap +:inoremenu +:interface +:intro +:isearch +:isplit +:iunabbrev +:iunmap +:iunmenu +:join +:jumps +:k +:keepalt +:keepjumps +:keepmarks +:keeppatterns +:labove +:laddbuffer +:laddexpr +:laddfile +:lafter +:language +:last +:later +:lbefore +:lbelow +:lbottom +:lbuffer +:lcd +:lchdir +:lclose +:lcscope +:ldo +:left +:leftabove +:legacy +:lexpr +:lfdo +:lfile +:lfirst +:lgetbuffer +:lgetexpr +:lgetfile +:lgrep +:lgrepadd +:lhelpgrep +:lhistory +:list +:ll +:llast +:llist +:lmake +:lmap +:lmapclear +:lnewer +:lnext +:lNext +:lnfile +:lNfile +:lnoremap +# :loadkeymap # disabled - runs until EOF +:loadview +:lockmarks +:lockvar +:lolder +:lopen +:lpfile +:lprevious +:lrewind +:ls +:ltag +:lua +:luado +:luafile +:lunmap +:lmnvgrep +:lmnvgrepadd +:lwindow +:make +:mapclear +:map +:mark +:marks +:match +:menu +:menutranslate +:messages +:mkexrc +:mksession +:mkspell +:mkview +:mkmnvrc +:move +:mzfile +:mzscheme +:nbclose +:nbkey +:nbstart +:new +:next +:nmap +:nmapclear +:nmenu +:nnoremap +:nnoremenu +:noautocmd +:nohlsearch +:noreabbrev +:noremap +:noremenu +:normal +:noswapfile +:number +:nunmap +:nunmenu +:oldfiles +:omap +:omapclear +:omenu +:only +:onoremap +:onoremenu +:options +:ounmap +:ounmenu +:ownsyntax +:packadd +:packloadall +:pclose +:pedit +:perl +:perldo +:pop +:popup +:ppop +:preserve +:previous +:print +:profdel +:profile +:promptfind +:promptrepl +:psearch +:ptag +:ptfirst +:ptjump +:ptlast +:ptnext +:ptNext +:ptprevious +:ptrewind +:ptselect +:put +:pwd +:py3 +:py3do +:py3file +:pydo +:pyfile +:python +:python3 +:pythonx +:pyx +:pyxdo +:pyxfile +:qall +:quit +:quitall +:read +:recover +:redir +:redo +:redraw +:redrawstatus +:redrawtabline +:registers +:resize +:retab +:return +:rewind +:right +:rightbelow +:ruby +:rubydo +:rubyfile +:rundo +:runtime +:rmnvinfo +:sall +:sandbox +:sargument +:saveas +:sball +:sbfirst +:sblast +:sbmodified +:sbnext +:sbNext +:sbprevious +:sbrewind +:sbuffer +:scriptencoding +:scriptnames +:scriptversion +:scscope +:set +:setfiletype +:setglobal +:setlocal +:sfind +:sfirst +:shell +:sign +:silent +:simalt +:slast +:sleep +:sleep! +:smagic +:smap +:smapclear +:smenu +:smile +:snext +:sNext +:snomagic +:snoremap +:snoremenu +:sort +:source +:spelldump +:spellgood +:spellinfo +:spellrare +:spellrepall +:spellundo +:spellwrong +:split +:sprevious +:srewind +:stag +:startgreplace +:startinsert +:startreplace +:stjump +:stop +:stopinsert +:stselect +:substitute +:sunhide +:sunmap +:sunmenu +:suspend +:sview +:swapname +:syncbind +:syntax +:syntime +:tab +:tabclose +:tabdo +:tabedit +:tabfind +:tabfirst +:tablast +:tabmove +:tabnew +:tabnext +:tabNext +:tabonly +:tabprevious +:tabrewind +:tabs +:tag +:tags +:tcd +:tchdir +:tcl +:tcldo +:tclfile +:tearoff +:terminal +:tfirst +:throw +:tjump +:tlast +:tlmenu +:tlnoremenu +:tlunmenu +:tmap +:tmapclear +:tmenu +:tnext +:tNext +:tnoremap +:topleft +:tprevious +:trewind +:try +:tselect +:tunmap +:tunmenu +:type +:unabbreviate +:unabbreviate +:undo +:undojoin +:undolist +:unhide +:uniq +:unlockvar +:unmap +:unmenu +:unsilent +:update +:var +:verbose +:version +:vertical +:vglobal/.../ +:view +:mnv9cmd +# :mnv9script +:mnvgrep +:mnvgrepadd +:visual +:viusage +:vmap +:vmapclear +:vmenu +:vnew +:vnoremap +:vnoremenu +:vsplit +:vunmap +:vunmenu +:wall +:while +:wincmd +:windo +:winpos +:winsize +:wnext +:wNext +:wprevious +:wq +:wqall +:write +:wundo +:wmnvinfo +:xall +:xmap +:xmapclear +:xmenu +:xnoremap +:xnoremenu +:xrestore +:xunmap +:xunmenu +:yank +:z + +Foo()|help +Foo() | help +Foo() |help +Foo()| help + +Foo() | abbreviate +Foo() | abclear +Foo() | aboveleft +Foo() | abstract +Foo() | all +Foo() | amenu +Foo() | anoremenu +Foo() | argadd +Foo() | argdedupe +Foo() | argdelete +Foo() | argdo +Foo() | argedit +Foo() | argglobal +Foo() | arglocal +Foo() | args +Foo() | argument +Foo() | ascii +Foo() | augroup Foo | augroup END +Foo() | aunmenu +Foo() | autocmd +Foo() | badd +Foo() | ball +Foo() | balt +Foo() | bdelete +Foo() | behave mswin +Foo() | behave xterm +Foo() | belowright +Foo() | bfirst +Foo() | blast +Foo() | bmodified +Foo() | bnext +Foo() | bNext +Foo() | botright +Foo() | bprevious +Foo() | break +Foo() | breakadd +Foo() | breakdel +Foo() | breaklist +Foo() | brewind +Foo() | browse +Foo() | bufdo +Foo() | buffer +Foo() | buffers +Foo() | bunload +Foo() | bwipeout +Foo() | cabbrev +Foo() | cabclear +Foo() | cabove +Foo() | caddbuffer +Foo() | caddexpr +Foo() | caddfile +Foo() | cafter +Foo() | call +Foo() | catch +Foo() | cbefore +Foo() | cbelow +Foo() | cbottom +Foo() | cbuffer +Foo() | cc +Foo() | cclose +Foo() | cd +Foo() | cdo +Foo() | center +Foo() | cexpr +Foo() | cfdo +Foo() | cfile +Foo() | cfirst +Foo() | cgetbuffer +Foo() | cgetexpr +Foo() | cgetfile +Foo() | changes +Foo() | chdir +Foo() | checkpath +Foo() | checktime +Foo() | chistory +Foo() | class +Foo() | clast +Foo() | clearjumps +Foo() | clist +Foo() | close +Foo() | cmap +Foo() | cmapclear +Foo() | cmenu +Foo() | cnewer +Foo() | cnext +Foo() | cNext +Foo() | cnfile +Foo() | cNfile +Foo() | cnoreabbrev +Foo() | cnoremap +Foo() | cnoremenu +Foo() | colder +Foo() | colorscheme +Foo() | comclear +Foo() | command +Foo() | compiler +Foo() | confirm +Foo() | const +Foo() | continue +Foo() | copen +Foo() | copy +Foo() | cpfile +Foo() | cprevious +Foo() | cquit +Foo() | crewind +Foo() | cscope +Foo() | cstag +Foo() | cunabbrev +Foo() | cunmap +Foo() | cunmenu +Foo() | cwindow +Foo() | debug +Foo() | debuggreedy +Foo() | def +Foo() | defcompile +Foo() | defcompile +Foo() | defer +Foo() | delcommand +Foo() | delete +Foo() | delfunction +Foo() | delmarks +Foo() | diffget +Foo() | diffoff +Foo() | diffpatch +Foo() | diffput +Foo() | diffsplit +Foo() | diffthis +Foo() | diffupdate +Foo() | digraphs +Foo() | disassemble +Foo() | disassemble +Foo() | display +Foo() | djump +Foo() | dl +Foo() | dlist +Foo() | doautoall +Foo() | doautocmd +Foo() | dp +Foo() | drop +Foo() | dsearch +Foo() | dsplit +Foo() | earlier +Foo() | echo +Foo() | echoconsole +Foo() | echoerr +Foo() | echohl +Foo() | echomsg +Foo() | echon +Foo() | echowindow +Foo() | edit +Foo() | else +Foo() | elseif +Foo() | emenu +Foo() | endclass +Foo() | enddef +Foo() | endenum +Foo() | endfor +Foo() | endfunction +Foo() | endif +Foo() | endinterface +Foo() | endtry +Foo() | endwhile +Foo() | enew +Foo() | enum +Foo() | eval +Foo() | ex +Foo() | execute +Foo() | exit +Foo() | export +Foo() | export +Foo() | exusage +Foo() | file +Foo() | files +Foo() | filetype +Foo() | filter +Foo() | final +Foo() | finally +Foo() | find +Foo() | finish +Foo() | first +Foo() | fixdel +Foo() | fold +Foo() | foldclose +Foo() | folddoclosed +Foo() | folddoopen +Foo() | foldopen +Foo() | for foo in bar | endfor +Foo() | function +Foo() | global/.../ +Foo() | goto +Foo() | grep +Foo() | grepadd +Foo() | gui +Foo() | gmnv +Foo() | hardcopy +Foo() | help +Foo() | helpclose +Foo() | helpfind +Foo() | helpgrep +Foo() | helptags +Foo() | hide +Foo() | highlight +Foo() | history +Foo() | horizontal +Foo() | iabbrev +Foo() | iabclear +Foo() | if +Foo() | ijump +Foo() | ilist +Foo() | imap +Foo() | imapclear +Foo() | imenu +Foo() | import +Foo() | inoreabbrev +Foo() | inoremap +Foo() | inoremenu +Foo() | interface +Foo() | intro +Foo() | isearch +Foo() | isplit +Foo() | iunabbrev +Foo() | iunmap +Foo() | iunmenu +Foo() | join +Foo() | jumps +Foo() | keepalt +Foo() | keepjumps +Foo() | keepmarks +Foo() | keeppatterns +Foo() | labove +Foo() | laddbuffer +Foo() | laddexpr +Foo() | laddfile +Foo() | lafter +Foo() | language +Foo() | last +Foo() | later +Foo() | lbefore +Foo() | lbelow +Foo() | lbottom +Foo() | lbuffer +Foo() | lcd +Foo() | lchdir +Foo() | lclose +Foo() | lcscope +Foo() | ldo +Foo() | left +Foo() | leftabove +Foo() | legacy +Foo() | lexpr +Foo() | lfdo +Foo() | lfile +Foo() | lfirst +Foo() | lgetbuffer +Foo() | lgetexpr +Foo() | lgetfile +Foo() | lgrep +Foo() | lgrepadd +Foo() | lhelpgrep +Foo() | lhistory +Foo() | list +Foo() | ll +Foo() | llast +Foo() | llist +Foo() | lmake +Foo() | lmap +Foo() | lmapclear +Foo() | lnewer +Foo() | lnext +Foo() | lNext +Foo() | lnfile +Foo() | lNfile +Foo() | lnoremap +# Foo() | loadkeymap # disabled - runs until EOF +Foo() | loadview +Foo() | lockmarks +Foo() | lockvar +Foo() | lolder +Foo() | lopen +Foo() | lpfile +Foo() | lprevious +Foo() | lrewind +Foo() | ls +Foo() | ltag +Foo() | lua +Foo() | luado +Foo() | luafile +Foo() | lunmap +Foo() | lmnvgrep +Foo() | lmnvgrepadd +Foo() | lwindow +Foo() | make +Foo() | mark +Foo() | move +Foo() | map +Foo() | mapclear +Foo() | marks +Foo() | match +Foo() | menu +Foo() | menutranslate +Foo() | messages +Foo() | mkexrc +Foo() | mksession +Foo() | mkspell +Foo() | mkview +Foo() | mkmnvrc +Foo() | mzfile +Foo() | mzscheme +Foo() | nbclose +Foo() | nbkey +Foo() | nbstart +Foo() | new +Foo() | next +Foo() | nmap +Foo() | nmapclear +Foo() | nmenu +Foo() | nnoremap +Foo() | nnoremenu +Foo() | noautocmd +Foo() | nohlsearch +Foo() | noreabbrev +Foo() | noremap +Foo() | noremenu +Foo() | normal +Foo() | noswapfile +Foo() | number +Foo() | nunmap +Foo() | nunmenu +Foo() | oldfiles +Foo() | omap +Foo() | omapclear +Foo() | omenu +Foo() | only +Foo() | onoremap +Foo() | onoremenu +Foo() | options +Foo() | ounmap +Foo() | ounmenu +Foo() | ownsyntax +Foo() | packadd +Foo() | packloadall +Foo() | pclose +Foo() | pedit +Foo() | perl +Foo() | perldo +Foo() | pop +Foo() | popup +Foo() | ppop +Foo() | preserve +Foo() | previous +Foo() | print +Foo() | profdel +Foo() | profile +Foo() | promptfind +Foo() | promptrepl +Foo() | psearch +Foo() | ptag +Foo() | ptfirst +Foo() | ptjump +Foo() | ptlast +Foo() | ptnext +Foo() | ptNext +Foo() | ptprevious +Foo() | ptrewind +Foo() | ptselect +Foo() | put +Foo() | pwd +Foo() | py3 +Foo() | py3do +Foo() | py3file +Foo() | pydo +Foo() | pyfile +Foo() | python +Foo() | python3 +Foo() | pythonx +Foo() | pyx +Foo() | pyxdo +Foo() | pyxfile +Foo() | qall +Foo() | quit +Foo() | quitall +Foo() | read +Foo() | recover +Foo() | redir +Foo() | redo +Foo() | redraw +Foo() | redrawstatus +Foo() | redrawtabline +Foo() | registers +Foo() | resize +Foo() | retab +Foo() | return +Foo() | rewind +Foo() | right +Foo() | rightbelow +Foo() | ruby +Foo() | rubydo +Foo() | rubyfile +Foo() | rundo +Foo() | runtime +Foo() | rmnvinfo +Foo() | sall +Foo() | sandbox +Foo() | sargument +Foo() | saveas +Foo() | sball +Foo() | sbfirst +Foo() | sblast +Foo() | sbmodified +Foo() | sbnext +Foo() | sbNext +Foo() | sbprevious +Foo() | sbrewind +Foo() | sbuffer +Foo() | scriptencoding +Foo() | scriptnames +Foo() | scriptversion +Foo() | scscope +Foo() | set +Foo() | setfiletype +Foo() | setglobal +Foo() | setlocal +Foo() | sfind +Foo() | sfirst +Foo() | shell +Foo() | sign +Foo() | silent +Foo() | simalt +Foo() | slast +Foo() | sleep +Foo() | sleep! +Foo() | smagic +Foo() | smap +Foo() | smapclear +Foo() | smenu +Foo() | smile +Foo() | snext +Foo() | sNext +Foo() | snomagic +Foo() | snoremap +Foo() | snoremenu +Foo() | sort +Foo() | source +Foo() | spelldump +Foo() | spellgood +Foo() | spellinfo +Foo() | spellrare +Foo() | spellrepall +Foo() | spellundo +Foo() | spellwrong +Foo() | split +Foo() | sprevious +Foo() | srewind +Foo() | stag +Foo() | startgreplace +Foo() | startinsert +Foo() | startreplace +Foo() | stjump +Foo() | stop +Foo() | stopinsert +Foo() | stselect +Foo() | substitute +Foo() | sunhide +Foo() | sunmap +Foo() | sunmenu +Foo() | suspend +Foo() | sview +Foo() | swapname +Foo() | syncbind +Foo() | syntax +Foo() | syntime +Foo() | tab +Foo() | tabclose +Foo() | tabdo +Foo() | tabedit +Foo() | tabfind +Foo() | tabfirst +Foo() | tablast +Foo() | tabmove +Foo() | tabnew +Foo() | tabnext +Foo() | tabNext +Foo() | tabonly +Foo() | tabprevious +Foo() | tabrewind +Foo() | tabs +Foo() | tag +Foo() | tags +Foo() | tcd +Foo() | tchdir +Foo() | tcl +Foo() | tcldo +Foo() | tclfile +Foo() | tearoff +Foo() | terminal +Foo() | tfirst +Foo() | throw +Foo() | tjump +Foo() | tlast +Foo() | tlmenu +Foo() | tlnoremenu +Foo() | tlunmenu +Foo() | tmap +Foo() | tmapclear +Foo() | tmenu +Foo() | tnext +Foo() | tNext +Foo() | tnoremap +Foo() | topleft +Foo() | tprevious +Foo() | trewind +Foo() | try +Foo() | tselect +Foo() | tunmap +Foo() | tunmenu +Foo() | type +Foo() | unabbreviate +Foo() | unabbreviate +Foo() | undo +Foo() | undojoin +Foo() | undolist +Foo() | unhide +Foo() | uniq +Foo() | unlockvar +Foo() | unmap +Foo() | unmenu +Foo() | unsilent +Foo() | update +Foo() | var +Foo() | verbose +Foo() | version +Foo() | vertical +Foo() | vglobal/.../ +Foo() | mnv9cmd +# call Foo() | mnv9script +Foo() | mnvgrep +Foo() | mnvgrepadd +Foo() | visual +Foo() | viusage +Foo() | view +Foo() | vmap +Foo() | vmapclear +Foo() | vmenu +Foo() | vnew +Foo() | vnoremap +Foo() | vnoremenu +Foo() | vsplit +Foo() | vunmap +Foo() | vunmenu +Foo() | windo +Foo() | write +Foo() | wNext +Foo() | wall +Foo() | while +Foo() | winsize +Foo() | wincmd +Foo() | winpos +Foo() | wnext +Foo() | wprevious +Foo() | wq +Foo() | wqall +Foo() | wundo +Foo() | wmnvinfo +Foo() | xall +Foo() | xmapclear +Foo() | xmap +Foo() | xmenu +Foo() | xrestore +Foo() | xnoremap +Foo() | xnoremenu +Foo() | xunmap +Foo() | xunmenu +Foo() | yank +Foo() | z + + +# Legacy-script only + +:Print +:append + text +. +:change + text +. +:insert + text +. +:k +:let +:mode +:open +:t +:unlet +:xit + +Foo() | append + text +. +Foo() | change + text +. +Foo() | insert + text +. +Foo() | k +Foo() | let +Foo() | mode +Foo() | open +Foo() | t +Foo() | unlet +Foo() | xit + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_ex_echo.mnv b/uvim/runtime/syntax/testdir/input/mnv9_ex_echo.mnv new file mode 100644 index 0000000000..c08b43322f --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_ex_echo.mnv @@ -0,0 +1,36 @@ +mnv9script +# MNV9 :echo commands +# MNV_TEST_SETUP hi link mnvVar Identifier + + +echo # comment +echo "Foo" # comment +echo foo[0] # comment +echo Foo() # comment +echo "Foo" | # comment + +def Foo() + echo # comment + echo "Foo" # comment + echo foo[0] # comment + echo Foo() # comment + echo "Foo" | # comment +enddef + + +echo "4" + # comment + .. "2" # comment + +echo "4" .. + # comment + "2" # comment + +echo "4" # comment + # comment + .. "2" # comment + +echo "4" .. # comment + # comment + "2" # comment + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_ex_enum.mnv b/uvim/runtime/syntax/testdir/input/mnv9_ex_enum.mnv new file mode 100644 index 0000000000..4f6eec4da6 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_ex_enum.mnv @@ -0,0 +1,111 @@ +mnv9script +# MNV :enum command +# MNV_TEST_SETUP hi link mnv9EnumValue Todo + + +interface Interface1 + def Def1() +endinterface +interface Interface2 +endinterface + +# enum-implements clause with interspersed comments + +enum Enum1 implements Interface1, Interface2 + Value1 + def Def1() + enddef +endenum + +enum Enum2 + \ implements Interface1, Interface2 + Value1 + def Def1() + enddef +endenum + +enum Enum3 # comment + \ implements Interface1, Interface2 + Value1 +endenum + +enum Enum4 + # comment + \ implements Interface1, Interface2 + Value1 +endenum + +enum Enum5 + \ implements Interface1, Interface2 # comment + Value1 + def Def1() + enddef +endenum + +enum Enum6 + #\ comment + \ implements Interface1, Interface2 + Value1 + def Def1() + enddef +endenum + +# [enum Enum7.Value1 {name: 'Value1', ordinal: 0, val1: 0, val2: 0}, enum Enum7.Value2 {name: 'Value2', ordinal: 1, val1: 1, val2: 0}, enum Enum7.Value3 {name: 'Value3', ordinal: 2, val1: 2, val2: 0}] +# comment +enum Enum7 + \ + #\ comment + \ + #\ comment + \ implements Interface1, Interface2 # comment + # comment + # comment + Value1, # comment + # comment + # comment + Value2(1 + 0), # comment + # comment + # comment + Value3( # comment + # comment + 1 # comment + # comment + + # comment + # comment + 1 # comment + ) # comment + # comment + var val1: number # comment + # comment + def Def1() + enddef + # comment + static def Def2() # comment + # comment + enddef # comment + # comment + public var val2: number # comment +endenum + +# [enum Enum8.implements {name: 'implements', ordinal: 0}] +enum Enum8 implements Interface1, Interface2 + implements + def Def1() + enddef +endenum + +# [enum Enum9.Value1 {name: 'Value1', ordinal: 0, implements: 0}] +enum Enum9 implements Interface1, Interface2 + Value1 + var implements: number + def Def1() + enddef +endenum + +# [enum Enum10.implements {name: 'implements', ordinal: 0}] +enum Enum10 implements Interface1, Interface2 + implements + def Def1() + enddef +endenum + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_ex_enum2.mnv b/uvim/runtime/syntax/testdir/input/mnv9_ex_enum2.mnv new file mode 100644 index 0000000000..84d1096857 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_ex_enum2.mnv @@ -0,0 +1,31 @@ +mnv9script +# MNV9 :enum command +# MNV_TEST_SETUP hi link mnv9EnumValue Todo +# See: https://github.com/Project-Tick/Project-Tick/pull/16365#issuecomment-2571420551 + + +enum Letter + # + ######################################### + A("(\" # not a comment NOR_ANOTHER_VALUE, + \ "), B(")\""), C($"'') + \('"), D($'""(),"'), E, + F( + ")" .. # FA, + "(" # FB, + ), G + #enum NotSupported + #endenum + + def new(this.value = v:none) + return + enddef + const value: string +endenum + +for letter in Letter.values + echo letter +endfor + +echo Letter.D + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_ex_enum_fold.mnv b/uvim/runtime/syntax/testdir/input/mnv9_ex_enum_fold.mnv new file mode 100644 index 0000000000..e05220622c --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_ex_enum_fold.mnv @@ -0,0 +1,50 @@ +mnv9script +# MNV9 :enum command +# MNV_TEST_SETUP let g:mnvsyn_folding = 'efi' +# MNV_TEST_SETUP setl fdc=2 fdl=99 fdm=syntax +# MNV_TEST_SETUP hi link mnv9EnumValue Todo + + +interface Interface1 +endinterface +interface Interface2 +endinterface + +enum Enum1 +endenum + +export enum Enum2 +endenum + +enum Enum3 + Value1, + Value2, + Value3 +endenum + +enum Enum4 + Value1, + Value2, + Value3 + def Method1() + enddef +endenum + +enum Enum5 implements Interface1, Interface2 + Value1, + Value2, + Value3 + def Method1() + def Nested() + enddef + enddef +endenum + +enum Enum6 + #\ comment + \ implements Interface1, Interface2 + Value1, + Value2, + Value3 +endenum + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_ex_for.mnv b/uvim/runtime/syntax/testdir/input/mnv9_ex_for.mnv new file mode 100644 index 0000000000..95efb2f0f1 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_ex_for.mnv @@ -0,0 +1,88 @@ +mnv9script +# MNV9 :for command + + +# :for {var} in {object} + +var expr = [42] + +for foo in expr + echo foo +endfor + +for foo in expr # comment + echo foo +endfor + +for foo in + # comment + expr + echo foo +endfor + +for foo in expr | echo foo | endfor + +for foo in [42] + echo foo +endfor + +for foo in [42] | echo foo | endfor + +for foo: number in [42] | echo foo | endfor + +echo "foo" | for foo in expr + echo foo +endfor + + +# :for [{var1}, {var2}, ...] in {listlist} + +var expr2 = [[42, 83]] + +for [foo, bar] in expr2 + echo foo bar +endfor + +for [foo, bar] in expr2 # comment + echo foo bar +endfor + +for [foo, bar] in + # comment + expr2 + echo foo bar +endfor + +for [foo, bar] in expr2 | echo foo bar | endfor + +for [foo, bar] in [[42, 83]] + echo foo bar +endfor + +for [foo, bar] in [[42, 83]] | echo foo bar | endfor + +for [foo: number, bar: number] in expr2 + echo foo bar +endfor + + +# Issue #7961 (Builtin types are not highlighted in item-variable declarations +# of :for commands) + +var m: number +var n: number +for x: number in range(2) | m = x | endfor +###### ^^^^^^ +echo m +for [x: number, y: number] in [[0, 0], [1, 1]] | [m, n] = [x, y] | endfor +echo m n + +var F: func +for t: tuple in ((function('tolower'),),) | F = t[0] | endfor +###### ^^^^^^^^^^^ +echo F('HELLO') +for [L: func, U: func] in [[function('tolower'), function('toupper')]] + [_, F] = [L, U] +endfor +echo F('hello') F('world') + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_ex_function_def_tail_comment_errors.mnv b/uvim/runtime/syntax/testdir/input/mnv9_ex_function_def_tail_comment_errors.mnv new file mode 100644 index 0000000000..2db5cdee53 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_ex_function_def_tail_comment_errors.mnv @@ -0,0 +1,45 @@ +mnv9script +# MNV9 :function and :def tail comment errors +# MNV_TEST_SETUP unlet! g:mnvsyn_folding + + +fun Test1() abort # fun + return 1 +endfun # endfun + +def Test2(): number " def + return 2 +enddef " enddef + +fun Test3() abort # fun + fun s:DoTest3() abort # fun + return 3 + endfun # endfun + return s:DoTest3() +endfun # endfun + +def Test4(): number " def + def DoTest4(): number " def + return 4 + enddef " enddef + return DoTest4() +enddef " enddef + +def Test5(): number " def + fun DoTest5() abort # fun + return 5 + endfun # endfun + return DoTest5() +enddef " enddef + +fun Test6() abort # fun + def s:DoTest6(): number " def + return 6 + enddef " enddef + return s:DoTest6() +endfun # endfun + +for d in range(1, 6) + exec $'echo Test{d}()' +endfor + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_ex_function_def_tail_comments.mnv b/uvim/runtime/syntax/testdir/input/mnv9_ex_function_def_tail_comments.mnv new file mode 100644 index 0000000000..cac7aeefde --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_ex_function_def_tail_comments.mnv @@ -0,0 +1,45 @@ +mnv9script +# MNV9 :function and :def tail comments +# MNV_TEST_SETUP unlet! g:mnvsyn_folding + + +fun Test1() abort " fun + return 1 +endfun " endfun + +def Test2(): number # def + return 2 +enddef # enddef + +fun Test3() abort " fun + fun s:DoTest3() abort " fun + return 3 + endfun " endfun + return s:DoTest3() +endfun " endfun + +def Test4(): number # def + def DoTest4(): number # def + return 4 + enddef # enddef + return DoTest4() +enddef # enddef + +def Test5(): number # def + fun DoTest5() abort " fun + return 5 + endfun " endfun + return DoTest5() +enddef # enddef + +fun Test6() abort " fun + def s:DoTest6(): number # def + return 6 + enddef # enddef + return s:DoTest6() +endfun " endfun + +for d in range(1, 6) + exec $'echo Test{d}()' +endfor + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_ex_import.mnv b/uvim/runtime/syntax/testdir/input/mnv9_ex_import.mnv new file mode 100644 index 0000000000..9b6be57ce2 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_ex_import.mnv @@ -0,0 +1,120 @@ +mnv9script +# MNV9 :import command +# MNV_TEST_SETUP hi link mnvImportName Todo + + +import "foo.mnv" +import true ? "foo.mnv" : "bar.mnv" + +import true ? + "foo.mnv" : + "bar.mnv" + +import true + ? "foo.mnv" + : "bar.mnv" + +import true ? # comment + # comment + "foo.mnv" : + # comment + "bar.mnv" + +import true # comment + # comment + ? "foo.mnv" + # comment + : "bar.mnv" + +import "foo.mnv" as bar +import true ? "foo.mnv" : "bar.mnv" as baz + +import true ? + "foo.mnv" : + "bar.mnv" + as baz + +import true + ? "foo.mnv" + : "bar.mnv" + as baz + +import true ? # comment + # comment + "foo.mnv" : + # comment + "bar.mnv" + # comment + as baz + +import true # comment + # comment + ? "foo.mnv" + # comment + : "bar.mnv" + # comment + as baz + +echo "Foo" | import "foo.mnv" + + +# autoload + +import autoload "foo.mnv" +import autoload true ? "foo.mnv" : "bar.mnv" + +import autoload true ? + "foo.mnv" : + "bar.mnv" + +import autoload true + ? "foo.mnv" + : "bar.mnv" + +import autoload true ? # comment + # comment + "foo.mnv" : + # comment + "bar.mnv" + +import autoload true # comment + # comment + ? "foo.mnv" + # comment + : "bar.mnv" + +import autoload "foo.mnv" as bar +import autoload true ? "foo.mnv" : "bar.mnv" as baz + +import autoload true ? + "foo.mnv" : + "bar.mnv" + as baz + +import autoload true + ? "foo.mnv" + : "bar.mnv" + as baz + +import autoload true ? # comment + # comment + "foo.mnv" : + # comment + "bar.mnv" + # comment + as baz + +import autoload true # comment + # comment + ? "foo.mnv" + # comment + : "bar.mnv" + # comment + as baz + + +# "as" keyword in expr + +var as = "modules/" +import true ? as .. "foo.mnv" : as .. "bar.mnv" as other + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_ex_interface_fold.mnv b/uvim/runtime/syntax/testdir/input/mnv9_ex_interface_fold.mnv new file mode 100644 index 0000000000..a64302c682 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_ex_interface_fold.mnv @@ -0,0 +1,38 @@ +mnv9script +# MNV9 :interface command +# MNV_TEST_SETUP let g:mnvsyn_folding = 'i' +# MNV_TEST_SETUP setl fdc=2 fdl=99 fdm=syntax + + +interface Interface1 +endinterface + +export interface Interface2 +endinterface + +interface Interface2 + # comment + var var1: number +endinterface + +interface Interface3 + # comment + def Meth1(): number +endinterface + +interface Interface4 + # comment + var var1: number + # comment + def Meth1(): number +endinterface + +interface Interface5 + # comment + var var1: number + var var2: number + # comment + def Meth1(): number + def Meth2(): number +endinterface + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_ex_let_heredoc.mnv b/uvim/runtime/syntax/testdir/input/mnv9_ex_let_heredoc.mnv new file mode 100644 index 0000000000..9697d91de2 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_ex_let_heredoc.mnv @@ -0,0 +1,299 @@ +mnv9script +# MNV9 heredoc +# MNV_TEST_SETUP let g:mnvsyn_folding = "h" +# MNV_TEST_SETUP setl fdc=2 fdl=99 fdm=syntax + + +var foo =<< END +line1 +line2 +END + + var foo =<< END +line1 +line2 +END + +var [foo, bar] =<< EOS +line1 +line2 +EOS + + var [foo, bar] =<< EOS +line1 +line2 +EOS + +var [foo, + \ bar] =<< EOS +line1 +line2 +EOS + + var [foo, + \ bar] =<< EOS +line1 +line2 +EOS + +# assignment + +foo =<< END +line1 +line2 +END + + foo =<< END +line1 +line2 +END + +g:foo =<< END +line1 +line2 +END + + g:foo =<< END +line1 +line2 +END + +[foo, bar] =<< EOS +line1 +line2 +EOS + + [foo, bar] =<< EOS +line1 +line2 +EOS + +[foo, + \ bar] =<< EOS +line1 +line2 +EOS + + [foo, + \ bar] =<< EOS +line1 +line2 +EOS + +[g:foo, g:bar] =<< EOS +line1 +line2 +EOS + + [g:foo, g:bar] =<< EOS +line1 +line2 +EOS + +[g:foo, + \ g:bar] =<< EOS +line1 +line2 +EOS + + [g:foo, + \ g:bar] =<< EOS +line1 +line2 +EOS + + +# typed + +var foo: list =<< END +line1 +line2 +END + +var [foo: string, bar: string] =<< END +line1 +line2 +END + +# assignment + +# trim + +var foo =<< trim END + line1 + line2 +END + + var foo =<< trim END + line1 + line2 + END + + +# interpolation + +var foo =<< eval END +line{1 + 0} +line{1 + 1} +END + + var foo =<< eval END +line{1 + 0} +line{1 + 1} +END + +var foo =<< trim eval END + line{1 + 0} + line{1 + 1} +END + + var foo =<< trim eval END + line{1 + 0} + line{1 + 1} + END + +# no interpolation (escaped { and }) + +var foo =<< eval END +line{{1 + 0}} +line{{1 + 1}} +END + + var foo =<< eval END +line{{1 + 0}} +line{{1 + 1}} +END + +var foo =<< trim eval END + line{{1 + 0}} + line{{1 + 1}} +END + + var foo =<< trim eval END + line{{1 + 0}} + line{{1 + 1}} + END + + +# no interpolation + +var foo =<< END +line{1 + 0} +line{1 + 1} +END + + var foo =<< END +line{1 + 0} +line{1 + 1} +END + +var foo =<< trim END + line{1 + 0} + line{1 + 1} +END + + var foo =<< trim END + line{1 + 0} + line{1 + 1} + END + + +# end marker must not be followed by whitespace + +# assert_equal(foo, ["END "]) +var foo =<< END +END +END + +# assert_equal(foo, [" END "]) +var foo =<< END + END +END + +# assert_equal(foo, ["END "]) +var foo =<< trim END + END +END + +# assert_equal(foo, ["END "]) + var foo =<< trim END + END + END + + +# end marker must be vertically aligned with :var (if preceded by whitespace) + +# assert_equal(foo, ["END"]) +var foo =<< trim END + END +END + + # assert_equal(foo, ["END"]) + var foo =<< trim END + END + END + +# assert_equal(foo, ["END "]) +var foo =<< trim END +END +END + + # assert_equal(foo, ["END"]) + var foo =<< trim END + END + END + + # assert_equal(foo, ["END "]) + var foo =<< trim END + END + END + + # assert_equal(foo, ["END"]) + var foo =<< trim END + END + END + + # assert_equal(foo, ["END "]) + var foo =<< trim END + END + END + + # assert_equal(foo, ["END "]) + var foo =<< trim END +END +END + + # assert_equal(foo, ["END"]) + var foo =<< trim END + END +END + + # assert_equal(foo, ["END"]) + var foo =<< trim END + END +END + + +# end markers + +var foo =<< !@#$%^&*()_+ +line1 +line2 +!@#$%^&*()_+ + +var foo =<< 0!@#$%^&*()_+ +line1 +line2 +0!@#$%^&*()_+ + +var foo =<< A!@#$%^&*()_+ +line1 +line2 +A!@#$%^&*()_+ + +# error - leading lowercase character +var foo =<< a!@#$%^&*()_+ +line1 +line2 +a!@#$%^&*()_+ + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_ex_loadkeymap.mnv b/uvim/runtime/syntax/testdir/input/mnv9_ex_loadkeymap.mnv new file mode 100644 index 0000000000..5fd5bc36b3 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_ex_loadkeymap.mnv @@ -0,0 +1,28 @@ +mnv9script +# MNV9 :loadkeymap command + + +scriptencoding utf-8 + +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 + +# MNV-script comment characters +\# Line should not match as a MNV9-script comment +# Line should not match as a legacy-script comment +" “ +: # Line should not match as a MNV9-script comment + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_ex_type.mnv b/uvim/runtime/syntax/testdir/input/mnv9_ex_type.mnv new file mode 100644 index 0000000000..af82f9912c --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_ex_type.mnv @@ -0,0 +1,12 @@ +mnv9script +# MNV9 :type command + + +type Foo = string +type Bar = list +type Baz = Foo + +export type Qux = Baz + +type foo = string + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_expressions.mnv b/uvim/runtime/syntax/testdir/input/mnv9_expressions.mnv new file mode 100644 index 0000000000..5fd25b024a --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_expressions.mnv @@ -0,0 +1,215 @@ +mnv9script +# MNV9 expressions + + +# Boolean + +echo true false + +# Number + +# ' separated + +echo 1'000'000 +echo 1'000'000.00 +echo -1'000'000 +echo -1'000'000.00 + +echo 0b1000'0000 +echo 0o1000'0000 +echo 0x1000'0000 +echo -0b1000'0000 +echo -0o1000'0000 +echo -0x1000'0000 + +# Null + +echo null null_blob null_channel null_class null_dict null_function null_job +echo null_list null_object null_partial null_string null_tuple + +# Dictionary + +echo {} +echo { foo: 21 * 2 } +echo { -foo-: 21 * 2 } +echo { 42: 21 * 2 } +echo { 'foo': 21 * 2 } +echo { "foo": 21 * 2 } + +echo { foo: { bar: 21 * 2 } } +echo { foo: { -bar-: 21 * 2 } } +echo { foo: { 42: 21 * 2 } } +echo { foo: { 'bar': 21 * 2 } } +echo { foo: { "bar": 21 * 2 } } + +echo { -foo-: { bar: 21 * 2 } } +echo { -foo-: { -bar-: 21 * 2 } } +echo { -foo-: { 42: 21 * 2 } } +echo { -foo-: { 'bar': 21 * 2 } } +echo { -foo-: { "bar": 21 * 2 } } + +echo { 42: { bar: 21 * 2 } } +echo { 42: { -bar-: 21 * 2 } } +echo { 42: { 42: 21 * 2 } } +echo { 42: { 'bar': 21 * 2 } } +echo { 42: { "bar": 21 * 2 } } + +echo { 'foo': { bar: 21 * 2 } } +echo { 'foo': { -bar-: 21 * 2 } } +echo { 'foo': { 42: 21 * 2 } } +echo { 'foo': { "bar": 21 * 2 } } +echo { 'foo': { 'bar': 21 * 2 } } + +echo { "foo": { bar: 21 * 2 } } +echo { "foo": { -bar-: 21 * 2 } } +echo { "foo": { 42: 21 * 2 } } +echo { "foo": { 'bar': 21 * 2 } } +echo { "foo": { "bar": 21 * 2 } } + +echo { + # comment + foo: { + bar: 21 * 2 + } +} + +# match as keys not scope dictionaries +echo { b: 42, w: 42, t: 42, g: 42, l: 42, s: 42, a: 42, v: 42 } + +# Register + +echo @" @@ +echo @0 @1 @2 @3 @4 @5 @6 @7 @8 @9 +echo @a @b @c @d @e @f @g @h @i @j @k @l @m @n @o @p @q @r @s @t @u @v @w @x @y @z +echo @A @B @C @D @E @F @G @H @I @J @K @L @M @N @O @P @Q @R @S @T @U @V @W @X @Y @Z +echo @- @: @. @% @# @= @* @+ @~ @_ @/ + +# read-only @:, @., @%, @~ +@" = "foo" +@0 = "foo" +@1 = "foo" +@9 = "foo" +@a = "foo" +@k = "foo" +@z = "foo" +@A = "foo" +@K = "foo" +@Z = "foo" +@- = "foo" +@# = "foo" +@= = "foo" +@* = "foo" +@+ = "foo" +@_ = "foo" +@/ = "foo" + +# Operators + +# Ternary + +echo expr ? expr : expr + +echo lnum == 1 ? "top" : lnum +echo lnum == 1 ? "top" : lnum == 1000 ? "last" : lnum + +echo lnum == 1 + ? "top" + : lnum == 1000 + ? "last" + : lnum +echo lnum == 1 ? + "top" : + lnum == 1000 ? + "last" : + lnum + +echo true ? true : false +echo 1 ? 1 : 0 +echo "foo" ? "foo" : "bar" +echo foo ? foo : bar +echo g:foo ? g:foo : g:bar +echo $FOO ? $FOO : $BAR +echo True() ? True() : False() +echo @a ? @a : @b +echo (true) ? (true) : (false) +echo (1) ? (1) : (0) + +# Falsy + +echo expr ?? expr + +echo theList ?? 'list is empty' +echo GetName() ?? 'unknown' + +echo theList + \ ?? 'list is empty' +echo theList ?? + \ 'list is empty' + +echo true ?? true +echo 1 ?? 1 +echo "foo" ?? "foo" +echo foo ?? foo +echo g:foo ?? g:foo +echo $FOO ?? $FOO +echo True() ?? True() +echo @a ?? @a +echo (true) ?? (true) +echo (1) ?? (1) + + +# Function calls + +Foo(true, false, null) + + +# Command {expr} arguments + +if true + echo true +elseif false + echo false +endif + +while true + break +endwhile + +def Foo(): bool + return true +enddef + + +# Issue #14423 (mnv.mnv: Opt out of mnvSearch*) + +:?truthy +const truthy: number = false + ? (0 + ) + : (1 + ) +echo truthy + +def Foo() + :?truthy + const truthy: number = false + ? (0 + ) + : (1 + ) + echo truthy +enddef + + +# Issue #16227 (MNV script ternary expression highlighting) + +var foo = 'foo' # comment +var bar = foo == 'foo' ? 'bar' : 'baz' +var baz = foo == 'foo' + \ ? 'baz' + \ : 'bar' +var qux = foo == 'foo' + ? 'qux' # comment + : 'qux' # comment +echo qux ?? 'quux' + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_function_calls.mnv b/uvim/runtime/syntax/testdir/input/mnv9_function_calls.mnv new file mode 100644 index 0000000000..65369c66c9 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_function_calls.mnv @@ -0,0 +1,317 @@ +mnv9script +# MNV9 function calls +# MNV_TEST_SETUP hi link mnvUserFunc Todo +# MNV_TEST_SETUP hi link mnv9UserFunc Todo + + +call abs(42) +abs(42) + + +# Command/function distinction + +# append browse call chdir confirm copy delete eval execute filter function +# insert join map match mode sort split substitute swapname type + +var append = append(42) +call append(42) +# function +append(42) +# Legacy command +# append (42) + +var browse = browse(42) +call browse(42) +# function +browse(42) +# command +browse (42) + +var call = call(42) +call call(42) +# function +call(42) +# command +call (42) + +var chdir = chdir(42) +call chdir(42) +# function +chdir(42) +# command +chdir (42) + +var confirm = confirm(42) +call confirm(42) +# function +confirm(42) +# command +confirm (42) + +var copy = copy(42) +call copy(42) +# function +copy(42) +# command +copy (42) + +var delete = delete(42) +call delete(42) +# function +delete(42) +# command +delete (42) + +var eval = eval(42) +call eval(42) +# function +eval(42) +# command +eval (42) + +var execute = execute(42) +call execute(42) +# function +execute(42) +# command +execute (42) + +var filter = filter(42) +call filter(42) +# function +filter(42) +# command +filter (42) + +var function = function(42) +call function(42) +# function +function(42) +# command +function (42) + +var insert = insert(42) +call insert(42) +# function +insert(42) +# Legacy command +# insert (42) + +var join = join(42) +call join(42) +# function +join(42) +# command +join (42) + +var map = map(42) +call map(42) +# function +map(42) +# command +map (42) + +var match = match(42) +call match(42) +# function +match(42) +# command +match (42) + +var sort = sort(42) +call sort(42) +# function +sort(42) +# command +sort (42) + +var split = split(42) +call split(42) +# function +split(42) +# command +split (42) + +var substitute = substitute(42) +call substitute(42) +# function +substitute(42) +# command +substitute (42) + +var swapname = swapname(42) +call swapname(42) +# function +swapname(42) +# command +swapname (42) + +var type = type(42) +call type(42) +# function +type(42) +# command +type (42) + +var uniq = uniq(42) +call uniq(42) +# function +uniq(42) +# command +uniq (42) + + +# Errors + +var foo = foo(42) +call foo(42) +foo(42) + +var if = if(42) +call if(42) +# function +if(42) | .. | endif +# command +if (42) | .. | endif + +var echo = echo(42) +call echo(42) +# function +echo(42) +# command +echo (42) + + +# Expressions + +var foo = abs(42) + +abs(42) +call abs(42) +echo "Foo" | abs(42) + +echo abs(42) +echo (abs(42)) +echo abs(42) + foo +echo foo + abs(42) + +Foo() +call Foo() +echo "Foo" | Foo() + +echo Foo() +echo (Foo()) +echo Foo() + bar +echo bar + Foo() + + +# Scope modifiers and qualified names + +var foo = g:foo(42) +call g:foo(42) + +var foo = b:foo(42) +call b:foo(42) + +var foo = w:foo(42) +call w:foo(42) + +var foo = t:foo(42) +call t:foo(42) + +var foo = v:foo(42) +call v:foo(42) + + +var foo = module.foo(42) +call module.foo(42) +module.foo(42) + +var foo = g:module.foo(42) +call g:module.foo(42) +g:module.foo(42) + +var foo = b:module.foo(42) +call b:module.foo(42) +b:module.foo(42) + +var foo = w:module.foo(42) +call w:module.foo(42) +w:module.foo(42) + +var foo = t:module.foo(42) +call t:module.foo(42) +t:module.foo(42) + +var foo = v:module.foo(42) +call v:module.foo(42) +v:module.foo(42) + + +var foo = module#foo(42) +call module#foo(42) +module#foo(42) + +var foo = g:module#foo(42) +call g:module#foo(42) +g:module#foo(42) + + +# User, not builtin, functions + +call g:substitute() +call b:substitute() +call w:substitute() +call t:substitute() +call v:substitute() + +call substitute() + +call g:substitute.substitute() +call b:substitute.substitute() +call w:substitute.substitute() +call t:substitute.substitute() +call v:substitute.substitute() + +call substitute#substitute() +call g:substitute#substitute() + +g:substitute() +b:substitute() +w:substitute() +t:substitute() +v:substitute() + +substitute() + +g:substitute.substitute() +b:substitute.substitute() +w:substitute.substitute() +t:substitute.substitute() +v:substitute.substitute() + +substitute#substitute() +g:substitute#substitute() + + +# Chained function calls + +module.foo().bar() +module.foo().substitute() + + +# Issue 16721 (MNV script highlight of builtin function after |) + +&directory = $'{$MYMNVDIR}/.data/swap/' +&backupdir = $'{$MYMNVDIR}/.data/backup//' +&undodir = $'{$MYMNVDIR}/.data/undo//' +if !isdirectory(&undodir) | mkdir(&undodir, "p") | endif +if !isdirectory(&backupdir) | mkdir(&backupdir, "p") | endif +if !isdirectory(&directory) | mkdir(&directory, "p") | endif + + +# Issue #17766 (valid function call highlighted as error) + +module[0].foo() +module[0].substitute() + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_generic_function_example_enum.mnv b/uvim/runtime/syntax/testdir/input/mnv9_generic_function_example_enum.mnv new file mode 100644 index 0000000000..00621dea4d --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_generic_function_example_enum.mnv @@ -0,0 +1,36 @@ +mnv9script +# MNV_TEST_SETUP highlight link mnv9DefTypeParam Todo +# MNV_TEST_SETUP highlight link mnv9EnumValue Identifier +# MNV_TEST_SETUP let g:mnvsyn_folding = "ef" +# MNV_TEST_SETUP setl fdc=2 fdl=99 fdm=syntax +# See: https://github.com/Project-Tick/Project-Tick/pull/17313#issuecomment-3033537127 (Aliaksei Budavei) + + +enum CommonPair + HelloWorld('hello', 'world'), + Booleans(true, false) + + const _fst: any + const _snd: any + + def new(fst: T, snd: U) + this._fst = fst + this._snd = snd + enddef + + def First(): T + return this._fst + enddef + + def Second(): T + return this._snd + enddef + + def string(): string + return printf("(%s, %s)", this._fst, this._snd) + enddef +endenum + +echo CommonPair.HelloWorld +echo CommonPair.Booleans + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_generic_function_example_list.mnv b/uvim/runtime/syntax/testdir/input/mnv9_generic_function_example_list.mnv new file mode 100644 index 0000000000..8fb745ad1a --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_generic_function_example_list.mnv @@ -0,0 +1,215 @@ +mnv9script +# MNV_TEST_SETUP let g:mnvsyn_folding = "cfi" +# MNV_TEST_SETUP setl fdc=2 fdl=99 fdm=syntax +# MNV_TEST_SETUP hi link mnv9DefTypeParam Todo +# See: https://github.com/Project-Tick/Project-Tick/pull/17313#issuecomment-3046696820 (Aliaksei Budavei) + + +# See https://github.com/Project-Tick/Project-Tick/pull/16604#issuecomment-265202845 . +export interface Listable + def Cons(_: E): Listable + def Reverse(): Listable + def Rest(): Listable + def First(): E + def empty(): bool + def len(): number + def string(): string +endinterface + +enum EmptyList implements Listable + INSTANCE + + def Cons(value: E): Listable + return List.new(value) + enddef + + def Reverse(): Listable + return this + enddef + + def Rest(): Listable + return this + enddef + + def First(): E + return null + enddef + + def empty(): bool + return true + enddef + + def len(): number + return 0 + enddef + + def string(): string + return '[]' + enddef +endenum + +class List implements Listable + const _value: any + const _size: number + var _next: Listable + + def new(value: E) + this._value = value + this._size = 1 + this._next = EmptyList.INSTANCE + enddef + + def _newCons(value: E, size: number) + this._value = value + this._size = size + enddef + + def Cons(value: E): Listable + const list: List = List._newCons(value, (this._size + 1)) + list._next = this + return list + enddef + + def Reverse(): Listable + var result: Listable = List.new(this.First()) + var list: Listable = this.Rest() + + while !list.empty() + result = result.Cons(list.First()) + list = list.Rest() + endwhile + + return result + enddef + + def Rest(): Listable + return this._next + enddef + + def First(): E + return this._value + enddef + + def empty(): bool + return (this._size == 0) + enddef + + def len(): number + return this._size + enddef + + def string(): string + if this.empty() + return '[]' + endif + + var text: string = '[' .. string(this.First()) .. ', ' + var list: Listable = this.Rest() + + while !list.empty() + text ..= string(list.First()) .. ', ' + list = list.Rest() + endwhile + + return strpart(text, 0, (strlen(text) - 2)) .. ']' + enddef +endclass + +export def MakeEmptyList(): Listable + return EmptyList.INSTANCE +enddef + +export def MakeList(value: E): Listable + return List.new(value) +enddef + +export def Map(listable: Listable, Mapper: func(T): U): Listable + var result: Listable = EmptyList.INSTANCE + var list: Listable = listable + + while !list.empty() + result = result.Cons(Mapper(list.First())) + list = list.Rest() + endwhile + + return result.Reverse() +enddef + +export def Filter(listable: Listable, Predicate: func(T): bool): Listable + var result: Listable = EmptyList.INSTANCE + var list: Listable = listable + + while !list.empty() + if Predicate(list.First()) + result = result.Cons(list.First()) + endif + + list = list.Rest() + endwhile + + return result.Reverse() +enddef + +############################################################ + +echo MakeEmptyList() + +const listX: Listable = MakeEmptyList() + .Cons(0).Cons(1).Cons(2).Cons(3) +const listY: Listable = MakeList(0) + .Cons(1).Cons(2).Cons(3) +echo listX == listY +echo listX +echo listX.Reverse() +echo MakeEmptyList().Reverse() +echo Filter(listX, (value: number) => value % 2 != 0) +echo Map(listX, (value: number) => nr2char((value + 60), 1)) + +echo 4 listX.len() listY.len() +echo listX +echo listY + +const list3X: Listable = listX.Rest() +const list3Y: Listable = listY.Rest() +echo 3 list3X.len() list3Y.len() +echo list3X +echo list3Y + +const list2X: Listable = list3X.Rest() +const list2Y: Listable = list3Y.Rest() +echo 2 list2X.len() list2Y.len() +echo list2X +echo list2Y + +const list1X: Listable = list2X.Rest() +const list1Y: Listable = list2Y.Rest() +echo 1 list1X.len() list1Y.len() +echo list1X +echo list1Y + +const list0X: Listable = list1X.Rest() +const list0Y: Listable = list1Y.Rest() +echo 0 list0X.len() list0Y.len() +echo list0X +echo list0Y + +const list0X_: Listable = list0X.Rest() +const list0Y_: Listable = list0Y.Rest() +echo 0 list0X_.len() list0Y_.len() +echo list0X_ +echo list0Y_ + +const list0X__: Listable = list0X_.Rest() +const list0Y__: Listable = list0Y_.Rest() +echo 0 list0X__.len() list0Y__.len() +echo list0X__ +echo list0Y__ + + +const listZ: Listable = MakeList(MakeList(-1)) +const listZZ: Listable = listZ.Cons(MakeList(0)) + .Cons(MakeList(1)) + .Cons(MakeList(2)) + .Cons(MakeList(3)) +echo listZZ + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_generic_function_example_set.mnv b/uvim/runtime/syntax/testdir/input/mnv9_generic_function_example_set.mnv new file mode 100644 index 0000000000..71c8912cd4 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_generic_function_example_set.mnv @@ -0,0 +1,177 @@ +mnv9script +# MNV_TEST_SETUP let g:mnvsyn_folding = "cf" +# MNV_TEST_SETUP setl fdc=2 fdl=99 fdm=syntax +# MNV_TEST_SETUP hi link mnv9DefTypeParam Todo +# See: https://github.com/Project-Tick/Project-Tick/pull/17313#issuecomment-3046696820 (Aliaksei Budavei) + +# See https://github.com/Project-Tick/Project-Tick/issues/14330#issuecomment-2028938515 . +export class Set + final _elements: dict + const _Mapper: func(number, string): any + const ToStringer: func(any): string + const FromStringer: func(string): any + + static def _Mapper(F: func(string): E): func(number, string): E + return ((G: func(string): E) => (_: number, v: string): E => G(v))(F) + enddef + + def new() + this._elements = {} + this._Mapper = _Mapper((s: string): E => eval(s)) + this.ToStringer = (a: E): string => string(a) + this.FromStringer = (s: string): E => eval(s) + enddef + + def newFromList(elements: list, ToStringer: func(E): string, + FromStringer: func(string): E) + this._elements = elements + ->reduce(((F: func(E): string) => (d: dict, v: E) => + extend({[F(v)]: 1}, d))(ToStringer), + {}) + this._Mapper = _Mapper(FromStringer) + this.ToStringer = ToStringer + this.FromStringer = FromStringer + enddef + + def _FromList(elements: list): Set + return Set.newFromList(elements, this.ToStringer, this.FromStringer) + enddef + + def Contains(element: E): bool + return has_key(this._elements, this.ToStringer(element)) + enddef + + def Elements(): list + return keys(this._elements)->mapnew(this._Mapper) + enddef + + def empty(): bool + return empty(this._elements) + enddef + + def len(): number + return len(this._elements) + enddef + + def string(): string + return string(keys(this._elements)) + enddef + + # {1, 2, 3} ⊇ {1, 2}. + def Superset(that: Set): bool + return (len(this._elements) >= len(that._elements)) && that._elements + ->keys() + ->indexof(((set: Set) => (_: number, v: string) => !set._elements + ->has_key(v))(this)) < 0 + enddef + + # {1, 2} ⊆ {1, 2, 3}. + def Subset(that: Set): bool + return (len(this._elements) <= len(that._elements)) && this._elements + ->keys() + ->indexof(((set: Set) => (_: number, v: string) => !set._elements + ->has_key(v))(that)) < 0 + enddef + + # {1, 2, 3} ∪ {2, 3, 4} = {1, 2, 3, 4}. + def Union(that: Set): Set + return this._FromList({} + ->extend(that._elements) + ->extend(this._elements) + ->keys() + ->map(this._Mapper)) + enddef + + # {1, 2, 3} ∩ {2, 3, 4} = {2, 3}. + def Intersection(that: Set): Set + return this._FromList(this._elements + ->keys() + ->filter(((set: Set) => (_: number, v: string) => set._elements + ->has_key(v))(that)) + ->map(this._Mapper)) + enddef + + # {1, 2, 3} \ {2, 3, 4} = {1}. + # {2, 3, 4} \ {1, 2, 3} = {4}. + def SetDifference(that: Set): Set + return this._FromList(this._elements + ->keys() + ->filter(((set: Set) => (_: number, v: string) => !set._elements + ->has_key(v))(that)) + ->map(this._Mapper)) + enddef + + # {1, 2, 3} △ {2, 3, 4} = {1, 4}. + def SymmetricDifference(that: Set): Set + return this.Union(that).SetDifference(this.Intersection(that)) + enddef +endclass + +############################################################ + +const ToStr: func(number): string = (s: number) => string(s) +const FromStr: func(string): number = (s: string) => str2nr(s) + +echo Set.newFromList([1, 2, 3], ToStr, FromStr) + .Subset(Set.newFromList([1, 2], ToStr, FromStr)) +echo Set.newFromList([1, 2], ToStr, FromStr) + .Subset(Set.newFromList([1, 2, 3], ToStr, FromStr)) +echo Set.newFromList([1, 2], ToStr, FromStr) + .Superset(Set.newFromList([1, 2, 3], ToStr, FromStr)) +echo Set.newFromList([1, 2, 3], ToStr, FromStr) + .Superset(Set.newFromList([1, 2], ToStr, FromStr)) + +echo Set.newFromList([1, 2, 3], ToStr, FromStr) + .Union(Set.newFromList([2, 3, 4], ToStr, FromStr)) + .Elements() +echo Set.newFromList([2, 3, 4], ToStr, FromStr) + .Union(Set.newFromList([1, 2, 3], ToStr, FromStr)) + .Elements() + +echo Set.newFromList([1, 2, 3], ToStr, FromStr) + .Intersection(Set.newFromList([2, 3, 4], ToStr, FromStr)) + .Elements() +echo Set.newFromList([2, 3, 4], ToStr, FromStr) + .Intersection(Set.newFromList([1, 2, 3], ToStr, FromStr)) + .Elements() + +echo Set.newFromList([1, 2, 3], ToStr, FromStr) + .SetDifference(Set.newFromList([2, 3, 4], ToStr, FromStr)) + .Elements() +echo Set.newFromList([2, 3, 4], ToStr, FromStr) + .SetDifference(Set.newFromList([1, 2, 3], ToStr, FromStr)) + .Elements() + +echo Set.newFromList([1, 2, 3], ToStr, FromStr) + .SymmetricDifference(Set.newFromList([2, 3, 4], ToStr, FromStr)) + .Elements() +echo Set.newFromList([2, 3, 4], ToStr, FromStr) + .SymmetricDifference(Set.newFromList([1, 2, 3], ToStr, FromStr)) + .Elements() + +############################################################ + +const none: Set = Set.new() +echo none.len() +echo none.empty() +echo none.string() +echo string(none.Elements()) + +const sets: Set = Set.newFromList( + [Set.new(), Set.new(), Set.new(), Set.new()], + (o: Set): string => string(o), + (_: string): Set => Set.new()) +echo sets.len() +echo sets.empty() +echo sets.string() +echo string(sets.Elements()) + +const lists: Set = Set.newFromList>( + [[[[[]]]]], + (o: list): string => string(o), + (s: string): list => eval(s)) +echo lists.len() +echo lists.empty() +echo lists.string() +echo string(lists.Elements>()) + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_generic_functions.mnv b/uvim/runtime/syntax/testdir/input/mnv9_generic_functions.mnv new file mode 100644 index 0000000000..fed2cced45 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_generic_functions.mnv @@ -0,0 +1,97 @@ +mnv9script +# MNV9 generic functions +# MNV_TEST_SETUP let g:mnvsyn_folding = "cf" +# MNV_TEST_SETUP setl fdc=2 fdl=99 fdm=syntax +# MNV_TEST_SETUP hi link mnv9DefTypeParam Todo + + +# :help generic-functions + +def MyFunc(param1: T): T + var f: A + var x = param1 + return x +enddef + +MyFunc>() + + +def Flatten(x: list>): list + var result: list = [] + for inner in x + result += inner + endfor + return result +enddef + +echo Flatten([[1, 2], [3]]) + + +class A + def Foo() + enddef +endclass +var a = A.new() +a.Foo() + + +def MakeEcho(): func(T): T + return (x: T): T => x +enddef + +var EchoNumber = MakeEcho() +echo EchoNumber(123) + +var EchoString = MakeEcho() +echo EchoString('abc') + +# FIXME: add specific command handling +# defcompile MyFunc, dict> + +# disassemble MyFunc> +# disassemble MyFunc> + + +# funcrefs + +var Foo = Bar +Execute(Bar) + +var Foo = bar.Baz +Execute(bar.Baz) + +class Foo + def _MethodA(arg: T) + echo arg + enddef + def MethodB() + var F = this._MethodA + F("text") + enddef +endclass + +class Bar extends Foo + def MethodC() + var F = super._MethodA + F("text") + enddef +endclass + + +# Issue: https://github.com/Project-Tick/Project-Tick/pull/17722#issuecomment-3075531052 + +export def Id(): func(U): U + return (X_: U) => X_ +enddef + +export def Const(): func(U): func(V): U + return (X_: U) => (_: V) => X_ +enddef + +export def Flip(): func(func(U): func(V): W): func(V): func(U): W + return (F_: func(U): func(V): W) => (Y_: V) => (X_: U) => F_(X_)(Y_) +enddef + +echo Const()(2)(null) + == Flip()(Const())(null)(2) + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_lambdas.mnv b/uvim/runtime/syntax/testdir/input/mnv9_lambdas.mnv new file mode 100644 index 0000000000..667dcd2bac --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_lambdas.mnv @@ -0,0 +1,161 @@ +mnv9script +# MNV9 lambda expressions +# MNV_TEST_SETUP hi link mnv9LambdaOperator Todo +# MNV_TEST_SETUP hi link mnv9LambdaParen Todo + + +var Foo: func +var expr = 0 + +# without return type + +Foo = () => expr +Foo = (_) => expr +Foo = (x) => expr + +Foo = (...y) => expr +Foo = (_, ...y) => expr +Foo = (x, ...y) => expr + +Foo = (x, y) => expr + +Foo = (_: number) => expr +Foo = (x: number) => expr + +Foo = (...y: list) => expr +Foo = (_: number, ...y: list) => expr +Foo = (x: number, ...y: list) => expr + +Foo = (x: number, y: number) => expr + +# with return type + +Foo = (): number => expr +Foo = (_): number => expr +Foo = (x): number => expr + +Foo = (...y): number => expr +Foo = (_, ...y): number => expr +Foo = (x, ...y): number => expr + +Foo = (x, y): number => expr + +Foo = (_: number): number => expr +Foo = (x: number): number => expr + +Foo = (...y: list): number => expr +Foo = (_: number, ...y: list): number => expr +Foo = (x: number, ...y: list): number => expr + +Foo = (x: number, y: number): number => expr + +# with compound return type + +Foo = (): list => expr +Foo = (_): list => expr +Foo = (x): list => expr + +Foo = (...y): list => expr +Foo = (_, ...y): list => expr +Foo = (x, ...y): list => expr + +Foo = (x, y): list => expr + +Foo = (_: number): list => expr +Foo = (x: number): list => expr + +Foo = (...y: list): list => expr +Foo = (_: number, ...y: list): list => expr +Foo = (x: number, ...y: list): list => expr + +Foo = (x: number, y: number): list => expr + + +# Post-operator comments + +Foo = () => # comment + expr +Foo = () => + # comment + expr +Foo = () => + + # comment + + expr + + +# Line continuations + +Foo = (x: string, + \ y: number, + \ z: bool) => expr + +Foo = (x: string, + \ y: number, + \ z: bool) + \ => expr + +Foo = (x: string, + \ y: number, + \ z: bool): number => expr + +Foo = (x: string, + \ y: number, + \ z: bool): number + \ => expr + +Foo = (x: string, + \ y: number, + \ z: bool): + \ number => expr + + +# Funcref call + +echo (() => 42)() +echo ((x: string): number => 42)("foo") + + +# :help mnv9-lambda + +var list = [1, 2, 3] +echo filter(list, (k, v) => + v > 0) +echo filter(list, (k, + \ v) + \ => v > 0) + +var Callback = (..._) => 'anything' +echo Callback(1, 2, 3) # displays "anything" + +var Lambda = (arg) => { + g:was_called = 'yes' + return expr + } + +var count = 0 +var timer = timer_start(500, (_) => { + count += 1 + echom 'Handler called ' .. count + }, {repeat: 3}) + +var dict = {} +var d = mapnew(dict, (k, v): string => { + return 'value' + }) + + +# Issue #15970 (mnv9: Restore and extend the recognition of Enum body items) + +def Op(): func(func(number, number): number): func(number, Digit): number + return (F: func(number, number): number) => + (x: number, y: Digit): number => F(x, y.value) +enddef ####################### ^ mnvCommand? + + +# Issue #16965 (mnv syntax: wrong highlight with lambda, autoload, and false keyword) + +autocmd BufRead * timer_start(0, (_) => f#a(false, false)) +autocmd + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_legacy_header.mnv b/uvim/runtime/syntax/testdir/input/mnv9_legacy_header.mnv new file mode 100644 index 0000000000..d9afd0c86c --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_legacy_header.mnv @@ -0,0 +1,20 @@ +" MNV9 legacy script header + + +" comment + +if !has('mnv9script') + # 42 " comment + source foo.mnv + finish +endif + +" comment + +mnv9script noclear + +# comment + + # string only recognised with leading char + "useless string" + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_legacy_header_fold.mnv b/uvim/runtime/syntax/testdir/input/mnv9_legacy_header_fold.mnv new file mode 100644 index 0000000000..e6b0751ae3 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_legacy_header_fold.mnv @@ -0,0 +1,22 @@ +" MNV9 legacy script header +" MNV_TEST_SETUP let g:mnvsyn_folding = "H" +" MNV_TEST_SETUP setl fdc=2 fdl=99 fdm=syntax + + +" comment + +if !has('mnv9script') + # 42 " comment + source foo.mnv + finish +endif + +" comment + +mnv9script noclear + +# comment + + # string only recognised with leading char + "useless string" + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_no_comment_strings.mnv b/uvim/runtime/syntax/testdir/input/mnv9_no_comment_strings.mnv new file mode 100644 index 0000000000..270f2cf31c --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_no_comment_strings.mnv @@ -0,0 +1,27 @@ +mnv9script +# MNV9 no comment strings +# MNV_TEST_SETUP let g:mnvsyn_comment_strings = v:false + + +# pre "string" post + +function Foo() + " pre "string" post +endfunction + +def Bar() + # pre "string" post +enddef + +command Foo { + # pre "string" post +} + +autocmd BufNewFile * { + # pre "string" post +} + +{ + # pre "string" post +} + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_shebang.mnv b/uvim/runtime/syntax/testdir/input/mnv9_shebang.mnv new file mode 100644 index 0000000000..60f8f0fc7e --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_shebang.mnv @@ -0,0 +1,8 @@ +#!/usr/bin/env mnv -S +mnv9script +# MNV9 shebang line + + +# just a line comment +#!/usr/bin/env mnv -S + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_super_this_keywords.mnv b/uvim/runtime/syntax/testdir/input/mnv9_super_this_keywords.mnv new file mode 100644 index 0000000000..fbb35ae5d6 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_super_this_keywords.mnv @@ -0,0 +1,87 @@ +mnv9script +# MNV9 this and super keywords +# MNV_TEST_SETUP hi link mnv9This Todo +# MNV_TEST_SETUP hi link mnv9Super Todo + + +def Echo(...args: list) + echo args +enddef + +class Foo + var x: number = 42 + var y: number = this.x + 41 + var z: number = this.x + this.y + + def new() + echo this.x this.y this.z + enddef + + def newXY(this.x, this.y, this.z) + enddef + + def Def1(arg = this.x) + this.y = arg + this.z += arg + enddef + + def Def2(arg = (this.x + this.y + this.z)) + Echo(this, this.x, this.y, this.z) + this->Echo(this.x, this.y, this.z) + enddef + + def Def3(): Foo + return this + enddef + + def Def4(arg: Foo = this): Foo + return arg + enddef +endclass + +class Bar extends Foo + def Def1() + super.Def1() + enddef + + def Def2() + var a = super.x * super.y * super.z + var b = [super.x, super.y, super.z] + var c = {super: super.x, this: super.y, true: super.z} + var d = {super: c, this: c} + echo c.super + echo c.this + echo d.super.this + echo d.this.super + echo a b c + enddef + + def Def5() + var a = this.x * this.y + var b = (this.x * this.y) + var c = [this.x, this.y] + var d = {super: this.x, this: this.y} + echo a b c d + enddef + + def Def6() + var x = this#super#x + var y = super#this#y + this#super#Func() + super#this#Func() + enddef + + def Def7(arg = super.Def3()) + echo arg + enddef + + def Def8(): number + var F = () => this.x + var G = () => super.x + return F() + G() + enddef +endclass + +defcompile Foo +defcompile Bar + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_super_this_keywords2.mnv b/uvim/runtime/syntax/testdir/input/mnv9_super_this_keywords2.mnv new file mode 100644 index 0000000000..dbf20dfc92 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_super_this_keywords2.mnv @@ -0,0 +1,63 @@ +mnv9script +# MNV9 this and super keywords +# MNV_TEST_SETUP hi link mnv9Super Todo +# MNV_TEST_SETUP hi link mnv9This Todo +# See: https://github.com/Project-Tick/Project-Tick/pull/16476#issuecomment-2638191110 + + +class A + var _value: any + + def new(value: any) + this._BaseInit(value) + enddef + + def _BaseInit(value: any) + this._value = value + enddef + + def Value(): any + return this._value + enddef +endclass + +class B extends A + def new(value: number) + super._BaseInit(value) + enddef + + def Value(): number + echo this + return super._value + enddef +endclass + +class C extends A + #### E117 + # def new(value: string) + # super(value) + # enddef + + #### E1034 + # def new(super._value) + # enddef + + #### E1034 + # def new(value: string) + # super._value = value + # enddef + + #### E1356 + # def Super(): A + # return super + # enddef + + def This(): C + return this + enddef +endclass + +echo 1 == A.new(1).Value() +echo 2 == B.new(2).Value() +defcompile C + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_super_this_keywords3.mnv b/uvim/runtime/syntax/testdir/input/mnv9_super_this_keywords3.mnv new file mode 100644 index 0000000000..6412cf2b95 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_super_this_keywords3.mnv @@ -0,0 +1,27 @@ +mnv9script +# MNV9 this and super keywords +# MNV_TEST_SETUP hi link mnv9Super Todo +# MNV_TEST_SETUP hi link mnv9This Todo +# See: https://github.com/Project-Tick/Project-Tick/pull/16476#issuecomment-2635119478 + + +class A + const _value: number + + def new(this._value) + enddef + + def K(): func(any): number + return ((_: any) => this._value) + enddef +endclass + +class B extends A + def K(): func(any): number + return ((_: any) => super._value) + enddef +endclass + +echo 1 == A.new(1).K()(null) +echo 2 == B.new(2).K()(null) + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_tuples.mnv b/uvim/runtime/syntax/testdir/input/mnv9_tuples.mnv new file mode 100644 index 0000000000..946a6be1b7 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_tuples.mnv @@ -0,0 +1,25 @@ +mnv9script +# MNV9 tuples + + +# https://github.com/Project-Tick/Project-Tick/pull/16935#issuecomment-2738310273 + +function LegacyMakeEntry(key, value) abort + return (a:key, a:value) +endfunction + +def MakeEntry(key: string, value: any): tuple + return (key, value) +enddef + +function LegacyMakeLazyList(e1, e2) abort + return ({e1_, e2_ -> {-> [e1_, e2_]}}(a:e1, a:e2)) +endfunction + +def MakeLazyList(e1: any, e2: any): func(): list + return (((e1_: any, e2_: any) => () => [e1_, e2_])(e1, e2)) +enddef + +echo MakeEntry('key', 'value') == list2tuple(MakeLazyList('key', 'value')()) +echo LegacyMakeEntry('key', 'value') == list2tuple(LegacyMakeLazyList('key', 'value')()) + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_types.mnv b/uvim/runtime/syntax/testdir/input/mnv9_types.mnv new file mode 100644 index 0000000000..b68d2a2126 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_types.mnv @@ -0,0 +1,17 @@ +mnv9script +# MNV9 types +# MNV_TEST_SETUP hi link mnvTypeAny Todo +# MNV_TEST_SETUP hi link mnv9VariableTypeAny Todo + + +# builtin types (distinct any highlighting) + +var foo: bool +var bar: any + +def Foo(arg: bool): bool +enddef + +def Bar(arg: any): any +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_types_example_object.mnv b/uvim/runtime/syntax/testdir/input/mnv9_types_example_object.mnv new file mode 100644 index 0000000000..11ac3cd68d --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_types_example_object.mnv @@ -0,0 +1,29 @@ +mnv9script +# MNV9 object type constructor + + +# Issue #18677 (No recognition of object types - Aliaksei Budavei) + +interface I + def string(): string +endinterface + +class C implements I + def string(): string + return "C" + enddef +endclass + +enum E implements I + INSTANCE + + def string(): string + return "E" + enddef +endenum + +var c: object = C.new() +var e: object = E.INSTANCE +var os: tuple, object> = (c, e) +echo (c, e) == os + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_types_object.mnv b/uvim/runtime/syntax/testdir/input/mnv9_types_object.mnv new file mode 100644 index 0000000000..266aa02c71 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_types_object.mnv @@ -0,0 +1,27 @@ +mnv9script +# MNV9 object type constructor +# MNV_TEST_SETUP hi link mnvTypeObject Todo +# MNV_TEST_SETUP hi link mnvTypeObjectBracket Title + + +interface I +endinterface + +var a: object +var b: object +var c: object> +var d: object> + +def Foo( + arg1: object, + arg2: object, + arg3: object>, + arg4: object>) +enddef + +def Bar(): object +enddef + +def Baz(): object> +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv9_variables.mnv b/uvim/runtime/syntax/testdir/input/mnv9_variables.mnv new file mode 100644 index 0000000000..8e307f060f --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv9_variables.mnv @@ -0,0 +1,269 @@ +mnv9script +# MNV9 variable highlighting + + +# Declarations + +var foo = expr + +b:foo = expr +g:foo = expr +t:foo = expr +w:foo = expr + +v:true = expr + +$FOO = expr + +var [foo, bar] = expr +var [foo, + \ bar] = expr +var [$foo, $bar] = expr +var [$foo, + \ $bar] = expr + +var [foo, bar; baz] = expr +var [foo, + \ bar; + \ baz] = expr +var [$foo, $bar; $baz] = expr +var [$foo, + \ $bar; + \ $baz] = expr + +var foo =<< END +... +END +var foo =<< trim END +... +END +var foo =<< eval END +... +END +var foo =<< trim eval END +... +END +var foo =<< eval trim END +... +END + +# Typed declarations + +var foo: tuple = expr +var foo: tuple = expr +var foo: tuple = expr +var foo: tuple<...list> = expr +var foo: tuple<...list> = expr +var foo: tuple> = expr + +var foo: tuple< + #\ comment + \number, + #\ comment + \string, + #\ comment + \bool + \> + +# Assignments + +foo = expr + +foo[0] = expr + +foo[1:2] = expr +foo[:2] = expr +foo[1:] = expr +foo[:] = expr + +foo["key"] = expr +foo['key'] = expr + +foo += expr +foo -= expr +foo *= expr +foo /= expr +foo %= expr +foo ..= expr + +b:foo = expr +g:foo = expr +t:foo = expr +w:foo = expr + +b:foo += expr +g:foo += expr +t:foo += expr +w:foo += expr + +b:foo -= expr +g:foo -= expr +t:foo -= expr +w:foo -= expr + +b:foo *= expr +g:foo *= expr +t:foo *= expr +w:foo *= expr + +b:foo /= expr +g:foo /= expr +t:foo /= expr +w:foo /= expr + +b:foo %= expr +g:foo %= expr +t:foo %= expr +w:foo %= expr + +b:foo ..= expr +g:foo ..= expr +t:foo ..= expr +w:foo ..= expr + +$FOO = expr +$FOO ..= expr + +@f = expr +@f ..= expr + +&ari = expr + +&t_k1 = "\[234;" + +&ari ..= expr + +&ari += expr +&ari -= expr + +&l:aleph = expr + +&l:aleph ..= expr +&l:aleph += expr +&l:aleph -= expr + +&g:aleph = expr + +&g:aleph ..= expr +&g:aleph += expr +&g:aleph -= expr + +[foo, bar] = expr +[foo, + \ bar] = expr +[v:true, v:false] = expr +[v:true, + \ v:false] = expr +[&ari, &bkc] = expr +[&ari, + \ &bkc] = expr +[$foo, $bar] = expr +[$foo, + \ $bar] = expr +[@a, @b] = expr +[@a, + \ @a] = expr + +[foo, bar] ..= expr +[foo, bar] += expr +[foo, bar] -= expr +[foo, bar] *= expr +[foo, bar] /= expr +[foo, bar] %= expr + +[foo, bar; baz] = expr +[foo, + \ bar; + \ baz] = expr +[v:true, v:false; v:none] = expr +[v:true, + \ v:false; + \ v:none] = expr +[$foo, $bar; $baz] = expr +[$foo, + \ $bar; + \ $baz] = expr +[&ari, &bkc; &cmp] = expr +[&ari, + \ &bkc; + \ &cmp] = expr +[@a, @b; @c] = expr +[@a, + \ @b; + \ @c] = expr + +foo =<< END +... +END +foo =<< trim END +... +END +foo =<< eval END +... +END +foo =<< trim eval END +... +END +foo =<< eval trim END +... +END + +# :unlet + +unlet foo +unlet foo bar +unlet foo + #\ comment + \ bar + +unlet! foo +unlet! foo bar +unlet! foo + #\ comment + \ bar + +unlet $FOO +unlet! $FOO + +unlet list[3] +unlet list[3:] +unlet dict['two'] +unlet dict.two + +unlet foo # comment +unlet foo #\ comment +unlet foo | echo "Foo" +unlet foo bar # comment +unlet foo bar #\ comment +unlet foo bar | echo "Foo" + +# :for + +for foo in expr +endfor + +for [foo, bar] in expr +endfor + +# Scope dictionaries + +echo get(b:, 'foo', 42) +echo get(w:, 'foo', 42) +echo get(t:, 'foo', 42) +echo get(g:, 'foo', 42) +echo get(v:, 'foo', 42) + +for k in keys(b:) | echo b:[k] | endfor +for k in keys(w:) | echo w:[k] | endfor +for k in keys(t:) | echo t:[k] | endfor +for k in keys(g:) | echo g:[k] | endfor +for k in keys(v:) | echo v:[k] | endfor + +# Neomnv-specific variables (not highlighted by default) + +echo v:lua v:msgpack_types v:relnum v:stderr v:termrequest v:virtnum + +echo &channel &inccommand &mousescroll &pumblend &redrawdebug &scrollback +echo &shada &shadafile &statuscolumn &termpastefilter &termsync &winbar +echo &winblend &winhighlight + diff --git a/uvim/runtime/syntax/testdir/input/mnv_comment_strings.mnv b/uvim/runtime/syntax/testdir/input/mnv_comment_strings.mnv new file mode 100644 index 0000000000..11707b045a --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_comment_strings.mnv @@ -0,0 +1,22 @@ +" MNV comment strings +" MNV_TEST_SETUP let g:mnvsyn_comment_strings = v:true + + +" pre "string" post + +function Foo() + " pre "string" post +endfunction + +def Bar() + # pre "string" post +enddef + +command Foo { + # pre "string" post +} + +autocmd BufNewFile * { + # pre "string" post +} + diff --git a/uvim/runtime/syntax/testdir/input/mnv_comments.mnv b/uvim/runtime/syntax/testdir/input/mnv_comments.mnv new file mode 100644 index 0000000000..6bfa03aec3 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_comments.mnv @@ -0,0 +1,83 @@ +" MNV comments + + +" Legacy-script comment + +# 42 " comment + +function! Foo() + " Legacy-script comment + # 42 " comment +endfunction + +def! Bar() + # MNV9-script comment + "useless string" # comment +enddef + +command -nargs=1 FooCommand { + # MNV9-script comment + "useless string" # comment +} + +autocmd BufNewFile * { + # MNV9-script comment + "useless string" # comment +} + + +" Multiline comments + +" comment + \ continuing comment + \ continuing comment + +let foo = 42 " commment + \ continuing comment + \ continuing comment + +" :Foo + \ arg1 + "\ comment + \ arg2 + +echo "TOP" + + +" Line-continuation comments + +:Foo + "\ line continuation comment + \ arg1 + "\ line continuation comment + \ arg2 + + +" 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 + + +" PR: #19390 +" https://github.com/Project-Tick/Project-Tick/pull/19390#issue-3933755846 + +def CommentTitle2() + # E1234: should not have mnv9CommentTitle on 'E1234:' + # ERR34: should have mnv9CommentTitle on 'ERR34:' +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_abbreviate.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_abbreviate.mnv new file mode 100644 index 0000000000..c40b47e229 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_abbreviate.mnv @@ -0,0 +1,54 @@ +" MNV :abbreviate commands +" MNV_TEST_SETUP hi link mnvMapLhs Identifier +" MNV_TEST_SETUP hi link mnvMapRhs Todo +" MNV_TEST_SETUP hi link mnvMapRhsContinue Todo + + +abbrev foo foobar +cabbrev cfoo cfoobar +iabbrev ifoo ifoobar + +abbrev foo foobar +cabbrev cfoo cfoobar +iabbrev ifoo ifoobar + +noreabbrev foo foobar +cnoreabbrev cfoo cfoobar +inoreabbrev ifoo ifoobar + +abbrev foo foobar +cabbrev cfoo cfoobar +iabbrev ifoo ifoobar + +unabbrev foo +cunabbrev cfoo +iunabbrev ifoo + +abclear +cabclear +iabclear + + +" Multiline RHS + +abbrev foo + \ foobar + +abbrev foo + \ + \ foobar + +abbrev foo + "\ comment + \ foobar + +abbrev foo + "\ comment + \ foo + "\ comment + \bar + +abbrev lhs + "\ comment (matches as RHS but harmless) +echo "clear" + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_at.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_at.mnv new file mode 100644 index 0000000000..c0674a4945 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_at.mnv @@ -0,0 +1,66 @@ +" MNV :@ command + + +@0 +@1 +@2 +@3 +@4 +@5 +@6 +@7 +@8 +@9 + +@a +@k +@z + +@" +@. +@= +@* +@+ + +@: + +" repeats +@ +@@ + +@a | echo "..." +@a " comment + + +def MNV9Context() + :@0 + :@1 + :@2 + :@3 + :@4 + :@5 + :@6 + :@7 + :@8 + :@9 + + :@a + :@k + :@z + + :@" + :@. + :@= + :@* + :@+ + + :@: + + # repeats + :@ + :@@ + + :@a | echo "..." + :@a # comment +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_augroup.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_augroup.mnv new file mode 100644 index 0000000000..c5a34ea9ba --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_augroup.mnv @@ -0,0 +1,71 @@ +" MNV :augroup command +" MNV_TEST_SETUP let g:mnvsyn_folding = "a" +" MNV_TEST_SETUP setl fdc=2 fdl=999 fdm=syntax +" MNV_TEST_SETUP hi link mnvAugroupName Todo + + +augroup foo + autocmd! + autocmd BufRead * echo "Foo" +augroup END + +augroup foo | autocmd! | augroup END +augroup! foo + +augroup !@#$%^&*()_+ + autocmd BufRead * echomsg "Foo" +augroup END + +augroup !@#$%^&*()_+ | autocmd! | augroup END +augroup! !@#$%^&*()_+ + +augroup !@#$%^&*()_+ | autocmd! | augroup END +augroup! !@#$%^&*()_+ + +augroup no\|echo | autocmd! | augroup END +augroup! no\|echo + +augroup no\"echo | autocmd! | augroup END +augroup! no\"echo + +augroup \|echo\| | autocmd! | augroup END +augroup! \|echo\| + +augroup \"echo\" | autocmd! | augroup END +augroup! \"echo\" + +augroup \|\" | autocmd! | augroup END +augroup! \|\" + +augroup \"\| | autocmd! | augroup END +augroup! \"\| + + +" trailing bar and tail comments + +augroup foo"comment + autocmd! + autocmd BufRead * echo "Foo" +augroup END"comment + +augroup foo|echo "Foo" + autocmd! + autocmd BufRead * echo "Foo" +augroup END|echo "Foo" + +augroup! foo"comment +augroup! foo|echo "Foo" + + +" list groups + +augroup +augroup | echo "Foo" +augroup " comment + + +" groups named END* + +augroup ending +augroup END + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_autocmd.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_autocmd.mnv new file mode 100644 index 0000000000..e864479641 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_autocmd.mnv @@ -0,0 +1,257 @@ +" MNV :autocmd command +" MNV_TEST_SETUP hi link mnvAutoCmdGroup Todo +" MNV_TEST_SETUP hi link mnvUserAutoEvent Title + + +" Define + +autocmd foogroup BufRead *.txt echo "Foo" | echo "Bar" +autocmd BufRead *.txt echo "Foo" | echo "Bar" +autocmd BufRead,BufNewFile *.txt echo "Foo" | echo "Bar" +autocmd User FooEvent echo "Foo" | echo "Bar" + +autocmd foogroup BufRead *.txt ++once echo "Foo" | echo "Bar" +autocmd BufRead *.txt ++once echo "Foo" | echo "Bar" +autocmd BufRead,BufNewFile *.txt ++once echo "Foo" | echo "Bar" +autocmd User FooEvent ++once echo "Foo" | echo "Bar" + +autocmd foogroup BufRead *.txt ++nested echo "Foo" | echo "Bar" +autocmd BufRead *.txt ++nested echo "Foo" | echo "Bar" +autocmd BufRead,BufNewFile *.txt ++nested echo "Foo" | echo "Bar" +autocmd User FooEvent ++nested echo "Foo" | echo "Bar" + +autocmd foogroup BufRead *.txt ++once ++nested echo "Foo" | echo "Bar" +autocmd BufRead *.txt ++once ++nested echo "Foo" | echo "Bar" +autocmd BufRead,BufNewFile *.txt ++once ++nested echo "Foo" | echo "Bar" +autocmd User FooEvent ++once ++nested echo "Foo" | echo "Bar" + +autocmd foogroup BufRead ++once ++nested echo "Foo" | echo "Bar" +autocmd foogroup BufRead ++once ++nested echo "Foo" | echo "Bar" +autocmd foogroup BufRead ++once ++nested echo "Foo" | echo "Bar" +autocmd BufRead ++once ++nested echo "Foo" | echo "Bar" +autocmd BufRead ++once ++nested echo "Foo" | echo "Bar" +autocmd BufRead ++once ++nested echo "Foo" | echo "Bar" +autocmd BufRead,BufNewFile ++once ++nested echo "Foo" | echo "Bar" +autocmd BufRead,BufNewFile ++once ++nested echo "Foo" | echo "Bar" +autocmd BufRead,BufNewFile ++once ++nested echo "Foo" | echo "Bar" +autocmd User FooEvent,BarEvent ++once ++nested echo "Foo" | echo "Bar" + +autocmd foogroup BufRead foo ++once ++nested echo "Foo" | echo "Bar" + +autocmd BufRead *.txt { + echo "Foo" + echo "Bar" +} +autocmd BufRead,BufNewFile *.txt { + echo "Foo" + echo "Bar" +} +autocmd User FooEvent { + echo "Foo" + echo "Bar" +} +autocmd foogroup BufRead *.txt { + echo "Foo" + echo "Bar" +} + + +" Multiline {cmd} arg + +autocmd BufRead *.txt echo "Foo" + \| echo "Bar" + \| echo "Baz" + +autocmd BufRead *.txt echo "Foo" | + \ echo "Bar" | + \ echo "Baz" + +autocmd BufRead *.txt + "\ comment + \ echo "Foo" | + "\ comment + \ echo "Bar" + "\ comment + \| echo "Baz" + +autocmd BufRead,BufNewFile *.txt + "\ comment + \ echo "Foo" | + "\ comment + \ echo "Bar" + "\ comment + \| echo "Baz" +autocmd User FooEvent + "\ comment + \ echo "Foo" | + "\ comment + \ echo "Bar" + "\ comment + \| echo "Baz" +autocmd foogroup BufRead *.txt + "\ comment + \ echo "Foo" | + "\ comment + \ echo "Bar" + "\ comment + \| echo "Baz" + + +" Multiple patterns + +autocmd BufRead *.txt,*.mnv,*.c echo "Foo" | echo "Bar" +autocmd BufRead ,*.mnv,*.c echo "Foo" | echo "Bar" +autocmd BufRead *.txt,,*.c echo "Foo" | echo "Bar" +autocmd BufRead *.txt,*.mnv, echo "Foo" | echo "Bar" + +autocmd BufRead ,, echo "Foo" | echo "Bar" + + +" FIXME: "BufRead" and "*" are valid group names, however, :help :augroup +" explicitly directs the user NOT to shadow event names with group names +autocmd BufRead BufRead *.txt ++once ++nested echo "Foo" +autocmd * BufRead *.txt ++once ++nested echo "Foo" + + +" Remove + +autocmd! foogroup BufRead *.txt ++once ++nested echo "Foo" | echo "Bar" +autocmd! BufRead *.txt ++once ++nested echo "Foo" | echo "Bar" +autocmd! foogroup User FooEvent ++once ++nested echo "Foo" | echo "Bar" +autocmd! User FooEvent ++once ++nested echo "Foo" | echo "Bar" + +autocmd! foogroup BufRead *.txt +autocmd! BufRead *.txt +autocmd! foogroup User FooEvent +autocmd! User FooEvent + +autocmd! foogroup * *.txt +autocmd! * *.txt + +autocmd! foogroup BufRead +autocmd! BufRead +autocmd! foogroup User FooEvent +autocmd! User FooEvent + +autocmd! foogroup +autocmd! + +" command -> bang -> group "!foogroup!" +autocmd!!foogroup! +" command -> bang -> group "foogroup" +autocmd!foogroup +" command -> bang -> event +autocmd!BufRead +" command -> bang -> user event +autocmd!User FooEvent + +" FIXME: "*" and "BufRead" are valid group names, however, :help :augroup +" explicitly directs the user NOT to shadow event names +" command -> group "*" -> event glob -> pattern +autocmd!* * *.txt +" command -> group "BufRead" -> event "BufRead" -> pattern +autocmd!BufRead BufRead *.txt + + +" List + +autocmd foogroup BufRead *.txt +autocmd BufRead *.txt + +autocmd foogroup * *.txt +autocmd * *.txt + +autocmd foogroup BufRead +autocmd BufRead +autocmd foogroup User FooEvent +autocmd User FooEvent + +autocmd foogroup +autocmd + + +" :doautoall + +doautoall BufRead + +doautoall BufRead *.txt +doautoall foogroup BufRead +doautoall BufRead + +doautoall foogroup BufRead *.txt + +doautoall User FooEvent +doautoall foogroup User FooEvent +doautoall User FooEvent + +doautoall foogroup User FooEvent + +doautoall foogroup BufRead *.txt | echo "Foo" +doautoall foogroup BufRead *.txt " comment + + +" :doautocmd + +doautocmd BufRead + +doautocmd BufRead *.txt +doautocmd foogroup BufRead +doautocmd BufRead + +doautocmd foogroup BufRead *.txt + +doautocmd User FooEvent +doautocmd User FooEvent,BarEvent +doautocmd foogroup User FooEvent +doautocmd User FooEvent + +doautocmd foogroup User FooEvent + +doautocmd foogroup BufRead *.txt | echo "Foo" +doautocmd foogroup BufRead *.txt | " comment + + +" Patterns + +au BufRead */*.txt + +au BufRead */*.* +au BufRead */*.??? +au BufRead */*.[t][x]t + +au BufRead */*.[a-z][a-z]t +au BufRead */*.[[:alpha:][:alpha:]]t + +au BufRead */*.[tx]\\\{2\}t +au BufRead */*.[a-z]\\\{2\}t +au BufRead */*.[[:alpha:]]\\\{2\}t +au BufRead */*.[^[:punct:]]\\\{2\}t + +au BufRead */*.[]]xt +au BufRead */*.[^]]xt + +au BufRead */*.[t\]]xt +au BufRead */*.[^t\]]xt + +au BufRead */*.[[]xt +au BufRead */*.[^[]xt + +au BufRead */*.[-]xt +au BufRead */*.[^-]xt + +au BufRead */*.[-t-]xt +au BufRead */*.[^-t-]xt + +au BufRead */*.[\^]xt +au BufRead */*.[^^]xt + +au BufRead */*.txt,*/*.mnv +au BufRead */*.{txt,mnv} +au BufRead */*.{t{x,t},v{i,m}} + +" literal +au BufRead */*.[]xt +au BufRead */*.[\]xt +au BufRead */*.[^]xt +au BufRead */*.[^\]xt + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_behave.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_behave.mnv new file mode 100644 index 0000000000..7f06fe6076 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_behave.mnv @@ -0,0 +1,9 @@ +" MNV :behave command + + +behave mswin +behave xterm + +behave! mswin +behave! xterm + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_breakpoint_commands.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_breakpoint_commands.mnv new file mode 100644 index 0000000000..671646908c --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_breakpoint_commands.mnv @@ -0,0 +1,95 @@ +" MNV :break* commands +" MNV_TEST_SETUP hi link mnvBreakpointNumber Number +" MNV_TEST_SETUP hi link mnvBreakpointFunctionLine Number +" MNV_TEST_SETUP hi link mnvBreakpointFileLine Number +" MNV_TEST_SETUP hi link mnvBreakpointFilename Identifier +" MNV_TEST_SETUP hi link mnvBreakpointFunction Type + + +breakadd func Foo +breakadd func 42 Foo +breakadd file foo.txt +breakadd file 42 foo.txt +breakadd here +breakadd expr g:foo + +breaklist + +breakdel 42 +breakdel * +breakdel func Foo +breakdel func 42 Foo +breakdel file foo.txt +breakdel file 42 foo.txt + +function Foo() + breakadd func Foo + breakadd func 42 Foo + breakadd file foo.txt + breakadd file 42 foo.txt + breakadd here + breakadd expr g:foo + + breaklist + + breakdel 42 + breakdel * + breakdel func Foo + breakdel func 42 Foo + breakdel file foo.txt + breakdel file 42 foo.txt +endfunction + +def MNV9Context() + breakadd func Foo + breakadd func 42 Foo + breakadd file foo.txt + breakadd file 42 foo.txt + breakadd here + breakadd expr g:foo + + breaklist + + breakdel 42 + breakdel * + breakdel func Foo + breakdel func 42 Foo + breakdel file foo.txt + breakdel file 42 foo.txt +enddef + + +" tail comment and trailing bar + +breakadd func Foo " comment +breakadd func 42 Foo " comment +breakadd file foo.txt " comment +breakadd file 42 foo.txt " comment +breakadd here " comment +breakadd expr g:foo " comment + +breaklist " comment + +breakdel 42 " comment +breakdel * " comment +breakdel func Foo " comment +breakdel func 42 Foo " comment +breakdel file foo.txt " comment +breakdel file 42 foo.txt " comment + +breakadd func Foo | echo "..." +breakadd func 42 Foo | echo "..." +breakadd file foo.txt | echo "..." +breakadd file 42 foo.txt | echo "..." +breakadd here | echo "..." +breakadd expr g:foo | echo "..." + +breaklist | echo "..." + +breakdel 42 | echo "..." +breakdel * | echo "..." +breakdel func Foo | echo "..." +breakdel func 42 Foo | echo "..." +breakdel file foo.txt | echo "..." +breakdel file 42 foo.txt | echo "..." + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_call.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_call.mnv new file mode 100644 index 0000000000..5e2a8caf9f --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_call.mnv @@ -0,0 +1,52 @@ +" MNV :call command + + +" Functions with same-named Ex commands + +call browse(save, title, initdir, default) +call call(func, arglist, dict) +call chdir(dir) +call confirm(msg, choices, default, type) +call copy(expr) +call delete(fname, flags) +call eval(string) +call execute(command) +call filter(expr1, expr2) +call function(name, arglist, dict) +call insert(object, item, idx) +call join(list, sep) +call map(expr1, expr2) +call match(expr, pat, start, count) +call mode(expr) +call sort(list, how, dict) +call split(string, pattern, keepempty) +call substitute(str, pat, sub, flags) +call swapname(buf) + +call browse (save, title, initdir, default) +call call (func, arglist, dict) +call chdir (dir) +call confirm (msg, choices, default, type) +call copy (expr) +call delete (fname, flags) +call eval (string) +call execute (command) +call filter (expr1, expr2) +call function (name, arglist, dict) +call insert (object, item, idx) +call join (list, sep) +call map (expr1, expr2) +call match (expr, pat, start, count) +call mode (expr) +call sort (list, how, dict) +call split (string, pattern, keepempty) +call substitute (str, pat, sub, flags) +call swapname (buf) + +call Foo() +call Foo(arg1) +call Foo(arg1, arg2) + +let res = call(func, arglist, dict) +let res = call (func, arglist, dict) + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_catch.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_catch.mnv new file mode 100644 index 0000000000..20bf351551 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_catch.mnv @@ -0,0 +1,19 @@ +" MNV :catch command + + +" :help :catch + +catch /^MNV:Interrupt$/ " catch interrupts (CTRL-C) +catch /^MNV\%((\a\+)\)\=:E/ " catch all MNV errors +catch /^MNV\%((\a\+)\)\=:/ " catch errors and interrupts +catch /^MNV(write):/ " catch all errors in :write +catch /^MNV\%((\a\+)\)\=:E123:/ " catch error E123 +catch /my-exception/ " catch user exception +catch /.*/ " catch everything +catch " same as /.*/ + +" :help :try + +try | sleep 100 | catch /^MNV:Interrupt$/ | endtry +try | edit | catch /^MNV(edit):E\d\+/ | echo "error" | endtry + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_cd.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_cd.mnv new file mode 100644 index 0000000000..6ed6f779e6 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_cd.mnv @@ -0,0 +1,110 @@ +" MNV :cd commands +" MNV_TEST_SETUP hi link mnvCdArg Todo + + +cd +cd! +cd foo +cd! foo +cd %:h/foo +cd! %:h/foo +cd foo bar/baz +cd! foo bar/baz +cd - +cd! - + +cd \"foo\"bar\" +cd \|foo\|bar\| +cd \#foo\#bar\# +cd \ foo\ bar\ +cd \\foo\\bar\\ + +cd " comment +cd | echo "..." +cd! " comment +cd! | echo "..." + + +function Foo() + cd + cd! + cd foo + cd! foo + cd - + cd! - + + cd " comment + cd | echo "..." + cd! " comment + cd! | echo "..." +endfunction + +def Foo() + cd + cd! + cd foo + cd! foo + cd - + cd! - + + cd # comment + cd | echo "..." + cd! # comment + cd! | echo "..." +enddef + + +cd | lcd | tcd | chdir | lchdir | tchdir | echo "..." +cd - | lcd - | tcd - | chdir - | lchdir - | tchdir - | echo "..." +cd foo | lcd foo | tcd foo | chdir foo | lchdir foo | tchdir foo | echo "..." +cd! | lcd! | tcd! | chdir! | lchdir! | tchdir! | echo "..." +cd! - | lcd! - | tcd! - | chdir! - | lchdir! - | tchdir! - | echo "..." +cd! foo | lcd! foo | tcd! foo | chdir! foo | lchdir! foo | tchdir! foo | echo "..." + +cd " comment +cd! " comment +cd - " comment +cd! - " comment +cd foo " comment +cd! foo " comment +lcd " comment +lcd! " comment +lcd - " comment +lcd! - " comment +lcd foo " comment +lcd! foo " comment +tcd " comment +tcd! " comment +tcd - " comment +tcd! - " comment +tcd foo " comment +tcd! foo " comment +chdir " comment +chdir! " comment +chdir - " comment +chdir! - " comment +chdir foo " comment +chdir! foo " comment +lchdir " comment +lchdir! " comment +lchdir - " comment +lchdir! - " comment +lchdir foo " comment +lchdir! foo " comment +tchdir " comment +tchdir! " comment +tchdir - " comment +tchdir! - " comment +tchdir foo " comment +tchdir! foo " comment + + +" Issue #17964 (MNV script highlight: endif is not highlighted after lcd) + +def LcdBack() + if get(g:, "lcd", 0) + g:lcd = 0 + lcd - + endif +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_command.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_command.mnv new file mode 100644 index 0000000000..79ac94b702 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_command.mnv @@ -0,0 +1,196 @@ +" MNV :command, :delcommand and :comclear commands +" MNV_TEST_SETUP hi link mnvUserCmdName Todo +" MNV_TEST_SETUP hi link mnvDelcommandName Todo + + +" List + +command +command F + + +" Define + +command Foo echo "Foo" +command! Foo echo "Foo" + +command! Foo echo "Foo" | echo "Bar" + +command! Foo { + echo "Foo" + echo "Bar" + echo "Baz" +} + +command! -addr=arguments -bang -bar -buffer -complete=arglist -count=1 -keepscript -nargs=* -range=% -register Foo echo "Foo" + +command! -addr=arguments -bang -bar -buffer -complete=arglist -count=1 -keepscript -nargs=* -range=% -register Foo + \ echo "Foo" + +command! -addr=arguments -bang -bar -buffer -complete=arglist -count=1 -keepscript -nargs=* -range=% -register + \ Foo + \ echo "Foo" + +command! -addr=arguments -bang -bar -buffer -complete=arglist -count=1 -keepscript -nargs=* -range=% -register Foo + "\ comment + \ echo "Foo" + +command! -addr=arguments -bang -bar -buffer -complete=arglist -count=1 -keepscript -nargs=* -range=% -register + "\ comment + \ Foo + "\ comment + \ echo "Foo" + +command! -complete=custom,s:Completer1 Foo echo "Foo" +command! -complete=customlist,s:Completer2 Foo echo "Foo" + +function Foo() + command! Foo echo "Foo (defined in :function)" +endfunction + +def Foo2() + command! Foo echo "Foo (defined in :def)" +enddef + + +" Multiline define + +command! -addr=lines + \ -bang + \ -bar + \ -buffer + \ -complete=buffer + \ -count + \ -nargs=* + \ -range + \ -register + \ -keepscript + \ Foo + \ echo "Foo" | + \ echo "Bar" + +command! + \ -addr=lines + \ -bang + \ -bar + \ -buffer + \ -complete=buffer + \ -count + \ -nargs=* + \ -range + \ -register + \ -keepscript + \ Foo + \ echo "Foo" | + \ echo "Bar" + +command! + "\ comment + \ -addr=lines + \ -bang + "\ comment + "\ comment + \ -bar + \ -buffer + "\ comment + \ -complete=buffer + "\ comment + \ -count + "\ comment + \ -nargs=* + "\ comment + \ -range + "\ comment + \ -register + "\ comment + \ -keepscript + "\ comment + \ Foo + "\ comment + \ echo "Foo" | + "\ comment + \ echo "Bar" + + +" Errors + +command! -badattr=arguments -bang -badattr -nargs=* Foo echo "Foo" + + +" Delete + +delcommand Foo +delcommand -buffer Foo + +delcommand Foo | echo "Foo" +delcommand -buffer Foo | echo "Foo" + +delcommand Foo " comment +delcommand -buffer Foo " comment + +comclear +comclear " comment +comclear | echo "Foo" + + +" Issue #14135 (mnv.mnv syntax highlighting broken wrt system()) + +com Foo call system('ls') + + +" Issue #17001 (Wrong mnvUserCmdAttrError highlighting in mnv.mnv) + +command! -bang -nargs=* -complete=file Make AsyncRun -program=make @ + + +" Issue #17326 (syntax highlighting breaks with complex :s comamnd) + +command -range=% -nargs=? -bang Tb { + if "" == "!" + :,s/\v"[^"]*"/\=substitute(submatch(0), " ", "•", "g")/ge + endif + if "" == "" + :,!column -t + else + :,!column -t -s'' + endif + if "" == "!" + :,s/•/ /ge + endif +} + +command -range=% -nargs=? -bang Tb :,s/\v"[^"]*"/\=substitute(submatch(0), " ", "•", "g")/ge + + +" Unreported issue (:map with trailing bar in replacement text) + +command! Foo + \ map lhs rhs | + \ abbreviate foo bar | + \ echo "Foo" + + +" Issue #18414 (Syntax group mnvUserCmdReplacement lacking a keepend?) + +def MNV9Context() + command! MyFunction MyFunc() + # I am a comment + + command! ToggleWrap setlocal wrap! + # I am a comment but I didn't get highlighted +enddef + +command! MyFunction call MyFunc() +" I am a comment + +command! ToggleWrap setlocal wrap! +" I am a comment but I didn't get highlighted + + +" Issue #18448 (comment for subsequent command is not highlighted) + +def MNV9Context() + command! -nargs=1 -complete=file Rg :term rg + # command! -nargs=1 -complete=file Rg :term ++shell rg +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_command_modifiers.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_command_modifiers.mnv new file mode 100644 index 0000000000..5c4443a667 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_command_modifiers.mnv @@ -0,0 +1,135 @@ +" MNV Ex command modifiers + + + aboveleft echo "Foo" + +aboveleft echo "Foo" +belowright echo "Foo" +botright echo "Foo" +browse echo "Foo" +confirm echo "Foo" +filter /pattern/ echo "Foo" +filter! /pattern/ echo "Foo" +hide echo "Foo" +horizontal echo "Foo" +keepalt echo "Foo" +keepjumps echo "Foo" +keepmarks echo "Foo" +keeppatterns echo "Foo" +leftabove echo "Foo" +legacy echo "Foo" +lockmarks echo "Foo" +noautocmd echo "Foo" +noswapfile echo "Foo" +rightbelow echo "Foo" +sandbox echo "Foo" +silent echo "Foo" +silent! echo "Foo" +tab echo "Foo" +topleft echo "Foo" +unsilent echo "Foo" +verbose echo "Foo" +vertical echo "Foo" +mnv9cmd echo "Foo" + + +: aboveleft echo "Foo" + " FIXME: not a ternary operator ':' + : aboveleft echo "Foo" + :aboveleft echo "Foo" + +:aboveleft echo "Foo" +:belowright echo "Foo" +:botright echo "Foo" +:browse echo "Foo" +:confirm echo "Foo" +:filter /pattern/ echo "Foo" +:filter! /pattern/ echo "Foo" +:hide echo "Foo" +:horizontal echo "Foo" +:keepalt echo "Foo" +:keepjumps echo "Foo" +:keepmarks echo "Foo" +:keeppatterns echo "Foo" +:leftabove echo "Foo" +:legacy echo "Foo" +:lockmarks echo "Foo" +:noautocmd echo "Foo" +:noswapfile echo "Foo" +:rightbelow echo "Foo" +:sandbox echo "Foo" +:silent echo "Foo" +:silent! echo "Foo" +:tab echo "Foo" +:topleft echo "Foo" +:unsilent echo "Foo" +:verbose echo "Foo" +:vertical echo "Foo" +:mnv9cmd echo "Foo" + + +echo|aboveleft echo "Foo" +echo| aboveleft echo "Foo" +echo |aboveleft echo "Foo" + +echo | aboveleft echo "Foo" +echo | belowright echo "Foo" +echo | botright echo "Foo" +echo | browse echo "Foo" +echo | confirm echo "Foo" +echo | filter /pattern/ echo "Foo" +echo | filter! /pattern/ echo "Foo" +echo | hide echo "Foo" +echo | horizontal echo "Foo" +echo | keepalt echo "Foo" +echo | keepjumps echo "Foo" +echo | keepmarks echo "Foo" +echo | keeppatterns echo "Foo" +echo | leftabove echo "Foo" +echo | legacy echo "Foo" +echo | lockmarks echo "Foo" +echo | noautocmd echo "Foo" +echo | noswapfile echo "Foo" +echo | rightbelow echo "Foo" +echo | sandbox echo "Foo" +echo | silent echo "Foo" +echo | silent! echo "Foo" +echo | tab echo "Foo" +echo | topleft echo "Foo" +echo | unsilent echo "Foo" +echo | verbose echo "Foo" +echo | vertical echo "Foo" +echo | mnv9cmd echo "Foo" + + +aboveleft belowright botright browse confirm filter /pattern/ filter! /pattern/ hide horizontal keepalt keepjumps keepmarks keeppatterns leftabove legacy lockmarks noautocmd noswapfile rightbelow sandbox silent silent! tab topleft unsilent verbose vertical mnv9cmd echo "Foo" +aboveleft + \ belowright + \ botright + \ browse + \ confirm + \ filter /pattern/ + \ filter! /pattern/ + \ hide + \ horizontal + \ keepalt + \ keepjumps + \ keepmarks + \ keeppatterns + \ leftabove + \ legacy + \ lockmarks + \ noautocmd + \ noswapfile + \ rightbelow + \ sandbox + \ silent + \ silent! + \ tab + \ topleft + \ unsilent + \ verbose + \ vertical + \ mnv9cmd + \ echo "Foo" + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_commands.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_commands.mnv new file mode 100644 index 0000000000..a573f6a4b1 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_commands.mnv @@ -0,0 +1,1210 @@ +" Ex commands + + +" START NOT MATCHED +:Next +:Print +:X +" END NOT MATCHED + +:help + :help +: help + : help # FIXME + +:@ + +:append + text +. +:abbreviate +:abclear +:aboveleft +:all +:amenu +:anoremenu +:args +:argadd +:argdedupe +:argdelete +:argedit +:argdo +:argglobal +:arglocal +:argument +:ascii +:autocmd +:augroup Foo +:augroup END +:aunmenu +:buffer +:bNext +:ball +:badd +:balt +:bdelete +:behave mswin +:behave xterm +:belowright +:bfirst +:blast +:bmodified +:bnext +:botright +:bprevious +:brewind +:break +:breakadd +:breakdel +:breaklist +:browse +:bufdo +:buffers +:bunload +:bwipeout +:change + text +. +:cNext +:cNfile +:cabbrev +:cabclear +:cabove +:caddbuffer +:caddexpr +:caddfile +:cafter +:call +:catch +:cbefore +:cbelow +:cbottom +:cbuffer +:cc +:cclose +:cd +:cdo +:cfdo +:center +:cexpr +:cfile +:cfirst +:cgetbuffer +:cgetexpr +:cgetfile +:changes +:chdir +:checkpath +:checktime +:chistory +:clast +:clearjumps +:clist +:close +:cmap +:cmapclear +:cmenu +:cnext +:cnewer +:cnfile +:cnoremap +:cnoreabbrev +:cnoremenu +:copy +:colder +:colorscheme +:command +:comclear +:compiler +:continue +:confirm +:const +:copen +:cprevious +:cpfile +:cquit +:crewind +:cscope +:cstag +:cunmap +:cunabbrev +:cunmenu +:cwindow +:delete +:debug +:debuggreedy +:def +:defcompile +:defer +:delcommand +:delfunction +:delmarks +:diffupdate +:diffget +:diffoff +:diffpatch +:diffput +:diffsplit +:diffthis +:digraphs +:display +:disassemble +:djump +:dl +:dlist +:doautocmd +:doautoall +:dp +:drop +:dsearch +:dsplit +:edit +:earlier +:echo +:echoconsole +:echoerr +:echohl +:echomsg +:echon +:echowindow +:else +:elseif +:emenu +:enddef +:endif +:endfor +:endfunction +:endtry +:endwhile +:enew +:eval +:ex +:execute +:exit +:exusage +:file +:files +:filetype +:filter +:find +:final +:finally +:finish +:first +:fixdel +:fold +:foldclose +:folddoopen +:folddoclosed +:foldopen +:for foo in bar | endfor +:function +:global/.../ +:goto +:grep +:grepadd +:gui +:gmnv +:hardcopy +:help +:helpclose +:helpfind +:helpgrep +:helptags +:highlight +:hide +:history +:horizontal +:insert + text +. +:iabbrev +:iabclear +:if +:ijump +:ilist +:imap +:imapclear +:imenu +:import +:inoremap +:inoreabbrev +:inoremenu +:intro +:isearch +:isplit +:iunmap +:iunabbrev +:iunmenu +:join +:jumps +:k +:keepalt +:keepmarks +:keepjumps +:keeppatterns +:lNext +:lNfile +:list +:labove +:laddexpr +:laddbuffer +:laddfile +:lafter +:last +:language +:later +:lbefore +:lbelow +:lbottom +:lbuffer +:lcd +:lchdir +:lclose +:lcscope +:ldo +:lfdo +:left +:leftabove +:legacy +:let +:lexpr +:lfile +:lfirst +:lgetbuffer +:lgetexpr +:lgetfile +:lgrep +:lgrepadd +:lhelpgrep +:lhistory +:ll +:llast +:llist +:lmake +:lmap +:lmapclear +:lnext +:lnewer +:lnfile +:lnoremap +" :loadkeymap " disabled - runs until EOF +:loadview +:lockmarks +:lockvar +:lolder +:lopen +:lprevious +:lpfile +:lrewind +:ls +:ltag +:lunmap +:lua +:luado +:luafile +:lmnvgrep +:lmnvgrepadd +:lwindow +:move +:mark +:make +:map +:mapclear +:marks +:match +:menu +:menutranslate +:messages +:mkexrc +:mksession +:mkspell +:mkmnvrc +:mkview +:mode +:mzscheme +:mzfile +:nbclose +:nbkey +:nbstart +:next +:new +:nmap +:nmapclear +:nmenu +:nnoremap +:nnoremenu +:noautocmd +:noremap +:nohlsearch +:noreabbrev +:noremenu +:normal +:noswapfile +:number +:nunmap +:nunmenu +:oldfiles +:open +:omap +:omapclear +:omenu +:only +:onoremap +:onoremenu +:options +:ounmap +:ounmenu +:ownsyntax +:packadd +:packloadall +:pclose +:pedit +:perl +:print +:profdel +:profile +:promptfind +:promptrepl +:perldo +:pop +:popup +:ppop +:preserve +:previous +:psearch +:ptag +:ptNext +:ptfirst +:ptjump +:ptlast +:ptnext +:ptprevious +:ptrewind +:ptselect +:put +:pwd +:py3 +:python3 +:py3do +:py3file +:python +:pydo +:pyfile +:pyx +:pythonx +:pyxdo +:pyxfile +:quit +:quitall +:qall +:read +:recover +:redo +:redir +:redraw +:redrawstatus +:redrawtabline +:registers +:resize +:retab +:return +:rewind +:right +:rightbelow +:ruby +:rubydo +:rubyfile +:rundo +:runtime +:rmnvinfo +:substitute +:sNext +:sandbox +:sargument +:sall +:saveas +:sbuffer +:sbNext +:sball +:sbfirst +:sblast +:sbmodified +:sbnext +:sbprevious +:sbrewind +:scriptnames +:scriptencoding +:scriptversion +:scscope +:set +:setfiletype +:setglobal +:setlocal +:sfind +:sfirst +:shell +:simalt +:sign +:silent +:sleep +:sleep! +:slast +:smagic +:smap +:smapclear +:smenu +:smile +:snext +:snomagic +:snoremap +:snoremenu +:sort +:source +:spelldump +:spellgood +:spellinfo +:spellrare +:spellrepall +:spellundo +:spellwrong +:split +:sprevious +:srewind +:stop +:stag +:startinsert +:startgreplace +:startreplace +:stopinsert +:stjump +:stselect +:sunhide +:sunmap +:sunmenu +:suspend +:sview +:swapname +:syntax +:syntime +:syncbind +:t +:tNext +:tabNext +:tabclose +:tabdo +:tabedit +:tabfind +:tabfirst +:tablast +:tabmove +:tabnew +:tabnext +:tabonly +:tabprevious +:tabrewind +:tabs +:tab +:tag +:tags +:tcd +:tchdir +:tcl +:tcldo +:tclfile +:tearoff +:terminal +:tfirst +:throw +:tjump +:tlast +:tlmenu +:tlnoremenu +:tlunmenu +:tmapclear +:tmap +:tmenu +:tnext +:tnoremap +:topleft +:tprevious +:trewind +:try +:tselect +:tunmap +:tunmenu +:undo +:undojoin +:undolist +:unabbreviate +:unabbreviate +:unhide +:uniq +:unlet +:unlockvar +:unmap +:unmenu +:unsilent +:update +:vglobal/.../ +:version +:verbose +:vertical +:mnv9cmd +:mnvgrep +:mnvgrepadd +:visual +:viusage +:view +:vmap +:vmapclear +:vmenu +:vnew +:vnoremap +:vnoremenu +:vsplit +:vunmap +:vunmenu +:windo +:write +:wNext +:wall +:while +:winsize +:wincmd +:winpos +:wnext +:wprevious +:wq +:wqall +:wundo +:wmnvinfo +:xit +:xall +:xmapclear +:xmap +:xmenu +:xrestore +:xnoremap +:xnoremenu +:xunmap +:xunmenu +:yank +:z + +call Foo()|help +call Foo() | help +call Foo() |help +call Foo()| help + +" FIXME +call Foo() | append + text +. +call Foo() | abbreviate +call Foo() | abclear +call Foo() | aboveleft +call Foo() | all +call Foo() | amenu +call Foo() | anoremenu +call Foo() | args +call Foo() | argadd +call Foo() | argdedupe +call Foo() | argdelete +call Foo() | argedit +call Foo() | argdo +call Foo() | argglobal +call Foo() | arglocal +call Foo() | argument +call Foo() | ascii +call Foo() | autocmd +call Foo() | augroup Foo | augroup END +call Foo() | aunmenu +call Foo() | buffer +call Foo() | bNext +call Foo() | ball +call Foo() | badd +call Foo() | balt +call Foo() | bdelete +call Foo() | behave mswin +call Foo() | behave xterm +call Foo() | belowright +call Foo() | bfirst +call Foo() | blast +call Foo() | bmodified +call Foo() | bnext +call Foo() | botright +call Foo() | bprevious +call Foo() | brewind +call Foo() | break +call Foo() | breakadd +call Foo() | breakdel +call Foo() | breaklist +call Foo() | browse +call Foo() | bufdo +call Foo() | buffers +call Foo() | bunload +call Foo() | bwipeout +" FIXME +call Foo() | change + text +. +call Foo() | cNext +call Foo() | cNfile +call Foo() | cabbrev +call Foo() | cabclear +call Foo() | cabove +call Foo() | caddbuffer +call Foo() | caddexpr +call Foo() | caddfile +call Foo() | cafter +call Foo() | call +call Foo() | catch +call Foo() | cbefore +call Foo() | cbelow +call Foo() | cbottom +call Foo() | cbuffer +call Foo() | cc +call Foo() | cclose +call Foo() | cd +call Foo() | cdo +call Foo() | cfdo +call Foo() | center +call Foo() | cexpr +call Foo() | cfile +call Foo() | cfirst +call Foo() | cgetbuffer +call Foo() | cgetexpr +call Foo() | cgetfile +call Foo() | changes +call Foo() | chdir +call Foo() | checkpath +call Foo() | checktime +call Foo() | chistory +call Foo() | clast +call Foo() | clearjumps +call Foo() | clist +call Foo() | close +call Foo() | cmap +call Foo() | cmapclear +call Foo() | cmenu +call Foo() | cnext +call Foo() | cnewer +call Foo() | cnfile +call Foo() | cnoremap +call Foo() | cnoreabbrev +call Foo() | cnoremenu +call Foo() | copy +call Foo() | colder +call Foo() | colorscheme +call Foo() | command +call Foo() | comclear +call Foo() | compiler +call Foo() | continue +call Foo() | confirm +call Foo() | const +call Foo() | copen +call Foo() | cprevious +call Foo() | cpfile +call Foo() | cquit +call Foo() | crewind +call Foo() | cscope +call Foo() | cstag +call Foo() | cunmap +call Foo() | cunabbrev +call Foo() | cunmenu +call Foo() | cwindow +call Foo() | delete +call Foo() | debug +call Foo() | debuggreedy +call Foo() | def +call Foo() | defcompile +call Foo() | defer +call Foo() | delcommand +call Foo() | delfunction +call Foo() | delmarks +call Foo() | diffupdate +call Foo() | diffget +call Foo() | diffoff +call Foo() | diffpatch +call Foo() | diffput +call Foo() | diffsplit +call Foo() | diffthis +call Foo() | digraphs +call Foo() | display +call Foo() | disassemble +call Foo() | djump +call Foo() | dl +call Foo() | dlist +call Foo() | doautocmd +call Foo() | doautoall +call Foo() | dp +call Foo() | drop +call Foo() | dsearch +call Foo() | dsplit +call Foo() | edit +call Foo() | earlier +call Foo() | echo +call Foo() | echoconsole +call Foo() | echoerr +call Foo() | echohl +call Foo() | echomsg +call Foo() | echon +call Foo() | echowindow +call Foo() | else +call Foo() | elseif +call Foo() | emenu +call Foo() | enddef +call Foo() | endif +call Foo() | endfor +call Foo() | endfunction +call Foo() | endtry +call Foo() | endwhile +call Foo() | enew +call Foo() | eval +call Foo() | ex +call Foo() | execute +call Foo() | exit +call Foo() | exusage +call Foo() | file +call Foo() | files +call Foo() | filetype +call Foo() | filter +call Foo() | find +call Foo() | final +call Foo() | finally +call Foo() | finish +call Foo() | first +call Foo() | fixdel +call Foo() | fold +call Foo() | foldclose +call Foo() | folddoopen +call Foo() | folddoclosed +call Foo() | foldopen +call Foo() | for foo in bar | endfor +call Foo() | function +call Foo() | global/.../ +call Foo() | goto +call Foo() | grep +call Foo() | grepadd +call Foo() | gui +call Foo() | gmnv +call Foo() | hardcopy +call Foo() | help +call Foo() | helpclose +call Foo() | helpfind +call Foo() | helpgrep +call Foo() | helptags +call Foo() | highlight +call Foo() | hide +call Foo() | history +call Foo() | horizontal +" FIXME +call Foo() | insert + text +. +call Foo() | iabbrev +call Foo() | iabclear +call Foo() | if +call Foo() | ijump +call Foo() | ilist +call Foo() | imap +call Foo() | imapclear +call Foo() | imenu +call Foo() | import +call Foo() | inoremap +call Foo() | inoreabbrev +call Foo() | inoremenu +call Foo() | intro +call Foo() | isearch +call Foo() | isplit +call Foo() | iunmap +call Foo() | iunabbrev +call Foo() | iunmenu +call Foo() | join +call Foo() | jumps +call Foo() | k +call Foo() | keepalt +call Foo() | keepmarks +call Foo() | keepjumps +call Foo() | keeppatterns +call Foo() | lNext +call Foo() | lNfile +call Foo() | list +call Foo() | labove +call Foo() | laddexpr +call Foo() | laddbuffer +call Foo() | laddfile +call Foo() | lafter +call Foo() | last +call Foo() | language +call Foo() | later +call Foo() | lbefore +call Foo() | lbelow +call Foo() | lbottom +call Foo() | lbuffer +call Foo() | lcd +call Foo() | lchdir +call Foo() | lclose +call Foo() | lcscope +call Foo() | ldo +call Foo() | lfdo +call Foo() | left +call Foo() | leftabove +call Foo() | legacy +call Foo() | let +call Foo() | lexpr +call Foo() | lfile +call Foo() | lfirst +call Foo() | lgetbuffer +call Foo() | lgetexpr +call Foo() | lgetfile +call Foo() | lgrep +call Foo() | lgrepadd +call Foo() | lhelpgrep +call Foo() | lhistory +call Foo() | ll +call Foo() | llast +call Foo() | llist +call Foo() | lmake +call Foo() | lmap +call Foo() | lmapclear +call Foo() | lnext +call Foo() | lnewer +call Foo() | lnfile +call Foo() | lnoremap +" call Foo() | loadkeymap " disabled - runs until EOF +call Foo() | loadview +call Foo() | lockmarks +call Foo() | lockvar +call Foo() | lolder +call Foo() | lopen +call Foo() | lprevious +call Foo() | lpfile +call Foo() | lrewind +call Foo() | ls +call Foo() | ltag +call Foo() | lunmap +call Foo() | lua +call Foo() | luado +call Foo() | luafile +call Foo() | lmnvgrep +call Foo() | lmnvgrepadd +call Foo() | lwindow +call Foo() | move +call Foo() | mark +call Foo() | make +call Foo() | map +call Foo() | mapclear +call Foo() | marks +call Foo() | match +call Foo() | menu +call Foo() | menutranslate +call Foo() | messages +call Foo() | mkexrc +call Foo() | mksession +call Foo() | mkspell +call Foo() | mkmnvrc +call Foo() | mkview +call Foo() | mode +call Foo() | mzscheme +call Foo() | mzfile +call Foo() | nbclose +call Foo() | nbkey +call Foo() | nbstart +call Foo() | next +call Foo() | new +call Foo() | nmap +call Foo() | nmapclear +call Foo() | nmenu +call Foo() | nnoremap +call Foo() | nnoremenu +call Foo() | noautocmd +call Foo() | noremap +call Foo() | nohlsearch +call Foo() | noreabbrev +call Foo() | noremenu +call Foo() | normal +call Foo() | noswapfile +call Foo() | number +call Foo() | nunmap +call Foo() | nunmenu +call Foo() | oldfiles +call Foo() | open +call Foo() | omap +call Foo() | omapclear +call Foo() | omenu +call Foo() | only +call Foo() | onoremap +call Foo() | onoremenu +call Foo() | options +call Foo() | ounmap +call Foo() | ounmenu +call Foo() | ownsyntax +call Foo() | packadd +call Foo() | packloadall +call Foo() | pclose +call Foo() | pedit +call Foo() | perl +call Foo() | print +call Foo() | profdel +call Foo() | profile +call Foo() | promptfind +call Foo() | promptrepl +call Foo() | perldo +call Foo() | pop +call Foo() | popup +call Foo() | ppop +call Foo() | preserve +call Foo() | previous +call Foo() | psearch +call Foo() | ptag +call Foo() | ptNext +call Foo() | ptfirst +call Foo() | ptjump +call Foo() | ptlast +call Foo() | ptnext +call Foo() | ptprevious +call Foo() | ptrewind +call Foo() | ptselect +call Foo() | put +call Foo() | pwd +call Foo() | py3 +call Foo() | python3 +call Foo() | py3do +call Foo() | py3file +call Foo() | python +call Foo() | pydo +call Foo() | pyfile +call Foo() | pyx +call Foo() | pythonx +call Foo() | pyxdo +call Foo() | pyxfile +call Foo() | quit +call Foo() | quitall +call Foo() | qall +call Foo() | read +call Foo() | recover +call Foo() | redo +call Foo() | redir +call Foo() | redraw +call Foo() | redrawstatus +call Foo() | redrawtabline +call Foo() | registers +call Foo() | resize +call Foo() | retab +call Foo() | return +call Foo() | rewind +call Foo() | right +call Foo() | rightbelow +call Foo() | ruby +call Foo() | rubydo +call Foo() | rubyfile +call Foo() | rundo +call Foo() | runtime +call Foo() | rmnvinfo +call Foo() | substitute +call Foo() | sNext +call Foo() | sandbox +call Foo() | sargument +call Foo() | sall +call Foo() | saveas +call Foo() | sbuffer +call Foo() | sbNext +call Foo() | sball +call Foo() | sbfirst +call Foo() | sblast +call Foo() | sbmodified +call Foo() | sbnext +call Foo() | sbprevious +call Foo() | sbrewind +call Foo() | scriptnames +call Foo() | scriptencoding +call Foo() | scriptversion +call Foo() | scscope +call Foo() | set +call Foo() | setfiletype +call Foo() | setglobal +call Foo() | setlocal +call Foo() | sfind +call Foo() | sfirst +call Foo() | shell +call Foo() | simalt +call Foo() | sign +call Foo() | silent +call Foo() | sleep +call Foo() | sleep! +call Foo() | slast +call Foo() | smagic +call Foo() | smap +call Foo() | smapclear +call Foo() | smenu +call Foo() | smile +call Foo() | snext +call Foo() | snomagic +call Foo() | snoremap +call Foo() | snoremenu +call Foo() | sort +call Foo() | source +call Foo() | spelldump +call Foo() | spellgood +call Foo() | spellinfo +call Foo() | spellrare +call Foo() | spellrepall +call Foo() | spellundo +call Foo() | spellwrong +call Foo() | split +call Foo() | sprevious +call Foo() | srewind +call Foo() | stop +call Foo() | stag +call Foo() | startinsert +call Foo() | startgreplace +call Foo() | startreplace +call Foo() | stopinsert +call Foo() | stjump +call Foo() | stselect +call Foo() | sunhide +call Foo() | sunmap +call Foo() | sunmenu +call Foo() | suspend +call Foo() | sview +call Foo() | swapname +call Foo() | syntax +call Foo() | syntime +call Foo() | syncbind +call Foo() | t +call Foo() | tNext +call Foo() | tabNext +call Foo() | tabclose +call Foo() | tabdo +call Foo() | tabedit +call Foo() | tabfind +call Foo() | tabfirst +call Foo() | tablast +call Foo() | tabmove +call Foo() | tabnew +call Foo() | tabnext +call Foo() | tabonly +call Foo() | tabprevious +call Foo() | tabrewind +call Foo() | tabs +call Foo() | tab +call Foo() | tag +call Foo() | tags +call Foo() | tcd +call Foo() | tchdir +call Foo() | tcl +call Foo() | tcldo +call Foo() | tclfile +call Foo() | tearoff +call Foo() | terminal +call Foo() | tfirst +call Foo() | throw +call Foo() | tjump +call Foo() | tlast +call Foo() | tlmenu +call Foo() | tlnoremenu +call Foo() | tlunmenu +call Foo() | tmapclear +call Foo() | tmap +call Foo() | tmenu +call Foo() | tnext +call Foo() | tnoremap +call Foo() | topleft +call Foo() | tprevious +call Foo() | trewind +call Foo() | try +call Foo() | tselect +call Foo() | tunmap +call Foo() | tunmenu +call Foo() | undo +call Foo() | undojoin +call Foo() | undolist +call Foo() | unabbreviate +call Foo() | unabbreviate +call Foo() | unhide +call Foo() | uniq +call Foo() | unlet +call Foo() | unlockvar +call Foo() | unmap +call Foo() | unmenu +call Foo() | unsilent +call Foo() | update +call Foo() | vglobal/.../ +call Foo() | version +call Foo() | verbose +call Foo() | vertical +call Foo() | mnv9cmd +call Foo() | mnvgrep +call Foo() | mnvgrepadd +call Foo() | visual +call Foo() | viusage +call Foo() | view +call Foo() | vmap +call Foo() | vmapclear +call Foo() | vmenu +call Foo() | vnew +call Foo() | vnoremap +call Foo() | vnoremenu +call Foo() | vsplit +call Foo() | vunmap +call Foo() | vunmenu +call Foo() | windo +call Foo() | write +call Foo() | wNext +call Foo() | wall +call Foo() | while +call Foo() | winsize +call Foo() | wincmd +call Foo() | winpos +call Foo() | wnext +call Foo() | wprevious +call Foo() | wq +call Foo() | wqall +call Foo() | wundo +call Foo() | wmnvinfo +call Foo() | xit +call Foo() | xall +call Foo() | xmapclear +call Foo() | xmap +call Foo() | xmenu +call Foo() | xrestore +call Foo() | xnoremap +call Foo() | xnoremenu +call Foo() | xunmap +call Foo() | xunmenu +call Foo() | yank +call Foo() | z + + +" MNV9-script only + +:abstract +:class +:endclass +:endinterface +:endenum +:enum +:export +:final +:interface +:public +:static +:type +:var + +Foo() | abstract +Foo() | class +Foo() | endclass +Foo() | endenum +Foo() | endinterface +Foo() | enum +Foo() | export +Foo() | final +Foo() | interface +Foo() | public +Foo() | static +Foo() | type +Foo() | var + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_debug.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_debug.mnv new file mode 100644 index 0000000000..cf6b71e85e --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_debug.mnv @@ -0,0 +1,13 @@ +" MNV :debug command + + +debug echo "..." + +function Foo() + debug echo "..." +endfunction + +def Bar() + debug echo "..." +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_debuggreedy.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_debuggreedy.mnv new file mode 100644 index 0000000000..3a0f9cf35d --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_debuggreedy.mnv @@ -0,0 +1,34 @@ +" MNV :debuggreedy command + + +debuggreedy +0debuggreedy + +debuggreedy " comment +0debuggreedy " comment + +debuggreedy | echo "Foo" +0debuggreedy | echo "Foo" + +function Foo() + debuggreedy + 0debuggreedy + + debuggreedy " comment + 0debuggreedy " comment + + debuggreedy | echo "Foo" + 0debuggreedy | echo "Foo" +endfunction + +def Bar() + debuggreedy + 0debuggreedy + + debuggreedy # comment + 0debuggreedy # comment + + debuggreedy | echo "Foo" + 0debuggreedy | echo "Foo" +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_def.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_def.mnv new file mode 100644 index 0000000000..c4d29ba1be --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_def.mnv @@ -0,0 +1,126 @@ +" MNV :def command + + +" List + +def +def Foo +def /Foo.* + +def | echo "Foo" +def " comment +def Foo | echo "Foo" +def Foo " comment + + +" Definition + +" empty definition +def Foo() +enddef + +def Foo(): number + return 42 +enddef + +" trailing whitespace +def Foo(): number + return 42 +enddef + +def Foo() # comment +enddef + +def Foo(): number # comment + return 42 +enddef + +def! Foo(): number + return 42 +enddef + +def g:Foo(): number + return 42 +enddef + +def s:Foo(): number + return 42 +enddef + +def Foo(): number + return 42 +enddef + +def foo#bar#Foo(): number + return 42 +enddef + +" same name as an Ex command +def s:ls() +enddef + + +" Return types + +def Foo(): void +enddef + +def Foo(): void # comment +enddef + +def Foo(): list> +enddef + +def Foo(): func(dict>, func, bool, func(number, list)): bool +enddef + + +" :enddef trailing + +def Foo() + # trailing whitespace +enddef + +def Foo() +enddef | echo "Foo" + +def Foo() +enddef # comment + + +" Parameters + +def Foo(x: bool, y = 42, z: string = "zed") +enddef + +def Foo( + x: bool, + y = 42, + z: string = "zed") +enddef + +" Issue #16243 (MNV script def parameters syntax highlight is wrong) + +def Test(lines: list = [line('.'), line('.')]): void +enddef + + +" Comments + +def Foo() + # MNV9-script comment + "useless string" +enddef + + +" Leading command separator + +echo "Foo" | def Foo() +enddef + + +" Command modifiers + +silent! def Foo() +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_def_fold.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_def_fold.mnv new file mode 100644 index 0000000000..30e6b4ae71 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_def_fold.mnv @@ -0,0 +1,185 @@ +" MNV :def command +" MNV_TEST_SETUP let g:mnvsyn_folding = "f" +" MNV_TEST_SETUP setl fdc=2 fdl=999 fdm=syntax + + +" List + +def +def Foo +def /Foo.* + +def | echo "Foo" +def " comment +def Foo | echo "Foo" +def Foo " comment + + +" Definition + +" empty definition +def Foo() +enddef + +def Foo(): number + return 42 +enddef + +" trailing whitespace +def Foo(): number + return 42 +enddef + +def Foo() # comment +enddef + +def Foo(): number # comment + return 42 +enddef + +def! Foo(): number + return 42 +enddef + +def g:Foo(): number + return 42 +enddef + +def s:Foo(): number + return 42 +enddef + +def Foo(): number + return 42 +enddef + +def foo#bar#Foo(): number + return 42 +enddef + +" same name as an Ex command +def s:ls() +enddef + + +" Return types + +def Foo(): void +enddef + +def Foo(): void # comment +enddef + +def Foo(): list> +enddef + +def Foo(): func(dict>, func, bool, func(number, list)): bool +enddef + + +" :enddef trailing + +def Foo() + # trailing whitespace +enddef + +def Foo() +enddef | echo "Foo" + +def Foo() +enddef # comment + + +" Parameters + +def Foo(x: bool, y = 42, z: string = "zed") +enddef + +def Foo( + x: bool, + y = 42, + z: string = "zed") +enddef + + +" Comments + +def Foo() + # MNV9-script comment + "useless string" +enddef + + +" Command modifiers + +silent! def Foo() +enddef + + +" Leading command separator + +echo "Foo" | def Foo() +enddef + + +" Fold-region ending + +def Foo() + # enddef +enddef + +def Foo() + echo "enddef" +enddef + +def Foo() + var x =<< trim END + endfunction + END +enddef + +:def Foo() +:enddef + + +" Issue #15671 +" No recognition of :fun or :def bodies commencing with empty lines if +" g:mnvsyn_folding contains "f" + +def MA1() + + + return +enddef + +def MA2() + return +enddef + +def MB1(): void + + return +enddef + +def MB2(): void + return +enddef + +def MC1(_: any) + + return +enddef + +def MC2(_: any) + return +enddef + +def MD1(_: any): void + + return +enddef + +def MD2(_: any): void + return +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_def_nested.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_def_nested.mnv new file mode 100644 index 0000000000..18fc4bc1fb --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_def_nested.mnv @@ -0,0 +1,23 @@ +mnv9script +# MNV9 :def command (nested) +# MNV_TEST_SETUP hi link mnv9This Todo + + +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/uvim/runtime/syntax/testdir/input/mnv_ex_def_nested_fold.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_def_nested_fold.mnv new file mode 100644 index 0000000000..a1f55d0701 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_def_nested_fold.mnv @@ -0,0 +1,25 @@ +mnv9script +# MNV9 :def command (nested) +# MNV_TEST_SETUP let g:mnvsyn_folding = 'f' +# MNV_TEST_SETUP setl fdc=2 fdm=syntax +# MNV_TEST_SETUP hi link mnv9This Todo + + +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/uvim/runtime/syntax/testdir/input/mnv_ex_def_return_type.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_def_return_type.mnv new file mode 100644 index 0000000000..004f99c011 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_def_return_type.mnv @@ -0,0 +1,60 @@ +mnv9script +# MNV9 function return types +# MNV_TEST_SETUP hi link mnvUserType Todo + + +# Issue #14442 (mnv.mnv: confusion for function return types starting on another line) + +def TestA______________________________________________________________(): + \ void +enddef + +def TestB____(result: dict>, fs: list): + \ void +enddef + +def TestC____(maybe: bool, F: func(): dict): func(): + \ void + return () => { + } +enddef + +def TestD____(fs: list>): func(): func(): + \ void + return () => () => { + } +enddef + +class Tests + def TestA__________________________________________________________(): + \ void + enddef + + def TestB(result: dict>, fs: list): + \ void + enddef + + def TestC(maybe: bool, F: func(): dict): func(): + \ void + return () => { + } + enddef + + def TestD(fs: list>): func(): func(): + \ void + return () => () => { + } + enddef +endclass + +def F(G: func(number, number, number): lib.Trampoline): + \ func(number, number, number): + \ func(): lib.Trampoline + return ((H: func(number, number, number): lib.Trampoline) => + (a1: number, a2: number, n: number) => + () => + H(a2, (a1 + a2), (n - 1)))(G) +enddef + +defcompile + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_defer.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_defer.mnv new file mode 100644 index 0000000000..5db0a26f0d --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_defer.mnv @@ -0,0 +1,17 @@ +" MNV :defer command +" MNV_TEST_SETUP hi link mnvUserFunc Todo + + +function Foo() + defer delete("tmpfile") + defer Delete("tmpfile") +endfunction + +def Bar() + defer delete("tmpfile") + defer Delete("tmpfile") + defer () => { + echo "..." + }() +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_delfunction.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_delfunction.mnv new file mode 100644 index 0000000000..910cb4502e --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_delfunction.mnv @@ -0,0 +1,34 @@ +" MNV :delfunction command + + +delfunction Foo +delfunction Foo +delfunction foo.bar +delfunction g:foo.bar +delfunction s:foo.bar +delfunction foo#bar +delfunction g:foo#bar +delfunction foo#bar.baz +delfunction g:foo#bar.baz + + +delfunction! Foo +delfunction! Foo +delfunction! foo.bar +delfunction! g:foo.bar +delfunction! s:foo.bar +delfunction! foo#bar +delfunction! g:foo#bar +delfunction! foo#bar.baz +delfunction! g:foo#bar.baz + + +delfunction Foo | echo "Foo" +delfunction Foo " comment + + +" Issue https://github.com/Project-Tick/Project-Tick/pull/17420#issuecomment-2927798687 +" (arg named /fu%\[nction]/) + +silent! delfunc! func + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_do_commands.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_do_commands.mnv new file mode 100644 index 0000000000..c327cc661e --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_do_commands.mnv @@ -0,0 +1,58 @@ +" MNV :*do commands + + +argdo echo "..." +argdo! echo "..." + +bufdo echo "..." +bufdo! echo "..." + +cdo echo "..." +cdo! echo "..." + +cfdo echo "..." +cfdo! echo "..." + +folddoclosed echo "..." + +folddoopen echo "..." + +ldo echo "..." +ldo! echo "..." + +lfdo echo "..." +lfdo! echo "..." + +tabdo echo "..." + +windo echo "..." + + +def MNV9Context() + argdo echo "..." + argdo! echo "..." + + bufdo echo "..." + bufdo! echo "..." + + cdo echo "..." + cdo! echo "..." + + cfdo echo "..." + cfdo! echo "..." + + folddoclosed echo "..." + + folddoopen echo "..." + + ldo echo "..." + ldo! echo "..." + + lfdo echo "..." + lfdo! echo "..." + + tabdo echo "..." + + windo echo "..." +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_echo.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_echo.mnv new file mode 100644 index 0000000000..7ce2b1287f --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_echo.mnv @@ -0,0 +1,58 @@ +" MNV :echo commands + + +echo "Answer = " 42 +echon "Answer = " 42 +echomsg "Answer = " 42 +echowindow "Answer = " 42 +echoerr "Answer = " 42 +echoconsole "Answer = " 42 + + +" Trailing bar vs OR operator + +" OR operator +echo foo || bar +echo foo || + \ bar + +" following command is :| +echo "Foo" | | + +" invalid expression +echo "Foo" || + +echohl WarningMsg | echo "Don't panic!" | echohl None + + +" Line continuations + +echo "Answer = " + "\ comment + \ 42 + +echo + \ "Answer = " + "\ comment + \ 42 + + +" Trailing bar and comments + +" :echo without {expr} +echo| echo "Foo" + +" trailing comment needs | +echo "Foo" | " comment + + +" Issue #9987 (parenthesised argument - not a function call) + +let foo = {'end': 123} + +if 123 + echo (foo.end) +else + echo 'bar' +endif + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_eval.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_eval.mnv new file mode 100644 index 0000000000..91bba9661b --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_eval.mnv @@ -0,0 +1,20 @@ +" MNV :eval command + + +eval "Foo"->append(0) + +eval "Foo" + \ ->append( + \ 0 + \ ) + +eval "Foo"->append(0) | echo "Foo" + +echo "Foo" | eval "Foo"->append(0) + +eval "Foo"->append(0) " comment + +def MNV9Context() + eval "Foo"->append(0) # comment +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_execute.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_execute.mnv new file mode 100644 index 0000000000..683d0a9d33 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_execute.mnv @@ -0,0 +1,64 @@ +" MNV :execute command + + +" :help :execute + +execute "buffer" nextbuf +execute "normal" count .. "w" +execute '!ls' | echo "theend" +execute "normal ixxx\" +execute "e " .. fnameescape(filename) +execute "!ls " .. shellescape(filename, 1) +if 0 + execute 'while i > 5' + echo "test" + endwhile +endif +execute 'while i < 5 | echo i | let i = i + 1 | endwhile' + + +" Trailing bar vs OR operator + +" OR operator +execute foo || bar ? "Foo" : "NotFoo" +execute foo || + \ bar ? "Foo" : "NotFoo" + +" following command is :|" +execute "Foo" | | + +" invalid expression +execute "Foo" || + + +" Line continuations + +execute "call" + "\ comment + \ "Foo()" + +execute + \ "call" + "\ comment + \ "Foo()" + + +" Trailing bar and comments + +" :execute without {expr} +execute| echo "Foo" + +" trailing comment needs | +execute "Foo" | " comment + +def MNV9Context() + # trailing comment allowed + execute "Foo" # comment +enddef + + +" Issue #9987 (parenthesised argument - not a function call) + +let foo = {'arg': "call Foo()"} +execute (foo.arg) + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_filetype.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_filetype.mnv new file mode 100644 index 0000000000..14fcf92c97 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_filetype.mnv @@ -0,0 +1,30 @@ +" MNV :filetype command + + +filetype +filetype on +filetype off +filetype plugin on +filetype plugin off +filetype indent on +filetype indent off +filetype plugin indent on +filetype plugin indent off + +filetype | echo "Foo" +filetype " comment + +function Foo() + filetype + filetype on + filetype off + filetype plugin on + filetype plugin off + filetype indent on + filetype indent off + filetype plugin indent on + filetype plugin indent off + filetype | echo "Foo" + filetype " comment +endfunction + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_filter.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_filter.mnv new file mode 100644 index 0000000000..276aee25ea --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_filter.mnv @@ -0,0 +1,16 @@ +" MNV :filter command +" MNV_TEST_SETUP hi link mnvCmdSep Operator + + +filter pa\%(tt\)ern oldfiles +filter! pa\%(tt\)ern oldfiles + +filter /pa\%(tt\)ern/ oldfiles +filter! /pa\%(tt\)ern/ oldfiles + +filter !pa\%(tt\)ern! oldfiles +filter! !pa\%(tt\)ern! oldfiles + +filter /pa\%(t|t\)ern/ oldfiles | echo "Foo" +filter! /pa\%(t|t\)ern/ oldfiles | echo "Foo" + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_for.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_for.mnv new file mode 100644 index 0000000000..7649d5dfe6 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_for.mnv @@ -0,0 +1,60 @@ +" MNV :for command + + +" :for {var} in {object} + +let expr = [42] + +for foo in expr + echo foo +endfor + +for foo in expr " comment + echo foo +endfor + +for foo in + "\ comment + \ expr + echo foo +endfor + +for foo in expr | echo foo | endfor + +for foo in [42] + echo foo +endfor + +for foo in [42] | echo foo | endfor + +echo "foo" | for foo in expr + echo foo +endfor + + +" :for [{var1}, {var2}, ...] in {listlist} + +let expr = [[42, 83]] + +for [foo, bar] in expr + echo foo bar +endfor + +for [foo, bar] in expr " comment + echo foo bar +endfor + +for [foo, bar] in + "\ comment + \ expr + echo foo bar +endfor + +for [foo, bar] in expr | echo foo bar | endfor + +for [foo, bar] in [[42, 83]] + echo foo bar +endfor + +for [foo, bar] in [[42, 83]] | echo foo bar | endfor + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_function.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_function.mnv new file mode 100644 index 0000000000..ef509f62dd --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_function.mnv @@ -0,0 +1,266 @@ +" MNV :function command + + +" List + +function +function Foo +function /Foo.* + +function | echo "Foo" +function " comment +function Foo | echo "Foo" +function Foo " comment + + +" Definition + +" empty definition +function Foo() +endfunction + +" curly-brace names +function {"F"}oo() +endfunction + +function F{"o"}o() +endfunction + +function Fo{"o"}() +endfunction + +function {"F"}o{"o"}() +endfunction + +function {"F"}{"o"}{"o"}() +endfunction + +function Foo() + return 42 +endfunction + +" trailing whitespace +function Foo() + return 42 +endfunction + +function Foo() " comment + return 42 +endfunction + +function! Foo() + return 42 +endfunction + +function g:Foo() + return 42 +endfunction + +function s:Foo() + return 42 +endfunction + +function Foo() + return 42 +endfunction + +function b:dict.Foo() + return 42 +endfunction + +function w:dict.Foo() + return 42 +endfunction + +function t:dict.Foo() + return 42 +endfunction + +function g:dict.Foo() + return 42 +endfunction + +function s:dict.Foo() + return 42 +endfunction + +function v:dict.Foo() + return 42 +endfunction + +function Foo(arg) + let l:dict = {} + function l:dict.BAR() + return 42 + endfunction + function a:arg.BAR() + return 42 + endfunction +endfunction + +function foo#bar#Foo() + return 42 +endfunction + +function g:foo#bar#Foo() + return 42 +endfunction + +" same name as an Ex command +function s:ls() +endfunction + + +" Modifiers + +function Foo() range +endfunction + +function Foo() range " comment +endfunction + +function Foo() range + return 42 +endfunction + +function Foo() abort + return 42 +endfunction + +function Foo() dict + return 42 +endfunction + +function Foo() closure + return 42 +endfunction + +function Foo() range abort dict closure + return 42 +endfunction + +function! Foo() range + return 42 +endfunction + +function! Foo() abort + return 42 +endfunction + +function! Foo() dict + return 42 +endfunction + +function! Foo() closure + return 42 +endfunction + +function! Foo() range abort dict closure + return 42 +endfunction + + +" :endfunction trailing + +function Foo() + return 42 + " trailing whitespace +endfunction + +function Foo() + return 42 +endfunction | echo "Foo" + +function Foo() + return 42 +endfunction " comment + + +" Parameters + +function Foo(x, y, z, ...) + return 42 +endfunction + +function Foo( + \ x, + \ y, + \ z, + \ ...) + return 42 +endfunction + +function Foo( + x, + y, + z, + ...) + return 42 +endfunction + +function Foo(x, y = 42, z = "zed") + return 42 +endfunction + +function Foo( + \ x, + \ y = 42, + \ z = "zed") + return 42 +endfunction + +function Foo( + x, + y = 42, + z = "zed") + return 42 +endfunction + + +" Arguments + +function Foo(a, b, c) + echo a:a a:b a:c +endfunction + +function Foo(...) + echo a:000 + echo a:0 + echo a:1 a:2 a:3 a:4 a:5 a:6 a:7 a:8 a:9 a:10 a:11 a:12 a:13 a:14 a:15 a:16 a:17 a:18 a:19 a:20 +endfunction + + +" Issue #16243 (MNV script def parameters syntax highlight is wrong) + +function Test(lines = [line('.'), line('.')]) +endfunction + + +" Comments + +function Foo() + " Legacy-script comment + # 42 " comment + return 42 +endfunction + + +" Command modifiers + +silent! function Foo() +endfunction + + +" Leading command separator + +echo "Foo" | function Foo() +endfunction + + +" Issue https://github.com/Project-Tick/Project-Tick/pull/17420#issuecomment-2927798687 +" (function named /s:fu%\[nction]/) + +func! s:func(_, func) + return a:func +endfunc + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_function_def_tail_comment_errors.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_function_def_tail_comment_errors.mnv new file mode 100644 index 0000000000..020b42d888 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_function_def_tail_comment_errors.mnv @@ -0,0 +1,45 @@ +" MNV :function and :def tail comment errors +" MNV_TEST_SETUP unlet! g:mnvsyn_folding + + +fun s:Test1() abort # fun + return 1 +endfun # endfun + +def s:Test2(): number " def + return 2 +enddef " enddef + +fun s:Test3() abort # fun + fun s:DoTest3() abort # fun + return 3 + endfun # endfun + return s:DoTest3() +endfun # endfun + +def s:Test4(): number " def + def DoTest4(): number " def + return 4 + enddef " enddef + return DoTest4() +enddef " enddef + +def s:Test5(): number " def + fun DoTest5() abort # fun + return 5 + endfun # endfun + return DoTest5() +enddef " enddef + +fun s:Test6() abort # fun + def s:DoTest6(): number " def + return 6 + enddef " enddef + return s:DoTest6() +endfun # endfun + +for d in range(1, 6)->reverse() + exec $'echo s:Test{d}()' + exec $'delfunction s:Test{d}' +endfor + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_function_def_tail_comments.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_function_def_tail_comments.mnv new file mode 100644 index 0000000000..353e6f68ec --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_function_def_tail_comments.mnv @@ -0,0 +1,45 @@ +" MNV :function and :def tail comments +" MNV_TEST_SETUP unlet! g:mnvsyn_folding + + +fun s:Test1() abort " fun + return 1 +endfun " endfun + +def s:Test2(): number # def + return 2 +enddef # enddef + +fun s:Test3() abort " fun + fun s:DoTest3() abort " fun + return 3 + endfun " endfun + return s:DoTest3() +endfun " endfun + +def s:Test4(): number # def + def DoTest4(): number # def + return 4 + enddef # enddef + return DoTest4() +enddef # enddef + +def s:Test5(): number # def + fun DoTest5() abort " fun + return 5 + endfun " endfun + return DoTest5() +enddef # enddef + +fun s:Test6() abort " fun + def s:DoTest6(): number # def + return 6 + enddef # enddef + return s:DoTest6() +endfun " endfun + +for d in range(1, 6)->reverse() + exec $'echo s:Test{d}()' + exec $'delfunction s:Test{d}' +endfor + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_function_fold.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_function_fold.mnv new file mode 100644 index 0000000000..20d74929fd --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_function_fold.mnv @@ -0,0 +1,349 @@ +" MNV :function command +" MNV_TEST_SETUP let g:mnvsyn_folding = "f" +" MNV_TEST_SETUP setl fdc=2 fdl=999 fdm=syntax + + +" List + +function +function Foo +function /Foo.* + +function | echo "Foo" +function " comment +function Foo | echo "Foo" +function Foo " comment + + +" Definition + +" empty definition +function Foo() +endfunction + +" curly-brace names +function {"F"}oo() +endfunction + +function F{"o"}o() +endfunction + +function Fo{"o"}() +endfunction + +function {"F"}o{"o"}() +endfunction + +function {"F"}{"o"}{"o"}() +endfunction + +function Foo() + return 42 +endfunction + +" trailing whitespace +function Foo() + return 42 +endfunction + +function Foo() " comment + return 42 +endfunction + +function! Foo() + return 42 +endfunction + +function g:Foo() + return 42 +endfunction + +function s:Foo() + return 42 +endfunction + +function Foo() + return 42 +endfunction + +function b:dict.Foo() + return 42 +endfunction + +function w:dict.Foo() + return 42 +endfunction + +function t:dict.Foo() + return 42 +endfunction + +function g:dict.Foo() + return 42 +endfunction + +function s:dict.Foo() + return 42 +endfunction + +function v:dict.Foo() + return 42 +endfunction + +function Foo(arg) + let l:dict = {} + function l:dict.BAR() + return 42 + endfunction + function a:arg.BAR() + return 42 + endfunction +endfunction + +function foo#bar#Foo() + return 42 +endfunction + +function g:foo#bar#Foo() + return 42 +endfunction + +" same name as an Ex command +function s:ls() +endfunction + + +" Modifiers + +function Foo() range +endfunction + +function Foo() range " comment +endfunction + +function Foo() range + return 42 +endfunction + +function Foo() abort + return 42 +endfunction + +function Foo() dict + return 42 +endfunction + +function Foo() closure + return 42 +endfunction + +function Foo() range abort dict closure + return 42 +endfunction + +function! Foo() range + return 42 +endfunction + +function! Foo() abort + return 42 +endfunction + +function! Foo() dict + return 42 +endfunction + +function! Foo() closure + return 42 +endfunction + +function! Foo() range abort dict closure + return 42 +endfunction + + +" :endfunction trailing + +function Foo() + return 42 + " trailing whitespace +endfunction + +function Foo() + return 42 +endfunction | echo "Foo" + +function Foo() + return 42 +endfunction " comment + + +" Parameters + +function Foo(x, y, z, ...) + return 42 +endfunction + +function Foo( + \ x, + \ y, + \ z, + \ ...) + return 42 +endfunction + +function Foo( + x, + y, + z, + ...) + return 42 +endfunction + +function Foo(x, y = 42, z = "zed") + return 42 +endfunction + +function Foo( + \ x, + \ y = 42, + \ z = "zed") + return 42 +endfunction + +function Foo( + x, + y = 42, + z = "zed") + return 42 +endfunction + + +" Arguments + +function Foo(a, b, c) + echo a:a a:b a:c +endfunction + +function Foo(...) + echo a:000 + echo a:0 + echo a:1 a:2 a:3 a:4 a:5 a:6 a:7 a:8 a:9 a:10 a:11 a:12 a:13 a:14 a:15 a:16 a:17 a:18 a:19 a:20 +endfunction + + +" Issue #16243 (MNV script def parameters syntax highlight is wrong) + +function Test(lines = [line('.'), line('.')]) +endfunction + + +" Comments + +function Foo() + " Legacy-script comment + # 42 " comment + return 42 +endfunction + + +" Command modifiers + +silent! function Foo() +endfunction + + +" Leading command separator + +echo "Foo" | function Foo() +endfunction + + +" Issue https://github.com/Project-Tick/Project-Tick/pull/17420#issuecomment-2927798687 +" (function named /s:fu%\[nction]/) + +func! s:func(_, func) + return a:func +endfunc + + +" Fold-region ending + +function Foo() + " endfunction +endfunction + +function Foo() + echo "endfunction" +endfunction + +function Foo() + let x =<< trim END + endfunction + END +endfunction + +function Foo() + append + endfunction +. +endfunction + +function Foo() + change + endfunction +. + +endfunction + +function Foo() + insert + endfunction +. +endfunction + +:function Foo() +:endfunction + + +" Issue #15671 +" No recognition of :fun or :def bodies commencing with empty lines if +" g:mnvsyn_folding contains "f" + +fun FA1() + + + return +endfun + +fun FA2() + return +endfun + +fun FB1() abort + + return +endfun + +fun FB2() abort + return +endfun + +fun FC1(_) + + return +endfun + +fun FC2(_) + return +endfun + +fun FD1(_) abort + + return +endfun + +fun FD2(_) abort + return +endfun + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_function_nested.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_function_nested.mnv new file mode 100644 index 0000000000..a0e787a1ab --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_function_nested.mnv @@ -0,0 +1,40 @@ +" MNV :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/uvim/runtime/syntax/testdir/input/mnv_ex_function_nested_fold.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_function_nested_fold.mnv new file mode 100644 index 0000000000..6aa403cb41 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_function_nested_fold.mnv @@ -0,0 +1,42 @@ +" MNV :def and :function commands (nested) +" MNV_TEST_SETUP let g:mnvsyn_folding = 'f' +" MNV_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/uvim/runtime/syntax/testdir/input/mnv_ex_grep.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_grep.mnv new file mode 100644 index 0000000000..9c9ca3def7 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_grep.mnv @@ -0,0 +1,47 @@ +" MNV :*grep and :*grepadd commands +" MNV_TEST_SETUP hi link mnvCmdSep Operator +" MNV_TEST_SETUP hi link mnvGrepBarEscape Special + + +grep 'pat\|tern' foo.txt +lgrep 'pat\|tern' foo.txt + +grep! 'pat\|tern' foo.txt +lgrep! 'pat\|tern' foo.txt + +grepadd 'pat\|tern' foo.txt +lgrepadd 'pat\|tern' foo.txt + +grepadd! 'pat\|tern' foo.txt +lgrepadd! 'pat\|tern' foo.txt + + +" Special filename characters + +grep 'pat\|tern' % +lgrep 'pat\|tern' % + +grep! 'pat\|tern' % +lgrep! 'pat\|tern' % + +grepadd! 'pat\|tern' % +lgrepadd! 'pat\|tern' % + +grepadd! 'pat\|tern' % +lgrepadd! 'pat\|tern' % + + +" Trailing bar, no tail comment + +grep 'pat\|tern' foo.txt | echo "Foo" +lgrep 'pat\|tern' foo.txt | echo "Foo" + +grep! 'pat\|tern' foo.txt | echo "Foo" +lgrep! 'pat\|tern' foo.txt | echo "Foo" + +grepadd 'pat\|tern' foo.txt | echo "Foo" +lgrepadd 'pat\|tern' foo.txt | echo "Foo" + +grepadd! 'pat\|tern' foo.txt | echo "Foo" +lgrepadd! 'pat\|tern' foo.txt | echo "Foo" + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_help.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_help.mnv new file mode 100644 index 0000000000..c673fe6b0a Binary files /dev/null and b/uvim/runtime/syntax/testdir/input/mnv_ex_help.mnv differ diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_helpgrep.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_helpgrep.mnv new file mode 100644 index 0000000000..27b811c24b --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_helpgrep.mnv @@ -0,0 +1,18 @@ +" MNV :helpgrep command +" MNV_TEST_SETUP hi link mnvHelpgrepPattern Todo + + +helpgrep :help +helpgrep :help@en +helpgrep :h\%(elp\)\= + +lhelpgrep :help +lhelpgrep :help@en +lhelpgrep :h\%(elp\)\= + + +" no tail comment or trailing bar + +helpgrep :help " not a comment +helpgrep :help | not a command + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_highlight.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_highlight.mnv new file mode 100644 index 0000000000..bb258b40d4 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_highlight.mnv @@ -0,0 +1,108 @@ +" MNV :highlight command +" MNV_TEST_SETUP hi link mnvHiGroup Todo + + +" List + +highlight +highlight Comment +highlight Conceal +highlight ErrorMsg +highlight Foo + + +" Reset + +highlight clear + + +" Disable + +highlight clear Comment +highlight clear Conceal +highlight clear ErrorMsg +highlight clear Foo + +highlight Comment NONE +highlight Conceal NONE +highlight ErrorMsg NONE +highlight Foo NONE + + +" Add/modify + +highlight Comment cterm=underline +highlight Conceal cterm=underline +highlight ErrorMsg cterm=underline +highlight Foo cterm=underline + +highlight default Comment term=bold +highlight default Conceal term=bold +highlight default ErrorMsg term=bold +highlight Foo ErrorMsg term=bold + + +" Link + +highlight link Foo Comment +highlight! link Foo Comment +highlight link Foo NONE +highlight! link Foo NONE +highlight link Foo ErrorMsg +highlight! link Foo ErrorMsg + + +" Default link + +highlight default link Foo Comment +highlight! default link Foo Comment +highlight default link Foo NONE +highlight! default link Foo NONE +highlight default link Foo ErrorMsg +highlight! default link Foo ErrorMsg + + +" Line continuation and command separator + +hi Comment + "\ comment + \ term=bold + "\ comment + \ ctermfg=Cyan + \ guifg=#80a0ff + \ gui=bold + +hi Comment + \ term=bold + \ ctermfg=Cyan + \ guifg=#80a0ff + \ gui=bold | echo "Foo" + +hi Comment term=bold ctermfg=Cyan guifg=#80a0ff gui=bold | echo "Foo" + +hi default link + \ Foo + \ Comment + +hi default link + \ Foo + \ Comment | echo "Foo" + + +" 'statusline' user groups + +highlight User1 ctermfg=black +highlight User2 ctermfg=darkblue +highlight User3 ctermfg=darkgreen +highlight User4 ctermfg=darkcyan +highlight User5 ctermfg=darkred +highlight User6 ctermfg=darkmagenta +highlight User7 ctermfg=darkyellow +highlight User8 ctermfg=lightgray +highlight User9 ctermfg=darkgray + + +" :terminal group + +hi Terminal ctermbg=red ctermfg=blue + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_history.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_history.mnv new file mode 100644 index 0000000000..e3ca50ec46 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_history.mnv @@ -0,0 +1,89 @@ +" MNV :history command +" MNV_TEST_SETUP hi link mnvHistoryRange Todo + +history 1,9 +history cmd 1,9 +history : 1,9 +history search 1,9 +history / 1,9 +history ? 1,9 +history expr 1,9 +history = 1,9 +history input 1,9 +history @ 1,9 +history debug 1,9 +history > 1,9 +history all 1,9 + +history 1 +history -1 +history 1, +history -1, +history , 1 +history ,-1 +history 1, 1 +history 1,-1 +history -1, 1 +history -1,-1 + +history 1, 1 +history 1 ,1 +history 1 , 1 + + +" tail comments and trailing bar + +history | echo "..." +history " comment +history all | echo "..." +history all " comment +history 1,9 | echo "..." +history 1,9 " comment +history all 1,9 | echo "..." +history all 1,9 " comment + + +def MNV9Context() + history 1,9 + history cmd 1,9 + history : 1,9 + history search 1,9 + history / 1,9 + history ? 1,9 + history expr 1,9 + # FIXME + # history = 1,9 + history input 1,9 + history @ 1,9 + history debug 1,9 + history > 1,9 + history all 1,9 + + history 1 + history -1 + history 1, + history -1, + history , 1 + history ,-1 + history 1, 1 + history 1,-1 + history -1, 1 + history -1,-1 + + history 1, 1 + history 1 ,1 + history 1 , 1 + + + # tail comments and trailing bar + + history | echo "..." + history # comment + history all | echo "..." + history all # comment + history 1,9 | echo "..." + history 1,9 # comment + history all 1,9 | echo "..." + history all 1,9 # comment +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_import.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_import.mnv new file mode 100644 index 0000000000..2cdce587f6 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_import.mnv @@ -0,0 +1,119 @@ +" MNV :import command +" MNV_TEST_SETUP hi link mnvImportName Todo + + +import "foo.mnv" +impor v:true ? "foo.mnv" : "bar.mnv" + +import v:true ? + \ "foo.mnv" : + \ "bar.mnv" + +import v:true + \ ? "foo.mnv" + \ : "bar.mnv" + +import v:true ? + "\ comment + \ "foo.mnv" : + "\ comment + \ "bar.mnv" + +import v:true + "\ comment + \ ? "foo.mnv" + "\ comment + \ : "bar.mnv" + +import "foo.mnv" as bar +import v:true ? "foo.mnv" : "bar.mnv" as baz + +import v:true ? + \ "foo.mnv" : + \ "bar.mnv" + \ as baz + +import v:true + \ ? "foo.mnv" + \ : "bar.mnv" + \ as baz + +import v:true ? + "\ comment + \ "foo.mnv" : + "\ comment + \ "bar.mnv" + "\ comment + \ as baz + +import v:true + "\ comment + \ ? "foo.mnv" + "\ comment + \ : "bar.mnv" + "\ comment + \ as baz + +echo "Foo" | import "foo.mnv" + + +" autoload + +import autoload "foo.mnv" +import autoload v:true ? "foo.mnv" : "bar.mnv" + +import autoload v:true ? + \ "foo.mnv" : + \ "bar.mnv" + +import autoload v:true + \ ? "foo.mnv" + \ : "bar.mnv" + +import autoload v:true ? + "\ comment + \"foo.mnv" : + "\ comment + \ "bar.mnv" + +import autoload v:true + "\ comment + \ ? "foo.mnv" + "\ comment + \ : "bar.mnv" + +import autoload "foo.mnv" as bar +import autoload v:true ? "foo.mnv" : "bar.mnv" as baz + +import autoload v:true ? + \ "foo.mnv" : + \ "bar.mnv" + \ as baz + +import autoload v:true + \ ? "foo.mnv" + \ : "bar.mnv" + \ as baz + +import autoload v:true ? + "\ comment + \ "foo.mnv" : + "\ comment + \ "bar.mnv" + "\ comment + \ as baz + +import autoload v:true + "\ comment + \ ? "foo.mnv" + "\ comment + \ : "bar.mnv" + "\ comment + \ as baz + + +" "as" keyword in expr + +let as = "modules/" +import v:true ? as .. "foo.mnv" : as .. "bar.mnv" as other + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_language.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_language.mnv new file mode 100644 index 0000000000..ba79cb0557 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_language.mnv @@ -0,0 +1,172 @@ +" MNV :language command +" MNV_TEST_SETUP hi link mnvLanguageName Todo + + +" print commands + +language +language collate +language ctype +language time +language messages + + +" set commands + +language C +language collate C +language ctype C +language time C +language messages C + +language POSIX +language collate POSIX +language ctype POSIX +language time POSIX +language messages POSIX + +language de_DE.UTF-8@euro +language collate de_DE.UTF-8@euro +language ctype de_DE.UTF-8@euro +language time de_DE.UTF-8@euro +language messages de_DE.UTF-8@euro + +" tail comment and trailing bar + +language " comment +language collate " comment +language ctype " comment +language time " comment +language messages " comment + +language de_DE.UTF-8@euro " comment +language collate de_DE.UTF-8@euro " comment +language ctype de_DE.UTF-8@euro " comment +language time de_DE.UTF-8@euro " comment +language messages de_DE.UTF-8@euro " comment + +language C " comment +language collate C " comment +language ctype C " comment +language time C " comment +language messages C " comment + +language POSIX " comment +language collate POSIX " comment +language ctype POSIX " comment +language time POSIX " comment +language messages POSIX " comment + +language de_DE.UTF-8@euro " comment +language collate de_DE.UTF-8@euro " comment +language ctype de_DE.UTF-8@euro " comment +language time de_DE.UTF-8@euro " comment +language messages de_DE.UTF-8@euro " comment + +language | echo "..." +language collate | echo "..." +language ctype | echo "..." +language time | echo "..." +language messages | echo "..." + +language C | echo "..." +language collate C | echo "..." +language ctype C | echo "..." +language time C | echo "..." +language messages C | echo "..." + +language POSIX | echo "..." +language collate POSIX | echo "..." +language ctype POSIX | echo "..." +language time POSIX | echo "..." +language messages POSIX | echo "..." + +language de_DE.UTF-8@euro | echo "..." +language collate de_DE.UTF-8@euro | echo "..." +language ctype de_DE.UTF-8@euro | echo "..." +language time de_DE.UTF-8@euro | echo "..." +language messages de_DE.UTF-8@euro | echo "..." + +def MNV9Context() + + # print commands + + language + language collate + language ctype + language time + language messages + + + # set commands + + language C + language collate C + language ctype C + language time C + language messages C + + language POSIX + language collate POSIX + language ctype POSIX + language time POSIX + language messages POSIX + + language de_DE.UTF-8@euro + language collate de_DE.UTF-8@euro + language ctype de_DE.UTF-8@euro + language time de_DE.UTF-8@euro + language messages de_DE.UTF-8@euro + + + # tail comment and trailing bar + + language # comment + language collate # comment + language ctype # comment + language time # comment + language messages # comment + + language C # comment + language collate C # comment + language ctype C # comment + language time C # comment + language messages C # comment + + language POSIX # comment + language collate POSIX # comment + language ctype POSIX # comment + language time POSIX # comment + language messages POSIX # comment + + language de_DE.UTF-8@euro # comment + language collate de_DE.UTF-8@euro # comment + language ctype de_DE.UTF-8@euro # comment + language time de_DE.UTF-8@euro # comment + language messages de_DE.UTF-8@euro # comment + + language | echo "..." + language collate | echo "..." + language ctype | echo "..." + language time | echo "..." + language messages | echo "..." + + language C | echo "..." + language collate C | echo "..." + language ctype C | echo "..." + language time C | echo "..." + language messages C | echo "..." + + language POSIX | echo "..." + language collate POSIX | echo "..." + language ctype POSIX | echo "..." + language time POSIX | echo "..." + language messages POSIX | echo "..." + + language de_DE.UTF-8@euro | echo "..." + language collate de_DE.UTF-8@euro | echo "..." + language ctype de_DE.UTF-8@euro | echo "..." + language time de_DE.UTF-8@euro | echo "..." + language messages de_DE.UTF-8@euro | echo "..." +enddef + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_let_heredoc.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_let_heredoc.mnv new file mode 100644 index 0000000000..516053a32e --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_let_heredoc.mnv @@ -0,0 +1,250 @@ +" MNV :let heredoc command +" MNV_TEST_SETUP let g:mnvsyn_folding = "h" +" MNV_TEST_SETUP setl fdc=2 fdl=99 fdm=syntax + + +let foo =<< END +line1 +line2 +END + + let foo =<< END +line1 +line2 +END + +let [foo, bar] =<< EOS +line1 +line2 +EOS + + let [foo, bar] =<< EOS +line1 +line2 +EOS + +let [foo, + \ bar] =<< EOS +line1 +line2 +EOS + + let [foo, + \ bar] =<< EOS +line1 +line2 +EOS + +let g:foo =<< END +line1 +line2 +END + + let g:foo =<< END +line1 +line2 +END + +let [g:foo, g:bar] =<< EOS +line1 +line2 +EOS + + let [g:foo, g:bar] =<< EOS +line1 +line2 +EOS + +let [g:foo, + \ g:bar] =<< EOS +line1 +line2 +EOS + + let [g:foo, + \ g:bar] =<< EOS +line1 +line2 +EOS + + +" Trim + +let foo =<< trim END + line1 + line2 +END + + let foo =<< trim END + line1 + line2 + END + + +" Interpolation + +let foo =<< eval END +line{1 + 0} +line{1 + 1} +END + + let foo =<< eval END +line{1 + 0} +line{1 + 1} +END + +let foo =<< trim eval END + line{1 + 0} + line{1 + 1} +END + + let foo =<< trim eval END + line{1 + 0} + line{1 + 1} + END + +" No interpolation (escaped { and }) + +let foo =<< eval END +line{{1 + 0}} +line{{1 + 1}} +END + + let foo =<< eval END +line{{1 + 0}} +line{{1 + 1}} +END + +let foo =<< trim eval END + line{{1 + 0}} + line{{1 + 1}} +END + + let foo =<< trim eval END + line{{1 + 0}} + line{{1 + 1}} + END + + +" No interpolation + +let foo =<< END +line{1 + 0} +line{1 + 1} +END + + let foo =<< END +line{1 + 0} +line{1 + 1} +END + +let foo =<< trim END + line{1 + 0} + line{1 + 1} +END + + let foo =<< trim END + line{1 + 0} + line{1 + 1} + END + + +" End marker must not be followed by whitespace + +" assert_equal(foo, ["END "]) +let foo =<< END +END +END + +" assert_equal(foo, [" END "]) +let foo =<< END + END +END + +" assert_equal(foo, ["END "]) +let foo =<< trim END + END +END + +" assert_equal(foo, ["END "]) + let foo =<< trim END + END + END + + +" end marker must be vertically aligned with :let (if preceded by whitespace) + +" assert_equal(foo, ["END"]) +let foo =<< trim END + END +END + + " assert_equal(foo, ["END"]) + let foo =<< trim END + END + END + +" assert_equal(foo, ["END "]) +let foo =<< trim END +END +END + + " assert_equal(foo, ["END"]) + let foo =<< trim END + END + END + + " assert_equal(foo, ["END "]) + let foo =<< trim END + END + END + + " assert_equal(foo, ["END"]) + let foo =<< trim END + END + END + + " assert_equal(foo, ["END "]) + let foo =<< trim END + END + END + + " assert_equal(foo, ["END "]) + let foo =<< trim END +END +END + + " assert_equal(foo, ["END"]) + let foo =<< trim END + END +END + + " assert_equal(foo, ["END"]) + let foo =<< trim END + END +END + + +" End markers + +let foo =<< !@#$%^&*()_+ +line1 +line2 +!@#$%^&*()_+ + +let foo =<< 0!@#$%^&*()_+ +line1 +line2 +0!@#$%^&*()_+ + +let foo =<< A!@#$%^&*()_+ +line1 +line2 +A!@#$%^&*()_+ + +" error - leading lowercase character +let foo =<< a!@#$%^&*()_+ +line1 +line2 +a!@#$%^&*()_+ + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_loadkeymap.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_loadkeymap.mnv new file mode 100644 index 0000000000..88fb6e16b1 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_loadkeymap.mnv @@ -0,0 +1,27 @@ +" MNV :loadkeymap command + + +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 + +" MNV-script comment characters +# Line should not match as a MNV9-script comment +" Line should not match as a legacy-script comment +\" “ +: " Line should not match as a legacy-script comment + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_loadkeymap_after_bar.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_loadkeymap_after_bar.mnv new file mode 100644 index 0000000000..e0a722e83d --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_loadkeymap_after_bar.mnv @@ -0,0 +1,11 @@ +" MNV :loadkeymap command (after "|") + + +scriptencoding utf-8 + +let b:keymap_name = "syntax-test" + +echo "..." | loadkeymap + +a A Basic mapping + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_loadkeymap_after_colon.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_loadkeymap_after_colon.mnv new file mode 100644 index 0000000000..ee73b87969 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_loadkeymap_after_colon.mnv @@ -0,0 +1,11 @@ +" MNV :loadkeymap command (after ":") + + +scriptencoding utf-8 + +let b:keymap_name = "syntax-test" + +:loadkeymap + +a A Basic mapping + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_lua.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_lua.mnv new file mode 100644 index 0000000000..eace6dea3a --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_lua.mnv @@ -0,0 +1,157 @@ +" MNV :lua, :luado and :luafile commands +" MNV_TEST_SETUP let g:mnvsyn_embed = "l" +" MNV_TEST_SETUP let g:mnvsyn_folding = "fl" +" MNV_TEST_SETUP setl fdc=2 fdl=99 fdm=syntax + + +lua << EOF +print("Lua script") +EOF + + lua << trim EOF + print("Lua script") + EOF + +lua << +print("Lua script") +. + + lua << trim + print("Lua script") + . + +function Foo() + lua << trim EOF + print("Lua script in :func") + EOF +endfunction | call Foo() + +def Bar() + lua << trim EOF + print("Lua script in :def") + EOF +enddef | call Bar() + +lua print("Lua statement") + "\ comment + \ print("Lua statement again") + +luado print("Lua statement") + "\ comment + \ print("Lua statement again") + +luafile foo.lua + + +" :mzscheme and :mzfile + +mzscheme << trim EOF + (display "MzScheme script") +EOF + +mzscheme (display "MzScheme statement") + "\ comment + \ (display "MzScheme statement again") + +mzfile foo.rkt + + +" :perl and :perldo + +perl << trim EOF + print("Perl script\n") +EOF + +perl print("Perl statement\n"); + "\ comment + \ print("Perl statement again\n") + +perldo print("Perl statement\n"); + "\ comment + \ print("Perl statement again\n") + + +" :python, :pydo and :pyfile + +python << trim EOF + print("Python script") +EOF + +python print("Python statement"); + "\ comment + \ print("Python statement again") + +pydo print("Python statement"); + "\ comment + \ print("Python statement again") + +pyfile foo.py + + +" :python3, :py3do and :py3file + +python3 << trim EOF + print("Python3 script") +EOF + +python3 print("Python3 statement"); + "\ comment + \ print("Python3 statement") + +py3do print("Python3 statement"); + "\ comment + \ print("Python3 statement") + +py3file foo.py + + +" :pythonx, :pyxdo and :pyxfile + +pythonx << trim EOF + print("PythonX script") +EOF + +pythonx print("PythonX statement"); + "\ comment + \ print("PythonX statement") + +pyxdo print("PythonX statement"); + "\ comment + \ print("PythonX statement") + +pyxfile foo.py + + +" :ruby, :rubydo and :rubyfile + +ruby << trim EOF + puts "Ruby script" +EOF + +ruby puts "Ruby statement"; + "\ comment + \ puts "Ruby statement again" + +rubydo puts "Ruby statement"; + "\ comment + \ puts "Ruby statement again" + +rubyfile foo.rb + + +" :tcl, :tcldo and :tclfile + +tcl << trim EOF + puts "TCL script" +EOF + +tcl puts "TCL statement"; + "\ comment + \ puts "TCL statement again" + +tcldo puts "TCL statement"; + "\ comment + \ puts "TCL statement again" + +tclfile foo.tcl + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_make.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_make.mnv new file mode 100644 index 0000000000..31bbdace62 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_make.mnv @@ -0,0 +1,38 @@ +" MNV :*make commands +" MNV_TEST_SETUP hi link mnvCmdSep Operator +" MNV_TEST_SETUP hi link mnvMakeBarEscape Special + + +make +lmake + +make! +lmake! + +make -options target +lmake -options target + +make! -options target +lmake! -options target + + +" Special filename characters + +make % +lmake % + + +" Trailing bar, no tail comment + +make tar\|get | echo "Foo" +lmake tar\|get | echo "Foo" + +make! tar\|get | echo "Foo" +lmake! tar\|get | echo "Foo" + +make | echo "Foo" +lmake | echo "Foo" + +make! | echo "Foo" +lmake! | echo "Foo" + diff --git a/uvim/runtime/syntax/testdir/input/mnv_ex_map.mnv b/uvim/runtime/syntax/testdir/input/mnv_ex_map.mnv new file mode 100644 index 0000000000..31103f5dd7 --- /dev/null +++ b/uvim/runtime/syntax/testdir/input/mnv_ex_map.mnv @@ -0,0 +1,124 @@ +" MNV :map commands +" MNV_TEST_SETUP hi link mnvMapLhs Identifier +" MNV_TEST_SETUP hi link mnvMapRhs Todo +" MNV_TEST_SETUP hi link mnvMapRhsContinue Todo + + +map! +map! lhs rhs +map +map lhs rhs + +map