-
-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Problem Statement
I love the Claude Code plugin, but I often Vim a random file without going to the containing directory first (e.g. vim /tmp/foo.md).
When I open the Claude Code plugin I want to be able to talk to Claude about the current buffer, but Claude by default assumes I'm talking about my shell's current working directory, and isn't aware of the contents of the buffer that I've opened.
Proposed Solution
Claude Code has a cd_to_parent option as follows:
If there is only one buffer open, or if all open buffers are for files contained in the same directory, the claude process gets started in the parent directory of the open files.
This still has the downside that Claude will need to be hinted what file is being looked at (e.g. Modify @foo.md), but has the advantage that it'd be MUCH easier to implement than trying to inject anything into Claude itself.
Alternative Solutions
It would be even cooler to send a first prompt to Claude saying "I'm looking at @foo.md", so that Claude already starts with the context of what the user is looking at.
Use Case
This feature would be used by anybody who wants to quickly summon Claude to help them in edit in Vim, without needing to do a bunch of pre-work to let Claude know what they're talking about.