diff --git a/boxes.vim b/boxes.vim index 7eae733..16aafd9 100644 --- a/boxes.vim +++ b/boxes.vim @@ -33,7 +33,6 @@ syntax case ignore " Set the keyword characters syntax iskeyword a-z,A-Z -" TODO foldlevel - It should be possible to fold box designs " TODO spell checking - In a boxes config file, only comments should be spell checked. @@ -69,32 +68,33 @@ syntax match boxesError /\S/ " syntax match boxesComma contained display /,/ syntax match boxesBraces display /[{}]/ -" TODO Introduce region between delim and delim|end which exists 361 times to cover all combinations syntax match boxesDelSpec contained display /[^ \t\r]\+/ syntax match boxesNameAtEnd display /[a-zA-ZäöüÄÖÜ][a-zA-Z0-9_\-üäöÜÄÖß]*/ skipwhite skipempty syntax match boxesWord display /[a-zA-ZäöüÄÖÜ][a-zA-Z0-9_\-üäöÜÄÖß]*/ syntax match boxesNumber display /[-+]\=\d\+/ +" TODO Introduce a region between delim and delim|end which exists multiple times to cover all escape characters +" with specialized string definitions + " a list, used inside shape blocks and for the elastic list syntax region boxesList matchgroup=Normal start="(" end=")" contains=boxesString,boxesShapes,boxesComma,boxesError,boxesComment " Strings -" TODO the uncontained is normal, and contained ones belong to a delim region -syntax region boxesString display start=/"/ skip=/\\\\\|\\"/ end=/"/ oneline +syntax region boxesString display start=/\z\(["~'`!@%&*=:;<>?/|.\\]\)/ skip=/\\\\\|\\\z1/ end=/\z1/ oneline " File path of a 'parent' definition syntax match boxesParentGlobal display "\s:global:\s*$" syntax match boxesParentPath contained display "[^:]\{-}$" -" The SAMPLE block -syntax region boxesSample matchgroup=boxesBlocks start="sample" end=+^[ \t]*ends[ \t\r]*$+ keepend - " a BOX definition with aliases syntax region boxesNames matchgroup=boxesBoxStmt start=/\[ \t\r\n]\+\