How do I change the content inside backticks?
Answer
ci`
Explanation
The ci` command changes the text inside backtick delimiters. This is useful when editing markdown inline code or template literals.
How it works
cis the change operatori`is the "inner backticks" text object- Deletes content between backticks and enters insert mode
- Backticks are preserved
Example
Use the `oldCommand` to do things.
With cursor inside the backticks, ci` deletes oldCommand and enters insert mode. Type newCommand.
Tips
ca`changes around backticks (deletes them too)di`deletes without entering insert modevi`selects inside backticks- Works in markdown files for editing inline code
- Also useful for JavaScript template literals