]> granicus.if.org Git - vim/commitdiff
Update runtime files.
authorBram Moolenaar <Bram@vim.org>
Sat, 13 Mar 2021 12:28:13 +0000 (13:28 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 13 Mar 2021 12:28:13 +0000 (13:28 +0100)
16 files changed:
runtime/doc/change.txt
runtime/doc/eval.txt
runtime/doc/filetype.txt
runtime/doc/repeat.txt
runtime/doc/sign.txt
runtime/doc/syntax.txt
runtime/doc/tags
runtime/doc/testing.txt
runtime/doc/todo.txt
runtime/doc/various.txt
runtime/doc/vim9.txt
runtime/filetype.vim
runtime/ftplugin/poke.vim [new file with mode: 0644]
runtime/syntax/html.vim
runtime/syntax/poke.vim [new file with mode: 0644]
src/INSTALL

index 7db3ffc41fff5bb62fabfbe82e67174033fa9360..d0b50ca9a51a2ee6c7a056776c7521697f495873 100644 (file)
@@ -1,4 +1,4 @@
-*change.txt*    For Vim version 8.2.  Last change: 2021 Jan 21
+*change.txt*    For Vim version 8.2.  Last change: 2021 Mar 01
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -649,6 +649,8 @@ For other systems the tmpnam() library function is used.
                        The space between `:substitute` and the 'c', 'g',
                        'i', 'I' and 'r' flags isn't required, but in scripts
                        it's a good idea to keep it to avoid confusion.
+                       Also see the two and three letter commands to repeat
+                       :substitute below |:substitute-repeat|.
 
 :[range]~[&][flags] [count]                                    *:~*
                        Repeat last substitute with same substitute string
@@ -877,20 +879,26 @@ either the first or second pattern in parentheses did not match, so either
                *:sge* *:sgi* *:sgI* *:sgl* *:sgn* *:sgp* *:sgr* *:sI* *:si*
                *:sic* *:sIc* *:sie* *:sIe* *:sIg* *:sIl* *:sin* *:sIn* *:sIp*
                *:sip* *:sIr* *:sir* *:sr* *:src* *:srg* *:sri* *:srI* *:srl*
-               *:srn* *:srp*
+               *:srn* *:srp* *:substitute-repeat*
 2-letter and 3-letter :substitute commands ~
 
+These commands repeat the previous `:substitute` command with the given flags.
+The first letter is always "s", followed by one or two of the possible flag
+characters.  For example `:sce` works like `:s///ce`.  The table lists the
+possible combinations, not all flags are possible, because the command is
+short for another command.
+
      List of :substitute commands
      |      c    e    g    i    I    n    p    l    r
-     | c  :sc  :sce :scg :sci :scI :scn :scp :scl  ---
+     | c  :sc  :sce :scg :sci :scI :scn :scp :scl
      | e
      | g  :sgc :sge :sg  :sgi :sgI :sgn :sgp :sgl :sgr
-     | i  :sic :sie  --- :si  :siI :sin :sip  --- :sir
+     | i  :sic :sie      :si  :siI :sin :sip      :sir
      | I  :sIc :sIe :sIg :sIi :sI  :sIn :sIp :sIl :sIr
      | n
      | p
      | l
-     | r  :src  --- :srg :sri :srI :srn :srp :srl :sr
+     | r  :src      :srg :sri :srI :srn :srp :srl :sr
 
 Exceptions:
      :scr  is  `:scriptnames`
index 03fcb655d5a5778eaadb3676f47c63587a63e442..92f020689e71236a38a1d96999d97b6b49117b13 100644 (file)
@@ -1,4 +1,4 @@
-*eval.txt*     For Vim version 8.2.  Last change: 2021 Feb 10
+*eval.txt*     For Vim version 8.2.  Last change: 2021 Mar 10
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -5300,6 +5300,9 @@ getcharpos({expr})
                Get the position for {expr}. Same as |getpos()| but the column
                number in the returned List is a character index instead of
                a byte index.
+               If |getpos()| returns a very large column number, such as
+               2147483647, then getcharpos() will return the character index
+               of the last character.
 
                Example:
                With the cursor on '세' in line 5 with text "여보세요": >
@@ -5779,6 +5782,8 @@ getpos({expr})    Get the position for {expr}.  For possible values of {expr}
                The column number in the returned List is the byte position
                within the line. To get the character position in the line,
                use |getcharpos()|
+               The column number can be very large, e.g. 2147483647, in which
+               case it means "after the end of the line".
                This can be used to save and restore the position of a mark: >
                        let save_a_mark = getpos("'a")
                        ...
@@ -7450,7 +7455,8 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
                to be used when fast match additions and deletions are
                required, for example to highlight matching parentheses.
 
-               The list {pos} can contain one of these items:
+               {pos} is a list of positions.  Each position can be one of
+               these:
                - A number.  This whole line will be highlighted.  The first
                  line has number 1.
                - A list with one number, e.g., [23]. The whole line with this
@@ -7463,7 +7469,7 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
                - A list with three numbers, e.g., [23, 11, 3]. As above, but
                  the third number gives the length of the highlight in bytes.
 
-               The maximum number of positions is 8.
+               The maximum number of positions in {pos} is 8.
 
                Example: >
                        :highlight MyGroup ctermbg=green guibg=green
@@ -7472,8 +7478,7 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
                        :call matchdelete(m)
 
 <              Matches added by |matchaddpos()| are returned by
-               |getmatches()| with an entry "pos1", "pos2", etc., with the
-               value a list like the {pos} item.
+               |getmatches()|.
 
                Can also be used as a |method|: >
                        GetGroup()->matchaddpos([23, 11])
@@ -10273,7 +10278,8 @@ str2nr({expr} [, {base} [, {quoted}]])                          *str2nr()*
 
 strcharpart({src}, {start} [, {len}])                  *strcharpart()*
                Like |strpart()| but using character index and length instead
-               of byte index and length.
+               of byte index and length.  Composing characters are counted
+               separately.
                When a character index is used where a character does not
                exist it is assumed to be one character.  For example: >
                        strcharpart('abc', -1, 2)
@@ -13142,7 +13148,7 @@ text...
                        Cannot be followed by a comment.
                        Examples: >
                :execute "buffer" nextbuf
-               :execute "normal" count . "w"
+               :execute "normal" count .. "w"
 <
                        ":execute" can be used to append a command to commands
                        that don't accept a '|'.  Example: >
@@ -13158,8 +13164,8 @@ text...
                        file names.  The |fnameescape()| function can be used
                        for Vim commands, |shellescape()| for |:!| commands.
                        Examples: >
-               :execute "e " . fnameescape(filename)
-               :execute "!ls " . shellescape(filename, 1)
+               :execute "e " .. fnameescape(filename)
+               :execute "!ls " .. shellescape(filename, 1)
 <
                        Note: The executed string may be any command-line, but
                        starting or ending "if", "while" and "for" does not
index 6a23b2fdb840d2523919a83f0a931fbccfdb9c6a..318507c16be524879981bcd356dc210a82ebc331 100644 (file)
@@ -1,4 +1,4 @@
-*filetype.txt*  For Vim version 8.2.  Last change: 2021 Jan 21
+*filetype.txt*  For Vim version 8.2.  Last change: 2021 Mar 11
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -628,6 +628,13 @@ For fish, add to the config file
 
        set -x MANPAGER "vim -M +MANPAGER -"
 
+
+MARKDOWN                                                *ft-markdown-plugin*
+
+To enable folding use this: >
+        let g:markdown_folding = 1
+<
+
 PDF                                                    *ft-pdf-plugin*
 
 Two maps, <C-]> and <C-T>, are provided to simulate a tag stack for navigating
