aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-02 10:24:39 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-02 10:33:32 -0400
commiteea3a692c652ba6d4db868cd4f3cfdebb0f65861 (patch)
tree37c2480a5471848623b64ca579611cadb97956eb
parent6a8436065ca7282569fd4d96b1c02a8ba8eaacf1 (diff)
downloadrneovim-eea3a692c652ba6d4db868cd4f3cfdebb0f65861.tar.gz
rneovim-eea3a692c652ba6d4db868cd4f3cfdebb0f65861.tar.bz2
rneovim-eea3a692c652ba6d4db868cd4f3cfdebb0f65861.zip
vim-patch:c8cdf0f80b3c
Update runtime files. https://github.com/vim/vim/commit/c8cdf0f80b3cfd88a4490d80572062c1fd1a96ca
-rw-r--r--runtime/doc/change.txt16
-rw-r--r--runtime/doc/eval.txt21
-rw-r--r--runtime/doc/filetype.txt7
-rw-r--r--runtime/doc/repeat.txt6
-rw-r--r--runtime/doc/sign.txt18
-rw-r--r--runtime/doc/syntax.txt6
-rw-r--r--runtime/doc/various.txt2
-rw-r--r--runtime/ftplugin/poke.vim32
-rw-r--r--runtime/syntax/html.vim69
-rw-r--r--runtime/syntax/poke.vim151
10 files changed, 264 insertions, 64 deletions
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index df98cc35e2..19a8be1102 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -623,6 +623,8 @@ Directory for temporary files is created in the first suitable directory of:
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
@@ -843,20 +845,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`
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index d644037547..5523cc8051 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -4698,6 +4698,10 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
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.
+ The column number in the returned List is the byte position
+ within the line.
+ 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")
...
@@ -6104,7 +6108,8 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
to be used when fast match additions and deletions are
required, for example to highlight matching parentheses.
*E5030* *E5031*
- 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
@@ -6121,7 +6126,7 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
ignored, as well as entries with negative column numbers and
lengths.
- The maximum number of positions is 8.
+ The maximum number of positions in {pos} is 8.
Example: >
:highlight MyGroup ctermbg=green guibg=green
@@ -6130,8 +6135,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()|.
matcharg({nr}) *matcharg()*
Selects the {nr} match item, as set with a |:match|,
@@ -8224,7 +8228,8 @@ strchars({expr} [, {skipcc}]) *strchars()*
<
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)
@@ -10508,7 +10513,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: >
@@ -10524,8 +10529,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
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 1b2bda2efd..36ed6bbac1 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -576,6 +576,13 @@ So `groff`'s pre-formatting output will be the same as with `g:man_hardwrap=0` i
To disable bold highlighting: >
:highlight link manBold Normal
+
+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
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt
index 1c9bc2146e..b237d70760 100644
--- a/runtime/doc/repeat.txt
+++ b/runtime/doc/repeat.txt
@@ -621,9 +621,9 @@ Your directory layout would be like this:
opt/fooextra/doc/tags " help tags
This allows for the user to do: >
- mkdir ~/.local/share/nvim/site/pack/myfoobar
- cd ~/.local/share/nvim/site/pack/myfoobar
- git clone https://github.com/you/foobar.git
+ mkdir ~/.local/share/nvim/site/pack
+ cd ~/.local/share/nvim/site/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.
diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt
index 96d2c2ae14..e8ed29c1a4 100644
--- a/runtime/doc/sign.txt
+++ b/runtime/doc/sign.txt
@@ -131,6 +131,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*
@@ -140,7 +143,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*
@@ -194,6 +199,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
@@ -206,10 +215,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*
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 694e16f8b0..c8b697432b 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1710,8 +1710,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
@@ -4628,7 +4628,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
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index b1be189cff..669f05bcc4 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -361,7 +361,7 @@ g8 Print the hex values of the bytes used in the
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
diff --git a/runtime/ftplugin/poke.vim b/runtime/ftplugin/poke.vim
new file mode 100644
index 0000000000..2be86695c8
--- /dev/null
+++ b/runtime/ftplugin/poke.vim
@@ -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
diff --git a/runtime/syntax/html.vim b/runtime/syntax/html.vim
index 36d3c25f3a..8ccb5574e7 100644
--- a/runtime/syntax/html.vim
+++ b/runtime/syntax/html.vim
@@ -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
index 0000000000..4a07a77d6c
--- /dev/null
+++ b/runtime/syntax/poke.vim
@@ -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'