How danirod/vimrc works
Project Type and Purpose
• Type: A Vim configuration distribution (“dotfiles”) repo.
• Purpose:
– Provide a customized Vim setup via a single vimrc file.
– Organize and version Vim plugins using native “pack” directories and Git submodules.
– Automate plugin fetching/updating via GNUmakefile.
– Enforce a GDPR-compliant GitHub fork policy via a GitHub Actions workflow.
File Structure
Top-level:
• vimrc ← main Vim configuration
• GNUmakefile ← fetch/update plugin packs
• .gitmodules ← lists all plugin submodules
• .github/ ← CI workflow that auto-closes PRs
• pack/ ← native Vim “packages” directory
• plugin/ ← runtime plugin loader scripts
• ftplugin/ ← filetype-specific settings (eruby, markdown, ruby, svelte)
• undodir/ ← persistent-undo storage
pack/ subdirectories (each a Git submodule):
– coding/ (editorconfig-vim, vim-polyglot)
– lsp/ (ale, asyncomplete, vim-lsp, etc.)
– shell/ (fzf, nerdtree)
Key Insights from README
• Plugins are “regular packs” tracked as Git submodules.
• GNUmakefile orchestrates submodule clone/update.
• Repo is mirrored; PRs closed automatically due to GDPR policy.
Main Components
a. Core Config Layer
– vimrc
– ftplugin/*
b. Plugin Management Layer
– pack/* (coding, lsp, shell) ← each a submodule
– .gitmodules
– GNUmakefile
c. Runtime Loader Layer
– plugin/* .vim scripts that initialize each plugin
d. Persistent Data
– undodir/ for undo files
e. CI & Repo Orchestration
– .github/workflows/closepr.yml
– External Services: git.danirod.es (primary remote), GitHub mirror
Relationships & Data Flows
• At “git clone”: submodules are defined in .gitmodules → GNUmakefile runs → git submodule update
• At Vim startup: vimrc → loads ftplugin and plugin scripts → activates all pack/* plugins via native package loading
• CI: on PR → GitHub Actions workflow closes PRs automatically
• Backup: push/pull to primary remote (git.danirod.es), read-only mirror on GitHub
Architectural Patterns & Design Principles
• Modular plugin management using Vim’s native “pack” system (no external plugin manager).
• Separation of concerns:
– pack/ holds raw plugin code (submodules)
– plugin/ holds glue scripts (configuration/enabling)
– ftplugin/ holds filetype-specific settings
• Infrastructure as code: GNUmakefile automates plugin sync; GitHub Actions enforces policy.
• Self-contained: no external dependencies beyond Git and Vim.