diff options
45 files changed, 5386 insertions, 893 deletions
@@ -63,6 +63,20 @@ !sisudoc !views !docs/*.html +!sundry +!sundry/editor-syntax-etc +!sundry/editor-syntax-etc/vim +!sundry/editor-syntax-etc/vim/*.vim +!sundry/editor-syntax-etc/vim/*.yaml +!sundry/editor-syntax-etc/vim/colors +!sundry/editor-syntax-etc/vim/colors/*.vim +!sundry/editor-syntax-etc/vim/ftplugin +!sundry/editor-syntax-etc/vim/ftplugin/*.vim +!sundry/editor-syntax-etc/vim/syntax +!sundry/editor-syntax-etc/vim/syntax/*.vim +!sundry/editor-syntax-etc/emacs +!sundry/editor-syntax-etc/emacs/*.el +!sundry/editor-syntax-etc/emacs/README !notes notes/** !notes/sisu-description.sst @@ -1,5 +1,964 @@ + +doc (metadata & abstraction) struct follow through +2025-02-19 ralph.amissah@gmail.com +1b311d6 (main) + +document (metadata & abstraction) struct +2025-02-19 ralph.amissah@gmail.com +48fc249 +- struct replaces tuple +- some direct naming of structs returned + (instead of use of auto) - minor + +org, touch, minor +2025-02-12 ralph.amissah@gmail.com +de49320 + +org, reorganize version info +2025-02-12 ralph.amissah@gmail.com +93b5018 + +org blocks, identify syntax +2025-01-05 ralph.amissah@gmail.com +f9fbc8e + +2025 +2025-01-01 ralph.amissah@gmail.com +24b8d40 + +refactor yaml extraction code file +2024-12-20 ralph.amissah@gmail.com +369a5b0 (2025) + +nix build, flake.nix ldc2-1.40.0 +2024-12-15 ralph.amissah@gmail.com +54f6469 (origin/main, origin/HEAD) + +flake.nix, removed flake-utils +2024-12-09 ralph.amissah@gmail.com +843a265 + +nix build, dub, take account of nixpkgs build changes +2024-12-05 ralph.amissah@gmail.com +ad607f7 + +nix build housekeeping, ldc, follow nixpkgs build +2024-12-03 ralph.amissah@gmail.com +d1903f4 + +nix build flake.nix fix +2024-12-03 ralph.amissah@gmail.com +03ab3db + +nix build houskeeping, version updates, incl. dmd & dub +2024-12-02 ralph.amissah@gmail.com +01b97ab + +pod zip fixes +2024-07-10 ralph.amissah@gmail.com +18bdad0 (main-a-org) +- serial processing (need to be built serially) +- multilingual pods, copy all languages before zip + +nix dlang overlay ldc-1.39.0 +2024-07-04 ralph.amissah@gmail.com +928142a + +[fn].digest.txt, sha256 of pod source files & pod +2024-07-04 ralph.amissah@gmail.com +d7e7c79 + +markup source digest to metadata.html +2024-07-01 ralph.amissah@gmail.com +602bc01 + +markup source digests (write to terminal) +2024-06-29 ralph.amissah@gmail.com +3ff7241 + +digest tuple rearrange +2024-06-29 ralph.amissah@gmail.com +03b6742 + +reduction in use of tuples +2024-06-29 ralph.amissah@gmail.com +83b2933 + +document digests and reduction in use of tuples +2024-06-29 ralph.amissah@gmail.com +860b894 + +nix minor +2024-06-29 ralph.amissah@gmail.com +6f5dd3d + +0.17.0 +2024-06-29 ralph.amissah@gmail.com +f2d12a2 + +shallow clone for install directory +2024-06-12 ralph.amissah@gmail.com +d887ec9 (tag: sisudoc-spine_v0.16.0, hashes-sha256-fix) + +nix dlang overlay dmd-2.109.0 +2024-06-03 ralph.amissah@gmail.com +3288e38 + +latex footers from document header make, a fix +2024-05-29 ralph.amissah@gmail.com +39d2dfa (dmd-new) + +README, further note on using nix for installation +2024-05-22 ralph.amissah@gmail.com +9876842 +- built on Debian using nix +- (first time usiing nix on a system other than + NixOS) + +org, minor reorganize for d config views +2024-05-21 ralph.amissah@gmail.com +e5e69a8 (next3) + +README update, return to ... +2024-05-17 ralph.amissah@gmail.com +19286de + +update fix default home text link info +2024-05-17 ralph.amissah@gmail.com +dc9a985 +- used e.g. in html text home button + +nix flake and envrc-nix minor +2024-05-17 ralph.amissah@gmail.com +594122a + +nix dlang overlay ldc-1.38.0 +2024-05-11 ralph.amissah@gmail.com +0452f31 +- (DMD v2.108.0, LLVM 18.1.5) + +nix dlang overlay ldc-1.38.0-beta1 +2024-05-09 ralph.amissah@gmail.com +f84e31a +- ldc-1.38.0-beta1 (DMD v2.108.0, LLVM 18.1.5) + +nix dlang overlay dmd-2.108.0, follow upstream +2024-05-09 ralph.amissah@gmail.com +12e3523 +- less passing Foundation +- default.nix filename kept + (upstream using package.nix) + +dub (dlang) prefer dub run to dub build +2024-05-07 ralph.amissah@gmail.com +05111f6 + +.envrc-nix info +2024-05-06 ralph.amissah@gmail.com +97e9d4c + +work on more generic install + instructions +2024-05-06 ralph.amissah@gmail.com +16532cb + +set nixVersions.nix_2_21 +2024-05-03 ralph.amissah@gmail.com +95203d8 + +comment out nixpkg nixVersions.unstable +2024-05-02 ralph.amissah@gmail.com +41eecdb +- nixVersions.unstable no longer available + +sisudoc spine initial release +2024-05-01 ralph.amissah@gmail.com +164ce8c + +org nixpkgs overlays housekeeping +2024-04-23 ralph.amissah@gmail.com +105a5ac + +nix direnv v 3.0.4 +2024-04-14 ralph.amissah@gmail.com +eaa9956 + +0.16.0 sisudoc (src/sisudoc sisudoc spine) +2024-04-10 ralph.amissah@gmail.com +90873fa +- src/sisudoc (replaces src/doc_reform) +- sisudoc spine (used more) + +0.15.0 +2024-04-10 ralph.amissah@gmail.com +3340de4 (tag: doc-reform_v0.15.0) + +flake.nix cosmetic minor +2024-03-20 ralph.amissah@gmail.com +e7c4b9e (tag: doc-reform_v0.14.0) + +mark modules as @safe: (& identify what is not) +2024-03-12 ralph.amissah@gmail.com +e9e17be + +nix flake & env upkeep +2024-03-08 ralph.amissah@gmail.com +2a87433 + +dmd & ldc upkeep (dmd at 2.106.1) +2024-03-08 ralph.amissah@gmail.com +3abf804 +- dmd current nixpkgs and overlay identical + +ldc-1.37.0 & dub-1.36.0 +2024-03-03 ralph.amissah@gmail.com +f67c532 + +org, ocda (ongoing) split file, separate functions +2024-01-21 ralph.amissah@gmail.com +10a66c9 + +org, ocda (ongoing) +2024-01-21 ralph.amissah@gmail.com +6dc3609 + +ldc-1.36.0 & dub-1.35.0 (& removed old/superseded beta versions) +2024-01-06 ralph.amissah@gmail.com +3940eb1 + +org, ocda (ongoing) +2024-01-02 ralph.amissah@gmail.com +98c1c70 + +2024 +2024-01-02 ralph.amissah@gmail.com +32b8127 + +org, ocda (ongoing) +2023-12-18 ralph.amissah@gmail.com +0eb9052 + +org, ocda (ongoing) +2023-12-16 ralph.amissah@gmail.com +b69940c + +org, spine ver & doc header (copyright & license) +2023-12-16 ralph.amissah@gmail.com +61d8e58 +- org import: reuse settings in another org file + using code block to evaluate other org file + spine_version_info_and_doc_header_including_copyright_and_license.org + +.envrc re-adjust & update direnv +2023-12-08 ralph.amissah@gmail.com +7c0c0e6 +- nixDirEnv (a copy of .envrc) used for flake.nix + (getting around an issue that arose when + building project; may revert to direct use of + .envrc) + +config_dub.org remove some unused parts +2023-12-07 ralph.amissah@gmail.com +e3bd7b7 + +ldc-1.36.0-beta1 tested ok (here still using 1.35.0) +2023-12-07 ralph.amissah@gmail.com +08017ca + +nix flake related modifications +2023-12-07 ralph.amissah@gmail.com +844e0b6 + +poem substitution +2023-12-06 ralph.amissah@gmail.com +cdb5d7a +- strange events yesterday, I am assuming that this substitution is a + long past uncommited change (as the like was needed and considered); + rather than the demonstration of my having being hacked, which if it + was, appears to have been rather kindly done considering the + implications of such access (seemingly having left everything else + untouched, though it implies access to and considerable knowledge of + this code base), and the choice of poem, one that I might make but + would be generous for someone else to choose for me. + +0.14.0 +2023-11-20 ralph.amissah@gmail.com +c6ee6dc + +ocda, structs (replacing tuples) +2023-11-19 ralph.amissah@gmail.com +e413648 (tag: doc-reform_v0.13.0) + +ocda, minor text formatting for comments & debugs +2023-11-19 ralph.amissah@gmail.com +7924d2a +- side-note: issues with doom emacs org babel + tangle + (not completely resolved, and have persisted) + +ocda, arrange structs, continue +2023-11-15 ralph.amissah@gmail.com +245b9a3 + +ocda, single out, use more structs +2023-11-15 ralph.amissah@gmail.com +d2a94f9 + +0.13.0 +2023-11-15 ralph.amissah@gmail.com +e0a48ea + +nix housekeeping +2023-11-04 ralph.amissah@gmail.com +f9be4ab (tag: doc-reform_v0.12.0) + +updates incl. ldc-1.35.0, direnv-2.4.0 +2023-10-15 ralph.amissah@gmail.com +12f3394 + +housekeeping, updates incl. ldc-1.34.0, dub-1.34.0 +2023-09-05 ralph.amissah@gmail.com +976f1ca + +ldc 1.33.0 (tokyo) +2023-07-28 ralph.amissah@gmail.com +973b279 + +flake.nix minor +2023-07-11 ralph.amissah@gmail.com +9410a4e + +ocda, improve doc markup structure error messages +2023-07-09 ralph.amissah@gmail.com +af80415 +- ocda, metadoc_from_src + workon doc markup structure error message, check + +flake nix build dub, set HOME, dub >= 1.31.0 fix +2023-07-08 ralph.amissah@gmail.com +12c4f6a +- fixes dub >= 1.31.0 build failure, attempted to + build in /homeless-shelter + +ocda, minor, tidy earlier work +2023-07-08 ralph.amissah@gmail.com +f16bcc2 +- ocda, fontface internal markup, cleanup & fixes + +nixenv generic set shell from system (from zsh) +2023-06-28 ralph.amissah@gmail.com +3798d20 + +icon chars, usability / cosmetic minor fix +2023-06-27 ralph.amissah@gmail.com +b861bbb + +"empty page" index.html, sort homepage link +2023-06-26 ralph.amissah@gmail.com +1ff7f29 + +html links and metadata, fixes & cosmetic work +2023-06-26 ralph.amissah@gmail.com +6118013 + +replace some instances of dir listing, index.html +2023-06-26 ralph.amissah@gmail.com +82d94b3 + +replace directory listing, blank index.html +2023-06-25 ralph.amissah@gmail.com +9125357 + +html, bespoke homepage, symlink toc.html index.html +2023-06-24 ralph.amissah@gmail.com +3434b91 +- html, bespoke homepage option +- html, symlinks toc.html index.html + +ocda, fontface internal markup, cleanup & fixes +2023-06-24 ralph.amissah@gmail.com +ff0a41d + +ocda, process section rather than part +2023-06-24 ralph.amissah@gmail.com +a47b0ef + +ldc 1.33.0-beta2 nix overlay +2023-06-27 ralph.amissah@gmail.com +30a6178 + +nix configure +2023-06-10 ralph.amissah@gmail.com +badd5fe + +unicode, changes in use of symbols to represent things +2023-06-10 ralph.amissah@gmail.com +516165c + +make set_depends (dyaml update) +2023-06-04 ralph.amissah@gmail.com +7973da9 + +nix use overlays when convenient +2023-06-04 ralph.amissah@gmail.com +446c0fe + +dub nix +2023-05-26 ralph.amissah@gmail.com +66ccfe4 + +ocda org file ("metaverse" renamed) +2023-05-21 ralph.amissah@gmail.com +fd8a637 +- ocda - object centric document abstraction +- "metaverse" name predates current association, + no need to hold on to either, rename + +nix dev + update direnv 2.2.1 => 2.3.0 +2023-04-29 ralph.amissah@gmail.com +d7930ad + +html search form action (for index & text results) +2023-04-20 ralph.amissah@gmail.com +cff8fea +- obstinately avoiding scripting, even javascript + result far from an ideal compromise, + (two submission forms (for text & for index)) + +nix org cleaning +2023-04-10 ralph.amissah@gmail.com +e3ced89 + +nix run alejandra formatter, decided to go with it +2023-04-10 ralph.amissah@gmail.com +d79a579 + +org & nix flake, mod for local dev (D related) +2023-03-16 ralph.amissah@gmail.com +667fcd4 +- for local dev using newer versions of things D + related + +nix flake & build, temp. remove gdc +2023-02-21 ralph.amissah@gmail.com +9598bd7 + +nix flake & build, devShells etc. +2023-01-26 ralph.amissah@gmail.com +970eea0 + +nix & build housekeeping +2023-01-24 ralph.amissah@gmail.com +5010380 + +nix & build housekeeping, alternative D compilers +2023-01-23 ralph.amissah@gmail.com +a615ba4 +- compilation status + - dmd (@D2.100) ok, & has been fine + - ldc (@D2.100) ok, & has been fine + - gdc11 available in nixpkgs does not compile + awaiting gdc12 (which would also be based on + @D2.100 & just might) + +2023, year rollover, old habit +2023-01-01 ralph.amissah@gmail.com +9085f33 + +nix and build housekeeping +2022-12-15 ralph.amissah@gmail.com +3d78a75 + +removed old ruby utility scripts +2022-12-16 ralph.amissah@gmail.com +d11d08b + +sqlite, check db exists, writable etc. +2022-12-09 ralph.amissah@gmail.com +fa286f5 + +regex review, match speed & compile time, ctregex +2022-11-25 ralph.amissah@gmail.com +f6d28b6 +- improve match time + - add interim fontface identifier marker +- improve compile time + - remove unused regexs + - separate out some specialized output matches + +gitignore & things nix +2022-12-08 ralph.amissah@gmail.com +684091e + +spine-search-cgi separate commits, remove sundry +2022-11-25 ralph.amissah@gmail.com +fb112dc + +0.12.0 +2022-11-25 ralph.amissah@gmail.com +4c08954 + +epub header assertion removed, check +2022-12-23 ralph.amissah@gmail.com +5d34421 (tag: doc-reform_v0.11.3) + +configs housekeeping, minor +2022-11-16 ralph.amissah@gmail.com +2bbbda5 + +regex (start thinking about ctRegex) +2022-11-11 ralph.amissah@gmail.com +f7079c9 + +org nix cosmetic +2022-11-11 ralph.amissah@gmail.com +ea80c51 + +org nix +2022-09-28 ralph.amissah@gmail.com +3b6e027 + +org noweb adjustments +2022-08-03 ralph.amissah@gmail.com +ace605e + +org nix adjust +2022-07-31 ralph.amissah@gmail.com +934b830 + +ocn metaverse, rearrange +2022-06-14 ralph.amissah@gmail.com +9b9ecaf + +org-mode headers modified +2022-06-15 ralph.amissah@gmail.com +73eb325 + +makefile, too much, prune! +2022-06-03 ralph.amissah@gmail.com +14a07cb + +build related, mostly nix flakes +2022-06-01 ralph.amissah@gmail.com +4808d0f + +html links to output, flags for a bit finer control +2022-05-26 ralph.amissah@gmail.com +dadc2ca + +pdf output links, should user choose to have it +2022-05-25 ralph.amissah@gmail.com +2eff2b6 + +sub dependency update, updates D-YAML +2022-05-26 ralph.amissah@gmail.com +8bd1faf + +housekeeping +2022-05-14 ralph.amissah@gmail.com +3a03516 + +generated-by header, latex, html, epub +2022-04-03 ralph.amissah@gmail.com +5bd8cbc +- consider, implementation quite messy + +latex doc headers moved to .sty files in ./sty dir +2022-03-30 ralph.amissah@gmail.com +15d1dc2 +- some changes made, font selection included + +latex head adjustments +2022-04-02 ralph.amissah@gmail.com +4b0ae05 + +latex header, work on (& some code formatting) +2022-03-24 ralph.amissah@gmail.com +6d74d9f + +latex output (try tidy); linebreaks more generally +2022-03-24 ralph.amissah@gmail.com +e2424c0 + +latex, pagebreaks, make headers, consider +2022-03-07 ralph.amissah@gmail.com +81f4747 + +latex, pagebreaks, make headers +2022-03-07 ralph.amissah@gmail.com +60e34a2 +- for book, article and manually set pagebreaks, + not fully utilized but flexibility introduced + +latex, pdf headers, some removed +2022-03-06 ralph.amissah@gmail.com +7e46a33 +- removed some pdf headers preceding substantive + text + +latex, use geometry package for page setting +2022-03-04 ralph.amissah@gmail.com +64de475 + +latex, linebreak br +2022-03-04 ralph.amissah@gmail.com +f4c6cf3 + +latex, urls +2022-03-02 ralph.amissah@gmail.com +e19cbce + +latex \newcommand: \ocn for ocn with margin +2022-03-01 ralph.amissah@gmail.com +b8d295e + +latex font sizes +2022-02-28 ralph.amissah@gmail.com +e4cca3e + +latex select papersize & orientation +2022-02-28 ralph.amissah@gmail.com +8dde791 +- cfte, doc collection config, cli e.g. + --set-papersize="a4,letter.portrait,b4.portrait" + +org-mode, latex file, cosmetic +2022-03-05 ralph.amissah@gmail.com +a1a07ff + +external dependency update, housekeeping, routine +2022-02-25 ralph.amissah@gmail.com +78a2310 + +verbosity level, "vox_gt[lv]" (voice greater than) +2022-02-23 ralph.amissah@gmail.com +20a3674 + +rethink verbose & debug flags, introduce show +2022-02-22 ralph.amissah@gmail.com +614e44a + +pod org file, minor +2022-02-20 ralph.amissah@gmail.com +e5da2f6 + +debug flags, narrow purpose +2022-02-21 ralph.amissah@gmail.com +8757dfd + +cgi search housekeeping, sync & remove redundancy +2022-02-18 ralph.amissah@gmail.com +7787e2c +- removed copy of d search form both org and src + duplication & out of date + +footers, year, minor +2022-02-18 ralph.amissah@gmail.com +d5e1af6 + +sqlite, html lite breakline related +2022-02-09 ralph.amissah@gmail.com +afca0c7 + +xmls, copyright and license display +2022-02-09 ralph.amissah@gmail.com +e9ff833 + +quote block, footnotes, markup? +2022-02-05 ralph.amissah@gmail.com +6acf808 + +epub, navigation +2022-02-04 ralph.amissah@gmail.com +94f56fa + +epub, work on +2022-02-04 ralph.amissah@gmail.com +30b6d71 + +codegen cgi search removed (using src in org-mode) +2022-02-03 ralph.amissah@gmail.com +b32a501 + +htmls, banner layout additions +2022-02-02 ralph.amissah@gmail.com +b3ab72d +- scroll/seg doc access toggle +- epub link added, later make optional +- search button, minor cosmetic + +xmls css, step +2022-02-01 ralph.amissah@gmail.com +3d89027 + +xmls css, stepwise changes +2022-01-29 ralph.amissah@gmail.com +d3f7134 + +xmls css, start to consider mobile usability +2022-01-29 ralph.amissah@gmail.com +8333ab4 + +config & sqlite search output, some changes +2022-01-28 ralph.amissah@gmail.com +d39da3f + +cgi sqlite_search, heading matches fix, cleanup +2022-01-27 ralph.amissah@gmail.com +1e04f9f + +doc presentation, add option to include date with title and author +2022-01-25 ralph.amissah@gmail.com +3c2da30 + +metadata, topic register to json removed, unused +2022-01-25 ralph.amissah@gmail.com +07581b1 + +sqlite: table, topic register +2022-01-24 ralph.amissah@gmail.com +f167586 + +xmls, html group text output (bullets & indents) +2022-01-20 ralph.amissah@gmail.com +845f644 + +org files naming, minor +2022-01-19 ralph.amissah@gmail.com +5b3d661 + +sqlite, minor, cosmetic in use case, if not exist +2022-01-16 ralph.amissah@gmail.com +33a5e14 + +a new year +2022-01-05 ralph.amissah@gmail.com +3105b44 + +nix setup related but messy +2021-12-23 ralph.amissah@gmail.com +168e45c + +metaverse, xml dom close eof +2021-12-03 ralph.amissah@gmail.com +bb03ff2 + +xmls, html header band +2021-12-03 ralph.amissah@gmail.com +a8d1de6 + +dlang dub & nix build related, includes dep update +2021-10-23 ralph.amissah@gmail.com +c4f6c86 +- nix-shell --pure + - nix-build + - dub build --compiler=ldc2 --build=release --force + +nix .envrc related +2021-10-16 ralph.amissah@gmail.com +69571dc + +org files, tangle output, some fixes +2021-10-13 ralph.amissah@gmail.com +0ff37b7 + +configuration, hierarchy filenames & paths ... +2021-10-07 ralph.amissah@gmail.com +e37589f + +sqlite related internal naming +2021-10-05 ralph.amissah@gmail.com +abe7e76 + +xmls homepage link +2021-10-05 ralph.amissah@gmail.com +6f65d96 + +primarily org related +2021-10-05 ralph.amissah@gmail.com +0271831 + +nix related config, direnv else minor +2021-09-20 ralph.amissah@gmail.com +85a2a29 + +org latex organize +2021-09-09 ralph.amissah@gmail.com +e8d88ac + +metadata "curate" replaces "harvest" +2021-09-01 ralph.amissah@gmail.com +1f8b96b +- "curated metadata" instead of "metadata harvest" +- css color change to related pages, light theme + +xmls, epub3 toc_nav.xhtml toc.ncx +2021-08-29 ralph.amissah@gmail.com +2cdc5d2 + +config nix +2021-08-29 ralph.amissah@gmail.com +bc5b1b8 + +metaverse parallel processing reproducability +2021-08-21 ralph.amissah@gmail.com +8525eb4 +- html xhtml issue with tags +- epub issue with title (skipped) in OEBPS/toc.ncx + +config, clean up and make a bit more consistent +2021-08-12 ralph.amissah@gmail.com +2426920 +- check version settings with: + rg -A2 _version_set$ org + +configuration reorganized into config files +2021-08-11 ralph.amissah@gmail.com +f459b2f +- spine_build_scaffold broken up into many files + +spine search and configuration related +2021-08-11 ralph.amissah@gmail.com +118ea61 + +spine_search (work on) +2021-08-08 ralph.amissah@gmail.com +b521068 + +nix help files, .envrc_local_ (& nix_notes_.org) +2021-08-07 ralph.amissah@gmail.com +c16231d + +track org config suggestions that require bespoke adjustment +2021-08-01 ralph.amissah@gmail.com +9b9b125 + +ext_depends updates: d-yaml & d2sqlite3 +2021-08-01 ralph.amissah@gmail.com +47bff1c + +config defaults: cfte, config-file & cle +2021-08-01 ralph.amissah@gmail.com +9b72621 + +spine_search +2021-08-01 ralph.amissah@gmail.com +ff59047 + +dir rename ./sundry (from ./misc) +2021-06-27 ralph.amissah@gmail.com +4d5ee2e + +org-mode code block headers +2021-06-27 ralph.amissah@gmail.com +4e84f49 + +nix-build cleanup, external sources localized +2021-05-15 ralph.amissah@gmail.com +924fabf +- clean up as external sources kept locally, in + ./src/ext_depends/ +- remove dub2nix dependency, no longer needed/used + +cgi.d arsd update +2021-05-15 ralph.amissah@gmail.com +33c8101 + +org-mode file minor adjustment +2021-05-05 ralph.amissah@gmail.com +ae7cb63 + +regex adjust, dc update build fix required +2021-05-03 ralph.amissah@gmail.com +6b55016 +- ldc-v1.26.0 dmd-v2.096.1 + +org .envrc-local_ (sample for nix-shell) +2021-04-22 ralph.amissah@gmail.com +fd3cddd + +spine, harvests require doc abstraction be run +2021-04-23 ralph.amissah@gmail.com +1eba3ef + +ext-dep: d-yaml updated +2021-04-22 ralph.amissah@gmail.com +b8fadcd + +spine options, pod uses source file structure +2021-04-20 ralph.amissah@gmail.com +cd6c5db + +spine_build_scaffold: nix related housekeeping +2021-04-20 ralph.amissah@gmail.com +08e51e7 +- mkDub.nix (dub2nix) use lib, + stdenv.lib deprecated +- .envrc stop using lorri +- .envrc-local_ set local variables as needed + +ext-dep: d2sqlite3 updated +2021-04-19 ralph.amissah@gmail.com +d9de45a + +org-mode, cosmetic +2021-04-16 ralph.amissah@gmail.com +8072ebd + +epub, minor adjustments +2021-04-13 ralph.amissah@gmail.com +294cc37 + +doc summary reinstated (org fix) +2021-04-13 ralph.amissah@gmail.com +be3b4e7 + +headers: copyright, license, year; also https +2021-04-04 ralph.amissah@gmail.com +5588bc1 + +fix issues raised by dmd2.095.1 ldc2 1.25.0 +2021-03-05 ralph.amissah@gmail.com +cbd7a2e + +make set_depends run dub describe, track json output +2021-03-03 ralph.amissah@gmail.com +e897eee +- traded $PWD for project root as ./, i.e. from dub describe json +- dub describe deletes parts of dependencies that are unreferenced by + the project build; these are available elsewhere and there is little + reason to keep them + +ext depends meta info: ver hash, license +2021-03-02 ralph.amissah@gmail.com +ede7dc3 + +cleaning +2021-02-25 ralph.amissah@gmail.com +c408957 + +external & build dependences in src tree +2021-02-19 ralph.amissah@gmail.com +02ca32a +- external & build dependences boost licensed + - ext_depends (external depends) + - D-YAML + - tinyendian + - d2sqlite3 + - imageformats + - build_depends + - dub2nix + +build from static source-tree pre fetch depends +2021-02-19 ralph.amissah@gmail.com +e1f5135 + +0.11.3 +2021-02-19 ralph.amissah@gmail.com +47ca5be + CHANGELOG 2021-02-19 ralph.amissah@gmail.com +8e1f65b (tag: doc-reform_v0.11.2) make changelog & echo version tag 2021-02-19 ralph.amissah@gmail.com @@ -106,7 +1065,7 @@ ldc-1.23.0 overlay for nixos 20.09 nix 2020-10-23 ralph.amissah@gmail.com -ccd9370 (compiler) +ccd9370 org mode, code-block names 2020-10-22 ralph.amissah@gmail.com diff --git a/derivation.nix b/derivation.nix index 3ad7056..90e549e 100644 --- a/derivation.nix +++ b/derivation.nix @@ -87,7 +87,7 @@ with ( ); mkDubDerivation rec { pname = "spine"; - version = "0.17.0"; + version = "0.18.0"; src = ./.; nativeBuildInputs = with pkgs; [dub ldc]; buildInputs = with pkgs; [nixVersions.latest sqlite]; @@ -4,7 +4,7 @@ ], "copyright": "Copyright © 2015 - 2025 Ralph Amissah", "name": "spine", - "version": "0.17.0", + "version": "0.18.0", "description": "an object-centric sisu-like document parser", "homepage": "https://sisudoc.org", "license": "AGPL-3.0+", @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1734126203, - "narHash": "sha256-0XovF7BYP50rTD2v4r55tR5MuBLet7q4xIz6Rgh3BBU=", + "lastModified": 1740019556, + "narHash": "sha256-vn285HxnnlHLWnv59Og7muqECNMS33mWLM14soFIv2g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "71a6392e367b08525ee710a93af2e80083b5b3e2", + "rev": "dad564433178067be1fbdfcce23b546254b6d641", "type": "github" }, "original": { @@ -9,7 +9,7 @@ ... }@inputs: let pname = "spine"; - version = "0.17.0"; + version = "0.18.0"; shell = ./shell.nix; devEnv = ./nixDevEnv.sh; supportedSystems = ["x86_64-linux"]; # [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; @@ -130,7 +130,7 @@ spine-overlay-dmd = stdenv.mkDerivation { inherit pname; inherit version; - #name = "spine-0.17.0 dmd-2.109.1 dub-1.38.1"; + #name = "spine-0.18.0 dmd-2.109.1 dub-1.38.1"; meta.mainProgram = "spine-dmd"; executable = true; src = self; @@ -154,7 +154,7 @@ spine-overlay-ldc = stdenv.mkDerivation { inherit pname; inherit version; - #name = "spine-0.17.0 ldc-1.40.0 dub-1.38.1"; + #name = "spine-0.18.0 ldc-1.40.0 dub-1.38.1"; meta.mainProgram = "spine-ldc"; executable = true; src = self; @@ -214,7 +214,7 @@ in with pkgs-nix; { dsh-overlay = mkShell { - name = "spine-0.17.0 base dev shell, ldc-1.40.0, dub-1.38.1"; + name = "spine-0.18.0 base dev shell, ldc-1.40.0, dub-1.38.1"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ @@ -227,7 +227,7 @@ inherit shellHook; }; dsh-nixpkgs-dmd-dub = mkShell { - name = "spine-0.17.0 base dev shell"; + name = "spine-0.18.0 base dev shell"; inherit shell; inherit devEnv; packages = [ @@ -239,7 +239,7 @@ inherit shellHook; }; dsh-nixpkgs-ldc-dub = mkShell { - name = "spine-0.17.0 base dev shell"; + name = "spine-0.18.0 base dev shell"; inherit shell; inherit devEnv; packages = [ @@ -251,7 +251,7 @@ inherit shellHook; }; dsh-overlay-dmd-dub = mkShell { - name = "spine-0.17.0 base dev shell, dmd-2.109.1, dub-1.38.1"; + name = "spine-0.18.0 base dev shell, dmd-2.109.1, dub-1.38.1"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ @@ -263,7 +263,7 @@ inherit shellHook; }; dsh-overlay-ldc-dub = mkShell { - name = "spine-0.17.0 base dev shell, ldc-1.40.0, dub-1.38.1"; + name = "spine-0.18.0 base dev shell, ldc-1.40.0, dub-1.38.1"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ @@ -275,7 +275,7 @@ inherit shellHook; }; dsh-epub = mkShell { - name = "spine-0.17.0 dev shell for epub output"; + name = "spine-0.18.0 dev shell for epub output"; inherit shell; inherit devEnv; packages = [ @@ -303,7 +303,7 @@ inherit shellHook; }; dsh-html = mkShell { - name = "spine-0.17.0 dev shell for html output"; + name = "spine-0.18.0 dev shell for html output"; inherit shell; inherit devEnv; packages = [ @@ -323,7 +323,7 @@ inherit shellHook; }; dsh-latex-pdf = mkShell { - name = "spine-0.17.0 dev shell for latex & pdf output"; + name = "spine-0.18.0 dev shell for latex & pdf output"; inherit shell; inherit devEnv; packages = [ @@ -339,7 +339,7 @@ inherit shellHook; }; dsh-sqlite = mkShell { - name = "spine-0.17.0 dev shell for sqlite3 output"; + name = "spine-0.18.0 dev shell for sqlite3 output"; inherit shell; inherit devEnv; packages = [ @@ -352,7 +352,7 @@ inherit shellHook; }; dsh-i18n = mkShell { - name = "spine-0.17.0 dev shell for internationalization, po4a"; + name = "spine-0.18.0 dev shell for internationalization, po4a"; inherit shell; inherit devEnv; packages = [ @@ -1301,8 +1301,8 @@ gitsnapshot: distclean tangle git commit -a version_tag: - echo "DRV=0.17.0; git tag -f sisudoc-spine_v$$\{DRV} -m\"doc-reform sisudoc spine-$$\{DRV}\" HEAD"; \ - echo "git tag -f sisudoc-spine_v0.17.0 -m\"doc-reform sisudoc spine-0.17.0\" HEAD" + echo "DRV=0.18.0; git tag -f sisudoc-spine_v$$\{DRV} -m\"doc-reform sisudoc spine-$$\{DRV}\" HEAD"; \ + echo "git tag -f sisudoc-spine_v0.18.0 -m\"doc-reform sisudoc spine-0.18.0\" HEAD" .PHONY : all build rebuild release \ distclean init \ diff --git a/meson.build b/meson.build index 226e198..6ebe0dc 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('spine', 'd', license: 'AGPL-3', - version: '0.17.0', + version: '0.18.0', meson_version: '>=0.46' ) #if meson.get_compiler('d').get_id() == 'gcc' diff --git a/org/config_git.org b/org/config_git.org index 2f4d024..b997923 100644 --- a/org/config_git.org +++ b/org/config_git.org @@ -87,6 +87,20 @@ !sisudoc !views !docs/*.html +!sundry +!sundry/editor-syntax-etc +!sundry/editor-syntax-etc/vim +!sundry/editor-syntax-etc/vim/*.vim +!sundry/editor-syntax-etc/vim/*.yaml +!sundry/editor-syntax-etc/vim/colors +!sundry/editor-syntax-etc/vim/colors/*.vim +!sundry/editor-syntax-etc/vim/ftplugin +!sundry/editor-syntax-etc/vim/ftplugin/*.vim +!sundry/editor-syntax-etc/vim/syntax +!sundry/editor-syntax-etc/vim/syntax/*.vim +!sundry/editor-syntax-etc/emacs +!sundry/editor-syntax-etc/emacs/*.el +!sundry/editor-syntax-etc/emacs/README !notes notes/** !notes/sisu-description.sst diff --git a/org/default_regex.org b/org/default_regex.org index 52d52d7..dc70056 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -53,6 +53,7 @@ static template spineRgxIn() { <<meta_rgx_paragraph_marks>> <<meta_rgx_blocks>> <<meta_rgx_block_tic>> + <<meta_rgx_block_quotemarks>> <<meta_rgx_block_curly>> <<meta_rgx_sub_match_code>> <<meta_rgx_table>> @@ -220,12 +221,14 @@ static grouped_para_indent_hang = ctRegex!(`^_(?P<hang>[0-9])_(? #+NAME: meta_rgx_blocks #+BEGIN_SRC d /+ blocked markup +/ -static block_open = ctRegex!("^((code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|^`{3} (code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?|^[{]table[(](?:h;)?(?P<columns>(?:[ ,]+[0-9]+)+)[)][}]"); -static block_poem_open = ctRegex!("^((poem(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|`{3} poem(?:[(][ a-zA-Z0-9;:,]*[)])?)"); +static block_open = ctRegex!("^((code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|^[`']{3} (code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?|^[{]table[(](?:h;)?(?P<columns>(?:[ ,]+[0-9]+)+)[)][}]"); +static block_poem_open = ctRegex!("^((poem(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|[`']{3} poem(?:[(][ a-zA-Z0-9;:,]*[)])?)"); #+END_SRC *** blocked markup tic :block:tic: +- consider quotemarks as alternative to, or to replace tics as using tics in text markup is a bit cumbersome + #+NAME: meta_rgx_block_tic #+BEGIN_SRC d /+ blocked markup tics +/ @@ -238,6 +241,22 @@ static block_tic_table_open = ctRegex!("^`{3} table(?:[(](?P static block_tic_close = ctRegex!("^(`{3})$","m"); #+END_SRC +*** blocked markup quotemarks :block:quotemarks: + +- consider quotemarks as alternative to, or to replace tics as using tics in text markup is a bit cumbersome + +#+NAME: meta_rgx_block_quotemarks +#+BEGIN_SRC d +/+ blocked markup tics +/ +static block_quotemarks_code_open = ctRegex!(`^'{3} code(?:[.](?P<syntax>[a-z][0-9a-z#+_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_poem_open = ctRegex!(`^'{3} poem(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_group_open = ctRegex!(`^'{3} group(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_block_open = ctRegex!(`^'{3} block(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_quote_open = ctRegex!(`^'{3} quote(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_table_open = ctRegex!(`^'{3} table(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); // ctRegex!("^'{3} table(?:\(.*?\))?"); +static block_quotemarks_close = ctRegex!(`^('{3})$`,"m"); +#+END_SRC + *** blocked markup curly :block:curly: #+NAME: meta_rgx_block_curly diff --git a/org/in_source_files.org b/org/in_source_files.org index 700b551..cdd220f 100644 --- a/org/in_source_files.org +++ b/org/in_source_files.org @@ -581,7 +581,7 @@ final char[][] getInsertMarkupSourceContentRawLineArray( #+BEGIN_SRC d char[][] contents_insert; int code_block_status = 0; -enum codeBlock { off, curly, tic, } +enum codeBlock { off, curly, tic, quotemarks } auto fn_pth_full = fn_src.match(rgx_files.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; #+END_SRC @@ -598,11 +598,19 @@ if (code_block_status == codeBlock.curly) { } else if (line.matchFirst(rgx.block_curly_code_open)) { code_block_status = codeBlock.curly; contents_insert ~= line; +} else if (code_block_status == codeBlock.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + code_block_status = codeBlock.off; + } + contents_insert ~= line; } else if (code_block_status == codeBlock.tic) { if (line.matchFirst(rgx.block_tic_close)) { code_block_status = codeBlock.off; } contents_insert ~= line; +} else if (line.matchFirst(rgx.block_quotemarks_code_open)) { + code_block_status = codeBlock.quotemarks; + contents_insert ~= line; } else if (line.matchFirst(rgx.block_tic_code_open)) { code_block_status = codeBlock.tic; contents_insert ~= line; @@ -666,7 +674,7 @@ return ret; #+BEGIN_SRC d char[][] contents; int code_block_status = 0; -enum codeBlock { off, curly, tic, } +enum codeBlock { off, curly, tic, quotemarks } auto fn_pth_full = fn_src.match(rgx_files.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; char[][] contents_insert; @@ -686,11 +694,19 @@ if (code_block_status == codeBlock.curly) { } else if (line.matchFirst(rgx.block_curly_code_open)) { code_block_status = codeBlock.curly; contents ~= line; +} else if (code_block_status == codeBlock.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + code_block_status = codeBlock.off; + } + contents ~= line; } else if (code_block_status == codeBlock.tic) { if (line.matchFirst(rgx.block_tic_close)) { code_block_status = codeBlock.off; } contents ~= line; +} else if (line.matchFirst(rgx.block_quotemarks_code_open)) { + code_block_status = codeBlock.quotemarks; + contents ~= line; } else if (line.matchFirst(rgx.block_tic_code_open)) { code_block_status = codeBlock.tic; contents ~= line; diff --git a/org/ocda_functions.org b/org/ocda_functions.org index ffbecb6..baae83e 100644 --- a/org/ocda_functions.org +++ b/org/ocda_functions.org @@ -1571,6 +1571,62 @@ ST_txt_by_line_block_start txt_by_line_block_start()( pith["block_is"] = eN.blk_is.table; pith["block_state"] = eN.blk_state.on; pith["block_delim"] = eN.blk_delim.curly_special; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_code_open)) { + dochas["codeblock"]++; + an_object["lang"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["syntax"] = (m["syntax"]) ? m["syntax"].to!string : ""; + debug(codequotemarks) { writefln( "* [code quotemarks] %s", line); } + pith["block_is"] = eN.blk_is.code; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; // + } else if (auto m = line.matchFirst(rgx.block_quotemarks_poem_open)) { + dochas["poem"]++; + an_object["syntax"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["lang"] = (m["lang"]) ? m["lang"].to!string : ""; + debug(poem) { writefln( "* [poem quotemarks] %s", line); } + object_number_poem["start"] = obj_cite_digits.object_number.to!string; + pith["block_is"] = eN.blk_is.poem; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; // + pith["verse_new"] = eN.bi.on; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_group_open)) { + dochas["group"]++; + an_object["syntax"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["lang"] = (m["lang"]) ? m["lang"].to!string : ""; + debug(group) { writefln( "* [group quotemarks] %s", line); } + pith["block_is"] = eN.blk_is.group; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_block_open)) { + dochas["block"]++; + an_object["syntax"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["lang"] = (m["lang"]) ? m["lang"].to!string : ""; + debug(block) { writefln( "* [block quotemarks] %s", line); } + pith["block_is"] = eN.blk_is.block; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_quote_open)) { + dochas["quote"]++; + an_object["syntax"] = ""; + an_object["attrib"] = m["attrib"].to!string; + an_object["lang"] = m["lang"].to!string; + debug(quote) { writefln( "* [quote quotemarks] %s", line); // quote (quotemarks) open + } + pith["block_is"] = eN.blk_is.quote; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_table_open)) { // quotemarks table open + debug(table) { writefln( "* [table quotemarks] %s", line); } + dochas["table"] ++; + an_object["table_head"] = m["attrib"].to!string; + an_object["block_type"] = "quotemarks"; + pith["block_is"] = eN.blk_is.table; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; } else if (auto m = line.matchFirst(rgx.block_tic_code_open)) { dochas["codeblock"]++; an_object["lang"] = ""; @@ -1654,6 +1710,17 @@ ST_txt_by_line_block_generic txt_by_line_block_group()( debug(group) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(group) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.group; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(group) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(group) { writeln(line); } @@ -1692,6 +1759,17 @@ ST_txt_by_line_block_generic txt_by_line_block_block()( debug(block) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(block) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.block; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(block) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(block) { writeln(line); } @@ -1816,6 +1894,94 @@ ST_txt_by_line_block_poem txt_by_line_block_poem(CMM)( ++cntr; } } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (auto m = line.matchFirst(rgx.block_quotemarks_close)) { + an_object[an_object_key] = "verse"; + debug(poem) { writefln( "* [poem quotemarks] %s", line); } + if (processing.length > 0) { + an_object[an_object_key] = processing["verse"]; + } + if (an_object.length > 0) { + debug(poem) { writeln(__LINE__); writeln(obj_cite_digits.object_number, line); } + processing.remove("verse"); + an_object["is"] = "verse"; + ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); + an_object["substantive"] = substantive_obj_misc_struct.obj_txt; + anchor_tag = substantive_obj_misc_struct.anchor_tag; + comp_obj_ = set_object_generic("body", "body", "block", "verse", an_object["substantive"], obj_cite_digits.object_number); + comp_obj_.metainfo.identifier = obj_cite_digits.identifier; + comp_obj_.metainfo.object_number_off = obj_cite_digits.off; + comp_obj_.metainfo.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_.metainfo.object_number_type = obj_cite_digits.type; + comp_obj_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"]; + comp_obj_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"]; + comp_obj_.has.inline_notes_reg = substantive_obj_misc_struct.has_notes_reg; + comp_obj_.has.inline_notes_star = substantive_obj_misc_struct.has_notes_star; + comp_obj_.has.inline_links = substantive_obj_misc_struct.has_links; + the_document_body_section ~= comp_obj_; + tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc); + object_number_poem["end"] = obj_cite_digits.object_number.to!string; + object_reset(an_object); + processing.remove("verse"); + ++cntr; + } + pith["block_is"] = eN.blk_is.poem; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + processing["verse"] ~= line ~= "\n"; + if (pith["verse_new"] == eN.bi.on) { + obj_cite_digits = ocn_emit(pith["ocn"]); + pith["verse_new"] = eN.bi.off; + } else if (line.matchFirst(rgx.newline_eol_delimiter_only)) { + processing["verse"] = processing["verse"].stripRight; + pith["verse_new"] = eN.bi.on; + verse_line = eN.bi.off; + } + if (pith["verse_new"] == eN.bi.on) { + verse_line = 1; + an_object[an_object_key] = processing["verse"]; + debug(poem) { writefln( + "* %s tic\n%s", + obj_cite_digits.object_number, + an_object[an_object_key] + ); + } + processing.remove("verse"); + an_object["is"] = "verse"; + auto comp_obj_location + = node_construct.node_location_emitter( + content_non_header, + tag_in_seg, + lev_anchor_tag, + tag_assoc, + obj_cite_digits, + cntr, + heading_ptr-1, + an_object["is"] + ); + ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); + an_object["substantive"] = substantive_obj_misc_struct.obj_txt; + anchor_tag = substantive_obj_misc_struct.anchor_tag; + comp_obj_ = set_object_generic("body", "body", "block", "verse", an_object["substantive"], obj_cite_digits.object_number); + comp_obj_.metainfo.identifier = obj_cite_digits.identifier; + comp_obj_.metainfo.object_number_off = obj_cite_digits.off; + comp_obj_.metainfo.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_.metainfo.object_number_type = obj_cite_digits.type; + comp_obj_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"]; + comp_obj_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"]; + comp_obj_.has.inline_notes_reg = substantive_obj_misc_struct.has_notes_reg; + comp_obj_.has.inline_notes_star = substantive_obj_misc_struct.has_notes_star; + comp_obj_.has.inline_links = substantive_obj_misc_struct.has_links; + the_document_body_section ~= comp_obj_; + tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc); + object_reset(an_object); + processing.remove("verse"); + ++cntr; + } + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (auto m = line.matchFirst(rgx.block_tic_close)) { an_object[an_object_key] = "verse"; @@ -1934,6 +2100,19 @@ ST_txt_by_line_block_generic txt_by_line_block_code()( debug(codecurly) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(codequotemarks) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key] + .replaceFirst(rgx.newline_eol_delimiter_only, "") + .stripRight; + pith["block_is"] = eN.blk_is.code; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(codequotemarks) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(codetic) { writeln(line); } @@ -2002,6 +2181,16 @@ ST_txt_by_line_block_generic txt_by_line_block_code()( debug(table) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(table) { writeln(line); } + pith["block_is"] = eN.blk_is.table; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(table) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(table) { writeln(line); } @@ -2045,6 +2234,17 @@ ST_txt_by_line_block_generic txt_by_line_block_quote()( debug(quote) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(quote) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.quote; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(quote) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(quote) { writeln(line); } diff --git a/org/ocda_obj_setter.org b/org/ocda_obj_setter.org index 5ae401a..f37df13 100644 --- a/org/ocda_obj_setter.org +++ b/org/ocda_obj_setter.org @@ -437,6 +437,7 @@ static auto eN() { tic, curly_special, tic_special, + quotemarks, } } return _e(); diff --git a/org/out_sqlite.org b/org/out_sqlite.org index 9610cfc..b9ab903 100644 --- a/org/out_sqlite.org +++ b/org/out_sqlite.org @@ -81,11 +81,8 @@ long _metadata_tid_lastrowid; #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteHubBuildTablesAndPopulate() { - void SQLiteHubBuildTablesAndPopulate(D,M)( - const D doc_abstraction, - M doc_matters, - ) { - auto pth_sqlite = spinePathsSQLite!()(doc_matters.sqlite.filename, doc_matters.sqlite.path); + void SQLiteHubBuildTablesAndPopulate(D)(D doc) { + auto pth_sqlite = spinePathsSQLite!()(doc.matters.sqlite.filename, doc.matters.sqlite.path); if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) { } else { try { @@ -93,20 +90,19 @@ template SQLiteHubBuildTablesAndPopulate() { } catch (FileException ex) { } } template SQLiteDbStatementComposite() { - void SQLiteDbStatementComposite(Db,D,M)( - Db db, - const D doc_abstraction, - M doc_matters, + void SQLiteDbStatementComposite(Db,D)( + Db db, + D doc ) { <<sqlite_db_statement_composite_collection>> - if (doc_matters.opt.action.vox_gt0) { + if (doc.matters.opt.action.vox_gt0) { writeln(" ", pth_sqlite.sqlite_file); } } } try { auto db = Database(pth_sqlite.sqlite_file); - SQLiteDbStatementComposite!()(db, doc_abstraction, doc_matters); + SQLiteDbStatementComposite!()(db, doc); } catch (FileException e) { writeln("Failed (FileException): ", e.msg, " ", pth_sqlite.sqlite_file); @@ -141,24 +137,20 @@ template SQLiteHubBuildTablesAndPopulate() { #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteHubDiscreteBuildTablesAndPopulate() { - void SQLiteHubDiscreteBuildTablesAndPopulate(D,M)( - const D doc_abstraction, - M doc_matters, - ) { - auto url_html = spineUrlsHTML!()(doc_matters.conf_make_meta.conf.w_srv_data_root_url_html, doc_matters.src.language); - auto pth_sqlite = spinePathsSQLiteDiscrete!()(doc_matters.output_path, doc_matters.src.language); // doc_matters.db_path + void SQLiteHubDiscreteBuildTablesAndPopulate(D)(D doc) { + auto url_html = spineUrlsHTML!()(doc.matters.conf_make_meta.conf.w_srv_data_root_url_html, doc.matters.src.language); + auto pth_sqlite = spinePathsSQLiteDiscrete!()(doc.matters.output_path, doc.matters.src.language); // doc.matters.db_path if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) { } else { try { pth_sqlite.base.mkdirRecurse; } catch (FileException ex) { } } - auto db = Database(pth_sqlite.sqlite_file(doc_matters.src.filename)); + auto db = Database(pth_sqlite.sqlite_file(doc.matters.src.filename)); template SQLiteDiscreteDbStatementComposite() { - void SQLiteDiscreteDbStatementComposite(Db,D,M)( - Db db, - const D doc_abstraction, - M doc_matters, + void SQLiteDiscreteDbStatementComposite(Db,D)( + Db db, + D doc ) { try { <<sqlite_db_statement_composite_discrete>> @@ -185,12 +177,12 @@ template SQLiteHubDiscreteBuildTablesAndPopulate() { import core.runtime; core.runtime.Runtime.terminate(); } - if (doc_matters.opt.action.vox_gt0) { - writeln(" ", pth_sqlite.sqlite_file(doc_matters.src.filename)); + if (doc.matters.opt.action.vox_gt0) { + writeln(" ", pth_sqlite.sqlite_file(doc.matters.src.filename)); } } } - SQLiteDiscreteDbStatementComposite!()(db, doc_abstraction, doc_matters); + SQLiteDiscreteDbStatementComposite!()(db, doc); } } #+END_SRC @@ -245,9 +237,7 @@ template SQLinsertDelimiter() { } } template SQLiteFormatAndLoadObject() { - auto SQLiteFormatAndLoadObject(M)( - M doc_matters, - ) { + auto SQLiteFormatAndLoadObject(M)(M doc_matters) { mixin spineRgxOut; mixin spineRgxXHTML; struct sqlite_format_and_load_objects { @@ -313,9 +303,7 @@ template SQLiteTablesReCreate() { #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteDeleteDocument() { - string SQLiteDeleteDocument(M)( - M doc_matters, - ) { + string SQLiteDeleteDocument(M)(M doc_matters) { <<sqlite_formatted_delete_format>> <<sqlite_formatted_delete_sql>> <<sqlite_formatted_delete_values>> @@ -330,9 +318,7 @@ template SQLiteDeleteDocument() { #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteInsertMetadata() { - string SQLiteInsertMetadata(M)( - M doc_matters, - ) { + string SQLiteInsertMetadata(M)(M doc_matters) { <<sqlite_formatted_insertions_doc_matters_metadata_format>> <<sqlite_formatted_insertions_doc_matters_metadata_sql>> <<sqlite_formatted_insertions_doc_matters_metadata_sql_values>> @@ -348,9 +334,7 @@ template SQLiteInsertMetadata() { #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteInsertMetadataTopics() { - string SQLiteInsertMetadataTopics(M)( - M doc_matters, - ) { + string SQLiteInsertMetadataTopics(M)(M doc_matters) { <<sqlite_formatted_insertions_topic_register_loop>> <<sqlite_formatted_insertions_topic_register_format>> <<sqlite_formatted_insertions_topic_register_sql>> @@ -368,12 +352,9 @@ template SQLiteInsertMetadataTopics() { #+HEADER: :noweb yes #+BEGIN_SRC d template SQLiteInsertDocObjectsLoop() { - string SQLiteInsertDocObjectsLoop(D,M)( - const D doc_abstraction, - M doc_matters, - ) { - string _uid = SQLinsertDelimiter!()(doc_matters.src.doc_uid); - auto url_html = spineUrlsHTML!()(doc_matters.conf_make_meta.conf.w_srv_data_root_url_html, doc_matters.src.language); + string SQLiteInsertDocObjectsLoop(D)(D doc) { + string _uid = SQLinsertDelimiter!()(doc.matters.src.doc_uid); + auto url_html = spineUrlsHTML!()(doc.matters.conf_make_meta.conf.w_srv_data_root_url_html, doc.matters.src.language); string insertDocObjectsRow(O)(O obj) { <<sqlite_formatted_insertions_doc_objects_format>> <<sqlite_formatted_insertions_doc_objects_sql>> @@ -525,8 +506,8 @@ template SQLiteDbDrop() { #+NAME: sqlite_db_statement_composite_collection #+BEGIN_SRC d string _db_statement; -if ((doc_matters.opt.action.sqlite_db_create)) { - auto pth_sqlite = spinePathsSQLite!()(doc_matters.sqlite.filename, doc_matters.sqlite.path); +if ((doc.matters.opt.action.sqlite_db_create)) { + auto pth_sqlite = spinePathsSQLite!()(doc.matters.sqlite.filename, doc.matters.sqlite.path); if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) { } else { try { @@ -534,27 +515,27 @@ if ((doc_matters.opt.action.sqlite_db_create)) { } catch (FileException ex) { } } _db_statement ~= SQLiteTablesReCreate!()(); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "TABLE RE-CREATE"); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "TABLE RE-CREATE"); _db_statement = []; } -if (doc_matters.opt.action.sqlite_delete) { - _db_statement ~= SQLiteDeleteDocument!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "DELETE Document"); +if (doc.matters.opt.action.sqlite_delete) { + _db_statement ~= SQLiteDeleteDocument!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "DELETE Document"); _db_statement = []; } -if (doc_matters.opt.action.sqlite_update) { - _db_statement ~= SQLiteDeleteDocument!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "DELETE Document"); +if (doc.matters.opt.action.sqlite_update) { + _db_statement ~= SQLiteDeleteDocument!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "DELETE Document"); _db_statement = []; - _db_statement ~= SQLiteInsertMetadata!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT MetaData"); + _db_statement ~= SQLiteInsertMetadata!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT MetaData"); _db_statement = []; - /+ get tid (lastrowid or max) for use in doc_objects table +/ - _db_statement ~= doc_abstraction.SQLiteInsertDocObjectsLoop!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT DocObjects"); + /+ get tid (lastrowid or max) for use in doc.objects table +/ + _db_statement ~= doc.SQLiteInsertDocObjectsLoop!(); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT DocObjects"); _db_statement = []; - _db_statement ~= SQLiteInsertMetadataTopics!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT MetaDataTopics"); + _db_statement ~= SQLiteInsertMetadataTopics!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT MetaDataTopics"); _db_statement = []; } db.close; @@ -567,10 +548,10 @@ db.close; { string _db_statement; _db_statement ~= SQLiteTablesReCreate!()(); - _db_statement ~= SQLiteInsertMetadata!()(doc_matters); - _db_statement ~= SQLiteInsertMetadataTopics!()(doc_matters); - _db_statement ~= doc_abstraction.SQLiteInsertDocObjectsLoop!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "table CREATE Tables, INSERT DocObjects"); + _db_statement ~= SQLiteInsertMetadata!()(doc.matters); + _db_statement ~= SQLiteInsertMetadataTopics!()(doc.matters); + _db_statement ~= doc.SQLiteInsertDocObjectsLoop!(); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "table CREATE Tables, INSERT DocObjects"); } db.close; #+END_SRC @@ -1534,23 +1515,23 @@ string[string] table(M,O)( #+NAME: sqlite_objects_loop #+BEGIN_SRC d -auto format_and_sqlite_load = SQLiteFormatAndLoadObject!()(doc_matters); +auto format_and_sqlite_load = SQLiteFormatAndLoadObject!()(doc.matters); string[string] obj_txt; string doc_text; string[] _insert_doc_objects; -foreach (part; doc_matters.has.keys_seq.sql) { - foreach (obj; doc_abstraction[part]) { +foreach (part; doc.matters.has.keys_seq.sql) { + foreach (obj; doc.abstraction[part]) { switch (obj.metainfo.is_of_part) { case "frontmatter": assert(part == "head", part); switch (obj.metainfo.is_of_type) { case "para": switch (obj.metainfo.is_a) { case "heading": - obj_txt = format_and_sqlite_load.heading(doc_matters, obj); + obj_txt = format_and_sqlite_load.heading(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1559,7 +1540,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1576,14 +1557,14 @@ foreach (part; doc_matters.has.keys_seq.sql) { writeln(__LINE__, ": ", obj.text); } } - obj_txt = format_and_sqlite_load.heading(doc_matters, obj); + obj_txt = format_and_sqlite_load.heading(doc.matters, obj); break; case "para": - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1593,28 +1574,28 @@ foreach (part; doc_matters.has.keys_seq.sql) { case "block": switch (obj.metainfo.is_a) { case "quote": - obj_txt = format_and_sqlite_load.quote(doc_matters, obj); + obj_txt = format_and_sqlite_load.quote(doc.matters, obj); break; case "group": - obj_txt = format_and_sqlite_load.group(doc_matters, obj); + obj_txt = format_and_sqlite_load.group(doc.matters, obj); break; case "block": - obj_txt = format_and_sqlite_load.block(doc_matters, obj); + obj_txt = format_and_sqlite_load.block(doc.matters, obj); break; case "poem": // double check on keeping both poem & verse break; case "verse": - obj_txt = format_and_sqlite_load.verse(doc_matters, obj); + obj_txt = format_and_sqlite_load.verse(doc.matters, obj); break; case "code": - obj_txt = format_and_sqlite_load.code(doc_matters, obj); + obj_txt = format_and_sqlite_load.code(doc.matters, obj); break; case "table": - obj_txt = format_and_sqlite_load.table(doc_matters, obj); + obj_txt = format_and_sqlite_load.table(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1623,7 +1604,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1636,23 +1617,23 @@ foreach (part; doc_matters.has.keys_seq.sql) { case "para": switch (obj.metainfo.is_a) { case "heading": - obj_txt = format_and_sqlite_load.heading(doc_matters, obj); + obj_txt = format_and_sqlite_load.heading(doc.matters, obj); break; case "glossary": assert(part == "glossary", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; case "bibliography": assert(part == "bibliography", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; case "bookindex": assert(part == "bookindex", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; case "blurb": assert(part == "blurb", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1661,7 +1642,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1672,7 +1653,7 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); // check where empty value could come from writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); // check where empty value could come from @@ -1681,9 +1662,9 @@ foreach (part; doc_matters.has.keys_seq.sql) { break; } if (obj.metainfo.is_a == "heading") { - if (doc_matters.opt.action.show_sqlite) { + if (doc.matters.opt.action.show_sqlite) { if (obj.metainfo.heading_lev_markup == 0) { - writeln(doc_matters.src.filename); + writeln(doc.matters.src.filename); } writeln( "markup: ", obj.metainfo.heading_lev_markup, diff --git a/org/out_xmls.org b/org/out_xmls.org index b3b16d7..8d0b475 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -1766,10 +1766,7 @@ module sisudoc.io_out.html; template outputHTML() { <<output_imports_xml>> mixin outputXHTMLs; - void scroll(D,M)( - const D doc_abstraction, - M doc_matters, - ) { + void scroll(D)(D doc) { <<output_html_scroll_0>> <<output_html_scroll_loop_parts>> <<output_html_scroll_is_frontmatter>> @@ -1778,10 +1775,7 @@ template outputHTML() { <<output_html_scroll_close_is_case>> } <<output_html_scroll_scroll_write_output>> - void seg(D,M)( - const D doc_abstraction, - M doc_matters, - ) { + void seg(D)(D doc) { <<output_html_seg_0>> <<output_html_seg_loop_parts>> <<output_html_seg_is_heading>> @@ -1808,7 +1802,7 @@ auto xhtml_format = outputXHTMLs(); static auto rgx = RgxO(); static auto rgx_xhtml = RgxXHTML(); string[] doc_html; -string[] doc; +string[] doc_out; string suffix = ".html"; string previous_section = ""; string delimit = ""; @@ -1818,8 +1812,8 @@ string delimit = ""; #+NAME: output_html_scroll_loop_parts #+BEGIN_SRC d -foreach (section; doc_matters.has.keys_seq.scroll) { - foreach (obj; doc_abstraction[section]) { +foreach (section; doc.matters.has.keys_seq.scroll) { + foreach (obj; doc.abstraction[section]) { delimit = xhtml_format.div_delimit(section, previous_section); string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); switch (obj.metainfo.is_of_part) { @@ -1834,14 +1828,14 @@ case "frontmatter": assert(section == "head" || "toc"); case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix); break; case "toc": - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1850,7 +1844,7 @@ case "frontmatter": assert(section == "head" || "toc"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1868,14 +1862,14 @@ case "body": assert(section == "body" || "head"); case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix); break; case "para": - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1885,28 +1879,28 @@ case "body": assert(section == "body" || "head"); case "block": switch (obj.metainfo.is_a) { case "quote": - doc_html ~= xhtml_format.quote_scroll(_txt, obj, doc_matters); + doc_html ~= xhtml_format.quote_scroll(_txt, obj, doc.matters); break; case "group": - doc_html ~= xhtml_format.group_scroll(_txt, obj, doc_matters); + doc_html ~= xhtml_format.group_scroll(_txt, obj, doc.matters); break; case "block": - doc_html ~= xhtml_format.block_scroll(_txt, obj, doc_matters); + doc_html ~= xhtml_format.block_scroll(_txt, obj, doc.matters); break; case "poem": break; case "verse": - doc_html ~= xhtml_format.verse_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.verse_scroll(_txt, obj, doc.matters, suffix); break; case "code": - doc_html ~= xhtml_format.code(_txt, obj, doc_matters); + doc_html ~= xhtml_format.code(_txt, obj, doc.matters); break; case "table": - doc_html ~= xhtml_format.table(_txt, obj, doc_matters); + doc_html ~= xhtml_format.table(_txt, obj, doc.matters); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1915,7 +1909,7 @@ case "body": assert(section == "body" || "head"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1934,29 +1928,29 @@ case "backmatter": case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix); break; case "endnote": assert(section == "endnotes"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "glossary": assert(section == "glossary"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "bibliography": assert(section == "bibliography"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "bookindex": assert(section == "bookindex"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "blurb": assert(section == "blurb"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "tail": assert(section == "tail"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1965,7 +1959,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1976,7 +1970,7 @@ case "comment": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); @@ -1992,23 +1986,23 @@ default: } } } -doc = xhtml_format.html_head(doc_matters, "scroll") +doc_out = xhtml_format.html_head(doc.matters, "scroll") ~ doc_html ~ xhtml_format.dom_close -~ xhtml_format.tail(doc_matters); -scroll_write_output(doc, doc_matters); +~ xhtml_format.tail(doc.matters); +scroll_write_output(doc_out, doc.matters); #+END_SRC *** write output file #+NAME: output_html_scroll_scroll_write_output #+BEGIN_SRC d -@trusted void scroll_write_output(D,M)( - D doc, +@trusted void scroll_write_output(O,M)( + O doc_out, M doc_matters, ) { debug(asserts) { - static assert(is(typeof(doc) == string[])); + static assert(is(typeof(doc_out) == string[])); } auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language); try { @@ -2017,7 +2011,7 @@ scroll_write_output(doc, doc_matters); } { auto f = File(pth_html.fn_scroll(doc_matters.src.filename), "w"); - foreach (o; doc) { + foreach (o; doc_out) { f.writeln(o); } } @@ -2054,7 +2048,6 @@ static auto rgx_xhtml = RgxXHTML(); auto xhtml_format = outputXHTMLs(); string[][string] doc_html; string[][string] doc_html_endnotes; -string[] doc; string segment_filename; string[] top_level_headings = ["","","",""]; string previous_seg_filename = ""; @@ -2067,8 +2060,8 @@ string delimit = ""; #+NAME: output_html_seg_loop_parts #+BEGIN_SRC d -foreach (section; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[section]) { +foreach (section; doc.matters.has.keys_seq.seg) { + foreach (obj; doc.abstraction[section]) { delimit = xhtml_format.div_delimit(section, previous_section); string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); #+END_SRC @@ -2102,33 +2095,33 @@ if (obj.metainfo.is_a == "heading") { top_level_headings[3] = ""; goto default; default: - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg"); top_level_headings[obj.metainfo.heading_lev_markup] = t[0]; break; } break; case 4: segment_filename = obj.tags.segment_anchor_tag_epub; - doc_html[segment_filename] ~= xhtml_format.html_head(doc_matters, "seg"); - auto navigation_bar = xhtml_format.nav_pre_next_svg(obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.html_head(doc.matters, "seg"); + auto navigation_bar = xhtml_format.nav_pre_next_svg(obj, doc.matters); doc_html[segment_filename] ~= navigation_bar.toc_pre_next; previous_seg_filename = segment_filename; foreach (top_level_heading; top_level_headings) { doc_html[segment_filename] ~= top_level_heading; } - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; - doc_html[segment_filename] ~= xhtml_format.lev4_heading_subtoc(obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.lev4_heading_subtoc(obj, doc.matters); doc_html_endnotes[segment_filename] ~= t[1]; break; case 5: .. case 7: - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; case 8: .. case 9: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } @@ -2136,7 +2129,7 @@ if (obj.metainfo.is_a == "heading") { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); } } @@ -2163,12 +2156,12 @@ case "frontmatter": assert(section == "head" || "toc"); case "para": switch (obj.metainfo.is_a) { case "toc": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2177,7 +2170,7 @@ case "frontmatter": assert(section == "head" || "toc"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2195,13 +2188,13 @@ case "body": assert(section == "body"); case "para": switch (obj.metainfo.is_a) { case "para": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2211,24 +2204,24 @@ case "body": assert(section == "body"); case "block": switch (obj.metainfo.is_a) { case "quote": - t = xhtml_format.quote_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.quote_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "group": - t = xhtml_format.group_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.group_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "block": - t = xhtml_format.block_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.block_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "poem": break; case "verse": - t = xhtml_format.verse_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.verse_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "code": - doc_html[segment_filename] ~= xhtml_format.code(_txt, obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.code(_txt, obj, doc.matters); break; case "table": - doc_html[segment_filename] ~= xhtml_format.table(_txt, obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.table(_txt, obj, doc.matters); doc_html_endnotes[segment_filename] ~= ""; break; default: @@ -2240,7 +2233,7 @@ case "body": assert(section == "body"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; } else { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2249,7 +2242,7 @@ case "body": assert(section == "body"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -2268,37 +2261,37 @@ case "backmatter": case "para": switch (obj.metainfo.is_a) { case "endnote": assert(section == "endnotes"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; break; case "glossary": assert(section == "glossary"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "bibliography": assert(section == "bibliography"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "bookindex": assert(section == "bookindex"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "blurb": assert(section == "blurb"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "tail": assert(section == "tail"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2307,7 +2300,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -2318,7 +2311,7 @@ case "comment": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); } } @@ -2333,7 +2326,7 @@ default: } } } -seg_write_output(doc_html, doc_html_endnotes, doc_matters); +seg_write_output(doc_html, doc_html_endnotes, doc.matters); #+END_SRC *** write output files @@ -2418,9 +2411,7 @@ void css(M)(M doc_matters) { #+NAME: copy_html_images #+BEGIN_SRC d -@trusted void images_cp(M)( // @system - M doc_matters, -) { +@trusted void images_cp(M)(M doc_matters) { // @system { /+ (copy html images) +/ auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language); if (!exists(pth_html.image)) { @@ -2562,10 +2553,10 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> #+NAME: output_epub3_constructs_oebps_content #+HEADER: :noweb yes #+BEGIN_SRC d -string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { +string epub3_oebps_content(D,P)(D doc, P parts) { auto xhtml_format = outputXHTMLs(); - auto pth_epub3 = spinePathsEPUB!()(doc_matters.output_path, doc_matters.src.language); - string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc_matters! + auto pth_epub3 = spinePathsEPUB!()(doc.matters.output_path, doc.matters.src.language); + string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc.matters! string content = format(q"┃<?xml version="1.0" encoding="utf-8"?> <<epub3_package_version>> <metadata @@ -2589,25 +2580,25 @@ string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { <item id="nav" href="toc_nav.xhtml" media-type="application/xhtml+xml" properties="nav" /> ┃", _uuid, - xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_main), - (doc_matters.conf_make_meta.meta.title_sub.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_sub), - (doc_matters.conf_make_meta.meta.creator_author.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author), - (doc_matters.conf_make_meta.meta.creator_author.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author), - doc_matters.src.language, // language, fix (needed in dochead metadata) - (doc_matters.conf_make_meta.meta.date_published.empty) - ? "" : xhtml_format.special_characters_date(doc_matters.conf_make_meta.meta.date_published), - (doc_matters.conf_make_meta.meta.rights_copyright.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.rights_copyright), + xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.title_main), + (doc.matters.conf_make_meta.meta.title_sub.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.title_sub), + (doc.matters.conf_make_meta.meta.creator_author.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.creator_author), + (doc.matters.conf_make_meta.meta.creator_author.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.creator_author), + doc.matters.src.language, // language, fix (needed in dochead metadata) + (doc.matters.conf_make_meta.meta.date_published.empty) + ? "" : xhtml_format.special_characters_date(doc.matters.conf_make_meta.meta.date_published), + (doc.matters.conf_make_meta.meta.rights_copyright.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.rights_copyright), _uuid, _uuid, (pth_epub3.fn_oebps_css).chompPrefix("OEBPS/"), ); content ~= parts["manifest_documents"]; // TODO sort jpg & png - foreach (image; doc_matters.srcs.image_list) { + foreach (image; doc.matters.srcs.image_list) { content ~= format(q"┃ <item id="%s" href="%s/%s" media-type="image/%s" /> ┃", image.baseName.stripExtension, @@ -2625,8 +2616,8 @@ string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { content ~= " " ~ "</guide>" ~ "\n "; content ~= "" ~ "</package>"; debug(epubmanifest) { - foreach (section; doc_matters.has.keys_seq.seg) { // TODO - foreach (obj; doc_abstraction[section]) { + foreach (section; doc.matters.has.keys_seq.seg) { // TODO + foreach (obj; doc.abstraction[section]) { if (obj.metainfo.is_a == "heading") { if (obj.metainfo.heading_lev_markup == 4) { writefln( @@ -2658,7 +2649,7 @@ string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { #+NAME: output_epub3_constructs_oebps_toc_nav_xhtml #+BEGIN_SRC d -string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { +string epub3_oebps_toc_nav_xhtml(D)(D doc) { enum DomTags { none, open, close, close_and_open, open_still, } auto markup = InlineMarkup(); static auto rgx = RgxO(); @@ -2677,12 +2668,12 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { </header> <nav epub:type="toc" id="toc"> ┃", - (doc_matters.conf_make_meta.meta.title_full).special_characters_text, + (doc.matters.conf_make_meta.meta.title_full).special_characters_text, ); string _toc_nav_tail = ""; - // writeln(doc_matters.has.keys_seq.seg); // DEBUG line - foreach (sect; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[sect]) { + // writeln(doc.matters.has.keys_seq.seg); // DEBUG line + foreach (sect; doc.matters.has.keys_seq.seg) { + foreach (obj; doc.abstraction[sect]) { if ((sect == "head") && (obj.metainfo.is_a == "heading")) { toc = toc_head; } @@ -2738,7 +2729,7 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { } break; } - if (doc_matters.has.keys_seq.seg[doc_matters.has.keys_seq.seg.length - 2] == sect) { + if (doc.matters.has.keys_seq.seg[doc.matters.has.keys_seq.seg.length - 2] == sect) { // writeln(n, ": ", sect, ": ", _txt, " - ", obj.metainfo.dom_structure_collapsed_tags_status); // DEBUG // read last heading (heading prior to closing) and determine what those instructions imply still need to be done // CLOSE // DomTags { 0 none, 1 open, 2 close, 3 close_and_open, 4 open_still, } @@ -2778,16 +2769,12 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { #+NAME: output_epub3_xhtml_seg_output #+BEGIN_SRC d -@system void outputEPub3(D,I)( - const D doc_abstraction, - I doc_matters, -) { +@system void outputEPub3(D)(D doc) { mixin spineRgxOut; mixin spineRgxXHTML; auto xhtml_format = outputXHTMLs(); static auto rgx = RgxO(); static auto rgx_xhtml = RgxXHTML(); - string[] doc; string segment_filename; string[] top_level_headings = ["","","",""]; string[string] oepbs_content_parts; @@ -2810,8 +2797,8 @@ string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { #+NAME: output_epub3_xhtml_seg_output_loop #+BEGIN_SRC d -foreach (section; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[section]) { +foreach (section; doc.matters.has.keys_seq.seg) { + foreach (obj; doc.abstraction[section]) { string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); #+END_SRC @@ -2845,8 +2832,8 @@ if (obj.metainfo.is_a == "heading") { goto default; default: epubWrite.doc_parts ~= obj.tags.segment_anchor_tag_epub; - epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= xhtml_format.epub3_seg_head(doc_matters); - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub"); + epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= xhtml_format.epub3_seg_head(doc.matters); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= t[0]; epubWrite.doc_epub3_endnotes[obj.tags.segment_anchor_tag_epub] ~= t[1]; break; @@ -2854,19 +2841,19 @@ if (obj.metainfo.is_a == "heading") { break; case 4: segment_filename = obj.tags.segment_anchor_tag_epub; - epubWrite.doc_epub3[segment_filename] ~= xhtml_format.epub3_seg_head(doc_matters); - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub"); + epubWrite.doc_epub3[segment_filename] ~= xhtml_format.epub3_seg_head(doc.matters); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case 5: .. case 7: - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case 8: .. case 9: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } @@ -2874,7 +2861,7 @@ if (obj.metainfo.is_a == "heading") { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); } } @@ -2901,13 +2888,13 @@ case "frontmatter": assert(section == "head" || "toc"); case "para": switch (obj.metainfo.is_a) { case "toc": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2916,7 +2903,7 @@ case "frontmatter": assert(section == "head" || "toc"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -2934,13 +2921,13 @@ case "body": assert(section == "body"); case "para": switch (obj.metainfo.is_a) { case "para": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2950,37 +2937,37 @@ case "body": assert(section == "body"); case "block": switch (obj.metainfo.is_a) { case "quote": - t = xhtml_format.quote_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.quote_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "group": - t = xhtml_format.group_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.group_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "block": - t = xhtml_format.block_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.block_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "poem": break; case "verse": - t = xhtml_format.verse_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.verse_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "code": - epubWrite.doc_epub3[segment_filename] ~= xhtml_format.code(_txt, obj, doc_matters); + epubWrite.doc_epub3[segment_filename] ~= xhtml_format.code(_txt, obj, doc.matters); break; case "table": - epubWrite.doc_epub3[segment_filename] ~= xhtml_format.table(_txt, obj, doc_matters); + epubWrite.doc_epub3[segment_filename] ~= xhtml_format.table(_txt, obj, doc.matters); epubWrite.doc_epub3_endnotes[segment_filename] ~= ""; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -2989,7 +2976,7 @@ case "body": assert(section == "body"); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -3008,37 +2995,37 @@ case "backmatter": case "para": switch (obj.metainfo.is_a) { case "endnote": assert(section == "endnotes"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; break; case "glossary": assert(section == "glossary"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "bibliography": assert(section == "bibliography"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "bookindex": assert(section == "bookindex"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "blurb": assert(section == "blurb"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "tail": assert(section == "tail"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -3047,7 +3034,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -3064,7 +3051,7 @@ case "backmatter": break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); } } @@ -3133,9 +3120,9 @@ if (obj.metainfo.is_a == "heading") { /+ epub specific documents +/ epubWrite.mimetypes = epub3_mimetypes; epubWrite.meta_inf_container_xml = epub3_container_xml; - epubWrite.oebps_toc_nav_xhtml = doc_abstraction.epub3_oebps_toc_nav_xhtml(doc_matters); - epubWrite.oebps_content_opf = doc_abstraction.epub3_oebps_content(doc_matters, oepbs_content_parts); - epubWrite.epub3_write_output_files(doc_matters); + epubWrite.oebps_toc_nav_xhtml = doc.epub3_oebps_toc_nav_xhtml; + epubWrite.oebps_content_opf = doc.epub3_oebps_content(oepbs_content_parts); + epubWrite.epub3_write_output_files(doc.matters); } #+END_SRC diff --git a/org/output_hub.org b/org/output_hub.org index fb9453a..c87c757 100644 --- a/org/output_hub.org +++ b/org/output_hub.org @@ -32,15 +32,12 @@ module sisudoc.io_out.hub; @safe: template outputHub() { <<output_imports>> - @system void outputHub(D,I)( - const D doc_abstraction, - I doc_matters - ) { + @system void outputHub(D)(D doc) { mixin Msg; - auto msg = Msg!()(doc_matters); + auto msg = Msg!()(doc.matters); enum outTask { source_or_pod, sqlite, sqlite_multi, latex, odt, epub, html_scroll, html_seg, html_stuff } - void Scheduled(D,I)(int sched, D doc_abstraction, I doc_matters) { - auto msg = Msg!()(doc_matters); + void Scheduled(D)(int sched, D doc) { + auto msg = Msg!()(doc.matters); <<output_scheduled_task_source_or_pod>> <<output_scheduled_task_epub>> <<output_scheduled_task_html_meta>> @@ -51,15 +48,15 @@ template outputHub() { <<output_scheduled_task_odt>> <<output_scheduled_task_sqlite>> } - if (doc_matters.opt.action.vox_gt0) { writeln(doc_matters.src.filename_base); } - if (!(doc_matters.opt.action.parallelise_subprocesses)) { - foreach(schedule; doc_matters.opt.action.output_task_scheduler) { - Scheduled!()(schedule, doc_abstraction, doc_matters); + if (doc.matters.opt.action.vox_gt0) { writeln(doc.matters.src.filename_base); } + if (!(doc.matters.opt.action.parallelise_subprocesses)) { + foreach(schedule; doc.matters.opt.action.output_task_scheduler) { + Scheduled!()(schedule, doc); } } else { import std.parallelism; - foreach(schedule; parallel(doc_matters.opt.action.output_task_scheduler)) { - Scheduled!()(schedule, doc_abstraction, doc_matters); + foreach(schedule; parallel(doc.matters.opt.action.output_task_scheduler)) { + Scheduled!()(schedule, doc); } } <<output_shared_sqlite_db>> @@ -134,11 +131,11 @@ import sisudoc.io_out, #+BEGIN_SRC d if (sched == outTask.source_or_pod) { msg.v("spine (doc reform) source processing... "); - if (doc_matters.opt.action.pod) { msg.v("spine (doc reform) source pod processing... "); } + if (doc.matters.opt.action.pod) { msg.v("spine (doc reform) source pod processing... "); } import sisudoc.io_out.source_pod; - spinePod!()(doc_matters); - if (doc_matters.opt.action.source) { msg.vv("spine (doc reform) source done"); } - if (doc_matters.opt.action.pod) { msg.vv("spine (doc reform) source pod done"); } + spinePod!()(doc.matters); + if (doc.matters.opt.action.source) { msg.vv("spine (doc reform) source done"); } + if (doc.matters.opt.action.pod) { msg.vv("spine (doc reform) source pod done"); } } #+END_SRC @@ -149,7 +146,7 @@ if (sched == outTask.source_or_pod) { if (sched == outTask.epub) { msg.v("epub3 processing... "); import sisudoc.io_out.epub3; - doc_abstraction.outputEPub3!()(doc_matters); + doc.outputEPub3!(); msg.vv("epub3 done"); } #+END_SRC @@ -160,7 +157,7 @@ if (sched == outTask.epub) { #+NAME: output_scheduled_task_html_meta #+BEGIN_SRC d if (sched == outTask.html_stuff) { - outputMetadata!()(doc_matters); + outputMetadata!()(doc.matters); msg.vv("html metadata done"); } #+END_SRC @@ -172,7 +169,7 @@ if (sched == outTask.html_stuff) { if (sched == outTask.html_scroll) { msg.v("html scroll processing... "); import sisudoc.io_out.html; - outputHTML!().scroll(doc_abstraction, doc_matters); + outputHTML!().scroll(doc); msg.vv("html scroll done"); } #+END_SRC @@ -184,7 +181,7 @@ if (sched == outTask.html_scroll) { if (sched == outTask.html_seg) { msg.v("html seg processing... "); import sisudoc.io_out.html; - outputHTML!().seg(doc_abstraction, doc_matters); + outputHTML!().seg(doc); msg.vv("html seg done"); } #+END_SRC @@ -195,8 +192,8 @@ if (sched == outTask.html_seg) { #+BEGIN_SRC d if (sched == outTask.html_stuff) { import sisudoc.io_out.html; - outputHTML!().css(doc_matters); - outputHTML!().images_cp(doc_matters); + outputHTML!().css(doc.matters); + outputHTML!().images_cp(doc.matters); msg.vv("html css & images done"); } #+END_SRC @@ -218,17 +215,17 @@ if (sched == outTask.latex) { msg.v("latex processing... (available for downstream processing & pdf output"); import sisudoc.io_out.latex; import std.file; - if ((isValidPath(doc_matters.output_path ~ "/latex/sty")) - && (!(exists(doc_matters.output_path ~ "/latex/sty"))) + if ((isValidPath(doc.matters.output_path ~ "/latex/sty")) + && (!(exists(doc.matters.output_path ~ "/latex/sty"))) ) { outputLaTeXstyInit!()( - doc_matters.output_path, - doc_matters.opt.action.generated_by, - doc_matters.generator_program.name_version_and_compiler, - doc_matters.generator_program.time_output_generated, + doc.matters.output_path, + doc.matters.opt.action.generated_by, + doc.matters.generator_program.name_version_and_compiler, + doc.matters.generator_program.time_output_generated, ); } - outputLaTeX!()(doc_abstraction, doc_matters); + outputLaTeX!()(doc.abstraction, doc.matters); msg.vv("latex done"); } #+END_SRC @@ -240,7 +237,7 @@ if (sched == outTask.latex) { if (sched == outTask.odt) { msg.v("odf:odt processing... "); import sisudoc.io_out.odt; - outputODT!()(doc_abstraction, doc_matters); + outputODT!()(doc.abstraction, doc.matters); msg.vv("odf:odt done"); } #+END_SRC @@ -252,7 +249,7 @@ if (sched == outTask.odt) { if (sched == outTask.sqlite) { msg.v("sqlite processing... "); import sisudoc.io_out.sqlite; - doc_abstraction.SQLiteHubDiscreteBuildTablesAndPopulate!()(doc_matters); + doc.SQLiteHubDiscreteBuildTablesAndPopulate!(); msg.vv("sqlite done"); } #+END_SRC @@ -263,15 +260,15 @@ if (sched == outTask.sqlite) { #+NAME: output_shared_sqlite_db #+BEGIN_SRC d -if (doc_matters.opt.action.sqlite_update) { +if (doc.matters.opt.action.sqlite_update) { msg.v("sqlite update processing..."); import sisudoc.io_out.sqlite; - doc_abstraction.SQLiteHubBuildTablesAndPopulate!()(doc_matters); + doc.SQLiteHubBuildTablesAndPopulate!(); msg.vv("sqlite update done"); -} else if (doc_matters.opt.action.sqlite_delete) { +} else if (doc.matters.opt.action.sqlite_delete) { msg.v("sqlite delete processing..."); import sisudoc.io_out.sqlite; - doc_abstraction.SQLiteHubBuildTablesAndPopulate!()(doc_matters); + doc.SQLiteHubBuildTablesAndPopulate!(); msg.vv("sqlite delete done"); } #+END_SRC diff --git a/org/sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org b/org/sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org index 4084a66..b536386 100644 --- a/org/sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org +++ b/org/sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org @@ -98,7 +98,7 @@ #+NAME: spine_project_version_part_minor #+BEGIN_SRC org -17 +18 #+END_SRC *** patch diff --git a/org/spine.org b/org/spine.org index f6e7faa..51c649c 100644 --- a/org/spine.org +++ b/org/spine.org @@ -1293,8 +1293,6 @@ if ((_opt_action.debug_do) writeln("--->\nstepX commence → (document abstraction) [", manifest.src.filename, "]"); } auto doc = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct); -auto doc_abstraction = doc.abstraction; -auto doc_matters = doc.matters; if ((doc.matters.opt.action.debug_do) || (_opt_action.debug_do_stages) ) { @@ -1416,7 +1414,7 @@ if (!(doc.matters.opt.action.skip_output)) { if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) { writeln("step5 commence → (process outputs) [", manifest.src.filename, "]"); } - doc.abstraction.outputHub!()(doc.matters); + doc.outputHub!(); if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) { writeln("- step5 complete for [", manifest.src.filename, "]"); } diff --git a/org/util_spine_syntax_highlighting_emacs.org b/org/util_spine_syntax_highlighting_emacs.org index 740064b..7272faf 100644 --- a/org/util_spine_syntax_highlighting_emacs.org +++ b/org/util_spine_syntax_highlighting_emacs.org @@ -1,5 +1,5 @@ -*- mode: org -*- -#+TITLE: sisudoc spine (doc_reform) information files +#+TITLE: sisudoc spine (doc_reform) emacs syntax highlighting #+DESCRIPTION: documents - structuring, various output representations & search #+FILETAGS: :spine:info: #+AUTHOR: Ralph Amissah @@ -21,7 +21,7 @@ ** README -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/emacs/README" +#+HEADER: :tangle "../sundry/editor-syntax-etc/emacs/README" #+BEGIN_SRC elisp ; put this into your .emacs file, then use the mode file: @@ -31,7 +31,7 @@ ** autoload sisuspine-mode-autoloads.el -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el" +#+HEADER: :tangle "../sundry/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el" #+BEGIN_SRC elisp (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) (autoload 'sisu-spine-mode "sisu-spine-mode" "\ @@ -47,7 +47,7 @@ and search. ** mode sisu-spine-mode.el -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/emacs/sisu-spine-mode.el" +#+HEADER: :tangle "../sundry/editor-syntax-etc/emacs/sisu-spine-mode.el" #+BEGIN_SRC elisp ;;; sisu-spine-mode.el --- Major mode for SiSU (spine parser) markup text @@ -57,7 +57,8 @@ and search. ;; Maintainer: Ralph Amissah <ralph.amissah@gmail.com> ;; Keywords: text, syntax, processes, tools ;; Version: 8.0.0 -;; URL: https://www.sisudoc.org/ +;; URL: https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/emacs/sisu-spine-mode.el +;; https://sisudoc.org/ ;; originally looked at (based on) doc-mode, with kind permission of the author ;; Author: SUN, Tong <suntong001@users.sf.net>, (c)2001-6, all right reserved ;; Version: $Date: 2006/01/19 03:13:41 $ $Revision: 1.14 $ @@ -199,6 +200,14 @@ and search. (cons "^```[ ]+poem$\\|^```$" 'sisu-general-font-lock-red2) (cons "^```[ ]+alt$\\|^```$" 'sisu-general-font-lock-red2) ;;grouped text --------- + ;(cons "^'''[ ]code\\(.\\|\n\\)+?\n'''\n" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+code.*?$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+table.*?$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+group$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+block$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+poem$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+alt$\\|^'''$" 'sisu-general-font-lock-red2) + ;;grouped text --------- (cons "^group{\\|^}group" 'sisu-general-font-lock-red2) (cons "^block{\\|^}block" 'sisu-general-font-lock-red2) (cons "^code{\\|^}code" 'sisu-general-font-lock-red2) diff --git a/org/util_spine_syntax_highlighting_vim.org b/org/util_spine_syntax_highlighting_vim.org index f4b6c8a..b66b67d 100644 --- a/org/util_spine_syntax_highlighting_vim.org +++ b/org/util_spine_syntax_highlighting_vim.org @@ -1,5 +1,5 @@ -*- mode: org -*- -#+TITLE: sisudoc spine (doc_reform) information files +#+TITLE: sisudoc spine (doc_reform) vim syntax highlighting & colorschemes #+DESCRIPTION: documents - structuring, various output representations & search #+FILETAGS: :spine:info: #+AUTHOR: Ralph Amissah @@ -20,21 +20,21 @@ * Vim Syntax highlighting ** filetype -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/filetype.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/filetype.vim" #+BEGIN_SRC text " SiSU filetype file if exists("did_load_filetypes") finish endif augroup filetypedetect - au! BufNewFile,BufRead *.sst,*.ssm,*.ssi,*.-sst setf sisu - au! BufNewFile,BufRead *._sst,*.sst.meta,*.-sst.meta,*._sst.meta setf sisu + au! BufNewFile,BufRead *.sst,*.ssm,*.ssi,*.-sst setf sisu-spine + au! BufNewFile,BufRead *._sst,*.sst.meta,*.-sst.meta,*._sst.meta setf sisu-spine augroup END #+END_SRC ** debian vim addon manager -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/vim-sisu.yaml" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/vim-sisu.yaml" #+BEGIN_SRC text #vim-addons: debian vim-addon-manager addon: sisu @@ -45,326 +45,827 @@ files: - syntax/sisu.vim #+END_SRC +** markup syntax +*** sisu.vim + +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/syntax/sisu.vim" +#+BEGIN_SRC text +" SiSU Vim syntax file +" SiSU Maintainer: Ralph Amissah <ralph.amissah@gmail.com> +" SiSU Markup: SiSU (sisu-5.6.7) +" Last Change: 2017-06-22 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/syntax/sisu.vim> +" <https://sisudoc.org/> +"(originally looked at Ruby Vim by Mirko Nasato) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +else +endif +let s:cpo_save = &cpo +set cpo&vim + +"% "Errors: +syn match sisu_error contains=sisu_link,sisu_error_wspace "<![^ei]\S\+!>" + +"% "Markers Identifiers: +if !exists("sisu_no_identifiers") + syn match sisu_mark_endnote "\~^" + syn match sisu_break contains=@NoSpell " \\\\\( \|$\)\|<br>\|<br />" + syn match sisu_control contains=@NoSpell "^\(-\\\\-\|=\\\\=\|-\.\.-\|<:p[bn]>\)\s*$" + syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" + syn match sisu_marktail contains=@NoSpell "^--[+~-]#\s*$" + syn match sisu_marktail "[~-]#" + syn match sisu_control "\"" + syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" + syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" + syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+" + syn match sisu_link " \*\~\S\+" + syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^./_-]\+\.ss[it]$" + syn match sisu_structure "^:A\~$" + +"% "Document Sub Headers: + syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content + syn match sisu_sub_header_creator "^\s\+:\(author\|editor\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution + syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license + syn match sisu_sub_header_classify "^\s\+:\(topic_register\|keywords\|subject\|dewey\|loc\):\s" + syn match sisu_sub_header_identifier "^\s\+:\(oclc\|isbn\):\s" + syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" + syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|substitute\|omit\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|stamp\|promo\|ad\|manpage\|home_button_text\|home_button_image\|cover_image\|footer\):\s" + syn match sisu_sub_header_notes "^\s\+:\(description\|abstract\|comment\|coverage\|relation\|source\|history\|type\|format\|prefix\|prefix_[ab]\|suffix\):\s" + syn match sisu_within_index_ignore "\S\+[:;]\(\s\+\|$\)" + syn match sisu_within_index "[:|;]\|+\d\+" + +"% "semantic markers: (ignore) + syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" + syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" + syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" + syn match sisu_sem_ex_marker_block "\([a-z][a-z._]*\|\):\[\|\]:[a-z._]*[a-z]" + syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):{[^}].\{-}}:\1" + syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";{[^}].\{-}};[a-z]\+" + syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):\[[^}].\{-}\]:\1" + syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+" +endif + +"% "URLs Numbers And ASCII Codes: +syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" +syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" + +"% "Tuned Error: (is error if not already matched) +syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" +syn match sisu_error contains=sisu_error "<a href\|</a>]" + +"% "Simple Paired Enclosed Markup: +"url/link +syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" + +"% "Document Header: +" title +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" creator +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" dates +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" publisher +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" rights +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" classify document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" identifier document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_identifier matchgroup=sisu_header start="^[@]identifier:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" original language (depreciated) +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" notes +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" links of interest +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" make, processing instructions +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" + +"% "Headings: +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-4]\|:\?[A-D]\)\~\(\S\+\|[^-]\)" end="$" + +"% "Block Group Text: +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+table" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" +" block, group, poem, alt +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\z(block\|group\|poem\|alt\){" end="^}\z1" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\(block\|group\|poem\|alt\)" end="^```\(\s\|$\)" +" box +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^box\(\.[a-z]\+\)\?{" end="^}box" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\box\(\.[a-z]\+\)\?" end="^```\(\s\|$\)" +" code +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^code\(\.[a-z][0-9a-z_]\+\)\?{" end="^}code" +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^```\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^```\(\s\|$\)" +" quote +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^```\s\+quote" end="^```\(\s\|$\)" + +"% "Endnotes: +" regular endnote or asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" +" numbered asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" +" endnote content marker (for binary content marking) +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" + +"% "Links And Images: +" image with url link (and possibly footnote of url) +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|:\|\.\.\/\|#\)\S\+" oneline +" sisu outputs, short notation +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline +" image +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline + +"% "Some Line Operations: +" bold line +syn region sisu_bold contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^!_ " end=" \\\\\|$" +" indent and bullet paragraph +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" +" indent and bullet (bold start) paragraph +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\)!_\? " end=" \\\\\|$" +" hanging indent paragraph [proposed] +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9] " end="$" +" hanging indent (bold start/ definition) paragraph [proposed] +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9]!_\? " end=" \\\\\|$" +" list numbering +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" + +"% "Font Face Curly Brackets: +"syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline +" book index: +syn region sisu_index contains=sisu_within_index_ignore,sisu_within_index matchgroup=sisu_index_block start="^={" end="}" +" emphasis: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +" bold: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +" underscore: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +" italics: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +" added: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +" superscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +" subscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +" monospace: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" +" strikethrough: +syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" + +"% "Single Words Bold Italicise Etc: (depreciated) +syn region sisu_bold contains=sisu_error matchgroup=sisu_bold start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline +syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline +"misc +syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline + +"% "Expensive Mode: +if !exists("sisu_no_expensive") +else " not Expensive + syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline +endif " Expensive? + +"% "Headers And Headings: (Document Instructions) +syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" +syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" + +"% "Errors: +syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+[^:]" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\+$" +syn match sisu_error contains=sisu_error_wspace "\t\+" +syn match sisu_error contains=sisu_error,sisu_error_wspace "\([^ (][_\\]\||[^ (}]\)https\?:\S\+" +syn match sisu_error contains=sisu_error "_\?https\?:\S\+[}><]" +syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n$" +syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n$" +syn match sisu_error contains=sisu_error "\s\+.{{" +syn match sisu_error contains=sisu_error "^\~\s*$" +syn match sisu_error contains=sisu_error "^0\~.*" +syn match sisu_error contains=sisu_error "^[1-9]\~\s*$" +syn match sisu_error contains=sisu_error "^[1-9]\~\S\+\s*$" +syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]" +syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*" +syn match sisu_error contains=sisu_error "{\~^\S\+" +syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]" +syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']" +syn match sisu_error contains=sisu_error "<dir>" +"errors for filetype sisu, though not error in 'metaverse': +syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" +syn match sisu_error "/\?<\([biu]\)>[^(</\1>)]\{-}\n$" + +"% "Error Exceptions: +syn match sisu_control "\n$" "contains=ALL +"syn match sisu_control " //" +syn match sisu_error "%{" +syn match sisu_error "<br>_\?https\?:\S\+\|_\?https\?:\S\+<br>" +syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]" +syn match sisu_comment "^%\{1,2\}.\+" + +"% "Definitions Default Highlighting: +hi def link sisu_normal Normal +hi def link sisu_bold Statement +hi def link sisu_header PreProc +hi def link sisu_header_content Normal +hi def link sisu_sub_header_title Statement +hi def link sisu_sub_header_creator Statement +hi def link sisu_sub_header_date Statement +hi def link sisu_sub_header_publisher Statement +hi def link sisu_sub_header_rights Statement +hi def link sisu_sub_header_classify Statement +hi def link sisu_sub_header_identifier Statement +hi def link sisu_sub_header_original Statement +hi def link sisu_sub_header_links Statement +hi def link sisu_sub_header_notes Statement +hi def link sisu_sub_header_make Statement +hi def link sisu_heading Title +hi def link sisu_structure Operator +hi def link sisu_contain Include +hi def link sisu_mark_endnote Delimiter +hi def link sisu_require NonText +hi def link sisu_link NonText +hi def link sisu_linked String +hi def link sisu_fontface Delimiter +hi def link sisu_strikeout DiffDelete +hi def link sisu_content_alt Special +hi def link sisu_sem_content SpecialKey +hi def link sisu_sem_block Special +hi def link sisu_sem_marker Visual +"hi def link sisu_sem_marker Structure +hi def link sisu_sem_marker_block MatchParen +hi def link sisu_sem_ex_marker FoldColumn +hi def link sisu_sem_ex_marker_block Folded +hi def link sisu_sem_ex_content Comment +"hi def link sisu_sem_ex_content SpecialKey +hi def link sisu_sem_ex_block Comment +hi def link sisu_index SpecialKey +hi def link sisu_index_block Visual +hi def link sisu_content_endnote Special +hi def link sisu_control Delimiter +hi def link sisu_within_index Delimiter +hi def link sisu_within_index_ignore SpecialKey +hi def link sisu_ocn Include +hi def link sisu_number Number +hi def link sisu_identifier Function +hi def link sisu_underline Underlined +hi def link sisu_markpara Include +hi def link sisu_marktail Include +hi def link sisu_mark Identifier +hi def link sisu_break Structure +hi def link sisu_html Type +hi def link sisu_action Identifier +hi def link sisu_comment Comment +hi def link sisu_error_sem_marker Error +hi def link sisu_error_wspace Error +hi def link sisu_error Error +let b:current_syntax = "sisu" +let &cpo = s:cpo_save +unlet s:cpo_save +#+END_SRC + +*** sisu-spine.vim + +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/syntax/sisu-spine.vim" +#+BEGIN_SRC text +" SiSU Vim syntax file (sisu-spine) +" SiSU Maintainer: Ralph Amissah <ralph.amissah@gmail.com> +" SiSU Markup: SiSU (sisu-5.6.7) +" sisu-spine Markup: sisu-spine +" Last Change: 2017-06-22, 2025-02-21 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/syntax/sisu-spine.vim> +" <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/syntax/sisu.vim> +" <https://sisudoc.org/> +"(originally looked at Ruby Vim by Mirko Nasato) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +else +endif +let s:cpo_save = &cpo +set cpo&vim + +"% "Errors: +syn match sisu_error contains=sisu_link,sisu_error_wspace "<![^ei]\S\+!>" + +"% "Markers Identifiers: +if !exists("sisu_no_identifiers") + syn match sisu_mark_endnote "\~^" + syn match sisu_break contains=@NoSpell " \\\\\( \|$\)\|<br>\|<br />" + syn match sisu_control contains=@NoSpell "^\(-\\\\-\|=\\\\=\|-\.\.-\|<:p[bn]>\)\s*$" + syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" + syn match sisu_marktail contains=@NoSpell "^--[+~-]#\s*$" + syn match sisu_marktail "[~-]#" + syn match sisu_control "\"" + syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" + syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" + syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+" + syn match sisu_link " \*\~\S\+" + syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^./_-]\+\.ss[it]$" + syn match sisu_structure "^:A\~$" + +"% "Document Sub Headers: + syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content + syn match sisu_sub_header_creator "^\s\+:\(author\|editor\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution + syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license + syn match sisu_sub_header_classify "^\s\+:\(topic_register\|keywords\|subject\|dewey\|loc\):\s" + syn match sisu_sub_header_identifier "^\s\+:\(oclc\|isbn\):\s" + syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" + syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|substitute\|omit\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|stamp\|promo\|ad\|manpage\|home_button_text\|home_button_image\|cover_image\|footer\):\s" + syn match sisu_sub_header_notes "^\s\+:\(description\|abstract\|comment\|coverage\|relation\|source\|history\|type\|format\|prefix\|prefix_[ab]\|suffix\):\s" + syn match sisu_within_index_ignore "\S\+[:;]\(\s\+\|$\)" + syn match sisu_within_index "[:|;]\|+\d\+" + +"% "semantic markers: (ignore) + syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" + syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" + syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" + syn match sisu_sem_ex_marker_block "\([a-z][a-z._]*\|\):\[\|\]:[a-z._]*[a-z]" + syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):{[^}].\{-}}:\1" + syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";{[^}].\{-}};[a-z]\+" + syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):\[[^}].\{-}\]:\1" + syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+" +endif + +"% "URLs Numbers And ASCII Codes: +syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" +syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" + +"% "Tuned Error: (is error if not already matched) +syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" +syn match sisu_error contains=sisu_error "<a href\|</a>]" + +"% "Simple Paired Enclosed Markup: +"url/link +syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" + +"% "Document Header: +" title +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" creator +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" dates +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" publisher +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" rights +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" classify document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" identifier document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_identifier matchgroup=sisu_header start="^[@]identifier:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" original language (depreciated) +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" notes +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" links of interest +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" make, processing instructions +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" + +"% "Headings: +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-4]\|:\?[A-D]\)\~\(\S\+\|[^-]\)" end="$" + +"% "Block Group Text: +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+table" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^'''\s\+table" end="^'''\(\s\|$\)" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" +" block, group, poem, alt +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\z(block\|group\|poem\|alt\){" end="^}\z1" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\(block\|group\|poem\|alt\)" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^'''\s\+\(block\|group\|poem\|alt\)" end="^'''\(\s\|$\)" +" box +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^box\(\.[a-z]\+\)\?{" end="^}box" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\box\(\.[a-z]\+\)\?" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^'''\s\+\box\(\.[a-z]\+\)\?" end="^'''\(\s\|$\)" +" code +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^code\(\.[a-z][0-9a-z_]\+\)\?{" end="^}code" +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^```\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^'''\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^'''\(\s\|$\)" +" quote +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^```\s\+quote" end="^```\(\s\|$\)" +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^'''\s\+quote" end="^'''\(\s\|$\)" + +"% "Endnotes: +" regular endnote or asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" +" numbered asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" +" endnote content marker (for binary content marking) +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" + +"% "Links And Images: +" image with url link (and possibly footnote of url) +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|:\|\.\.\/\|#\)\S\+" oneline +" sisu outputs, short notation +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline +" image +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline + +"% "Some Line Operations: +" bold line +syn region sisu_bold contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^!_ " end=" \\\\\|$" +" indent and bullet paragraph +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" +" indent and bullet (bold start) paragraph +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\)!_\? " end=" \\\\\|$" +" hanging indent paragraph [proposed] +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9] " end="$" +" hanging indent (bold start/ definition) paragraph [proposed] +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9]!_\? " end=" \\\\\|$" +" list numbering +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" + +"% "Font Face Curly Brackets: +"syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline +" book index: +syn region sisu_index contains=sisu_within_index_ignore,sisu_within_index matchgroup=sisu_index_block start="^={" end="}" +" emphasis: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +" bold: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +" underscore: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +" italics: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +" added: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +" superscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +" subscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +" monospace: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" +" strikethrough: +syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" + +"% "Single Words Bold Italicise Etc: (depreciated) +syn region sisu_bold contains=sisu_error matchgroup=sisu_bold start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline +syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline +"misc +syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline + +"% "Expensive Mode: +if !exists("sisu_no_expensive") +else " not Expensive + syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline +endif " Expensive? + +"% "Headers And Headings: (Document Instructions) +syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" +syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" + +"% "Errors: +syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+[^:]" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\+$" +syn match sisu_error contains=sisu_error_wspace "\t\+" +syn match sisu_error contains=sisu_error,sisu_error_wspace "\([^ (][_\\]\||[^ (}]\)https\?:\S\+" +syn match sisu_error contains=sisu_error "_\?https\?:\S\+[}><]" +syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n$" +syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n$" +syn match sisu_error contains=sisu_error "\s\+.{{" +syn match sisu_error contains=sisu_error "^\~\s*$" +syn match sisu_error contains=sisu_error "^0\~.*" +syn match sisu_error contains=sisu_error "^[1-9]\~\s*$" +syn match sisu_error contains=sisu_error "^[1-9]\~\S\+\s*$" +syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]" +syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*" +syn match sisu_error contains=sisu_error "{\~^\S\+" +syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]" +syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']" +syn match sisu_error contains=sisu_error "<dir>" +"errors for filetype sisu, though not error in 'metaverse': +syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" +syn match sisu_error "/\?<\([biu]\)>[^(</\1>)]\{-}\n$" + +"% "Error Exceptions: +syn match sisu_control "\n$" "contains=ALL +"syn match sisu_control " //" +syn match sisu_error "%{" +syn match sisu_error "<br>_\?https\?:\S\+\|_\?https\?:\S\+<br>" +syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]" +syn match sisu_comment "^%\{1,2\}.\+" + +"% "Definitions Default Highlighting: +hi def link sisu_normal Normal +hi def link sisu_bold Statement +hi def link sisu_header PreProc +hi def link sisu_header_content Normal +hi def link sisu_sub_header_title Statement +hi def link sisu_sub_header_creator Statement +hi def link sisu_sub_header_date Statement +hi def link sisu_sub_header_publisher Statement +hi def link sisu_sub_header_rights Statement +hi def link sisu_sub_header_classify Statement +hi def link sisu_sub_header_identifier Statement +hi def link sisu_sub_header_original Statement +hi def link sisu_sub_header_links Statement +hi def link sisu_sub_header_notes Statement +hi def link sisu_sub_header_make Statement +hi def link sisu_heading Title +hi def link sisu_structure Operator +hi def link sisu_contain Include +hi def link sisu_mark_endnote Delimiter +hi def link sisu_require NonText +hi def link sisu_link NonText +hi def link sisu_linked String +hi def link sisu_fontface Delimiter +hi def link sisu_strikeout DiffDelete +hi def link sisu_content_alt Special +hi def link sisu_sem_content SpecialKey +hi def link sisu_sem_block Special +hi def link sisu_sem_marker Visual +"hi def link sisu_sem_marker Structure +hi def link sisu_sem_marker_block MatchParen +hi def link sisu_sem_ex_marker FoldColumn +hi def link sisu_sem_ex_marker_block Folded +hi def link sisu_sem_ex_content Comment +"hi def link sisu_sem_ex_content SpecialKey +hi def link sisu_sem_ex_block Comment +hi def link sisu_index SpecialKey +hi def link sisu_index_block Visual +hi def link sisu_content_endnote Special +hi def link sisu_control Delimiter +hi def link sisu_within_index Delimiter +hi def link sisu_within_index_ignore SpecialKey +hi def link sisu_ocn Include +hi def link sisu_number Number +hi def link sisu_identifier Function +hi def link sisu_underline Underlined +hi def link sisu_markpara Include +hi def link sisu_marktail Include +hi def link sisu_mark Identifier +hi def link sisu_break Structure +hi def link sisu_html Type +hi def link sisu_action Identifier +hi def link sisu_comment Comment +hi def link sisu_error_sem_marker Error +hi def link sisu_error_wspace Error +hi def link sisu_error Error +let b:current_syntax = "sisu" +let &cpo = s:cpo_save +unlet s:cpo_save +#+END_SRC + ** color files *** def.vim -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/colors/def.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/def.vim" #+BEGIN_SRC text -" Vim color file -" Name: def -" Maintainer: Ralph Amissah <ralph@amissah.com> -" Last Change: 2013-02-14 -" URL: <https://git.sisudoc.org/projects/?p=software/spine.git;a=blob;f=data/sisu/conf/editor-syntax-etc/vim/colors/def.vim;hb=HEAD> -" Note: primarily 16 color cterm improved by tweaking of .Xdefaults +"%% Vim color file +" Name: def +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14, 2016-07-28, 2022-09-05 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/def.vim> +" <https://sisudoc.org/> +" Note: primarily 16 color cterm improved by tweaking of .Xdefaults " (with occasional other colors selected from 256 color palate) " .Xdefaults tweaking to make identical to def (256) provided, " along with an alternative possibility using colors beyond " 256 color palate -:hi clear -if exists("syntax_on") - syntax reset -endif -:set t_Co=256 -:set background=dark -:let colors_name = "def" -" ------- -" terminal def -" ------- -:hi Normal ctermbg=0 ctermfg=7 -":hi Cursor ctermbg=5 ctermfg=0 -:hi lCursor cterm=reverse -:hi StatusLine cterm=bold,reverse -:hi StatusLineNC cterm=reverse -:hi Search cterm=none ctermbg=57 ctermfg=0 -:hi IncSearch cterm=none ctermbg=154 ctermfg=0 -:hi SpecialKey ctermfg=4 -:hi Visual cterm=reverse -:hi VisualNOS cterm=bold,underline -:hi MoreMsg ctermfg=2 -:hi ModeMsg cterm=bold -:hi Question ctermfg=2 -:hi Title cterm=bold ctermfg=3 -:hi NonText cterm=bold ctermfg=4 -:hi LineNr cterm=bold ctermbg=0 ctermfg=0* -:hi CursorLineNr cterm=bold ctermbg=166 ctermfg=0 -:hi Directory ctermfg=4 -:hi WildMenu ctermbg=3 ctermfg=0 -:hi VertSplit cterm=reverse -:hi Folded cterm=none ctermbg=0 ctermfg=8 -:hi FoldColumn ctermbg=7 ctermfg=4 -:hi DiffAdd cterm=none ctermbg=2 ctermfg=0 -:hi DiffChange cterm=none ctermbg=7 ctermfg=0 -:hi DiffDelete cterm=none ctermbg=7 ctermfg=0 -:hi DiffText cterm=none ctermbg=6 ctermfg=0 -:hi String cterm=none ctermfg=3 -:hi Comment cterm=none ctermbg=0 ctermfg=4 -:hi Constant ctermfg=1 -:hi Special ctermfg=6 -:hi Identifier ctermfg=6 -:hi Statement ctermfg=2 -:hi Operator ctermfg=2 -:hi PreProc ctermfg=1 -:hi Type cterm=bold ctermfg=3 -:hi Delimiter cterm=none ctermfg=2 -:hi Ignore cterm=bold ctermfg=7 -:hi Todo ctermbg=3 ctermfg=0 -:hi Underlined cterm=underline -:hi Include ctermfg=1 -:hi Define ctermfg=3 -:hi Function ctermfg=6 -:hi Structure ctermfg=2 -:hi MatchParen cterm=bold ctermbg=4 ctermfg=7 -:hi CursorLine cterm=bold -:hi CursorColumn ctermbg=17 -:hi ColorColumn ctermbg=17 -:hi SpellBad cterm=underline ctermbg=0 ctermfg=5 -:hi SpellCap cterm=underline ctermbg=0 ctermfg=5 -:hi SpellLocal cterm=underline ctermbg=0 ctermfg=5 -:hi SpellRare cterm=underline ctermbg=0 ctermfg=5 -:hi TrailingWhitespace ctermbg=1 -:hi ExtraWhitespace ctermbg=1 -:hi WarningMsg ctermfg=1 -:hi ErrorMsg cterm=bold ctermbg=1 ctermfg=7 -:hi Error cterm=bold ctermbg=1 ctermfg=7 -" ------- -" gui def -" ------- -:hi Normal guibg=#000000 guifg=#D3D3D3 -:hi Cursor guibg=#CC9966 guifg=#000000 -:hi lCursor gui=reverse -:hi StatusLine gui=bold,reverse -:hi StatusLineNC gui=reverse -:hi Search gui=none guibg=#5F00FF guifg=#000000 -:hi IncSearch gui=none guibg=#AFFF00 guifg=#000000 -:hi SpecialKey guifg=#5971AD -:hi Visual gui=reverse -:hi VisualNOS gui=bold,underline -:hi MoreMsg guifg=#4E9A06 -:hi ModeMsg gui=bold -:hi Question guifg=#4E9A06 -:hi Title gui=bold guifg=#C4A000 -:hi NonText gui=bold guifg=#5971AD -:hi LineNr gui=bold guibg=#000000 guifg=#808080 -:hi CursorLineNr gui=bold guibg=#D75F00 guifg=#000000 -:hi Directory guifg=#5971AD -:hi WildMenu guibg=#C4A000 guifg=#000000 -:hi VertSplit gui=reverse -:hi Folded gui=none guibg=#000000 guifg=#808080 -:hi FoldColumn guibg=#D3D3D3 guifg=#5971AD -:hi DiffAdd gui=none guibg=#4E9A06 guifg=#000000 -:hi DiffChange gui=none guibg=#D3D3D3 guifg=#000000 -:hi DiffDelete gui=none guibg=#D3D3D3 guifg=#000000 -:hi DiffText gui=none guibg=#06989A guifg=#000000 -:hi String gui=none guifg=#C4A000 -:hi Comment gui=none guibg=#000000 guifg=#5971AD -:hi Constant guifg=#CC0000 -:hi Special guifg=#06989A -:hi Identifier guifg=#06989A -:hi Statement guifg=#4E9A06 -:hi Operator guifg=#4E9A06 -:hi PreProc guifg=#CC0000 -:hi Type gui=bold guifg=#C4A000 -:hi Delimiter gui=none guifg=#4E9A06 -:hi Ignore gui=bold guifg=#D3D3D3 -:hi Todo guibg=#C4A000 guifg=#000000 -:hi Underlined gui=underline -:hi Include guifg=#CC0000 -:hi Define guifg=#C4A000 -:hi Function guifg=#06989A -:hi Structure guifg=#4E9A06 -:hi MatchParen gui=bold guibg=#5971AD guifg=#D3D3D3 -:hi CursorLine gui=bold -:hi CursorColumn guibg=#00005F -:hi ColorColumn guibg=#00005F -:hi SpellBad gui=underline guibg=#000000 guifg=#75507B -:hi SpellCap gui=underline guibg=#000000 guifg=#75507B -:hi SpellLocal gui=underline guibg=#000000 guifg=#75507B -:hi SpellRare gui=underline guibg=#000000 guifg=#75507B -:hi TrailingWhitespace guibg=#080000 -:hi ExtraWhitespace guibg=#CC0000 -:hi WarningMsg guifg=#CC0000 -:hi ErrorMsg gui=bold guibg=#CC0000 guifg=#D3D3D3 -:hi Error gui=bold guibg=#CC0000 guifg=#D3D3D3 -" ------- -"256 color .Xdefaults vim: cterm giu -"<https://vim.wikia.com/wiki/Xterm256_color_names_for_console_Vim> -"<https://guns.github.com/xterm-color-table.vim/images/xterm-color-table-with-visible-rgb.png> -" ------- -" 256 color .Xdefaults vim: cterm giu def -" ------- -" 16 color standard altered 256 altered beyond 256 -" black/dark grey -" 0 [ 0:#000000] #000000 -" 8 [ 8:#808080] [59:#5F5F5F] #555555 -" red -" 1 [ 1:#800000] 160:#DF0000 #CC0000 -" 9 [ 9:#FF0000] #EF2929 -" green -" 2 [ 2:#008000] 112:#87DF00 #4E9A06 -" 10 [10:#00FF00] 154:#AFFF00 #8AE234 -" yellow/orange -" 3 [ 3:#808000] 178:#DFAF00 #C4A000 -" 11 [11:#FFFF00] 184:#DFDF00 #FC9E4F -" blue -" 4 [ 4:#000080] 24:#005F87 #5971AD -" 12 [12:#0000FF] 73:#5FAFAF #729FCF -" magenta -" 5 [ 5:#800080] 90:#870087 #75507B -" 13 [13:#FF00FF] 126:#AF0087 #AD7FA8 -" cyan -" 6 [ 6:#008080] 37:#00AFAF #06989A -" 14 [14:#00FFFF] 87:#5FFFFF #34E2E2 -" white -" 7 [ 7:#C0C0C0] #D3D3D3 -" 15 [15:#FFFFFF] #EEEEEE -" -------- -" .Xdefaults (rxvt urxvt setting beyond 256 colors, vim colorscheme "def" gui settings) -" (vim colorscheme "def" cterm matches "def" gui if .Xdefaults set thus) -" -------- -" ! black -" Rxvt.color0 : #000000 -" Rxvt.color8 : #555555 -" ! red -" Rxvt.color1 : #CC0000 -" Rxvt.color9 : #EF2929 -" ! green -" Rxvt.color2 : #4E9A06 -" Rxvt.color10 : #8AE234 -" ! yellow -" Rxvt.color3 : #C4A000 -" Rxvt.color11 : #FCE94F -" ! blue -" Rxvt.color4 : #5971AD -" Rxvt.color12 : #729FCF -" ! magenta -" Rxvt.color5 : #75507B -" Rxvt.color13 : #AD7FA8 -" ! cyan -" Rxvt.color6 : #06989A -" Rxvt.color14 : #34E2E2 -" ! white -" Rxvt.color7 : #D3D7CF -" Rxvt.color15 : #EEEEEE -" -------- -" .Xdefaults 256 (rxvt urxvt setting, vim colorscheme "def256" cterm & gui settings) -" (vim colorscheme "def" cterm matches "def256" if .Xdefaults set thus) -" -------- -" ! black -" Rxvt.color0 : #000000 -" Rxvt.color8 : #808080 -" ! red -" Rxvt.color1 : #DF0000 -" Rxvt.color9 : #FF0000 -" ! green -" Rxvt.color2 : #87DF00 -" Rxvt.color10 : #AFFF00 -" ! yellow -" Rxvt.color3 : #DFAF00 -" Rxvt.color11 : #FFFF00 -" ! blue -" Rxvt.color4 : #5F87DF -" Rxvt.color12 : #87DFFF -" ! magenta -" Rxvt.color5 : #8700DF -" Rxvt.color13 : #87DFFF -" ! cyan -" Rxvt.color6 : #00DFDF -" Rxvt.color14 : #5F5FDF -" ! white -" Rxvt.color7 : #C0C0C0 -" Rxvt.color15 : #FFFFFF +: hi clear +: if exists("syntax_on") | syntax reset | endif +: let colors_name = "def" +: set t_Co=256 +: set background=dark +" ------- +" terminal def +" ------- +: hi Normal ctermfg=7 ctermbg=236 +: hi Cursor ctermfg=0 ctermbg=166 +: hi lCursor cterm=reverse +: hi CursorLine cterm=bold,underline "ctermul=166 "bg:236,59 +: hi CursorLineNr cterm=bold ctermfg=0 ctermbg=166 +: hi LineNr cterm=bold ctermfg=59 ctermbg=16 +: hi StatusLine cterm=bold,reverse +: hi StatusLineNC cterm=reverse +: hi StatusLineTerm cterm=bold ctermfg=15 ctermbg=2 +: hi StatusLineTermNC ctermfg=15 ctermbg=2 +: hi ColorColumn cterm=none ctermfg=231 ctermbg=236 "bg:233,59,242,67 +" hi ColorColumn cterm=inverse +" hi ColorColumn ctermfg=16 ctermbg=235 +" hi ColorColumn ctermfg=5 ctermbg=90 +: hi Folded cterm=none ctermfg=67 ctermbg=16 "fg:248,59,242,3,2,67 +" hi Folded cterm=none ctermfg=59 ctermbg=16 "fg:248,59,242,3 +: hi FoldColumn ctermfg=4 ctermbg=69 +: hi Search cterm=none ctermfg=0 ctermbg=57 "bg:57,11 +: hi IncSearch cterm=none ctermfg=0 ctermbg=154 +: hi SpecialKey ctermfg=4 +: hi Visual cterm=reverse +: hi VisualNOS cterm=bold,underline +: hi MoreMsg ctermfg=2 +: hi ModeMsg cterm=bold +: hi Question ctermfg=2 +: hi Title cterm=bold ctermfg=3 +: hi NonText cterm=bold ctermfg=4 +: hi Directory ctermfg=4 +: hi WildMenu ctermfg=0 ctermbg=3 +: hi VertSplit cterm=reverse +: hi DiffAdd cterm=none ctermfg=0 ctermbg=2 +: hi DiffChange cterm=none ctermfg=0 ctermbg=7 +: hi DiffDelete cterm=none ctermfg=0 ctermbg=7 +: hi DiffText cterm=none ctermfg=0 ctermbg=6 +: hi String cterm=none ctermfg=3 +: hi Comment cterm=none ctermfg=4 +: hi Constant ctermfg=1 +: hi Special ctermfg=6 "fg:67,140,5 +: hi Identifier cterm=none ctermfg=2 "bg:172,4,2 (default usually bold; choose orange, blue or lime green) +: hi Statement ctermfg=4 +: hi Operator ctermfg=2 +: hi PreProc ctermfg=1 "fg:2,5,140 +: hi Type ctermfg=3 "fg:67,2 +: hi Include ctermfg=1 "fg:124,140,5 +: hi Delimiter cterm=none ctermfg=2 +: hi Ignore cterm=bold ctermfg=7 +: hi Todo ctermfg=0 ctermbg=3 +: hi Underlined cterm=underline "ctermul=166 "fg:4,6 +: hi Define ctermfg=3 +: hi Function ctermfg=6 +: hi Structure ctermfg=2 +: hi MatchParen cterm=bold ctermfg=7 ctermbg=4 +: hi SpellBad cterm=underline ctermfg=5 ctermbg=0 +: hi SpellCap cterm=underline ctermfg=5 ctermbg=0 +: hi SpellLocal cterm=underline ctermfg=5 ctermbg=0 +: hi SpellRare cterm=underline ctermfg=5 ctermbg=0 +: hi TrailingWhitespace ctermbg=1 +: hi ExtraWhitespace ctermbg=1 +: hi WarningMsg ctermfg=1 +: hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +: hi Error cterm=bold ctermfg=7 ctermbg=1 +: if &diff +: highlight! link DiffText MatchParen +: endif +" ------- +" gui def +" ------- +: hi Normal guifg=#D3D3D3 guibg=#000000 +: hi Cursor guifg=#000000 guibg=#CC9966 +: hi lCursor gui=reverse +: hi CursorLine gui=bold +: hi CursorLineNr gui=bold guifg=#000000 guibg=#D75F00 +: hi CursorColumn guibg=#00005F +: hi LineNr gui=bold guifg=#808080 guibg=#000000 +: hi StatusLine gui=bold,reverse +: hi StatusLineNC gui=reverse +: hi Search gui=none guifg=#000000 guibg=#5F00FF +: hi IncSearch gui=none guifg=#000000 guibg=#AFFF00 +: hi SpecialKey guifg=#5971AD +: hi Visual gui=reverse +: hi VisualNOS gui=bold,underline +: hi MoreMsg guifg=#4E9A06 +: hi ModeMsg gui=bold +: hi Question guifg=#4E9A06 +: hi Title gui=bold guifg=#C4A000 +: hi NonText gui=bold guifg=#5971AD +: hi Directory guifg=#5971AD +: hi WildMenu guifg=#000000 guibg=#C4A000 +: hi VertSplit gui=reverse +: hi Folded gui=none guifg=#808080 guibg=#000000 +: hi FoldColumn guifg=#5971AD guibg=#D3D3D3 +: hi DiffAdd gui=none guifg=#000000 guibg=#4E9A06 +: hi DiffChange gui=none guifg=#000000 guibg=#D3D3D3 +: hi DiffDelete gui=none guifg=#000000 guibg=#D3D3D3 +: hi DiffText gui=none guifg=#000000 guibg=#06989A +: hi String gui=none guifg=#C4A000 +: hi Comment gui=none guifg=#5971AD guibg=#000000 +: hi Constant guifg=#CC0000 +: hi Special guifg=#06989A +: hi Identifier guifg=#06989A +: hi Statement guifg=#4E9A06 +: hi Operator guifg=#4E9A06 +: hi PreProc guifg=#CC0000 +: hi Type gui=bold guifg=#C4A000 +: hi Delimiter gui=none guifg=#4E9A06 +: hi Ignore gui=bold guifg=#D3D3D3 +: hi Todo guifg=#000000 guibg=#C4A000 +: hi Underlined gui=underline +: hi Include guifg=#CC0000 +: hi Define guifg=#C4A000 +: hi Function guifg=#06989A +: hi Structure guifg=#4E9A06 +: hi MatchParen gui=bold guifg=#D3D3D3 guibg=#5971AD +: hi ColorColumn guibg=#00005F +: hi SpellBad gui=underline guifg=#75507B guibg=#000000 +: hi SpellCap gui=underline guifg=#75507B guibg=#000000 +: hi SpellLocal gui=underline guifg=#75507B guibg=#000000 +: hi SpellRare gui=underline guifg=#75507B guibg=#000000 +: hi TrailingWhitespace guibg=#080000 +: hi ExtraWhitespace guibg=#CC0000 +: hi WarningMsg guifg=#CC0000 +: hi ErrorMsg gui=bold guifg=#D3D3D3 guibg=#CC0000 +: hi Error gui=bold guifg=#D3D3D3 guibg=#CC0000 #+END_SRC *** slate.vim -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/colors/slate.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/slate.vim" #+BEGIN_SRC text "%% SiSU Vim color file -" Name: Slate -" Maintainer: Ralph Amissah <ralph@amissah.com> -" Last Change: 2013-02-09 -" URL: <https://git.sisudoc.org/projects/?p=software/spine.git;a=blob;f=data/sisu/conf/editor-syntax-etc/vim/colors/slate.vim;hb=HEAD> -" Notes: cterm now uses frugal-sisu 8 colors for term -" (for gui originally looked at desert Hans Fugal <hans@fugal.net> -" <https://hans.fugal.net/vim/colors/desert.vim> (April/May 2003)) -:set background=dark -:hi clear -if exists("syntax_on") - syntax reset -endif -:let colors_name = "slate" -" 0 = black, 1 = red, 2 = green, 3 = yellow/orange, 4 = blue, 5 = magenta, 6 = cyan, 7 = white -:hi Normal ctermbg=0 ctermfg=7 guibg=grey15 guifg=white -:hi Cursor term=reverse cterm=reverse guibg=khaki guifg=slategrey -:hi lCursor term=reverse cterm=reverse -:hi StatusLine term=reverse cterm=bold,reverse gui=none guibg=#c2bfa5 guifg=black -:hi StatusLineNC term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 -:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0 guibg=peru guifg=wheat -:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7 guibg=black guifg=green -:hi SpecialKey term=bold ctermfg=4 guifg=yellowgreen -:hi Visual term=reverse cterm=reverse gui=none guibg=olivedrab guifg=khaki -:hi VisualNOS term=bold,underline cterm=bold,underline -:hi MoreMsg term=bold ctermfg=2 guifg=SeaGreen -:hi ModeMsg term=bold cterm=bold guifg=goldenrod -:hi Question term=standout ctermfg=2 guifg=springgreen -:hi Title term=bold cterm=bold ctermfg=3 gui=bold guifg=gold -:hi NonText term=bold cterm=bold ctermfg=4 guibg=grey15 guifg=RoyalBlue -:hi LineNr term=underline cterm=bold ctermbg=0 ctermfg=0* guifg=grey50 -:hi Directory term=bold ctermfg=4 -:hi WildMenu term=standout ctermbg=3 ctermfg=0 guibg=darkyellow guifg=black -:hi VertSplit term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 -:hi Folded term=standout cterm=none ctermbg=0 ctermfg=7 guibg=black guifg=grey40 -:hi FoldColumn term=standout ctermbg=7 ctermfg=4 guibg=black guifg=grey20 -:hi DiffChange cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=white -:hi DiffText cterm=none ctermbg=6 ctermfg=0 guibg=darkcyan guifg=white -:hi DiffAdd cterm=none ctermbg=2 ctermfg=0 guibg=darkgreen guifg=white -:hi DiffDelete cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=black -:hi String cterm=none ctermfg=3 guifg=SkyBlue -:hi Comment term=bold cterm=none ctermbg=0 ctermfg=7 guifg=grey40 -:hi Constant term=underline ctermfg=1 guifg=#ffa0a0 -:hi Special term=bold ctermfg=6 guifg=darkkhaki -:hi Identifier term=underline ctermfg=6 guifg=salmon -:hi Statement term=bold ctermfg=6 guifg=CornflowerBlue -:hi Operator term=bold ctermfg=1 guifg=red -:hi PreProc term=underline ctermbg=7 ctermfg=1 guibg=white guifg=red -:hi Type term=underline ctermfg=2 guifg=CornflowerBlue -:hi Delimiter term=none cterm=none ctermfg=1 -:hi Ignore cterm=bold ctermfg=7 guifg=grey40 -:hi Todo term=standout ctermbg=3 ctermfg=0 guibg=yellow2 guifg=orangered -:hi Underlined term=underline cterm=underline -:hi Include ctermfg=1 guifg=red -:hi Define ctermfg=3 gui=bold guifg=gold -:hi Function ctermfg=6 guifg=navajowhite -:hi Structure ctermfg=2 guifg=green -:hi MatchParen cterm=bold ctermbg=4 ctermfg=7 -:hi CursorLine cterm=bold,underline guibg=black -:hi CursorColumn cterm=bold guibg=black -:hi SpellBad term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white -:hi SpellCap term=underline,standout cterm=none ctermbg=7 ctermfg=0 -:hi SpellLocal term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white -:hi SpellRare term=underline,standout cterm=none ctermbg=7 ctermfg=0 -:hi WarningMsg term=standout ctermfg=1 guibg=darkmagenta guifg=salmon -:hi ErrorMsg term=standout cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white -:hi Error term=reverse cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white -:hi Black ctermbg=grey ctermfg=black guibg=grey guifg=black -:hi Red ctermbg=black ctermfg=red guibg=black guifg=red -:hi Magenta ctermbg=black ctermfg=magenta guibg=black guifg=magenta -:hi Blue ctermbg=black ctermfg=blue guibg=black guifg=blue -:hi Cyan ctermbg=black ctermfg=cyan guibg=black guifg=cyan -:hi Green ctermbg=black ctermfg=green guibg=black guifg=green -:hi Yellow ctermbg=black ctermfg=yellow guibg=black guifg=yellow -:hi White ctermbg=black ctermfg=white guibg=black guifg=white +" Name: Slate +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-09, 2022-09-05 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/slate.vim> +" <https://sisudoc.org/> +" <https://sisudoc.org/> +" Notes: cterm now uses frugal-sisu 8 colors for term +" (for gui originally looked at desert Hans Fugal <hans@fugal.net> +" <http://hans.fugal.net/vim/colors/desert.vim> (April/May 2003)) +: hi clear +: if exists("syntax_on") +: syntax reset +: endif +: let colors_name = "slate" +: set background=dark +" ------- +" 0 = black, 1 = red, 2 = green, 3 = yellow/orange, 4 = blue, 5 = magenta, 6 = cyan, 7 = white +" ------- +: hi Normal ctermbg=0 ctermfg=7 guibg=grey15 guifg=white +: hi Cursor term=reverse cterm=reverse guibg=khaki guifg=slategrey +: hi lCursor term=reverse cterm=reverse +: hi StatusLine term=reverse cterm=bold,reverse gui=none guibg=#c2bfa5 guifg=black +: hi StatusLineNC term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 +: hi Search term=reverse cterm=none ctermbg=2 ctermfg=0 guibg=peru guifg=wheat +: hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7 guibg=black guifg=green +: hi SpecialKey term=bold ctermfg=4 guifg=yellowgreen +: hi Visual term=reverse cterm=reverse gui=none guibg=olivedrab guifg=khaki +: hi VisualNOS term=bold,underline cterm=bold,underline +: hi MoreMsg term=bold ctermfg=2 guifg=SeaGreen +: hi ModeMsg term=bold cterm=bold guifg=goldenrod +: hi Question term=standout ctermfg=2 guifg=springgreen +: hi Title term=bold cterm=bold ctermfg=3 gui=bold guifg=gold +: hi NonText term=bold cterm=bold ctermfg=4 guibg=grey15 guifg=RoyalBlue +: hi LineNr term=underline cterm=bold ctermbg=0 ctermfg=0* guifg=grey50 +: hi Directory term=bold ctermfg=4 +: hi WildMenu term=standout ctermbg=3 ctermfg=0 guibg=darkyellow guifg=black +: hi VertSplit term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 +: hi Folded term=standout cterm=none ctermbg=0 ctermfg=7 guibg=black guifg=grey40 +: hi FoldColumn term=standout ctermbg=7 ctermfg=4 guibg=black guifg=grey20 +: hi DiffChange cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=white +: hi DiffText cterm=none ctermbg=6 ctermfg=0 guibg=darkcyan guifg=white +: hi DiffAdd cterm=none ctermbg=2 ctermfg=0 guibg=darkgreen guifg=white +: hi DiffDelete cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=black +: hi String cterm=none ctermfg=3 guifg=SkyBlue +: hi Comment term=bold cterm=none ctermbg=0 ctermfg=7 guifg=grey40 +: hi Constant term=underline ctermfg=1 guifg=#ffa0a0 +: hi Special term=bold ctermfg=6 guifg=darkkhaki +: hi Identifier term=underline ctermfg=6 guifg=salmon +: hi Statement term=bold ctermfg=6 guifg=CornflowerBlue +: hi Operator term=bold ctermfg=1 guifg=red +: hi PreProc term=underline ctermbg=7 ctermfg=1 guibg=white guifg=red +: hi Type term=underline ctermfg=2 guifg=CornflowerBlue +: hi Delimiter term=none cterm=none ctermfg=1 +: hi Ignore cterm=bold ctermfg=7 guifg=grey40 +: hi Todo term=standout ctermbg=3 ctermfg=0 guibg=yellow2 guifg=orangered +: hi Underlined term=underline cterm=underline +: hi Include ctermfg=1 guifg=red +: hi Define ctermfg=3 gui=bold guifg=gold +: hi Function ctermfg=6 guifg=navajowhite +: hi Structure ctermfg=2 guifg=green +: hi MatchParen cterm=bold ctermbg=4 ctermfg=7 +: hi CursorLine cterm=bold,underline guibg=black +: hi CursorColumn cterm=bold guibg=black +: hi SpellBad term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white +: hi SpellCap term=underline,standout cterm=none ctermbg=7 ctermfg=0 +: hi SpellLocal term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white +: hi SpellRare term=underline,standout cterm=none ctermbg=7 ctermfg=0 +: hi WarningMsg term=standout ctermfg=1 guibg=darkmagenta guifg=salmon +: hi ErrorMsg term=standout cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white +: hi Error term=reverse cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white +: if &diff +: highlight! link DiffText MatchParen +: endif +: hi Black ctermbg=grey ctermfg=black guibg=grey guifg=black +: hi Red ctermbg=black ctermfg=red guibg=black guifg=red +: hi Magenta ctermbg=black ctermfg=magenta guibg=black guifg=magenta +: hi Blue ctermbg=black ctermfg=blue guibg=black guifg=blue +: hi Cyan ctermbg=black ctermfg=cyan guibg=black guifg=cyan +: hi Green ctermbg=black ctermfg=green guibg=black guifg=green +: hi Yellow ctermbg=black ctermfg=yellow guibg=black guifg=yellow +: hi White ctermbg=black ctermfg=white guibg=black guifg=white #+END_SRC *** def-sisu.vim -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/colors/def-sisu.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/def-sisu.vim" #+BEGIN_SRC text " Vim color file " Name: def-sisu " Maintainer: Ralph Amissah <ralph@amissah.com> " Last Change: 2013-02-14 -" URL: <https://git.sisudoc.org/projects/?p=software/spine.git;a=blob;f=data/sisu/conf/editor-syntax-etc/vim/colors/def-sisu.vim;hb=HEAD> +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/def-sisu.vim> +" <https://sisudoc.org/> " Note: primarily 16 color cterm improved by tweaking of .Xdefaults " (with occasional other colors selected from 256 color palate) " .Xdefaults tweaking to make identical to def (256) provided, @@ -585,15 +1086,184 @@ endif " Rxvt.color15 : #FFFFFF #+END_SRC +*** redo.vim + +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/redo.vim" +#+BEGIN_SRC text +"%% Vim color file +" Name: redo +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14, 2016-07-28, 2022-09-05 +" URL: <> +" Note: this is a redo of def + +: hi clear +: if exists("syntax_on") | syntax reset | endif +: let colors_name = "redo" +: set t_Co=256 +: set background=dark +" ------- +" terminal def +" ------- +: hi Normal ctermfg=7 ctermbg=234 +: hi Cursor ctermfg=0 ctermbg=166 +: hi lCursor cterm=reverse +: hi CursorLine cterm=bold,underline "ctermul=242 "bg:236,59 +: hi CursorLineNr cterm=bold ctermfg=0 ctermbg=166 +: hi LineNr cterm=none ctermfg=248 ctermbg=236 +: hi StatusLine cterm=bold,reverse +: hi StatusLineNC cterm=reverse +: hi StatusLineTerm cterm=bold ctermfg=15 ctermbg=2 +: hi StatusLineTermNC ctermfg=15 ctermbg=2 +: hi ColorColumn ctermfg=231 ctermbg=236 "bg:233,59,236 +" hi ColorColumn cterm=inverse +" hi ColorColumn ctermfg=16 ctermbg=235 +" hi ColorColumn ctermfg=5 ctermbg=90 +: hi Folded cterm=none ctermfg=248 ctermbg=0 "fg:248,59,242,3 +: hi FoldColumn ctermfg=4 ctermbg=69 +: hi Search cterm=none ctermfg=0 ctermbg=57 "bg:57,11 +: hi IncSearch cterm=none ctermfg=0 ctermbg=154 +: hi SpecialKey ctermfg=4 +: hi Visual cterm=reverse +: hi VisualNOS cterm=bold,underline +: hi MoreMsg ctermfg=2 +: hi ModeMsg cterm=bold +: hi Question ctermfg=2 +: hi Title cterm=bold ctermfg=3 +: hi NonText cterm=bold ctermfg=4 +: hi Directory ctermfg=4 +: hi WildMenu ctermfg=0 ctermbg=3 +: hi VertSplit cterm=reverse +: hi DiffAdd cterm=none ctermfg=0 ctermbg=2 +: hi DiffChange cterm=none ctermfg=0 ctermbg=7 +: hi DiffDelete cterm=none ctermfg=0 ctermbg=7 +: hi DiffText cterm=none ctermfg=0 ctermbg=6 +: hi String cterm=none ctermfg=3 +: hi Comment cterm=none ctermfg=244 +: hi Constant ctermfg=124 +: hi Special ctermfg=67 "fg:67,140,5 +: hi Identifier cterm=none ctermfg=172 "bg:172,4,2 (default usually bold; choose orange, blue or lime green) +: hi Statement ctermfg=130 +: hi Operator ctermfg=2 +: hi PreProc ctermfg=196 "fg:2,5,140,1,166,196 +: hi Type ctermfg=67 "fg:67,2 +: hi Include ctermfg=124 "fg:124,140,5 +: hi Delimiter cterm=none ctermfg=2 +: hi Ignore cterm=bold ctermfg=7 +: hi Todo ctermfg=0 ctermbg=3 +: hi Underlined cterm=underline ctermfg=4 "ctermul=6 "fg:4,6 +: hi Define ctermfg=3 +: hi Function ctermfg=6 +: hi Structure ctermfg=2 +: hi MatchParen cterm=bold ctermfg=7 ctermbg=4 +: hi SpellBad cterm=underline ctermfg=5 ctermbg=0 +: hi SpellCap cterm=underline ctermfg=5 ctermbg=0 +: hi SpellLocal cterm=underline ctermfg=5 ctermbg=0 +: hi SpellRare cterm=underline ctermfg=5 ctermbg=0 +: hi TrailingWhitespace ctermbg=1 +: hi ExtraWhitespace ctermbg=1 +: hi WarningMsg ctermfg=1 +: hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +: hi Error cterm=bold ctermfg=7 ctermbg=1 +: if &diff +: highlight! link DiffText MatchParen +: endif +#+END_SRC + +*** shift.vim + +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/shift.vim" +#+BEGIN_SRC text +"%% Vim color file +" Name: shift +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14, 2016-07-28, 2022-09-09 +" URL: <> +" Note: this is a shift in redo which as a redo of def + +: hi clear +: if exists("syntax_on") | syntax reset | endif +: let colors_name = "shift" +: set t_Co=256 +: set background=dark +" ------- +" terminal def +" ------- +: hi Normal ctermfg=7 ctermbg=234 +: hi Cursor ctermfg=0 ctermbg=166 +: hi lCursor cterm=reverse +: hi CursorLine cterm=bold,underline ctermul=166 "bg:236,59 +: hi CursorLineNr cterm=bold ctermfg=0 ctermbg=166 +: hi LineNr cterm=none ctermfg=248 ctermbg=236 +: hi StatusLine cterm=bold,reverse +: hi StatusLineNC cterm=reverse +: hi StatusLineTerm cterm=bold ctermfg=15 ctermbg=2 +: hi StatusLineTermNC ctermfg=15 ctermbg=2 +: hi ColorColumn cterm=none ctermfg=7 ctermbg=236 "bg:233,59 +" hi ColorColumn cterm=inverse +" hi ColorColumn ctermfg=16 ctermbg=235 +" hi ColorColumn ctermfg=5 ctermbg=90 +: hi Folded cterm=none ctermfg=242 ctermbg=16 "fg:248,59,242,3 +: hi FoldColumn ctermfg=4 ctermbg=69 +: hi Search cterm=none ctermfg=0 ctermbg=57 "bg:57,11 +: hi IncSearch cterm=none ctermfg=0 ctermbg=154 +: hi SpecialKey ctermfg=4 +: hi Visual cterm=reverse +: hi VisualNOS cterm=bold,underline +: hi MoreMsg ctermfg=2 +: hi ModeMsg cterm=bold +: hi Question ctermfg=2 +: hi Title cterm=bold ctermfg=3 +: hi NonText cterm=bold ctermfg=4 +: hi Directory ctermfg=4 +: hi WildMenu ctermfg=0 ctermbg=3 +: hi VertSplit cterm=reverse +: hi DiffAdd cterm=none ctermfg=0 ctermbg=2 +: hi DiffChange cterm=none ctermfg=0 ctermbg=7 +: hi DiffDelete cterm=none ctermfg=0 ctermbg=7 +: hi DiffText cterm=none ctermfg=0 ctermbg=6 +: hi String cterm=none ctermfg=3 +: hi Comment cterm=none ctermfg=244 +: hi Constant ctermfg=124 +: hi Special ctermfg=67 "fg:67,140,5 +: hi Identifier cterm=none ctermfg=4 "bg:172,4,2 (default usually bold; choose orange, blue or lime green) +: hi Statement ctermfg=130 +: hi Operator ctermfg=2 +: hi PreProc ctermfg=196 "fg:2,5,140,1,166,196 +: hi Type ctermfg=67 "fg:67,2 +: hi Include ctermfg=124 "fg:124,140,5 +: hi Delimiter cterm=none ctermfg=2 +: hi Ignore cterm=bold ctermfg=7 +: hi Todo ctermfg=0 ctermbg=3 +: hi Underlined cterm=underline ctermfg=6 ctermul=6 "fg:4,6 +: hi Define ctermfg=3 +: hi Function ctermfg=6 +: hi Structure ctermfg=2 +: hi MatchParen cterm=bold ctermfg=7 ctermbg=4 +: hi SpellBad cterm=underline ctermfg=5 ctermbg=0 +: hi SpellCap cterm=underline ctermfg=5 ctermbg=0 +: hi SpellLocal cterm=underline ctermfg=5 ctermbg=0 +: hi SpellRare cterm=underline ctermfg=5 ctermbg=0 +: hi TrailingWhitespace ctermbg=1 +: hi ExtraWhitespace ctermbg=1 +: hi WarningMsg ctermfg=1 +: hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +: hi Error cterm=bold ctermfg=7 ctermbg=1 +: if &diff +: highlight! link DiffText MatchParen +: endif +#+END_SRC + *** frugal-cterm.vim -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim" #+BEGIN_SRC text " Vim color file " Name: frugal-cterm-sisu " Maintainer: Ralph Amissah <ralph@amissah.com> " Last Change: 2013-02-09 -" URL: <https://git.sisudoc.org/projects/?p=software/spine.git;a=blob;f=data/sisu/conf/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim;hb=HEAD> +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim> +" <https://sisudoc.org/> " Note: 8 color cterm, related colorschemes 8 & sparse :set background=dark :hi clear @@ -657,9 +1327,240 @@ endif :hi Error cterm=bold ctermbg=1 ctermfg=7 #+END_SRC -** ftplugin sisu.vim +** ftplugin sisu.vim & spine.vim (for the same files) +*** sisu.vim + +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/ftplugin/sisu.vim" +#+BEGIN_SRC text +"%% SiSU Vim ftplugin +" SiSU Maintainer: Ralph Amissah <ralph@amissah.com> +" SiSU Markup: SiSU (sisu-3.3) 2012-08-18 +" an ftplugin setting defaults for editing sisu markup files +:syntax on +:filetype off +":filetype on +:filetype indent on +:autocmd FileType sisu :set nonumber +:set encoding=utf-8 fileencodings= +:set ff=unix +:set autowrite " Automatically save before commands like :next and :make +:set nocompatible +:set tabstop=2 +:set expandtab +:set shiftwidth=2 +:set autoindent +:set showcmd " Show (partial) command in status line. +:set showmatch " Show matching brackets. +:set ignorecase " Do case insensitive matching +:set smartcase +:set incsearch +:set hlsearch +:set gdefault +:set guioptions=agr " add 'm' for menu +:map <silent> <C-m> :if &guioptions =~# 'm' <Bar> + \set guioptions-=m <Bar> + \set guioptions-=T <Bar> + \else <Bar> + \set guioptions+=m <Bar> + \set guioptions-=T <Bar> + \endif<CR> +:set paste +""% statusline +"set statusline= " +"set fillchars=stl:―,stlnc:—,vert:│,fold:۰,diff:· +"" [ buffer number ] +"set statusline +=%#Normal#[ " +"set statusline +=%#Identifier#%n " buffer number +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ file name (& modified?) ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Statement#%<%F%* " full path +""set statusline +=%#Statement#%<%t " full path +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ column : line number / number of lines in file, percentage of file ] [%v:%l/%L\ %p%%] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Identifier#%v " column & line +"set statusline +=%#Normal#: " +"set statusline +=%#Identifier#%l " column & line +"set statusline +=%#SpecialKey#/%L\ " total lines +"set statusline +=%#Identifier#%p " percentage of file +"set statusline +=%#SpecialKey#%% " +"set statusline +=%#Normal#] " " +"" [ file format : file type ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#SpecialKey#%{&fenc} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%{&ff} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%y " file type +"set statusline +=%#Normal#] " +"" [ character under cursor ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#String#0x%04B " character under cursor +"set statusline +=%#Normal#]\ " +"" [ syntastic ] +"set statusline +=%#warningmsg# +"set statusline +=%{SyntasticStatuslineFlag()}\ " +""set statusline+=%* +"" Status line background +"set statusline +=%#Folded#\ " +"" misc +"set laststatus=2 " status line always on +"% textwrap +:set whichwrap=<,>,h,l,[,] +:set nolinebreak " only affects display not buffer +:set wrap +:set wrapmargin=0 +"% map +":let mapleader = "," " consider +:map <leader>paste :set invpaste<cr> +"% wrap/formatting paragraph according to the current 'textwidth' with ^\ (control-\): +:imap <C-\> <C-O>gqap +:nmap <C-\> gqap +:vmap <C-\> gq +"% save file, go to next file in buffer +:map <leader>nf :w <enter> :n <enter> +"% vimdiff q exits +:if &diff +: cmap q qa +:endif +"% directory files, placed in vertical split window +:map <leader>ls :vs<cr> :Explore<cr> +:map <leader>dir :vs<cr> :Explore<cr> +"% remapping lines make cursor jump a line at a time within wrapped text +:nnoremap j gj +:nnoremap k gk +:vnoremap j gj +:vnoremap k gk +:nnoremap <Down> gj +:nnoremap <Up> gk +:vnoremap <Down> gj +:vnoremap <Up> gk +:inoremap <Down> <C-o>gj +:inoremap <Up> <C-o>gk +"% search and replace +:map <leader>rd :.,$s///c "search and replace down +:map <leader>rg :%s///c "search and replace whole file +:map <leader>rr :rubyd gsub!(//,"") +"% pwd t64 working directory set to that of the file you're editing +"changes pwd to directory of file in current buffer +:function! CHANGE_CURR_DIR() +: let _dir = expand("%:p:h") +: exec "cd " . _dir +: unlet _dir +:endfunction +"% Change to the directory the file in your current buffer is in +:if has("autocmd") + autocmd BufEnter * :lcd %:p:h +:endif +"% autocompletefilenames To search for files in the current directory +:set path=,, +"auto-completion for file to edit in current dir, used in normal mode +:map <leader>e :e <c-r>=expand("%:p:h") . "/" <cr> +:map <leader>pwd :exe 'cd ' . expand ("%:p:h")<cr> +"% searchhighlight t93: Toggle search highlight <C-n> +:function! ToggleHLSearched() +: if &hls +: set nohls +: else +: set hls +: endif +:endfun +:nmap <silent> <C-n> :silent call ToggleHLSearched()<cr> +"%% SiSU vim folds +"% foldsearchx FoldSearch (opens result of search all else closed) t77 +:map <leader>fs :set foldmethod=expr foldcolumn=2 foldlevel=0 <cr> +:map <leader>ff :F<cr> +:map <leader>fe :F<cr> zE +"% foldtoggle Fold Toggle mapped to <space> +:fun! ToggleFold() +: if foldlevel('.') == 0 +: normal! l +: else +: if foldclosed('.') < 0 +: foldclose +: else +: foldopen +: endif +: endif +" Clear status line +: echo +:endfun +" Map this function to Space key. +:noremap <space> :call ToggleFold()<cr> +"% foldtype Fold? set foldtext +:set foldtext=v:folddashes.substitute(getline(v:foldstart),'\\=','','g',) +:set foldexpr=getline(v:lnum-1)!~@/&&getline(v:lnum)!~@/&&getline(v:lnum+1)!~@/ +"% foldsearch t77: Fold on search result +:function! FoldMake(search) +: set fdm=manual +: normal zE +: normal G$ +: let folded = 0 "flag to set when a fold is found +: let flags = "w" "allow wrapping in the search +: let line1 = 0 "set marker for beginning of fold +: while search(a:search, flags) > 0 +: let line2 = line(".") +: if (line2 -1 > line1) +: "echo line1 . ":" . (line2-1) +: "echo "a fold goes here." +: execute ":" . line1 . "," . (line2-1) . "fold" +: let folded = 1 "at least one fold has been found +: endif +: let line1 = line2 "update marker +: let flags = "W" "turn off wrapping +: endwhile +" create the last fold which goes to the end of the file. +: normal $G +: let line2 = line(".") +: if (line2 > line1 && folded == 1) +: execute ":". line1 . "," . line2 . "fold" +: endif +: normal 1G +:endfunction +"% folds Fold Patterns +:command! -nargs=+ -complete=command FMake call FoldMake(<q-args>) +: if ( &filetype == "ruby" ) +: command! F FMake ^# ==\?\|^\s*\(\(def\|class\|module\)\s\|\(public\|protected\|private\|__END__\)\s*$\)\|\(^\s*\|\s\+\)#%\s +: command! Fa FMake \(^# ==\?\|^\s*\(\(\(def\|class\|module\)\s\)\|\(\(public\|protected\|private\|__END__\)\(\s*$\)\)\)\)\|^[0-9]\~\|\([#%]\|^["]\)\{1,4\}\s*%\|{\({\|!!\) +: command! FD FMake \(^# ==\?\|^\s*\(\(def\|class\|module\)\s\)\)\|^\s*\([#%"0-9]\{0,4\}\~\(%\+\s\|!!\)\|#\s\+=\+\s\+\) +: else +"% folds :F Fold Patterns SiSU Markup :F +: command! F FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*| +: command! Fa FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*|\|^\(Book\|Part\|Chapter\|Section\|Article\|BOOK\|PART\|CHAPTER\|SECTION\|ARTICLE\)\s +: command! F0 FMake ^\(\s*0\~\|@\S\+:[+-]\?\s\+\) +: command! FA FMake ^:\?A\~ +: command! FB FMake ^:\?[AB]\~ +: command! FC FMake ^:\?[A-C]\~ +: command! F1 FMake ^\(:\?[A-C]\|1\)\~ +: command! F2 FMake ^\(:\?[A-C]\|[12]\)\~ +: command! F3 FMake ^\(:\?[A-C]\|[1-3]\)\~ +: command! F4 FMake ^[1-4]\~ +: command! F5 FMake ^[4-5]\~ +: command! F6 FMake ^[4-6]\~ +: command! Fc FMake ^[%]\+\s\+ +: endif +"% folds Fold Patterns misc +":command! Fp FMake ^\s*[A-Za-z0-9#] +:command! Fp FMake ^\s*\S +:command! Fo FMake ^[%\"]\s*[{>] +"% linenumbering, on, relative, off +:map <Leader>nn :set <c-r>={'00':'','01':'r','10':'nor'}[&rnu.&nu]<CR>nu<CR> +"% cursorline +:map <leader>cu :if &cursorcolumn <Bar> + \set nocursorline nocursorcolumn <Bar> + \else <Bar> + \set cursorline cursorcolumn <Bar> + \endif<cr> +:map <leader>cu- :set nocursorline nocursorcolumn<cr> +:map <leader>cu+ :set cursorline cursorcolumn<cr> +#+END_SRC + +*** sisu-spine.vim -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/ftplugin/sisu.vim" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/ftplugin/sisu-spine.vim" #+BEGIN_SRC text "%% SiSU Vim ftplugin " SiSU Maintainer: Ralph Amissah <ralph@amissah.com> @@ -890,7 +1791,7 @@ endif ** templates *** sst.tpl -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/templates/sst.tpl" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/templates/sst.tpl" #+BEGIN_SRC text # SiSU 8.0 @@ -926,7 +1827,7 @@ make: *** ssm.tpl -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/templates/ssm.tpl" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/templates/ssm.tpl" #+BEGIN_SRC text # SiSU 8.0 master @@ -962,7 +1863,7 @@ make: *** ssm.tpl -#+HEADER: :tangle "../sundry/misc/editor-syntax-etc/vim/templates/ssi.tpl" +#+HEADER: :tangle "../sundry/editor-syntax-etc/vim/templates/ssi.tpl" #+BEGIN_SRC text # SiSU 8.0 insert diff --git a/src/sisudoc/io_in/read_source_files.d b/src/sisudoc/io_in/read_source_files.d index 3cbaed0..c683d1e 100644 --- a/src/sisudoc/io_in/read_source_files.d +++ b/src/sisudoc/io_in/read_source_files.d @@ -253,7 +253,7 @@ template spineRawMarkupContent() { ) { char[][] contents_insert; int code_block_status = 0; - enum codeBlock { off, curly, tic, } + enum codeBlock { off, curly, tic, quotemarks } auto fn_pth_full = fn_src.match(rgx_files.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; foreach (line; markup_sourcefile_insert_content) { @@ -265,11 +265,19 @@ template spineRawMarkupContent() { } else if (line.matchFirst(rgx.block_curly_code_open)) { code_block_status = codeBlock.curly; contents_insert ~= line; + } else if (code_block_status == codeBlock.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + code_block_status = codeBlock.off; + } + contents_insert ~= line; } else if (code_block_status == codeBlock.tic) { if (line.matchFirst(rgx.block_tic_close)) { code_block_status = codeBlock.off; } contents_insert ~= line; + } else if (line.matchFirst(rgx.block_quotemarks_code_open)) { + code_block_status = codeBlock.quotemarks; + contents_insert ~= line; } else if (line.matchFirst(rgx.block_tic_code_open)) { code_block_status = codeBlock.tic; contents_insert ~= line; @@ -328,7 +336,7 @@ template spineRawMarkupContent() { import std.algorithm; char[][] contents; int code_block_status = 0; - enum codeBlock { off, curly, tic, } + enum codeBlock { off, curly, tic, quotemarks } auto fn_pth_full = fn_src.match(rgx_files.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; char[][] contents_insert; @@ -343,11 +351,19 @@ template spineRawMarkupContent() { } else if (line.matchFirst(rgx.block_curly_code_open)) { code_block_status = codeBlock.curly; contents ~= line; + } else if (code_block_status == codeBlock.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + code_block_status = codeBlock.off; + } + contents ~= line; } else if (code_block_status == codeBlock.tic) { if (line.matchFirst(rgx.block_tic_close)) { code_block_status = codeBlock.off; } contents ~= line; + } else if (line.matchFirst(rgx.block_quotemarks_code_open)) { + code_block_status = codeBlock.quotemarks; + contents ~= line; } else if (line.matchFirst(rgx.block_tic_code_open)) { code_block_status = codeBlock.tic; contents ~= line; diff --git a/src/sisudoc/io_out/epub3.d b/src/sisudoc/io_out/epub3.d index 8fd1cb5..610d6b8 100644 --- a/src/sisudoc/io_out/epub3.d +++ b/src/sisudoc/io_out/epub3.d @@ -95,10 +95,10 @@ template outputEPub3() { </rootfiles>┃") ~ "\n</container>\n"; return o; } - string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { + string epub3_oebps_content(D,P)(D doc, P parts) { auto xhtml_format = outputXHTMLs(); - auto pth_epub3 = spinePathsEPUB!()(doc_matters.output_path, doc_matters.src.language); - string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc_matters! + auto pth_epub3 = spinePathsEPUB!()(doc.matters.output_path, doc.matters.src.language); + string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc.matters! string content = format(q"┃<?xml version="1.0" encoding="utf-8"?> <package version="3.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="uid" prefix="rendition: http://www.idpf.org/vocab/rendition/#"> <metadata @@ -122,25 +122,25 @@ template outputEPub3() { <item id="nav" href="toc_nav.xhtml" media-type="application/xhtml+xml" properties="nav" /> ┃", _uuid, - xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_main), - (doc_matters.conf_make_meta.meta.title_sub.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_sub), - (doc_matters.conf_make_meta.meta.creator_author.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author), - (doc_matters.conf_make_meta.meta.creator_author.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.creator_author), - doc_matters.src.language, // language, fix (needed in dochead metadata) - (doc_matters.conf_make_meta.meta.date_published.empty) - ? "" : xhtml_format.special_characters_date(doc_matters.conf_make_meta.meta.date_published), - (doc_matters.conf_make_meta.meta.rights_copyright.empty) - ? "" : xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.rights_copyright), + xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.title_main), + (doc.matters.conf_make_meta.meta.title_sub.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.title_sub), + (doc.matters.conf_make_meta.meta.creator_author.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.creator_author), + (doc.matters.conf_make_meta.meta.creator_author.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.creator_author), + doc.matters.src.language, // language, fix (needed in dochead metadata) + (doc.matters.conf_make_meta.meta.date_published.empty) + ? "" : xhtml_format.special_characters_date(doc.matters.conf_make_meta.meta.date_published), + (doc.matters.conf_make_meta.meta.rights_copyright.empty) + ? "" : xhtml_format.special_characters_text(doc.matters.conf_make_meta.meta.rights_copyright), _uuid, _uuid, (pth_epub3.fn_oebps_css).chompPrefix("OEBPS/"), ); content ~= parts["manifest_documents"]; // TODO sort jpg & png - foreach (image; doc_matters.srcs.image_list) { + foreach (image; doc.matters.srcs.image_list) { content ~= format(q"┃ <item id="%s" href="%s/%s" media-type="image/%s" /> ┃", image.baseName.stripExtension, @@ -158,8 +158,8 @@ template outputEPub3() { content ~= " " ~ "</guide>" ~ "\n "; content ~= "" ~ "</package>"; debug(epubmanifest) { - foreach (section; doc_matters.has.keys_seq.seg) { // TODO - foreach (obj; doc_abstraction[section]) { + foreach (section; doc.matters.has.keys_seq.seg) { // TODO + foreach (obj; doc.abstraction[section]) { if (obj.metainfo.is_a == "heading") { if (obj.metainfo.heading_lev_markup == 4) { writefln( @@ -183,7 +183,7 @@ template outputEPub3() { } return content; } - string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { + string epub3_oebps_toc_nav_xhtml(D)(D doc) { enum DomTags { none, open, close, close_and_open, open_still, } auto markup = InlineMarkup(); static auto rgx = RgxO(); @@ -202,12 +202,12 @@ template outputEPub3() { </header> <nav epub:type="toc" id="toc"> ┃", - (doc_matters.conf_make_meta.meta.title_full).special_characters_text, + (doc.matters.conf_make_meta.meta.title_full).special_characters_text, ); string _toc_nav_tail = ""; - // writeln(doc_matters.has.keys_seq.seg); // DEBUG line - foreach (sect; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[sect]) { + // writeln(doc.matters.has.keys_seq.seg); // DEBUG line + foreach (sect; doc.matters.has.keys_seq.seg) { + foreach (obj; doc.abstraction[sect]) { if ((sect == "head") && (obj.metainfo.is_a == "heading")) { toc = toc_head; } @@ -263,7 +263,7 @@ template outputEPub3() { } break; } - if (doc_matters.has.keys_seq.seg[doc_matters.has.keys_seq.seg.length - 2] == sect) { + if (doc.matters.has.keys_seq.seg[doc.matters.has.keys_seq.seg.length - 2] == sect) { // writeln(n, ": ", sect, ": ", _txt, " - ", obj.metainfo.dom_structure_collapsed_tags_status); // DEBUG // read last heading (heading prior to closing) and determine what those instructions imply still need to be done // CLOSE // DomTags { 0 none, 1 open, 2 close, 3 close_and_open, 4 open_still, } @@ -296,16 +296,12 @@ template outputEPub3() { toc ~= _toc_nav_tail; return toc; } - @system void outputEPub3(D,I)( - const D doc_abstraction, - I doc_matters, - ) { + @system void outputEPub3(D)(D doc) { mixin spineRgxOut; mixin spineRgxXHTML; auto xhtml_format = outputXHTMLs(); static auto rgx = RgxO(); static auto rgx_xhtml = RgxXHTML(); - string[] doc; string segment_filename; string[] top_level_headings = ["","","",""]; string[string] oepbs_content_parts; @@ -322,8 +318,8 @@ template outputEPub3() { string[] doc_parts; } auto epubWrite = writeOut(); - foreach (section; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[section]) { + foreach (section; doc.matters.has.keys_seq.seg) { + foreach (obj; doc.abstraction[section]) { string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); if (obj.metainfo.is_a == "heading") { assert(section == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); @@ -351,8 +347,8 @@ template outputEPub3() { goto default; default: epubWrite.doc_parts ~= obj.tags.segment_anchor_tag_epub; - epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= xhtml_format.epub3_seg_head(doc_matters); - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub"); + epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= xhtml_format.epub3_seg_head(doc.matters); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= t[0]; epubWrite.doc_epub3_endnotes[obj.tags.segment_anchor_tag_epub] ~= t[1]; break; @@ -360,19 +356,19 @@ template outputEPub3() { break; case 4: segment_filename = obj.tags.segment_anchor_tag_epub; - epubWrite.doc_epub3[segment_filename] ~= xhtml_format.epub3_seg_head(doc_matters); - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub"); + epubWrite.doc_epub3[segment_filename] ~= xhtml_format.epub3_seg_head(doc.matters); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case 5: .. case 7: - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case 8: .. case 9: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } @@ -380,7 +376,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); } } @@ -395,13 +391,13 @@ template outputEPub3() { case "para": switch (obj.metainfo.is_a) { case "toc": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -410,7 +406,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -422,13 +418,13 @@ template outputEPub3() { case "para": switch (obj.metainfo.is_a) { case "para": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -438,37 +434,37 @@ template outputEPub3() { case "block": switch (obj.metainfo.is_a) { case "quote": - t = xhtml_format.quote_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.quote_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "group": - t = xhtml_format.group_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.group_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "block": - t = xhtml_format.block_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.block_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "poem": break; case "verse": - t = xhtml_format.verse_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.verse_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0].to!string; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "code": - epubWrite.doc_epub3[segment_filename] ~= xhtml_format.code(_txt, obj, doc_matters); + epubWrite.doc_epub3[segment_filename] ~= xhtml_format.code(_txt, obj, doc.matters); break; case "table": - epubWrite.doc_epub3[segment_filename] ~= xhtml_format.table(_txt, obj, doc_matters); + epubWrite.doc_epub3[segment_filename] ~= xhtml_format.table(_txt, obj, doc.matters); epubWrite.doc_epub3_endnotes[segment_filename] ~= ""; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -477,7 +473,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -490,37 +486,37 @@ template outputEPub3() { case "para": switch (obj.metainfo.is_a) { case "endnote": assert(section == "endnotes"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; break; case "glossary": assert(section == "glossary"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "bibliography": assert(section == "bibliography"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "bookindex": assert(section == "bookindex"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "blurb": assert(section == "blurb"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "tail": assert(section == "tail"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -529,7 +525,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -540,7 +536,7 @@ template outputEPub3() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_epub) { + if (doc.matters.opt.action.debug_do_epub) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); } } @@ -597,9 +593,9 @@ template outputEPub3() { /+ epub specific documents +/ epubWrite.mimetypes = epub3_mimetypes; epubWrite.meta_inf_container_xml = epub3_container_xml; - epubWrite.oebps_toc_nav_xhtml = doc_abstraction.epub3_oebps_toc_nav_xhtml(doc_matters); - epubWrite.oebps_content_opf = doc_abstraction.epub3_oebps_content(doc_matters, oepbs_content_parts); - epubWrite.epub3_write_output_files(doc_matters); + epubWrite.oebps_toc_nav_xhtml = doc.epub3_oebps_toc_nav_xhtml; + epubWrite.oebps_content_opf = doc.epub3_oebps_content(oepbs_content_parts); + epubWrite.epub3_write_output_files(doc.matters); } @system void epub3_write_output_files(W,M)( W epub_write, diff --git a/src/sisudoc/io_out/html.d b/src/sisudoc/io_out/html.d index c1f0aa5..6d3129a 100644 --- a/src/sisudoc/io_out/html.d +++ b/src/sisudoc/io_out/html.d @@ -64,22 +64,19 @@ template outputHTML() { sisudoc.io_out.xmls, sisudoc.io_out.xmls_css; mixin outputXHTMLs; - void scroll(D,M)( - const D doc_abstraction, - M doc_matters, - ) { + void scroll(D)(D doc) { mixin spineRgxOut; mixin spineRgxXHTML; auto xhtml_format = outputXHTMLs(); static auto rgx = RgxO(); static auto rgx_xhtml = RgxXHTML(); string[] doc_html; - string[] doc; + string[] doc_out; string suffix = ".html"; string previous_section = ""; string delimit = ""; - foreach (section; doc_matters.has.keys_seq.scroll) { - foreach (obj; doc_abstraction[section]) { + foreach (section; doc.matters.has.keys_seq.scroll) { + foreach (obj; doc.abstraction[section]) { delimit = xhtml_format.div_delimit(section, previous_section); string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); switch (obj.metainfo.is_of_part) { @@ -88,14 +85,14 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix); break; case "toc": - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -104,7 +101,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -116,14 +113,14 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix); break; case "para": - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -133,28 +130,28 @@ template outputHTML() { case "block": switch (obj.metainfo.is_a) { case "quote": - doc_html ~= xhtml_format.quote_scroll(_txt, obj, doc_matters); + doc_html ~= xhtml_format.quote_scroll(_txt, obj, doc.matters); break; case "group": - doc_html ~= xhtml_format.group_scroll(_txt, obj, doc_matters); + doc_html ~= xhtml_format.group_scroll(_txt, obj, doc.matters); break; case "block": - doc_html ~= xhtml_format.block_scroll(_txt, obj, doc_matters); + doc_html ~= xhtml_format.block_scroll(_txt, obj, doc.matters); break; case "poem": break; case "verse": - doc_html ~= xhtml_format.verse_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.verse_scroll(_txt, obj, doc.matters, suffix); break; case "code": - doc_html ~= xhtml_format.code(_txt, obj, doc_matters); + doc_html ~= xhtml_format.code(_txt, obj, doc.matters); break; case "table": - doc_html ~= xhtml_format.table(_txt, obj, doc_matters); + doc_html ~= xhtml_format.table(_txt, obj, doc.matters); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -163,7 +160,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -176,29 +173,29 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc.matters, suffix); break; case "endnote": assert(section == "endnotes"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "glossary": assert(section == "glossary"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "bibliography": assert(section == "bibliography"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "bookindex": assert(section == "bookindex"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "blurb": assert(section == "blurb"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; case "tail": assert(section == "tail"); - doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); + doc_html ~= xhtml_format.para_scroll(_txt, obj, doc.matters, suffix); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -207,7 +204,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -218,7 +215,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); @@ -228,18 +225,18 @@ template outputHTML() { } } } - doc = xhtml_format.html_head(doc_matters, "scroll") + doc_out = xhtml_format.html_head(doc.matters, "scroll") ~ doc_html ~ xhtml_format.dom_close - ~ xhtml_format.tail(doc_matters); - scroll_write_output(doc, doc_matters); + ~ xhtml_format.tail(doc.matters); + scroll_write_output(doc_out, doc.matters); } - @trusted void scroll_write_output(D,M)( - D doc, + @trusted void scroll_write_output(O,M)( + O doc_out, M doc_matters, ) { debug(asserts) { - static assert(is(typeof(doc) == string[])); + static assert(is(typeof(doc_out) == string[])); } auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language); try { @@ -248,7 +245,7 @@ template outputHTML() { } { auto f = File(pth_html.fn_scroll(doc_matters.src.filename), "w"); - foreach (o; doc) { + foreach (o; doc_out) { f.writeln(o); } } @@ -271,10 +268,7 @@ template outputHTML() { writeln(" ", pth_html.fn_scroll(doc_matters.src.filename)); } } - void seg(D,M)( - const D doc_abstraction, - M doc_matters, - ) { + void seg(D)(D doc) { mixin spineRgxOut; mixin spineRgxXHTML; static auto rgx = RgxO(); @@ -282,15 +276,14 @@ template outputHTML() { auto xhtml_format = outputXHTMLs(); string[][string] doc_html; string[][string] doc_html_endnotes; - string[] doc; string segment_filename; string[] top_level_headings = ["","","",""]; string previous_seg_filename = ""; string suffix = ".html"; string previous_section = ""; string delimit = ""; - foreach (section; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[section]) { + foreach (section; doc.matters.has.keys_seq.seg) { + foreach (obj; doc.abstraction[section]) { delimit = xhtml_format.div_delimit(section, previous_section); string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); if (obj.metainfo.is_a == "heading") { @@ -318,33 +311,33 @@ template outputHTML() { top_level_headings[3] = ""; goto default; default: - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg"); top_level_headings[obj.metainfo.heading_lev_markup] = t[0]; break; } break; case 4: segment_filename = obj.tags.segment_anchor_tag_epub; - doc_html[segment_filename] ~= xhtml_format.html_head(doc_matters, "seg"); - auto navigation_bar = xhtml_format.nav_pre_next_svg(obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.html_head(doc.matters, "seg"); + auto navigation_bar = xhtml_format.nav_pre_next_svg(obj, doc.matters); doc_html[segment_filename] ~= navigation_bar.toc_pre_next; previous_seg_filename = segment_filename; foreach (top_level_heading; top_level_headings) { doc_html[segment_filename] ~= top_level_heading; } - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; - doc_html[segment_filename] ~= xhtml_format.lev4_heading_subtoc(obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.lev4_heading_subtoc(obj, doc.matters); doc_html_endnotes[segment_filename] ~= t[1]; break; case 5: .. case 7: - Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "seg"); + Tuple!(string, string[]) t = xhtml_format.heading_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; case 8: .. case 9: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); writeln(__FILE__, ":", __LINE__, ": ", obj.text); } @@ -352,7 +345,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a, ": ", obj.metainfo.heading_lev_markup); } } @@ -367,12 +360,12 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "toc": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -381,7 +374,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -393,13 +386,13 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "para": - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -409,24 +402,24 @@ template outputHTML() { case "block": switch (obj.metainfo.is_a) { case "quote": - t = xhtml_format.quote_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.quote_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "group": - t = xhtml_format.group_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.group_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "block": - t = xhtml_format.block_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.block_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "poem": break; case "verse": - t = xhtml_format.verse_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.verse_seg(_txt, obj, doc.matters, suffix, "seg"); goto default; case "code": - doc_html[segment_filename] ~= xhtml_format.code(_txt, obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.code(_txt, obj, doc.matters); break; case "table": - doc_html[segment_filename] ~= xhtml_format.table(_txt, obj, doc_matters); + doc_html[segment_filename] ~= xhtml_format.table(_txt, obj, doc.matters); doc_html_endnotes[segment_filename] ~= ""; break; default: @@ -438,7 +431,7 @@ template outputHTML() { doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; } else { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -447,7 +440,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -460,37 +453,37 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "endnote": assert(section == "endnotes"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; break; case "glossary": assert(section == "glossary"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "bibliography": assert(section == "bibliography"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "bookindex": assert(section == "bookindex"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "blurb": assert(section == "blurb"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "tail": assert(section == "tail"); - t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); + t = xhtml_format.para_seg(_txt, obj, doc.matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -499,7 +492,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -510,7 +503,7 @@ template outputHTML() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_html) { + if (doc.matters.opt.action.debug_do_html) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); } } @@ -519,7 +512,7 @@ template outputHTML() { } } } - seg_write_output(doc_html, doc_html_endnotes, doc_matters); + seg_write_output(doc_html, doc_html_endnotes, doc.matters); } @trusted void seg_write_output(D,E,M)( // @system? D doc_html, @@ -587,9 +580,7 @@ template outputHTML() { // Handle error } } - @trusted void images_cp(M)( // @system - M doc_matters, - ) { + @trusted void images_cp(M)(M doc_matters) { // @system { /+ (copy html images) +/ auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language); if (!exists(pth_html.image)) { diff --git a/src/sisudoc/io_out/hub.d b/src/sisudoc/io_out/hub.d index 498fa5c..8c41ce5 100644 --- a/src/sisudoc/io_out/hub.d +++ b/src/sisudoc/io_out/hub.d @@ -59,101 +59,98 @@ template outputHub() { sisudoc.io_out.xmls, sisudoc.io_out.create_zip_file, sisudoc.io_out.paths_output; - @system void outputHub(D,I)( - const D doc_abstraction, - I doc_matters - ) { + @system void outputHub(D)(D doc) { mixin Msg; - auto msg = Msg!()(doc_matters); + auto msg = Msg!()(doc.matters); enum outTask { source_or_pod, sqlite, sqlite_multi, latex, odt, epub, html_scroll, html_seg, html_stuff } - void Scheduled(D,I)(int sched, D doc_abstraction, I doc_matters) { - auto msg = Msg!()(doc_matters); + void Scheduled(D)(int sched, D doc) { + auto msg = Msg!()(doc.matters); if (sched == outTask.source_or_pod) { msg.v("spine (doc reform) source processing... "); - if (doc_matters.opt.action.pod) { msg.v("spine (doc reform) source pod processing... "); } + if (doc.matters.opt.action.pod) { msg.v("spine (doc reform) source pod processing... "); } import sisudoc.io_out.source_pod; - spinePod!()(doc_matters); - if (doc_matters.opt.action.source) { msg.vv("spine (doc reform) source done"); } - if (doc_matters.opt.action.pod) { msg.vv("spine (doc reform) source pod done"); } + spinePod!()(doc.matters); + if (doc.matters.opt.action.source) { msg.vv("spine (doc reform) source done"); } + if (doc.matters.opt.action.pod) { msg.vv("spine (doc reform) source pod done"); } } if (sched == outTask.epub) { msg.v("epub3 processing... "); import sisudoc.io_out.epub3; - doc_abstraction.outputEPub3!()(doc_matters); + doc.outputEPub3!(); msg.vv("epub3 done"); } if (sched == outTask.html_stuff) { - outputMetadata!()(doc_matters); + outputMetadata!()(doc.matters); msg.vv("html metadata done"); } if (sched == outTask.html_scroll) { msg.v("html scroll processing... "); import sisudoc.io_out.html; - outputHTML!().scroll(doc_abstraction, doc_matters); + outputHTML!().scroll(doc); msg.vv("html scroll done"); } if (sched == outTask.html_seg) { msg.v("html seg processing... "); import sisudoc.io_out.html; - outputHTML!().seg(doc_abstraction, doc_matters); + outputHTML!().seg(doc); msg.vv("html seg done"); } if (sched == outTask.html_stuff) { import sisudoc.io_out.html; - outputHTML!().css(doc_matters); - outputHTML!().images_cp(doc_matters); + outputHTML!().css(doc.matters); + outputHTML!().images_cp(doc.matters); msg.vv("html css & images done"); } if (sched == outTask.latex) { msg.v("latex processing... (available for downstream processing & pdf output"); import sisudoc.io_out.latex; import std.file; - if ((isValidPath(doc_matters.output_path ~ "/latex/sty")) - && (!(exists(doc_matters.output_path ~ "/latex/sty"))) + if ((isValidPath(doc.matters.output_path ~ "/latex/sty")) + && (!(exists(doc.matters.output_path ~ "/latex/sty"))) ) { outputLaTeXstyInit!()( - doc_matters.output_path, - doc_matters.opt.action.generated_by, - doc_matters.generator_program.name_version_and_compiler, - doc_matters.generator_program.time_output_generated, + doc.matters.output_path, + doc.matters.opt.action.generated_by, + doc.matters.generator_program.name_version_and_compiler, + doc.matters.generator_program.time_output_generated, ); } - outputLaTeX!()(doc_abstraction, doc_matters); + outputLaTeX!()(doc.abstraction, doc.matters); msg.vv("latex done"); } if (sched == outTask.odt) { msg.v("odf:odt processing... "); import sisudoc.io_out.odt; - outputODT!()(doc_abstraction, doc_matters); + outputODT!()(doc.abstraction, doc.matters); msg.vv("odf:odt done"); } if (sched == outTask.sqlite) { msg.v("sqlite processing... "); import sisudoc.io_out.sqlite; - doc_abstraction.SQLiteHubDiscreteBuildTablesAndPopulate!()(doc_matters); + doc.SQLiteHubDiscreteBuildTablesAndPopulate!(); msg.vv("sqlite done"); } } - if (doc_matters.opt.action.vox_gt0) { writeln(doc_matters.src.filename_base); } - if (!(doc_matters.opt.action.parallelise_subprocesses)) { - foreach(schedule; doc_matters.opt.action.output_task_scheduler) { - Scheduled!()(schedule, doc_abstraction, doc_matters); + if (doc.matters.opt.action.vox_gt0) { writeln(doc.matters.src.filename_base); } + if (!(doc.matters.opt.action.parallelise_subprocesses)) { + foreach(schedule; doc.matters.opt.action.output_task_scheduler) { + Scheduled!()(schedule, doc); } } else { import std.parallelism; - foreach(schedule; parallel(doc_matters.opt.action.output_task_scheduler)) { - Scheduled!()(schedule, doc_abstraction, doc_matters); + foreach(schedule; parallel(doc.matters.opt.action.output_task_scheduler)) { + Scheduled!()(schedule, doc); } } - if (doc_matters.opt.action.sqlite_update) { + if (doc.matters.opt.action.sqlite_update) { msg.v("sqlite update processing..."); import sisudoc.io_out.sqlite; - doc_abstraction.SQLiteHubBuildTablesAndPopulate!()(doc_matters); + doc.SQLiteHubBuildTablesAndPopulate!(); msg.vv("sqlite update done"); - } else if (doc_matters.opt.action.sqlite_delete) { + } else if (doc.matters.opt.action.sqlite_delete) { msg.v("sqlite delete processing..."); import sisudoc.io_out.sqlite; - doc_abstraction.SQLiteHubBuildTablesAndPopulate!()(doc_matters); + doc.SQLiteHubBuildTablesAndPopulate!(); msg.vv("sqlite delete done"); } } diff --git a/src/sisudoc/io_out/sqlite.d b/src/sisudoc/io_out/sqlite.d index 4075bba..8776c9f 100644 --- a/src/sisudoc/io_out/sqlite.d +++ b/src/sisudoc/io_out/sqlite.d @@ -66,11 +66,8 @@ static auto rgx_xhtml = RgxXHTML(); static auto mkup = InlineMarkup(); long _metadata_tid_lastrowid; template SQLiteHubBuildTablesAndPopulate() { - void SQLiteHubBuildTablesAndPopulate(D,M)( - const D doc_abstraction, - M doc_matters, - ) { - auto pth_sqlite = spinePathsSQLite!()(doc_matters.sqlite.filename, doc_matters.sqlite.path); + void SQLiteHubBuildTablesAndPopulate(D)(D doc) { + auto pth_sqlite = spinePathsSQLite!()(doc.matters.sqlite.filename, doc.matters.sqlite.path); if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) { } else { try { @@ -78,14 +75,13 @@ template SQLiteHubBuildTablesAndPopulate() { } catch (FileException ex) { } } template SQLiteDbStatementComposite() { - void SQLiteDbStatementComposite(Db,D,M)( - Db db, - const D doc_abstraction, - M doc_matters, + void SQLiteDbStatementComposite(Db,D)( + Db db, + D doc ) { string _db_statement; - if ((doc_matters.opt.action.sqlite_db_create)) { - auto pth_sqlite = spinePathsSQLite!()(doc_matters.sqlite.filename, doc_matters.sqlite.path); + if ((doc.matters.opt.action.sqlite_db_create)) { + auto pth_sqlite = spinePathsSQLite!()(doc.matters.sqlite.filename, doc.matters.sqlite.path); if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) { } else { try { @@ -93,38 +89,38 @@ template SQLiteHubBuildTablesAndPopulate() { } catch (FileException ex) { } } _db_statement ~= SQLiteTablesReCreate!()(); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "TABLE RE-CREATE"); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "TABLE RE-CREATE"); _db_statement = []; } - if (doc_matters.opt.action.sqlite_delete) { - _db_statement ~= SQLiteDeleteDocument!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "DELETE Document"); + if (doc.matters.opt.action.sqlite_delete) { + _db_statement ~= SQLiteDeleteDocument!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "DELETE Document"); _db_statement = []; } - if (doc_matters.opt.action.sqlite_update) { - _db_statement ~= SQLiteDeleteDocument!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "DELETE Document"); + if (doc.matters.opt.action.sqlite_update) { + _db_statement ~= SQLiteDeleteDocument!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "DELETE Document"); _db_statement = []; - _db_statement ~= SQLiteInsertMetadata!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT MetaData"); + _db_statement ~= SQLiteInsertMetadata!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT MetaData"); _db_statement = []; - /+ get tid (lastrowid or max) for use in doc_objects table +/ - _db_statement ~= doc_abstraction.SQLiteInsertDocObjectsLoop!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT DocObjects"); + /+ get tid (lastrowid or max) for use in doc.objects table +/ + _db_statement ~= doc.SQLiteInsertDocObjectsLoop!(); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT DocObjects"); _db_statement = []; - _db_statement ~= SQLiteInsertMetadataTopics!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT MetaDataTopics"); + _db_statement ~= SQLiteInsertMetadataTopics!()(doc.matters); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "INSERT MetaDataTopics"); _db_statement = []; } db.close; - if (doc_matters.opt.action.vox_gt0) { + if (doc.matters.opt.action.vox_gt0) { writeln(" ", pth_sqlite.sqlite_file); } } } try { auto db = Database(pth_sqlite.sqlite_file); - SQLiteDbStatementComposite!()(db, doc_abstraction, doc_matters); + SQLiteDbStatementComposite!()(db, doc); } catch (FileException e) { writeln("Failed (FileException): ", e.msg, " ", pth_sqlite.sqlite_file); @@ -152,33 +148,29 @@ template SQLiteHubBuildTablesAndPopulate() { } } template SQLiteHubDiscreteBuildTablesAndPopulate() { - void SQLiteHubDiscreteBuildTablesAndPopulate(D,M)( - const D doc_abstraction, - M doc_matters, - ) { - auto url_html = spineUrlsHTML!()(doc_matters.conf_make_meta.conf.w_srv_data_root_url_html, doc_matters.src.language); - auto pth_sqlite = spinePathsSQLiteDiscrete!()(doc_matters.output_path, doc_matters.src.language); // doc_matters.db_path + void SQLiteHubDiscreteBuildTablesAndPopulate(D)(D doc) { + auto url_html = spineUrlsHTML!()(doc.matters.conf_make_meta.conf.w_srv_data_root_url_html, doc.matters.src.language); + auto pth_sqlite = spinePathsSQLiteDiscrete!()(doc.matters.output_path, doc.matters.src.language); // doc.matters.db_path if ((isValidPath(pth_sqlite.base) && exists(pth_sqlite.base) != 0 && pth_sqlite.base.isDir)) { } else { try { pth_sqlite.base.mkdirRecurse; } catch (FileException ex) { } } - auto db = Database(pth_sqlite.sqlite_file(doc_matters.src.filename)); + auto db = Database(pth_sqlite.sqlite_file(doc.matters.src.filename)); template SQLiteDiscreteDbStatementComposite() { - void SQLiteDiscreteDbStatementComposite(Db,D,M)( - Db db, - const D doc_abstraction, - M doc_matters, + void SQLiteDiscreteDbStatementComposite(Db,D)( + Db db, + D doc ) { try { { string _db_statement; _db_statement ~= SQLiteTablesReCreate!()(); - _db_statement ~= SQLiteInsertMetadata!()(doc_matters); - _db_statement ~= SQLiteInsertMetadataTopics!()(doc_matters); - _db_statement ~= doc_abstraction.SQLiteInsertDocObjectsLoop!()(doc_matters); - SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "table CREATE Tables, INSERT DocObjects"); + _db_statement ~= SQLiteInsertMetadata!()(doc.matters); + _db_statement ~= SQLiteInsertMetadataTopics!()(doc.matters); + _db_statement ~= doc.SQLiteInsertDocObjectsLoop!(); + SQLiteDbRun!()(db, _db_statement, doc.matters.opt.action, "table CREATE Tables, INSERT DocObjects"); } db.close; } @@ -204,12 +196,12 @@ template SQLiteHubDiscreteBuildTablesAndPopulate() { import core.runtime; core.runtime.Runtime.terminate(); } - if (doc_matters.opt.action.vox_gt0) { - writeln(" ", pth_sqlite.sqlite_file(doc_matters.src.filename)); + if (doc.matters.opt.action.vox_gt0) { + writeln(" ", pth_sqlite.sqlite_file(doc.matters.src.filename)); } } } - SQLiteDiscreteDbStatementComposite!()(db, doc_abstraction, doc_matters); + SQLiteDiscreteDbStatementComposite!()(db, doc); } } template SQLiteDbRun() { @@ -251,9 +243,7 @@ template SQLinsertDelimiter() { } } template SQLiteFormatAndLoadObject() { - auto SQLiteFormatAndLoadObject(M)( - M doc_matters, - ) { + auto SQLiteFormatAndLoadObject(M)(M doc_matters) { mixin spineRgxOut; mixin spineRgxXHTML; struct sqlite_format_and_load_objects { @@ -1143,9 +1133,7 @@ template SQLiteTablesReCreate() { } } template SQLiteDeleteDocument() { - string SQLiteDeleteDocument(M)( - M doc_matters, - ) { + string SQLiteDeleteDocument(M)(M doc_matters) { string _uid = doc_matters.src.doc_uid; string _delete_uid = format(q"┃ DELETE FROM metadata_and_text @@ -1160,9 +1148,7 @@ template SQLiteDeleteDocument() { } } template SQLiteInsertMetadata() { - string SQLiteInsertMetadata(M)( - M doc_matters, - ) { + string SQLiteInsertMetadata(M)(M doc_matters) { string _uid = SQLinsertDelimiter!()(doc_matters.src.doc_uid); string _insert_metadata = format(q"┃ INSERT INTO metadata_and_text ( @@ -1276,9 +1262,7 @@ template SQLiteInsertMetadata() { } } template SQLiteInsertMetadataTopics() { - string SQLiteInsertMetadataTopics(M)( - M doc_matters, - ) { + string SQLiteInsertMetadataTopics(M)(M doc_matters) { string _uid = SQLinsertDelimiter!()(doc_matters.src.doc_uid); string[] _insert_topics; foreach (topic_line; doc_matters.conf_make_meta.meta.classify_topic_register_expanded_arr) { @@ -1301,12 +1285,9 @@ template SQLiteInsertMetadataTopics() { } } template SQLiteInsertDocObjectsLoop() { - string SQLiteInsertDocObjectsLoop(D,M)( - const D doc_abstraction, - M doc_matters, - ) { - string _uid = SQLinsertDelimiter!()(doc_matters.src.doc_uid); - auto url_html = spineUrlsHTML!()(doc_matters.conf_make_meta.conf.w_srv_data_root_url_html, doc_matters.src.language); + string SQLiteInsertDocObjectsLoop(D)(D doc) { + string _uid = SQLinsertDelimiter!()(doc.matters.src.doc_uid); + auto url_html = spineUrlsHTML!()(doc.matters.conf_make_meta.conf.w_srv_data_root_url_html, doc.matters.src.language); string insertDocObjectsRow(O)(O obj) { string _insert_doc_objects_row = format(q"┃ INSERT INTO doc_objects ( @@ -1336,23 +1317,23 @@ template SQLiteInsertDocObjectsLoop() { ); return _insert_doc_objects_row; } - auto format_and_sqlite_load = SQLiteFormatAndLoadObject!()(doc_matters); + auto format_and_sqlite_load = SQLiteFormatAndLoadObject!()(doc.matters); string[string] obj_txt; string doc_text; string[] _insert_doc_objects; - foreach (part; doc_matters.has.keys_seq.sql) { - foreach (obj; doc_abstraction[part]) { + foreach (part; doc.matters.has.keys_seq.sql) { + foreach (obj; doc.abstraction[part]) { switch (obj.metainfo.is_of_part) { case "frontmatter": assert(part == "head", part); switch (obj.metainfo.is_of_type) { case "para": switch (obj.metainfo.is_a) { case "heading": - obj_txt = format_and_sqlite_load.heading(doc_matters, obj); + obj_txt = format_and_sqlite_load.heading(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1361,7 +1342,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1378,14 +1359,14 @@ template SQLiteInsertDocObjectsLoop() { writeln(__LINE__, ": ", obj.text); } } - obj_txt = format_and_sqlite_load.heading(doc_matters, obj); + obj_txt = format_and_sqlite_load.heading(doc.matters, obj); break; case "para": - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1395,28 +1376,28 @@ template SQLiteInsertDocObjectsLoop() { case "block": switch (obj.metainfo.is_a) { case "quote": - obj_txt = format_and_sqlite_load.quote(doc_matters, obj); + obj_txt = format_and_sqlite_load.quote(doc.matters, obj); break; case "group": - obj_txt = format_and_sqlite_load.group(doc_matters, obj); + obj_txt = format_and_sqlite_load.group(doc.matters, obj); break; case "block": - obj_txt = format_and_sqlite_load.block(doc_matters, obj); + obj_txt = format_and_sqlite_load.block(doc.matters, obj); break; case "poem": // double check on keeping both poem & verse break; case "verse": - obj_txt = format_and_sqlite_load.verse(doc_matters, obj); + obj_txt = format_and_sqlite_load.verse(doc.matters, obj); break; case "code": - obj_txt = format_and_sqlite_load.code(doc_matters, obj); + obj_txt = format_and_sqlite_load.code(doc.matters, obj); break; case "table": - obj_txt = format_and_sqlite_load.table(doc_matters, obj); + obj_txt = format_and_sqlite_load.table(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1425,7 +1406,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1438,23 +1419,23 @@ template SQLiteInsertDocObjectsLoop() { case "para": switch (obj.metainfo.is_a) { case "heading": - obj_txt = format_and_sqlite_load.heading(doc_matters, obj); + obj_txt = format_and_sqlite_load.heading(doc.matters, obj); break; case "glossary": assert(part == "glossary", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; case "bibliography": assert(part == "bibliography", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; case "bookindex": assert(part == "bookindex", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; case "blurb": assert(part == "blurb", part); - obj_txt = format_and_sqlite_load.para(doc_matters, obj); + obj_txt = format_and_sqlite_load.para(doc.matters, obj); break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); } } @@ -1463,7 +1444,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_type); } } @@ -1474,7 +1455,7 @@ template SQLiteInsertDocObjectsLoop() { break; default: { /+ debug +/ - if (doc_matters.opt.action.debug_do_sqlite) { + if (doc.matters.opt.action.debug_do_sqlite) { writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); // check where empty value could come from writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); writeln(__FILE__, ":", __LINE__, ": ", obj.text); // check where empty value could come from @@ -1483,9 +1464,9 @@ template SQLiteInsertDocObjectsLoop() { break; } if (obj.metainfo.is_a == "heading") { - if (doc_matters.opt.action.show_sqlite) { + if (doc.matters.opt.action.show_sqlite) { if (obj.metainfo.heading_lev_markup == 0) { - writeln(doc_matters.src.filename); + writeln(doc.matters.src.filename); } writeln( "markup: ", obj.metainfo.heading_lev_markup, diff --git a/src/sisudoc/meta/metadoc_from_src_functions.d b/src/sisudoc/meta/metadoc_from_src_functions.d index 781227f..3ae10d1 100644 --- a/src/sisudoc/meta/metadoc_from_src_functions.d +++ b/src/sisudoc/meta/metadoc_from_src_functions.d @@ -453,6 +453,62 @@ template docAbstractionFunctions() { pith["block_is"] = eN.blk_is.table; pith["block_state"] = eN.blk_state.on; pith["block_delim"] = eN.blk_delim.curly_special; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_code_open)) { + dochas["codeblock"]++; + an_object["lang"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["syntax"] = (m["syntax"]) ? m["syntax"].to!string : ""; + debug(codequotemarks) { writefln( "* [code quotemarks] %s", line); } + pith["block_is"] = eN.blk_is.code; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; // + } else if (auto m = line.matchFirst(rgx.block_quotemarks_poem_open)) { + dochas["poem"]++; + an_object["syntax"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["lang"] = (m["lang"]) ? m["lang"].to!string : ""; + debug(poem) { writefln( "* [poem quotemarks] %s", line); } + object_number_poem["start"] = obj_cite_digits.object_number.to!string; + pith["block_is"] = eN.blk_is.poem; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; // + pith["verse_new"] = eN.bi.on; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_group_open)) { + dochas["group"]++; + an_object["syntax"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["lang"] = (m["lang"]) ? m["lang"].to!string : ""; + debug(group) { writefln( "* [group quotemarks] %s", line); } + pith["block_is"] = eN.blk_is.group; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_block_open)) { + dochas["block"]++; + an_object["syntax"] = ""; + an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : ""; + an_object["lang"] = (m["lang"]) ? m["lang"].to!string : ""; + debug(block) { writefln( "* [block quotemarks] %s", line); } + pith["block_is"] = eN.blk_is.block; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_quote_open)) { + dochas["quote"]++; + an_object["syntax"] = ""; + an_object["attrib"] = m["attrib"].to!string; + an_object["lang"] = m["lang"].to!string; + debug(quote) { writefln( "* [quote quotemarks] %s", line); // quote (quotemarks) open + } + pith["block_is"] = eN.blk_is.quote; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; + } else if (auto m = line.matchFirst(rgx.block_quotemarks_table_open)) { // quotemarks table open + debug(table) { writefln( "* [table quotemarks] %s", line); } + dochas["table"] ++; + an_object["table_head"] = m["attrib"].to!string; + an_object["block_type"] = "quotemarks"; + pith["block_is"] = eN.blk_is.table; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.quotemarks; } else if (auto m = line.matchFirst(rgx.block_tic_code_open)) { dochas["codeblock"]++; an_object["lang"] = ""; @@ -536,6 +592,17 @@ template docAbstractionFunctions() { debug(group) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(group) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.group; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(group) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(group) { writeln(line); } @@ -574,6 +641,17 @@ template docAbstractionFunctions() { debug(block) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(block) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.block; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(block) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(block) { writeln(line); } @@ -698,6 +776,94 @@ template docAbstractionFunctions() { ++cntr; } } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (auto m = line.matchFirst(rgx.block_quotemarks_close)) { + an_object[an_object_key] = "verse"; + debug(poem) { writefln( "* [poem quotemarks] %s", line); } + if (processing.length > 0) { + an_object[an_object_key] = processing["verse"]; + } + if (an_object.length > 0) { + debug(poem) { writeln(__LINE__); writeln(obj_cite_digits.object_number, line); } + processing.remove("verse"); + an_object["is"] = "verse"; + ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); + an_object["substantive"] = substantive_obj_misc_struct.obj_txt; + anchor_tag = substantive_obj_misc_struct.anchor_tag; + comp_obj_ = set_object_generic("body", "body", "block", "verse", an_object["substantive"], obj_cite_digits.object_number); + comp_obj_.metainfo.identifier = obj_cite_digits.identifier; + comp_obj_.metainfo.object_number_off = obj_cite_digits.off; + comp_obj_.metainfo.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_.metainfo.object_number_type = obj_cite_digits.type; + comp_obj_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"]; + comp_obj_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"]; + comp_obj_.has.inline_notes_reg = substantive_obj_misc_struct.has_notes_reg; + comp_obj_.has.inline_notes_star = substantive_obj_misc_struct.has_notes_star; + comp_obj_.has.inline_links = substantive_obj_misc_struct.has_links; + the_document_body_section ~= comp_obj_; + tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc); + object_number_poem["end"] = obj_cite_digits.object_number.to!string; + object_reset(an_object); + processing.remove("verse"); + ++cntr; + } + pith["block_is"] = eN.blk_is.poem; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + processing["verse"] ~= line ~= "\n"; + if (pith["verse_new"] == eN.bi.on) { + obj_cite_digits = ocn_emit(pith["ocn"]); + pith["verse_new"] = eN.bi.off; + } else if (line.matchFirst(rgx.newline_eol_delimiter_only)) { + processing["verse"] = processing["verse"].stripRight; + pith["verse_new"] = eN.bi.on; + verse_line = eN.bi.off; + } + if (pith["verse_new"] == eN.bi.on) { + verse_line = 1; + an_object[an_object_key] = processing["verse"]; + debug(poem) { writefln( + "* %s tic\n%s", + obj_cite_digits.object_number, + an_object[an_object_key] + ); + } + processing.remove("verse"); + an_object["is"] = "verse"; + auto comp_obj_location + = node_construct.node_location_emitter( + content_non_header, + tag_in_seg, + lev_anchor_tag, + tag_assoc, + obj_cite_digits, + cntr, + heading_ptr-1, + an_object["is"] + ); + ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct + = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); + an_object["substantive"] = substantive_obj_misc_struct.obj_txt; + anchor_tag = substantive_obj_misc_struct.anchor_tag; + comp_obj_ = set_object_generic("body", "body", "block", "verse", an_object["substantive"], obj_cite_digits.object_number); + comp_obj_.metainfo.identifier = obj_cite_digits.identifier; + comp_obj_.metainfo.object_number_off = obj_cite_digits.off; + comp_obj_.metainfo.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_.metainfo.object_number_type = obj_cite_digits.type; + comp_obj_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"]; + comp_obj_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1to4"]; + comp_obj_.has.inline_notes_reg = substantive_obj_misc_struct.has_notes_reg; + comp_obj_.has.inline_notes_star = substantive_obj_misc_struct.has_notes_star; + comp_obj_.has.inline_links = substantive_obj_misc_struct.has_links; + the_document_body_section ~= comp_obj_; + tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc); + object_reset(an_object); + processing.remove("verse"); + ++cntr; + } + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (auto m = line.matchFirst(rgx.block_tic_close)) { an_object[an_object_key] = "verse"; @@ -816,6 +982,19 @@ template docAbstractionFunctions() { debug(codecurly) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(codequotemarks) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key] + .replaceFirst(rgx.newline_eol_delimiter_only, "") + .stripRight; + pith["block_is"] = eN.blk_is.code; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(codequotemarks) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(codetic) { writeln(line); } @@ -884,6 +1063,16 @@ template docAbstractionFunctions() { debug(table) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(table) { writeln(line); } + pith["block_is"] = eN.blk_is.table; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(table) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(table) { writeln(line); } @@ -927,6 +1116,17 @@ template docAbstractionFunctions() { debug(quote) { writeln(line); } an_object[an_object_key] ~= line ~= "\n"; } + } else if (pith["block_delim"] == eN.blk_delim.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + debug(quote) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.quote; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; + } else { + debug(quote) { writeln(line); } + an_object[an_object_key] ~= line ~= "\n"; + } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (line.matchFirst(rgx.block_tic_close)) { debug(quote) { writeln(line); } diff --git a/src/sisudoc/meta/metadoc_object_setter.d b/src/sisudoc/meta/metadoc_object_setter.d index 89ef856..e0e896e 100644 --- a/src/sisudoc/meta/metadoc_object_setter.d +++ b/src/sisudoc/meta/metadoc_object_setter.d @@ -420,6 +420,7 @@ template ObjectSetter() { tic, curly_special, tic_special, + quotemarks, } } return _e(); diff --git a/src/sisudoc/meta/rgx.d b/src/sisudoc/meta/rgx.d index eb6fc04..259ab82 100644 --- a/src/sisudoc/meta/rgx.d +++ b/src/sisudoc/meta/rgx.d @@ -108,8 +108,8 @@ static template spineRgxIn() { static para_attribs = ctRegex!(`^_(?:(?:[0-9])(?:_([0-9]))?|(?:[1-9])?[*]) `); static para_inline_link_anchor = ctRegex!(`\*[~](?P<anchor>[a-z0-9_.-]+)(?= |$)`,"i"); /+ blocked markup +/ - static block_open = ctRegex!("^((code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|^`{3} (code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?|^[{]table[(](?:h;)?(?P<columns>(?:[ ,]+[0-9]+)+)[)][}]"); - static block_poem_open = ctRegex!("^((poem(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|`{3} poem(?:[(][ a-zA-Z0-9;:,]*[)])?)"); + static block_open = ctRegex!("^((code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|^[`']{3} (code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?|^[{]table[(](?:h;)?(?P<columns>(?:[ ,]+[0-9]+)+)[)][}]"); + static block_poem_open = ctRegex!("^((poem(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|[`']{3} poem(?:[(][ a-zA-Z0-9;:,]*[)])?)"); /+ blocked markup tics +/ static block_tic_code_open = ctRegex!("^`{3} code(?:[.](?P<syntax>[a-z][0-9a-z#+_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?"); static block_tic_poem_open = ctRegex!("^`{3} poem(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?"); @@ -118,6 +118,14 @@ static template spineRgxIn() { static block_tic_quote_open = ctRegex!("^`{3} quote(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?"); static block_tic_table_open = ctRegex!("^`{3} table(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?"); // ctRegex!("^`{3} table(?:\(.*?\))?"); static block_tic_close = ctRegex!("^(`{3})$","m"); + /+ blocked markup tics +/ + static block_quotemarks_code_open = ctRegex!(`^'{3} code(?:[.](?P<syntax>[a-z][0-9a-z#+_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); + static block_quotemarks_poem_open = ctRegex!(`^'{3} poem(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); + static block_quotemarks_group_open = ctRegex!(`^'{3} group(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); + static block_quotemarks_block_open = ctRegex!(`^'{3} block(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); + static block_quotemarks_quote_open = ctRegex!(`^'{3} quote(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); + static block_quotemarks_table_open = ctRegex!(`^'{3} table(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); // ctRegex!("^'{3} table(?:\(.*?\))?"); + static block_quotemarks_close = ctRegex!(`^('{3})$`,"m"); /+ blocked markup curly +/ static block_curly_code_open = ctRegex!(`^(?:code(?:[.](?P<syntax>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?[{][ ]*$)`); static block_curly_code_close = ctRegex!(`^([}]code)`); diff --git a/src/sisudoc/spine.d b/src/sisudoc/spine.d index 81713c0..e6e163d 100755 --- a/src/sisudoc/spine.d +++ b/src/sisudoc/spine.d @@ -1060,8 +1060,6 @@ string program_name = "spine"; writeln("--->\nstepX commence → (document abstraction) [", manifest.src.filename, "]"); } auto doc = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct); - auto doc_abstraction = doc.abstraction; - auto doc_matters = doc.matters; if ((doc.matters.opt.action.debug_do) || (_opt_action.debug_do_stages) ) { @@ -1112,7 +1110,7 @@ string program_name = "spine"; if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) { writeln("step5 commence → (process outputs) [", manifest.src.filename, "]"); } - doc.abstraction.outputHub!()(doc.matters); + doc.outputHub!(); if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) { writeln("- step5 complete for [", manifest.src.filename, "]"); } @@ -1161,8 +1159,6 @@ string program_name = "spine"; writeln("--->\nstepX commence → (document abstraction) [", manifest.src.filename, "]"); } auto doc = spineAbstraction!()(_env, program_info, _opt_action, _cfg, manifest, _make_and_meta_struct); - auto doc_abstraction = doc.abstraction; - auto doc_matters = doc.matters; if ((doc.matters.opt.action.debug_do) || (_opt_action.debug_do_stages) ) { @@ -1213,7 +1209,7 @@ string program_name = "spine"; if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) { writeln("step5 commence → (process outputs) [", manifest.src.filename, "]"); } - doc.abstraction.outputHub!()(doc.matters); + doc.outputHub!(); if ((_opt_action.debug_do) || (_opt_action.debug_do_stages)) { writeln("- step5 complete for [", manifest.src.filename, "]"); } diff --git a/sundry/editor-syntax-etc/emacs/README b/sundry/editor-syntax-etc/emacs/README new file mode 100644 index 0000000..6dabf72 --- /dev/null +++ b/sundry/editor-syntax-etc/emacs/README @@ -0,0 +1,4 @@ +; put this into your .emacs file, then use the mode file: + +(load-file "~/emacs/el/sisu-spine-mode.el") +(add-to-list 'auto-mode-alist '("\\.sst$" . sisu-spine-mode)) diff --git a/sundry/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el b/sundry/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el new file mode 100644 index 0000000..4cc6332 --- /dev/null +++ b/sundry/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el @@ -0,0 +1,10 @@ +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) +(autoload 'sisu-spine-mode "sisu-spine-mode" "\ +Major mode for editing SiSU (spine) markup files. +SiSU (https://www.sisudoc.org/) document structuring, publishing +and search. + +\(fn)" t nil) +(add-to-list 'auto-mode-alist '("\\.sst\\'" . sisu-spine-mode)) +(add-to-list 'auto-mode-alist '("\\.ssm\\'" . sisu-spine-mode)) +(add-to-list 'auto-mode-alist '("\\.ssi\\'" . sisu-spine-mode)) diff --git a/sundry/editor-syntax-etc/emacs/sisu-spine-mode.el b/sundry/editor-syntax-etc/emacs/sisu-spine-mode.el new file mode 100644 index 0000000..f2e29ed --- /dev/null +++ b/sundry/editor-syntax-etc/emacs/sisu-spine-mode.el @@ -0,0 +1,502 @@ +;;; sisu-spine-mode.el --- Major mode for SiSU (spine parser) markup text + +;; Copyright (C) 2011, 2025 Free Software Foundation, Inc. + +;; Author: Ralph Amissah & Ambrose Kofi Laing +;; Maintainer: Ralph Amissah <ralph.amissah@gmail.com> +;; Keywords: text, syntax, processes, tools +;; Version: 8.0.0 +;; URL: https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/emacs/sisu-spine-mode.el +;; https://sisudoc.org/ +;; originally looked at (based on) doc-mode, with kind permission of the author +;; Author: SUN, Tong <suntong001@users.sf.net>, (c)2001-6, all right reserved +;; Version: $Date: 2006/01/19 03:13:41 $ $Revision: 1.14 $ +;; Home URL: https://xpt.sourceforge.net/ +;; with contributions from Kevin Ryde and Stefan Monnier + +;; 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, 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 <https://www.gnu.org/licenses/>. + +;; Viva Software Libre! +;; Support the free software movement! +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;; Commentary: + +;; SiSU (https://www.sisudoc.org/) is a document structuring and +;; publishing framework. This package provides an Emacs major mode +;; for SiSU markup, as used by the spine parser (in D) which has a different +;; header (based on yaml) from the original sisu parser (in Ruby) which has +;; bespoke headers. + +;; When this package is installed, files ending in ".sst" are automatically +;; associated with sisu-spine-mode. If a file doesn't have a +;; .sst extension, add a first line: +;; # -*- sisuSpine -*- + +;; The documentation for the "Structure Of The Hierarchy Text" can be +;; found in the sisustring for the sisu-spine-mode function. + +;;; Code: + +;; Variables: + +(defgroup sisu-faces nil + "AsciiSisu highlighting" + :group 'sisus) + +;; == Colors +; color n is more prominent than color n+1 + +(defface sisu-title-1-face + `((((class color) + (background dark)) + (:foreground "brown3" :bold t :height 1.2 :inherit variable-pitch)) + (((class color) + (background light)) + (:foreground "brown3" :bold t :height 1.2 :inherit variable-pitch)) + (t (:weight bold :inherit variable-pitch))) + "Face for AsciiSisu titles at level 1." + :group 'sisu-faces) + +(defface sisu-title-2-face + `((((class color) + (background dark)) + (:foreground "yellow4" :bold t :height 1.1 :inherit variable-pitch)) + (((class color) + (background light)) + (:foreground "yellow4" :bold t :height 1.1 :inherit variable-pitch)) + (t (:weight bold :inherit variable-pitch))) + "Face for AsciiSisu titles at level 2." + :group 'sisu-faces) + +(defface sisu-title-3-face + `((((class color) + (background dark)) + (:foreground "sienna3" :bold t)) + (((class color) + (background light)) + (:foreground "sienna3" :bold t)) + (t (:weight bold))) + "Face for AsciiSisu titles at level 3." + :group 'sisu-faces) + +(defface sisu-title-4-face + `((((class color) + (background dark)) + (:foreground "burlywood3")) + (((class color) + (background light)) + (:foreground "burlywood3")) + (t ())) + "Face for AsciiSisu titles at level 4." + :group 'sisu-faces) + +(defface info-node + '((((class color) (background light)) (:foreground "brown" :bold t :italic t)) + (((class color) (background dark)) (:foreground "white" :bold t :italic t)) + (t (:bold t :italic t))) + "Face for Info node names." + :group 'sisu-faces) + +(defvar sisu-title-1 'sisu-title-1-face) +(defvar sisu-title-2 'sisu-title-2-face) +(defvar sisu-title-3 'sisu-title-3-face) +(defvar sisu-title-4 'sisu-title-4-face) + +(defvar sisu-general-font-lock-red1 font-lock-warning-face) +(defvar sisu-general-font-lock-red2 font-lock-comment-face) +(defvar sisu-general-font-lock-red3 font-lock-string-face) + +(defvar sisu-general-font-lock-green1 font-lock-type-face) +(defvar sisu-general-font-lock-green2 font-lock-constant-face) + +(defvar sisu-general-font-lock-blue1 font-lock-keyword-face) +(defvar sisu-general-font-lock-blue2 font-lock-function-name-face) +(defvar sisu-general-font-lock-blue3 font-lock-builtin-face) + +(defvar sisu-general-font-lock-yellow1 font-lock-variable-name-face) +(defvar sisu-general-font-lock-yellow2 font-lock-comment-face) + +;; == sisu-spine-mode settings + +(defvar sisu-spine-mode-hook nil + "Normal hook run when entering Sisu Text mode.") + +(defvar sisu-spine-mode-abbrev-table nil + "Abbrev table in use in Sisu-spine-mode buffers.") +(define-abbrev-table 'sisu-spine-mode-abbrev-table ()) + +(defconst sisu-font-lock-keywords + (eval-when-compile + (list + ;;grouped text --------- + ;(cons "^```[ ]code\\(.\\|\n\\)+?\n```\n" 'sisu-general-font-lock-red2) + (cons "^```[ ]+code.*?$\\|^```$" 'sisu-general-font-lock-red2) + (cons "^```[ ]+table.*?$\\|^```$" 'sisu-general-font-lock-red2) + (cons "^```[ ]+group$\\|^```$" 'sisu-general-font-lock-red2) + (cons "^```[ ]+block$\\|^```$" 'sisu-general-font-lock-red2) + (cons "^```[ ]+poem$\\|^```$" 'sisu-general-font-lock-red2) + (cons "^```[ ]+alt$\\|^```$" 'sisu-general-font-lock-red2) + ;;grouped text --------- + ;(cons "^'''[ ]code\\(.\\|\n\\)+?\n'''\n" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+code.*?$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+table.*?$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+group$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+block$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+poem$\\|^'''$" 'sisu-general-font-lock-red2) + (cons "^'''[ ]+alt$\\|^'''$" 'sisu-general-font-lock-red2) + ;;grouped text --------- + (cons "^group{\\|^}group" 'sisu-general-font-lock-red2) + (cons "^block{\\|^}block" 'sisu-general-font-lock-red2) + (cons "^code{\\|^}code" 'sisu-general-font-lock-red2) + (cons "^poem{\\|^}poem" 'sisu-general-font-lock-red2) + (cons "^alt{\\|^}alt" 'sisu-general-font-lock-red2) + (cons "^table{.+\\|^}table" 'sisu-general-font-lock-red2) + (cons "^{table[^}]+}" 'sisu-general-font-lock-red2) + + (list + (concat + "^\`\\{3\\}[ ]+code.*?$" + "\\(.\\|\n\\)+?" + "\`\\{3\\}$" + ) + '(1 sisu-general-font-lock-red2 t) + '(2 nil t) + '(3 sisu-general-font-lock-red2 t) + ) + (list + (concat + "^\`\\{3\\}[ ]+table.*?$" + "\\(.\\|\n\\)+?" + "\`\\{3\\}$" + ) + '(1 sisu-general-font-lock-red2 t) + '(2 nil t) + '(3 sisu-general-font-lock-red2 t) + ) + (list + (concat + "^\`\\{3\\}[ ]+\\(group\\|block\\|alt\\|poem\\)$" + "\\(.\\|\n\\)+?" + "^\`\\{3\\}$" + ) + '(1 sisu-general-font-lock-red2 t) + '(2 nil t) + '(3 sisu-general-font-lock-red2 t) + ) + + ;; footnote/endnote ---- + ;(cons "\~{.+?}\~" 'sisu-general-font-lock-green1) + (cons "\~{\\*\\*\\|\~{\\*\\|\~{\\|}\~" 'sisu-general-font-lock-red2) + (cons "\~\\[\\+\\|\~\\[\\*\\|\~\\[\\|\\]\~" 'sisu-general-font-lock-red2) + (cons "\~\\^ \\|^\\^\~ " 'sisu-general-font-lock-red2) + (list + (concat + "\\(\*\~\\)" + "\\([^ \r\t\n]+\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-blue2 t) + ) + + ;; emphasis (can be program configured to be bold italics or underscore) + (list + (concat + "\\([*]{\\)" + "\\([^}]+\\)" + "\\(}[*]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; bold ---------------- + (list + (concat + "\\([!]{\\)" + "\\([^}]+\\)" + "\\(}[!]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + (cons "\\*[^ ]+\\*" 'sisu-general-font-lock-red1) + (cons "^!_ .+" 'sisu-general-font-lock-red1) + + ;; italics ------------- + (list + (concat + "\\([/]{\\)" + "\\([^}]+\\)" + "\\(}[/]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-blue1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; underscore ---------- + (list + (concat + "\\([_]{\\)" + "\\([^}]+\\)" + "\\(\}[_]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; monospace ----------- + (list + (concat + "\\([#]{\\)" + "\\([^}]+\\)" + "\\(}[#]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; citation ------------ + (list + (concat + "\\([\"]{\\)" + "\\([^}]+\\)" + "\\(}[\"]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; inserted text ------- + (list + (concat + "\\([\+]{\\)" + "\\([^}]+\\)" + "\\(}[\+]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; strike through ------ + (list + (concat + "\\(\\-{\\)" + "\\([^}]+\\)" + "\\(}\\-\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; superscript --------- + (list + (concat + "\\(\\^{\\)" + "\\([^}]+\\)" + "\\(}\\^\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; subscript ----------- + (list + (concat + "\\([,]{\\)" + "\\([^}]+\\)" + "\\(}[,]\\)" + ) + '(1 sisu-general-font-lock-red1 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-red1 t) + ) + + ;; numbered list + (cons "^# \\|^_# " 'sisu-general-font-lock-red1) + + ;; bullet text + (cons "^_\\*[1-9] \\|^_\\* " 'sisu-general-font-lock-red1) + + ;; indented text + (cons "^_[1-9] " 'sisu-general-font-lock-red1) + (cons "^_[1-9]! " 'sisu-general-font-lock-red1) + + ;; hanging indented text [proposed enable when implemented] + (cons "^__[1-9] " 'sisu-general-font-lock-red1) + (cons "^_[0-9]_[0-9] " 'sisu-general-font-lock-red1) + (cons "^__[1-9]! " 'sisu-general-font-lock-red1) + (cons "^_[0-9]_[0-9]! " 'sisu-general-font-lock-red1) + + ;; url + (cons "\\(^\\|[ ]\\)https?:[/][/][^ \t\n\r<]+" 'sisu-general-font-lock-blue2) + + ;; Comment Lines + (cons "^% .*" 'sisu-general-font-lock-blue1) + + ;; page break + (cons "^\\(-\\\\\\\\-\\|=\\\\\\\\=\\|-\\.\\.-\\)" 'sisu-general-font-lock-red2) + + ;; line break + (cons " \\\\\\\\ " 'sisu-general-font-lock-red1) + + ;; line break (depreciated) + (cons "<br>" 'sisu-general-font-lock-red1) + + ;; Section titles + (list "^\\(\\([1-4]\\|:?[A-D]\\)\\~\\)\\(.*\\)" + '(1 sisu-title-1 t) + '(3 sisu-title-2 t) + ) + + ;; hyper-links + (list + (concat + "\\({~^\\|{\\)" + "\\([^}{]+\\)" + "\\(}https?:[/][/][^ \r\n\t<]+\\)" + ) + '(1 sisu-general-font-lock-blue2 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-blue2 t) + ) + + ;; book index + (list + (concat + "^\\(\={\\)" + "\\([^}{]+\\)" + "\\(}\\)$" + ) + '(1 sisu-general-font-lock-green1 t) + '(2 nil t) + '(3 sisu-general-font-lock-green1 t) + ) + + ;(cons "^\={.+}" 'sisu-general-font-lock-green1) + + ;; numbers + (cons "\\<[.0-9]+\\>" 'sisu-general-font-lock-green2) + + ;; bullets sisu_normal (nearly copied regexp) + (cons "^_\\([1-9*]\\|[1-9]\\*\\) " 'sisu-general-font-lock-blue2) + + ;; image links + (list + (concat + "\\({\\)" + "\\([^}{]+\\)" + "\\(}image\\)" + ) + '(1 sisu-general-font-lock-blue2 t) + '(2 sisu-general-font-lock-red1 t) + '(3 sisu-general-font-lock-blue2 t) + ) + + ;; insert file links + (list + (concat + "\\(<< \\)" + "\\([^ \r\t\n]+\\.ss\\)" + "\\(i\\|t\\)" + ) + '(1 sisu-general-font-lock-blue2 t) + '(2 sisu-general-font-lock-blue2 t) + '(3 sisu-general-font-lock-blue2 t) + ) + + ;; raw keywords + (list + (concat + "^\\(\\(" + "creator\\|" + "title\\|" + "date\\|" + "rights\\|" + "publisher\\|" + "classify\\|" + "identifier\\|" + "original\\|" + "notes\\|" + "links\\|" + "make\\|" + "\\):\\)\\(.*\\)" + ) + '(1 sisu-title-2 keep) + '(3 sisu-title-3 keep) + ) + ) + ) + "Default expressions to highlight in AsciiSisu mode." +) + +;; outline mode evil "folding" if available +;; (define-key evil-normal-state-map ",0" 'show-all) +;; (define-key evil-normal-state-map ",-" 'hide-body) +;; (define-key evil-normal-state-map ",+" 'show-subtree) +;; (define-key evil-normal-state-map ",=" 'show-subtree) + +;; + +;; Sisu & Autoload: + +;;;###autoload +(define-derived-mode sisu-spine-mode text-mode "SiSU" + "Major mode for editing SiSU files. +SiSU document structuring, publishing in multiple formats and search. +URL `https://www.sisudoc.org/'" + (modify-syntax-entry ?\' ".") + ;;(flyspell-mode nil) + + (make-local-variable 'paragraph-start) + (setq paragraph-start (concat "$\\|>" page-delimiter)) + (make-local-variable 'paragraph-separate) + (setq paragraph-separate paragraph-start) + (make-local-variable 'paragraph-ignore-fill-prefix) + (setq paragraph-ignore-fill-prefix t) + + (set (make-local-variable 'outline-regexp) + "^\\(\\([1-4]\\|:?[A-D]\\)\\~\\|\\@[a-z]+:\\( \\|$\\)\\)") + + (make-local-variable 'require-final-newline) + (setq require-final-newline t) + + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults + '(sisu-font-lock-keywords + nil ; KEYWORDS-ONLY: no + nil ; CASE-FOLD: no + ((?_ . "w")) ; SYNTAX-ALIST + )) + ;; Enable outlining. + ;; TODO with outlining make sure linum (line numbering) is off, + ;; else performance penalty, sucks bigtime + (outline-minor-mode 1)) + +;;;###autoload (add-to-list 'auto-mode-alist '("\\.ss[imt]\\'" . sisu-spine-mode)) + +(provide 'sisu-spine-mode) + +;; + +;;; sisu-spine-mode.el ends here diff --git a/sundry/editor-syntax-etc/vim/colors/def-sisu.vim b/sundry/editor-syntax-etc/vim/colors/def-sisu.vim new file mode 100644 index 0000000..2c260bb --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/def-sisu.vim @@ -0,0 +1,224 @@ +" Vim color file +" Name: def-sisu +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/def-sisu.vim> +" <https://sisudoc.org/> +" Note: primarily 16 color cterm improved by tweaking of .Xdefaults +" (with occasional other colors selected from 256 color palate) +" .Xdefaults tweaking to make identical to def (256) provided, +" along with an alternative possibility using colors beyond +" 256 color palate +:hi clear +if exists("syntax_on") + syntax reset +endif +:set t_Co=256 +:set background=dark +:let colors_name = "def-sisu" +" ------- +" terminal def +" ------- +:hi Normal ctermbg=0 ctermfg=7 +":hi Cursor ctermbg=5 ctermfg=0 +:hi lCursor cterm=reverse +:hi StatusLine cterm=bold,reverse +:hi StatusLineNC cterm=reverse +:hi Search cterm=none ctermbg=57 ctermfg=0 +:hi IncSearch cterm=none ctermbg=154 ctermfg=0 +:hi SpecialKey ctermfg=4 +:hi Visual cterm=reverse +:hi VisualNOS cterm=bold,underline +:hi MoreMsg ctermfg=2 +:hi ModeMsg cterm=bold +:hi Question ctermfg=2 +:hi Title cterm=bold ctermfg=3 +:hi NonText cterm=bold ctermfg=4 +:hi LineNr cterm=bold ctermbg=0 ctermfg=0* +:hi CursorLineNr cterm=bold ctermbg=166 ctermfg=0 +:hi Directory ctermfg=4 +:hi WildMenu ctermbg=3 ctermfg=0 +:hi VertSplit cterm=reverse +:hi Folded cterm=none ctermbg=0 ctermfg=8 +:hi FoldColumn ctermbg=7 ctermfg=4 +:hi DiffAdd cterm=none ctermbg=2 ctermfg=0 +:hi DiffChange cterm=none ctermbg=7 ctermfg=0 +:hi DiffDelete cterm=none ctermbg=7 ctermfg=0 +:hi DiffText cterm=none ctermbg=6 ctermfg=0 +:hi String cterm=none ctermfg=3 +:hi Comment cterm=none ctermbg=0 ctermfg=4 +:hi Constant ctermfg=1 +:hi Special ctermfg=6 +:hi Identifier ctermfg=6 +:hi Statement ctermfg=6 +:hi Operator ctermfg=1 +:hi PreProc ctermbg=7 ctermfg=1 +:hi Type ctermfg=2 +:hi Delimiter cterm=none ctermfg=1 +:hi Ignore cterm=bold ctermfg=7 +:hi Todo ctermbg=3 ctermfg=0 +:hi Underlined cterm=underline +:hi Include ctermfg=1 +:hi Define ctermfg=3 +:hi Function ctermfg=6 +:hi Structure ctermfg=2 +:hi MatchParen cterm=bold ctermbg=4 ctermfg=7 +:hi CursorLine cterm=bold +:hi CursorColumn ctermbg=17 +:hi ColorColumn ctermbg=17 +:hi SpellBad cterm=underline ctermbg=0 ctermfg=5 +:hi SpellCap cterm=underline ctermbg=0 ctermfg=5 +:hi SpellLocal cterm=underline ctermbg=0 ctermfg=5 +:hi SpellRare cterm=underline ctermbg=0 ctermfg=5 +:hi TrailingWhitespace ctermbg=1 +:hi ExtraWhitespace ctermbg=1 +:hi WarningMsg ctermfg=1 +:hi ErrorMsg cterm=bold ctermbg=1 ctermfg=7 +:hi Error cterm=bold ctermbg=1 ctermfg=7 +" ------- +" gui def +" ------- +:hi Normal guibg=#000000 guifg=#D3D3D3 +:hi Cursor guibg=#CC9966 guifg=#000000 +:hi lCursor gui=reverse +:hi StatusLine gui=bold,reverse +:hi StatusLineNC gui=reverse +:hi Search gui=none guibg=#5F00FF guifg=#000000 +:hi IncSearch gui=none guibg=#AFFF00 guifg=#000000 +:hi SpecialKey guifg=#5971AD +:hi Visual gui=reverse +:hi VisualNOS gui=bold,underline +:hi MoreMsg guifg=#4E9A06 +:hi ModeMsg gui=bold +:hi Question guifg=#4E9A06 +:hi Title gui=bold guifg=#C4A000 +:hi NonText gui=bold guifg=#5971AD +:hi LineNr gui=bold guibg=#000000 guifg=#808080 +:hi CursorLineNr gui=bold guibg=#D75F00 guifg=#000000 +:hi Directory guifg=#5971AD +:hi WildMenu guibg=#C4A000 guifg=#000000 +:hi VertSplit gui=reverse +:hi Folded gui=none guibg=#000000 guifg=#808080 +:hi FoldColumn guibg=#D3D3D3 guifg=#5971AD +:hi DiffAdd gui=none guibg=#4E9A06 guifg=#000000 +:hi DiffChange gui=none guibg=#D3D3D3 guifg=#000000 +:hi DiffDelete gui=none guibg=#D3D3D3 guifg=#000000 +:hi DiffText gui=none guibg=#06989A guifg=#000000 +:hi String gui=none guifg=#C4A000 +:hi Comment gui=none guibg=#000000 guifg=#5971AD +:hi Constant guifg=#CC0000 +:hi Special guifg=#06989A +:hi Identifier guifg=#06989A +:hi Statement guifg=#06989A +:hi Operator guifg=#CC0000 +:hi PreProc guibg=#D3D3D3 guifg=#CC0000 +:hi Type guifg=#4E9A06 +:hi Delimiter gui=none guifg=#CC0000 +:hi Ignore gui=bold guifg=#D3D3D3 +:hi Todo guibg=#C4A000 guifg=#000000 +:hi Underlined gui=underline +:hi Include guifg=#CC0000 +:hi Define guifg=#C4A000 +:hi Function guifg=#06989A +:hi Structure guifg=#4E9A06 +:hi MatchParen gui=bold guibg=#5971AD guifg=#D3D3D3 +:hi CursorLine gui=bold +:hi CursorColumn guibg=#00005F +:hi ColorColumn guibg=#00005F +:hi SpellBad gui=underline guibg=#000000 guifg=#75507B +:hi SpellCap gui=underline guibg=#000000 guifg=#75507B +:hi SpellLocal gui=underline guibg=#000000 guifg=#75507B +:hi SpellRare gui=underline guibg=#000000 guifg=#75507B +:hi TrailingWhitespace guibg=#080000 +:hi ExtraWhitespace guibg=#CC0000 +:hi WarningMsg guifg=#CC0000 +:hi ErrorMsg gui=bold guibg=#CC0000 guifg=#D3D3D3 +:hi Error gui=bold guibg=#CC0000 guifg=#D3D3D3 +" ------- +"256 color .Xdefaults vim: cterm giu +"<https://vim.wikia.com/wiki/Xterm256_color_names_for_console_Vim> +"<https://guns.github.com/xterm-color-table.vim/images/xterm-color-table-with-visible-rgb.png> +" ------- +" 256 color .Xdefaults vim: cterm giu def +" ------- +" 16 color standard altered 256 altered beyond 256 +" black/dark grey +" 0 [ 0:#000000] #000000 +" 8 [ 8:#808080] [59:#5F5F5F] #555555 +" red +" 1 [ 1:#800000] 160:#DF0000 #CC0000 +" 9 [ 9:#FF0000] #EF2929 +" green +" 2 [ 2:#008000] 112:#87DF00 #4E9A06 +" 10 [10:#00FF00] 154:#AFFF00 #8AE234 +" yellow/orange +" 3 [ 3:#808000] 178:#DFAF00 #C4A000 +" 11 [11:#FFFF00] 184:#DFDF00 #FC9E4F +" blue +" 4 [ 4:#000080] 24:#005F87 #5971AD +" 12 [12:#0000FF] 73:#5FAFAF #729FCF +" magenta +" 5 [ 5:#800080] 90:#870087 #75507B +" 13 [13:#FF00FF] 126:#AF0087 #AD7FA8 +" cyan +" 6 [ 6:#008080] 37:#00AFAF #06989A +" 14 [14:#00FFFF] 87:#5FFFFF #34E2E2 +" white +" 7 [ 7:#C0C0C0] #D3D3D3 +" 15 [15:#FFFFFF] #EEEEEE +" -------- +" .Xdefaults (rxvt urxvt setting beyond 256 colors, vim colorscheme "def" gui settings) +" (vim colorscheme "def" cterm matches "def" gui if .Xdefaults set thus) +" -------- +" ! black +" Rxvt.color0 : #000000 +" Rxvt.color8 : #555555 +" ! red +" Rxvt.color1 : #CC0000 +" Rxvt.color9 : #EF2929 +" ! green +" Rxvt.color2 : #4E9A06 +" Rxvt.color10 : #8AE234 +" ! yellow +" Rxvt.color3 : #C4A000 +" Rxvt.color11 : #FCE94F +" ! blue +" Rxvt.color4 : #5971AD +" Rxvt.color12 : #729FCF +" ! magenta +" Rxvt.color5 : #75507B +" Rxvt.color13 : #AD7FA8 +" ! cyan +" Rxvt.color6 : #06989A +" Rxvt.color14 : #34E2E2 +" ! white +" Rxvt.color7 : #D3D7CF +" Rxvt.color15 : #EEEEEE +" -------- +" .Xdefaults 256 (rxvt urxvt setting, vim colorscheme "def256" cterm & gui settings) +" (vim colorscheme "def" cterm matches "def256" if .Xdefaults set thus) +" -------- +" ! black +" Rxvt.color0 : #000000 +" Rxvt.color8 : #808080 +" ! red +" Rxvt.color1 : #DF0000 +" Rxvt.color9 : #FF0000 +" ! green +" Rxvt.color2 : #87DF00 +" Rxvt.color10 : #AFFF00 +" ! yellow +" Rxvt.color3 : #DFAF00 +" Rxvt.color11 : #FFFF00 +" ! blue +" Rxvt.color4 : #5F87DF +" Rxvt.color12 : #87DFFF +" ! magenta +" Rxvt.color5 : #8700DF +" Rxvt.color13 : #87DFFF +" ! cyan +" Rxvt.color6 : #00DFDF +" Rxvt.color14 : #5F5FDF +" ! white +" Rxvt.color7 : #C0C0C0 +" Rxvt.color15 : #FFFFFF diff --git a/sundry/editor-syntax-etc/vim/colors/def.vim b/sundry/editor-syntax-etc/vim/colors/def.vim new file mode 100644 index 0000000..adc9dd9 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/def.vim @@ -0,0 +1,142 @@ +"%% Vim color file +" Name: def +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14, 2016-07-28, 2022-09-05 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/def.vim> +" <https://sisudoc.org/> +" Note: primarily 16 color cterm improved by tweaking of .Xdefaults +" (with occasional other colors selected from 256 color palate) +" .Xdefaults tweaking to make identical to def (256) provided, +" along with an alternative possibility using colors beyond +" 256 color palate +: hi clear +: if exists("syntax_on") | syntax reset | endif +: let colors_name = "def" +: set t_Co=256 +: set background=dark +" ------- +" terminal def +" ------- +: hi Normal ctermfg=7 ctermbg=236 +: hi Cursor ctermfg=0 ctermbg=166 +: hi lCursor cterm=reverse +: hi CursorLine cterm=bold,underline "ctermul=166 "bg:236,59 +: hi CursorLineNr cterm=bold ctermfg=0 ctermbg=166 +: hi LineNr cterm=bold ctermfg=59 ctermbg=16 +: hi StatusLine cterm=bold,reverse +: hi StatusLineNC cterm=reverse +: hi StatusLineTerm cterm=bold ctermfg=15 ctermbg=2 +: hi StatusLineTermNC ctermfg=15 ctermbg=2 +: hi ColorColumn cterm=none ctermfg=231 ctermbg=236 "bg:233,59,242,67 +" hi ColorColumn cterm=inverse +" hi ColorColumn ctermfg=16 ctermbg=235 +" hi ColorColumn ctermfg=5 ctermbg=90 +: hi Folded cterm=none ctermfg=67 ctermbg=16 "fg:248,59,242,3,2,67 +" hi Folded cterm=none ctermfg=59 ctermbg=16 "fg:248,59,242,3 +: hi FoldColumn ctermfg=4 ctermbg=69 +: hi Search cterm=none ctermfg=0 ctermbg=57 "bg:57,11 +: hi IncSearch cterm=none ctermfg=0 ctermbg=154 +: hi SpecialKey ctermfg=4 +: hi Visual cterm=reverse +: hi VisualNOS cterm=bold,underline +: hi MoreMsg ctermfg=2 +: hi ModeMsg cterm=bold +: hi Question ctermfg=2 +: hi Title cterm=bold ctermfg=3 +: hi NonText cterm=bold ctermfg=4 +: hi Directory ctermfg=4 +: hi WildMenu ctermfg=0 ctermbg=3 +: hi VertSplit cterm=reverse +: hi DiffAdd cterm=none ctermfg=0 ctermbg=2 +: hi DiffChange cterm=none ctermfg=0 ctermbg=7 +: hi DiffDelete cterm=none ctermfg=0 ctermbg=7 +: hi DiffText cterm=none ctermfg=0 ctermbg=6 +: hi String cterm=none ctermfg=3 +: hi Comment cterm=none ctermfg=4 +: hi Constant ctermfg=1 +: hi Special ctermfg=6 "fg:67,140,5 +: hi Identifier cterm=none ctermfg=2 "bg:172,4,2 (default usually bold; choose orange, blue or lime green) +: hi Statement ctermfg=4 +: hi Operator ctermfg=2 +: hi PreProc ctermfg=1 "fg:2,5,140 +: hi Type ctermfg=3 "fg:67,2 +: hi Include ctermfg=1 "fg:124,140,5 +: hi Delimiter cterm=none ctermfg=2 +: hi Ignore cterm=bold ctermfg=7 +: hi Todo ctermfg=0 ctermbg=3 +: hi Underlined cterm=underline "ctermul=166 "fg:4,6 +: hi Define ctermfg=3 +: hi Function ctermfg=6 +: hi Structure ctermfg=2 +: hi MatchParen cterm=bold ctermfg=7 ctermbg=4 +: hi SpellBad cterm=underline ctermfg=5 ctermbg=0 +: hi SpellCap cterm=underline ctermfg=5 ctermbg=0 +: hi SpellLocal cterm=underline ctermfg=5 ctermbg=0 +: hi SpellRare cterm=underline ctermfg=5 ctermbg=0 +: hi TrailingWhitespace ctermbg=1 +: hi ExtraWhitespace ctermbg=1 +: hi WarningMsg ctermfg=1 +: hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +: hi Error cterm=bold ctermfg=7 ctermbg=1 +: if &diff +: highlight! link DiffText MatchParen +: endif +" ------- +" gui def +" ------- +: hi Normal guifg=#D3D3D3 guibg=#000000 +: hi Cursor guifg=#000000 guibg=#CC9966 +: hi lCursor gui=reverse +: hi CursorLine gui=bold +: hi CursorLineNr gui=bold guifg=#000000 guibg=#D75F00 +: hi CursorColumn guibg=#00005F +: hi LineNr gui=bold guifg=#808080 guibg=#000000 +: hi StatusLine gui=bold,reverse +: hi StatusLineNC gui=reverse +: hi Search gui=none guifg=#000000 guibg=#5F00FF +: hi IncSearch gui=none guifg=#000000 guibg=#AFFF00 +: hi SpecialKey guifg=#5971AD +: hi Visual gui=reverse +: hi VisualNOS gui=bold,underline +: hi MoreMsg guifg=#4E9A06 +: hi ModeMsg gui=bold +: hi Question guifg=#4E9A06 +: hi Title gui=bold guifg=#C4A000 +: hi NonText gui=bold guifg=#5971AD +: hi Directory guifg=#5971AD +: hi WildMenu guifg=#000000 guibg=#C4A000 +: hi VertSplit gui=reverse +: hi Folded gui=none guifg=#808080 guibg=#000000 +: hi FoldColumn guifg=#5971AD guibg=#D3D3D3 +: hi DiffAdd gui=none guifg=#000000 guibg=#4E9A06 +: hi DiffChange gui=none guifg=#000000 guibg=#D3D3D3 +: hi DiffDelete gui=none guifg=#000000 guibg=#D3D3D3 +: hi DiffText gui=none guifg=#000000 guibg=#06989A +: hi String gui=none guifg=#C4A000 +: hi Comment gui=none guifg=#5971AD guibg=#000000 +: hi Constant guifg=#CC0000 +: hi Special guifg=#06989A +: hi Identifier guifg=#06989A +: hi Statement guifg=#4E9A06 +: hi Operator guifg=#4E9A06 +: hi PreProc guifg=#CC0000 +: hi Type gui=bold guifg=#C4A000 +: hi Delimiter gui=none guifg=#4E9A06 +: hi Ignore gui=bold guifg=#D3D3D3 +: hi Todo guifg=#000000 guibg=#C4A000 +: hi Underlined gui=underline +: hi Include guifg=#CC0000 +: hi Define guifg=#C4A000 +: hi Function guifg=#06989A +: hi Structure guifg=#4E9A06 +: hi MatchParen gui=bold guifg=#D3D3D3 guibg=#5971AD +: hi ColorColumn guibg=#00005F +: hi SpellBad gui=underline guifg=#75507B guibg=#000000 +: hi SpellCap gui=underline guifg=#75507B guibg=#000000 +: hi SpellLocal gui=underline guifg=#75507B guibg=#000000 +: hi SpellRare gui=underline guifg=#75507B guibg=#000000 +: hi TrailingWhitespace guibg=#080000 +: hi ExtraWhitespace guibg=#CC0000 +: hi WarningMsg guifg=#CC0000 +: hi ErrorMsg gui=bold guifg=#D3D3D3 guibg=#CC0000 +: hi Error gui=bold guifg=#D3D3D3 guibg=#CC0000 diff --git a/sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim b/sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim new file mode 100644 index 0000000..f631f63 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim @@ -0,0 +1,67 @@ +" Vim color file +" Name: frugal-cterm-sisu +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-09 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim> +" <https://sisudoc.org/> +" Note: 8 color cterm, related colorschemes 8 & sparse +:set background=dark +:hi clear +if exists("syntax_on") + syntax reset +endif +:let colors_name = "frugal-cterm-sisu" +" 0 = black, 1 = red, 2 = green, 3 = yellow/orange, 4 = blue, 5 = magenta, 6 = cyan, 7 = white +:hi Normal ctermbg=0 ctermfg=7 +:hi Cursor cterm=reverse +:hi lCursor cterm=reverse +:hi StatusLine cterm=bold,reverse +:hi StatusLineNC cterm=reverse +:hi Search cterm=none ctermbg=2 ctermfg=0 +:hi IncSearch cterm=bold ctermbg=2 ctermfg=7 +:hi SpecialKey ctermfg=4 +:hi Visual cterm=reverse +:hi VisualNOS cterm=bold,underline +:hi MoreMsg ctermfg=2 +:hi ModeMsg cterm=bold +:hi Question ctermfg=2 +:hi Title cterm=bold ctermfg=3 +:hi NonText cterm=bold ctermfg=4 +:hi LineNr cterm=bold ctermbg=0 ctermfg=0* +:hi Directory ctermfg=4 +:hi WildMenu ctermbg=3 ctermfg=0 +:hi VertSplit cterm=reverse +:hi Folded cterm=none ctermbg=0 ctermfg=7 +:hi FoldColumn ctermbg=7 ctermfg=4 +:hi DiffChange cterm=none ctermbg=7 ctermfg=0 +:hi DiffText cterm=none ctermbg=6 ctermfg=0 +:hi DiffAdd cterm=none ctermbg=2 ctermfg=0 +:hi DiffDelete cterm=none ctermbg=7 ctermfg=0 +:hi String cterm=none ctermfg=3 +:hi Comment cterm=none ctermbg=0 ctermfg=7 +:hi Constant ctermfg=1 +:hi Special ctermfg=6 +:hi Identifier ctermfg=6 +:hi Statement ctermfg=6 +:hi Operator ctermfg=1 +:hi PreProc ctermbg=7 ctermfg=1 +:hi Type ctermfg=2 +:hi Delimiter cterm=none ctermfg=1 +:hi Ignore cterm=bold ctermfg=7 +:hi Todo ctermbg=3 ctermfg=0 +:hi Underlined cterm=underline +:hi Include ctermfg=1 +:hi Define ctermfg=3 +:hi Function ctermfg=6 +:hi Structure ctermfg=2 +:hi MatchParen cterm=bold ctermbg=4 ctermfg=7 +:hi CursorLine cterm=bold,underline +:hi CursorColumn cterm=bold +:hi ColorColumn ctermbg=8 +:hi SpellBad cterm=none ctermbg=7 ctermfg=0 +:hi SpellCap cterm=none ctermbg=7 ctermfg=0 +:hi SpellLocal cterm=none ctermbg=7 ctermfg=0 +:hi SpellRare cterm=none ctermbg=7 ctermfg=0 +:hi WarningMsg ctermfg=1 +:hi ErrorMsg cterm=bold ctermbg=1 ctermfg=7 +:hi Error cterm=bold ctermbg=1 ctermfg=7 diff --git a/sundry/editor-syntax-etc/vim/colors/redo.vim b/sundry/editor-syntax-etc/vim/colors/redo.vim new file mode 100644 index 0000000..184961ca --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/redo.vim @@ -0,0 +1,78 @@ +"%% Vim color file +" Name: redo +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14, 2016-07-28, 2022-09-05 +" URL: <> +" Note: this is a redo of def + +: hi clear +: if exists("syntax_on") | syntax reset | endif +: let colors_name = "redo" +: set t_Co=256 +: set background=dark +" ------- +" terminal def +" ------- +: hi Normal ctermfg=7 ctermbg=234 +: hi Cursor ctermfg=0 ctermbg=166 +: hi lCursor cterm=reverse +: hi CursorLine cterm=bold,underline "ctermul=242 "bg:236,59 +: hi CursorLineNr cterm=bold ctermfg=0 ctermbg=166 +: hi LineNr cterm=none ctermfg=248 ctermbg=236 +: hi StatusLine cterm=bold,reverse +: hi StatusLineNC cterm=reverse +: hi StatusLineTerm cterm=bold ctermfg=15 ctermbg=2 +: hi StatusLineTermNC ctermfg=15 ctermbg=2 +: hi ColorColumn ctermfg=231 ctermbg=236 "bg:233,59,236 +" hi ColorColumn cterm=inverse +" hi ColorColumn ctermfg=16 ctermbg=235 +" hi ColorColumn ctermfg=5 ctermbg=90 +: hi Folded cterm=none ctermfg=248 ctermbg=0 "fg:248,59,242,3 +: hi FoldColumn ctermfg=4 ctermbg=69 +: hi Search cterm=none ctermfg=0 ctermbg=57 "bg:57,11 +: hi IncSearch cterm=none ctermfg=0 ctermbg=154 +: hi SpecialKey ctermfg=4 +: hi Visual cterm=reverse +: hi VisualNOS cterm=bold,underline +: hi MoreMsg ctermfg=2 +: hi ModeMsg cterm=bold +: hi Question ctermfg=2 +: hi Title cterm=bold ctermfg=3 +: hi NonText cterm=bold ctermfg=4 +: hi Directory ctermfg=4 +: hi WildMenu ctermfg=0 ctermbg=3 +: hi VertSplit cterm=reverse +: hi DiffAdd cterm=none ctermfg=0 ctermbg=2 +: hi DiffChange cterm=none ctermfg=0 ctermbg=7 +: hi DiffDelete cterm=none ctermfg=0 ctermbg=7 +: hi DiffText cterm=none ctermfg=0 ctermbg=6 +: hi String cterm=none ctermfg=3 +: hi Comment cterm=none ctermfg=244 +: hi Constant ctermfg=124 +: hi Special ctermfg=67 "fg:67,140,5 +: hi Identifier cterm=none ctermfg=172 "bg:172,4,2 (default usually bold; choose orange, blue or lime green) +: hi Statement ctermfg=130 +: hi Operator ctermfg=2 +: hi PreProc ctermfg=196 "fg:2,5,140,1,166,196 +: hi Type ctermfg=67 "fg:67,2 +: hi Include ctermfg=124 "fg:124,140,5 +: hi Delimiter cterm=none ctermfg=2 +: hi Ignore cterm=bold ctermfg=7 +: hi Todo ctermfg=0 ctermbg=3 +: hi Underlined cterm=underline ctermfg=4 "ctermul=6 "fg:4,6 +: hi Define ctermfg=3 +: hi Function ctermfg=6 +: hi Structure ctermfg=2 +: hi MatchParen cterm=bold ctermfg=7 ctermbg=4 +: hi SpellBad cterm=underline ctermfg=5 ctermbg=0 +: hi SpellCap cterm=underline ctermfg=5 ctermbg=0 +: hi SpellLocal cterm=underline ctermfg=5 ctermbg=0 +: hi SpellRare cterm=underline ctermfg=5 ctermbg=0 +: hi TrailingWhitespace ctermbg=1 +: hi ExtraWhitespace ctermbg=1 +: hi WarningMsg ctermfg=1 +: hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +: hi Error cterm=bold ctermfg=7 ctermbg=1 +: if &diff +: highlight! link DiffText MatchParen +: endif diff --git a/sundry/editor-syntax-etc/vim/colors/shift.vim b/sundry/editor-syntax-etc/vim/colors/shift.vim new file mode 100644 index 0000000..2174630 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/shift.vim @@ -0,0 +1,78 @@ +"%% Vim color file +" Name: shift +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-14, 2016-07-28, 2022-09-09 +" URL: <> +" Note: this is a shift in redo which as a redo of def + +: hi clear +: if exists("syntax_on") | syntax reset | endif +: let colors_name = "shift" +: set t_Co=256 +: set background=dark +" ------- +" terminal def +" ------- +: hi Normal ctermfg=7 ctermbg=234 +: hi Cursor ctermfg=0 ctermbg=166 +: hi lCursor cterm=reverse +: hi CursorLine cterm=bold,underline ctermul=166 "bg:236,59 +: hi CursorLineNr cterm=bold ctermfg=0 ctermbg=166 +: hi LineNr cterm=none ctermfg=248 ctermbg=236 +: hi StatusLine cterm=bold,reverse +: hi StatusLineNC cterm=reverse +: hi StatusLineTerm cterm=bold ctermfg=15 ctermbg=2 +: hi StatusLineTermNC ctermfg=15 ctermbg=2 +: hi ColorColumn cterm=none ctermfg=7 ctermbg=236 "bg:233,59 +" hi ColorColumn cterm=inverse +" hi ColorColumn ctermfg=16 ctermbg=235 +" hi ColorColumn ctermfg=5 ctermbg=90 +: hi Folded cterm=none ctermfg=242 ctermbg=16 "fg:248,59,242,3 +: hi FoldColumn ctermfg=4 ctermbg=69 +: hi Search cterm=none ctermfg=0 ctermbg=57 "bg:57,11 +: hi IncSearch cterm=none ctermfg=0 ctermbg=154 +: hi SpecialKey ctermfg=4 +: hi Visual cterm=reverse +: hi VisualNOS cterm=bold,underline +: hi MoreMsg ctermfg=2 +: hi ModeMsg cterm=bold +: hi Question ctermfg=2 +: hi Title cterm=bold ctermfg=3 +: hi NonText cterm=bold ctermfg=4 +: hi Directory ctermfg=4 +: hi WildMenu ctermfg=0 ctermbg=3 +: hi VertSplit cterm=reverse +: hi DiffAdd cterm=none ctermfg=0 ctermbg=2 +: hi DiffChange cterm=none ctermfg=0 ctermbg=7 +: hi DiffDelete cterm=none ctermfg=0 ctermbg=7 +: hi DiffText cterm=none ctermfg=0 ctermbg=6 +: hi String cterm=none ctermfg=3 +: hi Comment cterm=none ctermfg=244 +: hi Constant ctermfg=124 +: hi Special ctermfg=67 "fg:67,140,5 +: hi Identifier cterm=none ctermfg=4 "bg:172,4,2 (default usually bold; choose orange, blue or lime green) +: hi Statement ctermfg=130 +: hi Operator ctermfg=2 +: hi PreProc ctermfg=196 "fg:2,5,140,1,166,196 +: hi Type ctermfg=67 "fg:67,2 +: hi Include ctermfg=124 "fg:124,140,5 +: hi Delimiter cterm=none ctermfg=2 +: hi Ignore cterm=bold ctermfg=7 +: hi Todo ctermfg=0 ctermbg=3 +: hi Underlined cterm=underline ctermfg=6 ctermul=6 "fg:4,6 +: hi Define ctermfg=3 +: hi Function ctermfg=6 +: hi Structure ctermfg=2 +: hi MatchParen cterm=bold ctermfg=7 ctermbg=4 +: hi SpellBad cterm=underline ctermfg=5 ctermbg=0 +: hi SpellCap cterm=underline ctermfg=5 ctermbg=0 +: hi SpellLocal cterm=underline ctermfg=5 ctermbg=0 +: hi SpellRare cterm=underline ctermfg=5 ctermbg=0 +: hi TrailingWhitespace ctermbg=1 +: hi ExtraWhitespace ctermbg=1 +: hi WarningMsg ctermfg=1 +: hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +: hi Error cterm=bold ctermfg=7 ctermbg=1 +: if &diff +: highlight! link DiffText MatchParen +: endif diff --git a/sundry/editor-syntax-etc/vim/colors/slate.vim b/sundry/editor-syntax-etc/vim/colors/slate.vim new file mode 100644 index 0000000..6801e2a --- /dev/null +++ b/sundry/editor-syntax-etc/vim/colors/slate.vim @@ -0,0 +1,82 @@ +"%% SiSU Vim color file +" Name: Slate +" Maintainer: Ralph Amissah <ralph@amissah.com> +" Last Change: 2013-02-09, 2022-09-05 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/colors/slate.vim> +" <https://sisudoc.org/> +" <https://sisudoc.org/> +" Notes: cterm now uses frugal-sisu 8 colors for term +" (for gui originally looked at desert Hans Fugal <hans@fugal.net> +" <http://hans.fugal.net/vim/colors/desert.vim> (April/May 2003)) +: hi clear +: if exists("syntax_on") +: syntax reset +: endif +: let colors_name = "slate" +: set background=dark +" ------- +" 0 = black, 1 = red, 2 = green, 3 = yellow/orange, 4 = blue, 5 = magenta, 6 = cyan, 7 = white +" ------- +: hi Normal ctermbg=0 ctermfg=7 guibg=grey15 guifg=white +: hi Cursor term=reverse cterm=reverse guibg=khaki guifg=slategrey +: hi lCursor term=reverse cterm=reverse +: hi StatusLine term=reverse cterm=bold,reverse gui=none guibg=#c2bfa5 guifg=black +: hi StatusLineNC term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 +: hi Search term=reverse cterm=none ctermbg=2 ctermfg=0 guibg=peru guifg=wheat +: hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7 guibg=black guifg=green +: hi SpecialKey term=bold ctermfg=4 guifg=yellowgreen +: hi Visual term=reverse cterm=reverse gui=none guibg=olivedrab guifg=khaki +: hi VisualNOS term=bold,underline cterm=bold,underline +: hi MoreMsg term=bold ctermfg=2 guifg=SeaGreen +: hi ModeMsg term=bold cterm=bold guifg=goldenrod +: hi Question term=standout ctermfg=2 guifg=springgreen +: hi Title term=bold cterm=bold ctermfg=3 gui=bold guifg=gold +: hi NonText term=bold cterm=bold ctermfg=4 guibg=grey15 guifg=RoyalBlue +: hi LineNr term=underline cterm=bold ctermbg=0 ctermfg=0* guifg=grey50 +: hi Directory term=bold ctermfg=4 +: hi WildMenu term=standout ctermbg=3 ctermfg=0 guibg=darkyellow guifg=black +: hi VertSplit term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40 +: hi Folded term=standout cterm=none ctermbg=0 ctermfg=7 guibg=black guifg=grey40 +: hi FoldColumn term=standout ctermbg=7 ctermfg=4 guibg=black guifg=grey20 +: hi DiffChange cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=white +: hi DiffText cterm=none ctermbg=6 ctermfg=0 guibg=darkcyan guifg=white +: hi DiffAdd cterm=none ctermbg=2 ctermfg=0 guibg=darkgreen guifg=white +: hi DiffDelete cterm=none ctermbg=7 ctermfg=0 guibg=darkgrey guifg=black +: hi String cterm=none ctermfg=3 guifg=SkyBlue +: hi Comment term=bold cterm=none ctermbg=0 ctermfg=7 guifg=grey40 +: hi Constant term=underline ctermfg=1 guifg=#ffa0a0 +: hi Special term=bold ctermfg=6 guifg=darkkhaki +: hi Identifier term=underline ctermfg=6 guifg=salmon +: hi Statement term=bold ctermfg=6 guifg=CornflowerBlue +: hi Operator term=bold ctermfg=1 guifg=red +: hi PreProc term=underline ctermbg=7 ctermfg=1 guibg=white guifg=red +: hi Type term=underline ctermfg=2 guifg=CornflowerBlue +: hi Delimiter term=none cterm=none ctermfg=1 +: hi Ignore cterm=bold ctermfg=7 guifg=grey40 +: hi Todo term=standout ctermbg=3 ctermfg=0 guibg=yellow2 guifg=orangered +: hi Underlined term=underline cterm=underline +: hi Include ctermfg=1 guifg=red +: hi Define ctermfg=3 gui=bold guifg=gold +: hi Function ctermfg=6 guifg=navajowhite +: hi Structure ctermfg=2 guifg=green +: hi MatchParen cterm=bold ctermbg=4 ctermfg=7 +: hi CursorLine cterm=bold,underline guibg=black +: hi CursorColumn cterm=bold guibg=black +: hi SpellBad term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white +: hi SpellCap term=underline,standout cterm=none ctermbg=7 ctermfg=0 +: hi SpellLocal term=underline,standout cterm=none ctermbg=7 ctermfg=0 guibg=darkmagenta guifg=white +: hi SpellRare term=underline,standout cterm=none ctermbg=7 ctermfg=0 +: hi WarningMsg term=standout ctermfg=1 guibg=darkmagenta guifg=salmon +: hi ErrorMsg term=standout cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white +: hi Error term=reverse cterm=bold ctermbg=1 ctermfg=7 guibg=darkmagenta guifg=white +: if &diff +: highlight! link DiffText MatchParen +: endif +: hi Black ctermbg=grey ctermfg=black guibg=grey guifg=black +: hi Red ctermbg=black ctermfg=red guibg=black guifg=red +: hi Magenta ctermbg=black ctermfg=magenta guibg=black guifg=magenta +: hi Blue ctermbg=black ctermfg=blue guibg=black guifg=blue +: hi Cyan ctermbg=black ctermfg=cyan guibg=black guifg=cyan +: hi Green ctermbg=black ctermfg=green guibg=black guifg=green +: hi Yellow ctermbg=black ctermfg=yellow guibg=black guifg=yellow +: hi White ctermbg=black ctermfg=white guibg=black guifg=white diff --git a/sundry/editor-syntax-etc/vim/filetype.vim b/sundry/editor-syntax-etc/vim/filetype.vim new file mode 100644 index 0000000..48f8967 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/filetype.vim @@ -0,0 +1,8 @@ +" SiSU filetype file +if exists("did_load_filetypes") + finish +endif +augroup filetypedetect + au! BufNewFile,BufRead *.sst,*.ssm,*.ssi,*.-sst setf sisu-spine + au! BufNewFile,BufRead *._sst,*.sst.meta,*.-sst.meta,*._sst.meta setf sisu-spine +augroup END diff --git a/sundry/editor-syntax-etc/vim/ftplugin/sisu-spine.vim b/sundry/editor-syntax-etc/vim/ftplugin/sisu-spine.vim new file mode 100644 index 0000000..43c7e53 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/ftplugin/sisu-spine.vim @@ -0,0 +1,224 @@ +"%% SiSU Vim ftplugin +" SiSU Maintainer: Ralph Amissah <ralph@amissah.com> +" SiSU Markup: SiSU (sisu-3.3) 2012-08-18 +" an ftplugin setting defaults for editing sisu markup files +:syntax on +:filetype off +":filetype on +:filetype indent on +:autocmd FileType sisu :set nonumber +:set encoding=utf-8 fileencodings= +:set ff=unix +:set autowrite " Automatically save before commands like :next and :make +:set nocompatible +:set tabstop=2 +:set expandtab +:set shiftwidth=2 +:set autoindent +:set showcmd " Show (partial) command in status line. +:set showmatch " Show matching brackets. +:set ignorecase " Do case insensitive matching +:set smartcase +:set incsearch +:set hlsearch +:set gdefault +:set guioptions=agr " add 'm' for menu +:map <silent> <C-m> :if &guioptions =~# 'm' <Bar> + \set guioptions-=m <Bar> + \set guioptions-=T <Bar> + \else <Bar> + \set guioptions+=m <Bar> + \set guioptions-=T <Bar> + \endif<CR> +:set paste +""% statusline +"set statusline= " +"set fillchars=stl:―,stlnc:—,vert:│,fold:۰,diff:· +"" [ buffer number ] +"set statusline +=%#Normal#[ " +"set statusline +=%#Identifier#%n " buffer number +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ file name (& modified?) ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Statement#%<%F%* " full path +""set statusline +=%#Statement#%<%t " full path +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ column : line number / number of lines in file, percentage of file ] [%v:%l/%L\ %p%%] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Identifier#%v " column & line +"set statusline +=%#Normal#: " +"set statusline +=%#Identifier#%l " column & line +"set statusline +=%#SpecialKey#/%L\ " total lines +"set statusline +=%#Identifier#%p " percentage of file +"set statusline +=%#SpecialKey#%% " +"set statusline +=%#Normal#] " " +"" [ file format : file type ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#SpecialKey#%{&fenc} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%{&ff} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%y " file type +"set statusline +=%#Normal#] " +"" [ character under cursor ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#String#0x%04B " character under cursor +"set statusline +=%#Normal#]\ " +"" [ syntastic ] +"set statusline +=%#warningmsg# +"set statusline +=%{SyntasticStatuslineFlag()}\ " +""set statusline+=%* +"" Status line background +"set statusline +=%#Folded#\ " +"" misc +"set laststatus=2 " status line always on +"% textwrap +:set whichwrap=<,>,h,l,[,] +:set nolinebreak " only affects display not buffer +:set wrap +:set wrapmargin=0 +"% map +":let mapleader = "," " consider +:map <leader>paste :set invpaste<cr> +"% wrap/formatting paragraph according to the current 'textwidth' with ^\ (control-\): +:imap <C-\> <C-O>gqap +:nmap <C-\> gqap +:vmap <C-\> gq +"% save file, go to next file in buffer +:map <leader>nf :w <enter> :n <enter> +"% vimdiff q exits +:if &diff +: cmap q qa +:endif +"% directory files, placed in vertical split window +:map <leader>ls :vs<cr> :Explore<cr> +:map <leader>dir :vs<cr> :Explore<cr> +"% remapping lines make cursor jump a line at a time within wrapped text +:nnoremap j gj +:nnoremap k gk +:vnoremap j gj +:vnoremap k gk +:nnoremap <Down> gj +:nnoremap <Up> gk +:vnoremap <Down> gj +:vnoremap <Up> gk +:inoremap <Down> <C-o>gj +:inoremap <Up> <C-o>gk +"% search and replace +:map <leader>rd :.,$s///c "search and replace down +:map <leader>rg :%s///c "search and replace whole file +:map <leader>rr :rubyd gsub!(//,"") +"% pwd t64 working directory set to that of the file you're editing +"changes pwd to directory of file in current buffer +:function! CHANGE_CURR_DIR() +: let _dir = expand("%:p:h") +: exec "cd " . _dir +: unlet _dir +:endfunction +"% Change to the directory the file in your current buffer is in +:if has("autocmd") + autocmd BufEnter * :lcd %:p:h +:endif +"% autocompletefilenames To search for files in the current directory +:set path=,, +"auto-completion for file to edit in current dir, used in normal mode +:map <leader>e :e <c-r>=expand("%:p:h") . "/" <cr> +:map <leader>pwd :exe 'cd ' . expand ("%:p:h")<cr> +"% searchhighlight t93: Toggle search highlight <C-n> +:function! ToggleHLSearched() +: if &hls +: set nohls +: else +: set hls +: endif +:endfun +:nmap <silent> <C-n> :silent call ToggleHLSearched()<cr> +"%% SiSU vim folds +"% foldsearchx FoldSearch (opens result of search all else closed) t77 +:map <leader>fs :set foldmethod=expr foldcolumn=2 foldlevel=0 <cr> +:map <leader>ff :F<cr> +:map <leader>fe :F<cr> zE +"% foldtoggle Fold Toggle mapped to <space> +:fun! ToggleFold() +: if foldlevel('.') == 0 +: normal! l +: else +: if foldclosed('.') < 0 +: foldclose +: else +: foldopen +: endif +: endif +" Clear status line +: echo +:endfun +" Map this function to Space key. +:noremap <space> :call ToggleFold()<cr> +"% foldtype Fold? set foldtext +:set foldtext=v:folddashes.substitute(getline(v:foldstart),'\\=','','g',) +:set foldexpr=getline(v:lnum-1)!~@/&&getline(v:lnum)!~@/&&getline(v:lnum+1)!~@/ +"% foldsearch t77: Fold on search result +:function! FoldMake(search) +: set fdm=manual +: normal zE +: normal G$ +: let folded = 0 "flag to set when a fold is found +: let flags = "w" "allow wrapping in the search +: let line1 = 0 "set marker for beginning of fold +: while search(a:search, flags) > 0 +: let line2 = line(".") +: if (line2 -1 > line1) +: "echo line1 . ":" . (line2-1) +: "echo "a fold goes here." +: execute ":" . line1 . "," . (line2-1) . "fold" +: let folded = 1 "at least one fold has been found +: endif +: let line1 = line2 "update marker +: let flags = "W" "turn off wrapping +: endwhile +" create the last fold which goes to the end of the file. +: normal $G +: let line2 = line(".") +: if (line2 > line1 && folded == 1) +: execute ":". line1 . "," . line2 . "fold" +: endif +: normal 1G +:endfunction +"% folds Fold Patterns +:command! -nargs=+ -complete=command FMake call FoldMake(<q-args>) +: if ( &filetype == "ruby" ) +: command! F FMake ^# ==\?\|^\s*\(\(def\|class\|module\)\s\|\(public\|protected\|private\|__END__\)\s*$\)\|\(^\s*\|\s\+\)#%\s +: command! Fa FMake \(^# ==\?\|^\s*\(\(\(def\|class\|module\)\s\)\|\(\(public\|protected\|private\|__END__\)\(\s*$\)\)\)\)\|^[0-9]\~\|\([#%]\|^["]\)\{1,4\}\s*%\|{\({\|!!\) +: command! FD FMake \(^# ==\?\|^\s*\(\(def\|class\|module\)\s\)\)\|^\s*\([#%"0-9]\{0,4\}\~\(%\+\s\|!!\)\|#\s\+=\+\s\+\) +: else +"% folds :F Fold Patterns SiSU Markup :F +: command! F FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*| +: command! Fa FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*|\|^\(Book\|Part\|Chapter\|Section\|Article\|BOOK\|PART\|CHAPTER\|SECTION\|ARTICLE\)\s +: command! F0 FMake ^\(\s*0\~\|@\S\+:[+-]\?\s\+\) +: command! FA FMake ^:\?A\~ +: command! FB FMake ^:\?[AB]\~ +: command! FC FMake ^:\?[A-C]\~ +: command! F1 FMake ^\(:\?[A-C]\|1\)\~ +: command! F2 FMake ^\(:\?[A-C]\|[12]\)\~ +: command! F3 FMake ^\(:\?[A-C]\|[1-3]\)\~ +: command! F4 FMake ^[1-4]\~ +: command! F5 FMake ^[4-5]\~ +: command! F6 FMake ^[4-6]\~ +: command! Fc FMake ^[%]\+\s\+ +: endif +"% folds Fold Patterns misc +":command! Fp FMake ^\s*[A-Za-z0-9#] +:command! Fp FMake ^\s*\S +:command! Fo FMake ^[%\"]\s*[{>] +"% linenumbering, on, relative, off +:map <Leader>nn :set <c-r>={'00':'','01':'r','10':'nor'}[&rnu.&nu]<CR>nu<CR> +"% cursorline +:map <leader>cu :if &cursorcolumn <Bar> + \set nocursorline nocursorcolumn <Bar> + \else <Bar> + \set cursorline cursorcolumn <Bar> + \endif<cr> +:map <leader>cu- :set nocursorline nocursorcolumn<cr> +:map <leader>cu+ :set cursorline cursorcolumn<cr> diff --git a/sundry/editor-syntax-etc/vim/ftplugin/sisu.vim b/sundry/editor-syntax-etc/vim/ftplugin/sisu.vim new file mode 100644 index 0000000..43c7e53 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/ftplugin/sisu.vim @@ -0,0 +1,224 @@ +"%% SiSU Vim ftplugin +" SiSU Maintainer: Ralph Amissah <ralph@amissah.com> +" SiSU Markup: SiSU (sisu-3.3) 2012-08-18 +" an ftplugin setting defaults for editing sisu markup files +:syntax on +:filetype off +":filetype on +:filetype indent on +:autocmd FileType sisu :set nonumber +:set encoding=utf-8 fileencodings= +:set ff=unix +:set autowrite " Automatically save before commands like :next and :make +:set nocompatible +:set tabstop=2 +:set expandtab +:set shiftwidth=2 +:set autoindent +:set showcmd " Show (partial) command in status line. +:set showmatch " Show matching brackets. +:set ignorecase " Do case insensitive matching +:set smartcase +:set incsearch +:set hlsearch +:set gdefault +:set guioptions=agr " add 'm' for menu +:map <silent> <C-m> :if &guioptions =~# 'm' <Bar> + \set guioptions-=m <Bar> + \set guioptions-=T <Bar> + \else <Bar> + \set guioptions+=m <Bar> + \set guioptions-=T <Bar> + \endif<CR> +:set paste +""% statusline +"set statusline= " +"set fillchars=stl:―,stlnc:—,vert:│,fold:۰,diff:· +"" [ buffer number ] +"set statusline +=%#Normal#[ " +"set statusline +=%#Identifier#%n " buffer number +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ file name (& modified?) ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Statement#%<%F%* " full path +""set statusline +=%#Statement#%<%t " full path +"set statusline +=%#PreProc#%M " modified flag +"set statusline +=%#Normal#] " +"" [ column : line number / number of lines in file, percentage of file ] [%v:%l/%L\ %p%%] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#Identifier#%v " column & line +"set statusline +=%#Normal#: " +"set statusline +=%#Identifier#%l " column & line +"set statusline +=%#SpecialKey#/%L\ " total lines +"set statusline +=%#Identifier#%p " percentage of file +"set statusline +=%#SpecialKey#%% " +"set statusline +=%#Normal#] " " +"" [ file format : file type ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#SpecialKey#%{&fenc} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%{&ff} " file format +"set statusline +=%#Normal#: " +"set statusline +=%#SpecialKey#%y " file type +"set statusline +=%#Normal#] " +"" [ character under cursor ] +"set statusline +=%#Normal#\ [ " +"set statusline +=%#String#0x%04B " character under cursor +"set statusline +=%#Normal#]\ " +"" [ syntastic ] +"set statusline +=%#warningmsg# +"set statusline +=%{SyntasticStatuslineFlag()}\ " +""set statusline+=%* +"" Status line background +"set statusline +=%#Folded#\ " +"" misc +"set laststatus=2 " status line always on +"% textwrap +:set whichwrap=<,>,h,l,[,] +:set nolinebreak " only affects display not buffer +:set wrap +:set wrapmargin=0 +"% map +":let mapleader = "," " consider +:map <leader>paste :set invpaste<cr> +"% wrap/formatting paragraph according to the current 'textwidth' with ^\ (control-\): +:imap <C-\> <C-O>gqap +:nmap <C-\> gqap +:vmap <C-\> gq +"% save file, go to next file in buffer +:map <leader>nf :w <enter> :n <enter> +"% vimdiff q exits +:if &diff +: cmap q qa +:endif +"% directory files, placed in vertical split window +:map <leader>ls :vs<cr> :Explore<cr> +:map <leader>dir :vs<cr> :Explore<cr> +"% remapping lines make cursor jump a line at a time within wrapped text +:nnoremap j gj +:nnoremap k gk +:vnoremap j gj +:vnoremap k gk +:nnoremap <Down> gj +:nnoremap <Up> gk +:vnoremap <Down> gj +:vnoremap <Up> gk +:inoremap <Down> <C-o>gj +:inoremap <Up> <C-o>gk +"% search and replace +:map <leader>rd :.,$s///c "search and replace down +:map <leader>rg :%s///c "search and replace whole file +:map <leader>rr :rubyd gsub!(//,"") +"% pwd t64 working directory set to that of the file you're editing +"changes pwd to directory of file in current buffer +:function! CHANGE_CURR_DIR() +: let _dir = expand("%:p:h") +: exec "cd " . _dir +: unlet _dir +:endfunction +"% Change to the directory the file in your current buffer is in +:if has("autocmd") + autocmd BufEnter * :lcd %:p:h +:endif +"% autocompletefilenames To search for files in the current directory +:set path=,, +"auto-completion for file to edit in current dir, used in normal mode +:map <leader>e :e <c-r>=expand("%:p:h") . "/" <cr> +:map <leader>pwd :exe 'cd ' . expand ("%:p:h")<cr> +"% searchhighlight t93: Toggle search highlight <C-n> +:function! ToggleHLSearched() +: if &hls +: set nohls +: else +: set hls +: endif +:endfun +:nmap <silent> <C-n> :silent call ToggleHLSearched()<cr> +"%% SiSU vim folds +"% foldsearchx FoldSearch (opens result of search all else closed) t77 +:map <leader>fs :set foldmethod=expr foldcolumn=2 foldlevel=0 <cr> +:map <leader>ff :F<cr> +:map <leader>fe :F<cr> zE +"% foldtoggle Fold Toggle mapped to <space> +:fun! ToggleFold() +: if foldlevel('.') == 0 +: normal! l +: else +: if foldclosed('.') < 0 +: foldclose +: else +: foldopen +: endif +: endif +" Clear status line +: echo +:endfun +" Map this function to Space key. +:noremap <space> :call ToggleFold()<cr> +"% foldtype Fold? set foldtext +:set foldtext=v:folddashes.substitute(getline(v:foldstart),'\\=','','g',) +:set foldexpr=getline(v:lnum-1)!~@/&&getline(v:lnum)!~@/&&getline(v:lnum+1)!~@/ +"% foldsearch t77: Fold on search result +:function! FoldMake(search) +: set fdm=manual +: normal zE +: normal G$ +: let folded = 0 "flag to set when a fold is found +: let flags = "w" "allow wrapping in the search +: let line1 = 0 "set marker for beginning of fold +: while search(a:search, flags) > 0 +: let line2 = line(".") +: if (line2 -1 > line1) +: "echo line1 . ":" . (line2-1) +: "echo "a fold goes here." +: execute ":" . line1 . "," . (line2-1) . "fold" +: let folded = 1 "at least one fold has been found +: endif +: let line1 = line2 "update marker +: let flags = "W" "turn off wrapping +: endwhile +" create the last fold which goes to the end of the file. +: normal $G +: let line2 = line(".") +: if (line2 > line1 && folded == 1) +: execute ":". line1 . "," . line2 . "fold" +: endif +: normal 1G +:endfunction +"% folds Fold Patterns +:command! -nargs=+ -complete=command FMake call FoldMake(<q-args>) +: if ( &filetype == "ruby" ) +: command! F FMake ^# ==\?\|^\s*\(\(def\|class\|module\)\s\|\(public\|protected\|private\|__END__\)\s*$\)\|\(^\s*\|\s\+\)#%\s +: command! Fa FMake \(^# ==\?\|^\s*\(\(\(def\|class\|module\)\s\)\|\(\(public\|protected\|private\|__END__\)\(\s*$\)\)\)\)\|^[0-9]\~\|\([#%]\|^["]\)\{1,4\}\s*%\|{\({\|!!\) +: command! FD FMake \(^# ==\?\|^\s*\(\(def\|class\|module\)\s\)\)\|^\s*\([#%"0-9]\{0,4\}\~\(%\+\s\|!!\)\|#\s\+=\+\s\+\) +: else +"% folds :F Fold Patterns SiSU Markup :F +: command! F FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*| +: command! Fa FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*|\|^\(Book\|Part\|Chapter\|Section\|Article\|BOOK\|PART\|CHAPTER\|SECTION\|ARTICLE\)\s +: command! F0 FMake ^\(\s*0\~\|@\S\+:[+-]\?\s\+\) +: command! FA FMake ^:\?A\~ +: command! FB FMake ^:\?[AB]\~ +: command! FC FMake ^:\?[A-C]\~ +: command! F1 FMake ^\(:\?[A-C]\|1\)\~ +: command! F2 FMake ^\(:\?[A-C]\|[12]\)\~ +: command! F3 FMake ^\(:\?[A-C]\|[1-3]\)\~ +: command! F4 FMake ^[1-4]\~ +: command! F5 FMake ^[4-5]\~ +: command! F6 FMake ^[4-6]\~ +: command! Fc FMake ^[%]\+\s\+ +: endif +"% folds Fold Patterns misc +":command! Fp FMake ^\s*[A-Za-z0-9#] +:command! Fp FMake ^\s*\S +:command! Fo FMake ^[%\"]\s*[{>] +"% linenumbering, on, relative, off +:map <Leader>nn :set <c-r>={'00':'','01':'r','10':'nor'}[&rnu.&nu]<CR>nu<CR> +"% cursorline +:map <leader>cu :if &cursorcolumn <Bar> + \set nocursorline nocursorcolumn <Bar> + \else <Bar> + \set cursorline cursorcolumn <Bar> + \endif<cr> +:map <leader>cu- :set nocursorline nocursorcolumn<cr> +:map <leader>cu+ :set cursorline cursorcolumn<cr> diff --git a/sundry/editor-syntax-etc/vim/syntax/sisu-spine.vim b/sundry/editor-syntax-etc/vim/syntax/sisu-spine.vim new file mode 100644 index 0000000..2de0095 --- /dev/null +++ b/sundry/editor-syntax-etc/vim/syntax/sisu-spine.vim @@ -0,0 +1,284 @@ +" SiSU Vim syntax file (sisu-spine) +" SiSU Maintainer: Ralph Amissah <ralph.amissah@gmail.com> +" SiSU Markup: SiSU (sisu-5.6.7) +" sisu-spine Markup: sisu-spine +" Last Change: 2017-06-22, 2025-02-21 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/syntax/sisu-spine.vim> +" <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/syntax/sisu.vim> +" <https://sisudoc.org/> +"(originally looked at Ruby Vim by Mirko Nasato) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +else +endif +let s:cpo_save = &cpo +set cpo&vim + +"% "Errors: +syn match sisu_error contains=sisu_link,sisu_error_wspace "<![^ei]\S\+!>" + +"% "Markers Identifiers: +if !exists("sisu_no_identifiers") + syn match sisu_mark_endnote "\~^" + syn match sisu_break contains=@NoSpell " \\\\\( \|$\)\|<br>\|<br />" + syn match sisu_control contains=@NoSpell "^\(-\\\\-\|=\\\\=\|-\.\.-\|<:p[bn]>\)\s*$" + syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" + syn match sisu_marktail contains=@NoSpell "^--[+~-]#\s*$" + syn match sisu_marktail "[~-]#" + syn match sisu_control "\"" + syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" + syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" + syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+" + syn match sisu_link " \*\~\S\+" + syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^./_-]\+\.ss[it]$" + syn match sisu_structure "^:A\~$" + +"% "Document Sub Headers: + syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content + syn match sisu_sub_header_creator "^\s\+:\(author\|editor\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution + syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license + syn match sisu_sub_header_classify "^\s\+:\(topic_register\|keywords\|subject\|dewey\|loc\):\s" + syn match sisu_sub_header_identifier "^\s\+:\(oclc\|isbn\):\s" + syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" + syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|substitute\|omit\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|stamp\|promo\|ad\|manpage\|home_button_text\|home_button_image\|cover_image\|footer\):\s" + syn match sisu_sub_header_notes "^\s\+:\(description\|abstract\|comment\|coverage\|relation\|source\|history\|type\|format\|prefix\|prefix_[ab]\|suffix\):\s" + syn match sisu_within_index_ignore "\S\+[:;]\(\s\+\|$\)" + syn match sisu_within_index "[:|;]\|+\d\+" + +"% "semantic markers: (ignore) + syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" + syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" + syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" + syn match sisu_sem_ex_marker_block "\([a-z][a-z._]*\|\):\[\|\]:[a-z._]*[a-z]" + syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):{[^}].\{-}}:\1" + syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";{[^}].\{-}};[a-z]\+" + syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):\[[^}].\{-}\]:\1" + syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+" +endif + +"% "URLs Numbers And ASCII Codes: +syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" +syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" + +"% "Tuned Error: (is error if not already matched) +syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" +syn match sisu_error contains=sisu_error "<a href\|</a>]" + +"% "Simple Paired Enclosed Markup: +"url/link +syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" + +"% "Document Header: +" title +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" creator +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" dates +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" publisher +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" rights +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" classify document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" identifier document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_identifier matchgroup=sisu_header start="^[@]identifier:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" original language (depreciated) +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" notes +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" links of interest +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" make, processing instructions +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" + +"% "Headings: +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-4]\|:\?[A-D]\)\~\(\S\+\|[^-]\)" end="$" + +"% "Block Group Text: +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+table" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^'''\s\+table" end="^'''\(\s\|$\)" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" +" block, group, poem, alt +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\z(block\|group\|poem\|alt\){" end="^}\z1" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\(block\|group\|poem\|alt\)" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^'''\s\+\(block\|group\|poem\|alt\)" end="^'''\(\s\|$\)" +" box +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^box\(\.[a-z]\+\)\?{" end="^}box" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\box\(\.[a-z]\+\)\?" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^'''\s\+\box\(\.[a-z]\+\)\?" end="^'''\(\s\|$\)" +" code +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^code\(\.[a-z][0-9a-z_]\+\)\?{" end="^}code" +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^```\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^'''\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^'''\(\s\|$\)" +" quote +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^```\s\+quote" end="^```\(\s\|$\)" +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^'''\s\+quote" end="^'''\(\s\|$\)" + +"% "Endnotes: +" regular endnote or asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" +" numbered asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" +" endnote content marker (for binary content marking) +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" + +"% "Links And Images: +" image with url link (and possibly footnote of url) +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|:\|\.\.\/\|#\)\S\+" oneline +" sisu outputs, short notation +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline +" image +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline + +"% "Some Line Operations: +" bold line +syn region sisu_bold contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^!_ " end=" \\\\\|$" +" indent and bullet paragraph +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" +" indent and bullet (bold start) paragraph +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\)!_\? " end=" \\\\\|$" +" hanging indent paragraph [proposed] +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9] " end="$" +" hanging indent (bold start/ definition) paragraph [proposed] +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9]!_\? " end=" \\\\\|$" +" list numbering +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" + +"% "Font Face Curly Brackets: +"syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline +" book index: +syn region sisu_index contains=sisu_within_index_ignore,sisu_within_index matchgroup=sisu_index_block start="^={" end="}" +" emphasis: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +" bold: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +" underscore: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +" italics: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +" added: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +" superscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +" subscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +" monospace: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" +" strikethrough: +syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" + +"% "Single Words Bold Italicise Etc: (depreciated) +syn region sisu_bold contains=sisu_error matchgroup=sisu_bold start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline +syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline +"misc +syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline + +"% "Expensive Mode: +if !exists("sisu_no_expensive") +else " not Expensive + syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline +endif " Expensive? + +"% "Headers And Headings: (Document Instructions) +syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" +syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" + +"% "Errors: +syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+[^:]" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\+$" +syn match sisu_error contains=sisu_error_wspace "\t\+" +syn match sisu_error contains=sisu_error,sisu_error_wspace "\([^ (][_\\]\||[^ (}]\)https\?:\S\+" +syn match sisu_error contains=sisu_error "_\?https\?:\S\+[}><]" +syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n$" +syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n$" +syn match sisu_error contains=sisu_error "\s\+.{{" +syn match sisu_error contains=sisu_error "^\~\s*$" +syn match sisu_error contains=sisu_error "^0\~.*" +syn match sisu_error contains=sisu_error "^[1-9]\~\s*$" +syn match sisu_error contains=sisu_error "^[1-9]\~\S\+\s*$" +syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]" +syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*" +syn match sisu_error contains=sisu_error "{\~^\S\+" +syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]" +syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']" +syn match sisu_error contains=sisu_error "<dir>" +"errors for filetype sisu, though not error in 'metaverse': +syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" +syn match sisu_error "/\?<\([biu]\)>[^(</\1>)]\{-}\n$" + +"% "Error Exceptions: +syn match sisu_control "\n$" "contains=ALL +"syn match sisu_control " //" +syn match sisu_error "%{" +syn match sisu_error "<br>_\?https\?:\S\+\|_\?https\?:\S\+<br>" +syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]" +syn match sisu_comment "^%\{1,2\}.\+" + +"% "Definitions Default Highlighting: +hi def link sisu_normal Normal +hi def link sisu_bold Statement +hi def link sisu_header PreProc +hi def link sisu_header_content Normal +hi def link sisu_sub_header_title Statement +hi def link sisu_sub_header_creator Statement +hi def link sisu_sub_header_date Statement +hi def link sisu_sub_header_publisher Statement +hi def link sisu_sub_header_rights Statement +hi def link sisu_sub_header_classify Statement +hi def link sisu_sub_header_identifier Statement +hi def link sisu_sub_header_original Statement +hi def link sisu_sub_header_links Statement +hi def link sisu_sub_header_notes Statement +hi def link sisu_sub_header_make Statement +hi def link sisu_heading Title +hi def link sisu_structure Operator +hi def link sisu_contain Include +hi def link sisu_mark_endnote Delimiter +hi def link sisu_require NonText +hi def link sisu_link NonText +hi def link sisu_linked String +hi def link sisu_fontface Delimiter +hi def link sisu_strikeout DiffDelete +hi def link sisu_content_alt Special +hi def link sisu_sem_content SpecialKey +hi def link sisu_sem_block Special +hi def link sisu_sem_marker Visual +"hi def link sisu_sem_marker Structure +hi def link sisu_sem_marker_block MatchParen +hi def link sisu_sem_ex_marker FoldColumn +hi def link sisu_sem_ex_marker_block Folded +hi def link sisu_sem_ex_content Comment +"hi def link sisu_sem_ex_content SpecialKey +hi def link sisu_sem_ex_block Comment +hi def link sisu_index SpecialKey +hi def link sisu_index_block Visual +hi def link sisu_content_endnote Special +hi def link sisu_control Delimiter +hi def link sisu_within_index Delimiter +hi def link sisu_within_index_ignore SpecialKey +hi def link sisu_ocn Include +hi def link sisu_number Number +hi def link sisu_identifier Function +hi def link sisu_underline Underlined +hi def link sisu_markpara Include +hi def link sisu_marktail Include +hi def link sisu_mark Identifier +hi def link sisu_break Structure +hi def link sisu_html Type +hi def link sisu_action Identifier +hi def link sisu_comment Comment +hi def link sisu_error_sem_marker Error +hi def link sisu_error_wspace Error +hi def link sisu_error Error +let b:current_syntax = "sisu" +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/sundry/editor-syntax-etc/vim/syntax/sisu.vim b/sundry/editor-syntax-etc/vim/syntax/sisu.vim new file mode 100644 index 0000000..21fd3bc --- /dev/null +++ b/sundry/editor-syntax-etc/vim/syntax/sisu.vim @@ -0,0 +1,277 @@ +" SiSU Vim syntax file +" SiSU Maintainer: Ralph Amissah <ralph.amissah@gmail.com> +" SiSU Markup: SiSU (sisu-5.6.7) +" Last Change: 2017-06-22 +" URL: <https://git.sisudoc.org/projects/sisudoc-spine/tree/sundry/editor-syntax-etc/vim/syntax/sisu.vim> +" <https://sisudoc.org/> +"(originally looked at Ruby Vim by Mirko Nasato) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +else +endif +let s:cpo_save = &cpo +set cpo&vim + +"% "Errors: +syn match sisu_error contains=sisu_link,sisu_error_wspace "<![^ei]\S\+!>" + +"% "Markers Identifiers: +if !exists("sisu_no_identifiers") + syn match sisu_mark_endnote "\~^" + syn match sisu_break contains=@NoSpell " \\\\\( \|$\)\|<br>\|<br />" + syn match sisu_control contains=@NoSpell "^\(-\\\\-\|=\\\\=\|-\.\.-\|<:p[bn]>\)\s*$" + syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" + syn match sisu_marktail contains=@NoSpell "^--[+~-]#\s*$" + syn match sisu_marktail "[~-]#" + syn match sisu_control "\"" + syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" + syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" + syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+" + syn match sisu_link " \*\~\S\+" + syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^./_-]\+\.ss[it]$" + syn match sisu_structure "^:A\~$" + +"% "Document Sub Headers: + syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content + syn match sisu_sub_header_creator "^\s\+:\(author\|editor\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution + syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license + syn match sisu_sub_header_classify "^\s\+:\(topic_register\|keywords\|subject\|dewey\|loc\):\s" + syn match sisu_sub_header_identifier "^\s\+:\(oclc\|isbn\):\s" + syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" + syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|substitute\|omit\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|stamp\|promo\|ad\|manpage\|home_button_text\|home_button_image\|cover_image\|footer\):\s" + syn match sisu_sub_header_notes "^\s\+:\(description\|abstract\|comment\|coverage\|relation\|source\|history\|type\|format\|prefix\|prefix_[ab]\|suffix\):\s" + syn match sisu_within_index_ignore "\S\+[:;]\(\s\+\|$\)" + syn match sisu_within_index "[:|;]\|+\d\+" + +"% "semantic markers: (ignore) + syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" + syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" + syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" + syn match sisu_sem_ex_marker_block "\([a-z][a-z._]*\|\):\[\|\]:[a-z._]*[a-z]" + syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):{[^}].\{-}}:\1" + syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";{[^}].\{-}};[a-z]\+" + syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):\[[^}].\{-}\]:\1" + syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+" +endif + +"% "URLs Numbers And ASCII Codes: +syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" +syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" + +"% "Tuned Error: (is error if not already matched) +syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" +syn match sisu_error contains=sisu_error "<a href\|</a>]" + +"% "Simple Paired Enclosed Markup: +"url/link +syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" + +"% "Document Header: +" title +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" creator +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" dates +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" publisher +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" rights +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" classify document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" identifier document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_identifier matchgroup=sisu_header start="^[@]identifier:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" original language (depreciated) +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" notes +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" links of interest +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" make, processing instructions +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" + +"% "Headings: +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-4]\|:\?[A-D]\)\~\(\S\+\|[^-]\)" end="$" + +"% "Block Group Text: +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+table" end="^```\(\s\|$\)" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" +" block, group, poem, alt +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\z(block\|group\|poem\|alt\){" end="^}\z1" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\(block\|group\|poem\|alt\)" end="^```\(\s\|$\)" +" box +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^box\(\.[a-z]\+\)\?{" end="^}box" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\box\(\.[a-z]\+\)\?" end="^```\(\s\|$\)" +" code +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^code\(\.[a-z][0-9a-z_]\+\)\?{" end="^}code" +syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^```\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^```\(\s\|$\)" +" quote +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^```\s\+quote" end="^```\(\s\|$\)" + +"% "Endnotes: +" regular endnote or asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" +" numbered asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" +" endnote content marker (for binary content marking) +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" + +"% "Links And Images: +" image with url link (and possibly footnote of url) +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|:\|\.\.\/\|#\)\S\+" oneline +" sisu outputs, short notation +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline +" image +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline + +"% "Some Line Operations: +" bold line +syn region sisu_bold contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^!_ " end=" \\\\\|$" +" indent and bullet paragraph +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" +" indent and bullet (bold start) paragraph +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\)!_\? " end=" \\\\\|$" +" hanging indent paragraph [proposed] +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9] " end="$" +" hanging indent (bold start/ definition) paragraph [proposed] +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9]!_\? " end=" \\\\\|$" +" list numbering +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" + +"% "Font Face Curly Brackets: +"syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline +" book index: +syn region sisu_index contains=sisu_within_index_ignore,sisu_within_index matchgroup=sisu_index_block start="^={" end="}" +" emphasis: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +" bold: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +" underscore: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +" italics: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +" added: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +" superscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +" subscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +" monospace: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" +" strikethrough: +syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" + +"% "Single Words Bold Italicise Etc: (depreciated) +syn region sisu_bold contains=sisu_error matchgroup=sisu_bold start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline +syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline +"misc +syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline + +"% "Expensive Mode: +if !exists("sisu_no_expensive") +else " not Expensive + syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline +endif " Expensive? + +"% "Headers And Headings: (Document Instructions) +syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" +syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" + +"% "Errors: +syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+[^:]" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\+$" +syn match sisu_error contains=sisu_error_wspace "\t\+" +syn match sisu_error contains=sisu_error,sisu_error_wspace "\([^ (][_\\]\||[^ (}]\)https\?:\S\+" +syn match sisu_error contains=sisu_error "_\?https\?:\S\+[}><]" +syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n$" +syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n$" +syn match sisu_error contains=sisu_error "\s\+.{{" +syn match sisu_error contains=sisu_error "^\~\s*$" +syn match sisu_error contains=sisu_error "^0\~.*" +syn match sisu_error contains=sisu_error "^[1-9]\~\s*$" +syn match sisu_error contains=sisu_error "^[1-9]\~\S\+\s*$" +syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]" +syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*" +syn match sisu_error contains=sisu_error "{\~^\S\+" +syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]" +syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']" +syn match sisu_error contains=sisu_error "<dir>" +"errors for filetype sisu, though not error in 'metaverse': +syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" +syn match sisu_error "/\?<\([biu]\)>[^(</\1>)]\{-}\n$" + +"% "Error Exceptions: +syn match sisu_control "\n$" "contains=ALL +"syn match sisu_control " //" +syn match sisu_error "%{" +syn match sisu_error "<br>_\?https\?:\S\+\|_\?https\?:\S\+<br>" +syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]" +syn match sisu_comment "^%\{1,2\}.\+" + +"% "Definitions Default Highlighting: +hi def link sisu_normal Normal +hi def link sisu_bold Statement +hi def link sisu_header PreProc +hi def link sisu_header_content Normal +hi def link sisu_sub_header_title Statement +hi def link sisu_sub_header_creator Statement +hi def link sisu_sub_header_date Statement +hi def link sisu_sub_header_publisher Statement +hi def link sisu_sub_header_rights Statement +hi def link sisu_sub_header_classify Statement +hi def link sisu_sub_header_identifier Statement +hi def link sisu_sub_header_original Statement +hi def link sisu_sub_header_links Statement +hi def link sisu_sub_header_notes Statement +hi def link sisu_sub_header_make Statement +hi def link sisu_heading Title +hi def link sisu_structure Operator +hi def link sisu_contain Include +hi def link sisu_mark_endnote Delimiter +hi def link sisu_require NonText +hi def link sisu_link NonText +hi def link sisu_linked String +hi def link sisu_fontface Delimiter +hi def link sisu_strikeout DiffDelete +hi def link sisu_content_alt Special +hi def link sisu_sem_content SpecialKey +hi def link sisu_sem_block Special +hi def link sisu_sem_marker Visual +"hi def link sisu_sem_marker Structure +hi def link sisu_sem_marker_block MatchParen +hi def link sisu_sem_ex_marker FoldColumn +hi def link sisu_sem_ex_marker_block Folded +hi def link sisu_sem_ex_content Comment +"hi def link sisu_sem_ex_content SpecialKey +hi def link sisu_sem_ex_block Comment +hi def link sisu_index SpecialKey +hi def link sisu_index_block Visual +hi def link sisu_content_endnote Special +hi def link sisu_control Delimiter +hi def link sisu_within_index Delimiter +hi def link sisu_within_index_ignore SpecialKey +hi def link sisu_ocn Include +hi def link sisu_number Number +hi def link sisu_identifier Function +hi def link sisu_underline Underlined +hi def link sisu_markpara Include +hi def link sisu_marktail Include +hi def link sisu_mark Identifier +hi def link sisu_break Structure +hi def link sisu_html Type +hi def link sisu_action Identifier +hi def link sisu_comment Comment +hi def link sisu_error_sem_marker Error +hi def link sisu_error_wspace Error +hi def link sisu_error Error +let b:current_syntax = "sisu" +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/sundry/editor-syntax-etc/vim/vim-sisu.yaml b/sundry/editor-syntax-etc/vim/vim-sisu.yaml new file mode 100644 index 0000000..ca665bc --- /dev/null +++ b/sundry/editor-syntax-etc/vim/vim-sisu.yaml @@ -0,0 +1,7 @@ +#vim-addons: debian vim-addon-manager +addon: sisu +description: SiSU documents - structuring, publishing in multiple formats and search +basedir: /usr/share/vim-scripts/ +files: + - ftplugin/sisu.vim + - syntax/sisu.vim diff --git a/views/version.txt b/views/version.txt index fecec3f..9782cfa 100644 --- a/views/version.txt +++ b/views/version.txt @@ -4,7 +4,7 @@ struct Version { int minor; int patch; } -enum _ver = Version(0, 17, 0); +enum _ver = Version(0, 18, 0); version (Posix) { version (DigitalMars) { } else version (LDC) { |