c4vi is a portable, lightweight, and customizable editor environment optimized for the C4 language. It includes syntax highlighting, auto-indentation, filetype detection, and a custom Python-based Language Server Protocol (LSP) server providing hover tooltips, diagnostics, and context-aware autocomplete.
Follow these steps to clone and install c4vi on your system:
Clone the codebase into your local machine:
git clone https://github.com/AllenJK1/c4vi.git
cd c4viExecute the self-contained installation script:
./install.shThe installer will:
- Copy all configurations, colorschemes, syntax rules, and LSP binaries to a portable local folder:
~/.c4vi/. - Clean up any runtime caches.
- Guide you through interactive setup menus to customize your colorscheme and autocompletion preferences.
- Detect your active shell profile (
bash,zsh,fish,ksh,sh,csh, ortcsh) and add the alias:alias c4vi="nvim -u ~/.c4vi/vimconfigs/vimrc"(formatted automatically for your shell dialect).
Activate the new alias in your current terminal session:
- For Zsh:
source ~/.zshrc - For Bash:
source ~/.bashrc - For Fish:
source ~/.config/fish/config.fish - For other shells: Restart your terminal.
Launch your new custom editor with:
c4vi example.c4During installation, you will configure your preferences. You can adjust these settings later by editing ~/.c4vi/vimconfigs/config.json.
c4vi ships with five color palettes designed to fit any aesthetic. All themes support dynamic diagnostics (underlines) and C4 grammar rules:
- Default Dark (
c4_theme): A modern dark coding interface based on VS Code aesthetics. - Cyberpunk Neon (
c4_neon): Deep dark workspace with vibrant cyan, hot pink, and lime green accents. - Retro Monochrome (
c4_monochrome): A clean black-and-white theme featuring classic terminal amber highlights. - Solarized Dark (
c4_solarized): A classic dark green-teal palette with low-contrast, easy-on-the-eyes syntax highlights. - Crisp Light (
c4_light): A clean, high-contrast, premium paper-white light theme.
You can swap themes live inside the editor using the standard command: :colorscheme c4_<name>.
c4vi allows you to fine-tune how and when autocomplete popups appear to match your typing flow. The configurations are saved in ~/.c4vi/vimconfigs/config.json.
Here are the primary configurations, their impacts, and use cases:
| Combination | config.json Settings |
Visual & Editing Impact |
|---|---|---|
| 1. Full Autocomplete | "autocomplete_enabled": true"auto_trigger": true"trigger_on_methods_only": false |
Autocomplete menu pops up automatically on every keystroke (letters, numbers, underscores, operators). |
| 2. Method-Only Trigger | "autocomplete_enabled": true"auto_trigger": true"trigger_on_methods_only": true |
Autocomplete ONLY triggers automatically when you type a member/method access symbol (. or ->). |
| 3. Manual Trigger | "autocomplete_enabled": true"auto_trigger": false"trigger_on_methods_only": false |
The popup never appears automatically. You must explicitly press <C-Space> in insert mode to show completions. |
| 4. Completion Disabled | "autocomplete_enabled": false"auto_trigger": false"trigger_on_methods_only": false |
Autocomplete features are fully disabled. No popups or triggers are active. |
Configure how you navigate and confirm items in the autocomplete popup:
- Standard Vim Mode (
"map_tab_complete": false) (Recommended):- Impact: Preserves standard Vim keymaps. Use
<C-n>to move down,<C-p>to move up, and<C-y>to confirm a selection. - Why: Standard
<Tab>remains mapped to insert spacing and formatting, preventing coding layout issues.
- Impact: Preserves standard Vim keymaps. Use
- VS Code Mode (
"map_tab_complete": true):- Impact: Overrides standard keys. Use
<Tab>to move down,<S-Tab>to move up, and<CR>(Enter) to confirm.
- Impact: Overrides standard keys. Use