index aa00dd3b54521deb1104e607b747dd00e646df5f..71b4e10de4619e4d9b1f0c578953eb0f3a0f5786 100644 (file)
@@ -677,9 +677,9 @@ Your directory layout would be like this:
    opt/fooextra/doc/tags               " help tags
 
 This allows for the user to do: >
-       mkdir ~/.vim/pack/myfoobar
-       cd ~/.vim/pack/myfoobar
-       git clone https://github.com/you/foobar.git
+       mkdir ~/.vim/pack
+       cd ~/.vim/pack
+       git clone https://github.com/you/foobar.git myfoobar
 
 Here "myfoobar" is a name that the user can choose, the only condition is that
 it differs from other packages.
index 9c52587f42cc68e16e530714c9cdc3d0b1d4ef80..66f8cc61bda9cf4ecedd533b27b066e46f0b7789 100644 (file)
@@ -1,4 +1,4 @@
-*sign.txt*      For Vim version 8.2.  Last change: 2020 Oct 28
+*sign.txt*      For Vim version 8.2.  Last change: 2021 Mar 07
 
 
                  VIM REFERENCE MANUAL    by Gordon Prieur
@@ -146,6 +146,9 @@ See |sign_define()| for the equivalent Vim script function.
        texthl={group}
                Highlighting group used for the text item.
 
+       Example: >
+               :sign define MySign text=>> texthl=Search linehl=DiffText
+<
 
 DELETING A SIGN                                                *:sign-undefine* *E155*
 
@@ -155,7 +158,9 @@ See |sign_undefine()| for the equivalent Vim script function.
                Deletes a previously defined sign.  If signs with this {name}
                are still placed this will cause trouble.
 
-
+               Example: >
+                       :sign undefine MySign
+<
 
 LISTING SIGNS                                          *:sign-list* *E156*
 
@@ -209,6 +214,10 @@ See |sign_place()| for the equivalent Vim script function.
                Same, but use buffer {nr}.  If the buffer argument is not
                given, place the sign in the current buffer.
 
+               Example: >
+                       :sign place 10 line=99 name=sign3
+                       :sign place 10 line=99 name=sign3 buffer=3
+<
                                                        *E885*
 :sign place {id} name={name} file={fname}
                Change the placed sign {id} in file {fname} to use the defined
