" boxes - command line ASCII boxes unlimited! " Copyright (C) 1999-2020 Thomas Jensen and the boxes contributors " " This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public " License, version 2, as published by the Free Software Foundation. " 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, write to the Free " Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. " " Vim syntax file " --------------- " Latest version available from: " https://github.com/ascii-boxes/boxes/blob/master/boxes.vim " Status: This syntax file is not officially part of a boxes release, and simply intended to be downloaded via the link " above, but we think it's great when it gets packaged and installed with boxes! " Known Issues: " https://github.com/ascii-boxes/boxes/issues?q=is%3Aissue+is%3Aopen+Vim+Syntax " _____________________________________________________________________________________________________________________ if exists("b:current_syntax") finish endif " Removes any old syntax stuff hanging around syntax clear " ignore case 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. " " Key Words " syntax keyword boxesClassicKeywords author designer revision created revdate tags indent skipwhite skipempty nextgroup=boxesString syntax keyword boxesBlocks elastic replace reverse padding shapes skipwhite skipempty syntax keyword boxesRegStuff with to once global skipwhite skipempty syntax keyword boxesParent parent skipwhite nextgroup=boxesParentPath,boxesParentGlobal syntax keyword boxesEnd end skipwhite skipempty nextgroup=boxesNameAtEnd " Shape Names syntax keyword boxesShapes nw nnw n nne ne ene e ese syntax keyword boxesShapes se sse s ssw sw wsw w wnw " Padding Areas syntax keyword boxesPads a[ll] l[eft] r[ight] t top syntax keyword boxesPads b[ottom] h[orizontal] v[ertical] " Delimiter statement syntax keyword boxesDelim delim delimiter skipwhite skipempty nextgroup=boxesDelSpec " " Error - this is matched when the others don't match " syntax match boxesError /\S/ " " Main syntax definition part " 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\+/ " 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 " 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]\+\