Skip to content
/ vem Public

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.

License

Notifications You must be signed in to change notification settings

ryo-arima/vem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

94 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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 - Minimalist Vim Plugin Manager
  • packer.nvim - A use-package inspired plugin manager for Neovim
  • lazy.nvim - Modern plugin manager for Neovim
  • dein.vim - Dark powered Vim/Neovim plugin manager
  • paq-nvim - Neovim package manager
  • jetpack.vim - Lightning-fast plugin manager for Vim/Neovim

AI Tools

Color Schemes

  • Gruvbox - Retro groove color scheme
  • Nord - Arctic, north-bluish color palette
  • Dracula - Dark theme for many applications
  • TokyoNight - Clean, dark Neovim theme
  • Catppuccin - Soothing pastel theme
  • OneDark - Atom's iconic One Dark theme
  • Solarized - Precision colors for machines and people
  • Monokai - Iconic color scheme for developers

Development Tools

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

Getting Started

User Guides

Advanced Topics

Developer Resources

Installation

From Pre-built Packages

Download the latest release from GitHub Releases.

Package names follow the format: vem-<version>-<date>-<arch>.<ext>

  • 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.

Debian/Ubuntu (deb)

# 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)

# 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)

# 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)

# 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

cargo install vem

Build from Source

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

# Create a new environment
vem create <environment-name>

# List all environments
vem list

# Switch to an environment
vem switch <environment-name>

# Show current environment
vem current

# Remove an environment
vem remove <environment-name>

Ctags Management

VEM provides powerful ctags management for efficient code navigation across multiple repositories:

# Generate ctags for a repository
vem generate ctags <repository> [options]

# Update existing ctags
vem update ctags <repository> [options]

# Delete ctags for a repository
vem delete ctags <repository> [options]

# List all ctags
vem list ctags

# Clean all ctags files
vem clean ctags

Examples

Basic Environment Setup

# 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

# 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

git clone https://github.com/ryo-arima/vem.git
cd vem
cargo build

Running Tests

cargo test

Code Formatting

This project uses nightly rustfmt with custom configurations:

# 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:

# 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!

About

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.

Topics

Resources

License

Stars

Watchers

Forks