@@ -221,10 +230,17 @@ See |sign_place()| for the equivalent Vim script function.
                "priority={prio}" attribute can be used to change the priority
                of an existing sign.
 
+               Example: >
+                       :sign place 23 name=sign1 file=/path/to/edit.py
+<
 :sign place {id} name={name} [buffer={nr}]
                Same, but use buffer {nr}.  If the buffer argument is not
                given, use the current buffer.
 
+               Example: >
+                       :sign place 23 name=sign1
+                       :sign place 23 name=sign1 buffer=7
+<
 
 REMOVING SIGNS                                         *:sign-unplace* *E159*
 
index 6a9498067112dbee337c7f906b4a6c7bdcc8e410..bef8601313c2c8d9a7491f47c3ddf1cce70a12e5 100644 (file)
@@ -1,4 +1,4 @@
-*syntax.txt*   For Vim version 8.2.  Last change: 2021 Jan 21
+*syntax.txt*   For Vim version 8.2.  Last change: 2021 Mar 06
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1741,8 +1741,8 @@ The coloring scheme for tags in the HTML file works as follows.
 
 The  <> of opening tags are colored differently than the </> of a closing tag.
 This is on purpose! For opening tags the 'Function' color is used, while for
-closing tags the 'Type' color is used (See syntax.vim to check how those are
-defined for you)
+closing tags the 'Identifier' color is used (See syntax.vim to check how those
+are defined for you)
 
 Known tag names are colored the same way as statements in C.  Unknown tag
 names are colored with the same color as the <> or </> respectively which
@@ -4676,7 +4676,7 @@ matches, nextgroup, etc.  But there are a few differences:
 - A line continuation pattern can be given.  It is used to decide which group
   of lines need to be searched like they were one line.  This means that the
   search for a match with the specified items starts in the first of the
