One-click install
npx skills add https://github.com/Cogni-AI-OU/cogni-ai-agent-skills --skill vim-ex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vim-ex
Source: https://github.com/Cogni-AI-OU/cogni-ai-agent-skills/tree/main/vim-ex
Command: npx skills add https://github.com/Cogni-AI-OU/cogni-ai-agent-skills --skill vim-ex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you perform reliable, non-interactive file edits without running into the portability and syntax pitfalls of stream-editing tools like sed in shell or agent automation.

Core Features & Use Cases

  • In-place, non-interactive editing: Use Vim Ex mode to load a full file buffer and apply complex edits safely and directly in place.
  • Multi-line and structured transformations: Execute multi-line substitutions, deletions, parsing-style edits, wrapping, and range-based operations.
  • Batch & scripting patterns: Apply repeatable editing logic across many files (e.g., via find/exec or argdo) and use heredocs for maintainable command sets.

Quick Start

Ask the AI to edit the file non-interactively by running Ex in silent mode to apply a substitution and write changes: "Use ex -s to replace alias with alias_new in ~/.bashrc, then save the file."

Frequently Asked Questions about vim-ex

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform non-interactive in-place file editing for shell automation?

Non-interactive in-place file editing loads a full file buffer to apply complex edits safely and directly, executing Ex in silent mode with write-and-quit commands to persist changes without user interaction.

What is the best way to apply batch refactoring across many files?

Batch refactoring across many files applies repeatable editing logic via find/exec or argdo, composing substitutions, ranges, and macros using heredocs for maintainable command sets to ensure reliable structured transformations.

How does Vim Ex mode handle multi-line text transformations?

Vim Ex mode handles multi-line text transformations by loading the entire file buffer, allowing safe execution of complex substitutions, deletions, parsing-style edits, wrapping, and range-based operations.

Can I use Ex mode instead of sed for shell-scripted text transformations?

Using Ex mode instead of stream-editing tools avoids portability and syntax pitfalls in shell automation, providing a full buffer load to execute complex multi-line transformations safely and directly in place.

What are the limitations of non-interactive editing with Ex mode?

Non-interactive editing with Ex mode requires executing with silent/batch flags and composing substitutions, ranges, and macros properly to avoid failing to persist changes, needing write-and-quit commands to save correctly.