# gpapadok/vice architecture

> Architecture diagram of the GitHub repository gpapadok/vice, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gpapadok/vice
- Repository: https://github.com/gpapadok/vice

## Overview

vice is a small Emacs Lisp editing extension: the user invokes a prefixed operation, vice-dispatch reads the operator-and-object grammar, resolves a text range, and applies the chosen edit. The README documents the object sources and operator effects; source excerpts were unavailable, so internal links are limited to documented behavior.

Main entry points: [`vice-mode.el`](https://github.com/gpapadok/vice/blob/master/vice-mode.el) (Command dispatch)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Emacs user"))
node_dispatch["Command dispatch<br/>[vice-mode.el]"]
node_objects["Text objects<br/>[vice-mode.el]"]
node_operators["Editing operators<br/>[vice-mode.el]"]
node_emacs["Emacs editing facilities"]
node_treesit["Tree-sitter"]

node_user -->|"invokes prefix"| node_dispatch
node_dispatch -->|"resolves object"| node_objects
node_dispatch -->|"dispatches operator"| node_operators
node_objects -->|"uses syntax and things"| node_emacs
node_objects -.->|"prefers for functions"| node_treesit
node_operators -->|"edits buffer and kill ring"| node_emacs

click node_dispatch "https://github.com/gpapadok/vice/blob/master/vice-mode.el"
click node_objects "https://github.com/gpapadok/vice/blob/master/vice-mode.el"
click node_operators "https://github.com/gpapadok/vice/blob/master/vice-mode.el"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_user toneBlue
class node_dispatch,node_objects,node_operators toneTeal
class node_emacs,node_treesit toneIndigo
```

## Components

### Other components

- **Emacs user**
- [Command dispatch](https://github.com/gpapadok/vice/blob/master/vice-mode.el): `vice-mode.el`
- [Text objects](https://github.com/gpapadok/vice/blob/master/vice-mode.el): `vice-mode.el`
- [Editing operators](https://github.com/gpapadok/vice/blob/master/vice-mode.el): `vice-mode.el`
- **Emacs editing facilities**
- **Tree-sitter**

## Connections

- Emacs user → Command dispatch: invokes prefix
- Command dispatch → Text objects: resolves object
- Command dispatch → Editing operators: dispatches operator
- Text objects → Emacs editing facilities: uses syntax and things
- Text objects → Tree-sitter: prefers for functions
- Editing operators → Emacs editing facilities: edits buffer and kill ring