-  consecutive that contain the continuation pattern.
+  consecutive lines that contain the continuation pattern.
 - When using "nextgroup" or "contains", this only works within one line (or
   group of continued lines).
 - When using a region, it must start and end in the same line (or group of
index 5f0b6c6518c0e0d113a179ed7760c7be5dd8e0de..27e8d754e191283e897790aa3f0e99ddedb7b084 100644 (file)
@@ -3191,6 +3191,7 @@ $VIM_POSIX        vi_diff.txt     /*$VIM_POSIX*
 :stselect      tagsrch.txt     /*:stselect*
 :su    change.txt      /*:su*
 :substitute    change.txt      /*:substitute*
+:substitute-repeat     change.txt      /*:substitute-repeat*
 :sun   windows.txt     /*:sun*
 :sunhide       windows.txt     /*:sunhide*
 :sunm  map.txt /*:sunm*
@@ -6578,6 +6579,7 @@ ft-mail.vim       syntax.txt      /*ft-mail.vim*
 ft-make-syntax syntax.txt      /*ft-make-syntax*
 ft-man-plugin  filetype.txt    /*ft-man-plugin*
 ft-maple-syntax        syntax.txt      /*ft-maple-syntax*
+ft-markdown-plugin     filetype.txt    /*ft-markdown-plugin*
 ft-masm-syntax syntax.txt      /*ft-masm-syntax*
 ft-mathematica-syntax  syntax.txt      /*ft-mathematica-syntax*
 ft-matlab-indent       indent.txt      /*ft-matlab-indent*
index 5be1890df84c861a5f39b64b7216db85606a1204..4e4cff0c27ca40c7353e1ea110913516f3955780 100644 (file)
@@ -1,4 +1,4 @@
-*testing.txt*  For Vim version 8.2.  Last change: 2020 Dec 12
+*testing.txt*  For Vim version 8.2.  Last change: 2021 Mar 10
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -168,6 +168,7 @@ test_override({name}, {val})                                *test_override()*
                             wait time of up to 3 seconds for messages
                term_props   reset all terminal properties when the version
                             string is detected
+               uptime       overrules sysinfo.uptime
                ALL          clear all overrides ({val} is not used)
 
                "starting" is to be used when a test should behave like
index 835a5ccca1ea98a7b4976762820ffb187e353281..2486d9d50f0f9ff313424670b0fffedae5e9c88c 100644 (file)
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 8.2.  Last change: 2021 Feb 20
+*todo.txt*      For Vim version 8.2.  Last change: 2021 Mar 11
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -39,13 +39,25 @@ browser use: https://github.com/vim/vim/issues/1234
 -------------------- Known bugs and current work -----------------------
 
 Vim9 - Make everything work:
-- Implement "export {one, two three}".
+- Does this work now: Implement using imported items at script level from
+  "import * as X" in
+- import of item that isn't exported: error should mention missing "export"?
+- no error for using :import in legacy script?
 - Disallow :open ?
+- Check: what if 'cpo' is intentionally changed in Vim9 script, does it get
+  restored at the end?
 - ISN_CHECKTYPE could use check_argtype()
 - Using a script variable inside a :def function doesn't work if the variable
   is inside a block, see Test_nested_function().  Should it work?
 - give error for variable name:
       var p = function('NoSuchFunc')
+- When indexing a string, should we include composing characters?  #6563
+       string[0] - first character including its composing characters.
+       string[0 : 0] - same
+    If you don't want that use strcharpart().
+    Also, add optional arg to strcharpart() to include composing chars, to
+    make it consistent with strchars().
+    Add strcharlen(), like strchars() but like skipcc is always set
 - Make closures work better:
   - Create closure in a loop.  Need to make a list of them.
 - If a :def function is called with a function reference, compile it to get
@@ -74,13 +86,11 @@ Vim9 - Make everything work:
 - make 0 == 'string' fail on the script level, like inside :def.
 - Check that when using a user function name without prefix, it does not find
   a global function.  Prefixing g: is required.
-- Need the equivalent of get_lval() and set_var_lval() to implement assignment
-  to nested list and dict members.
-    - Assignment to dict doesn't work:
-         var ret: dict<string> = #{}
-         ret[i] = string(i)
-    - Appending to dict item doesn't work:
-       var d[i] ..= value
+- Appending to dict item doesn't work in a :def function:
+      var d: dict<string> = {a: 'x'}
+      d['a'] ..= 'y'
+      d.a ..= 'y'
+   Test to be extended: Test_assign_dict_with_op()
 - Using ".." at script level doesn't convert arguments to a string.
 - Compile replacement of :s command: s/pat/\=expr/
 - Compile redir to local variable: var_redir_start().
@@ -89,8 +99,6 @@ Vim9 - Make everything work:
     islocked()
 - When evaluating constants for script variables, some functions could work:
     has('asdf'), len('string')
-- Implement "as Name" in "import Item as Name from ..."
-- Implement using imported items at script level from "import * as X" in
   eval_variable().  Should pass the ".xxx" that follows and return that.
 - Make "++nr" work.  "++g:count" doesn't work, thinks it is a range.
 - Reload: How to make sure type of script function hasn't changed?
@@ -102,6 +110,11 @@ Vim9 - Make everything work:
 - give an error for "echo Func()" if Func() does not return anything.
 - Using "windo echo expr" does not accept a line break inside "expr" (in a
   :def function and at script level in a not executed block). #7681
+- "assert_fails()" cannot access local variables.  Perhaps add this:
+       assertfails
+          ... cmd ...
+       endassertfails /E99:.*cmd/
+  Similar to try/catch/endtry but without the boilerplate.
 
 Once Vim9 is stable:
 - Change the help to prefer Vim9 syntax where appropriate
@@ -184,6 +197,7 @@ Text properties:
 - Popup attached to text property stays visible when text is deleted with
   "cc". (#7737)  "C" works OK.  "dd" also files in a buffer with a single
   line.
+- Auto-indenting may cause highlighting to shift. (#7719)
 - "cc" does not call inserted_bytes(). (Axel Forsman, #5763)
 - Combining text property with 'cursorline' does not always work (Billie
   Cleek, #5533)
@@ -263,7 +277,9 @@ Terminal emulator window:
 - When 'encoding' is not utf-8, or the job is using another encoding, setup
   conversions.
 
-Valgrind reports memory leaks in test_options
+Include patch #6290: recognize shell directory change.
+
+Valgrind reports memory leaks in test_options.
 
 test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows.
 
@@ -277,6 +293,8 @@ Was originally written by Felipe Morales.
 
 Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
 (#4087)  Did patch 8.2.2379 help?
+Also, z= in German on a long word can take a very long time, but CTRL-C to
+interrupt does not work. Where to add ui_breakcheck()?
 
 Remove SPACE_IN_FILENAME ? It is only used for completion.
 
@@ -288,6 +306,8 @@ with 'termguicolors'. #1740
 
 Patch for blockwise paste reporting changes: #6660.
 
+Patch to make fillchars global-local. (#5206)
+
 Missing filetype test for bashrc, PKGBUILD, etc.
 
 Add an option to not fetch terminal codes in xterm, to avoid flicker when t_Co
@@ -306,6 +326,10 @@ Try setting a color then request the current color, like using t_u7.
 Regexp to search for duplicate lines does not work correctly:
 /\(^.*\n\)\1  (Chris Morgan, #6239)
 
+MS-Windows: when writing undo file the infostreams are copied in 
+mch_copy_file_attribute(), that seems unnecessary. (#7925)
+Add a flag to only copy attributes?
+
 Changing a capturing group to non-capturing changes the result: #7607
     :echo matchstr('aaa bbb', '\(.\{-1,}\>\)\|.*')
     aaa
@@ -382,6 +406,10 @@ manager.  Problem with Motif?
 
 Patch to add :argdedupe. (Nir Lichtman, #6235)
 
+When editing a file with ":edit" the output of :swapname is relative, while
+editing it with "vim file" it is absolute. (#355)
+Which one should it be?
+
 :map output does not clear the reset of the command line.
 (#5623, also see #5962)
 
@@ -1156,9 +1184,6 @@ timer expires.
 Rule to use "^" for statusline does not work if a space is defined with
 highlighting for both stl and stlnc.  Patch by Ken Hamada (itchyny, 2016 Dec 11)
 
-8   "stl" and "stlnc" in 'fillchars' don't work for multibyte characters.
-    Patch by Christian Wellenbrock, 2013 Jul 5.
-
 Using CTRL-G_U in InsertCharPre causes trouble for redo. (Israel Chauca
 Fuentes, 2017 Feb 12, #1470)
 
index c60b1aa505d5e81899de78a60f6b9b1dd1737f4b..fd135c62527460a143f0d70d10114b6d0ce1e955 100644 (file)
@@ -1,4 +1,4 @@
-*various.txt*   For Vim version 8.2.  Last change: 2021 Jan 26
+*various.txt*   For Vim version 8.2.  Last change: 2021 Mar 02
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -572,7 +572,7 @@ N  *+X11*           Unix only: can restore window title |X11|
                        it in / any non-ID character (see |'isident'|) can be
                        used, so long as it does not appear in {pat}.  Without
                        the enclosing character the pattern cannot include the
-                       bar character.
+                       bar character. 'ignorecase' is not used.
 
                        The pattern is matched against the relevant part of
                        the output, not necessarily the whole line. Only some
index 016089a87c93ae525c10c9e9caf72a45493b7338..20689ef58f0158e3a0f1b8319e81e90e77080f66 100644 (file)
@@ -1,4 +1,4 @@
-*vim9.txt*     For Vim version 8.2.  Last change: 2021 Feb 23
+*vim9.txt*     For Vim version 8.2.  Last change: 2021 Mar 03
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -800,6 +800,8 @@ Patterns are used like 'magic' is set, unless explicitly overruled.
 The 'edcompatible' option value is not used.
 The 'gdefault' option value is not used.
 
+You may also find this wiki useful.  It was written by an early adoptor of
+Vim9 script: https://github.com/lacygoill/wiki/blob/master/vim/vim9.md
 
 ==============================================================================
 
@@ -1111,7 +1113,7 @@ Exporting an item can be written as: >
        export class MyClass ...
 
 As this suggests, only constants, variables, `:def` functions and classes can
-be exported. {classes are not implemented yet}
+be exported. {not implemented yet: export class}
 
                                                        *E1042*
 `:export` can only be used in Vim9 script, at the script level.
index 311e6a81eceab1466839aefb67d6849dda480657..1a18a651e0529909c6601488d17ac78611236280 100644 (file)
@@ -1,7 +1,7 @@
 " Vim support file to detect file types
 "
 " Maintainer:  Bram Moolenaar <Bram@vim.org>
-" Last Change: 2021 Jan 21
+" Last Change: 2021 Mar 12
 
 " Listen very carefully, I will say this only once
 if exists("did_load_filetypes")
diff --git a/runtime/ftplugin/poke.vim b/runtime/ftplugin/poke.vim
new file mode 100644 (file)
index 0000000..2be8669
--- /dev/null
@@ -0,0 +1,32 @@
+" Vim filetype plugin file
+" Language:    GNU Poke
+" Maintainer:  Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2021 March 11
+
+if exists("b:did_ftplugin")
+    finish
+endif
+let b:did_ftplugin = 1
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
+setlocal commentstring=//\ %s
+setlocal formatoptions-=t formatoptions+=croql
+
+setlocal include=load
+setlocal suffixesadd=.pk
+
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
+  let b:browsefilter = "Poke Files (*.pk)\t*.pk\n" .
+                    \ "All Files (*.*)\t*.*\n"
+endif
+
+let b:undo_ftplugin = "setl fo< com< cms< inc< sua<" .
+                   \ " | unlet! b:browsefilter"
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" vim: nowrap sw=2 sts=2 ts=8
index 36d3c25f3aff43010d793452350f363d0e4dc218..8ccb5574e77cb5dbb6eb71c95318e6876dd3298d 100644 (file)
@@ -3,8 +3,9 @@
 " Previous Maintainer:  Jorge Maldonado Ventura <jorgesumle@freakspot.net>
 " Previous Maintainer:  Claudio Fleiner <claudio@fleiner.com>
 " Repository:           https://notabug.org/jorgesumle/vim-html-syntax
-" Last Change:          2021 Feb 25
+" Last Change:          2021 Mar 02
 "                      Included patch #7900 to fix comments
+"                      Included patch #7916 to fix a few more things
 "
 
 " Please check :help html.vim for some comments and a description of the options
@@ -79,26 +80,16 @@ syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap
 syn match   htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1
 
 " aria attributes
-syn match htmlArg contained "\<\(aria-activedescendant\|aria-atomic\)\>"
-syn match htmlArg contained "\<\(aria-autocomplete\|aria-busy\|aria-checked\)\>"
-syn match htmlArg contained "\<\(aria-colcount\|aria-colindex\|aria-colspan\)\>"
-syn match htmlArg contained "\<\(aria-controls\|aria-current\)\>"
-syn match htmlArg contained "\<\(aria-describedby\|aria-details\)\>"
-syn match htmlArg contained "\<\(aria-disabled\|aria-dropeffect\)\>"
-syn match htmlArg contained "\<\(aria-errormessage\|aria-expanded\)\>"
-syn match htmlArg contained "\<\(aria-flowto\|aria-grabbed\|aria-haspopup\)\>"
-syn match htmlArg contained "\<\(aria-hidden\|aria-invalid\)\>"
-syn match htmlArg contained "\<\(aria-keyshortcuts\|aria-label\)\>"
-syn match htmlArg contained "\<\(aria-labelledby\|aria-level\|aria-live\)\>"
-syn match htmlArg contained "\<\(aria-modal\|aria-multiline\)\>"
-syn match htmlArg contained "\<\(aria-multiselectable\|aria-orientation\)\>"
-syn match htmlArg contained "\<\(aria-owns\|aria-placeholder\|aria-posinset\)\>"
-syn match htmlArg contained "\<\(aria-pressed\|aria-readonly\|aria-relevant\)\>"
-syn match htmlArg contained "\<\(aria-required\|aria-roledescription\)\>"
-syn match htmlArg contained "\<\(aria-rowcount\|aria-rowindex\|aria-rowspan\)\>"
-syn match htmlArg contained "\<\(aria-selected\|aria-setsize\|aria-sort\)\>"
-syn match htmlArg contained "\<\(aria-valuemax\|aria-valuemin\)\>"
-syn match htmlArg contained "\<\(aria-valuenow\|aria-valuetext\)\>"
+exe 'syn match htmlArg contained "\<aria-\%(' . join([
+    \ 'activedescendant', 'atomic', 'autocomplete', 'busy', 'checked', 'colcount',
+    \ 'colindex', 'colspan', 'controls', 'current', 'describedby', 'details',
+    \ 'disabled', 'dropeffect', 'errormessage', 'expanded', 'flowto', 'grabbed',
+    \ 'haspopup', 'hidden', 'invalid', 'keyshortcuts', 'label', 'labelledby', 'level',
+    \ 'live', 'modal', 'multiline', 'multiselectable', 'orientation', 'owns',
+    \ 'placeholder', 'posinset', 'pressed', 'readonly', 'relevant', 'required',
+    \ 'roledescription', 'rowcount', 'rowindex', 'rowspan', 'selected', 'setsize',
+    \ 'sort', 'valuemax', 'valuemin', 'valuenow', 'valuetext'
+    \ ], '\|') . '\)\>"'
 syn keyword htmlArg contained role
 
 " Netscape extensions
@@ -139,25 +130,19 @@ syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
 
 " Comments (the real ones or the old netscape ones)
 if exists("html_wrong_comments")
-  syn region htmlComment                start=+<!--+    end=+--\s*>+ contains=@Spell
+  syn region htmlComment        start=+<!--+    end=+--\s*>+    contains=@Spell
 else
-  " The HTML 5.2 syntax 8.2.4.41-42: bogus comment is parser error; browser skips until next &gt;
-  " Note: must stand first to get lesser :syn-priority
-  syn region htmlComment                start=+<!+      end=+>+     contains=htmlCommentError
-  " Normal comment opening <!-- ...>
-  syn region htmlComment                start=+<!--+    end=+>+     contains=htmlCommentPart,@Spell
-  " Idem 8.2.4.43-44: <!--> and <!---> are parser errors; browser treats as comments
-  syn match htmlComment "<!---\?>" contains=htmlCommentError
-  " Idem 8.2.4.51: any number of consecutive dashes within comment is okay; --> closes comment
-  " Idem 8.2.4.52: closing comment by dash-dash-bang (--!>) is error ignored by parser(!); closes comment
-  syn region htmlCommentPart  contained start=+--+      end=+--!\?>+me=e-1  contains=htmlCommentNested,@htmlPreProc,@Spell
-  " Idem 8.2.4.49: opening nested comment <!-- is parser error, ignored by browser, except <!--> is all right
-  syn match htmlCommentNested contained "<!--[^>]"me=e-1
-  syn match htmlCommentNested contained "<!--->"me=e-3
-  syn match htmlCommentNested contained "<!---\?!>"me=e-4
-  syn match htmlCommentError contained "[^><!]"
+  " The HTML 5.2 syntax 8.2.4.41: bogus comment is parser error; browser skips until next &gt
+  syn region htmlComment        start=+<!+      end=+>+         contains=htmlCommentError keepend
+  " Idem 8.2.4.42,51: Comment starts with <!-- and ends with -->
+  " Idem 8.2.4.43,44: Except <!--> and <!---> are parser errors
+  " Idem 8.2.4.52: dash-dash-bang (--!>) is error ignored by parser, also closes comment
+  syn region htmlComment matchgroup=htmlComment start=+<!--\%(-\?>\)\@!+        end=+--!\?>+    contains=htmlCommentNested,@htmlPreProc,@Spell keepend
+  " Idem 8.2.4.49: nested comment is parser error, except <!--> is all right
+  syn match htmlCommentNested contained "<!-->\@!"
+  syn match htmlCommentError  contained "[^><!]"
 endif
-syn region htmlComment                  start=+<!DOCTYPE+ keepend end=+>+
+syn region htmlComment  start=+<!DOCTYPE+       end=+>+ keepend
 
 " server-parsed commands
 syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr
@@ -278,7 +263,7 @@ hi def link htmlEndTag                  Identifier
 hi def link htmlArg                     Type
 hi def link htmlTagName                 htmlStatement
 hi def link htmlSpecialTagName          Exception
-hi def link htmlValue                     String
+hi def link htmlValue                   String
 hi def link htmlSpecialChar             Special
 
 if !exists("html_no_rendering")
@@ -322,14 +307,10 @@ hi def link htmlPreProc            PreProc
 hi def link htmlPreAttr            String
 hi def link htmlPreProcAttrName    PreProc
 hi def link htmlPreProcAttrError   Error
-hi def link htmlSpecial            Special
-hi def link htmlSpecialChar        Special
 hi def link htmlString             String
 hi def link htmlStatement          Statement
 hi def link htmlComment            Comment
-hi def link htmlCommentPart        Comment
-hi def link htmlValue              String
-hi def link htmlCommentNested      htmlCommentError
+hi def link htmlCommentNested      htmlError
 hi def link htmlCommentError       htmlError
 hi def link htmlTagError           htmlError
 hi def link htmlEvent              javaScript
diff --git a/runtime/syntax/poke.vim b/runtime/syntax/poke.vim
new file mode 100644 (file)
index 0000000..4a07a77
--- /dev/null
@@ -0,0 +1,151 @@
+" Copyright (C) 2021 Matthew T. Ihlenfield.
+"
+" This program is free software: you can redistribute it and/or modify
+" it under the terms of the GNU General Public License as published by
+" the Free Software Foundation, either version 3 of the License, or
+" (at your option) any later version.
+"
+" This program is distributed in the hope that it will be useful,
+" but WITHOUT ANY WARRANTY; without even the implied warranty of
+" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+" GNU General Public License for more details.
+"
+" You should have received a copy of the GNU General Public License
+" along with this program.  If not, see <http://www.gnu.org/licenses/>.
+"
+" Vim syntax file
+" Language: Poke
+" Maintainer: Matt Ihlenfield <mtihlenfield@protonmail.com>
+" Filenames: *.pk
+" Latest Revision: 10 March 2021
+
+if exists('b:current_syntax')
+    finish
+endif
+
+" Poke statement
+syn keyword pokeStatement assert break continue return
+syn keyword pokeStatement type unit fun method nextgroup=pokeFunction skipwhite
+syn keyword pokeStatement var nextgroup=pokeVar skipWhite
+
+" Identifiers
+syn match pokeVar '\h\w*' display contained
+
+" User defined functions
+syn match pokeFunction '\h\w*' display contained
+
+" Poke operators
+syn keyword pokeOperator in sizeof as isa unmap
+
+" Conditionals
+syn keyword pokeConditional if else where
+
+" Structures, unions, etc...
+syn keyword pokeStructure struct union pinned
+
+" Loops
+syn keyword pokeRepeat while for
+
+" Imports
+syn keyword pokeLoad load
+
+" Exceptions
+syn keyword pokeException try catch until raise
+
+" Exception types
+syn keyword pokeExceptionType Exception E_generic E_out_of_bounds
+syn keyword pokeExceptionType E_eof E_elem E_constraint
+syn keyword pokeExceptionType E_conv E_map_bounds E_map
+syn keyword pokeExceptionType E_div_by_zero E_no_ios E_no_return
+syn keyword pokeExceptionType E_io E_io_flags E_assert E_overflow
+
+" Exception codes
+syn keyword pokeExceptionCode EC_generic EC_out_of_bounds
+syn keyword pokeExceptionCode EC_eof EC_elem EC_constraint
+syn keyword pokeExceptionCode EC_conv EC_map_bounds EC_map
+syn keyword pokeExceptionCode EC_div_by_zero EC_no_ios EC_no_return
+syn keyword pokeExceptionCode EC_io EC_io_flags EC_assert EC_overflow
+
+" Poke builtin types
+syn keyword pokeBuiltinType string void int uint bit nibble
+syn keyword pokeBuiltinType byte char ushort short ulong long
+syn keyword pokeBuiltinType uint8 uint16 uint32 uint64
+syn keyword pokeBuiltinType off64 uoff64 offset
+syn keyword pokeBuiltinType Comparator POSIX_Time32 POSIX_Time64
+syn keyword pokeBuiltinType big little any
+
+" Poke constants
+syn keyword pokeConstant ENDIAN_LITTLE ENDIAN_BIG
+syn keyword pokeConstant IOS_F_READ IOS_F_WRITE IOS_F_TRUNCATE IOS_F_CREATE
+syn keyword pokeConstant IOS_M_RDONLY IOS_M_WRONLY IOS_M_RDWR
+syn keyword pokeConstant load_path NULL OFFSET
+
+" Poke std lib
+syn keyword pokeBuiltinFunction print printf catos stoca atoi ltos reverse
+syn keyword pokeBuiltinFunction ltrim rtrim strchr qsort crc32 alignto
+syn keyword pokeBuiltinFunction open close flush get_ios set_ios iosize
+syn keyword pokeBuiltinFunction rand get_endian set_endian strace exit
+syn keyword pokeBuiltinFunction getenv
+
+" Formats
+
+" Special chars
+syn match pokeSpecial "\\\([nt\\]\|\o\{1,3}\)" display contained
+
+" Chars
+syn match pokeChar "'[^']*'" contains=pokeSpecial
+
+" Attributes
+syn match pokeAttribute "\h\w*'\h\w"
+
+" Strings
+syn region pokeString skip=+\\\\\|\\"+ start=+"+ end=+"+ contains=pokeSpecial
+
+" Integer literals
+syn match pokeInteger "\<\d\+_*\d*\([LlHhBbNn]\=[Uu]\=\|[Uu]\=[LlHhBbNn]\=\)\>"
+syn match pokeInteger "\<0[Xx]\x\+_*\x*\([LlHhBbNn]\=[Uu]\=\|[Uu]\=[LlHhBbNn]\=\)\>"
+syn match pokeInteger "\<0[Oo]\o\+_*\o*\([LlHhBbNn]\=[Uu]\=\|[Uu]\=[LlHhBbNn]\=\)\>"
+syn match pokeInteger "\<0[Bb][01]\+_*[01]*\([LlHhBbNn]\=[Uu]\=\|[Uu]\=[LlHhBbNn]\=\)\>"
+
+" Units
+syn keyword pokeBuiltinUnit b M B
+syn keyword pokeBuiltinUnit Kb KB Mb MB Gb GB
+syn keyword pokeBuiltinUnit Kib KiB Mib MiB Gib GiB
+
+" Offsets
+syn match pokeOffset "#\h\w*" contains=pokeBuiltinUnit
+
+" Comments
+syn keyword pokeCommentTodo TODO FIXME XXX TBD contained
+syn match pokeLineComment "\/\/.*" contains=pokeCommentTodo,@Spell extend
+syn region pokeComment start="/\*"  end="\*/" contains=pokeCommentTodo,@Spell fold extend
+
+" Allow folding of blocks
+syn region pokeBlock start="{" end="}" transparent fold
+
+" Highlight groups
+hi def link pokeBuiltinFunction Function
+hi def link pokeBuiltinType Type
+hi def link pokeBuiltinUnit Keyword
+hi def link pokeChar Character
+hi def link pokeComment Comment
+hi def link pokeCommentTodo Todo
+hi def link pokeConditional Conditional
+hi def link pokeConstant Constant
+hi def link pokeException Exception
+hi def link pokeExceptionCode Constant
+hi def link pokeExceptionType Type
+hi def link pokeFunction Function
+hi def link pokeInteger Number
+hi def link pokeLineComment Comment
+hi def link pokeLoad Include
+hi def link pokeOffset StorageClass
+hi def link pokeOperator Operator
+hi def link pokeSpecial SpecialChar
+hi def link pokeStatement Statement
+hi def link pokeString String
+hi def link pokeStructure Structure
+hi def link pokeRepeat Repeat
+hi def link pokeVar Identifier
+
+let b:current_syntax = 'poke'
index 1ed4887c777605b61dc8393355a54907e8f958f9..64958aa13fd2a6f8fbb64a2242ea33f13bd89e53 100644 (file)
@@ -60,8 +60,8 @@ To built Vim on Ubuntu from scratch on a clean system using git:
        % sudo apt install libxt-dev
        % make reconfig
 
-       Add GUI support (ignore compiler warnings):
-       % sudo apt install libgtk2.0-dev
+       Add GUI support:
+       % sudo apt install libgtk-3-dev
        % make reconfig
 
        Add Python 3 support:
@@ -134,8 +134,12 @@ These configure arguments can be used to select which GUI to use:
 --disable-motif-check
 --disable-athena-check
 
+This configure argument can be used to disable the GUI, even when the necessary
+files are found:
+--disable-gui
+
 --enable-gui defaults to "auto", so it will automatically look for a GUI (in
-the order of GTK, Motif, then Athena).  If one is found, then is uses it and
+the order of GTK, Motif, then Athena).  If one is found, then it is used and
 does not proceed to check any of the remaining ones.  Otherwise, it moves on
 to the next one.