From 0f75b2ad2e23107f8112b6dcd4785eeef6cc34aa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 20 Jun 2024 05:56:58 +0200 Subject: Merging upstream version 2:9.1.0496. Signed-off-by: Daniel Baumann --- runtime/autoload/ccomplete.vim | 4 +- runtime/autoload/dist/ft.vim | 36 +- runtime/autoload/dist/script.vim | 4 + runtime/autoload/hare.vim | 26 + runtime/autoload/netrw.vim | 165 +- runtime/autoload/netrwSettings.vim | 3 +- runtime/autoload/zig/fmt.vim | 100 - runtime/autoload/zip.vim | 37 +- runtime/compiler/hare.vim | 23 +- runtime/compiler/javac.vim | 9 +- runtime/doc/Make_all.mak | 2 + runtime/doc/autocmd.txt | 6 +- runtime/doc/builtin.txt | 1562 ++++++++++-- runtime/doc/change.txt | 9 +- runtime/doc/channel.txt | 61 +- runtime/doc/cmdline.txt | 2 +- runtime/doc/debug.txt | 4 +- runtime/doc/develop.txt | 4 +- runtime/doc/eval.txt | 6 +- runtime/doc/filetype.txt | 45 +- runtime/doc/ft_hare.txt | 77 + runtime/doc/gui.txt | 15 +- runtime/doc/help.txt | 5 +- runtime/doc/if_cscop.txt | 4 +- runtime/doc/if_pyth.txt | 11 +- runtime/doc/indent.txt | 2 +- runtime/doc/map.txt | 10 +- runtime/doc/mbyte.txt | 19 +- runtime/doc/netbeans.txt | 14 +- runtime/doc/options.txt | 45 +- runtime/doc/os_vms.txt | 3 +- runtime/doc/os_win32.txt | 5 +- runtime/doc/pattern.txt | 4 +- runtime/doc/pi_netrw.txt | 122 +- runtime/doc/pi_tar.txt | 5 +- runtime/doc/popup.txt | 47 +- runtime/doc/print.txt | 21 +- runtime/doc/quickfix.txt | 30 +- runtime/doc/sign.txt | 33 +- runtime/doc/spell.txt | 15 +- runtime/doc/starting.txt | 21 +- runtime/doc/syntax.txt | 115 +- runtime/doc/tabpage.txt | 7 +- runtime/doc/tags | 40 +- runtime/doc/tagsrch.txt | 3 +- runtime/doc/term.txt | 6 +- runtime/doc/terminal.txt | 67 +- runtime/doc/test_urls.vim | 6 +- runtime/doc/testing.txt | 106 +- runtime/doc/textprop.txt | 38 +- runtime/doc/todo.txt | 37 +- runtime/doc/usr_01.txt | 4 +- runtime/doc/usr_05.txt | 5 +- runtime/doc/usr_21.txt | 19 +- runtime/doc/usr_30.txt | 4 +- runtime/doc/usr_41.txt | 20 +- runtime/doc/usr_52.txt | 47 +- runtime/doc/various.txt | 15 +- runtime/doc/version9.txt | 74 +- runtime/doc/vi_diff.txt | 4 +- runtime/doc/vim-it.1 | 175 +- runtime/doc/vim-it.UTF-8.1 | 175 +- runtime/doc/vim.1 | 88 +- runtime/doc/vim.man | 134 +- runtime/doc/vim9.txt | 3 +- runtime/doc/xxd-it.1 | 5 +- runtime/doc/xxd-it.UTF-8.1 | 5 +- runtime/doc/xxd.1 | 7 +- runtime/doc/xxd.man | 54 +- runtime/filetype.vim | 52 +- runtime/ftplugin/abaqus.vim | 3 +- runtime/ftplugin/arduino.vim | 67 + runtime/ftplugin/asm.vim | 3 +- runtime/ftplugin/astro.vim | 7 +- runtime/ftplugin/bitbake.vim | 3 +- runtime/ftplugin/c.vim | 3 +- runtime/ftplugin/calendar.vim | 3 +- runtime/ftplugin/cgdbrc.vim | 3 +- runtime/ftplugin/cpp.vim | 6 +- runtime/ftplugin/csh.vim | 3 +- runtime/ftplugin/css.vim | 3 +- runtime/ftplugin/dart.vim | 15 + runtime/ftplugin/deb822sources.vim | 4 +- runtime/ftplugin/debcontrol.vim | 7 +- runtime/ftplugin/debsources.vim | 4 +- runtime/ftplugin/desktop.vim | 3 +- runtime/ftplugin/dtd.vim | 3 +- runtime/ftplugin/dtrace.vim | 5 +- runtime/ftplugin/dts.vim | 3 +- runtime/ftplugin/erlang.vim | 5 +- runtime/ftplugin/eruby.vim | 3 +- runtime/ftplugin/fennel.vim | 3 +- runtime/ftplugin/fish.vim | 3 +- runtime/ftplugin/fortran.vim | 3 +- runtime/ftplugin/fstab.vim | 3 +- runtime/ftplugin/gdb.vim | 3 +- runtime/ftplugin/graphql.vim | 13 + runtime/ftplugin/groovy.vim | 3 +- runtime/ftplugin/hamster.vim | 3 +- runtime/ftplugin/hare.vim | 56 +- runtime/ftplugin/haredoc.vim | 44 + runtime/ftplugin/html.vim | 3 +- runtime/ftplugin/hyprlang.vim | 13 + runtime/ftplugin/indent.vim | 3 +- runtime/ftplugin/initex.vim | 3 +- runtime/ftplugin/java.vim | 3 +- runtime/ftplugin/javascript.vim | 3 +- runtime/ftplugin/jj.vim | 19 + runtime/ftplugin/jq.vim | 11 +- runtime/ftplugin/jsonc.vim | 3 +- runtime/ftplugin/kdl.vim | 17 + runtime/ftplugin/lc.vim | 13 + runtime/ftplugin/ld.vim | 5 +- runtime/ftplugin/liquid.vim | 3 +- runtime/ftplugin/lisp.vim | 3 +- runtime/ftplugin/man.vim | 8 +- runtime/ftplugin/markdown.vim | 3 +- runtime/ftplugin/mma.vim | 5 +- runtime/ftplugin/modula2.vim | 3 +- runtime/ftplugin/modula3.vim | 3 +- runtime/ftplugin/nim.vim | 13 + runtime/ftplugin/nroff.vim | 6 +- runtime/ftplugin/obse.vim | 7 +- runtime/ftplugin/ocaml.vim | 4 +- runtime/ftplugin/odin.vim | 11 +- runtime/ftplugin/openvpn.vim | 3 +- runtime/ftplugin/pascal.vim | 3 +- runtime/ftplugin/pdf.vim | 3 +- runtime/ftplugin/perl.vim | 3 +- runtime/ftplugin/php.vim | 3 +- runtime/ftplugin/prisma.vim | 13 + runtime/ftplugin/ps1.vim | 3 +- runtime/ftplugin/ps1xml.vim | 3 +- runtime/ftplugin/purescript.vim | 14 + runtime/ftplugin/python.vim | 23 +- runtime/ftplugin/qml.vim | 3 +- runtime/ftplugin/racket.vim | 5 +- runtime/ftplugin/raku.vim | 13 +- runtime/ftplugin/rasi.vim | 25 + runtime/ftplugin/rescript.vim | 13 + runtime/ftplugin/rust.vim | 11 +- runtime/ftplugin/scdoc.vim | 9 +- runtime/ftplugin/scheme.vim | 15 +- runtime/ftplugin/sh.vim | 6 +- runtime/ftplugin/slint.vim | 15 + runtime/ftplugin/snakemake.vim | 13 + runtime/ftplugin/sql.vim | 5 +- runtime/ftplugin/sshdconfig.vim | 10 + runtime/ftplugin/stylus.vim | 54 + runtime/ftplugin/svelte.vim | 13 + runtime/ftplugin/tcl.vim | 3 +- runtime/ftplugin/typescript.vim | 3 +- runtime/ftplugin/typst.vim | 14 + runtime/ftplugin/v.vim | 15 + runtime/ftplugin/verilog.vim | 4 +- runtime/ftplugin/vim.vim | 3 +- runtime/ftplugin/wat.vim | 3 +- runtime/ftplugin/xdefaults.vim | 9 +- runtime/ftplugin/xml.vim | 3 +- runtime/ftplugin/zig.vim | 60 +- runtime/ftplugin/zsh.vim | 4 +- runtime/indent/arduino.vim | 16 + runtime/indent/asm.vim | 29 - runtime/indent/hare.vim | 31 +- runtime/indent/kdl.vim | 30 + runtime/indent/stylus.vim | 121 + runtime/indent/testdir/vb.in | 52 +- runtime/indent/testdir/vb.ok | 58 +- runtime/indent/vb.vim | 252 +- runtime/keymap/georgian-qwerty.vim | 51 + runtime/lang/menu_af_af.latin1.vim | 124 +- runtime/lang/menu_ca_es.latin1.vim | 15 +- runtime/lang/menu_cs_cz.utf-8.vim | 20 +- runtime/lang/menu_de_de.latin1.vim | 12 +- runtime/lang/menu_es_es.latin1.vim | 22 +- runtime/lang/menu_is_is.latin1.vim | 3 +- runtime/lang/menu_ko_kr.utf-8.vim | 23 +- runtime/lang/menu_nl_nl.latin1.vim | 48 +- runtime/lang/menu_pt_br.vim | 291 +-- runtime/lang/menu_pt_pt.vim | 43 +- runtime/lang/menu_sl_si.utf-8.vim | 17 +- runtime/lang/menu_slovak_slovak_republic.1250.vim | 39 +- runtime/lang/menu_sr_rs.utf-8.vim | 10 +- runtime/optwin.vim | 4 +- runtime/pack/dist/opt/comment/doc/comment.txt | 23 +- runtime/pack/dist/opt/comment/doc/tags | 8 + runtime/pack/dist/opt/matchit/autoload/matchit.vim | 12 +- runtime/pack/dist/opt/matchit/doc/matchit.txt | 6 +- runtime/pack/dist/opt/matchit/doc/tags | 3 + runtime/pack/dist/opt/matchit/plugin/matchit.vim | 4 +- .../pack/dist/opt/termdebug/plugin/termdebug.vim | 2607 +++++++++++--------- runtime/plugin/matchparen.vim | 4 +- runtime/plugin/netrwPlugin.vim | 4 +- runtime/syntax/cpp.vim | 9 +- runtime/syntax/deb822sources.vim | 2 +- runtime/syntax/generator/gen_syntax_vim.vim | 60 +- runtime/syntax/generator/vim.vim.base | 70 +- runtime/syntax/hare.vim | 188 +- runtime/syntax/haredoc.vim | 32 + runtime/syntax/html.vim | 2 +- runtime/syntax/i3config.vim | 20 +- runtime/syntax/java.vim | 253 +- runtime/syntax/jj.vim | 20 + runtime/syntax/kdl.vim | 48 + runtime/syntax/lc.vim | 2 +- runtime/syntax/mma.vim | 2 +- runtime/syntax/rasi.vim | 298 +++ runtime/syntax/shared/debversions.vim | 9 +- runtime/syntax/shared/typescriptcommon.vim | 192 +- runtime/syntax/spec.vim | 2 +- runtime/syntax/ssa.vim | 16 +- runtime/syntax/stylus.vim | 51 + runtime/syntax/swayconfig.vim | 26 +- runtime/syntax/testdir/dumps/html_00.dump | 26 +- runtime/syntax/testdir/dumps/html_01.dump | 34 +- runtime/syntax/testdir/dumps/html_02.dump | 38 +- runtime/syntax/testdir/dumps/html_03.dump | 36 +- runtime/syntax/testdir/dumps/html_04.dump | 38 +- runtime/syntax/testdir/dumps/html_05.dump | 38 +- runtime/syntax/testdir/dumps/html_06.dump | 38 +- runtime/syntax/testdir/dumps/html_07.dump | 38 +- runtime/syntax/testdir/dumps/html_08.dump | 20 + runtime/syntax/testdir/dumps/html_99.dump | 30 +- .../syntax/testdir/dumps/java_annotations_00.dump | 20 + .../syntax/testdir/dumps/java_annotations_01.dump | 20 + .../syntax/testdir/dumps/java_annotations_02.dump | 20 + .../syntax/testdir/dumps/java_annotations_03.dump | 20 + .../syntax/testdir/dumps/java_annotations_04.dump | 20 + .../syntax/testdir/dumps/java_annotations_99.dump | 20 + .../syntax/testdir/dumps/java_enfoldment_00.dump | 20 + .../syntax/testdir/dumps/java_enfoldment_01.dump | 20 + .../syntax/testdir/dumps/java_enfoldment_02.dump | 20 + .../syntax/testdir/dumps/java_enfoldment_03.dump | 20 + .../syntax/testdir/dumps/java_enfoldment_04.dump | 20 + .../syntax/testdir/dumps/java_enfoldment_99.dump | 20 + .../testdir/dumps/java_lambda_expressions_00.dump | 20 + .../testdir/dumps/java_lambda_expressions_01.dump | 20 + .../testdir/dumps/java_lambda_expressions_02.dump | 20 + .../testdir/dumps/java_lambda_expressions_03.dump | 20 + .../testdir/dumps/java_lambda_expressions_04.dump | 20 + .../testdir/dumps/java_lambda_expressions_05.dump | 20 + .../testdir/dumps/java_lambda_expressions_06.dump | 20 + .../testdir/dumps/java_lambda_expressions_07.dump | 20 + .../testdir/dumps/java_lambda_expressions_08.dump | 20 + .../testdir/dumps/java_lambda_expressions_99.dump | 20 + .../testdir/dumps/java_methods_indent2_00.dump | 20 + .../testdir/dumps/java_methods_indent2_00.vim | 2 + .../testdir/dumps/java_methods_indent2_01.dump | 20 + .../testdir/dumps/java_methods_indent2_01.vim | 2 + .../testdir/dumps/java_methods_indent2_02.dump | 20 + .../testdir/dumps/java_methods_indent2_02.vim | 2 + .../testdir/dumps/java_methods_indent2_03.dump | 20 + .../testdir/dumps/java_methods_indent2_03.vim | 2 + .../testdir/dumps/java_methods_indent2_04.dump | 20 + .../testdir/dumps/java_methods_indent2_04.vim | 2 + .../testdir/dumps/java_methods_indent2_99.dump | 20 + .../testdir/dumps/java_methods_indent2_99.vim | 2 + .../testdir/dumps/java_methods_indent4_00.dump | 20 + .../testdir/dumps/java_methods_indent4_00.vim | 2 + .../testdir/dumps/java_methods_indent4_01.dump | 20 + .../testdir/dumps/java_methods_indent4_01.vim | 2 + .../testdir/dumps/java_methods_indent4_02.dump | 20 + .../testdir/dumps/java_methods_indent4_02.vim | 2 + .../testdir/dumps/java_methods_indent4_03.dump | 20 + .../testdir/dumps/java_methods_indent4_03.vim | 2 + .../testdir/dumps/java_methods_indent4_04.dump | 20 + .../testdir/dumps/java_methods_indent4_04.vim | 2 + .../testdir/dumps/java_methods_indent4_99.dump | 20 + .../testdir/dumps/java_methods_indent4_99.vim | 2 + .../testdir/dumps/java_methods_indent8_00.dump | 20 + .../testdir/dumps/java_methods_indent8_00.vim | 2 + .../testdir/dumps/java_methods_indent8_01.dump | 20 + .../testdir/dumps/java_methods_indent8_01.vim | 2 + .../testdir/dumps/java_methods_indent8_02.dump | 20 + .../testdir/dumps/java_methods_indent8_02.vim | 2 + .../testdir/dumps/java_methods_indent8_03.dump | 20 + .../testdir/dumps/java_methods_indent8_03.vim | 2 + .../testdir/dumps/java_methods_indent8_04.dump | 20 + .../testdir/dumps/java_methods_indent8_04.vim | 2 + .../testdir/dumps/java_methods_indent8_99.dump | 20 + .../testdir/dumps/java_methods_indent8_99.vim | 2 + .../testdir/dumps/java_methods_indent_00.dump | 20 - .../testdir/dumps/java_methods_indent_01.dump | 20 - .../testdir/dumps/java_methods_indent_02.dump | 20 - .../testdir/dumps/java_methods_indent_03.dump | 20 - .../testdir/dumps/java_methods_indent_99.dump | 20 - .../testdir/dumps/java_methods_style_00.dump | 24 +- .../syntax/testdir/dumps/java_methods_style_00.vim | 2 + .../testdir/dumps/java_methods_style_01.dump | 26 +- .../syntax/testdir/dumps/java_methods_style_01.vim | 2 + .../testdir/dumps/java_methods_style_02.dump | 30 +- .../syntax/testdir/dumps/java_methods_style_02.vim | 2 + .../testdir/dumps/java_methods_style_03.dump | 36 +- .../syntax/testdir/dumps/java_methods_style_03.vim | 2 + .../testdir/dumps/java_methods_style_04.dump | 20 + .../syntax/testdir/dumps/java_methods_style_04.vim | 2 + .../testdir/dumps/java_methods_style_99.dump | 24 +- .../syntax/testdir/dumps/java_methods_style_99.vim | 2 + .../syntax/testdir/dumps/java_unfoldment_00.dump | 20 + .../syntax/testdir/dumps/java_unfoldment_01.dump | 20 + .../syntax/testdir/dumps/java_unfoldment_02.dump | 20 + .../syntax/testdir/dumps/java_unfoldment_03.dump | 20 + .../syntax/testdir/dumps/java_unfoldment_04.dump | 20 + .../syntax/testdir/dumps/java_unfoldment_99.dump | 20 + runtime/syntax/testdir/dumps/vim9_comment_00.dump | 20 + runtime/syntax/testdir/dumps/vim9_comment_01.dump | 20 + runtime/syntax/testdir/dumps/vim9_comment_02.dump | 20 + runtime/syntax/testdir/dumps/vim9_comment_03.dump | 20 + runtime/syntax/testdir/dumps/vim9_comment_99.dump | 20 + .../testdir/dumps/vim9_ex_comment_strings_00.dump | 20 + .../testdir/dumps/vim9_ex_comment_strings_01.dump | 20 + .../testdir/dumps/vim9_ex_comment_strings_99.dump | 20 + .../dumps/vim9_ex_no_comment_strings_00.dump | 20 + .../dumps/vim9_ex_no_comment_strings_01.dump | 20 + .../dumps/vim9_ex_no_comment_strings_99.dump | 20 + runtime/syntax/testdir/dumps/vim9_keymap_01.vim | 2 + runtime/syntax/testdir/dumps/vim9_keymap_99.vim | 2 + .../testdir/dumps/vim9_legacy_header_00.dump | 2 +- .../testdir/dumps/vim9_legacy_header_99.dump | 2 +- .../testdir/dumps/vim9_legacy_header_fold_00.dump | 2 +- .../testdir/dumps/vim9_legacy_header_fold_99.dump | 2 +- runtime/syntax/testdir/dumps/vim9_shebang_00.dump | 20 + runtime/syntax/testdir/dumps/vim9_shebang_99.dump | 20 + runtime/syntax/testdir/dumps/vim_00.dump | 20 - runtime/syntax/testdir/dumps/vim_99.dump | 20 - runtime/syntax/testdir/dumps/vim_comment_00.dump | 20 + runtime/syntax/testdir/dumps/vim_comment_01.dump | 20 + runtime/syntax/testdir/dumps/vim_comment_02.dump | 20 + runtime/syntax/testdir/dumps/vim_comment_03.dump | 20 + runtime/syntax/testdir/dumps/vim_comment_99.dump | 20 + runtime/syntax/testdir/dumps/vim_ex_catch_00.dump | 20 + runtime/syntax/testdir/dumps/vim_ex_catch_99.dump | 20 + .../testdir/dumps/vim_ex_comment-vim9_00.dump | 20 - .../testdir/dumps/vim_ex_comment-vim9_01.dump | 20 - .../testdir/dumps/vim_ex_comment-vim9_02.dump | 20 - .../testdir/dumps/vim_ex_comment-vim9_99.dump | 20 - .../syntax/testdir/dumps/vim_ex_comment_00.dump | 20 - .../syntax/testdir/dumps/vim_ex_comment_01.dump | 20 - .../syntax/testdir/dumps/vim_ex_comment_02.dump | 20 - .../syntax/testdir/dumps/vim_ex_comment_99.dump | 20 - .../testdir/dumps/vim_ex_comment_strings_00.dump | 20 + .../testdir/dumps/vim_ex_comment_strings_99.dump | 20 + runtime/syntax/testdir/dumps/vim_ex_def_06.dump | 20 - runtime/syntax/testdir/dumps/vim_ex_func_00.dump | 20 - runtime/syntax/testdir/dumps/vim_ex_func_99.dump | 20 - .../syntax/testdir/dumps/vim_ex_function_07.dump | 2 +- .../syntax/testdir/dumps/vim_ex_function_09.dump | 2 +- .../syntax/testdir/dumps/vim_ex_function_99.dump | 2 +- .../dumps/vim_ex_no_comment_strings_00.dump | 20 + .../dumps/vim_ex_no_comment_strings_99.dump | 20 + runtime/syntax/testdir/dumps/vim_ex_sleep_00.dump | 20 + runtime/syntax/testdir/dumps/vim_ex_sleep_99.dump | 20 + .../syntax/testdir/dumps/vim_ex_substitute_01.dump | 2 +- .../syntax/testdir/dumps/vim_ex_substitute_02.dump | 2 +- .../syntax/testdir/dumps/vim_ex_substitute_03.dump | 2 +- .../syntax/testdir/dumps/vim_ex_substitute_04.dump | 24 +- .../syntax/testdir/dumps/vim_ex_substitute_05.dump | 20 + .../syntax/testdir/dumps/vim_ex_substitute_06.dump | 20 + .../syntax/testdir/dumps/vim_ex_substitute_07.dump | 20 + .../syntax/testdir/dumps/vim_ex_substitute_99.dump | 16 +- runtime/syntax/testdir/dumps/vim_ex_syntax_09.dump | 6 +- runtime/syntax/testdir/dumps/vim_ex_syntax_99.dump | 6 +- runtime/syntax/testdir/dumps/vim_ex_throw_00.dump | 20 + runtime/syntax/testdir/dumps/vim_ex_throw_99.dump | 20 + runtime/syntax/testdir/dumps/vim_keymap_99.vim | 2 + .../testdir/dumps/vim_line_continuation_02.dump | 6 +- .../testdir/dumps/vim_line_continuation_99.dump | 6 +- runtime/syntax/testdir/dumps/vim_shebang_00.dump | 20 + runtime/syntax/testdir/dumps/vim_shebang_99.dump | 20 + runtime/syntax/testdir/dumps/vim_syntax_00.dump | 20 - runtime/syntax/testdir/dumps/vim_syntax_01.dump | 20 - runtime/syntax/testdir/dumps/vim_syntax_02.dump | 20 - runtime/syntax/testdir/dumps/vim_syntax_03.dump | 20 - runtime/syntax/testdir/dumps/vim_syntax_04.dump | 20 - runtime/syntax/testdir/dumps/vim_syntax_05.dump | 20 - runtime/syntax/testdir/dumps/vim_syntax_06.dump | 20 - runtime/syntax/testdir/dumps/vim_syntax_07.dump | 20 - runtime/syntax/testdir/dumps/vim_syntax_08.dump | 20 - runtime/syntax/testdir/dumps/vim_syntax_99.dump | 20 - runtime/syntax/testdir/input/html.html | 153 ++ runtime/syntax/testdir/input/html_html | 146 -- runtime/syntax/testdir/input/java_annotations.java | 78 + runtime/syntax/testdir/input/java_enfoldment.java | 86 + .../testdir/input/java_lambda_expressions.java | 154 ++ .../syntax/testdir/input/java_methods_indent.java | 70 - .../syntax/testdir/input/java_methods_indent2.java | 92 + .../syntax/testdir/input/java_methods_indent4.java | 92 + .../syntax/testdir/input/java_methods_indent8.java | 92 + .../syntax/testdir/input/java_methods_style.java | 38 +- runtime/syntax/testdir/input/java_unfoldment.java | 86 + runtime/syntax/testdir/input/vim9_comment.vim | 64 + .../testdir/input/vim9_ex_comment_strings.vim | 22 + .../testdir/input/vim9_ex_no_comment_strings.vim | 22 + runtime/syntax/testdir/input/vim9_shebang.vim | 7 + runtime/syntax/testdir/input/vim_comment.vim | 68 + runtime/syntax/testdir/input/vim_ex_catch.vim | 17 + .../syntax/testdir/input/vim_ex_comment-vim9.vim | 41 - runtime/syntax/testdir/input/vim_ex_comment.vim | 45 - .../testdir/input/vim_ex_comment_strings.vim | 20 + .../testdir/input/vim_ex_no_comment_strings.vim | 20 + runtime/syntax/testdir/input/vim_ex_sleep.vim | 11 + runtime/syntax/testdir/input/vim_ex_substitute.vim | 58 + runtime/syntax/testdir/input/vim_ex_throw.vim | 5 + runtime/syntax/testdir/input/vim_shebang.vim | 5 + runtime/syntax/typescript.vim | 2 +- runtime/syntax/typescriptreact.vim | 7 +- runtime/syntax/vim.vim | 89 +- 407 files changed, 9979 insertions(+), 4457 deletions(-) create mode 100644 runtime/autoload/hare.vim delete mode 100644 runtime/autoload/zig/fmt.vim create mode 100644 runtime/doc/ft_hare.txt create mode 100644 runtime/ftplugin/arduino.vim create mode 100644 runtime/ftplugin/dart.vim create mode 100644 runtime/ftplugin/graphql.vim create mode 100644 runtime/ftplugin/haredoc.vim create mode 100644 runtime/ftplugin/hyprlang.vim create mode 100644 runtime/ftplugin/jj.vim create mode 100644 runtime/ftplugin/kdl.vim create mode 100644 runtime/ftplugin/lc.vim create mode 100644 runtime/ftplugin/nim.vim create mode 100644 runtime/ftplugin/prisma.vim create mode 100644 runtime/ftplugin/purescript.vim create mode 100644 runtime/ftplugin/rasi.vim create mode 100644 runtime/ftplugin/rescript.vim create mode 100644 runtime/ftplugin/slint.vim create mode 100644 runtime/ftplugin/snakemake.vim create mode 100644 runtime/ftplugin/sshdconfig.vim create mode 100644 runtime/ftplugin/stylus.vim create mode 100644 runtime/ftplugin/svelte.vim create mode 100644 runtime/ftplugin/typst.vim create mode 100644 runtime/ftplugin/v.vim create mode 100644 runtime/indent/arduino.vim delete mode 100644 runtime/indent/asm.vim create mode 100644 runtime/indent/kdl.vim create mode 100644 runtime/indent/stylus.vim create mode 100644 runtime/keymap/georgian-qwerty.vim create mode 100644 runtime/pack/dist/opt/comment/doc/tags create mode 100644 runtime/syntax/haredoc.vim create mode 100644 runtime/syntax/jj.vim create mode 100644 runtime/syntax/kdl.vim create mode 100644 runtime/syntax/rasi.vim create mode 100644 runtime/syntax/stylus.vim create mode 100644 runtime/syntax/testdir/dumps/html_08.dump create mode 100644 runtime/syntax/testdir/dumps/java_annotations_00.dump create mode 100644 runtime/syntax/testdir/dumps/java_annotations_01.dump create mode 100644 runtime/syntax/testdir/dumps/java_annotations_02.dump create mode 100644 runtime/syntax/testdir/dumps/java_annotations_03.dump create mode 100644 runtime/syntax/testdir/dumps/java_annotations_04.dump create mode 100644 runtime/syntax/testdir/dumps/java_annotations_99.dump create mode 100644 runtime/syntax/testdir/dumps/java_enfoldment_00.dump create mode 100644 runtime/syntax/testdir/dumps/java_enfoldment_01.dump create mode 100644 runtime/syntax/testdir/dumps/java_enfoldment_02.dump create mode 100644 runtime/syntax/testdir/dumps/java_enfoldment_03.dump create mode 100644 runtime/syntax/testdir/dumps/java_enfoldment_04.dump create mode 100644 runtime/syntax/testdir/dumps/java_enfoldment_99.dump create mode 100644 runtime/syntax/testdir/dumps/java_lambda_expressions_00.dump create mode 100644 runtime/syntax/testdir/dumps/java_lambda_expressions_01.dump create mode 100644 runtime/syntax/testdir/dumps/java_lambda_expressions_02.dump create mode 100644 runtime/syntax/testdir/dumps/java_lambda_expressions_03.dump create mode 100644 runtime/syntax/testdir/dumps/java_lambda_expressions_04.dump create mode 100644 runtime/syntax/testdir/dumps/java_lambda_expressions_05.dump create mode 100644 runtime/syntax/testdir/dumps/java_lambda_expressions_06.dump create mode 100644 runtime/syntax/testdir/dumps/java_lambda_expressions_07.dump create mode 100644 runtime/syntax/testdir/dumps/java_lambda_expressions_08.dump create mode 100644 runtime/syntax/testdir/dumps/java_lambda_expressions_99.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent2_00.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent2_00.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent2_01.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent2_01.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent2_02.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent2_02.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent2_03.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent2_03.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent2_04.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent2_04.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent2_99.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent2_99.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent4_00.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent4_00.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent4_01.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent4_01.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent4_02.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent4_02.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent4_03.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent4_03.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent4_04.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent4_04.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent4_99.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent4_99.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent8_00.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent8_00.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent8_01.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent8_01.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent8_02.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent8_02.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent8_03.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent8_03.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent8_04.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent8_04.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent8_99.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_indent8_99.vim delete mode 100644 runtime/syntax/testdir/dumps/java_methods_indent_00.dump delete mode 100644 runtime/syntax/testdir/dumps/java_methods_indent_01.dump delete mode 100644 runtime/syntax/testdir/dumps/java_methods_indent_02.dump delete mode 100644 runtime/syntax/testdir/dumps/java_methods_indent_03.dump delete mode 100644 runtime/syntax/testdir/dumps/java_methods_indent_99.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_style_00.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_style_01.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_style_02.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_style_03.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_style_04.dump create mode 100644 runtime/syntax/testdir/dumps/java_methods_style_04.vim create mode 100644 runtime/syntax/testdir/dumps/java_methods_style_99.vim create mode 100644 runtime/syntax/testdir/dumps/java_unfoldment_00.dump create mode 100644 runtime/syntax/testdir/dumps/java_unfoldment_01.dump create mode 100644 runtime/syntax/testdir/dumps/java_unfoldment_02.dump create mode 100644 runtime/syntax/testdir/dumps/java_unfoldment_03.dump create mode 100644 runtime/syntax/testdir/dumps/java_unfoldment_04.dump create mode 100644 runtime/syntax/testdir/dumps/java_unfoldment_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_comment_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_comment_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_comment_02.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_comment_03.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_comment_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_ex_comment_strings_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_ex_comment_strings_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_ex_comment_strings_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_ex_no_comment_strings_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_ex_no_comment_strings_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_ex_no_comment_strings_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_keymap_01.vim create mode 100644 runtime/syntax/testdir/dumps/vim9_keymap_99.vim create mode 100644 runtime/syntax/testdir/dumps/vim9_shebang_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_shebang_99.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_00.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_comment_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_comment_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim_comment_02.dump create mode 100644 runtime/syntax/testdir/dumps/vim_comment_03.dump create mode 100644 runtime/syntax/testdir/dumps/vim_comment_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_catch_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_catch_99.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment-vim9_00.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment-vim9_01.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment-vim9_02.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment-vim9_99.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment_00.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment_01.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment_02.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment_strings_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_comment_strings_99.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_def_06.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_func_00.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_ex_func_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_no_comment_strings_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_no_comment_strings_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_sleep_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_sleep_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_substitute_05.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_substitute_06.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_substitute_07.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_throw_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_throw_99.dump create mode 100644 runtime/syntax/testdir/dumps/vim_keymap_99.vim create mode 100644 runtime/syntax/testdir/dumps/vim_shebang_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_shebang_99.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_syntax_00.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_syntax_01.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_syntax_02.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_syntax_03.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_syntax_04.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_syntax_05.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_syntax_06.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_syntax_07.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_syntax_08.dump delete mode 100644 runtime/syntax/testdir/dumps/vim_syntax_99.dump create mode 100644 runtime/syntax/testdir/input/html.html delete mode 100644 runtime/syntax/testdir/input/html_html create mode 100644 runtime/syntax/testdir/input/java_annotations.java create mode 100644 runtime/syntax/testdir/input/java_enfoldment.java create mode 100644 runtime/syntax/testdir/input/java_lambda_expressions.java delete mode 100644 runtime/syntax/testdir/input/java_methods_indent.java create mode 100644 runtime/syntax/testdir/input/java_methods_indent2.java create mode 100644 runtime/syntax/testdir/input/java_methods_indent4.java create mode 100644 runtime/syntax/testdir/input/java_methods_indent8.java create mode 100644 runtime/syntax/testdir/input/java_unfoldment.java create mode 100644 runtime/syntax/testdir/input/vim9_comment.vim create mode 100644 runtime/syntax/testdir/input/vim9_ex_comment_strings.vim create mode 100644 runtime/syntax/testdir/input/vim9_ex_no_comment_strings.vim create mode 100755 runtime/syntax/testdir/input/vim9_shebang.vim create mode 100644 runtime/syntax/testdir/input/vim_comment.vim create mode 100644 runtime/syntax/testdir/input/vim_ex_catch.vim delete mode 100644 runtime/syntax/testdir/input/vim_ex_comment-vim9.vim delete mode 100644 runtime/syntax/testdir/input/vim_ex_comment.vim create mode 100644 runtime/syntax/testdir/input/vim_ex_comment_strings.vim create mode 100644 runtime/syntax/testdir/input/vim_ex_no_comment_strings.vim create mode 100644 runtime/syntax/testdir/input/vim_ex_sleep.vim create mode 100644 runtime/syntax/testdir/input/vim_ex_throw.vim create mode 100755 runtime/syntax/testdir/input/vim_shebang.vim (limited to 'runtime') diff --git a/runtime/autoload/ccomplete.vim b/runtime/autoload/ccomplete.vim index 7096dcf..355f724 100644 --- a/runtime/autoload/ccomplete.vim +++ b/runtime/autoload/ccomplete.vim @@ -3,7 +3,7 @@ vim9script noclear # Vim completion script # Language: C # Maintainer: The Vim Project -# Last Change: 2023 Aug 10 +# Last Change: 2024 Jun 06 # Rewritten in Vim9 script by github user lacygoill # Former Maintainer: Bram Moolenaar @@ -210,7 +210,7 @@ export def Complete(findstart: bool, abase: string): any # {{{1 # Find the variable in the tags file(s) var diclist: list> = taglist('^' .. items[0] .. '$') # Remove members, these can't appear without something in front. - ->filter((_, v: dict): bool => + ->filter((_, v: dict): bool => v->has_key('kind') ? v.kind != 'm' : true) res = [] diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 4e7d517..bf9e32e 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -3,7 +3,7 @@ vim9script # Vim functions for file type detection # # Maintainer: The Vim Project -# Last Change: 2024 Feb 18 +# Last Change: 2024 May 23 # Former Maintainer: Bram Moolenaar # These functions are moved here from runtime/filetype.vim to make startup @@ -376,6 +376,32 @@ export def FTfs() endif enddef +# Recursively search for Hare source files in a directory and any +# subdirectories, up to a given depth. +def IsHareModule(dir: string, depth: number): bool + if depth <= 0 + return !empty(glob(dir .. '/*.ha')) + endif + + return reduce(sort(glob(dir .. '/*', true, true), + (a, b) => isdirectory(a) - isdirectory(b)), + (acc, n) => acc + || n =~ '\.ha$' + || isdirectory(n) + && IsHareModule(n, depth - 1), + false) +enddef + +# Determine if a README file exists within a Hare module and should be given the +# Haredoc filetype. +export def FTharedoc() + if exists('g:filetype_haredoc') + if IsHareModule(':h', get(g:, 'haredoc_search_depth', 1)) + setf haredoc + endif + endif +enddef + # Distinguish between HTML, XHTML and Django export def FThtml() var n = 1 @@ -406,14 +432,18 @@ export def FTidl() setf idl enddef -# Distinguish between "default", Prolog and Cproto prototype file. +# Distinguish between "default", Prolog, zsh module's C and Cproto prototype file. export def ProtoCheck(default: string) + # zsh modules use '#include "*.pro"' + # https://github.com/zsh-users/zsh/blob/63f086d167960a27ecdbcb762179e2c2bf8a29f5/Src/Modules/example.c#L31 + if getline(1) =~ '/* Generated automatically */' + setf c # Cproto files have a comment in the first line and a function prototype in # the second line, it always ends in ";". Indent files may also have # comments, thus we can't match comments to see the difference. # IDL files can have a single ';' in the second line, require at least one # chacter before the ';'. - if getline(2) =~ '.;$' + elseif getline(2) =~ '.;$' setf cpp else # recognize Prolog by specific text in the first non-empty line diff --git a/runtime/autoload/dist/script.vim b/runtime/autoload/dist/script.vim index f58899a..33ed7fd 100644 --- a/runtime/autoload/dist/script.vim +++ b/runtime/autoload/dist/script.vim @@ -229,6 +229,10 @@ export def Exe2filetype(name: string, line1: string): string elseif name =~ '^execlineb\>' return 'execline' + # Vim + elseif name =~ '^vim\>' + return 'vim' + endif return '' diff --git a/runtime/autoload/hare.vim b/runtime/autoload/hare.vim new file mode 100644 index 0000000..c4581fc --- /dev/null +++ b/runtime/autoload/hare.vim @@ -0,0 +1,26 @@ +" Vim autoload file. +" Language: Hare +" Maintainer: Amelia Clarke +" Last Updated: 2024-05-10 +" Upstream: https://git.sr.ht/~sircmpwn/hare.vim + +" Attempt to find the directory for a given Hare module. +function hare#FindModule(str) + let path = substitute(trim(a:str, ':', 2), '::', '/', 'g') + let dir = finddir(path) + while !empty(path) && empty(dir) + let path = substitute(path, '/\?\h\w*$', '', '') + let dir = finddir(path) + endwhile + return dir +endfunction + +" Return the value of HAREPATH if it exists. Otherwise use a reasonable default. +function hare#GetPath() + if empty($HAREPATH) + return '/usr/src/hare/stdlib,/usr/src/hare/third-party' + endif + return substitute($HAREPATH, ':', ',', 'g') +endfunction + +" vim: et sts=2 sw=2 ts=8 diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index e2152b0..d8de432 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -9,6 +9,12 @@ " 2024 Feb 19 by Vim Project: (announce adoption) " 2024 Feb 29 by Vim Project: handle symlinks in tree mode correctly " 2024 Apr 03 by Vim Project: detect filetypes for remote edited files +" 2024 May 08 by Vim Project: cleanup legacy Win9X checks +" 2024 May 09 by Vim Project: remove hard-coded private.ppk +" 2024 May 10 by Vim Project: recursively delete directories by default +" 2024 May 13 by Vim Project: prefer scp over pscp +" 2024 Jun 04 by Vim Project: set bufhidden if buffer changed, nohidden is set and buffer shall be switched (#14915) +" 2024 Jun 13 by Vim Project: glob() on Windows fails when a directory name contains [] (#14952) " Former Maintainer: Charles E Campbell " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 2016 Charles E. Campbell {{{1 @@ -283,20 +289,15 @@ if !exists("g:netrw_scp_cmd") if executable("scp") call s:NetrwInit("g:netrw_scp_cmd" , "scp -q") elseif executable("pscp") - if (has("win32") || has("win95") || has("win64") || has("win16")) && filereadable('c:\private.ppk') - call s:NetrwInit("g:netrw_scp_cmd", 'pscp -i c:\private.ppk') - else - call s:NetrwInit("g:netrw_scp_cmd", 'pscp -q') - endif + call s:NetrwInit("g:netrw_scp_cmd", 'pscp -q') else call s:NetrwInit("g:netrw_scp_cmd" , "scp -q") endif endif - call s:NetrwInit("g:netrw_sftp_cmd" , "sftp") call s:NetrwInit("g:netrw_ssh_cmd" , "ssh") -if (has("win32") || has("win95") || has("win64") || has("win16")) +if has("win32") \ && exists("g:netrw_use_nt_rcp") \ && g:netrw_use_nt_rcp \ && executable( $SystemRoot .'/system32/rcp.exe') @@ -311,12 +312,8 @@ endif " Default values for netrw's global variables {{{2 " Cygwin Detection ------- {{{3 if !exists("g:netrw_cygwin") - if has("win32") || has("win95") || has("win64") || has("win16") - if has("win32unix") && &shell =~ '\%(\\|\\)\%(\.exe\)\=$' - let g:netrw_cygwin= 1 - else - let g:netrw_cygwin= 0 - endif + if has("win32unix") && &shell =~ '\%(\\|\\)\%(\.exe\)\=$' + let g:netrw_cygwin= 1 else let g:netrw_cygwin= 0 endif @@ -372,10 +369,6 @@ endif call s:NetrwInit("g:netrw_keepdir",1) if !exists("g:netrw_list_cmd") if g:netrw_scp_cmd =~ '^pscp' && executable("pscp") - if (has("win32") || has("win95") || has("win64") || has("win16")) && filereadable("c:\\private.ppk") - " provide a pscp-based listing command - let g:netrw_scp_cmd ="pscp -i C:\\private.ppk" - endif if exists("g:netrw_list_cmd_options") let g:netrw_list_cmd= g:netrw_scp_cmd." -ls USEPORT HOSTNAME: ".g:netrw_list_cmd_options else @@ -403,7 +396,7 @@ if !exists("g:netrw_localcmdshell") let g:netrw_localcmdshell= "" endif if !exists("g:netrw_localcopycmd") - if has("win32") || has("win95") || has("win64") || has("win16") + if has("win32") if g:netrw_cygwin let g:netrw_localcopycmd= "cp" else @@ -417,7 +410,7 @@ if !exists("g:netrw_localcopycmd") endif endif if !exists("g:netrw_localcopydircmd") - if has("win32") || has("win95") || has("win64") || has("win16") + if has("win32") if g:netrw_cygwin let g:netrw_localcopydircmd = "cp" let g:netrw_localcopydircmdopt= " -R" @@ -439,7 +432,7 @@ if exists("g:netrw_local_mkdir") let g:netrw_localmkdir= g:netrw_local_mkdir call netrw#ErrorMsg(s:NOTE,"g:netrw_local_mkdir is deprecated in favor of g:netrw_localmkdir",87) endif -if has("win32") || has("win95") || has("win64") || has("win16") +if has("win32") if g:netrw_cygwin call s:NetrwInit("g:netrw_localmkdir","mkdir") else @@ -455,7 +448,7 @@ if exists("g:netrw_local_movecmd") call netrw#ErrorMsg(s:NOTE,"g:netrw_local_movecmd is deprecated in favor of g:netrw_localmovecmd",88) endif if !exists("g:netrw_localmovecmd") - if has("win32") || has("win95") || has("win64") || has("win16") + if has("win32") if g:netrw_cygwin let g:netrw_localmovecmd= "mv" else @@ -488,7 +481,7 @@ call s:NetrwInit("g:netrw_mousemaps" , (exists("+mouse") && &mouse =~# '[anh call s:NetrwInit("g:netrw_retmap" , 0) if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin) call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME") -elseif has("win32") || has("win95") || has("win64") || has("win16") +elseif has("win32") call s:NetrwInit("g:netrw_chgperm" , "cacls FILENAME /e /p PERM") else call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME") @@ -547,14 +540,13 @@ if !exists("g:netrw_xstrlen") endif endif call s:NetrwInit("g:NetrwTopLvlMenu","Netrw.") -call s:NetrwInit("g:netrw_win95ftp",1) call s:NetrwInit("g:netrw_winsize",50) call s:NetrwInit("g:netrw_wiw",1) if g:netrw_winsize > 100|let g:netrw_winsize= 100|endif " --------------------------------------------------------------------- " Default values for netrw's script variables: {{{2 call s:NetrwInit("g:netrw_fname_escape",' ?&;%') -if has("win32") || has("win95") || has("win64") || has("win16") +if has("win32") call s:NetrwInit("g:netrw_glob_escape",'*?`{[]$') else call s:NetrwInit("g:netrw_glob_escape",'*[]?`{~$\') @@ -686,7 +678,7 @@ fun! netrw#Explore(indx,dosplit,style,...) " record current directory let curdir = simplify(b:netrw_curdir) let curfiledir = substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e') - if !exists("g:netrw_cygwin") && (has("win32") || has("win95") || has("win64") || has("win16")) + if !exists("g:netrw_cygwin") && has("win32") let curdir= substitute(curdir,'\','/','g') endif " call Decho("curdir<".curdir."> curfiledir<".curfiledir.">",'~'.expand("")) @@ -844,7 +836,7 @@ fun! netrw#Explore(indx,dosplit,style,...) " handle .../**/.../filepat " call Decho("case starpat=4: Explore .../**/.../filepat",'~'.expand("")) let prefixdir= substitute(dirname,'^\(.\{-}\)\*\*.*$','\1','') - if prefixdir =~ '^/' || (prefixdir =~ '^\a:/' && (has("win32") || has("win95") || has("win64") || has("win16"))) + if prefixdir =~ '^/' || (prefixdir =~ '^\a:/' && has("win32")) let b:netrw_curdir = prefixdir else let b:netrw_curdir= getcwd().'/'.prefixdir @@ -881,7 +873,7 @@ fun! netrw#Explore(indx,dosplit,style,...) else if dirname == "" let dirname= getcwd() - elseif (has("win32") || has("win95") || has("win64") || has("win16")) && !g:netrw_cygwin + elseif has("win32") && !g:netrw_cygwin " Windows : check for a drive specifier, or else for a remote share name ('\\Foo' or '//Foo', " depending on whether backslashes have been converted to forward slashes by earlier code). if dirname !~ '^[a-zA-Z]:' && dirname !~ '^\\\\\w\+' && dirname !~ '^//\w\+' @@ -1420,7 +1412,7 @@ fun! netrw#Obtain(islocal,fname,...) " call Decho("obtain a file from local ".b:netrw_curdir." to ".tgtdir,'~'.expand("")) if exists("b:netrw_curdir") && getcwd() != b:netrw_curdir let topath= s:ComposePath(tgtdir,"") - if (has("win32") || has("win95") || has("win64") || has("win16")) + if has("win32") " transfer files one at time " call Decho("transfer files one at a time",'~'.expand("")) for fname in fnamelist @@ -2301,7 +2293,7 @@ fun! netrw#NetRead(mode,...) endif " 'C' in 'C:\path\to\file' is handled as hostname on windows. " This is workaround to avoid mis-handle windows local-path: - if g:netrw_scp_cmd =~ '^scp' && (has("win32") || has("win95") || has("win64") || has("win16")) + if g:netrw_scp_cmd =~ '^scp' && has("win32") let tmpfile_get = substitute(tr(tmpfile, '\', '/'), '^\(\a\):[/\\]\(.*\)$', '/\1/\2', '') else let tmpfile_get = tmpfile @@ -3221,7 +3213,7 @@ fun! s:NetrwMethod(choice) if exists("s:netrw_hup[host]") call NetUserPass("ftp:".host) - elseif (has("win32") || has("win95") || has("win64") || has("win16")) && s:netrw_ftp_cmd =~# '-[sS]:' + elseif has("win32") && s:netrw_ftp_cmd =~# '-[sS]:' " call Decho("has -s: : s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">",'~'.expand("")) " call Decho(" g:netrw_ftp_cmd<".g:netrw_ftp_cmd.">",'~'.expand("")) if g:netrw_ftp_cmd =~# '-[sS]:\S*MACHINE\>' @@ -3336,38 +3328,6 @@ fun! s:NetrwMethod(choice) " call Dret("s:NetrwMethod : b:netrw_method=".b:netrw_method." g:netrw_port=".g:netrw_port) endfun -" ------------------------------------------------------------------------ -" NetReadFixup: this sort of function is typically written by the user {{{2 -" to handle extra junk that their system's ftp dumps -" into the transfer. This function is provided as an -" example and as a fix for a Windows 95 problem: in my -" experience, win95's ftp always dumped four blank lines -" at the end of the transfer. -if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp - fun! NetReadFixup(method, line1, line2) -" call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")") - - " sanity checks -- attempt to convert inputs to integers - let method = a:method + 0 - let line1 = a:line1 + 0 - let line2 = a:line2 + 0 - if type(method) != 0 || type(line1) != 0 || type(line2) != 0 || method < 0 || line1 <= 0 || line2 <= 0 -" call Dret("NetReadFixup") - return - endif - - if method == 3 " ftp (no <.netrc>) - let fourblanklines= line2 - 3 - if fourblanklines >= line1 - exe "sil NetrwKeepj ".fourblanklines.",".line2."g/^\s*$/d" - call histdel("/",-1) - endif - endif - -" call Dret("NetReadFixup") - endfun -endif - " --------------------------------------------------------------------- " NetUserPass: set username and password for subsequent ftp transfer {{{2 " Usage: :call NetUserPass() -- will prompt for userid and password @@ -3990,7 +3950,7 @@ fun! s:NetrwBrowse(islocal,dirname) if b:netrw_curdir =~ '[/\\]$' let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e') endif - if b:netrw_curdir =~ '\a:$' && (has("win32") || has("win95") || has("win64") || has("win16")) + if b:netrw_curdir =~ '\a:$' && has("win32") let b:netrw_curdir= b:netrw_curdir."/" endif if b:netrw_curdir == '' @@ -4144,7 +4104,7 @@ fun! s:NetrwFile(fname) let b:netrw_curdir= getcwd() endif - if !exists("g:netrw_cygwin") && (has("win32") || has("win95") || has("win64") || has("win16")) + if !exists("g:netrw_cygwin") && has("win32") if fname =~ '^\' || fname =~ '^\a:\' " windows, but full path given let ret= fname @@ -4864,7 +4824,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) call s:SavePosn(s:netrw_posn) NetrwKeepj call s:NetrwOptionsSave("s:") NetrwKeepj call s:NetrwOptionsSafe(a:islocal) - if (has("win32") || has("win95") || has("win64") || has("win16")) + if has("win32") let dirname = substitute(b:netrw_curdir,'\\','/','ge') else let dirname = b:netrw_curdir @@ -5111,7 +5071,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) endif " call Decho("go-up: amiga: dirname<".dirname."> (go up one dir)",'~'.expand("")) - elseif !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) + elseif !g:netrw_cygwin && has("win32") " windows if a:islocal let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','') @@ -5396,7 +5356,7 @@ fun! netrw#BrowseX(fname,remote) " set up the filename " (lower case the extension, make a local copy of a remote file) let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e') - if has("win32") || has("win95") || has("win64") || has("win16") + if has("win32") let exten= substitute(exten,'^.*$','\L&\E','') endif if exten =~ "[\\/]" @@ -5443,12 +5403,12 @@ fun! netrw#BrowseX(fname,remote) " by default, g:netrw_suppress_gx_mesg is true if g:netrw_suppress_gx_mesg if &srr =~ "%s" - if (has("win32") || has("win95") || has("win64") || has("win16")) + if has("win32") let redir= substitute(&srr,"%s","nul","") else let redir= substitute(&srr,"%s","/dev/null","") endif - elseif (has("win32") || has("win95") || has("win64") || has("win16")) + elseif has("win32") let redir= &srr . "nul" else let redir= &srr . "/dev/null" @@ -5491,7 +5451,7 @@ fun! netrw#BrowseX(fname,remote) call s:NetrwExe("sil !".viewer." ".viewopt.s:ShellEscape(fname,1).redir) let ret= v:shell_error - elseif has("win32") || has("win64") + elseif has("win32") " call Decho("(netrw#BrowseX) win".(has("win32")? "32" : "64"),'~'.expand("")) if executable("start") call s:NetrwExe('sil! !start rundll32 url.dll,FileProtocolHandler '.s:ShellEscape(fname,1)) @@ -5766,6 +5726,9 @@ fun! s:NetrwEditFile(cmd,opt,fname) exe "NetrwKeepj keepalt ".a:opt." ".a:cmd." ".fnameescape(a:fname) else " call Decho("exe NetrwKeepj ".a:opt." ".a:cmd." ".fnameescape(a:fname)) + if a:cmd =~# 'e\%[new]!' && !&hidden && getbufvar(bufname('%'), '&modified', 0) + call setbufvar(bufname('%'), '&bufhidden', 'hide') + endif exe "NetrwKeepj ".a:opt." ".a:cmd." ".fnameescape(a:fname) endif " call Dret("s:NetrwEditFile") @@ -5836,16 +5799,20 @@ fun! s:NetrwGlob(direntry,expr,pare) let filelist= w:netrw_treedict[a:direntry] endif let w:netrw_liststyle= keep_liststyle - elseif v:version > 704 || (v:version == 704 && has("patch656")) - let filelist= glob(s:ComposePath(fnameescape(a:direntry),a:expr),0,1,1) - if a:pare - let filelist= map(filelist,'substitute(v:val, "^.*/", "", "")') - endif else - let filelist= glob(s:ComposePath(fnameescape(a:direntry),a:expr),0,1) - if a:pare - let filelist= map(filelist,'substitute(v:val, "^.*/", "", "")') - endif + let path= s:ComposePath(fnameescape(a:direntry),a:expr) + if has("win32") + " escape [ so it is not detected as wildcard character, see :h wildcard + let path= substitute(path, '[', '[[]', 'g') + endif + if v:version > 704 || (v:version == 704 && has("patch656")) + let filelist= glob(path,0,1,1) + else + let filelist= glob(path,0,1) + endif + if a:pare + let filelist= map(filelist,'substitute(v:val, "^.*/", "", "")') + endif endif " call Dret("s:NetrwGlob ".string(filelist)) return filelist @@ -6006,7 +5973,7 @@ fun! s:NetrwHome() " just pick the first directory let home= substitute(&rtp,',.*$','','') endif - if (has("win32") || has("win95") || has("win64") || has("win16")) + if has("win32") let home= substitute(home,'/','\\','g') endif endif @@ -7227,7 +7194,7 @@ fun! s:NetrwMarkFileCopy(islocal,...) let args= join(map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),"s:ShellEscape(b:netrw_curdir.\"/\".v:val)")) let tgt = s:ShellEscape(s:netrwmftgt) endif - if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) + if !g:netrw_cygwin && has("win32") let args= substitute(args,'/','\\','g') let tgt = substitute(tgt, '/','\\','g') endif @@ -7241,7 +7208,7 @@ fun! s:NetrwMarkFileCopy(islocal,...) " call Decho("args<".args."> is a directory",'~'.expand("")) let copycmd= g:netrw_localcopydircmd " call Decho("using copydircmd<".copycmd.">",'~'.expand("")) - if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) + if !g:netrw_cygwin && has("win32") " window's xcopy doesn't copy a directory to a target properly. Instead, it copies a directory's " contents to a target. One must append the source directory name to the target to get xcopy to " do the right thing. @@ -7859,7 +7826,7 @@ fun! s:NetrwMarkFileMove(islocal) endif let tgt = s:ShellEscape(s:netrwmftgt) " call Decho("tgt<".tgt.">",'~'.expand("")) - if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) + if !g:netrw_cygwin && has("win32") let tgt= substitute(tgt, '/','\\','g') " call Decho("windows exception: tgt<".tgt.">",'~'.expand("")) if g:netrw_localmovecmd =~ '\s' @@ -7880,7 +7847,7 @@ fun! s:NetrwMarkFileMove(islocal) " Jul 19, 2022: fixing file move when g:netrw_keepdir is 1 let fname= b:netrw_curdir."/".fname endif - if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) + if !g:netrw_cygwin && has("win32") let fname= substitute(fname,'/','\\','g') endif " call Decho("system(".movecmd." ".s:ShellEscape(fname)." ".tgt.")",'~'.expand("")) @@ -10349,7 +10316,7 @@ fun! s:NetrwRemoteFtpCmd(path,listcmd) endif " cleanup for Windows " {{{3 - if has("win32") || has("win95") || has("win64") || has("win16") + if has("win32") sil! NetrwKeepj %s/\r$//e NetrwKeepj call histdel("/",-1) endif @@ -10857,7 +10824,7 @@ fun! netrw#FileUrlEdit(fname) let fname= substitute(fname,'^file://localhost/','file:///','') " call Decho("fname<".fname.">",'~'.expand("")) endif - if (has("win32") || has("win95") || has("win64") || has("win16")) + if has("win32") if fname =~ '^file:///\=\a[|:]/' " call Decho('converting file:///\a|/ -to- file://\a:/','~'.expand("")) let fname = substitute(fname,'^file:///\=\(\a\)[|:]/','file://\1:/','') @@ -10867,7 +10834,7 @@ fun! netrw#FileUrlEdit(fname) let fname2396 = netrw#RFC2396(fname) let fname2396e= fnameescape(fname2396) let plainfname= substitute(fname2396,'file://\(.*\)','\1',"") - if (has("win32") || has("win95") || has("win64") || has("win16")) + if has("win32") " call Decho("windows exception for plainfname",'~'.expand("")) if plainfname =~ '^/\+\a:' " call Decho('removing leading "/"s','~'.expand("")) @@ -11079,7 +11046,7 @@ fun! s:LocalFastBrowser() let s:netrw_events= 1 augroup AuNetrwEvent au! - if (has("win32") || has("win95") || has("win64") || has("win16")) + if has("win32") " call Decho("installing autocmd: ShellCmdPost",'~'.expand("")) au ShellCmdPost * call s:LocalBrowseRefresh() else @@ -11121,7 +11088,7 @@ fun! s:LocalListing() let filelist = filelist + s:NetrwGlob(dirname,".*",0) " call Decho("filelist=".string(filelist),'~'.expand("")) - if g:netrw_cygwin == 0 && (has("win32") || has("win95") || has("win64") || has("win16")) + if g:netrw_cygwin == 0 && has("win32") " call Decho("filelist=".string(filelist),'~'.expand("")) elseif index(filelist,'..') == -1 && b:netrw_curdir !~ '/' " include ../ in the glob() entry if its missing @@ -11167,7 +11134,7 @@ fun! s:LocalListing() let pfile= filename."/" elseif exists("b:netrw_curdir") && b:netrw_curdir !~ '^.*://' && !isdirectory(s:NetrwFile(filename)) - if (has("win32") || has("win95") || has("win64") || has("win16")) + if has("win32") if filename =~ '\.[eE][xX][eE]$' || filename =~ '\.[cC][oO][mM]$' || filename =~ '\.[bB][aA][tT]$' " indicate an executable " call Decho("indicate <".filename."> is executable with trailing *",'~'.expand("")) @@ -11501,7 +11468,7 @@ fun! s:NetrwLocalRmFile(path,fname,all) if !all echohl Statement call inputsave() - let ok= input("Confirm deletion of directory<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") + let ok= input("Confirm *recursive* deletion of directory<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") call inputrestore() let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') if ok == "" @@ -11514,7 +11481,7 @@ fun! s:NetrwLocalRmFile(path,fname,all) let rmfile= substitute(rmfile,'[\/]$','','e') if all || ok =~# 'y\%[es]' || ok == "" - if delete(rmfile,"d") + if delete(rmfile,"rf") call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".rmfile.">!",103) endif endif @@ -11644,7 +11611,7 @@ endfun " netrw#WinPath: tries to insure that the path is windows-acceptable, whether cygwin is used or not {{{2 fun! netrw#WinPath(path) " call Dfunc("netrw#WinPath(path<".a:path.">)") - if (!g:netrw_cygwin || &shell !~ '\%(\\|\\)\%(\.exe\)\=$') && (has("win32") || has("win95") || has("win64") || has("win16")) + if (!g:netrw_cygwin || &shell !~ '\%(\\|\\)\%(\.exe\)\=$') && has("win32") " remove cygdrive prefix, if present let path = substitute(a:path,g:netrw_cygdrive.'/\(.\)','\1:','') " remove trailing slash (Win95) @@ -11704,11 +11671,11 @@ fun! s:ComposePath(base,subdir) endif " COMBAK: test on windows with changing to root directory: :e C:/ - elseif a:subdir =~ '^\a:[/\\]\([^/\\]\|$\)' && (has("win32") || has("win95") || has("win64") || has("win16")) + elseif a:subdir =~ '^\a:[/\\]\([^/\\]\|$\)' && has("win32") " call Decho("windows",'~'.expand("")) let ret= a:subdir - elseif a:base =~ '^\a:[/\\]\([^/\\]\|$\)' && (has("win32") || has("win95") || has("win64") || has("win16")) + elseif a:base =~ '^\a:[/\\]\([^/\\]\|$\)' && has("win32") " call Decho("windows",'~'.expand("")) if a:base =~ '[/\\]$' let ret= a:base.a:subdir @@ -11820,7 +11787,7 @@ fun! s:GetTempfile(fname) " o/s dependencies if g:netrw_cygwin != 0 let tmpfile = substitute(tmpfile,'^\(\a\):',g:netrw_cygdrive.'/\1','e') - elseif has("win32") || has("win95") || has("win64") || has("win16") + elseif has("win32") if !exists("+shellslash") || !&ssl let tmpfile = substitute(tmpfile,'/','\','g') endif @@ -12036,7 +12003,7 @@ fun! s:NetrwDelete(path) " call Dfunc("s:NetrwDelete(path<".a:path.">)") let path = netrw#WinPath(a:path) - if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) + if !g:netrw_cygwin && has("win32") if exists("+shellslash") let sskeep= &shellslash setl noshellslash @@ -12227,7 +12194,7 @@ fun! s:NetrwLcd(newdir) " 'root' (ie. '\'). The share name may start with either backslashes ('\\Foo') or " forward slashes ('//Foo'), depending on whether backslashes have been converted to " forward slashes by earlier code; so check for both. - if (has("win32") || has("win95") || has("win64") || has("win16")) && !g:netrw_cygwin + if has("win32") && !g:netrw_cygwin if a:newdir =~ '^\\\\\w\+' || a:newdir =~ '^//\w\+' let dirname = '\' exe 'NetrwKeepj sil lcd '.fnameescape(dirname) @@ -12700,7 +12667,7 @@ endfun " --------------------------------------------------------------------- " s:ShellEscape: shellescape(), or special windows handling {{{2 fun! s:ShellEscape(s, ...) - if (has('win32') || has('win64')) && $SHELL == '' && &shellslash + if has('win32') && $SHELL == '' && &shellslash return printf('"%s"', substitute(a:s, '"', '""', 'g')) endif let f = a:0 > 0 ? a:1 : 0 diff --git a/runtime/autoload/netrwSettings.vim b/runtime/autoload/netrwSettings.vim index 5525c0d..3452602 100644 --- a/runtime/autoload/netrwSettings.vim +++ b/runtime/autoload/netrwSettings.vim @@ -3,6 +3,8 @@ " Maintainer: This runtime file is looking for a new maintainer. " Former Maintainer: Charles E Campbell " Version: 18 +" Last Change: +" 2024 May 08 by Vim Project: cleanup legacy Win9X checks " Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright @@ -91,7 +93,6 @@ fun! netrwSettings#NetrwSettings() put = 'let g:netrw_sshport = '.g:netrw_sshport put = 'let g:netrw_silent = '.g:netrw_silent put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp - put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp let s:netrw_xfer_stop= line(".") put ='' put ='+ Netrw Messages' diff --git a/runtime/autoload/zig/fmt.vim b/runtime/autoload/zig/fmt.vim deleted file mode 100644 index b78c199..0000000 --- a/runtime/autoload/zig/fmt.vim +++ /dev/null @@ -1,100 +0,0 @@ -" Adapted from fatih/vim-go: autoload/go/fmt.vim -" -" Copyright 2011 The Go Authors. All rights reserved. -" Use of this source code is governed by a BSD-style -" license that can be found in the LICENSE file. -" -" Upstream: https://github.com/ziglang/zig.vim - -function! zig#fmt#Format() abort - " Save cursor position and many other things. - let view = winsaveview() - - if !executable('zig') - echohl Error | echomsg "no zig binary found in PATH" | echohl None - return - endif - - let cmdline = 'zig fmt --stdin --ast-check' - let current_buf = bufnr('') - - " The formatted code is output on stdout, the errors go on stderr. - if exists('*systemlist') - silent let out = systemlist(cmdline, current_buf) - else - silent let out = split(system(cmdline, current_buf)) - endif - if len(out) == 1 - if out[0] == "error: unrecognized parameter: '--ast-check'" - let cmdline = 'zig fmt --stdin' - if exists('*systemlist') - silent let out = systemlist(cmdline, current_buf) - else - silent let out = split(system(cmdline, current_buf)) - endif - endif - endif - let err = v:shell_error - - - if err == 0 - " remove undo point caused via BufWritePre. - try | silent undojoin | catch | endtry - - " Replace the file content with the formatted version. - if exists('*deletebufline') - call deletebufline(current_buf, len(out), line('$')) - else - silent execute ':' . len(out) . ',' . line('$') . ' delete _' - endif - call setline(1, out) - - " No errors detected, close the loclist. - call setloclist(0, [], 'r') - lclose - elseif get(g:, 'zig_fmt_parse_errors', 1) - let errors = s:parse_errors(expand('%'), out) - - call setloclist(0, [], 'r', { - \ 'title': 'Errors', - \ 'items': errors, - \ }) - - let max_win_height = get(g:, 'zig_fmt_max_window_height', 5) - " Prevent the loclist from becoming too long. - let win_height = min([max_win_height, len(errors)]) - " Open the loclist, but only if there's at least one error to show. - execute 'silent! lwindow ' . win_height - endif - - call winrestview(view) - - if err != 0 - echohl Error | echomsg "zig fmt returned error" | echohl None - return - endif - - " Run the syntax highlighter on the updated content and recompute the folds if - " needed. - syntax sync fromstart -endfunction - -" parse_errors parses the given errors and returns a list of parsed errors -function! s:parse_errors(filename, lines) abort - " list of errors to be put into location list - let errors = [] - for line in a:lines - let tokens = matchlist(line, '^\(.\{-}\):\(\d\+\):\(\d\+\)\s*\(.*\)') - if !empty(tokens) - call add(errors,{ - \"filename": a:filename, - \"lnum": tokens[2], - \"col": tokens[3], - \"text": tokens[4], - \ }) - endif - endfor - - return errors -endfunction -" vim: sw=2 ts=2 et diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim index c0034f8..d0e706e 100644 --- a/runtime/autoload/zip.vim +++ b/runtime/autoload/zip.vim @@ -4,17 +4,18 @@ " Version: 33 " Maintainer: This runtime file is looking for a new maintainer. " Former Maintainer: Charles E Campbell +" Last Change: +" 2024 Jun 16 by Vim Project: handle whitespace on Windows properly (#14998) " License: Vim License (see vim's :help license) -" Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1 -" Permission is hereby granted to use and distribute this code, -" with or without modifications, provided that this copyright -" notice is copied with it. Like anything else that's free, -" zip.vim and zipPlugin.vim are provided *as is* and comes with -" no warranty of any kind, either expressed or implied. By using -" this plugin, you agree that in no event will the copyright -" holder be liable for any damages resulting from the use -" of this software. -"redraw!|call DechoSep()|call inputsave()|call input("Press to continue")|call inputrestore() +" Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1 +" Permission is hereby granted to use and distribute this code, +" with or without modifications, provided that this copyright +" notice is copied with it. Like anything else that's free, +" zip.vim and zipPlugin.vim are provided *as is* and comes with +" no warranty of any kind, either expressed or implied. By using +" this plugin, you agree that in no event will the copyright +" holder be liable for any damages resulting from the use +" of this software. " --------------------------------------------------------------------- " Load Once: {{{1 @@ -214,7 +215,6 @@ endfun " --------------------------------------------------------------------- " zip#Read: {{{2 fun! zip#Read(fname,mode) -" call Dfunc("zip#Read(fname<".a:fname.">,mode=".a:mode.")") let repkeep= &report set report=10 @@ -226,15 +226,12 @@ fun! zip#Read(fname,mode) let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','') let fname = substitute(fname, '[', '[[]', 'g') endif -" call Decho("zipfile<".zipfile.">") -" call Decho("fname <".fname.">") " sanity check if !executable(substitute(g:zip_unzipcmd,'\s\+.*$','','')) redraw! echohl Error | echo "***error*** (zip#Read) sorry, your system doesn't appear to have the ".g:zip_unzipcmd." program" | echohl None " call inputsave()|call input("Press to continue")|call inputrestore() let &report= repkeep -" call Dret("zip#Write") return endif @@ -242,10 +239,8 @@ fun! zip#Read(fname,mode) " exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1) " but allows zipfile://... entries in quickfix lists let temp = tempname() -" call Decho("using temp file<".temp.">") let fn = expand('%:p') - exe "sil! !".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1).' > '.temp -" call Decho("exe sil! !".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1).' > '.temp) + exe "sil! !".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1).' > '.temp sil exe 'keepalt file '.temp sil keepj e! sil exe 'keepalt file '.fnameescape(fn) @@ -254,11 +249,9 @@ fun! zip#Read(fname,mode) filetype detect " cleanup - " keepj 0d " used to be needed for the ...r! ... method set nomod let &report= repkeep -" call Dret("zip#Read") endfun " --------------------------------------------------------------------- @@ -422,7 +415,6 @@ endfun " --------------------------------------------------------------------- " s:Escape: {{{2 fun! s:Escape(fname,isfilt) -" call Dfunc("QuoteFileDir(fname<".a:fname."> isfilt=".a:isfilt.")") if exists("*shellescape") if a:isfilt let qnameq= shellescape(a:fname,1) @@ -432,7 +424,10 @@ fun! s:Escape(fname,isfilt) else let qnameq= g:zip_shq.escape(a:fname,g:zip_shq).g:zip_shq endif -" call Dret("QuoteFileDir <".qnameq.">") + if exists("+shellslash") && &shellslash && &shell =~ "cmd.exe" + " renormalize directory separator on Windows + let qnameq=substitute(qnameq, '/', '\\', 'g') + endif return qnameq endfun diff --git a/runtime/compiler/hare.vim b/runtime/compiler/hare.vim index c98bbb9..33edb3a 100644 --- a/runtime/compiler/hare.vim +++ b/runtime/compiler/hare.vim @@ -1,28 +1,29 @@ -" Vim compiler file -" Compiler: Hare Compiler -" Maintainer: Amelia Clarke -" Last Change: 2022-09-21 -" 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) +" Vim compiler file. +" Compiler: Hare +" Maintainer: Amelia Clarke +" Last Change: 2024-05-23 +" Upstream: https://git.sr.ht/~sircmpwn/hare.vim -if exists("g:current_compiler") +if exists('current_compiler') finish endif -let g:current_compiler = "hare" +let current_compiler = 'hare' let s:cpo_save = &cpo set cpo&vim -if filereadable("Makefile") || filereadable("makefile") +if filereadable('Makefile') || filereadable('makefile') CompilerSet makeprg=make else CompilerSet makeprg=hare\ build endif CompilerSet errorformat= - \Error\ %f:%l:%c:\ %m, - \Syntax\ error:\ %.%#\ at\ %f:%l:%c\\,\ %m, + \%f:%l:%c:\ syntax\ error:\ %m, + \%f:%l:%c:\ error:\ %m, \%-G%.%# let &cpo = s:cpo_save unlet s:cpo_save -" vim: tabstop=2 shiftwidth=2 expandtab + +" vim: et sts=2 sw=2 ts=8 diff --git a/runtime/compiler/javac.vim b/runtime/compiler/javac.vim index f5fe841..9bd4cdf 100644 --- a/runtime/compiler/javac.vim +++ b/runtime/compiler/javac.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Java Development Kit Compiler " Maintainer: Doug Kearns -" Last Change: 2024 Apr 03 +" Last Change: 2024 Jun 14 if exists("current_compiler") finish @@ -11,7 +11,12 @@ let current_compiler = "javac" let s:cpo_save = &cpo set cpo&vim -CompilerSet makeprg=javac +if exists("g:javac_makeprg_params") + execute $'CompilerSet makeprg=javac\ {escape(g:javac_makeprg_params, ' \|"')}' +else + CompilerSet makeprg=javac +endif + CompilerSet errorformat=%E%f:%l:\ error:\ %m, \%W%f:%l:\ warning:\ %m, \%-Z%p^, diff --git a/runtime/doc/Make_all.mak b/runtime/doc/Make_all.mak index ed41d7d..f36ad7e 100644 --- a/runtime/doc/Make_all.mak +++ b/runtime/doc/Make_all.mak @@ -19,6 +19,7 @@ DOCS = \ fold.txt \ ft_ada.txt \ ft_context.txt \ + ft_hare.txt \ ft_mp.txt \ ft_ps1.txt \ ft_raku.txt \ @@ -172,6 +173,7 @@ HTMLS = \ fold.html \ ft_ada.html \ ft_context.html \ + ft_hare.html \ ft_mp.html \ ft_ps1.html \ ft_raku.html \ diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 32094b3..037f89c 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 9.1. Last change: 2024 Mar 26 +*autocmd.txt* For Vim version 9.1. Last change: 2024 May 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -428,8 +428,8 @@ Name triggered by ~ |SessionLoadPost| after loading a session file -|SessionWritePost| After writing the session file using - the |:mksession| command. +|SessionWritePost| after writing the session file using + the |:mksession| command |MenuPopup| just before showing the popup menu |CompleteChanged| after Insert mode completion menu changed diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 79f3cd7..a824531 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2024 Apr 07 +*builtin.txt* For Vim version 9.1. Last change: 2024 Jun 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -178,6 +178,8 @@ extendnew({expr1}, {expr2} [, {expr3}]) List/Dict like |extend()| but creates a new List or Dictionary feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer +filecopy({from}, {to}) Number |TRUE| if copying file {from} to {to} + worked filereadable({file}) Number |TRUE| if {file} is a readable file filewritable({file}) Number |TRUE| if {file} is a writable file filter({expr1}, {expr2}) List/Dict/Blob/String @@ -265,6 +267,8 @@ getreg([{regname} [, 1 [, {list}]]]) getreginfo([{regname}]) Dict information about a register getregion({pos1}, {pos2} [, {opts}]) List get the text from {pos1} to {pos2} +getregionpos({pos1}, {pos2} [, {opts}]) + List get a list of positions for a region getregtype([{regname}]) String type of a register getscriptinfo([{opts}]) List list of sourced scripts gettabinfo([{expr}]) List list of tab pages @@ -765,6 +769,7 @@ xor({expr}, {expr}) Number bitwise XOR Not all functions are here, some have been moved to a help file covering the specific functionality. +Return type specifies the type for |Vim9-script|, see |vim9-types| abs({expr}) *abs()* Return the absolute value of {expr}. When {expr} evaluates to @@ -781,6 +786,8 @@ abs({expr}) *abs()* Can also be used as a |method|: > Compute()->abs() +< + Return type: |Number| or |Float| depending on {expr} acos({expr}) *acos()* @@ -796,6 +803,8 @@ acos({expr}) *acos()* Can also be used as a |method|: > Compute()->acos() +< + Return type: |Float| add({object}, {expr}) *add()* @@ -811,6 +820,9 @@ add({object}, {expr}) *add()* Can also be used as a |method|: > mylist->add(val1)->add(val2) +< + Return type: list<{type}> (depending on the given |List|) or + |Blob| and({expr}, {expr}) *and()* @@ -821,6 +833,8 @@ and({expr}, {expr}) *and()* :let flag = and(bits, 0x80) < Can also be used as a |method|: > :let flag = bits->and(0x80) +< + Return type: |Number| append({lnum}, {text}) *append()* @@ -842,6 +856,8 @@ append({lnum}, {text}) *append()* < Can also be used as a |method| after a List, the base is passed as the second argument: > mylist->append(lnum) +< + Return type: |Number| appendbufline({buf}, {lnum}, {text}) *appendbufline()* @@ -869,6 +885,8 @@ appendbufline({buf}, {lnum}, {text}) *appendbufline()* Can also be used as a |method| after a List, the base is passed as the second argument: > mylist->appendbufline(buf, lnum) +< + Return type: |Number| argc([{winid}]) *argc()* @@ -881,10 +899,14 @@ argc([{winid}]) *argc()* list is used: either the window number or the window ID. Returns -1 if the {winid} argument is invalid. + Return type: |Number| + *argidx()* argidx() The result is the current index in the argument list. 0 is the first file. argc() - 1 is the last one. See |arglist|. + Return type: |Number| + *arglistid()* arglistid([{winnr} [, {tabnr}]]) Return the argument list ID. This is a number which @@ -898,6 +920,8 @@ arglistid([{winnr} [, {tabnr}]]) page. {winnr} can be the window number or the |window-ID|. + Return type: |Number| + *argv()* argv([{nr} [, {winid}]]) The result is the {nr}th file in the argument list. See @@ -918,6 +942,9 @@ argv([{nr} [, {winid}]]) the argument list. Returns an empty List if the {winid} argument is invalid. + Return type: |String| + + asin({expr}) *asin()* Return the arc sine of {expr} measured in radians, as a |Float| in the range of [-pi/2, pi/2]. @@ -933,12 +960,12 @@ asin({expr}) *asin()* Can also be used as a |method|: > Compute()->asin() - +< + Return type: |Float| assert_ functions are documented here: |assert-functions-details| - atan({expr}) *atan()* Return the principal value of the arc tangent of {expr}, in the range [-pi/2, +pi/2] radians, as a |Float|. @@ -952,6 +979,8 @@ atan({expr}) *atan()* Can also be used as a |method|: > Compute()->atan() +< + Return type: |Float| atan2({expr1}, {expr2}) *atan2()* @@ -968,6 +997,8 @@ atan2({expr1}, {expr2}) *atan2()* Can also be used as a |method|: > Compute()->atan2(1) +< + Return type: |Float| autocmd_add({acmds}) *autocmd_add()* @@ -1015,6 +1046,9 @@ autocmd_add({acmds}) *autocmd_add()* Can also be used as a |method|: > GetAutocmdList()->autocmd_add() < + Return type: |vim9-boolean| + + autocmd_delete({acmds}) *autocmd_delete()* Deletes a List of autocmds and autocmd groups. @@ -1063,6 +1097,9 @@ autocmd_delete({acmds}) *autocmd_delete()* < Can also be used as a |method|: > GetAutocmdList()->autocmd_delete() +< + Return type: |vim9-boolean| + autocmd_get([{opts}]) *autocmd_get()* Returns a |List| of autocmds. If {opts} is not supplied, then @@ -1121,11 +1158,17 @@ autocmd_get([{opts}]) *autocmd_get()* Can also be used as a |method|: > Getopts()->autocmd_get() < + Return type: list> + + balloon_gettext() *balloon_gettext()* Return the current text in the balloon. Only for the string, not used for the List. Returns an empty string if balloon is not present. + Return type: |String| + + balloon_show({expr}) *balloon_show()* Show {expr} inside the balloon. For the GUI {expr} is used as a string. For a terminal {expr} can be a list, which contains @@ -1157,6 +1200,9 @@ balloon_show({expr}) *balloon_show()* {only available when compiled with the |+balloon_eval| or |+balloon_eval_term| feature} + Return type: |Number| + + balloon_split({msg}) *balloon_split()* Split String {msg} into lines to be displayed in a balloon. The splits are made for the current window size and optimize @@ -1169,6 +1215,9 @@ balloon_split({msg}) *balloon_split()* < {only available when compiled with the |+balloon_eval_term| feature} + Return type: list or list + + blob2list({blob}) *blob2list()* Return a List containing the number value of each byte in Blob {blob}. Examples: > @@ -1180,6 +1229,8 @@ blob2list({blob}) *blob2list()* Can also be used as a |method|: > GetBlob()->blob2list() < + Return type: list or list + *browse()* browse({save}, {title}, {initdir}, {default}) Put up a file requester. This only works when "has("browse")" @@ -1192,8 +1243,10 @@ browse({save}, {title}, {initdir}, {default}) An empty string is returned when the "Cancel" button is hit, something went wrong, or browsing is not possible. - *browsedir()* -browsedir({title}, {initdir}) + Return type: |String| + + +browsedir({title}, {initdir}) *browsedir()* Put up a directory requester. This only works when "has("browse")" returns |TRUE| (only in some GUI versions). On systems where a directory browser is not supported a file @@ -1205,6 +1258,9 @@ browsedir({title}, {initdir}) When the "Cancel" button is hit, something went wrong, or browsing is not possible, an empty string is returned. + Return type: |String| + + bufadd({name}) *bufadd()* Add a buffer to the buffer list with name {name} (must be a String). @@ -1220,6 +1276,9 @@ bufadd({name}) *bufadd()* < Returns 0 on error. Can also be used as a |method|: > let bufnr = 'somename'->bufadd() +< + Return type: |Number| + bufexists({buf}) *bufexists()* The result is a Number, which is |TRUE| if a buffer called @@ -1246,8 +1305,11 @@ bufexists({buf}) *bufexists()* Can also be used as a |method|: > let exists = 'somename'->bufexists() < + Return type: |Number| + Obsolete name: buffer_exists(). *buffer_exists()* + buflisted({buf}) *buflisted()* The result is a Number, which is |TRUE| if a buffer called {buf} exists and is listed (has the 'buflisted' option set). @@ -1255,6 +1317,9 @@ buflisted({buf}) *buflisted()* Can also be used as a |method|: > let listed = 'somename'->buflisted() +< + Return type: |Number| + bufload({buf}) *bufload()* Ensure the buffer {buf} is loaded. When the buffer name @@ -1268,6 +1333,9 @@ bufload({buf}) *bufload()* Can also be used as a |method|: > eval 'somename'->bufload() +< + Return type: |Number| + bufloaded({buf}) *bufloaded()* The result is a Number, which is |TRUE| if a buffer called @@ -1276,6 +1344,9 @@ bufloaded({buf}) *bufloaded()* Can also be used as a |method|: > let loaded = 'somename'->bufloaded() +< + Return type: |Number| + bufname([{buf}]) *bufname()* The result is the name of a buffer. Mostly as it is displayed @@ -1309,11 +1380,13 @@ bufname([{buf}]) *bufname()* bufname(3) name of buffer 3 bufname("%") name of current buffer bufname("file2") name of buffer where "file2" matches. -< *buffer_name()* +< + Return type: |String| + *buffer_name()* Obsolete name: buffer_name(). - *bufnr()* -bufnr([{buf} [, {create}]]) + +bufnr([{buf} [, {create}]]) *bufnr()* The result is the number of a buffer, as it is displayed by the `:ls` command. For the use of {buf}, see |bufname()| above. @@ -1335,10 +1408,13 @@ bufnr([{buf} [, {create}]]) Can also be used as a |method|: > echo bufref->bufnr() < + Return type: |Number| + Obsolete name: buffer_number(). *buffer_number()* *last_buffer_nr()* Obsolete name for bufnr("$"): last_buffer_nr(). + bufwinid({buf}) *bufwinid()* The result is a Number, which is the |window-ID| of the first window associated with buffer {buf}. For the use of {buf}, @@ -1352,6 +1428,9 @@ bufwinid({buf}) *bufwinid()* Can also be used as a |method|: > FindBuffer()->bufwinid() +< + Return type: |Number| + bufwinnr({buf}) *bufwinnr()* Like |bufwinid()| but return the window number instead of the @@ -1366,6 +1445,9 @@ bufwinnr({buf}) *bufwinnr()* Can also be used as a |method|: > FindBuffer()->bufwinnr() +< + Return type: |Number| + byte2line({byte}) *byte2line()* Return the line number that contains the character at byte @@ -1379,10 +1461,13 @@ byte2line({byte}) *byte2line()* Can also be used as a |method|: > GetOffset()->byte2line() +< + Return type: |Number| -< {not available when compiled without the |+byte_offset| + {not available when compiled without the |+byte_offset| feature} + byteidx({expr}, {nr} [, {utf16}]) *byteidx()* Return byte index of the {nr}'th character in the String {expr}. Use zero for the first character, it then returns @@ -1420,6 +1505,9 @@ byteidx({expr}, {nr} [, {utf16}]) *byteidx()* < Can also be used as a |method|: > GetName()->byteidx(idx) +< + Return type: |Number| + byteidxcomp({expr}, {nr} [, {utf16}]) *byteidxcomp()* Like byteidx(), except that a composing character is counted @@ -1436,6 +1524,9 @@ byteidxcomp({expr}, {nr} [, {utf16}]) *byteidxcomp()* Can also be used as a |method|: > GetName()->byteidxcomp(idx) +< + Return type: |Number| + call({func}, {arglist} [, {dict}]) *call()* *E699* Call function {func} with the items in |List| {arglist} as @@ -1448,6 +1539,9 @@ call({func}, {arglist} [, {dict}]) *call()* *E699* Can also be used as a |method|: > GetFunc()->call([arg, arg], dict) +< + Return type: any, depending on {func} + ceil({expr}) *ceil()* Return the smallest integral value greater than or equal to @@ -1465,6 +1559,8 @@ ceil({expr}) *ceil()* Can also be used as a |method|: > Compute()->ceil() +< + Return type: |Float| ch_ functions are documented here: |channel-functions-details| @@ -1479,6 +1575,9 @@ changenr() *changenr()* one less than the number of the undone change. Returns 0 if the undo list is empty. + Return type: |Number| + + char2nr({string} [, {utf8}]) *char2nr()* Return Number value of the first char in {string}. Examples: > @@ -1500,6 +1599,9 @@ char2nr({string} [, {utf8}]) *char2nr()* Can also be used as a |method|: > GetChar()->char2nr() +< + Return type: |Number| + charclass({string}) *charclass()* Return the character class of the first character in {string}. @@ -1512,6 +1614,8 @@ charclass({string}) *charclass()* The class is used in patterns and word motions. Returns 0 if {string} is not a |String|. + Return type: |Number| + charcol({expr} [, {winid}]) *charcol()* Same as |col()| but returns the character index of the column @@ -1525,6 +1629,8 @@ charcol({expr} [, {winid}]) *charcol()* < Can also be used as a |method|: > GetPos()->col() < + Return type: |Number| + *charidx()* charidx({string}, {idx} [, {countcc} [, {utf16}]]) Return the character index of the byte at {idx} in {string}. @@ -1561,6 +1667,9 @@ charidx({string}, {idx} [, {countcc} [, {utf16}]]) < Can also be used as a |method|: > GetName()->charidx(idx) +< + Return type: |Number| + chdir({dir}) *chdir()* Change the current working directory to {dir}. The scope of @@ -1587,6 +1696,9 @@ chdir({dir}) *chdir()* < Can also be used as a |method|: > GetDir()->chdir() < + Return type: |String| + + cindent({lnum}) *cindent()* Get the amount of indent for line {lnum} according the C indenting rules, as with 'cindent'. @@ -1597,6 +1709,9 @@ cindent({lnum}) *cindent()* Can also be used as a |method|: > GetLnum()->cindent() +< + Return type: |Number| + clearmatches([{win}]) *clearmatches()* Clears all matches previously defined for the current window @@ -1607,35 +1722,37 @@ clearmatches([{win}]) *clearmatches()* Can also be used as a |method|: > GetWin()->clearmatches() < + Return type: |Number| + + col({expr} [, {winid}]) *col()* The result is a Number, which is the byte index of the column - position given with {expr}. The accepted positions are: - . the cursor position - $ the end of the cursor line (the result is the - number of bytes in the cursor line plus one) - 'x position of mark x (if the mark is not set, 0 is - returned) - v In Visual mode: the start of the Visual area (the - cursor is the end). When not in Visual mode - returns the cursor position. Differs from |'<| in - that it's updated right away. + position given with {expr}. + For accepted positions see |getpos()|. + When {expr} is "$", it means the end of the cursor line, so + the result is the number of bytes in the cursor line plus one. Additionally {expr} can be [lnum, col]: a |List| with the line and column number. Most useful when the column is "$", to get the last column of a specific line. When "lnum" or "col" is out of range then col() returns zero. + With the optional {winid} argument the values are obtained for that window instead of the current window. + To get the line number use |line()|. To get both use |getpos()|. For the screen column position use |virtcol()|. For the character position use |charcol()|. + Note that only marks in the current file can be used. + Examples: > col(".") column of cursor col("$") length of cursor line plus one col("'t") column of mark t col("'" .. markname) column of mark markname -< The first column is 1. Returns 0 if {expr} is invalid or when +< + The first column is 1. Returns 0 if {expr} is invalid or when the window with ID {winid} is not found. For an uppercase mark the column may actually be in another buffer. @@ -1648,6 +1765,8 @@ col({expr} [, {winid}]) *col()* < Can also be used as a |method|: > GetPos()->col() < + Return type: |Number| + complete({startcol}, {matches}) *complete()* *E785* Set the matches for Insert mode completion. @@ -1682,6 +1801,9 @@ complete({startcol}, {matches}) *complete()* *E785* Can also be used as a |method|, the base is passed as the second argument: > GetMatches()->complete(col('.')) +< + Return type: |Number| + complete_add({expr}) *complete_add()* Add {expr} to the list of matches. Only to be used by the @@ -1694,6 +1816,9 @@ complete_add({expr}) *complete_add()* Can also be used as a |method|: > GetMoreMatches()->complete_add() +< + Return type: |Number| + complete_check() *complete_check()* Check for a key typed while looking for completion matches. @@ -1703,6 +1828,8 @@ complete_check() *complete_check()* Only to be used by the function specified with the 'completefunc' option. + Return type: |Number| + complete_info([{what}]) *complete_info()* Returns a |Dictionary| with information about Insert mode @@ -1765,6 +1892,8 @@ complete_info([{what}]) *complete_info()* < Can also be used as a |method|: > GetItems()->complete_info() < + Return type: dict + *confirm()* confirm({msg} [, {choices} [, {default} [, {type}]]]) confirm() offers the user a dialog, from which a choice can be @@ -1824,8 +1953,11 @@ confirm({msg} [, {choices} [, {default} [, {type}]]]) Can also be used as a |method|in: > BuildMessage()->confirm("&Yes\n&No") < - *copy()* -copy({expr}) Make a copy of {expr}. For Numbers and Strings this isn't + Return type: |Number| + + +copy({expr}) *copy()* + Make a copy of {expr}. For Numbers and Strings this isn't different from using {expr} directly. When {expr} is a |List| a shallow copy is created. This means that the original |List| can be changed without changing the @@ -1835,6 +1967,9 @@ copy({expr}) Make a copy of {expr}. For Numbers and Strings this isn't Also see |deepcopy()|. Can also be used as a |method|: > mylist->copy() +< + Return type: any, depending on {expr} + cos({expr}) *cos()* Return the cosine of {expr}, measured in radians, as a |Float|. @@ -1848,6 +1983,8 @@ cos({expr}) *cos()* Can also be used as a |method|: > Compute()->cos() +< + Return type: |Float| cosh({expr}) *cosh()* @@ -1863,6 +2000,8 @@ cosh({expr}) *cosh()* Can also be used as a |method|: > Compute()->cosh() +< + Return type: |Float| count({comp}, {expr} [, {ic} [, {start}]]) *count()* *E706* @@ -1881,6 +2020,8 @@ count({comp}, {expr} [, {ic} [, {start}]]) *count()* *E706* Can also be used as a |method|: > mylist->count(val) < + Return type: |Number| + *cscope_connection()* cscope_connection([{num} , {dbpath} [, {prepend}]]) Checks for the existence of a |cscope| connection. If no @@ -1922,6 +2063,9 @@ cscope_connection([{num} , {dbpath} [, {prepend}]]) cscope_connection(4, "out", "local") 0 cscope_connection(4, "cscope.out", "/usr/local") 1 < + Return type: |Number| + + cursor({lnum}, {col} [, {off}]) *cursor()* cursor({list}) Positions the cursor at the column (byte count) {col} in the @@ -1957,6 +2101,9 @@ cursor({list}) Can also be used as a |method|: > GetCursorPos()->cursor() +< + Return type: |Number| + debugbreak({pid}) *debugbreak()* Specifically used to interrupt a program being debugged. It @@ -1969,6 +2116,9 @@ debugbreak({pid}) *debugbreak()* Can also be used as a |method|: > GetPid()->debugbreak() +< + Return type: |Number| + deepcopy({expr} [, {noref}]) *deepcopy()* *E698* Make a copy of {expr}. For Numbers and Strings this isn't @@ -1994,6 +2144,9 @@ deepcopy({expr} [, {noref}]) *deepcopy()* *E698* Can also be used as a |method|: > GetObject()->deepcopy() +< + Return type: any, depending on {expr} + delete({fname} [, {flags}]) *delete()* Without {flags} or with {flags} empty: Deletes the file by the @@ -2020,6 +2173,9 @@ delete({fname} [, {flags}]) *delete()* Can also be used as a |method|: > GetName()->delete() +< + Return type: |Number| + deletebufline({buf}, {first} [, {last}]) *deletebufline()* Delete lines {first} to {last} (inclusive) from buffer {buf}. @@ -2038,6 +2194,8 @@ deletebufline({buf}, {first} [, {last}]) *deletebufline()* Can also be used as a |method|: > GetBuffer()->deletebufline(1) < + Return type: |Number| + *did_filetype()* did_filetype() Returns |TRUE| when autocommands are being executed and the FileType event has been triggered at least once. Can be used @@ -2050,6 +2208,9 @@ did_filetype() Returns |TRUE| when autocommands are being executed and the editing another buffer to set 'filetype' and load a syntax file. + Return type: |Number| + + diff({fromlist}, {tolist} [, {options}]) *diff()* Returns a String or a List containing the diff between the strings in {fromlist} and {tolist}. Uses the Vim internal @@ -2116,6 +2277,10 @@ diff({fromlist}, {tolist} [, {options}]) *diff()* Can also be used as a |method|: > GetFromList->diff(to_list) < + Return type: |String| or list> or list + depending on {options} + + diff_filler({lnum}) *diff_filler()* Returns the number of filler lines above line {lnum}. These are the lines that were inserted at this point in @@ -2127,6 +2292,9 @@ diff_filler({lnum}) *diff_filler()* Can also be used as a |method|: > GetLnum()->diff_filler() +< + Return type: |Number| + diff_hlID({lnum}, {col}) *diff_hlID()* Returns the highlight ID for diff mode at line {lnum} column @@ -2142,6 +2310,8 @@ diff_hlID({lnum}, {col}) *diff_hlID()* Can also be used as a |method|: > GetLnum()->diff_hlID(col) < + Return type: |Number| + digraph_get({chars}) *digraph_get()* *E1214* Return the digraph of {chars}. This should be a string with @@ -2166,6 +2336,8 @@ digraph_get({chars}) *digraph_get()* *E1214* Can also be used as a |method|: > GetChars()->digraph_get() < + Return type: |String| + This function works only when compiled with the |+digraphs| feature. If this feature is disabled, this function will display an error message. @@ -2192,6 +2364,8 @@ digraph_getlist([{listall}]) *digraph_getlist()* Can also be used as a |method|: > GetNumber()->digraph_getlist() < + Return type: list> + This function works only when compiled with the |+digraphs| feature. If this feature is disabled, this function will display an error message. @@ -2205,7 +2379,7 @@ digraph_set({chars}, {digraph}) *digraph_set()* function is similar to |:digraphs| command, but useful to add digraphs start with a white space. - The function result is v:true if |digraph| is registered. If + The function returns v:true if |digraph| is registered. If this fails an error message is given and v:false is returned. If you want to define multiple digraphs at once, you can use @@ -2217,6 +2391,8 @@ digraph_set({chars}, {digraph}) *digraph_set()* Can be used as a |method|: > GetString()->digraph_set('あ') < + Return type: |vim9-boolean| + This function works only when compiled with the |+digraphs| feature. If this feature is disabled, this function will display an error message. @@ -2240,6 +2416,8 @@ digraph_setlist({digraphlist}) *digraph_setlist()* Can be used as a |method|: > GetList()->digraph_setlist() < + Return type: |vim9-boolean| + This function works only when compiled with the |+digraphs| feature. If this feature is disabled, this function will display an error message. @@ -2254,6 +2432,8 @@ echoraw({string}) *echoraw()* call echoraw(&t_TI) < Use with care, you can mess up the terminal this way. + Return type: |Number| + empty({expr}) *empty()* Return the Number 1 if {expr} is empty, zero otherwise. @@ -2273,6 +2453,9 @@ empty({expr}) *empty()* Can also be used as a |method|: > mylist->empty() +< + Return type: |Number| + environ() *environ()* Return all of environment variables as dictionary. You can @@ -2281,6 +2464,8 @@ environ() *environ()* < Note that the variable name may be CamelCase; to ignore case use this: > :echo index(keys(environ()), 'HOME', 0, 1) != -1 +< + Return type: dict err_teapot([{expr}]) *err_teapot()* @@ -2290,6 +2475,8 @@ err_teapot([{expr}]) *err_teapot()* indicating that coffee is temporarily not available. If {expr} is present it must be a String. + Return type: |Number| + escape({string}, {chars}) *escape()* Escape the characters in {chars} that occur in {string} with a @@ -2302,6 +2489,8 @@ escape({string}, {chars}) *escape()* Can also be used as a |method|: > GetText()->escape(' \') < + Return type: |String| + *eval()* eval({string}) Evaluate {string} and return the result. Especially useful to turn the result of |string()| back into the original value. @@ -2312,6 +2501,9 @@ eval({string}) Evaluate {string} and return the result. Especially useful to Can also be used as a |method|: > argv->join()->eval() +< + Return type: any, depending on {string} + eventhandler() *eventhandler()* Returns 1 when inside an event handler. That is that Vim got @@ -2319,6 +2511,9 @@ eventhandler() *eventhandler()* e.g., when dropping a file on Vim. This means interactive commands cannot be used. Otherwise zero is returned. + Return type: |Number| + + executable({expr}) *executable()* This function checks if an executable with the name {expr} exists. {expr} must be the name of the program without any @@ -2347,6 +2542,9 @@ executable({expr}) *executable()* Can also be used as a |method|: > GetCommand()->executable() +< + Return type: |Number| + execute({command} [, {silent}]) *execute()* Execute an Ex command or commands and return the output as a @@ -2380,6 +2578,9 @@ execute({command} [, {silent}]) *execute()* Can also be used as a |method|: > GetCommand()->execute() +< + Return type: |Number| + exepath({expr}) *exepath()* If {expr} is an executable and is either an absolute path, a @@ -2393,8 +2594,11 @@ exepath({expr}) *exepath()* Can also be used as a |method|: > GetCommand()->exepath() < - *exists()* -exists({expr}) The result is a Number, which is |TRUE| if {expr} is defined, + Return type: |String| + + +exists({expr}) *exists()* + The result is a Number, which is |TRUE| if {expr} is defined, zero otherwise. Note: In a compiled |:def| function the evaluation is done at @@ -2498,6 +2702,8 @@ exists({expr}) The result is a Number, which is |TRUE| if {expr} is defined, Can also be used as a |method|: > Varname()->exists() < + Return type: |String| + exists_compiled({expr}) *exists_compiled()* Like `exists()` but evaluated at compile time. This is useful @@ -2513,6 +2719,8 @@ exists_compiled({expr}) *exists_compiled()* Can only be used in a |:def| function. *E1233* This does not work to check for arguments or local variables. + Return type: |String| + exp({expr}) *exp()* Return the exponential of {expr} as a |Float| in the range @@ -2527,6 +2735,8 @@ exp({expr}) *exp()* Can also be used as a |method|: > Compute()->exp() +< + Return type: |Float| expand({string} [, {nosuf} [, {list}]]) *expand()* @@ -2544,7 +2754,7 @@ expand({string} [, {nosuf} [, {list}]]) *expand()* not start with '%', '#' or '<', see below. For a |:terminal| window '%' expands to a '!' followed by - the command or shell that is run |terminal-bufname| + the command or shell that is run. |terminal-bufname| When {string} starts with '%', '#' or '<', the expansion is done like for the |cmdline-special| variables with their @@ -2627,6 +2837,9 @@ expand({string} [, {nosuf} [, {list}]]) *expand()* Can also be used as a |method|: > Getpattern()->expand() +< + Return type: |String| or list depending on {list} + expandcmd({string} [, {options}]) *expandcmd()* Expand special items in String {string} like what is done for @@ -2652,6 +2865,8 @@ expandcmd({string} [, {options}]) *expandcmd()* Can also be used as a |method|: > GetCommand()->expandcmd() < + Return type: |String| or list depending on {list} + extend({expr1}, {expr2} [, {expr3}]) *extend()* {expr1} and {expr2} must be both |Lists| or both |Dictionaries|. @@ -2690,6 +2905,9 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()* Can also be used as a |method|: > mylist->extend(otherlist) +< + Return type: list<{type}> or dict<{type}> depending on {expr1} + and {expr2}, in case of error: |Number| extendnew({expr1}, {expr2} [, {expr3}]) *extendnew()* @@ -2697,6 +2915,9 @@ extendnew({expr1}, {expr2} [, {expr3}]) *extendnew()* List or Dictionary is created and returned. {expr1} remains unchanged. + Return type: list<{type}> or dict<{type}> depending on {expr1} + and {expr2}, in case of error: |Number| + feedkeys({string} [, {mode}]) *feedkeys()* Characters in {string} are queued for processing as if they @@ -2754,6 +2975,24 @@ feedkeys({string} [, {mode}]) *feedkeys()* Can also be used as a |method|: > GetInput()->feedkeys() +< + Return type: |String| or list depending on {list} + + +filecopy({from}, {to}) *filecopy()* + Copy the file pointed to by the name {from} to {to}. The + result is a Number, which is |TRUE| if the file was copied + successfully, and |FALSE| when it failed. + If a file with name {to} already exists, it will fail. + Note that it does not handle directories (yet). + + This function is not available in the |sandbox|. + + Can also be used as a |method|: > + GetOldName()->filecopy(newname) +< + Return type: |Number| + filereadable({file}) *filereadable()* The result is a Number, which is |TRUE| when a file with the @@ -2770,7 +3009,10 @@ filereadable({file}) *filereadable()* < Can also be used as a |method|: > GetName()->filereadable() -< *file_readable()* +< + Return type: |Number| + + *file_readable()* Obsolete name: file_readable(). @@ -2782,6 +3024,8 @@ filewritable({file}) *filewritable()* Can also be used as a |method|: > GetName()->filewritable() +< + Return type: |Number| filter({expr1}, {expr2}) *filter()* @@ -2844,6 +3088,10 @@ filter({expr1}, {expr2}) *filter()* Can also be used as a |method|: > mylist->filter(expr2) +< + Return type: |String|, |Blob|, list<{type}> or dict<{type}> + depending on {expr1} + finddir({name} [, {path} [, {count}]]) *finddir()* Find directory {name} in {path}. Supports both downwards and @@ -2865,6 +3113,9 @@ finddir({name} [, {path} [, {count}]]) *finddir()* Can also be used as a |method|: > GetName()->finddir() +< + Return type: |String| + findfile({name} [, {path} [, {count}]]) *findfile()* Just like |finddir()|, but find a file instead of a directory. @@ -2876,6 +3127,9 @@ findfile({name} [, {path} [, {count}]]) *findfile()* Can also be used as a |method|: > GetName()->findfile() +< + Return type: |String| + flatten({list} [, {maxdepth}]) *flatten()* Flatten {list} up to {maxdepth} levels. Without {maxdepth} @@ -2901,9 +3155,14 @@ flatten({list} [, {maxdepth}]) *flatten()* Can also be used as a |method|: > mylist->flatten() < + Return type: list<{type}> + + flattennew({list} [, {maxdepth}]) *flattennew()* Like |flatten()| but first make a copy of {list}. + Return type: list<{type}> + float2nr({expr}) *float2nr()* Convert {expr} to a Number by omitting the part after the @@ -2929,6 +3188,8 @@ float2nr({expr}) *float2nr()* Can also be used as a |method|: > Compute()->float2nr() +< + Return type: |Number| floor({expr}) *floor()* @@ -2946,6 +3207,8 @@ floor({expr}) *floor()* Can also be used as a |method|: > Compute()->floor() +< + Return type: |Float| fmod({expr1}, {expr2}) *fmod()* @@ -2966,6 +3229,8 @@ fmod({expr1}, {expr2}) *fmod()* Can also be used as a |method|: > Compute()->fmod(1.22) +< + Return type: |Float| fnameescape({string}) *fnameescape()* @@ -2986,6 +3251,9 @@ fnameescape({string}) *fnameescape()* < Can also be used as a |method|: > GetName()->fnameescape() +< + Return type: |String| + fnamemodify({fname}, {mods}) *fnamemodify()* Modify file name {fname} according to {mods}. {mods} is a @@ -3006,6 +3274,9 @@ fnamemodify({fname}, {mods}) *fnamemodify()* Can also be used as a |method|: > GetName()->fnamemodify(':p:h') +< + Return type: |String| + foldclosed({lnum}) *foldclosed()* The result is a Number. If the line {lnum} is in a closed @@ -3016,6 +3287,9 @@ foldclosed({lnum}) *foldclosed()* Can also be used as a |method|: > GetLnum()->foldclosed() +< + Return type: |Number| + foldclosedend({lnum}) *foldclosedend()* The result is a Number. If the line {lnum} is in a closed @@ -3026,6 +3300,9 @@ foldclosedend({lnum}) *foldclosedend()* Can also be used as a |method|: > GetLnum()->foldclosedend() +< + Return type: |Number| + foldlevel({lnum}) *foldlevel()* The result is a Number, which is the foldlevel of line {lnum} @@ -3042,6 +3319,8 @@ foldlevel({lnum}) *foldlevel()* Can also be used as a |method|: > GetLnum()->foldlevel() < + Return type: |Number| + *foldtext()* foldtext() Returns a String, to be displayed for a closed fold. This is the default function used for the 'foldtext' option and should @@ -3058,8 +3337,11 @@ foldtext() Returns a String, to be displayed for a closed fold. This is will be filled with the fold char from the 'fillchars' setting. Returns an empty string when there is no fold. + + Return type: |String| {not available when compiled without the |+folding| feature} + foldtextresult({lnum}) *foldtextresult()* Returns the text that is displayed for the closed fold at line {lnum}. Evaluates 'foldtext' in the appropriate context. @@ -3073,6 +3355,9 @@ foldtextresult({lnum}) *foldtextresult()* Can also be used as a |method|: > GetLnum()->foldtextresult() +< + Return type: |String| + foreach({expr1}, {expr2}) *foreach()* {expr1} must be a |List|, |String|, |Blob| or |Dictionary|. @@ -3113,12 +3398,17 @@ foreach({expr1}, {expr2}) *foreach()* Can also be used as a |method|: > mylist->foreach(expr2) < + Return type: |String|, |Blob| list<{type}> or dict<{type}> + depending on {expr1} + *foreground()* foreground() Move the Vim window to the foreground. Useful when sent from a client to a Vim server. |remote_send()| On Win32 systems this might not work, the OS does not always allow a window to bring itself to the foreground. Use |remote_foreground()| instead. + + Return type: |Number| {only in the Win32, Motif and GTK GUI versions and the Win32 console version} @@ -3143,8 +3433,10 @@ fullcommand({name} [, {vim9}]) *fullcommand()* Can also be used as a |method|: > GetName()->fullcommand() < - *funcref()* -funcref({name} [, {arglist}] [, {dict}]) + Return type: |String| + + +funcref({name} [, {arglist}] [, {dict}]) *funcref()* Just like |function()|, but the returned Funcref will lookup the function by reference, not by name. This matters when the function {name} is redefined later. @@ -3159,6 +3451,8 @@ funcref({name} [, {arglist}] [, {dict}]) Can also be used as a |method|: > GetFuncname()->funcref([arg]) < + Return type: func(...): any or |Number| on error + *function()* *partial* *E700* *E923* function({name} [, {arglist}] [, {dict}]) Return a |Funcref| variable that refers to function {name}. @@ -3241,6 +3535,9 @@ function({name} [, {arglist}] [, {dict}]) Can also be used as a |method|: > GetFuncname()->function([arg]) +< + Return type: func(...): any or |Number| on error + garbagecollect([{atexit}]) *garbagecollect()* Cleanup unused |Lists|, |Dictionaries|, |Channels| and |Jobs| @@ -3263,18 +3560,27 @@ garbagecollect([{atexit}]) *garbagecollect()* type a character. To force garbage collection immediately use |test_garbagecollect_now()|. + Return type: |String| + + get({list}, {idx} [, {default}]) *get()* Get item {idx} from |List| {list}. When this item is not available return {default}. Return zero when {default} is omitted. Preferably used as a |method|: > mylist->get(idx) +< + Return type: any, depending on {list} + get({blob}, {idx} [, {default}]) Get byte {idx} from |Blob| {blob}. When this byte is not available return {default}. Return -1 when {default} is omitted. Preferably used as a |method|: > myblob->get(idx) +< + Return type: |Number| + get({dict}, {key} [, {default}]) Get item with key {key} from |Dictionary| {dict}. When this item is not available return {default}. Return zero when @@ -3284,6 +3590,9 @@ get({dict}, {key} [, {default}]) 'default' when it does not exist. Preferably used as a |method|: > mydict->get(key) +< + Return type: any, depending on {dict} + get({func}, {what}) Get item {what} from Funcref {func}. Possible values for {what} are: @@ -3295,6 +3604,8 @@ get({func}, {what}) Preferably used as a |method|: > myfunc->get(what) < + Return type: any, depending on {func} + *getbufinfo()* getbufinfo([{buf}]) getbufinfo([{dict}]) @@ -3370,6 +3681,8 @@ getbufinfo([{dict}]) Can also be used as a |method|: > GetBufnr()->getbufinfo() < + Return type: list> + *getbufline()* getbufline({buf}, {lnum} [, {end}]) @@ -3400,11 +3713,16 @@ getbufline({buf}, {lnum} [, {end}]) < Can also be used as a |method|: > GetBufnr()->getbufline(lnum) < + Return type: list + *getbufoneline()* getbufoneline({buf}, {lnum}) Just like `getbufline()` but only get one line and return it as a string. + Return type: |String| + + getbufvar({buf}, {varname} [, {def}]) *getbufvar()* The result is the value of option or local buffer variable {varname} in buffer {buf}. Note that the name without "b:" @@ -3429,12 +3747,17 @@ getbufvar({buf}, {varname} [, {def}]) *getbufvar()* < Can also be used as a |method|: > GetBufnr()->getbufvar(varname) < + Return type: any, depending on {varname} + + getcellwidths() *getcellwidths()* Returns a |List| of cell widths of character ranges overridden by |setcellwidths()|. The format is equal to the argument of |setcellwidths()|. If no character ranges have their cell widths overridden, an empty List is returned. + Return type: list + getchangelist([{buf}]) *getchangelist()* Returns the |changelist| for the buffer {buf}. For the use @@ -3454,6 +3777,9 @@ getchangelist([{buf}]) *getchangelist()* Can also be used as a |method|: > GetBufnr()->getchangelist() +< + Return type: list + getchar([{expr}]) *getchar()* Get a single character from the user or input stream. @@ -3534,6 +3860,9 @@ getchar([{expr}]) *getchar()* : endwhile : return c :endfunction +< + Return type: |Number| or |String| + getcharmod() *getcharmod()* The result is a Number which is the state of the modifiers for @@ -3551,8 +3880,10 @@ getcharmod() *getcharmod()* character itself are obtained. Thus Shift-a results in "A" without a modifier. Returns 0 if no modifiers are used. - *getcharpos()* -getcharpos({expr}) + Return type: |Number| + + +getcharpos({expr}) *getcharpos()* Get the position for String {expr}. Same as |getpos()| but the column number in the returned List is a character index instead of a byte index. @@ -3567,6 +3898,9 @@ getcharpos({expr}) < Can also be used as a |method|: > GetMark()->getcharpos() +< + Return type: list + getcharsearch() *getcharsearch()* Return the current character search information as a {dict} @@ -3588,6 +3922,8 @@ getcharsearch() *getcharsearch()* :nnoremap , getcharsearch().forward ? ',' : ';' < Also see |setcharsearch()|. + Return type: dict + getcharstr([{expr}]) *getcharstr()* Get a single character from the user or input stream as a @@ -3601,6 +3937,9 @@ getcharstr([{expr}]) *getcharstr()* Otherwise this works like |getchar()|, except that a number result is converted to a string. + Return type: |String| + + getcmdcompltype() *getcmdcompltype()* Return the type of the current command-line completion. Only works when the command line is being edited, thus @@ -3610,6 +3949,9 @@ getcmdcompltype() *getcmdcompltype()* |setcmdline()|. Returns an empty string when completion is not defined. + Return type: |String| + + getcmdline() *getcmdline()* Return the current command-line. Only works when the command line is being edited, thus requires use of |c_CTRL-\_e| or @@ -3621,6 +3963,9 @@ getcmdline() *getcmdline()* Returns an empty string when entering a password or using |inputsecret()|. + Return type: |String| + + getcmdpos() *getcmdpos()* Return the position of the cursor in the command line as a byte count. The first column is 1. @@ -3630,6 +3975,9 @@ getcmdpos() *getcmdpos()* Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()| and |setcmdline()|. + Return type: |Number| + + getcmdscreenpos() *getcmdscreenpos()* Return the screen position of the cursor in the command line as a byte count. The first column is 1. @@ -3640,6 +3988,9 @@ getcmdscreenpos() *getcmdscreenpos()* Also see |getcmdpos()|, |setcmdpos()|, |getcmdline()| and |setcmdline()|. + Return type: |Number| + + getcmdtype() *getcmdtype()* Return the current command-line type. Possible return values are: @@ -3655,11 +4006,17 @@ getcmdtype() *getcmdtype()* Returns an empty string otherwise. Also see |getcmdpos()|, |setcmdpos()| and |getcmdline()|. + Return type: |String| + + getcmdwintype() *getcmdwintype()* Return the current |command-line-window| type. Possible return values are the same as |getcmdtype()|. Returns an empty string when not in the command-line window. + Return type: |String| + + getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* Return a list of command-line completion matches. The String {type} argument specifies what for. The following completion @@ -3734,6 +4091,8 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* Can also be used as a |method|: > GetPattern()->getcompletion('color') < + Return type: list + *getcurpos()* getcurpos([{winid}]) Get the position of the cursor. This is like getpos('.'), but @@ -3763,8 +4122,10 @@ getcurpos([{winid}]) Can also be used as a |method|: > GetWinid()->getcurpos() < - *getcursorcharpos()* -getcursorcharpos([{winid}]) + Return type: list + + +getcursorcharpos([{winid}]) *getcursorcharpos()* Same as |getcurpos()| but the column number in the returned List is a character index instead of a byte index. @@ -3775,9 +4136,11 @@ getcursorcharpos([{winid}]) < Can also be used as a |method|: > GetWinid()->getcursorcharpos() +< + Return type: list -< *getcwd()* -getcwd([{winnr} [, {tabnr}]]) + +getcwd([{winnr} [, {tabnr}]]) *getcwd()* The result is a String, which is the name of the current working directory. 'autochdir' is ignored. @@ -3812,6 +4175,8 @@ getcwd([{winnr} [, {tabnr}]]) < Can also be used as a |method|: > GetWinnr()->getcwd() +< + Return type: |String| getenv({name}) *getenv()* Return the value of environment variable {name}. The {name} @@ -3825,6 +4190,9 @@ getenv({name}) *getenv()* Can also be used as a |method|: > GetVarname()->getenv() +< + Return type: |String| or |Number| + getfontname([{name}]) *getfontname()* Without an argument returns the name of the normal font being @@ -3840,6 +4208,9 @@ getfontname([{name}]) *getfontname()* Note that the GTK GUI accepts any font name, thus checking for a valid name does not work. + Return type: |String| + + getfperm({fname}) *getfperm()* The result is a String, which is the read, write, and execute permissions of the given file {fname}. @@ -3858,8 +4229,11 @@ getfperm({fname}) *getfperm()* Can also be used as a |method|: > GetFilename()->getfperm() < + Return type: |String| + For setting permissions use |setfperm()|. + getfsize({fname}) *getfsize()* The result is a Number, which is the size in bytes of the given file {fname}. @@ -3870,6 +4244,9 @@ getfsize({fname}) *getfsize()* Can also be used as a |method|: > GetFilename()->getfsize() +< + Return type: |Number| + getftime({fname}) *getftime()* The result is a Number, which is the last modification time of @@ -3880,6 +4257,9 @@ getftime({fname}) *getftime()* Can also be used as a |method|: > GetFilename()->getftime() +< + Return type: |Number| + getftype({fname}) *getftype()* The result is a String, which is a description of the kind of @@ -3904,12 +4284,17 @@ getftype({fname}) *getftype()* Can also be used as a |method|: > GetFilename()->getftype() +< + Return type: |String| getimstatus() *getimstatus()* The result is a Number, which is |TRUE| when the IME status is active and |FALSE| otherwise. See 'imstatusfunc'. + Return type: |Number| + + getjumplist([{winnr} [, {tabnr}]]) *getjumplist()* Returns the |jumplist| for the specified window. @@ -3932,8 +4317,10 @@ getjumplist([{winnr} [, {tabnr}]]) *getjumplist()* Can also be used as a |method|: > GetWinnr()->getjumplist() +< + Return type: list -< *getline()* + *getline()* getline({lnum} [, {end}]) Without {end} the result is a String, which is line {lnum} from the current buffer. Example: > @@ -3958,8 +4345,10 @@ getline({lnum} [, {end}]) < Can also be used as a |method|: > ComputeLnum()->getline() +< + Return type: list or |String| depending on {end} -< To get lines from another buffer see |getbufline()| and + To get lines from another buffer see |getbufline()| and |getbufoneline()| getloclist({nr} [, {what}]) *getloclist()* @@ -3992,6 +4381,8 @@ getloclist({nr} [, {what}]) *getloclist()* Examples (See also |getqflist-examples|): > :echo getloclist(3, {'all': 0}) :echo getloclist(5, {'filewinid': 0}) +< + Return type: list> or list getmarklist([{buf}]) *getmarklist()* @@ -4015,6 +4406,9 @@ getmarklist([{buf}]) *getmarklist()* Can also be used as a |method|: > GetBufnr()->getmarklist() +< + Return type: list> or list + getmatches([{win}]) *getmatches()* Returns a |List| with all matches previously defined for the @@ -4041,6 +4435,9 @@ getmatches([{win}]) *getmatches()* 'pattern': 'FIXME', 'priority': 10, 'id': 2}] > :unlet m < + Return type: list> or list + + getmousepos() *getmousepos()* Returns a |Dictionary| with the last known position of the mouse. This can be used in a mapping for a mouse click or in @@ -4071,21 +4468,55 @@ getmousepos() *getmousepos()* When using |getchar()| the Vim variables |v:mouse_lnum|, |v:mouse_col| and |v:mouse_winid| also provide these values. + Return type: dict + + getmouseshape() *getmouseshape()* Returns the name of the currently showing mouse pointer. When the |+mouseshape| feature is not supported or the shape is unknown an empty string is returned. This function is mainly intended for testing. - *getpid()* -getpid() Return a Number which is the process ID of the Vim process. + Return type: |String| + + +getpid() *getpid()* + Return a Number which is the process ID of the Vim process. On Unix and MS-Windows this is a unique number, until Vim exits. - *getpos()* -getpos({expr}) Get the position for String {expr}. For possible values of - {expr} see |line()|. For getting the cursor position see - |getcurpos()|. + Return type: |Number| + + +getpos({expr}) *getpos()* + Get the position for String {expr}. + The accepted values for {expr} are: *E1209* + . The cursor position. + $ The last line in the current buffer. + 'x Position of mark x (if the mark is not set, 0 is + returned for all values). + w0 First line visible in current window (one if the + display isn't updated, e.g. in silent Ex mode). + w$ Last line visible in current window (this is one + less than "w0" if no lines are visible). + v When not in Visual mode, returns the cursor + position. In Visual mode, returns the other end + of the Visual area. A good way to think about + this is that in Visual mode "v" and "." complement + each other. While "." refers to the cursor + position, "v" refers to where |v_o| would move the + cursor. As a result, you can use "v" and "." + together to work on all of a selection in + characterwise Visual mode. If the cursor is at + the end of a characterwise Visual area, "v" refers + to the start of the same Visual area. And if the + cursor is at the start of a characterwise Visual + area, "v" refers to the end of the same Visual + area. "v" differs from |'<| and |'>| in that it's + updated right away. + Note that a mark in another file can be used. The line number + then applies to another buffer. + The result is a |List| with four numbers: [bufnum, lnum, col, off] "bufnum" is zero, unless a mark like '0 or 'A is used, then it @@ -4096,23 +4527,31 @@ getpos({expr}) Get the position for String {expr}. For possible values of it is the offset in screen columns from the start of the character. E.g., a position within a or after the last character. - Note that for '< and '> Visual mode matters: when it is "V" - (visual line mode) the column of '< is zero and the column of - '> is a large number equal to |v:maxcol|. + + For getting the cursor position see |getcurpos()|. The column number in the returned List is the byte position within the line. To get the character position in the line, use |getcharpos()|. + + Note that for '< and '> Visual mode matters: when it is "V" + (visual line mode) the column of '< is zero and the column of + '> is a large number equal to |v:maxcol|. A very large column number equal to |v:maxcol| can be returned, in which case it means "after the end of the line". If {expr} is invalid, returns a list with all zeros. + This can be used to save and restore the position of a mark: > let save_a_mark = getpos("'a") ... call setpos("'a", save_a_mark) -< Also see |getcharpos()|, |getcurpos()| and |setpos()|. +< + Also see |getcharpos()|, |getcurpos()| and |setpos()|. Can also be used as a |method|: > GetMark()->getpos() +< + Return type: list + getqflist([{what}]) *getqflist()* Returns a |List| with all the current quickfix errors. Each @@ -4217,6 +4656,9 @@ getqflist([{what}]) *getqflist()* :echo getqflist({'nr': 2, 'title': 1}) :echo getqflist({'lines' : ["F1:10:L10"]}) < + Return type: list> or list + + getreg([{regname} [, 1 [, {list}]]]) *getreg()* The result is a String, which is the contents of register {regname}. Example: > @@ -4244,6 +4686,9 @@ getreg([{regname} [, 1 [, {list}]]]) *getreg()* Can also be used as a |method|: > GetRegname()->getreg() +< + Return type: |String| + getreginfo([{regname}]) *getreginfo()* Returns detailed information about register {regname} as a @@ -4273,6 +4718,9 @@ getreginfo([{regname}]) *getreginfo()* Can also be used as a |method|: > GetRegname()->getreginfo() +< + Return type: dict + getregion({pos1}, {pos2} [, {opts}]) *getregion()* Returns the list of strings from {pos1} to {pos2} from a @@ -4286,14 +4734,14 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()* The optional argument {opts} is a Dict and supports the following items: - type Specify the region's selection type - (default: "v"): - "v" for |characterwise| mode - "V" for |linewise| mode - "" for |blockwise-visual| mode + type Specify the region's selection type. + See |getregtype()| for possible values, + except that the width can be omitted + and an empty string cannot be used. + (default: "v") exclusive If |TRUE|, use exclusive selection - for the end position + for the end position. (default: follow 'selection') You can get the last selection type by |visualmode()|. @@ -4326,7 +4774,46 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()* < Can also be used as a |method|: > getpos('.')->getregion(getpos("'a")) + +< +getregionpos({pos1}, {pos2} [, {opts}]) *getregionpos()* + Same as |getregion()|, but returns a list of positions + describing the buffer text segments bound by {pos1} and + {pos2}. + The segments are a pair of positions for every line: > + [[{start_pos}, {end_pos}], ...] +< + The position is a |List| with four numbers: + [bufnum, lnum, col, off] + "bufnum" is the buffer number. + "lnum" and "col" are the position in the buffer. The first + column is 1. + If the "off" number of a starting position is non-zero, it is + the offset in screen columns from the start of the character. + E.g., a position within a or after the last character. + If the "off" number of an ending position is non-zero, it is + the offset of the character's first cell not included in the + selection, otherwise all its cells are included. + + Apart from the options supported by |getregion()|, {opts} also + supports the following: + + eol If |TRUE|, indicate positions beyond + the end of a line with "col" values + one more than the length of the line. + If |FALSE|, positions are limited + within their lines, and if a line is + empty or the selection is entirely + beyond the end of a line, a "col" + value of 0 is used for both positions. + (default: |FALSE|) + + Can also be used as a |method|: > + getpos('.')->getregionpos(getpos("'a")) < + Return type: list + + getregtype([{regname}]) *getregtype()* The result is a String, which is type of register {regname}. The value will be one of: @@ -4342,6 +4829,8 @@ getregtype([{regname}]) *getregtype()* Can also be used as a |method|: > GetRegname()->getregtype() +< + Return type: |String| getscriptinfo([{opts}]) *getscriptinfo()* Returns a |List| with information about all the sourced Vim @@ -4382,8 +4871,11 @@ getscriptinfo([{opts}]) *getscriptinfo()* Examples: > :echo getscriptinfo({'name': 'myscript'}) - :echo getscriptinfo({'sid': 15}).variables + :echo getscriptinfo({'sid': 15})[0].variables < + Return type: list> + + gettabinfo([{tabnr}]) *gettabinfo()* If {tabnr} is not specified, then information about all the tab pages is returned as a |List|. Each List item is a @@ -4399,6 +4891,9 @@ gettabinfo([{tabnr}]) *gettabinfo()* Can also be used as a |method|: > GetTabnr()->gettabinfo() +< + Return type: list> + gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()* Get the value of a tab-local variable {varname} in tab page @@ -4412,6 +4907,9 @@ gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()* Can also be used as a |method|: > GetTabnr()->gettabvar(varname) +< + Return type: any, depending on {varname} + gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()* Get the value of window-local variable {varname} in window @@ -4441,6 +4939,9 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()* < Can also be used as a |method|: > GetTabnr()->gettabwinvar(winnr, varname) +< + Return type: any, depending on {varname} + gettagstack([{winnr}]) *gettagstack()* The result is a Dict, which is the tag stack of window {winnr}. @@ -4472,6 +4973,8 @@ gettagstack([{winnr}]) *gettagstack()* Can also be used as a |method|: > GetWinnr()->gettagstack() +< + Return type: dict gettext({text}) *gettext()* @@ -4485,6 +4988,8 @@ gettext({text}) *gettext()* xgettext does not understand escaping in single quoted strings. + Return type: |String| + getwininfo([{winid}]) *getwininfo()* Returns information about windows as a |List| with Dictionaries. @@ -4525,6 +5030,9 @@ getwininfo([{winid}]) *getwininfo()* Can also be used as a |method|: > GetWinnr()->getwininfo() +< + Return type: list> + getwinpos([{timeout}]) *getwinpos()* The result is a |List| with two numbers, the result of @@ -4549,22 +5057,31 @@ getwinpos([{timeout}]) *getwinpos()* Can also be used as a |method|: > GetTimeout()->getwinpos() < - *getwinposx()* -getwinposx() The result is a Number, which is the X coordinate in pixels of + Return type: list + + +getwinposx() *getwinposx()* + The result is a Number, which is the X coordinate in pixels of the left hand side of the GUI Vim window. Also works for an xterm (uses a timeout of 100 msec). The result will be -1 if the information is not available (e.g. on the Wayland backend). The value can be used with `:winpos`. - *getwinposy()* -getwinposy() The result is a Number, which is the Y coordinate in pixels of + Return type: |Number| + + +getwinposy() *getwinposy()* + The result is a Number, which is the Y coordinate in pixels of the top of the GUI Vim window. Also works for an xterm (uses a timeout of 100 msec). The result will be -1 if the information is not available (e.g. on the Wayland backend). The value can be used with `:winpos`. + Return type: |Number| + + getwinvar({winnr}, {varname} [, {def}]) *getwinvar()* Like |gettabwinvar()| for the current tabpage. Examples: > @@ -4574,6 +5091,9 @@ getwinvar({winnr}, {varname} [, {def}]) *getwinvar()* < Can also be used as a |method|: > GetWinnr()->getwinvar(varname) < + Return type: any, depending on {varname} + + glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()* Expand the file wildcards in {expr}. See |wildcards| for the use of special characters. @@ -4612,6 +5132,10 @@ glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()* Can also be used as a |method|: > GetExpr()->glob() +< + Return type: |String| or list or list depending + on {list} + glob2regpat({string}) *glob2regpat()* Convert a file pattern, as used by glob(), into a search @@ -4627,7 +5151,10 @@ glob2regpat({string}) *glob2regpat()* Can also be used as a |method|: > GetExpr()->glob2regpat() -< *globpath()* +< + Return type: |String| + + *globpath()* globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]]) Perform glob() for String {expr} on all directories in {path} and concatenate the results. Example: > @@ -4667,8 +5194,11 @@ globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]]) second argument: > GetExpr()->globpath(&rtp) < - *has()* -has({feature} [, {check}]) + Return type: |String| or list or list depending + on {list} + + +has({feature} [, {check}]) *has()* When {check} is omitted or is zero: The result is a Number, which is 1 if the feature {feature} is supported, zero otherwise. The {feature} argument is a string, case is @@ -4694,6 +5224,8 @@ has({feature} [, {check}]) < If the `endif` would be moved to the second line as "| endif" it would not be found. + Return type: |Number| + has_key({dict}, {key}) *has_key()* The result is a Number, which is TRUE if |Dictionary| {dict} @@ -4705,6 +5237,9 @@ has_key({dict}, {key}) *has_key()* Can also be used as a |method|: > mydict->has_key(key) +< + Return type: |Number| + haslocaldir([{winnr} [, {tabnr}]]) *haslocaldir()* The result is a Number: @@ -4742,6 +5277,9 @@ haslocaldir([{winnr} [, {tabnr}]]) *haslocaldir()* < Can also be used as a |method|: > GetWinnr()->haslocaldir() +< + Return type: |Number| + hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()* The result is a Number, which is TRUE if there is a mapping @@ -4776,6 +5314,9 @@ hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()* Can also be used as a |method|: > GetRHS()->hasmapto() +< + Return type: |Number| + histadd({history}, {item}) *histadd()* Add the String {item} to the history {history} which can be @@ -4801,6 +5342,9 @@ histadd({history}, {item}) *histadd()* Can also be used as a |method|, the base is passed as the second argument: > GetHistory()->histadd('search') +< + Return type: |Number| + histdel({history} [, {item}]) *histdel()* Clear {history}, i.e. delete all its entries. See |hist-names| @@ -4836,6 +5380,9 @@ histdel({history} [, {item}]) *histdel()* < Can also be used as a |method|: > GetHistory()->histdel() +< + Return type: |Number| + histget({history} [, {index}]) *histget()* The result is a String, the entry with Number {index} from @@ -4854,6 +5401,9 @@ histget({history} [, {index}]) *histget()* < Can also be used as a |method|: > GetHistory()->histget() +< + Return type: |String| + histnr({history}) *histnr()* The result is the Number of the current entry in {history}. @@ -4866,6 +5416,8 @@ histnr({history}) *histnr()* < Can also be used as a |method|: > GetHistory()->histnr() < + Return type: |Number| + hlexists({name}) *hlexists()* The result is a Number, which is TRUE if a highlight group called {name} exists. This is when the group has been @@ -4878,6 +5430,9 @@ hlexists({name}) *hlexists()* Can also be used as a |method|: > GetName()->hlexists() < + Return type: |Number| + + hlget([{name} [, {resolve}]]) *hlget()* Returns a List of all the highlight group attributes. If the optional {name} is specified, then returns a List with only @@ -4929,6 +5484,9 @@ hlget([{name} [, {resolve}]]) *hlget()* Can also be used as a |method|: > GetName()->hlget() < + Return type: list> + + hlset({list}) *hlset()* Creates or modifies the attributes of a List of highlight groups. Each item in {list} is a dictionary containing the @@ -4980,8 +5538,10 @@ hlset({list}) *hlset()* Can also be used as a |method|: > GetAttrList()->hlset() < - *hlID()* -hlID({name}) The result is a Number, which is the ID of the highlight group + Return type: |Number| + +hlID({name}) *hlID()* + The result is a Number, which is the ID of the highlight group with name {name}. When the highlight group doesn't exist, zero is returned. This can be used to retrieve information about the highlight @@ -4993,12 +5553,18 @@ hlID({name}) The result is a Number, which is the ID of the highlight group Can also be used as a |method|: > GetName()->hlID() +< + Return type: |Number| + hostname() *hostname()* The result is a String, which is the name of the machine on which Vim is currently running. Machine names greater than 256 characters long are truncated. + Return type: |String| + + iconv({string}, {from}, {to}) *iconv()* The result is a String, which is the text {string} converted from encoding {from} to encoding {to}. @@ -5021,8 +5587,11 @@ iconv({string}, {from}, {to}) *iconv()* Can also be used as a |method|: > GetText()->iconv('latin1', 'utf-8') < - *indent()* -indent({lnum}) The result is a Number, which is indent of line {lnum} in the + Return type: |String| + + +indent({lnum}) *indent()* + The result is a Number, which is indent of line {lnum} in the current buffer. The indent is counted in spaces, the value of 'tabstop' is relevant. {lnum} is used just like in |getline()|. @@ -5031,6 +5600,9 @@ indent({lnum}) The result is a Number, which is indent of line {lnum} in the Can also be used as a |method|: > GetLnum()->indent() +< + Return type: |Number| + index({object}, {expr} [, {start} [, {ic}]]) *index()* Find {expr} in {object} and return its index. See @@ -5059,6 +5631,9 @@ index({object}, {expr} [, {start} [, {ic}]]) *index()* < Can also be used as a |method|: > GetObject()->index(what) +< + Return type: |Number| + indexof({object}, {expr} [, {opts}]) *indexof()* Returns the index of an item in {object} where {expr} is @@ -5100,6 +5675,9 @@ indexof({object}, {expr} [, {opts}]) *indexof()* < Can also be used as a |method|: > mylist->indexof(expr) +< + Return type: |Number| + input({prompt} [, {text} [, {completion}]]) *input()* The result is a String, which is whatever the user typed on @@ -5148,6 +5726,9 @@ input({prompt} [, {text} [, {completion}]]) *input()* < Can also be used as a |method|: > GetPrompt()->input() +< + Return type: |String| + inputdialog({prompt} [, {text} [, {cancelreturn}]]) *inputdialog()* Like |input()|, but when the GUI is running and text dialogs @@ -5165,6 +5746,9 @@ inputdialog({prompt} [, {text} [, {cancelreturn}]]) *inputdialog()* Can also be used as a |method|: > GetPrompt()->inputdialog() +< + Return type: |String| + inputlist({textlist}) *inputlist()* {textlist} must be a |List| of strings. This |List| is @@ -5185,6 +5769,9 @@ inputlist({textlist}) *inputlist()* < Can also be used as a |method|: > GetChoices()->inputlist() +< + Return type: |Number| + inputrestore() *inputrestore()* Restore typeahead that was saved with a previous |inputsave()|. @@ -5192,6 +5779,9 @@ inputrestore() *inputrestore()* called. Calling it more often is harmless though. Returns TRUE when there is nothing to restore, FALSE otherwise. + Return type: |Number| + + inputsave() *inputsave()* Preserve typeahead (also from mappings) and clear it, so that a following prompt gets input from the user. Should be @@ -5200,6 +5790,9 @@ inputsave() *inputsave()* many inputrestore() calls. Returns TRUE when out of memory, FALSE otherwise. + Return type: |Number| + + inputsecret({prompt} [, {text}]) *inputsecret()* This function acts much like the |input()| function with but two exceptions: @@ -5213,6 +5806,9 @@ inputsecret({prompt} [, {text}]) *inputsecret()* Can also be used as a |method|: > GetPrompt()->inputsecret() +< + Return type: |String| + insert({object}, {item} [, {idx}]) *insert()* When {object} is a |List| or a |Blob| insert {item} at the start @@ -5234,6 +5830,9 @@ insert({object}, {item} [, {idx}]) *insert()* Can also be used as a |method|: > mylist->insert(item) < + Return type: |Number| + + *instanceof()* *E614* *E616* *E693* instanceof({object}, {class}) The result is a Number, which is |TRUE| when the {object} @@ -5246,6 +5845,8 @@ instanceof({object}, {class}) < Can also be used as a |method|: > myobj->instanceof(mytype) +< + Return type: |Number| interrupt() *interrupt()* Interrupt script execution. It works more or less like the @@ -5259,6 +5860,8 @@ interrupt() *interrupt()* : endif :endfunction :au BufWritePre * call s:check_typoname(expand('')) +< + Return type: void invert({expr}) *invert()* Bitwise invert. The argument is converted to a number. A @@ -5266,6 +5869,9 @@ invert({expr}) *invert()* :let bits = invert(bits) < Can also be used as a |method|: > :let bits = bits->invert() +< + Return type: |Number| + isabsolutepath({path}) *isabsolutepath()* The result is a Number, which is |TRUE| when {path} is an @@ -5283,6 +5889,8 @@ isabsolutepath({path}) *isabsolutepath()* < Can also be used as a |method|: > GetName()->isabsolutepath() +< + Return type: |Number| isdirectory({directory}) *isdirectory()* @@ -5293,6 +5901,9 @@ isdirectory({directory}) *isdirectory()* Can also be used as a |method|: > GetName()->isdirectory() +< + Return type: |Number| + isinf({expr}) *isinf()* Return 1 if {expr} is a positive infinity, or -1 a negative @@ -5304,6 +5915,9 @@ isinf({expr}) *isinf()* Can also be used as a |method|: > Compute()->isinf() +< + Return type: |Number| + islocked({expr}) *islocked()* *E786* The result is a Number, which is |TRUE| when {expr} is the @@ -5324,6 +5938,9 @@ islocked({expr}) *islocked()* *E786* Can also be used as a |method|: > GetName()->islocked() +< + Return type: |Number| + isnan({expr}) *isnan()* Return |TRUE| if {expr} is a float with value NaN. > @@ -5332,6 +5949,9 @@ isnan({expr}) *isnan()* Can also be used as a |method|: > Compute()->isnan() +< + Return type: |Number| + items({dict}) *items()* Return a |List| with all the key-value pairs of {dict}. Each @@ -5349,6 +5969,9 @@ items({dict}) *items()* Can also be used as a |method|: > mydict->items() +< + Return type: list> or list + job_ functions are documented here: |job-functions-details| @@ -5366,6 +5989,9 @@ join({list} [, {sep}]) *join()* Can also be used as a |method|: > mylist->join() +< + Return type: |String| + js_decode({string}) *js_decode()* This is similar to |json_decode()| with these differences: @@ -5376,6 +6002,9 @@ js_decode({string}) *js_decode()* Can also be used as a |method|: > ReadObject()->js_decode() +< + Return type: any, depending on {varname} + js_encode({expr}) *js_encode()* This is similar to |json_encode()| with these differences: @@ -5393,6 +6022,9 @@ js_encode({expr}) *js_encode()* Can also be used as a |method|: > GetObject()->js_encode() +< + Return type: |String| + json_decode({string}) *json_decode()* *E491* This parses a JSON formatted string and returns the equivalent @@ -5429,6 +6061,9 @@ json_decode({string}) *json_decode()* *E491* Can also be used as a |method|: > ReadObject()->json_decode() +< + Return type: any, depending on {varname} + json_encode({expr}) *json_encode()* Encode {expr} as JSON and return this as a string. @@ -5459,6 +6094,9 @@ json_encode({expr}) *json_encode()* Can also be used as a |method|: > GetObject()->json_encode() +< + Return type: |String| + keys({dict}) *keys()* Return a |List| with all the keys of {dict}. The |List| is in @@ -5466,6 +6104,9 @@ keys({dict}) *keys()* Can also be used as a |method|: > mydict->keys() +< + Return type: list + keytrans({string}) *keytrans()* Turn the internal byte representation of keys into a form that @@ -5476,9 +6117,12 @@ keytrans({string}) *keytrans()* Can also be used as a |method|: > "\"->keytrans() +< + Return type: |String| -< *len()* *E701* -len({expr}) The result is a Number, which is the length of the argument. + +len({expr}) *len()* *E701* + The result is a Number, which is the length of the argument. When {expr} is a String or a Number the length in bytes is used, as with |strlen()|. When {expr} is a |List| the number of items in the |List| is @@ -5492,8 +6136,11 @@ len({expr}) The result is a Number, which is the length of the argument. Can also be used as a |method|: > mylist->len() +< + Return type: |Number| -< *libcall()* *E364* *E368* + + *libcall()* *E364* *E368* libcall({libname}, {funcname}, {argument}) Call function {funcname} in the run-time library {libname} with single argument {argument}. @@ -5558,30 +6205,22 @@ libcallnr({libname}, {funcname}, {argument}) third argument: > GetValue()->libcallnr("libc.so", "printf") < + Return type: |String| + line({expr} [, {winid}]) *line()* The result is a Number, which is the line number of the file position given with {expr}. The {expr} argument is a string. - The accepted positions are: *E1209* - . the cursor position - $ the last line in the current buffer - 'x position of mark x (if the mark is not set, 0 is - returned) - w0 first line visible in current window (one if the - display isn't updated, e.g. in silent Ex mode) - w$ last line visible in current window (this is one - less than "w0" if no lines are visible) - v In Visual mode: the start of the Visual area (the - cursor is the end). When not in Visual mode - returns the cursor position. Differs from |'<| in - that it's updated right away. - Note that a mark in another file can be used. The line number - then applies to another buffer. + See |getpos()| for accepted positions. + To get the column number use |col()|. To get both use |getpos()|. + With the optional {winid} argument the values are obtained for that window instead of the current window. + Returns 0 for invalid values of {expr} and {winid}. + Examples: > line(".") line number of the cursor line(".", winid) idem, in window "winid" @@ -5593,6 +6232,9 @@ line({expr} [, {winid}]) *line()* Can also be used as a |method|: > GetValue()->line() +< + Return type: |Number| + line2byte({lnum}) *line2byte()* Return the byte count from the start of the buffer for line @@ -5610,6 +6252,9 @@ line2byte({lnum}) *line2byte()* Can also be used as a |method|: > GetLnum()->line2byte() +< + Return type: |Number| + lispindent({lnum}) *lispindent()* Get the amount of indent for line {lnum} according the lisp @@ -5621,6 +6266,9 @@ lispindent({lnum}) *lispindent()* Can also be used as a |method|: > GetLnum()->lispindent() +< + Return type: |Number| + list2blob({list}) *list2blob()* Return a Blob concatenating all the number values in {list}. @@ -5634,10 +6282,13 @@ list2blob({list}) *list2blob()* Can also be used as a |method|: > GetList()->list2blob() +< + Return type: |Blob| + list2str({list} [, {utf8}]) *list2str()* - Convert each number in {list} to a character string can - concatenate them all. Examples: > + Convert each number in {list} to a character string and + concatenates them all. Examples: > list2str([32]) returns " " list2str([65, 66, 67]) returns "ABC" < The same can be done (slowly) with: > @@ -5653,6 +6304,9 @@ list2str({list} [, {utf8}]) *list2str()* Can also be used as a |method|: > GetList()->list2str() +< + Return type: |String| + listener_add({callback} [, {buf}]) *listener_add()* Add a callback function that will be invoked when changes have @@ -5729,6 +6383,9 @@ listener_add({callback} [, {buf}]) *listener_add()* Can also be used as a |method|, the base is passed as the second argument: > GetBuffer()->listener_add(callback) +< + Return type: |Number| + listener_flush([{buf}]) *listener_flush()* Invoke listener callbacks for buffer {buf}. If there are no @@ -5740,6 +6397,9 @@ listener_flush([{buf}]) *listener_flush()* Can also be used as a |method|: > GetBuffer()->listener_flush() +< + Return type: |Number| + listener_remove({id}) *listener_remove()* Remove a listener previously added with listener_add(). @@ -5748,11 +6408,16 @@ listener_remove({id}) *listener_remove()* Can also be used as a |method|: > GetListenerId()->listener_remove() +< + Return type: |Number| + localtime() *localtime()* Return the current time, measured as seconds since 1st Jan 1970. See also |strftime()|, |strptime()| and |getftime()|. + Return type: |Number| + log({expr}) *log()* Return the natural logarithm (base e) of {expr} as a |Float|. @@ -5767,6 +6432,8 @@ log({expr}) *log()* Can also be used as a |method|: > Compute()->log() +< + Return type: |Float| log10({expr}) *log10()* @@ -5781,6 +6448,9 @@ log10({expr}) *log10()* Can also be used as a |method|: > Compute()->log10() +< + Return type: |Float| + luaeval({expr} [, {expr}]) *luaeval()* Evaluate Lua expression {expr} and return its result converted @@ -5798,8 +6468,11 @@ luaeval({expr} [, {expr}]) *luaeval()* Can also be used as a |method|: > GetExpr()->luaeval() +< + Return type: any, depending on {expr} + + {only available when compiled with the |+lua| feature} -< {only available when compiled with the |+lua| feature} map({expr1}, {expr2}) *map()* {expr1} must be a |List|, |String|, |Blob| or |Dictionary|. @@ -5862,6 +6535,9 @@ map({expr1}, {expr2}) *map()* Can also be used as a |method|: > mylist->map(expr2) +< + Return type: |String|, |Blob|, list<{type}> or dict<{type}> + depending on {expr1} maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()* @@ -5938,6 +6614,9 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()* < Can also be used as a |method|: > GetKey()->maparg('n') +< + Return type: |String| or dict depending on {dict} + mapcheck({name} [, {mode} [, {abbr}]]) *mapcheck()* Check if there is a mapping that matches with {name} in mode @@ -5974,6 +6653,8 @@ mapcheck({name} [, {mode} [, {abbr}]]) *mapcheck()* Can also be used as a |method|: > GetKey()->mapcheck('n') +< + Return type: |String| maplist([{abbr}]) *maplist()* @@ -6008,6 +6689,8 @@ maplist([{abbr}]) *maplist()* (_, m) => m.lhs == 'xyzzy')[0].mode_bits ounmap xyzzy echo printf("Operator-pending mode bit: 0x%x", op_bit) +< + Return type: list> mapnew({expr1}, {expr2}) *mapnew()* @@ -6016,6 +6699,9 @@ mapnew({expr1}, {expr2}) *mapnew()* unchanged. Items can still be changed by {expr2}, if you don't want that use |deepcopy()| first. + Return type: |String|, |Blob|, list<{type}> or dict<{type}> + depending on {expr1} + mapset({mode}, {abbr}, {dict}) *mapset()* mapset({dict}) @@ -6054,6 +6740,8 @@ mapset({dict}) for d in save_maps mapset(d) endfor +< + Return type: |Number| match({expr}, {pat} [, {start} [, {count}]]) *match()* @@ -6123,6 +6811,9 @@ match({expr}, {pat} [, {start} [, {count}]]) *match()* GetText()->match('word') GetList()->match('word') < + Return type: |Number| + + *matchadd()* *E290* *E798* *E799* *E801* *E957* matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]]) Defines a pattern to be highlighted in the current window (a @@ -6185,6 +6876,9 @@ matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]]) Can also be used as a |method|: > GetGroup()->matchadd('TODO') < + Return type: |Number| + + *matchaddpos()* matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]]) Same as |matchadd()|, but requires a list of positions {pos} @@ -6221,6 +6915,9 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]]) Can also be used as a |method|: > GetGroup()->matchaddpos([23, 11]) +< + Return type: |Number| + matcharg({nr}) *matcharg()* Selects the {nr} match item, as set with a |:match|, @@ -6237,6 +6934,8 @@ matcharg({nr}) *matcharg()* Can also be used as a |method|: > GetMatch()->matcharg() < + Return type: list + *matchbufline()* matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict}]) Returns the |List| of matches in lines from {lnum} to {end} in @@ -6284,6 +6983,9 @@ matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict}]) Can also be used as a |method|: > GetBuffer()->matchbufline('mypat', 1, '$') +< + Return type: list> or list + matchdelete({id} [, {win}) *matchdelete()* *E802* *E803* Deletes a match with ID {id} previously defined by |matchadd()| @@ -6295,6 +6997,9 @@ matchdelete({id} [, {win}) *matchdelete()* *E802* *E803* Can also be used as a |method|: > GetMatch()->matchdelete() +< + Return type: |Number| + matchend({expr}, {pat} [, {start} [, {count}]]) *matchend()* Same as |match()|, but return the index of first character @@ -6317,6 +7022,8 @@ matchend({expr}, {pat} [, {start} [, {count}]]) *matchend()* Can also be used as a |method|: > GetText()->matchend('word') +< + Return type: |Number| matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()* @@ -6382,6 +7089,9 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()* \ {'matchseq': 1}) < results in ['two one']. + Return type: list or list + + matchfuzzypos({list}, {str} [, {dict}]) *matchfuzzypos()* Same as |matchfuzzy()|, but returns the list of matched strings, the list of character positions where characters @@ -6403,6 +7113,9 @@ matchfuzzypos({list}, {str} [, {dict}]) *matchfuzzypos()* :echo [{'text': 'hello', 'id' : 10}]->matchfuzzypos('ll', {'key' : 'text'}) < results in [[{'id': 10, 'text': 'hello'}], [[2, 3]], [127]] + Return type: list> + + matchlist({expr}, {pat} [, {start} [, {count}]]) *matchlist()* Same as |match()|, but return a |List|. The first item in the list is the matched string, same as what matchstr() would @@ -6418,6 +7131,8 @@ matchlist({expr}, {pat} [, {start} [, {count}]]) *matchlist()* Can also be used as a |method|: > GetText()->matchlist('word') < + Return type: list or list + *matchstrlist()* matchstrlist({list}, {pat} [, {dict}]) Returns the |List| of matches in {list} where {pat} matches. @@ -6454,6 +7169,9 @@ matchstrlist({list}, {pat} [, {dict}]) Can also be used as a |method|: > GetListOfStrings()->matchstrlist('mypat') +< + Return type: list> or list + matchstr({expr}, {pat} [, {start} [, {count}]]) *matchstr()* Same as |match()|, but return the matched string. Example: > @@ -6470,6 +7188,9 @@ matchstr({expr}, {pat} [, {start} [, {count}]]) *matchstr()* Can also be used as a |method|: > GetText()->matchstr('word') +< + Return type: |String| + matchstrpos({expr}, {pat} [, {start} [, {count}]]) *matchstrpos()* Same as |matchstr()|, but return the matched string, the start @@ -6492,9 +7213,11 @@ matchstrpos({expr}, {pat} [, {start} [, {count}]]) *matchstrpos()* Can also be used as a |method|: > GetText()->matchstrpos('word') < + Return type: list - *max()* -max({expr}) Return the maximum value of all items in {expr}. Example: > + +max({expr}) *max()* + Return the maximum value of all items in {expr}. Example: > echo max([apples, pears, oranges]) < {expr} can be a |List| or a |Dictionary|. For a Dictionary, @@ -6505,6 +7228,8 @@ max({expr}) Return the maximum value of all items in {expr}. Example: > Can also be used as a |method|: > mylist->max() +< + Return type: |Number| menu_info({name} [, {mode}]) *menu_info()* @@ -6579,10 +7304,11 @@ menu_info({name} [, {mode}]) *menu_info()* < Can also be used as a |method|: > GetMenuName()->menu_info('v') +< + Return type: dict - -< *min()* -min({expr}) Return the minimum value of all items in {expr}. Example: > +min({expr}) *min()* + Return the minimum value of all items in {expr}. Example: > echo min([apples, pears, oranges]) < {expr} can be a |List| or a |Dictionary|. For a Dictionary, @@ -6593,25 +7319,24 @@ min({expr}) Return the minimum value of all items in {expr}. Example: > Can also be used as a |method|: > mylist->min() +< + Return type: |Number| -< *mkdir()* *E739* -mkdir({name} [, {flags} [, {prot}]]) + +mkdir({name} [, {flags} [, {prot}]]) *mkdir()* *E739* Create directory {name}. When {flags} is present it must be a string. An empty string has no effect. - If {flags} contains "p" then intermediate directories are - created as necessary. + {flags} can contain these character flags: + "p" intermediate directories will be created as necessary + "D" {name} will be deleted at the end of the current + function, but not recursively |:defer| + "R" {name} will be deleted recursively at the end of the + current function |:defer| - If {flags} contains "D" then {name} is deleted at the end of - the current function, as with: > - defer delete({name}, 'd') -< - If {flags} contains "R" then {name} is deleted recursively at - the end of the current function, as with: > - defer delete({name}, 'rf') -< Note that when {name} has more than one part and "p" is used + Note that when {name} has more than one part and "p" is used some directories may already exist. Only the first one that is created and what it contains is scheduled to be deleted. E.g. when using: > @@ -6647,8 +7372,11 @@ mkdir({name} [, {flags} [, {prot}]]) < Can also be used as a |method|: > GetName()->mkdir() < - *mode()* -mode([{expr}]) Return a string that indicates the current mode. + Return type: |Number| + + +mode([{expr}]) *mode()* + Return a string that indicates the current mode. If {expr} is supplied and it evaluates to a non-zero Number or a non-empty String (|non-zero-arg|), then the full mode is returned, otherwise only the first letter is returned. @@ -6704,6 +7432,9 @@ mode([{expr}]) Return a string that indicates the current mode. Can also be used as a |method|: > DoFull()->mode() +< + Return type: |String| + mzeval({expr}) *mzeval()* Evaluate MzScheme expression {expr} and return its result @@ -6726,8 +7457,11 @@ mzeval({expr}) *mzeval()* Can also be used as a |method|: > GetExpr()->mzeval() < + Return type: any, depending on {expr} + {only available when compiled with the |+mzscheme| feature} + nextnonblank({lnum}) *nextnonblank()* Return the line number of the first line at or below {lnum} that is not blank. Example: > @@ -6739,6 +7473,9 @@ nextnonblank({lnum}) *nextnonblank()* Can also be used as a |method|: > GetLnum()->nextnonblank() +< + Return type: |Number| + nr2char({expr} [, {utf8}]) *nr2char()* Return a string with a single character, which has the number @@ -6760,6 +7497,9 @@ nr2char({expr} [, {utf8}]) *nr2char()* Can also be used as a |method|: > GetNumber()->nr2char() +< + Return type: |String| + or({expr}, {expr}) *or()* Bitwise OR on the two arguments. The arguments are converted @@ -6775,6 +7515,8 @@ or({expr}, {expr}) *or()* to separate commands. In many places it would not be clear if "|" is an operator or a command separator. + Return type: |Number| + pathshorten({path} [, {len}]) *pathshorten()* Shorten directory names in the path {path} and return the @@ -6792,6 +7534,9 @@ pathshorten({path} [, {len}]) *pathshorten()* Can also be used as a |method|: > GetDirectories()->pathshorten() +< + Return type: |String| + perleval({expr}) *perleval()* Evaluate Perl expression {expr} in scalar context and return @@ -6808,8 +7553,10 @@ perleval({expr}) *perleval()* Can also be used as a |method|: > GetExpr()->perleval() +< + Return type: any, depending on {expr} -< {only available when compiled with the |+perl| feature} + {only available when compiled with the |+perl| feature} popup_ functions are documented here: |popup-functions| @@ -6829,6 +7576,9 @@ pow({x}, {y}) *pow()* Can also be used as a |method|: > Compute()->pow(3) +< + Return type: |Number| + prevnonblank({lnum}) *prevnonblank()* Return the line number of the first line at or above {lnum} @@ -6841,6 +7591,9 @@ prevnonblank({lnum}) *prevnonblank()* Can also be used as a |method|: > GetLnum()->prevnonblank() +< + Return type: |Number| + printf({fmt}, {expr1} ...) *printf()* Return a String with {fmt}, where "%" items are replaced by @@ -7167,6 +7920,8 @@ printf({fmt}, {expr1} ...) *printf()* into this, copying the exact format string and parameters that were used. + Return type: |String| + prompt_getprompt({buf}) *prompt_getprompt()* Returns the effective prompt text for buffer {buf}. {buf} can @@ -7177,8 +7932,10 @@ prompt_getprompt({buf}) *prompt_getprompt()* Can also be used as a |method|: > GetBuffer()->prompt_getprompt() +< + Return type: |String| -< {only available when compiled with the |+channel| feature} + {only available when compiled with the |+channel| feature} prompt_setcallback({buf}, {expr}) *prompt_setcallback()* @@ -7229,8 +7986,10 @@ prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()* Can also be used as a |method|: > GetBuffer()->prompt_setinterrupt(callback) +< + Return type: |Number| -< {only available when compiled with the |+channel| feature} + {only available when compiled with the |+channel| feature} prompt_setprompt({buf}, {text}) *prompt_setprompt()* Set prompt for buffer {buf} to {text}. You most likely want @@ -7241,8 +8000,10 @@ prompt_setprompt({buf}, {text}) *prompt_setprompt()* < Can also be used as a |method|: > GetBuffer()->prompt_setprompt('command: ') +< + Return type: |Number| -< {only available when compiled with the |+channel| feature} + {only available when compiled with the |+channel| feature} prop_ functions are documented here: |text-prop-functions| @@ -7260,12 +8021,18 @@ pum_getpos() *pum_getpos()* The values are the same as in |v:event| during |CompleteChanged|. + Return type: dict + + pumvisible() *pumvisible()* Returns non-zero when the popup menu is visible, zero otherwise. See |ins-completion-menu|. This can be used to avoid some things that would remove the popup menu. + Return type: |Number| + + py3eval({expr}) *py3eval()* Evaluate Python expression {expr} and return its result converted to Vim data structures. @@ -7280,8 +8047,10 @@ py3eval({expr}) *py3eval()* Can also be used as a |method|: > GetExpr()->py3eval() +< + Return type: any, depending on {expr} -< {only available when compiled with the |+python3| feature} + {only available when compiled with the |+python3| feature} *E858* *E859* pyeval({expr}) *pyeval()* @@ -7297,8 +8066,10 @@ pyeval({expr}) *pyeval()* Can also be used as a |method|: > GetExpr()->pyeval() +< + Return type: any, depending on {expr} -< {only available when compiled with the |+python| feature} + {only available when compiled with the |+python| feature} pyxeval({expr}) *pyxeval()* Evaluate Python expression {expr} and return its result @@ -7307,9 +8078,11 @@ pyxeval({expr}) *pyxeval()* See also: |pyeval()|, |py3eval()| Can also be used as a |method|: > - GetExpr()->pyxeval() + < GetExpr()->pyxeval() +< + Return type: any, depending on {expr} -< {only available when compiled with the |+python| or the + {only available when compiled with the |+python| or the |+python3| feature} rand([{expr}]) *rand()* *random* @@ -7327,6 +8100,7 @@ rand([{expr}]) *rand()* *random* :echo rand(seed) :echo rand(seed) % 16 " random number 0 - 15 < + Return type: |Number| *E726* *E727* range({expr} [, {max} [, {stride}]]) *range()* @@ -7350,6 +8124,8 @@ range({expr} [, {max} [, {stride}]]) *range()* Can also be used as a |method|: > GetExpr()->range() < + Return type: list + readblob({fname} [, {offset} [, {size}]]) *readblob()* Read file {fname} in binary mode and return a |Blob|. @@ -7375,6 +8151,8 @@ readblob({fname} [, {offset} [, {size}]]) *readblob()* is truncated. Also see |readfile()| and |writefile()|. + Return type: |Blob| + readdir({directory} [, {expr} [, {dict}]]) *readdir()* Return a list with file and directory names in {directory}. @@ -7432,6 +8210,9 @@ readdir({directory} [, {expr} [, {dict}]]) *readdir()* Can also be used as a |method|: > GetDirName()->readdir() < + Return type: list or list + + readdirex({directory} [, {expr} [, {dict}]]) *readdirex()* Extended version of |readdir()|. Return a list of Dictionaries with file and directory @@ -7491,6 +8272,8 @@ readdirex({directory} [, {expr} [, {dict}]]) *readdirex()* Can also be used as a |method|: > GetDirName()->readdirex() < + Return type: list> or list + *readfile()* readfile({fname} [, {type} [, {max}]]) @@ -7529,6 +8312,8 @@ readfile({fname} [, {type} [, {max}]]) Can also be used as a |method|: > GetFileName()->readfile() +< + Return type: list or list reduce({object}, {func} [, {initial}]) *reduce()* *E998* {func} is called for every item in {object}, which can be a @@ -7549,6 +8334,9 @@ reduce({object}, {func} [, {initial}]) *reduce()* *E998* < Can also be used as a |method|: > echo mylist->reduce({ acc, val -> acc + val }, 0) +< + Return type: |String|, |Blob|, list<{type}> or dict<{type}> + depending on {object} and {func} reg_executing() *reg_executing()* @@ -7556,13 +8344,19 @@ reg_executing() *reg_executing()* Returns an empty string when no register is being executed. See |@|. + Return type: |String| + + reg_recording() *reg_recording()* Returns the single letter name of the register being recorded. Returns an empty string when not recording. See |q|. -reltime() + Return type: |String| + + +reltime() *reltime()* reltime({start}) -reltime({start}, {end}) *reltime()* +reltime({start}, {end}) Return an item that represents a time value. The item is a list with items that depend on the system. In Vim 9 script the type list can be used. @@ -7588,8 +8382,11 @@ reltime({start}, {end}) *reltime()* Can also be used as a |method|: > GetStart()->reltime() < + Return type: list + {only available when compiled with the |+reltime| feature} + reltimefloat({time}) *reltimefloat()* Return a Float that represents the time value of {time}. Example: > @@ -7603,8 +8400,11 @@ reltimefloat({time}) *reltimefloat()* Can also be used as a |method|: > reltime(start)->reltimefloat() +< + Return type: |Float| + + {only available when compiled with the |+reltime| feature} -< {only available when compiled with the |+reltime| feature} reltimestr({time}) *reltimestr()* Return a String that represents the time value of {time}. @@ -7625,8 +8425,10 @@ reltimestr({time}) *reltimestr()* Can also be used as a |method|: > reltime(start)->reltimestr() +< + Return type: |String| -< {only available when compiled with the |+reltime| feature} + {only available when compiled with the |+reltime| feature} *remote_expr()* *E449* remote_expr({server}, {string} [, {idvar} [, {timeout}]]) @@ -7663,6 +8465,9 @@ remote_expr({server}, {string} [, {idvar} [, {timeout}]]) < Can also be used as a |method|: > ServerName()->remote_expr(expr) +< + Return type: |String| or list<{type}> + remote_foreground({server}) *remote_foreground()* Move the Vim server with the name {server} to the foreground. @@ -7678,8 +8483,10 @@ remote_foreground({server}) *remote_foreground()* Can also be used as a |method|: > ServerName()->remote_foreground() +< + Return type: |Number| -< {only in the Win32, Motif and GTK GUI versions and the + {only in the Win32, Motif and GTK GUI versions and the Win32 console version} @@ -7699,6 +8506,9 @@ remote_peek({serverid} [, {retvar}]) *remote_peek()* < Can also be used as a |method|: > ServerId()->remote_peek() +< + Return type: |Number| + remote_read({serverid}, [{timeout}]) *remote_read()* Return the oldest available reply from {serverid} and consume @@ -7714,8 +8524,10 @@ remote_read({serverid}, [{timeout}]) *remote_read()* < Can also be used as a |method|: > ServerId()->remote_read() < - *remote_send()* *E241* -remote_send({server}, {string} [, {idvar}]) + Return type: |String| + + +remote_send({server}, {string} [, {idvar}]) *remote_send()* *E241* Send the {string} to {server}. The {server} argument is a string, also see |{server}|. @@ -7745,19 +8557,24 @@ remote_send({server}, {string} [, {idvar}]) Can also be used as a |method|: > ServerName()->remote_send(keys) < - *remote_startserver()* *E941* *E942* -remote_startserver({name}) + Return type: |String| + + +remote_startserver({name}) *remote_startserver()* *E941* *E942* Become the server {name}. {name} must be a non-empty string. This fails if already running as a server, when |v:servername| is not empty. Can also be used as a |method|: > ServerName()->remote_startserver() +< + Return type: |Number| + + {only available when compiled with the |+clientserver| feature} -< {only available when compiled with the |+clientserver| feature} -remove({list}, {idx}) -remove({list}, {idx}, {end}) *remove()* +remove({list}, {idx}) *remove()* +remove({list}, {idx}, {end}) Without {end}: Remove the item at {idx} from |List| {list} and return the item. With {end}: Remove items from {idx} to {end} (inclusive) and @@ -7774,6 +8591,9 @@ remove({list}, {idx}, {end}) *remove()* Can also be used as a |method|: > mylist->remove(idx) +< + Return type: any, depending on {list} + remove({blob}, {idx}) remove({blob}, {idx}, {end}) @@ -7787,6 +8607,8 @@ remove({blob}, {idx}, {end}) Example: > :echo "last byte: " .. remove(myblob, -1) :call remove(mylist, 0, 9) +< + Return type: |Number| remove({dict}, {key}) Remove the entry from {dict} with key {key} and return it. @@ -7795,6 +8617,9 @@ remove({dict}, {key}) < If there is no {key} in {dict} this is an error. Returns zero on error. + Return type: any, depending on {dict} + + rename({from}, {to}) *rename()* Rename the file by the name {from} to the name {to}. This should also work to move files across file systems. The @@ -7805,6 +8630,9 @@ rename({from}, {to}) *rename()* Can also be used as a |method|: > GetOldName()->rename(newname) +< + Return type: |Number| + repeat({expr}, {count}) *repeat()* Repeat {expr} {count} times and return the concatenated @@ -7818,6 +8646,10 @@ repeat({expr}, {count}) *repeat()* Can also be used as a |method|: > mylist->repeat(count) +< + Return type: |String|, |Blob| or list<{type}> depending on + {expr} + resolve({filename}) *resolve()* *E655* On MS-Windows, when {filename} is a shortcut (a .lnk file), @@ -7837,6 +8669,9 @@ resolve({filename}) *resolve()* *E655* Can also be used as a |method|: > GetName()->resolve() +< + Return type: |String| + reverse({object}) *reverse()* Reverse the order of items in {object}. {object} can be a @@ -7849,6 +8684,10 @@ reverse({object}) *reverse()* :let revlist = reverse(copy(mylist)) < Can also be used as a |method|: > mylist->reverse() +< + Return type: |String|, |Blob| or list<{type}> depending on + {object} + round({expr}) *round()* Round off {expr} to the nearest integral value and return it @@ -7866,6 +8705,9 @@ round({expr}) *round()* Can also be used as a |method|: > Compute()->round() +< + Return type: |Float| + rubyeval({expr}) *rubyeval()* Evaluate Ruby expression {expr} and return its result @@ -7881,8 +8723,10 @@ rubyeval({expr}) *rubyeval()* Can also be used as a |method|: > GetRubyExpr()->rubyeval() +< + Return type: any, depending on {expr} -< {only available when compiled with the |+ruby| feature} + {only available when compiled with the |+ruby| feature} screenattr({row}, {col}) *screenattr()* Like |screenchar()|, but return the attribute. This is a rather @@ -7892,6 +8736,9 @@ screenattr({row}, {col}) *screenattr()* Can also be used as a |method|: > GetRow()->screenattr(col) +< + Return type: |Number| + screenchar({row}, {col}) *screenchar()* The result is a Number, which is the character at position @@ -7905,6 +8752,9 @@ screenchar({row}, {col}) *screenchar()* Can also be used as a |method|: > GetRow()->screenchar(col) +< + Return type: |Number| + screenchars({row}, {col}) *screenchars()* The result is a |List| of Numbers. The first number is the same @@ -7915,6 +8765,9 @@ screenchars({row}, {col}) *screenchars()* Can also be used as a |method|: > GetRow()->screenchars(col) +< + Return type: list or list + screencol() *screencol()* The result is a Number, which is the current screen column of @@ -7930,6 +8783,9 @@ screencol() *screencol()* nnoremap GG :echom screencol() nnoremap GG echom screencol() < + Return type: |Number| + + screenpos({winid}, {lnum}, {col}) *screenpos()* The result is a Dict with the screen position of the text character in window {winid} at buffer line {lnum} and column @@ -7956,6 +8812,9 @@ screenpos({winid}, {lnum}, {col}) *screenpos()* Can also be used as a |method|: > GetWinid()->screenpos(lnum, col) +< + Return type: dict or dict + screenrow() *screenrow()* The result is a Number, which is the current screen row of the @@ -7965,6 +8824,9 @@ screenrow() *screenrow()* Note: Same restrictions as with |screencol()|. + Return type: |Number| + + screenstring({row}, {col}) *screenstring()* The result is a String that contains the base character and any composing characters at position [row, col] on the screen. @@ -7976,6 +8838,8 @@ screenstring({row}, {col}) *screenstring()* Can also be used as a |method|: > GetRow()->screenstring(col) < + Return type: |String| + *search()* search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]]) Search for regexp pattern {pattern}. The search starts at the @@ -8082,6 +8946,9 @@ search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]]) Can also be used as a |method|: > GetPattern()->search() +< + Return type: |Number| + searchcount([{options}]) *searchcount()* Get or update the last search count, like what is displayed @@ -8208,6 +9075,9 @@ searchcount([{options}]) *searchcount()* Can also be used as a |method|: > GetSearchOpts()->searchcount() < + Return type: dict + + searchdecl({name} [, {global} [, {thisblock}]]) *searchdecl()* Search for the declaration of {name}. @@ -8229,6 +9099,8 @@ searchdecl({name} [, {global} [, {thisblock}]]) *searchdecl()* Can also be used as a |method|: > GetName()->searchdecl() < + Return type: |Number| + *searchpair()* searchpair({start}, {middle}, {end} [, {flags} [, {skip} [, {stopline} [, {timeout}]]]]) @@ -8317,6 +9189,8 @@ searchpair({start}, {middle}, {end} [, {flags} [, {skip} :echo searchpair('{', '', '}', 'bW', \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string"') < + Return type: |Number| + *searchpairpos()* searchpairpos({start}, {middle}, {end} [, {flags} [, {skip} [, {stopline} [, {timeout}]]]]) @@ -8330,6 +9204,8 @@ searchpairpos({start}, {middle}, {end} [, {flags} [, {skip} < See |match-parens| for a bigger and more useful example. + Return type: list + *searchpos()* searchpos({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]]) Same as |search()|, but returns a |List| with the line and @@ -8348,6 +9224,9 @@ searchpos({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]]) Can also be used as a |method|: > GetPattern()->searchpos() +< + Return type: list + server2client({clientid}, {string}) *server2client()* Send a reply string to {clientid}. The most recent {clientid} @@ -8365,6 +9244,9 @@ server2client({clientid}, {string}) *server2client()* < Can also be used as a |method|: > GetClientId()->server2client(string) < + Return type: |Number| + + serverlist() *serverlist()* Return a list of available server names, one per line. When there are no servers or the information is not available @@ -8373,6 +9255,9 @@ serverlist() *serverlist()* Example: > :echo serverlist() < + Return type: |String| + + setbufline({buf}, {lnum}, {text}) *setbufline()* Set line {lnum} to {text} in buffer {buf}. This works like |setline()| for the specified buffer. @@ -8403,6 +9288,9 @@ setbufline({buf}, {lnum}, {text}) *setbufline()* Can also be used as a |method|, the base is passed as the third argument: > GetText()->setbufline(buf, lnum) +< + Return type: |Number| + setbufvar({buf}, {varname}, {val}) *setbufvar()* Set option or local variable {varname} in buffer {buf} to @@ -8421,6 +9309,8 @@ setbufvar({buf}, {varname}, {val}) *setbufvar()* Can also be used as a |method|, the base is passed as the third argument: > GetValue()->setbufvar(buf, varname) +< + Return type: |Number| setcellwidths({list}) *setcellwidths()* @@ -8457,6 +9347,8 @@ setcellwidths({list}) *setcellwidths()* match with what Vim knows about each emoji. If it doesn't look right you need to adjust the {list} argument. + Return type: |Number| + setcharpos({expr}, {list}) *setcharpos()* Same as |setpos()| but uses the specified column number as the @@ -8471,6 +9363,9 @@ setcharpos({expr}, {list}) *setcharpos()* Can also be used as a |method|: > GetPosition()->setcharpos('.') +< + Return type: |Number| + setcharsearch({dict}) *setcharsearch()* Set the current character search information to {dict}, @@ -8494,6 +9389,9 @@ setcharsearch({dict}) *setcharsearch()* Can also be used as a |method|: > SavedSearch()->setcharsearch() +< + Return type: dict + setcmdline({str} [, {pos}]) *setcmdline()* Set the command line to {str} and set the cursor position to @@ -8504,6 +9402,9 @@ setcmdline({str} [, {pos}]) *setcmdline()* Can also be used as a |method|: > GetText()->setcmdline() +< + Return type: |Number| + setcmdpos({pos}) *setcmdpos()* Set the cursor position in the command line to byte position @@ -8522,6 +9423,9 @@ setcmdpos({pos}) *setcmdpos()* Can also be used as a |method|: > GetPos()->setcmdpos() +< + Return type: |Number| + setcursorcharpos({lnum}, {col} [, {off}]) *setcursorcharpos()* setcursorcharpos({list}) @@ -8537,6 +9441,8 @@ setcursorcharpos({list}) Can also be used as a |method|: > GetCursorPos()->setcursorcharpos() +< + Return type: |Number| setenv({name}, {val}) *setenv()* @@ -8549,6 +9455,9 @@ setenv({name}, {val}) *setenv()* Can also be used as a |method|, the base is passed as the second argument: > GetPath()->setenv('PATH') +< + Return type: |Number| + setfperm({fname}, {mode}) *setfperm()* *chmod* Set the file permissions for {fname} to {mode}. @@ -8570,11 +9479,14 @@ setfperm({fname}, {mode}) *setfperm()* *chmod* < To read permissions see |getfperm()|. + Return type: |Number| + setline({lnum}, {text}) *setline()* Set line {lnum} of the current buffer to {text}. To insert lines use |append()|. To set lines in another buffer use - |setbufline()|. Any text properties in {lnum} are cleared. + |setbufline()|. + Any text properties in {lnum} are cleared |text-prop-cleared|. {lnum} is used like with |getline()|. When {lnum} is just below the last line the {text} will be @@ -8603,6 +9515,9 @@ setline({lnum}, {text}) *setline()* Can also be used as a |method|, the base is passed as the second argument: > GetText()->setline(lnum) +< + Return type: |Number| + setloclist({nr}, {list} [, {action} [, {what}]]) *setloclist()* Create or replace or add to the location list for window {nr}. @@ -8623,6 +9538,9 @@ setloclist({nr}, {list} [, {action} [, {what}]]) *setloclist()* Can also be used as a |method|, the base is passed as the second argument: > GetLoclist()->setloclist(winnr) +< + Return type: |Number| + setmatches({list} [, {win}]) *setmatches()* Restores a list of matches saved by |getmatches()| for the @@ -8635,8 +9553,10 @@ setmatches({list} [, {win}]) *setmatches()* Can also be used as a |method|: > GetMatches()->setmatches() < - *setpos()* -setpos({expr}, {list}) + Return type: |Number| + + +setpos({expr}, {list}) *setpos()* Set the position for String {expr}. Possible values: . the cursor 'x mark x @@ -8687,6 +9607,9 @@ setpos({expr}, {list}) Can also be used as a |method|: > GetPosition()->setpos('.') +< + Return type: |Number| + setqflist({list} [, {action} [, {what}]]) *setqflist()* Create or replace or add to the quickfix list. @@ -8805,8 +9728,10 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()* second argument: > GetErrorlist()->setqflist() < - *setreg()* -setreg({regname}, {value} [, {options}]) + Return type: |Number| + + +setreg({regname}, {value} [, {options}]) *setreg()* Set the register {regname} to {value}. If {regname} is "" or "@", the unnamed register '"' is used. The {regname} argument is a string. In |Vim9-script| @@ -8864,6 +9789,9 @@ setreg({regname}, {value} [, {options}]) < Can also be used as a |method|, the base is passed as the second argument: > GetText()->setreg('a') +< + Return type: |Number| + settabvar({tabnr}, {varname}, {val}) *settabvar()* Set tab-local variable {varname} to {val} in tab page {tabnr}. @@ -8878,6 +9806,9 @@ settabvar({tabnr}, {varname}, {val}) *settabvar()* Can also be used as a |method|, the base is passed as the third argument: > GetValue()->settabvar(tab, name) +< + Return type: |Number| + settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()* Set option or local variable {varname} in window {winnr} to @@ -8900,6 +9831,9 @@ settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()* Can also be used as a |method|, the base is passed as the fourth argument: > GetValue()->settabwinvar(tab, winnr, name) +< + Return type: |Number| + settagstack({nr}, {dict} [, {action}]) *settagstack()* Modify the tag stack of the window {nr} using {dict}. @@ -8937,6 +9871,9 @@ settagstack({nr}, {dict} [, {action}]) *settagstack()* Can also be used as a |method|, the base is passed as the second argument: > GetStack()->settagstack(winnr) +< + Return type: |Number| + setwinvar({winnr}, {varname}, {val}) *setwinvar()* Like |settabwinvar()| for the current tab page. @@ -8947,6 +9884,9 @@ setwinvar({winnr}, {varname}, {val}) *setwinvar()* < Can also be used as a |method|, the base is passed as the third argument: > GetValue()->setwinvar(winnr, name) +< + Return type: |Number| + sha256({string}) *sha256()* Returns a String with 64 hex characters, which is the SHA256 @@ -8954,8 +9894,10 @@ sha256({string}) *sha256()* Can also be used as a |method|: > GetText()->sha256() +< + Return type: |String| -< {only available when compiled with the |+cryptv| feature} + {only available when compiled with the |+cryptv| feature} shellescape({string} [, {special}]) *shellescape()* Escape {string} for use as a shell command argument. @@ -8969,11 +9911,12 @@ shellescape({string} [, {special}]) *shellescape()* Otherwise it will enclose {string} in single quotes and replace all "'" with "'\''". - When the {special} argument is present and it's a non-zero - Number or a non-empty String (|non-zero-arg|), then special - items such as "!", "%", "#" and "" will be preceded by - a backslash. This backslash will be removed again by the |:!| - command. + The {special} argument adds additional escaping of keywords + used in Vim commands. When it is not omitted and a non-zero + number or a non-empty String (|non-zero-arg|), then special + items such as "!", "%", "#" and "" (as listed in + |expand()|) will be preceded by a backslash. + This backslash will be removed again by the |:!| command. The "!" character will be escaped (again with a |non-zero-arg| {special}) when 'shell' contains "csh" in the tail. That is @@ -8997,6 +9940,9 @@ shellescape({string} [, {special}]) *shellescape()* Can also be used as a |method|: > GetCommand()->shellescape() +< + Return type: |String| + shiftwidth([{col}]) *shiftwidth()* Returns the effective value of 'shiftwidth'. This is the @@ -9012,6 +9958,8 @@ shiftwidth([{col}]) *shiftwidth()* Can also be used as a |method|: > GetColumn()->shiftwidth() +< + Return type: |Number| sign_ functions are documented here: |sign-functions-details| @@ -9035,6 +9983,9 @@ simplify({filename}) *simplify()* Can also be used as a |method|: > GetName()->simplify() +< + Return type: |String| + sin({expr}) *sin()* Return the sine of {expr}, measured in radians, as a |Float|. @@ -9048,6 +9999,8 @@ sin({expr}) *sin()* Can also be used as a |method|: > Compute()->sin() +< + Return type: |Float| sinh({expr}) *sinh()* @@ -9063,6 +10016,8 @@ sinh({expr}) *sinh()* Can also be used as a |method|: > Compute()->sinh() +< + Return type: |Float| slice({expr}, {start} [, {end}]) *slice()* @@ -9077,6 +10032,8 @@ slice({expr}, {start} [, {end}]) *slice()* Can also be used as a |method|: > GetList()->slice(offset) +< + Return type: list<{type}> sort({list} [, {how} [, {dict}]]) *sort()* *E702* @@ -9156,12 +10113,17 @@ sort({list} [, {how} [, {dict}]]) *sort()* *E702* < For a simple expression you can use a lambda: > eval mylist->sort({i1, i2 -> i1 - i2}) < + Return type: list<{type}> + + sound_clear() *sound_clear()* Stop playing all sounds. On some Linux systems you may need the libcanberra-pulse package, otherwise sound may not stop. + Return type: |Number| + {only available when compiled with the |+sound| feature} *sound_playevent()* @@ -9197,8 +10159,10 @@ sound_playevent({name} [, {callback}]) Can also be used as a |method|: > GetSoundName()->sound_playevent() +< + Return type: |Number| -< {only available when compiled with the |+sound| feature} + {only available when compiled with the |+sound| feature} *sound_playfile()* sound_playfile({path} [, {callback}]) @@ -9209,8 +10173,10 @@ sound_playfile({path} [, {callback}]) < Can also be used as a |method|: > GetSoundPath()->sound_playfile() +< + Return type: |Number| -< {only available when compiled with the |+sound| feature} + {only available when compiled with the |+sound| feature} sound_stop({id}) *sound_stop()* @@ -9225,8 +10191,10 @@ sound_stop({id}) *sound_stop()* Can also be used as a |method|: > soundid->sound_stop() +< + Return type: |Number| -< {only available when compiled with the |+sound| feature} + {only available when compiled with the |+sound| feature} *soundfold()* soundfold({word}) @@ -9240,8 +10208,10 @@ soundfold({word}) Can also be used as a |method|: > GetWord()->soundfold() < - *spellbadword()* -spellbadword([{sentence}]) + Return type: |String| + + +spellbadword([{sentence}]) *spellbadword()* Without argument: The result is the badly spelled word under or after the cursor. The cursor is moved to the start of the bad word. When no bad word is found in the cursor line the @@ -9268,8 +10238,10 @@ spellbadword([{sentence}]) Can also be used as a |method|: > GetText()->spellbadword() < - *spellsuggest()* -spellsuggest({word} [, {max} [, {capital}]]) + Return type: list + + +spellsuggest({word} [, {max} [, {capital}]]) *spellsuggest()* Return a |List| with spelling suggestions to replace {word}. When {max} is given up to this number of suggestions are returned. Otherwise up to 25 suggestions are returned. @@ -9292,6 +10264,9 @@ spellsuggest({word} [, {max} [, {capital}]]) Can also be used as a |method|: > GetWord()->spellsuggest() +< + Return type: list or list + split({string} [, {pattern} [, {keepempty}]]) *split()* Make a |List| out of {string}. When {pattern} is omitted or @@ -9318,6 +10293,8 @@ split({string} [, {pattern} [, {keepempty}]]) *split()* Can also be used as a |method|: > GetString()->split() +< + Return type: list sqrt({expr}) *sqrt()* Return the non-negative square root of Float {expr} as a @@ -9334,6 +10311,8 @@ sqrt({expr}) *sqrt()* Can also be used as a |method|: > Compute()->sqrt() +< + Return type: |Float| srand([{expr}]) *srand()* @@ -9349,6 +10328,9 @@ srand([{expr}]) *srand()* :let seed = srand() :let seed = srand(userinput) :echo rand(seed) +< + Return type: list + state([{what}]) *state()* Return a string which contains characters indicating the @@ -9386,6 +10368,9 @@ state([{what}]) *state()* recursiveness up to "ccc") s screen has scrolled for messages + Return type: |String| + + str2float({string} [, {quoted}]) *str2float()* Convert String {string} to a Float. This mostly works the same as when using a floating point number in an expression, @@ -9407,6 +10392,9 @@ str2float({string} [, {quoted}]) *str2float()* Can also be used as a |method|: > let f = text->substitute(',', '', 'g')->str2float() +< + Return type: |Float| + str2list({string} [, {utf8}]) *str2list()* Return a list containing the number values which represent @@ -9423,6 +10411,8 @@ str2list({string} [, {utf8}]) *str2list()* < Can also be used as a |method|: > GetString()->str2list() +< + Return type: list str2nr({string} [, {base} [, {quoted}]]) *str2nr()* @@ -9446,6 +10436,8 @@ str2nr({string} [, {base} [, {quoted}]]) *str2nr()* Can also be used as a |method|: > GetText()->str2nr() +< + Return type: |Number| strcharlen({string}) *strcharlen()* @@ -9460,6 +10452,8 @@ strcharlen({string}) *strcharlen()* Can also be used as a |method|: > GetText()->strcharlen() +< + Return type: |Number| strcharpart({src}, {start} [, {len} [, {skipcc}]]) *strcharpart()* @@ -9479,6 +10473,8 @@ strcharpart({src}, {start} [, {len} [, {skipcc}]]) *strcharpart()* Can also be used as a |method|: > GetText()->strcharpart(5) +< + Return type: |String| strchars({string} [, {skipcc}]) *strchars()* @@ -9511,6 +10507,9 @@ strchars({string} [, {skipcc}]) *strchars()* < Can also be used as a |method|: > GetText()->strchars() +< + Return type: |Number| + strdisplaywidth({string} [, {col}]) *strdisplaywidth()* The result is a Number, which is the number of display cells @@ -9528,6 +10527,9 @@ strdisplaywidth({string} [, {col}]) *strdisplaywidth()* Can also be used as a |method|: > GetText()->strdisplaywidth() +< + Return type: |Number| + strftime({format} [, {time}]) *strftime()* The result is a String, which is a formatted date and time, as @@ -9550,6 +10552,9 @@ strftime({format} [, {time}]) *strftime()* < Can also be used as a |method|: > GetFormat()->strftime() +< + Return type: |String| + strgetchar({str}, {index}) *strgetchar()* Get a Number corresponding to the character at {index} in @@ -9562,6 +10567,9 @@ strgetchar({str}, {index}) *strgetchar()* Can also be used as a |method|: > GetText()->strgetchar(5) +< + Return type: |Number| + stridx({haystack}, {needle} [, {start}]) *stridx()* The result is a Number, which gives the byte index in @@ -9585,8 +10593,11 @@ stridx({haystack}, {needle} [, {start}]) *stridx()* Can also be used as a |method|: > GetHaystack()->stridx(needle) < - *string()* -string({expr}) Return {expr} converted to a String. If {expr} is a Number, + Return type: |Number| + + +string({expr}) *string()* + Return {expr} converted to a String. If {expr} is a Number, Float, String, Blob or a composition of them, then the result can be parsed back with |eval()|. {expr} type result ~ @@ -9615,6 +10626,8 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number, < Also see |strtrans()|. + Return type: |String| + strlen({string}) *strlen()* The result is a Number, which is the length of the String @@ -9627,6 +10640,9 @@ strlen({string}) *strlen()* Can also be used as a |method|: > GetString()->strlen() +< + Return type: |Number| + strpart({src}, {start} [, {len} [, {chars}]]) *strpart()* The result is a String, which is part of {src}, starting from @@ -9655,6 +10671,9 @@ strpart({src}, {start} [, {len} [, {chars}]]) *strpart()* Can also be used as a |method|: > GetText()->strpart(5) +< + Return type: |String| + strptime({format}, {timestring}) *strptime()* The result is a Number, which is a unix timestamp representing @@ -9685,6 +10704,9 @@ strptime({format}, {timestring}) *strptime()* < Not available on all systems. To check use: > :if exists("*strptime") +< + Return type: |Number| + strridx({haystack}, {needle} [, {start}]) *strridx()* The result is a Number, which gives the byte index in @@ -9706,6 +10728,9 @@ strridx({haystack}, {needle} [, {start}]) *strridx()* Can also be used as a |method|: > GetHaystack()->strridx(needle) +< + Return type: |Number| + strtrans({string}) *strtrans()* The result is a String, which is {string} with all unprintable @@ -9719,6 +10744,9 @@ strtrans({string}) *strtrans()* Can also be used as a |method|: > GetString()->strtrans() +< + Return type: |String| + strutf16len({string} [, {countcc}]) *strutf16len()* The result is a Number, which is the number of UTF-16 code @@ -9742,6 +10770,9 @@ strutf16len({string} [, {countcc}]) *strutf16len()* Can also be used as a |method|: > GetText()->strutf16len() < + Return type: |Number| + + strwidth({string}) *strwidth()* The result is a Number, which is the number of display cells String {string} occupies. A Tab character is counted as one @@ -9753,6 +10784,9 @@ strwidth({string}) *strwidth()* Can also be used as a |method|: > GetString()->strwidth() +< + Return type: |Number| + submatch({nr} [, {list}]) *submatch()* *E935* Only for an expression in a |:substitute| command or @@ -9784,6 +10818,9 @@ submatch({nr} [, {list}]) *submatch()* *E935* Can also be used as a |method|: > GetNr()->submatch() +< + Return type: |String| or list depending on {list} + substitute({string}, {pat}, {sub}, {flags}) *substitute()* The result is a String, which is a copy of {string}, in which @@ -9830,6 +10867,9 @@ substitute({string}, {pat}, {sub}, {flags}) *substitute()* Can also be used as a |method|: > GetString()->substitute(pat, sub, flags) +< + Return type: |String| + swapfilelist() *swapfilelist()* Returns a list of swap file names, like what "vim -r" shows. @@ -9841,6 +10881,9 @@ swapfilelist() *swapfilelist()* let &directory = '.' let swapfiles = swapfilelist() let &directory = save_dir +< + Return type: list + swapinfo({fname}) *swapinfo()* The result is a dictionary, which holds information about the @@ -9863,6 +10906,9 @@ swapinfo({fname}) *swapinfo()* Can also be used as a |method|: > GetFilename()->swapinfo() +< + Return type: dict or dict + swapname({buf}) *swapname()* The result is the swap file path of the buffer {expr}. @@ -9873,6 +10919,9 @@ swapname({buf}) *swapname()* Can also be used as a |method|: > GetBufname()->swapname() +< + Return type: |String| + synID({lnum}, {col}, {trans}) *synID()* The result is a Number, which is the syntax ID at the position @@ -9899,6 +10948,8 @@ synID({lnum}, {col}, {trans}) *synID()* Example (echoes the name of the syntax item under the cursor): > :echo synIDattr(synID(line("."), col("."), 1), "name") < + Return type: |Number| + synIDattr({synID}, {what} [, {mode}]) *synIDattr()* The result is a String, which is the {what} attribute of @@ -9942,6 +10993,8 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()* < Can also be used as a |method|: > :echo synID(line("."), col("."), 1)->synIDtrans()->synIDattr("fg") +< + Return type: |String| synIDtrans({synID}) *synIDtrans()* @@ -9954,6 +11007,9 @@ synIDtrans({synID}) *synIDtrans()* Can also be used as a |method|: > :echo synID(line("."), col("."), 1)->synIDtrans()->synIDattr("fg") +< + Return type: |Number| + synconcealed({lnum}, {col}) *synconcealed()* The result is a |List| with currently three items: @@ -9983,6 +11039,8 @@ synconcealed({lnum}, {col}) *synconcealed()* Note: Doesn't consider |matchadd()| highlighting items, since syntax and matching highlighting are two different mechanisms |syntax-vs-match|. +< + Return type: list synstack({lnum}, {col}) *synstack()* @@ -10004,6 +11062,9 @@ synstack({lnum}, {col}) *synstack()* character in a line and the first column in an empty line are valid positions. + Return type: list or list + + system({expr} [, {input}]) *system()* *E677* Get the output of the shell command {expr} as a |String|. See |systemlist()| to get the output as a |List|. @@ -10066,6 +11127,8 @@ system({expr} [, {input}]) *system()* *E677* Can also be used as a |method|: > :echo GetCmd()->system() +< + Return type: |String| systemlist({expr} [, {input}]) *systemlist()* @@ -10084,6 +11147,8 @@ systemlist({expr} [, {input}]) *systemlist()* Can also be used as a |method|: > :echo GetCmd()->systemlist() +< + Return type: list tabpagebuflist([{arg}]) *tabpagebuflist()* @@ -10101,6 +11166,9 @@ tabpagebuflist([{arg}]) *tabpagebuflist()* Can also be used as a |method|: > GetTabpage()->tabpagebuflist() +< + Return type: list + tabpagenr([{arg}]) *tabpagenr()* The result is a Number, which is the number of the current @@ -10116,6 +11184,8 @@ tabpagenr([{arg}]) *tabpagenr()* Returns zero on error. + Return type: |Number| + tabpagewinnr({tabarg} [, {arg}]) *tabpagewinnr()* Like |winnr()| but for tab page {tabarg}. @@ -10133,10 +11203,15 @@ tabpagewinnr({tabarg} [, {arg}]) *tabpagewinnr()* Can also be used as a |method|: > GetTabpage()->tabpagewinnr() < - *tagfiles()* -tagfiles() Returns a |List| with the file names used to search for tags + Return type: |Number| + + +tagfiles() *tagfiles()* + Returns a |List| with the file names used to search for tags for the current buffer. This is the 'tags' option expanded. + Return type: list or list + taglist({expr} [, {filename}]) *taglist()* Returns a |List| of tags matching the regular expression {expr}. @@ -10183,6 +11258,9 @@ taglist({expr} [, {filename}]) *taglist()* Can also be used as a |method|: > GetTagpattern()->taglist() +< + Return type: list> or list + tan({expr}) *tan()* Return the tangent of {expr}, measured in radians, as a |Float| @@ -10197,6 +11275,8 @@ tan({expr}) *tan()* Can also be used as a |method|: > Compute()->tan() +< + Return type: |Float| tanh({expr}) *tanh()* @@ -10212,6 +11292,8 @@ tanh({expr}) *tanh()* Can also be used as a |method|: > Compute()->tanh() +< + Return type: |Float| tempname() *tempname()* *temp-file-name* @@ -10220,11 +11302,15 @@ tempname() *tempname()* *temp-file-name* is different for at least 26 consecutive calls. Example: > :let tmpfile = tempname() :exe "redir > " .. tmpfile -< For Unix, the file will be in a private directory |tempfile|. +< For Unix, the file will be in a private directory |tempfile| + that is recursively deleted when Vim exits, on other systems + temporary files are not cleaned up automatically on exit. For MS-Windows forward slashes are used when the 'shellslash' option is set, or when 'shellcmdflag' starts with '-' and 'shell' does not contain powershell or pwsh. + Return type: |String| + term_ functions are documented here: |terminal-function-details| @@ -10263,6 +11349,8 @@ terminalprops() *terminalprops()* - |v:termstyleresp| and |v:termblinkresp| for the response to |t_RS| and |t_RC|. + Return type: dict + test_ functions are documented here: |test-functions-details| @@ -10287,8 +11375,11 @@ timer_info([{id}]) Can also be used as a |method|: > GetTimer()->timer_info() +< + Return type: list> or list + + {only available when compiled with the |+timers| feature} -< {only available when compiled with the |+timers| feature} timer_pause({timer}, {paused}) *timer_pause()* Pause or unpause a timer. A paused timer does not invoke its @@ -10305,8 +11396,11 @@ timer_pause({timer}, {paused}) *timer_pause()* Can also be used as a |method|: > GetTimer()->timer_pause(1) +< + Return type: |Number| + + {only available when compiled with the |+timers| feature} -< {only available when compiled with the |+timers| feature} *timer_start()* *timer* *timers* timer_start({time}, {callback} [, {options}]) @@ -10349,8 +11443,12 @@ timer_start({time}, {callback} [, {options}]) GetMsec()->timer_start(callback) < Not available in the |sandbox|. + + Return type: |Number| + {only available when compiled with the |+timers| feature} + timer_stop({timer}) *timer_stop()* Stop a timer. The timer callback will no longer be invoked. {timer} is an ID returned by timer_start(), thus it must be a @@ -10358,16 +11456,22 @@ timer_stop({timer}) *timer_stop()* Can also be used as a |method|: > GetTimer()->timer_stop() +< + Return type: |Number| + + {only available when compiled with the |+timers| feature} -< {only available when compiled with the |+timers| feature} timer_stopall() *timer_stopall()* Stop all timers. The timer callbacks will no longer be invoked. Useful if a timer is misbehaving. If there are no timers there is no error. + Return type: |Number| + {only available when compiled with the |+timers| feature} + tolower({expr}) *tolower()* The result is a copy of the String given, with all uppercase characters turned into lowercase (just like applying |gu| to @@ -10375,6 +11479,9 @@ tolower({expr}) *tolower()* Can also be used as a |method|: > GetText()->tolower() +< + Return type: |String| + toupper({expr}) *toupper()* The result is a copy of the String given, with all lowercase @@ -10383,6 +11490,9 @@ toupper({expr}) *toupper()* Can also be used as a |method|: > GetText()->toupper() +< + Return type: |String| + tr({src}, {fromstr}, {tostr}) *tr()* The result is a copy of the {src} string with all characters @@ -10402,6 +11512,9 @@ tr({src}, {fromstr}, {tostr}) *tr()* Can also be used as a |method|: > GetText()->tr(from, to) +< + Return type: |String| + trim({text} [, {mask} [, {dir}]]) *trim()* Return {text} as a String where any character in {mask} is @@ -10433,6 +11546,9 @@ trim({text} [, {mask} [, {dir}]]) *trim()* Can also be used as a |method|: > GetText()->trim() +< + Return type: |String| + trunc({expr}) *trunc()* Return the largest integral value with magnitude less than or @@ -10450,6 +11566,9 @@ trunc({expr}) *trunc()* Can also be used as a |method|: > Compute()->trunc() < + Return type: |Float| + + *type()* type({expr}) The result is a Number representing the type of {expr}. Instead of using the number directly, it is better to use the @@ -10484,6 +11603,8 @@ type({expr}) The result is a Number representing the type of {expr}. < Can also be used as a |method|: > mylist->type() +< + Return type: |Number| typename({expr}) *typename()* @@ -10492,6 +11613,8 @@ typename({expr}) *typename()* echo typename([1, 2, 3]) < list ~ + Return type: |String| + undofile({name}) *undofile()* Return the name of the undo file that would be used for a file @@ -10508,6 +11631,9 @@ undofile({name}) *undofile()* Can also be used as a |method|: > GetFilename()->undofile() +< + Return type: |String| + undotree([{buf}]) *undotree()* Return the current state of the undo tree for the current @@ -10553,6 +11679,9 @@ undotree([{buf}]) *undotree()* blocks. Each item may again have an "alt" item. + Return type: dict + + uniq({list} [, {func} [, {dict}]]) *uniq()* *E882* Remove second and succeeding copies of repeated adjacent {list} items in-place. Returns {list}. If you want a list @@ -10566,6 +11695,9 @@ uniq({list} [, {func} [, {dict}]]) *uniq()* *E882* Can also be used as a |method|: > mylist->uniq() < + Return type: list<{type}> + + *utf16idx()* utf16idx({string}, {idx} [, {countcc} [, {charidx}]]) Same as |charidx()| but returns the UTF-16 code unit index of @@ -10596,6 +11728,8 @@ utf16idx({string}, {idx} [, {countcc} [, {charidx}]]) < Can also be used as a |method|: > GetName()->utf16idx(idx) +< + Return type: |Number| values({dict}) *values()* @@ -10605,6 +11739,9 @@ values({dict}) *values()* Can also be used as a |method|: > mydict->values() +< + Return type: list + virtcol({expr} [, {list} [, {winid}]]) *virtcol()* The result is a Number, which is the screen column of the file @@ -10616,7 +11753,9 @@ virtcol({expr} [, {list} [, {winid}]]) *virtcol()* set to 8, it returns 8. |conceal| is ignored. For the byte position use |col()|. - For the use of {expr} see |col()|. + For the use of {expr} see |getpos()| and |col()|. + When {expr} is "$", it means the end of the cursor line, so + the result is the number of cells in the cursor line plus one. When 'virtualedit' is used {expr} can be [lnum, col, off], where "off" is the offset in screen columns from the start of @@ -10626,18 +11765,6 @@ virtcol({expr} [, {list} [, {winid}]]) *virtcol()* beyond the end of the line can be returned. Also see |'virtualedit'| - The accepted positions are: - . the cursor position - $ the end of the cursor line (the result is the - number of displayed characters in the cursor line - plus one) - 'x position of mark x (if the mark is not set, 0 is - returned) - v In Visual mode: the start of the Visual area (the - cursor is the end). When not in Visual mode - returns the cursor position. Differs from |'<| in - that it's updated right away. - If {list} is present and non-zero then virtcol() returns a List with the first and last screen position occupied by the character. @@ -10646,6 +11773,7 @@ virtcol({expr} [, {list} [, {winid}]]) *virtcol()* that window instead of the current window. Note that only marks in the current file can be used. + Examples: > " With text "foo^Lbar" and cursor on the "^L": @@ -10656,13 +11784,18 @@ virtcol({expr} [, {list} [, {winid}]]) *virtcol()* " With text " there", with 't at 'h': virtcol("'t") " returns 6 -< The first column is 1. 0 or [0, 0] is returned for an error. +< + The first column is 1. 0 or [0, 0] is returned for an error. + A more advanced example that echoes the maximum length of all lines: > echo max(map(range(1, line('$')), "virtcol([v:val, '$'])")) < Can also be used as a |method|: > GetPos()->virtcol() +< + Return type: |Number| + virtcol2col({winid}, {lnum}, {col}) *virtcol2col()* The result is a Number, which is the byte index of the @@ -10688,6 +11821,9 @@ virtcol2col({winid}, {lnum}, {col}) *virtcol2col()* Can also be used as a |method|: > GetWinid()->virtcol2col(lnum, col) +< + Return type: |Number| + visualmode([{expr}]) *visualmode()* The result is a String, which describes the last Visual mode @@ -10707,6 +11843,9 @@ visualmode([{expr}]) *visualmode()* a non-empty String, then the Visual mode will be cleared and the old value is returned. See |non-zero-arg|. + Return type: |String| + + wildmenumode() *wildmenumode()* Returns |TRUE| when the wildmenu is active and |FALSE| otherwise. See 'wildmenu' and 'wildmode'. @@ -10718,6 +11857,9 @@ wildmenumode() *wildmenumode()* < (Note, this needs the 'wildcharm' option set appropriately). + Return type: |Number| + + win_execute({id}, {command} [, {silent}]) *win_execute()* Like `execute()` but in the context of window {id}. The window will temporarily be made the current window, @@ -10736,6 +11878,9 @@ win_execute({id}, {command} [, {silent}]) *win_execute()* Can also be used as a |method|, the base is passed as the second argument: > GetCommand()->win_execute(winid) +< + Return type: |String| + win_findbuf({bufnr}) *win_findbuf()* Returns a |List| with |window-ID|s for windows that contain @@ -10743,6 +11888,9 @@ win_findbuf({bufnr}) *win_findbuf()* Can also be used as a |method|: > GetBufnr()->win_findbuf() +< + Return type: list or list + win_getid([{win} [, {tab}]]) *win_getid()* Get the |window-ID| for the specified window. @@ -10755,6 +11903,8 @@ win_getid([{win} [, {tab}]]) *win_getid()* Can also be used as a |method|: > GetWinnr()->win_getid() +< + Return type: |Number| win_gettype([{nr}]) *win_gettype()* @@ -10780,6 +11930,9 @@ win_gettype([{nr}]) *win_gettype()* Can also be used as a |method|: > GetWinid()->win_gettype() < + Return type: |String| + + win_gotoid({expr}) *win_gotoid()* Go to window with ID {expr}. This may also change the current tabpage. @@ -10787,6 +11940,9 @@ win_gotoid({expr}) *win_gotoid()* Can also be used as a |method|: > GetWinid()->win_gotoid() +< + Return type: |Number| + win_id2tabwin({expr}) *win_id2tabwin()* Return a list with the tab number and window number of window @@ -10795,6 +11951,9 @@ win_id2tabwin({expr}) *win_id2tabwin()* Can also be used as a |method|: > GetWinid()->win_id2tabwin() +< + Return type: list + win_id2win({expr}) *win_id2win()* Return the window number of window with ID {expr}. @@ -10802,6 +11961,9 @@ win_id2win({expr}) *win_id2win()* Can also be used as a |method|: > GetWinid()->win_id2win() +< + Return type: |Number| + win_move_separator({nr}, {offset}) *win_move_separator()* Move window {nr}'s vertical separator (i.e., the right border) @@ -10820,6 +11982,9 @@ win_move_separator({nr}, {offset}) *win_move_separator()* Can also be used as a |method|: > GetWinnr()->win_move_separator(offset) +< + Return type: |Number| + win_move_statusline({nr}, {offset}) *win_move_statusline()* Move window {nr}'s status line (i.e., the bottom border) by @@ -10835,6 +12000,9 @@ win_move_statusline({nr}, {offset}) *win_move_statusline()* Can also be used as a |method|: > GetWinnr()->win_move_statusline(offset) +< + Return type: |Number| + win_screenpos({nr}) *win_screenpos()* Return the screen position of window {nr} as a list with two @@ -10847,6 +12015,9 @@ win_screenpos({nr}) *win_screenpos()* Can also be used as a |method|: > GetWinid()->win_screenpos() < + Return type: list + + win_splitmove({nr}, {target} [, {options}]) *win_splitmove()* Temporarily switch to window {target}, then move window {nr} to a new split adjacent to {target}. @@ -10870,6 +12041,8 @@ win_splitmove({nr}, {target} [, {options}]) *win_splitmove()* Can also be used as a |method|: > GetWinid()->win_splitmove(target) < + Return type: |Number| + *winbufnr()* winbufnr({nr}) The result is a Number, which is the number of the buffer @@ -10884,11 +12057,17 @@ winbufnr({nr}) The result is a Number, which is the number of the buffer Can also be used as a |method|: > FindWindow()->winbufnr()->bufname() < + Return type: |Number| + + *wincol()* wincol() The result is a Number, which is the virtual column of the cursor in the window. This is counting screen cells from the left side of the window. The leftmost column is one. + Return type: |Number| + + *windowsversion()* windowsversion() The result is a String. For MS-Windows it indicates the OS @@ -10896,6 +12075,8 @@ windowsversion() Windows XP is "5.1". For non-MS-Windows systems the result is an empty string. + Return type: |String| + winheight({nr}) *winheight()* The result is a Number, which is the height of window {nr}. {nr} can be the window number or the |window-ID|. @@ -10909,6 +12090,9 @@ winheight({nr}) *winheight()* < Can also be used as a |method|: > GetWinid()->winheight() < + Return type: |Number| + + winlayout([{tabnr}]) *winlayout()* The result is a nested List containing the layout of windows in a tabpage. @@ -10942,15 +12126,21 @@ winlayout([{tabnr}]) *winlayout()* Can also be used as a |method|: > GetTabnr()->winlayout() < - *winline()* -winline() The result is a Number, which is the screen line of the cursor + Return type: list + + +winline() *winline()* + The result is a Number, which is the screen line of the cursor in the window. This is counting screen lines from the top of the window. The first line is one. If the cursor was moved the view on the file will be updated first, this may cause a scroll. - *winnr()* -winnr([{arg}]) The result is a Number, which is the number of the current + Return type: |Number| + + +winnr([{arg}]) *winnr()* + The result is a Number, which is the number of the current window. The top window has number 1. Returns zero for a popup window. @@ -10983,8 +12173,11 @@ winnr([{arg}]) The result is a Number, which is the number of the current < Can also be used as a |method|: > GetWinval()->winnr() < - *winrestcmd()* -winrestcmd() Returns a sequence of |:resize| commands that should restore + Return type: |Number| + + +winrestcmd() *winrestcmd()* + Returns a sequence of |:resize| commands that should restore the current window sizes. Only works properly when no windows are opened or closed and the current window and tab page is unchanged. @@ -10993,8 +12186,10 @@ winrestcmd() Returns a sequence of |:resize| commands that should restore :call MessWithWindowSizes() :exe cmd < - *winrestview()* -winrestview({dict}) + Return type: |String| + + +winrestview({dict}) *winrestview()* Uses the |Dictionary| returned by |winsaveview()| to restore the view of the current window. Note: The {dict} does not have to contain all values, that are @@ -11013,8 +12208,11 @@ winrestview({dict}) Can also be used as a |method|: > GetView()->winrestview() < - *winsaveview()* -winsaveview() Returns a |Dictionary| that contains information to restore + Return type: |Number| + + +winsaveview() *winsaveview()* + Returns a |Dictionary| that contains information to restore the view of the current window. Use |winrestview()| to restore the view. This is useful if you have a mapping that jumps around in the @@ -11040,6 +12238,8 @@ winsaveview() Returns a |Dictionary| that contains information to restore skipcol columns skipped Note that no option values are saved. + Return type: dict + winwidth({nr}) *winwidth()* The result is a Number, which is the width of window {nr}. @@ -11057,6 +12257,8 @@ winwidth({nr}) *winwidth()* Can also be used as a |method|: > GetWinid()->winwidth() +< + Return type: |Number| wordcount() *wordcount()* @@ -11080,9 +12282,10 @@ wordcount() *wordcount()* visual_words Number of words visually selected (only in Visual mode) + Return type: dict - *writefile()* -writefile({object}, {fname} [, {flags}]) + +writefile({object}, {fname} [, {flags}]) *writefile()* When {object} is a |List| write it to file {fname}. Each list item is separated with a NL. Each list item must be a String or Number. @@ -11130,6 +12333,8 @@ writefile({object}, {fname} [, {flags}]) < Can also be used as a |method|: > GetText()->writefile("thefile") +< + Return type: |Number| xor({expr}, {expr}) *xor()* @@ -11142,6 +12347,7 @@ xor({expr}, {expr}) *xor()* Can also be used as a |method|: > :let bits = bits->xor(0x80) < + Return type: |Number| ============================================================================== 3. Feature list *feature-list* diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index cd3d6ad..50ff4ec 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 9.1. Last change: 2024 Apr 14 +*change.txt* For Vim version 9.1. Last change: 2024 May 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -623,7 +623,8 @@ Vim uses temporary files for filtering, generating diffs and also for tempname(). For Unix, the file will be in a private directory (only accessible by the current user) to avoid security problems (e.g., a symlink attack or other people reading your file). When Vim exits the directory and -all files in it are deleted. When Vim has the setuid bit set this may cause +all files in it are deleted (only on Unix, on other systems you will have to +clean up yourself). When Vim has the setuid bit set this may cause problems, the temp file is owned by the setuid user but the filter command probably runs as the original user. Directory for temporary files is created in the first of these directories @@ -1346,7 +1347,7 @@ The expression must evaluate to a String. A Number is always automatically converted to a String. For the "p" and ":put" command, if the result is a Float it's converted into a String. If the result is a List each element is turned into a String and used as a line. A Dictionary is converted into a -String. A FuncRef results in an error message (use string() to convert). +String. A Funcref results in an error message (use string() to convert). If the "= register is used for the "p" command, the String is split up at characters. If the String ends in a , it is regarded as a linewise @@ -1412,6 +1413,8 @@ The next three commands always work on whole lines. :[range]m[ove] {address} *:m* *:mo* *:move* *E134* Move the lines given by [range] to below the line given by {address}. + Any text properties in [range] are cleared + |text-prop-cleared|. ============================================================================== 6. Formatting text *formatting* diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt index d625a01..f294679 100644 --- a/runtime/doc/channel.txt +++ b/runtime/doc/channel.txt @@ -1,4 +1,4 @@ -*channel.txt* For Vim version 9.1. Last change: 2023 Aug 15 +*channel.txt* For Vim version 9.1. Last change: 2024 Jun 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -502,6 +502,8 @@ ch_canread({handle}) *ch_canread()* Can also be used as a |method|: > GetChannel()->ch_canread() +< + Return type: |Number| ch_close({handle}) *ch_close()* Close {handle}. See |channel-close|. @@ -510,6 +512,8 @@ ch_close({handle}) *ch_close()* Can also be used as a |method|: > GetChannel()->ch_close() +< + Return type: |Number| ch_close_in({handle}) *ch_close_in()* Close the "in" part of {handle}. See |channel-close-in|. @@ -518,6 +522,8 @@ ch_close_in({handle}) *ch_close_in()* Can also be used as a |method|: > GetChannel()->ch_close_in() +< + Return type: |Number| ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()* @@ -541,6 +547,8 @@ ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()* Can also be used as a |method|: > GetChannel()->ch_evalexpr(expr) +< + Return type: dict or |String| ch_evalraw({handle}, {string} [, {options}]) *ch_evalraw()* @@ -559,6 +567,8 @@ ch_evalraw({handle}, {string} [, {options}]) *ch_evalraw()* Can also be used as a |method|: > GetChannel()->ch_evalraw(rawstring) +< + Return type: dict or |String| ch_getbufnr({handle}, {what}) *ch_getbufnr()* Get the buffer number that {handle} is using for String {what}. @@ -569,6 +579,8 @@ ch_getbufnr({handle}, {what}) *ch_getbufnr()* Can also be used as a |method|: > GetChannel()->ch_getbufnr(what) +< + Return type: |Number| ch_getjob({channel}) *ch_getjob()* Get the Job associated with {channel}. @@ -577,7 +589,8 @@ ch_getjob({channel}) *ch_getjob()* Can also be used as a |method|: > GetChannel()->ch_getjob() - +< + Return type: |job| or |String| ch_info({handle}) *ch_info()* Returns a Dictionary with information about {handle}. The @@ -613,7 +626,8 @@ ch_info({handle}) *ch_info()* Can also be used as a |method|: > GetChannel()->ch_info() - +< + Return type: dict ch_log({msg} [, {handle}]) *ch_log()* Write String {msg} in the channel log file, if it was opened @@ -628,7 +642,8 @@ ch_log({msg} [, {handle}]) *ch_log()* Can also be used as a |method|: > 'did something'->ch_log() - +< + Return type: dict ch_logfile({fname} [, {mode}]) *ch_logfile()* Start logging channel activity to {fname}. @@ -655,7 +670,8 @@ ch_logfile({fname} [, {mode}]) *ch_logfile()* Can also be used as a |method|: > 'logfile'->ch_logfile('w') - +< + Return type: |Number| ch_open({address} [, {options}]) *ch_open()* Open a channel to {address}. See |channel|. @@ -669,7 +685,8 @@ ch_open({address} [, {options}]) *ch_open()* Can also be used as a |method|: > GetAddress()->ch_open() - +< + Return type: |channel| ch_read({handle} [, {options}]) *ch_read()* Read from {handle} and return the received message. @@ -680,7 +697,8 @@ ch_read({handle} [, {options}]) *ch_read()* Can also be used as a |method|: > GetChannel()->ch_read() - +< + Return type: |String| ch_readblob({handle} [, {options}]) *ch_readblob()* Like ch_read() but reads binary data and returns a |Blob|. @@ -688,7 +706,8 @@ ch_readblob({handle} [, {options}]) *ch_readblob()* Can also be used as a |method|: > GetChannel()->ch_readblob() - +< + Return type: |Blob| ch_readraw({handle} [, {options}]) *ch_readraw()* Like ch_read() but for a JS and JSON channel does not decode @@ -698,7 +717,8 @@ ch_readraw({handle} [, {options}]) *ch_readraw()* Can also be used as a |method|: > GetChannel()->ch_readraw() - +< + Return type: |String| ch_sendexpr({handle}, {expr} [, {options}]) *ch_sendexpr()* Send {expr} over {handle}. The {expr} is encoded @@ -720,6 +740,8 @@ ch_sendexpr({handle}, {expr} [, {options}]) *ch_sendexpr()* Can also be used as a |method|: > GetChannel()->ch_sendexpr(expr) +< + Return type: dict or |String| ch_sendraw({handle}, {expr} [, {options}]) *ch_sendraw()* @@ -733,7 +755,8 @@ ch_sendraw({handle}, {expr} [, {options}]) *ch_sendraw()* Can also be used as a |method|: > GetChannel()->ch_sendraw(rawexpr) - +< + Return type: dict or |String| ch_setoptions({handle}, {options}) *ch_setoptions()* Set options on {handle}: @@ -751,7 +774,8 @@ ch_setoptions({handle}, {options}) *ch_setoptions()* Can also be used as a |method|: > GetChannel()->ch_setoptions(options) - +< + Return type: |Number| ch_status({handle} [, {options}]) *ch_status()* Return the status of {handle}: @@ -770,6 +794,8 @@ ch_status({handle} [, {options}]) *ch_status()* < Can also be used as a |method|: > GetChannel()->ch_status() +< + Return type: |String| ============================================================================== 9. Starting a job with a channel *job-start* *job* @@ -900,6 +926,8 @@ job_getchannel({job}) *job_getchannel()* < Can also be used as a |method|: > GetJob()->job_getchannel() +< + Return type: |channel| job_info([{job}]) *job_info()* Returns a Dictionary with information about {job}: @@ -927,6 +955,9 @@ job_info([{job}]) *job_info()* Can also be used as a |method|: > GetJob()->job_info() +< + Return type: dict or list depending on whether {job} + was given job_setoptions({job}, {options}) *job_setoptions()* @@ -936,6 +967,8 @@ job_setoptions({job}, {options}) *job_setoptions()* Can also be used as a |method|: > GetJob()->job_setoptions(options) +< + Return type: |Number| job_start({command} [, {options}]) *job_start()* @@ -997,6 +1030,8 @@ job_start({command} [, {options}]) *job_start()* Can also be used as a |method|: > BuildCommand()->job_start() +< + Return type: |job| job_status({job}) *job_status()* *E916* @@ -1020,6 +1055,8 @@ job_status({job}) *job_status()* *E916* Can also be used as a |method|: > GetJob()->job_status() +< + Return type: |String| job_stop({job} [, {how}]) *job_stop()* @@ -1066,6 +1103,8 @@ job_stop({job} [, {how}]) *job_stop()* Can also be used as a |method|: > GetJob()->job_stop() +< + Return type: |Number| ============================================================================== diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index 6a7515a..214571f 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -650,7 +650,7 @@ followed by another Vim command: :[range]! a user defined command without the "-bar" argument |:command| - and the following |Vim9-script| keywords: + and the following |Vim9-script| keywords: :abstract :class :enum diff --git a/runtime/doc/debug.txt b/runtime/doc/debug.txt index 1d3090a..4963fdd 100644 --- a/runtime/doc/debug.txt +++ b/runtime/doc/debug.txt @@ -1,4 +1,4 @@ -*debug.txt* For Vim version 9.1. Last change: 2019 May 07 +*debug.txt* For Vim version 9.1. Last change: 2024 May 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -160,7 +160,7 @@ In WinDbg: choose Open Crash Dump on the File menu. Follow the instructions in 3.5 Obtaining Microsoft Debugging Tools ~ The Debugging Tools for Windows (including WinDbg) can be downloaded from - http://www.microsoft.com/whdc/devtools/debugging/default.mspx + https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/debugger-download-tools This includes the WinDbg debugger. Visual C++ 2005 Express Edition can be downloaded for free from: diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 1b1ad85..678a924 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -1,4 +1,4 @@ -*develop.txt* For Vim version 9.1. Last change: 2022 Sep 20 +*develop.txt* For Vim version 9.1. Last change: 2024 May 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -152,7 +152,7 @@ VIM IS... NOT *design-not* everything but the kitchen sink, but some people say that you can clean one with it. ;-)" To use Vim with gdb see |terminal-debugger|. Other (older) tools can be - found at http://www.agide.org and http://clewn.sf.net. + found at http://www.agide.org (link seems dead) and http://clewn.sf.net. - Vim is not a fancy GUI editor that tries to look nice at the cost of being less consistent over all platforms. But functional GUI features are welcomed. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index fd37d97..18cd2c1 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 9.1. Last change: 2024 Mar 28 +*eval.txt* For Vim version 9.1. Last change: 2024 Jun 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2727,7 +2727,7 @@ v:vim_did_enter Zero until most of startup is done. It is set to one just v:warningmsg Last given warning message. It's allowed to set this variable. *v:windowid* *windowid-variable* -v:windowid When any X11 based GUI is running or when running in a +v:windowid When any X11/Wayland based GUI is running or when running in a terminal and Vim connects to the X server (|-X|) this will be set to the window ID. When an MS-Windows GUI is running this will be set to the @@ -3099,7 +3099,7 @@ text... :cons[t] {var-name} = {expr1} :cons[t] [{name1}, {name2}, ...] = {expr1} :cons[t] [{name}, ..., ; {lastname}] = {expr1} -:cons[t] {var-name} =<< [trim] {marker} +:cons[t] {var-name} =<< [trim] [eval] {marker} text... text... {marker} diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index f8a8ebe..927b75c 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -1,4 +1,4 @@ -*filetype.txt* For Vim version 9.1. Last change: 2024 Apr 18 +*filetype.txt* For Vim version 9.1. Last change: 2024 May 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -452,6 +452,18 @@ To disable folding everything under the title use this: > let asciidoc_fold_under_title = 0 +ARDUINO *ft-arduino-plugin* + +By default the following options are set, in accordance with the default +settings of Arduino IDE: > + + setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2 + +To disable this behavior, set the following variable in your vimrc: > + + let g:arduino_recommended_style = 0 + + AWK *ft-awk-plugin* Support for features specific to GNU Awk, like @include, can be enabled by @@ -627,6 +639,12 @@ The mapping can be disabled with: > let g:no_gprof_maps = 1 +HARE *ft-hare* + +Since the text for this plugin is rather long it has been put in a separate +file: |ft_hare.txt|. + + JAVA *ft-java-plugin* Whenever the variable "g:ftplugin_java_source_path" is defined and its value @@ -877,6 +895,31 @@ The mappings can be disabled with: > let g:no_vim_maps = 1 +ZIG *ft-zig-plugin* + + *g:zig_recommended_style* +By default the following indentation options are set, in accordance with Zig's +recommended style (https://ziglang.org/documentation/master/): > + + setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8 +< +To disable this behavior, set |g:zig_recommended_style| to 0: > + + let g:zig_recommended_style = 0 +< + *g:zig_std_dir* +The path to the Zig standard library. The Zig |ftplugin| reads |g:zig_std_dir| +and appends it to the 'path' for Zig files. Where the Zig standard library +is located is system and installation method dependent. + +One can automatically set |g:zig_std_dir| using `zig env`: > + + let g:zig_std_dir = json_decode(system('zig env'))['std_dir'] +< +This can, for example, be put in a FileType |:autocmd| or user |ftplugin| to +only load when a Zig file is opened. + + ZIMBU *ft-zimbu-plugin* The Zimbu filetype plugin defines mappings to move to the start and end of diff --git a/runtime/doc/ft_hare.txt b/runtime/doc/ft_hare.txt new file mode 100644 index 0000000..937c5e0 --- /dev/null +++ b/runtime/doc/ft_hare.txt @@ -0,0 +1,77 @@ +*ft_hare.txt* Support for the Hare programming language + +============================================================================== +CONTENTS *hare* + +1. Introduction |hare-intro| +2. Filetype plugin |hare-plugin| +3. Settings |hare-settings| + +============================================================================== +INTRODUCTION *hare-intro* + +This plugin provides syntax highlighting, indentation, and other functionality +for the Hare programming language. Support is also provided for README files +inside Hare modules, but this must be enabled by setting |g:filetype_haredoc|. + +============================================================================== +FILETYPE PLUGIN *hare-plugin* + +This plugin automatically sets the value of 'path' to include the contents of +the HAREPATH environment variable, allowing commands such as |gf| to directly +open standard library or third-party modules. If HAREPATH is not set, it +defaults to the recommended paths for most Unix-like filesystems, namely +/usr/src/hare/stdlib and /usr/src/hare/third-party. + +============================================================================== +SETTINGS *hare-settings* + +This plugin provides a small number of variables that you can define in your +vimrc to configure its behavior. + + *g:filetype_haredoc* +This plugin is able to automatically detect Hare modules and set the "haredoc" +filetype for any README files. As the recursive directory search used as a +heuristic has a minor performance impact, this feature is disabled by default +and must be specifically opted into: > + let g:filetype_haredoc = 1 +< +See |g:haredoc_search_depth| for ways to tweak the searching behavior. + + *g:hare_recommended_style* +The following options are set by default, in accordance with the official Hare +style guide: > + setlocal noexpandtab + setlocal shiftwidth=0 + setlocal softtabstop=0 + setlocal tabstop=8 + setlocal textwidth=80 +< +To disable this behavior: > + let g:hare_recommended_style = 0 +< + *g:hare_space_error* +By default, trailing whitespace and tabs preceded by space characters are +highlighted as errors. This is automatically turned off when in insert mode. +To disable this highlighting completely: > + let g:hare_space_error = 0 +< + *g:haredoc_search_depth* +By default, when |g:filetype_haredoc| is enabled, only the current directory +and its immediate subdirectories are searched for Hare files. The maximum +search depth may be adjusted with: > + let g:haredoc_search_depth = 2 +< + Value Effect~ + 0 Only search the current directory. + 1 Search the current directory and immediate + subdirectories. + 2 Search the current directory and two levels of + subdirectories. + +The maximum search depth can be set to any integer, but using values higher +than 2 is not recommended, and will likely provide no tangible benefit in most +situations. + +============================================================================== + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index 3fda6e1..3b55919 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -1,4 +1,4 @@ -*gui.txt* For Vim version 9.1. Last change: 2024 Apr 17 +*gui.txt* For Vim version 9.1. Last change: 2024 May 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -498,14 +498,14 @@ Starting off with the default set is a good idea. You can add more items, or, if you don't like the defaults at all, start with removing all menus |:unmenu-all|. You can also avoid the default menus being loaded by adding this line to your .vimrc file (NOT your .gvimrc file!): > - :let did_install_default_menus = 1 + :let g:did_install_default_menus = 1 If you also want to avoid the Syntax menu: > - :let did_install_syntax_menu = 1 + :let g:did_install_syntax_menu = 1 The first item in the Syntax menu can be used to show all available filetypes in the menu (which can take a bit of time to load). If you want to have all filetypes already present at startup, add: > - :let do_syntax_sel_menu = 1 - + :let g:do_syntax_sel_menu = 1 +< *menu-lazyload* *g:do_no_lazyload_menus* The following menuitems show all available color schemes, keymaps and compiler settings: Edit > Color Scheme ~ @@ -515,7 +515,7 @@ However, they can also take a bit of time to load, because they search all related files from the directories in 'runtimepath'. Therefore they are loaded lazily (by the |CursorHold| event), or you can also load them manually. If you want to have all these items already present at startup, add: > - :let do_no_lazyload_menus = 1 + :let g:do_no_lazyload_menus = 1 Note that the menu.vim is sourced when `:syntax on` or `:filetype on` is executed or after your .vimrc file is sourced. This means that the 'encoding' @@ -1238,7 +1238,8 @@ This section describes other features which are related to the GUI. endif A recommended Japanese font is MS Mincho. You can find info here: -http://www.lexikan.com/mincho.htm +https://learn.microsoft.com/en-us/typography/font-list/ms-mincho +It should be distributed with Windows. ============================================================================== 8. Shell Commands *gui-shell* diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index 7109bae..faa5f32 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -1,4 +1,4 @@ -*help.txt* For Vim version 9.1. Last change: 2022 Dec 03 +*help.txt* For Vim version 9.1. Last change: 2024 May 27 VIM - main help file k @@ -162,7 +162,8 @@ Programming language support ~ |filetype.txt| settings done specifically for a type of file |quickfix.txt| commands for a quick edit-compile-fix cycle |ft_ada.txt| Ada (the programming language) support -|ft_context.txt| Filetype plugin for ConTeXt +|ft_context.txt| Filetype plugin for ConTeXt +|ft_hare.txt| Filetype plugin for Hare |ft_mp.txt| Filetype plugin for METAFONT and MetaPost |ft_ps1.txt| Filetype plugin for Windows PowerShell |ft_raku.txt| Filetype plugin for Raku diff --git a/runtime/doc/if_cscop.txt b/runtime/doc/if_cscop.txt index 3fa8f81..bb4c6a1 100644 --- a/runtime/doc/if_cscop.txt +++ b/runtime/doc/if_cscop.txt @@ -1,4 +1,4 @@ -*if_cscop.txt* For Vim version 9.1. Last change: 2022 Jan 08 +*if_cscop.txt* For Vim version 9.1. Last change: 2024 May 11 VIM REFERENCE MANUAL by Andy Kahn @@ -358,7 +358,7 @@ system calls: fork(), pipe(), execl(), waitpid(). This means it is mostly limited to Unix systems. Additionally Cscope support works for Win32. For more information and a -cscope version for Win32 see: +cscope version for Win32 see (link seems dead): http://iamphet.nm.ru/cscope/index.html diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index 8456d08..6236841 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -1,4 +1,4 @@ -*if_pyth.txt* For Vim version 9.1. Last change: 2023 Oct 25 +*if_pyth.txt* For Vim version 9.1. Last change: 2024 May 16 VIM REFERENCE MANUAL by Paul Moore @@ -343,7 +343,8 @@ In python vim.VIM_SPECIAL_PATH special directory is used as a replacement for the list of paths found in 'runtimepath': with this directory in sys.path and vim.path_hooks in sys.path_hooks python will try to load module from {rtp}/python2 (or python3) and {rtp}/pythonx (for both python versions) for -each {rtp} found in 'runtimepath'. +each {rtp} found in 'runtimepath' (Note: find_module() has been removed from +imp module around Python 3.12.0a7). Implementation is similar to the following, but written in C: > @@ -404,10 +405,12 @@ vim.VIM_SPECIAL_PATH *python-VIM_SPECIAL_PATH* vim.find_module(...) *python-find_module* vim.path_hook(path) *python-path_hook* +vim.find_spec(...) *python-find_spec* Methods or objects used to implement path loading as described above. You should not be using any of these directly except for vim.path_hook - in case you need to do something with sys.meta_path. It is not - guaranteed that any of the objects will exist in the future vim + in case you need to do something with sys.meta_path, vim.find_spec() + is available starting with Python 3.7. + It is not guaranteed that any of the objects will exist in future vim versions. vim._get_paths *python-_get_paths* diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index fe24505..2e57423 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -1261,5 +1261,5 @@ By default, the yaml indent script does not try to detect multiline scalars. If you want to enable this, set the following variable: > let g:yaml_indent_multiline_scalar = 1 - +< vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 1229726..365f49a 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 9.1. Last change: 2024 Jan 25 +*map.txt* For Vim version 9.1. Last change: 2024 May 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -986,11 +986,11 @@ For the Meta modifier the "T" character is used. For example, to map Meta-b in Insert mode: > :imap terrible -1.12 MAPPING SUPER-KEYS or COMMAND-KEYS *:map-super-keys* *:map-cmd-key* +1.12 MAPPING SUPER-KEYS or COMMAND-KEYS *:map-super-keys* *:map-cmd-key* -The Super modifier is available in GUI mode (when |gui_running| is 1) for -GVim on Linux and MacVim on Mac OS. If you're on a Mac, this represents the -Command key, on Linux with the GTK GUI it represents the Super key. +The Super modifier is available in GUI mode (when |gui_running| is 1) for gVim +on Linux and MacVim on Mac OS. If you're on a Mac, this represents the Command +key, on Linux with the GTK GUI it represents the Super key. The character "D" is used for the Super / Command modifier. For example, to map Command-b in Insert mode: > diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt index 91154a7..3bb2bfb 100644 --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -1,4 +1,4 @@ -*mbyte.txt* For Vim version 9.1. Last change: 2022 Apr 03 +*mbyte.txt* For Vim version 9.1. Last change: 2024 Jun 09 VIM REFERENCE MANUAL by Bram Moolenaar et al. @@ -451,18 +451,19 @@ Useful utilities for converting the charset: Chinese: hc Hc is "Hanzi Converter". Hc convert a GB file to a Big5 file, or Big5 file to GB file. Hc can be found at: + https://www.freshports.org/chinese/hc ftp://ftp.cuhk.hk/pub/chinese/ifcss/software/unix/convert/hc-30.tar.gz Korean: hmconv Hmconv is Korean code conversion utility especially for E-mail. It can convert between EUC-KR and ISO-2022-KR. Hmconv can be found at: - ftp://ftp.kaist.ac.kr/pub/hangul/code/hmconv/ + https://www.freshports.org/korean/hmconv/ Multilingual: lv Lv is a Powerful Multilingual File Viewer. And it can be worked as |charset| converter. Supported |charset|: ISO-2022-CN, ISO-2022-JP, ISO-2022-KR, EUC-CN, EUC-JP, EUC-KR, EUC-TW, UTF-7, UTF-8, ISO-8859 - series, Shift_JIS, Big5 and HZ. Lv can be found at: + series, Shift_JIS, Big5 and HZ. Lv can be found at (link seems dead): http://www.ff.iij4u.or.jp/~nrt/lv/index.html @@ -777,13 +778,13 @@ is suitable for complex input, such as CJK. For example, there are xwnmo and kinput2 Japanese |IM-server|, both are FrontEnd system. Xwnmo is distributed with Wnn (see below), kinput2 can be - found at: ftp://ftp.sra.co.jp/pub/x11/kinput2/ + found at (link seems dead): ftp://ftp.sra.co.jp/pub/x11/kinput2/ For Chinese, there's a great XIM server named "xcin", you can input both Traditional and Simplified Chinese characters. And it can accept other - locale if you make a correct input table. Xcin can be found at: - http://cle.linux.org.tw/xcin/ - Others are scim: http://scim.freedesktop.org/ and fcitx: + locale if you make a correct input table. Xcin can be found at (link seems + dead): http://cle.linux.org.tw/xcin/ + Others are scim: https://www.freedesktop.org/wiki/Software/scim/ and fcitx: http://www.fcitx.org/ - Conversion Server @@ -801,7 +802,7 @@ is suitable for complex input, such as CJK. pronounced in Hira-gana, second, we convert Hira-gana to Kanji or Kata-Kana, if needed. There are some Kana-Kanji conversion server: jserver (distributed with Wnn, see below) and canna. Canna can be found at: - http://canna.sourceforge.jp/ + https://osdn.net/projects/canna/ There is a good input system: Wnn4.2. Wnn 4.2 contains, xwnmo (|IM-server|) @@ -1355,7 +1356,7 @@ You might also want to select the font used for the menus. Unfortunately this doesn't always work. See the system specific remarks below, and 'langmenu'. -USING UTF-8 IN X-Windows *utf-8-in-xwindows* +USING UTF-8 IN X-WINDOWS *utf-8-in-xwindows* Note: This section does not apply to the GTK+ 2 GUI. diff --git a/runtime/doc/netbeans.txt b/runtime/doc/netbeans.txt index a62123c..ee227b4 100644 --- a/runtime/doc/netbeans.txt +++ b/runtime/doc/netbeans.txt @@ -1,4 +1,4 @@ -*netbeans.txt* For Vim version 9.1. Last change: 2023 Nov 26 +*netbeans.txt* For Vim version 9.1. Last change: 2024 May 11 VIM REFERENCE MANUAL by Gordon Prieur et al. @@ -77,8 +77,8 @@ Initially just a Java IDE, NetBeans has had C, C++, and Fortran support added in recent releases. For more information visit the main NetBeans web site http://www.netbeans.org. -The External Editor is now, unfortunately, declared obsolete. See - http://externaleditor.netbeans.org. +The External Editor is now, unfortunately, declared obsolete. See (link seems +dead): http://externaleditor.netbeans.org. Sun Microsystems, Inc. also ships NetBeans under the name Sun ONE Studio. Visit http://www.sun.com for more information regarding the Sun ONE Studio @@ -147,8 +147,9 @@ On MS-Windows: The Win32 support is now in beta stage. To use XPM signs on Win32 (e.g. when using with NetBeans) you can compile -XPM by yourself or use precompiled libraries from http://iamphet.nm.ru/misc/ -(for MS Visual C++) or http://gnuwin32.sourceforge.net (for MinGW). +XPM by yourself or use precompiled libraries from (link seems dead): +http://iamphet.nm.ru/misc/ (for MS Visual C++) or +http://gnuwin32.sourceforge.net (for MinGW). Enable debugging: ----------------- @@ -946,7 +947,8 @@ for details on downloading this module if your NetBeans release does not have it. For C, C++, and Fortran support you will also need the cpp module. See -http://cpp.netbeans.org for information regarding this module. +http://cpp.netbeans.org (link seems dead) for information regarding this +module. You can also download Sun ONE Studio from Sun Microsystems, Inc for a 30 day free trial. See http://www.sun.com for further details. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 806f5f0..6ec4031 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 9.1. Last change: 2024 Mar 29 +*options.txt* For Vim version 9.1. Last change: 2024 Jun 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1909,13 +1909,14 @@ A jump table for the options with a short description can be found at |Q_op|. insert a space. *'commentstring'* *'cms'* *E537* -'commentstring' 'cms' string (default "/*%s*/") +'commentstring' 'cms' string (default "/* %s */") local to buffer {not available when compiled without the |+folding| feature} A template for a comment. The "%s" in the value is replaced with the - comment text. Currently only used to add markers for folding, see - |fold-marker|. + comment text, and should be padded with a space when possible. + Currently used to add markers for folding, see |fold-marker|. Also + commonly used by commenting plugins (e.g. |comment-install|). *'compatible'* *'cp'* *'nocompatible'* *'nocp'* 'compatible' 'cp' boolean (default on, off when a |vimrc| or |gvimrc| @@ -2100,7 +2101,7 @@ A jump table for the options with a short description can be found at |Q_op|. *'completeopt'* *'cot'* 'completeopt' 'cot' string (default: "menu,preview") - global + global or local to buffer |global-local| A comma-separated list of options for Insert mode completion |ins-completion|. The supported values are: @@ -2143,6 +2144,14 @@ A jump table for the options with a short description can be found at |Q_op|. select one from the menu. Only works in combination with "menu" or "menuone". + fuzzy Enable |fuzzy-matching| for completion candidates. This + allows for more flexible and intuitive matching, where + characters can be skipped and matches can be found even + if the exact sequence is not typed. Only makes a + difference how completion candidates are reduced from the + list of alternatives, but not how the candidates are + collected (using different completion types). + *'completepopup'* *'cpp'* 'completepopup' 'cpp' string (default empty) global @@ -4266,12 +4275,14 @@ A jump table for the options with a short description can be found at |Q_op|. T:DiffText,>:SignColumn,-:Conceal, B:SpellBad,P:SpellCap,R:SpellRare, L:SpellLocal,+:Pmenu,=:PmenuSel, + k:PmenuMatch,<:PmenuMatchSel, [:PmenuKind,]:PmenuKindSel, {:PmenuExtra,}:PmenuExtraSel, x:PmenuSbar,X:PmenuThumb,*:TabLine, #:TabLineSel,_:TabLineFill,!:CursorColumn, .:CursorLine,o:ColorColumn,q:QuickFixLine, - z:StatusLineTerm,Z:StatusLineTermNC") + z:StatusLineTerm,Z:StatusLineTermNC, + g:MsgArea") global This option can be used to set highlighting mode for various occasions. It is a comma-separated list of character pairs. The @@ -4290,6 +4301,7 @@ A jump table for the options with a short description can be found at |Q_op|. |hl-Search| l last search pattern highlighting (see 'hlsearch') |hl-MoreMsg| m |more-prompt| |hl-ModeMsg| M Mode (e.g., "-- INSERT --") + |hl-MsgArea| g |Command-line| and message area |hl-LineNr| n line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. |hl-LineNrAbove| a line number above the cursor for when the @@ -4330,6 +4342,8 @@ A jump table for the options with a short description can be found at |Q_op|. |hl-PmenuExtraSel| } popup menu "extra" selected line |hl-PmenuSbar| x popup menu scrollbar |hl-PmenuThumb| X popup menu scrollbar thumb + |hl-PmenuMatch| k popup menu matched text + |hl-PmenuMatchSel| < popup menu matched text in selected line The display modes are: r reverse (termcap entry "mr" and "me") @@ -6683,7 +6697,8 @@ A jump table for the options with a short description can be found at |Q_op|. < *'runtimepath'* *'rtp'* *vimfiles* 'runtimepath' 'rtp' string (default: - Unix: "$HOME/.vim, + Unix: "$HOME/.vim or + $XDG_CONFIG_HOME/vim, $VIM/vimfiles, $VIMRUNTIME, $VIM/vimfiles/after, @@ -6735,6 +6750,8 @@ A jump table for the options with a short description can be found at |Q_op|. And any other file searched for with the |:runtime| command. + For $XDG_CONFIG_HOME see |xdg-base-dir|. + The defaults for most systems are setup to search five locations: 1. In your home directory, for your personal preferences. 2. In a system-wide Vim directory, for preferences from the system @@ -7233,8 +7250,8 @@ A jump table for the options with a short description can be found at |Q_op|. message; also for quickfix message (e.g., ":cn") s don't give "search hit BOTTOM, continuing at TOP" or *shm-s* "search hit TOP, continuing at BOTTOM" messages; when using - the search count do not show "W" after the count message (see - S below) + the search count do not show "W" before the count message + (see |shm-S| below) t truncate file message at the start if it is too long *shm-t* to fit on the command-line, "<" will appear in the left most column; ignored in Ex mode @@ -7256,7 +7273,11 @@ A jump table for the options with a short description can be found at |Q_op|. `:silent` was used for the command; note that this also affects messages from autocommands and 'autoread' reloading S do not show search count message when searching, e.g. *shm-S* - "[1/5]" + "[1/5]". When the "S" flag is not present (e.g. search count + is shown), the "search hit BOTTOM, continuing at TOP" and + "search hit TOP, continuing at BOTTOM" messages are only + indicated by a "W" (Mnemonic: Wrapped) letter before the + search count statistics. This gives you the opportunity to avoid that a change between buffers requires you to hit , but still gives as useful a message as @@ -8986,13 +9007,15 @@ A jump table for the options with a short description can be found at |Q_op|. *'viewdir'* *'vdir'* 'viewdir' 'vdir' string (default for Amiga: "home:vimfiles/view", for Win32: "$HOME/vimfiles/view", - for Unix: "$HOME/.vim/view", + for Unix: "$HOME/.vim/view" or + "$XDG_CONFIG_HOME/vim/view" for macOS: "$VIM/vimfiles/view", for VMS: "sys$login:vimfiles/view") global {not available when compiled without the |+mksession| feature} Name of the directory where to store files for |:mkview|. + For $XDG_CONFIG_HOME see |xdg-base-dir|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. diff --git a/runtime/doc/os_vms.txt b/runtime/doc/os_vms.txt index 862f31d..4549c00 100644 --- a/runtime/doc/os_vms.txt +++ b/runtime/doc/os_vms.txt @@ -1,4 +1,4 @@ -*os_vms.txt* For Vim version 9.1. Last change: 2023 Dec 14 +*os_vms.txt* For Vim version 9.1. Last change: 2024 May 11 VIM REFERENCE MANUAL @@ -40,7 +40,6 @@ Or use one of the mirrors: You can download precompiled executables from: http://www.polarhome.com/vim/ - ftp://ftp.polarhome.com/pub/vim/ To use the precompiled binary version, you need one of these archives: diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt index bbe9940..54c8e91 100644 --- a/runtime/doc/os_win32.txt +++ b/runtime/doc/os_win32.txt @@ -1,4 +1,4 @@ -*os_win32.txt* For Vim version 9.1. Last change: 2023 Dec 04 +*os_win32.txt* For Vim version 9.1. Last change: 2024 May 11 VIM REFERENCE MANUAL by George Reilly @@ -250,8 +250,7 @@ A. Basically what you need is to put a tee program that will copy its input copy of tee (and a number of other GNU tools) at http://gnuwin32.sourceforge.net or http://unxutils.sourceforge.net Alternatively, try the more recent Cygnus version of the GNU tools at - http://www.cygwin.com Other Unix-style tools for Win32 are listed at - http://directory.google.com/Top/Computers/Software/Operating_Systems/Unix/Win32/ + http://www.cygwin.com When you do get a copy of tee, you'll need to add > :set shellpipe=\|\ tee < to your _vimrc. diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index f16e7d2..183806a 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 9.1. Last change: 2024 Apr 26 +*pattern.txt* For Vim version 9.1. Last change: 2024 Jun 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1513,5 +1513,7 @@ the matching positions and the fuzzy match scores. The "f" flag of `:vimgrep` enables fuzzy matching. +To enable fuzzy matching for |ins-completion|, add the "fuzzy" value to the +'completeopt' option. vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index 2b22105..aeaca0b 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -1,4 +1,4 @@ -*pi_netrw.txt* For Vim version 9.1. Last change: 2023 Jun 19 +*pi_netrw.txt* For Vim version 9.1. Last change: 2024 May 11 ------------------------------------------------ NETRW REFERENCE MANUAL by Charles E. Campbell @@ -449,10 +449,6 @@ settings are described below, in |netrw-browser-options|, and in messages don't always seem to show up this way, but one doesn't have to quit the window. - *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank - lines that o/s's ftp "provides" on transfers - =0 force normal ftp behavior (no trailing line removal) - *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also permits network browsing to use ls with time and size sorting (default if windows) @@ -828,8 +824,6 @@ set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|) g:netrw_uid Holds current user-id for ftp. g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default) =1 use WinNT/2K/XP's rcp, binary mode - g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc - =1 use default method to do ftp > ----------------------------------------------------------------------- < *netrw-internal-variables* @@ -958,21 +952,8 @@ messages) you may write a NetReadFixup() function: endfunction > The NetReadFixup() function will be called if it exists and thus allows you to -customize your reading process. As a further example, contains -just such a function to handle Windows 95 ftp. For whatever reason, Windows -95's ftp dumps four blank lines at the end of a transfer, and so it is -desirable to automate their removal. Here's some code taken from -itself: -> - if has("win95") && g:netrw_win95ftp - fun! NetReadFixup(method, line1, line2) - if method == 3 " ftp (no <.netrc>) - let fourblanklines= line2 - 3 - silent fourblanklines .. "," .. line2 .. "g/^\s*/d" - endif - endfunction - endif -> +customize your reading process. + (Related topics: |ftp| |netrw-userpass| |netrw-start|) ============================================================================== @@ -2052,11 +2033,7 @@ passwords: better way to do that: I can use a regular ssh account which uses a password to access the material without the need to key-in the password each time. It's good for security and convenience. I tried ssh public key - authorization + ssh-agent, implementing this, and it works! Here are two - links with instructions: - - http://www.ibm.com/developerworks/library/l-keyc2/ - http://sial.org/howto/openssh/publickey-auth/ + authorization + ssh-agent, implementing this, and it works! Ssh hints: @@ -3412,16 +3389,7 @@ Example: Clear netrw's marked file list via a mapping on gu > (This section is likely to grow as I get feedback) (also see |netrw-debug|) *netrw-p1* - P1. I use windows 95, and my ftp dumps four blank lines at the {{{2 - end of every read. - - See |netrw-fixup|, and put the following into your - <.vimrc> file: - - let g:netrw_win95ftp= 1 - - *netrw-p2* - P2. I use Windows, and my network browsing with ftp doesn't sort by {{{2 + P1. I use Windows, and my network browsing with ftp doesn't sort by {{{2 time or size! -or- The remote system is a Windows server; why don't I get sorts by time or size? @@ -3447,8 +3415,8 @@ Example: Clear netrw's marked file list via a mapping on gu > modify its listing behavior. - *netrw-p3* - P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw {{{2 + *netrw-p2* + P2. I tried rcp://user@host/ (or protocol other than ftp) and netrw {{{2 used ssh! That wasn't what I asked for... Netrw has two methods for browsing remote directories: ssh @@ -3456,8 +3424,8 @@ Example: Clear netrw's marked file list via a mapping on gu > When it comes time to do download a file (not just a directory listing), netrw will use the given protocol to do so. - *netrw-p4* - P4. I would like long listings to be the default. {{{2 + *netrw-p3* + P3. I would like long listings to be the default. {{{2 Put the following statement into your |.vimrc|: > @@ -3466,8 +3434,8 @@ Example: Clear netrw's marked file list via a mapping on gu > Check out |netrw-browser-var| for more customizations that you can set. - *netrw-p5* - P5. My times come up oddly in local browsing {{{2 + *netrw-p4* + P4. My times come up oddly in local browsing {{{2 Does your system's strftime() accept the "%c" to yield dates such as "Sun Apr 27 11:49:23 1997"? If not, do a @@ -3476,16 +3444,16 @@ Example: Clear netrw's marked file list via a mapping on gu > let g:netrw_timefmt= "%X" (where X is the option) < - *netrw-p6* - P6. I want my current directory to track my browsing. {{{2 + *netrw-p5* + P5. I want my current directory to track my browsing. {{{2 How do I do that? Put the following line in your |.vimrc|: > let g:netrw_keepdir= 0 < - *netrw-p7* - P7. I use Chinese (or other non-ascii) characters in my filenames, {{{2 + *netrw-p6* + P6. I use Chinese (or other non-ascii) characters in my filenames, {{{2 and netrw (Explore, Sexplore, Hexplore, etc) doesn't display them! (taken from an answer provided by Wu Yongwei on the vim @@ -3499,8 +3467,8 @@ Example: Clear netrw's marked file list via a mapping on gu > (...it is one more reason to recommend that people use utf-8!) - *netrw-p8* - P8. I'm getting "ssh is not executable on your system" -- what do I {{{2 + *netrw-p7* + P7. I'm getting "ssh is not executable on your system" -- what do I {{{2 do? (Dudley Fox) Most people I know use putty for windows ssh. It @@ -3582,8 +3550,8 @@ Example: Clear netrw's marked file list via a mapping on gu > of the others will use the string in g:netrw_ssh_cmd by default. - *netrw-p9* *netrw-ml_get* - P9. I'm browsing, changing directory, and bang! ml_get errors {{{2 + *netrw-p8* *netrw-ml_get* + P8. I'm browsing, changing directory, and bang! ml_get errors {{{2 appear and I have to kill vim. Any way around this? Normally netrw attempts to avoid writing swapfiles for @@ -3593,8 +3561,8 @@ Example: Clear netrw's marked file list via a mapping on gu > in your <.vimrc>: > let g:netrw_use_noswf= 0 < - *netrw-p10* - P10. I'm being pestered with "[something] is a directory" and {{{2 + *netrw-p9* + P9. I'm being pestered with "[something] is a directory" and {{{2 "Press ENTER or type command to continue" prompts... The "[something] is a directory" prompt is issued by Vim, @@ -3604,8 +3572,8 @@ Example: Clear netrw's marked file list via a mapping on gu > I also suggest that you set your |'cmdheight'| to 2 (or more) in your <.vimrc> file. - *netrw-p11* - P11. I want to have two windows; a thin one on the left and my {{{2 + *netrw-p10* + P10. I want to have two windows; a thin one on the left and my {{{2 editing window on the right. How may I accomplish this? You probably want netrw running as in a side window. If so, you @@ -3630,8 +3598,8 @@ Example: Clear netrw's marked file list via a mapping on gu > to select the file. - *netrw-p12* - P12. My directory isn't sorting correctly, or unwanted letters are {{{2 + *netrw-p11* + P11. My directory isn't sorting correctly, or unwanted letters are {{{2 appearing in the listed filenames, or things aren't lining up properly in the wide listing, ... @@ -3640,8 +3608,8 @@ Example: Clear netrw's marked file list via a mapping on gu > Multibyte encodings use two (or more) bytes per character. You may need to change |g:netrw_sepchr| and/or |g:netrw_xstrlen|. - *netrw-p13* - P13. I'm a Windows + putty + ssh user, and when I attempt to {{{2 + *netrw-p12* + P12. I'm a Windows + putty + ssh user, and when I attempt to {{{2 browse, the directories are missing trailing "/"s so netrw treats them as file transfers instead of as attempts to browse subdirectories. How may I fix this? @@ -3661,8 +3629,8 @@ Example: Clear netrw's marked file list via a mapping on gu > "let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe" "let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe" < - *netrw-p14* - P14. I would like to speed up writes using Nwrite and scp/ssh {{{2 + *netrw-p13* + P13. I would like to speed up writes using Nwrite and scp/ssh {{{2 style connections. How? (Thomer M. Gil) Try using ssh's ControlMaster and ControlPath (see the ssh_config @@ -3688,8 +3656,8 @@ Example: Clear netrw's marked file list via a mapping on gu > vim scp://host.domain.com//home/user/.bashrc < - *netrw-p15* - P15. How may I use a double-click instead of netrw's usual single {{{2 + *netrw-p14* + P14. How may I use a double-click instead of netrw's usual single {{{2 click to open a file or directory? (Ben Fritz) First, disable netrw's mapping with > @@ -3701,8 +3669,8 @@ Example: Clear netrw's marked file list via a mapping on gu > all netrw's mouse mappings, not just the one. (see |g:netrw_mousemaps|) - *netrw-p16* - P16. When editing remote files (ex. :e ftp://hostname/path/file), {{{2 + *netrw-p15* + P15. When editing remote files (ex. :e ftp://hostname/path/file), {{{2 under Windows I get an |E303| message complaining that its unable to open a swap file. @@ -3710,8 +3678,8 @@ Example: Clear netrw's marked file list via a mapping on gu > directory. Start netrw from your $HOME or other writable directory. - *netrw-p17* - P17. Netrw is closing buffers on its own. {{{2 + *netrw-p16* + P16. Netrw is closing buffers on its own. {{{2 What steps will reproduce the problem? 1. :Explore, navigate directories, open a file 2. :Explore, open another file @@ -3724,15 +3692,15 @@ Example: Clear netrw's marked file list via a mapping on gu > It appears that the buffers are not exactly closed; a ":ls!" will show them (although ":ls" does not). - *netrw-P18* - P18. How to locally edit a file that's only available via {{{2 + *netrw-P17* + P17. How to locally edit a file that's only available via {{{2 another server accessible via ssh? See http://stackoverflow.com/questions/12469645/ "Using Vim to Remotely Edit A File on ServerB Only Accessible From ServerA" - *netrw-P19* - P19. How do I get numbering on in directory listings? {{{2 + *netrw-P18* + P18. How do I get numbering on in directory listings? {{{2 With |g:netrw_bufsettings|, you can control netrw's buffer settings; try putting > let g:netrw_bufsettings="noma nomod nu nobl nowrap ro nornu" @@ -3740,8 +3708,8 @@ Example: Clear netrw's marked file list via a mapping on gu > instead, try > let g:netrw_bufsettings="noma nomod nonu nobl nowrap ro rnu" < - *netrw-P20* - P20. How may I have gvim start up showing a directory listing? {{{2 + *netrw-P19* + P19. How may I have gvim start up showing a directory listing? {{{2 Try putting the following code snippet into your .vimrc: > augroup VimStartup au! @@ -3753,8 +3721,8 @@ Example: Clear netrw's marked file list via a mapping on gu > This snippet assumes that you have client-server enabled (ie. a "huge" vim version). - *netrw-P21* - P21. I've made a directory (or file) with an accented character, {{{2 + *netrw-P20* + P20. I've made a directory (or file) with an accented character, {{{2 but netrw isn't letting me enter that directory/read that file: Its likely that the shell or o/s is using a different encoding @@ -3764,8 +3732,8 @@ Example: Clear netrw's marked file list via a mapping on gu > au FileType netrw set enc=latin1 < - *netrw-P22* - P22. I get an error message when I try to copy or move a file: {{{2 + *netrw-P21* + P21. I get an error message when I try to copy or move a file: {{{2 **error** (netrw) tried using g:netrw_localcopycmd; it doesn't work! diff --git a/runtime/doc/pi_tar.txt b/runtime/doc/pi_tar.txt index 0ab111c..5b317d6 100644 --- a/runtime/doc/pi_tar.txt +++ b/runtime/doc/pi_tar.txt @@ -1,4 +1,4 @@ -*pi_tar.txt* For Vim version 9.1. Last change: 2022 Oct 17 +*pi_tar.txt* For Vim version 9.1. Last change: 2024 May 11 +====================+ | Tar File Interface | @@ -164,7 +164,8 @@ Copyright 2005-2017: *tar-copyright* v2 * converted to use Vim7's new autoload feature by Bram Moolenaar v1 (original) * Michael Toren - (see http://michael.toren.net/code/) + (see http://michael.toren.net/code/ + link seems dead) ============================================================================== vim:tw=78:ts=8:noet:ft=help diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt index f5cb12f..1ad4fb9 100644 --- a/runtime/doc/popup.txt +++ b/runtime/doc/popup.txt @@ -1,4 +1,4 @@ -*popup.txt* For Vim version 9.1. Last change: 2022 Oct 07 +*popup.txt* For Vim version 9.1. Last change: 2024 Jun 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -219,6 +219,8 @@ popup_atcursor({what}, {options}) *popup_atcursor()* Can also be used as a |method|: > GetText()->popup_atcursor({}) +< + Return type: |Number| popup_beval({what}, {options}) *popup_beval()* @@ -237,6 +239,8 @@ popup_beval({what}, {options}) *popup_beval()* Can also be used as a |method|: > GetText()->popup_beval({}) < + Return type: |Number| + *popup_clear()* popup_clear([{force}]) Emergency solution to a misbehaving plugin: close all popup @@ -248,6 +252,8 @@ popup_clear([{force}]) when it is the current window. If a terminal is running in a popup it is killed. + Return type: |Number| + popup_close({id} [, {result}]) *popup_close()* Close popup {id}. The window and the associated buffer will @@ -260,6 +266,8 @@ popup_close({id} [, {result}]) *popup_close()* Can also be used as a |method|: > GetPopup()->popup_close() +< + Return type: |Number| popup_create({what}, {options}) *popup_create()* @@ -290,6 +298,8 @@ popup_create({what}, {options}) *popup_create()* Can also be used as a |method|: > GetText()->popup_create({}) +< + Return type: |Number| popup_dialog({what}, {options}) *popup_dialog()* @@ -314,6 +324,8 @@ popup_dialog({what}, {options}) *popup_dialog()* Can also be used as a |method|: > GetText()->popup_dialog({}) +< + Return type: |Number| popup_filter_menu({id}, {key}) *popup_filter_menu()* @@ -336,6 +348,8 @@ popup_filter_menu({id}, {key}) *popup_filter_menu()* To add shortcut keys, see the example here: |popup_menu-shortcut-example| + Return type: |Number| + popup_filter_yesno({id}, {key}) *popup_filter_yesno()* Filter that can be used for a popup. It handles only the keys @@ -346,12 +360,16 @@ popup_filter_yesno({id}, {key}) *popup_filter_yesno()* keys are ignored. See the example here: |popup_dialog-example| + Return type: |Number| + popup_findecho() *popup_findecho()* Get the |window-ID| for the popup that shows messages for the `:echowindow` command. Return zero if there is none. Mainly useful to hide the popup. + Return type: |Number| + popup_findinfo() *popup_findinfo()* Get the |window-ID| for the popup info window, as it used by @@ -361,11 +379,16 @@ popup_findinfo() *popup_findinfo()* the item in the popup menu. Returns zero if there is none. + Return type: |Number| + popup_findpreview() *popup_findpreview()* Get the |window-ID| for the popup preview window. Return zero if there is none. + Return type: |Number| + + popup_getoptions({id}) *popup_getoptions()* Return the {options} for popup {id} in a Dict. A zero value means the option was not set. For "zindex" the @@ -399,6 +422,8 @@ popup_getoptions({id}) *popup_getoptions()* Can also be used as a |method|: > GetPopup()->popup_getoptions() +< + Return type: dict popup_getpos({id}) *popup_getpos()* @@ -428,6 +453,8 @@ popup_getpos({id}) *popup_getpos()* Can also be used as a |method|: > GetPopup()->popup_getpos() +< + Return type: dict or dict popup_hide({id}) *popup_hide()* @@ -440,11 +467,15 @@ popup_hide({id}) *popup_hide()* Can also be used as a |method|: > GetPopup()->popup_hide() +< + Return type: |Number| popup_list() *popup_list()* Return a List with the |window-ID| of all existing popups. + Return type: list or list + popup_locate({row}, {col}) *popup_locate()* Return the |window-ID| of the popup at screen position {row} @@ -452,6 +483,8 @@ popup_locate({row}, {col}) *popup_locate()* highest zindex is returned. If there are no popups at this position then zero is returned. + Return type: |Number| + popup_menu({what}, {options}) *popup_menu()* Show the {what} near the cursor, handle selecting one of the @@ -484,6 +517,8 @@ popup_menu({what}, {options}) *popup_menu()* < Can also be used as a |method|: > GetChoices()->popup_menu({}) +< + Return type: |Number| popup_move({id}, {options}) *popup_move()* @@ -503,6 +538,8 @@ popup_move({id}, {options}) *popup_move()* Can also be used as a |method|: > GetPopup()->popup_move(options) +< + Return type: |Number| popup_notification({what}, {options}) *popup_notification()* @@ -533,6 +570,8 @@ popup_notification({what}, {options}) *popup_notification()* Can also be used as a |method|: > GetText()->popup_notification({}) +< + Return type: |Number| popup_setoptions({id}, {options}) *popup_setoptions()* @@ -569,6 +608,8 @@ popup_setoptions({id}, {options}) *popup_setoptions()* Can also be used as a |method|: > GetPopup()->popup_setoptions(options) +< + Return type: |Number| popup_settext({id}, {text}) *popup_settext()* @@ -580,6 +621,8 @@ popup_settext({id}, {text}) *popup_settext()* Can also be used as a |method|: > GetPopup()->popup_settext('hello') +< + Return type: |Number| popup_show({id}) *popup_show()* @@ -588,6 +631,8 @@ popup_show({id}) *popup_show()* If {id} is the info popup it will be positioned next to the current popup menu item. + Return type: |Number| + ============================================================================== 3. Usage *popup-usage* diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt index 84fca44..55a9c37 100644 --- a/runtime/doc/print.txt +++ b/runtime/doc/print.txt @@ -1,4 +1,4 @@ -*print.txt* For Vim version 9.1. Last change: 2022 Oct 01 +*print.txt* For Vim version 9.1. Last change: 2024 May 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -497,10 +497,11 @@ No CJK fonts are supplied with Vim. There are some free Korean, Japanese, and Traditional Chinese fonts available at: http://examples.oreilly.com/cjkvinfo/adobe/samples/ + https://resources.oreilly.com/examples/9781565922242/ You can find descriptions of the various fonts in the read me file at - http://examples.oreilly.de/english_examples/cjkvinfo/adobe/00README + https://resources.oreilly.com/examples/9781565922242/-/blob/master/00README Please read your printer documentation on how to install new fonts. @@ -591,7 +592,7 @@ There are three available versions: - GNU Ghostscript which is available under the GNU General Public License. It can be obtained from: - ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/gnu/ + https://www.gnu.org/software/ghostscript - A commercial version for inclusion in commercial products. @@ -616,10 +617,7 @@ X11 - Ghostview. Obtainable from: http://www.cs.wisc.edu/~ghost/gv/ - -- gv. Derived from Ghostview. Obtainable from: - - http://wwwthep.physik.uni-mainz.de/~plass/gv/ + https://www.gnu.org/software/gv/ Copies (possibly not the most recent) can be found at: @@ -627,7 +625,8 @@ X11 OpenVMS -- Is apparently supported in the main code now (untested). See: +- Is apparently supported in the main code now (untested). + See (link seems dead): http://wwwthep.physik.uni-mainz.de/~plass/gv/ @@ -644,12 +643,6 @@ Linux http://www.cs.wisc.edu/~ghost/gsview/ -- BMV. Different from Ghostview and gv in that it doesn't use X but svgalib. - Obtainable from: - - ftp://sunsite.unc.edu/pub/Linux/apps/graphics/viewers/svga/bmv-1.2.tgz - - 7.3 PSUtils PSUtils is a collection of utility programs for manipulating PostScript diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index e659d39..e2aef24 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 9.1. Last change: 2023 Apr 15 +*quickfix.txt* For Vim version 9.1. Last change: 2024 Jun 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -287,7 +287,8 @@ processing a quickfix or location list command, it will be aborted. current window is used instead of the quickfix list. *:cb* *:cbuffer* *E681* -:cb[uffer][!] [bufnr] Read the error list from the current buffer. +:[range]cb[uffer][!] [bufnr] + Read the error list from the current buffer. When [bufnr] is given it must be the number of a loaded buffer. That buffer will then be used instead of the current buffer. @@ -296,26 +297,31 @@ processing a quickfix or location list command, it will be aborted. See |:cc| for [!]. *:lb* *:lbuffer* -:lb[uffer][!] [bufnr] Same as ":cbuffer", except the location list for the +:[range]lb[uffer][!] [bufnr] + Same as ":cbuffer", except the location list for the current window is used instead of the quickfix list. *:cgetb* *:cgetbuffer* -:cgetb[uffer] [bufnr] Read the error list from the current buffer. Just +:[range]cgetb[uffer] [bufnr] + Read the error list from the current buffer. Just like ":cbuffer" but don't jump to the first error. *:lgetb* *:lgetbuffer* -:lgetb[uffer] [bufnr] Same as ":cgetbuffer", except the location list for +:[range]lgetb[uffer] [bufnr] + Same as ":cgetbuffer", except the location list for the current window is used instead of the quickfix list. *:cad* *:cadd* *:caddbuffer* -:cad[dbuffer] [bufnr] Read the error list from the current buffer and add +:[range]cad[dbuffer] [bufnr] + Read the error list from the current buffer and add the errors to the current quickfix list. If a quickfix list is not present, then a new list is created. Otherwise, same as ":cbuffer". *:laddb* *:laddbuffer* -:laddb[uffer] [bufnr] Same as ":caddbuffer", except the location list for +:[range]laddb[uffer] [bufnr] + Same as ":caddbuffer", except the location list for the current window is used instead of the quickfix list. @@ -1297,6 +1303,14 @@ g:compiler_gcc_ignore_unmatched_lines positives. +JAVAC *compiler-javac* + +Commonly used compiler options can be added to 'makeprg' by setting the +g:javac_makeprg_params variable. For example: > + + let g:javac_makeprg_params = "-Xlint:all -encoding utf-8" +< + MANX AZTEC C *quickfix-manx* *compiler-manx* To use Vim with Manx's Aztec C compiler on the Amiga you should do the @@ -1329,7 +1343,7 @@ passed to make, say :make html or :make pdf. Additional arguments can be passed to pandoc: - either by appending them to make, say `:make html --self-contained` . -- or setting them in `b:pandoc_compiler_args` or `g:pandoc_compiler_args` +- or setting them in `b:pandoc_compiler_args` or `g:pandoc_compiler_args`. PERL *quickfix-perl* *compiler-perl* diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt index 02240f0..dac3a57 100644 --- a/runtime/doc/sign.txt +++ b/runtime/doc/sign.txt @@ -1,4 +1,4 @@ -*sign.txt* For Vim version 9.1. Last change: 2023 Feb 21 +*sign.txt* For Vim version 9.1. Last change: 2024 Jun 08 VIM REFERENCE MANUAL by Gordon Prieur @@ -435,6 +435,9 @@ sign_define({list}) < Can also be used as a |method|: > GetSignList()->sign_define() +< + Return type: |Number| + sign_getdefined([{name}]) *sign_getdefined()* Get a list of defined signs and their attributes. @@ -473,6 +476,9 @@ sign_getdefined([{name}]) *sign_getdefined()* < Can also be used as a |method|: > GetSignList()->sign_getdefined() +< + Return type: list> or list + sign_getplaced([{buf} [, {dict}]]) *sign_getplaced()* Return a list of signs placed in a buffer or all the buffers. @@ -537,8 +543,10 @@ sign_getplaced([{buf} [, {dict}]]) *sign_getplaced()* Can also be used as a |method|: > GetBufname()->sign_getplaced() < - *sign_jump()* -sign_jump({id}, {group}, {buf}) + Return type: list> + + +sign_jump({id}, {group}, {buf}) *sign_jump()* Open the buffer {buf} or jump to the window that contains {buf} and position the cursor at sign {id} in group {group}. This is similar to the |:sign-jump| command. @@ -556,6 +564,9 @@ sign_jump({id}, {group}, {buf}) Can also be used as a |method|: > GetSignid()->sign_jump() < + Return type: |Number| + + *sign_place()* sign_place({id}, {group}, {name}, {buf} [, {dict}]) Place the sign defined as {name} at line {lnum} in file or @@ -608,8 +619,10 @@ sign_place({id}, {group}, {name}, {buf} [, {dict}]) Can also be used as a |method|: > GetSignid()->sign_place(group, name, expr) < - *sign_placelist()* -sign_placelist({list}) + Return type: |Number| + + +sign_placelist({list}) *sign_placelist()* Place one or more signs. This is similar to the |sign_place()| function. The {list} argument specifies the List of signs to place. Each list item is a dict with the @@ -669,6 +682,9 @@ sign_placelist({list}) < Can also be used as a |method|: > GetSignlist()->sign_placelist() +< + Return type: |Number| + sign_undefine([{name}]) *sign_undefine()* sign_undefine({list}) @@ -695,6 +711,9 @@ sign_undefine({list}) < Can also be used as a |method|: > GetSignlist()->sign_undefine() +< + Return type: |Number| + sign_unplace({group} [, {dict}]) *sign_unplace()* Remove a previously placed sign in one or more buffers. This @@ -741,6 +760,9 @@ sign_unplace({group} [, {dict}]) *sign_unplace()* < Can also be used as a |method|: > GetSigngroup()->sign_unplace() < + Return type: |Number| + + sign_unplacelist({list}) *sign_unplacelist()* Remove previously placed signs from one or more buffers. This is similar to the |sign_unplace()| function. @@ -772,5 +794,6 @@ sign_unplacelist({list}) *sign_unplacelist()* Can also be used as a |method|: > GetSignlist()->sign_unplacelist() < + Return type: list or list vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index dea3adb..809e3a8 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -1,4 +1,4 @@ -*spell.txt* For Vim version 9.1. Last change: 2023 May 25 +*spell.txt* For Vim version 9.1. Last change: 2024 May 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -62,6 +62,17 @@ To search for the next misspelled word: *[S* [S Like "]S" but search backwards. + *]r* +]r Move to next "rare" word after the cursor. + A count before the command can be used to repeat. + 'wrapscan' applies. + + *[r* +[r Like "]r" but search backwards, find the "rare" + word before the cursor. Doesn't recognize words + split over two lines, thus may stop at words that are + not highlighted as rare. + To add words to your own word list: @@ -903,7 +914,7 @@ right encoding. *spell-AUTHOR* *spell-EMAIL* *spell-COPYRIGHT* NAME Name of the language VERSION 1.0.1 with fixes - HOME http://www.myhome.eu + HOME AUTHOR John Doe EMAIL john AT Doe DOT net COPYRIGHT LGPL diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index b83a61e..30e85ed 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1,4 +1,4 @@ -*starting.txt* For Vim version 9.1. Last change: 2024 Apr 21 +*starting.txt* For Vim version 9.1. Last change: 2024 Jun 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -104,9 +104,9 @@ rvim vim -Z Like "vim", but in restricted mode (see |-Z|) *rvim* rview vim -RZ Like "view", but in restricted mode. *rview* rgvim vim -gZ Like "gvim", but in restricted mode. *rgvim* rgview vim -RgZ Like "gview", but in restricted mode. *rgview* -evim vim -y Easy Vim: set 'insertmode' (see |-y|) *evim* -eview vim -yR Like "evim" in read-only mode *eview* -vimdiff vim -d Start in diff mode |diff-mode| +evim vim -y Easy Vim: set 'insertmode' (see |-y|) *evim* +eview vim -yR Like "evim" in read-only mode *eview* +vimdiff vim -d Start in diff mode |diff-mode| gvimdiff vim -gd Start in diff mode |diff-mode| Additional characters may follow, they are ignored. For example, you can have @@ -428,8 +428,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly. --not-a-term Tells Vim that the user knows that the input and/or output is not connected to a terminal. This will avoid the warning and the two second delay that would happen. - Also avoids the "Reading from stdin..." message. - Also avoids the "N files to edit" message. + Also avoids the "Reading from stdin..." as well as the + "N files to edit" message. --gui-dialog-file {name} *--gui-dialog-file* When using the GUI, instead of showing a dialog, write the @@ -812,7 +812,7 @@ accordingly. Vim proceeds in this order: Places for your personal initializations: Unix $HOME/.vimrc, $HOME/.vim/vimrc - or $XDG_CONFIG_HOME/vim/vimrc + or $XDG_CONFIG_HOME/vim/vimrc MS-Windows $HOME/_vimrc, $HOME/vimfiles/vimrc or $VIM/_vimrc Amiga s:.vimrc, home:.vimrc, home:vimfiles:vimrc @@ -1119,8 +1119,8 @@ feature backward compatible). However, if you want to migrate to use and `~/.vim/vimrc` file. *xdg-runtime* -When the |xdg-vimrc| is used the |'runtimepath'| will be modified accordingly -to respect the |xdg-base-dir|: > +When the |xdg-vimrc| is used the 'runtimepath' and 'packpath' options will be +modified accordingly to respect the |xdg-base-dir|: > "$XDG_CONFIG_HOME/vim,$VIMRUNTIME,/after,$XDG_CONFIG_HOME/vim/after" < @@ -1712,7 +1712,8 @@ most of the information will be restored). |viminfo-file-name| above). If [!] is given, then any information that is already set (registers, marks, |v:oldfiles|, etc.) - will be overwritten. + will be overwritten. "E195" may be given, when + 'viminfofile' has been set to "NONE". *:wv* *:wviminfo* *E137* *E138* *E574* *E886* *E929* :wv[iminfo][!] [file] Write to viminfo file [file] (default: see diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index bfc4645..c07c3a4 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 9.1. Last change: 2024 Apr 26 +*syntax.txt* For Vim version 9.1. Last change: 2024 Jun 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -935,18 +935,19 @@ ASTRO *astro.vim* *ft-astro-syntax* Configuration The following variables control certain syntax highlighting features. -You can add them to your .vimrc: > +You can add them to your .vimrc. + +To enable TypeScript and TSX for ".astro" files (default "disable"): > let g:astro_typescript = "enable" < -Enables TypeScript and TSX for ".astro" files. Default Value: "disable" > +To enable Stylus for ".astro" files (default "disable"): > let g:astro_stylus = "enable" < -Enables Stylus for ".astro" files. Default Value: "disable" - NOTE: You need to install an external plugin to support stylus in astro files. -ASPPERL and ASPVBS *ft-aspperl-syntax* *ft-aspvbs-syntax* +ASPPERL *ft-aspperl-syntax* +ASPVBS *ft-aspvbs-syntax* *.asp and *.asa files could be either Perl or Visual Basic script. Since it's hard to detect this you can set two global variables to tell Vim what you are @@ -1482,9 +1483,9 @@ Two syntax highlighting files exist for Euphoria. One for Euphoria version 3.1.1, which is the default syntax highlighting file, and one for Euphoria version 4.0.5 or later. -Euphoria version 3.1.1 (http://www.rapideuphoria.com/) is still necessary -for developing applications for the DOS platform, which Euphoria version 4 -(http://www.openeuphoria.org/) does not support. +Euphoria version 3.1.1 (http://www.rapideuphoria.com/ link seems dead) is +still necessary for developing applications for the DOS platform, which +Euphoria version 4 (http://www.openeuphoria.org/) does not support. The following file extensions are auto-detected as Euphoria file type: @@ -1541,7 +1542,8 @@ Elixir. FLEXWIKI *flexwiki.vim* *ft-flexwiki-syntax* -FlexWiki is an ASP.NET-based wiki package available at http://www.flexwiki.com +FlexWiki is an ASP.NET-based wiki package which used to be available at +http://www.flexwiki.com NOTE: This site currently doesn't work, on Wikipedia is mentioned that development stopped in 2009. @@ -1907,7 +1909,7 @@ Note: Syntax folding might slow down syntax highlighting significantly, especially for large files. -HTML/OS (by Aestiva) *htmlos.vim* *ft-htmlos-syntax* +HTML/OS (BY AESTIVA) *htmlos.vim* *ft-htmlos-syntax* The coloring scheme for HTML/OS works as follows: @@ -2014,15 +2016,25 @@ Function names are not highlighted, as the way to find functions depends on how you write Java code. The syntax file knows two possible ways to highlight functions: -If you write function declarations that are always indented by either -a tab, 8 spaces or 2 spaces you may want to set > +If you write function declarations that are consistently indented by either +a tab, or a space . . . or eight space character(s), you may want to set > :let java_highlight_functions="indent" + :let java_highlight_functions="indent1" + :let java_highlight_functions="indent2" + :let java_highlight_functions="indent3" + :let java_highlight_functions="indent4" + :let java_highlight_functions="indent5" + :let java_highlight_functions="indent6" + :let java_highlight_functions="indent7" + :let java_highlight_functions="indent8" +Note that in terms of 'shiftwidth', this is the leftmost step of indentation. However, if you follow the Java guidelines about how functions and classes are -supposed to be named (with respect to upper and lowercase), use > +supposed to be named (with respect to upper- and lowercase) and there is any +amount of indentation, you may want to set > :let java_highlight_functions="style" -If both options do not work for you, but you would still want function -declarations to be highlighted create your own definitions by changing the -definitions in java.vim or by creating your own java.vim which includes the +If neither setting does work for you, but you would still want function +declarations to be highlighted, create your own definitions by changing the +definitions in java.vim or by creating your own java.vim that includes the original one and then adds the code to highlight functions. In Java 1.1 the functions System.out.println() and System.err.println() should @@ -3036,6 +3048,13 @@ To highlight R code in knitr chunk headers, add to your |vimrc|: > let rrst_syn_hl_chunk = 1 +RASI *rasi.vim* *ft-rasi-syntax* + +Rasi stands for Rofi Advanced Style Information. It is used by the program +rofi to style the rendering of the search window. The language is heavily +inspired by CSS stylesheet. Files with the following extensions are recognized +as rasi files: .rasi. + READLINE *readline.vim* *ft-readline-syntax* The readline library is primarily used by the BASH shell, which adds quite a @@ -3752,6 +3771,19 @@ set "tf_minlines" to the value you desire. Example: > :let tf_minlines = your choice < +TYPESCRIPT *typescript.vim* *ft-typescript-syntax* + *typescriptreact.vim* *ft-typescriptreact-syntax* + +There is one option to control the TypeScript syntax highlighting. + + *g:typescript_host_keyword* +When this variable is set to 1, host-specific APIs such as `addEventListener` +are highlighted. To disable set it to zero in your .vimrc: > + + let g:typescript_host_keyword = 0 +< +The default value is 1. + VIM *vim.vim* *ft-vim-syntax* *g:vimsyn_minlines* *g:vimsyn_maxlines* There is a trade-off between more accurate syntax highlighting versus screen @@ -3770,35 +3802,42 @@ The g:vimsyn_embed option allows users to select what, if any, types of embedded script highlighting they wish to have. > g:vimsyn_embed == 0 : don't support any embedded scripts - g:vimsyn_embed =~ 'l' : support embedded lua - g:vimsyn_embed =~ 'm' : support embedded mzscheme - g:vimsyn_embed =~ 'p' : support embedded perl - g:vimsyn_embed =~ 'P' : support embedded python - g:vimsyn_embed =~ 'r' : support embedded ruby - g:vimsyn_embed =~ 't' : support embedded tcl + g:vimsyn_embed =~ 'l' : support embedded Lua + g:vimsyn_embed =~ 'm' : support embedded MzScheme + g:vimsyn_embed =~ 'p' : support embedded Perl + g:vimsyn_embed =~ 'P' : support embedded Python + g:vimsyn_embed =~ 'r' : support embedded Ruby + g:vimsyn_embed =~ 't' : support embedded Tcl < By default, g:vimsyn_embed is a string supporting interpreters that your vim -itself supports. Concatenate multiple characters to support multiple types -of embedded interpreters; ie. g:vimsyn_embed= "mp" supports embedded mzscheme -and embedded perl. +itself supports. Concatenate the indicated characters to support multiple +types of embedded interpreters (e.g., g:vimsyn_embed = "mp" supports embedded +mzscheme and embedded perl). *g:vimsyn_folding* - -Some folding is now supported with syntax/vim.vim: > +Some folding is now supported with when 'foldmethod' is set to "syntax": > g:vimsyn_folding == 0 or doesn't exist: no syntax-based folding g:vimsyn_folding =~ 'a' : augroups g:vimsyn_folding =~ 'f' : fold functions g:vimsyn_folding =~ 'h' : fold heredocs g:vimsyn_folding =~ 'H' : fold Vim9-script legacy headers - g:vimsyn_folding =~ 'l' : fold lua script - g:vimsyn_folding =~ 'm' : fold mzscheme script - g:vimsyn_folding =~ 'p' : fold perl script - g:vimsyn_folding =~ 'P' : fold python script - g:vimsyn_folding =~ 'r' : fold ruby script - g:vimsyn_folding =~ 't' : fold tcl script -let g:vimsyn_folding = 'acfhlmpPrt' + g:vimsyn_folding =~ 'l' : fold Lua script + g:vimsyn_folding =~ 'm' : fold MzScheme script + g:vimsyn_folding =~ 'p' : fold Perl script + g:vimsyn_folding =~ 'P' : fold Python script + g:vimsyn_folding =~ 'r' : fold Ruby script + g:vimsyn_folding =~ 't' : fold Tcl script < - *g:vimsyn_noerror* + +By default, g:vimsyn_folding is unset. Concatenate the indicated characters +to support folding of multiple syntax constructs (e.g., +g:vimsyn_folding = "fh" will enable folding of both functions and heredocs). + + *g:vimsyn_comment_strings* +By default, strings are highlighted inside comments. This may be disabled by +setting g:vimsyn_comment_strings to false. + + *g:vimsyn_noerror* Not all error highlighting that syntax/vim.vim does may be correct; Vim script is a difficult language to highlight correctly. A way to suppress error highlighting is to put the following line in your |vimrc|: > @@ -5645,6 +5684,10 @@ PmenuExtraSel Popup menu: Selected item "extra text". PmenuSbar Popup menu: Scrollbar. *hl-PmenuThumb* PmenuThumb Popup menu: Thumb of the scrollbar. + *hl-PmenuMatch* +PmenuMatch Popup menu: Matched text in normal item. + *hl-PmenuMatchSel* +PmenuMatchSel Popup menu: Matched text in selected item. *hl-PopupNotification* PopupNotification Popup window created with |popup_notification()|. If not diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index a922604..abbc778 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -1,4 +1,4 @@ -*tabpage.txt* For Vim version 9.1. Last change: 2024 Mar 25 +*tabpage.txt* For Vim version 9.1. Last change: 2024 May 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -225,8 +225,9 @@ gT Go to the previous tab page. Wraps around from the first one *:tabl* *:tablast* :tabl[ast] Go to the last tab page. - *g* *CTRL-W_g* ** -g Go to the last accessed tab page. + *g* *CTRL-W_g* ** +g +CTRL-W g Go to the last accessed tab page. Other commands: *:tabs* diff --git a/runtime/doc/tags b/runtime/doc/tags index 8096f5d..794fa0c 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -2015,6 +2015,7 @@ $quote eval.txt /*$quote* 52.3 usr_52.txt /*52.3* 52.4 usr_52.txt /*52.4* 52.5 usr_52.txt /*52.5* +52.6 usr_52.txt /*52.6* 8g8 various.txt /*8g8* 90.1 usr_90.txt /*90.1* 90.2 usr_90.txt /*90.2* @@ -5876,6 +5877,7 @@ ZZ editing.txt /*ZZ* [p change.txt /*[p* [pattern] pattern.txt /*[pattern]* [quotex] intro.txt /*[quotex]* +[r spell.txt /*[r* [range] cmdline.txt /*[range]* [s spell.txt /*[s* [star motion.txt /*[star* @@ -5904,6 +5906,7 @@ ZZ editing.txt /*ZZ* ]i tagsrch.txt /*]i* ]m motion.txt /*]m* ]p change.txt /*]p* +]r spell.txt /*]r* ]s spell.txt /*]s* ]star motion.txt /*]star* ]z fold.txt /*]z* @@ -6529,6 +6532,7 @@ compiler-dotnet quickfix.txt /*compiler-dotnet* compiler-gcc quickfix.txt /*compiler-gcc* compiler-gnat ft_ada.txt /*compiler-gnat* compiler-hpada ft_ada.txt /*compiler-hpada* +compiler-javac quickfix.txt /*compiler-javac* compiler-manx quickfix.txt /*compiler-manx* compiler-pandoc quickfix.txt /*compiler-pandoc* compiler-perl quickfix.txt /*compiler-perl* @@ -7088,6 +7092,7 @@ file-searching editing.txt /*file-searching* file-type filetype.txt /*file-type* file-types filetype.txt /*file-types* file_readable() builtin.txt /*file_readable()* +filecopy() builtin.txt /*filecopy()* fileencoding-changed version6.txt /*fileencoding-changed* filename-backslash cmdline.txt /*filename-backslash* filename-modifiers cmdline.txt /*filename-modifiers* @@ -7226,6 +7231,7 @@ ft-ada-syntax ft_ada.txt /*ft-ada-syntax* ft-ada-variables ft_ada.txt /*ft-ada-variables* ft-ant-syntax syntax.txt /*ft-ant-syntax* ft-apache-syntax syntax.txt /*ft-apache-syntax* +ft-arduino-plugin filetype.txt /*ft-arduino-plugin* ft-asciidoc-plugin filetype.txt /*ft-asciidoc-plugin* ft-asm-syntax syntax.txt /*ft-asm-syntax* ft-asm68k-syntax syntax.txt /*ft-asm68k-syntax* @@ -7282,6 +7288,7 @@ ft-gitcommit-plugin filetype.txt /*ft-gitcommit-plugin* ft-gprof-plugin filetype.txt /*ft-gprof-plugin* ft-groff-syntax syntax.txt /*ft-groff-syntax* ft-gsp-syntax syntax.txt /*ft-gsp-syntax* +ft-hare filetype.txt /*ft-hare* ft-haskell-syntax syntax.txt /*ft-haskell-syntax* ft-html-indent indent.txt /*ft-html-indent* ft-html-omni insert.txt /*ft-html-omni* @@ -7355,6 +7362,7 @@ ft-qf-plugin filetype.txt /*ft-qf-plugin* ft-quake-syntax syntax.txt /*ft-quake-syntax* ft-r-indent indent.txt /*ft-r-indent* ft-r-syntax syntax.txt /*ft-r-syntax* +ft-rasi-syntax syntax.txt /*ft-rasi-syntax* ft-readline-syntax syntax.txt /*ft-readline-syntax* ft-rego-syntax syntax.txt /*ft-rego-syntax* ft-rexx-syntax syntax.txt /*ft-rexx-syntax* @@ -7388,6 +7396,8 @@ ft-termcap-syntax syntax.txt /*ft-termcap-syntax* ft-tex-plugin filetype.txt /*ft-tex-plugin* ft-tex-syntax syntax.txt /*ft-tex-syntax* ft-tf-syntax syntax.txt /*ft-tf-syntax* +ft-typescript-syntax syntax.txt /*ft-typescript-syntax* +ft-typescriptreact-syntax syntax.txt /*ft-typescriptreact-syntax* ft-vb-syntax syntax.txt /*ft-vb-syntax* ft-verilog-indent indent.txt /*ft-verilog-indent* ft-vhdl-indent indent.txt /*ft-vhdl-indent* @@ -7401,10 +7411,12 @@ ft-xml-syntax syntax.txt /*ft-xml-syntax* ft-xpm-syntax syntax.txt /*ft-xpm-syntax* ft-yaml-indent indent.txt /*ft-yaml-indent* ft-yaml-syntax syntax.txt /*ft-yaml-syntax* +ft-zig-plugin filetype.txt /*ft-zig-plugin* ft-zimbu-plugin filetype.txt /*ft-zimbu-plugin* ft-zsh-syntax syntax.txt /*ft-zsh-syntax* ft_ada.txt ft_ada.txt /*ft_ada.txt* ft_context.txt ft_context.txt /*ft_context.txt* +ft_hare.txt ft_hare.txt /*ft_hare.txt* ft_mp.txt ft_mp.txt /*ft_mp.txt* ft_ps1.txt ft_ps1.txt /*ft_ps1.txt* ft_raku.txt ft_raku.txt /*ft_raku.txt* @@ -7490,7 +7502,9 @@ g:decada.Error_Format ft_ada.txt /*g:decada.Error_Format* g:decada.Make() ft_ada.txt /*g:decada.Make()* g:decada.Make_Command ft_ada.txt /*g:decada.Make_Command* g:decada.Unit_Name() ft_ada.txt /*g:decada.Unit_Name()* +g:do_no_lazyload_menus gui.txt /*g:do_no_lazyload_menus* g:filetype_csh syntax.txt /*g:filetype_csh* +g:filetype_haredoc ft_hare.txt /*g:filetype_haredoc* g:filetype_r syntax.txt /*g:filetype_r* g:ftplugin_rust_source_path ft_rust.txt /*g:ftplugin_rust_source_path* g:gnat ft_ada.txt /*g:gnat* @@ -7506,6 +7520,9 @@ g:gnat.Set_Project_File() ft_ada.txt /*g:gnat.Set_Project_File()* g:gnat.Tags() ft_ada.txt /*g:gnat.Tags()* g:gnat.Tags_Command ft_ada.txt /*g:gnat.Tags_Command* g:gzip_exec pi_gzip.txt /*g:gzip_exec* +g:hare_recommended_style ft_hare.txt /*g:hare_recommended_style* +g:hare_space_error ft_hare.txt /*g:hare_space_error* +g:haredoc_search_depth ft_hare.txt /*g:haredoc_search_depth* g:html_charset_override syntax.txt /*g:html_charset_override* g:html_diff_one_file syntax.txt /*g:html_diff_one_file* g:html_dynamic_folds syntax.txt /*g:html_dynamic_folds* @@ -7630,7 +7647,6 @@ g:netrw_use_errorwindow pi_netrw.txt /*g:netrw_use_errorwindow* g:netrw_use_noswf pi_netrw.txt /*g:netrw_use_noswf* g:netrw_use_nt_rcp pi_netrw.txt /*g:netrw_use_nt_rcp* g:netrw_usetab pi_netrw.txt /*g:netrw_usetab* -g:netrw_win95ftp pi_netrw.txt /*g:netrw_win95ftp* g:netrw_winsize pi_netrw.txt /*g:netrw_winsize* g:netrw_wiw pi_netrw.txt /*g:netrw_wiw* g:netrw_xstrlen pi_netrw.txt /*g:netrw_xstrlen* @@ -7688,17 +7704,21 @@ g:tex_stylish syntax.txt /*g:tex_stylish* g:tex_subscripts syntax.txt /*g:tex_subscripts* g:tex_superscripts syntax.txt /*g:tex_superscripts* g:tex_verbspell syntax.txt /*g:tex_verbspell* +g:typescript_host_keyword syntax.txt /*g:typescript_host_keyword* g:var eval.txt /*g:var* g:vim_indent indent.txt /*g:vim_indent* g:vim_indent_cont indent.txt /*g:vim_indent_cont* g:vimball_home pi_vimball.txt /*g:vimball_home* g:vimball_mkdir pi_vimball.txt /*g:vimball_mkdir* +g:vimsyn_comment_strings syntax.txt /*g:vimsyn_comment_strings* g:vimsyn_embed syntax.txt /*g:vimsyn_embed* g:vimsyn_folding syntax.txt /*g:vimsyn_folding* g:vimsyn_maxlines syntax.txt /*g:vimsyn_maxlines* g:vimsyn_minlines syntax.txt /*g:vimsyn_minlines* g:vimsyn_noerror syntax.txt /*g:vimsyn_noerror* g:yaml_schema syntax.txt /*g:yaml_schema* +g:zig_recommended_style filetype.txt /*g:zig_recommended_style* +g:zig_std_dir filetype.txt /*g:zig_std_dir* g:zipPlugin_ext pi_zip.txt /*g:zipPlugin_ext* g:zip_exec pi_zip.txt /*g:zip_exec* g:zip_extractcmd pi_zip.txt /*g:zip_extractcmd* @@ -7798,6 +7818,7 @@ getreg() builtin.txt /*getreg()* getreginfo() builtin.txt /*getreginfo()* getregion() builtin.txt /*getregion()* getregion-notes builtin.txt /*getregion-notes* +getregionpos() builtin.txt /*getregionpos()* getregtype() builtin.txt /*getregtype()* getscript pi_getscript.txt /*getscript* getscript-autoinstall pi_getscript.txt /*getscript-autoinstall* @@ -7968,6 +7989,10 @@ haiku-user-settings-dir os_haiku.txt /*haiku-user-settings-dir* haiku-vimdir os_haiku.txt /*haiku-vimdir* hangul hangulin.txt /*hangul* hangulin.txt hangulin.txt /*hangulin.txt* +hare ft_hare.txt /*hare* +hare-intro ft_hare.txt /*hare-intro* +hare-plugin ft_hare.txt /*hare-plugin* +hare-settings ft_hare.txt /*hare-settings* has() builtin.txt /*has()* has-patch builtin.txt /*has-patch* has-python if_pyth.txt /*has-python* @@ -8067,6 +8092,8 @@ hl-PmenuExtra syntax.txt /*hl-PmenuExtra* hl-PmenuExtraSel syntax.txt /*hl-PmenuExtraSel* hl-PmenuKind syntax.txt /*hl-PmenuKind* hl-PmenuKindSel syntax.txt /*hl-PmenuKindSel* +hl-PmenuMatch syntax.txt /*hl-PmenuMatch* +hl-PmenuMatchSel syntax.txt /*hl-PmenuMatchSel* hl-PmenuSbar syntax.txt /*hl-PmenuSbar* hl-PmenuSel syntax.txt /*hl-PmenuSel* hl-PmenuThumb syntax.txt /*hl-PmenuThumb* @@ -8692,6 +8719,7 @@ mbyte-utf8 mbyte.txt /*mbyte-utf8* mbyte.txt mbyte.txt /*mbyte.txt* menu-changes-5.4 version5.txt /*menu-changes-5.4* menu-examples gui.txt /*menu-examples* +menu-lazyload gui.txt /*menu-lazyload* menu-priority gui.txt /*menu-priority* menu-separator gui.txt /*menu-separator* menu-shortcut gui.txt /*menu-shortcut* @@ -8836,11 +8864,11 @@ netrw-D pi_netrw.txt /*netrw-D* netrw-I pi_netrw.txt /*netrw-I* netrw-O pi_netrw.txt /*netrw-O* netrw-P pi_netrw.txt /*netrw-P* +netrw-P17 pi_netrw.txt /*netrw-P17* netrw-P18 pi_netrw.txt /*netrw-P18* netrw-P19 pi_netrw.txt /*netrw-P19* netrw-P20 pi_netrw.txt /*netrw-P20* netrw-P21 pi_netrw.txt /*netrw-P21* -netrw-P22 pi_netrw.txt /*netrw-P22* netrw-R pi_netrw.txt /*netrw-R* netrw-S pi_netrw.txt /*netrw-S* netrw-Tb pi_netrw.txt /*netrw-Tb* @@ -8970,7 +8998,6 @@ netrw-p13 pi_netrw.txt /*netrw-p13* netrw-p14 pi_netrw.txt /*netrw-p14* netrw-p15 pi_netrw.txt /*netrw-p15* netrw-p16 pi_netrw.txt /*netrw-p16* -netrw-p17 pi_netrw.txt /*netrw-p17* netrw-p2 pi_netrw.txt /*netrw-p2* netrw-p3 pi_netrw.txt /*netrw-p3* netrw-p4 pi_netrw.txt /*netrw-p4* @@ -9517,6 +9544,7 @@ python-eval if_pyth.txt /*python-eval* python-examples if_pyth.txt /*python-examples* python-fchdir if_pyth.txt /*python-fchdir* python-find_module if_pyth.txt /*python-find_module* +python-find_spec if_pyth.txt /*python-find_spec* python-foreach_rtp if_pyth.txt /*python-foreach_rtp* python-input if_pyth.txt /*python-input* python-options if_pyth.txt /*python-options* @@ -9622,6 +9650,7 @@ raku-unicode ft_raku.txt /*raku-unicode* rand() builtin.txt /*rand()* random builtin.txt /*random* range() builtin.txt /*range()* +rasi.vim syntax.txt /*rasi.vim* raw-terminal-mode term.txt /*raw-terminal-mode* rcp pi_netrw.txt /*rcp* read-in-close-cb channel.txt /*read-in-close-cb* @@ -10669,7 +10698,9 @@ text-functions usr_41.txt /*text-functions* text-objects motion.txt /*text-objects* text-objects-changed version5.txt /*text-objects-changed* text-prop-changes textprop.txt /*text-prop-changes* +text-prop-cleared textprop.txt /*text-prop-cleared* text-prop-functions textprop.txt /*text-prop-functions* +text-prop-functions-details textprop.txt /*text-prop-functions-details* text-prop-intro textprop.txt /*text-prop-intro* text-properties textprop.txt /*text-properties* text-property-functions usr_41.txt /*text-property-functions* @@ -10727,6 +10758,8 @@ type-inference vim9.txt /*type-inference* type-mistakes tips.txt /*type-mistakes* typealias vim9class.txt /*typealias* typename() builtin.txt /*typename()* +typescript.vim syntax.txt /*typescript.vim* +typescriptreact.vim syntax.txt /*typescriptreact.vim* u undo.txt /*u* uganda uganda.txt /*uganda* uganda.txt uganda.txt /*uganda.txt* @@ -11130,6 +11163,7 @@ vim-raku ft_raku.txt /*vim-raku* vim-script-intro usr_41.txt /*vim-script-intro* vim-script-library eval.txt /*vim-script-library* vim-security intro.txt /*vim-security* +vim-shebang various.txt /*vim-shebang* vim-use intro.txt /*vim-use* vim-variable eval.txt /*vim-variable* vim.b if_lua.txt /*vim.b* diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt index d3d549a..7091f83 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -546,7 +546,8 @@ JTags For Java, in Java. It can be found at http://www.fleiner.com/jtags/. ptags.py For Python, in Python. Found in your Python source directory at Tools/scripts/ptags.py. -ptags For Perl, in Perl. It can be found at +ptags For Perl, in Perl. It can be found at (link seems + dead): http://www.eleves.ens.fr:8080/home/nthiery/Tags/. gnatxref For Ada. See http://www.gnuada.org/. gnatxref is part of the gnat package. diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index 1256d75..da6156c 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -1,4 +1,4 @@ -*term.txt* For Vim version 9.1. Last change: 2024 Apr 14 +*term.txt* For Vim version 9.1. Last change: 2024 May 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -382,8 +382,8 @@ The options are listed below. The associated termcap code is always equal to the last two characters of the option name. Only one termcap code is required: Cursor motion, 't_cm'. -The options 't_da', 't_db', 't_ms', 't_xs', 't_xn', 't_xo' represent flags in the -termcap. When the termcap flag is present, the option will be set to "y". +The options 't_da', 't_db', 't_ms', 't_xs', 't_xn', 't_xo' represent flags in +the termcap. When the termcap flag is present, the option will be set to "y". But any non-empty string means that the flag is set. An empty string means that the flag is not set. 't_CS' works like this too, but it isn't a termcap flag. diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt index c99b882..e918394 100644 --- a/runtime/doc/terminal.txt +++ b/runtime/doc/terminal.txt @@ -1,4 +1,4 @@ -*terminal.txt* For Vim version 9.1. Last change: 2024 Mar 17 +*terminal.txt* For Vim version 9.1. Last change: 2024 Jun 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -536,8 +536,10 @@ term_dumpdiff({filename}, {filename} [, {options}]) Can also be used as a |method|: > GetFilename()->term_dumpdiff(otherfile) < - *term_dumpload()* -term_dumpload({filename} [, {options}]) + Return type: |Number| + + +term_dumpload({filename} [, {options}]) *term_dumpload()* Open a new window displaying the contents of {filename} The file must have been created with |term_dumpwrite()|. Returns the buffer number or zero when it fails. @@ -548,8 +550,10 @@ term_dumpload({filename} [, {options}]) Can also be used as a |method|: > GetFilename()->term_dumpload() < - *term_dumpwrite()* -term_dumpwrite({buf}, {filename} [, {options}]) + Return type: |Number| + + +term_dumpwrite({buf}, {filename} [, {options}]) *term_dumpwrite()* Dump the contents of the terminal screen of {buf} in the file {filename}. This uses a format that can be used with |term_dumpload()| and |term_dumpdiff()|. @@ -565,6 +569,9 @@ term_dumpwrite({buf}, {filename} [, {options}]) Can also be used as a |method|, the base is used for the file name: > GetFilename()->term_dumpwrite(bufnr) +< + Return type: |Number| + term_getaltscreen({buf}) *term_getaltscreen()* Returns 1 if the terminal of {buf} is using the alternate @@ -573,6 +580,8 @@ term_getaltscreen({buf}) *term_getaltscreen()* Can also be used as a |method|: > GetBufnr()->term_getaltscreen() +< + Return type: |Number| term_getansicolors({buf}) *term_getansicolors()* @@ -587,8 +596,10 @@ term_getansicolors({buf}) *term_getansicolors()* Can also be used as a |method|: > GetBufnr()->term_getansicolors() +< + Return type: list or list -< {only available when compiled with GUI enabled and/or the + {only available when compiled with GUI enabled and/or the |+termguicolors| feature} term_getattr({attr}, {what}) *term_getattr()* @@ -602,6 +613,8 @@ term_getattr({attr}, {what}) *term_getattr()* Can also be used as a |method|: > GetAttr()->term_getattr() +< + Return type: |Number| term_getcursor({buf}) *term_getcursor()* @@ -627,14 +640,20 @@ term_getcursor({buf}) *term_getcursor()* Can also be used as a |method|: > GetBufnr()->term_getcursor() +< + Return type: list + term_getjob({buf}) *term_getjob()* Get the Job associated with terminal window {buf}. {buf} is used as with |term_getsize()|. - Returns |v:null| when there is no job. + Returns |v:null| when there is no job. In Vim9 script, return + |null_job| when there is no job. Can also be used as a |method|: > GetBufnr()->term_getjob() +< + Return type: |job| term_getline({buf}, {row}) *term_getline()* @@ -649,6 +668,8 @@ term_getline({buf}, {row}) *term_getline()* Can also be used as a |method|: > GetBufnr()->term_getline(row) +< + Return type: |String| term_getscrolled({buf}) *term_getscrolled()* @@ -664,6 +685,8 @@ term_getscrolled({buf}) *term_getscrolled()* Can also be used as a |method|: > GetBufnr()->term_getscrolled() +< + Return type: |Number| term_getsize({buf}) *term_getsize()* @@ -677,6 +700,8 @@ term_getsize({buf}) *term_getsize()* Can also be used as a |method|: > GetBufnr()->term_getsize() +< + Return type: list or list term_getstatus({buf}) *term_getstatus()* @@ -693,6 +718,8 @@ term_getstatus({buf}) *term_getstatus()* Can also be used as a |method|: > GetBufnr()->term_getstatus() +< + Return type: |String| term_gettitle({buf}) *term_gettitle()* @@ -705,6 +732,8 @@ term_gettitle({buf}) *term_gettitle()* Can also be used as a |method|: > GetBufnr()->term_gettitle() +< + Return type: |String| term_gettty({buf} [, {input}]) *term_gettty()* @@ -717,12 +746,16 @@ term_gettty({buf} [, {input}]) *term_gettty()* Can also be used as a |method|: > GetBufnr()->term_gettty() +< + Return type: |String| term_list() *term_list()* Return a list with the buffer numbers of all buffers for terminal windows. + Return type: list or list + term_scrape({buf}, {row}) *term_scrape()* Get the contents of {row} of terminal screen of {buf}. @@ -744,6 +777,8 @@ term_scrape({buf}, {row}) *term_scrape()* Can also be used as a |method|: > GetBufnr()->term_scrape(row) +< + Return type: list> or list term_sendkeys({buf}, {keys}) *term_sendkeys()* @@ -755,6 +790,8 @@ term_sendkeys({buf}, {keys}) *term_sendkeys()* Can also be used as a |method|: > GetBufnr()->term_sendkeys(keys) +< + Return type: |Number| term_setansicolors({buf}, {colors}) *term_setansicolors()* @@ -788,8 +825,10 @@ term_setansicolors({buf}, {colors}) *term_setansicolors()* Can also be used as a |method|: > GetBufnr()->term_setansicolors(colors) +< + Return type: |Number| -< {only available with GUI enabled and/or the |+termguicolors| + {only available with GUI enabled and/or the |+termguicolors| feature} @@ -804,6 +843,8 @@ term_setapi({buf}, {expr}) *term_setapi()* When used as a method the base is used for {buf}: > GetBufnr()->term_setapi({expr}) +< + Return type: |Number| term_setkill({buf}, {how}) *term_setkill()* @@ -820,6 +861,8 @@ term_setkill({buf}, {how}) *term_setkill()* Can also be used as a |method|: > GetBufnr()->term_setkill(how) +< + Return type: |Number| term_setrestore({buf}, {command}) *term_setrestore()* @@ -833,6 +876,8 @@ term_setrestore({buf}, {command}) *term_setrestore()* Can also be used as a |method|: > GetBufnr()->term_setrestore(command) +< + Return type: |Number| term_setsize({buf}, {rows}, {cols}) *term_setsize()* *E955* @@ -847,6 +892,8 @@ term_setsize({buf}, {rows}, {cols}) *term_setsize()* *E955* Can also be used as a |method|: > GetBufnr()->term_setsize(rows, cols) +< + Return type: |Number| term_start({cmd} [, {options}]) *term_start()* @@ -922,6 +969,8 @@ term_start({cmd} [, {options}]) *term_start()* Can also be used as a |method|: > GetCommand()->term_start() +< + Return type: |Number| term_wait({buf} [, {time}]) *term_wait()* @@ -932,6 +981,8 @@ term_wait({buf} [, {time}]) *term_wait()* Can also be used as a |method|: > GetBufnr()->term_wait() +< + Return type: |Number| ============================================================================== 3. Terminal communication *terminal-communication* diff --git a/runtime/doc/test_urls.vim b/runtime/doc/test_urls.vim index e23f879..b75dc29 100644 --- a/runtime/doc/test_urls.vim +++ b/runtime/doc/test_urls.vim @@ -12,11 +12,11 @@ func Test_check_URLs() else let s:outdev = '/dev/null' endif -" Restorer: For Windows users. If "curl" or "weget" is installed on the system -" but not in %PATH%, add the full routes for them to this environment variable. +" Restorer: For Windows users. If "curl" or "wget" is installed on the system +" but not in %PATH%, add the full path to them to %PATH% environment variable. if executable('curl') " Note: does not follow redirects! - let s:command1 = 'curl --silent --fail --output ' ..s:outdev.. ' --head ' + let s:command1 = 'curl --silent --max-time 5 --fail --output ' ..s:outdev.. ' --head ' let s:command2 = "" elseif executable('wget') " Note: only allow a couple of redirects diff --git a/runtime/doc/testing.txt b/runtime/doc/testing.txt index 9b9f60b..ebf562b 100644 --- a/runtime/doc/testing.txt +++ b/runtime/doc/testing.txt @@ -1,4 +1,4 @@ -*testing.txt* For Vim version 9.1. Last change: 2024 Apr 07 +*testing.txt* For Vim version 9.1. Last change: 2024 Jun 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -45,12 +45,16 @@ test_alloc_fail({id}, {countdown}, {repeat}) *test_alloc_fail()* Can also be used as a |method|: > GetAllocId()->test_alloc_fail() +< + Return type: |Number| test_autochdir() *test_autochdir()* Set a flag to enable the effect of 'autochdir' before Vim startup has finished. + Return type: |Number| + test_feedinput({string}) *test_feedinput()* Characters in {string} are queued for processing as if they @@ -59,6 +63,8 @@ test_feedinput({string}) *test_feedinput()* Can also be used as a |method|: > GetText()->test_feedinput() +< + Return type: |Number| test_garbagecollect_now() *test_garbagecollect_now()* @@ -69,11 +75,13 @@ test_garbagecollect_now() *test_garbagecollect_now()* This will not work when called from a :def function, because variables on the stack will be freed. + Return type: |Number| test_garbagecollect_soon() *test_garbagecollect_soon()* Set the flag to call the garbagecollector as if in the main loop. Only to be used in tests. + Return type: |Number| test_getvalue({name}) *test_getvalue()* Get the value of an internal variable. These values for @@ -83,6 +91,8 @@ test_getvalue({name}) *test_getvalue()* Can also be used as a |method|: > GetName()->test_getvalue() < + Return type: |Number| + *test_gui_event()* test_gui_event({event}, {args}) Generate a GUI {event} with arguments {args} for testing Vim @@ -212,6 +222,8 @@ test_gui_event({event}, {args}) Can also be used as a |method|: > GetEvent()->test_gui_event({args}) < + Return type: |vim9-boolean| + test_ignore_error({expr}) *test_ignore_error()* Ignore any error containing {expr}. A normal message is given instead. @@ -224,7 +236,8 @@ test_ignore_error({expr}) *test_ignore_error()* Can also be used as a |method|: > GetErrorText()->test_ignore_error() - +< + Return type: |Number| test_mswin_event({event}, {args}) *test_mswin_event()* Generate a low-level MS-Windows {event} with arguments {args} @@ -307,40 +320,49 @@ test_mswin_event({event}, {args}) *test_mswin_event()* Can also be used as a |method|: > GetEvent()->test_mswin_event({args}) < + Return type: |vim9-boolean| test_null_blob() *test_null_blob()* Return a |Blob| that is null. Only useful for testing. + Return type: |Blob| test_null_channel() *test_null_channel()* Return a |Channel| that is null. Only useful for testing. {only available when compiled with the +channel feature} + Return type: |Channel| test_null_dict() *test_null_dict()* Return a |Dict| that is null. Only useful for testing. + Return type: dict test_null_function() *test_null_function()* Return a |Funcref| that is null. Only useful for testing. + Return type: func(...): unknown test_null_job() *test_null_job()* Return a |Job| that is null. Only useful for testing. {only available when compiled with the +job feature} + Return type: |job| test_null_list() *test_null_list()* Return a |List| that is null. Only useful for testing. + Return type: list test_null_partial() *test_null_partial()* Return a |Partial| that is null. Only useful for testing. + Return type: func(...): unknown test_null_string() *test_null_string()* Return a |String| that is null. Only useful for testing. + Return type: |String| test_option_not_set({name}) *test_option_not_set()* Reset the flag that indicates option {name} was set. Thus it @@ -353,7 +375,8 @@ test_option_not_set({name}) *test_option_not_set()* Can also be used as a |method|: > GetOptionName()->test_option_not_set() - +< + Return type: |Number| test_override({name}, {val}) *test_override()* Overrides certain parts of Vim's internal processing to be able @@ -365,29 +388,32 @@ test_override({name}, {val}) *test_override()* {name} effect when {val} is non-zero ~ alloc_lines make a copy of every buffer line into allocated memory, so that memory access errors can be found - by valgrind + by valgrind. autoload `import autoload` will load the script right - away, not postponed until an item is used - char_avail disable the char_avail() function + away, not postponed until an item is used. + char_avail disable the char_avail() function. + defcompile all the |:def| functions in a sourced script are + compiled when defined. This is similar to using + the |:defcompile| command in a script. nfa_fail makes the NFA regexp engine fail to force a - fallback to the old engine + fallback to the old engine. no_query_mouse do not query the mouse position for "dec" - terminals + terminals. no_wait_return set the "no_wait_return" flag. Not restored with "ALL". - redraw disable the redrawing() function - redraw_flag ignore the RedrawingDisabled flag - starting reset the "starting" variable, see below + redraw disable the redrawing() function. + redraw_flag ignore the RedrawingDisabled flag. + starting reset the "starting" variable, see below. term_props reset all terminal properties when the version - string is detected + string is detected. ui_delay time in msec to use in ui_delay(); overrules a - wait time of up to 3 seconds for messages - unreachable no error for code after `:throw` and `:return` - uptime overrules sysinfo.uptime + wait time of up to 3 seconds for messages. + unreachable no error for code after `:throw` and `:return`. + uptime overrules sysinfo.uptime. vterm_title setting the window title by a job running in a - terminal window + terminal window. ALL clear all overrides, except alloc_lines ({val} is - not used) + not used). "starting" is to be used when a test should behave like startup was done. Since the tests are run by sourcing a @@ -406,7 +432,8 @@ test_override({name}, {val}) *test_override()* < Can also be used as a |method|: > GetOverrideVal()-> test_override('starting') - +< + Return type: |Number| test_refcount({expr}) *test_refcount()* Return the reference count of {expr}. When {expr} is of a @@ -415,7 +442,8 @@ test_refcount({expr}) *test_refcount()* Can also be used as a |method|: > GetVarname()->test_refcount() - +< + Return type: |Number| test_setmouse({row}, {col}) *test_setmouse()* Set the mouse position to be used for the next mouse action. @@ -423,6 +451,8 @@ test_setmouse({row}, {col}) *test_setmouse()* For example: > call test_setmouse(4, 20) call feedkeys("\", "xt") +< + Return type: |Number| test_settime({expr}) *test_settime()* @@ -436,20 +466,25 @@ test_settime({expr}) *test_settime()* Can also be used as a |method|: > GetTime()->test_settime() - +< + Return type: |Number| test_srand_seed([{seed}]) *test_srand_seed()* When {seed} is given this sets the seed value used by `srand()`. When omitted the test seed is removed. + Return type: |Number| test_unknown() *test_unknown()* Return a value with unknown type. Only useful for testing. + Return type: unknown test_void() *test_void()* Return a value with void type. Only useful for testing. + Return type: void + ============================================================================== 3. Assert functions *assert-functions-details* @@ -463,6 +498,8 @@ assert_beeps({cmd}) *assert_beeps()* Can also be used as a |method|: > GetCmd()->assert_beeps() < + Return type: |Number| + *assert_equal()* assert_equal({expected}, {actual} [, {msg}]) When {expected} and {actual} are not equal an error message is @@ -483,8 +520,10 @@ assert_equal({expected}, {actual} [, {msg}]) Can also be used as a |method|, the base is passed as the second argument: > mylist->assert_equal([1, 2, 3]) +< + Return type: |Number| -< *assert_equalfile()* + *assert_equalfile()* assert_equalfile({fname-one}, {fname-two} [, {msg}]) When the files {fname-one} and {fname-two} do not contain exactly the same text an error message is added to |v:errors|. @@ -495,6 +534,8 @@ assert_equalfile({fname-one}, {fname-two} [, {msg}]) Can also be used as a |method|: > GetLog()->assert_equalfile('expected.log') +< + Return type: |Number| assert_exception({error} [, {msg}]) *assert_exception()* When v:exception does not contain the string {error} an error @@ -509,6 +550,8 @@ assert_exception({error} [, {msg}]) *assert_exception()* call assert_exception('E492:') endtry < + Return type: |Number| + *assert_fails()* assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]]) Run {cmd} and add an error message to |v:errors| if it does @@ -549,6 +592,8 @@ assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]]) Can also be used as a |method|: > GetCmd()->assert_fails('E99:') +< + Return type: |Number| assert_false({actual} [, {msg}]) *assert_false()* When {actual} is not false an error message is added to @@ -562,6 +607,8 @@ assert_false({actual} [, {msg}]) *assert_false()* Can also be used as a |method|: > GetResult()->assert_false() +< + Return type: |Number| assert_inrange({lower}, {upper}, {actual} [, {msg}]) *assert_inrange()* This asserts number and |Float| values. When {actual} is lower @@ -571,6 +618,8 @@ assert_inrange({lower}, {upper}, {actual} [, {msg}]) *assert_inrange()* but got {actual}". When {msg} is present it is prefixed to that. + Return type: |Number| + *assert_match()* assert_match({pattern}, {actual} [, {msg}]) When {pattern} does not match {actual} an error message is @@ -594,6 +643,8 @@ assert_match({pattern}, {actual} [, {msg}]) Can also be used as a |method|: > getFile()->assert_match('foo.*') < + Return type: |Number| + assert_nobeep({cmd}) *assert_nobeep()* Run {cmd} and add an error message to |v:errors| if it produces a beep or visual bell. @@ -602,6 +653,8 @@ assert_nobeep({cmd}) *assert_nobeep()* Can also be used as a |method|: > GetCmd()->assert_nobeep() < + Return type: |Number| + *assert_notequal()* assert_notequal({expected}, {actual} [, {msg}]) The opposite of `assert_equal()`: add an error message to @@ -610,8 +663,10 @@ assert_notequal({expected}, {actual} [, {msg}]) Can also be used as a |method|: > mylist->assert_notequal([1, 2, 3]) +< + Return type: |Number| -< *assert_notmatch()* + *assert_notmatch()* assert_notmatch({pattern}, {actual} [, {msg}]) The opposite of `assert_match()`: add an error message to |v:errors| when {pattern} matches {actual}. @@ -619,7 +674,8 @@ assert_notmatch({pattern}, {actual} [, {msg}]) Can also be used as a |method|: > getFile()->assert_notmatch('bar.*') - +< + Return type: |Number| assert_report({msg}) *assert_report()* Report a test failure directly, using String {msg}. @@ -627,6 +683,8 @@ assert_report({msg}) *assert_report()* Can also be used as a |method|: > GetMessage()->assert_report() +< + Return type: |Number| assert_true({actual} [, {msg}]) *assert_true()* @@ -640,5 +698,7 @@ assert_true({actual} [, {msg}]) *assert_true()* Can also be used as a |method|: > GetResult()->assert_true() < + Return type: |Number| + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/textprop.txt b/runtime/doc/textprop.txt index bf7fd16..6b46e06 100644 --- a/runtime/doc/textprop.txt +++ b/runtime/doc/textprop.txt @@ -1,4 +1,4 @@ -*textprop.txt* For Vim version 9.1. Last change: 2023 Apr 23 +*textprop.txt* For Vim version 9.1. Last change: 2024 Jun 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -118,6 +118,8 @@ prop_list({lnum} [, {props}]) text properties in {lnum} prop_remove({props} [, {lnum} [, {lnum-end}]]) remove a text property + *text-prop-functions-details* + *prop_add()* *E965* prop_add({lnum}, {col}, {props}) Attach a text property at position {lnum}, {col}. {col} is @@ -234,8 +236,10 @@ prop_add({lnum}, {col}, {props}) Can also be used as a |method|: > GetLnum()->prop_add(col, props) < - *prop_add_list()* -prop_add_list({props}, [{item}, ...]) + Return type: |Number| + + +prop_add_list({props}, [{item}, ...]) *prop_add_list()* Similar to prop_add(), but attaches a text property at multiple positions in a buffer. @@ -284,8 +288,10 @@ prop_clear({lnum} [, {lnum-end} [, {props}]]) *prop_clear()* Can also be used as a |method|: > GetLnum()->prop_clear() < - *prop_find()* -prop_find({props} [, {direction}]) + Return type: |Number| + + +prop_find({props} [, {direction}]) *prop_find()* Search for a text property as specified with {props}: id property with this ID type property with this type name @@ -310,6 +316,8 @@ prop_find({props} [, {direction}]) as with prop_list(), and additionally an "lnum" entry. If no match is found then an empty Dict is returned. + Return type: dict + prop_list({lnum} [, {props}]) *prop_list()* Returns a List with all the text properties in line {lnum}. @@ -380,6 +388,8 @@ prop_list({lnum} [, {props}]) *prop_list()* Can also be used as a |method|: > GetLnum()->prop_list() < + Return type: list> or list + *prop_remove()* *E968* *E860* prop_remove({props} [, {lnum} [, {lnum-end}]]) Remove a matching text property from line {lnum}. When @@ -409,6 +419,8 @@ prop_remove({props} [, {lnum} [, {lnum-end}]]) Can also be used as a |method|: > GetProps()->prop_remove() +< + Return type: |Number| prop_type_add({name}, {props}) *prop_type_add()* *E969* *E970* @@ -436,6 +448,9 @@ prop_type_add({name}, {props}) *prop_type_add()* *E969* *E970* Can also be used as a |method|: > GetPropName()->prop_type_add(props) +< + Return type: |Number| + prop_type_change({name}, {props}) *prop_type_change()* Change properties of an existing text property type. If a @@ -444,6 +459,9 @@ prop_type_change({name}, {props}) *prop_type_change()* Can also be used as a |method|: > GetPropName()->prop_type_change(props) +< + Return type: |Number| + prop_type_delete({name} [, {props}]) *prop_type_delete()* Remove the text property type {name}. When text properties @@ -458,6 +476,9 @@ prop_type_delete({name} [, {props}]) *prop_type_delete()* Can also be used as a |method|: > GetPropName()->prop_type_delete() +< + Return type: |Number| + prop_type_get({name} [, {props}]) *prop_type_get()* Returns the properties of property type {name}. This is a @@ -471,6 +492,9 @@ prop_type_get({name} [, {props}]) *prop_type_get()* Can also be used as a |method|: > GetPropName()->prop_type_get() +< + Return type: dict + prop_type_list([{props}]) *prop_type_list()* Returns a list with all property type names. @@ -478,6 +502,8 @@ prop_type_list([{props}]) *prop_type_list()* {props} can contain a "bufnr" item. When it is given, use this buffer instead of the global property types. + Return type: list or list + ============================================================================== 3. When text changes *text-prop-changes* @@ -504,7 +530,7 @@ callback update spelling mistakes in the changed text. Vim will move the properties below the changed text, so that they still highlight the same text, thus you don't need to update these. - + *text-prop-cleared* Text property columns are not updated or copied: ~ - When setting the line with |setline()| or through an interface, such as Lua, diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 8712008..c37a1d4 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 9.1. Last change: 2024 Mar 28 +*todo.txt* For Vim version 9.1. Last change: 2024 Jun 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -82,8 +82,6 @@ With 'smoothscroll' set and "lastline" in 'display', moving the cursor to a wrapping line that makes the display scroll up may scroll much more than needed, thus jump-scrolling. (part of issue 12411) -Add filecopy() ? #12346 - Implement foreach() PR #12166 Errors when running tests with valgrind: @@ -1710,7 +1708,8 @@ Also Vundle: https://github.com/gmarik/vundle Or minpac: https://github.com/k-takata/minpac, since it leverages the builtin package feature. Long message about this from ZyX, 2014 Mar 23. And following replies. -Also see http://vim-wiki.mawercer.de/wiki/topic/vim%20plugin%20managment.html +Also see (link seems dead): +http://vim-wiki.mawercer.de/wiki/topic/vim%20plugin%20managment.html User view: - Support multiple sources, basically any http:// URL. Or a central place that will work for everybody (github? redirects from vim.org?). @@ -2441,7 +2440,7 @@ Problem with 'ts' set to 9 and 'showbreak' to ">>>". (Matthew Winn, 2007 Oct Would be more consistent when an existing tab is re-used. (Tony Mechelynck) Using Aap to build Vim: add remarks about how to set personal preferences. -Example on http://www.calmar.ws/tmp/aap.html +Example on http://www.calmar.ws/tmp/aap.html (link seems dead) When 'diffopt' has "context:0" a single deleted line causes two folds to merge and mess up syncing. (Austin Jennings, 2008 Jan 31) @@ -2472,7 +2471,7 @@ Asked about latest version: 0.77.1 is on www.vim.org. More AmigaOS4 patches. (Peter Bengtsson, Nov 9) Amiga patches with vbcc. (Adrien Destugues, 2010 Aug 30) -http://pulkomandy.ath.cx/drop/vim73_vbcc_amiga.diff +(link seems dead): http://pulkomandy.ath.cx/drop/vim73_vbcc_amiga.diff Problem with compound words? (Bert, 2008 May 6) No warning for when flags are defined after they are used in an affix. @@ -2542,8 +2541,9 @@ Win32: Patch for cscope external command. (Mike Williams, 2007 Aug 7) Win32: XPM support only works with path without spaces. Patch by Mathias Michaelis, 2006 Jun 9. Another patch for more path names, 2006 May 31. -New version: http://members.tcnet.ch/michaelis/vim/patches.zip (also for other -patches by Mathias, see mail Feb 22) +New version (link seems dead): +http://members.tcnet.ch/michaelis/vim/patches.zip +(also for other patches by Mathias, see mail Feb 22) Win32: compiling with normal features and OLE fails. Patch by Mathias Michaelis, 2006 Jun 4. @@ -3068,7 +3068,7 @@ Win32 GUI known bugs: the screen. 8 The -P argument doesn't work very well with many MDI applications. The last argument of CreateWindowEx() should be used, see MSDN docs. - Tutorial: http://win32assembly.online.fr/tut32.html + Tutorial (link seems dead): http://win32assembly.online.fr/tut32.html 6 Win32 GUI: With "-u NONE -U NONE" and doing "CTRL-W v" "CTRL-W o", the ":" of ":only" is highlighted like the cursor. (Lipelis) 8 When 'encoding' is "utf-8", should use 'guifont' for both normal and wide @@ -3470,7 +3470,7 @@ Macintosh: way to avoid using the builtin termcap. 8 Xterm sends ^[[H for and ^[[F for in some mode. Also recognize these keys? Mostly useful for xterm simulators, like gnometerm. - See http://dickey.his.com/xterm/xterm.faq.html#xterm_pc_style. + See https://invisible-island.net/xterm/xterm.faq.html#xterm_pc_style 8 '[ and '] should be set to start/end of line when using a linewise operator (e.g., ":w"). 8 CTRL-A can't handle big "long" numbers, they become negative. Check for @@ -3759,8 +3759,8 @@ Spell checking: What does MAXNGRAMSUGS do? Is COMPLEXPREFIXES necessary when we have flags for affixes? - There is no Finnish spell checking file. For openoffice Voikko is now - used, which is based on Malaga: http://home.arcor.de/bjoern-beutel/malaga/ - (Teemu Likonen) + used, which is based on Malaga (link seems dead): + http://home.arcor.de/bjoern-beutel/malaga/ (Teemu Likonen) 8 ":mkspell" still takes much too long in Hungarian dictionary from hunspell. Only solution appears to be to postpone secondary suffixes. 8 Handle postponed prefix with COMPOUNDPERMITFLAG or COMPOUNDFORBIDFLAG. @@ -3816,7 +3816,7 @@ Spell checking: syntax items (to add @Spell). Add ":syntax contains {pattern} add=@Spell" command? A bit like ":syn cluster" but change the contains list directly for matching syntax items. -- References: MySpell library (in OpenOffice.org). +- References: MySpell library (in OpenOffice.org), (links seem dead): http://spellchecker.mozdev.org/source.html http://whiteboard.openoffice.org/source/browse/whiteboard/lingucomponent/source/spellcheck/myspell/ author: Kevin Hendricks @@ -3974,8 +3974,9 @@ Multi-byte characters: could be entered. E.g., for "f" command. But not in Normal mode. Sort of opposite of 'langmap'. Use ":amap" command? - When breaking a line, take properties of multibyte characters into - account. The "linebreak" program from Bruno Haible can do it: - ftp://ftp.ilog.fr/pub/Users/haible/gnu/linebreak-0.1.tar.gz + account. The "linebreak" program from Bruno Haible can do it, this + is now part of gnulib module unilbrk: + https://www.gnu.org/software/gnulib/MODULES.html But it's very complicated... - Problem with 'langmap' being used on the rhs of a mapping. (Nikolai Weibull, 2008 May 14). @@ -4239,7 +4240,6 @@ Vim script language: base64enc() base 64 encoding base64dec() base 64 decoding attributes() return file protection flags "drwxrwxrwx" - filecopy(from, to) Copy a file shorten(fname) shorten a file name, like home_replace() perl(cmd) call Perl and return string inputrl() like input() but right-to-left @@ -4399,7 +4399,6 @@ Code size: left out. 8 When compiled with a GUI-only version, the termcap entries for terminals can be removed. -8 Can the check for libelf in configure.ac be removed? Messages: @@ -4773,10 +4772,10 @@ Omni completion: ctags -f $allTagsFile --fields=+aiKmnsSz --language-force=C++ --C++-kinds=+cefgmnpsut-dlux -u $files www.vim.org script 1213 (Java Development Environment) (Fuchuan Wang) IComplete: http://www.vim.org/scripts/script.php?script_id=1265 - and http://stud4.tuwien.ac.at/~e0125672/icomplete/ http://cedet.sourceforge.net/intellisense.shtml (for Emacs) Ivan Villanueva has something for Java. - Emacs: http://www.xref-tech.com/xrefactory/more_c_completion.html + Emacs (link seems dead): + http://www.xref-tech.com/xrefactory/more_c_completion.html Completion in .NET framework SharpDevelop: http://www.icsharpcode.net - Pre-expand abbreviations, show which abbrevs would match? diff --git a/runtime/doc/usr_01.txt b/runtime/doc/usr_01.txt index fafb242..fdf1b53 100644 --- a/runtime/doc/usr_01.txt +++ b/runtime/doc/usr_01.txt @@ -1,4 +1,4 @@ -*usr_01.txt* For Vim version 9.1. Last change: 2023 May 12 +*usr_01.txt* For Vim version 9.1. Last change: 2024 May 11 VIM USER MANUAL - by Bram Moolenaar @@ -165,7 +165,7 @@ The Vim user manual and reference manual are Copyright (c) 1988 by Bram Moolenaar. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later. The latest version is presently available at: - http://www.opencontent.org/openpub/ + https://opencontent.org/openpub/ People who contribute to the manuals must agree with the above copyright notice. diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt index 063af9b..a9e8fb9 100644 --- a/runtime/doc/usr_05.txt +++ b/runtime/doc/usr_05.txt @@ -1,4 +1,4 @@ -*usr_05.txt* For Vim version 9.1. Last change: 2024 Apr 26 +*usr_05.txt* For Vim version 9.1. Last change: 2024 May 17 VIM USER MANUAL - by Bram Moolenaar @@ -445,7 +445,8 @@ Load the plugin with this command: > This way you can use the plugin with the default key bindings `gc` and similar for commenting (which is a well-established mapping in the Vim community). -After restarting your Vim, the plugin is active and you can read about it at: > +If you add this line to your vimrc file, then you need to restart Vim to have +the package loaded. Once the package is loaded, read about it at: > :h comment.txt More information about packages can be found here: |packages|. diff --git a/runtime/doc/usr_21.txt b/runtime/doc/usr_21.txt index 95ded58..fe3ee31 100644 --- a/runtime/doc/usr_21.txt +++ b/runtime/doc/usr_21.txt @@ -1,4 +1,4 @@ -*usr_21.txt* For Vim version 9.1. Last change: 2019 Apr 25 +*usr_21.txt* For Vim version 9.1. Last change: 2024 May 17 VIM USER MANUAL - by Bram Moolenaar @@ -207,6 +207,23 @@ You get the same list of files as with |:oldfiles|. If you want to edit Type "2" and press to edit the second file. +If you know that the filename contains a pattern, you can also |:filter| the +list of files: > + + :filter /resume/ :browse oldfiles +< +Since there is only one single matching filename, Vim will directly edit that +file without prompting. If the filter matches several files, you'll get +prompted for the list of matching files instead: > + + :filter! /resume/ browse oldfiles +< 1: ~/.viminfo ~ + 3: /tmp/draft ~ + Type number and (q or empty cancels): ~ + +Note: this time we filtered out all files NOT matching resume. + + More info at |:oldfiles|, |v:oldfiles| and |c_#<|. diff --git a/runtime/doc/usr_30.txt b/runtime/doc/usr_30.txt index 19a1259..c3bbcba 100644 --- a/runtime/doc/usr_30.txt +++ b/runtime/doc/usr_30.txt @@ -1,4 +1,4 @@ -*usr_30.txt* For Vim version 9.1. Last change: 2007 Nov 10 +*usr_30.txt* For Vim version 9.1. Last change: 2024 Apr 29 VIM USER MANUAL - by Bram Moolenaar @@ -246,7 +246,7 @@ code block the cursor is in: > =a{ -I you have really badly indented code, you can re-indent the whole file with: +If you have really badly indented code, you can re-indent the whole file with: > gg=G diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 6137cfd..60d0d1e 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 9.1. Last change: 2024 Apr 26 +*usr_41.txt* For Vim version 9.1. Last change: 2024 Jun 09 VIM USER MANUAL - by Bram Moolenaar @@ -29,6 +29,22 @@ Table of contents: |usr_toc.txt| ============================================================================== *41.1* Introduction *vim-script-intro* *script* +Let's start with some nomenclature. A Vim script is any file that Vim can +interpret and execute. This includes files written in Vim's scripting language +like for example .vim files or configuration files like .vimrc and .gvimrc. +These scripts may define functions, commands and settings that Vim uses to +customize and extend its behavior. + +With a slight abuse of nomenclature, we will use "Vim script" to refer to the +Vim scripting language throughout this documentation. This shorthand helps to +streamline explanations and discussions about scripting with Vim. + +A Vim plugin is a collection of one or more Vim scripts, along with additional +files like help documentation, configuration files, and other resources, +designed to add specific features or functionalities to Vim. A plugin can +provide new commands, enhance existing capabilities, and integrate external +tools or services into the Vim environment. + Your first experience with Vim scripts is the vimrc file. Vim reads it when it starts up and executes the commands. You can set options to the values you prefer, define mappings, select plugins and much more. You can use any colon @@ -930,6 +946,7 @@ Cursor and mark position: *cursor-functions* *mark-functions* Working with text in the current buffer: *text-functions* getline() get a line or list of lines from the buffer getregion() get a region of text from the buffer + getregionpos() get a list of positions for a region setline() replace a line in the buffer append() append line or list of lines in the buffer indent() indent of a specific line @@ -992,6 +1009,7 @@ System functions and manipulation of files: readdir() get a List of file names in a directory readdirex() get a List of file information in a directory writefile() write a List of lines or Blob into a file + filecopy() copy a file {from} to {to} Date and Time: *date-functions* *time-functions* getftime() get last modification time of a file diff --git a/runtime/doc/usr_52.txt b/runtime/doc/usr_52.txt index 222b899..d5062e2 100644 --- a/runtime/doc/usr_52.txt +++ b/runtime/doc/usr_52.txt @@ -1,4 +1,4 @@ -*usr_52.txt* For Vim version 9.1. Last change: 2022 Jun 04 +*usr_52.txt* For Vim version 9.1. Last change: 2024 Jun 09 VIM USER MANUAL - by Bram Moolenaar @@ -13,6 +13,7 @@ smaller parts. |52.3| Autoloading without import/export |52.4| Other mechanisms to use |52.5| Using a Vim9 script from legacy script +|52.6| Vim9 script examples: comment package, highlight-yank plugin Next chapter: |usr_90.txt| Installing Vim Previous chapter: |usr_51.txt| Create a plugin @@ -45,7 +46,7 @@ private function: > def GetReply(nr: number): string if nr == 42 return 'yes' - elseif nr = 22 + elseif nr == 22 return 'maybe' else return 'no' @@ -155,7 +156,7 @@ AUTOLOAD DIRECTORY Another form is to use autoload with a script name that is not an absolute or relative path: > - import autload "monthlib.vim" + import autoload "monthlib.vim" This will search for the script "monthlib.vim" in the autoload directories of 'runtimepath'. With Unix one of the directories often is "~/.vim/autoload". @@ -336,6 +337,46 @@ will have to make sure to use a unique name for these global items. Example: > call g:NicePluginTest() ============================================================================== +*52.6* Vim9 script examples: comment package, highlight-yank plugin + +COMMENT PACKAGE + +Vim comes with a comment plugin, written in Vim9 script. |comment-install| +Have a look at the package located at $VIMRUNTIME/pack/dist/opt/comment/ + +HIGHLIGHT YANK PLUGIN + +Here is an example for highlighting the yanked region. It makes use of the +|getregionpos()| function, available since Vim 9.1.0446. + +Copy the following example into a new file and place it into your plugin directory +and it will be active next time you start Vim. |add-plugin|: > + + vim9script + + def HighlightedYank(hlgroup = 'IncSearch', duration = 300, in_visual = true) + if v:event.operator ==? 'y' + if !in_visual && visualmode() != null_string + visualmode(1) + return + endif + var [beg, end] = [getpos("'["), getpos("']")] + var type = v:event.regtype ?? 'v' + var pos = getregionpos(beg, end, {type: type}) + var end_offset = (type == 'V' || v:event.inclusive) ? 1 : 0 + var m = matchaddpos(hlgroup, pos->mapnew((_, v) => { + var col_beg = v[0][2] + v[0][3] + var col_end = v[1][2] + v[1][3] + end_offset + return [v[0][1], col_beg, col_end - col_beg] + })) + var winid = win_getid() + timer_start(duration, (_) => m->matchdelete(winid)) + endif + enddef + + autocmd TextYankPost * HighlightedYank() +< +============================================================================== Next chapter: |usr_90.txt| Installing Vim diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 0aa5c74..1ce8927 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 9.1. Last change: 2023 Sep 27 +*various.txt* For Vim version 9.1. Last change: 2024 Jun 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -138,12 +138,18 @@ g8 Print the hex values of the bytes used in the :[range]# [count] [flags] synonym for :number. - *:#!* + *:#!* *vim-shebang* :#!{anything} Ignored, so that you can start a Vim script with: > #!vim -S - echo "this is a Vim script" - quit + let mylogbook='$HOME/logbook.md' + exe $':e {mylogbook}' + $ + put ='## ' .. strftime('%d. %b %Y') + norm! o < + Make that script executable and run it to create a + new diary entry. + *:z* *E144* :[range]z[+-^.=][count] Display several lines of text surrounding the line specified with [range], or around the current line @@ -608,6 +614,7 @@ N *+X11* Unix only: can restore window title |X11| |:command| - filter by command name |:files| - filter by file name |:highlight| - filter by highlight group + |:history| - filter by history commands |:jumps| - filter by file name |:let| - filter by variable name |:list| - filter whole line diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt index 03050ee..5b5bded 100644 --- a/runtime/doc/version9.txt +++ b/runtime/doc/version9.txt @@ -1,4 +1,4 @@ -*version9.txt* For Vim version 9.1. Last change: 2024 Apr 26 +*version9.txt* For Vim version 9.1. Last change: 2024 Jun 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -31694,7 +31694,7 @@ The release 9.1 is dedicated to Vim's Benevolent dictator for life This release has hundreds of bug fixes, there are a few new features and there are many minor improvements. -Vim9 classes +Vim9 classes ~ ------------ Support for classes and objects in a Vim9 script are added. This is described in |vim9-class|. The following features are supported: @@ -31711,12 +31711,12 @@ in |vim9-class|. The following features are supported: Support for creating a type alias for an existing type is added. -Virtual text +Virtual text ~ ------------ Support for adding |virtual-text| to a buffer is added. This is useful for language server features (e.g. inlay hints) -Smooth Scroll +Smooth Scroll ~ ------------- Support for scrolling text using screen lines instead of file lines is added. Refer to the 'smoothscroll' option. @@ -31726,7 +31726,8 @@ The EditorConfig (|editorconfig-install|) and the JSON formatting OpenVMS x86_64 platform port: http://www.polarhome.com/vim/ -Other improvements *new-other-9.1* + *new-other-9.1* +Other improvements ~ ------------------ - Support for undercurl (|t_Ce|), double underline (|t_Us|), dotted underline (|t_ds|) and dashed underline (|t_Ds|) termcap entries and @@ -31783,7 +31784,8 @@ Other improvements *new-other-9.1* - xxd: reversing a bit dump (xxd -r). - xxd: customize the variable name used in the C include output (xxd -n). -Changed *changed-9.1* + *changed-9.1* +Changed ~ ------- - The features |++builtin_terms|, |+cmdline_info|, |+cmdwin|, |+file_in_path|, |+float|, |+path_extra|, |+textobjects|, |+wildignore| and |+wildmenu| are @@ -31815,7 +31817,8 @@ Changed *changed-9.1* - Migrate to autoconf 2.71. - Start using C99 feature (declare variable in for loops). -Added *added-9.1* + *added-9.1* +Added ~ ----- Various syntax, indent and other plugins were added. @@ -32090,7 +32093,7 @@ Solution: Store the text column when drawing text. Patch 9.0.0049 Problem: Csv and tsv files are not recognized. -Solution: Add patterns fo csv and tsv files. (Leandro Lourenci, +Solution: Add patterns for csv and tsv files. (Leandro Lourenci, closes #10680) Patch 9.0.0050 @@ -40641,7 +40644,7 @@ Solution: Use the class-related grow array for storing the Patch 9.0.1989 Problem: Vim9: double error message given -Solution: Only give second error message, if ther +Solution: Only give second error message, if there wasn't one given before Patch 9.0.1990 @@ -40687,7 +40690,7 @@ Solution: Mention the defining class for variable access error message Patch 9.0.2000 Problem: Vim9: use-after-free in deep call stack -Solution: Get the objct pointer from execution stack +Solution: Get the object pointer from execution stack Patch 9.0.2001 Problem: Vim9: segfault with islocked() @@ -41541,39 +41544,48 @@ VERSION 9.2 *version-9.2* *version9.2* *vim-9.2* This section is about improvements made between version 9.1 and 9.2 and is a work in progress. -Support for Wayland UI. - -Support for the XDG Desktop Specification |xdg-base-dir| - -Vim9 script +Vim9 script ~ ----------- Add support for internal builtin functions with vim9 objects, see |builtin-object-methods| Enum support for Vim9 script |:enum| -Other improvements *new-other-9.2* + *new-other-9.2* +Other new features ~ ------------------ The comment plugin |comment-install| is included. -Changed *changed-9.2* -------- +Support for Wayland UI. + +Support for the XDG Desktop Specification |xdg-base-dir| +Support highlighting the matched text for insert-mode completion and +command-line completion in |ins-completion-menu|. + + *changed-9.2* +Changed~ +------- - use 'smoothscroll' logic for CTRL-F and CTRL-B for pagewise scrolling - use 'smoothscroll' logic for CTRL-D and CTRL-U for half-pagewise scrolling +- the default for 'commentstring' contains whitespace padding to have + automatic comments look nicer |comment-install| +- 'completeopt' is now a |global-local| option. -Added *added-9.2* + *added-9.2* +Added ~ ----- - Various syntax, indent and other plugins were added. Functions: ~ |diff()| diff two Lists of strings +|filecopy()| copy a file {from} to {to} |foreach()| apply function to List items +|getregion()| get a region of text from a buffer +|getregionpos()| get a list of positions for a region |matchbufline()| all the matches of a pattern in a buffer |matchstrlist()| all the matches of a pattern in a List of strings -|getregion()| get a region of text from a buffer Autocommands: ~ @@ -41586,39 +41598,45 @@ Autocommands: ~ Highlighting: ~ -|hl-MsgArea| highlighting of the Command-line and messages area. +|hl-MsgArea| highlighting of the Command-line and messages area +|hl-PmenuMatch| Popup menu: highlighting of matched text +|hl-PmenuMatchSel| Popup menu: highlighting of matched text in selected + line Commands: ~ +|[r| and |]r| to move the cursor to previous/next rare word + Options: ~ 'winfixbuf' Keep buffer focused in a window -'t_xo' Terminal uses XON/XOFF handshaking (e.g. vt420). +'t_xo' Terminal uses XON/XOFF handshaking (e.g. vt420) +'t_CF' Support for alternate font highlighting terminal code ============================================================================== -INCOMPATIBLE CHANGES *incompatible-9.2* +INCOMPATIBLE CHANGES *incompatible-9.2* Improved/Different MS-Windows mapping support |w32-experimental-keycode-trans-strategy| ============================================================================== -IMPROVEMENTS *improvements-9.2* +IMPROVEMENTS *improvements-9.2* Support for command-line completion of 'keymap' option values. Support for compiling all the methods in a Vim9 class using |:defcompile|. -Support for alternate font highlighting using |t_CF| terminal code. - Support for Super key mappings in GTK using . Improved visual highlighting. Python3 support in OpenVMS. +Support |fuzzy-matching| during |ins-completion| with "fuzzy" item for 'completeopt' + ============================================================================== -COMPILE TIME CHANGES *compile-changes-9.2* +COMPILE TIME CHANGES *compile-changes-9.2* Support for building with Ruby 3.3. diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt index 1714833..3bcee47 100644 --- a/runtime/doc/vi_diff.txt +++ b/runtime/doc/vi_diff.txt @@ -1,4 +1,4 @@ -*vi_diff.txt* For Vim version 9.1. Last change: 2022 Apr 03 +*vi_diff.txt* For Vim version 9.1. Last change: 2024 May 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -49,7 +49,7 @@ printed. autoprint (ap) boolean (default on) *'autoprint'* *'ap'* beautify (bf) boolean (default off) *'beautify'* *'bf'* -flash (fl) boolean (default ??) *'flash'* *'fl'* +flash (fl) boolean (default on) *'flash'* *'fl'* graphic (gr) boolean (default off) *'graphic'* *'gr'* hardtabs (ht) number (default 8) *'hardtabs'* *'ht'* number of spaces that a moves on the display diff --git a/runtime/doc/vim-it.1 b/runtime/doc/vim-it.1 index 8337ad9..7ecd9f4 100644 --- a/runtime/doc/vim-it.1 +++ b/runtime/doc/vim-it.1 @@ -1,4 +1,4 @@ -.TH VIM 1 "13 giugno 2022" +.TH VIM 1 "4 giugno 2024" .SH NOME vim \- VI Migliorato, un editor di testi per programmatori .SH SINTASSI @@ -42,9 +42,9 @@ Vedere ":help vi_diff.txt" per un sommario delle differenze fra .B Vim e Vi. .PP -Mentre usate +Mentre si usa .B Vim -potete ricevere molto aiuto dal sistema di help online, col comando +si pu ricevere molto aiuto dal sistema di help online, col comando ":help". Vedere qui sotto la sezione AIUTO ONLINE. .PP @@ -68,18 +68,18 @@ nome_file .. Una lista di nomi di file. Il primo di questi sar il file corrente, e verr letto nel buffer. Il cursore sar posizionato sulla prima linea del buffer. -Potete arrivare agli altri file col comando ":next". +Si pu arrivare agli altri file col comando ":next". Per editare un file il cui nome inizia per "\-" premettete "\-\-" alla lista_file. .TP \- -Il file da editare letto dallo "stdin"- -I comandi sono letti da "stderr", che dovrebbe essere un terminale [tty]. +Il file da editare letto dallo stdin. +I comandi sono letti da stderr, che dovrebbe essere un terminale [tty]. .TP \-t {tag} Il file da editare e la posizione iniziale del cursore dipendono da "tag", una specie di "etichetta" a cui saltare. {tag} viene cercata nel file "tags", e il file a essa associato diventa -quello corrente, ed il comando ad essa associato viene eseguito. +quello corrente, e il comando a essa associato viene eseguito. Di solito si usa per programmi C, nel qual caso {tag} potrebbe essere un nome di funzione. L'effetto che il file contenente quella funzione diventa il file corrente @@ -97,10 +97,10 @@ Vedere ":help quickfix". .PP .B Vim si comporta in modo diverso se invocato con nomi differenti (il programma -eseguibile "sottostante" pu essere sempre lo stesso). +eseguibile "soggiacente" pu essere sempre lo stesso). .TP 10 vim -Modo Normal, comportamento normale. +Modo Normal, comportamento predefinito. .TP ex Inizia in Modo "Ex". @@ -108,7 +108,7 @@ Si pu Si pu invocare il Modo "Ex" anche con l'argomento "\-e". .TP view -Inizia in Modo Read-only (Sola Lettura). Non potete modificare i file. +Inizia in Modo Read-only (Sola Lettura). Non si possono modificare i file. Si pu invocare il Modo Read-only anche con l'argomento "\-R". .TP gvim gview @@ -131,11 +131,11 @@ Le opzioni possono essere in un ordine qualsiasi, prima o dopo i nomi di file. Opzioni che non hanno un argomento si possono specificare dietro a un solo "\-". .TP 12 +[numero] -Per il primo file il cursore sar posizionato sulla linea "numero". +Nel primo file il cursore sar posizionato sulla linea "numero". Se "numero" manca, il cursore sar posizionato sull'ultima linea del file. .TP +/{espressione} -Per il primo file il cursore sar posizionato alla +Nel primo file il cursore sar posizionato alla prima occorrenza di {espressione}. Vedere ":help search\-pattern" per come specificare l'espressione. .TP @@ -166,7 +166,7 @@ Si possono usare fino a 10 di questi comandi, indipendentemente dai comandi "\-c Se .B Vim stato compilato con supporto ARABIC per editare file con orientamento -destra-sinistra e tastiera con mappatura araba, questa opzione inizia +destra-sinistra e tastiera con mappatura araba, quest'opzione inizia .B Vim in Modo Arabic, cio impostando 'arabic'. Altrimenti viene dato un messaggio di errore e @@ -176,7 +176,7 @@ termina in modo anormale. \-b Modo Binary (binario). Vengono impostate alcune opzioni che permettono di modificare un file -binario o un programma eseguibile. +binario o un file che contiene un programma eseguibile. .TP \-C Compatibile. Imposta l'opzione 'compatible'. @@ -186,12 +186,12 @@ ha quasi lo stesso comportamento di Vi, anche in presenza di un file .vimrc. .TP \-d Inizia in Modo Diff [differenze]. -Dovrebbero esserci come argomenti due o tre o quattro nomi di file. +Dovrebbero esserci come argomenti da due o otto nomi di file. .B Vim aprir tutti i file evidenziando le differenze fra gli stessi. Funziona come vimdiff(1). .TP -\-d {dispositivo} +\-d {dispositivo}, \-dev {dispositivo} Apre {dispositivo} per usarlo come terminale. Solo per l'Amiga. Esempio: @@ -221,7 +221,7 @@ non Opzione da usare quando .B Vim eseguito da un programma che attende la fine della -sessione di edit (ad es. mail). +sessione di edit (p.es., mail). Sull'Amiga i comandi ":sh" e ":!" non sono disponibili. .TP \-\-nofork @@ -233,7 +233,7 @@ non crea [fork] una nuova finestra, indipendente dalla shell di invocazione. Se .B Vim stato compilato con supporto FKMAP per editare file con orientamento -destra-sinistra e tastiera con mappatura Farsi, questa opzione inizia +destra-sinistra e tastiera con mappatura Farsi, quest'opzione inizia .B Vim in Modo Farsi, cio impostando 'fkmap' e 'rightleft'. Altrimenti viene dato un messaggio di errore e @@ -243,12 +243,19 @@ termina in modo anormale. \-g Se .B Vim - stato compilato con supporto GUI, questa opzione chiede di usarla. + stato compilato con supporto GUI, quest'opzione chiede di usarla. Se Vim stato compilato senza supporto GUI viene dato un messaggio di errore e .B Vim termina in modo anormale. .TP -\-h +\-\-gui-dialog-file {nome} +Quando si usa la GUI, invece di visualizzare un dialogo, il titolo e il +messaggio del dialogo sono scritti sul file {nome}. Il file viene creato o, +se gi esistente, viene esteso. Quest'opzione serve solo in fase di test, +per evitare di restare bloccati da un dialogo che non si riesce a visualizzare. +Se si sta lavorando senza la GUI l'argomento viene ignorato. +.TP +\-\-help, \-h, \-? Un po' di aiuto su opzioni e argomenti che si possono dare invocando Vim. Subito dopo .B Vim @@ -258,7 +265,7 @@ esce. Se .B Vim stato compilato col supporto RIGHTLEFT per editare file con orientamento -destra-sinistra e tastiera con mappatura Ebraica, questa opzione inizia +destra-sinistra e tastiera con mappatura Ebraica, quest'opzione inizia .B Vim in Modo Ebraico, cio impostando 'hkmap' e 'rightleft'. Altrimenti viene dato un messaggio di errore e @@ -266,7 +273,7 @@ Altrimenti viene dato un messaggio di errore e termina in modo anormale. .TP \-i {viminfo} -Se abilitato l'uso di un file viminfo, questa opzione indica il nome +Se abilitato l'uso di un file viminfo, quest'opzione indica il nome del file da usare invece di quello predefinito "~/.viminfo". Si pu anche evitare l'uso di un file .viminfo, dando come nome "NONE". @@ -292,13 +299,13 @@ opzioni possono essere abilitate in seguito, permettendo cos Modo "Non-compatibile". Annulla l'opzione 'compatible'. Cos .B Vim -va un po' meglio, ma meno compatibile con Vi, anche in assenza di un +si comporta un po' meglio, ma meno compatibile con Vi, anche in assenza di un file .vimrc. .TP \-n Inibisce l'uso di un file di swap. Il recupero dopo una caduta di macchina diventa impossibile. -Utile per editare un file su un supporto molto lento (ad es. floppy). +Utile per editare un file su un supporto molto lento (p.es., floppy). Il comando ":set uc=0" ha lo stesso effetto. Per abilitare il recupero usare ":set uc=200". .TP @@ -306,16 +313,23 @@ Per abilitare il recupero usare ":set uc=200". Diviene un Editor server per NetBeans. Vedere la documentazione per dettagli. .TP \-o[N] -Apri N finestre in orizzontale. -Se N manca, apri una finestra per ciascun file. +Apre N finestre in orizzontale. +Se N manca, apre una finestra per ciascun file. .TP \-O[N] -Apri N finestre, in verticale. -Se N manca, apri una finestra per ciascun file. +Apre N finestre, in verticale. +Se N manca, apre una finestra per ciascun file. .TP \-p[N] -Apri N pagine di linguette. -Quando N omesso, apri una pagine di linguette per ciascun file. +Apre N pagine di linguette. +Quando N omesso, apre una pagine di linguette per ciascun file. +.TP +\-P {titolo-padre} +Solo per GUI Win32: Specifica il titolo dell'applicazione-padre. Se possibile, +Vim viene eseguito in una finestra MDI (Multiple-Document Interface). +{titolo-padre} deve apparire nel titolo della applicazione-padre. Accertatevi +che sia sufficientemente esplicativo. Notare che l'implementazione ancora +rudimentale. Non funziona per tutte le applicazioni, e il men non funziona. .TP \-R Modo Read-only (Sola Lettura). @@ -324,7 +338,7 @@ Si pu involontaria. Se si vuole davvero riscrivere il file, occorre aggiungere un punto esclamativo al comando Ex, come in ":w!". -L'opzione \-R implica anche l'opzione \-n (vedere sotto). +L'opzione \-R implica anche l'opzione \-n (vedere sopra). L'opzione 'readonly' pu essere annullata con ":set noro". Vedere ":help 'readonly'". .TP @@ -342,10 +356,10 @@ Vedere ":help recovery". Modo silenzioso. Solo quando invocato come "Ex" o quando l'opzione "\-e" stata data prima dell'opzione "\-s". .TP -\-s {scriptin} -Lo script file {scriptin} letto. +\-s {script_in_input} +Lo script file {script_in_input} letto. I caratteri nel file sono interpretati come se immessi da terminale. -Lo stesso risultato si pu ottenere col comando ":source! {scriptin}". +Lo stesso risultato si pu ottenere col comando ":source! {script_in_input}". Se la fine del file di input viene raggiunta prima che Vim termini, l'ulteriore input verr preso dalla tastiera. .TP @@ -356,12 +370,22 @@ quale tipo di terminale state usando. Utile solo se il terminale non viene riconosciuto correttamente da Vim. Dovrebbe essere un terminale noto a .B Vim -(internamente) o definito nei file termcap o terminfo. +(predefinito) o definito nei file termcap o terminfo. +.TP +\-\-not-a-term +Da usare per specifica a +.B Vim +che l'utente consapevole che l'input e l'output non avvengono con un terminale +vero e proprio. Ci serve per evitare il messaggio di avvertimento e il ritardo +di due secondi che avverrebbero in assenza di questo argomento. +.TP +\-\-ttyfail +Quando stdin o stdout non sono un terminale (tty) esci subito da Vim. .TP \-u {vimrc} Usa i comandi nel file {vimrc} per inizializzazioni. Tutte le altre inizializzazioni non sono eseguite. -Usate questa opzione per editare qualche file di tipo speciale. +Usare quest'opzione per editare qualche file di tipo speciale. Si possono anche omettere tutte le inizializzazioni dando come nome "NONE". Vedere ":help initialization" da vim per ulteriori dettagli. .TP @@ -376,21 +400,37 @@ Verboso. Vim manda messaggi relativi ai file di script che esegue e quando legge o scrive un file viminfo. Il numero opzionale N il valore dell'opzione 'verbose'. Il valore predefinito 10. .TP +\-V[N]{nome_file} +Comw \-V imposta 'verbosefile' a {nome_file}. Il risultato che i messaggi +non sono visualizzati, ma scritti sul file {nome_file}. Il {nome_file} non +deve iniziare con un numero. +.TP +\-\-log {nome_file} +Se +.B Vim + stato compilato con le funzionalit eval e channel, inizia a registrare +e scrive le registrazioni a {nome_file}. Ci equivale a chiamare +.I ch_logfile({nome_file}, 'ao') +in una fase molto iniziale dell'avvio del programma. +.TP \-v Inizia .B Vim in Modo Vi, come se il programma eseguibile fosse "vi". Questo ha effetto solo quando Vim viene invocato con il nome "ex". .TP -\-w {scriptout} -Ogni carattere immesso viene registrato nel file {scriptout}, +\-w{numero} +Imposta l'opzione 'window' a {numero}. +.TP +\-w {script_file} +Ogni carattere immesso viene registrato nel file {script_file}, finch non si esce da .B Vim. Utile se si vuole creare uno script file da usare con "vim \-s" o ":source!". -Se il file {scriptout} esiste, quel che immettete viene aggiunto in fondo. +Se il file {script_file} esiste, il testo immesso viene aggiunto in fondo. .TP -\-W {scriptout} +\-W {script_file} Come \-w, ma uno script file esistente viene sovrascritto. .TP \-x @@ -421,10 +461,7 @@ Richiede di non usare alcun file di personalizzazione (vimrc, plugin, etc.). Utile per verificare se un problema persiste invocando Vim "originale". .TP \-\-echo\-wid -Solo per GUI GTK: Visualizza Window ID su "stdout". -.TP -\-\-help -Vim d un messaggio ed esce, come con l'argomento "\-h". +Solo per GUI GTK: Visualizza ID di Window su stdout. .TP \-\-literal Considera i nomi passati come argomenti letterali, senza espandere metacaratteri. @@ -439,7 +476,7 @@ argomenti. Se non si trova un server viene dato un messaggio e i file sono editati nel Vim corrente. .TP \-\-remote\-expr {expr} -Connettersi a un server Vim, valutare {expr} e stampare il risultato su "stdout". +Connettersi a un server Vim, valutare {expr} e stampare il risultato su stdout. .TP \-\-remote\-send {chiavi} Connettersi a un server Vim e spedirgli {chiavi}. @@ -467,7 +504,11 @@ Solo per GUI GTK: Usa meccanismo GtkPlug per eseguire gvim in un'altra finestra. Durante la fase iniziale, scrive messaggi di log al file {nome_file}. .TP \-\-version -Stampa la versione di Vim ed esci. +Stampa la versione di Vim ed esce. +.TP +\-\-windowid {id} +Solo per GUI Win32: Chiede a gvim di provare a user l'ID di window {id} +come padre, in modo da venir eseguito all'interno della finestra specificata. .SH AIUTO ONLINE Battere ":help" in .B Vim @@ -481,53 +522,57 @@ Tutti i file di documentazione possono essere navigati cos ":help syntax.txt". .SH FILE .TP 15 -/usr/local/lib/vim/doc/*.txt +/usr/local/share/vim/vim??/doc/*.txt I file di documentazione di .B Vim . Usare ":help doc\-file\-list" per avere la lista completa. +.br +.I vim?? + il numero di versione corto, p.es., vim91 per indicare +.B Vim 9.1 .TP -/usr/local/lib/vim/doc/tags +/usr/local/share/vim/vim??/doc/tags Il file di tags usato per trovare informazioni nei file di documentazione. .TP -/usr/local/lib/vim/syntax/syntax.vim +/usr/local/share/vim/vim??/syntax/syntax.vim Inizializzazioni sintattiche a livello di sistema. .TP -/usr/local/lib/vim/syntax/*.vim +/usr/local/share/vim/vim??/syntax/*.vim File di colorazione sintattica per vari linguaggi. .TP -/usr/local/lib/vim/vimrc +/usr/local/share/vim/vimrc Inizializzazioni .B Vim a livello di sistema. .TP -~/.vimrc +~/.vimrc, ~/.vim/vimrc, $XDG_CONFIG_HOME/vim/vimrc Inizializzazioni personali di .B Vim -. +(viene utilizzata la prima trovata). .TP -/usr/local/lib/vim/gvimrc +/usr/local/share/vim/gvimrc Inizializzazioni gvim a livello di sistema. .TP -~/.gvimrc -Inizializzazioni personali di +~/.gvimrc, ~/.vim/gvimrc, $XDG_CONFIG_HOME/vim/gvimrc +Inizializzazioni personali di gvim (viene utilizzata la prima trovata). .TP -/usr/local/lib/vim/optwin.vim -Script Vim usato dal comando ":options", da usare per visualizzare e impostare opzioni. +/usr/local/share/vim/optwin.vim +Script Vim usato dal comando ":options", maniera elegante per visualizzare e impostare opzioni. .TP -/usr/local/lib/vim/menu.vim +/usr/local/share/vim/vim??/menu.vim Inizializzazioni del men gvim a livello di sistema. .TP -/usr/local/lib/vim/bugreport.vim +/usr/local/share/vim/vim??/bugreport.vim Script Vim per generare una segnalazione di errore. Vedere ":help bugs". .TP -/usr/local/lib/vim/filetype.vim +/usr/local/share/vim/vim??/filetype.vim Script Vim per determinare il tipo di un file dal suo nome. Vedere ":help 'filetype'". .TP -/usr/local/lib/vim/scripts.vim +/usr/local/share/vim/vim??/scripts.vim Script Vim per determinare il tipo di un file dal suo contenuto. Vedere ":help 'filetype'". .TP -/usr/local/lib/vim/print/*.ps +/usr/local/share/vim/vim??/print/*.ps File usati per stampa PostScript. .PP Per informazioni aggiornate [in inglese \- NdT] vedere la home page di Vim: @@ -546,8 +591,8 @@ Vedere ":help credits" in basato su Stevie, scritto da: Tim Thompson, Tony Andrews e G.R. (Fred) Walter. In verit, poco o nulla rimasto del loro codice originale. -.SH BACHI -Probabili. +.SH BUG +Probabilmente. Vedere ":help todo" per una lista di problemi noti. .PP Si noti che un certo numero di comportamenti che possono essere considerati errori diff --git a/runtime/doc/vim-it.UTF-8.1 b/runtime/doc/vim-it.UTF-8.1 index 5931d4b..c9b5835 100644 --- a/runtime/doc/vim-it.UTF-8.1 +++ b/runtime/doc/vim-it.UTF-8.1 @@ -1,4 +1,4 @@ -.TH VIM 1 "13 giugno 2022" +.TH VIM 1 "4 giugno 2024" .SH NOME vim \- VI Migliorato, un editor di testi per programmatori .SH SINTASSI @@ -42,9 +42,9 @@ Vedere ":help vi_diff.txt" per un sommario delle differenze fra .B Vim e Vi. .PP -Mentre usate +Mentre si usa .B Vim -potete ricevere molto aiuto dal sistema di help online, col comando +si può ricevere molto aiuto dal sistema di help online, col comando ":help". Vedere qui sotto la sezione AIUTO ONLINE. .PP @@ -68,18 +68,18 @@ nome_file .. Una lista di nomi di file. Il primo di questi sarà il file corrente, e verrà letto nel buffer. Il cursore sarà posizionato sulla prima linea del buffer. -Potete arrivare agli altri file col comando ":next". +Si può arrivare agli altri file col comando ":next". Per editare un file il cui nome inizia per "\-" premettete "\-\-" alla lista_file. .TP \- -Il file da editare è letto dallo "stdin"- -I comandi sono letti da "stderr", che dovrebbe essere un terminale [tty]. +Il file da editare è letto dallo stdin. +I comandi sono letti da stderr, che dovrebbe essere un terminale [tty]. .TP \-t {tag} Il file da editare e la posizione iniziale del cursore dipendono da "tag", una specie di "etichetta" a cui saltare. {tag} viene cercata nel file "tags", e il file a essa associato diventa -quello corrente, ed il comando ad essa associato viene eseguito. +quello corrente, e il comando a essa associato viene eseguito. Di solito si usa per programmi C, nel qual caso {tag} potrebbe essere un nome di funzione. L'effetto è che il file contenente quella funzione diventa il file corrente @@ -97,10 +97,10 @@ Vedere ":help quickfix". .PP .B Vim si comporta in modo diverso se invocato con nomi differenti (il programma -eseguibile "sottostante" può essere sempre lo stesso). +eseguibile "soggiacente" può essere sempre lo stesso). .TP 10 vim -Modo Normal, comportamento normale. +Modo Normal, comportamento predefinito. .TP ex Inizia in Modo "Ex". @@ -108,7 +108,7 @@ Si può passare in Modo Normal col comando ":vi". Si può invocare il Modo "Ex" anche con l'argomento "\-e". .TP view -Inizia in Modo Read-only (Sola Lettura). Non potete modificare i file. +Inizia in Modo Read-only (Sola Lettura). Non si possono modificare i file. Si può invocare il Modo Read-only anche con l'argomento "\-R". .TP gvim gview @@ -131,11 +131,11 @@ Le opzioni possono essere in un ordine qualsiasi, prima o dopo i nomi di file. Opzioni che non hanno un argomento si possono specificare dietro a un solo "\-". .TP 12 +[numero] -Per il primo file il cursore sarà posizionato sulla linea "numero". +Nel primo file il cursore sarà posizionato sulla linea "numero". Se "numero" manca, il cursore sarà posizionato sull'ultima linea del file. .TP +/{espressione} -Per il primo file il cursore sarà posizionato alla +Nel primo file il cursore sarà posizionato alla prima occorrenza di {espressione}. Vedere ":help search\-pattern" per come specificare l'espressione. .TP @@ -166,7 +166,7 @@ Si possono usare fino a 10 di questi comandi, indipendentemente dai comandi "\-c Se .B Vim è stato compilato con supporto ARABIC per editare file con orientamento -destra-sinistra e tastiera con mappatura araba, questa opzione inizia +destra-sinistra e tastiera con mappatura araba, quest'opzione inizia .B Vim in Modo Arabic, cioè impostando 'arabic'. Altrimenti viene dato un messaggio di errore e @@ -176,7 +176,7 @@ termina in modo anormale. \-b Modo Binary (binario). Vengono impostate alcune opzioni che permettono di modificare un file -binario o un programma eseguibile. +binario o un file che contiene un programma eseguibile. .TP \-C Compatibile. Imposta l'opzione 'compatible'. @@ -186,12 +186,12 @@ ha quasi lo stesso comportamento di Vi, anche in presenza di un file .vimrc. .TP \-d Inizia in Modo Diff [differenze]. -Dovrebbero esserci come argomenti due o tre o quattro nomi di file. +Dovrebbero esserci come argomenti da due o otto nomi di file. .B Vim aprirà tutti i file evidenziando le differenze fra gli stessi. Funziona come vimdiff(1). .TP -\-d {dispositivo} +\-d {dispositivo}, \-dev {dispositivo} Apre {dispositivo} per usarlo come terminale. Solo per l'Amiga. Esempio: @@ -221,7 +221,7 @@ non è fatto ripartire per aprire una nuova finestra. Opzione da usare quando .B Vim è eseguito da un programma che attende la fine della -sessione di edit (ad es. mail). +sessione di edit (p.es., mail). Sull'Amiga i comandi ":sh" e ":!" non sono disponibili. .TP \-\-nofork @@ -233,7 +233,7 @@ non crea [fork] una nuova finestra, indipendente dalla shell di invocazione. Se .B Vim è stato compilato con supporto FKMAP per editare file con orientamento -destra-sinistra e tastiera con mappatura Farsi, questa opzione inizia +destra-sinistra e tastiera con mappatura Farsi, quest'opzione inizia .B Vim in Modo Farsi, cioè impostando 'fkmap' e 'rightleft'. Altrimenti viene dato un messaggio di errore e @@ -243,12 +243,19 @@ termina in modo anormale. \-g Se .B Vim -è stato compilato con supporto GUI, questa opzione chiede di usarla. +è stato compilato con supporto GUI, quest'opzione chiede di usarla. Se Vim è stato compilato senza supporto GUI viene dato un messaggio di errore e .B Vim termina in modo anormale. .TP -\-h +\-\-gui-dialog-file {nome} +Quando si usa la GUI, invece di visualizzare un dialogo, il titolo e il +messaggio del dialogo sono scritti sul file {nome}. Il file viene creato o, +se già esistente, viene esteso. Quest'opzione serve solo in fase di test, +per evitare di restare bloccati da un dialogo che non si riesce a visualizzare. +Se si sta lavorando senza la GUI l'argomento viene ignorato. +.TP +\-\-help, \-h, \-? Un po' di aiuto su opzioni e argomenti che si possono dare invocando Vim. Subito dopo .B Vim @@ -258,7 +265,7 @@ esce. Se .B Vim è stato compilato col supporto RIGHTLEFT per editare file con orientamento -destra-sinistra e tastiera con mappatura Ebraica, questa opzione inizia +destra-sinistra e tastiera con mappatura Ebraica, quest'opzione inizia .B Vim in Modo Ebraico, cioè impostando 'hkmap' e 'rightleft'. Altrimenti viene dato un messaggio di errore e @@ -266,7 +273,7 @@ Altrimenti viene dato un messaggio di errore e termina in modo anormale. .TP \-i {viminfo} -Se è abilitato l'uso di un file viminfo, questa opzione indica il nome +Se è abilitato l'uso di un file viminfo, quest'opzione indica il nome del file da usare invece di quello predefinito "~/.viminfo". Si può anche evitare l'uso di un file .viminfo, dando come nome "NONE". @@ -292,13 +299,13 @@ opzioni possono essere abilitate in seguito, permettendo così modifiche. Modo "Non-compatibile". Annulla l'opzione 'compatible'. Così .B Vim -va un po' meglio, ma è meno compatibile con Vi, anche in assenza di un +si comporta un po' meglio, ma è meno compatibile con Vi, anche in assenza di un file .vimrc. .TP \-n Inibisce l'uso di un file di swap. Il recupero dopo una caduta di macchina diventa impossibile. -Utile per editare un file su un supporto molto lento (ad es. floppy). +Utile per editare un file su un supporto molto lento (p.es., floppy). Il comando ":set uc=0" ha lo stesso effetto. Per abilitare il recupero usare ":set uc=200". .TP @@ -306,16 +313,23 @@ Per abilitare il recupero usare ":set uc=200". Diviene un Editor server per NetBeans. Vedere la documentazione per dettagli. .TP \-o[N] -Apri N finestre in orizzontale. -Se N manca, apri una finestra per ciascun file. +Apre N finestre in orizzontale. +Se N manca, apre una finestra per ciascun file. .TP \-O[N] -Apri N finestre, in verticale. -Se N manca, apri una finestra per ciascun file. +Apre N finestre, in verticale. +Se N manca, apre una finestra per ciascun file. .TP \-p[N] -Apri N pagine di linguette. -Quando N è omesso, apri una pagine di linguette per ciascun file. +Apre N pagine di linguette. +Quando N è omesso, apre una pagine di linguette per ciascun file. +.TP +\-P {titolo-padre} +Solo per GUI Win32: Specifica il titolo dell'applicazione-padre. Se possibile, +Vim viene eseguito in una finestra MDI (Multiple-Document Interface). +{titolo-padre} deve apparire nel titolo della applicazione-padre. Accertatevi +che sia sufficientemente esplicativo. Notare che l'implementazione è ancora +rudimentale. Non funziona per tutte le applicazioni, e il menù non funziona. .TP \-R Modo Read-only (Sola Lettura). @@ -324,7 +338,7 @@ Si può ancora modificare il buffer, ma il file è protetto da una riscrittura involontaria. Se si vuole davvero riscrivere il file, occorre aggiungere un punto esclamativo al comando Ex, come in ":w!". -L'opzione \-R implica anche l'opzione \-n (vedere sotto). +L'opzione \-R implica anche l'opzione \-n (vedere sopra). L'opzione 'readonly' può essere annullata con ":set noro". Vedere ":help 'readonly'". .TP @@ -342,10 +356,10 @@ Vedere ":help recovery". Modo silenzioso. Solo quando invocato come "Ex" o quando l'opzione "\-e" è stata data prima dell'opzione "\-s". .TP -\-s {scriptin} -Lo script file {scriptin} è letto. +\-s {script_in_input} +Lo script file {script_in_input} è letto. I caratteri nel file sono interpretati come se immessi da terminale. -Lo stesso risultato si può ottenere col comando ":source! {scriptin}". +Lo stesso risultato si può ottenere col comando ":source! {script_in_input}". Se la fine del file di input viene raggiunta prima che Vim termini, l'ulteriore input verrà preso dalla tastiera. .TP @@ -356,12 +370,22 @@ quale tipo di terminale state usando. Utile solo se il terminale non viene riconosciuto correttamente da Vim. Dovrebbe essere un terminale noto a .B Vim -(internamente) o definito nei file termcap o terminfo. +(predefinito) o definito nei file termcap o terminfo. +.TP +\-\-not-a-term +Da usare per specifica a +.B Vim +che l'utente è consapevole che l'input e l'output non avvengono con un terminale +vero e proprio. Ciò serve per evitare il messaggio di avvertimento e il ritardo +di due secondi che avverrebbero in assenza di questo argomento. +.TP +\-\-ttyfail +Quando stdin o stdout non sono un terminale (tty) esci subito da Vim. .TP \-u {vimrc} Usa i comandi nel file {vimrc} per inizializzazioni. Tutte le altre inizializzazioni non sono eseguite. -Usate questa opzione per editare qualche file di tipo speciale. +Usare quest'opzione per editare qualche file di tipo speciale. Si possono anche omettere tutte le inizializzazioni dando come nome "NONE". Vedere ":help initialization" da vim per ulteriori dettagli. .TP @@ -376,21 +400,37 @@ Verboso. Vim manda messaggi relativi ai file di script che esegue e quando legge o scrive un file viminfo. Il numero opzionale N è il valore dell'opzione 'verbose'. Il valore predefinito è 10. .TP +\-V[N]{nome_file} +Comw \-V imposta 'verbosefile' a {nome_file}. Il risultato è che i messaggi +non sono visualizzati, ma scritti sul file {nome_file}. Il {nome_file} non +deve iniziare con un numero. +.TP +\-\-log {nome_file} +Se +.B Vim +è stato compilato con le funzionalità eval e channel, inizia a registrare +e scrive le registrazioni a {nome_file}. Ciò equivale a chiamare +.I ch_logfile({nome_file}, 'ao') +in una fase molto iniziale dell'avvio del programma. +.TP \-v Inizia .B Vim in Modo Vi, come se il programma eseguibile fosse "vi". Questo ha effetto solo quando Vim viene invocato con il nome "ex". .TP -\-w {scriptout} -Ogni carattere immesso viene registrato nel file {scriptout}, +\-w{numero} +Imposta l'opzione 'window' a {numero}. +.TP +\-w {script_file} +Ogni carattere immesso viene registrato nel file {script_file}, finché non si esce da .B Vim. Utile se si vuole creare uno script file da usare con "vim \-s" o ":source!". -Se il file {scriptout} esiste, quel che immettete viene aggiunto in fondo. +Se il file {script_file} esiste, il testo immesso viene aggiunto in fondo. .TP -\-W {scriptout} +\-W {script_file} Come \-w, ma uno script file esistente viene sovrascritto. .TP \-x @@ -421,10 +461,7 @@ Richiede di non usare alcun file di personalizzazione (vimrc, plugin, etc.). Utile per verificare se un problema persiste invocando Vim "originale". .TP \-\-echo\-wid -Solo per GUI GTK: Visualizza Window ID su "stdout". -.TP -\-\-help -Vim dà un messaggio ed esce, come con l'argomento "\-h". +Solo per GUI GTK: Visualizza ID di Window su stdout. .TP \-\-literal Considera i nomi passati come argomenti letterali, senza espandere metacaratteri. @@ -439,7 +476,7 @@ argomenti. Se non si trova un server viene dato un messaggio e i file sono editati nel Vim corrente. .TP \-\-remote\-expr {expr} -Connettersi a un server Vim, valutare {expr} e stampare il risultato su "stdout". +Connettersi a un server Vim, valutare {expr} e stampare il risultato su stdout. .TP \-\-remote\-send {chiavi} Connettersi a un server Vim e spedirgli {chiavi}. @@ -467,7 +504,11 @@ Solo per GUI GTK: Usa meccanismo GtkPlug per eseguire gvim in un'altra finestra. Durante la fase iniziale, scrive messaggi di log al file {nome_file}. .TP \-\-version -Stampa la versione di Vim ed esci. +Stampa la versione di Vim ed esce. +.TP +\-\-windowid {id} +Solo per GUI Win32: Chiede a gvim di provare a user l'ID di window {id} +come padre, in modo da venir eseguito all'interno della finestra specificata. .SH AIUTO ONLINE Battere ":help" in .B Vim @@ -481,53 +522,57 @@ Tutti i file di documentazione possono essere navigati così. Ad es.: ":help syntax.txt". .SH FILE .TP 15 -/usr/local/lib/vim/doc/*.txt +/usr/local/share/vim/vim??/doc/*.txt I file di documentazione di .B Vim . Usare ":help doc\-file\-list" per avere la lista completa. +.br +.I vim?? +è il numero di versione corto, p.es., vim91 per indicare +.B Vim 9.1 .TP -/usr/local/lib/vim/doc/tags +/usr/local/share/vim/vim??/doc/tags Il file di tags usato per trovare informazioni nei file di documentazione. .TP -/usr/local/lib/vim/syntax/syntax.vim +/usr/local/share/vim/vim??/syntax/syntax.vim Inizializzazioni sintattiche a livello di sistema. .TP -/usr/local/lib/vim/syntax/*.vim +/usr/local/share/vim/vim??/syntax/*.vim File di colorazione sintattica per vari linguaggi. .TP -/usr/local/lib/vim/vimrc +/usr/local/share/vim/vimrc Inizializzazioni .B Vim a livello di sistema. .TP -~/.vimrc +~/.vimrc, ~/.vim/vimrc, $XDG_CONFIG_HOME/vim/vimrc Inizializzazioni personali di .B Vim -. +(viene utilizzata la prima trovata). .TP -/usr/local/lib/vim/gvimrc +/usr/local/share/vim/gvimrc Inizializzazioni gvim a livello di sistema. .TP -~/.gvimrc -Inizializzazioni personali di +~/.gvimrc, ~/.vim/gvimrc, $XDG_CONFIG_HOME/vim/gvimrc +Inizializzazioni personali di gvim (viene utilizzata la prima trovata). .TP -/usr/local/lib/vim/optwin.vim -Script Vim usato dal comando ":options", da usare per visualizzare e impostare opzioni. +/usr/local/share/vim/optwin.vim +Script Vim usato dal comando ":options", maniera elegante per visualizzare e impostare opzioni. .TP -/usr/local/lib/vim/menu.vim +/usr/local/share/vim/vim??/menu.vim Inizializzazioni del menù gvim a livello di sistema. .TP -/usr/local/lib/vim/bugreport.vim +/usr/local/share/vim/vim??/bugreport.vim Script Vim per generare una segnalazione di errore. Vedere ":help bugs". .TP -/usr/local/lib/vim/filetype.vim +/usr/local/share/vim/vim??/filetype.vim Script Vim per determinare il tipo di un file dal suo nome. Vedere ":help 'filetype'". .TP -/usr/local/lib/vim/scripts.vim +/usr/local/share/vim/vim??/scripts.vim Script Vim per determinare il tipo di un file dal suo contenuto. Vedere ":help 'filetype'". .TP -/usr/local/lib/vim/print/*.ps +/usr/local/share/vim/vim??/print/*.ps File usati per stampa PostScript. .PP Per informazioni aggiornate [in inglese \- NdT] vedere la home page di Vim: @@ -546,8 +591,8 @@ Vedere ":help credits" in è basato su Stevie, scritto da: Tim Thompson, Tony Andrews e G.R. (Fred) Walter. In verità, poco o nulla è rimasto del loro codice originale. -.SH BACHI -Probabili. +.SH BUG +Probabilmente. Vedere ":help todo" per una lista di problemi noti. .PP Si noti che un certo numero di comportamenti che possono essere considerati errori diff --git a/runtime/doc/vim.1 b/runtime/doc/vim.1 index 5613dd4..a180a62 100644 --- a/runtime/doc/vim.1 +++ b/runtime/doc/vim.1 @@ -1,4 +1,4 @@ -.TH VIM 1 "2021 Jun 13" +.TH VIM 1 "2024 Jun 04" .SH NAME vim \- Vi IMproved, a programmer's text editor .SH SYNOPSIS @@ -191,7 +191,7 @@ There should between two to eight file name arguments. will open all the files and show differences between them. Works like vimdiff(1). .TP -\-d {device} +\-d {device}, \-dev {device} Open {device} for use as a terminal. Only on the Amiga. Example: @@ -248,7 +248,13 @@ If no GUI support was compiled in, an error message is given and .B Vim aborts. .TP -\-h +\-\-gui-dialog-file {name} +When using the GUI, instead of showing a dialog, write the title and message of +the dialog to file {name}. The file is created or appended to. Only useful +for testing, to avoid that the test gets stuck on a dialog that can't be seen. +Without the GUI the argument is ignored. +.TP +\-\-help, \-h, \-? Give a bit of help about the command line arguments and options. After this .B Vim @@ -317,6 +323,13 @@ When N is omitted, open one window for each file. Open N tab pages. When N is omitted, open one tab page for each file. .TP +\-P {parent-title} +Win32 GUI only: Specify the title of the parent application. When possible, Vim +will run in an MDI window inside the application. {parent-title} must appear in +the window title of the parent application. Make sure that it is specific +enough. Note that the implementation is still primitive. It won't work with +all applications and the menu doesn't work. +.TP \-R Read-only mode. The 'readonly' option will be set. @@ -358,6 +371,16 @@ Should be a terminal known to .B Vim (builtin) or defined in the termcap or terminfo file. .TP +\-\-not-a-term +Tells +.B Vim +that the user knows that the input and/or output is not connected to a +terminal. This will avoid the warning and the two second delay that would +happen. +.TP +\-\-ttyfail +When stdin or stdout is not a a terminal (tty) then exit right away. +.TP \-u {vimrc} Use the commands in the file {vimrc} for initializations. All the other initializations are skipped. @@ -376,12 +399,28 @@ Verbose. Give messages about which files are sourced and for reading and writing a viminfo file. The optional number N is the value for 'verbose'. Default is 10. .TP +\-V[N]{filename} +Like \-V and set 'verbosefile' to {filename}. The result is that messages are +not displayed but written to the file {filename}. {filename} must not start +with a digit. +.TP +\-\-log {filename} +If +.B Vim +has been compiled with eval and channel feature, start logging and write +entries to {filename}. This works like calling +.I ch_logfile({filename}, 'ao') +very early during startup. +.TP \-v Start .B Vim in Vi mode, just like the executable was called "vi". This only has effect when the executable is called "ex". .TP +\-w{number} +Set the 'window' option to {number}. +.TP \-w {scriptout} All the characters that you type are recorded in the file {scriptout}, until you exit @@ -423,9 +462,6 @@ a problem reproduces with a clean Vim setup. \-\-echo\-wid GTK GUI only: Echo the Window ID on stdout. .TP -\-\-help -Give a help message and exit, just like "\-h". -.TP \-\-literal Take file name arguments literally, do not expand wildcards. This has no effect on Unix where the shell expands wildcards. @@ -468,6 +504,10 @@ During startup write timing messages to the file {fname}. .TP \-\-version Print version information and exit. +.TP +\-\-windowid {id} +Win32 GUI only: Make gvim try to use the window {id} as a parent, so that it +runs inside that window. .SH ON-LINE HELP Type ":help" in .B Vim @@ -481,53 +521,57 @@ All documentation files can be viewed in this way, for example ":help syntax.txt". .SH FILES .TP 15 -/usr/local/lib/vim/doc/*.txt +/usr/local/share/vim/vim??/doc/*.txt The .B Vim documentation files. Use ":help doc\-file\-list" to get the complete list. +.br +.I vim?? +is short version number, like vim91 for +.B Vim 9.1 .TP -/usr/local/lib/vim/doc/tags +/usr/local/share/vim/vim??/doc/tags The tags file used for finding information in the documentation files. .TP -/usr/local/lib/vim/syntax/syntax.vim +/usr/local/share/vim/vim??/syntax/syntax.vim System wide syntax initializations. .TP -/usr/local/lib/vim/syntax/*.vim +/usr/local/share/vim/vim??/syntax/*.vim Syntax files for various languages. .TP -/usr/local/lib/vim/vimrc +/usr/local/share/vim/vimrc System wide .B Vim initializations. .TP -~/.vimrc +~/.vimrc, ~/.vim/vimrc, $XDG_CONFIG_HOME/vim/vimrc Your personal .B Vim -initializations. +initializations (first one found is used). .TP -/usr/local/lib/vim/gvimrc +/usr/local/share/vim/gvimrc System wide gvim initializations. .TP -~/.gvimrc -Your personal gvim initializations. +~/.gvimrc, ~/.vim/gvimrc, $XDG_CONFIG_HOME/vim/gvimrc +Your personal gvim initializations (first one found is used). .TP -/usr/local/lib/vim/optwin.vim +/usr/local/share/vim/vim??/optwin.vim Script used for the ":options" command, a nice way to view and set options. .TP -/usr/local/lib/vim/menu.vim +/usr/local/share/vim/vim??/menu.vim System wide menu initializations for gvim. .TP -/usr/local/lib/vim/bugreport.vim +/usr/local/share/vim/vim??/bugreport.vim Script to generate a bug report. See ":help bugs". .TP -/usr/local/lib/vim/filetype.vim +/usr/local/share/vim/vim??/filetype.vim Script to detect the type of a file by its name. See ":help 'filetype'". .TP -/usr/local/lib/vim/scripts.vim +/usr/local/share/vim/vim??/scripts.vim Script to detect the type of a file by its contents. See ":help 'filetype'". .TP -/usr/local/lib/vim/print/*.ps +/usr/local/share/vim/vim??/print/*.ps Files used for PostScript printing. .PP For recent info read the VIM home page: diff --git a/runtime/doc/vim.man b/runtime/doc/vim.man index cc6a9bc..4ce444e 100644 --- a/runtime/doc/vim.man +++ b/runtime/doc/vim.man @@ -139,7 +139,8 @@ OPTIONS name arguments. Vim will open all the files and show dif‐ ferences between them. Works like vimdiff(1). - -d {device} Open {device} for use as a terminal. Only on the Amiga. + -d {device}, -dev {device} + Open {device} for use as a terminal. Only on the Amiga. Example: "-d con:20/30/600/150". -D Debugging. Go to debugging mode when executing the first @@ -171,7 +172,15 @@ OPTIONS ables the GUI. If no GUI support was compiled in, an error message is given and Vim aborts. - -h Give a bit of help about the command line arguments and op‐ + --gui-dialog-file {name} + When using the GUI, instead of showing a dialog, write the + title and message of the dialog to file {name}. The file + is created or appended to. Only useful for testing, to + avoid that the test gets stuck on a dialog that can't be + seen. Without the GUI the argument is ignored. + + --help, -h, -? + Give a bit of help about the command line arguments and op‐ tions. After this Vim exits. -H If Vim has been compiled with RIGHTLEFT support for editing @@ -220,6 +229,15 @@ OPTIONS -p[N] Open N tab pages. When N is omitted, open one tab page for each file. + -P {parent-title} + Win32 GUI only: Specify the title of the parent applica‐ + tion. When possible, Vim will run in an MDI window inside + the application. {parent-title} must appear in the window + title of the parent application. Make sure that it is spe‐ + cific enough. Note that the implementation is still primi‐ + tive. It won't work with all applications and the menu + doesn't work. + -R Read-only mode. The 'readonly' option will be set. You can still edit the buffer, but will be prevented from acci‐ dentally overwriting a file. If you do want to overwrite a @@ -252,26 +270,47 @@ OPTIONS terminal known to Vim (builtin) or defined in the termcap or terminfo file. - -u {vimrc} Use the commands in the file {vimrc} for initializations. - All the other initializations are skipped. Use this to - edit a special kind of files. It can also be used to skip - all initializations by giving the name "NONE". See ":help + --not-a-term + Tells Vim that the user knows that the input and/or output + is not connected to a terminal. This will avoid the warn‐ + ing and the two second delay that would happen. + + --ttyfail When stdin or stdout is not a a terminal (tty) then exit + right away. + + -u {vimrc} Use the commands in the file {vimrc} for initializations. + All the other initializations are skipped. Use this to + edit a special kind of files. It can also be used to skip + all initializations by giving the name "NONE". See ":help initialization" within vim for more details. - -U {gvimrc} Use the commands in the file {gvimrc} for GUI initializa‐ - tions. All the other GUI initializations are skipped. It - can also be used to skip all GUI initializations by giving - the name "NONE". See ":help gui-init" within vim for more + -U {gvimrc} Use the commands in the file {gvimrc} for GUI initializa‐ + tions. All the other GUI initializations are skipped. It + can also be used to skip all GUI initializations by giving + the name "NONE". See ":help gui-init" within vim for more details. - -V[N] Verbose. Give messages about which files are sourced and - for reading and writing a viminfo file. The optional num‐ + -V[N] Verbose. Give messages about which files are sourced and + for reading and writing a viminfo file. The optional num‐ ber N is the value for 'verbose'. Default is 10. + -V[N]{filename} + Like -V and set 'verbosefile' to {filename}. The result is + that messages are not displayed but written to the file + {filename}. {filename} must not start with a digit. + + --log {filename} + If Vim has been compiled with eval and channel feature, + start logging and write entries to {filename}. This works + like calling ch_logfile({filename}, 'ao') very early during + startup. + -v Start Vim in Vi mode, just like the executable was called "vi". This only has effect when the executable is called "ex". + -w{number} Set the 'window' option to {number}. + -w {scriptout} All the characters that you type are recorded in the file {scriptout}, until you exit Vim. This is useful if you @@ -306,8 +345,6 @@ OPTIONS --echo-wid GTK GUI only: Echo the Window ID on stdout. - --help Give a help message and exit, just like "-h". - --literal Take file name arguments literally, do not expand wild‐ cards. This has no effect on Unix where the shell expands wildcards. @@ -354,58 +391,67 @@ OPTIONS --version Print version information and exit. + --windowid {id} + Win32 GUI only: Make gvim try to use the window {id} as a + parent, so that it runs inside that window. + ON-LINE HELP - Type ":help" in Vim to get started. Type ":help subject" to get help - on a specific subject. For example: ":help ZZ" to get help for the - "ZZ" command. Use and CTRL-D to complete subjects (":help cmd‐ - line-completion"). Tags are present to jump from one place to another + Type ":help" in Vim to get started. Type ":help subject" to get help + on a specific subject. For example: ":help ZZ" to get help for the + "ZZ" command. Use and CTRL-D to complete subjects (":help cmd‐ + line-completion"). Tags are present to jump from one place to another (sort of hypertext links, see ":help"). All documentation files can be viewed in this way, for example ":help syntax.txt". FILES - /usr/local/lib/vim/doc/*.txt - The Vim documentation files. Use ":help doc-file-list" + /usr/local/share/vim/vim??/doc/*.txt + The Vim documentation files. Use ":help doc-file-list" to get the complete list. + vim?? is short version number, like vim91 for Vim 9.1 - /usr/local/lib/vim/doc/tags - The tags file used for finding information in the docu‐ + /usr/local/share/vim/vim??/doc/tags + The tags file used for finding information in the docu‐ mentation files. - /usr/local/lib/vim/syntax/syntax.vim + /usr/local/share/vim/vim??/syntax/syntax.vim System wide syntax initializations. - /usr/local/lib/vim/syntax/*.vim + /usr/local/share/vim/vim??/syntax/*.vim Syntax files for various languages. - /usr/local/lib/vim/vimrc + /usr/local/share/vim/vimrc System wide Vim initializations. - ~/.vimrc Your personal Vim initializations. + ~/.vimrc, ~/.vim/vimrc, $XDG_CONFIG_HOME/vim/vimrc + Your personal Vim initializations (first one found is + used). - /usr/local/lib/vim/gvimrc + /usr/local/share/vim/gvimrc System wide gvim initializations. - ~/.gvimrc Your personal gvim initializations. + ~/.gvimrc, ~/.vim/gvimrc, $XDG_CONFIG_HOME/vim/gvimrc + Your personal gvim initializations (first one found is + used). - /usr/local/lib/vim/optwin.vim - Script used for the ":options" command, a nice way to + /usr/local/share/vim/vim??/optwin.vim + Script used for the ":options" command, a nice way to view and set options. - /usr/local/lib/vim/menu.vim + /usr/local/share/vim/vim??/menu.vim System wide menu initializations for gvim. - /usr/local/lib/vim/bugreport.vim + /usr/local/share/vim/vim??/bugreport.vim Script to generate a bug report. See ":help bugs". - /usr/local/lib/vim/filetype.vim - Script to detect the type of a file by its name. See + /usr/local/share/vim/vim??/filetype.vim + Script to detect the type of a file by its name. See ":help 'filetype'". - /usr/local/lib/vim/scripts.vim - Script to detect the type of a file by its contents. + /usr/local/share/vim/vim??/scripts.vim + Script to detect the type of a file by its contents. See ":help 'filetype'". - /usr/local/lib/vim/print/*.ps + /usr/local/share/vim/vim??/print/*.ps Files used for PostScript printing. For recent info read the VIM home page: @@ -417,19 +463,19 @@ SEE ALSO AUTHOR Most of Vim was made by Bram Moolenaar, with a lot of help from others. See ":help credits" in Vim. - Vim is based on Stevie, worked on by: Tim Thompson, Tony Andrews and + Vim is based on Stevie, worked on by: Tim Thompson, Tony Andrews and G.R. (Fred) Walter. Although hardly any of the original code remains. BUGS Probably. See ":help todo" for a list of known problems. - Note that a number of things that may be regarded as bugs by some, are - in fact caused by a too-faithful reproduction of Vi's behaviour. And - if you think other things are bugs "because Vi does it differently", - you should take a closer look at the vi_diff.txt file (or type :help - vi_diff.txt when in Vim). Also have a look at the 'compatible' and + Note that a number of things that may be regarded as bugs by some, are + in fact caused by a too-faithful reproduction of Vi's behaviour. And + if you think other things are bugs "because Vi does it differently", + you should take a closer look at the vi_diff.txt file (or type :help + vi_diff.txt when in Vim). Also have a look at the 'compatible' and 'cpoptions' options. - 2021 Jun 13 VIM(1) + 2024 Jun 04 VIM(1) diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt index 7a49aa0..68e5d99 100644 --- a/runtime/doc/vim9.txt +++ b/runtime/doc/vim9.txt @@ -1,4 +1,4 @@ -*vim9.txt* For Vim version 9.1. Last change: 2024 Apr 13 +*vim9.txt* For Vim version 9.1. Last change: 2024 May 31 VIM REFERENCE MANUAL by Bram Moolenaar @@ -67,6 +67,7 @@ rewrite old scripts, they keep working as before. You may want to use a few Note that {cmd} cannot use local variables, since it is parsed with legacy expression syntax. +See some examples of Vim9 script at |52.6|. ============================================================================== 2. Differences from legacy Vim script *vim9-differences* diff --git a/runtime/doc/xxd-it.1 b/runtime/doc/xxd-it.1 index 9311ed5..a4c1fe4 100644 --- a/runtime/doc/xxd-it.1 +++ b/runtime/doc/xxd-it.1 @@ -75,6 +75,9 @@ Non c' .IR \-C " | " \-capitalize Mette in maiuscolo i nomi di variabili nello stile delle `include' C, se si usa \-i. .TP +.I \-d +Mostra spostamenti usando numeri decimali invece che esadecimali. +.TP .IR \-E " | " \-EBCDIC Cambia la codifica della colonna di destra da ASCII a EBCDIC. Questo non modifica la rappresentazione esadecimale. Non ha senso @@ -143,7 +146,7 @@ lo stesso colore, a seconda del valore esadecimale. Utile soprattutto a distinguere i caratteri stampabili da quelli non stampabili. .I quando pu assumere i valori -.BR never ", " always ", o " auto . +.BR never ", " always ", o " auto " (default: auto). Quando la variabile d'ambiente .BR $NO_COLOR impostata, la colorazione viene disabilitata. diff --git a/runtime/doc/xxd-it.UTF-8.1 b/runtime/doc/xxd-it.UTF-8.1 index 66df3ff..58b9789 100644 --- a/runtime/doc/xxd-it.UTF-8.1 +++ b/runtime/doc/xxd-it.UTF-8.1 @@ -75,6 +75,9 @@ Non c'è un valore massimo per \-ps; se si specifica 0 viene scritta un'unica lu .IR \-C " | " \-capitalize Mette in maiuscolo i nomi di variabili nello stile delle `include' C, se si usa \-i. .TP +.I \-d +Mostra spostamenti usando numeri decimali invece che esadecimali. +.TP .IR \-E " | " \-EBCDIC Cambia la codifica della colonna di destra da ASCII a EBCDIC. Questo non modifica la rappresentazione esadecimale. Non ha senso @@ -143,7 +146,7 @@ lo stesso colore, a seconda del valore esadecimale. Utile soprattutto a distinguere i caratteri stampabili da quelli non stampabili. .I quando può assumere i valori -.BR never ", " always ", o " auto . +.BR never ", " always ", o " auto " (default: auto). Quando la variabile d'ambiente .BR $NO_COLOR è impostata, la colorazione viene disabilitata. diff --git a/runtime/doc/xxd.1 b/runtime/doc/xxd.1 index f5a7c65..c76f89b 100644 --- a/runtime/doc/xxd.1 +++ b/runtime/doc/xxd.1 @@ -75,6 +75,9 @@ No maximum for \-ps. With \-ps, 0 results in one long line of output. .IR \-C " | " \-capitalize Capitalize variable names in C include file style, when using \-i. .TP +.I \-d +show offset in decimal instead of hex. +.TP .IR \-E " | " \-EBCDIC Change the character encoding in the righthand column from ASCII to EBCDIC. This does not change the hexadecimal representation. The option is @@ -138,12 +141,12 @@ anywhere. Use the combination to read a bits dump instead of a hex dump. .TP .IR \-R " " when -In output the hex-value and the value are both colored with the same color +In the output the hex-value and the value are both colored with the same color depending on the hex-value. Mostly helping to differentiate printable and non-printable characters. .I \fIwhen\fP is -.BR never ", " always ", or " auto . +.BR never ", " always ", or " auto " (default: auto). When the .BR $NO_COLOR environment variable is set, colorization will be disabled. diff --git a/runtime/doc/xxd.man b/runtime/doc/xxd.man index 56b69b4..b06971b 100644 --- a/runtime/doc/xxd.man +++ b/runtime/doc/xxd.man @@ -49,6 +49,8 @@ OPTIONS Capitalize variable names in C include file style, when using -i. + -d show offset in decimal instead of hex. + -E | -EBCDIC Change the character encoding in the righthand column from ASCII to EBCDIC. This does not change the hexadecimal representation. @@ -97,15 +99,15 @@ OPTIONS truncating it. Use the combination -r -p to read plain hexadeci‐ mal dumps without line number information and without a particu‐ lar column layout. Additional whitespace and line breaks are al‐ - lowed anywhere. Use the combination -r -b to read a bits dump + lowed anywhere. Use the combination -r -b to read a bits dump instead of a hex dump. -R when - In output the hex-value and the value are both colored with the - same color depending on the hex-value. Mostly helping to differ‐ - entiate printable and non-printable characters. when is never, - always, or auto. When the $NO_COLOR environment variable is - set, colorization will be disabled. + In the output the hex-value and the value are both colored with + the same color depending on the hex-value. Mostly helping to + differentiate printable and non-printable characters. when is + never, always, or auto (default: auto). When the $NO_COLOR en‐ + vironment variable is set, colorization will be disabled. -seek offset When used after -r: revert with added to file positions @@ -113,9 +115,9 @@ OPTIONS -s [+][-]seek Start at bytes abs. (or rel.) infile offset. + indicates - that the seek is relative to the current stdin file position + that the seek is relative to the current stdin file position (meaningless when not reading from stdin). - indicates that the - seek should be that many characters from the end of the input + seek should be that many characters from the end of the input (or if combined with +: before the current stdin file position). Without -s option, xxd starts at the current file position. @@ -125,20 +127,20 @@ OPTIONS Show version string. CAVEATS - xxd -r has some built-in magic while evaluating line number informa‐ - tion. If the output file is seekable, then the line numbers at the - start of each hex dump line may be out of order, lines may be missing, - or overlapping. In these cases xxd will lseek(2) to the next position. - If the output file is not seekable, only gaps are allowed, which will + xxd -r has some built-in magic while evaluating line number informa‐ + tion. If the output file is seekable, then the line numbers at the + start of each hex dump line may be out of order, lines may be missing, + or overlapping. In these cases xxd will lseek(2) to the next position. + If the output file is not seekable, only gaps are allowed, which will be filled by null-bytes. xxd -r never generates parse errors. Garbage is silently skipped. When editing hex dumps, please note that xxd -r skips everything on the input line after reading enough columns of hexadecimal data (see option - -c). This also means that changes to the printable ASCII (or EBCDIC) + -c). This also means that changes to the printable ASCII (or EBCDIC) columns are always ignored. Reverting a plain (or PostScript) style hex - dump with xxd -r -p does not depend on the correct number of columns. + dump with xxd -r -p does not depend on the correct number of columns. Here, anything that looks like a pair of hex digits is interpreted. Note the difference between @@ -146,28 +148,28 @@ CAVEATS and % xxd -i < file - xxd -s +seek may be different from xxd -s seek, as lseek(2) is used to + xxd -s +seek may be different from xxd -s seek, as lseek(2) is used to "rewind" input. A '+' makes a difference if the input source is stdin, - and if stdin's file position is not at the start of the file by the - time xxd is started and given its input. The following examples may + and if stdin's file position is not at the start of the file by the + time xxd is started and given its input. The following examples may help to clarify (or further confuse!): - Rewind stdin before reading; needed because the `cat' has already read + Rewind stdin before reading; needed because the `cat' has already read to the end of stdin. % sh -c "cat > plain_copy; xxd -s 0 > hex_copy" < file - Hex dump from file position 0x480 (=1024+128) onwards. The `+' sign + Hex dump from file position 0x480 (=1024+128) onwards. The `+' sign means "relative to the current position", thus the `128' adds to the 1k where dd left off. - % sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet" + % sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet" < file Hex dump from file position 0x100 (=1024-768) onwards. % sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +-768 > hex_snippet" < file - However, this is a rare situation and the use of `+' is rarely needed. - The author prefers to monitor the effect of xxd with strace(1) or + However, this is a rare situation and the use of `+' is rarely needed. + The author prefers to monitor the effect of xxd with strace(1) or truss(1), whenever -s is used. EXAMPLES @@ -211,7 +213,7 @@ EXAMPLES % xxd -s 0x36 -l 13 -c 13 xxd.1 0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996 - Create a 65537 byte file with all bytes 0x00, except for the last one + Create a 65537 byte file with all bytes 0x00, except for the last one which is 'A' (hex 0x41). % echo "010000: 41" | xxd -r > file @@ -222,11 +224,11 @@ EXAMPLES 000fffc: 0000 0000 40 ....A Create a 1 byte file containing a single 'A' character. The number af‐ - ter '-r -s' adds to the line numbers found in the file; in effect, the + ter '-r -s' adds to the line numbers found in the file; in effect, the leading bytes are suppressed. % echo "010000: 41" | xxd -r -s -0x10000 > file - Use xxd as a filter within an editor such as vim(1) to hex dump a re‐ + Use xxd as a filter within an editor such as vim(1) to hex dump a re‐ gion marked between `a' and `z'. :'a,'z!xxd diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 9d6b4bd..a2daf14 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: The Vim Project -" Last Change: 2023 Dec 06 +" Last Change: 2024 May 31 " Former Maintainer: Bram Moolenaar " Listen very carefully, I will say this only once @@ -972,6 +972,7 @@ au BufNewFile,BufRead *.hbs setf handlebars " Hare au BufNewFile,BufRead *.ha setf hare +au BufNewFile,BufRead README call dist#ft#FTharedoc() " Haskell au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot,*.hsig setf haskell @@ -1044,6 +1045,9 @@ au BufRead,BufNewFile *.hurl setf hurl " Hyper Builder au BufNewFile,BufRead *.hb setf hb +" Hyprlang +au BufNewFile,BufRead hypr\(land\|paper\|idle\|lock\).conf setf hyprlang + " Httest au BufNewFile,BufRead *.htt,*.htb setf httest @@ -1072,7 +1076,7 @@ au BufNewFile,BufRead */.icewm/menu setf icemenu au BufNewFile,BufRead .indent.pro setf indent au BufNewFile,BufRead indent.pro call dist#ft#ProtoCheck('indent') -" IDL (Interactive Data Language) +" IDL (Interactive Data Language), Prolog, Cproto or zsh module C au BufNewFile,BufRead *.pro call dist#ft#ProtoCheck('idlang') " Indent RC @@ -1103,6 +1107,9 @@ au BufNewFile,BufRead *.ini,*.INI setf dosini " SysV Inittab au BufNewFile,BufRead inittab setf inittab +" Inko +au BufNewFile,BufRead *.inko setf inko + " Inno Setup au BufNewFile,BufRead *.iss setf iss @@ -1145,6 +1152,9 @@ au BufNewFile,BufRead *.clp setf jess " Jgraph au BufNewFile,BufRead *.jgr setf jgraph +" Jujutsu +au BufNewFile,BufRead *.jjdescription setf jj + " Jovial au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial @@ -1167,7 +1177,7 @@ au BufNewFile,BufRead *.ipynb,*.jupyterlab-settings setf json au BufNewFile,BufRead *.sublime-project,*.sublime-settings,*.sublime-workspace setf json " Other files that look like json -au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,flake.lock setf json +au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock setf json " JSONC (JSON with comments) au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc setf jsonc @@ -1356,6 +1366,7 @@ au BufNewFile,BufRead .mailcap,mailcap setf mailcap " Makefile au BufNewFile,BufRead *[mM]akefile,*.mk,*.mak,*.dsp setf make +au BufNewFile,BufRead Kbuild setf make " MakeIndex au BufNewFile,BufRead *.ist,*.mst setf ist @@ -1856,6 +1867,9 @@ au BufNewFile,BufRead *.pk setf poke " Protocols au BufNewFile,BufRead */etc/protocols setf protocols +" Purescript +au BufNewFile,BufRead *.purs setf purescript + " PyPA manifest files au BufNewFile,BufRead MANIFEST.in setf pymanifest @@ -2050,6 +2064,9 @@ au BufNewFile,BufRead *.scala setf scala " SBT - Scala Build Tool au BufNewFile,BufRead *.sbt setf sbt +" Slint +au BufNewFile,BufRead *.slint setf slint + " SuperCollider au BufNewFile,BufRead *.sc call dist#ft#FTsc() @@ -2133,7 +2150,7 @@ au BufNewFile,BufRead catalog setf catalog " Gentoo ebuilds, Arch Linux PKGBUILDs and Alpine Linux APKBUILDs are actually " bash scripts. " NOTE: Patterns ending in a star are further down, these have lower priority. -au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,.bash[_-]history,bash-fc[-.],*.ebuild,*.bash,*.eclass,PKGBUILD,APKBUILD,*.bats call dist#ft#SetFileTypeSH("bash") +au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,.bash[_-]history,bash-fc[-.],*.ebuild,*.bash,*.eclass,PKGBUILD,APKBUILD,*.bats,*.cygport call dist#ft#SetFileTypeSH("bash") au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh") au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1)) @@ -2226,6 +2243,9 @@ au BufNewFile,BufRead *.smt,*.smith setf smith " Smithy au BufNewFile,BufRead *.smithy setf smithy +" Snakemake +au BufNewFile,BufRead Snakefile,*.smk setf snakemake + " Snobol4 and spitbol au BufNewFile,BufRead *.sno,*.spt setf snobol4 @@ -2382,6 +2402,9 @@ au BufNewFile,BufRead *.tcl,*.tm,*.tk,*.itcl,*.itk,*.jacl,.tclshrc,.wishrc,.tcls " Xilinx's xsct and xsdb use tcl au BufNewFile,BufRead .xsctcmdhistory,.xsdbcmdhistory setf tcl +" templ +au BufNewFile,BufRead *.templ setf templ + " Teal au BufRead,BufNewFile *.tl setf teal @@ -2413,7 +2436,7 @@ au BufNewFile,BufRead texdoc.cnf setf conf " LaTeX packages will generate some medium LaTeX files during compiling " They should be ignored by .gitignore https://github.com/github/gitignore/blob/main/TeX.gitignore " Sometime we need to view its content for debugging -au BufNewFile,BufRead *.{pgf,nlo,nls,out,thm,eps_tex,pygtex,pygstyle,clo,aux,brf,ind,lof,loe,nav,vrb,ins,tikz,bbx,cbx,beamer} setf tex +au BufNewFile,BufRead *.{pgf,nlo,nls,thm,eps_tex,pygtex,pygstyle,clo,aux,brf,ind,lof,loe,nav,vrb,ins,tikz,bbx,cbx,beamer} setf tex " ConTeXt au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi,*.mkxl,*.mklx setf context @@ -2839,6 +2862,10 @@ au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif " But before patterns matching everything in a directory. au BufNewFile,BufRead *.text,README,LICENSE,COPYING,AUTHORS setf text +" What should *.out files be? Text? +" Disabled until it is clear, to what this should be set +"au BufNewFile,BufRead *.out setf text + " Extra checks for when no filetype has been detected now. Mostly used for " patterns that end in "*". E.g., "zsh*" matches "zsh.vim", but that's a Vim @@ -3010,6 +3037,9 @@ au BufNewFile,BufRead .reminders* call s:StarSetf('remind') " SGML catalog file au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog') +" Stylus +au BufNewFile,BufReadPost *.styl,*.stylus setf stylus + " avoid doc files being recognized a shell files au BufNewFile,BufRead */doc/{,.}bash[_-]completion{,.d,.sh}{,/*} setf text @@ -3076,6 +3106,15 @@ au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini') au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh') au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh') +" Zsh module +" mdd: https://github.com/zsh-users/zsh/blob/57248b88830ce56adc243a40c7773fb3825cab34/Etc/zsh-development-guide#L285-L288 +" mdh, pro: https://github.com/zsh-users/zsh/blob/57248b88830ce56adc243a40c7773fb3825cab34/Etc/zsh-development-guide#L268-L271 +" *.mdd will generate *.mdh, *.pro and *.epro. +" module's *.c will #include *.mdh containing module dependency information and +" *.pro containing all static declarations of *.c +" *.epro contains all external declarations of *.c +au BufNewFile,BufRead *.mdh,*.epro setf c +au BufNewFile,BufRead *.mdd setf sh " Help files match *.txt but should have a last line that is a modeline. au BufNewFile,BufRead *.txt @@ -3114,6 +3153,9 @@ au BufNewFile,BufRead yarn.lock setf yaml " Zathurarc au BufNewFile,BufRead zathurarc setf zathurarc +" Rofi stylesheet +au BufNewFile,BufRead *.rasi setf rasi + " If the GUI is already running, may still need to install the Syntax menu. " Don't do it when the 'M' flag is included in 'guioptions'. if has("menu") && has("gui_running") diff --git a/runtime/ftplugin/abaqus.vim b/runtime/ftplugin/abaqus.vim index c16e7b0..d4bb6fe 100644 --- a/runtime/ftplugin/abaqus.vim +++ b/runtime/ftplugin/abaqus.vim @@ -3,6 +3,7 @@ " Maintainer: Carl Osterwisch " Last Change: 2022 Oct 08 " 2024 Jan 14 by Vim Project (browsefilter) +" 2024 May 23 by Riley Bruins ('commentstring') " Only do this when not done yet for this buffer if exists("b:did_ftplugin") | finish | endif @@ -27,7 +28,7 @@ setlocal isfname-=, " Define format of comment lines (see 'formatoptions' for uses) setlocal comments=:** -setlocal commentstring=**%s +setlocal commentstring=**\ %s " Definitions start with a * and assign a NAME, NSET, or ELSET " Used in [d ^wd and other commands diff --git a/runtime/ftplugin/arduino.vim b/runtime/ftplugin/arduino.vim new file mode 100644 index 0000000..60b11da --- /dev/null +++ b/runtime/ftplugin/arduino.vim @@ -0,0 +1,67 @@ +" Vim filetype plugin file +" Language: Arduino +" Maintainer: The Vim Project +" Ken Takata +" Last Change: 2024 Apr 12 +" 2024 Jun 02 by Riley Bruins ('commentstring') +" +" Most of the part was copied from c.vim. + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +" Using line continuation here. +let s:cpo_save = &cpo +set cpo-=C + +let b:undo_ftplugin = "setl fo< com< ofu< cms< def< inc<" + +if !exists("g:arduino_recommended_style") || g:arduino_recommended_style != 0 + " Use the default setting of Arduino IDE. + setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2 + let b:undo_ftplugin ..= " et< ts< sts< sw<" +endif + +" Set 'formatoptions' to break comment lines but not other lines, +" and insert the comment leader when hitting or using "o". +setlocal fo-=t fo+=croql + +" These options have the right value as default, but the user may have +" overruled that. +setlocal commentstring=/*\ %s\ */ define& include& + +" Set completion with CTRL-X CTRL-O to autoloaded function. +if exists('&ofu') + setlocal ofu=ccomplete#Complete +endif + +" Set 'comments' to format dashed lists in comments. +" Also include ///, used for Doxygen. +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// + +" When the matchit plugin is loaded, this makes the % command skip parens and +" braces in comments properly. +if !exists("b:match_words") + let b:match_words = '^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>' + let b:match_skip = 's:comment\|string\|character\|special' + let b:undo_ftplugin ..= " | unlet! b:match_skip b:match_words" +endif + +" Win32 and GTK can filter files in the browse dialog +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Arduino Source Files (*.ino, *.pde)\t*.ino;*.pde\n" + if has("win32") + let b:browsefilter ..= "All Files (*.*)\t*\n" + else + let b:browsefilter ..= "All Files (*)\t*\n" + endif + let b:undo_ftplugin ..= " | unlet! b:browsefilter" +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/asm.vim b/runtime/ftplugin/asm.vim index 0ae1610..4482b90 100644 --- a/runtime/ftplugin/asm.vim +++ b/runtime/ftplugin/asm.vim @@ -4,13 +4,14 @@ " Last Change: 2020 May 23 " 2023 Aug 28 by Vim Project (undo_ftplugin) " 2024 Apr 09 by Vim Project (add Matchit support) +" 2024 May 23 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 setl include=^\\s*%\\s*include setl comments=:;,s1:/*,mb:*,ex:*/,:// -setl commentstring=;%s +setl commentstring=;\ %s let b:undo_ftplugin = "setl commentstring< comments< include<" diff --git a/runtime/ftplugin/astro.vim b/runtime/ftplugin/astro.vim index 0b0e034..5d35ba9 100644 --- a/runtime/ftplugin/astro.vim +++ b/runtime/ftplugin/astro.vim @@ -2,6 +2,7 @@ " Language: Astro " Maintainer: Romain Lafourcade " Last Change: 2024 Apr 21 +" 2024 May 24 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") finish @@ -25,17 +26,17 @@ function! s:AstroComments() abort \ || s:IdentifyScope('^\s*') " ECMAScript comments setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// - setlocal commentstring=//%s + setlocal commentstring=//\ %s elseif s:IdentifyScope('^\s*') " CSS comments setlocal comments=s1:/*,mb:*,ex:*/ - setlocal commentstring=/*%s*/ + setlocal commentstring=/*\ %s\ */ else " HTML comments setlocal comments=s: - setlocal commentstring= + setlocal commentstring= endif endfunction diff --git a/runtime/ftplugin/bitbake.vim b/runtime/ftplugin/bitbake.vim index 99fe334..4d50a7f 100644 --- a/runtime/ftplugin/bitbake.vim +++ b/runtime/ftplugin/bitbake.vim @@ -3,13 +3,14 @@ " Maintainer: Gregory Anders " Repository: https://github.com/openembedded/bitbake " Latest Revision: 2022-07-23 +" 2024-05-23 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 -setlocal commentstring=#%s +setlocal commentstring=#\ %s setlocal comments=:# setlocal suffixesadd=.bb,.bbclass diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim index e2eebc5..378d580 100644 --- a/runtime/ftplugin/c.vim +++ b/runtime/ftplugin/c.vim @@ -2,6 +2,7 @@ " Language: C " Maintainer: The Vim Project " Last Change: 2023 Aug 22 +" 2024 Jun 02 by Riley Bruins ('commentstring') " Former Maintainer: Bram Moolenaar " Only do this when not done yet for this buffer @@ -24,7 +25,7 @@ setlocal fo-=t fo+=croql " These options have the right value as default, but the user may have " overruled that. -setlocal commentstring& define& include& +setlocal commentstring=/*\ %s\ */ define& include& " Set completion with CTRL-X CTRL-O to autoloaded function. if exists('&ofu') diff --git a/runtime/ftplugin/calendar.vim b/runtime/ftplugin/calendar.vim index f454ba1..c4e683a 100644 --- a/runtime/ftplugin/calendar.vim +++ b/runtime/ftplugin/calendar.vim @@ -2,6 +2,7 @@ " Language: calendar(1) input file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2008-07-09 +" 2024-06-02 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") finish @@ -13,7 +14,7 @@ set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" -setlocal comments=s1:/*,mb:*,ex:*/ commentstring& include& +setlocal comments=s1:/*,mb:*,ex:*/ commentstring=/*\ %s\ */ include& setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save diff --git a/runtime/ftplugin/cgdbrc.vim b/runtime/ftplugin/cgdbrc.vim index 46cf135..99f9702 100644 --- a/runtime/ftplugin/cgdbrc.vim +++ b/runtime/ftplugin/cgdbrc.vim @@ -3,6 +3,7 @@ " Maintainer: Wu, Zhenyu " Documentation: https://cgdb.github.io/docs/Configuring-CGDB.html " Latest Revision: 2024-04-09 +" 2024-05-23 by Riley Bruins ('commentstring') if exists('b:did_ftplugin') finish @@ -14,7 +15,7 @@ set cpoptions&vim let b:undo_ftplugin = 'setl com< cms<' -setlocal commentstring=#%s +setlocal commentstring=#\ %s setlocal comments=:# let &cpoptions = s:save_cpoptions diff --git a/runtime/ftplugin/cpp.vim b/runtime/ftplugin/cpp.vim index fc92935..fac3edd 100644 --- a/runtime/ftplugin/cpp.vim +++ b/runtime/ftplugin/cpp.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: C++ " Maintainer: The Vim Project -" Last Change: 2023 Aug 10 +" Last Change: 2024 Jun 06 " Former Maintainer: Bram Moolenaar " Only do this when not done yet for this buffer @@ -12,6 +12,10 @@ endif " Behaves mostly just like C runtime! ftplugin/c.vim ftplugin/c_*.vim ftplugin/c/*.vim +" Change 'commentstring' to "C++ style"/"mono-line" comments +setlocal commentstring=//\ %s +let b:undo_ftplugin ..= ' | setl commentstring<' + " C++ uses templates with " Disabled, because it gives an error for typing an unmatched ">". " set matchpairs+=<:> diff --git a/runtime/ftplugin/csh.vim b/runtime/ftplugin/csh.vim index a22bee3..74666b9 100644 --- a/runtime/ftplugin/csh.vim +++ b/runtime/ftplugin/csh.vim @@ -4,6 +4,7 @@ " Previous Maintainer: Dan Sharp " Contributor: Johannes Zellner " Last Change: 2024 Jan 14 +" 2024 May 23 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") finish @@ -14,7 +15,7 @@ let s:save_cpo = &cpo set cpo-=C setlocal comments=:# -setlocal commentstring=#%s +setlocal commentstring=#\ %s setlocal formatoptions-=t setlocal formatoptions+=crql diff --git a/runtime/ftplugin/css.vim b/runtime/ftplugin/css.vim index ece2def..778a9e1 100644 --- a/runtime/ftplugin/css.vim +++ b/runtime/ftplugin/css.vim @@ -3,6 +3,7 @@ " Maintainer: Doug Kearns " Previous Maintainer: Nikolai Weibull " Last Change: 2020 Dec 21 +" 2024 Jun 02 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") finish @@ -14,7 +15,7 @@ set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo< ofu< isk<" -setlocal comments=s1:/*,mb:*,ex:*/ commentstring& +setlocal comments=s1:/*,mb:*,ex:*/ commentstring=/*\ %s\ */ setlocal formatoptions-=t formatoptions+=croql setlocal omnifunc=csscomplete#CompleteCSS setlocal iskeyword+=- diff --git a/runtime/ftplugin/dart.vim b/runtime/ftplugin/dart.vim new file mode 100644 index 0000000..42c90c2 --- /dev/null +++ b/runtime/ftplugin/dart.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin +" Language: dart +" Maintainer: Riley Bruins +" Last Change: 2024 May 18 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +" Set 'comments' to format dashed lists in comments. +" Also include ///, used for Doxygen. +setl comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// commentstring=//\ %s + +let b:undo_ftplugin = 'setl com< cms<' diff --git a/runtime/ftplugin/deb822sources.vim b/runtime/ftplugin/deb822sources.vim index 4936f42..31c81b1 100644 --- a/runtime/ftplugin/deb822sources.vim +++ b/runtime/ftplugin/deb822sources.vim @@ -1,6 +1,6 @@ " Language: Debian sources.list " Maintainer: Debian Vim Maintainers -" Last Change: 2024 Mar 20 +" Last Change: 2024 May 25 " License: Vim License " URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/deb822sources.vim @@ -10,7 +10,7 @@ endif let b:did_ftplugin=1 setlocal comments=:# -setlocal commentstring=#%s +setlocal commentstring=#\ %s setlocal formatoptions-=t let b:undo_ftplugin = 'setlocal comments< commentstring< formatoptions<' diff --git a/runtime/ftplugin/debcontrol.vim b/runtime/ftplugin/debcontrol.vim index bb710e5..5b8292b 100644 --- a/runtime/ftplugin/debcontrol.vim +++ b/runtime/ftplugin/debcontrol.vim @@ -2,7 +2,7 @@ " Language: Debian control files " Maintainer: Debian Vim Maintainers " Former Maintainer: Pierre Habouzit -" Last Change: 2023 Jan 16 +" Last Change: 2024 May 25 " URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/debcontrol.vim " Do these settings once per buffer @@ -19,8 +19,11 @@ if exists('g:debcontrol_fold_enable') endif setlocal textwidth=0 +setlocal comments=:# +setlocal commentstring=#\ %s + " Clean unloading -let b:undo_ftplugin = 'setlocal tw< foldmethod< foldexpr< foldtext<' +let b:undo_ftplugin = 'setlocal tw< foldmethod< foldexpr< foldtext< comments< commentstring<' " }}}1 diff --git a/runtime/ftplugin/debsources.vim b/runtime/ftplugin/debsources.vim index cbb4faf..2c5ea35 100644 --- a/runtime/ftplugin/debsources.vim +++ b/runtime/ftplugin/debsources.vim @@ -1,6 +1,6 @@ " Language: Debian sources.list " Maintainer: Debian Vim Maintainers -" Last Change: 2023 Aug 30 +" Last Change: 2024 May 25 " License: Vim License " URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/debsources.vim @@ -10,7 +10,7 @@ endif let b:did_ftplugin=1 setlocal comments=:# -setlocal commentstring=#%s +setlocal commentstring=#\ %s setlocal formatoptions-=t let b:undo_ftplugin = 'setlocal comments< commentstring< formatoptions<' diff --git a/runtime/ftplugin/desktop.vim b/runtime/ftplugin/desktop.vim index bd6fd70..d15afd2 100644 --- a/runtime/ftplugin/desktop.vim +++ b/runtime/ftplugin/desktop.vim @@ -2,6 +2,7 @@ " Language: XDG desktop entry " Maintainer: Eisuke Kawashima ( e.kawaschima+vim AT gmail.com ) " Last Change: 2022-07-26 +" 2024-05-24 by Riley Bruins ('commentstring') if exists('b:did_ftplugin') finish @@ -9,5 +10,5 @@ endif let b:did_ftplugin = v:true setl comments=:# -setl commentstring=#%s +setl commentstring=#\ %s let b:undo_ftplugin = 'setl com< cms<' diff --git a/runtime/ftplugin/dtd.vim b/runtime/ftplugin/dtd.vim index bea8c5c..f970148 100644 --- a/runtime/ftplugin/dtd.vim +++ b/runtime/ftplugin/dtd.vim @@ -6,6 +6,7 @@ " Former maintainer: Dan Sharp " Last Change: 2009 Jan 20 " 2024 Jan 14 by Vim Project (browsefilter) +" 2024 May 23 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 @@ -15,7 +16,7 @@ let b:did_ftplugin = 1 let s:save_cpo = &cpo set cpo-=C -setlocal commentstring= +setlocal commentstring= setlocal comments=s: setlocal formatoptions-=t diff --git a/runtime/ftplugin/dtrace.vim b/runtime/ftplugin/dtrace.vim index 9288097..a276b31 100644 --- a/runtime/ftplugin/dtrace.vim +++ b/runtime/ftplugin/dtrace.vim @@ -1,6 +1,7 @@ " Language: D script as described in "Solaris Dynamic Tracing Guide", " http://docs.sun.com/app/docs/doc/817-6223 " Last Change: 2008/03/20 +" 2024/05/23 by Riley Bruins @@ -26,8 +27,8 @@ setlocal fo-=t fo+=croql setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/ " dtrace uses /* */ comments. Set this explicitly, just in case the user -" changed this (/*%s*/ is the default) -setlocal commentstring=/*%s*/ +" changed this (/*\ %s\ */ is the default) +setlocal commentstring=/*\ %s\ */ setlocal iskeyword+=@,$ diff --git a/runtime/ftplugin/dts.vim b/runtime/ftplugin/dts.vim index 42e3833..346ff94 100644 --- a/runtime/ftplugin/dts.vim +++ b/runtime/ftplugin/dts.vim @@ -2,6 +2,7 @@ " Language: dts/dtsi (device tree files) " Maintainer: Wu, Zhenyu " Latest Revision: 2024 Apr 12 +" 2024 Jun 02 by Riley Bruins ('commentstring') if exists('b:did_ftplugin') finish @@ -12,5 +13,5 @@ let b:undo_ftplugin = 'setl inc< cms< com<' setlocal include=^\\%(#include\\\|/include/\\) " same as C -setlocal commentstring& +setlocal commentstring=/*\ %s\ */ setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// diff --git a/runtime/ftplugin/erlang.vim b/runtime/ftplugin/erlang.vim index 1cb57f4..5a3ab71 100644 --- a/runtime/ftplugin/erlang.vim +++ b/runtime/ftplugin/erlang.vim @@ -6,7 +6,8 @@ " Eduardo Lopez (http://github.com/tapichu) " Arvid Bjurklint (http://github.com/slarwise) " Paweł Zacharek (http://github.com/subc2) -" Last Update: 2023-Dec-20 +" Riley Bruins (http://github.com/ribru17) ('commentstring') +" Last Update: 2024 May 23 " License: Vim license " URL: https://github.com/vim-erlang/vim-erlang-runtime @@ -27,7 +28,7 @@ if get(g:, 'erlang_folding', 0) endif setlocal comments=:%%%,:%%,:% -setlocal commentstring=%%s +setlocal commentstring=%\ %s setlocal formatoptions+=ro diff --git a/runtime/ftplugin/eruby.vim b/runtime/ftplugin/eruby.vim index b5c4665..b3e074a 100644 --- a/runtime/ftplugin/eruby.vim +++ b/runtime/ftplugin/eruby.vim @@ -5,6 +5,7 @@ " Release Coordinator: Doug Kearns " Last Change: 2022 May 15 " 2024 Jan 14 by Vim Project (browsefilter) +" 2024 May 23 by Riley Bruins ('commentstring') " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -125,7 +126,7 @@ if exists("loaded_matchit") endif " TODO: comments= -setlocal commentstring=<%#%s%> +setlocal commentstring=<%#\ %s\ %> let b:undo_ftplugin = "setl cms< " . \ " | unlet! b:browsefilter b:match_words | " . b:undo_ftplugin diff --git a/runtime/ftplugin/fennel.vim b/runtime/ftplugin/fennel.vim index 93cf366..2a9623f 100644 --- a/runtime/ftplugin/fennel.vim +++ b/runtime/ftplugin/fennel.vim @@ -2,13 +2,14 @@ " Language: Fennel " Maintainer: Gregory Anders " Last Update: 2023 Jun 9 +" 2024 May 24 by Riley Bruins ('commentstring') if exists('b:did_ftplugin') finish endif let b:did_ftplugin = 1 -setlocal commentstring=;%s +setlocal commentstring=;\ %s setlocal comments=:;;,:; setlocal formatoptions-=t setlocal suffixesadd=.fnl diff --git a/runtime/ftplugin/fish.vim b/runtime/ftplugin/fish.vim index f06ad3a..55d7ea8 100644 --- a/runtime/ftplugin/fish.vim +++ b/runtime/ftplugin/fish.vim @@ -4,6 +4,7 @@ " Repository: https://github.com/nickeb96/fish.vim " Last Change: February 1, 2023 " 2023 Aug 28 by Vim Project (undo_ftplugin) +" 2024 May 23 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") finish @@ -12,7 +13,7 @@ let b:did_ftplugin = 1 setlocal iskeyword=@,48-57,_,192-255,-,. setlocal comments=:# -setlocal commentstring=#%s +setlocal commentstring=#\ %s setlocal formatoptions+=crjq let b:undo_ftplugin = "setl cms< com< fo< isk<" diff --git a/runtime/ftplugin/fortran.vim b/runtime/ftplugin/fortran.vim index 3c32581..19a4c1e 100644 --- a/runtime/ftplugin/fortran.vim +++ b/runtime/ftplugin/fortran.vim @@ -11,6 +11,7 @@ " Doug Kearns, and Fritz Reese. " Last Change: 2023 Dec 22 " 2024 Jan 14 by Vim Project (browsefilter) +" 2024 May 23 by Riley Bruins ('commentstring') " Only do these settings when not done yet for this buffer if exists("b:did_ftplugin") @@ -89,7 +90,7 @@ else endif " Set commentstring for foldmethod=marker -setlocal cms=!%s +setlocal cms=!\ %s " Tabs are not a good idea in Fortran so the default is to expand tabs if !exists("fortran_have_tabs") diff --git a/runtime/ftplugin/fstab.vim b/runtime/ftplugin/fstab.vim index 9980532..0e7ffda 100644 --- a/runtime/ftplugin/fstab.vim +++ b/runtime/ftplugin/fstab.vim @@ -3,6 +3,7 @@ " Maintainer: Radu Dineiu " URL: https://raw.github.com/rid9/vim-fstab/master/ftplugin/fstab.vim " Last Change: 2021 Jan 02 +" 2024 May 23 by Riley Bruins ('commentstring') " Version: 1.0 " " Credits: @@ -13,7 +14,7 @@ if exists("b:did_ftplugin") endif let b:did_ftplugin = 1 -setlocal commentstring=#%s +setlocal commentstring=#\ %s let b:undo_ftplugin = "setlocal commentstring<" " vim: ts=8 ft=vim diff --git a/runtime/ftplugin/gdb.vim b/runtime/ftplugin/gdb.vim index 7c10633..af88a04 100644 --- a/runtime/ftplugin/gdb.vim +++ b/runtime/ftplugin/gdb.vim @@ -3,11 +3,12 @@ " Maintainer: Michaël Peeters " Last Changed: 2017-10-26 " 2024-04-10: - add Matchit support (by Vim Project) +" 2024-04-23: - add space to commentstring (by Riley Bruins) ('commentstring') if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 -setlocal commentstring=#%s +setlocal commentstring=#\ %s setlocal include=^\\s*source " Undo the stuff we changed. diff --git a/runtime/ftplugin/graphql.vim b/runtime/ftplugin/graphql.vim new file mode 100644 index 0000000..56f6e36 --- /dev/null +++ b/runtime/ftplugin/graphql.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: graphql +" Maintainer: Riley Bruins +" Last Change: 2024 May 18 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl comments=:# commentstring=#\ %s + +let b:undo_ftplugin = 'setl com< cms<' diff --git a/runtime/ftplugin/groovy.vim b/runtime/ftplugin/groovy.vim index cc7d6e3..a2e2b2f 100644 --- a/runtime/ftplugin/groovy.vim +++ b/runtime/ftplugin/groovy.vim @@ -2,6 +2,7 @@ " Language: groovy " Maintainer: Justin M. Keyes " Last Change: 2016 May 22 +" 2024 May 24 by Riley Bruins ('commentstring') if exists('b:did_ftplugin') finish @@ -13,7 +14,7 @@ set cpo-=C let b:undo_ftplugin = 'setlocal commentstring<' -setlocal commentstring=//%s +setlocal commentstring=//\ %s let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/ftplugin/hamster.vim b/runtime/ftplugin/hamster.vim index 5446e72..904f267 100644 --- a/runtime/ftplugin/hamster.vim +++ b/runtime/ftplugin/hamster.vim @@ -3,6 +3,7 @@ " Version: 2.0.6.0 " Maintainer: David Fishburn " Last Change: 2021 Jan 19 +" 2024 May 23 by Riley Bruins ('commentstring') " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -31,7 +32,7 @@ if &tw == 0 endif " Comments start with a double quote -setlocal commentstring=#%s +setlocal commentstring=#\ %s " Move around functions. noremap [[ :call search('^\s*sub\>', "bW") diff --git a/runtime/ftplugin/hare.vim b/runtime/ftplugin/hare.vim index 0200ba5..422bb7b 100644 --- a/runtime/ftplugin/hare.vim +++ b/runtime/ftplugin/hare.vim @@ -1,35 +1,59 @@ -" Vim filetype plugin -" Language: Hare -" Maintainer: Amelia Clarke -" Previous Maintainer: Drew DeVault -" Last Updated: 2022-09-28 -" 2023 Aug 28 by Vim Project (undo_ftplugin) +" Vim filetype plugin. +" Language: Hare +" Maintainer: Amelia Clarke +" Last Updated: 2024-05-10 +" Upstream: https://git.sr.ht/~sircmpwn/hare.vim if exists('b:did_ftplugin') finish endif let b:did_ftplugin = 1 -" Formatting settings. -setlocal formatoptions-=t formatoptions+=croql/ +let s:cpo_save = &cpo +set cpo&vim + +" Set the default compiler. +compiler hare -" Miscellaneous. +" Formatting settings. setlocal comments=:// setlocal commentstring=//\ %s +setlocal formatlistpat=^\ \\?-\ +setlocal formatoptions+=croqnlj/ formatoptions-=t + +" Search for Hare modules. +setlocal include=^\\s*use\\> +setlocal includeexpr=hare#FindModule(v:fname) +setlocal isfname+=: setlocal suffixesadd=.ha -let b:undo_ftplugin = "setl cms< com< fo< sua<" +" Add HAREPATH to the default search paths. +setlocal path-=/usr/include,, +let &l:path .= ',' .. hare#GetPath() .. ',,' -" Hare recommended style. -if get(g:, "hare_recommended_style", 1) +let b:undo_ftplugin = 'setl cms< com< flp< fo< inc< inex< isf< pa< sua< mp<' + +" Follow the Hare style guide by default. +if get(g:, 'hare_recommended_style', 1) setlocal noexpandtab - setlocal shiftwidth=8 + setlocal shiftwidth=0 setlocal softtabstop=0 setlocal tabstop=8 setlocal textwidth=80 - let b:undo_ftplugin ..= " | setl et< sts< sw< ts< tw<" + let b:undo_ftplugin .= ' et< sts< sw< ts< tw<' endif -compiler hare +augroup hare.vim + autocmd! + + " Highlight whitespace errors by default. + if get(g:, 'hare_space_error', 1) + autocmd InsertEnter * hi link hareSpaceError NONE + autocmd InsertLeave * hi link hareSpaceError Error + endif +augroup END + +let &cpo = s:cpo_save +unlet s:cpo_save -" vim: et sw=2 sts=2 ts=8 +" vim: et sts=2 sw=2 ts=8 diff --git a/runtime/ftplugin/haredoc.vim b/runtime/ftplugin/haredoc.vim new file mode 100644 index 0000000..69030b4 --- /dev/null +++ b/runtime/ftplugin/haredoc.vim @@ -0,0 +1,44 @@ +" Vim filetype plugin. +" Language: Haredoc (Hare documentation format) +" Maintainer: Amelia Clarke +" Last Updated: 2024-05-02 +" Upstream: https://git.sr.ht/~selene/hare.vim + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +" Formatting settings. +setlocal comments=:\ +setlocal formatlistpat=^\ \\?-\ +setlocal formatoptions+=tnlj formatoptions-=c formatoptions-=q + +" Search for Hare modules. +setlocal includeexpr=hare#FindModule(v:fname) +setlocal isfname+=: +setlocal suffixesadd=.ha + +" Add HAREPATH to the default search paths. +setlocal path-=/usr/include,, +let &l:path .= ',' .. hare#GetPath() .. ',,' + +let b:undo_ftplugin = 'setl com< flp< fo< inex< isf< pa< sua<' + +" Follow the Hare style guide by default. +if get(g:, 'hare_recommended_style', 1) + setlocal noexpandtab + setlocal shiftwidth=0 + setlocal softtabstop=0 + setlocal tabstop=8 + setlocal textwidth=80 + let b:undo_ftplugin .= ' et< sts< sw< ts< tw<' +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: et sts=2 sw=2 ts=8 diff --git a/runtime/ftplugin/html.vim b/runtime/ftplugin/html.vim index 3aa60a8..5495f85 100644 --- a/runtime/ftplugin/html.vim +++ b/runtime/ftplugin/html.vim @@ -3,6 +3,7 @@ " Maintainer: Doug Kearns " Previous Maintainer: Dan Sharp " Last Change: 2024 Jan 14 +" 2024 May 24 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") finish @@ -13,7 +14,7 @@ let s:save_cpo = &cpo set cpo-=C setlocal matchpairs+=<:> -setlocal commentstring= +setlocal commentstring= setlocal comments=s: let b:undo_ftplugin = "setlocal comments< commentstring< matchpairs<" diff --git a/runtime/ftplugin/hyprlang.vim b/runtime/ftplugin/hyprlang.vim new file mode 100644 index 0000000..5c186c3 --- /dev/null +++ b/runtime/ftplugin/hyprlang.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: hyprlang +" Maintainer: ribru17 +" Last Change: 2024 May 18 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl comments=:# commentstring=#\ %s + +let b:undo_ftplugin = 'setl com< cms<' diff --git a/runtime/ftplugin/indent.vim b/runtime/ftplugin/indent.vim index 64a650a..32208d3 100644 --- a/runtime/ftplugin/indent.vim +++ b/runtime/ftplugin/indent.vim @@ -3,6 +3,7 @@ " Maintainer: Doug Kearns " Previous Maintainer: Nikolai Weibull " Latest Revision: 2008-07-09 +" 2024-06-02 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") finish @@ -14,7 +15,7 @@ set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" -setlocal comments=s1:/*,mb:*,ex:*/ commentstring& +setlocal comments=s1:/*,mb:*,ex:*/ commentstring=/*\ %s\ */ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save diff --git a/runtime/ftplugin/initex.vim b/runtime/ftplugin/initex.vim index 0ee3e8d..71049df 100644 --- a/runtime/ftplugin/initex.vim +++ b/runtime/ftplugin/initex.vim @@ -3,6 +3,7 @@ " Maintainer: Benji Fisher, Ph.D. " Version: 1.0 " Last Change: Wed 19 Apr 2006 +" Last Change: Thu 23 May 2024 by Riley Bruins ('commentstring') " Only do this when not done yet for this buffer. if exists("b:did_ftplugin") @@ -23,7 +24,7 @@ setlocal com=sO:%\ -,mO:%\ \ ,eO:%%,:% " Set 'commentstring' to recognize the % comment character: " (Thanks to Ajit Thakkar.) -setlocal cms=%%s +setlocal cms=%\ %s " Allow "[d" to be used to find a macro definition: let &l:define='\\\([egx]\|char\|mathchar\|count\|dimen\|muskip\|skip\|toks\)\=' diff --git a/runtime/ftplugin/java.vim b/runtime/ftplugin/java.vim index fa2b610..eee7ef0 100644 --- a/runtime/ftplugin/java.vim +++ b/runtime/ftplugin/java.vim @@ -5,6 +5,7 @@ " Repository: https://github.com/zzzyxwvut/java-vim.git " Last Change: 2024 Apr 18 " 2024 Jan 14 by Vim Project (browsefilter) +" 2024 May 23 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 @@ -61,7 +62,7 @@ setlocal formatoptions-=t formatoptions+=croql " Set 'comments' to format dashed lists in comments. Behaves just like C. setlocal comments& comments^=sO:*\ -,mO:*\ \ ,exO:*/ -setlocal commentstring=//%s +setlocal commentstring=//\ %s " Change the :browse e filter to primarily show Java-related files. if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") diff --git a/runtime/ftplugin/javascript.vim b/runtime/ftplugin/javascript.vim index 2633954..455b794 100644 --- a/runtime/ftplugin/javascript.vim +++ b/runtime/ftplugin/javascript.vim @@ -3,6 +3,7 @@ " Maintainer: Doug Kearns " Contributor: Romain Lafourcade " Last Change: 2024 Jan 14 +" 2024 May 23 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") finish @@ -24,7 +25,7 @@ endif " Set 'comments' to format dashed lists in comments. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// -setlocal commentstring=//%s +setlocal commentstring=//\ %s " Change the :browse e filter to primarily show JavaScript-related files. if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") diff --git a/runtime/ftplugin/jj.vim b/runtime/ftplugin/jj.vim new file mode 100644 index 0000000..cc5d700 --- /dev/null +++ b/runtime/ftplugin/jj.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin +" Language: jj description +" Maintainer: Gregory Anders +" Last Change: 2024 May 8 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +" Use the same formatoptions and textwidth as the gitcommit ftplugin +setlocal nomodeline formatoptions+=tl textwidth=72 +setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q formatoptions+=n +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}]\\s\\+\\\|^\\s*[-*+]\\s\\+ + +setlocal comments=b:JJ: +setlocal commentstring=JJ:\ %s + +let b:undo_ftplugin = 'setl modeline< formatoptions< textwidth< formatlistpat< comments< commentstring<' diff --git a/runtime/ftplugin/jq.vim b/runtime/ftplugin/jq.vim index 15cd400..d258836 100644 --- a/runtime/ftplugin/jq.vim +++ b/runtime/ftplugin/jq.vim @@ -1,7 +1,8 @@ " Vim compiler file " Language: jq " Maintainer: Vito -" Last Change: 2024 Apr 17 +" Last Change: 2024 Apr 29 +" 2024 May 23 by Riley Bruins ('commentstring') " Upstream: https://github.com/vito-c/jq.vim if exists('b:did_ftplugin') @@ -9,10 +10,8 @@ if exists('b:did_ftplugin') endif let b:did_ftplugin = 1 -let b:undo_ftplugin = 'setl commentstring<' - -setlocal commentstring=#%s +setlocal include=^\\s*\\%(import\\\|include\\) +setlocal commentstring=#\ %s compiler jq -let &cpoptions = s:save_cpoptions -unlet s:save_cpoptions +let b:undo_ftplugin = 'setl commentstring< include<' diff --git a/runtime/ftplugin/jsonc.vim b/runtime/ftplugin/jsonc.vim index e47a75f..ec32684 100644 --- a/runtime/ftplugin/jsonc.vim +++ b/runtime/ftplugin/jsonc.vim @@ -5,6 +5,7 @@ " https://github.com/kevinoid/vim-jsonc " License: MIT " Last Change: 2021 Nov 22 +" 2024 May 23 by Riley Bruins ('commentstring') runtime! ftplugin/json.vim @@ -15,7 +16,7 @@ else endif " Set comment (formatting) related options. {{{1 -setlocal commentstring=//%s comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// +setlocal commentstring=//\ %s comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// " Let Vim know how to disable the plug-in. let b:undo_ftplugin = 'setlocal commentstring< comments<' diff --git a/runtime/ftplugin/kdl.vim b/runtime/ftplugin/kdl.vim new file mode 100644 index 0000000..c9a1d8b --- /dev/null +++ b/runtime/ftplugin/kdl.vim @@ -0,0 +1,17 @@ +" Vim filetype plugin +" Language: KDL +" Author: Aram Drevekenin +" Maintainer: Yinzuo Jiang +" Last Change: 2024-06-10 + +if exists("b:did_ftplugin") + finish +endif + +let b:did_ftplugin = 1 + +setlocal comments=:// +setlocal commentstring=//\ %s +setlocal formatoptions-=t + +let b:undo_ftplugin = 'setlocal comments< commentstring< formatoptions<' diff --git a/runtime/ftplugin/lc.vim b/runtime/ftplugin/lc.vim new file mode 100644 index 0000000..e818f1a --- /dev/null +++ b/runtime/ftplugin/lc.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: Elsa +" Maintainer: Riley Bruins +" Last Change: 2024 May 25 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl comments=:-- commentstring=--\ %s + +let b:undo_ftplugin = 'setl com< cms<' diff --git a/runtime/ftplugin/ld.vim b/runtime/ftplugin/ld.vim index 1ab80d5..9cc70bd 100644 --- a/runtime/ftplugin/ld.vim +++ b/runtime/ftplugin/ld.vim @@ -1,7 +1,8 @@ " Vim filetype plugin file " Language: ld(1) script " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Latest Revision: 2008 Jul 09 +" 2024 May 23 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") finish @@ -13,7 +14,7 @@ set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" -setlocal comments=s1:/*,mb:*,ex:*/ commentstring=/*%s*/ include=^\\s*INCLUDE +setlocal comments=s1:/*,mb:*,ex:*/ commentstring=/*\ %s\ */ include=^\\s*INCLUDE setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save diff --git a/runtime/ftplugin/liquid.vim b/runtime/ftplugin/liquid.vim index f24ec4c..dbd8abe 100644 --- a/runtime/ftplugin/liquid.vim +++ b/runtime/ftplugin/liquid.vim @@ -2,6 +2,7 @@ " Language: Liquid " Maintainer: Tim Pope " Last Change: 2022 Mar 15 +" 2024 May 23 by Riley Bruins ('commentstring') if exists('b:did_ftplugin') finish @@ -56,6 +57,6 @@ if exists('loaded_matchit') let b:match_words .= '\<\%(if\w*\|unless\|case\)\>:\<\%(elsif\|else\|when\)\>:\,\<\%(for\|tablerow\)\>:\%({%\s*\)\@<=empty\>:\,\<\(capture\|comment\|highlight\)\>:\' endif -setlocal commentstring={%\ comment\ %}%s{%\ endcomment\ %} +setlocal commentstring={%\ comment\ %}\ %s\ {%\ endcomment\ %} let b:undo_ftplugin .= 'setl cms< | unlet! b:browsefilter b:match_words' diff --git a/runtime/ftplugin/lisp.vim b/runtime/ftplugin/lisp.vim index db3ac96..fe3c6fe 100644 --- a/runtime/ftplugin/lisp.vim +++ b/runtime/ftplugin/lisp.vim @@ -5,6 +5,7 @@ " Original author: Dorai Sitaram " Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html " Last Change: Mar 10, 2021 +" May 23, 2024 by Riley Bruins ('commentstring') " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -19,6 +20,6 @@ setl define=^\\s*(def\\k* setl formatoptions-=t setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94 setl lisp -setl commentstring=;%s +setl commentstring=;\ %s let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lisp< commentstring<" diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim index a2c33bc..91e8a8b 100644 --- a/runtime/ftplugin/man.vim +++ b/runtime/ftplugin/man.vim @@ -3,7 +3,7 @@ " Maintainer: Jason Franklin " Maintainer: SungHyun Nam " Autoload Split: Bram Moolenaar -" Last Change: 2023 Mar 21 +" Last Change: 2024 Jun 06 (disabled the q mapping, #8210) " To make the ":Man" command available before editing a manual page, source " this script from your startup vimrc file. @@ -39,14 +39,16 @@ if &filetype == "man" nnoremap :call dist#man#PreGetPage(v:count) nnoremap :call dist#man#PopPage() - nnoremap q :q + " Disabled, since this hides the ability to record a macro or use the + " command line window + " nnoremap q :q " Add undo commands for the maps let b:undo_ftplugin = b:undo_ftplugin \ . '|silent! nunmap ManBS' \ . '|silent! nunmap ' \ . '|silent! nunmap ' - \ . '|silent! nunmap q' + "\ . '|silent! nunmap q' endif if exists('g:ft_man_folding_enable') && (g:ft_man_folding_enable == 1) diff --git a/runtime/ftplugin/markdown.vim b/runtime/ftplugin/markdown.vim index 022dd0d..d4ee5ac 100644 --- a/runtime/ftplugin/markdown.vim +++ b/runtime/ftplugin/markdown.vim @@ -2,6 +2,7 @@ " Language: Markdown " Maintainer: Tim Pope " Last Change: 2023 Dec 28 +" 2024 May 24 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") finish @@ -12,7 +13,7 @@ runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim let s:keepcpo= &cpo set cpo&vim -setlocal comments=fb:*,fb:-,fb:+,n:> commentstring= +setlocal comments=fb:*,fb:-,fb:+,n:> commentstring= setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]:\\&^.\\{4\\} diff --git a/runtime/ftplugin/mma.vim b/runtime/ftplugin/mma.vim index ce4cee1..91a8111 100644 --- a/runtime/ftplugin/mma.vim +++ b/runtime/ftplugin/mma.vim @@ -1,7 +1,8 @@ " Vim filetype plugin file " Language: Mathematica " Maintainer: Ian Ford -" Last Change: 22 January 2019 +" Last Change: 2019 Jan 22 +" 2024 May 23 by Riley Bruins ('commentstring') " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -13,4 +14,4 @@ let b:did_ftplugin = 1 let b:undo_ftplugin = "setlocal commentstring<" -setlocal commentstring=\(*%s*\) +setlocal commentstring=\(*\ %s\ *\) diff --git a/runtime/ftplugin/modula2.vim b/runtime/ftplugin/modula2.vim index 9c1acc2..306688d 100644 --- a/runtime/ftplugin/modula2.vim +++ b/runtime/ftplugin/modula2.vim @@ -2,6 +2,7 @@ " Language: Modula-2 " Maintainer: Doug Kearns " Last Change: 2024 Jan 14 +" 2024 May 23 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") finish @@ -17,7 +18,7 @@ if s:dialect ==# "r10" setlocal comments=s:(*,m:\ ,e:*),:! setlocal commentstring=!\ %s else - setlocal commentstring=(*%s*) + setlocal commentstring=(*\ %s\ *) setlocal comments=s:(*,m:\ ,e:*) endif setlocal formatoptions-=t formatoptions+=croql diff --git a/runtime/ftplugin/modula3.vim b/runtime/ftplugin/modula3.vim index 45dd7ca..f899d1d 100644 --- a/runtime/ftplugin/modula3.vim +++ b/runtime/ftplugin/modula3.vim @@ -2,6 +2,7 @@ " Language: Modula-3 " Maintainer: Doug Kearns " Last Change: 2024 Jan 14 +" 2024 May 24 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") finish @@ -12,7 +13,7 @@ let s:cpo_save = &cpo set cpo&vim setlocal comments=s0:(*,mb:\ ,ex:*) -setlocal commentstring=(*%s*) +setlocal commentstring=(*\ %s\ *) setlocal formatoptions-=t formatoptions+=croql setlocal suffixesadd+=.m3 setlocal formatprg=m3pp diff --git a/runtime/ftplugin/nim.vim b/runtime/ftplugin/nim.vim new file mode 100644 index 0000000..4ab8b7b --- /dev/null +++ b/runtime/ftplugin/nim.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: nim +" Maintainer: Riley Bruins +" Last Change: 2024 May 19 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl comments=exO:]#,fs1:#[,mb:*,ex:]#,:# commentstring=#\ %s + +let b:undo_ftplugin = 'setl com< cms<' diff --git a/runtime/ftplugin/nroff.vim b/runtime/ftplugin/nroff.vim index cf62d02..ed0b32f 100644 --- a/runtime/ftplugin/nroff.vim +++ b/runtime/ftplugin/nroff.vim @@ -2,15 +2,15 @@ " Language: roff(7) " Maintainer: Aman Verma " Homepage: https://github.com/a-vrma/vim-nroff-ftplugin -" Previous Maintainer: Chris Spiegel -" Last Change: 2020 Nov 21 +" Previous Maintainer: Chris Spiegel +" 2024 May 24 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 -setlocal commentstring=.\\\"%s +setlocal commentstring=.\\\"\ %s setlocal comments=:.\\\" setlocal sections+=Sh diff --git a/runtime/ftplugin/obse.vim b/runtime/ftplugin/obse.vim index 6d865f0..bf5076f 100644 --- a/runtime/ftplugin/obse.vim +++ b/runtime/ftplugin/obse.vim @@ -2,8 +2,9 @@ " Language: Oblivion Language (obl) " Original Creator: Kat " Maintainer: Kat -" Created: August 08, 2021 -" Last Change: 13 November 2022 +" Created: 2021 Aug 08 +" Last Change: 2022 Nov 13 +" 2024 May 23 by Riley Bruins ('commentstring') if exists("b:did_ftplugin") finish @@ -20,7 +21,7 @@ noremap + +
+ + + + + +strong importance + + + + +
+ + + + + + + + + + + +unarticulated annotation +
    + + + + + + + + +
    + + + + + + + + + + + +strikethrough + + + + + + + + +<plaintext> diff --git a/runtime/syntax/testdir/input/html_html b/runtime/syntax/testdir/input/html_html deleted file mode 100644 index bfeca26..0000000 --- a/runtime/syntax/testdir/input/html_html +++ /dev/null @@ -1,146 +0,0 @@ -<!-- - HTML Syntax Test File - Maintainer: Doug Kearns <dougkearns@gmail.com> - Last Change: 2023 Nov 28 ---> - -<!-- HTML Elements --> -<a> -<abbr> -<address> -<area> -<article> -<aside> -<audio> -<b>...</b> -<base> -<bdi> -<bdo> -<blockquote> -<body> -<br> -<button> -<canvas> -<caption> -<cite> -<code> -<col> -<colgroup> -<data> -<datalist> -<dd> -<del>...</del> -<details> -<dfn> -<dialog> -<div> -<dl> -<dt> -<em>...</em> -<embed> -<fieldset> -<figcaption> -<figure> -<footer> -<form> -<h1>...</h1> -<h2>...</h2> -<h3>...</h3> -<h4>...</h4> -<h5>...</h5> -<h6>...</h6> -<head>...</head> -<header> -<hgroup> -<hr> -<html> -<i>...</i> -<iframe> -<img> -<input> -<ins> -<kbd> -<label> -<legend> -<li> -<link> -<main> -<map> -<mark> -<menu> -<meta> -<meter> -<nav> -<noscript> -<object> -<ol> -<optgroup> -<option> -<output> -<p> -<picture> -<pre>...</pre> -<progress> -<q> -<rp> -<rt> -<ruby> -<s>...</s> -<samp> -<script>...</script> -<search> -<section> -<select> -<slot> -<small> -<source> -<span> -<strong>...</strong> -<style>...</style> -<sub> -<summary> -<sup> -<table> -<tbody> -<td> -<template> -<textarea> -<tfoot> -<th> -<thead> -<time> -<title>...</title> -<tr> -<track> -<u>...</u> -<ul> -<var> -<video> -<wbr> -<xmp> - -<!-- Deprecated Elements --> -<acronym> -<big> -<center> -<dir> -<font> -<frame> -<frameset> -<marquee> -<menuitem> -<nobr> -<noframes> -<param> -<rb> -<rtc> -<strike>...</strike> -<tt> - -<!-- Note: these deprecated elements have never been matched --> -<image> -<noembed> -<plaintext> - -<!-- Experimental --> -<portal> diff --git a/runtime/syntax/testdir/input/java_annotations.java b/runtime/syntax/testdir/input/java_annotations.java new file mode 100644 index 0000000..c5871c3 --- /dev/null +++ b/runtime/syntax/testdir/input/java_annotations.java @@ -0,0 +1,78 @@ +// VIM_TEST_SETUP let g:java_highlight_functions = 'style' + + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +class AnnotationsTests +{ + @Target(ElementType.TYPE_USE) + @interface Tag + { + String value() default ""; + String kind() default ""; + } + + @Target(ElementType.TYPE_USE) + @interface Text + { + String[] value() default {""}; + } + + @Target({ + ElementType.METHOD, + ElementType.PARAMETER, + ElementType.TYPE, + }) + @interface Labels + { + Label[] value(); + } + + @java.lang.annotation.Target({ + java.lang.annotation.ElementType.METHOD, + java.lang.annotation.ElementType.PARAMETER, + java.lang.annotation.ElementType.TYPE, + }) + @java.lang.annotation.Repeatable(Labels.class) + @interface Label + { + String value() default ""; + Class<?> type() default Label.class; + boolean redundant() default true; + Text text() default @Text; + Tag head() default @Tag(); + Tag tail() default @Tag(value = "", kind = ""); + } + + /* Use identity cast expressions to nest TYPE_USE annotations. */ + @Label( + (@Text({ + (@Text({ "a", "aa", "aaa", "aaaa", }) String) "as", + (@Text({ "b", "bb", "bbb", "bbbb", }) String) "bs", + (@Text({ "c", "cc", "ccc", "cccc", }) String) "cs", + (@Text({ "d", "dd", "ddd", "dddd", }) String) "ds", + }) String) "abcd") + interface Primer { } + + @Label @Label() @Label(""" + n\ + o\ + O\ + p""") + @Label(head = @Tag(value = "@Label"/*, kind = "name"*/)) + @Label(// value = "Method", + type = AnnotationsTests.class, + redundant = !!!(1 != 1), + head = @Tag(value = "@Label"), + text = @Text({ "})", "({" })) + static void noOp(@Label @Label() @Label("dummy") + @Label(head = @Tag(/*value = "@Label",*/ kind = "name")) + @Label(// value = "Parameter", + type = AnnotationsTests.class, + head = @Tag(value = "@Label"), + text = @Text({ "){", "}(" })) + Object dummy) + { + } +} diff --git a/runtime/syntax/testdir/input/java_enfoldment.java b/runtime/syntax/testdir/input/java_enfoldment.java new file mode 100644 index 0000000..b534122 --- /dev/null +++ b/runtime/syntax/testdir/input/java_enfoldment.java @@ -0,0 +1,86 @@ +// VIM_TEST_SETUP setlocal foldenable foldcolumn=2 foldmethod=syntax +// VIM_TEST_SETUP let g:java_mark_braces_in_parens_as_errors = 1 + + @SuppressWarnings({ + """ + bespoke + /* + * + */ + /** + * + */ + // + // + // + { + } +""" +}) +class FoldingTests { + interface Foldenable + { + } + + static { + new Object() { + { + { + new Object() {{{ + new Object() {{{}}}; + }}}; + } + } + }; + + switch (0) { + case 0: + case 1: { + break; + } + default: ; + }; + } + + { Object bb = ((Object) new byte[]{}); } + { +out: { + do { + if (true) + break out; + } while (false); +} + } + + /** + * No operation. + */ + void noOp1() { } + /** No operation. */ + void noOp2() + { + } + /** No operation. */ + void noOp3() { + } + /** No operation. */ + void noOp4() { + /*/\/\/\*/ ; } +} + +/* + * Some note. + * { + * } + */ +/** + * A summary. + * { + * } + */ +// +// { +// } + +/* 122|..........................................................................................*/ interface Foldenable { +} diff --git a/runtime/syntax/testdir/input/java_lambda_expressions.java b/runtime/syntax/testdir/input/java_lambda_expressions.java new file mode 100644 index 0000000..75f5af4 --- /dev/null +++ b/runtime/syntax/testdir/input/java_lambda_expressions.java @@ -0,0 +1,154 @@ +// VIM_TEST_SETUP let g:java_highlight_functions = 'style' + + +import java.lang.annotation.ElementType; +import java.util.function.BinaryOperator; +import java.util.function.Function; +import java.util.function.Predicate; + +class LambdaExpressionsTests // JDK 21+. +{ + <I1, C1, C2, T1, T2, T3, Z1, Z2, Z3, S1, S2, S3> void test() + { // Schönfinkel's functions. + I<I1> i = x -> x; + C<C1, C2> c = x -> y -> x; + T<T1, T2, T3> t = f -> y -> x -> f.apply(x).apply(y); + Z<Z1, Z2, Z3> z = f -> g -> x -> f.apply(g.apply(x)); + S<S1, S2, S3> s = f -> g -> x -> f.apply(x) + .apply(g.apply(x)); + + I<I1> i01 = (var x) -> x; + I<I1> i02 = (@Taggable var x) -> x; + I<I1> i03 = (@Taggable @Taggable var x) -> x; + I<I1> i04 = (final var x) -> x; + I<I1> i05 = (@Taggable final var x) -> x; + I<I1> i06 = (@Taggable @Taggable final var x) -> x; + I<I1> i07 = (I1 x) -> x; + I<I1> i08 = (@Taggable I1 x) -> x; + I<I1> i09 = (@Taggable @Taggable I1 x) -> x; + I<I1> i10 = (final I1 x) -> x; + I<I1> i11 = (@Taggable final I1 x) -> x; + I<I1> i12 = (@Taggable @Taggable final I1 x) -> x; + + I<I1[]> ii01 = (I1... x) -> x; + I<I1[]> ii02 = (@Taggable I1... x) -> x; + I<I1[]> ii03 = (@Taggable @Taggable I1... x) -> x; + I<I1[]> ii04 = (final I1... x) -> x; + I<I1[]> ii05 = (@Taggable final I1... x) -> x; + I<I1[]> ii06 = (@Taggable @Taggable final I1... x) -> x; + + BinaryOperator<I1> leftConst01 = (var x, var y) -> x; + BinaryOperator<I1> leftConst02 = (@Taggable var x, + @Taggable var y) -> x; + BinaryOperator<I1> leftConst03 = (@Taggable @Taggable var + x, @Taggable @Taggable var y) -> x; + BinaryOperator<I1> leftConst04 = (final var x, + final var y) -> x; + BinaryOperator<I1> leftConst05 = (@Taggable final + var x, @Taggable final var y) -> x; + BinaryOperator<I1> leftConst06 = (@Taggable + @Taggable final var x, + @Taggable + @Taggable final var y) -> x; + BinaryOperator<I1> leftConst07 = (I1 x, I1 y) -> x; + BinaryOperator<I1> leftConst08 = (@Taggable I1 x, + @Taggable I1 y) -> x; + BinaryOperator<I1> leftConst09 = (@Taggable @Taggable I1 + x, @Taggable @Taggable I1 y) -> x; + BinaryOperator<I1> leftConst10 = (final I1 x, + final I1 y) -> x; + BinaryOperator<I1> leftConst11 = (@Taggable final + I1 x, @Taggable final I1 y) -> x; + BinaryOperator<I1> leftConst12 = (@Taggable + @Taggable final I1 x, + @Taggable + @Taggable final I1 y) -> x; + + Runnable noOp = () -> {}; + BinaryOperator<I1> leftConst = (x, y) -> x; + I<I1> id1 = (x) -> (x); + @SuppressWarnings("unchecked") I<I1> id2 = + ((I<I<I1>>) (I<?>) (Function<I1, + I1> x) -> x).apply(switch (0) { + case ((int) (byte) 1) -> (I1 x) -> x; + default -> (@Taggable I1 x) -> x; }); + C<C1, C2> const1 = (x) -> (y) -> (x); + C<C1, C2> const2 = switch(switch ("") { + case "->"->"(s)->(s)"; + default->"default"; }) { + case ("->")->(var x)->(var y)->(x); + default->(@Taggable var x)->(@Taggable var y) + ->(x); + }; + } + + @java.lang.annotation.Target(ElementType.PARAMETER) + @java.lang.annotation.Repeatable(Taggables.class) + @interface Taggable { String[] value() default ""; } + + @java.lang.annotation.Target(ElementType.PARAMETER) + @interface Taggables { Taggable[] value(); } + + interface I<A1> extends Function<A1, A1> { } + interface C<A1, A2> extends Function<A1, Function<A2, A1>> { } + interface T<A1, A2, A3> extends + Function<Function<A1, Function<A2, A3>>, + Function<A2, + Function<A1, A3>>> { } + interface Z<A1, A2, A3> extends Function<Function<A2, A3>, + Function<Function<A1, A2>, + Function<A1, A3>>> { } + interface S<A1, A2, A3> extends + Function<Function<A1, Function<A2, A3>>, + Function<Function<A1, A2>, + Function<A1, A3>>> { } + + static void echo(Object o) { System.out.println(o); } + + static { + enum Letters { OTHER, ALPHA, BETA } + + Letters other = Letters.OTHER; + + switch (other) { + case Letters alpha when Letters.ALPHA == alpha: + { echo(alpha); break; } + case Letters beta when Letters.BETA == beta: + { echo(beta); break; } + default: { echo(other); } + } + + echo(switch (other) { + case Letters alpha when Letters.ALPHA == alpha + -> alpha; + case Letters beta when Letters.BETA == beta + -> beta; + default -> other; + }); + + switch (null) { + case String str when !"<empty>".equals(switch (str) { + case String str_ when + Predicate.<String>not(text -> + !text.isEmpty()) + .test(str_) + -> "<empty>"; + case String str_ -> str_; + }): { echo(str); break; } + case null: default: { echo("Other"); } + }; + + echo(switch (null) { + case String str when !"<empty>".equals( + switch (str) { + case String str_ when + Predicate.<String>not(text -> + !text.isEmpty()) + .test(str_) + -> "<empty>"; + case String str_ -> str_; + }) -> str; + case null, default -> "Other"; + }); + } +} diff --git a/runtime/syntax/testdir/input/java_methods_indent.java b/runtime/syntax/testdir/input/java_methods_indent.java deleted file mode 100644 index 627eb8b..0000000 --- a/runtime/syntax/testdir/input/java_methods_indent.java +++ /dev/null @@ -1,70 +0,0 @@ -// VIM_TEST_SETUP let g:java_highlight_functions = 'indent' - - -import java.lang.annotation.Target; - -abstract class IndentMethodsTests -{ // DO NOT retab! THIS FILE; REMEMBER ABOUT testdir/ftplugin. - protected IndentMethodsTests() { } - - record Τʬ<α>(α a) { } - - enum 𝓔 - { - A("𝕬"), B("𝕭"), C("𝕮"), D("𝕯"), - E("𝕰"), F("𝕱"), G("𝕲"), H("𝕳"); - final String 𝐬; - private 𝓔(String 𝐬) { this.𝐬 = 𝐬; } - } - - @Target(java.lang.annotation.ElementType.METHOD) - @java.lang.annotation.Repeatable(Tɐggablɘs.class) - @interface Tɐggablɘ - { - String[] value() default ""; - } - - @Target(java.lang.annotation.ElementType.METHOD) - @interface Tɐggablɘs - { - Tɐggablɘ[] value(); - } - - interface Stylable<Α> - { - default void ascii$0_() { } - default Α μʭʭ$0_() { return null; } - } - - @Tɐggablɘ @Tɐggablɘ - abstract void ascii$0_(); - - @Tɐggablɘ @Tɐggablɘ - abstract <α, β> Τʬ<α> μʭʭ$0_(β 𝛽); - - @Tɐggablɘ - private native void ascii$1_(); - - @Tɐggablɘ - private native <α, β> Τʬ<α>[] μʭʭ$1_( - java.util.function.Function<β, Τʬ<α>[]> ƒ); - - static final native synchronized void ascii$98_(); - static final native synchronized <α, β> Τʬ<α>[][] μʭʭ$98_( - java.util.function.Function<β, Τʬ<α>[][]> ƒ); - - @SuppressWarnings("strictfp") - protected static final synchronized strictfp void ascii$99_() - { ascii$98_(); } - - @SuppressWarnings("strictfp") - protected static final synchronized strictfp <α, β> Τʬ<α>[] μʭʭ$99_( - java.util.function.Function<β, Τʬ<α>[][]> ƒ) - { - return - IndentMethodsTests.<α, β>μʭʭ$98_(ƒ)[0]; - } - - @Override @SuppressWarnings("cast") - public String toString() { return (String) "IndentMethodsTests"; } -} diff --git a/runtime/syntax/testdir/input/java_methods_indent2.java b/runtime/syntax/testdir/input/java_methods_indent2.java new file mode 100644 index 0000000..58a6900 --- /dev/null +++ b/runtime/syntax/testdir/input/java_methods_indent2.java @@ -0,0 +1,92 @@ +// VIM_TEST_SETUP let g:java_highlight_functions = 'indent2' +// VIM_TEST_SETUP set encoding=utf-8 termencoding=utf-8 + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +abstract class Indent2MethodsTests +{ // DO NOT retab! THIS FILE; REMEMBER ABOUT testdir/ftplugin. + // TYPES. + record Τʬ<α>(α a) { } + + enum E + { + A("a"), B("b"), C("c"), D("d"), + E("e"), F("f"), G("g"), H("h"); + final String s; + private E(String s) { this.s = s; } + } + + @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) + @java.lang.annotation.Repeatable(Tɐggablɘs.class) + @interface Tɐggablɘ + { + String[] value() default ""; + } + + @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) + @interface Tɐggablɘs + { + Tɐggablɘ[] value(); + } + + interface Stylable<Α> + { + default void ascii$0_() { } + default Α μʭʭ$0_() { return null; } + } + + // FIELDS. + private static final Class<?> CLASS_LOCK = classLock(); + + private final Object instanceLock = new Object(); + + // CONSTRUCTORS. + @Tɐggablɘ @Tɐggablɘ protected Indent2MethodsTests() { } + <T extends Comparable<T>> Indent2MethodsTests(T t, Void v) { } + private <T extends Comparable<T>> Indent2MethodsTests(T t) { } + + // METHODS. + @Tɐggablɘ @Tɐggablɘ abstract void ascii$0_(//////////////// + ); + @Tɐggablɘ @Tɐggablɘ abstract <α, β> Τʬ<α> μʭʭ$0_( + @SuppressWarnings("bespoke") β b); + + @Tɐggablɘ private native void ascii$1_(/*////////////*/); + @Tɐggablɘ private native <α, β> Τʬ<α>[] μʭʭ$1_( + java.util.function.Function<β, Τʬ<α>[]> ƒ); + + void Ascii$2_() { } + <T, U extends Stylable<T>> void Μʭʭ$2_(U u) { } + + static final native synchronized void ascii$98_(); + static final native synchronized <α, β> Τʬ<α>[][] μʭʭ$98_( + java.util.function.Function<β, Τʬ<α>[][]> ƒ); + + @SuppressWarnings("strictfp") + protected static final synchronized strictfp void ascii$99_() + { ascii$98_(); } + + @SuppressWarnings("strictfp") + protected static final synchronized strictfp <α, β> Τʬ<α>[] μʭʭ$99_( + java.util.function.Function<β, Τʬ<α>[][]> ƒ) + { + return + Indent2MethodsTests.<α, β>μʭʭ$98_(ƒ)[0]; + } + + public static Class<?> classLock() { return Indent2MethodsTests.class; } + + @Override @SuppressWarnings("cast") + public String toString() { return (String) "Indent2MethodsTests"; } +} + +enum E2 +{ + @SuppressWarnings("bespoke") A("a"), + B("b"), + C("c"), D("d"), + E("e"), F("f"), G("g"), H("h"); + final String s; + private E2(String s) { this.s = s; } +} diff --git a/runtime/syntax/testdir/input/java_methods_indent4.java b/runtime/syntax/testdir/input/java_methods_indent4.java new file mode 100644 index 0000000..972cdf3 --- /dev/null +++ b/runtime/syntax/testdir/input/java_methods_indent4.java @@ -0,0 +1,92 @@ +// VIM_TEST_SETUP let g:java_highlight_functions = 'indent4' +// VIM_TEST_SETUP set encoding=utf-8 termencoding=utf-8 + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +abstract class Indent4MethodsTests +{ // DO NOT retab! THIS FILE; REMEMBER ABOUT testdir/ftplugin. + // TYPES. + record Τʬ<α>(α a) { } + + enum E + { + A("a"), B("b"), C("c"), D("d"), + E("e"), F("f"), G("g"), H("h"); + final String s; + private E(String s) { this.s = s; } + } + + @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) + @java.lang.annotation.Repeatable(Tɐggablɘs.class) + @interface Tɐggablɘ + { + String[] value() default ""; + } + + @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) + @interface Tɐggablɘs + { + Tɐggablɘ[] value(); + } + + interface Stylable<Α> + { + default void ascii$0_() { } + default Α μʭʭ$0_() { return null; } + } + + // FIELDS. + private static final Class<?> CLASS_LOCK = classLock(); + + private final Object instanceLock = new Object(); + + // CONSTRUCTORS. + @Tɐggablɘ @Tɐggablɘ protected Indent4MethodsTests() { } + <T extends Comparable<T>> Indent4MethodsTests(T t, Void v) { } + private <T extends Comparable<T>> Indent4MethodsTests(T t) { } + + // METHODS. + @Tɐggablɘ @Tɐggablɘ abstract void ascii$0_(//////////////// + ); + @Tɐggablɘ @Tɐggablɘ abstract <α, β> Τʬ<α> μʭʭ$0_( + @SuppressWarnings("bespoke") β b); + + @Tɐggablɘ private native void ascii$1_(/*////////////*/); + @Tɐggablɘ private native <α, β> Τʬ<α>[] μʭʭ$1_( + java.util.function.Function<β, Τʬ<α>[]> ƒ); + + void Ascii$2_() { } + <T, U extends Stylable<T>> void Μʭʭ$2_(U u) { } + + static final native synchronized void ascii$98_(); + static final native synchronized <α, β> Τʬ<α>[][] μʭʭ$98_( + java.util.function.Function<β, Τʬ<α>[][]> ƒ); + + @SuppressWarnings("strictfp") + protected static final synchronized strictfp void ascii$99_() + { ascii$98_(); } + + @SuppressWarnings("strictfp") + protected static final synchronized strictfp <α, β> Τʬ<α>[] μʭʭ$99_( + java.util.function.Function<β, Τʬ<α>[][]> ƒ) + { + return + Indent4MethodsTests.<α, β>μʭʭ$98_(ƒ)[0]; + } + + public static Class<?> classLock() { return Indent4MethodsTests.class; } + + @Override @SuppressWarnings("cast") + public String toString() { return (String) "Indent4MethodsTests"; } +} + +enum E4 +{ + @SuppressWarnings("bespoke") A("a"), + B("b"), + C("c"), D("d"), + E("e"), F("f"), G("g"), H("h"); + final String s; + private E4(String s) { this.s = s; } +} diff --git a/runtime/syntax/testdir/input/java_methods_indent8.java b/runtime/syntax/testdir/input/java_methods_indent8.java new file mode 100644 index 0000000..40fd26b --- /dev/null +++ b/runtime/syntax/testdir/input/java_methods_indent8.java @@ -0,0 +1,92 @@ +// VIM_TEST_SETUP let g:java_highlight_functions = 'indent8' +// VIM_TEST_SETUP set encoding=utf-8 termencoding=utf-8 + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +abstract class Indent8MethodsTests +{ // DO NOT retab! THIS FILE; REMEMBER ABOUT testdir/ftplugin. + // TYPES. + record Τʬ<α>(α a) { } + + enum E + { + A("a"), B("b"), C("c"), D("d"), + E("e"), F("f"), G("g"), H("h"); + final String s; + private E(String s) { this.s = s; } + } + + @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) + @java.lang.annotation.Repeatable(Tɐggablɘs.class) + @interface Tɐggablɘ + { + String[] value() default ""; + } + + @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) + @interface Tɐggablɘs + { + Tɐggablɘ[] value(); + } + + interface Stylable<Α> + { + default void ascii$0_() { } + default Α μʭʭ$0_() { return null; } + } + + // FIELDS. + private static final Class<?> CLASS_LOCK = classLock(); + + private final Object instanceLock = new Object(); + + // CONSTRUCTORS. + @Tɐggablɘ @Tɐggablɘ protected Indent8MethodsTests() { } + <T extends Comparable<T>> Indent8MethodsTests(T t, Void v) { } + private <T extends Comparable<T>> Indent8MethodsTests(T t) { } + + // METHODS. + @Tɐggablɘ @Tɐggablɘ abstract void ascii$0_(//////////////// + ); + @Tɐggablɘ @Tɐggablɘ abstract <α, β> Τʬ<α> μʭʭ$0_( + @SuppressWarnings("bespoke") β b); + + @Tɐggablɘ private native void ascii$1_(/*////////////*/); + @Tɐggablɘ private native <α, β> Τʬ<α>[] μʭʭ$1_( + java.util.function.Function<β, Τʬ<α>[]> ƒ); + + void Ascii$2_() { } + <T, U extends Stylable<T>> void Μʭʭ$2_(U u) { } + + static final native synchronized void ascii$98_(); + static final native synchronized <α, β> Τʬ<α>[][] μʭʭ$98_( + java.util.function.Function<β, Τʬ<α>[][]> ƒ); + + @SuppressWarnings("strictfp") + protected static final synchronized strictfp void ascii$99_() + { ascii$98_(); } + + @SuppressWarnings("strictfp") + protected static final synchronized strictfp <α, β> Τʬ<α>[] μʭʭ$99_( + java.util.function.Function<β, Τʬ<α>[][]> ƒ) + { + return + Indent8MethodsTests.<α, β>μʭʭ$98_(ƒ)[0]; + } + + public static Class<?> classLock() { return Indent8MethodsTests.class; } + + @Override @SuppressWarnings("cast") + public String toString() { return (String) "Indent8MethodsTests"; } +} + +enum E8 +{ + @SuppressWarnings("bespoke") A("a"), + B("b"), + C("c"), D("d"), + E("e"), F("f"), G("g"), H("h"); + final String s; + private E8(String s) { this.s = s; } +} diff --git a/runtime/syntax/testdir/input/java_methods_style.java b/runtime/syntax/testdir/input/java_methods_style.java index b3e36fb..e2e7d38 100644 --- a/runtime/syntax/testdir/input/java_methods_style.java +++ b/runtime/syntax/testdir/input/java_methods_style.java @@ -1,30 +1,30 @@ // VIM_TEST_SETUP let g:java_highlight_functions = 'style' +// VIM_TEST_SETUP set encoding=utf-8 termencoding=utf-8 - +import java.lang.annotation.ElementType; import java.lang.annotation.Target; abstract class StyleMethodsTests { - protected StyleMethodsTests() { } - + // TYPES. record Τʬ<α>(α a) { } - enum 𝓔 + enum E { - A("𝕬"), B("𝕭"), C("𝕮"), D("𝕯"), - E("𝕰"), F("𝕱"), G("𝕲"), H("𝕳"); - final String 𝐬; - private 𝓔(String 𝐬) { this.𝐬 = 𝐬; } + A("a"), B("b"), C("c"), D("d"), + E("e"), F("f"), G("g"), H("h"); + final String s; + private E(String s) { this.s = s; } } - @Target(java.lang.annotation.ElementType.METHOD) + @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) @java.lang.annotation.Repeatable(Tɐggablɘs.class) @interface Tɐggablɘ { String[] value() default ""; } - @Target(java.lang.annotation.ElementType.METHOD) + @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) @interface Tɐggablɘs { Tɐggablɘ[] value(); @@ -36,15 +36,29 @@ abstract class StyleMethodsTests default Α μʭʭ$0_() { return null; } } + // FIELDS. + private static final Class<?> CLASS_LOCK = classLock(); + + private final Object instanceLock = new Object(); + + // CONSTRUCTORS. + @Tɐggablɘ @Tɐggablɘ protected StyleMethodsTests() { } + <T extends Comparable<T>> StyleMethodsTests(T t, Void v) { } + private <T extends Comparable<T>> StyleMethodsTests(T t) { } + + // METHODS. @Tɐggablɘ @Tɐggablɘ abstract void ascii$0_(//////////////// ); @Tɐggablɘ @Tɐggablɘ abstract <α, β> Τʬ<α> μʭʭ$0_( - /* TODO: @SuppressWarnings("bespoke")*/ β 𝛽); + @SuppressWarnings("bespoke") β b); @Tɐggablɘ private native void ascii$1_(/*////////////*/); @Tɐggablɘ private native <α, β> Τʬ<α>[] μʭʭ$1_( java.util.function.Function<β, Τʬ<α>[]> ƒ); + void Ascii$2_() { } + <T, U extends Stylable<T>> void Μʭʭ$2_(U u) { } + static final native synchronized void ascii$98_(); static final native synchronized <α, β> Τʬ<α>[][] μʭʭ$98_( java.util.function.Function<β, Τʬ<α>[][]> ƒ); @@ -61,6 +75,8 @@ abstract class StyleMethodsTests StyleMethodsTests.<α, β>μʭʭ$98_(ƒ)[0]; } + public static Class<?> classLock() { return StyleMethodsTests.class; } + @Override @SuppressWarnings("cast") public String toString() { return (String) "StyleMethodsTests"; } } diff --git a/runtime/syntax/testdir/input/java_unfoldment.java b/runtime/syntax/testdir/input/java_unfoldment.java new file mode 100644 index 0000000..78dd234 --- /dev/null +++ b/runtime/syntax/testdir/input/java_unfoldment.java @@ -0,0 +1,86 @@ +// VIM_TEST_SETUP setlocal nofoldenable +// VIM_TEST_SETUP let g:java_mark_braces_in_parens_as_errors = 1 + + @SuppressWarnings({ + """ + bespoke + /* + * + */ + /** + * + */ + // + // + // + { + } +""" +}) +class UnfoldingTests { + interface Unfoldenable + { + } + + static { + new Object() { + { + { + new Object() {{{ + new Object() {{{}}}; + }}}; + } + } + }; + + switch (0) { + case 0: + case 1: { + break; + } + default: ; + }; + } + + { Object bb = ((Object) new byte[]{}); } + { +out: { + do { + if (true) + break out; + } while (false); +} + } + + /** + * No operation. + */ + void noOp1() { } + /** No operation. */ + void noOp2() + { + } + /** No operation. */ + void noOp3() { + } + /** No operation. */ + void noOp4() { + /*/\/\/\*/ ; } +} + +/* + * Some note. + * { + * } + */ +/** + * A summary. + * { + * } + */ +// +// { +// } + +/* 122|........................................................................................*/ interface Unfoldenable { +} diff --git a/runtime/syntax/testdir/input/vim9_comment.vim b/runtime/syntax/testdir/input/vim9_comment.vim new file mode 100644 index 0000000..fd6a5d2 --- /dev/null +++ b/runtime/syntax/testdir/input/vim9_comment.vim @@ -0,0 +1,64 @@ +vim9script + +# Vim comments + +# Vim9-script comment + + # string only recognised with leading char + "useless string" + +function! Foo() + " Legacy-script comment + # 42 " comment +endfunction + +def! Bar() + # Vim9-script comment + "useless string" # comment +enddef + +command -count FooCommand { + # Vim9-script comment + "useless string" # comment +} + +autocmd BufNewFile * { + # Vim9-script comment + "useless string" # comment +} + + +# Multiline comments + +# comment + \ 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 diff --git a/runtime/syntax/testdir/input/vim9_ex_comment_strings.vim b/runtime/syntax/testdir/input/vim9_ex_comment_strings.vim new file mode 100644 index 0000000..fd02c1a --- /dev/null +++ b/runtime/syntax/testdir/input/vim9_ex_comment_strings.vim @@ -0,0 +1,22 @@ +vim9script + +# Vim comment strings +# VIM_TEST_SETUP let g:vimsyn_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/runtime/syntax/testdir/input/vim9_ex_no_comment_strings.vim b/runtime/syntax/testdir/input/vim9_ex_no_comment_strings.vim new file mode 100644 index 0000000..dcea14d --- /dev/null +++ b/runtime/syntax/testdir/input/vim9_ex_no_comment_strings.vim @@ -0,0 +1,22 @@ +vim9script + +# Vim comment strings +# VIM_TEST_SETUP let g:vimsyn_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 +} diff --git a/runtime/syntax/testdir/input/vim9_shebang.vim b/runtime/syntax/testdir/input/vim9_shebang.vim new file mode 100755 index 0000000..c012fd9 --- /dev/null +++ b/runtime/syntax/testdir/input/vim9_shebang.vim @@ -0,0 +1,7 @@ +#!/usr/bin/env vim -S +vim9script + +# Vim shebang line + +# just a line comment +#!/usr/bin/env vim -S diff --git a/runtime/syntax/testdir/input/vim_comment.vim b/runtime/syntax/testdir/input/vim_comment.vim new file mode 100644 index 0000000..f382f8d --- /dev/null +++ b/runtime/syntax/testdir/input/vim_comment.vim @@ -0,0 +1,68 @@ +" Vim comments + +" Legacy-script comment + +# 42 " comment + +function! Foo() + " Legacy-script comment + # 42 " comment +endfunction + +def! Bar() + # Vim9-script comment + "useless string" # comment +enddef + +command -nargs=1 FooCommand { + # Vim9-script comment + "useless string" # comment +} + +autocmd BufNewFile * { + # Vim9-script comment + "useless string" # comment +} + + +" Multiline comments + +" comment + \ 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 diff --git a/runtime/syntax/testdir/input/vim_ex_catch.vim b/runtime/syntax/testdir/input/vim_ex_catch.vim new file mode 100644 index 0000000..f0e2a8f --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_catch.vim @@ -0,0 +1,17 @@ +" Vim :catch command + +" :help :catch + +catch /^Vim:Interrupt$/ " catch interrupts (CTRL-C) +catch /^Vim\%((\a\+)\)\=:E/ " catch all Vim errors +catch /^Vim\%((\a\+)\)\=:/ " catch errors and interrupts +catch /^Vim(write):/ " catch all errors in :write +catch /^Vim\%((\a\+)\)\=:E123:/ " catch error E123 +catch /my-exception/ " catch user exception +catch /.*/ " catch everything +catch " same as /.*/ + +" :help :try + +try | sleep 100 | catch /^Vim:Interrupt$/ | endtry +try | edit | catch /^Vim(edit):E\d\+/ | echo "error" | endtry diff --git a/runtime/syntax/testdir/input/vim_ex_comment-vim9.vim b/runtime/syntax/testdir/input/vim_ex_comment-vim9.vim deleted file mode 100644 index 786d11b..0000000 --- a/runtime/syntax/testdir/input/vim_ex_comment-vim9.vim +++ /dev/null @@ -1,41 +0,0 @@ -vim9script - -# Vim comments - -# Vim9-script comment - - # string only recognised with leading char - "useless string" - -function! Foo() - " Legacy-script comment - # 42 " comment -endfunction - -def! Bar() - # Vim9-script comment - "useless string" # comment -enddef - -command -count FooCommand { - # Vim9-script comment - "useless string" # comment -} - -autocmd BufNewFile * { - # Vim9-script comment - "useless string" # comment -} - - -# Issue: #13047 - -if !exists(":DiffOrig") - command DiffOrig vert new | set bt=nofile | r ++edit %% | 0d_ | diffthis - \ | wincmd p | diffthis -endif - - -# Issue: #11307 and #11560 - -# This is what we call " blah diff --git a/runtime/syntax/testdir/input/vim_ex_comment.vim b/runtime/syntax/testdir/input/vim_ex_comment.vim deleted file mode 100644 index 54e514e..0000000 --- a/runtime/syntax/testdir/input/vim_ex_comment.vim +++ /dev/null @@ -1,45 +0,0 @@ -" Vim comments - -" Legacy-script comment - -# 42 " comment - -function! Foo() - " Legacy-script comment - # 42 " comment -endfunction - -def! Bar() - # Vim9-script comment - "useless string" # comment -enddef - -command -nargs=1 FooCommand { - # Vim9-script comment - "useless string" # comment -} - -autocmd BufNewFile * { - # Vim9-script comment - "useless string" # comment -} - - -" Issue: #13047 - -if !exists(":DiffOrig") - command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis - \ | wincmd p | diffthis -endif - - -" Issue: #11307 and #11560 - -" This is what we call " blah - - -" Issue # #9587 - -def CommentTitle() - # Title: ... -enddef diff --git a/runtime/syntax/testdir/input/vim_ex_comment_strings.vim b/runtime/syntax/testdir/input/vim_ex_comment_strings.vim new file mode 100644 index 0000000..4214d6b --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_comment_strings.vim @@ -0,0 +1,20 @@ +" Vim comment strings +" VIM_TEST_SETUP let g:vimsyn_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/runtime/syntax/testdir/input/vim_ex_no_comment_strings.vim b/runtime/syntax/testdir/input/vim_ex_no_comment_strings.vim new file mode 100644 index 0000000..d9b53b3 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_no_comment_strings.vim @@ -0,0 +1,20 @@ +" Vim comment strings +" VIM_TEST_SETUP let g:vimsyn_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 +} diff --git a/runtime/syntax/testdir/input/vim_ex_sleep.vim b/runtime/syntax/testdir/input/vim_ex_sleep.vim new file mode 100644 index 0000000..49fd31e --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_sleep.vim @@ -0,0 +1,11 @@ +" Vim :sleep command + +sleep " sleep for one second +5 sleep " sleep for five seconds +sleep 100m " sleep for 100 milliseconds +100 sleep m " sleep for 100 milliseconds + +sleep! " sleep for one second +5 sleep! " sleep for five seconds +sleep! 100m " sleep for 100 milliseconds +100 sleep! m " sleep for 100 milliseconds diff --git a/runtime/syntax/testdir/input/vim_ex_substitute.vim b/runtime/syntax/testdir/input/vim_ex_substitute.vim index 340d573..021060a 100644 --- a/runtime/syntax/testdir/input/vim_ex_substitute.vim +++ b/runtime/syntax/testdir/input/vim_ex_substitute.vim @@ -73,6 +73,64 @@ s{/{//{ " comment s}/}//} " comment s~/~//~ " comment +s !/!//! " comment +" s "/"//" " comment (works but disallowed) +s #/#//# " comment +s $/$//$ " comment +s %/%//% " comment +s &/&//& " comment +s '/'//' " comment +" FIXME - matches vimUserFunc +" s (/(//( " comment +s )/)//) " comment +s */*//* " comment +s +/+//+ " comment +s ,/,//, " comment +s -/-//- " comment +s ././/. " comment +s /X/XX/ " comment +s :/://: " comment +s ;/;//; " comment +s </<//< " comment +s =/=//= " comment +s >/>//> " comment +s ?/?//? " comment +s @/@//@ " comment +s [/[//[ " comment +" s \/\//\ " comment (disallowed) +s ]/]//] " comment +s ^/^//^ " comment +s _/_//_ " comment +s `/`//` " comment +s {/{//{ " comment +" s |/|//| " comment (disallowed) +s }/}//} " comment +s ~/~//~ " comment + +s//{string}/ +s //{string}/ + + +" Vi compatibility + +s\/{string}/ +s\?{string}? +s\&{string}& + +s \/{string}/ +s \?{string}? +s \&{string}& + + +" Trailing comment and bar + +" FIXME: trailing comment, no whitespace +s" comment +s| echo "Foo" + +s " comment +s | echo "Foo" + " Issue #13883 diff --git a/runtime/syntax/testdir/input/vim_ex_throw.vim b/runtime/syntax/testdir/input/vim_ex_throw.vim new file mode 100644 index 0000000..4adbc88 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_throw.vim @@ -0,0 +1,5 @@ +" Vim :throw command + +" :help :throw + +try | throw "oops" | catch /^oo/ | echo "caught" | endtry diff --git a/runtime/syntax/testdir/input/vim_shebang.vim b/runtime/syntax/testdir/input/vim_shebang.vim new file mode 100755 index 0000000..47a550c --- /dev/null +++ b/runtime/syntax/testdir/input/vim_shebang.vim @@ -0,0 +1,5 @@ +#!/usr/bin/env vim -S + +" Vim shebang line + +#!/usr/bin/env vim -S diff --git a/runtime/syntax/typescript.vim b/runtime/syntax/typescript.vim index 5389c21..03520fd 100644 --- a/runtime/syntax/typescript.vim +++ b/runtime/syntax/typescript.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: TypeScript " Maintainer: Herrington Darkholme -" Last Change: 2023 Aug 13 +" Last Change: 2024 May 24 " Based On: Herrington Darkholme's yats.vim " Changes: Go to https://github.com/HerringtonDarkholme/yats.vim for recent changes. " Origin: https://github.com/othree/yajs diff --git a/runtime/syntax/typescriptreact.vim b/runtime/syntax/typescriptreact.vim index 1c51045..061ec4d 100644 --- a/runtime/syntax/typescriptreact.vim +++ b/runtime/syntax/typescriptreact.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: TypeScript with React (JSX) " Maintainer: The Vim Project <https://github.com/vim/vim> -" Last Change: 2023 Aug 13 +" Last Change: 2024 May 26 " Based On: Herrington Darkholme's yats.vim " Changes: See https://github.com/HerringtonDarkholme/yats.vim " Credits: See yats.vim on github @@ -118,13 +118,14 @@ syntax match tsxEqual +=+ display contained " <tag id="sample"> " s~~~~~~e -syntax region tsxString contained start=+"+ end=+"+ contains=tsxEntity,@Spell display +syntax region tsxString contained start=+"+ skip=+\\"+ end=+"+ contains=tsxEntity,@Spell display +syntax region tsxString contained start=+'+ skip=+\\'+ end=+'+ contains=tsxEntity,@Spell display " <tag key={this.props.key}> " s~~~~~~~~~~~~~~e syntax region tsxEscJs \ contained - \ contains=@typescriptValue,@tsxComment + \ contains=@typescriptValue,@tsxComment,typescriptObjectSpread \ matchgroup=typescriptBraces \ start=+{+ \ end=+}+ diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 02d6dde..033251f 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -3,7 +3,7 @@ " Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com> " Doug Kearns <dougkearns@gmail.com> " URL: https://github.com/vim-jp/syntax-vim-ex -" Last Change: 2024 Apr 13 +" Last Change: 2024 Jun 15 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -28,12 +28,12 @@ syn cluster vimCommentGroup contains=vimTodo,@Spell " regular vim commands {{{2 " GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR='' -syn keyword vimCommand contained abo[veleft] abs[tract] al[l] ar[gs] arga[dd] argd[elete] argdo argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] bN[ext] ba[ll] bad[d] balt bd[elete] bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bo[tright] bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] bro[wse] buffers bufd[o] bun[load] bw[ipeout] c[hange] cN[ext] cNf[ile] cabo[ve] cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cal[l] cat[ch] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] cd cdo ce[nter] cex[pr] cf[ile] cfd[o] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] chd[ir] changes che[ckpath] checkt[ime] chi[story] cl[ist] cla[st] class clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] co[py] col[der] colo[rscheme] com[mand] comc[lear] -syn keyword vimCommand contained comp[iler] con[tinue] conf[irm] cons[t] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] d[elete] delm[arks] deb[ug] debugg[reedy] defc[ompile] defe[r] delc[ommand] delf[unction] di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] el[se] elsei[f] em[enu] en[dif] endin[terface] endc[lass] ende[num] endfo[r] endt[ry] endw[hile] ene[w] enu[m] ev[al] ex exi[t] exp[ort] exu[sage] f[ile] files filet[ype] filt[er] fin[d] fina[l] finall[y] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] foldo[pen] for g[lobal] go[to] gr[ep] grepa[dd] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] -syn keyword vimCommand contained helpg[rep] helpt[ags] ha[rdcopy] hi[ghlight] hid[e] his[tory] ho[rizontal] if ij[ump] il[ist] imp[ort] int[ro] inte[rface] is[earch] isp[lit] j[oin] ju[mps] k kee[pmarks] keepj[umps] keepp[atterns] keepa[lt] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] lbel[ow] lbo[ttom] lc[d] lch[dir] lcl[ose] lcs[cope] ld[o] le[ft] lefta[bove] let lex[pr] leg[acy] lf[ile] lfd[o] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lgr[ep] lgrepa[dd] lh[elpgrep] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] loadk[eymap] loc[kmarks] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lua luad[o] luaf[ile] lv[imgrep] lvimgrepa[dd] lw[indow] -syn keyword vimCommand contained ls m[ove] ma[rk] mak[e] marks mat[ch] menut[ranslate] mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] mz[scheme] mzf[ile] n[ext] nb[key] nbc[lose] nbs[tart] noa[utocmd] noh[lsearch] nos[wapfile] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pc[lose] pe[rl] perld[o] ped[it] po[p] pp[op] pre[serve] prev[ious] pro[mptfind] promptr[epl] prof[ile] profd[el] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pub[lic] pw[d] py[thon] pyd[o] pyf[ile] py3 py3d[o] python3 py3f[ile] pyx pyxd[o] pythonx pyxf[ile] q[uit] quita[ll] qa[ll] r[ead] rec[over] red[o] redi[r] redr[aw] redraws[tatus] redrawt[abline] reg[isters] res[ize] -syn keyword vimCommand contained ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] ru[ntime] rub[y] rubyd[o] rubyf[ile] rund[o] rv[iminfo] sN[ext] sa[rgument] sal[l] san[dbox] sav[eas] sb[uffer] sbN[ext] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] sc[riptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] si[malt] sig[n] sil[ent] sl[eep] sla[st] sn[ext] so[urce] sor[t] sp[lit] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sr[ewind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stat[ic] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] sw[apname] synti[me] sync[bind] smi[le] t tN[ext] ta[g] tags tab tabc[lose] tabd[o] tabe[dit] -syn keyword vimCommand contained tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] tcl tcld[o] tclf[ile] te[aroff] ter[minal] tf[irst] th[row] thi[s] tj[ump] tl[ast] tn[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] ty[pe] u[ndo] undoj[oin] undol[ist] unh[ide] unl[et] unlo[ckvar] uns[ilent] up[date] v[global] ve[rsion] verb[ose] vert[ical] vi[sual] vie[w] vim[grep] vimgrepa[dd] vim9[cmd] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wh[ile] wi[nsize] winc[md] wind[o] winp[os] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i +syn keyword vimCommand contained abo[veleft] abs[tract] al[l] ar[gs] arga[dd] argd[elete] argdo argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] bN[ext] ba[ll] bad[d] balt bd[elete] bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bo[tright] bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] bro[wse] buffers bufd[o] bun[load] bw[ipeout] c[hange] cN[ext] cNf[ile] cabo[ve] cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cal[l] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] cd cdo ce[nter] cex[pr] cf[ile] cfd[o] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] chd[ir] changes che[ckpath] checkt[ime] chi[story] cl[ist] cla[st] class clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] co[py] col[der] colo[rscheme] com[mand] comc[lear] comp[iler] +syn keyword vimCommand contained con[tinue] conf[irm] cons[t] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] d[elete] delm[arks] deb[ug] debugg[reedy] defc[ompile] defe[r] delc[ommand] delf[unction] di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] el[se] elsei[f] em[enu] en[dif] endin[terface] endc[lass] ende[num] endfo[r] endt[ry] endw[hile] ene[w] enu[m] ev[al] ex exi[t] exp[ort] exu[sage] f[ile] files filet[ype] filt[er] fin[d] fina[l] finall[y] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] foldo[pen] for g[lobal] go[to] gr[ep] grepa[dd] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpg[rep] +syn keyword vimCommand contained helpt[ags] ha[rdcopy] hi[ghlight] hid[e] his[tory] ho[rizontal] if ij[ump] il[ist] imp[ort] int[ro] inte[rface] is[earch] isp[lit] j[oin] ju[mps] k kee[pmarks] keepj[umps] keepp[atterns] keepa[lt] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] lbel[ow] lbo[ttom] lc[d] lch[dir] lcl[ose] lcs[cope] ld[o] le[ft] lefta[bove] let lex[pr] leg[acy] lf[ile] lfd[o] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lgr[ep] lgrepa[dd] lh[elpgrep] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] loadk[eymap] loc[kmarks] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lua luad[o] luaf[ile] lv[imgrep] lvimgrepa[dd] lw[indow] ls m[ove] +syn keyword vimCommand contained ma[rk] mak[e] marks mat[ch] menut[ranslate] mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] mz[scheme] mzf[ile] n[ext] nb[key] nbc[lose] nbs[tart] noa[utocmd] noh[lsearch] nos[wapfile] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pc[lose] pe[rl] perld[o] ped[it] po[p] pp[op] pre[serve] prev[ious] pro[mptfind] promptr[epl] prof[ile] profd[el] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pub[lic] pw[d] py[thon] pyd[o] pyf[ile] py3 py3d[o] python3 py3f[ile] pyx pyxd[o] pythonx pyxf[ile] q[uit] quita[ll] qa[ll] r[ead] rec[over] red[o] redi[r] redr[aw] redraws[tatus] redrawt[abline] reg[isters] res[ize] ret[ab] retu[rn] +syn keyword vimCommand contained rew[ind] ri[ght] rightb[elow] ru[ntime] rub[y] rubyd[o] rubyf[ile] rund[o] rv[iminfo] sN[ext] sa[rgument] sal[l] san[dbox] sav[eas] sb[uffer] sbN[ext] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] sc[riptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] si[malt] sig[n] sil[ent] sla[st] sn[ext] so[urce] sor[t] sp[lit] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sr[ewind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stat[ic] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] sw[apname] synti[me] sync[bind] smi[le] t tN[ext] ta[g] tags tab tabc[lose] tabd[o] tabe[dit] tabf[ind] tabfir[st] +syn keyword vimCommand contained tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] tcl tcld[o] tclf[ile] te[aroff] ter[minal] tf[irst] thi[s] tj[ump] tl[ast] tn[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] ty[pe] u[ndo] undoj[oin] undol[ist] unh[ide] unl[et] unlo[ckvar] uns[ilent] up[date] v[global] ve[rsion] verb[ose] vert[ical] vi[sual] vie[w] vim[grep] vimgrepa[dd] vim9[cmd] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wh[ile] wi[nsize] winc[md] wind[o] winp[os] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i syn keyword vimCommand contained 2mat[ch] 3mat[ch] @@ -69,7 +69,7 @@ syn keyword vimOption contained invtf invttyfast invudf invundofile invvb invvis " termcap codes (which can also be set) {{{2 " GEN_SYN_VIM: vimOption term output code, START_STR='syn keyword vimOption contained', END_STR='' -syn keyword vimOption contained t_AB t_AF t_AU t_AL t_al t_bc t_BE t_BD t_cd t_ce t_Ce t_CF t_cl t_cm t_Co t_CS t_Cs t_cs t_CV t_da t_db t_DL t_dl t_ds t_Ds t_EC t_EI t_fs t_fd t_fe t_GP t_IE t_IS t_ke t_ks t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RF t_RB t_RC t_RI t_Ri t_RK t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_SI t_Si t_so t_SR t_sr t_ST t_Te t_te t_TE t_ti t_TI t_Ts t_ts t_u7 t_ue t_us t_Us t_ut t_vb t_ve t_vi t_VS t_vs t_WP t_WS t_XM t_xn t_xs t_ZH t_ZR t_8f t_8b t_8u +syn keyword vimOption contained t_AB t_AF t_AU t_AL t_al t_bc t_BE t_BD t_cd t_ce t_Ce t_CF t_cl t_cm t_Co t_CS t_Cs t_cs t_CV t_da t_db t_DL t_dl t_ds t_Ds t_EC t_EI t_fs t_fd t_fe t_GP t_IE t_IS t_ke t_ks t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RF t_RB t_RC t_RI t_Ri t_RK t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_SI t_Si t_so t_SR t_sr t_ST t_Te t_te t_TE t_ti t_TI t_Ts t_ts t_u7 t_ue t_us t_Us t_ut t_vb t_ve t_vi t_VS t_vs t_WP t_WS t_XM t_xn t_xs t_ZH t_ZR t_8f t_8b t_8u t_xo " term key codes syn keyword vimOption contained t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ku syn match vimOption contained "t_%1" @@ -98,19 +98,21 @@ syn keyword vimGroup contained Comment Constant String Character Number Boolean " Default highlighting groups {{{2 " GEN_SYN_VIM: vimHLGroup, START_STR='syn keyword vimHLGroup contained', END_STR='' -syn keyword vimHLGroup contained ErrorMsg IncSearch ModeMsg NonText StatusLine StatusLineNC EndOfBuffer VertSplit VisualNOS DiffText PmenuSbar TabLineSel TabLineFill Cursor lCursor QuickFixLine CursorLineSign CursorLineFold CurSearch PmenuKind PmenuKindSel PmenuExtra PmenuExtraSel Normal Directory LineNr CursorLineNr MoreMsg Question Search SpellBad SpellCap SpellRare SpellLocal PmenuThumb Pmenu PmenuSel SpecialKey Title WarningMsg WildMenu Folded FoldColumn SignColumn Visual DiffAdd DiffChange DiffDelete TabLine CursorColumn CursorLine ColorColumn Conceal MatchParen StatusLineTerm StatusLineTermNC ToolbarLine ToolbarButton Menu Tooltip Scrollbar CursorIM LineNrAbove LineNrBelow +syn keyword vimHLGroup contained ErrorMsg IncSearch ModeMsg NonText StatusLine StatusLineNC EndOfBuffer VertSplit VisualNOS DiffText PmenuSbar TabLineSel TabLineFill Cursor lCursor QuickFixLine CursorLineSign CursorLineFold CurSearch PmenuKind PmenuKindSel PmenuMatch PmenuMatchSel PmenuExtra PmenuExtraSel Normal Directory LineNr CursorLineNr MoreMsg Question Search SpellBad SpellCap SpellRare SpellLocal PmenuThumb Pmenu PmenuSel SpecialKey Title WarningMsg WildMenu Folded FoldColumn SignColumn Visual DiffAdd DiffChange DiffDelete TabLine CursorColumn CursorLine ColorColumn MatchParen StatusLineTerm StatusLineTermNC ToolbarLine ToolbarButton Menu Tooltip Scrollbar CursorIM LineNrAbove LineNrBelow +syn match vimHLGroup contained "\<Conceal\>" syn case match " Function Names {{{2 " GEN_SYN_VIM: vimFuncName, START_STR='syn keyword vimFuncName contained', END_STR='' syn keyword vimFuncName contained abs acos add and append appendbufline argc argidx arglistid argv asin assert_beeps assert_equal assert_equalfile assert_exception assert_fails assert_false assert_inrange assert_match assert_nobeep assert_notequal assert_notmatch assert_report assert_true atan atan2 autocmd_add autocmd_delete autocmd_get balloon_gettext balloon_show balloon_split blob2list browse browsedir bufadd bufexists buflisted bufload bufloaded bufname bufnr bufwinid bufwinnr byte2line byteidx byteidxcomp call ceil ch_canread ch_close ch_close_in ch_evalexpr ch_evalraw ch_getbufnr ch_getjob ch_info ch_log ch_logfile ch_open ch_read ch_readblob ch_readraw ch_sendexpr ch_sendraw ch_setoptions ch_status changenr char2nr charclass charcol charidx chdir cindent -syn keyword vimFuncName contained clearmatches col complete complete_add complete_check complete_info confirm copy cos cosh count cscope_connection cursor debugbreak deepcopy delete deletebufline did_filetype diff diff_filler diff_hlID digraph_get digraph_getlist digraph_set digraph_setlist echoraw empty environ err_teapot escape eval eventhandler executable execute exepath exists exists_compiled exp expand expandcmd extend extendnew feedkeys filereadable filewritable filter finddir findfile flatten flattennew float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreach foreground fullcommand funcref function garbagecollect get getbufinfo getbufline getbufoneline getbufvar getcellwidths getchangelist getchar getcharmod -syn keyword vimFuncName contained getcharpos getcharsearch getcharstr getcmdcompltype getcmdline getcmdpos getcmdscreenpos getcmdtype getcmdwintype getcompletion getcurpos getcursorcharpos getcwd getenv getfontname getfperm getfsize getftime getftype getimstatus getjumplist getline getloclist getmarklist getmatches getmousepos getmouseshape getpid getpos getqflist getreg getreginfo getregion getregtype getscriptinfo gettabinfo gettabvar gettabwinvar gettagstack gettext getwininfo getwinpos getwinposx getwinposy getwinvar glob glob2regpat globpath has has_key haslocaldir hasmapto histadd histdel histget histnr hlID hlexists hlget hlset hostname iconv indent index indexof input inputdialog inputlist inputrestore inputsave inputsecret insert instanceof interrupt -syn keyword vimFuncName contained invert isabsolutepath isdirectory isinf islocked isnan items job_getchannel job_info job_setoptions job_start job_status job_stop join js_decode js_encode json_decode json_encode keys keytrans len libcall libcallnr line line2byte lispindent list2blob list2str listener_add listener_flush listener_remove localtime log log10 luaeval map maparg mapcheck maplist mapnew mapset match matchadd matchaddpos matcharg matchbufline matchdelete matchend matchfuzzy matchfuzzypos matchlist matchstr matchstrlist matchstrpos max menu_info min mkdir mode mzeval nextnonblank nr2char or pathshorten perleval popup_atcursor popup_beval popup_clear popup_close popup_create popup_dialog popup_filter_menu popup_filter_yesno popup_findecho popup_findinfo -syn keyword vimFuncName contained popup_findpreview popup_getoptions popup_getpos popup_hide popup_list popup_locate popup_menu popup_move popup_notification popup_setoptions popup_settext popup_show pow prevnonblank printf prompt_getprompt prompt_setcallback prompt_setinterrupt prompt_setprompt prop_add prop_add_list prop_clear prop_find prop_list prop_remove prop_type_add prop_type_change prop_type_delete prop_type_get prop_type_list pum_getpos pumvisible py3eval pyeval pyxeval rand range readblob readdir readdirex readfile reduce reg_executing reg_recording reltime reltimefloat reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remote_startserver remove rename repeat resolve reverse round rubyeval screenattr screenchar screenchars -syn keyword vimFuncName contained screencol screenpos screenrow screenstring search searchcount searchdecl searchpair searchpairpos searchpos server2client serverlist setbufline setbufvar setcellwidths setcharpos setcharsearch setcmdline setcmdpos setcursorcharpos setenv setfperm setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar settagstack setwinvar sha256 shellescape shiftwidth sign_define sign_getdefined sign_getplaced sign_jump sign_place sign_placelist sign_undefine sign_unplace sign_unplacelist simplify sin sinh slice sort sound_clear sound_playevent sound_playfile sound_stop soundfold spellbadword spellsuggest split sqrt srand state str2float str2list str2nr strcharlen strcharpart strchars strdisplaywidth strftime strgetchar stridx -syn keyword vimFuncName contained string strlen strpart strptime strridx strtrans strutf16len strwidth submatch substitute swapfilelist swapinfo swapname synID synIDattr synIDtrans synconcealed synstack system systemlist tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname term_dumpdiff term_dumpload term_dumpwrite term_getaltscreen term_getansicolors term_getattr term_getcursor term_getjob term_getline term_getscrolled term_getsize term_getstatus term_gettitle term_gettty term_list term_scrape term_sendkeys term_setansicolors term_setapi term_setkill term_setrestore term_setsize term_start term_wait terminalprops test_alloc_fail test_autochdir test_feedinput test_garbagecollect_now test_garbagecollect_soon test_getvalue test_gui_event test_ignore_error -syn keyword vimFuncName contained test_mswin_event test_null_blob test_null_channel test_null_dict test_null_function test_null_job test_null_list test_null_partial test_null_string test_option_not_set test_override test_refcount test_setmouse test_settime test_srand_seed test_unknown test_void timer_info timer_pause timer_start timer_stop timer_stopall tolower toupper tr trim trunc type typename undofile undotree uniq utf16idx values virtcol virtcol2col visualmode wildmenumode win_execute win_findbuf win_getid win_gettype win_gotoid win_id2tabwin win_id2win win_move_separator win_move_statusline win_screenpos win_splitmove winbufnr wincol windowsversion winheight winlayout winline winnr winrestcmd winrestview winsaveview winwidth wordcount writefile xor +syn keyword vimFuncName contained clearmatches col complete complete_add complete_check complete_info confirm copy cos cosh count cscope_connection cursor debugbreak deepcopy delete deletebufline did_filetype diff diff_filler diff_hlID digraph_get digraph_getlist digraph_set digraph_setlist echoraw empty environ err_teapot escape eval eventhandler executable execute exepath exists exists_compiled exp expand expandcmd extend extendnew feedkeys filecopy filereadable filewritable filter finddir findfile flatten flattennew float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreach foreground fullcommand funcref function garbagecollect get getbufinfo getbufline getbufoneline getbufvar getcellwidths getchangelist getchar +syn keyword vimFuncName contained getcharmod getcharpos getcharsearch getcharstr getcmdcompltype getcmdline getcmdpos getcmdscreenpos getcmdtype getcmdwintype getcompletion getcurpos getcursorcharpos getcwd getenv getfontname getfperm getfsize getftime getftype getimstatus getjumplist getline getloclist getmarklist getmatches getmousepos getmouseshape getpid getpos getqflist getreg getreginfo getregion getregionpos getregtype getscriptinfo gettabinfo gettabvar gettabwinvar gettagstack gettext getwininfo getwinpos getwinposx getwinposy getwinvar glob glob2regpat globpath has has_key haslocaldir hasmapto histadd histdel histget histnr hlID hlexists hlget hlset hostname iconv indent index indexof input inputdialog inputlist inputrestore inputsave inputsecret insert +syn keyword vimFuncName contained instanceof interrupt invert isabsolutepath isdirectory isinf islocked isnan items job_getchannel job_info job_setoptions job_start job_status job_stop join js_decode js_encode json_decode json_encode keys keytrans len libcall libcallnr line line2byte lispindent list2blob list2str listener_add listener_flush listener_remove localtime log log10 luaeval map maparg mapcheck maplist mapnew mapset match matchadd matchaddpos matcharg matchbufline matchdelete matchend matchfuzzy matchfuzzypos matchlist matchstr matchstrlist matchstrpos max menu_info min mkdir mode mzeval nextnonblank nr2char or pathshorten perleval popup_atcursor popup_beval popup_clear popup_close popup_create popup_dialog popup_filter_menu popup_filter_yesno popup_findecho +syn keyword vimFuncName contained popup_findinfo popup_findpreview popup_getoptions popup_getpos popup_hide popup_list popup_locate popup_menu popup_move popup_notification popup_setoptions popup_settext popup_show pow prevnonblank printf prompt_getprompt prompt_setcallback prompt_setinterrupt prompt_setprompt prop_add prop_add_list prop_clear prop_find prop_list prop_remove prop_type_add prop_type_change prop_type_delete prop_type_get prop_type_list pum_getpos pumvisible py3eval pyeval pyxeval rand range readblob readdir readdirex readfile reduce reg_executing reg_recording reltime reltimefloat reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remote_startserver remove rename repeat resolve reverse round rubyeval screenattr screenchar +syn keyword vimFuncName contained screenchars screencol screenpos screenrow screenstring search searchcount searchdecl searchpair searchpairpos searchpos server2client serverlist setbufline setbufvar setcellwidths setcharpos setcharsearch setcmdline setcmdpos setcursorcharpos setenv setfperm setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar settagstack setwinvar sha256 shellescape shiftwidth sign_define sign_getdefined sign_getplaced sign_jump sign_place sign_placelist sign_undefine sign_unplace sign_unplacelist simplify sin sinh slice sort sound_clear sound_playevent sound_playfile sound_stop soundfold spellbadword spellsuggest split sqrt srand state str2float str2list str2nr strcharlen strcharpart strchars strdisplaywidth strftime +syn keyword vimFuncName contained strgetchar stridx string strlen strpart strptime strridx strtrans strutf16len strwidth submatch substitute swapfilelist swapinfo swapname synID synIDattr synIDtrans synconcealed synstack system systemlist tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname term_dumpdiff term_dumpload term_dumpwrite term_getaltscreen term_getansicolors term_getattr term_getcursor term_getjob term_getline term_getscrolled term_getsize term_getstatus term_gettitle term_gettty term_list term_scrape term_sendkeys term_setansicolors term_setapi term_setkill term_setrestore term_setsize term_start term_wait terminalprops test_alloc_fail test_autochdir test_feedinput test_garbagecollect_now test_garbagecollect_soon test_getvalue test_gui_event +syn keyword vimFuncName contained test_ignore_error test_mswin_event test_null_blob test_null_channel test_null_dict test_null_function test_null_job test_null_list test_null_partial test_null_string test_option_not_set test_override test_refcount test_setmouse test_settime test_srand_seed test_unknown test_void timer_info timer_pause timer_start timer_stop timer_stopall tolower toupper tr trim trunc type typename undofile undotree uniq utf16idx values virtcol virtcol2col visualmode wildmenumode win_execute win_findbuf win_getid win_gettype win_gotoid win_id2tabwin win_id2win win_move_separator win_move_statusline win_screenpos win_splitmove winbufnr wincol windowsversion winheight winlayout winline winnr winrestcmd winrestview winsaveview winwidth wordcount writefile +syn keyword vimFuncName contained xor "--- syntax here and above generated by mkvimvim --- " Special Vim Highlighting (not automatic) {{{1 @@ -211,7 +213,7 @@ syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSub syn case match " All vimCommands are contained by vimIsCommand. {{{2 -syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimDef,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNotFunc,vimNorm,vimSet,vimSyntax,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate +syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCatch,vimDef,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNotFunc,vimNorm,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate syn match vimCmdSep "[:|]\+" skipwhite nextgroup=@vimCmdList,vimSubst1 syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" contains=vimCommand syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" @@ -242,6 +244,11 @@ syn match vimBehave "\<be\%[have]\>" nextgroup=vimBehaveBang,vimBehaveModel,vi syn match vimBehaveBang contained "\a\@1<=!" nextgroup=vimBehaveModel skipwhite syn keyword vimBehaveModel contained mswin xterm +" Exception Handling {{{2 +syn keyword vimThrow th[row] skipwhite nextgroup=@vimExprList +syn keyword vimCatch cat[ch] skipwhite nextgroup=vimCatchPattern +syn region vimCatchPattern contained matchgroup=Delimiter start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSubstList oneline + " Filetypes {{{2 " ========= syn match vimFiletype "\<filet\%[ype]\(\s\+\I\i*\)*" skipwhite contains=vimFTCmd,vimFTOption,vimFTError @@ -406,7 +413,9 @@ syn region vimUserCmdBlock contained matchgroup=vimSep start="{" end="}" contain " Lower Priority Comments: after some vim commands... {{{2 " ======================= -syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"' +if get(g:, "vimsyn_comment_strings", 1) + syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"' +endif if s:vim9script syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString contained @@ -475,12 +484,10 @@ syn match vimStringInterpolationBrace contained "}}" syn cluster vimSubstList contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation syn cluster vimSubstRepList contains=vimSubstSubstr,vimSubstTwoBS,vimNotation syn cluster vimSubstList add=vimCollection -syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)\>[\"#|]\@!" nextgroup=vimSubstPat -syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)_\@=" nextgroup=vimSubstPat -syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)\ze#.\{-}#.\{-}#" nextgroup=vimSubstPat -syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)\>[\"#|]\@!" nextgroup=vimSubstPat -syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)_\@=" nextgroup=vimSubstPat -syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)\ze#.\{-}#.\{-}#" nextgroup=vimSubstPat +syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)\>" skipwhite nextgroup=vimSubstPat +syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)[_#]\@=" skipwhite nextgroup=vimSubstPat +syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)\>" skipwhite nextgroup=vimSubstPat +syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)[_#]\@=" skipwhite nextgroup=vimSubstPat " TODO: Vim9 illegal separators for abbreviated :s form are [-.:], :su\%[...] required " : # is allowed but "not recommended" (see :h pattern-delimiter) syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)"rs=s+1 skip="\\\\\|\\\z1" end="\z1"re=e-1,me=e-1 contains=@vimSubstList nextgroup=vimSubstRep4 oneline @@ -493,6 +500,10 @@ syn match vimSubstTwoBS contained "\\\\" syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags syn match vimSubstFlags contained "[&cegiIlnpr#]\+" +" Vi compatibility +syn match vimSubstDelim contained "\\" +syn match vimSubstPat contained "\\\ze[/?&]" contains=vimSubstDelim nextgroup=vimSubstRep4 + " 'String': {{{2 syn match vimString "[^(,]'[^']\{-}\zs'" @@ -688,6 +699,12 @@ syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<retu\%[rn]\>\|\<while\>" skipwhi syn match vimNorm "\<norm\%[al]!\=" skipwhite nextgroup=vimNormCmds syn match vimNormCmds contained ".*$" +" Sleep: {{{2 +" ===== +syn keyword vimSleep sl[eep] skipwhite nextgroup=vimSleepBang,vimSleepArg +syn match vimSleepBang contained "\a\@1<=!" skipwhite nextgroup=vimSleepArg +syn match vimSleepArg contained "\<\%(\d\+\)\=m\=\>" + " Syntax: {{{2 "======= syn match vimGroupList contained "[^[:space:],]\+\%(\s*,\s*[^[:space:],]\+\)*" contains=vimGroupSpecial @@ -853,16 +870,23 @@ syn match vimCtrlChar "[- -]" " Beginners - Patterns that involve ^ {{{2 " ========= if s:vim9script - syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle contained - syn match vim9LineComment +^[ \t:]*#.*$+ contains=@vimCommentGroup,vimCommentString,vim9CommentTitle + syn region vim9LineComment start=+^[ \t:]*\zs#.*$+ skip=+\n\s*\\\|\n\s*#\\ + end="$" contains=@vimCommentGroup,vimCommentString,vim9CommentTitle + syn region vimLineComment start=+^[ \t:]*\zs".*$+ skip=+\n\s*\\\|\n\s*"\\ + end="$" contains=@vimCommentGroup,vimCommentString,vimCommentTitle contained else - syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle - syn match vim9LineComment +^[ \t:]*#.*$+ contains=@vimCommentGroup,vimCommentString,vim9CommentTitle contained + syn region vimLineComment start=+^[ \t:]*\zs".*$+ skip=+\n\s*\\\|\n\s*"\\ + end="$" contains=@vimCommentGroup,vimCommentString,vimCommentTitle + syn region vim9LineComment start=+^[ \t:]*\zs#.*$+ skip=+\n\s*\\\|\n\s*#\\ + end="$" contains=@vimCommentGroup,vimCommentString,vim9CommentTitle contained endif syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup syn match vim9CommentTitle '#\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vim9CommentTitleLeader,vimTodo,@vimCommentGroup + +" allowed anywhere in the file +if !s:vim9script + syn match vimShebangError "^\s*\zs#!.*" display +endif +syn match vimShebang "\%^#!.*" display + syn match vimContinue "^\s*\zs\\" -syn match vimContinueComment '^\s*\zs["#]\\ .*' contained +syn match vimContinueComment '^\s*\zs["#]\\ .*' syn cluster vimContinue contains=vimContinue,vimContinueComment syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained @@ -1087,6 +1111,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimHiCtermError vimError hi def link vimHiKeyError vimError hi def link vimMapModErr vimError + hi def link vimShebangError vimError hi def link vimSubstFlagErr vimError hi def link vimSynCaseError vimError hi def link vimSynFoldMethodError vimError @@ -1107,6 +1132,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimBehaveModel vimBehave hi def link vimBehave vimCommand hi def link vimBracket Delimiter + hi def link vimCatch vimCommand hi def link vimCmplxRepeat SpecialChar hi def link vimCommand Statement hi def link vimComment Comment @@ -1224,6 +1250,10 @@ if !exists("skip_vim_syntax_inits") hi def link vimSetSep Statement hi def link vimSetString vimString hi def link vim9Vim9Script vimCommand + hi def link vimShebang PreProc + hi def link vimSleep vimCommand + hi def link vimSleepArg Constant + hi def link vimSleepBang vimBang hi def link vimSpecFile Identifier hi def link vimSpecFileMod vimSpecFile hi def link vimSpecial Type @@ -1264,6 +1294,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimSynReg Type hi def link vimSyntax vimCommand hi def link vimSynType vimSpecial + hi def link vimThrow vimCommand hi def link vimTodo Todo hi def link vimType Type hi def link vimUnlet vimCommand -- cgit v1.2.3