Plugin.substitute API Reference

Provide Neovim keybindings for text substitution and content exchange operations.

1|Updated Oct 26, 2025
One-click install
npx skills add https://github.com/NeKon69/nvim-dot --skill plugin-substitute-api-reference
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Plugin.substitute API Reference
Source: https://github.com/NeKon69/nvim-dot/tree/main/.agents/skills/plugin.substitute
Command: npx skills add https://github.com/NeKon69/nvim-dot --skill plugin-substitute-api-reference

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides quick access to text substitution and content exchange functionalities within the Neovim editor, streamlining editing tasks.

Core Features & Use Cases

  • Operator-based Substitution: Replace text using the 'gr' operator in normal mode.
  • Line-based Substitution: Substitute an entire line with 'grr'.
  • Content Exchange: Swap text selections or lines using 'gx' and 'gxx'.
  • Use Case: Quickly change a variable name across multiple lines or swap the content of two selected blocks of text without manual copy-pasting.

Quick Start

Use the gr operator in normal mode to substitute text.

Frequently Asked Questions about Plugin.substitute API Reference

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

FAQPage Schema
How do I substitute text in Neovim without manual copy-pasting?

Text substitution in Neovim is handled using the 'gr' operator in normal mode, allowing you to replace text directly. You can substitute an entire line with 'grr', streamlining code refactoring.

Can I swap content between two selected blocks in Neovim?

Yes, content exchange is supported using the 'gx' operator for selected text or 'gxx' for entire lines. This swaps the content of two blocks or lines efficiently without manual cut and paste.

How does operator-based substitution work for code refactoring?

Operator-based substitution works by pressing 'gr' followed by a motion or text object in normal mode. This immediately replaces the targeted text with the contents of the unnamed register, speeding up refactoring tasks.

Do I need the substitute.nvim plugin to use these keybindings?

Yes, these keybindings rely on the substitute.nvim plugin for core functionality. You must have this plugin installed in your Neovim environment to perform text substitution and content exchange operations.

What is the best way to change a variable name across multiple lines in Neovim?

The best way to change a variable name across multiple lines is using the operator-based substitution feature. By utilizing the 'gr' operator, you can quickly replace text instances without leaving normal mode.