From f392683a6bbd2c91be702339083aa6dd8f549746 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Tue, 15 Sep 2026 05:13:55 +1000 Subject: [PATCH 1/2] docs(misc-dev-scripts): Phase 0 ownership and templates/ catalogue scaffold Declare project-drop-in ownership; add templates/{editorconfig,gitattributes, gitignore,vimrc,vscode}// layout with READMEs; bump to 0.5.2. --- CHANGES.md | 9 ++ NEWS.md | 1 + README.md | 63 ++++++++++++- TODO.md | 5 ++ VERSION | 2 +- templates/README.md | 97 +++++++++++++++++++++ templates/editorconfig/README.md | 41 +++++++++ templates/editorconfig/c#/.gitkeep | 0 templates/editorconfig/c/.gitkeep | 0 templates/editorconfig/c_cxx/.gitkeep | 0 templates/editorconfig/cxx/.gitkeep | 0 templates/editorconfig/generic/.gitkeep | 0 templates/editorconfig/go/.gitkeep | 0 templates/editorconfig/javascript/.gitkeep | 0 templates/editorconfig/python/.gitkeep | 0 templates/editorconfig/ruby/.gitkeep | 0 templates/editorconfig/rust/.gitkeep | 0 templates/editorconfig/zig/.gitkeep | 0 templates/gitattributes/README.md | 41 +++++++++ templates/gitattributes/c#/.gitkeep | 0 templates/gitattributes/c/.gitkeep | 0 templates/gitattributes/c_cxx/.gitkeep | 0 templates/gitattributes/cxx/.gitkeep | 0 templates/gitattributes/generic/.gitkeep | 0 templates/gitattributes/go/.gitkeep | 0 templates/gitattributes/javascript/.gitkeep | 0 templates/gitattributes/python/.gitkeep | 0 templates/gitattributes/ruby/.gitkeep | 0 templates/gitattributes/rust/.gitkeep | 0 templates/gitattributes/zig/.gitkeep | 0 templates/gitignore/README.md | 41 +++++++++ templates/gitignore/c#/.gitkeep | 0 templates/gitignore/c/.gitkeep | 0 templates/gitignore/c_cxx/.gitkeep | 0 templates/gitignore/cxx/.gitkeep | 0 templates/gitignore/generic/.gitkeep | 0 templates/gitignore/go/.gitkeep | 0 templates/gitignore/javascript/.gitkeep | 0 templates/gitignore/python/.gitkeep | 0 templates/gitignore/ruby/.gitkeep | 0 templates/gitignore/rust/.gitkeep | 0 templates/gitignore/zig/.gitkeep | 0 templates/vimrc/README.md | 41 +++++++++ templates/vimrc/c#/.gitkeep | 0 templates/vimrc/c/.gitkeep | 0 templates/vimrc/c_cxx/.gitkeep | 0 templates/vimrc/cxx/.gitkeep | 0 templates/vimrc/generic/.gitkeep | 0 templates/vimrc/go/.gitkeep | 0 templates/vimrc/javascript/.gitkeep | 0 templates/vimrc/python/.gitkeep | 0 templates/vimrc/ruby/.gitkeep | 0 templates/vimrc/rust/.gitkeep | 0 templates/vimrc/zig/.gitkeep | 0 templates/vscode/README.md | 41 +++++++++ templates/vscode/c#/.gitkeep | 0 templates/vscode/c/.gitkeep | 0 templates/vscode/c_cxx/.gitkeep | 0 templates/vscode/cxx/.gitkeep | 0 templates/vscode/generic/.gitkeep | 0 templates/vscode/go/.gitkeep | 0 templates/vscode/javascript/.gitkeep | 0 templates/vscode/python/.gitkeep | 0 templates/vscode/ruby/.gitkeep | 0 templates/vscode/rust/.gitkeep | 0 templates/vscode/zig/.gitkeep | 0 66 files changed, 377 insertions(+), 5 deletions(-) create mode 100644 templates/README.md create mode 100644 templates/editorconfig/README.md create mode 100644 templates/editorconfig/c#/.gitkeep create mode 100644 templates/editorconfig/c/.gitkeep create mode 100644 templates/editorconfig/c_cxx/.gitkeep create mode 100644 templates/editorconfig/cxx/.gitkeep create mode 100644 templates/editorconfig/generic/.gitkeep create mode 100644 templates/editorconfig/go/.gitkeep create mode 100644 templates/editorconfig/javascript/.gitkeep create mode 100644 templates/editorconfig/python/.gitkeep create mode 100644 templates/editorconfig/ruby/.gitkeep create mode 100644 templates/editorconfig/rust/.gitkeep create mode 100644 templates/editorconfig/zig/.gitkeep create mode 100644 templates/gitattributes/README.md create mode 100644 templates/gitattributes/c#/.gitkeep create mode 100644 templates/gitattributes/c/.gitkeep create mode 100644 templates/gitattributes/c_cxx/.gitkeep create mode 100644 templates/gitattributes/cxx/.gitkeep create mode 100644 templates/gitattributes/generic/.gitkeep create mode 100644 templates/gitattributes/go/.gitkeep create mode 100644 templates/gitattributes/javascript/.gitkeep create mode 100644 templates/gitattributes/python/.gitkeep create mode 100644 templates/gitattributes/ruby/.gitkeep create mode 100644 templates/gitattributes/rust/.gitkeep create mode 100644 templates/gitattributes/zig/.gitkeep create mode 100644 templates/gitignore/README.md create mode 100644 templates/gitignore/c#/.gitkeep create mode 100644 templates/gitignore/c/.gitkeep create mode 100644 templates/gitignore/c_cxx/.gitkeep create mode 100644 templates/gitignore/cxx/.gitkeep create mode 100644 templates/gitignore/generic/.gitkeep create mode 100644 templates/gitignore/go/.gitkeep create mode 100644 templates/gitignore/javascript/.gitkeep create mode 100644 templates/gitignore/python/.gitkeep create mode 100644 templates/gitignore/ruby/.gitkeep create mode 100644 templates/gitignore/rust/.gitkeep create mode 100644 templates/gitignore/zig/.gitkeep create mode 100644 templates/vimrc/README.md create mode 100644 templates/vimrc/c#/.gitkeep create mode 100644 templates/vimrc/c/.gitkeep create mode 100644 templates/vimrc/c_cxx/.gitkeep create mode 100644 templates/vimrc/cxx/.gitkeep create mode 100644 templates/vimrc/generic/.gitkeep create mode 100644 templates/vimrc/go/.gitkeep create mode 100644 templates/vimrc/javascript/.gitkeep create mode 100644 templates/vimrc/python/.gitkeep create mode 100644 templates/vimrc/ruby/.gitkeep create mode 100644 templates/vimrc/rust/.gitkeep create mode 100644 templates/vimrc/zig/.gitkeep create mode 100644 templates/vscode/README.md create mode 100644 templates/vscode/c#/.gitkeep create mode 100644 templates/vscode/c/.gitkeep create mode 100644 templates/vscode/c_cxx/.gitkeep create mode 100644 templates/vscode/cxx/.gitkeep create mode 100644 templates/vscode/generic/.gitkeep create mode 100644 templates/vscode/go/.gitkeep create mode 100644 templates/vscode/javascript/.gitkeep create mode 100644 templates/vscode/python/.gitkeep create mode 100644 templates/vscode/ruby/.gitkeep create mode 100644 templates/vscode/rust/.gitkeep create mode 100644 templates/vscode/zig/.gitkeep diff --git a/CHANGES.md b/CHANGES.md index ba33365..2d4d2a7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ ## Table of Contents +- [0.5.2 - 15th September 2026](#052---15th-september-2026) - [0.5.1 - 14th September 2026](#051---14th-september-2026) - [0.5.0 - 1st September 2026](#050---1st-september-2026) - [0.4.2 - 25th August 2026](#042---25th-august-2026) @@ -13,6 +14,14 @@ - [0.1.1 - 11th August 2026](#011---11th-august-2026) +## 0.5.2 - 15th September 2026 + +* Declared Phase 0 ownership with **misc-config-scripts**: this repo owns language-specific project drop-ins and **`run_all_unit_tests`**; sibling keeps **`.commonrc`** / **`.gitconfig`** only after cutover; +* Scaffolded **templates/** catalogue layout (`editorconfig`, `gitattributes`, `gitignore`, `vimrc`, `vscode` × language keys; **`.gitkeep`** placeholders); +* Added **templates/README.md** and per-family READMEs (status, copy destinations, migration notes); +* Updated **README.md** (ownership table; catalogue layout; templates section); + + ## 0.5.1 - 14th September 2026 * **shell-scripts/run_all_unit_tests/python/run_all_unit_tests.sh**: diff --git a/NEWS.md b/NEWS.md index 4f8358b..34f9a77 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ | Date | News Item | Details | | -------------------- | --------- | ------- | +| 15th September 2026 | [**misc-dev-scripts** 0.5.2](https://github.com/synesissoftware/misc-dev-scripts/releases/tag/0.5.2) released | Phase 0 ownership; `templates/` scaffold | | 14th September 2026 | [**misc-dev-scripts** 0.5.1](https://github.com/synesissoftware/misc-dev-scripts/releases/tag/0.5.1) released | Python `.sis` help + prefer project `.venv` | | 1st September 2026 | [**misc-dev-scripts** 0.5.0](https://github.com/synesissoftware/misc-dev-scripts/releases/tag/0.5.0) released | JavaScript `run_all_unit_tests` runner | | 25th August 2026 | [**misc-dev-scripts** 0.4.2](https://github.com/synesissoftware/misc-dev-scripts/releases/tag/0.4.2) released | Ruby `tput` TERM/TTY guard | diff --git a/README.md b/README.md index 26f07d9..cdc4de8 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # misc-dev-scripts + Miscellaneous Development Scripts ![Language](https://img.shields.io/badge/language-Bash-blue.svg) [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) +[![Version](https://img.shields.io/badge/version-0.5.2-blue.svg)](https://github.com/synesissoftware/misc-dev-scripts/blob/master/CHANGES.md) [![Last Commit](https://img.shields.io/github/last-commit/synesissoftware/misc-dev-scripts)](https://github.com/synesissoftware/misc-dev-scripts/commits/master) [![CI](https://github.com/synesissoftware/misc-dev-scripts/actions/workflows/ci.yml/badge.svg)](https://github.com/synesissoftware/misc-dev-scripts/actions/workflows/ci.yml) @@ -11,19 +13,58 @@ Miscellaneous Development Scripts ## Table of Contents - [Introduction](#introduction) +- [Ownership and migration (Phase 0)](#ownership-and-migration-phase-0) +- [Catalogue layout](#catalogue-layout) - [Shell Scripts](#shell-scripts) - [run\_all\_unit\_tests.sh](#run_all_unit_testssh) +- [Project drop-in templates](#project-drop-in-templates) - [Related projects](#related-projects) - [Project Information](#project-information) ## Introduction -**misc-dev-scripts** is a small catalog of shell helpers intended to be **copied** into Synesis (and related) language libraries — principally **run_all_unit_tests.sh** variants for **JavaScript**, **Python**, and **Ruby** today, with further languages planned. +**misc-dev-scripts** is a catalog of resources intended to be **copied** into Synesis (and related) **project** trees: shell helpers (under **shell-scripts/**) and language-specific project drop-in templates (under **templates/**). + +Today the shipped helpers are principally **run_all_unit_tests.sh** variants for **JavaScript**, **Python**, and **Ruby**, with further languages and template families planned. When updating a consumer, cite this repository’s **VERSION** in that project’s **CHANGES.md**. + +Sibling project: [**misc-config-scripts**](https://github.com/synesissoftware/misc-config-scripts) (**`.commonrc`** and **`.gitconfig`** only after cutover). + + +## Ownership and migration (Phase 0) + +**Status: intent declared — layout scaffolded; content cutover not complete.** + +Distinguish **self** boilerplate (this repository’s own root editor/Git files) from **templates** (copied into other projects). + +| Kind | **misc-config-scripts** | This repo | +| --- | --- | --- | +| **Self** **`.editorconfig`**, **`.gitattributes`**, **`.gitignore`**, **`.vimrc`**, **`.vscode/settings.json`** | ✅ | ✅ | +| **Templates:** **`.gitconfig`**, **`.commonrc`** | ✅ only | ❌ | +| **Templates:** language-specific **`run_all_unit_tests.sh`**, **`.editorconfig`**, **`.gitattributes`**, **`.gitignore`**, **`.vimrc`**, **`.vscode/settings.json`** | ❌ (legacy frozen) | ✅ only | + +Until later phases populate **`templates/`**, continue copying VS Code settings and **`.gitattributes`** from **misc-config-scripts** (legacy catalogs). Do **not** add new language templates there. -Canonical copies live under **shell-scripts/**; consuming projects keep a root-level **run_all_unit_tests.sh**. When updating a consumer, cite this repository’s **VERSION** in that project’s **CHANGES.md**. -Sibling project: [**misc-config-scripts**](https://github.com/synesissoftware/misc-config-scripts) (shell rc, Git, and editor/attribute templates). +## Catalogue layout + +Agreed paths (Phase 0): + +```text +misc-dev-scripts/ + shell-scripts/ + run_all_unit_tests//run_all_unit_tests.sh + templates/ + editorconfig//.editorconfig + gitattributes//.gitattributes + gitignore//.gitignore + vimrc//.vimrc + vscode//settings.json +``` + +Language keys (lexicographic): **c**, **c#**, **c_cxx**, **cxx**, **generic**, **go**, **javascript**, **python**, **ruby**, **rust**, **zig**. + +See [**templates/README.md**](./templates/README.md) for status, ownership detail, and copy destinations. ## Shell Scripts @@ -42,9 +83,22 @@ Language variants: Use `--help` on any variant for the authoritative flag list. +## Project drop-in templates + +See [**templates/README.md**](./templates/README.md). Families: + +* [**editorconfig**](./templates/editorconfig/README.md); +* [**gitattributes**](./templates/gitattributes/README.md); +* [**gitignore**](./templates/gitignore/README.md); +* [**vimrc**](./templates/vimrc/README.md); +* [**vscode**](./templates/vscode/README.md); + +**Phase 0:** directories reserved (**`.gitkeep`**); not ready to copy. + + ## Related projects -A peer-project that provides configuration resources is [**misc-config-scripts**](https://github.com/synesissoftware/misc-config-scripts). +A peer project that provides **`.commonrc`** and **`.gitconfig`** (and, until cutover, legacy project settings / gitattributes catalogs) is [**misc-config-scripts**](https://github.com/synesissoftware/misc-config-scripts). Resources from this project are used in the following projects (case-insensitive lexicographic order): @@ -70,6 +124,7 @@ Resources from this project are used in the following projects (case-insensitive * **VERSION** — see [**VERSION**](./VERSION); * **CHANGES** — see [**CHANGES.md**](./CHANGES.md); +* **NEWS** — see [**NEWS.md**](./NEWS.md); * **TODO** — see [**TODO.md**](./TODO.md); * **License** — BSD-3-Clause; see [**LICENSE**](./LICENSE); diff --git a/TODO.md b/TODO.md index b6a5090..e83dc72 100644 --- a/TODO.md +++ b/TODO.md @@ -88,6 +88,11 @@ * [x] Replace **.vscode/settings.json** with **misc-config-scripts** `settings.json/generic/settings.json` (multi-language union; not a hand-slimmed subset); * [x] Align **LICENSE** year range with current year; * [x] Add nested **shell-scripts/run_all_unit_tests/README.md** (copy command, per-lang paths, layout contracts, flag table); +* [x] ~~~Phase 0: declare ownership; scaffold **templates/** catalogue layout + READMEs~~~ - ✅; +* [ ] Phase 1: complete **self** boilerplate (**`.editorconfig`**; retarget root **`.vimrc`** as self for this Bash catalog, not C/C++ consumer gold); +* [ ] Phase 2: populate **templates/** from freelibs exemplars and migrate **misc-config-scripts** `settings.json/` + `gitattributes/` content; +* [ ] Phase 4: refresh this repo’s self **`.vscode/settings.json`** (and related self files) from **templates/vscode/generic/** (or shell-appropriate) once populated; +* [ ] Later: hoist **build_dist.sh** / **build_dist_uv.sh** (Python), **build_gem.sh** (Ruby), **rustfmt.toml** / **scripts/fmt** (Rust), Go **build.sh** / runners, and further common helpers under **shell-scripts/** or **templates/** as appropriate; * [ ] Optional: sample bootstrap notes for copy-vs-sync adoption; * [ ] Distribution / drift control: `SCRIPT_VERSION` header matching **VERSION**; document consumer CHANGES citation convention; optional sync helper; optional `testdata/` CI fixtures; diff --git a/VERSION b/VERSION index 4b9fcbe..cb0c939 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.1 +0.5.2 diff --git a/templates/README.md b/templates/README.md new file mode 100644 index 0000000..edc076c --- /dev/null +++ b/templates/README.md @@ -0,0 +1,97 @@ +# Project drop-in templates + + +Language-specific **project** drop-in templates for Synesis (and related) libraries. + +This tree is the **canonical catalogue layout** for project-local config files that consumers copy into a repository root (or **`.vscode/`**). Content is staged here in phases; until a language directory holds a real template file, a **`.gitkeep`** marks the reserved path. + + +## Table of Contents + +- [Status](#status) +- [Self boilerplate vs templates](#self-boilerplate-vs-templates) +- [Ownership](#ownership) +- [Layout](#layout) +- [Language keys](#language-keys) +- [How to use (once populated)](#how-to-use-once-populated) +- [Related](#related) + + +## Status + +**Phase 0 (layout declared):** directory tree and documentation only. Do **not** treat empty language folders as ready to copy. Population and cutover from **misc-config-scripts** are later phases. + + +## Self boilerplate vs templates + +| Kind | Where | Purpose | +| --- | --- | --- | +| **Self** | Repository root (e.g. this project's own **`.vimrc`**, **`.gitignore`**) | Configures *this* repository | +| **Template** | Under **`templates///`** | Copied into *other* projects | + +Do not confuse root self files with the catalogue under **`templates/`**. + + +## Ownership + +| Template family | Canonical home | Notes | +| --- | --- | --- | +| **.editorconfig** | **misc-dev-scripts** `templates/editorconfig/` | Intent; content TBD | +| **.gitattributes** | **misc-dev-scripts** `templates/gitattributes/` | Today still shipped from **misc-config-scripts** `gitattributes/` (deprecated for new work) | +| **.gitignore** | **misc-dev-scripts** `templates/gitignore/` | Intent; content TBD | +| **.vimrc** | **misc-dev-scripts** `templates/vimrc/` | Intent; content TBD | +| **.vscode** (`settings.json`) | **misc-dev-scripts** `templates/vscode/` | Today still shipped from **misc-config-scripts** `settings.json/` (deprecated for new work) | +| **run_all_unit_tests.sh** | **misc-dev-scripts** `shell-scripts/run_all_unit_tests/` | Already canonical | +| **.gitconfig** / **.commonrc** | **misc-config-scripts** only | Machine / shell environment — not project drop-ins | + + +## Layout + +| Path | Consumer destination | +| --- | --- | +| **editorconfig/\/.editorconfig** | **`.editorconfig`** | +| **gitattributes/\/.gitattributes** | **`.gitattributes`** | +| **gitignore/\/.gitignore** | **`.gitignore`** | +| **vimrc/\/.vimrc** | **`.vimrc`** | +| **vscode/\/settings.json** | **`.vscode/settings.json`** | + +Shell helpers remain under **`shell-scripts/`** (not under **`templates/`**). + + +## Language keys + +Lexicographic language directory names (same set for every family): + +* **c**; +* **c#**; +* **c_cxx** (mixed C / C++); +* **cxx**; +* **generic** (union / mixed-language trees); +* **go**; +* **javascript**; +* **python**; +* **ruby**; +* **rust**; +* **zig**. + + +## How to use (once populated) + +```sh +cp templates/vscode/python/settings.json /path/to/repo/.vscode/settings.json +``` + +```sh +cp templates/gitattributes/go/.gitattributes /path/to/repo/.gitattributes +``` + +When updating a consumer, cite this repository’s **VERSION** in that project’s **CHANGES.md**. + + +## Related + +* [**shell-scripts/run_all_unit_tests/README.md**](../shell-scripts/run_all_unit_tests/README.md) — test-runner helpers; +* Sibling [**misc-config-scripts**](https://github.com/synesissoftware/misc-config-scripts) — **`.gitconfig`** and **`.commonrc`** only (after cutover); project dotfile catalogs there are frozen pending migration. + + + diff --git a/templates/editorconfig/README.md b/templates/editorconfig/README.md new file mode 100644 index 0000000..cf88c04 --- /dev/null +++ b/templates/editorconfig/README.md @@ -0,0 +1,41 @@ +# `.editorconfig` templates + + +Drop-in root **`.editorconfig`** files, organised by primary language. + +**Status:** Phase 0 — layout only (**`.gitkeep`** placeholders). Content lands in a later phase. + + +## Table of Contents + +- [How to use (once populated)](#how-to-use-once-populated) +- [Layout](#layout) + + +## How to use (once populated) + +```sh +cp templates/editorconfig//.editorconfig /path/to/repo/.editorconfig +``` + +Prefer the language-specific template that matches the project’s primary language; use **generic** only for multi-language trees. + + +## Layout + +| Path | Role | +| --- | --- | +| **c/** | C-primary | +| **c#/** | C# / .NET | +| **c_cxx/** | Mixed C / C++ | +| **cxx/** | C++-primary | +| **generic/** | Union / mixed | +| **go/** | Go | +| **javascript/** | JavaScript / TypeScript | +| **python/** | Python | +| **ruby/** | Ruby | +| **rust/** | Rust | +| **zig/** | Zig | + + + diff --git a/templates/editorconfig/c#/.gitkeep b/templates/editorconfig/c#/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/editorconfig/c/.gitkeep b/templates/editorconfig/c/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/editorconfig/c_cxx/.gitkeep b/templates/editorconfig/c_cxx/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/editorconfig/cxx/.gitkeep b/templates/editorconfig/cxx/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/editorconfig/generic/.gitkeep b/templates/editorconfig/generic/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/editorconfig/go/.gitkeep b/templates/editorconfig/go/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/editorconfig/javascript/.gitkeep b/templates/editorconfig/javascript/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/editorconfig/python/.gitkeep b/templates/editorconfig/python/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/editorconfig/ruby/.gitkeep b/templates/editorconfig/ruby/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/editorconfig/rust/.gitkeep b/templates/editorconfig/rust/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/editorconfig/zig/.gitkeep b/templates/editorconfig/zig/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitattributes/README.md b/templates/gitattributes/README.md new file mode 100644 index 0000000..0a0f324 --- /dev/null +++ b/templates/gitattributes/README.md @@ -0,0 +1,41 @@ +# `.gitattributes` templates + + +Drop-in root **`.gitattributes`** files, organised by primary language. + +**Status:** Phase 0 — layout only (**`.gitkeep`** placeholders). Until cutover, copy from **misc-config-scripts** `gitattributes/` (frozen: no new language templates there). Content will be migrated here in a later phase. + + +## Table of Contents + +- [How to use (once populated)](#how-to-use-once-populated) +- [Layout](#layout) + + +## How to use (once populated) + +```sh +cp templates/gitattributes//.gitattributes /path/to/repo/.gitattributes +``` + +Prefer the language-specific template that matches the project’s primary language; use **generic** only for multi-language trees. Use **c_cxx** for mixed native C / C++ trees. + + +## Layout + +| Path | Role | +| --- | --- | +| **c/** | C-primary | +| **c#/** | C# / .NET | +| **c_cxx/** | Mixed C / C++ | +| **cxx/** | C++-primary | +| **generic/** | Union / mixed | +| **go/** | Go | +| **javascript/** | JavaScript / TypeScript | +| **python/** | Python | +| **ruby/** | Ruby | +| **rust/** | Rust | +| **zig/** | Zig | + + + diff --git a/templates/gitattributes/c#/.gitkeep b/templates/gitattributes/c#/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitattributes/c/.gitkeep b/templates/gitattributes/c/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitattributes/c_cxx/.gitkeep b/templates/gitattributes/c_cxx/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitattributes/cxx/.gitkeep b/templates/gitattributes/cxx/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitattributes/generic/.gitkeep b/templates/gitattributes/generic/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitattributes/go/.gitkeep b/templates/gitattributes/go/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitattributes/javascript/.gitkeep b/templates/gitattributes/javascript/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitattributes/python/.gitkeep b/templates/gitattributes/python/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitattributes/ruby/.gitkeep b/templates/gitattributes/ruby/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitattributes/rust/.gitkeep b/templates/gitattributes/rust/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitattributes/zig/.gitkeep b/templates/gitattributes/zig/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitignore/README.md b/templates/gitignore/README.md new file mode 100644 index 0000000..5687149 --- /dev/null +++ b/templates/gitignore/README.md @@ -0,0 +1,41 @@ +# `.gitignore` templates + + +Drop-in root **`.gitignore`** files, organised by primary language. + +**Status:** Phase 0 — layout only (**`.gitkeep`** placeholders). Content lands in a later phase. + + +## Table of Contents + +- [How to use (once populated)](#how-to-use-once-populated) +- [Layout](#layout) + + +## How to use (once populated) + +```sh +cp templates/gitignore//.gitignore /path/to/repo/.gitignore +``` + +Prefer the language-specific template that matches the project’s primary language; use **generic** only for multi-language trees. + + +## Layout + +| Path | Role | +| --- | --- | +| **c/** | C-primary | +| **c#/** | C# / .NET | +| **c_cxx/** | Mixed C / C++ | +| **cxx/** | C++-primary | +| **generic/** | Union / mixed | +| **go/** | Go | +| **javascript/** | JavaScript / TypeScript | +| **python/** | Python | +| **ruby/** | Ruby | +| **rust/** | Rust | +| **zig/** | Zig | + + + diff --git a/templates/gitignore/c#/.gitkeep b/templates/gitignore/c#/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitignore/c/.gitkeep b/templates/gitignore/c/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitignore/c_cxx/.gitkeep b/templates/gitignore/c_cxx/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitignore/cxx/.gitkeep b/templates/gitignore/cxx/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitignore/generic/.gitkeep b/templates/gitignore/generic/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitignore/go/.gitkeep b/templates/gitignore/go/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitignore/javascript/.gitkeep b/templates/gitignore/javascript/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitignore/python/.gitkeep b/templates/gitignore/python/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitignore/ruby/.gitkeep b/templates/gitignore/ruby/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitignore/rust/.gitkeep b/templates/gitignore/rust/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/gitignore/zig/.gitkeep b/templates/gitignore/zig/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vimrc/README.md b/templates/vimrc/README.md new file mode 100644 index 0000000..e33c7b7 --- /dev/null +++ b/templates/vimrc/README.md @@ -0,0 +1,41 @@ +# `.vimrc` templates + + +Drop-in root **`.vimrc`** files, organised by primary language. + +**Status:** Phase 0 — layout only (**`.gitkeep`** placeholders). Content lands in a later phase (lifted from freelibs exemplars). Do **not** treat this repository’s root **`.vimrc`** as the consumer template — that file is **self** boilerplate for **misc-dev-scripts**. + + +## Table of Contents + +- [How to use (once populated)](#how-to-use-once-populated) +- [Layout](#layout) + + +## How to use (once populated) + +```sh +cp templates/vimrc//.vimrc /path/to/repo/.vimrc +``` + +Prefer the language-specific template that matches the project’s primary language; use **generic** only for multi-language trees. + + +## Layout + +| Path | Role | +| --- | --- | +| **c/** | C-primary | +| **c#/** | C# / .NET | +| **c_cxx/** | Mixed C / C++ | +| **cxx/** | C++-primary | +| **generic/** | Union / mixed | +| **go/** | Go | +| **javascript/** | JavaScript / TypeScript | +| **python/** | Python | +| **ruby/** | Ruby | +| **rust/** | Rust | +| **zig/** | Zig | + + + diff --git a/templates/vimrc/c#/.gitkeep b/templates/vimrc/c#/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vimrc/c/.gitkeep b/templates/vimrc/c/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vimrc/c_cxx/.gitkeep b/templates/vimrc/c_cxx/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vimrc/cxx/.gitkeep b/templates/vimrc/cxx/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vimrc/generic/.gitkeep b/templates/vimrc/generic/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vimrc/go/.gitkeep b/templates/vimrc/go/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vimrc/javascript/.gitkeep b/templates/vimrc/javascript/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vimrc/python/.gitkeep b/templates/vimrc/python/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vimrc/ruby/.gitkeep b/templates/vimrc/ruby/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vimrc/rust/.gitkeep b/templates/vimrc/rust/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vimrc/zig/.gitkeep b/templates/vimrc/zig/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vscode/README.md b/templates/vscode/README.md new file mode 100644 index 0000000..12548b7 --- /dev/null +++ b/templates/vscode/README.md @@ -0,0 +1,41 @@ +# VS Code `settings.json` templates + + +Drop-in workspace **`.vscode/settings.json`** files, organised by primary language. + +**Status:** Phase 0 — layout only (**`.gitkeep`** placeholders). Until cutover, copy from **misc-config-scripts** `settings.json/` (frozen: no new language templates there). Content will be migrated here in a later phase as **`templates/vscode//settings.json`**. + + +## Table of Contents + +- [How to use (once populated)](#how-to-use-once-populated) +- [Layout](#layout) + + +## How to use (once populated) + +```sh +cp templates/vscode//settings.json /path/to/repo/.vscode/settings.json +``` + +Prefer the language-specific template that matches the project’s primary language; use **generic** only for multi-language trees. Use **c_cxx** when a mixed native C / C++ settings union is provided. + + +## Layout + +| Path | Role | +| --- | --- | +| **c/** | C-primary | +| **c#/** | C# / .NET | +| **c_cxx/** | Mixed C / C++ | +| **cxx/** | C++-primary | +| **generic/** | Union / mixed | +| **go/** | Go | +| **javascript/** | JavaScript / TypeScript | +| **python/** | Python | +| **ruby/** | Ruby | +| **rust/** | Rust | +| **zig/** | Zig | + + + diff --git a/templates/vscode/c#/.gitkeep b/templates/vscode/c#/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vscode/c/.gitkeep b/templates/vscode/c/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vscode/c_cxx/.gitkeep b/templates/vscode/c_cxx/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vscode/cxx/.gitkeep b/templates/vscode/cxx/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vscode/generic/.gitkeep b/templates/vscode/generic/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vscode/go/.gitkeep b/templates/vscode/go/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vscode/javascript/.gitkeep b/templates/vscode/javascript/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vscode/python/.gitkeep b/templates/vscode/python/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vscode/ruby/.gitkeep b/templates/vscode/ruby/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vscode/rust/.gitkeep b/templates/vscode/rust/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/vscode/zig/.gitkeep b/templates/vscode/zig/.gitkeep new file mode 100644 index 0000000..e69de29 From 838df2a2d57989314ecef950bfbadd44c900d9aa Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Tue, 15 Sep 2026 08:31:03 +1000 Subject: [PATCH 2/2] chore(misc-dev-scripts): Phase 1 self boilerplate and c_cxx vimrc seed Add shell/docs .editorconfig; retarget root .vimrc; preserve former C/C++ gold as templates/vimrc/c_cxx/.vimrc; bump to 0.5.3. --- .editorconfig | 44 +++++++++++++++++++++ .vimrc | 39 ++++++------------- CHANGES.md | 11 ++++++ NEWS.md | 1 + README.md | 6 +-- TODO.md | 2 +- VERSION | 2 +- templates/README.md | 2 +- templates/vimrc/README.md | 6 +-- templates/vimrc/c_cxx/.gitkeep | 0 templates/vimrc/c_cxx/.vimrc | 70 ++++++++++++++++++++++++++++++++++ 11 files changed, 147 insertions(+), 36 deletions(-) create mode 100644 .editorconfig delete mode 100644 templates/vimrc/c_cxx/.gitkeep create mode 100644 templates/vimrc/c_cxx/.vimrc diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c3a7477 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,44 @@ +root = true + +# Self boilerplate for this shell / docs catalog. +# Language indent/EOL/charset overlap with .vscode/settings.json. +# Rulers, renderWhitespace, detectIndentation, and mergeEditor cannot be +# expressed here — they stay in settings.json. + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = tab +insert_final_newline = true +trim_trailing_whitespace = true + +# [bat] +[*.{bat,cmd}] +end_of_line = crlf +indent_size = 4 +indent_style = space + +# [json] +[*.json] +indent_size = 2 +indent_style = space + +# [markdown] +[*.md] +indent_size = 2 +indent_style = space + +# [shellscript] (and extensionless shell rc drop-ins) +[*.{bash,sh,zsh}] +indent_size = 2 +indent_style = space + +[{.bashrc,.commonrc,.zshrc}] +indent_size = 2 +indent_style = space + +# [yaml] +[*.{yaml,yml}] +indent_size = 2 +indent_style = space diff --git a/.vimrc b/.vimrc index 1bf33a0..1733fc5 100644 --- a/.vimrc +++ b/.vimrc @@ -1,4 +1,5 @@ -" Synesis C/C++ project .vimrc — aligned with .sis/.vscode/c_cxx/settings.json +" Synesis shell / docs project .vimrc — self boilerplate for +" misc-config-scripts / misc-dev-scripts (aligned with .vscode/settings.json) set nocompatible filetype indent plugin on @@ -17,12 +18,12 @@ set fixeol set list set listchars=tab:->,trail:-,extends:>,precedes:<,nbsp:+ -" editor.detectIndentation: false — global defaults (editor.tabSize: 4, insertSpaces: true) +" editor.detectIndentation: false — global defaults (editor.tabSize: 2, insertSpaces: false) set colorcolumn=76 -set expandtab -set shiftwidth=4 -set softtabstop=4 -set tabstop=4 +set noexpandtab +set shiftwidth=2 +set softtabstop=2 +set tabstop=2 " colorcolumn draws a full-column tint in Vim (not a VS Code-style 1px line). " Keep it subtle via the ColorColumn highlight group; reapply after colorscheme changes. @@ -40,31 +41,15 @@ autocmd ColorScheme * call s:ConfigureColorColumn() " files.trimTrailingWhitespace autocmd BufWritePre * %s/\s\+$//e -augroup sis_c_cxx +augroup sis_shell_docs autocmd! - " [c] / [cpp] - autocmd FileType c,cpp setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,64,68,72,76 - - " [rust] - autocmd FileType rs setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=76 - - " [cmake] - autocmd FileType cmake setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 - - " [shellscript] - autocmd FileType sh,bash,zsh setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 colorcolumn=60,76 - " [bat] autocmd FileType bat,dosbatch setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76 - " [json] / [markdown] / [yaml] / [ruby] - autocmd FileType json,markdown,yaml,ruby setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 - - " [python] - autocmd FileType python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76 + " [json] / [markdown] / [yaml] + autocmd FileType json,markdown,yaml setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 - " [toml] - autocmd FileType toml setlocal noexpandtab tabstop=2 shiftwidth=2 softtabstop=2 + " [shellscript] + autocmd FileType sh,bash,zsh setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 colorcolumn=60,76 augroup END - diff --git a/CHANGES.md b/CHANGES.md index 2d4d2a7..f5d7002 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ ## Table of Contents +- [0.5.3 - 15th September 2026](#053---15th-september-2026) - [0.5.2 - 15th September 2026](#052---15th-september-2026) - [0.5.1 - 14th September 2026](#051---14th-september-2026) - [0.5.0 - 1st September 2026](#050---1st-september-2026) @@ -14,6 +15,16 @@ - [0.1.1 - 11th August 2026](#011---11th-august-2026) +## 0.5.3 - 15th September 2026 + +* Phase 1 self boilerplate: + * added **`.editorconfig`** (shell / docs catalog: UTF-8, LF, shell 2-space, markdown/json/yaml); + * replaced root **`.vimrc`** C/C++ consumer gold with shell / docs **self** **`.vimrc`** (aligned with **`.vscode/settings.json`**); + * preserved former C/C++ gold as **templates/vimrc/c_cxx/.vimrc** for Phase 2; + * confirmed **`.gitattributes`**, **`.gitignore`**, and **`.vscode/settings.json`** remain present as self files; +* Updated **templates/README.md** and **templates/vimrc/README.md** (c_cxx seed note); + + ## 0.5.2 - 15th September 2026 * Declared Phase 0 ownership with **misc-config-scripts**: this repo owns language-specific project drop-ins and **`run_all_unit_tests`**; sibling keeps **`.commonrc`** / **`.gitconfig`** only after cutover; diff --git a/NEWS.md b/NEWS.md index 34f9a77..0704024 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ | Date | News Item | Details | | -------------------- | --------- | ------- | +| 15th September 2026 | [**misc-dev-scripts** 0.5.3](https://github.com/synesissoftware/misc-dev-scripts/releases/tag/0.5.3) released | Phase 1 self boilerplate; c_cxx vimrc seed | | 15th September 2026 | [**misc-dev-scripts** 0.5.2](https://github.com/synesissoftware/misc-dev-scripts/releases/tag/0.5.2) released | Phase 0 ownership; `templates/` scaffold | | 14th September 2026 | [**misc-dev-scripts** 0.5.1](https://github.com/synesissoftware/misc-dev-scripts/releases/tag/0.5.1) released | Python `.sis` help + prefer project `.venv` | | 1st September 2026 | [**misc-dev-scripts** 0.5.0](https://github.com/synesissoftware/misc-dev-scripts/releases/tag/0.5.0) released | JavaScript `run_all_unit_tests` runner | diff --git a/README.md b/README.md index cdc4de8..abc1749 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Miscellaneous Development Scripts ![Language](https://img.shields.io/badge/language-Bash-blue.svg) [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) -[![Version](https://img.shields.io/badge/version-0.5.2-blue.svg)](https://github.com/synesissoftware/misc-dev-scripts/blob/master/CHANGES.md) +[![Version](https://img.shields.io/badge/version-0.5.3-blue.svg)](https://github.com/synesissoftware/misc-dev-scripts/blob/master/CHANGES.md) [![Last Commit](https://img.shields.io/github/last-commit/synesissoftware/misc-dev-scripts)](https://github.com/synesissoftware/misc-dev-scripts/commits/master) [![CI](https://github.com/synesissoftware/misc-dev-scripts/actions/workflows/ci.yml/badge.svg)](https://github.com/synesissoftware/misc-dev-scripts/actions/workflows/ci.yml) @@ -33,7 +33,7 @@ Sibling project: [**misc-config-scripts**](https://github.com/synesissoftware/mi ## Ownership and migration (Phase 0) -**Status: intent declared — layout scaffolded; content cutover not complete.** +**Status: Phase 0–1 done for self boilerplate — template content cutover not complete.** Distinguish **self** boilerplate (this repository’s own root editor/Git files) from **templates** (copied into other projects). @@ -93,7 +93,7 @@ See [**templates/README.md**](./templates/README.md). Families: * [**vimrc**](./templates/vimrc/README.md); * [**vscode**](./templates/vscode/README.md); -**Phase 0:** directories reserved (**`.gitkeep`**); not ready to copy. +**Phase 0–1:** directories reserved; **`templates/vimrc/c_cxx/.vimrc`** seeded. Other families not ready to copy. ## Related projects diff --git a/TODO.md b/TODO.md index e83dc72..7e10780 100644 --- a/TODO.md +++ b/TODO.md @@ -89,7 +89,7 @@ * [x] Align **LICENSE** year range with current year; * [x] Add nested **shell-scripts/run_all_unit_tests/README.md** (copy command, per-lang paths, layout contracts, flag table); * [x] ~~~Phase 0: declare ownership; scaffold **templates/** catalogue layout + READMEs~~~ - ✅; -* [ ] Phase 1: complete **self** boilerplate (**`.editorconfig`**; retarget root **`.vimrc`** as self for this Bash catalog, not C/C++ consumer gold); +* [x] ~~~Phase 1: complete **self** boilerplate (**`.editorconfig`**; retarget root **`.vimrc`** as self for this Bash catalog, not C/C++ consumer gold; seed **templates/vimrc/c_cxx/.vimrc**)~~~ - ✅; * [ ] Phase 2: populate **templates/** from freelibs exemplars and migrate **misc-config-scripts** `settings.json/` + `gitattributes/` content; * [ ] Phase 4: refresh this repo’s self **`.vscode/settings.json`** (and related self files) from **templates/vscode/generic/** (or shell-appropriate) once populated; * [ ] Later: hoist **build_dist.sh** / **build_dist_uv.sh** (Python), **build_gem.sh** (Ruby), **rustfmt.toml** / **scripts/fmt** (Rust), Go **build.sh** / runners, and further common helpers under **shell-scripts/** or **templates/** as appropriate; diff --git a/VERSION b/VERSION index cb0c939..be14282 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/templates/README.md b/templates/README.md index edc076c..822d03e 100644 --- a/templates/README.md +++ b/templates/README.md @@ -19,7 +19,7 @@ This tree is the **canonical catalogue layout** for project-local config files t ## Status -**Phase 0 (layout declared):** directory tree and documentation only. Do **not** treat empty language folders as ready to copy. Population and cutover from **misc-config-scripts** are later phases. +**Phase 0–1:** directory tree and documentation declared; **`templates/vimrc/c_cxx/.vimrc`** seeded (C/C++ gold preserved from former root self files). Other language folders remain empty (**`.gitkeep`**) until Phase 2. Do **not** treat unseeded folders as ready to copy. Cutover from **misc-config-scripts** remains a later phase. ## Self boilerplate vs templates diff --git a/templates/vimrc/README.md b/templates/vimrc/README.md index e33c7b7..2b6ec51 100644 --- a/templates/vimrc/README.md +++ b/templates/vimrc/README.md @@ -3,7 +3,7 @@ Drop-in root **`.vimrc`** files, organised by primary language. -**Status:** Phase 0 — layout only (**`.gitkeep`** placeholders). Content lands in a later phase (lifted from freelibs exemplars). Do **not** treat this repository’s root **`.vimrc`** as the consumer template — that file is **self** boilerplate for **misc-dev-scripts**. +**Status:** Phase 0 layout plus early Phase 1 seed — **`c_cxx/.vimrc`** holds the preserved Synesis C/C++ gold (moved out of this repository’s root self **`.vimrc`**). Other language directories remain **`.gitkeep`** placeholders until Phase 2. Do **not** treat this repository’s root **`.vimrc`** as a consumer template — that file is **self** boilerplate for **misc-dev-scripts**. ## Table of Contents @@ -18,7 +18,7 @@ Drop-in root **`.vimrc`** files, organised by primary language. cp templates/vimrc//.vimrc /path/to/repo/.vimrc ``` -Prefer the language-specific template that matches the project’s primary language; use **generic** only for multi-language trees. +Prefer the language-specific template that matches the project’s primary language; use **generic** only for multi-language trees. Until Phase 2 completes other languages, **`c_cxx`** is the only seeded consumer template here. ## Layout @@ -27,7 +27,7 @@ Prefer the language-specific template that matches the project’s primary langu | --- | --- | | **c/** | C-primary | | **c#/** | C# / .NET | -| **c_cxx/** | Mixed C / C++ | +| **c_cxx/** | Mixed C / C++ (**seeded** — Synesis C/C++ gold) | | **cxx/** | C++-primary | | **generic/** | Union / mixed | | **go/** | Go | diff --git a/templates/vimrc/c_cxx/.gitkeep b/templates/vimrc/c_cxx/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/templates/vimrc/c_cxx/.vimrc b/templates/vimrc/c_cxx/.vimrc new file mode 100644 index 0000000..23ab392 --- /dev/null +++ b/templates/vimrc/c_cxx/.vimrc @@ -0,0 +1,70 @@ +" Synesis C/C++ project .vimrc — aligned with .sis/.vscode/c_cxx/settings.json + +set nocompatible +filetype indent plugin on +syntax enable +set autoindent +set backspace=indent,eol,start +set hlsearch +set incsearch +set number + +" files.insertFinalNewline +set eol +set fixeol + +" editor.renderWhitespace: all +set list +set listchars=tab:->,trail:-,extends:>,precedes:<,nbsp:+ + +" editor.detectIndentation: false — global defaults (editor.tabSize: 4, insertSpaces: true) +set colorcolumn=76 +set expandtab +set shiftwidth=4 +set softtabstop=4 +set tabstop=4 + +" colorcolumn draws a full-column tint in Vim (not a VS Code-style 1px line). +" Keep it subtle via the ColorColumn highlight group; reapply after colorscheme changes. +if has('termguicolors') + " set termguicolors +endif + +function! s:ConfigureColorColumn() abort + highlight ColorColumn ctermbg=236 guibg=#2a2a2a cterm=NONE gui=NONE +endfunction + +call s:ConfigureColorColumn() +autocmd ColorScheme * call s:ConfigureColorColumn() + +" files.trimTrailingWhitespace +autocmd BufWritePre * %s/\s\+$//e + +augroup sis_c_cxx + autocmd! + + " [bat] + autocmd FileType bat,dosbatch setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76 + + " [cmake] + autocmd FileType cmake setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 + + " [c] / [cpp] + autocmd FileType c,cpp setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,64,68,72,76 + + " [json] / [markdown] / [yaml] / [ruby] + autocmd FileType json,markdown,yaml,ruby setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 + + " [python] + autocmd FileType python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76 + + " [rust] + autocmd FileType rs setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=76 + + " [shellscript] + autocmd FileType sh,bash,zsh setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 colorcolumn=60,76 + + " [toml] + autocmd FileType toml setlocal noexpandtab tabstop=2 shiftwidth=2 softtabstop=2 +augroup END +