https://github.com/ryo-arima/vem
VEM is a command-line tool written in Rust for efficiently managing multiple Vim environments. Switch between different .vim configurations easily based on your needs and preferences.
https://github.com/ryo-arima/vem
vim vimrc
Last synced: about 1 month ago
JSON representation
VEM is a command-line tool written in Rust for efficiently managing multiple Vim environments. Switch between different .vim configurations easily based on your needs and preferences.
- Host: GitHub
- URL: https://github.com/ryo-arima/vem
- Owner: ryo-arima
- License: mit
- Created: 2025-10-17T21:13:25.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-10-26T13:04:47.000Z (8 months ago)
- Last Synced: 2025-10-26T15:04:30.651Z (8 months ago)
- Topics: vim, vimrc
- Language: Rust
- Homepage: https://ryo-arima.github.io/vem/
- Size: 197 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VEM (Vim Environment Manager)
> [!WARNING]
> **🚧 UNDER DEVELOPMENT 🚧**
>
> This project is currently in active development and is not yet ready for production use.
> Features, APIs, and commands may change without notice.
VEM is a command-line tool written in Rust for efficiently managing multiple Vim environments. Switch between different `.vim` configurations easily based on your needs and preferences.
## Special Thanks
VEM aims to integrate with various amazing tools and plugins in the Vim/Neovim ecosystem. We would like to express our gratitude to the following projects:
### Plugin Managers
- [vim-plug](https://github.com/junegunn/vim-plug) - Minimalist Vim Plugin Manager
- [packer.nvim](https://github.com/wbthomason/packer.nvim) - A use-package inspired plugin manager for Neovim
- [lazy.nvim](https://github.com/folke/lazy.nvim) - Modern plugin manager for Neovim
- [dein.vim](https://github.com/Shougo/dein.vim) - Dark powered Vim/Neovim plugin manager
- [paq-nvim](https://github.com/savq/paq-nvim) - Neovim package manager
- [jetpack.vim](https://github.com/tani/vim-jetpack) - Lightning-fast plugin manager for Vim/Neovim
### AI Tools
- [GitHub Copilot](https://github.com/features/copilot) - AI pair programmer
- [ChatGPT](https://chat.openai.com/) - Conversational AI assistant
- [Codeium](https://codeium.com/) - Free AI code completion tool
- [Tabnine](https://www.tabnine.com/) - AI code completion assistant
- [Amazon CodeWhisperer](https://aws.amazon.com/codewhisperer/) - AI-powered code suggestions
- [Claude Code](https://claude.ai/) - Anthropic's AI assistant
- [Gemini Code Assist](https://cloud.google.com/gemini/docs/codeassist/overview) - Google's AI coding assistant
- [Cursor](https://cursor.sh/) - AI-powered code editor
- [Continue](https://continue.dev/) - Open-source AI code assistant
- [Aider](https://aider.chat/) - AI pair programming in terminal
- [Sourcegraph Cody](https://sourcegraph.com/cody) - AI coding assistant
### Color Schemes
- [Gruvbox](https://github.com/morhetz/gruvbox) - Retro groove color scheme
- [Nord](https://www.nordtheme.com/) - Arctic, north-bluish color palette
- [Dracula](https://draculatheme.com/) - Dark theme for many applications
- [TokyoNight](https://github.com/folke/tokyonight.nvim) - Clean, dark Neovim theme
- [Catppuccin](https://github.com/catppuccin/catppuccin) - Soothing pastel theme
- [OneDark](https://github.com/joshdick/onedark.vim) - Atom's iconic One Dark theme
- [Solarized](https://ethanschoonover.com/solarized/) - Precision colors for machines and people
- [Monokai](https://monokai.pro/) - Iconic color scheme for developers
### Development Tools
- [Exuberant Ctags](https://ctags.sourceforge.net/) - Programming language indexing tool
- [Universal Ctags](https://ctags.io/) - Modern maintained version of Ctags
- [LSP (Language Server Protocol)](https://microsoft.github.io/language-server-protocol/) - Language intelligence protocol
- [CoC.nvim](https://github.com/neoclide/coc.nvim) - Intellisense engine for Vim/Neovim
And many more themes and plugins that enhance the Vim/Neovim experience!
## Features
- 🚀 **Fast**: Lightweight and fast environment switching powered by Rust
- 🔧 **Flexible**: Manage multiple Vim configuration profiles with TOML-based configuration
- 📁 **Organized**: Keep each environment isolated to prevent configuration conflicts
- 🎯 **Simple**: Intuitive command-line interface with comprehensive ctags management
- 🤖 **AI-Enhanced**: Built-in support for AI coding assistants (GitHub Copilot, ChatGPT, Codeium)
- 🔌 **Plugin Management**: Support for multiple plugin managers (vim-plug, lazy.nvim, packer, etc.)
- 🏷️ **Smart Tagging**: Advanced ctags management with multi-repository support
- 🌈 **Theme Support**: Extensive color scheme and theme management
- 🔍 **Multi-Repository**: Cross-repository code navigation and tagging
## Documentation
📖 **[Read the full documentation](https://ryo-arima.github.io/vem/)**
### Getting Started
- [Quick Start Guide](https://ryo-arima.github.io/vem/quick-start.html) - Get up and running in 5 minutes
- [Installation Instructions](https://ryo-arima.github.io/vem/installation.html) - Platform-specific installation guides
### User Guides
- [Environment Management](https://ryo-arima.github.io/vem/environment-structure.html) - Managing Vim/Neovim environments
- [Command Reference](https://ryo-arima.github.io/vem/commands.html) - Complete command documentation
- [Configuration Guide](https://ryo-arima.github.io/vem/configuration.html) - TOML configuration reference
- [Ctags Management](https://ryo-arima.github.io/vem/commands/ctags.html) - Advanced ctags features
### Advanced Topics
- [AI Integration Guide](https://ryo-arima.github.io/vem/ai-integration.html) - Setting up AI coding assistants
- [Multi-Repository Setup](https://ryo-arima.github.io/vem/multi-repo.html) - Managing multiple codebases
- [Plugin Manager Guide](https://ryo-arima.github.io/vem/plugin-managers.html) - Using different plugin managers
### Developer Resources
- [Architecture Overview](https://ryo-arima.github.io/vem/architecture.html) - Technical architecture details
- [Contributing Guide](https://ryo-arima.github.io/vem/contributing.html) - How to contribute to VEM
- [API Reference](https://ryo-arima.github.io/vem/api.html) - Internal API documentation
## Installation
### From Pre-built Packages
Download the latest release from [GitHub Releases](https://github.com/ryo-arima/vem/releases).
Package names follow the format: `vem---.`
- Example: `vem-0.1.0-20251020-amd64.deb`
- Date is in UTC format (YYYYMMDD)
**Note:** Replace the package names below with the actual latest version from the [Releases page](https://github.com/ryo-arima/vem/releases/latest).
#### Debian/Ubuntu (deb)
```bash
# Check the latest release and download the appropriate package for your architecture
# For amd64:
wget https://github.com/ryo-arima/vem/releases/download/latest/vem_0.1.0-20251020_amd64.deb
sudo dpkg -i vem_0.1.0-20251020_amd64.deb
# For arm64:
wget https://github.com/ryo-arima/vem/releases/download/latest/vem_0.1.0-20251020_arm64.deb
sudo dpkg -i vem_0.1.0-20251020_arm64.deb
```
#### Red Hat/Fedora/CentOS (rpm)
```bash
# Check the latest release and download the appropriate package for your architecture
# For x86_64:
wget https://github.com/ryo-arima/vem/releases/download/latest/vem-0.1.0-20251020.x86_64.rpm
sudo rpm -i vem-0.1.0-20251020.x86_64.rpm
# For aarch64:
wget https://github.com/ryo-arima/vem/releases/download/latest/vem-0.1.0-20251020.aarch64.rpm
sudo rpm -i vem-0.1.0-20251020.aarch64.rpm
```
#### macOS (Homebrew)
```bash
# Download the Homebrew formula from the release
wget https://github.com/ryo-arima/vem/releases/download/latest/vem.rb
brew install ./vem.rb
```
#### Binary Archives (tar.gz/zip)
```bash
# Linux x86_64
wget https://github.com/ryo-arima/vem/releases/download/latest/vem-0.1.0-20251020-x86_64.tar.gz
tar -xzf vem-0.1.0-20251020-x86_64.tar.gz
sudo mv vem/vem /usr/local/bin/
# Linux aarch64
wget https://github.com/ryo-arima/vem/releases/download/latest/vem-0.1.0-20251020-aarch64.tar.gz
tar -xzf vem-0.1.0-20251020-aarch64.tar.gz
sudo mv vem/vem /usr/local/bin/
# macOS x86_64 (Intel)
wget https://github.com/ryo-arima/vem/releases/download/latest/vem-0.1.0-20251020-x86_64.tar.gz
tar -xzf vem-0.1.0-20251020-x86_64.tar.gz
sudo mv vem/vem /usr/local/bin/
# macOS arm64 (Apple Silicon)
wget https://github.com/ryo-arima/vem/releases/download/latest/vem-0.1.0-20251020-arm64.tar.gz
tar -xzf vem-0.1.0-20251020-arm64.tar.gz
sudo mv vem/vem /usr/local/bin/
```
### Using Cargo
```bash
cargo install vem
```
### Build from Source
```bash
git clone https://github.com/ryo-arima/vem.git
cd vem
cargo build --release
sudo cp target/release/vem /usr/local/bin/
```
## Usage
### Environment Management
```bash
# Create a new environment
vem create
# List all environments
vem list
# Switch to an environment
vem switch
# Show current environment
vem current
# Remove an environment
vem remove
```
### Ctags Management
VEM provides powerful ctags management for efficient code navigation across multiple repositories:
```bash
# Generate ctags for a repository
vem generate ctags [options]
# Update existing ctags
vem update ctags [options]
# Delete ctags for a repository
vem delete ctags [options]
# List all ctags
vem list ctags
# Clean all ctags files
vem clean ctags
```
### Examples
#### Basic Environment Setup
```bash
# Create a development environment
vem create development
# Create an AI-enhanced environment
vem create ai-development
# List all environments
vem list
# basic-vim
# developer-vim
# modern-nvim
# ai-development
# Switch to AI development environment
vem switch ai-development
# Check current environment
vem current
# ai-development
```
#### Advanced Ctags Usage
```bash
# Generate ctags for main project
vem generate ctags main_project
# Generate ctags for ML models with AI enhancement
vem generate ctags ml_models --ai-enhance
# Update shared libraries ctags
vem update ctags shared_libs --languages=python,rust
# List all ctags with status
vem list ctags
# Name Repository Tag File Size Status
# ai_comprehensive ml_models ai_comprehensive 2.1MB Active
# copilot_enhanced ai_project copilot_enhanced 1.8MB Active
# Clean all ctags files (with backup)
vem clean ctags
```
## Sample Environments
VEM comes with pre-configured sample environments to get you started quickly:
### 📝 **basic-vim**
- **Purpose**: Minimal Vim setup for beginners
- **Features**: Essential settings, syntax highlighting, line numbers
- **Plugin Manager**: None (pure Vim)
- **Best For**: Learning Vim, lightweight editing
### 🛠️ **developer-vim**
- **Purpose**: Professional development environment
- **Features**: vim-plug, NERDTree, FZF, CoC.nvim, Git integration
- **Plugin Manager**: vim-plug
- **Theme**: Gruvbox
- **Ctags**: Multi-repository support with shared libraries
- **Best For**: Serious development work
### 🚀 **modern-nvim**
- **Purpose**: Modern Neovim with LSP and Treesitter
- **Features**: lazy.nvim, Neo-tree, Telescope, Mason LSP, completion
- **Plugin Manager**: lazy.nvim
- **Theme**: TokyoNight
- **Ctags**: Workspace-focused with LSP integration
- **Best For**: Modern development workflow
### 🤖 **ai-development**
- **Purpose**: AI-enhanced development environment
- **Features**: GitHub Copilot, ChatGPT, Codeium, comprehensive LSP
- **Plugin Manager**: lazy.nvim
- **Theme**: Catppuccin
- **Ctags**: AI-optimized cross-repository tagging
- **Best For**: AI-assisted coding, ML/Data Science
Each environment is fully configured and ready to use with its own `vem.toml` configuration file.
## Configuration Structure
VEM uses a sophisticated configuration system based on TOML files:
```
etc/.vem/
├── envs/ # Environment configurations
│ ├── basic-vim/
│ │ ├── vimrc # Vim configuration
│ │ └── vem.toml # Environment settings
│ ├── developer-vim/
│ │ ├── vimrc
│ │ └── vem.toml
│ ├── modern-nvim/
│ │ ├── init.lua # Neovim configuration
│ │ ├── lua/plugins/
│ │ └── vem.toml
│ └── ai-development/
│ ├── init.lua
│ └── vem.toml
└── global/ # Shared configurations
├── vim/ # Global Vim settings
├── nvim/ # Global Neovim settings
├── scripts/ # Shared VimScript functions
├── themes/ # Color schemes
└── ai-tools/ # AI tool configurations
```
### vem.toml Configuration
Each environment's `vem.toml` file contains:
- **Environment metadata** (name, description, type)
- **Plugin manager selection** (vim-plug, lazy.nvim, packer, etc.)
- **Package management** with dependency tracking
- **Ctags configuration** with multi-repository support
- **Theme and UI settings**
- **Keymapping definitions**
- **LSP and AI tool integrations**
## Advanced Features
### 🏷️ Multi-Repository Ctags Management
VEM provides sophisticated ctags management across multiple repositories:
- **Cross-Repository Navigation**: Generate unified tags across related projects
- **Smart Filtering**: AI-enhanced tag relevance and filtering
- **Repository Sync**: Automatic synchronization of external repositories
- **Context-Aware Tagging**: Different tag configurations for different purposes
### 🤖 AI Integration
Built-in support for modern AI coding assistants:
- **GitHub Copilot**: Native integration with enhanced context
- **ChatGPT**: Direct access to conversational AI assistance
- **Codeium**: Free alternative with smart completion
- **Context Enhancement**: AI tools receive rich context from ctags
### 🔌 Plugin Manager Ecosystem
Support for all major Vim/Neovim plugin managers:
- **Vim**: vim-plug, pathogen, vundle, dein
- **Neovim**: lazy.nvim, packer.nvim, paq-nvim
- **Auto-Configuration**: Automatic plugin installation and updates
- **Dependency Management**: Smart package dependency resolution
### 🌈 Theme Management
Comprehensive color scheme and theme support:
- **30+ Built-in Themes**: Gruvbox, Nord, Dracula, TokyoNight, Catppuccin, etc.
- **Environment-Specific**: Different themes for different purposes
- **Plugin Integration**: Automatic theme configuration for status lines and UI
## Project Architecture
VEM follows a modular architecture with clear separation of concerns:
### Core Modules
```
src/
├── main.rs # Application entry point
├── cnf/ # Configuration management
├── ctl/ # Control layer (commands and CLI)
├── ent/ # Entity definitions (data models)
├── rep/ # Repository layer (data persistence)
└── usc/ # Use case layer (business logic)
```
### Architecture Overview
- **Configuration (`cnf`)**: Handles application settings and environment configurations
- **Control (`ctl`)**: Command-line interface and user interaction handling
- **Entity (`ent`)**: Core data structures and domain models
- **Repository (`rep`)**: Data storage and retrieval operations
- **Use Case (`usc`)**: Business logic and application workflows
This layered architecture ensures:
- Clear separation of concerns
- Easy testing and maintenance
- Scalable codebase structure
- Clean dependency management
## Development
### Prerequisites
- Rust 1.70 or higher (nightly toolchain recommended for development)
- Git
### Project Structure
```
vem/
├── docs/ # Documentation (mdBook)
│ ├── src/ # Documentation source
│ ├── book.toml # mdBook configuration
│ └── book/ # Generated documentation (ignored)
├── scripts/ # Packaging and release scripts
│ ├── main.sh # Main packaging script entry point
│ └── packages/ # Package format specific scripts
│ ├── apt/ # Debian package scripts
│ ├── rpm/ # RPM package scripts
│ ├── brew/ # Homebrew formula scripts
│ └── common/ # Shared utilities
├── src/ # Source code
│ ├── cnf/ # Configuration layer
│ ├── ctl/ # Control layer
│ ├── ent/ # Entity layer
│ ├── rep/ # Repository layer
│ ├── usc/ # Use case layer
│ ├── util/ # Utility modules
│ └── main.rs # Entry point
├── .github/ # GitHub Actions workflows
│ └── workflows/ # CI/CD pipelines
├── Cargo.toml # Project configuration
├── Cargo.lock # Dependency lock file
├── rustfmt.toml # Rust formatter configuration
└── README.md # Project documentation
```
### Setup
```bash
git clone https://github.com/ryo-arima/vem.git
cd vem
cargo build
```
### Running Tests
```bash
cargo test
```
### Code Formatting
This project uses nightly rustfmt with custom configurations:
```bash
# Install nightly toolchain
rustup toolchain install nightly
# Format code
cargo +nightly fmt
# Check formatting
cargo +nightly fmt --check
```
### Building Packages
To build distribution packages locally:
```bash
# Build all packages (Linux only)
bash scripts/main.sh all
# Build specific package types
bash scripts/main.sh apt # Debian packages
bash scripts/main.sh rpm # RPM packages
bash scripts/main.sh dist # tar.gz and zip archives
bash scripts/main.sh brew # Homebrew formula
```
## License
MIT License
## Contributing
Pull requests and issue reports are welcome!