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..44b73a0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,7 +3,7 @@ ## Table of Contents -- [0.5.2 - 15th September 2026](#052---15th-september-2026) +- [0.6.0 - 18th September 2026](#060---18th-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) @@ -14,8 +14,14 @@ - [0.1.1 - 11th August 2026](#011---11th-august-2026) -## 0.5.2 - 15th September 2026 +## 0.6.0 - 18th 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); * 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); diff --git a/NEWS.md b/NEWS.md index 34f9a77..0bb8085 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,7 +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 | +| 18th September 2026 | [**misc-dev-scripts** 0.6.0](https://github.com/synesissoftware/misc-dev-scripts/releases/tag/0.6.0) released | Phase 0–1 ownership; self boilerplate; c_cxx vimrc seed | | 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 cdc4de8..d30645c 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.6.0-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..a918a2a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.2 +0.6.0 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/.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 +