# timmow/vimrc architecture

> Architecture diagram of the GitHub repository timmow/vimrc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/timmow/vimrc
- Repository: https://github.com/timmow/vimrc

## Overview

##### Project type and purpose
- Key purpose: centralize all Vim‐related configuration, plugins, filetype settings, syntax/indent rules, etc., so that when you start Vim it immediately loads your preferred workflows and plugins.

##### File structure
- Top‐level:
- .gitignore – excludes build/artifacts (irrelevant here)
- .gitmodules – declares any Git submodules (e.g., external Vim plugins)
- README.mkd – describes the repository purpose
- _vimrc – the main Vim startup file (entry point)
- vimfiles/ – mirrored directory tree that Vim will use as its runtime path:
- after/plugin/ – scripts that override or augment plugin behavior after initial load
- after/ftplugin/ – filetype‐specific settings loaded after core ftplugins
- ftplugin/ – primary filetype settings for languages (e.g., terraform)
- indent/ – language‐specific indent rules
- syntax/ – language syntax definitions (e.g., yaml.vim)
- No traditional “src” or “lib” – this is purely configuration, but there is a clear layering of plugin vs. after‐plugin vs. filetype vs. syntax/indent.

##### README for additional insights
- Confirms goal: “easy way to setup my environment” across work/home machines.

## Diagram (Mermaid)

```mermaid
flowchart TB
    DevMachine["Developer's Machine"]:::external
    GitHub["Git & GitHub"]:::version
    Gitignore[".gitignore"]:::version
    Gitmodules[".gitmodules"]:::version
    VimCore["Vim Core"]:::core
    Vimrc["_vimrc"]:::core
    Runtime["vimfiles/ (RuntimePath root)"]

    subgraph "vimfiles/"
        direction TB
        PluginDir["plugin/"]:::plugin
        AfterPlugin["after/plugin/"]:::plugin
        AfterPluginFile["vim-rooter.vim"]:::plugin
        FTPlugin["ftplugin/"]:::filetype
        FTPluginFile["terraform.vim"]:::filetype
        AfterFT["after/ftplugin/"]:::filetype
        AfterFTFile["javascript.vim"]:::filetype
        AfterSyntax["after/syntax/"]:::filetype
        SyntaxFile["yaml.vim"]:::filetype
        IndentDir["indent/"]:::filetype
        IndentFile["jsonnet.vim"]:::filetype
    end

    DevMachine --> GitHub
    GitHub --> Gitignore
    GitHub --> Gitmodules
    Gitmodules --> PluginDir
    DevMachine --> VimCore
    VimCore --> Vimrc
    Vimrc --> Runtime
    Runtime --> PluginDir
    PluginDir --> AfterPlugin
    AfterPlugin --> FTPlugin
    FTPlugin --> AfterFT
    AfterFT --> AfterSyntax
    AfterSyntax --> IndentDir

    PluginDir --> PluginDir
    AfterPlugin --> AfterPluginFile
    FTPlugin --> FTPluginFile
    AfterFT --> AfterFTFile
    AfterSyntax --> SyntaxFile
    IndentDir --> IndentFile

    click Vimrc "https://github.com/timmow/vimrc/tree/master/_vimrc"
    click Gitignore "https://github.com/timmow/vimrc/blob/master/.gitignore"
    click Gitmodules "https://github.com/timmow/vimrc/blob/master/.gitmodules"
    click Runtime "https://github.com/timmow/vimrc/tree/master/vimfiles/"
    click AfterPluginFile "https://github.com/timmow/vimrc/blob/master/vimfiles/after/plugin/vim-rooter.vim"
    click AfterFTFile "https://github.com/timmow/vimrc/blob/master/vimfiles/after/ftplugin/javascript.vim"
    click SyntaxFile "https://github.com/timmow/vimrc/blob/master/vimfiles/after/syntax/yaml.vim"
    click FTPluginFile "https://github.com/timmow/vimrc/blob/master/vimfiles/ftplugin/terraform.vim"
    click IndentFile "https://github.com/timmow/vimrc/blob/master/vimfiles/indent/jsonnet.vim"

    classDef core fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef plugin fill:#98FB98,stroke:#333,stroke-width:1px
    classDef filetype fill:#FFFFE0,stroke:#333,stroke-width:1px
    classDef version fill:#D3D3D3,stroke:#333,stroke-width:1px
    classDef external fill:#EFEFEF,stroke:#333,stroke-width:1px
```
