nvim
This skill should be used when the user asks to "open in nvim", "show in editor","open file in nvim", "edit in nvim", "nvim open", "send to nvim", "open buffer","view in neovim", or "open this in my editor".Requires NVIM_SOCKET environment variable to be set (automatic in worktree sessions).Not for editing files directly - this sends files to the user's nvim instance.
When & Why to Use This Skill
This Claude skill enables seamless integration between the AI agent and a local Neovim instance, allowing users to instantly open and view files in their preferred editor via a remote socket. It bridges the gap between AI-assisted coding and manual development, streamlining the workflow for developers who use terminal-based environments like tmux.
Use Cases
- Quickly transition from AI-generated code snippets to a full-featured editing environment by opening files directly in Neovim.
- Navigate to specific lines of code for debugging or review by using the remote line-jumping capability (+line) from the chat interface.
- Manage multi-file project reviews by sending several relevant source files to the active Neovim buffer simultaneously.
- Enhance developer productivity in worktree sessions by automating the connection between the AI agent and the local editor socket.
| name | nvim |
|---|---|
| description | | |
Open Files in Nvim
Open files in the running nvim instance connected to this tmux session.
Command
nvim --server "$NVIM_SOCKET" --remote <files...>
Environment
$NVIM_SOCKET- Path to the nvim socket (set automatically in worktree sessions)
Examples
# Open a single file
nvim --server "$NVIM_SOCKET" --remote src/index.ts
# Open multiple files
nvim --server "$NVIM_SOCKET" --remote src/index.ts src/utils.ts
# Open file at specific line (use +line before filename)
nvim --server "$NVIM_SOCKET" --remote +42 src/index.ts
Troubleshooting
- Socket not set: Ensure you're in a worktree session, or manually set
NVIM_SOCKET - Connection refused: The nvim instance may have closed; restart nvim with
v . --listen $NVIM_SOCKET - File not opening: Verify the file path is correct and accessible
Notes
- The socket is set via
tmux set-environmentat session creation - New panes/windows in the session inherit
NVIM_SOCKET
$ARGUMENTS