Skip to content

New feature: External editor such as vim, helix, etc#5823

Merged
alexhancock merged 10 commits intoblock:mainfrom
peterwilli:feat/external_editor
Jan 28, 2026
Merged

New feature: External editor such as vim, helix, etc#5823
alexhancock merged 10 commits intoblock:mainfrom
peterwilli:feat/external_editor

Conversation

@peterwilli
Copy link
Contributor

@peterwilli peterwilli commented Nov 20, 2025

Hi everyone at Block and Contributors, I began using this tool after testing like 5 different agentic CLI's, and I must say, yours is the best. It's got a vision, a sense of direction that others such as Aider lack. Yet its also experimental, and allows challenging the status quo. Because of this, I'm confident that I'll stick around.

This PR actually started out as an autocomplete feature, but I realized it soon got too difficult. At the end, I decided: Why not augment instead of reinvent?

(Pls be gentle this is my first PR for this project, it comes in good faith and I hope it aligns with your vision)

Love to all, and I hope you have a good weekend.

Summary

While I love editing prompts directly, having a simple CLI-editor makes it difficult to follow along writing longer prompts, and external editors such as neovim, helix, etc. have a lot of cool things such as syntax highlighting, undo history, and language server tools.

If you want to try this, add this to your goose config.yml:

GOOSE_PROMPT_EDITOR: hx/nvim/whatever

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

AI Assistance

  • This PR was created or reviewed with AI assistance

I followed the HOWTOAI and also reviewed every bit that was created.

Testing

There's unit tests that self-review this change for integrity. Just run cargo test editor to see for yourself.

Related Issues

Relates to #ISSUE_ID
Discussion: LINK (if any)

Screenshots/Demos (for UX changes)

Demo is here: https://asciinema.org/a/757099

Submitting a Recipe?

Email:

Signed-off-by: Peter Willemsen <peter@codebuffet.co>
Signed-off-by: Peter Willemsen <peter@codebuffet.co>
…ther project files (allow file tagging in Helix and other editors)

Signed-off-by: Peter Willemsen <peter@codebuffet.co>
@peterwilli
Copy link
Contributor Author

I have updated this branch, it now places the temp file as a symlink inside your working directory, so that you can directly tag files relative to your project (cross-platform but I dont use Windows so if anyone wants to test feel free).

This way, the file doesnt get written to SSD with every turn, while still benefiting from adding files relative to your project (for example in Helix if you type ./ you get a file picker in-editor).

I also explored other options such as named pipes, but these are more difficult to do consistently and cross-platform.

Signed-off-by: Peter Willemsen <peter@codebuffet.co>
Signed-off-by: Peter Willemsen <peter@codebuffet.co>
Signed-off-by: = <peter@codebuffet.co>
Signed-off-by: = <peter@codebuffet.co>
Copy link
Collaborator

@alexhancock alexhancock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A really cool concept. I like it.

Left a couple suggestions.

If you're up for it I'd like to get them resolved and get this in

@JordanPaoletti
Copy link

Hey @peterwilli, this is looking like a great contribution and something I also want for this tool!
A couple of additional suggestions to consider:

In most posix/posixish cli envs, the $EDITOR and/or $VISUAL env var is set to the preferred editor and is often used by other cli apps. It might be a nice quality of life feature to fallback to these vars if set (which tend to be vi by default) and use 'vi' directly if these also aren't set.

On another note, but using kiro-cli at work has gotten me accustomed to their /editor command. This allows the user to jump into the set editor at their discretion if they know they are going to be writing a long prompt or need to do many pastes with editing. But it also allows quick back and forth with jumping into an editor. I'm not sure if goose has any guidelines on what is and isn't allowed as a slash command though.

@DOsinga
Copy link
Collaborator

DOsinga commented Jan 20, 2026

I like both these suggestions. our slash commands aren't in any particularly good shape so I'd be happy to add this

@michaelneale
Copy link
Collaborator

hey @peterwilli you still interested in pushing this over the line?

@peterwilli
Copy link
Contributor Author

Hey I'm back, I'll check out the feedback right now!

@peterwilli peterwilli requested a review from a team as a code owner January 27, 2026 10:12
@peterwilli
Copy link
Contributor Author

I have no idea what happened with my merge but somehow it now says I'm 250 commits behind. I think that its because I had some issues doing a merge and a signoff commit. I'll check back later today to fix this part by manually going back to main and put the change back in

@peterwilli peterwilli force-pushed the feat/external_editor branch from e87d993 to c873872 Compare January 27, 2026 20:35
Signed-off-by: Peter Willemsen <peter@codebuffet.co>
@peterwilli peterwilli force-pushed the feat/external_editor branch from c873872 to 8ea7d39 Compare January 27, 2026 20:37
Signed-off-by: Peter Willemsen <peter@codebuffet.co>
@peterwilli peterwilli force-pushed the feat/external_editor branch from 917faa6 to 4d0d5c3 Compare January 27, 2026 22:04
… "vi" fallback

Signed-off-by: Peter Willemsen <peter@codebuffet.co>
@peterwilli
Copy link
Contributor Author

All feedback has been handled!

@alexhancock alexhancock self-requested a review January 28, 2026 01:45
@alexhancock alexhancock merged commit 7f98f1f into block:main Jan 28, 2026
18 checks passed
@alexhancock
Copy link
Collaborator

@peterwilli Thanks for the contribution!

@peterwilli
Copy link
Contributor Author

Omg my first Goosecontribution! Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants