Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Commands

VEM provides a simple and intuitive command-line interface. Here’s a comprehensive overview of all available commands.

Command Overview

CommandDescription
createCreate a new Vim environment
listList all available environments
switchSwitch to a specific environment
currentShow the currently active environment
removeRemove an environment

Global Options

All commands support these global options:

  • --help, -h: Show help information
  • --version, -V: Show version information
  • --verbose, -v: Enable verbose output
  • --quiet, -q: Suppress non-essential output

Command Details

vem create <name>

Creates a new Vim environment with the specified name.

Usage:

vem create <environment-name>

Examples:

vem create development
vem create writing
vem create experimental

Options:

  • --from <template>: Create from existing environment (future feature)
  • --description <desc>: Add description to environment (future feature)

Behavior:

  • Creates directory structure under ~/.vem/environments/<name>/
  • Initializes empty .vimrc and .vim/ directory
  • Environment becomes available for switching

Read more →

vem list

Lists all available Vim environments.

Usage:

vem list

Options:

  • --detailed, -d: Show detailed information (future feature)
  • --current-first: Show current environment first (future feature)

Output:

development
writing
experimental

Read more →

vem switch <name>

Switches to the specified Vim environment.

Usage:

vem switch <environment-name>

Examples:

vem switch development
vem switch writing

Behavior:

  • Updates symbolic links to point to the specified environment
  • Makes the environment active for new Vim sessions
  • Preserves existing Vim sessions

Read more →

vem current

Shows the currently active Vim environment.

Usage:

vem current

Output:

development

Exit Codes:

  • 0: Success, environment shown
  • 1: No environment currently active

Read more →

vem remove <name>

Removes a Vim environment permanently.

Usage:

vem remove <environment-name>

Examples:

vem remove experimental

Options:

  • --force, -f: Skip confirmation prompt (future feature)
  • --backup: Create backup before removal (future feature)

Safety:

  • Prompts for confirmation before removal
  • Cannot remove currently active environment
  • Permanently deletes all environment data

Read more →

Exit Codes

VEM uses standard exit codes:

  • 0: Success
  • 1: General error
  • 2: Invalid command or arguments
  • 3: Environment not found
  • 4: Environment already exists
  • 5: Permission denied

Shell Completion

VEM supports shell completion for bash, zsh, and fish (future feature):

# bash
vem completions bash > /etc/bash_completion.d/vem

# zsh  
vem completions zsh > ~/.zsh/completions/_vem

# fish
vem completions fish > ~/.config/fish/completions/vem.fish